From 6c4cadbb04d633ad7b762058bdeba6e1f650dafd Mon Sep 17 00:00:00 2001
From: Steven Bennetts <steve@lindenlab.com>
Date: Fri, 8 May 2009 01:26:20 +0000
Subject: Update version to 2.0.0.0 !!!

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

(limited to 'indra')

diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 15f0e98330..0730087662 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -33,8 +33,8 @@
 #ifndef LL_LLVERSIONVIEWER_H
 #define LL_LLVERSIONVIEWER_H
 
-const S32 LL_VERSION_MAJOR = 1;
-const S32 LL_VERSION_MINOR = 24;
+const S32 LL_VERSION_MAJOR = 2;
+const S32 LL_VERSION_MINOR = 0;
 const S32 LL_VERSION_PATCH = 0;
 const S32 LL_VERSION_BUILD = 0;
 
-- 
cgit v1.2.3


From a4000c3744e42fcbb638e742f3b63fa31a0dee15 Mon Sep 17 00:00:00 2001
From: Steven Bennetts <steve@lindenlab.com>
Date: Fri, 8 May 2009 07:43:08 +0000
Subject: merge trunk@116587 skinning-7@119389 -> viewer-2.0.0-skinning-7

---
 indra/CMakeLists.txt                               |    4 +
 indra/cmake/LLAddBuildTest.cmake                   |    1 +
 indra/cmake/Variables.cmake                        |    1 +
 indra/integration_tests/CMakeLists.txt             |    3 +
 .../integration_tests/llui_libtest/CMakeLists.txt  |   96 +
 .../llui_libtest/llui_libtest.cpp                  |  149 +
 .../integration_tests/llui_libtest/llui_libtest.h  |   36 +
 .../integration_tests/llui_libtest/llwidgetreg.cpp |  107 +
 indra/integration_tests/llui_libtest/llwidgetreg.h |   43 +
 indra/llaudio/llaudiodecodemgr.cpp                 |    2 +-
 indra/llcharacter/llbvhloader.cpp                  |  161 +-
 indra/llcharacter/llbvhloader.h                    |   51 +-
 indra/llcharacter/llcharacter.h                    |    2 +-
 indra/llcharacter/lljointstate.h                   |    2 +-
 indra/llcharacter/llkeyframemotionparam.cpp        |    7 +-
 indra/llcharacter/llmultigesture.cpp               |   64 +-
 indra/llcharacter/llmultigesture.h                 |   10 +-
 indra/llcharacter/llpose.h                         |    6 +-
 indra/llcommon/CMakeLists.txt                      |   18 +
 indra/llcommon/is_approx_equal_fraction.h          |   23 +
 indra/llcommon/linden_common.h                     |   18 +-
 indra/llcommon/llassettype.cpp                     |    5 +-
 indra/llcommon/llassettype.h                       |    5 +-
 indra/llcommon/llboost.h                           |   15 +
 indra/llcommon/llcommon.cpp                        |    2 +
 indra/llcommon/llcommon.h                          |    3 +-
 indra/llcommon/lldate.cpp                          |   58 +-
 indra/llcommon/lldate.h                            |    4 +-
 indra/llcommon/lldoubledispatch.h                  |  332 +
 indra/llcommon/llerrorthread.cpp                   |    2 +
 indra/llcommon/llevent.h                           |    2 +-
 indra/llcommon/llinstancetracker.h                 |  100 +
 indra/llcommon/llmd5.cpp                           |    1 +
 indra/llcommon/llmemory.cpp                        |   25 +-
 indra/llcommon/llmemory.h                          |  428 +-
 indra/llcommon/llmemtype.h                         |    5 +-
 indra/llcommon/llpointer.h                         |  177 +
 indra/llcommon/llptrto.cpp                         |  108 +
 indra/llcommon/llptrto.h                           |   93 +
 indra/llcommon/llqueuedthread.cpp                  |    2 +
 indra/llcommon/llrefcount.cpp                      |   49 +
 indra/llcommon/llrefcount.h                        |   78 +
 indra/llcommon/llsafehandle.h                      |  167 +
 indra/llcommon/llsdserialize.cpp                   |    2 +-
 indra/llcommon/llsdserialize.h                     |    3 +-
 indra/llcommon/llsdutil.cpp                        |    9 +
 indra/llcommon/llsdutil.h                          |    1 +
 indra/llcommon/llsecondlifeurls.cpp                |   34 +-
 indra/llcommon/llsecondlifeurls.h                  |   13 +-
 indra/llcommon/llsingleton.h                       |  158 +
 indra/llcommon/llstat.cpp                          |   42 +-
 indra/llcommon/llstat.h                            |   25 +-
 indra/llcommon/llstring.cpp                        |   76 +
 indra/llcommon/llstring.h                          |  251 +-
 indra/llcommon/llthread.h                          |    1 -
 indra/llcommon/lltimer.cpp                         |    9 +-
 indra/llcommon/lltimer.h                           |    9 +-
 indra/llcommon/lltreeiterators.h                   |  691 ++
 indra/llcrashlogger/llcrashlogger.cpp              |    1 +
 indra/llimage/llimage.h                            |    2 +-
 indra/llimage/llimagedxt.h                         |    1 +
 indra/llimage/llimagetga.cpp                       |    4 +-
 indra/llimage/llimageworker.h                      |    1 +
 indra/llimagej2coj/llimagej2coj.cpp                |    2 +-
 indra/llinventory/lleconomy.h                      |    2 +-
 indra/llinventory/llinventory.cpp                  |  105 +-
 indra/llinventory/llinventory.h                    |    4 +-
 indra/llinventory/llinventorytype.cpp              |    4 +
 indra/llinventory/llinventorytype.h                |    3 +-
 indra/llinventory/llnotecard.h                     |    2 +-
 indra/llinventory/llparcel.cpp                     |    4 +-
 indra/llinventory/llparcel.h                       |    1 +
 indra/llinventory/llpermissions.cpp                |   63 +-
 indra/llinventory/llpermissions.h                  |    3 -
 indra/llinventory/llsaleinfo.cpp                   |   34 +-
 indra/llinventory/llsaleinfo.h                     |    3 -
 indra/llmath/llmath.h                              |    4 +-
 indra/llmath/llrect.h                              |    6 +-
 indra/llmath/llsdutil_math.cpp                     |    5 +-
 indra/llmath/llvolume.h                            |    2 +-
 indra/llmath/llvolumemgr.h                         |    2 +-
 indra/llmath/v4color.cpp                           |   34 +
 indra/llmath/v4color.h                             |   15 +-
 indra/llmath/v4coloru.h                            |    6 +
 indra/llmessage/llares.h                           |    3 +-
 indra/llmessage/llcachename.cpp                    |  213 +-
 indra/llmessage/llcachename.h                      |   27 +-
 indra/llmessage/llhttpclientadapter.cpp            |    7 +-
 indra/llmessage/llhttpclientadapter.h              |    9 +-
 indra/llmessage/llhttpclientinterface.h            |    7 +-
 indra/llmessage/llhttpnode.h                       |    3 +-
 indra/llmessage/llhttpnodeadapter.h                |   15 +-
 indra/llmessage/llinstantmessage.cpp               |    2 +-
 indra/llmessage/llinstantmessage.h                 |    3 +-
 indra/llmessage/llmessagesenderinterface.h         |    7 +-
 indra/llmessage/llregionpresenceverifier.cpp       |   25 +-
 indra/llmessage/llregionpresenceverifier.h         |   25 +-
 indra/llmessage/llstoredmessage.cpp                |    2 +-
 indra/llmessage/llstoredmessage.h                  |    2 +-
 indra/llmessage/lltemplatemessagedispatcher.cpp    |   17 +-
 indra/llmessage/lltemplatemessagedispatcher.h      |   17 +-
 indra/llmessage/lltransfersourceasset.cpp          |    2 +
 indra/llmessage/lltrustedmessageservice.cpp        |   17 +-
 indra/llmessage/lltrustedmessageservice.h          |   17 +-
 indra/llmessage/message.h                          |    2 +-
 indra/llmessage/message_prehash.cpp                |    2 +-
 indra/llmessage/tests/commtest.h                   |   23 +
 indra/llmessage/tests/llcurl_stub.cpp              |   10 +-
 indra/llmessage/tests/llhttpclientadapter_test.cpp |    7 +-
 .../tests/lltemplatemessagedispatcher_test.cpp     |   17 +-
 indra/llmessage/tests/lltesthttpclientadapter.cpp  |    2 +-
 indra/llmessage/tests/lltesthttpclientadapter.h    |    2 +-
 indra/llmessage/tests/lltestmessagesender.cpp      |    2 +-
 indra/llmessage/tests/lltestmessagesender.h        |    2 +-
 .../tests/lltrustedmessageservice_test.cpp         |   17 +-
 indra/llmessage/tests/networkio.h                  |   23 +
 indra/llprimitive/llmaterialtable.cpp              |   11 +
 indra/llprimitive/llmaterialtable.h                |    2 +
 indra/llprimitive/llprimitive.h                    |    2 +-
 indra/llprimitive/llprimtexturelist.cpp            |    7 +-
 indra/llprimitive/llprimtexturelist.h              |    7 +-
 indra/llrender/llfontbitmapcache.cpp               |    7 +-
 indra/llrender/llfontbitmapcache.h                 |    7 +-
 indra/llrender/llfontgl.cpp                        |  118 +-
 indra/llrender/llfontgl.h                          |   47 +-
 indra/llrender/llfontregistry.cpp                  |   19 +-
 indra/llrender/llfontregistry.h                    |   13 +-
 indra/llrender/llimagegl.h                         |    3 +-
 indra/llrender/llrender.h                          |    2 +-
 indra/llrender/llvertexbuffer.cpp                  |    1 -
 indra/llrender/llvertexbuffer.h                    |    1 -
 indra/llui/CMakeLists.txt                          |   48 +-
 indra/llui/llbutton.cpp                            |  680 +-
 indra/llui/llbutton.h                              |  195 +-
 indra/llui/llcallbackmap.h                         |   19 +-
 indra/llui/llcheckboxctrl.cpp                      |  278 +-
 indra/llui/llcheckboxctrl.h                        |   73 +-
 indra/llui/llcombobox.cpp                          |  555 +-
 indra/llui/llcombobox.h                            |  126 +-
 indra/llui/llconsole.cpp                           |  393 +
 indra/llui/llconsole.h                             |  162 +
 indra/llui/llcontainerview.cpp                     |  301 +
 indra/llui/llcontainerview.h                       |   92 +
 indra/llui/lldraghandle.cpp                        |  105 +-
 indra/llui/lldraghandle.h                          |   44 +-
 indra/llui/llf32uictrl.cpp                         |   57 +
 indra/llui/llf32uictrl.h                           |   83 +
 indra/llui/llfloater.cpp                           | 1649 ++--
 indra/llui/llfloater.h                             |  297 +-
 indra/llui/llfloaterreg.cpp                        |  423 +
 indra/llui/llfloaterreg.h                          |  149 +
 indra/llui/llflyoutbutton.cpp                      |   94 +
 indra/llui/llflyoutbutton.h                        |   71 +
 indra/llui/llfocusmgr.cpp                          |   20 +-
 indra/llui/llfunctorregistry.h                     |    2 +-
 indra/llui/lliconctrl.cpp                          |  126 +-
 indra/llui/lliconctrl.h                            |   32 +-
 indra/llui/llkeywords.cpp                          |    4 +-
 indra/llui/lllayoutstack.cpp                       |  718 ++
 indra/llui/lllayoutstack.h                         |  102 +
 indra/llui/lllazyvalue.h                           |   83 +
 indra/llui/lllineeditor.cpp                        |  690 +-
 indra/llui/lllineeditor.h                          |  177 +-
 indra/llui/llmenugl.cpp                            | 3256 +++-----
 indra/llui/llmenugl.h                              |  583 +-
 indra/llui/llmodaldialog.cpp                       |   48 +-
 indra/llui/llmodaldialog.h                         |    2 +-
 indra/llui/llmultifloater.cpp                      |  510 ++
 indra/llui/llmultifloater.h                        |  107 +
 indra/llui/llmultislider.cpp                       |  218 +-
 indra/llui/llmultislider.h                         |   97 +-
 indra/llui/llmultisliderctrl.cpp                   |  392 +-
 indra/llui/llmultisliderctrl.h                     |   71 +-
 indra/llui/llnotifications.cpp                     |  164 +-
 indra/llui/llnotifications.h                       |   97 +-
 indra/llui/llpanel.cpp                             | 1133 +--
 indra/llui/llpanel.h                               |  164 +-
 indra/llui/llprogressbar.cpp                       |  135 +-
 indra/llui/llprogressbar.h                         |   45 +-
 indra/llui/llradiogroup.cpp                        |  248 +-
 indra/llui/llradiogroup.h                          |   74 +-
 indra/llui/llresizebar.cpp                         |   37 +-
 indra/llui/llresizebar.h                           |   26 +-
 indra/llui/llresizehandle.cpp                      |   57 +-
 indra/llui/llresizehandle.h                        |   13 +-
 indra/llui/llresmgr.cpp                            |  147 +-
 indra/llui/llresmgr.h                              |   25 +-
 indra/llui/llscrollbar.cpp                         |  237 +-
 indra/llui/llscrollbar.h                           |   72 +-
 indra/llui/llscrollcontainer.cpp                   |  303 +-
 indra/llui/llscrollcontainer.h                     |   36 +-
 indra/llui/llscrollingpanellist.cpp                |   62 +-
 indra/llui/llscrollingpanellist.h                  |   30 +-
 indra/llui/llscrolllistcell.cpp                    |  413 +
 indra/llui/llscrolllistcell.h                      |  223 +
 indra/llui/llscrolllistcolumn.cpp                  |  320 +
 indra/llui/llscrolllistcolumn.h                    |  189 +
 indra/llui/llscrolllistctrl.cpp                    | 1884 +----
 indra/llui/llscrolllistctrl.h                      |  433 +-
 indra/llui/llscrolllistitem.cpp                    |  157 +
 indra/llui/llscrolllistitem.h                      |  129 +
 indra/llui/llsdparam.cpp                           |  158 +
 indra/llui/llsdparam.h                             |  107 +
 indra/llui/llsearcheditor.cpp                      |  124 +
 indra/llui/llsearcheditor.h                        |   98 +
 indra/llui/llslider.cpp                            |  155 +-
 indra/llui/llslider.h                              |   71 +-
 indra/llui/llsliderctrl.cpp                        |  339 +-
 indra/llui/llsliderctrl.h                          |  119 +-
 indra/llui/llspinctrl.cpp                          |  371 +-
 indra/llui/llspinctrl.h                            |   74 +-
 indra/llui/llstatbar.cpp                           |  295 +
 indra/llui/llstatbar.h                             |  108 +
 indra/llui/llstatgraph.cpp                         |  163 +
 indra/llui/llstatgraph.h                           |   76 +
 indra/llui/llstatview.cpp                          |   66 +
 indra/llui/llstatview.h                            |   63 +
 indra/llui/llstyle.cpp                             |   32 +-
 indra/llui/llstyle.h                               |    9 +-
 indra/llui/lltabcontainer.cpp                      |  790 +-
 indra/llui/lltabcontainer.h                        |  119 +-
 indra/llui/lltextbox.cpp                           |  245 +-
 indra/llui/lltextbox.h                             |   81 +-
 indra/llui/lltexteditor.cpp                        |  572 +-
 indra/llui/lltexteditor.h                          |  110 +-
 indra/llui/lltextparser.cpp                        |   55 +-
 indra/llui/lltextparser.h                          |   34 +-
 indra/llui/llui.cpp                                |  386 +-
 indra/llui/llui.h                                  |  312 +-
 indra/llui/lluictrl.cpp                            |  354 +-
 indra/llui/lluictrl.h                              |  179 +-
 indra/llui/lluictrlfactory.cpp                     |  984 ++-
 indra/llui/lluictrlfactory.h                       |  320 +-
 indra/llui/lluifwd.h                               |    1 -
 indra/llui/lluiimage.cpp                           |  158 +
 indra/llui/lluiimage.h                             |  113 +
 indra/llui/lluistring.cpp                          |    7 +-
 indra/llui/llview.cpp                              | 1226 ++-
 indra/llui/llview.h                                |  345 +-
 indra/llui/llviewborder.cpp                        |  139 +-
 indra/llui/llviewborder.h                          |   57 +-
 indra/llui/llviewmodel.cpp                         |  163 +
 indra/llui/llviewmodel.h                           |  219 +
 indra/llui/llviewquery.h                           |    2 +-
 indra/llvfs/lldir.cpp                              |   55 +-
 indra/llvfs/lldir.h                                |   34 +-
 indra/llvfs/lldir_linux.cpp                        |    8 +-
 indra/llvfs/lldir_linux.h                          |    3 +-
 indra/llvfs/lldir_mac.cpp                          |    8 +-
 indra/llvfs/lldir_mac.h                            |    3 +-
 indra/llvfs/lldir_solaris.cpp                      |    8 +-
 indra/llvfs/lldir_solaris.h                        |    3 +-
 indra/llvfs/lldir_win32.cpp                        |   17 +-
 indra/llvfs/lldir_win32.h                          |    3 +-
 indra/llvfs/lllfsthread.h                          |    2 +-
 indra/llvfs/llpidlock.cpp                          |    7 +-
 indra/llvfs/llpidlock.h                            |    7 +-
 indra/llvfs/llvfs.cpp                              |    2 +
 indra/llwindow/CMakeLists.txt                      |    6 +-
 indra/llwindow/lldxhardware.cpp                    |    1 +
 indra/llwindow/llkeyboard.cpp                      |    2 +-
 indra/llwindow/llkeyboardmacosx.cpp                |    2 +-
 indra/llwindow/llkeyboardsdl.cpp                   |    2 +-
 indra/llwindow/llkeyboardwin32.cpp                 |   10 +-
 indra/llwindow/llpreeditor.h                       |    2 +-
 indra/llwindow/llwindow.cpp                        |  233 +-
 indra/llwindow/llwindow.h                          |   83 +-
 indra/llwindow/llwindowcallbacks.cpp               |  201 +
 indra/llwindow/llwindowcallbacks.h                 |   85 +
 indra/llwindow/llwindowheadless.cpp                |    6 +-
 indra/llwindow/llwindowheadless.h                  |    9 +-
 indra/llwindow/llwindowmacosx.cpp                  |   27 +-
 indra/llwindow/llwindowmacosx.h                    |    6 +-
 indra/llwindow/llwindowsdl.cpp                     |   16 +-
 indra/llwindow/llwindowsdl.h                       |    5 +-
 indra/llwindow/llwindowwin32.cpp                   |  121 +-
 indra/llwindow/llwindowwin32.h                     |    4 +-
 indra/llxml/CMakeLists.txt                         |    3 +
 indra/llxml/llcontrol.cpp                          |  724 +-
 indra/llxml/llcontrol.h                            |  286 +-
 indra/llxml/llcontrolgroupreader.h                 |   73 +-
 indra/llxml/llxmlnode.cpp                          |  148 +-
 indra/llxml/llxmlnode.h                            |   30 +-
 indra/lscript/lscript_execute.h                    |    2 +
 indra/newview/CMakeLists.txt                       |  106 +-
 indra/newview/app_settings/ignorable_dialogs.xml   |  291 +
 indra/newview/app_settings/settings.xml            | 8060 +++++++-------------
 indra/newview/app_settings/settings_files.xml      |   61 +-
 indra/newview/app_settings/std_bump.ini            |   30 +-
 indra/newview/llagent.cpp                          |  232 +-
 indra/newview/llagent.h                            |   25 +-
 indra/newview/llagentaccess.cpp                    |   52 +-
 indra/newview/llagentaccess.h                      |   32 +-
 indra/newview/llagentlanguage.h                    |    2 +-
 indra/newview/llagentpilot.cpp                     |    3 -
 indra/newview/llappviewer.cpp                      |  351 +-
 indra/newview/llappviewer.h                        |   15 +-
 indra/newview/llappviewerwin32.cpp                 |   24 +-
 indra/newview/llassetuploadresponders.cpp          |  236 +-
 indra/newview/llavatariconctrl.cpp                 |  244 +
 indra/newview/llavatariconctrl.h                   |   86 +
 indra/newview/llavatarpropertiesprocessor.cpp      |  138 +
 indra/newview/llavatarpropertiesprocessor.h        |   80 +
 indra/newview/llcallingcard.cpp                    |    2 +-
 indra/newview/llchatbar.cpp                        |   79 +-
 indra/newview/llchatbar.h                          |    4 +-
 indra/newview/llcloud.h                            |    2 +-
 indra/newview/llcolorswatch.cpp                    |  152 +-
 indra/newview/llcolorswatch.h                      |   57 +-
 indra/newview/llcompilequeue.cpp                   |  255 +-
 indra/newview/llcompilequeue.h                     |   65 +-
 indra/newview/llcurrencyuimanager.cpp              |    4 +-
 indra/newview/lldebugmessagebox.cpp                |  131 +-
 indra/newview/lldebugmessagebox.h                  |    4 +-
 indra/newview/lldebugview.cpp                      |   58 +-
 indra/newview/lldebugview.h                        |   14 +-
 indra/newview/lldirpicker.cpp                      |    1 +
 indra/newview/lldrawable.h                         |    1 -
 indra/newview/lldrawpoolavatar.cpp                 |   23 +-
 indra/newview/lldrawpoolbump.cpp                   |    8 +-
 indra/newview/lldrawpoolsky.cpp                    |    1 -
 indra/newview/lldrawpooltree.cpp                   |    1 -
 indra/newview/lldrawpoolwater.cpp                  |    1 -
 indra/newview/lldynamictexture.cpp                 |    5 +
 indra/newview/lleventnotifier.cpp                  |    5 +-
 indra/newview/llface.h                             |    1 -
 indra/newview/llfasttimerview.cpp                  |   23 +-
 indra/newview/llfasttimerview.h                    |    2 +-
 indra/newview/llfavoritesbar.cpp                   |  328 +
 indra/newview/llfavoritesbar.h                     |   70 +
 indra/newview/llfilepicker.cpp                     |    8 +
 indra/newview/llfirstuse.cpp                       |   66 +-
 indra/newview/llflexibleobject.h                   |    1 -
 indra/newview/llfloaterabout.cpp                   |  129 +-
 indra/newview/llfloaterabout.h                     |   13 +-
 indra/newview/llfloateranimpreview.cpp             |  180 +-
 indra/newview/llfloateranimpreview.h               |    8 +-
 indra/newview/llfloaterauction.cpp                 |   40 +-
 indra/newview/llfloaterauction.h                   |   14 +-
 indra/newview/llfloateravatarpicker.cpp            |   78 +-
 indra/newview/llfloateravatarpicker.h              |    5 +-
 indra/newview/llfloateravatartextures.cpp          |   29 +-
 indra/newview/llfloateravatartextures.h            |    1 +
 indra/newview/llfloaterbeacons.cpp                 |    8 +-
 indra/newview/llfloaterbeacons.h                   |    4 +-
 indra/newview/llfloaterbuildoptions.cpp            |   48 +-
 indra/newview/llfloaterbuildoptions.h              |   13 +-
 indra/newview/llfloaterbulkpermission.cpp          |   19 +-
 indra/newview/llfloaterbulkpermission.h            |    1 +
 indra/newview/llfloaterbump.cpp                    |   56 +-
 indra/newview/llfloaterbump.h                      |   17 +-
 indra/newview/llfloaterbuy.cpp                     |   23 +-
 indra/newview/llfloaterbuy.h                       |    2 +-
 indra/newview/llfloaterbuycontents.cpp             |   15 +-
 indra/newview/llfloaterbuycontents.h               |    2 +-
 indra/newview/llfloaterbuycurrency.cpp             |   20 +-
 indra/newview/llfloaterbuyland.cpp                 |   39 +-
 indra/newview/llfloatercamera.cpp                  |   56 +-
 indra/newview/llfloatercamera.h                    |    2 +-
 indra/newview/llfloaterchat.cpp                    |  182 +-
 indra/newview/llfloaterchat.h                      |   24 +-
 indra/newview/llfloaterchatterbox.cpp              |   92 +-
 indra/newview/llfloaterchatterbox.h                |  101 +-
 indra/newview/llfloatercolorpicker.cpp             |  254 +-
 indra/newview/llfloatercolorpicker.h               |   10 +-
 indra/newview/llfloaterdaycycle.cpp                |   14 +-
 indra/newview/llfloaterdaycycle.h                  |    2 +-
 indra/newview/llfloaterenvsettings.cpp             |   72 +-
 indra/newview/llfloaterenvsettings.h               |    4 +-
 indra/newview/llfloaterevent.cpp                   |   12 +-
 indra/newview/llfloaterevent.h                     |    2 +-
 indra/newview/llfloaterfonttest.cpp                |   11 +-
 indra/newview/llfloaterfonttest.h                  |    7 +-
 indra/newview/llfloaterfriends.cpp                 |   77 +-
 indra/newview/llfloaterfriends.h                   |   10 +-
 indra/newview/llfloatergesture.cpp                 |   74 +-
 indra/newview/llfloatergesture.h                   |    2 +-
 indra/newview/llfloatergodtools.cpp                |  194 +-
 indra/newview/llfloatergodtools.h                  |   25 +-
 indra/newview/llfloatergroupinvite.cpp             |   41 +-
 indra/newview/llfloatergroupinvite.h               |    5 +-
 indra/newview/llfloatergroups.cpp                  |   40 +-
 indra/newview/llfloatergroups.h                    |   11 +-
 indra/newview/llfloaterhandler.cpp                 |    2 +-
 indra/newview/llfloaterhardwaresettings.cpp        |   23 +-
 indra/newview/llfloaterhardwaresettings.h          |    6 +-
 indra/newview/llfloaterhud.cpp                     |   17 +-
 indra/newview/llfloaterinspect.cpp                 |   29 +-
 indra/newview/llfloaterjoystick.cpp                |   60 +-
 indra/newview/llfloaterjoystick.h                  |    5 +-
 indra/newview/llfloaterlagmeter.cpp                |   18 +-
 indra/newview/llfloaterlagmeter.h                  |    4 +-
 indra/newview/llfloaterland.cpp                    |  135 +-
 indra/newview/llfloaterland.h                      |    9 +-
 indra/newview/llfloaterlandholdings.cpp            |   20 +-
 indra/newview/llfloatermap.cpp                     |  178 +-
 indra/newview/llfloatermap.h                       |   44 +-
 indra/newview/llfloatermemleak.cpp                 |    8 +-
 indra/newview/llfloaternamedesc.cpp                |    7 +-
 indra/newview/llfloaternotificationsconsole.cpp    |   28 +-
 indra/newview/llfloaternotificationsconsole.h      |    1 +
 indra/newview/llfloateropenobject.cpp              |   33 +-
 indra/newview/llfloateropenobject.h                |    3 +-
 indra/newview/llfloaterparcel.cpp                  |   12 +-
 indra/newview/llfloaterparcel.h                    |    2 +-
 indra/newview/llfloaterperms.cpp                   |    7 +-
 indra/newview/llfloaterpostcard.cpp                |   33 +-
 indra/newview/llfloaterpostcard.h                  |    6 +-
 indra/newview/llfloaterpostprocess.cpp             |   33 +-
 indra/newview/llfloaterpostprocess.h               |    4 +-
 indra/newview/llfloaterpreference.cpp              |  507 +-
 indra/newview/llfloaterpreference.h                |   78 +-
 indra/newview/llfloaterproperties.cpp              |   85 +-
 indra/newview/llfloaterproperties.h                |   12 +-
 indra/newview/llfloaterregioninfo.cpp              |  104 +-
 indra/newview/llfloaterregioninfo.h                |   14 +-
 indra/newview/llfloaterreporter.cpp                |  254 +-
 indra/newview/llfloaterreporter.h                  |    8 +-
 indra/newview/llfloaterscriptdebug.cpp             |   84 +-
 indra/newview/llfloaterscriptdebug.h               |   10 +-
 indra/newview/llfloatersellland.cpp                |   19 +-
 indra/newview/llfloatersellland.h                  |    3 +-
 indra/newview/llfloatersettingsdebug.cpp           |   77 +-
 indra/newview/llfloatersettingsdebug.h             |    8 +-
 indra/newview/llfloatersnapshot.cpp                |  168 +-
 indra/newview/llfloatersnapshot.h                  |   27 +-
 indra/newview/llfloatertelehub.cpp                 |   10 +-
 indra/newview/llfloatertelehub.h                   |    2 +-
 indra/newview/llfloatertools.cpp                   |  528 +-
 indra/newview/llfloatertools.h                     |   50 +-
 indra/newview/llfloatertopobjects.cpp              |   23 +-
 indra/newview/llfloatertos.cpp                     |    4 +-
 indra/newview/llfloateruipreview.cpp               | 1507 ++++
 indra/newview/llfloateruipreview.h                 |  215 +
 indra/newview/llfloaterurldisplay.cpp              |    3 +-
 indra/newview/llfloaterurlentry.cpp                |   34 +-
 indra/newview/llfloaterurlentry.h                  |    2 +-
 indra/newview/llfloatervoicedevicesettings.cpp     |   19 +-
 indra/newview/llfloatervoicedevicesettings.h       |    6 +-
 indra/newview/llfloaterwater.cpp                   |   61 +-
 indra/newview/llfloaterwater.h                     |    4 +-
 indra/newview/llfloaterwindlight.cpp               |   66 +-
 indra/newview/llfloaterwindlight.h                 |    4 +-
 indra/newview/llfloaterworldmap.cpp                |  226 +-
 indra/newview/llfloaterworldmap.h                  |   25 +-
 indra/newview/llfolderview.cpp                     |  289 +-
 indra/newview/llfolderview.h                       |   95 +-
 indra/newview/llglsandbox.cpp                      |  122 -
 indra/newview/llgroupmgr.cpp                       |    2 +-
 indra/newview/llhudeffect.h                        |    3 -
 indra/newview/llhudicon.h                          |    2 +-
 indra/newview/llhudmanager.cpp                     |    4 +-
 indra/newview/llhudmanager.h                       |    2 +-
 indra/newview/llhudobject.h                        |    2 +-
 indra/newview/llhudrender.cpp                      |    6 +-
 indra/newview/llhudrender.h                        |    2 +
 indra/newview/llhudtext.cpp                        |   10 +-
 indra/newview/llhudtext.h                          |    2 +-
 indra/newview/llhudview.cpp                        |    7 +-
 indra/newview/llimpanel.cpp                        |  141 +-
 indra/newview/llimpanel.h                          |   16 +-
 indra/newview/llimview.cpp                         |  347 +-
 indra/newview/llimview.h                           |   29 +-
 indra/newview/llinventoryactions.h                 |   47 +
 indra/newview/llinventorybridge.cpp                |  970 +--
 indra/newview/llinventorybridge.h                  |  233 +-
 indra/newview/llinventorymodel.cpp                 |    6 +-
 indra/newview/lljoystickbutton.cpp                 |  183 +-
 indra/newview/lljoystickbutton.h                   |   74 +-
 indra/newview/lllocationhistory.cpp                |  130 +
 indra/newview/lllocationhistory.h                  |   69 +
 indra/newview/lllocationinputctrl.cpp              | 1126 +++
 indra/newview/lllocationinputctrl.h                |  248 +
 indra/newview/lllogchat.cpp                        |   24 +-
 indra/newview/llloginhandler.cpp                   |   10 +-
 indra/newview/llmanip.cpp                          |   41 +-
 indra/newview/llmaniprotate.cpp                    |   38 +-
 indra/newview/llmanipscale.cpp                     |    6 +-
 indra/newview/llmaniptranslate.cpp                 |    6 +-
 indra/newview/llmemoryview.cpp                     |    7 +-
 indra/newview/llmemoryview.h                       |   10 +-
 indra/newview/llmenucommands.cpp                   |   43 +-
 indra/newview/llmenucommands.h                     |    6 -
 indra/newview/llmorphview.cpp                      |   10 +-
 indra/newview/llmorphview.h                        |   10 +-
 indra/newview/llmoveview.cpp                       |   43 +-
 indra/newview/llmoveview.h                         |    4 +-
 indra/newview/llmutelist.cpp                       |   37 +-
 indra/newview/llnamebox.cpp                        |   17 +-
 indra/newview/llnamebox.h                          |   17 +-
 indra/newview/llnameeditor.cpp                     |   60 +-
 indra/newview/llnameeditor.h                       |   26 +-
 indra/newview/llnamelistctrl.cpp                   |  324 +-
 indra/newview/llnamelistctrl.h                     |   66 +-
 indra/newview/llnavigationbar.cpp                  |  523 ++
 indra/newview/llnavigationbar.h                    |  106 +
 indra/newview/llnetmap.cpp                         |  420 +-
 indra/newview/llnetmap.h                           |  106 +-
 indra/newview/lloutputmonitorctrl.cpp              |  134 +
 indra/newview/lloutputmonitorctrl.h                |   88 +
 indra/newview/lloverlaybar.cpp                     |   22 +-
 indra/newview/lloverlaybar.h                       |    1 -
 indra/newview/llpanelavatar.cpp                    |  445 +-
 indra/newview/llpanelavatar.h                      |   26 +-
 indra/newview/llpanelclassified.cpp                |   74 +-
 indra/newview/llpanelcontents.cpp                  |   58 +-
 indra/newview/llpanelcontents.h                    |    2 +-
 indra/newview/llpanelface.cpp                      |   72 +-
 indra/newview/llpanelface.h                        |   23 +-
 indra/newview/llpanelgroup.cpp                     |  196 +-
 indra/newview/llpanelgroup.h                       |   15 +-
 indra/newview/llpanelgroupgeneral.cpp              |   71 +-
 indra/newview/llpanelgroupgeneral.h                |    2 +-
 indra/newview/llpanelgroupinvite.cpp               |   33 +-
 indra/newview/llpanelgroupinvite.h                 |    2 +-
 indra/newview/llpanelgrouplandmoney.cpp            |   69 +-
 indra/newview/llpanelgrouplandmoney.h              |    2 +-
 indra/newview/llpanelgroupnotices.cpp              |   90 +-
 indra/newview/llpanelgroupnotices.h                |    4 +-
 indra/newview/llpanelgrouproles.cpp                |  151 +-
 indra/newview/llpanelgrouproles.h                  |   23 +-
 indra/newview/llpanelland.cpp                      |    4 +-
 indra/newview/llpanelland.h                        |    2 +-
 indra/newview/llpanellandmedia.cpp                 |    6 +-
 indra/newview/llpanellogin.cpp                     |   94 +-
 indra/newview/llpanellogin.h                       |    6 +-
 indra/newview/llpanelobject.cpp                    |   79 +-
 indra/newview/llpanelobject.h                      |   14 +-
 indra/newview/llpanelpermissions.cpp               |   71 +-
 indra/newview/llpanelpermissions.h                 |   14 +-
 indra/newview/llpanelpick.cpp                      |  103 +-
 indra/newview/llpanelpick.h                        |    3 +-
 indra/newview/llpanelplace.cpp                     |   45 +-
 indra/newview/llpanelvolume.cpp                    |   28 +-
 indra/newview/llpanelvolume.h                      |   10 +-
 indra/newview/llparcelselection.h                  |    3 +-
 indra/newview/llpreview.cpp                        |  300 +-
 indra/newview/llpreview.h                          |   58 +-
 indra/newview/llpreviewanim.cpp                    |   69 +-
 indra/newview/llpreviewanim.h                      |   11 +-
 indra/newview/llpreviewgesture.cpp                 |  239 +-
 indra/newview/llpreviewgesture.h                   |   31 +-
 indra/newview/llpreviewnotecard.cpp                |  172 +-
 indra/newview/llpreviewnotecard.h                  |   21 +-
 indra/newview/llpreviewscript.cpp                  |  737 +-
 indra/newview/llpreviewscript.h                    |   96 +-
 indra/newview/llpreviewsound.cpp                   |   37 +-
 indra/newview/llpreviewsound.h                     |    7 +-
 indra/newview/llpreviewtexture.cpp                 |  182 +-
 indra/newview/llpreviewtexture.h                   |   25 +-
 indra/newview/llprogressview.cpp                   |    9 +-
 indra/newview/llprogressview.h                     |    2 +-
 indra/newview/llsavedsettingsglue.cpp              |   30 +-
 indra/newview/llsavedsettingsglue.h                |   10 +-
 indra/newview/llselectmgr.cpp                      |   38 +-
 indra/newview/llselectmgr.h                        |   10 +-
 indra/newview/llslurl.cpp                          |  114 +
 indra/newview/llslurl.h                            |   85 +
 indra/newview/llspatialpartition.h                 |    3 +-
 indra/newview/llstartup.cpp                        |  257 +-
 indra/newview/llstartup.h                          |    4 +
 indra/newview/llstatusbar.cpp                      |  119 +-
 indra/newview/llstatusbar.h                        |    6 +-
 indra/newview/llstylemap.cpp                       |    6 +-
 indra/newview/llsurface.cpp                        |    1 -
 indra/newview/llsurface.h                          |    1 -
 indra/newview/llsurfacepatch.h                     |    2 +-
 indra/newview/llteleporthistory.cpp                |  251 +
 indra/newview/llteleporthistory.h                  |  212 +
 indra/newview/lltexturecache.cpp                   |    2 +-
 indra/newview/lltexturectrl.cpp                    |  509 +-
 indra/newview/lltexturectrl.h                      |   72 +-
 indra/newview/lltextureview.cpp                    |   53 +-
 indra/newview/lltextureview.h                      |    4 +-
 indra/newview/lltool.cpp                           |    2 +-
 indra/newview/lltoolbar.cpp                        |  253 +-
 indra/newview/lltoolbar.h                          |   21 +-
 indra/newview/lltoolbrush.cpp                      |    2 +-
 indra/newview/lltoolcomp.cpp                       |    9 +-
 indra/newview/lltooldraganddrop.cpp                |   12 +-
 indra/newview/lltoolface.cpp                       |    7 +-
 indra/newview/lltoolgrab.h                         |    2 +-
 indra/newview/lltoolgun.cpp                        |    5 +-
 indra/newview/lltoolindividual.cpp                 |    5 +-
 indra/newview/lltoolmgr.cpp                        |   93 +-
 indra/newview/lltoolmgr.h                          |    8 +-
 indra/newview/lltoolmorph.cpp                      |    1 -
 indra/newview/lltoolobjpicker.cpp                  |    2 +-
 indra/newview/lltoolpie.cpp                        |  270 +-
 indra/newview/lltoolpie.h                          |   10 +-
 indra/newview/lltoolpipette.cpp                    |   24 +-
 indra/newview/lltoolpipette.h                      |   13 +-
 indra/newview/lltoolplacer.cpp                     |  100 +-
 indra/newview/lltoolplacer.h                       |   39 -
 indra/newview/lltoolselect.cpp                     |    6 +-
 indra/newview/lltoolselectland.cpp                 |    9 +-
 indra/newview/lltoolselectrect.cpp                 |    3 +-
 indra/newview/lltoolview.cpp                       |    4 +-
 indra/newview/lltracker.cpp                        |   23 +-
 indra/newview/lltracker.h                          |    2 +-
 indra/newview/lluploaddialog.cpp                   |   16 +-
 indra/newview/llurldispatcher.cpp                  |  109 +-
 indra/newview/llurldispatcher.h                    |    9 -
 indra/newview/llviewchildren.cpp                   |    8 +-
 indra/newview/llviewercamera.cpp                   |   21 +-
 indra/newview/llviewercontrol.cpp                  |  378 +-
 indra/newview/llviewercontrol.h                    |  116 +-
 indra/newview/llviewerdisplay.cpp                  |   23 +-
 indra/newview/llviewerfloaterreg.cpp               |   95 +
 indra/newview/llviewerfloaterreg.h                 |   43 +
 indra/newview/llviewerinventory.cpp                |   10 +-
 indra/newview/llviewerkeyboard.cpp                 |    2 +-
 indra/newview/llviewermedia.cpp                    |    2 +-
 indra/newview/llviewermenu.cpp                     | 5218 +++++++------
 indra/newview/llviewermenu.h                       |   51 +-
 indra/newview/llviewermenufile.cpp                 |  103 +-
 indra/newview/llviewermessage.cpp                  |  184 +-
 indra/newview/llviewermessage.h                    |    2 +-
 indra/newview/llviewernetwork.cpp                  |    2 +-
 indra/newview/llviewerobject.cpp                   |    9 +-
 indra/newview/llviewerobject.h                     |    2 +-
 indra/newview/llviewerobjectlist.cpp               |   23 +-
 indra/newview/llviewerobjectlist.h                 |   13 +-
 indra/newview/llviewerparcelmedia.cpp              |    8 +-
 indra/newview/llviewerparcelmgr.cpp                |   38 +-
 indra/newview/llviewerparcelmgr.h                  |   19 +-
 indra/newview/llviewerparceloverlay.cpp            |   29 +-
 indra/newview/llviewerpartsim.h                    |    2 +-
 indra/newview/llviewerpartsource.h                 |    3 +-
 indra/newview/llviewerprecompiledheaders.h         |   24 +-
 indra/newview/llviewerregion.cpp                   |    6 +-
 indra/newview/llviewerregion.h                     |    3 -
 indra/newview/llviewerstats.cpp                    |  100 +-
 indra/newview/llviewerstats.h                      |   23 +-
 indra/newview/llviewertexteditor.cpp               |  244 +-
 indra/newview/llviewertexteditor.h                 |   41 +-
 indra/newview/llviewerwindow.cpp                   |  869 ++-
 indra/newview/llviewerwindow.h                     |   44 +-
 indra/newview/llvoavatar.cpp                       |  250 +-
 indra/newview/llvoavatar.h                         |    4 +-
 indra/newview/llvoavatardefines.cpp                |    7 +-
 indra/newview/llvoavatardefines.h                  |    7 +-
 indra/newview/llvograss.cpp                        |   10 -
 indra/newview/llvoiceclient.cpp                    |  112 +-
 indra/newview/llvoiceclient.h                      |    4 +-
 indra/newview/llvoicevisualizer.cpp                |   26 +-
 indra/newview/llvosky.cpp                          |    2 +-
 indra/newview/llvotree.cpp                         |    2 +-
 indra/newview/llvovolume.cpp                       |   11 +-
 indra/newview/llwearable.cpp                       |   28 +-
 indra/newview/llwearable.h                         |    3 +-
 indra/newview/llwearablelist.cpp                   |    5 +-
 indra/newview/llweb.cpp                            |   31 +-
 indra/newview/llweb.h                              |    7 -
 indra/newview/llwldaycycle.cpp                     |    3 +-
 indra/newview/llwldaycycle.h                       |    2 -
 indra/newview/llworld.h                            |    2 +-
 indra/newview/llworldmap.cpp                       |   18 +-
 indra/newview/llworldmap.h                         |    7 +-
 indra/newview/llworldmapview.cpp                   |  111 +-
 indra/newview/llworldmapview.h                     |    2 +-
 indra/newview/macview_Prefix.h                     |    2 -
 indra/newview/pipeline.cpp                         |   23 +-
 indra/newview/pipeline.h                           |    4 +-
 indra/newview/res/bitmap2.bmp                      |  Bin 0 -> 25118 bytes
 indra/newview/res/install_icon.BMP                 |  Bin 0 -> 262198 bytes
 indra/newview/res/loginbackground.bmp              |  Bin 0 -> 336054 bytes
 indra/newview/res/uninstall_icon.BMP               |  Bin 0 -> 262198 bytes
 indra/newview/skins/default/colors.xml             | 3192 +++++++-
 .../skins/default/textures/jump_left_in.tga        |  Bin 0 -> 812 bytes
 .../skins/default/textures/jump_left_out.tga       |  Bin 0 -> 812 bytes
 .../skins/default/textures/jump_right_in.tga       |  Bin 0 -> 812 bytes
 .../skins/default/textures/jump_right_out.tga      |  Bin 0 -> 812 bytes
 .../skins/default/textures/menu_separator.png      |  Bin 0 -> 2831 bytes
 indra/newview/skins/default/textures/textures.xml  |  184 +-
 .../newview/skins/default/textures/transparent.j2c |  Bin 0 -> 172 bytes
 .../skins/default/textures/voice_meter_dot.j2c     |  Bin 0 -> 499 bytes
 .../skins/default/textures/voice_meter_rings.j2c   |  Bin 0 -> 2518 bytes
 .../newview/skins/default/xui/da/floater_about.xml |   72 +-
 .../skins/default/xui/da/floater_about_land.xml    |  919 ++-
 .../default/xui/da/floater_animation_preview.xml   |  344 +-
 .../skins/default/xui/da/floater_auction.xml       |   18 +-
 .../skins/default/xui/da/floater_avatar_picker.xml |   30 +-
 .../default/xui/da/floater_avatar_textures.xml     |   60 +-
 .../skins/default/xui/da/floater_beacons.xml       |   30 +-
 .../skins/default/xui/da/floater_build_options.xml |   16 +-
 .../newview/skins/default/xui/da/floater_bumps.xml |   42 +-
 .../skins/default/xui/da/floater_buy_contents.xml  |   42 +-
 .../skins/default/xui/da/floater_buy_currency.xml  |  136 +-
 .../skins/default/xui/da/floater_buy_land.xml      |  458 +-
 .../skins/default/xui/da/floater_buy_object.xml    |   52 +-
 .../skins/default/xui/da/floater_camera.xml        |   24 +-
 .../skins/default/xui/da/floater_choose_group.xml  |   16 +-
 .../skins/default/xui/da/floater_color_picker.xml  |   62 +-
 .../skins/default/xui/da/floater_critical.xml      |   22 +-
 .../skins/default/xui/da/floater_customize.xml     |  894 +--
 .../default/xui/da/floater_day_cycle_options.xml   |  194 +-
 .../default/xui/da/floater_device_settings.xml     |    4 +-
 .../skins/default/xui/da/floater_inventory.xml     |   94 +-
 .../xui/da/floater_inventory_item_properties.xml   |  170 +-
 .../skins/default/xui/da/floater_joystick.xml      |  176 +-
 .../skins/default/xui/da/floater_lagmeter.xml      |  312 +-
 .../skins/default/xui/da/floater_land_holdings.xml |   78 +-
 .../default/xui/da/floater_live_lsleditor.xml      |   24 +-
 .../skins/default/xui/da/floater_lsl_guide.xml     |   14 +-
 .../skins/default/xui/da/floater_media_browser.xml |   38 +-
 .../skins/default/xui/da/floater_moveview.xml      |   22 +-
 .../skins/default/xui/da/floater_mute_object.xml   |   24 +-
 .../skins/default/xui/da/floater_my_friends.xml    |   14 +-
 .../skins/default/xui/da/floater_openobject.xml    |   20 +-
 indra/newview/skins/default/xui/da/floater_pay.xml |   42 +-
 .../skins/default/xui/da/floater_pay_object.xml    |   60 +-
 .../skins/default/xui/da/floater_postcard.xml      |   72 +-
 .../skins/default/xui/da/floater_preferences.xml   |   16 +-
 .../default/xui/da/floater_preview_animation.xml   |   20 +-
 .../default/xui/da/floater_preview_classified.xml  |    4 +-
 .../skins/default/xui/da/floater_preview_event.xml |    4 +-
 .../default/xui/da/floater_preview_gesture.xml     |  112 +-
 .../default/xui/da/floater_preview_notecard.xml    |   26 +-
 .../skins/default/xui/da/floater_preview_sound.xml |   20 +-
 .../default/xui/da/floater_preview_texture.xml     |   18 +-
 .../skins/default/xui/da/floater_report_abuse.xml  |  368 +-
 .../skins/default/xui/da/floater_script_debug.xml  |   12 +-
 .../default/xui/da/floater_script_preview.xml      |   12 +-
 .../skins/default/xui/da/floater_script_queue.xml  |    8 +-
 .../skins/default/xui/da/floater_script_search.xml |   26 +-
 .../skins/default/xui/da/floater_select_key.xml    |   14 +-
 .../skins/default/xui/da/floater_sell_land.xml     |  136 +-
 .../default/xui/da/floater_settings_debug.xml      |   34 +-
 .../skins/default/xui/da/floater_snapshot.xml      |  254 +-
 .../skins/default/xui/da/floater_sound_preview.xml |   22 +-
 .../skins/default/xui/da/floater_telehub.xml       |   56 +-
 .../skins/default/xui/da/floater_texture_ctrl.xml  |   48 +-
 .../newview/skins/default/xui/da/floater_tools.xml | 1112 +--
 indra/newview/skins/default/xui/da/floater_tos.xml |   30 +-
 .../default/xui/da/floater_wearable_save_as.xml    |   22 +-
 .../skins/default/xui/da/floater_world_map.xml     |  162 +-
 .../skins/default/xui/da/menu_inventory.xml        |  130 +-
 indra/newview/skins/default/xui/da/menu_login.xml  |   26 +-
 indra/newview/skins/default/xui/da/menu_slurl.xml  |   12 +-
 indra/newview/skins/default/xui/da/menu_viewer.xml |  422 +-
 indra/newview/skins/default/xui/da/panel_login.xml |   86 +-
 .../default/xui/da/panel_preferences_chat.xml      |  122 +-
 .../default/xui/da/panel_preferences_general.xml   |  236 +-
 .../default/xui/da/panel_preferences_graphics1.xml |  358 +-
 indra/newview/skins/default/xui/da/strings.xml     |  810 +-
 indra/newview/skins/default/xui/da/xui_version.xml |    8 +-
 .../default/xui/de/floater_animation_preview.xml   |  148 +-
 .../skins/default/xui/de/floater_beacons.xml       |   30 +-
 .../skins/default/xui/de/floater_buy_land.xml      |   12 +-
 .../skins/default/xui/de/floater_camera.xml        |   24 +-
 .../default/xui/de/floater_day_cycle_options.xml   |  192 +-
 .../default/xui/de/floater_device_settings.xml     |    4 +-
 .../skins/default/xui/de/floater_env_settings.xml  |   48 +-
 .../skins/default/xui/de/floater_god_tools.xml     |   24 +-
 .../default/xui/de/floater_hardware_settings.xml   |   80 +-
 indra/newview/skins/default/xui/de/floater_hud.xml |    4 +-
 .../skins/default/xui/de/floater_image_preview.xml |   40 +-
 .../skins/default/xui/de/floater_inspect.xml       |   28 +-
 .../skins/default/xui/de/floater_joystick.xml      |  152 +-
 .../skins/default/xui/de/floater_lagmeter.xml      |  304 +-
 .../skins/default/xui/de/floater_lsl_guide.xml     |   14 +-
 .../skins/default/xui/de/floater_media_browser.xml |   38 +-
 .../skins/default/xui/de/floater_mem_leaking.xml   |   36 +-
 .../skins/default/xui/de/floater_mute_object.xml   |   24 +-
 .../skins/default/xui/de/floater_my_friends.xml    |   14 +-
 .../skins/default/xui/de/floater_post_process.xml  |  106 +-
 .../default/xui/de/floater_preview_classified.xml  |    4 +-
 .../skins/default/xui/de/floater_preview_event.xml |    4 +-
 .../skins/default/xui/de/floater_region_info.xml   |    4 +-
 .../skins/default/xui/de/floater_select_key.xml    |   16 +-
 .../skins/default/xui/de/floater_sell_land.xml     |   12 +-
 .../default/xui/de/floater_settings_debug.xml      |    8 +-
 .../skins/default/xui/de/floater_snapshot.xml      |  108 +-
 .../newview/skins/default/xui/de/floater_tools.xml |  289 +-
 .../skins/default/xui/de/floater_url_entry.xml     |   24 +-
 .../newview/skins/default/xui/de/floater_water.xml |  178 +-
 .../default/xui/de/floater_windlight_options.xml   |  380 +-
 .../skins/default/xui/de/floater_world_map.xml     |    8 +-
 indra/newview/skins/default/xui/de/menu_login.xml  |   26 +-
 indra/newview/skins/default/xui/de/menu_slurl.xml  |   12 +-
 indra/newview/skins/default/xui/de/mime_types.xml  |  460 +-
 .../skins/default/xui/de/panel_audio_device.xml    |   50 +-
 .../newview/skins/default/xui/de/panel_friends.xml |   82 +-
 .../newview/skins/default/xui/de/panel_groups.xml  |   30 +-
 indra/newview/skins/default/xui/de/panel_login.xml |   12 +-
 .../default/xui/de/panel_preferences_general.xml   |   72 +-
 .../default/xui/de/panel_preferences_graphics1.xml |   36 +-
 indra/newview/skins/default/xui/de/strings.xml     |  886 +--
 .../skins/default/xui/de/teleport_strings.xml      |  180 +-
 .../newview/skins/default/xui/es/floater_about.xml |   72 +-
 .../skins/default/xui/es/floater_about_land.xml    |  856 +--
 .../default/xui/es/floater_animation_preview.xml   |  328 +-
 .../skins/default/xui/es/floater_auction.xml       |   18 +-
 .../skins/default/xui/es/floater_avatar_picker.xml |   30 +-
 .../default/xui/es/floater_avatar_textures.xml     |   60 +-
 .../skins/default/xui/es/floater_build_options.xml |   16 +-
 .../newview/skins/default/xui/es/floater_bumps.xml |   42 +-
 .../skins/default/xui/es/floater_buy_contents.xml  |   42 +-
 .../skins/default/xui/es/floater_buy_currency.xml  |  136 +-
 .../skins/default/xui/es/floater_buy_land.xml      |  456 +-
 .../skins/default/xui/es/floater_buy_object.xml    |   52 +-
 .../skins/default/xui/es/floater_choose_group.xml  |   16 +-
 .../skins/default/xui/es/floater_color_picker.xml  |   60 +-
 .../skins/default/xui/es/floater_critical.xml      |   22 +-
 .../skins/default/xui/es/floater_customize.xml     |  854 +--
 .../skins/default/xui/es/floater_gesture.xml       |   30 +-
 .../skins/default/xui/es/floater_god_tools.xml     |  294 +-
 indra/newview/skins/default/xui/es/floater_im.xml  |   90 +-
 .../skins/default/xui/es/floater_image_preview.xml |  104 +-
 .../skins/default/xui/es/floater_inventory.xml     |   94 +-
 .../xui/es/floater_inventory_item_properties.xml   |  170 +-
 .../xui/es/floater_inventory_view_finder.xml       |   48 +-
 .../skins/default/xui/es/floater_land_holdings.xml |   78 +-
 .../default/xui/es/floater_live_lsleditor.xml      |   24 +-
 .../skins/default/xui/es/floater_moveview.xml      |   22 +-
 .../skins/default/xui/es/floater_openobject.xml    |   16 +-
 indra/newview/skins/default/xui/es/floater_pay.xml |   42 +-
 .../skins/default/xui/es/floater_pay_object.xml    |   60 +-
 .../skins/default/xui/es/floater_postcard.xml      |   72 +-
 .../skins/default/xui/es/floater_preferences.xml   |   16 +-
 .../default/xui/es/floater_preview_animation.xml   |   16 +-
 .../default/xui/es/floater_preview_gesture.xml     |  120 +-
 .../default/xui/es/floater_preview_notecard.xml    |   32 +-
 .../skins/default/xui/es/floater_preview_sound.xml |   16 +-
 .../default/xui/es/floater_preview_texture.xml     |   18 +-
 .../skins/default/xui/es/floater_report_abuse.xml  |  360 +-
 .../skins/default/xui/es/floater_script_debug.xml  |   12 +-
 .../default/xui/es/floater_script_preview.xml      |   12 +-
 .../skins/default/xui/es/floater_script_queue.xml  |    8 +-
 .../skins/default/xui/es/floater_script_search.xml |   26 +-
 .../skins/default/xui/es/floater_sell_land.xml     |  136 +-
 .../default/xui/es/floater_settings_debug.xml      |   34 +-
 .../skins/default/xui/es/floater_snapshot.xml      |  270 +-
 .../skins/default/xui/es/floater_sound_preview.xml |   22 +-
 .../skins/default/xui/es/floater_telehub.xml       |   56 +-
 .../skins/default/xui/es/floater_texture_ctrl.xml  |   48 +-
 .../newview/skins/default/xui/es/floater_tools.xml | 1222 +--
 .../skins/default/xui/es/floater_top_objects.xml   |  110 +-
 indra/newview/skins/default/xui/es/floater_tos.xml |   32 +-
 .../default/xui/es/floater_wearable_save_as.xml    |   22 +-
 .../skins/default/xui/es/floater_world_map.xml     |  148 +-
 .../skins/default/xui/es/menu_inventory.xml        |  130 +-
 indra/newview/skins/default/xui/es/menu_viewer.xml |  406 +-
 .../skins/default/xui/es/panel_group_general.xml   |  142 +-
 .../skins/default/xui/es/panel_group_invite.xml    |   46 +-
 .../default/xui/es/panel_group_land_money.xml      |  150 +-
 .../skins/default/xui/es/panel_group_notices.xml   |  142 +-
 .../skins/default/xui/es/panel_group_roles.xml     |  300 +-
 indra/newview/skins/default/xui/es/panel_login.xml |   86 +-
 .../default/xui/es/panel_preferences_chat.xml      |  114 +-
 .../default/xui/es/panel_preferences_general.xml   |  228 +-
 .../default/xui/es/panel_preferences_graphics1.xml |  352 +-
 .../skins/default/xui/es/panel_region_covenant.xml |  100 +-
 .../skins/default/xui/es/panel_region_debug.xml    |   80 +-
 .../skins/default/xui/es/panel_region_estate.xml   |  138 +-
 .../skins/default/xui/es/panel_region_general.xml  |   92 +-
 .../skins/default/xui/es/panel_region_terrain.xml  |   54 +-
 .../skins/default/xui/es/panel_region_texture.xml  |  114 +-
 .../skins/default/xui/es/panel_scrolling_param.xml |   20 +-
 .../skins/default/xui/es/panel_status_bar.xml      |   76 +-
 indra/newview/skins/default/xui/es/xui_version.xml |    8 +-
 .../newview/skins/default/xui/fr/floater_about.xml |   68 +-
 .../skins/default/xui/fr/floater_about_land.xml    |  880 +--
 .../default/xui/fr/floater_animation_preview.xml   |  330 +-
 .../skins/default/xui/fr/floater_auction.xml       |   36 +-
 .../skins/default/xui/fr/floater_avatar_picker.xml |   42 +-
 .../default/xui/fr/floater_avatar_textures.xml     |   76 +-
 .../skins/default/xui/fr/floater_beacons.xml       |   30 +-
 .../skins/default/xui/fr/floater_build_options.xml |   16 +-
 .../newview/skins/default/xui/fr/floater_bumps.xml |   42 +-
 .../skins/default/xui/fr/floater_buy_contents.xml  |   42 +-
 .../skins/default/xui/fr/floater_buy_currency.xml  |  136 +-
 .../skins/default/xui/fr/floater_buy_land.xml      |  472 +-
 .../skins/default/xui/fr/floater_buy_object.xml    |   52 +-
 .../skins/default/xui/fr/floater_camera.xml        |   24 +-
 .../skins/default/xui/fr/floater_choose_group.xml  |   16 +-
 .../skins/default/xui/fr/floater_color_picker.xml  |   64 +-
 .../skins/default/xui/fr/floater_critical.xml      |   22 +-
 .../skins/default/xui/fr/floater_customize.xml     |  898 +--
 .../default/xui/fr/floater_day_cycle_options.xml   |  194 +-
 .../default/xui/fr/floater_device_settings.xml     |    6 +-
 .../skins/default/xui/fr/floater_env_settings.xml  |   54 +-
 .../skins/default/xui/fr/floater_font_test.xml     |   20 +-
 .../skins/default/xui/fr/floater_gesture.xml       |   36 +-
 .../skins/default/xui/fr/floater_god_tools.xml     |  222 +-
 .../default/xui/fr/floater_hardware_settings.xml   |   76 +-
 indra/newview/skins/default/xui/fr/floater_hud.xml |    4 +-
 indra/newview/skins/default/xui/fr/floater_im.xml  |   90 +-
 .../skins/default/xui/fr/floater_image_preview.xml |  104 +-
 .../skins/default/xui/fr/floater_inspect.xml       |   28 +-
 .../skins/default/xui/fr/floater_inventory.xml     |  110 +-
 .../xui/fr/floater_inventory_item_properties.xml   |  170 +-
 .../xui/fr/floater_inventory_view_finder.xml       |   48 +-
 .../skins/default/xui/fr/floater_joystick.xml      |  170 +-
 .../skins/default/xui/fr/floater_lagmeter.xml      |  304 +-
 .../skins/default/xui/fr/floater_land_holdings.xml |   82 +-
 .../default/xui/fr/floater_live_lsleditor.xml      |   24 +-
 .../skins/default/xui/fr/floater_lsl_guide.xml     |   14 +-
 .../skins/default/xui/fr/floater_media_browser.xml |   40 +-
 .../skins/default/xui/fr/floater_mem_leaking.xml   |   36 +-
 .../skins/default/xui/fr/floater_moveview.xml      |   24 +-
 .../skins/default/xui/fr/floater_mute_object.xml   |   24 +-
 .../skins/default/xui/fr/floater_my_friends.xml    |   14 +-
 .../skins/default/xui/fr/floater_openobject.xml    |   16 +-
 indra/newview/skins/default/xui/fr/floater_pay.xml |   44 +-
 .../skins/default/xui/fr/floater_pay_object.xml    |   62 +-
 .../skins/default/xui/fr/floater_post_process.xml  |  108 +-
 .../skins/default/xui/fr/floater_postcard.xml      |   90 +-
 .../skins/default/xui/fr/floater_preferences.xml   |   18 +-
 .../default/xui/fr/floater_preview_animation.xml   |   20 +-
 .../default/xui/fr/floater_preview_classified.xml  |    4 +-
 .../skins/default/xui/fr/floater_preview_event.xml |    4 +-
 .../default/xui/fr/floater_preview_gesture.xml     |  130 +-
 .../default/xui/fr/floater_preview_notecard.xml    |   32 +-
 .../skins/default/xui/fr/floater_preview_sound.xml |   24 +-
 .../default/xui/fr/floater_preview_texture.xml     |   18 +-
 .../skins/default/xui/fr/floater_region_info.xml   |    4 +-
 .../skins/default/xui/fr/floater_report_abuse.xml  |  366 +-
 .../skins/default/xui/fr/floater_script_debug.xml  |   12 +-
 .../default/xui/fr/floater_script_preview.xml      |   12 +-
 .../skins/default/xui/fr/floater_script_queue.xml  |    8 +-
 .../skins/default/xui/fr/floater_script_search.xml |   30 +-
 .../skins/default/xui/fr/floater_select_key.xml    |   14 +-
 .../skins/default/xui/fr/floater_sell_land.xml     |  144 +-
 .../default/xui/fr/floater_settings_debug.xml      |   34 +-
 .../skins/default/xui/fr/floater_snapshot.xml      |  274 +-
 .../skins/default/xui/fr/floater_sound_preview.xml |   56 +-
 .../skins/default/xui/fr/floater_telehub.xml       |   62 +-
 .../skins/default/xui/fr/floater_texture_ctrl.xml  |   48 +-
 .../newview/skins/default/xui/fr/floater_tools.xml | 1248 +--
 .../skins/default/xui/fr/floater_top_objects.xml   |  110 +-
 indra/newview/skins/default/xui/fr/floater_tos.xml |   54 +-
 .../skins/default/xui/fr/floater_url_entry.xml     |   26 +-
 .../newview/skins/default/xui/fr/floater_water.xml |  178 +-
 .../default/xui/fr/floater_wearable_save_as.xml    |   22 +-
 .../default/xui/fr/floater_windlight_options.xml   |  380 +-
 .../skins/default/xui/fr/floater_world_map.xml     |  178 +-
 indra/newview/skins/default/xui/fr/fonts.xml       |   18 +-
 .../skins/default/xui/fr/menu_inventory.xml        |  132 +-
 indra/newview/skins/default/xui/fr/menu_login.xml  |   26 +-
 indra/newview/skins/default/xui/fr/menu_slurl.xml  |   12 +-
 indra/newview/skins/default/xui/fr/menu_viewer.xml |  422 +-
 indra/newview/skins/default/xui/fr/mime_types.xml  |  460 +-
 .../skins/default/xui/fr/panel_audio_device.xml    |   50 +-
 .../newview/skins/default/xui/fr/panel_friends.xml |   40 +-
 .../skins/default/xui/fr/panel_group_general.xml   |  160 +-
 .../skins/default/xui/fr/panel_group_invite.xml    |   52 +-
 .../default/xui/fr/panel_group_land_money.xml      |  170 +-
 .../skins/default/xui/fr/panel_group_notices.xml   |  144 +-
 .../skins/default/xui/fr/panel_group_roles.xml     |  320 +-
 .../newview/skins/default/xui/fr/panel_groups.xml  |   32 +-
 indra/newview/skins/default/xui/fr/panel_login.xml |  104 +-
 .../default/xui/fr/panel_preferences_chat.xml      |  118 +-
 .../default/xui/fr/panel_preferences_general.xml   |  238 +-
 .../default/xui/fr/panel_preferences_graphics1.xml |  390 +-
 .../skins/default/xui/fr/panel_region_covenant.xml |  102 +-
 .../skins/default/xui/fr/panel_region_debug.xml    |   80 +-
 .../skins/default/xui/fr/panel_region_estate.xml   |  156 +-
 .../skins/default/xui/fr/panel_region_general.xml  |   90 +-
 .../skins/default/xui/fr/panel_region_terrain.xml  |   54 +-
 .../skins/default/xui/fr/panel_region_texture.xml  |  144 +-
 .../skins/default/xui/fr/panel_scrolling_param.xml |   24 +-
 .../skins/default/xui/fr/panel_status_bar.xml      |   82 +-
 .../newview/skins/default/xui/fr/role_actions.xml  |  402 +-
 indra/newview/skins/default/xui/fr/strings.xml     |  932 +--
 .../skins/default/xui/fr/teleport_strings.xml      |  180 +-
 indra/newview/skins/default/xui/fr/xui_version.xml |    8 +-
 .../skins/default/xui/it/floater_snapshot.xml      |    8 +-
 .../default/xui/ja/floater_animation_preview.xml   |  148 +-
 .../skins/default/xui/ja/floater_beacons.xml       |   30 +-
 .../skins/default/xui/ja/floater_buy_land.xml      |   12 +-
 .../skins/default/xui/ja/floater_camera.xml        |   24 +-
 .../default/xui/ja/floater_day_cycle_options.xml   |  194 +-
 .../default/xui/ja/floater_device_settings.xml     |    2 +-
 .../skins/default/xui/ja/floater_env_settings.xml  |   48 +-
 .../skins/default/xui/ja/floater_god_tools.xml     |   24 +-
 .../default/xui/ja/floater_hardware_settings.xml   |   84 +-
 indra/newview/skins/default/xui/ja/floater_hud.xml |    4 +-
 .../skins/default/xui/ja/floater_image_preview.xml |   40 +-
 .../skins/default/xui/ja/floater_inspect.xml       |   28 +-
 .../skins/default/xui/ja/floater_joystick.xml      |  250 +-
 .../skins/default/xui/ja/floater_lagmeter.xml      |  304 +-
 .../skins/default/xui/ja/floater_lsl_guide.xml     |   14 +-
 .../skins/default/xui/ja/floater_media_browser.xml |   38 +-
 .../skins/default/xui/ja/floater_mem_leaking.xml   |   38 +-
 .../skins/default/xui/ja/floater_mute_object.xml   |   24 +-
 .../skins/default/xui/ja/floater_my_friends.xml    |   14 +-
 .../skins/default/xui/ja/floater_post_process.xml  |  108 +-
 .../default/xui/ja/floater_preview_classified.xml  |    4 +-
 .../skins/default/xui/ja/floater_preview_event.xml |    4 +-
 .../skins/default/xui/ja/floater_region_info.xml   |    4 +-
 .../skins/default/xui/ja/floater_select_key.xml    |   14 +-
 .../skins/default/xui/ja/floater_sell_land.xml     |   12 +-
 .../default/xui/ja/floater_settings_debug.xml      |    8 +-
 .../skins/default/xui/ja/floater_snapshot.xml      |  108 +-
 .../skins/default/xui/ja/floater_url_entry.xml     |   26 +-
 .../newview/skins/default/xui/ja/floater_water.xml |  178 +-
 .../default/xui/ja/floater_windlight_options.xml   |  380 +-
 .../skins/default/xui/ja/floater_world_map.xml     |    8 +-
 indra/newview/skins/default/xui/ja/menu_login.xml  |   26 +-
 indra/newview/skins/default/xui/ja/menu_slurl.xml  |   12 +-
 indra/newview/skins/default/xui/ja/mime_types.xml  |  460 +-
 .../skins/default/xui/ja/panel_audio_device.xml    |   52 +-
 .../newview/skins/default/xui/ja/panel_friends.xml |  106 +-
 .../newview/skins/default/xui/ja/panel_groups.xml  |   32 +-
 indra/newview/skins/default/xui/ja/panel_login.xml |   12 +-
 .../default/xui/ja/panel_preferences_graphics1.xml |   36 +-
 indra/newview/skins/default/xui/ja/strings.xml     |  932 +--
 .../skins/default/xui/ja/teleport_strings.xml      |  174 +-
 .../skins/default/xui/nl/floater_snapshot.xml      |    8 +-
 .../default/xui/pl/floater_animation_preview.xml   |  148 +-
 .../skins/default/xui/pl/floater_beacons.xml       |   30 +-
 .../skins/default/xui/pl/floater_buy_land.xml      |   12 +-
 .../skins/default/xui/pl/floater_god_tools.xml     |   24 +-
 .../default/xui/pl/floater_hardware_settings.xml   |   20 +-
 .../skins/default/xui/pl/floater_image_preview.xml |   40 +-
 .../skins/default/xui/pl/floater_sell_land.xml     |   12 +-
 .../default/xui/pl/floater_settings_debug.xml      |    8 +-
 .../skins/default/xui/pl/floater_snapshot.xml      |  108 +-
 .../newview/skins/default/xui/pl/floater_tools.xml |  288 +-
 .../skins/default/xui/pl/floater_world_map.xml     |    8 +-
 indra/newview/skins/default/xui/pl/panel_login.xml |   14 +-
 .../default/xui/pl/panel_preferences_general.xml   |   64 +-
 .../default/xui/pl/panel_preferences_graphics1.xml |   36 +-
 .../newview/skins/default/xui/pt/floater_about.xml |   72 +-
 .../skins/default/xui/pt/floater_about_land.xml    |  864 +--
 .../default/xui/pt/floater_animation_preview.xml   |  322 +-
 .../skins/default/xui/pt/floater_auction.xml       |   18 +-
 .../skins/default/xui/pt/floater_avatar_picker.xml |   30 +-
 .../default/xui/pt/floater_avatar_textures.xml     |   60 +-
 .../skins/default/xui/pt/floater_beacons.xml       |   30 +-
 .../skins/default/xui/pt/floater_build_options.xml |   16 +-
 .../newview/skins/default/xui/pt/floater_bumps.xml |   42 +-
 .../skins/default/xui/pt/floater_buy_contents.xml  |   42 +-
 .../skins/default/xui/pt/floater_buy_currency.xml  |  136 +-
 .../skins/default/xui/pt/floater_buy_land.xml      |  450 +-
 .../skins/default/xui/pt/floater_buy_object.xml    |   52 +-
 .../skins/default/xui/pt/floater_camera.xml        |   24 +-
 .../skins/default/xui/pt/floater_choose_group.xml  |   16 +-
 .../skins/default/xui/pt/floater_color_picker.xml  |   60 +-
 .../skins/default/xui/pt/floater_critical.xml      |   22 +-
 .../skins/default/xui/pt/floater_customize.xml     |  902 +--
 .../default/xui/pt/floater_day_cycle_options.xml   |  134 +-
 .../skins/default/xui/pt/floater_env_settings.xml  |   46 +-
 .../skins/default/xui/pt/floater_gesture.xml       |   30 +-
 .../skins/default/xui/pt/floater_god_tools.xml     |  212 +-
 .../default/xui/pt/floater_hardware_settings.xml   |   76 +-
 indra/newview/skins/default/xui/pt/floater_hud.xml |    4 +-
 indra/newview/skins/default/xui/pt/floater_im.xml  |   90 +-
 .../skins/default/xui/pt/floater_image_preview.xml |  104 +-
 .../skins/default/xui/pt/floater_inspect.xml       |   22 +-
 .../skins/default/xui/pt/floater_inventory.xml     |   94 +-
 .../xui/pt/floater_inventory_item_properties.xml   |  170 +-
 .../xui/pt/floater_inventory_view_finder.xml       |   48 +-
 .../skins/default/xui/pt/floater_joystick.xml      |  166 +-
 .../skins/default/xui/pt/floater_lagmeter.xml      |  304 +-
 .../skins/default/xui/pt/floater_land_holdings.xml |   76 +-
 .../default/xui/pt/floater_live_lsleditor.xml      |   24 +-
 .../skins/default/xui/pt/floater_lsl_guide.xml     |   14 +-
 .../skins/default/xui/pt/floater_media_browser.xml |   40 +-
 .../skins/default/xui/pt/floater_mem_leaking.xml   |   24 +-
 .../skins/default/xui/pt/floater_moveview.xml      |   22 +-
 .../skins/default/xui/pt/floater_mute_object.xml   |   22 +-
 .../skins/default/xui/pt/floater_openobject.xml    |   16 +-
 indra/newview/skins/default/xui/pt/floater_pay.xml |   42 +-
 .../skins/default/xui/pt/floater_pay_object.xml    |   62 +-
 .../skins/default/xui/pt/floater_postcard.xml      |   80 +-
 .../skins/default/xui/pt/floater_preferences.xml   |   16 +-
 .../default/xui/pt/floater_preview_animation.xml   |   16 +-
 .../default/xui/pt/floater_preview_classified.xml  |    4 +-
 .../skins/default/xui/pt/floater_preview_event.xml |    4 +-
 .../default/xui/pt/floater_preview_gesture.xml     |  118 +-
 .../default/xui/pt/floater_preview_notecard.xml    |   32 +-
 .../skins/default/xui/pt/floater_preview_sound.xml |   16 +-
 .../default/xui/pt/floater_preview_texture.xml     |   18 +-
 .../skins/default/xui/pt/floater_region_info.xml   |    4 +-
 .../skins/default/xui/pt/floater_report_abuse.xml  |  362 +-
 .../skins/default/xui/pt/floater_script_debug.xml  |   12 +-
 .../default/xui/pt/floater_script_preview.xml      |   12 +-
 .../skins/default/xui/pt/floater_script_queue.xml  |    8 +-
 .../skins/default/xui/pt/floater_script_search.xml |   26 +-
 .../skins/default/xui/pt/floater_sell_land.xml     |  136 +-
 .../default/xui/pt/floater_settings_debug.xml      |   34 +-
 .../skins/default/xui/pt/floater_snapshot.xml      |  274 +-
 .../skins/default/xui/pt/floater_sound_preview.xml |   22 +-
 .../skins/default/xui/pt/floater_telehub.xml       |   56 +-
 .../skins/default/xui/pt/floater_texture_ctrl.xml  |   46 +-
 .../newview/skins/default/xui/pt/floater_tools.xml | 1220 +--
 .../skins/default/xui/pt/floater_top_objects.xml   |  110 +-
 indra/newview/skins/default/xui/pt/floater_tos.xml |   30 +-
 .../skins/default/xui/pt/floater_url_entry.xml     |   24 +-
 .../newview/skins/default/xui/pt/floater_water.xml |  170 +-
 .../default/xui/pt/floater_wearable_save_as.xml    |   22 +-
 .../default/xui/pt/floater_windlight_options.xml   |  372 +-
 .../skins/default/xui/pt/floater_world_map.xml     |  126 +-
 .../skins/default/xui/pt/menu_inventory.xml        |  130 +-
 indra/newview/skins/default/xui/pt/menu_login.xml  |   26 +-
 indra/newview/skins/default/xui/pt/menu_slurl.xml  |   12 +-
 indra/newview/skins/default/xui/pt/menu_viewer.xml |  406 +-
 indra/newview/skins/default/xui/pt/mime_types.xml  |  460 +-
 .../skins/default/xui/pt/panel_audio_device.xml    |   50 +-
 .../newview/skins/default/xui/pt/panel_friends.xml |   40 +-
 .../skins/default/xui/pt/panel_group_general.xml   |  132 +-
 .../skins/default/xui/pt/panel_group_invite.xml    |   46 +-
 .../default/xui/pt/panel_group_land_money.xml      |  148 +-
 .../skins/default/xui/pt/panel_group_notices.xml   |  140 +-
 .../skins/default/xui/pt/panel_group_roles.xml     |  278 +-
 indra/newview/skins/default/xui/pt/panel_login.xml |   74 +-
 .../default/xui/pt/panel_preferences_chat.xml      |  118 +-
 .../default/xui/pt/panel_preferences_general.xml   |  228 +-
 .../default/xui/pt/panel_preferences_graphics1.xml |  354 +-
 .../skins/default/xui/pt/panel_region_covenant.xml |  100 +-
 .../skins/default/xui/pt/panel_region_debug.xml    |   80 +-
 .../skins/default/xui/pt/panel_region_estate.xml   |  138 +-
 .../skins/default/xui/pt/panel_region_general.xml  |   88 +-
 .../skins/default/xui/pt/panel_region_terrain.xml  |   54 +-
 .../skins/default/xui/pt/panel_region_texture.xml  |  114 +-
 .../skins/default/xui/pt/panel_scrolling_param.xml |   20 +-
 .../skins/default/xui/pt/panel_status_bar.xml      |   76 +-
 .../newview/skins/default/xui/pt/role_actions.xml  |  372 +-
 indra/newview/skins/default/xui/pt/strings.xml     |  842 +-
 .../skins/default/xui/pt/teleport_strings.xml      |  150 +-
 indra/newview/skins/default/xui/pt/xui_version.xml |    8 +-
 indra/newview/tests/llagentaccess_test.cpp         |  137 +-
 indra/newview/viewer_manifest.py                   |    1 +
 indra/test/CMakeLists.txt                          |    6 +-
 indra/test/lldoubledispatch_tut.cpp                |  245 +
 indra/test/llpermissions_tut.cpp                   |   11 +-
 indra/test/llsaleinfo_tut.cpp                      |   15 +-
 indra/test/llscriptresource_tut.cpp                |    7 +-
 indra/test/lltimestampcache_tut.cpp                |    7 +-
 indra/test/lltranscode_tut.cpp                     |    7 +-
 indra/test/test.h                                  |    5 +-
 1134 files changed, 72992 insertions(+), 62605 deletions(-)
 create mode 100644 indra/integration_tests/CMakeLists.txt
 create mode 100644 indra/integration_tests/llui_libtest/CMakeLists.txt
 create mode 100644 indra/integration_tests/llui_libtest/llui_libtest.cpp
 create mode 100644 indra/integration_tests/llui_libtest/llui_libtest.h
 create mode 100644 indra/integration_tests/llui_libtest/llwidgetreg.cpp
 create mode 100644 indra/integration_tests/llui_libtest/llwidgetreg.h
 create mode 100755 indra/llcommon/lldoubledispatch.h
 create mode 100644 indra/llcommon/llinstancetracker.h
 create mode 100644 indra/llcommon/llpointer.h
 create mode 100644 indra/llcommon/llptrto.cpp
 create mode 100644 indra/llcommon/llptrto.h
 create mode 100644 indra/llcommon/llrefcount.cpp
 create mode 100644 indra/llcommon/llrefcount.h
 create mode 100644 indra/llcommon/llsafehandle.h
 create mode 100644 indra/llcommon/llsingleton.h
 create mode 100644 indra/llcommon/lltreeiterators.h
 create mode 100644 indra/llui/llconsole.cpp
 create mode 100644 indra/llui/llconsole.h
 create mode 100644 indra/llui/llcontainerview.cpp
 create mode 100644 indra/llui/llcontainerview.h
 create mode 100644 indra/llui/llf32uictrl.cpp
 create mode 100644 indra/llui/llf32uictrl.h
 create mode 100644 indra/llui/llfloaterreg.cpp
 create mode 100644 indra/llui/llfloaterreg.h
 create mode 100644 indra/llui/llflyoutbutton.cpp
 create mode 100644 indra/llui/llflyoutbutton.h
 create mode 100644 indra/llui/lllayoutstack.cpp
 create mode 100644 indra/llui/lllayoutstack.h
 create mode 100644 indra/llui/lllazyvalue.h
 create mode 100644 indra/llui/llmultifloater.cpp
 create mode 100644 indra/llui/llmultifloater.h
 create mode 100644 indra/llui/llscrolllistcell.cpp
 create mode 100644 indra/llui/llscrolllistcell.h
 create mode 100644 indra/llui/llscrolllistcolumn.cpp
 create mode 100644 indra/llui/llscrolllistcolumn.h
 create mode 100644 indra/llui/llscrolllistitem.cpp
 create mode 100644 indra/llui/llscrolllistitem.h
 create mode 100644 indra/llui/llsdparam.cpp
 create mode 100644 indra/llui/llsdparam.h
 create mode 100644 indra/llui/llsearcheditor.cpp
 create mode 100644 indra/llui/llsearcheditor.h
 create mode 100644 indra/llui/llstatbar.cpp
 create mode 100644 indra/llui/llstatbar.h
 create mode 100644 indra/llui/llstatgraph.cpp
 create mode 100644 indra/llui/llstatgraph.h
 create mode 100644 indra/llui/llstatview.cpp
 create mode 100644 indra/llui/llstatview.h
 create mode 100644 indra/llui/lluiimage.cpp
 create mode 100644 indra/llui/lluiimage.h
 create mode 100644 indra/llui/llviewmodel.cpp
 create mode 100644 indra/llui/llviewmodel.h
 create mode 100644 indra/llwindow/llwindowcallbacks.cpp
 create mode 100644 indra/llwindow/llwindowcallbacks.h
 create mode 100644 indra/newview/app_settings/ignorable_dialogs.xml
 create mode 100644 indra/newview/llavatariconctrl.cpp
 create mode 100644 indra/newview/llavatariconctrl.h
 create mode 100644 indra/newview/llavatarpropertiesprocessor.cpp
 create mode 100644 indra/newview/llavatarpropertiesprocessor.h
 create mode 100644 indra/newview/llfavoritesbar.cpp
 create mode 100644 indra/newview/llfavoritesbar.h
 create mode 100644 indra/newview/llfloateruipreview.cpp
 create mode 100644 indra/newview/llfloateruipreview.h
 create mode 100644 indra/newview/llinventoryactions.h
 create mode 100644 indra/newview/lllocationhistory.cpp
 create mode 100644 indra/newview/lllocationhistory.h
 create mode 100644 indra/newview/lllocationinputctrl.cpp
 create mode 100644 indra/newview/lllocationinputctrl.h
 create mode 100644 indra/newview/llnavigationbar.cpp
 create mode 100644 indra/newview/llnavigationbar.h
 create mode 100644 indra/newview/lloutputmonitorctrl.cpp
 create mode 100644 indra/newview/lloutputmonitorctrl.h
 create mode 100644 indra/newview/llslurl.cpp
 create mode 100644 indra/newview/llslurl.h
 create mode 100644 indra/newview/llteleporthistory.cpp
 create mode 100644 indra/newview/llteleporthistory.h
 create mode 100644 indra/newview/llviewerfloaterreg.cpp
 create mode 100644 indra/newview/llviewerfloaterreg.h
 create mode 100644 indra/newview/res/bitmap2.bmp
 create mode 100644 indra/newview/res/install_icon.BMP
 create mode 100644 indra/newview/res/loginbackground.bmp
 create mode 100644 indra/newview/res/uninstall_icon.BMP
 create mode 100644 indra/newview/skins/default/textures/jump_left_in.tga
 create mode 100644 indra/newview/skins/default/textures/jump_left_out.tga
 create mode 100644 indra/newview/skins/default/textures/jump_right_in.tga
 create mode 100644 indra/newview/skins/default/textures/jump_right_out.tga
 create mode 100644 indra/newview/skins/default/textures/menu_separator.png
 create mode 100644 indra/newview/skins/default/textures/transparent.j2c
 create mode 100644 indra/newview/skins/default/textures/voice_meter_dot.j2c
 create mode 100644 indra/newview/skins/default/textures/voice_meter_rings.j2c
 create mode 100755 indra/test/lldoubledispatch_tut.cpp

(limited to 'indra')

diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 7f4c2c33c1..c285bcae4b 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -110,3 +110,7 @@ if (SERVER)
     add_subdirectory(${SERVER_PREFIX}tools)
   endif (WINDOWS)
 endif (SERVER)
+
+# Define after the custom viewer and server targets are created so individual
+# apps can add themselves as dependencies
+add_subdirectory(${INTEGRATION_TESTS_PREFIX}integration_tests)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 08151bc732..b19eebe1fe 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -31,6 +31,7 @@ MACRO(ADD_BUILD_TEST name parent)
 
         SET(basic_libraries
             ${LLCOMMON_LIBRARIES}
+            ${LLMATH_LIBRARIES}
             ${APRUTIL_LIBRARIES}
             ${APR_LIBRARIES}
             ${PTHREAD_LIBRARY}
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index c4dcc7eae7..adff01197f 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -23,6 +23,7 @@ set(LIBS_SERVER_PREFIX)
 set(SCRIPTS_PREFIX ../scripts)
 set(SERVER_PREFIX)
 set(VIEWER_PREFIX)
+set(INTEGRATION_TESTS_PREFIX)
 
 set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX})
 set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX})
diff --git a/indra/integration_tests/CMakeLists.txt b/indra/integration_tests/CMakeLists.txt
new file mode 100644
index 0000000000..67e8fbf1f2
--- /dev/null
+++ b/indra/integration_tests/CMakeLists.txt
@@ -0,0 +1,3 @@
+# -*- cmake -*-
+
+add_subdirectory(llui_libtest)
diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt
new file mode 100644
index 0000000000..71a47f1475
--- /dev/null
+++ b/indra/integration_tests/llui_libtest/CMakeLists.txt
@@ -0,0 +1,96 @@
+# -*- cmake -*-
+
+project (llui_libtest)
+
+include(00-Common)
+include(LLCommon)
+include(LLImage)
+include(LLImageJ2COJ)   # ugh, needed for images
+include(LLMath)
+include(LLRender)
+include(LLWindow)
+include(LLUI)
+include(LLVFS)        # ugh, needed for LLDir
+include(LLXML)
+include(Linking)
+# include(Tut)
+
+include_directories(
+    ${FREETYPE_INCLUDE_DIRS}
+    ${LLCOMMON_INCLUDE_DIRS}
+    ${LLIMAGE_INCLUDE_DIRS}
+    ${LLMATH_INCLUDE_DIRS}
+    ${LLRENDER_INCLUDE_DIRS}
+    ${LLUI_INCLUDE_DIRS}
+    ${LLVFS_INCLUDE_DIRS}
+    ${LLWINDOW_INCLUDE_DIRS}
+    ${LLXML_INCLUDE_DIRS}
+    )
+
+set(llui_libtest_SOURCE_FILES
+    llui_libtest.cpp
+    llwidgetreg.cpp
+    )
+
+set(llui_libtest_HEADER_FILES
+    CMakeLists.txt
+    llui_libtest.h
+    llwidgetreg.h
+    )
+
+set_source_files_properties(${llui_libtest_HEADER_FILES}
+                            PROPERTIES HEADER_FILE_ONLY TRUE)
+
+list(APPEND llui_libtest_SOURCE_FILES ${llui_libtest_HEADER_FILES})
+
+add_executable(llui_libtest ${llui_libtest_SOURCE_FILES})
+
+# Link with OS-specific libraries for LLWindow dependency
+if (DARWIN)
+  find_library(COCOA_LIBRARY Cocoa)
+  set(OS_LIBRARIES ${COCOA_LIBRARY})
+elseif (WINDOWS)
+  set(OS_LIBRARIES ${WINDOWS_LIBRARIES})
+elseif (LINUX)
+  set(OS_LIBRARIES)
+else (DARWIN)
+  message(FATAL_ERROR "unknown platform")
+endif (DARWIN)
+
+# Libraries on which this library depends, needed for Linux builds
+# Sort by high-level to low-level
+target_link_libraries(llui_libtest
+    llui
+    ${OS_LIBRARIES}
+    )
+
+if (WINDOWS)
+    set_target_properties(llui_libtest
+        PROPERTIES 
+        LINK_FLAGS "/NODEFAULTLIB:LIBCMT"
+        LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRT /NODEFAULTLIB:LIBCMTD"
+        )
+
+    # Copy over OpenJPEG.dll
+    # *NOTE: On Windows with VS2005, only the first comment prints
+    set(OPENJPEG_RELEASE
+        "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/openjpeg.dll")
+    add_custom_command( TARGET llui_libtest POST_BUILD
+        COMMAND ${CMAKE_COMMAND} -E copy_if_different 
+            ${OPENJPEG_RELEASE} ${CMAKE_CURRENT_BINARY_DIR}
+        COMMENT "Copying OpenJPEG DLLs to binary directory"
+        )
+    set(OPENJPEG_DEBUG
+        "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/openjpegd.dll")
+    add_custom_command( TARGET llui_libtest POST_BUILD
+        COMMAND ${CMAKE_COMMAND} -E copy_if_different 
+            ${OPENJPEG_DEBUG} ${CMAKE_CURRENT_BINARY_DIR}
+        )
+endif (WINDOWS)
+
+if (VIEWER)
+    # Ensure people working on the viewer don't break this library
+    # *NOTE: This could be removed, or only built by Parabuild, if the build
+    # and link times become too long. JC
+    add_dependencies(viewer llui_libtest)
+endif (VIEWER)
diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp
new file mode 100644
index 0000000000..599bcabfcb
--- /dev/null
+++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp
@@ -0,0 +1,149 @@
+/** 
+ * @file llui_libtest.cpp
+ * @brief Integration test for the LLUI library
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#include "linden_common.h"
+
+#include "llui_libtest.h"
+
+// project includes
+#include "llwidgetreg.h"
+
+// linden library includes
+#include "llcontrol.h"		// LLControlGroup
+#include "lldir.h"
+#include "llerrorcontrol.h"
+#include "llfloater.h"
+#include "llfontgl.h"
+#include "lltrans.h"
+#include "llui.h"
+#include "lluictrlfactory.h"
+
+#include <iostream>
+
+// *TODO: switch to using TUT
+// *TODO: teach Parabuild about this program, run automatically after full builds
+
+static std::string get_xui_dir()
+{
+	std::string delim = gDirUtilp->getDirDelimiter();
+	return gDirUtilp->getAppRODataDir() + delim + std::string("skins") + delim + "default" + delim + "xui" + delim;
+}
+
+int main(int argc, char** argv)
+{
+	// Must init LLError for llerrs to actually cause errors.
+	LLError::initForApplication(".");
+
+	// Font lookup needs directory support
+	gDirUtilp->initAppDirs("SecondLife", "../../../newview");
+	gDirUtilp->setSkinFolder("default");
+
+	std::string config_filename = gDirUtilp->getExpandedFilename(
+		LL_PATH_APP_SETTINGS, "settings.xml");
+	LLControlGroup config_group("config");
+	config_group.loadFromFile(config_filename);
+
+	std::string color_filename = gDirUtilp->getExpandedFilename(
+		LL_PATH_DEFAULT_SKIN, "colors.xml");
+	LLControlGroup color_group("color");
+	color_group.loadFromFile(color_filename);
+
+	LLControlGroup floater_group("floater");
+	LLControlGroup ignores_group("ignores");
+	LLUI::settings_map_t settings;
+	settings["config"] = &config_group;
+	settings["color"] = &color_group;
+	settings["floater"] = &floater_group;
+	settings["ignores"] = &ignores_group;
+
+	LLImageProviderInterface* image_provider = NULL;
+	LLUI::initClass(settings, image_provider);
+
+	const bool no_register_widgets = false;
+	LLWidgetReg::initClass( no_register_widgets );
+
+	// Unclear if this is needed
+	LLUI::setupPaths();
+	// Otherwise we get translation warnings when setting up floaters
+	// (tooltips for buttons)
+	std::set<std::string> default_args;
+	LLTrans::parseStrings("strings.xml", default_args);
+    
+	LLFontManager::initClass();
+
+	// Creating widgets apparently requires fonts to be initialized,
+	// otherwise it crashes.
+	LLFontGL::initClass(96.f, 1.f, 1.f,
+		gDirUtilp->getAppRODataDir(),
+		LLUI::getXUIPaths(),
+		false );	// don't create gl textures
+
+	LLFloaterView::Params fvparams;
+	fvparams.name("Floater View");
+	fvparams.rect( LLRect(0,480,640,0) );
+	fvparams.mouse_opaque(false);
+	fvparams.follows.flags(FOLLOWS_ALL);
+	fvparams.tab_stop(false);
+	gFloaterView = LLUICtrlFactory::create<LLFloaterView> (fvparams);
+
+	// Convert all test floaters to new XML format
+	std::string delim = gDirUtilp->getDirDelimiter();
+	std::string xui_dir = get_xui_dir() + "en-us" + delim;
+	std::string filename;
+	while (gDirUtilp->getNextFileInDir(xui_dir, "floater_test_*.xml", filename, false))
+	{
+		if (filename.find("_new.xml") != std::string::npos)
+		{
+			// don't re-export other test floaters
+			continue;
+		}
+		llinfos << "Converting " << filename << llendl;
+		// Build a floater and output new attributes
+		LLXMLNodePtr output_node = new LLXMLNode();
+		LLFloater* floater = new LLFloater();
+		LLUICtrlFactory::getInstance()->buildFloater(floater,
+			filename,
+			FALSE,	// don't open floater
+			output_node);
+		std::string out_filename = xui_dir + filename;
+		std::string::size_type extension_pos = out_filename.rfind(".xml");
+		out_filename.resize(extension_pos);
+		out_filename += "_new.xml";
+
+		llinfos << "Output: " << out_filename << llendl;
+		LLFILE* floater_file = LLFile::fopen(out_filename.c_str(), "w");
+		LLXMLNode::writeHeaderToFile(floater_file);
+		const char* const indent = "    ";
+		output_node->writeToFile(floater_file, indent);
+		fclose(floater_file);
+	}
+	return 0;
+}
diff --git a/indra/integration_tests/llui_libtest/llui_libtest.h b/indra/integration_tests/llui_libtest/llui_libtest.h
new file mode 100644
index 0000000000..a84d57dba9
--- /dev/null
+++ b/indra/integration_tests/llui_libtest/llui_libtest.h
@@ -0,0 +1,36 @@
+/** 
+ * @file llui_libtest.h
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#ifndef LLUI_LIBTEST_H
+#define LLUI_LIBTEST_H
+
+// TODO
+
+#endif
diff --git a/indra/integration_tests/llui_libtest/llwidgetreg.cpp b/indra/integration_tests/llui_libtest/llwidgetreg.cpp
new file mode 100644
index 0000000000..f4a4665cc5
--- /dev/null
+++ b/indra/integration_tests/llui_libtest/llwidgetreg.cpp
@@ -0,0 +1,107 @@
+/** 
+ * @file llwidgetreg.cpp
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#include "linden_common.h"
+
+#include "llwidgetreg.h"
+
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "llcontainerview.h"
+#include "lliconctrl.h"
+#include "llmenugl.h"
+#include "llmultislider.h"
+#include "llmultisliderctrl.h"
+#include "llprogressbar.h"
+#include "llradiogroup.h"
+#include "llscrollcontainer.h"
+#include "llscrollingpanellist.h"
+#include "llscrolllistctrl.h"
+#include "llslider.h"
+#include "llsliderctrl.h"
+#include "llspinctrl.h"
+#include "llstatview.h"
+#include "lltabcontainer.h"
+#include "lltextbox.h"
+#include "lltexteditor.h"
+#include "llflyoutbutton.h"
+#include "llsearcheditor.h"
+#include "lllayoutstack.h"
+
+void LLWidgetReg::initClass(bool register_widgets)
+{
+	// Only need to register if the Windows linker has optimized away the
+	// references to the object files.
+	if (register_widgets)
+	{
+		LLRegisterWidget<LLButton> button("button");
+		LLRegisterWidget<LLCheckBoxCtrl> check_box("check_box");
+		LLRegisterWidget<LLComboBox> combo_box("combo_box");
+		LLRegisterWidget<LLFlyoutButton> flyout_button("flyout_button");
+		LLRegisterWidget<LLContainerView> container_view("container_view");
+		LLRegisterWidget<LLIconCtrl> icon("icon");
+		LLRegisterWidget<LLLineEditor> line_editor("line_editor");
+		LLRegisterWidget<LLSearchEditor> search_editor("search_editor");
+		LLRegisterWidget<LLMenuItemSeparatorGL> menu_item_separator("menu_item_separator");
+		LLRegisterWidget<LLMenuItemCallGL> menu_item_call_gl("menu_item_call");
+		LLRegisterWidget<LLMenuItemCheckGL> menu_item_check_gl("menu_item_check");
+		LLRegisterWidget<LLMenuGL> menu("menu");
+		LLRegisterWidget<LLMenuBarGL> menu_bar("menu_bar");
+		LLRegisterWidget<LLContextMenu> context_menu("context_menu");
+		LLRegisterWidget<LLMultiSlider> multi_slider_bar("multi_slider_bar");
+		LLRegisterWidget<LLMultiSliderCtrl> multi_slider("multi_slider");
+		LLRegisterWidget<LLPanel> panel("panel", &LLPanel::fromXML);
+		LLRegisterWidget<LLLayoutStack> layout_stack("layout_stack", &LLLayoutStack::fromXML);
+		LLRegisterWidget<LLProgressBar> progress_bar("progress_bar");
+		LLRegisterWidget<LLRadioGroup> radio_group("radio_group");
+		LLRegisterWidget<LLRadioCtrl> radio_item("radio_item");
+		LLRegisterWidget<LLScrollContainer> scroll_container("scroll_container");
+		LLRegisterWidget<LLScrollingPanelList> scrolling_panel_list("scrolling_panel_list");
+		LLRegisterWidget<LLScrollListCtrl> scroll_list("scroll_list");
+		LLRegisterWidget<LLSlider> slider_bar("slider_bar");
+		LLRegisterWidget<LLSlider> volume_slider("volume_slider");
+		LLRegisterWidget<LLSliderCtrl> slider("slider");
+		LLRegisterWidget<LLSpinCtrl> spinner("spinner");
+		LLRegisterWidget<LLStatBar> stat_bar("stat_bar");
+		//LLRegisterWidget<LLPlaceHolderPanel> placeholder("placeholder");
+		LLRegisterWidget<LLTabContainer> tab_container("tab_container");
+		LLRegisterWidget<LLTextBox> text("text");
+		LLRegisterWidget<LLTextEditor> simple_text_editor("simple_text_editor");
+		LLRegisterWidget<LLUICtrl> ui_ctrl("ui_ctrl");
+		LLRegisterWidget<LLStatView> stat_view("stat_view");
+		//LLRegisterWidget<LLUICtrlLocate> locate("locate");
+		//LLRegisterWidget<LLUICtrlLocate> pad("pad");
+		LLRegisterWidget<LLViewBorder> view_border("view_border");
+	}
+
+	// *HACK: Usually this is registered as a viewer text editor
+	LLRegisterWidget<LLTextEditor> text_editor("text_editor");
+}
diff --git a/indra/integration_tests/llui_libtest/llwidgetreg.h b/indra/integration_tests/llui_libtest/llwidgetreg.h
new file mode 100644
index 0000000000..263e3958c9
--- /dev/null
+++ b/indra/integration_tests/llui_libtest/llwidgetreg.h
@@ -0,0 +1,43 @@
+/** 
+ * @file llwidgetreg.h
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#ifndef LLWIDGETREG_H
+#define LLWIDGETREG_H
+
+// Register all widgets with the builder registry.
+// Useful on Windows where linker discards all references to the 
+// static LLRegisterWidget<> calls.
+class LLWidgetReg
+{
+public:
+	static void initClass(bool register_widgets);
+};
+
+#endif
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp
index 5b6db3bd87..6a494d1983 100644
--- a/indra/llaudio/llaudiodecodemgr.cpp
+++ b/indra/llaudio/llaudiodecodemgr.cpp
@@ -40,8 +40,8 @@
 #include "llstring.h"
 #include "lldir.h"
 #include "llendianswizzle.h"
-#include "audioengine.h"
 #include "llassetstorage.h"
+#include "llrefcount.h"
 
 #include "vorbis/codec.h"
 #include "vorbis/vorbisfile.h"
diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp
index e1f8ce53fb..24391eb8f3 100644
--- a/indra/llcharacter/llbvhloader.cpp
+++ b/indra/llcharacter/llbvhloader.cpp
@@ -56,7 +56,7 @@ const F32 ROTATION_MOTION_THRESHOLD = 0.001f;
 
 char gInFile[1024];		/* Flawfinder: ignore */
 char gOutFile[1024];		/* Flawfinder: ignore */
-
+/*
 //------------------------------------------------------------------------
 // Status Codes
 //------------------------------------------------------------------------
@@ -91,7 +91,7 @@ const char *LLBVHLoader::ST_NO_XLT_EASEIN		= "Can't get easeIn values.";
 const char *LLBVHLoader::ST_NO_XLT_EASEOUT	= "Can't get easeOut values.";
 const char *LLBVHLoader::ST_NO_XLT_HAND		= "Can't get hand morph value.";
 const char *LLBVHLoader::ST_NO_XLT_EMOTE		= "Can't read emote name.";
-
+*/
 //------------------------------------------------------------------------
 // find_next_whitespace()
 //------------------------------------------------------------------------
@@ -124,7 +124,9 @@ LLQuaternion::Order bvhStringToOrder( char *str )
 //-----------------------------------------------------------------------------
 // LLBVHLoader()
 //-----------------------------------------------------------------------------
-LLBVHLoader::LLBVHLoader(const char* buffer)
+
+/*
+ LLBVHLoader::LLBVHLoader(const char* buffer)
 {
 	reset();
 
@@ -144,7 +146,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer)
 		}
 	}
 
-	char error_text[128];		/* Flawfinder: ignore */
+	char error_text[128];		// Flawfinder: ignore 
 	S32 error_line;
 	mStatus = loadBVHFile(buffer, error_text, error_line);
 	if (mStatus != LLBVHLoader::ST_OK)
@@ -158,6 +160,49 @@ LLBVHLoader::LLBVHLoader(const char* buffer)
 
 	mInitialized = TRUE;
 }
+*/
+LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine)
+{
+	reset();
+	errorLine = 0;
+	mStatus = loadTranslationTable("anim.ini");
+	loadStatus = mStatus;
+	llinfos<<"Load Status 00 : "<< loadStatus << llendl;
+	if (mStatus == E_ST_NO_XLT_FILE)
+	{
+		//llwarns << "NOTE: No translation table found." << llendl;
+		loadStatus = mStatus;
+		return;
+	}
+	else
+	{
+		if (mStatus != E_ST_OK)
+		{
+			//llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl;
+			errorLine = getLineNumber();
+			loadStatus = mStatus;
+			return;
+		}
+	}
+	
+	char error_text[128];		/* Flawfinder: ignore */
+	S32 error_line;
+	mStatus = loadBVHFile(buffer, error_text, error_line);
+	
+	if (mStatus != E_ST_OK)
+	{
+		//llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl;
+		loadStatus = mStatus;
+		errorLine = getLineNumber();
+		return;
+	}
+	
+	applyTranslations();
+	optimize();
+	
+	mInitialized = TRUE;
+}
+
 
 LLBVHLoader::~LLBVHLoader()
 {
@@ -167,7 +212,7 @@ LLBVHLoader::~LLBVHLoader()
 //------------------------------------------------------------------------
 // LLBVHLoader::loadTranslationTable()
 //------------------------------------------------------------------------
-LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
+ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
 {
 	mLineNumber = 0;
 	mTranslations.clear();
@@ -182,7 +227,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 	infile.open(path, LL_APR_R);
 	apr_file_t *fp = infile.getFileHandle();
 	if (!fp)
-		return ST_NO_XLT_FILE;
+		return E_ST_NO_XLT_FILE;
 
 	llinfos << "NOTE: Loading translation table: " << fileName << llendl;
 
@@ -194,9 +239,9 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 	// load header
 	//--------------------------------------------------------------------
 	if ( ! getLine(fp) )
-		return ST_EOF;
+		return E_ST_EOF;
 	if ( strncmp(mLine, "Translations 1.0", 16) )
-		return ST_NO_XLT_HEADER;
+		return E_ST_NO_XLT_HEADER;
 
 	//--------------------------------------------------------------------
 	// load data one line at a time
@@ -222,7 +267,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 		{
 			char name[128]; /* Flawfinder: ignore */
 			if ( sscanf(mLine, " [%127[^]]", name) != 1 )
-				return ST_NO_XLT_NAME;
+				return E_ST_NO_XLT_NAME;
 
 			if (strcmp(name, "GLOBALS")==0)
 			{
@@ -245,7 +290,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 		{
 			char emote_str[1024];	/* Flawfinder: ignore */
 			if ( sscanf(mLine, " %*s = %1023s", emote_str) != 1 )	/* Flawfinder: ignore */
-				return ST_NO_XLT_EMOTE;
+				return E_ST_NO_XLT_EMOTE;
 
 			mEmoteName.assign( emote_str );
 //			llinfos << "NOTE: Emote: " << mEmoteName.c_str() << llendl;
@@ -260,7 +305,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 		{
 			S32 priority;
 			if ( sscanf(mLine, " %*s = %d", &priority) != 1 )
-				return ST_NO_XLT_PRIORITY;
+				return E_ST_NO_XLT_PRIORITY;
 
 			mPriority = priority;
 //			llinfos << "NOTE: Priority: " << mPriority << llendl;
@@ -288,7 +333,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 			}
 			else
 			{
-				return ST_NO_XLT_LOOP;
+				return E_ST_NO_XLT_LOOP;
 			}
 
 			mLoopInPoint = loop_in * mDuration;
@@ -305,7 +350,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 			F32 duration;
 			char type[128];	/* Flawfinder: ignore */
 			if ( sscanf(mLine, " %*s = %f %127s", &duration, type) != 2 )	/* Flawfinder: ignore */
-				return ST_NO_XLT_EASEIN;
+				return E_ST_NO_XLT_EASEIN;
 
 			mEaseIn = duration;
 			continue;
@@ -319,7 +364,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 			F32 duration;
 			char type[128];		/* Flawfinder: ignore */
 			if ( sscanf(mLine, " %*s = %f %127s", &duration, type) != 2 )	/* Flawfinder: ignore */
-				return ST_NO_XLT_EASEOUT;
+				return E_ST_NO_XLT_EASEOUT;
 
 			mEaseOut = duration;
 			continue;
@@ -332,7 +377,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 		{
 			S32 handMorph;
 			if (sscanf(mLine, " %*s = %d", &handMorph) != 1)
-				return ST_NO_XLT_HAND;
+				return E_ST_NO_XLT_HAND;
 
 			mHand = handMorph;
 			continue;
@@ -380,7 +425,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 					&constraint.mTargetOffset.mV[VY],
 					&constraint.mTargetOffset.mV[VZ]) != 13)
 				{
-					return ST_NO_CONSTRAINT;
+					return E_ST_NO_CONSTRAINT;
 				}
 			}
 			else
@@ -440,7 +485,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 					&constraint.mTargetOffset.mV[VY],
 					&constraint.mTargetOffset.mV[VZ]) != 13)
 				{
-					return ST_NO_CONSTRAINT;
+					return E_ST_NO_CONSTRAINT;
 				}
 			}
 			else
@@ -463,7 +508,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 		// at this point there must be a valid trans pointer
 		//----------------------------------------------------------------
 		if ( ! trans )
-			return ST_NO_XLT_NAME;
+			return E_ST_NO_XLT_NAME;
 
 		//----------------------------------------------------------------
 		// check for ignore flag
@@ -472,7 +517,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 		{
 			char trueFalse[128];	/* Flawfinder: ignore */
 			if ( sscanf(mLine, " %*s = %127s", trueFalse) != 1 )	/* Flawfinder: ignore */
-				return ST_NO_XLT_IGNORE;
+				return E_ST_NO_XLT_IGNORE;
 
 			trans->mIgnore = (LLStringUtil::compareInsensitive(trueFalse, "true")==0);
 			continue;
@@ -497,12 +542,12 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 				}
 				else
 				{
-					return ST_NO_XLT_RELATIVE;
+					return E_ST_NO_XLT_RELATIVE;
 				}
 			}
 			else
 			{
-				return ST_NO_XLT_RELATIVE;
+				return E_ST_NO_XLT_RELATIVE;
 			}
 
 			continue;
@@ -523,12 +568,12 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 				}
 				else
 				{
-					return ST_NO_XLT_RELATIVE;
+					return E_ST_NO_XLT_RELATIVE;
 				}
 			}
 			else
 			{
-				return ST_NO_XLT_RELATIVE;
+				return E_ST_NO_XLT_RELATIVE;
 			}
 
 			continue;
@@ -541,7 +586,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 		{
 			char outName[128];	/* Flawfinder: ignore */
 			if ( sscanf(mLine, " %*s = %127s", outName) != 1 )	/* Flawfinder: ignore */
-				return ST_NO_XLT_OUTNAME;
+				return E_ST_NO_XLT_OUTNAME;
 
 			trans->mOutName = outName;
 			continue;
@@ -557,7 +602,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 					&fm.mMatrix[0][0], &fm.mMatrix[0][1], &fm.mMatrix[0][2],
 					&fm.mMatrix[1][0], &fm.mMatrix[1][1], &fm.mMatrix[1][2],
 					&fm.mMatrix[2][0], &fm.mMatrix[2][1], &fm.mMatrix[2][2]	) != 9 )
-				return ST_NO_XLT_MATRIX;
+				return E_ST_NO_XLT_MATRIX;
 
 			trans->mFrameMatrix = fm;
 			continue;
@@ -573,7 +618,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 					&om.mMatrix[0][0], &om.mMatrix[0][1], &om.mMatrix[0][2],
 					&om.mMatrix[1][0], &om.mMatrix[1][1], &om.mMatrix[1][2],
 					&om.mMatrix[2][0], &om.mMatrix[2][1], &om.mMatrix[2][2]	) != 9 )
-				return ST_NO_XLT_MATRIX;
+				return E_ST_NO_XLT_MATRIX;
 
 			trans->mOffsetMatrix = om;
 			continue;
@@ -586,7 +631,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 		{
 			char mergeParentName[128];	/* Flawfinder: ignore */
 			if ( sscanf(mLine, " %*s = %127s", mergeParentName) != 1 )	/* Flawfinder: ignore */
-				return ST_NO_XLT_MERGEPARENT;
+				return E_ST_NO_XLT_MERGEPARENT;
 
 			trans->mMergeParentName = mergeParentName;
 			continue;
@@ -599,7 +644,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 		{
 			char mergeChildName[128];	/* Flawfinder: ignore */
 			if ( sscanf(mLine, " %*s = %127s", mergeChildName) != 1 )	/* Flawfinder: ignore */
-				return ST_NO_XLT_MERGECHILD;
+				return E_ST_NO_XLT_MERGECHILD;
 
 			trans->mMergeChildName = mergeChildName;
 			continue;
@@ -612,7 +657,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 		{
 			S32 priority;
 			if ( sscanf(mLine, " %*s = %d", &priority) != 1 )
-				return ST_NO_XLT_PRIORITY;
+				return E_ST_NO_XLT_PRIORITY;
 
 			trans->mPriorityModifier = priority;
 			continue;
@@ -621,14 +666,14 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
 	}
 
 	infile.close() ;
-	return ST_OK;
+	return E_ST_OK;
 }
 
 
 //------------------------------------------------------------------------
 // LLBVHLoader::loadBVHFile()
 //------------------------------------------------------------------------
-LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &err_line)
+ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &err_line)
 {
 	std::string line;
 
@@ -650,14 +695,14 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 	// consume  hierarchy
 	//--------------------------------------------------------------------
 	if (iter == tokens.end())
-		return ST_EOF;
+		return E_ST_EOF;
 	line = (*(iter++));
 	err_line++;
 
 	if ( !strstr(line.c_str(), "HIERARCHY") )
 	{
 //		llinfos << line << llendl;
-		return ST_NO_HIER;
+		return E_ST_NO_HIER;
 	}
 
 	//--------------------------------------------------------------------
@@ -669,7 +714,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		// get next line
 		//----------------------------------------------------------------
 		if (iter == tokens.end())
-			return ST_EOF;
+			return E_ST_EOF;
 		line = (*(iter++));
 		err_line++;
 
@@ -719,7 +764,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		else
 		{
 			strncpy(error_text, line.c_str(), 127);	/* Flawfinder: ignore */
-			return ST_NO_JOINT;
+			return E_ST_NO_JOINT;
 		}
 
 		//----------------------------------------------------------------
@@ -729,7 +774,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		if ( sscanf(line.c_str(), "%*s %79s", jointName) != 1 )	/* Flawfinder: ignore */
 		{
 			strncpy(error_text, line.c_str(), 127);	/* Flawfinder: ignore */
-			return ST_NO_NAME;
+			return E_ST_NO_NAME;
 		}
 
 		//----------------------------------------------------------------
@@ -754,7 +799,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		//----------------------------------------------------------------
 		if (iter == tokens.end())
 		{
-			return ST_EOF;
+			return E_ST_EOF;
 		}
 		line = (*(iter++));
 		err_line++;
@@ -765,7 +810,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		if ( !strstr(line.c_str(), "{") )
 		{
 			strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-			return ST_NO_OFFSET;
+			return E_ST_NO_OFFSET;
 		}
 		else
 		{
@@ -777,7 +822,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		//----------------------------------------------------------------
 		if (iter == tokens.end())
 		{
-			return ST_EOF;
+			return E_ST_EOF;
 		}
 		line = (*(iter++));
 		err_line++;
@@ -788,7 +833,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		if ( !strstr(line.c_str(), "OFFSET") )
 		{
 			strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-			return ST_NO_OFFSET;
+			return E_ST_NO_OFFSET;
 		}
 
 		//----------------------------------------------------------------
@@ -796,7 +841,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		//----------------------------------------------------------------
 		if (iter == tokens.end())
 		{
-			return ST_EOF;
+			return E_ST_EOF;
 		}
 		line = (*(iter++));
 		err_line++;
@@ -807,7 +852,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		if ( !strstr(line.c_str(), "CHANNELS") )
 		{
 			strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-			return ST_NO_CHANNELS;
+			return E_ST_NO_CHANNELS;
 		}
 
 		//----------------------------------------------------------------
@@ -820,14 +865,14 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 			if (!p)
 			{
 				strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-				return ST_NO_ROTATION;
+				return E_ST_NO_ROTATION;
 			}
 
 			const char axis = *(p - 1);
 			if ((axis != 'X') && (axis != 'Y') && (axis != 'Z'))
 			{
 				strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-				return ST_NO_AXIS;
+				return E_ST_NO_AXIS;
 			}
 
 			joint->mOrder[i] = axis;
@@ -842,7 +887,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 	if ( !strstr(line.c_str(), "MOTION") )
 	{
 		strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-		return ST_NO_MOTION;
+		return E_ST_NO_MOTION;
 	}
 
 	//--------------------------------------------------------------------
@@ -850,7 +895,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 	//--------------------------------------------------------------------
 	if (iter == tokens.end())
 	{
-		return ST_EOF;
+		return E_ST_EOF;
 	}
 	line = (*(iter++));
 	err_line++;
@@ -858,13 +903,13 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 	if ( !strstr(line.c_str(), "Frames:") )
 	{
 		strncpy(error_text, line.c_str(), 127);	/*Flawfinder: ignore*/
-		return ST_NO_FRAMES;
+		return E_ST_NO_FRAMES;
 	}
 
 	if ( sscanf(line.c_str(), "Frames: %d", &mNumFrames) != 1 )
 	{
 		strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-		return ST_NO_FRAMES;
+		return E_ST_NO_FRAMES;
 	}
 
 	//--------------------------------------------------------------------
@@ -872,7 +917,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 	//--------------------------------------------------------------------
 	if (iter == tokens.end())
 	{
-		return ST_EOF;
+		return E_ST_EOF;
 	}
 	line = (*(iter++));
 	err_line++;
@@ -880,13 +925,13 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 	if ( !strstr(line.c_str(), "Frame Time:") )
 	{
 		strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-		return ST_NO_FRAME_TIME;
+		return E_ST_NO_FRAME_TIME;
 	}
 
 	if ( sscanf(line.c_str(), "Frame Time: %f", &mFrameTime) != 1 )
 	{
 		strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-		return ST_NO_FRAME_TIME;
+		return E_ST_NO_FRAME_TIME;
 	}
 
 	mDuration = (F32)mNumFrames * mFrameTime;
@@ -903,7 +948,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		// get next line
 		if (iter == tokens.end())
 		{
-			return ST_EOF;
+			return E_ST_EOF;
 		}
 		line = (*(iter++));
 		err_line++;
@@ -922,7 +967,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 				if ( sscanf(p, "%f %f %f", key.mPos, key.mPos+1, key.mPos+2) != 3 )
 				{
 					strncpy(error_text, line.c_str(), 127);	/*Flawfinder: ignore*/
-					return ST_NO_POS;
+					return E_ST_NO_POS;
 				}
 			}
 
@@ -931,19 +976,19 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 			if (!p) 
 			{
 				strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-				return ST_NO_ROT;
+				return E_ST_NO_ROT;
 			}
 			p = find_next_whitespace(++p);
 			if (!p) 
 			{
 				strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-				return ST_NO_ROT;
+				return E_ST_NO_ROT;
 			}
 			p = find_next_whitespace(++p);
 			if (!p)
 			{
 				strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-				return ST_NO_ROT;
+				return E_ST_NO_ROT;
 			}
 
 			// get 3 rot values for joint
@@ -951,7 +996,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 			if ( sscanf(p, " %f %f %f", rot, rot+1, rot+2) != 3 )
 			{
 				strncpy(error_text, line.c_str(), 127);		/*Flawfinder: ignore*/
-				return ST_NO_ROT;
+				return E_ST_NO_ROT;
 			}
 
 			p++;
@@ -962,7 +1007,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex
 		}
 	}
 
-	return ST_OK;
+	return E_ST_OK;
 }
 
 
diff --git a/indra/llcharacter/llbvhloader.h b/indra/llcharacter/llbvhloader.h
index 6937b9d835..ecdfc95478 100644
--- a/indra/llcharacter/llbvhloader.h
+++ b/indra/llcharacter/llbvhloader.h
@@ -184,6 +184,41 @@ public:
 	S32			mPriorityModifier;
 };
 
+typedef enum e_load_status
+	{
+		E_ST_OK,
+		E_ST_EOF,
+		E_ST_NO_CONSTRAINT,
+		E_ST_NO_FILE,
+		E_ST_NO_HIER,
+		E_ST_NO_JOINT,
+		E_ST_NO_NAME,
+		E_ST_NO_OFFSET,
+		E_ST_NO_CHANNELS,
+		E_ST_NO_ROTATION,
+		E_ST_NO_AXIS,
+		E_ST_NO_MOTION,
+		E_ST_NO_FRAMES,
+		E_ST_NO_FRAME_TIME,
+		E_ST_NO_POS,
+		E_ST_NO_ROT,
+		E_ST_NO_XLT_FILE,
+		E_ST_NO_XLT_HEADER,
+		E_ST_NO_XLT_NAME,
+		E_ST_NO_XLT_IGNORE,
+		E_ST_NO_XLT_RELATIVE,
+		E_ST_NO_XLT_OUTNAME,
+		E_ST_NO_XLT_MATRIX,
+		E_ST_NO_XLT_MERGECHILD,
+		E_ST_NO_XLT_MERGEPARENT,
+		E_ST_NO_XLT_PRIORITY,
+		E_ST_NO_XLT_LOOP,
+		E_ST_NO_XLT_EASEIN,
+		E_ST_NO_XLT_EASEOUT,
+		E_ST_NO_XLT_HAND,
+		E_ST_NO_XLT_EMOTE
+	} ELoadStatus;
+
 //------------------------------------------------------------------------
 // TranslationMap
 //------------------------------------------------------------------------
@@ -194,9 +229,11 @@ class LLBVHLoader
 	friend class LLKeyframeMotion;
 public:
 	// Constructor
-	LLBVHLoader(const char* buffer);
+//	LLBVHLoader(const char* buffer);
+	LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine);
 	~LLBVHLoader();
-	
+
+/*	
 	// Status Codes
 	typedef const char *Status;
 	static const char *ST_OK;
@@ -230,13 +267,13 @@ public:
 	static const char *ST_NO_XLT_EASEOUT;
 	static const char *ST_NO_XLT_HAND;
 	static const char *ST_NO_XLT_EMOTE;
-
+*/
 	// Loads the specified translation table.
-	Status loadTranslationTable(const char *fileName);
+	ELoadStatus loadTranslationTable(const char *fileName);
 
 	// Load the specified BVH file.
 	// Returns status code.
-	Status loadBVHFile(const char *buffer, char *error_text, S32 &error_line);
+	ELoadStatus loadBVHFile(const char *buffer, char *error_text, S32 &error_line);
 
 	// Applies translations to BVH data loaded.
 	void applyTranslations();
@@ -260,7 +297,7 @@ public:
 
 	BOOL isInitialized() { return mInitialized; }
 
-	Status getStatus() { return mStatus; }
+	ELoadStatus getStatus() { return mStatus; }
 
 protected:
 	// Consumes one line of input from file.
@@ -287,7 +324,7 @@ protected:
 	std::string			mEmoteName;
 
 	BOOL				mInitialized;
-	Status				mStatus;
+	ELoadStatus			mStatus;
 	// computed values
 	F32	mDuration;
 };
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index 0112788884..66c4c188ed 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -42,7 +42,7 @@
 #include "llmotioncontroller.h"
 #include "llvisualparam.h"
 #include "string_table.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llthread.h"
 
 class LLPolyMesh;
diff --git a/indra/llcharacter/lljointstate.h b/indra/llcharacter/lljointstate.h
index 16ad0e1200..e40cf2673f 100644
--- a/indra/llcharacter/lljointstate.h
+++ b/indra/llcharacter/lljointstate.h
@@ -37,7 +37,7 @@
 // Header Files
 //-----------------------------------------------------------------------------
 #include "lljoint.h"
-#include "llmemory.h"
+#include "llrefcount.h"
 
 //-----------------------------------------------------------------------------
 // class LLJointState
diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp
index 622405a5e1..c4333fc0fd 100644
--- a/indra/llcharacter/llkeyframemotionparam.cpp
+++ b/indra/llcharacter/llkeyframemotionparam.cpp
@@ -347,8 +347,11 @@ BOOL LLKeyframeMotionParam::loadMotions()
 	// Load named file by concatenating the character prefix with the motion name.
 	// Load data into a buffer to be parsed.
 	//-------------------------------------------------------------------------
-	std::string path = gDirUtilp->getExpandedFilename(LL_PATH_MOTIONS,mCharacter->getAnimationPrefix())
-		+ "_" + getName() + ".llp";
+	//std::string path = gDirUtilp->getExpandedFilename(LL_PATH_MOTIONS,mCharacter->getAnimationPrefix())
+	//	+ "_" + getName() + ".llp";
+	//RN: deprecated unused reference to "motion" directory
+	std::string path;
+
 
 	//-------------------------------------------------------------------------
 	// open the file
diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp
index 7fe21dbc93..701d6889ca 100644
--- a/indra/llcharacter/llmultigesture.cpp
+++ b/indra/llcharacter/llmultigesture.cpp
@@ -243,7 +243,7 @@ void LLMultiGesture::dump()
 //---------------------------------------------------------------------------
 LLGestureStepAnimation::LLGestureStepAnimation()
 :	LLGestureStep(),
-	mAnimName("None"),
+	mAnimName("None"), 
 	mAnimAssetID(),
 	mFlags(0x0)
 { }
@@ -292,20 +292,27 @@ BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp)
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-
-std::string LLGestureStepAnimation::getLabel() const
+// *TODO: Translate
+std::vector<std::string> LLGestureStepAnimation::getLabel() const 
 {
-	std::string label;
+	std::vector<std::string> strings;
+	
+//	std::string label;
 	if (mFlags & ANIM_FLAG_STOP)
 	{
-		label = "Stop Animation: ";
+		strings.push_back( "AnimFlagStop");
+
+//		label = "Stop Animation: ";
 	}
 	else
 	{
-		label = "Start Animation: ";
+		strings.push_back( "AnimFlagStart");
+
+//		label = "Start Animation: "; 
 	}
-	label += mAnimName;
-	return label;
+	strings.push_back( mAnimName);
+//	label += mAnimName;
+	return strings;
 }
 
 void LLGestureStepAnimation::dump()
@@ -359,12 +366,15 @@ BOOL LLGestureStepSound::deserialize(LLDataPacker& dp)
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-
-std::string LLGestureStepSound::getLabel() const
+// *TODO: Translate
+std::vector<std::string> LLGestureStepSound::getLabel() const
 {
-	std::string label("Sound: ");
-	label += mSoundName;
-	return label;
+	std::vector<std::string> strings;
+	strings.push_back( "Sound");
+	strings.push_back( mSoundName);	
+//	std::string label("Sound: ");
+//	label += mSoundName;
+	return strings;
 }
 
 void LLGestureStepSound::dump()
@@ -414,12 +424,13 @@ BOOL LLGestureStepChat::deserialize(LLDataPacker& dp)
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-
-std::string LLGestureStepChat::getLabel() const
+// *TODO: Translate
+std::vector<std::string> LLGestureStepChat::getLabel() const
 {
-	std::string label("Chat: ");
-	label += mChatText;
-	return label;
+	std::vector<std::string> strings;
+	strings.push_back("Chat");
+	strings.push_back(mChatText);
+	return strings;
 }
 
 void LLGestureStepChat::dump()
@@ -467,22 +478,27 @@ BOOL LLGestureStepWait::deserialize(LLDataPacker& dp)
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-
-std::string LLGestureStepWait::getLabel() const
+// *TODO: Translate
+std::vector<std::string> LLGestureStepWait::getLabel() const
 {
-	std::string label("--- Wait: ");
+	std::vector<std::string> strings;
+	strings.push_back( "Wait" );
+	
+//	std::string label("--- Wait: ");
 	if (mFlags & WAIT_FLAG_TIME)
 	{
 		char buffer[64];		/* Flawfinder: ignore */
 		snprintf(buffer, sizeof(buffer), "%.1f seconds", (double)mWaitSeconds);	/* Flawfinder: ignore */
-		label += buffer;
+		strings.push_back(buffer);
+//		label += buffer;
 	}
 	else if (mFlags & WAIT_FLAG_ALL_ANIM)
 	{
-		label += "until animations are done";
+		strings.push_back("until animations are done");
+	//	label += "until animations are done";
 	}
 
-	return label;
+	return strings;
 }
 
 
diff --git a/indra/llcharacter/llmultigesture.h b/indra/llcharacter/llmultigesture.h
index eb15f600ca..fdffb35c31 100644
--- a/indra/llcharacter/llmultigesture.h
+++ b/indra/llcharacter/llmultigesture.h
@@ -130,7 +130,7 @@ public:
 	virtual EStepType getType() = 0;
 
 	// Return a user-readable label for this step
-	virtual std::string getLabel() const = 0;
+	virtual std::vector<std::string> getLabel() const = 0;
 
 	virtual S32 getMaxSerialSize() const = 0;
 	virtual BOOL serialize(LLDataPacker& dp) const = 0;
@@ -152,7 +152,7 @@ public:
 
 	virtual EStepType getType() { return STEP_ANIMATION; }
 
-	virtual std::string getLabel() const;
+	virtual std::vector<std::string> getLabel() const;
 
 	virtual S32 getMaxSerialSize() const;
 	virtual BOOL serialize(LLDataPacker& dp) const;
@@ -175,7 +175,7 @@ public:
 
 	virtual EStepType getType() { return STEP_SOUND; }
 
-	virtual std::string getLabel() const;
+	virtual std::vector<std::string> getLabel() const;
 
 	virtual S32 getMaxSerialSize() const;
 	virtual BOOL serialize(LLDataPacker& dp) const;
@@ -198,7 +198,7 @@ public:
 
 	virtual EStepType getType() { return STEP_CHAT; }
 
-	virtual std::string getLabel() const;
+	virtual std::vector<std::string> getLabel() const;
 
 	virtual S32 getMaxSerialSize() const;
 	virtual BOOL serialize(LLDataPacker& dp) const;
@@ -223,7 +223,7 @@ public:
 
 	virtual EStepType getType() { return STEP_WAIT; }
 
-	virtual std::string getLabel() const;
+	virtual std::vector<std::string> getLabel() const;
 
 	virtual S32 getMaxSerialSize() const;
 	virtual BOOL serialize(LLDataPacker& dp) const;
diff --git a/indra/llcharacter/llpose.h b/indra/llcharacter/llpose.h
index 5698f21614..2b976b219d 100644
--- a/indra/llcharacter/llpose.h
+++ b/indra/llcharacter/llpose.h
@@ -36,12 +36,14 @@
 //-----------------------------------------------------------------------------
 // Header Files
 //-----------------------------------------------------------------------------
-#include <string>
 
-#include "llmap.h"
 #include "lljointstate.h"
 #include "lljoint.h"
+#include "llmap.h"
+#include "llpointer.h"
+
 #include <map>
+#include <string>
 
 
 //-----------------------------------------------------------------------------
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 3f14be6e18..c4663cc145 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -4,6 +4,7 @@ project(llcommon)
 
 include(00-Common)
 include(LLCommon)
+include(Boost)
 
 include_directories(
     ${EXPAT_INCLUDE_DIRS}
@@ -11,6 +12,11 @@ include_directories(
     ${ZLIB_INCLUDE_DIRS}
     )
 
+# add_executable(lltreeiterators lltreeiterators.cpp)
+# 
+# target_link_libraries(lltreeiterators
+#     ${LLCOMMON_LIBRARIES})
+
 set(llcommon_SOURCE_FILES
     llapp.cpp
     llapr.cpp
@@ -44,6 +50,7 @@ set(llcommon_SOURCE_FILES
     llprocessor.cpp
     llqueuedthread.cpp
     llrand.cpp
+    llrefcount.cpp
     llrun.cpp
     llsd.cpp
     llsdserialize.cpp
@@ -98,6 +105,7 @@ set(llcommon_HEADER_FILES
     lldefs.h
     lldepthstack.h
     lldlinked.h
+    lldoubledispatch.h
     lldqueueptr.h
     llendianswizzle.h
     llenum.h
@@ -119,6 +127,7 @@ set(llcommon_HEADER_FILES
     llhttpstatuscodes.h
     llindexedqueue.h
     llindraconfigfile.h
+    llinstancetracker.h
     llkeythrottle.h
     lllinkedqueue.h
     llliveappconfig.h
@@ -134,20 +143,26 @@ set(llcommon_HEADER_FILES
     llmetrics.h
     llmortician.h
     llnametable.h
+    llpointer.h
     llpreprocessor.h
     llpriqueuemap.h
     llprocessor.h
     llptrskiplist.h
     llptrskipmap.h
+    llptrto.h
     llqueuedthread.h
     llrand.h
+    llrefcount.h
     llrun.h
+    llrefcount.h
+    llsafehandle.h
     llsd.h
     llsdserialize.h
     llsdserialize_xml.h
     llsdutil.h
     llsecondlifeurls.h
     llsimplehash.h
+    llsingleton.h
     llskiplist.h
     llskipmap.h
     llstack.h
@@ -161,6 +176,7 @@ set(llcommon_HEADER_FILES
     llsys.h
     llthread.h
     lltimer.h
+    lltreeiterators.h
     lluri.h
     lluuid.h
     lluuidhashmap.h
@@ -195,4 +211,6 @@ target_link_libraries(
     ${APR_LIBRARIES}
     ${EXPAT_LIBRARIES}
     ${ZLIB_LIBRARIES}
+    ${BOOST_PROGRAM_OPTIONS_LIBRARY}
+    ${BOOST_REGEX_LIBRARY}
     )
diff --git a/indra/llcommon/is_approx_equal_fraction.h b/indra/llcommon/is_approx_equal_fraction.h
index f95b148590..d369fbc5b3 100644
--- a/indra/llcommon/is_approx_equal_fraction.h
+++ b/indra/llcommon/is_approx_equal_fraction.h
@@ -7,7 +7,30 @@
  *         making llcommon depend on llmath.
  * 
  * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
  * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
 
diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h
index f9d5877ab2..9adf24a492 100644
--- a/indra/llcommon/linden_common.h
+++ b/indra/llcommon/linden_common.h
@@ -33,6 +33,11 @@
 #ifndef LL_LINDEN_COMMON_H
 #define LL_LINDEN_COMMON_H
 
+// *NOTE:  Please keep includes here to a minimum!
+//
+// Files included here are included in every library .cpp file and
+// are not precompiled.
+
 #if defined(LL_WINDOWS) && defined(_DEBUG)
 # if _MSC_VER >= 1400 // Visual C++ 2005 or later
 #  define _CRTDBG_MAP_ALLOC
@@ -51,23 +56,22 @@
 #include <cstdio>
 #include <cstdlib>
 #include <ctime>
-#include <iostream>
-#include <fstream>
+#include <iosfwd>
 
-// Work Microsoft compiler warnings
+// Work around Microsoft compiler warnings in STL headers
 #ifdef LL_WINDOWS
 #pragma warning (disable : 4702) // unreachable code
 #pragma warning (disable : 4244) // conversion from time_t to S32
 #endif	//	LL_WINDOWS
 
-#include <algorithm>
 #include <list>
 #include <map>
 #include <vector>
 #include <string>
 
 #ifdef LL_WINDOWS
-#pragma warning (3 : 4702) // we like level 3, not 4
+// Reenable warnings we disabled above
+#pragma warning (3 : 4702) // unreachable code, we like level 3, not 4
 // level 4 warnings that we need to disable:
 #pragma warning (disable : 4100) // unreferenced formal parameter
 #pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) )
@@ -78,6 +82,7 @@
 #endif	//	LL_WINDOWS
 
 // Linden only libs in alpha-order other than stdtypes.h
+// *NOTE: Please keep includes here to a minimum, see above.
 #include "stdtypes.h"
 #include "lldefs.h"
 #include "llerror.h"
@@ -85,8 +90,5 @@
 #include "llfasttimer.h"
 #include "llfile.h"
 #include "llformat.h"
-#include "llstring.h"
-#include "llsys.h"
-#include "lltimer.h"
 
 #endif
diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp
index cf3bf89b4f..fc2ac9dcbc 100644
--- a/indra/llcommon/llassettype.cpp
+++ b/indra/llcommon/llassettype.cpp
@@ -70,6 +70,7 @@ asset_info_t asset_types[] =
 	{ LLAssetType::AT_ANIMATION, "ANIMATION" },
 	{ LLAssetType::AT_GESTURE, "GESTURE" },
 	{ LLAssetType::AT_SIMSTATE, "SIMSTATE" },
+	{ LLAssetType::AT_FAVORITE, "FAVORITE" },
 	{ LLAssetType::AT_NONE, "NONE" },
 };
 
@@ -129,7 +130,8 @@ const char* LLAssetType::mAssetTypeNames[LLAssetType::AT_COUNT] =
 	"jpeg",
 	"animatn",
 	"gesture",
-	"simstate"
+	"simstate",
+	"favorite"
 };
 
 // This table is meant for decoding to human readable form. Put any
@@ -160,6 +162,7 @@ const char* LLAssetType::mAssetTypeHumanNames[LLAssetType::AT_COUNT] =
 	"animation",
 	"gesture",
 	"simstate"
+	"favorite"
 };
 
 ///----------------------------------------------------------------------------
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index 4077b8d2c1..0ee4ae2821 100644
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -131,6 +131,9 @@ public:
 		// simstate file
 		AT_SIMSTATE = 22,
 
+		// favorite items
+		AT_FAVORITE = 23,
+
 		// +*********************************************+
 		// |  TO ADD AN ELEMENT TO THIS ENUM:            |
 		// +*********************************************+
@@ -140,7 +143,7 @@ public:
 		// | 4. ADD TO LLAssetType::mAssetTypeHumanNames |
 		// +*********************************************+
 
-		AT_COUNT = 23,
+		AT_COUNT = 24,
 
 		AT_NONE = -1
 	};
diff --git a/indra/llcommon/llboost.h b/indra/llcommon/llboost.h
index 4df9dbf3bd..f4bfc2bfa2 100644
--- a/indra/llcommon/llboost.h
+++ b/indra/llcommon/llboost.h
@@ -46,4 +46,19 @@
 */
 typedef boost::tokenizer<boost::char_separator<char> > boost_tokenizer;
 
+// Useful combiner for boost signals that retturn a vool (e.g. validation)
+//  returns false if any of the callbacks return false
+struct boost_boolean_combiner
+{
+	typedef bool result_type;
+	template<typename InputIterator>
+	bool operator()(InputIterator first, InputIterator last) const
+	{
+		bool res = true;
+		while (first != last)
+			res &= *first++;
+		return res;
+	}
+};
+
 #endif // LL_LLBOOST_H
diff --git a/indra/llcommon/llcommon.cpp b/indra/llcommon/llcommon.cpp
index 2cbb71855f..36a0018995 100644
--- a/indra/llcommon/llcommon.cpp
+++ b/indra/llcommon/llcommon.cpp
@@ -32,6 +32,8 @@
 #include "linden_common.h"
 
 #include "llcommon.h"
+
+#include "llmemory.h"
 #include "llthread.h"
 
 //static
diff --git a/indra/llcommon/llcommon.h b/indra/llcommon/llcommon.h
index 5f77988336..a1808e8a6c 100644
--- a/indra/llcommon/llcommon.h
+++ b/indra/llcommon/llcommon.h
@@ -32,9 +32,8 @@
 #ifndef LL_COMMON_H
 #define LL_COMMON_H
 
-#include "llmemory.h"
+// *TODO: remove these?
 #include "llapr.h"
-// #include "llframecallbackmanager.h"
 #include "lltimer.h"
 #include "llfile.h"
 
diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp
index 41a3af398f..7bc9e16bc9 100644
--- a/indra/llcommon/lldate.cpp
+++ b/indra/llcommon/lldate.cpp
@@ -38,10 +38,13 @@
 #include "apr_time.h"
 
 #include <time.h>
+#include <locale>
+#include <string>
 #include <iomanip>
 #include <sstream>
 
 #include "lltimer.h"
+#include "llstring.h"
 
 static const F64 DATE_EPOCH = 0.0;
 
@@ -88,45 +91,36 @@ std::string LLDate::asString() const
 //        is one of the standards used and the prefered format
 std::string LLDate::asRFC1123() const
 {
-    std::ostringstream stream;
-    toHTTPDateStream(stream);
-    return stream.str();
+	return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT"));
 }
 
-void LLDate::toHTTPDateStream(std::ostream& s) const
+std::string LLDate::toHTTPDateString (std::string fmt) const
 {
-    // http://apr.apache.org/docs/apr/0.9/group__apr__time.html
-    apr_time_t time = (apr_time_t)(mSecondsSinceEpoch * LL_APR_USEC_PER_SEC);
+	std::ostringstream stream;
+	time_t locSeconds = (time_t) mSecondsSinceEpoch;
+	struct tm * gmt = gmtime (&locSeconds);
 
-    apr_time_exp_t exp_time ; //Apache time module
+	stream.imbue (std::locale(LLStringUtil::getLocale().c_str()));
+	toHTTPDateStream (stream, gmt, fmt);
+	return stream.str();
+}
 
-    if (apr_time_exp_gmt(&exp_time, time) != APR_SUCCESS)
-    {
-        // Return Epoch UTC date
-        s << "Thursday, 01 Jan 1970 00:00:00 GMT" ;
-        return;
-    }
+std::string LLDate::toHTTPDateString (tm * gmt, std::string fmt)
+{
+	std::ostringstream stream;
+	stream.imbue (std::locale(LLStringUtil::getLocale().c_str()));
+	toHTTPDateStream (stream, gmt, fmt);
+	return stream.str();
+}
 
-    s << std::dec << std::setfill('0');
-#if( LL_WINDOWS || __GNUC__ > 2)
-    s << std::right ;
-#else
-    s.setf(ios::right);
-#endif    
-    std::string day = weekdays[exp_time.tm_wday];
-    std::string month = months[exp_time.tm_mon];
-
-    s << std::setw(day.length()) << (day)
-      << ", " << std::setw(2) << (exp_time.tm_mday)
-      << ' ' << std::setw(month.length()) << (month)
-      << ' ' << std::setw(4) << (exp_time.tm_year + 1900)
-	  << ' ' << std::setw(2) << (exp_time.tm_hour)
-	  << ':' << std::setw(2) << (exp_time.tm_min)
-	  << ':' << std::setw(2) << (exp_time.tm_sec)
-      << " GMT";
+void LLDate::toHTTPDateStream(std::ostream& s, tm * gmt, std::string fmt)
+{
+	using namespace std;
 
-    // RFC 1123 date does not use microseconds
-    //llinfos << "Date in RFC 1123 format is " << s << llendl;
+	const char * pBeg = fmt.c_str();
+	const char * pEnd = pBeg + fmt.length();
+	const time_put<char>& tp = use_facet<time_put<char> >(s.getloc());
+	tp.put (s, s, s.fill(), gmt, pBeg, pEnd);
 }
 
 void LLDate::toStream(std::ostream& s) const
diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h
index 32825b18dc..29a9030b6d 100644
--- a/indra/llcommon/lldate.h
+++ b/indra/llcommon/lldate.h
@@ -84,7 +84,9 @@ public:
 	std::string asString() const;
 	std::string asRFC1123() const;
 	void toStream(std::ostream&) const;
-	void toHTTPDateStream(std::ostream&) const;
+	std::string toHTTPDateString (std::string fmt) const;
+	static std::string toHTTPDateString (tm * gmt, std::string fmt);
+	static void toHTTPDateStream(std::ostream&, tm *, std::string);
 	/** 
 	 * @brief Set the date from an ISO-8601 string.
 	 *
diff --git a/indra/llcommon/lldoubledispatch.h b/indra/llcommon/lldoubledispatch.h
new file mode 100755
index 0000000000..60678d44fb
--- /dev/null
+++ b/indra/llcommon/lldoubledispatch.h
@@ -0,0 +1,332 @@
+/**
+ * @file   lldoubledispatch.h
+ * @author Nat Goodspeed
+ * @date   2008-11-11
+ * @brief  function calls virtual on more than one parameter
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLDOUBLEDISPATCH_H)
+#define LL_LLDOUBLEDISPATCH_H
+
+#include <list>
+#include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
+#include <boost/bind.hpp>
+#include <boost/ref.hpp>
+
+/**
+ * This class supports function calls which are virtual on the dynamic type of
+ * more than one parameter. Specifically, we address a limited but useful
+ * subset of that problem: function calls which accept two parameters, and
+ * select which particular function to call depending on the dynamic type of
+ * both.
+ * 
+ * Scott Meyers, in More Effective C++ (Item 31), talks about some of the perils
+ * and pitfalls lurking down this pathway.  He discusses and dismisses the
+ * straightforward approaches of using single-dispatch virtual functions twice,
+ * and of using a family of single-dispatch virtual functions which each examine
+ * RTTI for their other parameter.  He advocates using a registry in which you
+ * look up the actual types of both parameters (he uses the classes' string names,
+ * via typeid(param).name()) to obtain a pointer to a free (non-member) function
+ * that will accept this pair of parameters.
+ * 
+ * He does point out that his approach doesn't handle inheritance.  If you have a
+ * registry entry for SpaceShip, and you have in hand a MilitaryShip (subclass of
+ * SpaceShip) and an Asteroid, you'd like to call the function appropriate for
+ * SpaceShips and Asteroids -- but alas, his lookup fails because the class name
+ * for your MilitaryShip subclass isn't in the registry.
+ * 
+ * This class extends his idea to build a registry whose entries can examine the
+ * dynamic type of the parameter in a more flexible way -- using dynamic_cast<>
+ * -- thereby supporting inheritance relationships.
+ * 
+ * Of course we must allow for the ambiguity this permits. We choose to use a
+ * sequence container rather than a map, and require that the client code
+ * specify the order in which dispatch-table entries should be searched. The
+ * result resembles the semantics of the catch clauses for a try/catch block:
+ * you must code catch clauses in decreasing order of specificity, because if
+ * you catch ErrorBaseClass before you catch ErrorSubclass, then any
+ * ErrorSubclass exceptions thrown by the protected code will always match
+ * ErrorBaseClass, and you will never reach your catch(ErrorSubclass) clause.
+ * 
+ * So, in a similar way, if you have a specific routine to process
+ * MilitaryShip and Asteroid, you'd better place that in the table @em before
+ * your more general routine that processes SpaceShip and Asteroid, or else
+ * the MilitaryShip variant will never be called.
+ *
+ * @todo This implementation doesn't attempt to deal with
+ * <tt>const</tt>-correctness of arguments. Our container stores templated
+ * objects into which the specific parameter types have been "frozen." But to
+ * store all these in the same container, they are all instances of a base
+ * class with a virtual invocation method. Naturally the base-class virtual
+ * method definition cannot know the <tt>const</tt>-ness of the particular
+ * types with which its template subclass is instantiated.
+ *
+ * One is tempted to suggest four different virtual methods, one for each
+ * combination of @c const and non-<tt>const</tt> arguments. Then the client
+ * will select the particular virtual method that best fits the
+ * <tt>const</tt>-ness of the arguments in hand. The trouble with that idea is
+ * that in order to instantiate the subclass instance, we must compile all
+ * four of its virtual method overrides, which means we must be prepared to
+ * pass all four combinations of @c const and non-<tt>const</tt> arguments to
+ * the registered callable. That only works when the registered callable
+ * accepts both parameters as @c const.
+ *
+ * Of course the virtual method overrides could use @c const_cast to force
+ * them to compile correctly regardless of the <tt>const</tt>-ness of the
+ * registered callable's parameter declarations. But if we're going to force
+ * the issue with @c const_cast anyway, why bother with the four different
+ * virtual methods? Why not just require canonical parameter
+ * <tt>const</tt>-ness for any callables used with this mechanism?
+ *
+ * We therefore require that your callable accept both params as
+ * non-<tt>const</tt>. (This is more general than @c const: you can perform @c
+ * const operations on a non-<tt>const</tt> parameter, but you can't perform
+ * non-<tt>const</tt> operations on a @c const parameter.)
+ *
+ * For ease of use, though, our invocation method accepts both params as @c
+ * const. Again, you can pass a non-<tt>const</tt> object to a @c const param,
+ * but not the other way around. We take care of the @c const_cast for you.
+ */
+// LLDoubleDispatch is a template because we have to assume that all parameter
+// types are subclasses of some common base class -- but we don't have to
+// impose that base class on client code.  Instead, we let IT tell US the
+// common parameter base class.
+template<class ReturnType, class ParamBaseType>
+class LLDoubleDispatch
+{
+    typedef LLDoubleDispatch<ReturnType, ParamBaseType> self_type;
+
+public:
+    LLDoubleDispatch() {}
+
+    /**
+     * Call the first matching entry.  If there's no registered Functor
+     * appropriate for this pair of parameter types, this call will do
+     * @em nothing!  (If you want notification in this case, simply add a new
+     * Functor for (ParamBaseType&, ParamBaseType&) at the end of the table.
+     * The two base-class entries should match anything that isn't matched by
+     * any more specific entry.)
+     *
+     * See note in class documentation about <tt>const</tt>-correctness.
+     */
+    inline
+    ReturnType operator()(const ParamBaseType& param1, const ParamBaseType& param2) const;
+
+    // Borrow a trick from Alexandrescu:  use a Type class to "wrap" a type
+    // for purposes of passing the type itself into a template method.
+    template<typename T>
+    struct Type {};
+
+    /**
+     * Add a new Entry for a given @a Functor. As mentioned above, the order
+     * in which you add these entries is very important.
+     *
+     * If you want symmetrical entries -- that is, if a B and an A can call
+     * the same Functor as an A and a B -- then pass @c true for the last
+     * parameter, and we'll add a (B, A) entry as well as an (A, B) entry. But
+     * your @a Functor can still be written to expect exactly the pair of types
+     * you've explicitly specified, because the Entry with the reversed params
+     * will call a special thunk that swaps params before calling your @a
+     * Functor.
+     */
+    template<typename Type1, typename Type2, class Functor>
+    void add(const Type<Type1>& t1, const Type<Type2>& t2, Functor func, bool symmetrical=false)
+    {
+        insert(t1, t2, func);
+        if (symmetrical)
+        {
+            // Use boost::bind() to construct a param-swapping thunk. Don't
+            // forget to reverse the parameters too.
+            insert(t2, t1, boost::bind(func, _2, _1));
+        }
+    }
+
+    /**
+     * Add a new Entry for a given @a Functor, explicitly passing instances of
+     * the Functor's leaf param types to help us figure out where to insert.
+     * Because it can use RTTI, this add() method isn't order-sensitive like
+     * the other one.
+     *
+     * If you want symmetrical entries -- that is, if a B and an A can call
+     * the same Functor as an A and a B -- then pass @c true for the last
+     * parameter, and we'll add a (B, A) entry as well as an (A, B) entry. But
+     * your @a Functor can still be written to expect exactly the pair of types
+     * you've explicitly specified, because the Entry with the reversed params
+     * will call a special thunk that swaps params before calling your @a
+     * Functor.
+     */
+    template <typename Type1, typename Type2, class Functor>
+    void add(const Type1& prototype1, const Type2& prototype2, Functor func, bool symmetrical=false)
+    {
+        // Because we expect our caller to pass leaf param types, we can just
+        // perform an ordinary search to find the first matching iterator. If
+        // we find an existing Entry that matches both params, either the
+        // param types are the same, or the existing Entry uses the base class
+        // for one or both params, and the new Entry must precede that. Assume
+        // our client won't register two callables with exactly the SAME set
+        // of types; in that case we'll insert the new one before any earlier
+        // ones, meaning the last one registered will "win." Note that if
+        // find() doesn't find any matching Entry, it will return end(),
+        // meaning the new Entry will be last, which is fine.
+        typename DispatchTable::iterator insertion = find(prototype1, prototype2);
+        insert(Type<Type1>(), Type<Type2>(), func, insertion);
+        if (symmetrical)
+        {
+            insert(Type<Type2>(), Type<Type1>(), boost::bind(func, _2, _1), insertion);
+        }
+    }
+
+    /**
+     * Add a new Entry for a given @a Functor, specifying the Functor's leaf
+     * param types as explicit template arguments. This will instantiate
+     * temporary objects of each of these types, which requires that they have
+     * a lightweight default constructor.
+     *
+     * If you want symmetrical entries -- that is, if a B and an A can call
+     * the same Functor as an A and a B -- then pass @c true for the last
+     * parameter, and we'll add a (B, A) entry as well as an (A, B) entry. But
+     * your @a Functor can still be written to expect exactly the pair of types
+     * you've explicitly specified, because the Entry with the reversed params
+     * will call a special thunk that swaps params before calling your @a
+     * Functor.
+     */
+    template <typename Type1, typename Type2, class Functor>
+    void add(Functor func, bool symmetrical=false)
+    {
+        // This is a convenience wrapper for the add() variant taking explicit
+        // instances.
+        add(Type1(), Type2(), func, symmetrical);
+    }
+
+private:
+    /// This is the base class for each entry in our dispatch table.
+    struct EntryBase
+    {
+        virtual ~EntryBase() {}
+        virtual bool matches(const ParamBaseType& param1, const ParamBaseType& param2) const = 0;
+        virtual ReturnType operator()(ParamBaseType& param1, ParamBaseType& param2) const = 0;
+    };
+
+    /// Here's the template subclass that actually creates each entry.
+    template<typename Type1, typename Type2, class Functor>
+    class Entry: public EntryBase
+    {
+    public:
+        Entry(Functor func): mFunc(func) {}
+        /// Is this entry appropriate for these arguments?
+        virtual bool matches(const ParamBaseType& param1, const ParamBaseType& param2) const
+        {
+            return (dynamic_cast<const Type1*>(&param1) &&
+                    dynamic_cast<const Type2*>(&param2));
+        }
+        /// invocation
+        virtual ReturnType operator()(ParamBaseType& param1, ParamBaseType& param2) const
+        {
+            // We perform the downcast so callable can accept leaf param
+            // types, instead of accepting ParamBaseType and downcasting
+            // explicitly.
+            return mFunc(dynamic_cast<Type1&>(param1), dynamic_cast<Type2&>(param2));
+        }
+    private:
+        /// Bind whatever function or function object the instantiator passed.
+        Functor mFunc;
+    };
+
+    /// shared_ptr manages Entry lifespan for us
+    typedef boost::shared_ptr<EntryBase> EntryPtr;
+    /// use a @c list to make it easy to insert
+    typedef std::list<EntryPtr> DispatchTable;
+    DispatchTable mDispatch;
+
+    /// Look up the location of the first matching entry.
+    typename DispatchTable::const_iterator find(const ParamBaseType& param1, const ParamBaseType& param2) const
+    {
+        // We assert that it's safe to call the non-const find() method on a
+        // const LLDoubleDispatch instance. Cast away the const-ness of 'this'.
+        return const_cast<self_type*>(this)->find(param1, param2);
+    }
+
+    /// Look up the location of the first matching entry.
+    typename DispatchTable::iterator find(const ParamBaseType& param1, const ParamBaseType& param2)
+    {
+        return std::find_if(mDispatch.begin(), mDispatch.end(),
+                            boost::bind(&EntryBase::matches, _1,
+                                        boost::ref(param1), boost::ref(param2)));
+    }
+
+    /// Look up the first matching entry.
+    EntryPtr lookup(const ParamBaseType& param1, const ParamBaseType& param2) const
+    {
+        typename DispatchTable::const_iterator found = find(param1, param2);            
+        if (found != mDispatch.end())
+        {
+            // Dereferencing the list iterator gets us an EntryPtr
+            return *found;
+        }
+        // not found
+        return EntryPtr();
+    }
+
+    // Break out the actual insert operation so the public add() template
+    // function can avoid calling itself recursively.  See add() comments.
+    template<typename Type1, typename Type2, class Functor>
+    void insert(const Type<Type1>& param1, const Type<Type2>& param2, Functor func)
+    {
+        insert(param1, param2, func, mDispatch.end());
+    }
+
+    // Break out the actual insert operation so the public add() template
+    // function can avoid calling itself recursively.  See add() comments.
+    template<typename Type1, typename Type2, class Functor>
+    void insert(const Type<Type1>&, const Type<Type2>&, Functor func,
+                typename DispatchTable::iterator where)
+    {
+        mDispatch.insert(where, EntryPtr(new Entry<Type1, Type2, Functor>(func)));
+    }
+
+    /// Don't implement the copy ctor.  Everyone will be happier if the
+    /// LLDoubleDispatch object isn't copied.
+    LLDoubleDispatch(const LLDoubleDispatch& src);
+};
+
+template <class ReturnType, class ParamBaseType>
+ReturnType LLDoubleDispatch<ReturnType, ParamBaseType>::operator()(const ParamBaseType& param1,
+                                                                   const ParamBaseType& param2) const
+{
+    EntryPtr found = lookup(param1, param2);
+    if (found.get() == 0)
+        return ReturnType();    // bogus return value
+
+    // otherwise, call the Functor we found
+    return (*found)(const_cast<ParamBaseType&>(param1), const_cast<ParamBaseType&>(param2));
+}
+
+#endif /* ! defined(LL_LLDOUBLEDISPATCH_H) */
diff --git a/indra/llcommon/llerrorthread.cpp b/indra/llcommon/llerrorthread.cpp
index 4c779c58c8..f0e46ae78d 100644
--- a/indra/llcommon/llerrorthread.cpp
+++ b/indra/llcommon/llerrorthread.cpp
@@ -31,7 +31,9 @@
 
 #include "linden_common.h"
 #include "llerrorthread.h"
+
 #include "llapp.h"
+#include "lltimer.h"	// ms_sleep()
 
 LLErrorThread::LLErrorThread()
 	: LLThread("Error"),
diff --git a/indra/llcommon/llevent.h b/indra/llcommon/llevent.h
index 60887a060a..2b8f276df1 100644
--- a/indra/llcommon/llevent.h
+++ b/indra/llcommon/llevent.h
@@ -35,7 +35,7 @@
 #define LL_EVENT_H
 
 #include "llsd.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llthread.h"
 
 class LLEventListener;
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h
new file mode 100644
index 0000000000..11f4063a1d
--- /dev/null
+++ b/indra/llcommon/llinstancetracker.h
@@ -0,0 +1,100 @@
+/** 
+ * @file llinstancetracker.h
+ * @brief LLInstanceTracker is a mixin class that automatically tracks object
+ *        instances with or without an associated key
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ * 
+ * Copyright (c) 2000-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLINSTANCETRACKER_H
+#define LL_LLINSTANCETRACKER_H
+
+#include <map>
+
+#include "string_table.h"
+#include <boost/utility.hpp>
+
+// This mix-in class adds support for tracking all instances of the specificed class parameter T
+// The (optional) key associates a value of type KEY with a given instance of T, for quick lookup
+// If KEY is not provided, then instances are stored in a simple list
+template<typename T, typename KEY = T*>
+class LLInstanceTracker : boost::noncopyable
+{
+public:
+	typedef typename std::map<KEY, T*>::iterator instance_iter;
+	typedef typename std::map<KEY, T*>::const_iterator instance_const_iter;
+
+	static T* getInstance(const KEY& k) { instance_iter found = sInstances.find(k); return (found == sInstances.end()) ? NULL : found->second; }
+
+	static instance_iter beginInstances() { return sInstances.begin(); }
+	static instance_iter endInstances() { return sInstances.end(); }
+	static S32 instanceCount() { return sInstances.size(); }
+protected:
+	LLInstanceTracker(KEY key) { add(key); }
+	virtual ~LLInstanceTracker() { remove(); }
+	virtual void setKey(KEY key) { remove(); add(key); }
+	virtual const KEY& getKey() const { return mKey; }
+
+private:
+	void add(KEY key) 
+	{ 
+		mKey = key; 
+		sInstances[key] = static_cast<T*>(this); 
+	}
+	void remove() { sInstances.erase(mKey); }
+
+private:
+
+	KEY mKey;
+	static std::map<KEY, T*> sInstances;
+};
+
+template<typename T>
+class LLInstanceTracker<T, T*>
+{
+public:
+	typedef typename std::set<T*>::iterator instance_iter;
+	typedef typename std::set<T*>::const_iterator instance_const_iter;
+
+	static instance_iter instancesBegin() { return sInstances.begin(); }
+	static instance_iter instancesEnd() { return sInstances.end(); }
+	static S32 instanceCount() { return sInstances.size(); }
+
+protected:
+	LLInstanceTracker() { sInstances.insert(static_cast<T*>(this)); }
+	virtual ~LLInstanceTracker() { sInstances.erase(static_cast<T*>(this)); }
+
+	LLInstanceTracker(const LLInstanceTracker& other) { sInstances.insert(static_cast<T*>(this)); }
+
+	static std::set<T*> sInstances;
+};
+
+template <typename T, typename KEY> std::map<KEY, T*> LLInstanceTracker<T, KEY>::sInstances;
+template <typename T> std::set<T*> LLInstanceTracker<T, T*>::sInstances;
+
+#endif
diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp
index 14b4f9f4b0..da9cb94e13 100644
--- a/indra/llcommon/llmd5.cpp
+++ b/indra/llcommon/llmd5.cpp
@@ -83,6 +83,7 @@ documentation and/or software.
 #include "llmd5.h"
 
 #include <cassert>
+#include <iostream>		// cerr
 
 // how many bytes to grab at a time when checking files
 const int LLMD5::BLOCK_LEN = 4096;
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index a6de3d2d69..5d54cfcade 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -275,27 +275,12 @@ void operator delete[] (void *p)
 }
 
 #endif
-
-//----------------------------------------------------------------------------
-
-LLRefCount::LLRefCount() :
-	mRef(0)
-{
-}
-
-LLRefCount::~LLRefCount()
-{ 
-	if (mRef != 0)
-	{
-		llerrs << "deleting non-zero reference" << llendl;
-	}
-}
 	
 //----------------------------------------------------------------------------
 
 #if defined(LL_WINDOWS)
 
-U64 getCurrentRSS()
+U64 LLMemory::getCurrentRSS()
 {
 	HANDLE self = GetCurrentProcess();
 	PROCESS_MEMORY_COUNTERS counters;
@@ -333,7 +318,7 @@ U64 getCurrentRSS()
 // 	}
 // }
 
-U64 getCurrentRSS()
+U64 LLMemory::getCurrentRSS()
 {
 	U64 residentSize = 0;
 	task_basic_info_data_t basicInfo;
@@ -357,7 +342,7 @@ U64 getCurrentRSS()
 
 #elif defined(LL_LINUX)
 
-U64 getCurrentRSS()
+U64 LLMemory::getCurrentRSS()
 {
 	static const char statPath[] = "/proc/self/stat";
 	LLFILE *fp = LLFile::fopen(statPath, "r");
@@ -396,7 +381,7 @@ bail:
 #define _STRUCTURED_PROC 1
 #include <sys/procfs.h>
 
-U64 getCurrentRSS()
+U64 LLMemory::getCurrentRSS()
 {
 	char path [LL_MAX_PATH];	/* Flawfinder: ignore */ 
 
@@ -419,7 +404,7 @@ U64 getCurrentRSS()
 }
 #else
 
-U64 getCurrentRSS()
+U64 LLMemory::getCurrentRSS()
 {
 	return 0;
 }
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index b5c0711484..a72e58034b 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -29,444 +29,34 @@
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
-#ifndef LL_MEMORY_H
-#define LL_MEMORY_H
+#ifndef LLMEMORY_H
+#define LLMEMORY_H
 
-#include <new>
-#include <cstdlib>
 
-#include "llerror.h"
 
 extern S32 gTotalDAlloc;
 extern S32 gTotalDAUse;
 extern S32 gDACount;
 
-const U32 LLREFCOUNT_SENTINEL_VALUE = 0xAAAAAAAA;
-
-//----------------------------------------------------------------------------
-
 class LLMemory
 {
 public:
 	static void initClass();
 	static void cleanupClass();
 	static void freeReserve();
+	// Return the resident set size of the current process, in bytes.
+	// Return value is zero if not known.
+	static U64 getCurrentRSS();
 private:
 	static char* reserveMem;
 };
 
-//----------------------------------------------------------------------------
-// RefCount objects should generally only be accessed by way of LLPointer<>'s
-// NOTE: LLPointer<LLFoo> x = new LLFoo(); MAY NOT BE THREAD SAFE
-//   if LLFoo::LLFoo() does anything like put itself in an update queue.
-//   The queue may get accessed before it gets assigned to x.
-// The correct implementation is:
-//   LLPointer<LLFoo> x = new LLFoo; // constructor does not do anything interesting
-//   x->instantiate(); // does stuff like place x into an update queue
-
-// see llthread.h for LLThreadSafeRefCount
-
-//----------------------------------------------------------------------------
-
-class LLRefCount
-{
-protected:
-	LLRefCount(const LLRefCount&); // not implemented
-private:
-	LLRefCount&operator=(const LLRefCount&); // not implemented
-
-protected:
-	virtual ~LLRefCount(); // use unref()
-	
-public:
-	LLRefCount();
-
-	void ref()
-	{ 
-		mRef++; 
-	} 
-
-	S32 unref()
-	{
-		llassert(mRef >= 1);
-		if (0 == --mRef) 
-		{
-			delete this; 
-			return 0;
-		}
-		return mRef;
-	}	
-
-	S32 getNumRefs() const
-	{
-		return mRef;
-	}
-
-private: 
-	S32	mRef; 
-};
-
-//----------------------------------------------------------------------------
-
-// Note: relies on Type having ref() and unref() methods
-template <class Type> class LLPointer
-{
-public:
-
-	LLPointer() : 
-		mPointer(NULL)
-	{
-	}
-
-	LLPointer(Type* ptr) : 
-		mPointer(ptr)
-	{
-		ref();
-	}
-
-	LLPointer(const LLPointer<Type>& ptr) : 
-		mPointer(ptr.mPointer)
-	{
-		ref();
-	}
-
-	// support conversion up the type hierarchy.  See Item 45 in Effective C++, 3rd Ed.
-	template<typename Subclass>
-	LLPointer(const LLPointer<Subclass>& ptr) : 
-		mPointer(ptr.get())
-	{
-		ref();
-	}
-
-	~LLPointer()								
-	{
-		unref();
-	}
-
-	Type*	get() const							{ return mPointer; }
-	const Type*	operator->() const				{ return mPointer; }
-	Type*	operator->()						{ return mPointer; }
-	const Type&	operator*() const				{ return *mPointer; }
-	Type&	operator*()							{ return *mPointer; }
-
-	operator BOOL()  const						{ return (mPointer != NULL); }
-	operator bool()  const						{ return (mPointer != NULL); }
-	bool operator!() const						{ return (mPointer == NULL); }
-	bool isNull() const							{ return (mPointer == NULL); }
-	bool notNull() const						{ return (mPointer != NULL); }
-
-	operator Type*()       const				{ return mPointer; }
-	operator const Type*() const				{ return mPointer; }
-	bool operator !=(Type* ptr) const           { return (mPointer != ptr); 	}
-	bool operator ==(Type* ptr) const           { return (mPointer == ptr); 	}
-	bool operator ==(const LLPointer<Type>& ptr) const           { return (mPointer == ptr.mPointer); 	}
-	bool operator < (const LLPointer<Type>& ptr) const           { return (mPointer < ptr.mPointer); 	}
-	bool operator > (const LLPointer<Type>& ptr) const           { return (mPointer > ptr.mPointer); 	}
-
-	LLPointer<Type>& operator =(Type* ptr)                   
-	{ 
-		if( mPointer != ptr )
-		{
-			unref(); 
-			mPointer = ptr; 
-			ref();
-		}
-
-		return *this; 
-	}
-
-	LLPointer<Type>& operator =(const LLPointer<Type>& ptr)  
-	{ 
-		if( mPointer != ptr.mPointer )
-		{
-			unref(); 
-			mPointer = ptr.mPointer;
-			ref();
-		}
-		return *this; 
-	}
-
-	// support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
-	template<typename Subclass>
-	LLPointer<Type>& operator =(const LLPointer<Subclass>& ptr)  
-	{ 
-		if( mPointer != ptr.get() )
-		{
-			unref(); 
-			mPointer = ptr.get();
-			ref();
-		}
-		return *this; 
-	}
-	
-	// Just exchange the pointers, which will not change the reference counts.
-	static void swap(LLPointer<Type>& a, LLPointer<Type>& b)
-	{
-		Type* temp = a.mPointer;
-		a.mPointer = b.mPointer;
-		b.mPointer = temp;
-	}
-
-protected:
-	void ref()                             
-	{ 
-		if (mPointer)
-		{
-			mPointer->ref();
-		}
-	}
-
-	void unref()
-	{
-		if (mPointer)
-		{
-			Type *tempp = mPointer;
-			mPointer = NULL;
-			tempp->unref();
-			if (mPointer != NULL)
-			{
-				llwarns << "Unreference did assignment to non-NULL because of destructor" << llendl;
-				unref();
-			}
-		}
-	}
-
-protected:
-	Type*	mPointer;
-};
-
-//template <class Type> 
-//class LLPointerTraits
-//{
-//	static Type* null();
-//};
-//
-// Expands LLPointer to return a pointer to a special instance of class Type instead of NULL.
-// This is useful in instances where operations on NULL pointers are semantically safe and/or
-// when error checking occurs at a different granularity or in a different part of the code
-// than when referencing an object via a LLSafeHandle.
-// 
+// LLRefCount moved to llrefcount.h
 
-template <class Type> 
-class LLSafeHandle
-{
-public:
-	LLSafeHandle() :
-		mPointer(NULL)
-	{
-	}
-
-	LLSafeHandle(Type* ptr) : 
-		mPointer(NULL)
-	{
-		assign(ptr);
-	}
-
-	LLSafeHandle(const LLSafeHandle<Type>& ptr) : 
-		mPointer(NULL)
-	{
-		assign(ptr.mPointer);
-	}
-
-	// support conversion up the type hierarchy.  See Item 45 in Effective C++, 3rd Ed.
-	template<typename Subclass>
-	LLSafeHandle(const LLSafeHandle<Subclass>& ptr) : 
-		mPointer(NULL)
-	{
-		assign(ptr.get());
-	}
-
-	~LLSafeHandle()								
-	{
-		unref();
-	}
-
-	const Type*	operator->() const				{ return nonNull(mPointer); }
-	Type*	operator->()						{ return nonNull(mPointer); }
-
-	Type*	get() const							{ return mPointer; }
-	// we disallow these operations as they expose our null objects to direct manipulation
-	// and bypass the reference counting semantics
-	//const Type&	operator*() const			{ return *nonNull(mPointer); }
-	//Type&	operator*()							{ return *nonNull(mPointer); }
-
-	operator BOOL()  const						{ return mPointer != NULL; }
-	operator bool()  const						{ return mPointer != NULL; }
-	bool operator!() const						{ return mPointer == NULL; }
-	bool isNull() const							{ return mPointer == NULL; }
-	bool notNull() const						{ return mPointer != NULL; }
-
-
-	operator Type*()       const				{ return mPointer; }
-	operator const Type*() const				{ return mPointer; }
-	bool operator !=(Type* ptr) const           { return (mPointer != ptr); 	}
-	bool operator ==(Type* ptr) const           { return (mPointer == ptr); 	}
-	bool operator ==(const LLSafeHandle<Type>& ptr) const           { return (mPointer == ptr.mPointer); 	}
-	bool operator < (const LLSafeHandle<Type>& ptr) const           { return (mPointer < ptr.mPointer); 	}
-	bool operator > (const LLSafeHandle<Type>& ptr) const           { return (mPointer > ptr.mPointer); 	}
-
-	LLSafeHandle<Type>& operator =(Type* ptr)                   
-	{ 
-		assign(ptr);
-		return *this; 
-	}
-
-	LLSafeHandle<Type>& operator =(const LLSafeHandle<Type>& ptr)  
-	{ 
-		assign(ptr.mPointer);
-		return *this; 
-	}
-
-	// support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
-	template<typename Subclass>
-	LLSafeHandle<Type>& operator =(const LLSafeHandle<Subclass>& ptr)  
-	{ 
-		assign(ptr.get());
-		return *this; 
-	}
-
-public:
-	typedef Type* (*NullFunc)();
-	static const NullFunc sNullFunc;
-
-protected:
-	void ref()                             
-	{ 
-		if (mPointer)
-		{
-			mPointer->ref();
-		}
-	}
-
-	void unref()
-	{
-		if (mPointer)
-		{
-			Type *tempp = mPointer;
-			mPointer = NULL;
-			tempp->unref();
-			if (mPointer != NULL)
-			{
-				llwarns << "Unreference did assignment to non-NULL because of destructor" << llendl;
-				unref();
-			}
-		}
-	}
-
-	void assign(Type* ptr)
-	{
-		if( mPointer != ptr )
-		{
-			unref(); 
-			mPointer = ptr; 
-			ref();
-		}
-	}
-
-	static Type* nonNull(Type* ptr)
-	{
-		return ptr == NULL ? sNullFunc() : ptr;
-	}
-
-protected:
-	Type*	mPointer;
-};
-
-// LLInitializedPointer is just a pointer with a default constructor that initializes it to NULL
-// NOT a smart pointer like LLPointer<>
-// Useful for example in std::map<int,LLInitializedPointer<LLFoo> >
-//  (std::map uses the default constructor for creating new entries)
-template <typename T> class LLInitializedPointer
-{
-public:
-	LLInitializedPointer() : mPointer(NULL) {}
-	~LLInitializedPointer() { delete mPointer; }
-	
-	const T* operator->() const { return mPointer; }
-	T* operator->() 			{ return mPointer; }
-	const T& operator*() const 	{ return *mPointer; }
-	T& operator*() 				{ return *mPointer; }
-	operator const T*() const	{ return mPointer; }
-	operator T*()				{ return mPointer; }
-	T* operator=(T* x)				{ return (mPointer = x); }
-	operator bool() const		{ return mPointer != NULL; }
-	bool operator!() const		{ return mPointer == NULL; }
-	bool operator==(T* rhs)		{ return mPointer == rhs; }
-	bool operator==(const LLInitializedPointer<T>* rhs) { return mPointer == rhs.mPointer; }
-
-protected:
-	T* mPointer;
-};	
-
-//----------------------------------------------------------------------------
-
-// LLSingleton implements the getInstance() method part of the Singleton
-// pattern. It can't make the derived class constructors protected, though, so
-// you have to do that yourself.
-//
-// There are two ways to use LLSingleton. The first way is to inherit from it
-// while using the typename that you'd like to be static as the template
-// parameter, like so:
-//
-//   class Foo: public LLSingleton<Foo>{};
-//
-//   Foo& instance = Foo::instance();
-//
-// The second way is to use the singleton class directly, without inheritance:
-//
-//   typedef LLSingleton<Foo> FooSingleton;
-//
-//   Foo& instance = FooSingleton::instance();
-//
-// In this case, the class being managed as a singleton needs to provide an
-// initSingleton() method since the LLSingleton virtual method won't be
-// available
-//
-// As currently written, it is not thread-safe.
-template <typename T>
-class LLSingleton
-{
-public:
-	virtual ~LLSingleton() {}
-#ifdef  LL_MSVC7
-// workaround for VC7 compiler bug
-// adapted from http://www.codeproject.com/KB/tips/VC2003MeyersSingletonBug.aspx
-// our version doesn't introduce a nested struct so that you can still declare LLSingleton<MyClass>
-// a friend and hide your constructor
-	static T* getInstance()
-    {
-        LLSingleton<T> singleton;
-        return singleton.vsHack();
-    }
-
-	T* vsHack()
-#else
-	static T* getInstance()
-#endif
-	{
-		static T instance;
-		static bool needs_init = true;
-		if (needs_init)
-		{
-			needs_init = false;
-			instance.initSingleton();
-		}
-		return &instance;
-	}
-
-	static T& instance()
-	{
-		return *getInstance();
-	}
-
-private:
-	virtual void initSingleton() {}
-};
+// LLPointer moved to llpointer.h
 
-//----------------------------------------------------------------------------
+// LLSafeHandle moved to llsafehandle.h
 
-// Return the resident set size of the current process, in bytes.
-// Return value is zero if not known.
-U64 getCurrentRSS();
+// LLSingleton moved to llsingleton.h
 
 #endif
diff --git a/indra/llcommon/llmemtype.h b/indra/llcommon/llmemtype.h
index a9ebc2062f..b7cef4de4a 100644
--- a/indra/llcommon/llmemtype.h
+++ b/indra/llcommon/llmemtype.h
@@ -41,7 +41,10 @@ class LLMemType;
 extern void* ll_allocate (size_t size);
 extern void ll_release (void *p);
 
-#define MEM_TRACK_MEM 0
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// WARNING: Never commit with MEM_TRACK_MEM == 1
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+#define MEM_TRACK_MEM (0 && LL_WINDOWS)
 #define MEM_TRACK_TYPE (1 && MEM_TRACK_MEM)
 
 #if MEM_TRACK_TYPE
diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h
new file mode 100644
index 0000000000..2c37eadcc6
--- /dev/null
+++ b/indra/llcommon/llpointer.h
@@ -0,0 +1,177 @@
+/** 
+ * @file llpointer.h
+ * @brief A reference-counted pointer for objects derived from LLRefCount
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#ifndef LLPOINTER_H
+#define LLPOINTER_H
+
+#include "llerror.h"	// *TODO: consider eliminating this
+
+//----------------------------------------------------------------------------
+// RefCount objects should generally only be accessed by way of LLPointer<>'s
+// NOTE: LLPointer<LLFoo> x = new LLFoo(); MAY NOT BE THREAD SAFE
+//   if LLFoo::LLFoo() does anything like put itself in an update queue.
+//   The queue may get accessed before it gets assigned to x.
+// The correct implementation is:
+//   LLPointer<LLFoo> x = new LLFoo; // constructor does not do anything interesting
+//   x->instantiate(); // does stuff like place x into an update queue
+
+// see llthread.h for LLThreadSafeRefCount
+
+//----------------------------------------------------------------------------
+
+// Note: relies on Type having ref() and unref() methods
+template <class Type> class LLPointer
+{
+public:
+
+	LLPointer() : 
+		mPointer(NULL)
+	{
+	}
+
+	LLPointer(Type* ptr) : 
+		mPointer(ptr)
+	{
+		ref();
+	}
+
+	LLPointer(const LLPointer<Type>& ptr) : 
+		mPointer(ptr.mPointer)
+	{
+		ref();
+	}
+
+	// support conversion up the type hierarchy.  See Item 45 in Effective C++, 3rd Ed.
+	template<typename Subclass>
+	LLPointer(const LLPointer<Subclass>& ptr) : 
+		mPointer(ptr.get())
+	{
+		ref();
+	}
+
+	~LLPointer()								
+	{
+		unref();
+	}
+
+	Type*	get() const							{ return mPointer; }
+	const Type*	operator->() const				{ return mPointer; }
+	Type*	operator->()						{ return mPointer; }
+	const Type&	operator*() const				{ return *mPointer; }
+	Type&	operator*()							{ return *mPointer; }
+
+	operator BOOL()  const						{ return (mPointer != NULL); }
+	operator bool()  const						{ return (mPointer != NULL); }
+	bool operator!() const						{ return (mPointer == NULL); }
+	bool isNull() const							{ return (mPointer == NULL); }
+	bool notNull() const						{ return (mPointer != NULL); }
+
+	operator Type*()       const				{ return mPointer; }
+	operator const Type*() const				{ return mPointer; }
+	bool operator !=(Type* ptr) const           { return (mPointer != ptr); 	}
+	bool operator ==(Type* ptr) const           { return (mPointer == ptr); 	}
+	bool operator ==(const LLPointer<Type>& ptr) const           { return (mPointer == ptr.mPointer); 	}
+	bool operator < (const LLPointer<Type>& ptr) const           { return (mPointer < ptr.mPointer); 	}
+	bool operator > (const LLPointer<Type>& ptr) const           { return (mPointer > ptr.mPointer); 	}
+
+	LLPointer<Type>& operator =(Type* ptr)                   
+	{ 
+		if( mPointer != ptr )
+		{
+			unref(); 
+			mPointer = ptr; 
+			ref();
+		}
+
+		return *this; 
+	}
+
+	LLPointer<Type>& operator =(const LLPointer<Type>& ptr)  
+	{ 
+		if( mPointer != ptr.mPointer )
+		{
+			unref(); 
+			mPointer = ptr.mPointer;
+			ref();
+		}
+		return *this; 
+	}
+
+	// support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
+	template<typename Subclass>
+	LLPointer<Type>& operator =(const LLPointer<Subclass>& ptr)  
+	{ 
+		if( mPointer != ptr.get() )
+		{
+			unref(); 
+			mPointer = ptr.get();
+			ref();
+		}
+		return *this; 
+	}
+	
+	// Just exchange the pointers, which will not change the reference counts.
+	static void swap(LLPointer<Type>& a, LLPointer<Type>& b)
+	{
+		Type* temp = a.mPointer;
+		a.mPointer = b.mPointer;
+		b.mPointer = temp;
+	}
+
+protected:
+	void ref()                             
+	{ 
+		if (mPointer)
+		{
+			mPointer->ref();
+		}
+	}
+
+	void unref()
+	{
+		if (mPointer)
+		{
+			Type *tempp = mPointer;
+			mPointer = NULL;
+			tempp->unref();
+			if (mPointer != NULL)
+			{
+				llwarns << "Unreference did assignment to non-NULL because of destructor" << llendl;
+				unref();
+			}
+		}
+	}
+
+protected:
+	Type*	mPointer;
+};
+
+#endif
diff --git a/indra/llcommon/llptrto.cpp b/indra/llcommon/llptrto.cpp
new file mode 100644
index 0000000000..ce93f09489
--- /dev/null
+++ b/indra/llcommon/llptrto.cpp
@@ -0,0 +1,108 @@
+/**
+ * @file   llptrto.cpp
+ * @author Nat Goodspeed
+ * @date   2008-08-20
+ * @brief  Test for llptrto.h
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "llptrto.h"
+// STL headers
+// std headers
+// external library headers
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
+// other Linden headers
+#include "llmemory.h"
+
+// a refcounted class
+class RCFoo: public LLRefCount
+{
+public:
+    RCFoo() {}
+};
+
+// a refcounted subclass
+class RCSubFoo: public RCFoo
+{
+public:
+    RCSubFoo() {}
+};
+
+// a refcounted class using the other refcount base class
+class TSRCFoo: public LLThreadSafeRefCount
+{
+public:
+    TSRCFoo() {}
+};
+
+// a non-refcounted class
+class Bar
+{
+public:
+    Bar() {}
+};
+
+// a non-refcounted subclass
+class SubBar: public Bar
+{
+public:
+    SubBar() {}
+};
+
+int main(int argc, char *argv[])
+{
+    // test LLPtrTo<>
+    BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<RCFoo>::type, LLPointer<RCFoo> >::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<RCSubFoo>::type, LLPointer<RCSubFoo> >::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<TSRCFoo>::type, LLPointer<TSRCFoo> >::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<Bar>::type, Bar*>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<SubBar>::type, SubBar*>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<int>::type, int*>::value));
+
+    // Test LLRemovePointer<>. Note that we remove both pointer variants from
+    // each kind of type, regardless of whether the variant makes sense.
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<RCFoo*>::type, RCFoo>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<RCFoo> >::type, RCFoo>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<RCSubFoo*>::type, RCSubFoo>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<RCSubFoo> >::type, RCSubFoo>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<TSRCFoo*>::type, TSRCFoo>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<TSRCFoo> >::type, TSRCFoo>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<Bar*>::type, Bar>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<Bar> >::type, Bar>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<SubBar*>::type, SubBar>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<SubBar> >::type, SubBar>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<int*>::type, int>::value));
+    BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<int> >::type, int>::value));
+
+    return 0;
+}
diff --git a/indra/llcommon/llptrto.h b/indra/llcommon/llptrto.h
new file mode 100644
index 0000000000..74c117a7f6
--- /dev/null
+++ b/indra/llcommon/llptrto.h
@@ -0,0 +1,93 @@
+/**
+ * @file   llptrto.h
+ * @author Nat Goodspeed
+ * @date   2008-08-19
+ * @brief  LLPtrTo<TARGET> is a template helper to pick either TARGET* or -- when
+ *         TARGET is a subclass of LLRefCount or LLThreadSafeRefCount --
+ *         LLPointer<TARGET>. LLPtrTo<> chooses whichever pointer type is best.
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLPTRTO_H)
+#define LL_LLPTRTO_H
+
+#include "llpointer.h"
+#include "llrefcount.h"             // LLRefCount
+#include "llthread.h"               // LLThreadSafeRefCount
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/utility/enable_if.hpp>
+
+/**
+ * LLPtrTo<TARGET>::type is either of two things:
+ *
+ * * When TARGET is a subclass of either LLRefCount or LLThreadSafeRefCount,
+ *   LLPtrTo<TARGET>::type is LLPointer<TARGET>.
+ * * Otherwise, LLPtrTo<TARGET>::type is TARGET*.
+ *
+ * This way, a class template can use LLPtrTo<TARGET>::type to select an
+ * appropriate pointer type to store.
+ */
+template <class T, class ENABLE=void>
+struct LLPtrTo
+{
+    typedef T* type;
+};
+
+/// specialize for subclasses of LLRefCount
+template <class T>
+struct LLPtrTo<T, typename boost::enable_if< boost::is_base_of<LLRefCount, T> >::type>
+{
+    typedef LLPointer<T> type;
+};
+
+/// specialize for subclasses of LLThreadSafeRefCount
+template <class T>
+struct LLPtrTo<T, typename boost::enable_if< boost::is_base_of<LLThreadSafeRefCount, T> >::type>
+{
+    typedef LLPointer<T> type;
+};
+
+/**
+ * LLRemovePointer<PTRTYPE>::type gets you the underlying (pointee) type.
+ */
+template <typename PTRTYPE>
+struct LLRemovePointer
+{
+    typedef typename boost::remove_pointer<PTRTYPE>::type type;
+};
+
+/// specialize for LLPointer<SOMECLASS>
+template <typename SOMECLASS>
+struct LLRemovePointer< LLPointer<SOMECLASS> >
+{
+    typedef SOMECLASS type;
+};
+
+#endif /* ! defined(LL_LLPTRTO_H) */
diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp
index cd53e701d2..3db5c36545 100644
--- a/indra/llcommon/llqueuedthread.cpp
+++ b/indra/llcommon/llqueuedthread.cpp
@@ -31,7 +31,9 @@
 
 #include "linden_common.h"
 #include "llqueuedthread.h"
+
 #include "llstl.h"
+#include "lltimer.h"	// ms_sleep()
 
 //============================================================================
 
diff --git a/indra/llcommon/llrefcount.cpp b/indra/llcommon/llrefcount.cpp
new file mode 100644
index 0000000000..33b6875fb0
--- /dev/null
+++ b/indra/llcommon/llrefcount.cpp
@@ -0,0 +1,49 @@
+/** 
+ * @file llrefcount.cpp
+ * @brief Base class for reference counted objects for use with LLPointer
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#include "linden_common.h"
+
+#include "llrefcount.h"
+
+#include "llerror.h"
+
+LLRefCount::LLRefCount() :
+	mRef(0)
+{
+}
+
+LLRefCount::~LLRefCount()
+{ 
+	if (mRef != 0)
+	{
+		llerrs << "deleting non-zero reference" << llendl;
+	}
+}
diff --git a/indra/llcommon/llrefcount.h b/indra/llcommon/llrefcount.h
new file mode 100644
index 0000000000..540a18b8a0
--- /dev/null
+++ b/indra/llcommon/llrefcount.h
@@ -0,0 +1,78 @@
+/** 
+ * @file llrefcount.h
+ * @brief Base class for reference counted objects for use with LLPointer
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#ifndef LLREFCOUNT_H
+#define LLREFCOUNT_H
+
+//----------------------------------------------------------------------------
+// RefCount objects should generally only be accessed by way of LLPointer<>'s
+// see llthread.h for LLThreadSafeRefCount
+//----------------------------------------------------------------------------
+
+class LLRefCount
+{
+protected:
+	LLRefCount(const LLRefCount&); // not implemented
+private:
+	LLRefCount&operator=(const LLRefCount&); // not implemented
+
+protected:
+	virtual ~LLRefCount(); // use unref()
+	
+public:
+	LLRefCount();
+
+	void ref()
+	{ 
+		mRef++; 
+	} 
+
+	S32 unref()
+	{
+		llassert(mRef >= 1);
+		if (0 == --mRef) 
+		{
+			delete this; 
+			return 0;
+		}
+		return mRef;
+	}	
+
+	S32 getNumRefs() const
+	{
+		return mRef;
+	}
+
+private: 
+	S32	mRef; 
+};
+
+#endif
diff --git a/indra/llcommon/llsafehandle.h b/indra/llcommon/llsafehandle.h
new file mode 100644
index 0000000000..1f7c682fd1
--- /dev/null
+++ b/indra/llcommon/llsafehandle.h
@@ -0,0 +1,167 @@
+/** 
+ * @file llsafehandle.h
+ * @brief Reference-counted object where Object() is valid, not NULL.
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#ifndef LLSAFEHANDLE_H
+#define LLSAFEHANDLE_H
+
+#include "llerror.h"	// *TODO: consider eliminating this
+
+// Expands LLPointer to return a pointer to a special instance of class Type instead of NULL.
+// This is useful in instances where operations on NULL pointers are semantically safe and/or
+// when error checking occurs at a different granularity or in a different part of the code
+// than when referencing an object via a LLSafeHandle.
+
+template <class Type> 
+class LLSafeHandle
+{
+public:
+	LLSafeHandle() :
+		mPointer(NULL)
+	{
+	}
+
+	LLSafeHandle(Type* ptr) : 
+		mPointer(NULL)
+	{
+		assign(ptr);
+	}
+
+	LLSafeHandle(const LLSafeHandle<Type>& ptr) : 
+		mPointer(NULL)
+	{
+		assign(ptr.mPointer);
+	}
+
+	// support conversion up the type hierarchy.  See Item 45 in Effective C++, 3rd Ed.
+	template<typename Subclass>
+	LLSafeHandle(const LLSafeHandle<Subclass>& ptr) : 
+		mPointer(NULL)
+	{
+		assign(ptr.get());
+	}
+
+	~LLSafeHandle()								
+	{
+		unref();
+	}
+
+	const Type*	operator->() const				{ return nonNull(mPointer); }
+	Type*	operator->()						{ return nonNull(mPointer); }
+
+	Type*	get() const							{ return mPointer; }
+	// we disallow these operations as they expose our null objects to direct manipulation
+	// and bypass the reference counting semantics
+	//const Type&	operator*() const			{ return *nonNull(mPointer); }
+	//Type&	operator*()							{ return *nonNull(mPointer); }
+
+	operator BOOL()  const						{ return mPointer != NULL; }
+	operator bool()  const						{ return mPointer != NULL; }
+	bool operator!() const						{ return mPointer == NULL; }
+	bool isNull() const							{ return mPointer == NULL; }
+	bool notNull() const						{ return mPointer != NULL; }
+
+
+	operator Type*()       const				{ return mPointer; }
+	operator const Type*() const				{ return mPointer; }
+	bool operator !=(Type* ptr) const           { return (mPointer != ptr); 	}
+	bool operator ==(Type* ptr) const           { return (mPointer == ptr); 	}
+	bool operator ==(const LLSafeHandle<Type>& ptr) const           { return (mPointer == ptr.mPointer); 	}
+	bool operator < (const LLSafeHandle<Type>& ptr) const           { return (mPointer < ptr.mPointer); 	}
+	bool operator > (const LLSafeHandle<Type>& ptr) const           { return (mPointer > ptr.mPointer); 	}
+
+	LLSafeHandle<Type>& operator =(Type* ptr)                   
+	{ 
+		assign(ptr);
+		return *this; 
+	}
+
+	LLSafeHandle<Type>& operator =(const LLSafeHandle<Type>& ptr)  
+	{ 
+		assign(ptr.mPointer);
+		return *this; 
+	}
+
+	// support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
+	template<typename Subclass>
+	LLSafeHandle<Type>& operator =(const LLSafeHandle<Subclass>& ptr)  
+	{ 
+		assign(ptr.get());
+		return *this; 
+	}
+
+public:
+	typedef Type* (*NullFunc)();
+	static const NullFunc sNullFunc;
+
+protected:
+	void ref()                             
+	{ 
+		if (mPointer)
+		{
+			mPointer->ref();
+		}
+	}
+
+	void unref()
+	{
+		if (mPointer)
+		{
+			Type *tempp = mPointer;
+			mPointer = NULL;
+			tempp->unref();
+			if (mPointer != NULL)
+			{
+				llwarns << "Unreference did assignment to non-NULL because of destructor" << llendl;
+				unref();
+			}
+		}
+	}
+
+	void assign(Type* ptr)
+	{
+		if( mPointer != ptr )
+		{
+			unref(); 
+			mPointer = ptr; 
+			ref();
+		}
+	}
+
+	static Type* nonNull(Type* ptr)
+	{
+		return ptr == NULL ? sNullFunc() : ptr;
+	}
+
+protected:
+	Type*	mPointer;
+};
+
+#endif
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 7a66d70d3f..cf337be161 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -34,7 +34,7 @@
 
 #include "linden_common.h"
 #include "llsdserialize.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llstreamtools.h" // for fullread
 
 #include <iostream>
diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h
index bb38b75d8f..7463d1e5dd 100644
--- a/indra/llcommon/llsdserialize.h
+++ b/indra/llcommon/llsdserialize.h
@@ -36,8 +36,9 @@
 #define LL_LLSDSERIALIZE_H
 
 #include <iosfwd>
+#include "llpointer.h"
+#include "llrefcount.h"
 #include "llsd.h"
-#include "llmemory.h"
 
 /** 
  * @class LLSDParser
diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index aa0e0f3696..0202a033c3 100644
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
@@ -171,6 +171,15 @@ char* ll_print_sd(const LLSD& sd)
 	return buffer;
 }
 
+char* ll_pretty_print_sd_ptr(const LLSD* sd)
+{
+	if (sd)
+	{
+		return ll_pretty_print_sd(*sd);
+	}
+	return NULL;
+}
+
 char* ll_pretty_print_sd(const LLSD& sd)
 {
 	const U32 bufferSize = 10 * 1024;
diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h
index b67ad521ea..501600f1d9 100644
--- a/indra/llcommon/llsdutil.h
+++ b/indra/llcommon/llsdutil.h
@@ -89,6 +89,7 @@ LLSD ll_binary_from_string(const LLSD& sd);
 char* ll_print_sd(const LLSD& sd);
 
 // Serializes sd to static buffer and returns pointer, using "pretty printing" mode.
+char* ll_pretty_print_sd_ptr(const LLSD* sd);
 char* ll_pretty_print_sd(const LLSD& sd);
 
 //compares the structure of an LLSD to a template LLSD and stores the
diff --git a/indra/llcommon/llsecondlifeurls.cpp b/indra/llcommon/llsecondlifeurls.cpp
index 36d8e8870f..6323d9d36b 100644
--- a/indra/llcommon/llsecondlifeurls.cpp
+++ b/indra/llcommon/llsecondlifeurls.cpp
@@ -32,57 +32,59 @@
 
 #include "linden_common.h"
 #include "llsecondlifeurls.h"
-
+/*
 const std::string CREATE_ACCOUNT_URL ( 
 	"http://secondlife.com/registration/");
 
 const std::string MANAGE_ACCOUNT ( 
-	"http://secondlife.com/account/");
+	"http://secondlife.com/account/");  // *TODO: NOT USED
 
 const std::string AUCTION_URL ( 
 	"http://secondlife.com/auctions/auction-detail.php?id=");
 
 const std::string EVENTS_URL ( 
 	"http://secondlife.com/events/");
-
+*/
 const std::string TIER_UP_URL ( 
-	"http://secondlife.com/app/landtier");
+	"http://secondlife.com/app/landtier"); // *TODO: Translate (simulator)
 
+const std::string DIRECTX_9_URL ( 
+								 "http://secondlife.com/support/"); // *TODO: NOT USED
+/*
 const std::string LAND_URL ( 
-	"http://secondlife.com/app/landtier");
+	"http://secondlife.com/app/landtier"); // *TODO: NOT USED
 
 const std::string UPGRADE_TO_PREMIUM_URL (
-	"http://secondlife.com/app/upgrade/");
-
-const std::string DIRECTX_9_URL ( 
-	"http://secondlife.com/support/");
+	"http://secondlife.com/app/upgrade/"); // *TODO: NOT USED
 
 const std::string AMD_AGP_URL ( 
-	"http://secondlife.com/support/");
+	"http://secondlife.com/support/"); // *TODO: NOT USED
 
 const std::string VIA_URL ( 
-	"http://secondlife.com/support/");
+	"http://secondlife.com/support/"); // *TODO: NOT USED
 
 const std::string SUPPORT_URL ( 
     "http://secondlife.com/support/");
 
 const std::string INTEL_CHIPSET_URL ( 
-	"http://secondlife.com/support/");
+	"http://secondlife.com/support/"); // *TODO: NOT USED
 
 const std::string SIS_CHIPSET_URL ( 
-	"http://secondlife.com/support/");
+	"http://secondlife.com/support/"); // *TODO: NOT USED
 
 const std::string BLOGS_URL ( 
-	"http://blog.secondlife.com/");
+	"http://blog.secondlife.com/"); // *TODO: NOT USED
 
 const std::string BUY_CURRENCY_URL (
 	"http://secondlife.com/app/currency/");
 
 const std::string LSL_DOC_URL (
-	"http://secondlife.com/app/lsldoc/");
+	"http://secondlife.com/app/lsldoc/");  // *TODO: NOT USED
 
 const std::string SL_KB_URL (
-	"http://secondlife.com/knowledgebase/");
+	"http://secondlife.com/knowledgebase/"); // *TODO: NOT USED
 
 const std::string RELEASE_NOTES_BASE_URL (
 	"http://secondlife.com/app/releasenotes/");
+*/
+
diff --git a/indra/llcommon/llsecondlifeurls.h b/indra/llcommon/llsecondlifeurls.h
index 9fd75c363b..a2e5f0b9c6 100644
--- a/indra/llcommon/llsecondlifeurls.h
+++ b/indra/llcommon/llsecondlifeurls.h
@@ -32,7 +32,7 @@
 
 #ifndef LL_LLSECONDLIFEURLS_H
 #define LL_LLSECONDLIFEURLS_H
-
+/*
 // Account registration web page
 extern const std::string CREATE_ACCOUNT_URL;
 
@@ -42,18 +42,21 @@ extern const std::string MANAGE_ACCOUNT;
 extern const std::string AUCTION_URL; 
 
 extern const std::string EVENTS_URL;
-
+*/
 // Tier up to a new land level.
 extern const std::string TIER_UP_URL;
 
+
 // Tier up to a new land level.
 extern const std::string LAND_URL;
 
+// How to get DirectX 9
+extern const std::string DIRECTX_9_URL;
+
+/*
 // Upgrade from basic membership to premium membership
 extern const std::string UPGRADE_TO_PREMIUM_URL;
 
-// How to get DirectX 9
-extern const std::string DIRECTX_9_URL;
 
 // Out of date VIA chipset
 extern const std::string VIA_URL;
@@ -75,5 +78,5 @@ extern const std::string SL_KB_URL;
 
 // Release Notes Redirect URL for Server and Viewer
 extern const std::string RELEASE_NOTES_BASE_URL;
-
+*/
 #endif
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
new file mode 100644
index 0000000000..dc1457e4f7
--- /dev/null
+++ b/indra/llcommon/llsingleton.h
@@ -0,0 +1,158 @@
+/** 
+ * @file llsingleton.h
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#ifndef LLSINGLETON_H
+#define LLSINGLETON_H
+
+#include "llerror.h"	// *TODO: eliminate this
+
+#include <boost/noncopyable.hpp>
+
+// LLSingleton implements the getInstance() method part of the Singleton
+// pattern. It can't make the derived class constructors protected, though, so
+// you have to do that yourself.
+//
+// There are two ways to use LLSingleton. The first way is to inherit from it
+// while using the typename that you'd like to be static as the template
+// parameter, like so:
+//
+//   class Foo: public LLSingleton<Foo>{};
+//
+//   Foo& instance = Foo::instance();
+//
+// The second way is to use the singleton class directly, without inheritance:
+//
+//   typedef LLSingleton<Foo> FooSingleton;
+//
+//   Foo& instance = FooSingleton::instance();
+//
+// In this case, the class being managed as a singleton needs to provide an
+// initSingleton() method since the LLSingleton virtual method won't be
+// available
+//
+// As currently written, it is not thread-safe.
+
+template <typename DERIVED_TYPE>
+class LLSingleton : private boost::noncopyable
+{
+	
+private:
+	typedef enum e_init_state
+	{
+		UNINITIALIZED,
+		CONSTRUCTING,
+		INITIALIZING,
+		INITIALIZED,
+		DELETED
+	} EInitState;
+	
+	static void deleteSingleton()
+	{
+		delete getData().mSingletonInstance;
+		getData().mSingletonInstance = NULL;
+	}
+	
+	// stores pointer to singleton instance
+	// and tracks initialization state of singleton
+	struct SingletonInstanceData
+	{
+		EInitState		mInitState;
+		DERIVED_TYPE*	mSingletonInstance;
+		
+		SingletonInstanceData()
+		:	mSingletonInstance(NULL),
+			mInitState(UNINITIALIZED)
+		{}
+
+		~SingletonInstanceData()
+		{
+			deleteSingleton();
+		}
+	};
+	
+public:
+	virtual ~LLSingleton()
+	{
+		SingletonInstanceData& data = getData();
+		data.mSingletonInstance = NULL;
+		data.mInitState = DELETED;
+	}
+
+	static SingletonInstanceData& getData()
+	{
+		static SingletonInstanceData data;
+		return data;
+	}
+
+	static DERIVED_TYPE* getInstance()
+	{
+		SingletonInstanceData& data = getData();
+
+		if (data.mInitState == CONSTRUCTING)
+		{
+			llerrs << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from singleton constructor!" << llendl;
+		}
+
+		if (data.mInitState == DELETED)
+		{
+			llwarns << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << llendl;
+		}
+		
+		if (!data.mSingletonInstance) 
+		{
+			data.mInitState = CONSTRUCTING;
+			data.mSingletonInstance = new DERIVED_TYPE(); 
+			data.mInitState = INITIALIZING;
+			data.mSingletonInstance->initSingleton(); 
+			data.mInitState = INITIALIZED;	
+		}
+		
+		return data.mSingletonInstance;
+	}
+
+	// Reference version of getInstance()
+	// Preferred over getInstance() as it disallows checking for NULL
+	static DERIVED_TYPE& instance()
+	{
+		return *getInstance();
+	}
+
+	// Has this singleton already been deleted?
+	// Use this to avoid accessing singletons from a static object's destructor
+	static bool destroyed()
+	{
+		return getData().mInitState == DELETED;
+	}
+
+private:
+	virtual void initSingleton() {}
+};
+
+#endif
diff --git a/indra/llcommon/llstat.cpp b/indra/llcommon/llstat.cpp
index e411a1c798..eab1241b5c 100644
--- a/indra/llcommon/llstat.cpp
+++ b/indra/llcommon/llstat.cpp
@@ -46,6 +46,7 @@
 BOOL            LLPerfBlock::sStatsEnabled = FALSE;    // Flag for detailed information
 LLPerfBlock::stat_map_t    LLPerfBlock::sStatMap;    // Map full path string to LLStatTime objects, tracks all active objects
 std::string        LLPerfBlock::sCurrentStatPath = "";    // Something like "/total_time/physics/physics step"
+LLStat::stat_map_t LLStat::sStatList;
 
 //------------------------------------------------------------------------
 // Live config file to trigger stats logging
@@ -724,28 +725,48 @@ void LLPerfBlock::addStatsToLLSDandReset( LLSD & stats,
 LLTimer LLStat::sTimer;
 LLFrameTimer LLStat::sFrameTimer;
 
-LLStat::LLStat(const U32 num_bins, const BOOL use_frame_timer)
+void LLStat::init()
 {
-	llassert(num_bins > 0);
-	U32 i;
-	mUseFrameTimer = use_frame_timer;
+	llassert(mNumBins > 0);
 	mNumValues = 0;
 	mLastValue = 0.f;
 	mLastTime = 0.f;
-	mNumBins = num_bins;
 	mCurBin = (mNumBins-1);
 	mNextBin = 0;
 	mBins      = new F32[mNumBins];
 	mBeginTime = new F64[mNumBins];
 	mTime      = new F64[mNumBins];
 	mDT        = new F32[mNumBins];
-	for (i = 0; i < mNumBins; i++)
+	for (U32 i = 0; i < mNumBins; i++)
 	{
 		mBins[i]      = 0.f;
 		mBeginTime[i] = 0.0;
 		mTime[i]      = 0.0;
 		mDT[i]        = 0.f;
 	}
+
+	if (!mName.empty())
+	{
+		stat_map_t::iterator iter = sStatList.find(mName);
+		if (iter != sStatList.end())
+			llwarns << "LLStat with duplicate name: " << mName << llendl;
+		sStatList.insert(std::make_pair(mName, this));
+	}
+}
+
+LLStat::LLStat(const U32 num_bins, const BOOL use_frame_timer)
+	: mUseFrameTimer(use_frame_timer),
+	  mNumBins(num_bins)
+{
+	init();
+}
+
+LLStat::LLStat(std::string name, U32 num_bins, BOOL use_frame_timer)
+	: mUseFrameTimer(use_frame_timer),
+	  mNumBins(num_bins),
+	  mName(name)
+{
+	init();
 }
 
 LLStat::~LLStat()
@@ -754,6 +775,15 @@ LLStat::~LLStat()
 	delete[] mBeginTime;
 	delete[] mTime;
 	delete[] mDT;
+
+	if (!mName.empty())
+	{
+		// handle multiple entries with the same name
+		stat_map_t::iterator iter = sStatList.find(mName);
+		while (iter != sStatList.end() && iter->second != this)
+			++iter;
+		sStatList.erase(iter);
+	}
 }
 
 void LLStat::reset()
diff --git a/indra/llcommon/llstat.h b/indra/llcommon/llstat.h
index 61aaac45bf..bad18f46a0 100644
--- a/indra/llcommon/llstat.h
+++ b/indra/llcommon/llstat.h
@@ -258,8 +258,15 @@ private:
 // ----------------------------------------------------------------------------
 class LLStat
 {
+private:
+	typedef std::multimap<std::string, LLStat*> stat_map_t;
+	static stat_map_t sStatList;
+
+	void init();
+
 public:
-	LLStat(const U32 num_bins = 32, BOOL use_frame_timer = FALSE);
+	LLStat(U32 num_bins = 32, BOOL use_frame_timer = FALSE);
+	LLStat(std::string name, U32 num_bins = 32, BOOL use_frame_timer = FALSE);
 	~LLStat();
 
 	void reset();
@@ -322,8 +329,22 @@ private:
 	F32 *mDT;
 	S32 mCurBin;
 	S32 mNextBin;
+	
+	std::string mName;
+
 	static LLTimer sTimer;
 	static LLFrameTimer sFrameTimer;
+	
+public:
+	static LLStat* getStat(const std::string& name)
+	{
+		// return the first stat that matches 'name'
+		stat_map_t::iterator iter = sStatList.find(name);
+		if (iter != sStatList.end())
+			return iter->second;
+		else
+			return NULL;
+	}
 };
-
+	
 #endif // LL_STAT_
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index 1f653c159c..ec1718a8cb 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -71,6 +71,24 @@ U8 hex_as_nybble(char hex)
 	return 0; // uh - oh, not hex any more...
 }
 
+bool iswindividual(llwchar elem)
+{   
+	U32 cur_char = (U32)elem;
+	bool result = false;
+	if (0x2E80<= cur_char && cur_char <= 0x9FFF)
+	{
+		result = true;
+	}
+	else if (0xAC00<= cur_char && cur_char <= 0xD7A0 )
+	{
+		result = true;
+	}
+	else if (0xF900<= cur_char && cur_char <= 0xFA60 )
+	{
+		result = true;
+	}
+	return result;
+}
 
 bool _read_file_into_string(std::string& str, const std::string& filename)
 {
@@ -650,6 +668,11 @@ std::string ll_convert_wide_to_string(const wchar_t* in)
 }
 #endif // LL_WINDOWS
 
+long LLStringOps::sltOffset;
+long LLStringOps::localTimeOffset;
+bool LLStringOps::daylightSavings;
+std::map<std::string, std::string> LLStringOps::datetimeToCodes;
+
 S32	LLStringOps::collate(const llwchar* a, const llwchar* b)
 { 
 	#if LL_WINDOWS
@@ -661,6 +684,59 @@ S32	LLStringOps::collate(const llwchar* a, const llwchar* b)
 	#endif
 }
 
+void LLStringOps::setupDatetimeInfo (bool daylight)
+{
+	time_t nowT, localT, gmtT;
+	struct tm * tmpT;
+
+	nowT = time (NULL);
+
+	tmpT = localtime (&nowT);
+	localT = mktime (tmpT);
+
+	tmpT = gmtime (&nowT);
+	gmtT = mktime (tmpT);
+
+	localTimeOffset = (long) (gmtT - localT);
+
+
+	daylightSavings = daylight;
+	sltOffset = (daylightSavings? 7 : 8 ) * 60 * 60;
+
+	datetimeToCodes["wkday"]	= "%a";		// Thu
+	datetimeToCodes["weekday"]	= "%A";		// Thursday
+	datetimeToCodes["year4"]	= "%Y";		// 2009
+	datetimeToCodes["year"]		= "%Y";		// 2009
+	datetimeToCodes["year2"]	= "%y";		// 09
+	datetimeToCodes["mth"]		= "%b";		// Aug
+	datetimeToCodes["month"]	= "%B";		// August
+	datetimeToCodes["mthnum"]	= "%m";		// 08
+	datetimeToCodes["day"]		= "%d";		// 31
+	datetimeToCodes["hour24"]	= "%H";		// 14
+	datetimeToCodes["hour"]		= "%H";		// 14
+	datetimeToCodes["hour12"]	= "%I";		// 02
+	datetimeToCodes["min"]		= "%M";		// 59
+	datetimeToCodes["ampm"]		= "%p";		// AM
+	datetimeToCodes["second"]	= "%S";		// 59
+	datetimeToCodes["timezone"]	= "%Z";		// PST
+}
+
+std::string LLStringOps::getDatetimeCode (std::string key)
+{
+	std::map<std::string, std::string>::iterator iter;
+
+	iter = datetimeToCodes.find (key);
+	if (iter != datetimeToCodes.end())
+	{
+		return iter->second;
+	}
+	else
+	{
+		return std::string("");
+	}
+}
+
+
 namespace LLStringFn
 {
 	// NOTE - this restricts output to ascii
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 99a9b9e269..1aba001353 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -34,6 +34,10 @@
 #define LL_LLSTRING_H
 
 #include <string>
+#include <locale>
+#include <iomanip>
+#include <boost/regex.hpp>
+#include "llsd.h"
 
 #if LL_LINUX || LL_SOLARIS
 #include <wctype.h>
@@ -145,6 +149,12 @@ struct char_traits<U16>
 
 class LLStringOps
 {
+private:
+	static long sltOffset;
+	static long localTimeOffset;
+	static bool daylightSavings;
+	static std::map<std::string, std::string> datetimeToCodes;
+
 public:
 	static char toUpper(char elem) { return toupper((unsigned char)elem); }
 	static llwchar toUpper(llwchar elem) { return towupper(elem); }
@@ -172,6 +182,12 @@ public:
 
 	static S32	collate(const char* a, const char* b) { return strcoll(a, b); }
 	static S32	collate(const llwchar* a, const llwchar* b);
+
+	static void setupDatetimeInfo (bool daylight);
+	static long getSltOffset (void) {return sltOffset;}
+	static long getLocalTimeOffset (void) {return localTimeOffset;}
+	static bool getDaylightSavings (void) {return daylightSavings;}
+	static std::string getDatetimeCode (std::string key);
 };
 
 /**
@@ -201,6 +217,9 @@ private:
 template <class T>
 class LLStringUtilBase
 {
+private:
+	static std::string sLocale;
+
 public:
 	typedef typename std::basic_string<T>::size_type size_type;
 	
@@ -211,7 +230,14 @@ public:
 	static std::basic_string<T> null;
 	
 	typedef std::map<LLFormatMapString, LLFormatMapString> format_map_t;
+	static void getTokens (std::basic_string<T> input, std::vector<std::basic_string<T> >& tokens);
+	static void formatNumber(std::basic_string<T>& numStr, std::basic_string<T> decimals);
+	static bool formatDatetime(std::basic_string<T>& replacement, std::basic_string<T> token, std::basic_string<T> param, const LLSD& substitutions);
+	static S32 format(std::basic_string<T>& s, const LLSD& substitutions);
 	static S32 format(std::basic_string<T>& s, const format_map_t& fmt_map);
+	static bool simpleReplacement(std::basic_string<T>& replacement, std::basic_string<T> token, const LLSD& substitutions);
+	static void setLocale (std::string inLocale) {sLocale = inLocale;};
+	static std::string getLocale (void) {return sLocale;};
 	
 	static bool isValidIndex(const std::basic_string<T>& string, size_type i)
 	{
@@ -299,6 +325,7 @@ public:
 };
 
 template<class T> std::basic_string<T> LLStringUtilBase<T>::null;
+template<class T> std::string LLStringUtilBase<T>::sLocale;
 
 typedef LLStringUtilBase<char> LLStringUtil;
 typedef LLStringUtilBase<llwchar> LLWStringUtil;
@@ -360,6 +387,7 @@ U8 hex_as_nybble(char hex);
  * @return Returns true on success. If false, str is unmodified.
  */
 bool _read_file_into_string(std::string& str, const std::string& filename);
+bool iswindividual(llwchar elem);
 
 /**
  * Unicode support
@@ -546,63 +574,214 @@ namespace LLStringFn
 
 ////////////////////////////////////////////////////////////
 
-// LLStringBase::format()
-//
-// This function takes a string 's' and a map 'fmt_map' of strings-to-strings.
-// All occurances of strings in 's' from the left-hand side of 'fmt_map' are
-// then replaced with the corresponding right-hand side of 'fmt_map', non-
-// recursively.  The function returns the number of substitutions made.
+//static
+template<class T>
+void LLStringUtilBase<T>::getTokens (std::basic_string<T> input, std::vector<std::basic_string<T> >& tokens)
+{
+	const std::basic_string<T> delims (",");
+	std::basic_string<T> currToken;
+	size_type begIdx, endIdx;
+
+	begIdx = input.find_first_not_of (delims);
+	while (begIdx != std::basic_string<T>::npos)
+	{
+		endIdx = input.find_first_of (delims, begIdx);
+		if (endIdx == std::basic_string<T>::npos)
+		{
+			endIdx = input.length();
+		}
+
+		currToken = input.substr(begIdx, endIdx - begIdx);
+		trim (currToken);
+		tokens.push_back(currToken);
+		begIdx = input.find_first_not_of (delims, endIdx);
+	}
+}
 
 // static
 template<class T> 
 S32 LLStringUtilBase<T>::format(std::basic_string<T>& s, const format_map_t& fmt_map)
 {
-	typedef typename std::basic_string<T>::size_type string_size_type_t;
-	string_size_type_t scanstart = 0;
+	LLSD llsdMap;
+
+	for (format_map_t::const_iterator iter = fmt_map.begin();
+		 iter != fmt_map.end();
+		 ++iter)
+	{
+		llsdMap[iter->first] = iter->second;
+	}
+
+	return format (s, llsdMap);
+}
+
+//static
+template<class T>
+S32 LLStringUtilBase<T>::format(std::basic_string<T>& s, const LLSD& substitutions)
+{
 	S32 res = 0;
 
-	// Look for the first match of any keyword, replace that keyword,
-	// repeat from the end of the replacement string.  This avoids
-	// accidentally performing substitution on a substituted string.
-	while (1)
+	if (!substitutions.isMap()) 
+	{
+		return res;
+	}
+
+	std::basic_ostringstream<T> output;
+	// match strings like [NAME,number,3]
+	const boost::regex key("\\[((\\s)*([0-9_A-Za-z]+)((\\s)*,(\\s)*[0-9_A-Za-z\\s]*){0,2}(\\s)*)]");
+
+
+	typename std::basic_string<T>::const_iterator start = s.begin();
+	typename std::basic_string<T>::const_iterator end = s.end();
+	boost::smatch match;
+	
+
+	while (boost::regex_search(start, end, match, key, boost::match_default))
 	{
-		string_size_type_t first_match_pos = scanstart;
-		string_size_type_t first_match_str_length = 0;
-		std::basic_string<T> first_match_str_replacement;
+		bool found_replacement = false;
+		std::vector<std::basic_string<T> > tokens;
+		std::basic_string<T> replacement;
 
-		for (format_map_t::const_iterator iter = fmt_map.begin();
-		     iter != fmt_map.end();
-		     ++iter)
+		getTokens (std::basic_string<T>(match[1].first, match[1].second), tokens);
+
+		if (tokens.size() == 1)
 		{
-			string_size_type_t n = s.find(iter->first, scanstart);
-			if (n != std::basic_string<T>::npos &&
-			    (n < first_match_pos ||
-			     0 == first_match_str_length))
-			{
-				first_match_pos = n;
-				first_match_str_length = iter->first.length();
-				first_match_str_replacement = iter->second;
-			}
+			found_replacement = simpleReplacement (replacement, tokens[0], substitutions);
 		}
+		else if (tokens[1] == "number")
+		{
+			std::basic_string<T> param = "0";
 
-		if (0 == first_match_str_length)
+			if (tokens.size() > 2) param = tokens[2];
+			found_replacement = simpleReplacement (replacement, tokens[0], substitutions);
+			if (found_replacement) formatNumber (replacement, param);
+		}
+		else if (tokens[1] == "datetime")
 		{
-			// no more keys found to substitute from this point
-			// in the string forward.
-			break;
+			std::basic_string<T> param;
+			if (tokens.size() > 2) param = tokens[2];
+
+			found_replacement = formatDatetime (replacement, tokens[0], param, substitutions);
+		}
+
+		if (found_replacement)
+		{
+			output << std::basic_string<T>(start, match[0].first) << replacement;
+			res++;
 		}
 		else
 		{
-			s.erase(first_match_pos, first_match_str_length);
-			s.insert(first_match_pos, first_match_str_replacement);
-			scanstart = first_match_pos +
-				first_match_str_replacement.length();
-			++res;
+			// we had no replacement, so leave the string we searched for so that it gets noticed by QA
+			// "hello [NAME_NOT_FOUND]" is output
+			output << std::basic_string<T>(start, match[0].second);
 		}
+		
+		// update search position 
+		start = match[0].second; 
 	}
+	// send the remainder of the string (with no further matches for bracketed names)
+	output << std::basic_string<T>(start, end);
+	s = output.str();
 	return res;
 }
 
+// static
+template<class T>
+bool LLStringUtilBase<T>::simpleReplacement(std::basic_string<T> &replacement, std::basic_string<T> token, const LLSD &substitutions)
+{
+	// see if we have a replacement for the bracketed string (without the brackets)
+	// test first using has() because if we just look up with operator[] we get back an
+	// empty string even if the value is missing. We want to distinguish between 
+	// missing replacements and deliberately empty replacement strings.
+	if (substitutions.has(token))
+	{
+		replacement = substitutions[token].asString();
+		return true;
+	}
+	// if not, see if there's one WITH brackets
+	else if (substitutions.has(std::basic_string<T>("[" + token + "]")))
+	{
+		replacement = substitutions[std::basic_string<T>("[" + token + "]")].asString();
+		return true;
+	}
+
+	return false;
+}
+
+// static
+template<class T>
+void LLStringUtilBase<T>::formatNumber(std::basic_string<T>& numStr, std::basic_string<T> decimals)
+{
+	typedef typename std::basic_string<T>::size_type string_size_type_t;
+	std::basic_stringstream<T> strStream;
+	S32 intDecimals = 0;
+
+	convertToS32 (decimals, intDecimals);
+	if (!sLocale.empty())
+	{
+		strStream.imbue (std::locale(sLocale.c_str()));
+	}
+
+	if (!intDecimals)
+	{
+		S32 intStr;
+
+		if (convertToS32(numStr, intStr))
+		{
+			strStream << intStr;
+			numStr = strStream.str();
+		}
+	}
+	else
+	{
+		F32 floatStr;
+
+		if (convertToF32(numStr, floatStr))
+		{
+			strStream << std::fixed << std::showpoint << std::setprecision(intDecimals) << floatStr;
+			numStr = strStream.str();
+		}
+	}
+}
+
+// static
+template<class T>
+bool LLStringUtilBase<T>::formatDatetime(std::basic_string<T>& replacement, std::basic_string<T> token,
+										 std::basic_string<T> param, const LLSD& substitutions)
+{
+	S32 secFromEpoch = (long) substitutions["datetime"].asInteger();
+
+	if (param == "local")
+	{
+		secFromEpoch -= LLStringOps::getLocalTimeOffset();
+	}
+	else if (param != "utc")
+	{
+		secFromEpoch -= LLStringOps::getSltOffset();
+	}
+
+	if (secFromEpoch < 0) secFromEpoch = 0;
+
+	LLDate * datetime = new LLDate((F64)secFromEpoch);
+	std::string code = LLStringOps::getDatetimeCode (token);
+
+	// special case to handle timezone
+	if (code == "%Z") {
+		if (param == "utc") replacement = "GMT";
+		else if (param != "local") replacement = LLStringOps::getDaylightSavings()? "PDT" : "PST";
+		return true;
+	}
+
+	replacement = datetime->toHTTPDateString(code);
+	if (code.empty())
+	{
+		return false;
+	}
+	else
+	{
+		return true;
+	}
+}
+
 // static
 template<class T> 
 S32 LLStringUtilBase<T>::compareStrings(const T* lhs, const T* rhs)
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index c8c9fd4eec..f25339f48d 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -35,7 +35,6 @@
 
 #include "llapr.h"
 #include "llapp.h"
-#include "llmemory.h"
 
 #include "apr_thread_cond.h"
 
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index fa6efaf38e..f8066d56ed 100644
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -561,32 +561,27 @@ void secondsToTimecodeString(F32 current_time, std::string& tcstring)
 //
 //////////////////////////////////////////////////////////////////////////////
 
-std::list<LLEventTimer*> LLEventTimer::sActiveList;
-
 LLEventTimer::LLEventTimer(F32 period)
 : mEventTimer()
 {
 	mPeriod = period;
-	sActiveList.push_back(this);
 }
 
 LLEventTimer::LLEventTimer(const LLDate& time)
 : mEventTimer()
 {
 	mPeriod = (F32)(time.secondsSinceEpoch() - LLDate::now().secondsSinceEpoch());
-	sActiveList.push_back(this);
 }
 
 
-LLEventTimer::~LLEventTimer() 
+LLEventTimer::~LLEventTimer()
 {
-	sActiveList.remove(this);
 }
 
 void LLEventTimer::updateClass() 
 {
 	std::list<LLEventTimer*> completed_timers;
-	for (std::list<LLEventTimer*>::iterator iter = sActiveList.begin(); iter != sActiveList.end(); ) 
+	for (instance_iter iter = instancesBegin(); iter != instancesEnd(); ) 
 	{
 		LLEventTimer* timer = *iter++;
 		F32 et = timer->mEventTimer.getElapsedTimeF32();
diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h
index e2cf1c7689..0319bec45b 100644
--- a/indra/llcommon/lltimer.h
+++ b/indra/llcommon/lltimer.h
@@ -40,6 +40,7 @@
 
 #include "stdtypes.h"
 #include "lldate.h"
+#include "llinstancetracker.h"
 
 #include <string>
 #include <list>
@@ -171,13 +172,13 @@ void microsecondsToTimecodeString(U64 current_time, std::string& tcstring);
 void secondsToTimecodeString(F32 current_time, std::string& tcstring);
 
 // class for scheduling a function to be called at a given frequency (approximate, inprecise)
-class LLEventTimer 
+class LLEventTimer : protected LLInstanceTracker<LLEventTimer>
 {
 public:
 	LLEventTimer(F32 period);	// period is the amount of time between each call to tick() in seconds
 	LLEventTimer(const LLDate& time);
 	virtual ~LLEventTimer();
-
+	
 	//function to be called at the supplied frequency
 	// Normally return FALSE; TRUE will delete the timer after the function returns.
 	virtual BOOL tick() = 0;
@@ -187,10 +188,6 @@ public:
 protected:
 	LLTimer mEventTimer;
 	F32 mPeriod;
-
-private:
-	//list of active timers
-	static std::list<LLEventTimer*> sActiveList; // TODO should this be a vector
 };
 
 #endif
diff --git a/indra/llcommon/lltreeiterators.h b/indra/llcommon/lltreeiterators.h
new file mode 100644
index 0000000000..7ab94b0e6d
--- /dev/null
+++ b/indra/llcommon/lltreeiterators.h
@@ -0,0 +1,691 @@
+/**
+ * @file   lltreeiterators.h
+ * @author Nat Goodspeed
+ * @date   2008-08-19
+ * @brief  This file defines iterators useful for traversing arbitrary node
+ *         classes, potentially polymorphic, linked into strict tree
+ *         structures.
+ *
+ *         Dereferencing any one of these iterators actually yields a @em
+ *         pointer to the node in question. For example, given an
+ *         LLLinkedIter<MyNode> <tt>li</tt>, <tt>*li</tt> gets you a pointer
+ *         to MyNode, and <tt>**li</tt> gets you the MyNode instance itself.
+ *         More commonly, instead of writing <tt>li->member</tt>, you write
+ *         <tt>(*li)->member</tt> -- as you would if you were traversing an
+ *         STL container of MyNode pointers.
+ *
+ *         It would certainly be possible to build these iterators so that
+ *         <tt>*iterator</tt> would return a reference to the node itself
+ *         rather than a pointer to the node, and for many purposes it would
+ *         even be more convenient. However, that would be insufficiently
+ *         flexible. If you want to use an iterator range to (e.g.) initialize
+ *         a std::vector collecting results -- you rarely want to actually @em
+ *         copy the nodes in question. You're much more likely to want to copy
+ *         <i>pointers to</i> the traversed nodes. Hence these iterators
+ *         produce pointers.
+ *
+ *         Though you specify the actual NODE class as the template parameter,
+ *         these iterators internally use LLPtrTo<> to discover whether to
+ *         store and return an LLPointer<NODE> or a simple NODE*.
+ *
+ *         By strict tree structures, we mean that each child must have
+ *         exactly one parent. This forbids a child claiming any ancestor as a
+ *         child of its own. Child nodes with multiple parents will be visited
+ *         once for each parent. Cycles in the graph will result in either an
+ *         infinite loop or an out-of-memory crash. You Have Been Warned.
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLTREEITERATORS_H)
+#define LL_LLTREEITERATORS_H
+
+#include "llptrto.h"
+#include <vector>
+#include <deque>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/function.hpp>
+#include <boost/static_assert.hpp>
+
+namespace LLTreeIter
+{
+    /// Discriminator between LLTreeUpIter and LLTreeDownIter
+    enum RootIter { UP, DOWN };
+    /// Discriminator between LLTreeDFSIter, LLTreeDFSPostIter and LLTreeBFSIter
+    enum WalkIter { DFS_PRE, DFS_POST, BFS };
+}
+
+/**
+ * LLBaseIter defines some machinery common to all these iterators. We use
+ * boost::iterator_facade to define the iterator boilerplate: the conventional
+ * operators and methods necessary to implement a standards-conforming
+ * iterator. That allows us to specify the actual iterator semantics in terms
+ * of equal(), dereference() and increment() methods.
+ */
+template <class SELFTYPE, class NODE>
+class LLBaseIter: public boost::iterator_facade<SELFTYPE,
+                                                // use pointer type as the
+                                                // reference type
+                                                typename LLPtrTo<NODE>::type,
+                                                boost::forward_traversal_tag>
+{
+protected:
+    /// LLPtrTo<NODE>::type is either NODE* or LLPointer<NODE>, as appropriate
+    typedef typename LLPtrTo<NODE>::type ptr_type;
+    /// function that advances from this node to next accepts a node pointer
+    /// and returns another
+    typedef boost::function<ptr_type(const ptr_type&)> func_type;
+    typedef SELFTYPE self_type;
+};
+
+/// Functor returning NULL, suitable for an end-iterator's 'next' functor
+template <class NODE>
+typename LLPtrTo<NODE>::type LLNullNextFunctor(const typename LLPtrTo<NODE>::type&)
+{
+    return typename LLPtrTo<NODE>::type();
+}
+
+/**
+ * LLLinkedIter is an iterator over an intrusive singly-linked list. The
+ * beginning of the list is represented by LLLinkedIter(list head); the end is
+ * represented by LLLinkedIter().
+ *
+ * The begin LLLinkedIter must be instantiated with a functor to extract the
+ * 'next' pointer from the current node. Supposing that the link pointer is @c
+ * public, something like:
+ *
+ * @code
+ * NODE* mNext;
+ * @endcode
+ *
+ * you can use (e.g.) <tt>boost::bind(&NODE::mNext, _1)</tt> for the purpose.
+ * Alternatively, you can bind whatever accessor method is normally used to
+ * advance to the next node, e.g. for:
+ *
+ * @code
+ * NODE* next() const;
+ * @endcode
+ *
+ * you can use <tt>boost::bind(&NODE::next, _1)</tt>.
+ */
+template <class NODE>
+class LLLinkedIter: public LLBaseIter<LLLinkedIter<NODE>, NODE>
+{
+    typedef LLBaseIter<LLLinkedIter<NODE>, NODE> super;
+protected:
+    /// some methods need to return a reference to self
+    typedef typename super::self_type self_type;
+    typedef typename super::ptr_type ptr_type;
+    typedef typename super::func_type func_type;
+public:
+    /// Instantiate an LLLinkedIter to start a range, or to end a range before
+    /// a particular list entry. Pass a functor to extract the 'next' pointer
+    /// from the current node.
+    LLLinkedIter(const ptr_type& entry, const func_type& nextfunc):
+        mCurrent(entry),
+        mNextFunc(nextfunc)
+    {}
+    /// Instantiate an LLLinkedIter to end a range at the end of the list
+    LLLinkedIter():
+        mCurrent(),
+        mNextFunc(LLNullNextFunctor<NODE>)
+    {}
+
+private:
+    /// leverage boost::iterator_facade
+    friend class boost::iterator_core_access;
+
+    /// advance
+    void increment()
+    {
+        mCurrent = mNextFunc(mCurrent);
+    }
+    /// equality
+    bool equal(const self_type& that) const { return this->mCurrent == that.mCurrent; }
+    /// dereference
+    ptr_type& dereference() const { return const_cast<ptr_type&>(mCurrent); }
+
+    ptr_type mCurrent;
+    func_type mNextFunc;
+};
+
+/**
+ * LLTreeUpIter walks from the node in hand to the root of the tree. The term
+ * "up" is applied to a tree visualized with the root at the top.
+ *
+ * LLTreeUpIter is an alias for LLLinkedIter, since any linked tree that you
+ * can navigate that way at all contains parent pointers.
+ */
+template <class NODE>
+class LLTreeUpIter: public LLLinkedIter<NODE>
+{
+    typedef LLLinkedIter<NODE> super;
+public:
+    /// Instantiate an LLTreeUpIter to start from a particular tree node, or
+    /// to end a parent traversal before reaching a particular ancestor. Pass
+    /// a functor to extract the 'parent' pointer from the current node.
+    LLTreeUpIter(const typename super::ptr_type& node,
+                 const typename super::func_type& parentfunc):
+        super(node, parentfunc)
+    {}
+    /// Instantiate an LLTreeUpIter to end a range at the root of the tree
+    LLTreeUpIter():
+        super()
+    {}
+};
+
+/**
+ * LLTreeDownIter walks from the root of the tree to the node in hand. The
+ * term "down" is applied to a tree visualized with the root at the top.
+ *
+ * Though you instantiate the begin() LLTreeDownIter with a pointer to some
+ * node at an arbitrary location in the tree, the root will be the first node
+ * you dereference and the passed node will be the last node you dereference.
+ *
+ * On construction, LLTreeDownIter walks from the current node to the root,
+ * capturing the path. Then in use, it replays that walk in reverse. As with
+ * all traversals of interesting data structures, it is actively dangerous to
+ * modify the tree during an LLTreeDownIter walk.
+ */
+template <class NODE>
+class LLTreeDownIter: public LLBaseIter<LLTreeDownIter<NODE>, NODE>
+{
+    typedef LLBaseIter<LLTreeDownIter<NODE>, NODE> super;
+    typedef typename super::self_type self_type;
+protected:
+    typedef typename super::ptr_type ptr_type;
+    typedef typename super::func_type func_type;
+private:
+    typedef std::vector<ptr_type> list_type;
+public:
+    /// Instantiate an LLTreeDownIter to end at a particular tree node. Pass a
+    /// functor to extract the 'parent' pointer from the current node.
+    LLTreeDownIter(const ptr_type& node,
+                   const func_type& parentfunc)
+    {
+        for (ptr_type n = node; n; n = parentfunc(n))
+            mParents.push_back(n);
+    }
+    /// Instantiate an LLTreeDownIter representing "here", the end of the loop
+    LLTreeDownIter() {}
+
+private:
+    /// leverage boost::iterator_facade
+    friend class boost::iterator_core_access;
+
+    /// advance
+    void increment()
+    {
+        mParents.pop_back();
+    }
+    /// equality
+    bool equal(const self_type& that) const { return this->mParents == that.mParents; }
+    /// implement dereference/indirection operators
+    ptr_type& dereference() const { return const_cast<ptr_type&>(mParents.back()); }
+
+    list_type mParents;
+};
+
+/**
+ * When you want to select between LLTreeUpIter and LLTreeDownIter with a
+ * compile-time discriminator, use LLTreeRootIter with an LLTreeIter::RootIter
+ * template arg.
+ */
+template <LLTreeIter::RootIter DISCRIM, class NODE>
+class LLTreeRootIter
+{
+    enum { use_a_valid_LLTreeIter_RootIter_value = false };
+public:
+    /// Bogus constructors for default (unrecognized discriminator) case
+    template <typename TYPE1, typename TYPE2>
+    LLTreeRootIter(TYPE1, TYPE2)
+    {
+        BOOST_STATIC_ASSERT(use_a_valid_LLTreeIter_RootIter_value);
+    }
+    LLTreeRootIter()
+    {
+        BOOST_STATIC_ASSERT(use_a_valid_LLTreeIter_RootIter_value);
+    }
+};
+
+/// Specialize for LLTreeIter::UP
+template <class NODE>
+class LLTreeRootIter<LLTreeIter::UP, NODE>: public LLTreeUpIter<NODE>
+{
+    typedef LLTreeUpIter<NODE> super;
+public:
+    /// forward begin ctor
+    LLTreeRootIter(const typename super::ptr_type& node,
+                   const typename super::func_type& parentfunc):
+        super(node, parentfunc)
+    {}
+    /// forward end ctor
+    LLTreeRootIter():
+        super()
+    {}
+};
+
+/// Specialize for LLTreeIter::DOWN
+template <class NODE>
+class LLTreeRootIter<LLTreeIter::DOWN, NODE>: public LLTreeDownIter<NODE>
+{
+    typedef LLTreeDownIter<NODE> super;
+public:
+    /// forward begin ctor
+    LLTreeRootIter(const typename super::ptr_type& node,
+                   const typename super::func_type& parentfunc):
+        super(node, parentfunc)
+    {}
+    /// forward end ctor
+    LLTreeRootIter():
+        super()
+    {}
+};
+
+/**
+ * Instantiated with a tree node, typically the root, LLTreeDFSIter "flattens"
+ * a depth-first tree walk through that node and all its descendants.
+ *
+ * The begin() LLTreeDFSIter must be instantiated with functors to obtain from
+ * a given node begin() and end() iterators for that node's children. For this
+ * reason, you must specify the type of the node's child iterator as an
+ * additional template parameter.
+ *
+ * Specifically, the begin functor must return an iterator whose dereferenced
+ * value is a @em pointer to a child tree node. For instance, if each node
+ * tracks its children in an STL container of node* pointers, you can simply
+ * return that container's begin() iterator.
+ *
+ * Alternatively, if a node tracks its children with a classic linked list,
+ * write a functor returning LLLinkedIter<NODE>.
+ *
+ * The end() LLTreeDFSIter must, of course, match the begin() iterator's
+ * template parameters, but is constructed without runtime parameters.
+ */
+template <class NODE, typename CHILDITER>
+class LLTreeDFSIter: public LLBaseIter<LLTreeDFSIter<NODE, CHILDITER>, NODE>
+{
+    typedef LLBaseIter<LLTreeDFSIter<NODE, CHILDITER>, NODE> super;
+    typedef typename super::self_type self_type;
+protected:
+    typedef typename super::ptr_type ptr_type;
+    // The func_type is different for this: from a NODE pointer, we must
+    // obtain a CHILDITER.
+    typedef boost::function<CHILDITER(const ptr_type&)> func_type;
+private:
+    typedef std::vector<ptr_type> list_type;
+public:
+    /// Instantiate an LLTreeDFSIter to start a depth-first walk. Pass
+    /// functors to extract the 'child begin' and 'child end' iterators from
+    /// each node.
+    LLTreeDFSIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc):
+        mBeginFunc(beginfunc),
+        mEndFunc(endfunc),
+		mSkipChildren(false)
+    {
+        // Only push back this node if it's non-NULL!
+        if (node)
+            mPending.push_back(node);
+    }
+    /// Instantiate an LLTreeDFSIter to mark the end of the walk
+    LLTreeDFSIter() {}
+
+	/// flags iterator logic to skip traversing children of current node on next increment
+	void skipChildren(bool skip = true) { mSkipChildren = skip; }
+
+private:
+    /// leverage boost::iterator_facade
+    friend class boost::iterator_core_access;
+
+    /// advance
+    /// This implementation is due to http://en.wikipedia.org/wiki/Depth-first_search
+    void increment()
+    {
+        // Capture the node we were just looking at
+        ptr_type current = mPending.back();
+        // Remove it from mPending so we don't process it again later
+        mPending.pop_back();
+		if (!mSkipChildren)
+		{
+			// Add all its children to mPending
+			addChildren(current);
+		}
+		// reset flag after each step
+		mSkipChildren = false;
+    }
+    /// equality
+    bool equal(const self_type& that) const { return this->mPending == that.mPending; }
+    /// implement dereference/indirection operators
+    ptr_type& dereference() const { return const_cast<ptr_type&>(mPending.back()); }
+
+    /// Add the direct children of the specified node to mPending
+    void addChildren(const ptr_type& node)
+    {
+        // If we just use push_back() for each child in turn, we'll end up
+        // processing children in reverse order. We don't want to assume
+        // CHILDITER is reversible: some of the linked trees we'll be
+        // processing manage their children using singly-linked lists. So
+        // figure out how many children there are, grow mPending by that size
+        // and reverse-copy the children into the new space.
+        CHILDITER chi = mBeginFunc(node), chend = mEndFunc(node);
+        // grow mPending by the number of children
+        mPending.resize(mPending.size() + std::distance(chi, chend));
+        // reverse-copy the children into the newly-expanded space
+        std::copy(chi, chend, mPending.rbegin());
+    }
+
+    /// list of the nodes yet to be processed
+    list_type mPending;
+    /// functor to extract begin() child iterator
+    func_type mBeginFunc;
+    /// functor to extract end() child iterator
+    func_type mEndFunc;
+	/// flag which controls traversal of children (skip children of current node if true)
+	bool	mSkipChildren;
+};
+
+/**
+ * Instantiated with a tree node, typically the root, LLTreeDFSPostIter
+ * "flattens" a depth-first tree walk through that node and all its
+ * descendants. Whereas LLTreeDFSIter visits each node before visiting any of
+ * its children, LLTreeDFSPostIter visits all of a node's children before
+ * visiting the node itself.
+ *
+ * The begin() LLTreeDFSPostIter must be instantiated with functors to obtain
+ * from a given node begin() and end() iterators for that node's children. For
+ * this reason, you must specify the type of the node's child iterator as an
+ * additional template parameter.
+ *
+ * Specifically, the begin functor must return an iterator whose dereferenced
+ * value is a @em pointer to a child tree node. For instance, if each node
+ * tracks its children in an STL container of node* pointers, you can simply
+ * return that container's begin() iterator.
+ *
+ * Alternatively, if a node tracks its children with a classic linked list,
+ * write a functor returning LLLinkedIter<NODE>.
+ *
+ * The end() LLTreeDFSPostIter must, of course, match the begin() iterator's
+ * template parameters, but is constructed without runtime parameters.
+ */
+template <class NODE, typename CHILDITER>
+class LLTreeDFSPostIter: public LLBaseIter<LLTreeDFSPostIter<NODE, CHILDITER>, NODE>
+{
+    typedef LLBaseIter<LLTreeDFSPostIter<NODE, CHILDITER>, NODE> super;
+    typedef typename super::self_type self_type;
+protected:
+    typedef typename super::ptr_type ptr_type;
+    // The func_type is different for this: from a NODE pointer, we must
+    // obtain a CHILDITER.
+    typedef boost::function<CHILDITER(const ptr_type&)> func_type;
+private:
+    // Upon reaching a given node in our pending list, we need to know whether
+    // we've already pushed that node's children, so we must associate a bool
+    // with each node pointer.
+    typedef std::vector< std::pair<ptr_type, bool> > list_type;
+public:
+    /// Instantiate an LLTreeDFSPostIter to start a depth-first walk. Pass
+    /// functors to extract the 'child begin' and 'child end' iterators from
+    /// each node.
+    LLTreeDFSPostIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc):
+        mBeginFunc(beginfunc),
+        mEndFunc(endfunc)
+    {
+        if (! node)
+            return;
+        mPending.push_back(typename list_type::value_type(node, false));
+        makeCurrent();
+    }
+    /// Instantiate an LLTreeDFSPostIter to mark the end of the walk
+    LLTreeDFSPostIter() {}
+
+private:
+    /// leverage boost::iterator_facade
+    friend class boost::iterator_core_access;
+
+    /// advance
+    /// This implementation is due to http://en.wikipedia.org/wiki/Depth-first_search
+    void increment()
+    {
+        // Pop the previous current node
+        mPending.pop_back();
+        makeCurrent();
+    }
+    /// equality
+    bool equal(const self_type& that) const { return this->mPending == that.mPending; }
+    /// implement dereference/indirection operators
+    ptr_type& dereference() const { return const_cast<ptr_type&>(mPending.back().first); }
+
+    /// Call this each time we change mPending.back() -- that is, every time
+    /// we're about to change the value returned by dereference(). If we
+    /// haven't yet pushed the new node's children, do so now.
+    void makeCurrent()
+    {
+        // Once we've popped the last node, this becomes a no-op.
+        if (mPending.empty())
+            return;
+        // Here mPending.back() holds the node pointer we're proposing to
+        // dereference next. Have we pushed that node's children yet?
+        if (mPending.back().second)
+            return;                 // if so, it's okay to visit this node now
+        // We haven't yet pushed this node's children. Do so now. Remember
+        // that we did -- while the node in question is still back().
+        mPending.back().second = true;
+        addChildren(mPending.back().first);
+        // Now, because we've just changed mPending.back(), make that new node
+        // current.
+        makeCurrent();
+    }
+
+    /// Add the direct children of the specified node to mPending
+    void addChildren(const ptr_type& node)
+    {
+        // If we just use push_back() for each child in turn, we'll end up
+        // processing children in reverse order. We don't want to assume
+        // CHILDITER is reversible: some of the linked trees we'll be
+        // processing manage their children using singly-linked lists. So
+        // figure out how many children there are, grow mPending by that size
+        // and reverse-copy the children into the new space.
+        CHILDITER chi = mBeginFunc(node), chend = mEndFunc(node);
+        // grow mPending by the number of children
+        mPending.resize(mPending.size() + std::distance(chi, chend));
+        // Reverse-copy the children into the newly-expanded space. We can't
+        // just use std::copy() because the source is a ptr_type, whereas the
+        // dest is a pair of (ptr_type, bool).
+        for (typename list_type::reverse_iterator pi = mPending.rbegin(); chi != chend; ++chi, ++pi)
+        {
+            pi->first = *chi;       // copy the child pointer
+            pi->second = false;     // we haven't yet pushed this child's chldren
+        }
+    }
+
+    /// list of the nodes yet to be processed
+    list_type mPending;
+    /// functor to extract begin() child iterator
+    func_type mBeginFunc;
+    /// functor to extract end() child iterator
+    func_type mEndFunc;
+};
+
+/**
+ * Instantiated with a tree node, typically the root, LLTreeBFSIter "flattens"
+ * a breadth-first tree walk through that node and all its descendants.
+ *
+ * The begin() LLTreeBFSIter must be instantiated with functors to obtain from
+ * a given node the begin() and end() iterators of that node's children. For
+ * this reason, you must specify the type of the node's child iterator as an
+ * additional template parameter.
+ *
+ * Specifically, the begin functor must return an iterator whose dereferenced
+ * value is a @em pointer to a child tree node. For instance, if each node
+ * tracks its children in an STL container of node* pointers, you can simply
+ * return that container's begin() iterator.
+ *
+ * Alternatively, if a node tracks its children with a classic linked list,
+ * write a functor returning LLLinkedIter<NODE>.
+ *
+ * The end() LLTreeBFSIter must, of course, match the begin() iterator's
+ * template parameters, but is constructed without runtime parameters.
+ */
+template <class NODE, typename CHILDITER>
+class LLTreeBFSIter: public LLBaseIter<LLTreeBFSIter<NODE, CHILDITER>, NODE>
+{
+    typedef LLBaseIter<LLTreeBFSIter<NODE, CHILDITER>, NODE> super;
+    typedef typename super::self_type self_type;
+protected:
+    typedef typename super::ptr_type ptr_type;
+    // The func_type is different for this: from a NODE pointer, we must
+    // obtain a CHILDITER.
+    typedef boost::function<CHILDITER(const ptr_type&)> func_type;
+private:
+    // We need a FIFO queue rather than a LIFO stack. Use a deque rather than
+    // a vector, since vector can't implement pop_front() efficiently.
+    typedef std::deque<ptr_type> list_type;
+public:
+    /// Instantiate an LLTreeBFSIter to start a depth-first walk. Pass
+    /// functors to extract the 'child begin' and 'child end' iterators from
+    /// each node.
+    LLTreeBFSIter(const ptr_type& node, const func_type& beginfunc, const func_type& endfunc):
+        mBeginFunc(beginfunc),
+        mEndFunc(endfunc)
+    {
+        if (node)
+            mPending.push_back(node);
+    }
+    /// Instantiate an LLTreeBFSIter to mark the end of the walk
+    LLTreeBFSIter() {}
+
+private:
+    /// leverage boost::iterator_facade
+    friend class boost::iterator_core_access;
+
+    /// advance
+    /// This implementation is due to http://en.wikipedia.org/wiki/Breadth-first_search
+    void increment()
+    {
+        // Capture the node we were just looking at
+        ptr_type current = mPending.front();
+        // Remove it from mPending so we don't process it again later
+        mPending.pop_front();
+        // Add all its children to mPending
+        CHILDITER chend = mEndFunc(current);
+        for (CHILDITER chi = mBeginFunc(current); chi != chend; ++chi)
+            mPending.push_back(*chi);
+    }
+    /// equality
+    bool equal(const self_type& that) const { return this->mPending == that.mPending; }
+    /// implement dereference/indirection operators
+    ptr_type& dereference() const { return const_cast<ptr_type&>(mPending.front()); }
+
+    /// list of the nodes yet to be processed
+    list_type mPending;
+    /// functor to extract begin() child iterator
+    func_type mBeginFunc;
+    /// functor to extract end() child iterator
+    func_type mEndFunc;
+};
+
+/**
+ * When you want to select between LLTreeDFSIter, LLTreeDFSPostIter and
+ * LLTreeBFSIter with a compile-time discriminator, use LLTreeWalkIter with an
+ * LLTreeIter::WalkIter template arg.
+ */
+template <LLTreeIter::WalkIter DISCRIM, class NODE, typename CHILDITER>
+class LLTreeWalkIter
+{
+    enum { use_a_valid_LLTreeIter_WalkIter_value = false };
+public:
+    /// Bogus constructors for default (unrecognized discriminator) case
+    template <typename TYPE1, typename TYPE2>
+    LLTreeWalkIter(TYPE1, TYPE2)
+    {
+        BOOST_STATIC_ASSERT(use_a_valid_LLTreeIter_WalkIter_value);
+    }
+    LLTreeWalkIter()
+    {
+        BOOST_STATIC_ASSERT(use_a_valid_LLTreeIter_WalkIter_value);
+    }
+};
+
+/// Specialize for LLTreeIter::DFS_PRE
+template <class NODE, typename CHILDITER>
+class LLTreeWalkIter<LLTreeIter::DFS_PRE, NODE, CHILDITER>:
+    public LLTreeDFSIter<NODE, CHILDITER>
+{
+    typedef LLTreeDFSIter<NODE, CHILDITER> super;
+public:
+    /// forward begin ctor
+    LLTreeWalkIter(const typename super::ptr_type& node,
+                   const typename super::func_type& beginfunc,
+                   const typename super::func_type& endfunc):
+        super(node, beginfunc, endfunc)
+    {}
+    /// forward end ctor
+    LLTreeWalkIter():
+        super()
+    {}
+};
+
+/// Specialize for LLTreeIter::DFS_POST
+template <class NODE, typename CHILDITER>
+class LLTreeWalkIter<LLTreeIter::DFS_POST, NODE, CHILDITER>:
+    public LLTreeDFSPostIter<NODE, CHILDITER>
+{
+    typedef LLTreeDFSPostIter<NODE, CHILDITER> super;
+public:
+    /// forward begin ctor
+    LLTreeWalkIter(const typename super::ptr_type& node,
+                   const typename super::func_type& beginfunc,
+                   const typename super::func_type& endfunc):
+        super(node, beginfunc, endfunc)
+    {}
+    /// forward end ctor
+    LLTreeWalkIter():
+        super()
+    {}
+};
+
+/// Specialize for LLTreeIter::BFS
+template <class NODE, typename CHILDITER>
+class LLTreeWalkIter<LLTreeIter::BFS, NODE, CHILDITER>:
+    public LLTreeBFSIter<NODE, CHILDITER>
+{
+    typedef LLTreeBFSIter<NODE, CHILDITER> super;
+public:
+    /// forward begin ctor
+    LLTreeWalkIter(const typename super::ptr_type& node,
+                   const typename super::func_type& beginfunc,
+                   const typename super::func_type& endfunc):
+        super(node, beginfunc, endfunc)
+    {}
+    /// forward end ctor
+    LLTreeWalkIter():
+        super()
+    {}
+};
+
+#endif /* ! defined(LL_LLTREEITERATORS_H) */
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index 78c4f8e742..822fb390f3 100755
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -86,6 +86,7 @@ void LLCrashLoggerText::updateApplication(const std::string& message)
 LLCrashLogger::LLCrashLogger() :
 	mCrashBehavior(CRASH_BEHAVIOR_ASK),
 	mCrashInPreviousExec(false),
+	mCrashSettings("CrashSettings"),
 	mSentCrashLogs(false),
 	mCrashHost("")
 {
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index bd609b638c..c0c81e9771 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -35,7 +35,7 @@
 
 #include "lluuid.h"
 #include "llstring.h"
-#include "llmemory.h"
+//#include "llmemory.h"
 #include "llthread.h"
 
 const S32 MIN_IMAGE_MIP =  2; // 4x4, only used for expand/contract power of 2
diff --git a/indra/llimage/llimagedxt.h b/indra/llimage/llimagedxt.h
index bc2d6522d2..1a297536b4 100644
--- a/indra/llimage/llimagedxt.h
+++ b/indra/llimage/llimagedxt.h
@@ -33,6 +33,7 @@
 #define LL_LLIMAGEDXT_H
 
 #include "llimage.h"
+#include "llpointer.h"
 
 // This class decodes and encodes LL DXT files (which may unclude uncompressed RGB or RGBA mipped data)
 
diff --git a/indra/llimage/llimagetga.cpp b/indra/llimage/llimagetga.cpp
index a6721bfa0f..d8f8003593 100644
--- a/indra/llimage/llimagetga.cpp
+++ b/indra/llimage/llimagetga.cpp
@@ -31,10 +31,12 @@
 
 #include "linden_common.h"
 
-#include "lldir.h"
 #include "llimagetga.h"
+
+#include "lldir.h"
 #include "llerror.h"
 #include "llmath.h"
+#include "llpointer.h"
 
 // For expanding 5-bit pixel values to 8-bit with best rounding
 // static
diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h
index 879fcf5565..0d66695d6e 100644
--- a/indra/llimage/llimageworker.h
+++ b/indra/llimage/llimageworker.h
@@ -34,6 +34,7 @@
 #define LL_LLIMAGEWORKER_H
 
 #include "llimage.h"
+#include "llpointer.h"
 #include "llworkerthread.h"
 
 class LLImageWorker : public LLWorkerClass
diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp
index be6b6c817b..ec6264dcf5 100644
--- a/indra/llimagej2coj/llimagej2coj.cpp
+++ b/indra/llimagej2coj/llimagej2coj.cpp
@@ -37,7 +37,7 @@
 #include "openjpeg.h"
 
 #include "lltimer.h"
-#include "llmemory.h"
+//#include "llmemory.h"
 
 const char* fallbackEngineInfoLLImageJ2CImpl()
 {
diff --git a/indra/llinventory/lleconomy.h b/indra/llinventory/lleconomy.h
index 2e2adc4d45..e480085453 100644
--- a/indra/llinventory/lleconomy.h
+++ b/indra/llinventory/lleconomy.h
@@ -32,7 +32,7 @@
 #ifndef LL_LLECONOMY_H
 #define LL_LLECONOMY_H
 
-#include "llmemory.h"
+#include "llsingleton.h"
 
 class LLMessageSystem;
 class LLVector3;
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 2823cf7be9..ce2e4e9cfa 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -1097,109 +1097,8 @@ fail:
 
 }
 
-LLXMLNode *LLInventoryItem::exportFileXML(BOOL include_asset_key) const
-{
-	LLMemType m1(LLMemType::MTYPE_INVENTORY);
-	LLXMLNode *ret = new LLXMLNode("item", FALSE);
-
-	ret->createChild("uuid", TRUE)->setUUIDValue(1, &mUUID);
-	ret->createChild("parent_uuid", TRUE)->setUUIDValue(1, &mParentUUID);
-
-	mPermissions.exportFileXML()->setParent(ret);
-
-	// Check for permissions to see the asset id, and if so write it
-	// out as an asset id. Otherwise, apply our cheesy encryption.
-	if(include_asset_key)
-	{
-		U32 mask = mPermissions.getMaskBase();
-		if(((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
-		   || (mAssetUUID.isNull()))
-		{
-			ret->createChild("asset_id", FALSE)->setUUIDValue(1, &mAssetUUID);
-		}
-		else
-		{
-			LLUUID shadow_id(mAssetUUID);
-			LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES);
-			cipher.encrypt(shadow_id.mData, UUID_BYTES);
-
-			ret->createChild("shadow_id", FALSE)->setUUIDValue(1, &shadow_id);
-		}
-	}
-
-	std::string type_str = LLAssetType::lookup(mType);
-	std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
-
-	ret->createChild("asset_type", FALSE)->setStringValue(type_str);
-	ret->createChild("inventory_type", FALSE)->setStringValue(inv_type_str);
-	S32 tmp_flags = (S32) mFlags;
-	ret->createChild("flags", FALSE)->setByteValue(4, (U8*)(&tmp_flags), LLXMLNode::ENCODING_HEX);
-
-	mSaleInfo.exportFileXML()->setParent(ret);
-
-	std::string temp;
-	temp.assign(mName);
-	ret->createChild("name", FALSE)->setStringValue(temp);
-	temp.assign(mDescription);
-	ret->createChild("description", FALSE)->setStringValue(temp);
-	S32 date = mCreationDate;
-	ret->createChild("creation_date", FALSE)->setIntValue(1, &date);
-
-	return ret;
-}
-
-BOOL LLInventoryItem::importXML(LLXMLNode* node)
-{
-	BOOL success = FALSE;
-	if (node)
-	{
-		success = TRUE;
-		LLXMLNodePtr sub_node;
-		if (node->getChild("uuid", sub_node))
-			success = (1 == sub_node->getUUIDValue(1, &mUUID));
-		if (node->getChild("parent_uuid", sub_node))
-			success = success && (1 == sub_node->getUUIDValue(1, &mParentUUID));
-		if (node->getChild("permissions", sub_node))
-			success = success && mPermissions.importXML(sub_node);
-		if (node->getChild("asset_id", sub_node))
-			success = success && (1 == sub_node->getUUIDValue(1, &mAssetUUID));
-		if (node->getChild("shadow_id", sub_node))
-		{
-			success = success && (1 == sub_node->getUUIDValue(1, &mAssetUUID));
-			LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES);
-			cipher.decrypt(mAssetUUID.mData, UUID_BYTES);
-		}
-		if (node->getChild("asset_type", sub_node))
-			mType = LLAssetType::lookup(sub_node->getValue());
-		if (node->getChild("inventory_type", sub_node))
-			mInventoryType = LLInventoryType::lookup(sub_node->getValue());
-		if (node->getChild("flags", sub_node))
-		{
-			S32 tmp_flags = 0;
-			success = success && (1 == sub_node->getIntValue(1, &tmp_flags));
-			mFlags = (U32) tmp_flags;
-		}
-		if (node->getChild("sale_info", sub_node))
-			success = success && mSaleInfo.importXML(sub_node);
-		if (node->getChild("name", sub_node))
-			mName = sub_node->getValue();
-		if (node->getChild("description", sub_node))
-			mDescription = sub_node->getValue();
-		if (node->getChild("creation_date", sub_node))
-		{
-			S32 date = 0;
-			success = success && (1 == sub_node->getIntValue(1, &date));
-			mCreationDate = date;
-		}
-		
-		if (!success)
-		{
-			lldebugs << "LLInventory::importXML() failed for node named '" 
-				<< node->getName() << "'" << llendl;
-		}
-	}
-	return success;
-}
+// Deleted LLInventoryItem::exportFileXML() and LLInventoryItem::importXML()
+// because I can't find any non-test code references to it. 2009-05-04 JC
 
 S32 LLInventoryItem::packBinaryBucket(U8* bin_bucket, LLPermissions* perm_override) const
 {
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index d34046c310..bdf444d34f 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -40,6 +40,7 @@
 #include "llinventorytype.h"
 #include "llmemtype.h"
 #include "llpermissions.h"
+#include "llrefcount.h"
 #include "llsaleinfo.h"
 #include "llsd.h"
 #include "lluuid.h"
@@ -273,9 +274,6 @@ public:
 	virtual BOOL importLegacyStream(std::istream& input_stream);
 	virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
 
-	virtual LLXMLNode *exportFileXML(BOOL include_asset_key = TRUE) const;
-	BOOL importXML(LLXMLNode* node);
-
 	// helper functions
 
 	// pack all information needed to reconstruct this item into the given binary bucket.
diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp
index a161a0ee00..d905fe3ea7 100644
--- a/indra/llinventory/llinventorytype.cpp
+++ b/indra/llinventory/llinventorytype.cpp
@@ -63,6 +63,7 @@ static const char* INVENTORY_TYPE_NAMES[LLInventoryType::IT_COUNT] =
 	"wearable",
 	"animation",
 	"gesture",		// 20
+	"favorite"		//21
 };
 
 // This table is meant for decoding to human readable form. Put any
@@ -91,6 +92,7 @@ static const char* INVENTORY_TYPE_HUMAN_NAMES[LLInventoryType::IT_COUNT] =
 	"wearable",
 	"animation",
 	"gesture",		// 20
+	"favorite"		// 21
 };
 
 // Maps asset types to the default inventory type for that kind of asset.
@@ -120,6 +122,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
 	LLInventoryType::IT_NONE,			// AT_IMAGE_JPEG
 	LLInventoryType::IT_ANIMATION,		// AT_ANIMATION
 	LLInventoryType::IT_GESTURE,		// AT_GESTURE
+	LLInventoryType::IT_FAVORITE,		// AT_FAVORITE
 };
 
 static const int MAX_POSSIBLE_ASSET_TYPES = 2;
@@ -147,6 +150,7 @@ INVENTORY_TO_ASSET_TYPE[LLInventoryType::IT_COUNT][MAX_POSSIBLE_ASSET_TYPES] =
 	{ LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART },	// IT_WEARABLE
 	{ LLAssetType::AT_ANIMATION, LLAssetType::AT_NONE },	// IT_ANIMATION
 	{ LLAssetType::AT_GESTURE, LLAssetType::AT_NONE },		// IT_GESTURE
+	{ LLAssetType::AT_FAVORITE, LLAssetType::AT_NONE },		// IT_FAVORITE
 };
 
 // static
diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h
index d3effc0e6d..c9ba97d7b6 100644
--- a/indra/llinventory/llinventorytype.h
+++ b/indra/llinventory/llinventorytype.h
@@ -67,7 +67,8 @@ public:
 		IT_WEARABLE = 18,
 		IT_ANIMATION = 19,
 		IT_GESTURE = 20,
-		IT_COUNT = 21,
+		IT_FAVORITE = 21,
+		IT_COUNT = 22,
 
 		IT_NONE = -1
 	};
diff --git a/indra/llinventory/llnotecard.h b/indra/llinventory/llnotecard.h
index b903f1fdb0..092ab2ce35 100644
--- a/indra/llinventory/llnotecard.h
+++ b/indra/llinventory/llnotecard.h
@@ -33,7 +33,7 @@
 #ifndef LL_NOTECARD_H
 #define LL_NOTECARD_H
 
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llinventory.h"
 
 class LLNotecard
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index 9c27476b0a..60ebc44a3e 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -85,13 +85,13 @@ static const std::string PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] =
     "None",
     "Linden Location",
     "Adult",
-    "Arts & Culture",
+    "Arts and Culture",
     "Business",
     "Educational",
     "Gaming",
     "Hangout",
     "Newcomer Friendly",
-    "Parks & Nature",
+    "Parks and Nature",
     "Residential",
     "Shopping",
     "Stage",
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index 6f5ae87ebd..021ad89e52 100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -38,6 +38,7 @@
 #include "lluuid.h"
 #include "llparcelflags.h"
 #include "llpermissions.h"
+#include "lltimer.h"
 #include "v3math.h"
 
 
diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index 328ed4588b..559a5631dc 100644
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
@@ -831,67 +831,8 @@ BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const
 	return TRUE;
 }
 
-
-LLXMLNode *LLPermissions::exportFileXML() const
-{
-	LLXMLNode *ret = new LLXMLNode("permissions", FALSE);
-
-	ret->createChild("group_owned", TRUE)->setBoolValue(mIsGroupOwned);
-
-	ret->createChild("base_mask", FALSE)->setByteValue(4, (U8*)&mMaskBase, LLXMLNode::ENCODING_HEX);
-	ret->createChild("owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskOwner, LLXMLNode::ENCODING_HEX);
-	ret->createChild("group_mask", FALSE)->setByteValue(4, (U8*)&mMaskGroup, LLXMLNode::ENCODING_HEX);
-	ret->createChild("everyone_mask", FALSE)->setByteValue(4, (U8*)&mMaskEveryone, LLXMLNode::ENCODING_HEX);
-	ret->createChild("next_owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskNextOwner, LLXMLNode::ENCODING_HEX);
-
-	ret->createChild("creator_id", FALSE)->setUUIDValue(1, &mCreator);
-	ret->createChild("owner_id", FALSE)->setUUIDValue(1, &mOwner);
-	ret->createChild("last_owner_id", FALSE)->setUUIDValue(1, &mLastOwner);
-	ret->createChild("group_id", FALSE)->setUUIDValue(1, &mGroup);
-
-	return ret;
-}
-
-bool LLPermissions::importXML(LLXMLNode* node)
-{
-	bool success = false;
-	if (node)
-	{
-		success = true;
-		LLXMLNodePtr sub_node;
-		if (node->getChild("base_mask", sub_node))
-			success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskBase));
-		if (node->getChild("owner_mask", sub_node))
-			success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskOwner));
-		if (node->getChild("group_mask", sub_node))
-			success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskGroup));
-		if (node->getChild("everyone_mask", sub_node))
-			success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskEveryone));
-		if (node->getChild("next_owner_mask", sub_node))
-			success = success && (4 == sub_node->getByteValue(4, (U8*)&mMaskNextOwner));
-
-		if (node->getChild("creator_id", sub_node))
-			success = success && (1 == sub_node->getUUIDValue(1, &mCreator));
-		if (node->getChild("owner_id", sub_node))
-			success = success && (1 == sub_node->getUUIDValue(1, &mOwner));
-		if (node->getChild("last_owner_id", sub_node))
-			success = success && (1 == sub_node->getUUIDValue(1, &mLastOwner));
-		if (node->getChild("group_id", sub_node))
-			success = success && (1 == sub_node->getUUIDValue(1, &mGroup));
-		if (node->getChild("group_owned", sub_node))
-		{
-			BOOL tmpbool = FALSE;
-			success = success && (1 == sub_node->getBoolValue(1, &tmpbool));
-			mIsGroupOwned = (bool)tmpbool;
-		}
-		if (!success)
-		{
-			lldebugs << "LLPermissions::importXML() failed for node named '" 
-				<< node->getName() << "'" << llendl;
-		}
-	}
-	return success;
-}
+// Deleted LLPermissions::exportFileXML() and LLPermissions::importXML()
+// because I can't find any non-test code references to it. 2009-05-04 JC
 
 bool LLPermissions::operator==(const LLPermissions &rhs) const
 {   
diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h
index 5587f8c3c8..2035b57f5c 100644
--- a/indra/llinventory/llpermissions.h
+++ b/indra/llinventory/llpermissions.h
@@ -314,9 +314,6 @@ public:
 	BOOL	importLegacyStream(std::istream& input_stream);
 	BOOL	exportLegacyStream(std::ostream& output_stream) const;
 
-	LLXMLNode *exportFileXML() const;
-	bool importXML(LLXMLNode* node);
-
 	bool operator==(const LLPermissions &rhs) const;
 	bool operator!=(const LLPermissions &rhs) const;
 
diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp
index b7afb28adf..930901f309 100644
--- a/indra/llinventory/llsaleinfo.cpp
+++ b/indra/llinventory/llsaleinfo.cpp
@@ -135,38 +135,8 @@ bool LLSaleInfo::fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
 	return true;
 }
 
-LLXMLNode *LLSaleInfo::exportFileXML() const
-{
-	LLXMLNode *ret = new LLXMLNode("sale_info", FALSE);
-	std::string type_str = ll_safe_string( lookup(mSaleType));
-	ret->createChild("type", TRUE)->setStringValue(1, &type_str);
-	ret->createChild("price", TRUE)->setIntValue(1, &mSalePrice);
-	return ret;
-}
-
-BOOL LLSaleInfo::importXML(LLXMLNode* node)
-{
-	BOOL success = FALSE;
-	if (node)
-	{
-		success = TRUE;
-		LLXMLNodePtr sub_node;
-		if (node->getChild("type", sub_node))
-		{
-			mSaleType = lookup(sub_node->getValue().c_str());
-		}
-		if (node->getChild("price", sub_node))
-		{
-			success &= (1 == sub_node->getIntValue(1, &mSalePrice));
-		}
-		if (!success)
-		{
-			lldebugs << "LLSaleInfo::importXML() failed for node named '" 
-				<< node->getName() << "'" << llendl;
-		}
-	}
-	return success;
-}
+// Deleted LLSaleInfo::exportFileXML() and LLSaleInfo::importXML()
+// because I can't find any non-test code references to it. 2009-05-04 JC
 
 BOOL LLSaleInfo::importFile(LLFILE* fp, BOOL& has_perm_mask, U32& perm_mask)
 {
diff --git a/indra/llinventory/llsaleinfo.h b/indra/llinventory/llsaleinfo.h
index d546c49fd7..3461a128be 100644
--- a/indra/llinventory/llsaleinfo.h
+++ b/indra/llinventory/llsaleinfo.h
@@ -101,9 +101,6 @@ public:
 	bool fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask);
 	BOOL importLegacyStream(std::istream& input_stream, BOOL& has_perm_mask, U32& perm_mask);
 
-	LLXMLNode *exportFileXML() const;
-	BOOL importXML(LLXMLNode* node);
-
 	LLSD packMessage() const;
 	void unpackMessage(LLSD sales);
 
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index 66451b1a27..f85c4f39f4 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -36,8 +36,8 @@
 #include <cmath>
 #include <cstdlib>
 #include "lldefs.h"
-#include "llstl.h" // *TODO: Remove when LLString is gone
-#include "llstring.h" // *TODO: Remove when LLString is gone
+//#include "llstl.h" // *TODO: Remove when LLString is gone
+//#include "llstring.h" // *TODO: Remove when LLString is gone
 // lltut.h uses is_approx_equal_fraction(). This was moved to its own header
 // file in llcommon so we can use lltut.h for llcommon tests without making
 // llcommon depend on llmath.
diff --git a/indra/llmath/llrect.h b/indra/llmath/llrect.h
index 9eb58dbbe9..98aceb0597 100644
--- a/indra/llmath/llrect.h
+++ b/indra/llmath/llrect.h
@@ -271,8 +271,8 @@ public:
 			<< " W " << rect.getWidth() << " H " << rect.getHeight() << " }";
 		return s;
 	}
-
-	bool operator==(const LLRectBase &b)
+	
+	bool operator==(const LLRectBase &b) const
 	{
 		return ((mLeft == b.mLeft) &&
 				(mTop == b.mTop) &&
@@ -280,7 +280,7 @@ public:
 				(mBottom == b.mBottom));
 	}
 
-	bool operator!=(const LLRectBase &b)
+	bool operator!=(const LLRectBase &b) const
 	{
 		return ((mLeft != b.mLeft) ||
 				(mTop != b.mTop) ||
diff --git a/indra/llmath/llsdutil_math.cpp b/indra/llmath/llsdutil_math.cpp
index 073cb2e3bd..c5176681ce 100644
--- a/indra/llmath/llsdutil_math.cpp
+++ b/indra/llmath/llsdutil_math.cpp
@@ -165,9 +165,6 @@ LLSD ll_sd_from_color4(const LLColor4& c)
 LLColor4 ll_color4_from_sd(const LLSD& sd)
 {
 	LLColor4 c;
-	c.mV[0] = (F32)sd[0].asReal();
-	c.mV[1] = (F32)sd[1].asReal();
-	c.mV[2] = (F32)sd[2].asReal();
-	c.mV[3] = (F32)sd[3].asReal();
+	c.setValue(sd);
 	return c;
 }
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index e55fe52c91..af46da05d8 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -52,7 +52,7 @@ class LLVolume;
 #include "llquaternion.h"
 #include "llstrider.h"
 #include "v4coloru.h"
-#include "llmemory.h"
+#include "llrefcount.h"
 #include "llfile.h"
 
 //============================================================================
diff --git a/indra/llmath/llvolumemgr.h b/indra/llmath/llvolumemgr.h
index e10ad94dba..57d789e73a 100644
--- a/indra/llmath/llvolumemgr.h
+++ b/indra/llmath/llvolumemgr.h
@@ -36,7 +36,7 @@
 #include <map>
 
 #include "llvolume.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llthread.h"
 
 class LLVolumeParams;
diff --git a/indra/llmath/v4color.cpp b/indra/llmath/v4color.cpp
index 0cbfce07c9..34337b3ac8 100644
--- a/indra/llmath/v4color.cpp
+++ b/indra/llmath/v4color.cpp
@@ -227,6 +227,40 @@ const LLColor4&	LLColor4::setVec(const LLColor3 &vec, F32 a)
 	return (*this);
 }
 
+void LLColor4::setValue(const LLSD& sd)
+{
+#if 0
+	// Clamping on setValue from LLSD is inconsistent with other set behavior
+	F32 val;
+	bool out_of_range = false;
+	val = sd[0].asReal();
+	mV[0] = llclamp(val, 0.f, 1.f);
+	out_of_range = mV[0] != val;
+
+	val = sd[1].asReal();
+	mV[1] = llclamp(val, 0.f, 1.f);
+	out_of_range |= mV[1] != val;
+
+	val = sd[2].asReal();
+	mV[2] = llclamp(val, 0.f, 1.f);
+	out_of_range |= mV[2] != val;
+
+	val = sd[3].asReal();
+	mV[3] = llclamp(val, 0.f, 1.f);
+	out_of_range |= mV[3] != val;
+
+	if (out_of_range)
+	{
+		llwarns << "LLSD color value out of range!" << llendl;
+	}
+#else
+	mV[0] = (F32) sd[0].asReal();
+	mV[1] = (F32) sd[1].asReal();
+	mV[2] = (F32) sd[2].asReal();
+	mV[3] = (F32) sd[3].asReal();
+#endif
+}
+
 const LLColor4& LLColor4::operator=(const LLColor3 &a)
 {
 	mV[VX] = a.mV[VX];
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index 785b47dd37..f2a5cd39ed 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -72,13 +72,7 @@ class LLColor4
 			return ret;
 		}
 	
-		void setValue(const LLSD& sd)
-		{
-			mV[0] = (F32) sd[0].asReal();
-			mV[1] = (F32) sd[1].asReal();
-			mV[2] = (F32) sd[2].asReal();
-			mV[3] = (F32) sd[3].asReal();
-		}
+		void setValue(const LLSD& sd);
 
 		void calcHSL(F32* hue, F32* saturation, F32* luminance) const;
 
@@ -249,7 +243,7 @@ inline LLColor4::LLColor4(void)
 
 inline LLColor4::LLColor4(const LLSD& sd)
 {
-	*this = sd;
+	this->setValue(sd);
 }
 
 inline LLColor4::LLColor4(F32 r, F32 g, F32 b)
@@ -641,10 +635,7 @@ void LLColor4::clamp()
 
 inline const LLColor4& LLColor4::operator=(const LLSD& sd)
 {
-	mV[0] = (F32) sd[0].asReal();
-	mV[1] = (F32) sd[1].asReal();
-	mV[2] = (F32) sd[2].asReal();
-	mV[3] = (F32) sd[3].asReal();
+	setValue(sd);
 
 	return *this;
 }
diff --git a/indra/llmath/v4coloru.h b/indra/llmath/v4coloru.h
index 082d0efbb1..c0390fa0b2 100644
--- a/indra/llmath/v4coloru.h
+++ b/indra/llmath/v4coloru.h
@@ -138,6 +138,12 @@ public:
 
 	static BOOL parseColor4U(const std::string& buf, LLColor4U* value);
 
+	// conversion
+	operator const LLColor4() const
+	{
+		return LLColor4(*this);
+	}
+
 	static LLColor4U white;
 	static LLColor4U black;
 	static LLColor4U red;
diff --git a/indra/llmessage/llares.h b/indra/llmessage/llares.h
index 96d7f6dd31..c709a08499 100644
--- a/indra/llmessage/llares.h
+++ b/indra/llmessage/llares.h
@@ -45,7 +45,8 @@
 # include <ares/ares.h>
 #endif
 
-#include "llmemory.h"
+#include "llpointer.h"
+#include "llrefcount.h"
 #include "lluri.h"
 
 class LLQueryResponder;
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 799bc83e20..629bd3836d 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -43,11 +43,6 @@
 #include "lluuid.h"
 #include "message.h"
 
-// Constants
-static const std::string CN_WAITING("(Loading...)"); // *TODO: translate
-static const std::string CN_NOBODY("(nobody)"); // *TODO: translate
-static const std::string CN_NONE("(none)"); // *TODO: translate
-
 // llsd serialization constants
 static const std::string AGENTS("agents");
 static const std::string GROUPS("groups");
@@ -65,6 +60,7 @@ const S32 CN_FILE_VERSION = 2;
 
 // Globals
 LLCacheName* gCacheName = NULL;
+std::map<std::string, std::string> LLCacheName::sCacheName;
 
 /// ---------------------------------------------------------------------------
 /// class LLCacheNameEntry
@@ -92,17 +88,19 @@ class PendingReply
 {
 public:
 	LLUUID				mID;
-	LLCacheNameCallback mCallback;
+	LLCacheNameSignal	mSignal;
 	LLHost				mHost;
-	void*				mData;
-	PendingReply(const LLUUID& id, LLCacheNameCallback callback, void* data = NULL)
-		: mID(id), mCallback(callback), mData(data)
-	{ }
-
+	
 	PendingReply(const LLUUID& id, const LLHost& host)
-		: mID(id), mCallback(0), mHost(host)
-	{ }
-
+		: mID(id), mHost(host)
+	{
+	}
+	
+	boost::signals::connection setCallback(const LLCacheNameCallback& cb)
+	{
+		return mSignal.connect(cb);
+	}
+	
 	void done()			{ mID.setNull(); }
 	bool isDone() const	{ return mID.isNull() != FALSE; }
 };
@@ -187,10 +185,9 @@ void ReplySender::flush()
 
 
 typedef std::set<LLUUID>					AskQueue;
-typedef std::vector<PendingReply>			ReplyQueue;
+typedef std::list<PendingReply*>			ReplyQueue;
 typedef std::map<LLUUID,U32>				PendingQueue;
 typedef std::map<LLUUID, LLCacheNameEntry*> Cache;
-typedef std::vector<LLCacheNameCallback>	Observers;
 
 class LLCacheName::Impl
 {
@@ -211,13 +208,16 @@ public:
 	ReplyQueue			mReplyQueue;
 		// requests awaiting replies from us
 
-	Observers			mObservers;
+	LLCacheNameSignal	mSignal;
 
 	LLFrameTimer		mProcessTimer;
 
 	Impl(LLMessageSystem* msg);
 	~Impl();
-
+	
+	boost::signals::connection addPending(const LLUUID& id, const LLCacheNameCallback& callback);
+	void addPending(const LLUUID& id, const LLHost& host);
+	
 	void processPendingAsks();
 	void processPendingReplies();
 	void sendRequest(const char* msg_name, const AskQueue& queue);
@@ -231,8 +231,6 @@ public:
 	static void handleUUIDNameReply(LLMessageSystem* msg, void** userdata);
 	static void handleUUIDGroupNameRequest(LLMessageSystem* msg, void** userdata);
 	static void handleUUIDGroupNameReply(LLMessageSystem* msg, void** userdata);
-
-	void notifyObservers(const LLUUID& id, const std::string& first, const std::string& last, BOOL group);
 };
 
 
@@ -247,6 +245,9 @@ LLCacheName::LLCacheName(LLMessageSystem* msg)
 LLCacheName::LLCacheName(LLMessageSystem* msg, const LLHost& upstream_host)
 	: impl(* new Impl(msg))
 {
+	sCacheName["waiting"] = "(Loading...)";
+	sCacheName["nobody"] = "(nobody)";
+	sCacheName["none"] = "(none)";
 	setUpstream(upstream_host);
 }
 
@@ -272,52 +273,31 @@ LLCacheName::Impl::Impl(LLMessageSystem* msg)
 LLCacheName::Impl::~Impl()
 {
 	for_each(mCache.begin(), mCache.end(), DeletePairedPointer());
+	for_each(mReplyQueue.begin(), mReplyQueue.end(), DeletePointer());
 }
 
-
-void LLCacheName::setUpstream(const LLHost& upstream_host)
+boost::signals::connection LLCacheName::Impl::addPending(const LLUUID& id, const LLCacheNameCallback& callback)
 {
-	impl.mUpstreamHost = upstream_host;
+	PendingReply* reply = new PendingReply(id, LLHost());
+	boost::signals::connection res = reply->setCallback(callback);
+	mReplyQueue.push_back(reply);
+	return res;
 }
 
-void LLCacheName::addObserver(LLCacheNameCallback callback)
+void LLCacheName::Impl::addPending(const LLUUID& id, const LLHost& host)
 {
-	impl.mObservers.push_back(callback);
+	PendingReply* reply = new PendingReply(id, host);
+	mReplyQueue.push_back(reply);
 }
 
-void LLCacheName::removeObserver(LLCacheNameCallback callback)
+void LLCacheName::setUpstream(const LLHost& upstream_host)
 {
-	Observers::iterator it = impl.mObservers.begin();
-	Observers::iterator end = impl.mObservers.end();
-
-	for ( ; it != end; ++it)
-	{
-		const LLCacheNameCallback& cb = (*it);
-		if (cb == callback)
-		{
-			impl.mObservers.erase(it);
-			return;
-		}
-	}
+	impl.mUpstreamHost = upstream_host;
 }
 
-void LLCacheName::cancelCallback(const LLUUID& id, LLCacheNameCallback callback, void* user_data)
+boost::signals::connection LLCacheName::addObserver(const LLCacheNameCallback& callback)
 {
-	ReplyQueue::iterator it = impl.mReplyQueue.begin();
-	ReplyQueue::iterator end = impl.mReplyQueue.end();
-	
-	for(; it != end; ++it)
-	{
-		const PendingReply& reply = (*it);
-
-		if ((callback == reply.mCallback)
-			&& (id == reply.mID)
-			&& (user_data == reply.mData) )
-		{
-			impl.mReplyQueue.erase(it);
-			return;
-		}
-	}
+	return impl.mSignal.connect(callback);
 }
 
 void LLCacheName::importFile(LLFILE* fp)
@@ -493,7 +473,7 @@ BOOL LLCacheName::getName(const LLUUID& id, std::string& first, std::string& las
 {
 	if(id.isNull())
 	{
-		first = CN_NOBODY;
+		first = sCacheName["nobody"];
 		last.clear();
 		return FALSE;
 	}
@@ -507,7 +487,7 @@ BOOL LLCacheName::getName(const LLUUID& id, std::string& first, std::string& las
 	}
 	else
 	{
-		first = CN_WAITING;
+		first = sCacheName["waiting"];
 		last.clear();
 		if (!impl.isRequestPending(id))
 		{
@@ -517,6 +497,14 @@ BOOL LLCacheName::getName(const LLUUID& id, std::string& first, std::string& las
 	}
 
 }
+// static
+void LLCacheName::LocalizeCacheName(std::string key, std::string value)
+{
+	if (key!="" && value!= "" )
+		sCacheName[key]=value;
+	else
+		llwarns<< " Error localizing cache key " << key << " To "<< value<<llendl;
+}
 
 BOOL LLCacheName::getFullName(const LLUUID& id, std::string& fullname)
 {
@@ -530,7 +518,7 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)
 {
 	if(id.isNull())
 	{
-		group = CN_NONE;
+		group = sCacheName["none"];
 		return FALSE;
 	}
 
@@ -551,7 +539,7 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)
 	}
 	else 
 	{
-		group = CN_WAITING;
+		group = sCacheName["waiting"];
 		if (!impl.isRequestPending(id))
 		{
 			impl.mAskGroupQueue.insert(id);
@@ -559,28 +547,38 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)
 		return FALSE;
 	}
 }
-
-// TODO: Make the cache name callback take a SINGLE std::string,
-// not a separate first and last name.
-void LLCacheName::get(const LLUUID& id, BOOL is_group, LLCacheNameCallback callback, void* user_data)
+// This is a little bit kludgy. LLCacheNameCallback is a slot instead of a function pointer.
+//  The reason it is a slot is so that the legacy get() function below can bind an old callback
+//  and pass it as a slot. The reason it isn't a boost::function is so that trackable behavior
+//  deson't get lost. As a result, we have to bind the slot to a signal to call it, even when
+//  we call it immediately. -Steve
+// NOTE: Even though passing first and last name is a bit of extra overhead, it eliminates the
+//  potential need for any parsing should any code need to handle first and last name independently.
+boost::signals::connection LLCacheName::get(const LLUUID& id, BOOL is_group, const LLCacheNameCallback& callback)
 {
+	boost::signals::connection res;
+	
 	if(id.isNull())
 	{
-		callback(id, CN_NOBODY, "", is_group, user_data);
-		return;
+		LLCacheNameSignal signal;
+		signal.connect(callback);
+		signal(id, sCacheName["nobody"], "", is_group);
+		return res;
 	}
 
 	LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id );
 	if (entry)
 	{
+		LLCacheNameSignal signal;
+		signal.connect(callback);
 		// id found in map therefore we can call the callback immediately.
 		if (entry->mIsGroup)
 		{
-			callback(id, entry->mGroupName, "", entry->mIsGroup, user_data);
+			signal(id, entry->mGroupName, "", entry->mIsGroup);
 		}
 		else
 		{
-			callback(id, entry->mFirstName, entry->mLastName, entry->mIsGroup, user_data);
+			signal(id, entry->mFirstName, entry->mLastName, entry->mIsGroup);
 		}
 	}
 	else
@@ -597,8 +595,14 @@ void LLCacheName::get(const LLUUID& id, BOOL is_group, LLCacheNameCallback callb
 				impl.mAskNameQueue.insert(id);
 			}
 		}
-		impl.mReplyQueue.push_back(PendingReply(id, callback, user_data));
+		res = impl.addPending(id, callback);
 	}
+	return res;
+}
+
+boost::signals::connection LLCacheName::get(const LLUUID& id, BOOL is_group, old_callback_t callback, void* user_data)
+{
+	return get(id, is_group, boost::bind(callback, _1, _2, _3, _4, user_data));
 }
 
 void LLCacheName::processPending()
@@ -684,14 +688,14 @@ void LLCacheName::dumpStats()
 			<< " AskGroup=" << impl.mAskGroupQueue.size()
 			<< " Pending=" << impl.mPendingQueue.size()
 			<< " Reply=" << impl.mReplyQueue.size()
-			<< " Observers=" << impl.mObservers.size()
+// 			<< " Observers=" << impl.mSignal.size()
 			<< llendl;
 }
 
 //static 
 std::string LLCacheName::getDefaultName()
 {
-	return CN_WAITING;
+	return sCacheName["waiting"];
 }
 
 void LLCacheName::Impl::processPendingAsks()
@@ -704,50 +708,49 @@ void LLCacheName::Impl::processPendingAsks()
 
 void LLCacheName::Impl::processPendingReplies()
 {
-	ReplyQueue::iterator it = mReplyQueue.begin();
-	ReplyQueue::iterator end = mReplyQueue.end();
-	
 	// First call all the callbacks, because they might send messages.
-	for(; it != end; ++it)
+	for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it)
 	{
-		LLCacheNameEntry* entry = get_ptr_in_map(mCache, it->mID);
+		PendingReply* reply = *it;
+		LLCacheNameEntry* entry = get_ptr_in_map(mCache, reply->mID);
 		if(!entry) continue;
 
-		if (it->mCallback)
+		if (!entry->mIsGroup)
 		{
-			if (!entry->mIsGroup)
-			{
-				(it->mCallback)(it->mID,
-					entry->mFirstName, entry->mLastName,
-					FALSE, it->mData);
-			}
-			else {
-				(it->mCallback)(it->mID,
-					entry->mGroupName, "",
-					TRUE, it->mData);
-			}
+			(reply->mSignal)(reply->mID, entry->mFirstName, entry->mLastName, FALSE);
+		}
+		else
+		{
+			(reply->mSignal)(reply->mID, entry->mGroupName, "", TRUE);
 		}
 	}
 
 	// Forward on all replies, if needed.
 	ReplySender sender(mMsg);
-	for (it = mReplyQueue.begin(); it != end; ++it)
+	for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it)
 	{
-		LLCacheNameEntry* entry = get_ptr_in_map(mCache, it->mID);
+		PendingReply* reply = *it;
+		LLCacheNameEntry* entry = get_ptr_in_map(mCache, reply->mID);
 		if(!entry) continue;
 
-		if (it->mHost.isOk())
+		if (reply->mHost.isOk())
 		{
-			sender.send(it->mID, *entry, it->mHost);
+			sender.send(reply->mID, *entry, reply->mHost);
 		}
 
-		it->done();
+		reply->done();
+	}
+	
+	for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); )
+	{
+		ReplyQueue::iterator curit = it++;
+		PendingReply* reply = *curit;
+		if (reply->isDone())
+		{
+			delete reply;
+			mReplyQueue.erase(curit);
+		}
 	}
-
-	mReplyQueue.erase(
-		remove_if(mReplyQueue.begin(), mReplyQueue.end(),
-			std::mem_fun_ref(&PendingReply::isDone)),
-		mReplyQueue.end());
 }
 
 
@@ -785,18 +788,6 @@ void LLCacheName::Impl::sendRequest(
 	}
 }
 
-void LLCacheName::Impl::notifyObservers(const LLUUID& id,
-	const std::string& first, const std::string& last, BOOL is_group)
-{
-	for (Observers::const_iterator i = mObservers.begin(),
-								   end = mObservers.end();
-		i != end;
-		++i)
-	{
-		(**i)(id, first, last, is_group, NULL);
-	}
-}
-
 bool LLCacheName::Impl::isRequestPending(const LLUUID& id)
 {
 	U32 now = (U32)time(NULL);
@@ -863,7 +854,7 @@ void LLCacheName::Impl::processUUIDRequest(LLMessageSystem* msg, bool isGroup)
 				}
 			}
 			
-			mReplyQueue.push_back(PendingReply(id, fromHost));
+			addPending(id, fromHost);
 		}
 	}
 }
@@ -901,11 +892,11 @@ void LLCacheName::Impl::processUUIDReply(LLMessageSystem* msg, bool isGroup)
 
 		if (!isGroup)
 		{
-			notifyObservers(id, entry->mFirstName, entry->mLastName, FALSE);
+			mSignal(id, entry->mFirstName, entry->mLastName, FALSE);
 		}
 		else
 		{
-			notifyObservers(id, entry->mGroupName, "", TRUE);
+			mSignal(id, entry->mGroupName, "", TRUE);
 		}
 	}
 }
diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h
index 2757b86a7c..414b6590f6 100644
--- a/indra/llmessage/llcachename.h
+++ b/indra/llmessage/llcachename.h
@@ -33,12 +33,22 @@
 #ifndef LL_LLCACHENAME_H
 #define LL_LLCACHENAME_H
 
+#include <boost/bind.hpp>
+#include <boost/signals.hpp>
+
 class LLMessageSystem;
 class LLHost;
 class LLUUID;
 
-// agent_id/group_id, first_name, last_name, is_group, user_data
-typedef void (*LLCacheNameCallback)(const LLUUID&, const std::string&, const std::string&, BOOL, void*);
+
+typedef boost::signal<void (const LLUUID& id,
+							const std::string& first_name,
+							const std::string& last_name,
+							BOOL is_group)> LLCacheNameSignal;
+typedef LLCacheNameSignal::slot_type LLCacheNameCallback;
+
+// Old callback with user data for compatability
+typedef void (*old_callback_t)(const LLUUID&, const std::string&, const std::string&, BOOL, void*);
 
 // Here's the theory:
 // If you request a name that isn't in the cache, it returns "waiting"
@@ -59,10 +69,7 @@ public:
 	// for simulators, this is the data server
 	void setUpstream(const LLHost& upstream_host);
 
-	void addObserver(LLCacheNameCallback callback);
-	void removeObserver(LLCacheNameCallback callback);
-
-	void cancelCallback(const LLUUID& id, LLCacheNameCallback callback, void* user_data = NULL);
+	boost::signals::connection addObserver(const LLCacheNameCallback& callback);
 
 	// janky old format. Remove after a while. Phoenix. 2008-01-30
 	void importFile(LLFILE* fp);
@@ -89,11 +96,10 @@ public:
 	// If the data is currently available, may call the callback immediatly
 	// otherwise, will request the data, and will call the callback when
 	// available.  There is no garuntee the callback will ever be called.
-	void get(const LLUUID& id, BOOL is_group, LLCacheNameCallback callback, void* user_data = NULL);
+	boost::signals::connection get(const LLUUID& id, BOOL is_group, const LLCacheNameCallback& callback);
 	
 	// LEGACY
-	void getName(const LLUUID& id, LLCacheNameCallback callback, void* user_data = NULL)
-			{ get(id, FALSE, callback, user_data); }
+	boost::signals::connection get(const LLUUID& id, BOOL is_group, old_callback_t callback, void* user_data);
 
 	// This method needs to be called from time to time to send out
 	// requests.
@@ -107,7 +113,8 @@ public:
 	void dumpStats();	// Dumps the sizes of the cache and associated queues.
 
 	static std::string getDefaultName();
-
+	static void LocalizeCacheName(std::string key, std::string value);
+	static std::map<std::string, std::string> sCacheName;
 private:
 
 	class Impl;
diff --git a/indra/llmessage/llhttpclientadapter.cpp b/indra/llmessage/llhttpclientadapter.cpp
index bbb56960df..b6988224ce 100644
--- a/indra/llmessage/llhttpclientadapter.cpp
+++ b/indra/llmessage/llhttpclientadapter.cpp
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2009&license=viewergpl$
  * 
- * Copyright (c) 2001-2009, Linden Research, Inc.
+ * Copyright (c) 2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/llmessage/llhttpclientadapter.h b/indra/llmessage/llhttpclientadapter.h
index d5f3aeaf2c..7f76390d0c 100644
--- a/indra/llmessage/llhttpclientadapter.h
+++ b/indra/llmessage/llhttpclientadapter.h
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2001-2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
@@ -33,7 +34,7 @@
 #define LL_HTTPCLIENTADAPTER_H
 
 #include "llhttpclientinterface.h"
-#include "llmemory.h"	// LLSingleton<>
+#include "llsingleton.h"	// LLSingleton<>
 
 class LLHTTPClientAdapter : public LLHTTPClientInterface, public LLSingleton<LLHTTPClientAdapter>
 {
diff --git a/indra/llmessage/llhttpclientinterface.h b/indra/llmessage/llhttpclientinterface.h
index 1f13d46447..42a8e5cd0a 100644
--- a/indra/llmessage/llhttpclientinterface.h
+++ b/indra/llmessage/llhttpclientinterface.h
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2001-2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/llmessage/llhttpnode.h b/indra/llmessage/llhttpnode.h
index 17ffd66e8f..3f4da69a1d 100644
--- a/indra/llmessage/llhttpnode.h
+++ b/indra/llmessage/llhttpnode.h
@@ -33,7 +33,8 @@
 #ifndef LL_LLHTTPNODE_H
 #define LL_LLHTTPNODE_H
 
-#include "llmemory.h"
+#include "llpointer.h"
+#include "llrefcount.h"
 #include "llsd.h"
 
 class LLChainIOFactory;
diff --git a/indra/llmessage/llhttpnodeadapter.h b/indra/llmessage/llhttpnodeadapter.h
index 08b5664162..7c3e9d81d1 100644
--- a/indra/llmessage/llhttpnodeadapter.h
+++ b/indra/llmessage/llhttpnodeadapter.h
@@ -3,26 +3,27 @@
  * @brief Declaration of llhttpnode adapter classes
  *
  * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
+ * 
  * Copyright (c) 2009, Linden Research, Inc.
- *
+ * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
  * to you under the terms of the GNU General Public License, version 2.0
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
  * and agree to abide by those obligations.
- *
+ * 
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp
index 44be3ae388..aa64232e42 100644
--- a/indra/llmessage/llinstantmessage.cpp
+++ b/indra/llmessage/llinstantmessage.cpp
@@ -41,7 +41,7 @@
 #include "llsd.h"
 #include "llsdserialize.h"
 #include "llsdutil.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "message.h"
 
 #include "message.h"
diff --git a/indra/llmessage/llinstantmessage.h b/indra/llmessage/llinstantmessage.h
index 9ce6a10c80..272e753f3c 100644
--- a/indra/llmessage/llinstantmessage.h
+++ b/indra/llmessage/llinstantmessage.h
@@ -36,7 +36,8 @@
 #include "llhost.h"
 #include "lluuid.h"
 #include "llsd.h"
-#include "llmemory.h"
+#include "llrefcount.h"
+#include "llpointer.h"
 #include "v3math.h"
 
 class LLMessageSystem;
diff --git a/indra/llmessage/llmessagesenderinterface.h b/indra/llmessage/llmessagesenderinterface.h
index 4082666339..119eb1d7f7 100644
--- a/indra/llmessage/llmessagesenderinterface.h
+++ b/indra/llmessage/llmessagesenderinterface.h
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2001-2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/llmessage/llregionpresenceverifier.cpp b/indra/llmessage/llregionpresenceverifier.cpp
index 552cf4cbdb..0527d5cb8d 100644
--- a/indra/llmessage/llregionpresenceverifier.cpp
+++ b/indra/llmessage/llregionpresenceverifier.cpp
@@ -4,14 +4,25 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
- * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
- * this source code is governed by the Linden Lab Source Code Disclosure
- * Agreement ("Agreement") previously entered between you and Linden
- * Lab. By accessing, using, copying, modifying or distributing this
- * software, you acknowledge that you have been informed of your
- * obligations under the Agreement and agree to abide by those obligations.
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
  * 
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
diff --git a/indra/llmessage/llregionpresenceverifier.h b/indra/llmessage/llregionpresenceverifier.h
index d1de608ec6..10602450d8 100644
--- a/indra/llmessage/llregionpresenceverifier.h
+++ b/indra/llmessage/llregionpresenceverifier.h
@@ -4,14 +4,25 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
- * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
- * this source code is governed by the Linden Lab Source Code Disclosure
- * Agreement ("Agreement") previously entered between you and Linden
- * Lab. By accessing, using, copying, modifying or distributing this
- * software, you acknowledge that you have been informed of your
- * obligations under the Agreement and agree to abide by those obligations.
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
  * 
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
diff --git a/indra/llmessage/llstoredmessage.cpp b/indra/llmessage/llstoredmessage.cpp
index 615eff405d..32cbb15cb3 100644
--- a/indra/llmessage/llstoredmessage.cpp
+++ b/indra/llmessage/llstoredmessage.cpp
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2009&license=viewergpl$
  * 
- * Copyright (c) 2001-2009, Linden Research, Inc.
+ * Copyright (c) 2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
diff --git a/indra/llmessage/llstoredmessage.h b/indra/llmessage/llstoredmessage.h
index e817f19bd2..5069c2cb2e 100644
--- a/indra/llmessage/llstoredmessage.h
+++ b/indra/llmessage/llstoredmessage.h
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2009&license=viewergpl$
  * 
- * Copyright (c) 2001-2009, Linden Research, Inc.
+ * Copyright (c) 2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
diff --git a/indra/llmessage/lltemplatemessagedispatcher.cpp b/indra/llmessage/lltemplatemessagedispatcher.cpp
index 3bbf3a058d..ab1beb362b 100644
--- a/indra/llmessage/lltemplatemessagedispatcher.cpp
+++ b/indra/llmessage/lltemplatemessagedispatcher.cpp
@@ -3,26 +3,27 @@
  * @brief LLTemplateMessageDispatcher class
  *
  * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
  * to you under the terms of the GNU General Public License, version 2.0
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
  * and agree to abide by those obligations.
- *
+ * 
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/lltemplatemessagedispatcher.h b/indra/llmessage/lltemplatemessagedispatcher.h
index b1e74f47bb..fa861e4e42 100644
--- a/indra/llmessage/lltemplatemessagedispatcher.h
+++ b/indra/llmessage/lltemplatemessagedispatcher.h
@@ -3,26 +3,27 @@
  * @brief LLTemplateMessageDispatcher class
  *
  * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
  * to you under the terms of the GNU General Public License, version 2.0
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
  * and agree to abide by those obligations.
- *
+ * 
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/lltransfersourceasset.cpp b/indra/llmessage/lltransfersourceasset.cpp
index a4d59275b9..059c1bdfa1 100644
--- a/indra/llmessage/lltransfersourceasset.cpp
+++ b/indra/llmessage/lltransfersourceasset.cpp
@@ -270,6 +270,7 @@ bool is_asset_fetch_by_id_allowed(LLAssetType::EType type)
 	case LLAssetType::AT_BODYPART:
 	case LLAssetType::AT_ANIMATION:
 	case LLAssetType::AT_GESTURE:
+	case LLAssetType::AT_FAVORITE:
 		rv = true;
 		break;
 	default:
@@ -292,6 +293,7 @@ bool is_asset_id_knowable(LLAssetType::EType type)
 	case LLAssetType::AT_BODYPART:
 	case LLAssetType::AT_ANIMATION:
 	case LLAssetType::AT_GESTURE:
+	case LLAssetType::AT_FAVORITE:
 		rv = true;
 		break;
 	default:
diff --git a/indra/llmessage/lltrustedmessageservice.cpp b/indra/llmessage/lltrustedmessageservice.cpp
index c1a6c437a7..505ece57b0 100644
--- a/indra/llmessage/lltrustedmessageservice.cpp
+++ b/indra/llmessage/lltrustedmessageservice.cpp
@@ -3,26 +3,27 @@
  * @brief LLTrustedMessageService implementation
  *
  * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
  * to you under the terms of the GNU General Public License, version 2.0
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
  * and agree to abide by those obligations.
- *
+ * 
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/lltrustedmessageservice.h b/indra/llmessage/lltrustedmessageservice.h
index bc824565f1..dc37702471 100644
--- a/indra/llmessage/lltrustedmessageservice.h
+++ b/indra/llmessage/lltrustedmessageservice.h
@@ -3,26 +3,27 @@
  * @brief LLTrustedMessageService class
  *
  * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
  * to you under the terms of the GNU General Public License, version 2.0
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
  * and agree to abide by those obligations.
- *
+ * 
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h
index b25b27eb0f..3d7d8984ad 100644
--- a/indra/llmessage/message.h
+++ b/indra/llmessage/message.h
@@ -59,10 +59,10 @@
 #include "llhttpclient.h"
 #include "llhttpnode.h"
 #include "llpacketack.h"
+#include "llsingleton.h"
 #include "message_prehash.h"
 #include "llstl.h"
 #include "llmsgvariabletype.h"
-#include "llmsgvariabletype.h"
 #include "llmessagesenderinterface.h"
 
 #include "llstoredmessage.h"
diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp
index 43b5f8e224..4e657067cd 100644
--- a/indra/llmessage/message_prehash.cpp
+++ b/indra/llmessage/message_prehash.cpp
@@ -405,7 +405,7 @@ char* _PREHASH_GlobalX = LLMessageStringTable::getInstance()->getString("GlobalX
 char* _PREHASH_GlobalY = LLMessageStringTable::getInstance()->getString("GlobalY");
 char* _PREHASH_CopyRotates = LLMessageStringTable::getInstance()->getString("CopyRotates");
 char* _PREHASH_KickUserAck = LLMessageStringTable::getInstance()->getString("KickUserAck");
-char* _PREHASH_TopPick = LLMessageStringTable::getInstance()->getString("TopPick");
+char* _PREHASH_TopPick = LLMessageStringTable::getInstance()->getString("TopPick"); 	//legacy var  need to be deleted -angela
 char* _PREHASH_SessionID = LLMessageStringTable::getInstance()->getString("SessionID");
 char* _PREHASH_GlobalZ = LLMessageStringTable::getInstance()->getString("GlobalZ");
 char* _PREHASH_DeclineFriendship = LLMessageStringTable::getInstance()->getString("DeclineFriendship");
diff --git a/indra/llmessage/tests/commtest.h b/indra/llmessage/tests/commtest.h
index 7360230451..cf1461ed2b 100644
--- a/indra/llmessage/tests/commtest.h
+++ b/indra/llmessage/tests/commtest.h
@@ -5,7 +5,30 @@
  * @brief  
  * 
  * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
  * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
 
diff --git a/indra/llmessage/tests/llcurl_stub.cpp b/indra/llmessage/tests/llcurl_stub.cpp
index 9d1d3fa221..afd38b0655 100644
--- a/indra/llmessage/tests/llcurl_stub.cpp
+++ b/indra/llmessage/tests/llcurl_stub.cpp
@@ -3,16 +3,16 @@
  * @brief stub class to allow unit testing
  *
  * $LicenseInfo:firstyear=2008&license=internal$
- *
- * Copyright (c) 2008, Linden Research, Inc.
- *
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
  * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
  * this source code is governed by the Linden Lab Source Code Disclosure
- * Agreement ("Agreement") { }
+ * Agreement ("Agreement") previously entered between you and Linden
  * Lab. By accessing, using, copying, modifying or distributing this
  * software, you acknowledge that you have been informed of your
  * obligations under the Agreement and agree to abide by those obligations.
- *
+ * 
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/tests/llhttpclientadapter_test.cpp b/indra/llmessage/tests/llhttpclientadapter_test.cpp
index bde76db08b..250fa100b6 100644
--- a/indra/llmessage/tests/llhttpclientadapter_test.cpp
+++ b/indra/llmessage/tests/llhttpclientadapter_test.cpp
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2001-2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
index a6f5659352..d57f17f270 100644
--- a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
+++ b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
@@ -3,26 +3,27 @@
  * @brief LLTrustedMessageService unit tests
  *
  * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
  * to you under the terms of the GNU General Public License, version 2.0
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
  * and agree to abide by those obligations.
- *
+ * 
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/tests/lltesthttpclientadapter.cpp b/indra/llmessage/tests/lltesthttpclientadapter.cpp
index 1140458918..9bb597feec 100644
--- a/indra/llmessage/tests/lltesthttpclientadapter.cpp
+++ b/indra/llmessage/tests/lltesthttpclientadapter.cpp
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=internal$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
  * this source code is governed by the Linden Lab Source Code Disclosure
diff --git a/indra/llmessage/tests/lltesthttpclientadapter.h b/indra/llmessage/tests/lltesthttpclientadapter.h
index d032503685..8853fc44ec 100644
--- a/indra/llmessage/tests/lltesthttpclientadapter.h
+++ b/indra/llmessage/tests/lltesthttpclientadapter.h
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=internal$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
  * this source code is governed by the Linden Lab Source Code Disclosure
diff --git a/indra/llmessage/tests/lltestmessagesender.cpp b/indra/llmessage/tests/lltestmessagesender.cpp
index a37aa4c566..2c8456e0a8 100644
--- a/indra/llmessage/tests/lltestmessagesender.cpp
+++ b/indra/llmessage/tests/lltestmessagesender.cpp
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=internal$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
  * this source code is governed by the Linden Lab Source Code Disclosure
diff --git a/indra/llmessage/tests/lltestmessagesender.h b/indra/llmessage/tests/lltestmessagesender.h
index 83c0eff4d3..dfbef6be64 100644
--- a/indra/llmessage/tests/lltestmessagesender.h
+++ b/indra/llmessage/tests/lltestmessagesender.h
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=internal$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
  * this source code is governed by the Linden Lab Source Code Disclosure
diff --git a/indra/llmessage/tests/lltrustedmessageservice_test.cpp b/indra/llmessage/tests/lltrustedmessageservice_test.cpp
index 44595391df..0a3da4b467 100644
--- a/indra/llmessage/tests/lltrustedmessageservice_test.cpp
+++ b/indra/llmessage/tests/lltrustedmessageservice_test.cpp
@@ -3,26 +3,27 @@
  * @brief LLTrustedMessageService unit tests
  *
  * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
  * to you under the terms of the GNU General Public License, version 2.0
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
  * and agree to abide by those obligations.
- *
+ * 
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/tests/networkio.h b/indra/llmessage/tests/networkio.h
index 11c5cc07fc..0ebe369ea2 100644
--- a/indra/llmessage/tests/networkio.h
+++ b/indra/llmessage/tests/networkio.h
@@ -5,7 +5,30 @@
  * @brief  
  * 
  * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
  * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
 
diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp
index 4c22203eb9..18787c47c5 100644
--- a/indra/llprimitive/llmaterialtable.cpp
+++ b/indra/llprimitive/llmaterialtable.cpp
@@ -124,6 +124,17 @@ LLMaterialTable::~LLMaterialTable()
 	mMaterialInfoList.clear();
 }
 
+void LLMaterialTable::initTableTransNames(std::map<std::string, std::string> namemap)
+{
+	for (info_list_t::iterator iter = mMaterialInfoList.begin();
+		 iter != mMaterialInfoList.end(); ++iter)
+	{
+		LLMaterialInfo *infop = *iter;
+		std::string name = infop->mName;
+		infop->mName = namemap[name];
+	}
+}
+
 void LLMaterialTable::initBasicTable()
 {
 	// *TODO: Translate
diff --git a/indra/llprimitive/llmaterialtable.h b/indra/llprimitive/llmaterialtable.h
index ca9017abd0..2c0b046fa7 100644
--- a/indra/llprimitive/llmaterialtable.h
+++ b/indra/llprimitive/llmaterialtable.h
@@ -147,6 +147,8 @@ public:
 
 	void initBasicTable();
 
+	void initTableTransNames(std::map<std::string, std::string> namemap);
+	
 	BOOL add(U8 mcode, const std::string& name, const LLUUID &uuid);	                 
 	BOOL addCollisionSound(U8 mcode, U8 mcode2, const LLUUID &uuid);
 	BOOL addSlidingSound(U8 mcode, U8 mcode2, const LLUUID &uuid);
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index c25df0a40f..b3a337ce5d 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -37,7 +37,7 @@
 #include "v3math.h"
 #include "xform.h"
 #include "message.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llvolume.h"
 #include "lltextureentry.h"
 #include "llprimtexturelist.h"
diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp
index c9632ebdad..d03150fc78 100644
--- a/indra/llprimitive/llprimtexturelist.cpp
+++ b/indra/llprimitive/llprimtexturelist.cpp
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008-2007, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/llprimitive/llprimtexturelist.h b/indra/llprimitive/llprimtexturelist.h
index 61285bd1bf..6254878b99 100644
--- a/indra/llprimitive/llprimtexturelist.h
+++ b/indra/llprimitive/llprimtexturelist.h
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008-2007, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp
index f6321b0534..052510e6ed 100644
--- a/indra/llrender/llfontbitmapcache.cpp
+++ b/indra/llrender/llfontbitmapcache.cpp
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/llrender/llfontbitmapcache.h b/indra/llrender/llfontbitmapcache.h
index e5c09f8826..4beea0d026 100644
--- a/indra/llrender/llfontbitmapcache.h
+++ b/indra/llrender/llfontbitmapcache.h
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index beecb6b7c1..048bfe8e0d 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -32,16 +32,20 @@
 
 #include "linden_common.h"
 
-#include <boost/tokenizer.hpp>
+#include "llfontgl.h"
 
+// Linden library includes
 #include "llfont.h"
-#include "llfontgl.h"
 #include "llfontbitmapcache.h"
 #include "llfontregistry.h"
 #include "llgl.h"
+#include "llimagegl.h"
 #include "llrender.h"
-#include "v4color.h"
 #include "llstl.h"
+#include "v4color.h"
+
+// Third party library includes
+#include <boost/tokenizer.hpp>
 
 const S32 BOLD_OFFSET = 1;
 
@@ -102,14 +106,6 @@ U8 LLFontGL::getStyleFromString(const std::string &style)
 	{
 		ret |= UNDERLINE;
 	}
-	if (style.find("SHADOW") != style.npos)
-	{
-		ret |= DROP_SHADOW;
-	}
-	if (style.find("SOFT_SHADOW") != style.npos)
-	{
-		ret |= DROP_SHADOW_SOFT;
-	}
 	return ret;
 }
 
@@ -215,11 +211,11 @@ bool findOrCreateFont(LLFontGL*& fontp, const LLFontDescriptor& desc)
 }
 
 // static
-BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale,
+void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale,
 								const std::string& app_dir,
-								const std::vector<std::string>& xui_paths)
+								const std::vector<std::string>& xui_paths,
+								bool create_gl_textures)
 {
-	bool succ = true;
 	sVertDPI = (F32)llfloor(screen_dpi * y_scale);
 	sHorizDPI = (F32)llfloor(screen_dpi * x_scale);
 	sScaleX = x_scale;
@@ -229,24 +225,30 @@ BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale,
 	// Font registry init
 	if (!sFontRegistry)
 	{
-		sFontRegistry = new LLFontRegistry(xui_paths);
+		sFontRegistry = new LLFontRegistry(xui_paths, create_gl_textures);
 		sFontRegistry->parseFontInfo("fonts.xml");
 	}
 	else
 	{
 		sFontRegistry->reset();
 	}
+}
 
-	// Force standard fonts to get generated up front.
-	// This is primarily for error detection purposes.
- 	succ &= (NULL != getFontSansSerifSmall());
- 	succ &= (NULL != getFontSansSerif());
- 	succ &= (NULL != getFontSansSerifBig());
- 	succ &= (NULL != getFontSansSerifHuge());
- 	succ &= (NULL != getFontSansSerifBold());
- 	succ &= (NULL != getFontMonospace());
+// Force standard fonts to get generated up front.
+// This is primarily for error detection purposes.
+// Don't do this during initClass because it can be slow and we want to get
+// the viewer window on screen first. JC
+// static
+bool LLFontGL::loadDefaultFonts()
+{
+	bool succ = true;
+	succ &= (NULL != getFontSansSerifSmall());
+	succ &= (NULL != getFontSansSerif());
+	succ &= (NULL != getFontSansSerifBig());
+	succ &= (NULL != getFontSansSerifHuge());
+	succ &= (NULL != getFontSansSerifBold());
+	succ &= (NULL != getFontMonospace());
 	succ &= (NULL != getFontExtChar());
-	
 	return succ;
 }
 
@@ -341,6 +343,34 @@ LLFontGL* LLFontGL::getFont(const LLFontDescriptor& desc)
 	return sFontRegistry->getFont(desc);
 }
 
+//static
+LLFontGL* LLFontGL::getFontByName(const std::string& name)
+{
+	// check for most common fonts first
+	if (name == "SANSSERIF")
+	{
+		return getFontSansSerif();
+	}
+	else if (name == "SANSSERIF_SMALL")
+	{
+		return getFontSansSerifSmall();
+	}
+	else if (name == "SANSSERIF_BIG")
+	{
+		return getFontSansSerifBig();
+	}
+	else if (name == "SMALL" || name == "OCRA")
+	{
+		// *BUG: Should this be "MONOSPACE"?  Do we use "OCRA" anymore?
+		// Does "SMALL" mean "SERIF"?
+		return getFontMonospace();
+	}
+	else
+	{
+		return NULL;
+	}
+}
+
 BOOL LLFontGL::addChar(const llwchar wch) const
 {
 	if (!LLFont::addChar(wch))
@@ -364,12 +394,13 @@ S32 LLFontGL::renderUTF8(const std::string &text, const S32 offset,
 					 const LLColor4 &color,
 					 const HAlign halign, const VAlign valign,
 					 U8 style,
+					 ShadowType shadow,
 					 const S32 max_chars, const S32 max_pixels,
 					 F32* right_x,
 					 BOOL use_ellipses) const
 {
 	LLWString wstr = utf8str_to_wstring(text);
-	return render(wstr, offset, x, y, color, halign, valign, style, max_chars, max_pixels, right_x, FALSE, use_ellipses);
+	return render(wstr, offset, x, y, color, halign, valign, style, shadow, max_chars, max_pixels, right_x, FALSE, use_ellipses);
 }
 
 S32 LLFontGL::render(const LLWString &wstr, 
@@ -378,6 +409,7 @@ S32 LLFontGL::render(const LLWString &wstr,
 					 const LLColor4 &color,
 					 const HAlign halign, const VAlign valign,
 					 U8 style,
+					 ShadowType shadow,
 					 const S32 max_chars, S32 max_pixels,
 					 F32* right_x,
 					 BOOL use_embedded,
@@ -401,14 +433,14 @@ S32 LLFontGL::render(const LLWString &wstr,
 	style = style & (~getFontDesc().getStyle());
 
 	F32 drop_shadow_strength = 0.f;
-	if (style & (DROP_SHADOW | DROP_SHADOW_SOFT))
+	if (shadow != NO_SHADOW)
 	{
 		F32 luminance;
 		color.calcHSL(NULL, NULL, &luminance);
 		drop_shadow_strength = clamp_rescale(luminance, 0.35f, 0.6f, 0.f, 1.f);
 		if (luminance < 0.35f)
 		{
-			style = style & ~(DROP_SHADOW | DROP_SHADOW_SOFT);
+			shadow = NO_SHADOW;
 		}
 	}
 
@@ -547,7 +579,7 @@ S32 LLFontGL::render(const LLWString &wstr,
 
 			LLRectf uv_rect(0.f, 1.f, 1.f, 0.f);
 			LLRectf screen_rect(ext_x, ext_y + ext_height, ext_x + ext_width, ext_y);
-			drawGlyph(screen_rect, uv_rect, LLColor4::white, style, drop_shadow_strength);
+			drawGlyph(screen_rect, uv_rect, LLColor4::white, style, shadow, drop_shadow_strength);
 
 			if (!label.empty())
 			{
@@ -559,7 +591,7 @@ S32 LLFontGL::render(const LLWString &wstr,
 									 /*llfloor*/((ext_x + (F32)ext_image->getWidth() + EXT_X_BEARING) / sScaleX), 
 									 /*llfloor*/(cur_y / sScaleY),
 									 color,
-									 halign, BASELINE, NORMAL, S32_MAX, S32_MAX, NULL,
+									 halign, BASELINE, NORMAL, NO_SHADOW, S32_MAX, S32_MAX, NULL,
 									 TRUE );
 				gGL.popMatrix();
 			}
@@ -613,7 +645,7 @@ S32 LLFontGL::render(const LLWString &wstr,
 					    llround(cur_render_x + (F32)fgi->mXBearing) + (F32)fgi->mWidth,
 					    llround(cur_render_y + (F32)fgi->mYBearing) - (F32)fgi->mHeight);
 			
-			drawGlyph(screen_rect, uv_rect, color, style, drop_shadow_strength);
+			drawGlyph(screen_rect, uv_rect, color, style, shadow, drop_shadow_strength);
 
 			chars_drawn++;
 			cur_x += fgi->mXAdvance;
@@ -671,6 +703,7 @@ S32 LLFontGL::render(const LLWString &wstr,
 				color,
 				LEFT, valign,
 				style,
+				shadow,
 				S32_MAX, max_pixels,
 				right_x,
 				FALSE); 
@@ -838,13 +871,28 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch
 			{
 				if (iswspace(wch))
 				{
-					in_word = FALSE;
+					if(wch !=(0x00A0))
+					{
+						in_word = FALSE;
+					}
+				}
+				if (iswindividual(wch))
+				{
+					if (iswpunct(wchars[i+1]))
+					{
+						in_word=TRUE;
+					}
+					else
+					{
+						in_word=FALSE;
+						start_of_last_word = i;
+					}
 				}
 			}
 			else
 			{
 				start_of_last_word = i;
-				if (!iswspace(wch))
+				if (!iswspace(wch)||!iswindividual(wch))
 				{
 					in_word = TRUE;
 				}
@@ -1108,7 +1156,7 @@ void LLFontGL::renderQuad(const LLRectf& screen_rect, const LLRectf& uv_rect, F3
 				llfont_round_y(screen_rect.mBottom));
 }
 
-void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4& color, U8 style, F32 drop_shadow_strength) const
+void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4& color, U8 style, ShadowType shadow, F32 drop_shadow_strength) const
 {
 	F32 slant_offset;
 	slant_offset = ((style & ITALIC) ? ( -mAscender * 0.2f) : 0.f);
@@ -1128,7 +1176,7 @@ void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, con
 				renderQuad(screen_rect_offset, uv_rect, slant_offset);
 			}
 		}
-		else if (style & DROP_SHADOW_SOFT)
+		else if (shadow == DROP_SHADOW_SOFT)
 		{
 			LLColor4 shadow_color = LLFontGL::sShadowColor;
 			shadow_color.mV[VALPHA] = color.mV[VALPHA] * drop_shadow_strength * DROP_SHADOW_SOFT_STRENGTH;
@@ -1161,7 +1209,7 @@ void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, con
 			gGL.color4fv(color.mV);
 			renderQuad(screen_rect, uv_rect, slant_offset);
 		}
-		else if (style & DROP_SHADOW)
+		else if (shadow == DROP_SHADOW)
 		{
 			LLColor4 shadow_color = LLFontGL::sShadowColor;
 			shadow_color.mV[VALPHA] = color.mV[VALPHA] * drop_shadow_strength;
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index 6cb1727ff4..204c6908af 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -34,16 +34,15 @@
 #ifndef LL_LLFONTGL_H
 #define LL_LLFONTGL_H
 
-#include "llfont.h"
-#include "llimagegl.h"
-#include "v2math.h"
 #include "llcoord.h"
-#include "llrect.h"
-
+#include "llfont.h"
 #include "llfontregistry.h"
+#include "llpointer.h"
+#include "llrect.h"
+#include "v2math.h"
 
 class LLColor4;
-
+class LLImageGL;
 // Key used to request a font.
 class LLFontDescriptor;
 
@@ -73,12 +72,18 @@ public:
 	enum StyleFlags
 	{
 		// text style to render.  May be combined (these are bit flags)
+		// TODO:: Maybe change the value to  0x01 << 0 for 1   0x01 << 1 for 2,  0x01 << 2 for 4
 		NORMAL = 0,	
 		BOLD = 1,
 		ITALIC = 2,
-		UNDERLINE = 4,
-		DROP_SHADOW = 8,
-		DROP_SHADOW_SOFT = 16
+		UNDERLINE = 4
+	};
+
+	enum ShadowType
+	{
+		NO_SHADOW,
+		DROP_SHADOW,
+		DROP_SHADOW_SOFT
 	};
 	
 	// Takes a string with potentially several flags, i.e. "NORMAL|BOLD|ITALIC"
@@ -93,10 +98,14 @@ public:
 
 	LLFontGL &operator=(const LLFontGL &source);
 
-	static BOOL initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale,
+	static void initClass(F32 screen_dpi, F32 x_scale, F32 y_scale,
 								 const std::string& app_dir,
-								 const std::vector<std::string>& xui_paths);
+								 const std::vector<std::string>& xui_paths,
+								 bool create_gl_textures = true);
 
+	// Load sans-serif, sans-serif-small, etc.
+	// Slow, requires multiple seconds to load fonts.
+	static bool loadDefaultFonts();
 	static void	destroyDefaultFonts();
 	static void destroyAllGL();
 	void destroyGL();
@@ -111,17 +120,17 @@ public:
 				   const LLColor4 &color) const
 	{
 		return renderUTF8(text, begin_offset, (F32)x, (F32)y, color,
-						  LEFT, BASELINE, NORMAL,
-						  S32_MAX, S32_MAX, NULL, FALSE);
+							LEFT, BASELINE, NORMAL, NO_SHADOW,
+							S32_MAX, S32_MAX, NULL, FALSE);
 	}
 	
 	S32 renderUTF8(const std::string &text, const S32 begin_offset,
 				   S32 x, S32 y,
 				   const LLColor4 &color,
-				   HAlign halign, VAlign valign, U8 style = NORMAL) const
+				   HAlign halign, VAlign valign, U8 style = NORMAL, ShadowType shadow = NO_SHADOW) const
 	{
 		return renderUTF8(text, begin_offset, (F32)x, (F32)y, color,
-						  halign, valign, style,
+						  halign, valign, style, shadow,
 						  S32_MAX, S32_MAX, NULL, FALSE);
 	}
 	
@@ -133,6 +142,7 @@ public:
 		HAlign halign, 
 		VAlign valign,
 		U8 style,
+		ShadowType shadow,
 		S32 max_chars,
 		S32 max_pixels, 
 		F32* right_x,
@@ -143,7 +153,7 @@ public:
 			   const LLColor4 &color) const
 	{
 		return render(text, begin_offset, x, y, color,
-					  LEFT, BASELINE, NORMAL,
+					  LEFT, BASELINE, NORMAL, NO_SHADOW,
 					  S32_MAX, S32_MAX, NULL, FALSE, FALSE);
 	}
 	
@@ -155,6 +165,7 @@ public:
 		HAlign halign = LEFT, 
 		VAlign valign = BASELINE,
 		U8 style = NORMAL,
+		ShadowType shadow = NO_SHADOW,
 		S32 max_chars = S32_MAX,
 		S32 max_pixels = S32_MAX, 
 		F32* right_x=NULL,
@@ -220,7 +231,7 @@ protected:
 	F32 getEmbeddedCharAdvance(const embedded_data_t* ext_data) const;
 	void clearEmbeddedChars();
 	void renderQuad(const LLRectf& screen_rect, const LLRectf& uv_rect, F32 slant_amt) const;
-	void drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4& color, U8 style, F32 drop_shadow_fade) const;
+	void drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4& color, U8 style, ShadowType shadow, F32 drop_shadow_fade) const;
 
 public:
 	static F32 sVertDPI;
@@ -238,6 +249,8 @@ public:
 	static LLFontGL* getFontSansSerifBold();
 	static LLFontGL* getFontExtChar();
 	static LLFontGL* getFont(const LLFontDescriptor& desc);
+	// Use with legacy names like "SANSSERIF_SMALL" or "OCRA"
+	static LLFontGL* getFontByName(const std::string& name);
 
 	static LLColor4 sShadowColor;
 
diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp
index 9b5bc5d0af..18e4a6915d 100644
--- a/indra/llrender/llfontregistry.cpp
+++ b/indra/llrender/llfontregistry.cpp
@@ -5,7 +5,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -13,12 +13,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
@@ -167,7 +168,9 @@ LLFontDescriptor LLFontDescriptor::normalize() const
 	return LLFontDescriptor(new_name,new_size,new_style,getFileNames());
 }
 
-LLFontRegistry::LLFontRegistry(const string_vec_t& xui_paths)
+LLFontRegistry::LLFontRegistry(const string_vec_t& xui_paths,
+							   bool create_gl_textures)
+:	mCreateGLTextures(create_gl_textures)
 {
 	// Propagate this down from LLUICtrlFactory so LLRender doesn't
 	// need an upstream dependency on LLUI.
@@ -215,8 +218,8 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename)
 			success = success || init_succ;
 		}
 	}
-	if (success)
-		dump();
+	//if (success)
+	//	dump();
 	
 	return success;
 }
@@ -426,7 +429,9 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
 	{
 		LLFontGL *fontp = new LLFontGL;
 		std::string font_path = local_path + *file_name_it;
-		BOOL is_fallback = !is_first_found;
+		// *HACK: Fallback fonts don't render, so we can use that to suppress
+		// creation of OpenGL textures for test apps. JC
+		BOOL is_fallback = !is_first_found || !mCreateGLTextures;
 		F32 extra_scale = (is_fallback)?fallback_scale:1.0;
 		if (!fontp->loadFace(font_path, extra_scale * point_size,
 							 LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback))
diff --git a/indra/llrender/llfontregistry.h b/indra/llrender/llfontregistry.h
index ed775eeed0..198ca0b920 100644
--- a/indra/llrender/llfontregistry.h
+++ b/indra/llrender/llfontregistry.h
@@ -5,7 +5,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -13,12 +13,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
@@ -70,7 +71,10 @@ private:
 class LLFontRegistry
 {
 public:
-	LLFontRegistry(const string_vec_t& xui_paths);
+	// create_gl_textures - set to false for test apps with no OpenGL window,
+	// such as llui_libtest
+	LLFontRegistry(const string_vec_t& xui_paths,
+		bool create_gl_textures);
 	~LLFontRegistry();
 
 	// Load standard font info from XML file(s).
@@ -108,6 +112,7 @@ private:
 
 	string_vec_t mUltimateFallbackList;
 	string_vec_t mXUIPaths;
+	bool mCreateGLTextures;
 };
 
 #endif // LL_LLFONTREGISTRY_H
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 4f737bcaae..53b0b70cae 100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -37,7 +37,8 @@
 #include "llimage.h"
 
 #include "llgltypes.h"
-#include "llmemory.h"
+#include "llpointer.h"
+#include "llrefcount.h"
 #include "v2math.h"
 
 #include "llrender.h"
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 437c715c2f..5b52fa1a52 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -44,7 +44,7 @@
 #include "v3math.h"
 #include "v4coloru.h"
 #include "llstrider.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llglheaders.h"
 
 class LLVertexBuffer;
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 5d88ea464d..fc2a6954c3 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -37,7 +37,6 @@
 #include "llvertexbuffer.h"
 // #include "llrender.h"
 #include "llglheaders.h"
-#include "llmemory.h"
 #include "llmemtype.h"
 #include "llrender.h"
 
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index aad948e17f..b785a22976 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -39,7 +39,6 @@
 #include "v4math.h"
 #include "v4coloru.h"
 #include "llstrider.h"
-#include "llmemory.h"
 #include "llrender.h"
 #include <set>
 #include <vector>
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 5de8dc76af..f3595a7b05 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -31,17 +31,25 @@ set(llui_SOURCE_FILES
     llcheckboxctrl.cpp
     llclipboard.cpp
     llcombobox.cpp
+    llconsole.cpp
+    llcontainerview.cpp
     llctrlselectioninterface.cpp
     lldraghandle.cpp
     lleditmenuhandler.cpp
+    llf32uictrl.cpp
     llfloater.cpp
+    llfloaterreg.cpp
+    llflyoutbutton.cpp 
     llfocusmgr.cpp
     llfunctorregistry.cpp
     lliconctrl.cpp
+    llinitparam.cpp
     llkeywords.cpp
+    lllayoutstack.cpp
     lllineeditor.cpp
     llmenugl.cpp
     llmodaldialog.cpp
+    llmultifloater.cpp 
     llmultislider.cpp
     llmultisliderctrl.cpp
     llnotifications.cpp
@@ -51,27 +59,35 @@ set(llui_SOURCE_FILES
     llresizebar.cpp
     llresizehandle.cpp
     llresmgr.cpp
-    llrootview.cpp
     llscrollbar.cpp
     llscrollcontainer.cpp
     llscrollingpanellist.cpp
+    llscrolllistcell.cpp
+    llscrolllistcolumn.cpp
     llscrolllistctrl.cpp
+    llscrolllistitem.cpp
+    llsdparam.cpp
+    llsearcheditor.cpp 
     llslider.cpp
     llsliderctrl.cpp
     llspinctrl.cpp
+    llstatbar.cpp
+    llstatgraph.cpp
+    llstatview.cpp
     llstyle.cpp
     lltabcontainer.cpp
-    lltabcontainervertical.cpp
     lltextbox.cpp
     lltexteditor.cpp
     lltextparser.cpp
+    lltrans.cpp
     llui.cpp
     lluictrl.cpp
     lluictrlfactory.cpp
+    lluiimage.cpp
     lluistring.cpp
-    lluitrans.cpp
     llundo.cpp
     llviewborder.cpp
+    llviewmodel.cpp
     llview.cpp
     llviewquery.cpp
     )
@@ -85,52 +101,68 @@ set(llui_HEADER_FILES
     llcheckboxctrl.h
     llclipboard.h
     llcombobox.h
+    llconsole.h
+    llcontainerview.h
     llctrlselectioninterface.h
     lldraghandle.h
     lleditmenuhandler.h
+    llf32uictrl.h
     llfloater.h
+    llfloaterreg.h
+    llflyoutbutton.h 
     llfocusmgr.h
     llfunctorregistry.h
     llhtmlhelp.h
     lliconctrl.h
+    llinitparam.h
     llkeywords.h
+    lllayoutstack.h
+    lllazyvalue.h
     lllineeditor.h
-    llmemberlistener.h
     llmenugl.h
     llmodaldialog.h
+    llmultifloater.h 
     llmultisliderctrl.h
     llmultislider.h
     llnotifications.h
     llpanel.h
     llprogressbar.h
     llradiogroup.h
+    llregistry.h
     llresizebar.h
     llresizehandle.h
     llresmgr.h
-    llrootview.h
+    llsearcheditor.h 
     llscrollbar.h
     llscrollcontainer.h
     llscrollingpanellist.h
+    llscrolllistcell.h
+    llscrolllistcolumn.h
     llscrolllistctrl.h
+    llscrolllistitem.h
+    llsdparam.h
     llsliderctrl.h
     llslider.h
     llspinctrl.h
+    llstatbar.h
+    llstatgraph.h
+    llstatview.h
     llstyle.h
     lltabcontainer.h
-    lltabcontainervertical.h
     lltextbox.h
     lltexteditor.h
     lltextparser.h
+    lltrans.h
     lluiconstants.h
     lluictrlfactory.h
     lluictrl.h
     lluifwd.h
     llui.h
+    lluiimage.h
     lluistring.h
-    lluitrans.h
-    lluixmltags.h
     llundo.h
     llviewborder.h
+    llviewmodel.h
     llview.h
     llviewquery.h
     )
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 2c2c1c25d8..1f6cd6ddf9 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -32,6 +32,7 @@
 
 #include "linden_common.h"
 
+#define INSTANTIATE_GETCHILD_BUTTON
 #include "llbutton.h"
 
 // Linden library includes
@@ -45,183 +46,167 @@
 #include "lluiconstants.h"
 #include "llresmgr.h"
 #include "llcriticaldamp.h"
+#include "llfloater.h"
+#include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "llwindow.h"
 #include "llrender.h"
+#include "lluictrlfactory.h"
 
 static LLRegisterWidget<LLButton> r("button");
 
 // globals loaded from settings.xml
-S32	LLBUTTON_ORIG_H_PAD	= 6; // Pre-zoomable UI
 S32	LLBUTTON_H_PAD	= 0;
 S32	LLBUTTON_V_PAD	= 0;
 S32 BTN_HEIGHT_SMALL= 0;
 S32 BTN_HEIGHT		= 0;
 
-S32 BTN_GRID		= 12;
-S32 BORDER_SIZE = 1;
-
-LLButton::LLButton(	const std::string& name, const LLRect& rect, const std::string& control_name, void (*click_callback)(void*), void *callback_data)
-:	LLUICtrl(name, rect, TRUE, NULL, NULL),
-	mClickedCallback( click_callback ),
-	mMouseDownCallback( NULL ),
-	mMouseUpCallback( NULL ),
-	mHeldDownCallback( NULL ),
-	mGLFont( NULL ),
-	mMouseDownFrame( 0 ),
-	mHeldDownDelay( 0.5f ),			// seconds until held-down callback is called
-	mHeldDownFrameDelay( 0 ),
-	mImageUnselected( NULL ),
-	mImageSelected( NULL ),
-	mImageHoverSelected( NULL ),
-	mImageHoverUnselected( NULL ),
-	mImageDisabled( NULL ),
-	mImageDisabledSelected( NULL ),
-	mToggleState( FALSE ),
-	mIsToggle( FALSE ),
-	mScaleImage( TRUE ),
-	mDropShadowedText( TRUE ),
-	mBorderEnabled( FALSE ),
-	mFlashing( FALSE ),
-	mHAlign( LLFontGL::HCENTER ),
-	mLeftHPad( LLBUTTON_H_PAD ),
-	mRightHPad( LLBUTTON_H_PAD ),
-	mHoverGlowStrength(0.15f),
-	mCurGlowStrength(0.f),
-	mNeedsHighlight(FALSE),
-	mCommitOnReturn(TRUE),
-	mImagep( NULL )
+template LLButton* LLView::getChild<LLButton>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
+
+LLButton::Params::Params()
+:	label_selected("label_selected"),				// requires is_toggle true
+	label_dropshadow("label_shadow", true),
+	auto_resize("auto_resize", false),
+	image_unselected("image_unselected"),
+	image_selected("image_selected"),
+	image_hover_selected("image_hover_selected"),
+	image_hover_unselected("image_hover_unselected"),
+	image_disabled_selected("image_disabled_selected"),
+	image_disabled("image_disabled"),
+	image_overlay("image_overlay"),
+	image_overlay_alignment("image_overlay_alignment", std::string("center")),
+	label_color("label_color"),
+	label_color_selected("label_color_selected"),	// requires is_toggle true
+	label_color_disabled("label_color_disabled"),
+	label_color_disabled_selected("label_color_disabled_selected"),
+	highlight_color("highlight_color"),
+	image_color("image_color"),
+	image_color_disabled("image_color_disabled"),
+	image_overlay_color("image_overlay_color", LLColor4::white),
+	flash_color("flash_color"),
+	pad_right("pad_right", LLUI::sSettingGroups["config"]->getS32("ButtonHPad")),
+	pad_left("pad_left", LLUI::sSettingGroups["config"]->getS32("ButtonHPad")),
+	click_callback("click_callback"),
+	mouse_down_callback("mouse_down_callback"),
+	mouse_up_callback("mouse_up_callback"),
+	mouse_held_callback("mouse_held_callback"),
+	mouse_held_once_callback("mouse_held_once_callback"),
+	is_toggle("is_toggle", false),
+	scale_image("scale_image", true),
+	help_url("help_url"),
+	hover_glow_amount("hover_glow_amount"),
+	commit_on_return("commit_on_return", true),
+	picture_style("picture_style", false)
 {
-	mUnselectedLabel = name;
-	mSelectedLabel = name;
-
-	setImageUnselected(std::string("button_enabled_32x128.tga"));
-	setImageSelected(std::string("button_enabled_selected_32x128.tga"));
-	setImageDisabled(std::string("button_disabled_32x128.tga"));
-	setImageDisabledSelected(std::string("button_disabled_32x128.tga"));
-
-	mImageColor = LLUI::sColorsGroup->getColor( "ButtonImageColor" );
-	mDisabledImageColor = LLUI::sColorsGroup->getColor( "ButtonImageColor" );
-
-	init(click_callback, callback_data, NULL, control_name);
+	addSynonym(is_toggle, "toggle");
+	held_down_delay.seconds = 0.5f;
+	initial_value.set(LLSD(false), false);
 }
 
 
-LLButton::LLButton(const std::string& name, const LLRect& rect, 
-				   const std::string &unselected_image_name, 
-				   const std::string &selected_image_name, 
-				   const std::string& control_name,
-				   void (*click_callback)(void*),
-				   void *callback_data,
-				   const LLFontGL *font,
-				   const std::string& unselected_label, 
-				   const std::string& selected_label )
-:	LLUICtrl(name, rect, TRUE, NULL, NULL),
-	mClickedCallback( click_callback ),
-	mMouseDownCallback( NULL ),
-	mMouseUpCallback( NULL ),
-	mHeldDownCallback( NULL ),
-	mGLFont( NULL ),
-	mMouseDownFrame( 0 ),
-	mHeldDownDelay( 0.5f ),			// seconds until held-down callback is called
-	mHeldDownFrameDelay( 0 ),
-	mImageUnselected( NULL ),
-	mImageSelected( NULL ),
-	mImageHoverSelected( NULL ),
-	mImageHoverUnselected( NULL ),
-	mImageDisabled( NULL ),
-	mImageDisabledSelected( NULL ),
-	mToggleState( FALSE ),
-	mIsToggle( FALSE ),
-	mScaleImage( TRUE ),
-	mDropShadowedText( TRUE ),
+LLButton::LLButton(const LLButton::Params& p)
+:	LLUICtrl(p),
+	mMouseDownFrame(0),
+	mMouseHeldDownCount(0),
 	mBorderEnabled( FALSE ),
 	mFlashing( FALSE ),
-	mHAlign( LLFontGL::HCENTER ),
-	mLeftHPad( LLBUTTON_H_PAD ), 
-	mRightHPad( LLBUTTON_H_PAD ),
-	mHoverGlowStrength(0.25f),
 	mCurGlowStrength(0.f),
 	mNeedsHighlight(FALSE),
-	mCommitOnReturn(TRUE),
-	mImagep( NULL )
+	mImagep( NULL ),
+	mUnselectedLabel(p.label()),
+	mSelectedLabel(p.label_selected()),
+	mGLFont(p.font),
+	mHeldDownDelay(p.held_down_delay.seconds),			// seconds until held-down callback is called
+	mHeldDownFrameDelay(p.held_down_delay.frames),
+	mImageUnselected(p.image_unselected),
+	mImageSelected(p.image_selected),
+	mImageDisabled(p.image_disabled),
+	mImageDisabledSelected(p.image_disabled_selected),
+	mImageHoverSelected(p.image_hover_selected),
+	mImageHoverUnselected(p.image_hover_unselected),
+	mUnselectedLabelColor(p.label_color()),
+	mSelectedLabelColor(p.label_color_selected()),
+	mDisabledLabelColor(p.label_color_disabled()),
+	mDisabledSelectedLabelColor(p.label_color_disabled_selected()),
+	mHighlightColor(p.highlight_color()),
+	mImageColor(p.image_color()),
+	mFlashBgColor(p.flash_color()),
+	mDisabledImageColor(p.image_color_disabled()),
+	mImageOverlay(p.image_overlay()),
+	mImageOverlayColor(p.image_overlay_color()),
+	mImageOverlayAlignment(LLFontGL::hAlignFromName(p.image_overlay_alignment)),
+	mIsToggle(p.is_toggle),
+	mScaleImage(p.scale_image),
+	mDropShadowedText(p.label_dropshadow),
+	mAutoResize(p.auto_resize),
+	mHAlign(p.font_halign),
+	mLeftHPad(p.pad_left),
+	mRightHPad(p.pad_right),
+	mHoverGlowStrength(p.hover_glow_amount),
+	mCommitOnReturn(p.commit_on_return),
+	mFadeWhenDisabled(FALSE)
 {
-	mUnselectedLabel = unselected_label;
-	mSelectedLabel = selected_label;
+	static LLUICachedControl<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0);
+	static LLButton::Params default_params(LLUICtrlFactory::getDefaultParams<LLButton::Params>());
 
-	// by default, disabled color is same as enabled
-	mImageColor = LLUI::sColorsGroup->getColor( "ButtonImageColor" );
-	mDisabledImageColor = LLUI::sColorsGroup->getColor( "ButtonImageColor" );
-
-	if( unselected_image_name != "" )
-	{
-		// user-specified image - don't use fixed borders unless requested
-		setImageUnselected(unselected_image_name);
-		setImageDisabled(unselected_image_name);
-		
-		mDisabledImageColor.mV[VALPHA] = 0.5f;
-		mScaleImage = FALSE;
-	}
-	else
+	//if we aren't a picture_style button set label as name if not provided
+	if (!p.picture_style.isProvided() || !p.picture_style)
 	{
-		setImageUnselected(std::string("button_enabled_32x128.tga"));
-		setImageDisabled(std::string("button_disabled_32x128.tga"));
-	}
-
-	if( selected_image_name != "" )
-	{
-		// user-specified image - don't use fixed borders unless requested
-		setImageSelected(selected_image_name);
-		setImageDisabledSelected(selected_image_name);
-
-		mDisabledImageColor.mV[VALPHA] = 0.5f;
-		mScaleImage = FALSE;
-	}
-	else
-	{
-		setImageSelected(std::string("button_enabled_selected_32x128.tga"));
-		setImageDisabledSelected(std::string("button_disabled_32x128.tga"));
+		if (!p.label.isProvided()) 
+		{
+			mUnselectedLabel = p.name();
+		}
+		if (!p.label_selected.isProvided())	
+		{
+			mSelectedLabel = mUnselectedLabel.getString();
+		}
 	}
 
-	init(click_callback, callback_data, font, control_name);
-}
-
-void LLButton::init(void (*click_callback)(void*), void *callback_data, const LLFontGL* font, const std::string& control_name)
-{
-	mGLFont = ( font ? font : LLFontGL::getFontSansSerif());
-
 	// Hack to make sure there is space for at least one character
 	if (getRect().getWidth() - (mRightHPad + mLeftHPad) < mGLFont->getWidth(std::string(" ")))
 	{
 		// Use old defaults
-		mLeftHPad = LLBUTTON_ORIG_H_PAD;
-		mRightHPad = LLBUTTON_ORIG_H_PAD;
+		mLeftHPad = llbutton_orig_h_pad;
+		mRightHPad = llbutton_orig_h_pad;
 	}
 	
-	mCallbackUserData = callback_data;
 	mMouseDownTimer.stop();
 
-	setControlName(control_name, NULL);
-
-	mUnselectedLabelColor = (			LLUI::sColorsGroup->getColor( "ButtonLabelColor" ) );
-	mSelectedLabelColor = (			LLUI::sColorsGroup->getColor( "ButtonLabelSelectedColor" ) );
-	mDisabledLabelColor = (			LLUI::sColorsGroup->getColor( "ButtonLabelDisabledColor" ) );
-	mDisabledSelectedLabelColor = (	LLUI::sColorsGroup->getColor( "ButtonLabelSelectedDisabledColor" ) );
-	mHighlightColor = (				LLUI::sColorsGroup->getColor( "ButtonUnselectedFgColor" ) );
-	mUnselectedBgColor = (				LLUI::sColorsGroup->getColor( "ButtonUnselectedBgColor" ) );
-	mSelectedBgColor = (				LLUI::sColorsGroup->getColor( "ButtonSelectedBgColor" ) );
-	mFlashBgColor = (				LLUI::sColorsGroup->getColor( "ButtonFlashBgColor" ) );
+	if (p.help_url.isProvided())
+	{
+		setHelpURLCallback(p.help_url);
+	}
 
-	mImageOverlayAlignment = LLFontGL::HCENTER;
-	mImageOverlayColor = LLColor4::white;
-}
+	// if custom unselected button image provided...
+	if (p.image_unselected != default_params.image_unselected)
+	{
+		//...fade it out for disabled image by default...
+		if (p.image_disabled() == default_params.image_disabled() )
+		{
+			mImageDisabled = p.image_unselected;
+			mFadeWhenDisabled = TRUE;
+		}
+	}
 
-LLButton::~LLButton()
-{
- 	if( hasMouseCapture() )
+	// if custom selected button image provided...
+	if (p.image_selected != default_params.image_selected)
 	{
-		gFocusMgr.setMouseCapture( NULL );
+		//...fade it out for disabled image by default...
+		if (p.image_disabled_selected() == default_params.image_disabled_selected())
+		{
+			mImageDisabledSelected = p.image_selected;
+			mFadeWhenDisabled = TRUE;
+		}
 	}
+	
+	if (p.click_callback.isProvided())
+		initCommitCallback(p.click_callback, mCommitSignal); // alias -> commit_callback
+	if (p.mouse_down_callback.isProvided())
+		initCommitCallback(p.mouse_down_callback, mMouseDownSignal);
+	if (p.mouse_up_callback.isProvided())
+		initCommitCallback(p.mouse_up_callback, mMouseUpSignal);
+	if (p.mouse_held_callback.isProvided())
+		initCommitCallback(p.mouse_held_callback, mHeldDownSignal);
 }
 
 // HACK: Committing a button is the same as instantly clicking it.
@@ -229,19 +214,12 @@ LLButton::~LLButton()
 void LLButton::onCommit()
 {
 	// WARNING: Sometimes clicking a button destroys the floater or
-	// panel containing it.  Therefore we need to call mClickedCallback
+	// panel containing it.  Therefore we need to call 	LLUICtrl::onCommit()
 	// LAST, otherwise this becomes deleted memory.
-	LLUICtrl::onCommit();
 
-	if (mMouseDownCallback)
-	{
-		(*mMouseDownCallback)(mCallbackUserData);
-	}
+	mMouseDownSignal(this, LLSD());
 	
-	if (mMouseUpCallback)
-	{
-		(*mMouseUpCallback)(mCallbackUserData);
-	}
+	mMouseUpSignal(this, LLSD());
 
 	if (getSoundFlags() & MOUSE_DOWN)
 	{
@@ -259,14 +237,49 @@ void LLButton::onCommit()
 	}
 
 	// do this last, as it can result in destroying this button
-	if (mClickedCallback)
-	{
-		(*mClickedCallback)( mCallbackUserData );
-	}
+	LLUICtrl::onCommit();
 }
 
+boost::signals::connection LLButton::setClickedCallback( const commit_signal_t::slot_type& cb )
+{
+	return mCommitSignal.connect(cb);
+}
+boost::signals::connection LLButton::setMouseDownCallback( const commit_signal_t::slot_type& cb )
+{
+	return mMouseDownSignal.connect(cb);
+}
+boost::signals::connection LLButton::setMouseUpCallback( const commit_signal_t::slot_type& cb )
+{
+	return mMouseUpSignal.connect(cb);
+}
+boost::signals::connection LLButton::setHeldDownCallback( const commit_signal_t::slot_type& cb )
+{
+	return mHeldDownSignal.connect(cb);
+}
 
+// *TODO: Deprecate (for backwards compatability only)
+boost::signals::connection LLButton::setClickedCallback( button_callback_t cb, void* data )
+{
+	return setClickedCallback(boost::bind(cb, data));
+}
+boost::signals::connection LLButton::setMouseDownCallback( button_callback_t cb, void* data )
+{
+	return setMouseDownCallback(boost::bind(cb, data));
+}
+boost::signals::connection LLButton::setMouseUpCallback( button_callback_t cb, void* data )
+{
+	return setMouseUpCallback(boost::bind(cb, data));
+}
+boost::signals::connection LLButton::setHeldDownCallback( button_callback_t cb, void* data )
+{
+	return setHeldDownCallback(boost::bind(cb, data));
+}
 
+BOOL LLButton::postBuild()
+{
+	autoResize();
+	return TRUE;
+}
 BOOL LLButton::handleUnicodeCharHere(llwchar uni_char)
 {
 	BOOL handled = FALSE;
@@ -278,10 +291,8 @@ BOOL LLButton::handleUnicodeCharHere(llwchar uni_char)
 			toggleState();
 		}
 
-		if (mClickedCallback)
-		{
-			(*mClickedCallback)( mCallbackUserData );
-		}
+		LLUICtrl::onCommit();
+		
 		handled = TRUE;		
 	}
 	return handled;	
@@ -299,10 +310,7 @@ BOOL LLButton::handleKeyHere(KEY key, MASK mask )
 
 		handled = TRUE;
 
-		if (mClickedCallback)
-		{
-			(*mClickedCallback)( mCallbackUserData );
-		}
+		LLUICtrl::onCommit();
 	}
 	return handled;
 }
@@ -318,13 +326,11 @@ BOOL LLButton::handleMouseDown(S32 x, S32 y, MASK mask)
 		setFocus(TRUE);
 	}
 
-	if (mMouseDownCallback)
-	{
-		(*mMouseDownCallback)(mCallbackUserData);
-	}
+	mMouseDownSignal(this, LLSD());
 
 	mMouseDownTimer.start();
 	mMouseDownFrame = (S32) LLFrameTimer::getFrameCount();
+	mMouseHeldDownCount = 0;
 	
 	if (getSoundFlags() & MOUSE_DOWN)
 	{
@@ -344,13 +350,9 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask)
 		gFocusMgr.setMouseCapture( NULL );
 
 		// Regardless of where mouseup occurs, handle callback
-		if (mMouseUpCallback)
-		{
-			(*mMouseUpCallback)(mCallbackUserData);
-		}
+		mMouseUpSignal(this, LLSD());
 
-		mMouseDownTimer.stop();
-		mMouseDownTimer.reset();
+		resetMouseDownTimer();
 
 		// DO THIS AT THE VERY END to allow the button to be destroyed as a result of being clicked.
 		// If mouseup in the widget, it's been clicked
@@ -366,10 +368,7 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask)
 				toggleState();
 			}
 
-			if (mClickedCallback)
-			{
-				(*mClickedCallback)( mCallbackUserData );
-			}			
+			LLUICtrl::onCommit();
 		}
 	}
 
@@ -377,20 +376,27 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask)
 }
 
 
-BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
+void LLButton::onMouseEnter(S32 x, S32 y, MASK mask)
 {
-	LLMouseHandler* other_captor = gFocusMgr.getMouseCapture();
-	mNeedsHighlight = other_captor == NULL || 
-				other_captor == this ||
-				// this following bit is to support modal dialogs
-				(other_captor->isView() && hasAncestor((LLView*)other_captor));
+	if (getEnabled())
+		mNeedsHighlight = TRUE;
+}
 
-	if (mMouseDownTimer.getStarted() && NULL != mHeldDownCallback)
+void LLButton::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+	mNeedsHighlight = FALSE;
+}
+
+BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
+{
+	if (mMouseDownTimer.getStarted())
 	{
 		F32 elapsed = getHeldDownTime();
 		if( mHeldDownDelay <= elapsed && mHeldDownFrameDelay <= (S32)LLFrameTimer::getFrameCount() - mMouseDownFrame)
 		{
-			mHeldDownCallback( mCallbackUserData );		
+			LLSD param;
+			param["count"] = mMouseHeldDownCount++;
+			mHeldDownSignal(this, param);
 		}
 	}
 
@@ -406,12 +412,15 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
 void LLButton::draw()
 {
 	BOOL flash = FALSE;
+	static LLUICachedControl<F32> button_flash_rate("ButtonFlashRate", 0);
+	static LLUICachedControl<S32> button_flash_count("ButtonFlashCount", 0);
+
 	if( mFlashing )
 	{
 		F32 elapsed = mFlashingTimer.getElapsedTimeF32();
-		S32 flash_count = S32(elapsed * LLUI::sConfigGroup->getF32("ButtonFlashRate") * 2.f);
+		S32 flash_count = S32(elapsed * button_flash_rate * 2.f);
 		// flash on or off?
-		flash = (flash_count % 2 == 0) || flash_count > S32((F32)LLUI::sConfigGroup->getS32("ButtonFlashCount") * 2.f);
+		flash = (flash_count % 2 == 0) || flash_count > S32((F32)button_flash_count * 2.f);
 	}
 
 	BOOL pressed_by_keyboard = FALSE;
@@ -427,7 +436,7 @@ void LLButton::draw()
 
 	BOOL pressed = pressed_by_keyboard 
 					|| (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y)) 
-					|| mToggleState;
+                    || getToggleState();
 	
 	BOOL use_glow_effect = FALSE;
 	LLColor4 glow_color = LLColor4::white;
@@ -470,12 +479,14 @@ void LLButton::draw()
 
 	if (mFlashing)
 	{
+		LLColor4 flash_color = mFlashBgColor.get();
 		use_glow_effect = TRUE;
 		glow_type = LLRender::BT_ALPHA; // blend the glow
+
 		if (mNeedsHighlight) // highlighted AND flashing
-			glow_color = (glow_color*0.5f + mFlashBgColor*0.5f) % 2.0f; // average between flash and highlight colour, with sum of the opacity
+			glow_color = (glow_color*0.5f + flash_color*0.5f) % 2.0f; // average between flash and highlight colour, with sum of the opacity
 		else
-			glow_color = mFlashBgColor;
+			glow_color = flash_color;
 	}
 
 	// Override if more data is available
@@ -508,31 +519,31 @@ void LLButton::draw()
 	// label changes when button state changes, not when pressed
 	if ( getEnabled() )
 	{
-		if ( mToggleState )
+		if ( getToggleState() )
 		{
-			label_color = mSelectedLabelColor;
+			label_color = mSelectedLabelColor.get();
 		}
 		else
 		{
-			label_color = mUnselectedLabelColor;
+			label_color = mUnselectedLabelColor.get();
 		}
 	}
 	else
 	{
-		if ( mToggleState )
+		if ( getToggleState() )
 		{
-			label_color = mDisabledSelectedLabelColor;
+			label_color = mDisabledSelectedLabelColor.get();
 		}
 		else
 		{
-			label_color = mDisabledLabelColor;
+			label_color = mDisabledLabelColor.get();
 		}
 	}
 
 	// Unselected label assignments
 	LLWString label;
 
-	if( mToggleState )
+	if( getToggleState() )
 	{
 		if( getEnabled() || mDisabledSelectedLabel.empty() )
 		{
@@ -578,9 +589,11 @@ void LLButton::draw()
 	// Otherwise draw basic rectangular button.
 	if (mImagep.notNull())
 	{
+		// apply automatic 50% alpha fade to disabled image
+		LLColor4 disabled_color = mFadeWhenDisabled ? mDisabledImageColor.get() % 0.5f : mDisabledImageColor.get();
 		if ( mScaleImage)
 		{
-			mImagep->draw(getLocalRect(), getEnabled() ? mImageColor : mDisabledImageColor  );
+			mImagep->draw(getLocalRect(), getEnabled() ? mImageColor.get() : disabled_color  );
 			if (mCurGlowStrength > 0.01f)
 			{
 				gGL.setSceneBlendType(glow_type);
@@ -590,7 +603,7 @@ void LLButton::draw()
 		}
 		else
 		{
-			mImagep->draw(0, 0, getEnabled() ? mImageColor : mDisabledImageColor );
+			mImagep->draw(0, 0, getEnabled() ? mImageColor.get() : disabled_color );
 			if (mCurGlowStrength > 0.01f)
 			{
 				gGL.setSceneBlendType(glow_type);
@@ -634,7 +647,7 @@ void LLButton::draw()
 		}
 
 		// fade out overlay images on disabled buttons
-		LLColor4 overlay_color = mImageOverlayColor;
+		LLColor4 overlay_color = mImageOverlayColor.get();
 		if (!getEnabled())
 		{
 			overlay_color.mV[VALPHA] = 0.5f;
@@ -707,23 +720,18 @@ void LLButton::draw()
 		mGLFont->render(label, 0, (F32)x, (F32)(LLBUTTON_V_PAD + y_offset), 
 			label_color,
 			mHAlign, LLFontGL::BOTTOM,
-			mDropShadowedText ? LLFontGL::DROP_SHADOW_SOFT : LLFontGL::NORMAL,
+			LLFontGL::NORMAL,
+			mDropShadowedText ? LLFontGL::DROP_SHADOW_SOFT : LLFontGL::NO_SHADOW,
 			U32_MAX, text_width,
 			NULL, FALSE, FALSE);
 	}
 
-	if (sDebugRects	
-		|| (LLView::sEditingUI && this == LLView::sEditingUIView))
-	{
-		drawDebugRect();
-	}
-
-	// reset hover status for next frame
-	mNeedsHighlight = FALSE;
+	LLView::draw();
 }
 
 void LLButton::drawBorder(const LLColor4& color, S32 size)
 {
+	if (mImagep.isNull()) return;
 	if (mScaleImage)
 	{
 		mImagep->drawBorder(getLocalRect(), color, size);
@@ -734,22 +742,19 @@ void LLButton::drawBorder(const LLColor4& color, S32 size)
 	}
 }
 
-void LLButton::setClickedCallback(void (*cb)(void*), void* userdata)
+BOOL LLButton::getToggleState() const
 {
-	mClickedCallback = cb;
-	if (userdata)
-	{
-		mCallbackUserData = userdata;
-	}
+    return getValue().asBoolean();
 }
 
-
 void LLButton::setToggleState(BOOL b)
 {
-	if( b != mToggleState )
+	if( b != getToggleState() )
 	{
 		setControlValue(b); // will fire LLControlVariable callbacks (if any)
-		mToggleState = b; // may or may not be redundant
+		setValue(b);        // may or may not be redundant
+		// Unselected label assignments
+		autoResize();
 	}
 }
 
@@ -764,19 +769,11 @@ void LLButton::setFlashing( BOOL b )
 
 
 BOOL LLButton::toggleState()			
-{ 
-	setToggleState( !mToggleState ); 
-	return mToggleState; 
-}
-
-void LLButton::setValue(const LLSD& value )
 {
-	mToggleState = value.asBoolean();
-}
+    bool flipped = ! getToggleState();
+	setToggleState(flipped); 
 
-LLSD LLButton::getValue() const
-{
-	return mToggleState == TRUE;
+	return flipped; 
 }
 
 void LLButton::setLabel( const LLStringExplicit& label )
@@ -818,6 +815,49 @@ void LLButton::setImageUnselected(LLPointer<LLUIImage> image)
 	mImageUnselected = image;
 }
 
+void LLButton::autoResize()
+{
+	LLUIString label;
+	if(getToggleState())
+	{
+		if( getEnabled() || mDisabledSelectedLabel.empty() )
+		{
+			label = mSelectedLabel;
+		}
+		else
+		{
+			label = mDisabledSelectedLabel;
+		}
+	}
+	else
+	{
+		if( getEnabled() || mDisabledLabel.empty() )
+		{
+			label = mUnselectedLabel;
+		}
+		else
+		{
+			label = mDisabledLabel;
+		}
+	}
+	resize(label);
+}
+
+void LLButton::resize(LLUIString label)
+{
+	// get label length 
+	S32 label_width = mGLFont->getWidth(label.getString());
+	// get current btn length 
+	S32 btn_width =getRect().getWidth();
+    // check if it need resize 
+	if (mAutoResize == TRUE)
+	{ 
+		if (btn_width - (mRightHPad + mLeftHPad) < label_width)
+		{
+			setRect(LLRect( getRect().mLeft, getRect().mTop, getRect().mRight+ label_width + mLeftHPad + mRightHPad , getRect().mBottom));
+		}
+	} 
+}
 void LLButton::setImages( const std::string &image_name, const std::string &selected_name )
 {
 	setImageUnselected(image_name);
@@ -845,14 +885,20 @@ void LLButton::setImageDisabled(LLPointer<LLUIImage> image)
 {
 	mImageDisabled = image;
 	mDisabledImageColor = mImageColor;
-	mDisabledImageColor.mV[VALPHA] *= 0.5f;
+	mFadeWhenDisabled = TRUE;
 }
 
 void LLButton::setImageDisabledSelected(LLPointer<LLUIImage> image)
 {
 	mImageDisabledSelected = image;
 	mDisabledImageColor = mImageColor;
-	mDisabledImageColor.mV[VALPHA] *= 0.5f;
+	mFadeWhenDisabled = TRUE;
+}
+
+void LLButton::setDisabledImages( const std::string &image_name, const std::string &selected_name)
+{
+	setDisabledImages( image_name, selected_name, mImageColor.get());
+	mFadeWhenDisabled = TRUE;
 }
 
 void LLButton::setDisabledImages( const std::string &image_name, const std::string &selected_name, const LLColor4& c )
@@ -867,13 +913,6 @@ void LLButton::setImageHoverSelected(LLPointer<LLUIImage> image)
 	mImageHoverSelected = image;
 }
 
-void LLButton::setDisabledImages( const std::string &image_name, const std::string &selected_name)
-{
-	LLColor4 clr = mImageColor;
-	clr.mV[VALPHA] *= .5f;
-	setDisabledImages( image_name, selected_name, clr );
-}
-
 void LLButton::setImageHoverUnselected(LLPointer<LLUIImage> image)
 {
 	mImageHoverUnselected = image;
@@ -899,11 +938,9 @@ void LLButton::setImageOverlay(const std::string& image_name, LLFontGL::HAlign a
 	}
 }
 
-
 void LLButton::onMouseCaptureLost()
 {
-	mMouseDownTimer.stop();
-	mMouseDownTimer.reset();
+	resetMouseDownTimer();
 }
 
 //-------------------------------------------------------------------------
@@ -975,28 +1012,6 @@ void LLButton::addImageAttributeToXML(LLXMLNodePtr node,
 	}
 }
 
-// virtual
-LLXMLNodePtr LLButton::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("label", TRUE)->setStringValue(getLabelUnselected());
-	node->createChild("label_selected", TRUE)->setStringValue(getLabelSelected());
-	node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mGLFont));
-	node->createChild("halign", TRUE)->setStringValue(LLFontGL::nameFromHAlign(mHAlign));
-
-	addImageAttributeToXML(node,mImageUnselectedName,mImageUnselectedID,std::string("image_unselected"));
-	addImageAttributeToXML(node,mImageSelectedName,mImageSelectedID,std::string("image_selected"));
-	addImageAttributeToXML(node,mImageHoverSelectedName,mImageHoverSelectedID,std::string("image_hover_selected"));
-	addImageAttributeToXML(node,mImageHoverUnselectedName,mImageHoverUnselectedID,std::string("image_hover_unselected"));
-	addImageAttributeToXML(node,mImageDisabledName,mImageDisabledID,std::string("image_disabled"));
-	addImageAttributeToXML(node,mImageDisabledSelectedName,mImageDisabledSelectedID,std::string("image_disabled_selected"));
-
-	node->createChild("scale_image", TRUE)->setBoolValue(mScaleImage);
-
-	return node;
-}
-
 void clicked_help(void* data)
 {
 	LLButton* self = (LLButton*)data;
@@ -1010,114 +1025,53 @@ void clicked_help(void* data)
 	LLUI::sHtmlHelp->show(self->getHelpURL());
 }
 
-// static
-LLView* LLButton::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
+void LLButton::setHelpURLCallback(const std::string &help_url)
 {
-	std::string name("button");
-	node->getAttributeString("name", name);
-
-	std::string label = name;
-	node->getAttributeString("label", label);
-
-	std::string label_selected = label;
-	node->getAttributeString("label_selected", label_selected);
-
-	LLFontGL* font = selectFont(node);
-
-	std::string	image_unselected;
-	if (node->hasAttribute("image_unselected")) node->getAttributeString("image_unselected",image_unselected);
-	
-	std::string	image_selected;
-	if (node->hasAttribute("image_selected")) node->getAttributeString("image_selected",image_selected);
-	
-	std::string	image_hover_selected;
-	if (node->hasAttribute("image_hover_selected")) node->getAttributeString("image_hover_selected",image_hover_selected);
-	
-	std::string	image_hover_unselected;
-	if (node->hasAttribute("image_hover_unselected")) node->getAttributeString("image_hover_unselected",image_hover_unselected);
-	
-	std::string	image_disabled_selected;
-	if (node->hasAttribute("image_disabled_selected")) node->getAttributeString("image_disabled_selected",image_disabled_selected);
-	
-	std::string	image_disabled;
-	if (node->hasAttribute("image_disabled")) node->getAttributeString("image_disabled",image_disabled);
-
-	std::string	image_overlay;
-	node->getAttributeString("image_overlay", image_overlay);
-
-	LLFontGL::HAlign image_overlay_alignment = LLFontGL::HCENTER;
-	std::string image_overlay_alignment_string;
-	if (node->hasAttribute("image_overlay_alignment"))
-	{
-		node->getAttributeString("image_overlay_alignment", image_overlay_alignment_string);
-		image_overlay_alignment = LLFontGL::hAlignFromName(image_overlay_alignment_string);
-	}
-
-
-	LLButton *button = new LLButton(name, 
-			LLRect(),
-			image_unselected,
-			image_selected,
-			LLStringUtil::null, 
-			NULL, 
-			parent,
-			font,
-			label,
-			label_selected);
-
-	node->getAttributeS32("pad_right", button->mRightHPad);
-	node->getAttributeS32("pad_left", button->mLeftHPad);
+	mHelpURL = help_url;
+	setClickedCallback(clicked_help,this);
+}
 
-	BOOL is_toggle = button->getIsToggle();
-	node->getAttributeBOOL("toggle", is_toggle);
-	button->setIsToggle(is_toggle);
+// static
+void LLButton::toggleFloaterAndSetToggleState(LLUICtrl* ctrl, const LLSD& sdname)
+{
+	bool floater_vis = LLFloaterReg::toggleInstance(sdname.asString());
+	LLButton* button = dynamic_cast<LLButton*>(ctrl);
+	if (button)
+		button->setToggleState(floater_vis);
+}
 
-	if(image_hover_selected != LLStringUtil::null) button->setImageHoverSelected(image_hover_selected);
-	
-	if(image_hover_unselected != LLStringUtil::null) button->setImageHoverUnselected(image_hover_unselected);
-	
-	if(image_disabled_selected != LLStringUtil::null) button->setImageDisabledSelected(image_disabled_selected );
-	
-	if(image_disabled != LLStringUtil::null) button->setImageDisabled(image_disabled);
-	
-	if(image_overlay != LLStringUtil::null) button->setImageOverlay(image_overlay, image_overlay_alignment);
+// static
+// Gets called once
+void LLButton::setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname)
+{
+	LLButton* button = dynamic_cast<LLButton*>(ctrl);
+	if (!button)
+		return;
+	// Get the visibility control name for the floater
+	std::string vis_control_name = LLFloaterReg::declareVisibilityControl(sdname.asString());
+	// Set the button control value (toggle state) to the floater visibility control (Sets the value as well)
+	button->setControlVariable(LLUI::sSettingGroups["floater"]->getControl(vis_control_name));
+	// Set the clicked callback to toggle the floater
+	button->setClickedCallback(boost::bind(&LLFloaterReg::toggleFloaterInstance, sdname));
+}
 
-	if (node->hasAttribute("halign"))
-	{
-		LLFontGL::HAlign halign = selectFontHAlign(node);
-		button->setHAlign(halign);
-	}
+void LLButton::resetMouseDownTimer()
+{
+	mMouseDownTimer.stop();
+	mMouseDownTimer.reset();
+}
 
-	if (node->hasAttribute("scale_image"))
-	{
-		BOOL	needsScale = FALSE;
-		node->getAttributeBOOL("scale_image",needsScale);
-		button->setScaleImage( needsScale );
-	}
 
-	if(label.empty())
-	{
-		button->setLabelUnselected(node->getTextContents());
-	}
-	if (label_selected.empty())
-	{
-		button->setLabelSelected(node->getTextContents());
-	}
-		
-	if (node->hasAttribute("help_url")) 
+// *TODO: Remove this function after the initial XUI XML re-export pass.
+// static
+void LLButton::setupParamsForExport(Params& p, LLView* parent)
+{
+	std::string label = p.label;
+	if (label.empty())
 	{
-		std::string	help_url;
-		node->getAttributeString("help_url",help_url);
-		button->setHelpURLCallback(help_url);
+		//if our label is empty this is a picture style button
+		p.picture_style = true;
 	}
 
-	button->initFromXML(node, parent);
-	
-	return button;
-}
-
-void LLButton::setHelpURLCallback(const std::string &help_url)
-{
-	mHelpURL = help_url;
-	setClickedCallback(clicked_help,this);
+	LLUICtrl::setupParamsForExport(p, parent);
 }
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 724b77541a..f146ef9dc2 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -39,7 +39,7 @@
 #include "v4color.h"
 #include "llframetimer.h"
 #include "llfontgl.h"
-#include "llimage.h"
+#include "lluiimage.h"
 #include "lluistring.h"
 
 //
@@ -53,9 +53,6 @@ extern S32	LLBUTTON_V_PAD;
 extern S32	BTN_HEIGHT_SMALL;
 extern S32	BTN_HEIGHT;
 
-// All button widths should be rounded up to this size
-extern S32	BTN_GRID;
-
 //
 // Helpful functions
 //
@@ -72,36 +69,80 @@ class LLButton
 : public LLUICtrl
 {
 public:
-	// simple button with text label
-	LLButton(const std::string& name, const LLRect &rect, const std::string& control_name = std::string(), 
-			 void (*on_click)(void*) = NULL, void *data = NULL);
-
-	LLButton(const std::string& name, const LLRect& rect, 
-			 const std::string &unselected_image,
-			 const std::string &selected_image,
-			 const std::string& control_name,	
-			 void (*click_callback)(void*),
-			 void *callback_data = NULL,
-			 const LLFontGL* mGLFont = NULL,
-			 const std::string& unselected_label = LLStringUtil::null,
-			 const std::string& selected_label = LLStringUtil::null );
-
-	virtual ~LLButton();
-	void init(void (*click_callback)(void*), void *callback_data, const LLFontGL* font, const std::string& control_name);
-
+	struct Params 
+	:	public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		// text label
+		Optional<std::string>	label_selected;
+		Optional<bool>			label_dropshadow;
+		Optional<bool>			auto_resize;
+
+		// images
+		Optional<LLUIImage*>	image_unselected,
+								image_selected,
+								image_hover_selected,
+								image_hover_unselected,
+								image_disabled_selected,
+								image_disabled,
+								image_overlay;
+
+		Optional<std::string>	image_overlay_alignment;
+		
+		// colors
+		Optional<LLUIColor>		label_color,
+								label_color_selected,
+								label_color_disabled,
+								label_color_disabled_selected,
+								highlight_color,
+								image_color,
+								image_color_disabled,
+								image_overlay_color,
+								flash_color;
+
+		// layout
+		Optional<S32>			pad_right;
+		Optional<S32>			pad_left;
+		
+		// callbacks
+		Optional<CommitCallbackParam>	click_callback, // alias -> commit_callback
+															mouse_down_callback,
+															mouse_up_callback,
+															mouse_held_callback,
+															mouse_held_once_callback;
+		
+		// misc
+		Optional<bool>			is_toggle,
+								scale_image,
+								commit_on_return,
+								picture_style;      //if true, don't display label
+		
+		Optional<std::string>		help_url;
+		Optional<F32>				hover_glow_amount;
+		Optional<TimeIntervalParam>	held_down_delay;
+
+		Params();
+	};
 	
+protected:
+	friend class LLUICtrlFactory;
+	LLButton(const Params&);
+
+public:
+	// For backward compatability only
+	typedef boost::function<void(void*)> button_callback_t;
+
 	void			addImageAttributeToXML(LLXMLNodePtr node, const std::string& imageName,
 										const LLUUID&	imageID,const std::string&	xmlTagName) const;
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
 	virtual BOOL	handleUnicodeCharHere(llwchar uni_char);
 	virtual BOOL	handleKeyHere(KEY key, MASK mask);
 	virtual BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);
 	virtual void	draw();
+	/*virtual*/ BOOL postBuild();
 
+	virtual void	onMouseEnter(S32 x, S32 y, MASK mask);
+	virtual void	onMouseLeave(S32 x, S32 y, MASK mask);
 	virtual void	onMouseCaptureLost();
 
 	virtual void	onCommit();
@@ -109,18 +150,24 @@ public:
 	void			setUnselectedLabelColor( const LLColor4& c )		{ mUnselectedLabelColor = c; }
 	void			setSelectedLabelColor( const LLColor4& c )			{ mSelectedLabelColor = c; }
 
-	void			setClickedCallback( void (*cb)(void *data), void* data = NULL ); // mouse down and up within button
-	void			setMouseDownCallback( void (*cb)(void *data) )		{ mMouseDownCallback = cb; }	// mouse down within button
-	void			setMouseUpCallback( void (*cb)(void *data) )		{ mMouseUpCallback = cb; }		// mouse up, EVEN IF NOT IN BUTTON
-	void			setHeldDownCallback( void (*cb)(void *data) )		{ mHeldDownCallback = cb; }		// Mouse button held down and in button
+	boost::signals::connection setClickedCallback( const commit_signal_t::slot_type& cb ); // mouse down and up within button
+	boost::signals::connection setMouseDownCallback( const commit_signal_t::slot_type& cb );
+	boost::signals::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); // mouse up, EVEN IF NOT IN BUTTON
+	// Passes a 'count' parameter in the commit param payload, i.e. param["count"])
+	boost::signals::connection setHeldDownCallback( const commit_signal_t::slot_type& cb ); // Mouse button held down and in button
+	
+	// *TODO: Deprecate (for backwards compatability only)
+	boost::signals::connection setClickedCallback( button_callback_t cb, void* data );
+	boost::signals::connection setMouseDownCallback( button_callback_t cb, void* data );
+	boost::signals::connection setMouseUpCallback( button_callback_t cb, void* data );
+	boost::signals::connection setHeldDownCallback( button_callback_t cb, void* data );
+		
 	void			setHeldDownDelay( F32 seconds, S32 frames = 0)		{ mHeldDownDelay = seconds; mHeldDownFrameDelay = frames; }
-
+	
 	F32				getHeldDownTime() const								{ return mMouseDownTimer.getElapsedTimeF32(); }
 
-	BOOL			getIsToggle() const { return mIsToggle; }
-	void			setIsToggle(BOOL is_toggle) { mIsToggle = is_toggle; }
 	BOOL			toggleState();
-	BOOL			getToggleState() const	{ return mToggleState; }
+	BOOL			getToggleState() const;
 	void			setToggleState(BOOL b);
 
 	void			setFlashing( BOOL b );
@@ -150,11 +197,9 @@ public:
 
 	void			setImageOverlay(const std::string& image_name, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white);
 	LLPointer<LLUIImage> getImageOverlay() { return mImageOverlay; }
-	
-
-	virtual void	setValue(const LLSD& value );
-	virtual LLSD	getValue() const;
 
+	void            autoResize();	// resize with label of current btn state 
+	void            resize(LLUIString label); // resize with label input
 	void			setLabel( const LLStringExplicit& label);
 	virtual BOOL	setLabelArg( const std::string& key, const LLStringExplicit& text );
 	void			setLabelUnselected(const LLStringExplicit& label);
@@ -172,8 +217,6 @@ public:
 
 	void			setBorderEnabled(BOOL b)					{ mBorderEnabled = b; }
 
-	static void		onHeldDown(void *userdata);  // to be called by gIdleCallbacks
-
 	void			setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; }
 
 	void			setImageUnselected(const std::string &image_name);
@@ -198,6 +241,10 @@ public:
 	void			setHelpURLCallback(const std::string &help_url);
 	const std::string&	getHelpURL() const { return mHelpURL; }
 
+	static void		onHeldDown(void *userdata);  // to be called by gIdleCallbacks
+	static void		toggleFloaterAndSetToggleState(LLUICtrl* ctrl, const LLSD& sdname);
+	static void		setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname);
+	
 protected:
 
 	virtual void	drawBorder(const LLColor4& color, S32 size);
@@ -212,45 +259,48 @@ protected:
 	void			setImageDisabledSelectedID(const LLUUID &image_id);
 	const LLPointer<LLUIImage>&	getImageUnselected() const	{ return mImageUnselected; }
 	const LLPointer<LLUIImage>& getImageSelected() const	{ return mImageSelected; }
+	void			resetMouseDownTimer();
 
 	LLFrameTimer	mMouseDownTimer;
 
-private:
-
-	void			(*mClickedCallback)(void* data );
-	void			(*mMouseDownCallback)(void *data);
-	void			(*mMouseUpCallback)(void *data);
-	void			(*mHeldDownCallback)(void *data);
+	// If the label is empty, set the picture_style attribute
+	static void setupParamsForExport(Params& p, LLView* parent);
 
+private:
+	commit_signal_t mMouseDownSignal;
+	commit_signal_t mMouseUpSignal;
+	commit_signal_t mHeldDownSignal;
+	
 	const LLFontGL	*mGLFont;
 	
 	S32				mMouseDownFrame;
-	F32				mHeldDownDelay;		// seconds, after which held-down callbacks get called
+	S32 			mMouseHeldDownCount; 	// Counter for parameter passed to held-down callback
+	F32				mHeldDownDelay;			// seconds, after which held-down callbacks get called
 	S32				mHeldDownFrameDelay;	// frames, after which held-down callbacks get called
 
-	LLPointer<LLUIImage>	mImageOverlay;
-	LLFontGL::HAlign		mImageOverlayAlignment;
-	LLColor4				mImageOverlayColor;
+	LLPointer<LLUIImage>		mImageOverlay;
+	LLFontGL::HAlign			mImageOverlayAlignment;
+	LLUIColor	mImageOverlayColor;
 
-	LLPointer<LLUIImage>	mImageUnselected;
-	LLUIString				mUnselectedLabel;
-	LLColor4				mUnselectedLabelColor;
+	LLPointer<LLUIImage>		mImageUnselected;
+	LLUIString					mUnselectedLabel;
+	LLUIColor	mUnselectedLabelColor;
 
-	LLPointer<LLUIImage>	mImageSelected;
-	LLUIString				mSelectedLabel;
-	LLColor4				mSelectedLabelColor;
+	LLPointer<LLUIImage>		mImageSelected;
+	LLUIString					mSelectedLabel;
+	LLUIColor	mSelectedLabelColor;
 
-	LLPointer<LLUIImage>	mImageHoverSelected;
+	LLPointer<LLUIImage>		mImageHoverSelected;
 
-	LLPointer<LLUIImage>	mImageHoverUnselected;
+	LLPointer<LLUIImage>		mImageHoverUnselected;
 
-	LLPointer<LLUIImage>	mImageDisabled;
-	LLUIString				mDisabledLabel;
-	LLColor4				mDisabledLabelColor;
+	LLPointer<LLUIImage>		mImageDisabled;
+	LLUIString					mDisabledLabel;
+	LLUIColor	mDisabledLabelColor;
 
-	LLPointer<LLUIImage>	mImageDisabledSelected;
-	LLUIString				mDisabledSelectedLabel;
-	LLColor4				mDisabledSelectedLabelColor;
+	LLPointer<LLUIImage>		mImageDisabledSelected;
+	LLUIString					mDisabledSelectedLabel;
+	LLUIColor	mDisabledSelectedLabelColor;
 
 	LLUUID			mImageUnselectedID;
 	LLUUID			mImageSelectedID;
@@ -265,20 +315,17 @@ private:
 	std::string		mImageDisabledName;
 	std::string		mImageDisabledSelectedName;
 
-	LLColor4		mHighlightColor;
-	LLColor4		mUnselectedBgColor;
-	LLColor4		mSelectedBgColor;
-	LLColor4		mFlashBgColor;
+	LLUIColor	mHighlightColor;
+	LLUIColor		mFlashBgColor;
 
-	LLColor4		mImageColor;
-	LLColor4		mDisabledImageColor;
+	LLUIColor	mImageColor;
+	LLUIColor	mDisabledImageColor;
 
 	BOOL			mIsToggle;
-	BOOL			mToggleState;
 	BOOL			mScaleImage;
 
 	BOOL			mDropShadowedText;
-
+	BOOL			mAutoResize;
 	BOOL			mBorderEnabled;
 
 	BOOL			mFlashing;
@@ -292,6 +339,7 @@ private:
 
 	BOOL			mNeedsHighlight;
 	BOOL			mCommitOnReturn;
+	BOOL			mFadeWhenDisabled;
 
 	std::string		mHelpURL;
 
@@ -300,4 +348,11 @@ private:
 	LLFrameTimer	mFlashingTimer;
 };
 
+#ifdef LL_WINDOWS
+#ifndef INSTANTIATE_GETCHILD_BUTTON
+#pragma warning (disable : 4231)
+extern template LLButton* LLView::getChild<LLButton>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
+#endif
+#endif
+
 #endif  // LL_LLBUTTON_H
diff --git a/indra/llui/llcallbackmap.h b/indra/llui/llcallbackmap.h
index eadb9c98f3..97b1e2fc50 100644
--- a/indra/llui/llcallbackmap.h
+++ b/indra/llui/llcallbackmap.h
@@ -30,11 +30,11 @@
  * $/LicenseInfo$
  */
 
-#ifndef LL_CALLBACK_MAP_H
-#define LL_CALLBACK_MAP_H
+#ifndef LLCALLBACKMAP_H
+#define LLCALLBACKMAP_H
 
 #include <map>
-#include "llstring.h"
+#include <string>
 
 class LLCallbackMap
 {
@@ -45,12 +45,19 @@ public:
 	typedef std::map<std::string, LLCallbackMap> map_t;
 	typedef map_t::iterator map_iter_t;
 	typedef map_t::const_iterator map_const_iter_t;
-
+	
+	template <class T>
+	static void* buildPanel(void* data)
+	{
+		T* panel = new T();
+		return (void*)panel;
+	}
+	
 	LLCallbackMap() : mCallback(NULL), mData(NULL) { }
-	LLCallbackMap(callback_t callback, void* data) : mCallback(callback), mData(data) { }
+	LLCallbackMap(callback_t callback, void* data = NULL) : mCallback(callback), mData(data) { }
 
 	callback_t	mCallback;
 	void*		mData;
 };
 
-#endif // LL_CALLBACK_MAP_H
+#endif // LLCALLBACKMAP_H
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index eda9467d87..7b37344db7 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -31,6 +31,7 @@
  */
 
 // The mutants are coming!
+#define INSTANTIATE_GETCHILD_CHECKBOX
 
 #include "linden_common.h"
 
@@ -49,101 +50,88 @@
 
 const U32 MAX_STRING_LENGTH = 10;
 
+template LLCheckBoxCtrl* LLView::getChild<LLCheckBoxCtrl>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
+
 static LLRegisterWidget<LLCheckBoxCtrl> r("check_box");
 
- 
-LLCheckBoxCtrl::LLCheckBoxCtrl(const std::string& name, const LLRect& rect, 
-							    const std::string& label, 
-								const LLFontGL* font,
-								void (*commit_callback)(LLUICtrl* ctrl, void* userdata),
-								void* callback_user_data,
-								BOOL initial_value,
-								BOOL use_radio_style,
-								const std::string& control_which)
-:	LLUICtrl(name, rect, TRUE, commit_callback, callback_user_data, FOLLOWS_LEFT | FOLLOWS_TOP),
-	mTextEnabledColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ),
-	mTextDisabledColor( LLUI::sColorsGroup->getColor( "LabelDisabledColor" ) ),
-	mRadioStyle( use_radio_style ),
-	mInitialValue( initial_value ),
-	mSetValue( initial_value )
+LLCheckBoxCtrl::Params::Params()
+:	text_enabled_color("text_enabled_color"),
+	text_disabled_color("text_disabled_color"),
+	initial_value("initial_value", false),
+	label_text("label_text"),
+	check_button("check_button"),
+	radio_style("radio_style")
+{}
+
+
+LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
+:	LLUICtrl(p),
+	mTextEnabledColor(p.text_enabled_color()),
+	mTextDisabledColor(p.text_disabled_color()),
+	mFont(p.font())
 {
-	if (font)
-	{
-		mFont = font;
-	}
-	else
-	{
-		mFont = LLFontGL::getFontSansSerifSmall();
-	}
+	mViewModel->setValue(LLSD(p.initial_value));
+	mViewModel->resetDirty();
+	static LLUICachedControl<S32> llcheckboxctrl_spacing ("UICheckboxctrlSpacing", 0);
+	static LLUICachedControl<S32> llcheckboxctrl_hpad ("UICheckboxctrlHPad", 0);
+	static LLUICachedControl<S32> llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0);
+	static LLUICachedControl<S32> llcheckboxctrl_btn_size ("UICheckboxctrlBtnSize", 0);
 
 	// must be big enough to hold all children
 	setUseBoundingRect(TRUE);
 
-	mKeyboardFocusOnClick = TRUE;
-
 	// Label (add a little space to make sure text actually renders)
 	const S32 FUDGE = 10;
-	S32 text_width = mFont->getWidth( label ) + FUDGE;
+	S32 text_width = mFont->getWidth( p.label ) + FUDGE;
 	S32 text_height = llround(mFont->getLineHeight());
 	LLRect label_rect;
 	label_rect.setOriginAndSize(
-		LLCHECKBOXCTRL_HPAD + LLCHECKBOXCTRL_BTN_SIZE + LLCHECKBOXCTRL_SPACING,
-		LLCHECKBOXCTRL_VPAD + 1, // padding to get better alignment
-		text_width + LLCHECKBOXCTRL_HPAD,
+		llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
+		llcheckboxctrl_vpad + 1, // padding to get better alignment
+		text_width + llcheckboxctrl_hpad,
 		text_height );
 
 	// *HACK Get rid of this with SL-55508... 
 	// this allows blank check boxes and radio boxes for now
-	std::string local_label = label;
+	std::string local_label = p.label;
 	if(local_label.empty())
 	{
 		local_label = " ";
 	}
 
-	mLabel = new LLTextBox( std::string("CheckboxCtrl Label"), label_rect, local_label, mFont );
-	mLabel->setFollowsLeft();
-	mLabel->setFollowsBottom();
+	LLTextBox::Params tbparams = p.label_text;
+	tbparams.rect(label_rect);
+	tbparams.text(local_label);
+	if (p.font.isProvided())
+	{
+		tbparams.font(p.font);
+	}
+	mLabel = LLUICtrlFactory::create<LLTextBox> (tbparams);
+
 	addChild(mLabel);
 
 	// Button
 	// Note: button cover the label by extending all the way to the right.
 	LLRect btn_rect;
 	btn_rect.setOriginAndSize(
-		LLCHECKBOXCTRL_HPAD,
-		LLCHECKBOXCTRL_VPAD,
-		LLCHECKBOXCTRL_BTN_SIZE + LLCHECKBOXCTRL_SPACING + text_width + LLCHECKBOXCTRL_HPAD,
-		llmax( text_height, LLCHECKBOXCTRL_BTN_SIZE ) + LLCHECKBOXCTRL_VPAD);
+		llcheckboxctrl_hpad,
+		llcheckboxctrl_vpad,
+		llcheckboxctrl_btn_size + llcheckboxctrl_spacing + text_width + llcheckboxctrl_hpad,
+		llmax( text_height, llcheckboxctrl_btn_size() ) + llcheckboxctrl_vpad);
 	std::string active_true_id, active_false_id;
 	std::string inactive_true_id, inactive_false_id;
-	if (mRadioStyle)
-	{
-		active_true_id = "UIImgRadioActiveSelectedUUID";
-		active_false_id = "UIImgRadioActiveUUID";
-		inactive_true_id = "UIImgRadioInactiveSelectedUUID";
-		inactive_false_id = "UIImgRadioInactiveUUID";
-		mButton = new LLButton(std::string("Radio control button"), btn_rect,
-							   active_false_id, active_true_id, control_which,
-							   &LLCheckBoxCtrl::onButtonPress, this, LLFontGL::getFontSansSerif() ); 
-		mButton->setDisabledImages( inactive_false_id, inactive_true_id );
-		mButton->setHoverGlowStrength(0.35f);
-	}
-	else
-	{
-		active_false_id = "UIImgCheckboxActiveUUID";
-		active_true_id = "UIImgCheckboxActiveSelectedUUID";
-		inactive_true_id = "UIImgCheckboxInactiveSelectedUUID";
-		inactive_false_id = "UIImgCheckboxInactiveUUID";
-		mButton = new LLButton(std::string("Checkbox control button"), btn_rect,
-							   active_false_id, active_true_id, control_which,
-							   &LLCheckBoxCtrl::onButtonPress, this, LLFontGL::getFontSansSerif() ); 
-		mButton->setDisabledImages( inactive_false_id, inactive_true_id );
-		mButton->setHoverGlowStrength(0.35f);
-	}
-	mButton->setIsToggle(TRUE);
-	mButton->setToggleState( initial_value );
-	mButton->setFollowsLeft();
-	mButton->setFollowsBottom();
-	mButton->setCommitOnReturn(FALSE);
+
+	LLButton::Params params = p.check_button;
+	params.rect(btn_rect);
+	//params.control_name(p.control_name);
+	params.click_callback.function(boost::bind(&LLCheckBoxCtrl::onButtonPress, this, _2));
+	params.commit_on_return(false);
+	// Checkboxes only allow boolean initial values, but buttons can
+	// take any LLSD.
+	params.initial_value(LLSD(p.initial_value));
+	params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
+
+	mButton = LLUICtrlFactory::create<LLButton>(params);
 	addChild(mButton);
 }
 
@@ -154,24 +142,14 @@ LLCheckBoxCtrl::~LLCheckBoxCtrl()
 
 
 // static
-void LLCheckBoxCtrl::onButtonPress( void *userdata )
+void LLCheckBoxCtrl::onButtonPress( const LLSD& data )
 {
-	LLCheckBoxCtrl* self = (LLCheckBoxCtrl*) userdata;
+	//if (mRadioStyle)
+	//{
+	//	setValue(TRUE);
+	//}
 
-	if (self->mRadioStyle)
-	{
-		self->setValue(TRUE);
-	}
-
-	self->setControlValue(self->getValue());
-	// HACK: because buttons don't normally commit
-	self->onCommit();
-
-	if (self->mKeyboardFocusOnClick)
-	{
-		self->setFocus( TRUE );
-		self->onFocusReceived();
-	}
+	onCommit();
 }
 
 void LLCheckBoxCtrl::onCommit()
@@ -179,6 +157,7 @@ void LLCheckBoxCtrl::onCommit()
 	if( getEnabled() )
 	{
 		setTentative(FALSE);
+		setControlValue(getValue());
 		LLUICtrl::onCommit();
 	}
 }
@@ -187,6 +166,15 @@ void LLCheckBoxCtrl::setEnabled(BOOL b)
 {
 	LLView::setEnabled(b);
 	mButton->setEnabled(b);
+
+	if (b)
+	{
+		mLabel->setColor( mTextEnabledColor.get() );
+	}
+	else
+	{
+		mLabel->setColor( mTextDisabledColor.get() );
+	}
 }
 
 void LLCheckBoxCtrl::clear()
@@ -197,43 +185,33 @@ void LLCheckBoxCtrl::clear()
 void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
 {
 	//stretch or shrink bounding rectangle of label when rebuilding UI at new scale
+	static LLUICachedControl<S32> llcheckboxctrl_spacing ("UICheckboxctrlSpacing", 0);
+	static LLUICachedControl<S32> llcheckboxctrl_hpad ("UICheckboxctrlHPad", 0);
+	static LLUICachedControl<S32> llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0);
+	static LLUICachedControl<S32> llcheckboxctrl_btn_size ("UICheckboxctrlBtnSize", 0);
+
 	const S32 FUDGE = 10;
 	S32 text_width = mFont->getWidth( mLabel->getText() ) + FUDGE;
 	S32 text_height = llround(mFont->getLineHeight());
 	LLRect label_rect;
 	label_rect.setOriginAndSize(
-		LLCHECKBOXCTRL_HPAD + LLCHECKBOXCTRL_BTN_SIZE + LLCHECKBOXCTRL_SPACING,
-		LLCHECKBOXCTRL_VPAD,
+		llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
+		llcheckboxctrl_vpad,
 		text_width,
 		text_height );
 	mLabel->setRect(label_rect);
 
 	LLRect btn_rect;
 	btn_rect.setOriginAndSize(
-		LLCHECKBOXCTRL_HPAD,
-		LLCHECKBOXCTRL_VPAD,
-		LLCHECKBOXCTRL_BTN_SIZE + LLCHECKBOXCTRL_SPACING + text_width,
-		llmax( text_height, LLCHECKBOXCTRL_BTN_SIZE ) );
+		llcheckboxctrl_hpad,
+		llcheckboxctrl_vpad,
+		llcheckboxctrl_btn_size + llcheckboxctrl_spacing + text_width,
+		llmax( text_height, llcheckboxctrl_btn_size() ) );
 	mButton->setRect( btn_rect );
 	
 	LLUICtrl::reshape(width, height, called_from_parent);
 }
 
-void LLCheckBoxCtrl::draw()
-{
-	if (getEnabled())
-	{
-		mLabel->setColor( mTextEnabledColor );
-	}
-	else
-	{
-		mLabel->setColor( mTextDisabledColor );
-	}
-
-	// Draw children
-	LLUICtrl::draw();
-}
-
 //virtual
 void LLCheckBoxCtrl::setValue(const LLSD& value )
 {
@@ -246,6 +224,18 @@ LLSD LLCheckBoxCtrl::getValue() const
 	return mButton->getValue();
 }
 
+//virtual
+void LLCheckBoxCtrl::setTentative(BOOL b)
+{
+	mButton->setTentative(b);
+}
+
+//virtual
+BOOL LLCheckBoxCtrl::getTentative() const
+{
+	return mButton->getTentative();
+}
+
 void LLCheckBoxCtrl::setLabel( const LLStringExplicit& label )
 {
 	mLabel->setText( label );
@@ -264,12 +254,6 @@ BOOL LLCheckBoxCtrl::setLabelArg( const std::string& key, const LLStringExplicit
 	return res;
 }
 
-//virtual
-std::string LLCheckBoxCtrl::getControlName() const
-{
-	return mButton->getControlName();
-}
-
 // virtual
 void LLCheckBoxCtrl::setControlName(const std::string& control_name, LLView* context)
 {
@@ -282,7 +266,7 @@ BOOL	 LLCheckBoxCtrl::isDirty() const
 {
 	if ( mButton )
 	{
-		return (mSetValue != mButton->getToggleState());
+		return mButton->isDirty();
 	}
 	return FALSE;		// Shouldn't get here
 }
@@ -293,78 +277,6 @@ void	LLCheckBoxCtrl::resetDirty()
 {
 	if ( mButton )
 	{
-		mSetValue = mButton->getToggleState();
-	}
-}
-
-
-
-// virtual
-LLXMLNodePtr LLCheckBoxCtrl::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("label", TRUE)->setStringValue(mLabel->getText());
-
-	std::string control_name = mButton->getControlName();
-	
-	node->createChild("initial_value", TRUE)->setBoolValue(mInitialValue);
-
-	node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mFont));
-
-	node->createChild("radio_style", TRUE)->setBoolValue(mRadioStyle);
-
-	return node;
-}
-
-// static
-LLView* LLCheckBoxCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("checkbox");
-	node->getAttributeString("name", name);
-
-	std::string label("");
-	node->getAttributeString("label", label);
-
-	LLFontGL* font = LLView::selectFont(node);
-
-	BOOL radio_style = FALSE;
-	node->getAttributeBOOL("radio_style", radio_style);
-
-	LLUICtrlCallback callback = NULL;
-
-	if (label.empty())
-	{
-		label.assign(node->getTextContents());
+		mButton->resetDirty();
 	}
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	LLCheckBoxCtrl* checkbox = new LLCheckboxCtrl(name, 
-		rect, 
-		label,
-		font,
-		callback,
-		NULL,
-		FALSE,
-		radio_style); // if true, draw radio button style icons
-
-	BOOL initial_value = checkbox->getValue().asBoolean();
-	node->getAttributeBOOL("initial_value", initial_value);
-
-	LLColor4 color;
-	color = LLUI::sColorsGroup->getColor( "LabelTextColor" );
-	LLUICtrlFactory::getAttributeColor(node,"text_enabled_color", color);
-	checkbox->setEnabledColor(color);
-
-	color = LLUI::sColorsGroup->getColor( "LabelDisabledColor" );
-	LLUICtrlFactory::getAttributeColor(node,"text_disabled_color", color);
-	checkbox->setDisabledColor(color);
-
-	checkbox->setValue(initial_value);
-
-	checkbox->initFromXML(node, parent);
-
-	return checkbox;
 }
diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h
index ff867f5193..fe719e3b6a 100644
--- a/indra/llui/llcheckboxctrl.h
+++ b/indra/llui/llcheckboxctrl.h
@@ -33,24 +33,14 @@
 #ifndef LL_LLCHECKBOXCTRL_H
 #define LL_LLCHECKBOXCTRL_H
 
-
-#include "stdtypes.h"
 #include "lluictrl.h"
 #include "llbutton.h"
+#include "lltextbox.h"
 #include "v4color.h"
-#include "llrect.h"
 
 //
 // Constants
 //
-const S32 LLCHECKBOXCTRL_BTN_SIZE = 13;
-const S32 LLCHECKBOXCTRL_VPAD = 2;
-const S32 LLCHECKBOXCTRL_HPAD = 2;
-const S32 LLCHECKBOXCTRL_SPACING = 5;
-const S32 LLCHECKBOXCTRL_HEIGHT = 16;
-
-// Deprecated, don't use.
-#define CHECKBOXCTRL_HEIGHT LLCHECKBOXCTRL_HEIGHT
 
 const BOOL	RADIO_STYLE = TRUE;
 const BOOL	CHECK_STYLE = FALSE;
@@ -59,30 +49,38 @@ const BOOL	CHECK_STYLE = FALSE;
 // Classes
 //
 class LLFontGL;
-class LLTextBox;
 class LLViewBorder;
 
 class LLCheckBoxCtrl
 : public LLUICtrl
 {
 public:
-	LLCheckBoxCtrl(const std::string& name, const LLRect& rect, const std::string& label,	
-		const LLFontGL* font = NULL,
-		void (*commit_callback)(LLUICtrl*, void*) = NULL,
-		void* callback_userdata = NULL,
-		BOOL initial_value = FALSE,
-		BOOL use_radio_style = FALSE, // if true, draw radio button style icons
-		const std::string& control_which = LLStringUtil::null);
+	struct Params 
+	:	public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<LLUIColor>		text_enabled_color;
+		Optional<LLUIColor>		text_disabled_color;
+		Optional<bool>			initial_value;	// override LLUICtrl initial_value
+
+		Optional<LLTextBox::Params> label_text;
+		Optional<LLButton::Params> check_button;
+
+		Deprecated	radio_style;
+
+		Params();
+	};
+
 	virtual ~LLCheckBoxCtrl();
 
-	// LLView interface
+protected:
+	LLCheckBoxCtrl(const Params&);
+	friend class LLUICtrlFactory;
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
+public:
+	// LLView interface
 
 	virtual void		setEnabled( BOOL b );
 
-	virtual void		draw();
 	virtual void		reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 
 	// LLUICtrl interface
@@ -91,8 +89,8 @@ public:
 			BOOL		get() { return (BOOL)getValue().asBoolean(); }
 			void		set(BOOL value) { setValue(value); }
 
-	virtual void		setTentative(BOOL b)	{ mButton->setTentative(b); }
-	virtual BOOL		getTentative() const	{ return mButton->getTentative(); }
+	virtual void		setTentative(BOOL b);
+	virtual BOOL		getTentative() const;
 
 	virtual BOOL		setLabelArg( const std::string& key, const LLStringExplicit& text );
 
@@ -108,10 +106,11 @@ public:
 	void				setLabel( const LLStringExplicit& label );
 	std::string			getLabel() const;
 
+	void				setFont( const LLFontGL* font ) { mFont = font; }
+	
 	virtual void		setControlName(const std::string& control_name, LLView* context);
-	virtual std::string 	getControlName() const;
 
-	static void			onButtonPress(void *userdata);
+	void				onButtonPress(const LLSD& data);
 
 	virtual BOOL		isDirty()	const;		// Returns TRUE if the user has modified this control.
 	virtual void		resetDirty();			// Clear dirty state
@@ -121,19 +120,17 @@ protected:
 	LLButton*		mButton;
 	LLTextBox*		mLabel;
 	const LLFontGL* mFont;
-	LLColor4		mTextEnabledColor;
-	LLColor4		mTextDisabledColor;
-	BOOL			mRadioStyle;
-	BOOL			mInitialValue;			// Value set in constructor
-	BOOL			mSetValue;				// Value set programmatically
-	BOOL			mKeyboardFocusOnClick;
-	LLViewBorder*	mBorder;
-};
 
+	LLUIColor		mTextEnabledColor;
+	LLUIColor		mTextDisabledColor;
+};
 
-// HACK: fix old capitalization problem
-//typedef LLCheckBoxCtrl LLCheckboxCtrl;
-#define LLCheckboxCtrl LLCheckBoxCtrl
 
+#ifdef LL_WINDOWS
+#ifndef INSTANTIATE_GETCHILD_CHECKBOX
+#pragma warning (disable : 4231)
+extern template LLCheckBoxCtrl* LLView::getChild<LLCheckBoxCtrl>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
+#endif
+#endif
 
 #endif  // LL_LLCHECKBOXCTRL_H
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 28a05c13f5..09f7a6c813 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -33,6 +33,8 @@
 // A control that displays the name of the chosen item, which when
 // clicked shows a scrolling box of options.
 
+#define INSTANTIATE_GETCHILD_COMBOBOX
+
 #include "linden_common.h"
 
 // file includes
@@ -48,167 +50,128 @@
 #include "llwindow.h"
 #include "llfloater.h"
 #include "llscrollbar.h"
+#include "llscrolllistcell.h"
+#include "llscrolllistitem.h"
 #include "llcontrol.h"
 #include "llfocusmgr.h"
 #include "lllineeditor.h"
 #include "v2math.h"
+#include "lluictrlfactory.h"
 
 // Globals
 S32 LLCOMBOBOX_HEIGHT = 0;
 S32 LLCOMBOBOX_WIDTH = 0;
 S32 MAX_COMBO_WIDTH = 500;
 
-static LLRegisterWidget<LLComboBox> r1("combo_box");
+template LLComboBox* LLView::getChild<LLComboBox>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
 
-LLComboBox::LLComboBox(	const std::string& name, const LLRect &rect, const std::string& label,
-	void (*commit_callback)(LLUICtrl*,void*),
-	void *callback_userdata
-	)
-:	LLUICtrl(name, rect, TRUE, commit_callback, callback_userdata, 
-			 FOLLOWS_LEFT | FOLLOWS_TOP),
-	mTextEntry(NULL),
-	mArrowImage(NULL),
-	mAllowTextEntry(FALSE),
-	mMaxChars(20),
-	mTextEntryTentative(TRUE),
-	mListPosition(BELOW),
-	mPrearrangeCallback( NULL ),
-	mTextEntryCallback( NULL ),
-	mLabel(label)
-{
-	// Always use text box 
-	// Text label button
-	mButton = new LLButton(mLabel,
-								LLRect(), 
-								LLStringUtil::null,
-								NULL, this);
-	mButton->setImageUnselected(std::string("square_btn_32x128.tga"));
-	mButton->setImageSelected(std::string("square_btn_selected_32x128.tga"));
-	mButton->setImageDisabled(std::string("square_btn_32x128.tga"));
-	mButton->setImageDisabledSelected(std::string("square_btn_selected_32x128.tga"));
-	mButton->setScaleImage(TRUE);
-
-	mButton->setMouseDownCallback(onButtonDown);
-	mButton->setFont(LLFontGL::getFontSansSerifSmall());
-	mButton->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM | FOLLOWS_RIGHT);
-	mButton->setHAlign( LLFontGL::LEFT );
-	mButton->setRightHPad(2);
-	addChild(mButton);
+static LLRegisterWidget<LLComboBox> register_combo_box("combo_box");
 
-	// disallow multiple selection
-	mList = new LLScrollListCtrl(std::string("ComboBox"), LLRect(), 
-								 &LLComboBox::onItemSelected, this, FALSE);
-	mList->setVisible(FALSE);
-	mList->setBgWriteableColor( LLColor4(1,1,1,1) );
-	mList->setCommitOnKeyboardMovement(FALSE);
-	addChild(mList);
-
-	mArrowImage = LLUI::sImageProvider->getUIImage("combobox_arrow.tga");
-	mButton->setImageOverlay("combobox_arrow.tga", LLFontGL::RIGHT);
+void LLComboBox::PreferredPositionValues::declareValues()
+{
+	declare("above", ABOVE);
+	declare("below", BELOW);
+}
 
-	updateLayout();
+LLComboBox::ItemParams::ItemParams()
+:	label("label")
+{
 }
 
 
-LLComboBox::~LLComboBox()
+LLComboBox::Params::Params()
+:	allow_text_entry("allow_text_entry", false),
+	show_text_as_tentative("show_text_as_tentative", true),
+	max_chars("max_chars", 20),
+	arrow_image("arrow_image"),
+	list_position("list_position", BELOW),
+	items("item"),
+	combo_button("combo_button"),
+	combo_list("combo_list"),
+	combo_editor("combo_editor")
 {
-	// children automatically deleted, including mMenu, mButton
+	addSynonym(items, "combo_item");
 }
 
-// virtual
-LLXMLNodePtr LLComboBox::getXML(bool save_children) const
+
+LLComboBox::LLComboBox(const LLComboBox::Params& p)
+:	LLUICtrl(p),
+	mTextEntry(NULL),
+	mTextEntryTentative(p.show_text_as_tentative),
+	mAllowTextEntry(p.allow_text_entry),
+	mMaxChars(p.max_chars),
+	mPrearrangeCallback(p.prearrange_callback()),
+	mTextEntryCallback(p.text_entry_callback()),
+	mSelectionCallback(p.selection_callback()),
+	mArrowImage(p.arrow_image),
+	mListPosition(p.list_position)
 {
-	LLXMLNodePtr node = LLUICtrl::getXML();
+	// Text label button
 
-	// Attributes
+	LLButton::Params button_params = p.combo_button;
+	button_params.mouse_down_callback.function(boost::bind(&LLComboBox::onButtonDown, this));
+	button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT);
+	button_params.rect(p.rect);
+	button_params.pad_right(2);
 
-	node->createChild("allow_text_entry", TRUE)->setBoolValue(mAllowTextEntry);
+	mButton = LLUICtrlFactory::create<LLButton>(button_params);
+	mButton->setRightHPad(2);  //redo to compensate for button hack that leaves space for a character
+	addChild(mButton);
 
-	node->createChild("max_chars", TRUE)->setIntValue(mMaxChars);
+	LLScrollListCtrl::Params params = p.combo_list;
+	params.name("ComboBox");
+	params.commit_callback.function(boost::bind(&LLComboBox::onItemSelected, this, _2));
+	params.visible(false);
+	params.commit_on_keyboard_movement(false);
 
-	// Contents
+	mList = LLUICtrlFactory::create<LLScrollListCtrl>(params);
+	addChild(mList);
 
-	std::vector<LLScrollListItem*> data_list = mList->getAllData();
-	std::vector<LLScrollListItem*>::iterator data_itor;
-	for (data_itor = data_list.begin(); data_itor != data_list.end(); ++data_itor)
+	for (LLInitParam::ParamIterator<ItemParams>::const_iterator it = p.items().begin();
+		it != p.items().end();
+		++it)
 	{
-		LLScrollListItem* item = *data_itor;
-		LLScrollListCell* cell = item->getColumn(0);
-		if (cell)
+		LLScrollListItem::Params item_params = *it;
+		if (it->label.isProvided())
 		{
-			LLXMLNodePtr item_node = node->createChild("combo_item", FALSE);
-			LLSD value = item->getValue();
-			item_node->createChild("value", TRUE)->setStringValue(value.asString());
-			item_node->createChild("enabled", TRUE)->setBoolValue(item->getEnabled());
-			item_node->setStringValue(cell->getValue().asString());
+			item_params.cells.add().value(it->label());
 		}
+
+		mList->addRow(item_params);
 	}
 
-	return node;
+	createLineEditor(p);
+
+	setTopLostCallback(boost::bind(&LLComboBox::hideList, this));
 }
 
-// static
-LLView* LLComboBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
+void LLComboBox::initFromParams(const LLComboBox::Params& p)
 {
-	std::string name("combo_box");
-	node->getAttributeString("name", name);
-
-	std::string label("");
-	node->getAttributeString("label", label);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	BOOL allow_text_entry = FALSE;
-	node->getAttributeBOOL("allow_text_entry", allow_text_entry);
-
-	S32 max_chars = 20;
-	node->getAttributeS32("max_chars", max_chars);
-
-	LLUICtrlCallback callback = NULL;
-
-	LLComboBox* combo_box = new LLComboBox(name,
-							rect, 
-							label,
-							callback,
-							NULL);
-	combo_box->setAllowTextEntry(allow_text_entry, max_chars);
+	LLUICtrl::initFromParams(p);
 
-	combo_box->initFromXML(node, parent);
-
-	const std::string& contents = node->getValue();
-
-	if (contents.find_first_not_of(" \n\t") != contents.npos)
-	{
-		llerrs << "Legacy combo box item format used! Please convert to <combo_item> tags!" << llendl;
-	}
-	else
+	if (!acceptsTextInput() && mLabel.empty())
 	{
-		LLXMLNodePtr child;
-		for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-		{
-			if (child->hasName("combo_item"))
-			{
-				std::string label = child->getTextContents();
-
-				std::string value = label;
-				child->getAttributeString("value", value);
-
-				combo_box->add(label, LLSD(value) );
-			}
-		}
+		selectFirstItem();
 	}
+}
 
-	// if providing user text entry or descriptive label
-	// don't select an item under the hood
-	if (!combo_box->acceptsTextInput() && combo_box->mLabel.empty())
+// virtual
+BOOL LLComboBox::postBuild()
+{
+	if (mControlVariable)
 	{
-		combo_box->selectFirstItem();
+		setValue(mControlVariable->getValue()); // selects the appropriate item
 	}
+	return TRUE;
+}
+
 
-	return combo_box;
+LLComboBox::~LLComboBox()
+{
+	// children automatically deleted, including mMenu, mButton
 }
 
+
 void LLComboBox::setEnabled(BOOL enabled)
 {
 	LLView::setEnabled(enabled);
@@ -237,6 +200,7 @@ void LLComboBox::onCommit()
 		mTextEntry->setValue(getSimple());
 		mTextEntry->setTentative(FALSE);
 	}
+	setControlValue(getValue());
 	LLUICtrl::onCommit();
 }
 
@@ -431,6 +395,7 @@ BOOL LLComboBox::remove(S32 index)
 	if (index < mList->getItemCount())
 	{
 		mList->deleteSingleItem(index);
+		setLabel(mList->getSelectedItemLabel());
 		return TRUE;
 	}
 	return FALSE;
@@ -448,21 +413,17 @@ void LLComboBox::onFocusLost()
 	LLUICtrl::onFocusLost();
 }
 
-void LLComboBox::onLostTop()
-{
-	hideList();
-}
-
-
 void LLComboBox::setButtonVisible(BOOL visible)
 {
+	static LLUICachedControl<S32> drop_shadow_button ("DropShadowButton", 0);
+
 	mButton->setVisible(visible);
 	if (mTextEntry)
 	{
 		LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
 		if (visible)
 		{
-			text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth()) + 2 * LLUI::sConfigGroup->getS32("DropShadowButton");
+			text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth()) + 2 * drop_shadow_button;
 		}
 		//mTextEntry->setRect(text_entry_rect);
 		mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE);
@@ -498,54 +459,48 @@ S32 LLComboBox::getCurrentIndex() const
 }
 
 
-void LLComboBox::updateLayout()
+void LLComboBox::createLineEditor(const LLComboBox::Params& p)
 {
+	static LLUICachedControl<S32> drop_shadow_button ("DropShadowButton", 0);
 	LLRect rect = getLocalRect();
 	if (mAllowTextEntry)
 	{
-		S32 shadow_size = LLUI::sConfigGroup->getS32("DropShadowButton");
+		S32 shadow_size = drop_shadow_button;
 		mButton->setRect(LLRect( getRect().getWidth() - llmax(8,mArrowImage->getWidth()) - 2 * shadow_size,
 								rect.mTop, rect.mRight, rect.mBottom));
 		mButton->setTabStop(FALSE);
+		mButton->setHAlign(LLFontGL::HCENTER);
 
-		if (!mTextEntry)
-		{
-			LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
-			text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth()) + 2 * LLUI::sConfigGroup->getS32("DropShadowButton");
-			// clear label on button
-			std::string cur_label = mButton->getLabelSelected();
-			mTextEntry = new LLLineEditor(std::string("combo_text_entry"),
-										text_entry_rect,
-										LLStringUtil::null,
-										LLFontGL::getFontSansSerifSmall(),
-										mMaxChars,
-										onTextCommit,
-										onTextEntry,
-										NULL,
-										this);
-			mTextEntry->setSelectAllonFocusReceived(TRUE);
-			mTextEntry->setHandleEditKeysDirectly(TRUE);
-			mTextEntry->setCommitOnFocusLost(FALSE);
-			mTextEntry->setText(cur_label);
-			mTextEntry->setIgnoreTab(TRUE);
-			mTextEntry->setFollowsAll();
-			addChild(mTextEntry);
-		}
-		else
-		{
-			mTextEntry->setVisible(TRUE);
-			mTextEntry->setMaxTextLength(mMaxChars);
-		}
+		LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
+		text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth()) + 2 * drop_shadow_button;
+		// clear label on button
+		std::string cur_label = mButton->getLabelSelected();
+		LLLineEditor::Params params = p.combo_editor;
+		params.rect(text_entry_rect);
+		params.default_text(LLStringUtil::null);
+		params.max_length_bytes(mMaxChars);
+		params.commit_callback.function(boost::bind(&LLComboBox::onTextCommit, this, _2));
+		params.keystroke_callback(boost::bind(&LLComboBox::onTextEntry, this, _1));
+		params.focus_lost_callback(NULL);
+		params.select_on_focus(true);
+		params.handle_edit_keys_directly(true);
+		params.commit_on_focus_lost(false);
+		params.follows.flags(FOLLOWS_ALL);
+		mTextEntry = LLUICtrlFactory::create<LLLineEditor> (params);
+		mTextEntry->setText(cur_label);
+		mTextEntry->setIgnoreTab(TRUE);
+		addChild(mTextEntry);
 
 		// clear label on button
 		setLabel(LLStringUtil::null);
 
 		mButton->setFollows(FOLLOWS_BOTTOM | FOLLOWS_TOP | FOLLOWS_RIGHT);
 	}
-	else if (!mAllowTextEntry)
+	else
 	{
 		mButton->setRect(rect);
 		mButton->setTabStop(TRUE);
+		mButton->setHAlign(LLFontGL::LEFT);
 
 		if (mTextEntry)
 		{
@@ -672,7 +627,7 @@ void LLComboBox::hideList()
 
 	mButton->setToggleState(FALSE);
 	mList->setVisible(FALSE);
-	mList->highlightNthItem(-1);
+	mList->mouseOverHighlightNthItem(-1);
 
 	setUseBoundingRect(FALSE);
 	if( gFocusMgr.getTopCtrl() == this )
@@ -681,74 +636,74 @@ void LLComboBox::hideList()
 	}
 }
 
-//------------------------------------------------------------------
-// static functions
-//------------------------------------------------------------------
-
-// static
-void LLComboBox::onButtonDown(void *userdata)
+void LLComboBox::onButtonDown()
 {
-	LLComboBox *self = (LLComboBox *)userdata;
-
-	if (!self->mList->getVisible())
+	if (!mList->getVisible())
 	{
-		LLScrollListItem* last_selected_item = self->mList->getLastSelectedItem();
+		LLScrollListItem* last_selected_item = mList->getLastSelectedItem();
 		if (last_selected_item)
 		{
 			// highlight the original selection before potentially selecting a new item
-			self->mList->highlightNthItem(self->mList->getItemIndex(last_selected_item));
+			mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item));
 		}
 
-		if( self->mPrearrangeCallback )
+		if( mPrearrangeCallback )
 		{
-			self->mPrearrangeCallback( self, self->mCallbackUserData );
+			mPrearrangeCallback( this, LLSD() );
 		}
 
-		if (self->mList->getItemCount() != 0)
+		if (mList->getItemCount() != 0)
 		{
-			self->showList();
+			showList();
 		}
 
-		self->setFocus( TRUE );
+		setFocus( TRUE );
 
 		// pass mouse capture on to list if button is depressed
-		if (self->mButton->hasMouseCapture())
+		if (mButton->hasMouseCapture())
 		{
-			gFocusMgr.setMouseCapture(self->mList);
+			gFocusMgr.setMouseCapture(mList);
 		}
 	}
 	else
 	{
-		self->hideList();
+		hideList();
 	} 
 
 }
 
-// static
-void LLComboBox::onItemSelected(LLUICtrl* item, void *userdata)
-{
-	// Note: item is the LLScrollListCtrl
-	LLComboBox *self = (LLComboBox *) userdata;
 
-	const std::string name = self->mList->getSelectedItemLabel();
+//------------------------------------------------------------------
+// static functions
+//------------------------------------------------------------------
 
-	S32 cur_id = self->getCurrentIndex();
+void LLComboBox::onItemSelected(const LLSD& data)
+{
+	const std::string name = mList->getSelectedItemLabel();
+
+	S32 cur_id = getCurrentIndex();
 	if (cur_id != -1)
 	{
-		self->setLabel(name);
+		setLabel(name);
 
-		if (self->mAllowTextEntry)
+		if (mAllowTextEntry)
 		{
-			gFocusMgr.setKeyboardFocus(self->mTextEntry);
-			self->mTextEntry->selectAll();
+			gFocusMgr.setKeyboardFocus(mTextEntry);
+			mTextEntry->selectAll();
 		}
 	}
 
 	// hiding the list reasserts the old value stored in the text editor/dropdown button
-	self->hideList();
+	hideList();
 
 	// commit does the reverse, asserting the value in the list
-	self->onCommit();
+	onCommit();
+
+	// call the callback if it exists
+	if(mSelectionCallback)
+	{
+		mSelectionCallback(this, data);
+	}
 }
 
 BOOL LLComboBox::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen)
@@ -804,7 +759,7 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
 		if (last_selected_item)
 		{
 			// highlight the original selection before potentially selecting a new item
-			mList->highlightNthItem(mList->getItemIndex(last_selected_item));
+			mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item));
 		}
 		result = mList->handleKeyHere(key, mask);
 
@@ -838,7 +793,7 @@ BOOL LLComboBox::handleUnicodeCharHere(llwchar uni_char)
 			if (last_selected_item)
 			{
 				// highlight the original selection before potentially selecting a new item
-				mList->highlightNthItem(mList->getItemIndex(last_selected_item));
+				mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item));
 			}
 			result = mList->handleUnicodeCharHere(uni_char);
 			if (mList->getLastSelectedItem() != last_selected_item)
@@ -850,15 +805,6 @@ BOOL LLComboBox::handleUnicodeCharHere(llwchar uni_char)
 	return result;
 }
 
-void LLComboBox::setAllowTextEntry(BOOL allow, S32 max_chars, BOOL set_tentative)
-{
-	mAllowTextEntry = allow;
-	mTextEntryTentative = set_tentative;
-	mMaxChars = max_chars;
-
-	updateLayout();
-}
-
 void LLComboBox::setTextEntry(const LLStringExplicit& text)
 {
 	if (mTextEntry)
@@ -868,28 +814,25 @@ void LLComboBox::setTextEntry(const LLStringExplicit& text)
 	}
 }
 
-//static 
-void LLComboBox::onTextEntry(LLLineEditor* line_editor, void* user_data)
+void LLComboBox::onTextEntry(LLLineEditor* line_editor)
 {
-	LLComboBox* self = (LLComboBox*)user_data;
-
-	if (self->mTextEntryCallback)
+	if (mTextEntryCallback != NULL)
 	{
-		(*self->mTextEntryCallback)(line_editor, self->mCallbackUserData);
+		(mTextEntryCallback)(line_editor, LLSD());
 	}
 
 	KEY key = gKeyboard->currentKey();
 	if (key == KEY_BACKSPACE || 
 		key == KEY_DELETE)
 	{
-		if (self->mList->selectItemByLabel(line_editor->getText(), FALSE))
+		if (mList->selectItemByLabel(line_editor->getText(), FALSE))
 		{
 			line_editor->setTentative(FALSE);
 		}
 		else
 		{
-			line_editor->setTentative(self->mTextEntryTentative);
-			self->mList->deselectAllItems();
+			line_editor->setTentative(mTextEntryTentative);
+			mList->deselectAllItems();
 		}
 		return;
 	}
@@ -902,17 +845,17 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor, void* user_data)
 
 	if (key == KEY_DOWN)
 	{
-		self->setCurrentByIndex(llmin(self->getItemCount() - 1, self->getCurrentIndex() + 1));
-		if (!self->mList->getVisible())
+		setCurrentByIndex(llmin(getItemCount() - 1, getCurrentIndex() + 1));
+		if (!mList->getVisible())
 		{
-			if( self->mPrearrangeCallback )
+			if( mPrearrangeCallback )
 			{
-				self->mPrearrangeCallback( self, self->mCallbackUserData );
+				mPrearrangeCallback( this, LLSD() );
 			}
 
-			if (self->mList->getItemCount() != 0)
+			if (mList->getItemCount() != 0)
 			{
-				self->showList();
+				showList();
 			}
 		}
 		line_editor->selectAll();
@@ -920,17 +863,17 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor, void* user_data)
 	}
 	else if (key == KEY_UP)
 	{
-		self->setCurrentByIndex(llmax(0, self->getCurrentIndex() - 1));
-		if (!self->mList->getVisible())
+		setCurrentByIndex(llmax(0, getCurrentIndex() - 1));
+		if (!mList->getVisible())
 		{
-			if( self->mPrearrangeCallback )
+			if( mPrearrangeCallback )
 			{
-				self->mPrearrangeCallback( self, self->mCallbackUserData );
+				mPrearrangeCallback( this, LLSD() );
 			}
 
-			if (self->mList->getItemCount() != 0)
+			if (mList->getItemCount() != 0)
 			{
-				self->showList();
+				showList();
 			}
 		}
 		line_editor->selectAll();
@@ -939,7 +882,7 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor, void* user_data)
 	else
 	{
 		// RN: presumably text entry
-		self->updateSelection();
+		updateSelection();
 	}
 }
 
@@ -958,7 +901,7 @@ void LLComboBox::updateSelection()
 	{
 		if (mPrearrangeCallback)
 		{
-			mPrearrangeCallback( this, mCallbackUserData );
+			mPrearrangeCallback( this, LLSD() );
 		}
 	}
 
@@ -983,14 +926,12 @@ void LLComboBox::updateSelection()
 	}
 }
 
-//static 
-void LLComboBox::onTextCommit(LLUICtrl* caller, void* user_data)
+void LLComboBox::onTextCommit(const LLSD& data)
 {
-	LLComboBox* self = (LLComboBox*)user_data;
-	std::string text = self->mTextEntry->getText();
-	self->setSimple(text);
-	self->onCommit();
-	self->mTextEntry->selectAll();
+	std::string text = mTextEntry->getText();
+	setSimple(text);
+	onCommit();
+	mTextEntry->selectAll();
 }
 
 void LLComboBox::setFocus(BOOL b)
@@ -1114,155 +1055,3 @@ BOOL LLComboBox::selectItemRange( S32 first, S32 last )
 {
 	return mList->selectItemRange(first, last);
 }
-
-
-//
-// LLFlyoutButton
-//
-
-static LLRegisterWidget<LLFlyoutButton> r2("flyout_button");
-
-const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24;
-
-LLFlyoutButton::LLFlyoutButton(
-		const std::string& name, 
-		const LLRect &rect,
-		const std::string& label,
-		void (*commit_callback)(LLUICtrl*, void*) ,
-		void *callback_userdata)
-:		LLComboBox(name, rect, LLStringUtil::null, commit_callback, callback_userdata),
-		mToggleState(FALSE),
-		mActionButton(NULL)
-{
-	// Always use text box 
-	// Text label button
-	mActionButton = new LLButton(label,
-					LLRect(), LLStringUtil::null, NULL, this);
-	mActionButton->setScaleImage(TRUE);
-
-	mActionButton->setClickedCallback(onActionButtonClick);
-	mActionButton->setFollowsAll();
-	mActionButton->setHAlign( LLFontGL::HCENTER );
-	mActionButton->setLabel(label);
-	addChild(mActionButton);
-
-	mActionButtonImage = LLUI::getUIImage("flyout_btn_left.tga");
-	mExpanderButtonImage = LLUI::getUIImage("flyout_btn_right.tga");
-	mActionButtonImageSelected = LLUI::getUIImage("flyout_btn_left_selected.tga");
-	mExpanderButtonImageSelected = LLUI::getUIImage("flyout_btn_right_selected.tga");
-	mActionButtonImageDisabled = LLUI::getUIImage("flyout_btn_left_disabled.tga");
-	mExpanderButtonImageDisabled = LLUI::getUIImage("flyout_btn_right_disabled.tga");
-
-	mActionButton->setImageSelected(mActionButtonImageSelected);
-	mActionButton->setImageUnselected(mActionButtonImage);
-	mActionButton->setImageDisabled(mActionButtonImageDisabled);
-	mActionButton->setImageDisabledSelected(LLPointer<LLUIImage>(NULL));
-
-	mButton->setImageSelected(mExpanderButtonImageSelected);
-	mButton->setImageUnselected(mExpanderButtonImage);
-	mButton->setImageDisabled(mExpanderButtonImageDisabled);
-	mButton->setImageDisabledSelected(LLPointer<LLUIImage>(NULL));
-	mButton->setRightHPad(6);
-
-	updateLayout();
-}
-
-//static 
-LLView* LLFlyoutButton::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name = "flyout_button";
-	node->getAttributeString("name", name);
-
-	std::string label("");
-	node->getAttributeString("label", label);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	LLUICtrlCallback callback = NULL;
-
-	LLFlyoutButton* flyout_button = new LLFlyoutButton(name,
-							rect, 
-							label,
-							callback,
-							NULL);
-
-	std::string list_position;
-	node->getAttributeString("list_position", list_position);
-	if (list_position == "below")
-	{
-		flyout_button->mListPosition = BELOW;
-	}
-	else if (list_position == "above")
-	{
-		flyout_button->mListPosition = ABOVE;
-	}
-	
-
-	flyout_button->initFromXML(node, parent);
-
-	LLXMLNodePtr child;
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-	{
-		if (child->hasName("flyout_button_item"))
-		{
-			std::string label = child->getTextContents();
-
-			std::string value = label;
-			child->getAttributeString("value", value);
-
-			flyout_button->add(label, LLSD(value) );
-		}
-	}
-
-	flyout_button->updateLayout();
-
-	return flyout_button;
-}
-
-void LLFlyoutButton::updateLayout()
-{
-	LLComboBox::updateLayout();
-
-	mButton->setOrigin(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH, 0);
-	mButton->reshape(FLYOUT_BUTTON_ARROW_WIDTH, getRect().getHeight());
-	mButton->setFollows(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
-	mButton->setTabStop(FALSE);
-	mButton->setImageOverlay(mListPosition == BELOW ? "down_arrow.tga" : "up_arrow.tga", LLFontGL::RIGHT);
-
-	mActionButton->setOrigin(0, 0);
-	mActionButton->reshape(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH, getRect().getHeight());
-}
-
-//static 
-void LLFlyoutButton::onActionButtonClick(void *user_data)
-{
-	LLFlyoutButton* buttonp = (LLFlyoutButton*)user_data;
-	// remember last list selection?
-	buttonp->mList->deselect();
-	buttonp->onCommit();
-}
-
-void LLFlyoutButton::draw()
-{
-	mActionButton->setToggleState(mToggleState);
-	mButton->setToggleState(mToggleState);
-
-	//FIXME: this should be an attribute of comboboxes, whether they have a distinct label or
-	// the label reflects the last selected item, for now we have to manually remove the label
-	mButton->setLabel(LLStringUtil::null);
-	LLComboBox::draw();	
-}
-
-void LLFlyoutButton::setEnabled(BOOL enabled)
-{
-	mActionButton->setEnabled(enabled);
-	LLComboBox::setEnabled(enabled);
-}
-
-
-void LLFlyoutButton::setToggleState(BOOL state)
-{
-	mToggleState = state;
-}
-
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index 33e1baa748..e7a864eb82 100644
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -41,14 +41,13 @@
 #include "llctrlselectioninterface.h"
 #include "llimagegl.h"
 #include "llrect.h"
+#include "llscrolllistctrl.h"
+#include "lllineeditor.h"
+#include <boost/function.hpp>
 
 // Classes
 
 class LLFontGL;
-class LLButton;
-class LLSquareButton;
-class LLScrollListCtrl;
-class LLLineEditor;
 class LLViewBorder;
 
 extern S32 LLCOMBOBOX_HEIGHT;
@@ -57,30 +56,61 @@ extern S32 LLCOMBOBOX_WIDTH;
 class LLComboBox
 :	public LLUICtrl, public LLCtrlListInterface
 {
-public:
+public:	
 	typedef enum e_preferred_position
 	{
 		ABOVE,
 		BELOW
 	} EPreferredPosition;
 
-	LLComboBox(
-		const std::string& name, 
-		const LLRect &rect,
-		const std::string& label,
-		void (*commit_callback)(LLUICtrl*, void*) = NULL,
-		void *callback_userdata = NULL
-		);
-	virtual ~LLComboBox(); 
+	struct PreferredPositionValues : public LLInitParam::TypeValuesHelper<EPreferredPosition, PreferredPositionValues>
+	{
+		static void declareValues();
+	};
 
-	// LLView interface
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
+	struct ItemParams : public LLInitParam::Block<ItemParams, LLScrollListItem::Params>
+	{
+		Optional<std::string>	label;
+		ItemParams();
+	};
+
+	struct Params 
+	:	public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<bool>						allow_text_entry,
+											show_text_as_tentative;
+		Optional<S32>						max_chars;
+		Optional<commit_callback_t> 		prearrange_callback,
+											text_entry_callback,
+											selection_callback;
+		Optional<LLUIImage*>				arrow_image;
+
+		Optional<EPreferredPosition, PreferredPositionValues>	list_position;
+		
+		// components
+		Optional<LLButton::Params>			combo_button;
+		Optional<LLScrollListCtrl::Params>	combo_list;
+		Optional<LLLineEditor::Params>		combo_editor;
+
+		Multiple<ItemParams>				items;
+		
+		Params();
+	};
+
 
+	virtual ~LLComboBox(); 
+	/*virtual*/ BOOL postBuild();
+	
+protected:
+	friend class LLUICtrlFactory;
+	LLComboBox(const Params&);
+	void	initFromParams(const Params&);
+
+public:
+	// LLView interface
 	virtual void	draw();
 	virtual void	onFocusLost();
-	virtual void	onLostTop();
 
 	virtual void	setEnabled(BOOL enabled);
 
@@ -105,7 +135,6 @@ public:
 	// items, this is just the label.
 	virtual LLSD	getValue() const;
 
-	void			setAllowTextEntry(BOOL allow, S32 max_chars = 50, BOOL make_tentative = TRUE);
 	void			setTextEntry(const LLStringExplicit& text);
 
 	LLScrollListItem*	add(const std::string& name, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);	// add item "name" to menu
@@ -134,7 +163,7 @@ public:
 	BOOL			setCurrentByIndex( S32 index );
 	S32				getCurrentIndex() const;
 
-	virtual void	updateLayout();
+	void			createLineEditor(const Params&);
 
 	//========================================================================
 	LLCtrlSelectionInterface* getSelectionInterface()	{ return (LLCtrlSelectionInterface*)this; };
@@ -170,26 +199,28 @@ public:
 	
 	void*			getCurrentUserdata();
 
-	void			setPrearrangeCallback( void (*cb)(LLUICtrl*,void*) ) { mPrearrangeCallback = cb; }
-	void			setTextEntryCallback( void (*cb)(LLLineEditor*, void*) ) { mTextEntryCallback = cb; }
+	void			setPrearrangeCallback( commit_callback_t cb ) { mPrearrangeCallback = cb; }
+	void			setTextEntryCallback( commit_callback_t cb ) { mTextEntryCallback = cb; }
+	void			setSelectionCallback( commit_callback_t cb ) { mSelectionCallback = cb; }
 
 	void			setButtonVisible(BOOL visible);
 
-	static void		onButtonDown(void *userdata);
-	static void		onItemSelected(LLUICtrl* item, void *userdata);
-	static void		onTextEntry(LLLineEditor* line_editor, void* user_data);
-	static void		onTextCommit(LLUICtrl* caller, void* user_data);
+	void			onButtonDown();
+	void			onItemSelected(const LLSD& data);
+	void			onTextCommit(const LLSD& data);
 
 	void			updateSelection();
 	virtual void	showList();
 	virtual void	hideList();
-
+	
+	void			onTextEntry(LLLineEditor* line_editor);
+	
 protected:
 	LLButton*			mButton;
 	LLScrollListCtrl*	mList;
 	EPreferredPosition	mListPosition;
 	LLPointer<LLUIImage>	mArrowImage;
-	std::string			mLabel;
+	LLUIString			mLabel;
 
 private:
 	S32					mButtonPadding;
@@ -197,39 +228,16 @@ private:
 	BOOL				mAllowTextEntry;
 	S32					mMaxChars;
 	BOOL				mTextEntryTentative;
-	void				(*mPrearrangeCallback)(LLUICtrl*,void*);
-	void				(*mTextEntryCallback)(LLLineEditor*, void*);
+	commit_callback_t	mPrearrangeCallback;
+	commit_callback_t	mTextEntryCallback;
+	commit_callback_t	mSelectionCallback;
 };
 
-class LLFlyoutButton : public LLComboBox
-{
-public:
-	LLFlyoutButton(
-		const std::string& name, 
-		const LLRect &rect,
-		const std::string& label,
-		void (*commit_callback)(LLUICtrl*, void*) = NULL,
-		void *callback_userdata = NULL);
-
-	virtual void	updateLayout();
-	virtual void	draw();
-	virtual void	setEnabled(BOOL enabled);
-
-	void setToggleState(BOOL state);
-
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-	static void		onActionButtonClick(void *userdata);
-	static void		onSelectAction(LLUICtrl* ctrl, void *userdata);
-
-protected:
-	LLButton*				mActionButton;
-	LLPointer<LLUIImage>	mActionButtonImage;
-	LLPointer<LLUIImage>	mExpanderButtonImage;
-	LLPointer<LLUIImage>	mActionButtonImageSelected;
-	LLPointer<LLUIImage>	mExpanderButtonImageSelected;
-	LLPointer<LLUIImage>	mActionButtonImageDisabled;
-	LLPointer<LLUIImage>	mExpanderButtonImageDisabled;
-	BOOL					mToggleState;
-};
+#ifdef LL_WINDOWS
+#ifndef INSTANTIATE_GETCHILD_COMBOBOX
+#pragma warning (disable : 4231)
+extern template LLComboBox* LLView::getChild<LLComboBox>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
+#endif
+#endif
 
 #endif
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
new file mode 100644
index 0000000000..f1fc3d8f43
--- /dev/null
+++ b/indra/llui/llconsole.cpp
@@ -0,0 +1,393 @@
+/** 
+ * @file llconsole.cpp
+ * @brief a scrolling console output device
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+//#include "llviewerprecompiledheaders.h"
+#include "linden_common.h"
+
+#include "llconsole.h"
+
+// linden library includes
+#include "llmath.h"
+//#include "llviewercontrol.h"
+#include "llcriticaldamp.h"
+#include "llfontgl.h"
+#include "llgl.h"
+#include "llui.h"
+#include "lluiimage.h"
+//#include "llviewerimage.h"
+//#include "llviewerimagelist.h"
+//#include "llviewerwindow.h"
+#include "llsd.h"
+#include "llfontgl.h"
+#include "llmath.h"
+
+//#include "llstartup.h"
+
+// Used for LCD display
+extern void AddNewDebugConsoleToLCD(const LLWString &newLine);
+
+LLConsole* gConsole = NULL;  // Created and destroyed in LLViewerWindow.
+
+const F32 FADE_DURATION = 2.f;
+const S32 MIN_CONSOLE_WIDTH = 200;
+ 
+LLConsole::LLConsole(const LLConsole::Params& p) 
+:	LLView(p),
+	LLFixedBuffer(p.max_lines),
+	mLinePersistTime(p.persist_time), // seconds
+	mFont(p.font)
+{
+	if (p.font_size_index.isProvided())
+	{
+		setFontSize(p.font_size_index);
+	}
+	mFadeTime = mLinePersistTime - FADE_DURATION;
+	setMaxLines(LLUI::sSettingGroups["config"]->getS32("ConsoleMaxLines"));
+}
+
+void LLConsole::setLinePersistTime(F32 seconds)
+{
+	mLinePersistTime = seconds;
+	mFadeTime = mLinePersistTime - FADE_DURATION;
+}
+
+void LLConsole::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+	S32 new_width = llmax(50, llmin(getRect().getWidth(), width));
+	S32 new_height = llmax(llfloor(mFont->getLineHeight()) + 15, llmin(getRect().getHeight(), height));
+
+	if (   mConsoleWidth == new_width
+		&& mConsoleHeight == new_height )
+	{
+		return;
+	}
+	
+	mConsoleWidth = new_width;
+	mConsoleHeight= new_height;
+	
+	LLView::reshape(new_width, new_height, called_from_parent);
+	
+	for(paragraph_t::iterator paragraph_it = mParagraphs.begin(); paragraph_it != mParagraphs.end(); paragraph_it++)
+	{
+		(*paragraph_it).updateLines((F32)getRect().getWidth(), mFont, true);
+	}
+}
+
+void LLConsole::setFontSize(S32 size_index)
+{
+	if (-1 == size_index)
+	{
+		mFont = LLFontGL::getFontMonospace();
+	}
+	else if (0 == size_index)
+	{
+		mFont = LLFontGL::getFontSansSerif();
+	}
+	else if (1 == size_index)
+	{
+		mFont = LLFontGL::getFontSansSerifBig();
+	}
+	else
+	{
+		mFont = LLFontGL::getFontSansSerifHuge();
+	}
+	
+	for(paragraph_t::iterator paragraph_it = mParagraphs.begin(); paragraph_it != mParagraphs.end(); paragraph_it++)
+	{
+		(*paragraph_it).updateLines((F32)getRect().getWidth(), mFont, true);
+	}
+}
+
+void LLConsole::draw()
+{
+	LLGLSUIDefault gls_ui;
+
+	// skip lines added more than mLinePersistTime ago
+	F32 cur_time = mTimer.getElapsedTimeF32();
+	
+	F32 skip_time = cur_time - mLinePersistTime;
+	F32 fade_time = cur_time - mFadeTime;
+
+	if (mParagraphs.empty()) 	//No text to draw.
+	{
+		return;
+	}
+
+	U32 num_lines=0;
+
+	paragraph_t::reverse_iterator paragraph_it;
+	paragraph_it = mParagraphs.rbegin();
+	U32 paragraph_num=mParagraphs.size();
+	
+	while (!mParagraphs.empty() && paragraph_it != mParagraphs.rend())
+	{
+		num_lines += (*paragraph_it).mLines.size();
+		if(num_lines > mMaxLines 
+			|| ( (mLinePersistTime > (F32)0.f) && ((*paragraph_it).mAddTime - skip_time)/(mLinePersistTime - mFadeTime) <= (F32)0.f)) 
+		{							//All lines above here are done.  Lose them.
+			for (U32 i=0;i<paragraph_num;i++)
+			{
+				if (!mParagraphs.empty())
+					mParagraphs.pop_front();
+			}
+			break;
+		}
+		paragraph_num--;
+		paragraph_it++;
+	}
+
+	if (mParagraphs.empty())
+	{
+		return;
+	}
+	
+	// draw remaining lines
+	F32 y_pos = 0.f;
+
+	LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga");
+
+//	F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
+	F32 console_opacity = llclamp(LLUI::sSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
+//	LLColor4 color = gSavedSkinSettings.getColor("ConsoleBackground");
+	LLColor4 color = LLUI::sSettingGroups["color"]->getColor("ConsoleBackground");
+	color.mV[VALPHA] *= console_opacity;
+
+	F32 line_height = mFont->getLineHeight();
+
+	for(paragraph_it = mParagraphs.rbegin(); paragraph_it != mParagraphs.rend(); paragraph_it++)
+	{
+		S32 target_height = llfloor( (*paragraph_it).mLines.size() * line_height + 8);
+		S32 target_width =  llfloor( (*paragraph_it).mMaxWidth +15);
+
+		y_pos += ((*paragraph_it).mLines.size()) * line_height;
+		imagep->drawSolid(-14, (S32)(y_pos + line_height - target_height), target_width, target_height, color);
+
+		F32 y_off=0;
+
+		F32 alpha;
+
+		if ((mLinePersistTime > 0.f) && ((*paragraph_it).mAddTime < fade_time))
+		{
+			alpha = ((*paragraph_it).mAddTime - skip_time)/(mLinePersistTime - mFadeTime);
+		}
+		else
+		{
+			alpha = 1.0f;
+		}
+
+		if( alpha > 0.f )
+		{
+			for (lines_t::iterator line_it=(*paragraph_it).mLines.begin(); 
+					line_it != (*paragraph_it).mLines.end();
+					line_it ++)
+			{
+				for (line_color_segments_t::iterator seg_it = (*line_it).mLineColorSegments.begin();
+						seg_it != (*line_it).mLineColorSegments.end();
+						seg_it++)
+				{
+					mFont->render((*seg_it).mText, 0, (*seg_it).mXPosition - 8, y_pos -  y_off,
+						LLColor4(
+							(*seg_it).mColor.mV[VRED], 
+							(*seg_it).mColor.mV[VGREEN], 
+							(*seg_it).mColor.mV[VBLUE], 
+							(*seg_it).mColor.mV[VALPHA]*alpha),
+						LLFontGL::LEFT, 
+						LLFontGL::BASELINE,
+						LLFontGL::NORMAL,
+						LLFontGL::DROP_SHADOW,
+						S32_MAX,
+						target_width
+						);
+				}
+				y_off += line_height;
+			}
+		}
+		y_pos  += 8;
+	}
+}
+
+void LLConsole::addLine(const std::string& utf8line)
+{
+	LLWString wline = utf8str_to_wstring(utf8line);
+	addLine(wline, 0.f, LLColor4(1.f, 1.f, 1.f, 1.f));
+}
+
+void LLConsole::addLine(const LLWString& wline)
+{
+	addLine(wline, 0.f, LLColor4(1.f, 1.f, 1.f, 1.f));
+}
+
+void LLConsole::addLine(const std::string& utf8line, F32 size, const LLColor4 &color)
+{
+	LLWString wline = utf8str_to_wstring(utf8line);
+	addLine(wline, size, color);
+}
+
+//Generate highlight color segments for this paragraph.  Pass in default color of paragraph.
+void LLConsole::Paragraph::makeParagraphColorSegments (const LLColor4 &color) 
+{
+	LLSD paragraph_color_segments;
+	LLColor4 lcolor=color;
+	
+	paragraph_color_segments[0]["text"] =wstring_to_utf8str(mParagraphText);
+	LLSD color_sd = color.getValue();
+	paragraph_color_segments[0]["color"]=color_sd;
+
+	for(LLSD::array_const_iterator color_segment_it = paragraph_color_segments.beginArray();
+		color_segment_it != paragraph_color_segments.endArray();
+		++color_segment_it)
+	{			
+		LLSD color_llsd = (*color_segment_it)["color"];
+		std::string color_str  = (*color_segment_it)["text"].asString();
+
+		ParagraphColorSegment color_segment;
+		
+		color_segment.mColor.setValue(color_llsd);
+		color_segment.mNumChars = color_str.length();
+		
+		mParagraphColorSegments.push_back(color_segment);
+	}
+}
+
+//Called when a paragraph is added to the console or window is resized.
+void LLConsole::Paragraph::updateLines(F32 screen_width, const LLFontGL* font, bool force_resize)
+{
+	if ( !force_resize )
+	{
+		if ( mMaxWidth >= 0.0f 
+		 &&  mMaxWidth < screen_width )
+		{
+			return;					//No resize required.
+		}
+	}
+	
+	screen_width = screen_width - 30;	//Margin for small windows.
+	
+	if (	mParagraphText.empty() 
+		|| mParagraphColorSegments.empty()
+		|| font == NULL)
+	{
+		return;					//Not enough info to complete.
+	}
+	
+	mLines.clear();				//Chuck everything.
+	mMaxWidth = 0.0f;
+	
+	paragraph_color_segments_t::iterator current_color = mParagraphColorSegments.begin();
+	U32 current_color_length = (*current_color).mNumChars;	
+	
+	S32 paragraph_offset = 0;			//Offset into the paragraph text.
+
+	// Wrap lines that are longer than the view is wide.
+	while( paragraph_offset < (S32)mParagraphText.length() )
+	{
+		S32 skip_chars; // skip '\n'
+		// Figure out if a word-wrapped line fits here.
+		LLWString::size_type line_end = mParagraphText.find_first_of(llwchar('\n'), paragraph_offset);
+		if (line_end != LLWString::npos)
+		{
+			skip_chars = 1; // skip '\n'
+		}
+		else
+		{
+			line_end = mParagraphText.size();
+			skip_chars = 0;
+		}
+
+		U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, TRUE);
+
+		if (drawable != 0)
+		{
+			F32 x_position = 0;						//Screen X position of text.
+			
+			mMaxWidth = llmax( mMaxWidth, (F32)font->getWidth( mParagraphText.substr( paragraph_offset, drawable ).c_str() ) );
+			Line line;
+			
+			U32 left_to_draw = drawable;
+			U32 drawn = 0;
+			
+			while (left_to_draw >= current_color_length 
+				&& current_color != mParagraphColorSegments.end() )
+			{
+				LLWString color_text = mParagraphText.substr( paragraph_offset + drawn, current_color_length );
+				line.mLineColorSegments.push_back( LineColorSegment( color_text,			//Append segment to line.
+												(*current_color).mColor, 
+												x_position ) );
+												
+				x_position += font->getWidth( color_text.c_str() );	//Set up next screen position.
+				
+				drawn += current_color_length;
+				left_to_draw -= current_color_length;
+				
+				current_color++;							//Goto next paragraph color record.
+				
+				if (current_color != mParagraphColorSegments.end())
+				{
+					current_color_length = (*current_color).mNumChars;
+				}
+			}
+			
+			if (left_to_draw > 0 && current_color != mParagraphColorSegments.end() )
+			{
+					LLWString color_text = mParagraphText.substr( paragraph_offset + drawn, left_to_draw );
+					
+					line.mLineColorSegments.push_back( LineColorSegment( color_text,		//Append segment to line.
+													(*current_color).mColor, 
+													x_position ) );
+																		
+					current_color_length -= left_to_draw;
+			}
+			mLines.push_back(line);								//Append line to paragraph line list.
+		}
+		paragraph_offset += (drawable + skip_chars);
+	}
+}
+
+//Pass in the string and the default color for this block of text.
+LLConsole::Paragraph::Paragraph (LLWString str, const LLColor4 &color, F32 add_time, const LLFontGL* font, F32 screen_width) 
+						: mParagraphText(str), mAddTime(add_time), mMaxWidth(-1)
+{
+	makeParagraphColorSegments(color);
+	updateLines( screen_width, font );
+}
+	
+void LLConsole::addLine(const LLWString& wline, F32 size, const LLColor4 &color)
+{	
+	Paragraph paragraph(wline, color, mTimer.getElapsedTimeF32(), mFont,  (F32)getRect().getWidth() );
+	
+	mParagraphs.push_back ( paragraph );
+	
+#if LL_WINDOWS && LL_LCD_COMPILE
+	// add to LCD screen
+	AddNewDebugConsoleToLCD(wline);
+#endif	
+}
diff --git a/indra/llui/llconsole.h b/indra/llui/llconsole.h
new file mode 100644
index 0000000000..65149b217f
--- /dev/null
+++ b/indra/llui/llconsole.h
@@ -0,0 +1,162 @@
+/** 
+ * @file llconsole.h
+ * @brief a simple console-style output device
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLCONSOLE_H
+#define LL_LLCONSOLE_H
+
+#include "llfixedbuffer.h"
+#include "llview.h"
+#include "v4color.h"
+#include <deque>
+
+class LLFontGL;
+class LLSD;
+
+class LLConsole : public LLFixedBuffer, public LLView
+{
+public:
+	typedef enum e_font_size
+	{
+		MONOSPACE = -1,
+		SMALL = 0,
+		BIG = 1
+	} EFontSize;
+
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Optional<U32>	max_lines;
+		Optional<F32>	persist_time;
+		Optional<S32>	font_size_index;
+		Params()
+		:	max_lines("max_lines", LLUI::sSettingGroups["config"]->getS32("ConsoleMaxLines")),
+			persist_time("persist_time", 0.f) // forever
+		{
+			mouse_opaque(false);
+		}
+	};
+protected:
+	LLConsole(const Params&);
+	friend class LLUICtrlFactory;
+
+public:
+	//A paragraph color segment defines the color of text in a line 
+	//of text that was received for console display.  It has no 
+	//notion of line wraps, screen position, or the text it contains.
+	//It is only the number of characters that are a color and the
+	//color.
+	struct ParagraphColorSegment
+	{
+		S32		mNumChars;
+		LLColor4 mColor;
+	};
+	
+	//A line color segment is a chunk of text, the color associated
+	//with it, and the X Position it was calculated to begin at 
+	//on the screen.  X Positions are re-calculated if the 
+	//screen changes size.
+	class LineColorSegment
+	{
+		public:
+			LineColorSegment(LLWString text, LLColor4 color, F32 xpos) : mText(text), mColor(color), mXPosition(xpos) {}
+		public:
+			LLWString mText;
+			LLColor4  mColor;
+			F32		  mXPosition;
+	};
+	 	
+	typedef std::list<LineColorSegment> line_color_segments_t;
+	
+	//A line is composed of one or more color segments.
+	class Line
+	{
+		public:
+			line_color_segments_t mLineColorSegments;
+	};
+	
+	typedef std::list<Line> lines_t;
+	typedef std::list<ParagraphColorSegment> paragraph_color_segments_t;
+	
+	//A paragraph is a processed element containing the entire text of the
+	//message (used for recalculating positions on screen resize)
+	//The time this message was added to the console output
+	//The visual screen width of the longest line in this block
+	//And a list of one or more lines which are used to display this message.
+	class Paragraph
+	{
+		public:
+			Paragraph (LLWString str, const LLColor4 &color, F32 add_time, const LLFontGL* font, F32 screen_width);
+			void makeParagraphColorSegments ( const LLColor4 &color);
+			void updateLines ( F32 screen_width,  const LLFontGL* font, bool force_resize=false );
+		public:
+			LLWString mParagraphText;	//The entire text of the paragraph
+			paragraph_color_segments_t	mParagraphColorSegments;
+			F32 mAddTime;				//Time this paragraph was added to the display.
+			F32 mMaxWidth;				//Width of the widest line of text in this paragraph.
+			lines_t	mLines;
+			
+	};
+		
+	//The console contains a deque of paragraphs which represent the individual messages.
+	typedef std::deque<Paragraph> paragraph_t;
+	paragraph_t mParagraphs;
+
+	~LLConsole(){};
+
+	// each line lasts this long after being added
+	void			setLinePersistTime(F32 seconds);
+
+	void			reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+	// -1 = monospace, 0 means small, font size = 1 means big
+	void			setFontSize(S32 size_index);
+
+	void			addLine(const std::string& utf8line, F32 size, const LLColor4 &color);
+	void			addLine(const LLWString& wline, F32 size, const LLColor4 &color);
+	
+	// Overrides
+	/*virtual*/ void	draw();
+	/*virtual*/ void	addLine(const std::string& utf8line);
+	/*virtual*/ void	addLine(const LLWString& line);
+private:
+	F32			mLinePersistTime; // Age at which to stop drawing.
+	F32			mFadeTime; // Age at which to start fading
+	const LLFontGL*	mFont;
+	S32			mLastBoxHeight;
+	S32			mLastBoxWidth;
+	S32			mConsoleWidth;
+	S32			mConsoleHeight;
+
+};
+
+extern LLConsole* gConsole;
+
+#endif
diff --git a/indra/llui/llcontainerview.cpp b/indra/llui/llcontainerview.cpp
new file mode 100644
index 0000000000..a63023e35c
--- /dev/null
+++ b/indra/llui/llcontainerview.cpp
@@ -0,0 +1,301 @@
+/** 
+ * @file llcontainerview.cpp
+ * @brief Container for all statistics info
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llcontainerview.h"
+
+#include "llerror.h"
+#include "llfontgl.h"
+#include "llgl.h"
+#include "llui.h"
+#include "llstring.h"
+#include "llscrollcontainer.h"
+#include "lluictrlfactory.h"
+
+static LLRegisterWidget<LLContainerView> r("container_view");
+
+LLContainerView::LLContainerView(const LLContainerView::Params& p)
+:	LLView(p),
+	mShowLabel(p.show_label),
+	mLabel(p.label),
+	mDisplayChildren(p.display_children)
+{
+	mCollapsible = TRUE;
+	mScrollContainer = NULL;
+}
+
+LLContainerView::~LLContainerView()
+{
+	// Children all cleaned up by default view destructor.
+}
+
+BOOL LLContainerView::postBuild()
+{
+	setDisplayChildren(mDisplayChildren);
+	reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
+	return TRUE;
+}
+
+bool LLContainerView::addChild(LLView* child, S32 tab_group)
+{
+	bool res = LLView::addChild(child, tab_group);
+	if (res)
+	{
+		sendChildToBack(child);
+	}
+	return res;
+}
+
+BOOL LLContainerView::handleMouseDown(S32 x, S32 y, MASK mask)
+{
+	BOOL handled = FALSE;
+	if (mDisplayChildren)
+	{
+		handled = (LLView::childrenHandleMouseDown(x, y, mask) != NULL);
+	}
+	if (!handled)
+	{
+		if( mCollapsible && mShowLabel && (y >= getRect().getHeight() - 10) )
+		{
+			setDisplayChildren(!mDisplayChildren);
+			reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
+			handled = TRUE;
+		}
+	}
+	return handled;
+}
+
+BOOL LLContainerView::handleMouseUp(S32 x, S32 y, MASK mask)
+{
+	BOOL handled = FALSE;
+	if (mDisplayChildren)
+	{
+		handled = (LLView::childrenHandleMouseUp(x, y, mask) != NULL);
+	}
+	return handled;
+}
+
+
+void LLContainerView::draw()
+{
+	{
+		gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+		gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4(0.f, 0.f, 0.f, 0.25f));
+	}
+		
+	// Draw the label
+	if (mShowLabel)
+	{
+		LLFontGL::getFontMonospace()->renderUTF8(
+			mLabel, 0, 2, getRect().getHeight() - 2, LLColor4(1,1,1,1), LLFontGL::LEFT, LLFontGL::TOP);
+	}
+
+	LLView::draw();
+}
+
+
+void LLContainerView::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+	S32 desired_width = width;
+	S32 desired_height = height;
+
+	if (mScrollContainer)
+	{
+		BOOL dum_bool;
+		mScrollContainer->calcVisibleSize(&desired_width, &desired_height, &dum_bool, &dum_bool);
+	}
+	else
+	{
+		// if we're uncontained - make height as small as possible
+		desired_height = 0;
+	}
+
+	arrange(desired_width, desired_height, called_from_parent);
+
+	// sometimes, after layout, our container will change size (scrollbars popping in and out)
+	// if so, attempt another layout
+	if (mScrollContainer)
+	{
+		S32 new_container_width;
+		S32 new_container_height;
+		BOOL dum_bool;
+		mScrollContainer->calcVisibleSize(&new_container_width, &new_container_height, &dum_bool, &dum_bool);
+
+		if ((new_container_width != desired_width) ||
+			(new_container_height != desired_height))  // the container size has changed, attempt to arrange again
+		{
+			arrange(new_container_width, new_container_height, called_from_parent);
+		}
+	}
+}
+
+void LLContainerView::arrange(S32 width, S32 height, BOOL called_from_parent)
+{
+	// Determine the sizes and locations of all contained views
+	S32 total_height = 0;
+	S32 top, left, right, bottom;
+	//LLView *childp;
+
+	// These will be used for the children
+	left = 4;
+	top = getRect().getHeight() - 4;
+	right = width - 2;
+	bottom = top;
+	
+	// Leave some space for the top label/grab handle
+	if (mShowLabel)
+	{
+		total_height += 20;
+	}
+
+	if (mDisplayChildren)
+	{
+		// Determine total height
+		U32 child_height = 0;
+		for (child_list_const_iter_t child_iter = getChildList()->begin();
+			 child_iter != getChildList()->end(); ++child_iter)
+		{
+			LLView *childp = *child_iter;
+			if (!childp->getVisible())
+			{
+				llwarns << "Incorrect visibility!" << llendl;
+			}
+			LLRect child_rect = childp->getRequiredRect();
+			child_height += child_rect.getHeight();
+			child_height += 2;
+		}
+		total_height += child_height;
+	}
+
+	if (total_height < height)
+		total_height = height;
+	
+	if (followsTop())
+	{
+		// HACK: casting away const. Should use setRect or some helper function instead.
+		const_cast<LLRect&>(getRect()).mBottom = getRect().mTop - total_height;
+	}
+	else
+	{
+		// HACK: casting away const. Should use setRect or some helper function instead.
+		const_cast<LLRect&>(getRect()).mTop = getRect().mBottom + total_height;
+	}
+	// HACK: casting away const. Should use setRect or some helper function instead.
+		const_cast<LLRect&>(getRect()).mRight = getRect().mLeft + width;
+
+	top = total_height;
+	if (mShowLabel)
+		{
+			top -= 20;
+		}
+	
+	bottom = top;
+
+	if (mDisplayChildren)
+	{
+		// Iterate through all children, and put in container from top down.
+		for (child_list_const_iter_t child_iter = getChildList()->begin();
+			 child_iter != getChildList()->end(); ++child_iter)
+		{
+			LLView *childp = *child_iter;
+			LLRect child_rect = childp->getRequiredRect();
+			bottom -= child_rect.getHeight();
+			LLRect r(left, bottom + child_rect.getHeight(), right, bottom);
+			childp->setRect(r);
+			childp->reshape(right - left, top - bottom);
+			top = bottom - 2;
+			bottom = top;
+		}
+	}
+	
+	if (!called_from_parent)
+	{
+		if (getParent())
+		{
+			getParent()->reshape(getParent()->getRect().getWidth(), getParent()->getRect().getHeight(), FALSE);
+		}
+	}
+
+}
+
+LLRect LLContainerView::getRequiredRect()
+{
+	LLRect req_rect;
+	//LLView *childp;
+	U32 total_height = 0;
+	
+	// Determine the sizes and locations of all contained views
+
+	// Leave some space for the top label/grab handle
+
+	if (mShowLabel)
+	{
+		total_height = 20;
+	}
+		
+
+	if (mDisplayChildren)
+	{
+		// Determine total height
+		U32 child_height = 0;
+		for (child_list_const_iter_t child_iter = getChildList()->begin();
+			 child_iter != getChildList()->end(); ++child_iter)
+		{
+			LLView *childp = *child_iter;
+			LLRect child_rect = childp->getRequiredRect();
+			child_height += child_rect.getHeight();
+			child_height += 2;
+		}
+
+		total_height += child_height;
+	}
+	req_rect.mTop = total_height;
+	return req_rect;
+}
+
+void LLContainerView::setLabel(const std::string& label)
+{
+	mLabel = label;
+}
+
+void LLContainerView::setDisplayChildren(const BOOL displayChildren)
+{
+	mDisplayChildren = displayChildren;
+	for (child_list_const_iter_t child_iter = getChildList()->begin();
+		 child_iter != getChildList()->end(); ++child_iter)
+	{
+		LLView *childp = *child_iter;
+		childp->setVisible(mDisplayChildren);
+	}
+}
diff --git a/indra/llui/llcontainerview.h b/indra/llui/llcontainerview.h
new file mode 100644
index 0000000000..9f3d1ac7ad
--- /dev/null
+++ b/indra/llui/llcontainerview.h
@@ -0,0 +1,92 @@
+/** 
+ * @file llcontainerview.h
+ * @brief Container for all statistics info.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLCONTAINERVIEW_H
+#define LL_LLCONTAINERVIEW_H
+
+#include "stdtypes.h"
+#include "lltextbox.h"
+#include "llstatbar.h"
+
+class LLScrollContainer;
+
+class LLContainerView : public LLView
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Optional<std::string> label;
+		Optional<bool> show_label;
+		Optional<bool> display_children;
+		Params()
+			: label("label"),
+			  show_label("show_label", FALSE),
+			  display_children("display_children", TRUE)
+		{
+			mouse_opaque(false);
+		}
+	};
+protected:
+	LLContainerView(const Params& p);
+	friend class LLUICtrlFactory;
+public:
+	~LLContainerView();
+
+	/*virtual*/ BOOL postBuild();
+	/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
+	
+	/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+	/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+
+	/*virtual*/ void draw();
+	/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+	/*virtual*/ LLRect getRequiredRect();	// Return the height of this object, given the set options.
+
+	void setLabel(const std::string& label);
+	void showLabel(BOOL show) { mShowLabel = show; }
+	void setDisplayChildren(const BOOL displayChildren);
+	BOOL getDisplayChildren() { return mDisplayChildren; }
+	void setScrollContainer(LLScrollContainer* scroll) {mScrollContainer = scroll;}
+
+ private:
+	LLScrollContainer* mScrollContainer;
+	void arrange(S32 width, S32 height, BOOL called_from_parent = TRUE);
+	BOOL mShowLabel;
+
+protected:
+	BOOL mDisplayChildren;
+	std::string mLabel;
+public:
+	BOOL mCollapsible;
+
+};
+#endif // LL_CONTAINERVIEW_
diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp
index 6c92ea1ff7..8ecbdb98e1 100644
--- a/indra/llui/lldraghandle.cpp
+++ b/indra/llui/lldraghandle.cpp
@@ -43,10 +43,10 @@
 #include "llmenugl.h"
 #include "lltextbox.h"
 #include "llcontrol.h"
-#include "llresmgr.h"
 #include "llfontgl.h"
 #include "llwindow.h"
 #include "llfocusmgr.h"
+#include "lluictrlfactory.h"
 
 const S32 LEADING_PAD = 5;
 const S32 TITLE_PAD = 8;
@@ -56,21 +56,33 @@ const S32 RIGHT_PAD = BORDER_PAD + 32; // HACK: space for close btn and minimize
 
 S32 LLDragHandle::sSnapMargin = 5;
 
-LLDragHandle::LLDragHandle( const std::string& name, const LLRect& rect, const std::string& title )
-:	LLView( name, rect, TRUE ),
+LLDragHandle::LLDragHandle(const LLDragHandle::Params& p)
+:	LLView(p),
 	mDragLastScreenX( 0 ),
 	mDragLastScreenY( 0 ),
 	mLastMouseScreenX( 0 ),
 	mLastMouseScreenY( 0 ),
-	mDragHighlightColor(	LLUI::sColorsGroup->getColor( "DefaultHighlightLight" ) ),
-	mDragShadowColor(		LLUI::sColorsGroup->getColor( "DefaultShadowDark" ) ),
 	mTitleBox( NULL ),
 	mMaxTitleWidth( 0 ),
-	mForeground( TRUE )
+	mForeground( TRUE ),
+	mDragHighlightColor(p.drag_highlight_color()),
+	mDragShadowColor(p.drag_shadow_color())
+
 {
-	sSnapMargin = LLUI::sConfigGroup->getS32("SnapMargin");
+	static LLUICachedControl<S32> snap_margin ("SnapMargin", 0);
+	sSnapMargin = snap_margin;
+}
 
-	setSaveToXML(false);
+LLDragHandle::~LLDragHandle()
+{
+	removeChild(mTitleBox);
+	delete mTitleBox;
+}
+
+void LLDragHandle::initFromParams(const LLDragHandle::Params& p)
+{
+	LLView::initFromParams(p);
+	setTitle( p.label );
 }
 
 void LLDragHandle::setTitleVisible(BOOL visible) 
@@ -81,58 +93,47 @@ void LLDragHandle::setTitleVisible(BOOL visible)
 	}
 }
 
-void LLDragHandle::setTitleBox(LLTextBox* titlebox)
-{	
+void LLDragHandleTop::setTitle(const std::string& title)
+{
+	std::string trimmed_title = title;
+	LLStringUtil::trim(trimmed_title);
+
 	if( mTitleBox )
 	{
-		removeChild(mTitleBox);
-		delete mTitleBox;
+		mTitleBox->setText(trimmed_title);
 	}
-	mTitleBox = titlebox;
-	if(mTitleBox)
+	else
 	{
+		const LLFontGL* font = LLFontGL::getFontSansSerif();
+		LLTextBox::Params params;
+		params.name("Drag Handle Title");
+		params.rect(getRect());
+		params.text(trimmed_title);
+		params.font(font);
+		params.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT);
+		params.font_shadow(LLFontGL::DROP_SHADOW_SOFT);
+		mTitleBox = LLUICtrlFactory::create<LLTextBox> (params);
 		addChild( mTitleBox );
 	}
-}
-
-LLDragHandleTop::LLDragHandleTop(const std::string& name, const LLRect &rect, const std::string& title)
-:	LLDragHandle(name, rect, title)
-{
-	setFollowsAll();
-	setTitle( title );
-}
-
-LLDragHandleLeft::LLDragHandleLeft(const std::string& name, const LLRect &rect, const std::string& title)
-:	LLDragHandle(name, rect, title)
-{
-	setFollowsAll();
-	setTitle( title );
-}
-
-void LLDragHandleTop::setTitle(const std::string& title)
-{
-	std::string trimmed_title = title;
-	LLStringUtil::trim(trimmed_title);
-
-	const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
-	LLTextBox* titlebox = new LLTextBox( std::string("Drag Handle Title"), getRect(), trimmed_title, font );
-	titlebox->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT);
-	titlebox->setFontStyle(LLFontGL::DROP_SHADOW_SOFT);
 	
-	setTitleBox(titlebox);
 	reshapeTitleBox();
 }
 
 
 const std::string& LLDragHandleTop::getTitle() const
 {
-	return getTitleBox() == NULL ? LLStringUtil::null : getTitleBox()->getText();
+	return mTitleBox == NULL ? LLStringUtil::null : mTitleBox->getText();
 }
 
 
 void LLDragHandleLeft::setTitle(const std::string& )
 {
-	setTitleBox(NULL);
+	if( mTitleBox )
+	{
+		removeChild(mTitleBox);
+		delete mTitleBox;
+		mTitleBox = NULL;
+	}
 	/* no title on left edge */
 }
 
@@ -184,9 +185,9 @@ void LLDragHandleTop::draw()
 	*/
 
 	// Colorize the text to match the frontmost state
-	if (getTitleBox())
+	if (mTitleBox)
 	{
-		getTitleBox()->setEnabled(getForeground());
+		mTitleBox->setEnabled(getForeground());
 	}
 
 	LLView::draw();
@@ -229,9 +230,9 @@ void LLDragHandleLeft::draw()
 	*/
 
 	// Colorize the text to match the frontmost state
-	if (getTitleBox())
+	if (mTitleBox)
 	{
-		getTitleBox()->setEnabled(getForeground());
+		mTitleBox->setEnabled(getForeground());
 	}
 
 	LLView::draw();
@@ -239,12 +240,12 @@ void LLDragHandleLeft::draw()
 
 void LLDragHandleTop::reshapeTitleBox()
 {
-	if( ! getTitleBox())
+	if( ! mTitleBox)
 	{
 		return;
 	}
-	const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
-	S32 title_width = font->getWidth( getTitleBox()->getText() ) + TITLE_PAD;
+	const LLFontGL* font = LLFontGL::getFontSansSerif();
+	S32 title_width = font->getWidth( mTitleBox->getText() ) + TITLE_PAD;
 	if (getMaxTitleWidth() > 0)
 		title_width = llmin(title_width, getMaxTitleWidth());
 	S32 title_height = llround(font->getLineHeight());
@@ -255,7 +256,7 @@ void LLDragHandleTop::reshapeTitleBox()
 		getRect().getWidth() - LEFT_PAD - RIGHT_PAD,
 		title_height);
 
-	getTitleBox()->setRect( title_rect );
+	mTitleBox->setRect( title_rect );
 }
 
 void LLDragHandleTop::reshape(S32 width, S32 height, BOOL called_from_parent)
@@ -337,14 +338,14 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
 
 		LLView* snap_view = getParent()->findSnapRect(new_rect, mouse_dir, SNAP_PARENT_AND_SIBLINGS, sSnapMargin);
 
-		getParent()->snappedTo(snap_view);
+		getParent()->setSnappedTo(snap_view);
 		delta_x = new_rect.mLeft - pre_snap_x;
 		delta_y = new_rect.mBottom - pre_snap_y;
 		translated_rect.translate(delta_x, delta_y);
 
 		// restore original rect so delta are detected, then call user reshape method to handle snapped floaters, etc
 		getParent()->setRect(original_rect);
-		getParent()->userSetShape(translated_rect);
+		getParent()->setShape(translated_rect, true);
 
 		mDragLastScreenX += delta_x;
 		mDragLastScreenY += delta_y;
diff --git a/indra/llui/lldraghandle.h b/indra/llui/lldraghandle.h
index 9eb3e55a6c..8b53c46ae9 100644
--- a/indra/llui/lldraghandle.h
+++ b/indra/llui/lldraghandle.h
@@ -45,8 +45,24 @@ class LLTextBox;
 class LLDragHandle : public LLView
 {
 public:
-	LLDragHandle(const std::string& name, const LLRect& rect, const std::string& title );
-	virtual ~LLDragHandle() { setTitleBox(NULL); }
+	struct Params 
+	:	public LLInitParam::Block<Params, LLView::Params>
+	{
+		Optional<std::string> label;
+		Optional<LLUIColor> drag_highlight_color;
+		Optional<LLUIColor> drag_shadow_color;
+		
+		Params() 
+		:	drag_highlight_color("", LLUI::getCachedColorFunctor("DefaultHighlightLight")),
+			drag_shadow_color("", LLUI::getCachedColorFunctor("DefaultShadowDark"))
+		{
+			mouse_opaque(true);
+			follows.flags(FOLLOWS_ALL);
+		}
+	};
+	void initFromParams(const Params&);
+	
+	virtual ~LLDragHandle();
 
 	virtual void setValue(const LLSD& value);
 
@@ -64,18 +80,20 @@ public:
 	virtual BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
 
 protected:
-	LLTextBox*		getTitleBox() const { return mTitleBox; }
-	void			setTitleBox(LLTextBox*);
-
+	LLDragHandle(const Params&);
+	friend class LLUICtrlFactory;
+	
+protected:
+	LLTextBox*		mTitleBox;
+	
 private:
 	S32				mDragLastScreenX;
 	S32				mDragLastScreenY;
 	S32				mLastMouseScreenX;
 	S32				mLastMouseScreenY;
 	LLCoordGL		mLastMouseDir;
-	LLColor4		mDragHighlightColor;
-	LLColor4		mDragShadowColor;
-	LLTextBox*		mTitleBox;
+	LLUIColor		mDragHighlightColor;
+	LLUIColor		mDragShadowColor;
 	S32				mMaxTitleWidth;
 	BOOL			mForeground;
 
@@ -88,9 +106,10 @@ private:
 class LLDragHandleTop
 : public LLDragHandle
 {
+protected:
+	LLDragHandleTop(const Params& p) : LLDragHandle(p) {}
+	friend class LLUICtrlFactory;
 public:
-	LLDragHandleTop(const std::string& name, const LLRect& rect, const std::string& title );
-
 	virtual void	setTitle( const std::string& title );
 	virtual const std::string& getTitle() const;
 	virtual void	draw();
@@ -105,9 +124,10 @@ private:
 class LLDragHandleLeft
 : public LLDragHandle
 {
+protected:
+	LLDragHandleLeft(const Params& p) : LLDragHandle(p) {}
+	friend class LLUICtrlFactory;
 public:
-	LLDragHandleLeft(const std::string& name, const LLRect& rect, const std::string& title );
-
 	virtual void	setTitle( const std::string& title );
 	virtual const std::string& getTitle() const;
 	virtual void	draw();
diff --git a/indra/llui/llf32uictrl.cpp b/indra/llui/llf32uictrl.cpp
new file mode 100644
index 0000000000..0978005b78
--- /dev/null
+++ b/indra/llui/llf32uictrl.cpp
@@ -0,0 +1,57 @@
+/**
+ * @file   llf32uictrl.cpp
+ * @author Nat Goodspeed
+ * @date   2008-09-08
+ * @brief  Implementation for llf32uictrl.
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "llf32uictrl.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+
+LLF32UICtrl::LLF32UICtrl(const Params& p)
+:	LLUICtrl(p),
+	mInitialValue(p.initial_value().asReal()),
+	mMinValue(p.min_value),
+	mMaxValue(p.max_value),
+    mIncrement(p.increment)
+{
+	mViewModel->setValue(p.initial_value);
+}
+
+F32 LLF32UICtrl::getValueF32() const
+{
+    return mViewModel->getValue().asReal();
+}
diff --git a/indra/llui/llf32uictrl.h b/indra/llui/llf32uictrl.h
new file mode 100644
index 0000000000..0a54fe761b
--- /dev/null
+++ b/indra/llui/llf32uictrl.h
@@ -0,0 +1,83 @@
+/**
+ * @file   llf32uictrl.h
+ * @author Nat Goodspeed
+ * @date   2008-09-08
+ * @brief  Base class for float-valued LLUICtrl widgets
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLF32UICTRL_H)
+#define LL_LLF32UICTRL_H
+
+#include "lluictrl.h"
+
+class LLF32UICtrl: public LLUICtrl
+{
+public:
+    struct Params: public LLInitParam::Block<Params, LLUICtrl::Params>
+    {
+		Optional<F32>	min_value,
+						max_value,
+						increment;
+
+		Params()
+		:	min_value("min_val", 0.f),
+			max_value("max_val", 1.f),
+			increment("increment", 0.1f)
+        {}			
+    };
+
+protected:
+    LLF32UICtrl(const Params& p);
+
+public:
+	virtual F32		getValueF32() const;
+
+	virtual void	setValue(const LLSD& value ) { mViewModel->setValue(value); }
+	virtual LLSD	getValue() const		{ return LLSD(getValueF32()); }
+
+	virtual void	setMinValue(const LLSD& min_value)	{ setMinValue((F32)min_value.asReal()); }
+	virtual void	setMaxValue(const LLSD& max_value)	{ setMaxValue((F32)max_value.asReal()); }
+
+	virtual F32		getInitialValue() const { return mInitialValue; }
+	virtual F32		getMinValue() const		{ return mMinValue; }
+	virtual F32		getMaxValue() const		{ return mMaxValue; }
+	virtual F32		getIncrement() const	{ return mIncrement; }
+	virtual void	setMinValue(F32 min_value) { mMinValue = min_value; }
+	virtual void	setMaxValue(F32 max_value) { mMaxValue = max_value; }
+	virtual void	setIncrement(F32 increment) { mIncrement = increment;}
+
+protected:
+	F32				mInitialValue;
+	F32				mMinValue;
+	F32				mMaxValue;
+	F32				mIncrement;
+};
+
+#endif /* ! defined(LL_LLF32UICTRL_H) */
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 21f8f6e5f7..be7e050b58 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -43,11 +43,13 @@
 #include "llbutton.h"
 #include "llcheckboxctrl.h"
 #include "lldraghandle.h"
+#include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "llresizebar.h"
 #include "llresizehandle.h"
 #include "llkeyboard.h"
 #include "llmenugl.h"	// MENU_BAR_HEIGHT
+#include "llmodaldialog.h"
 #include "lltextbox.h"
 #include "llresmgr.h"
 #include "llui.h"
@@ -56,37 +58,37 @@
 #include "llcontrol.h"
 #include "lltabcontainer.h"
 #include "v2math.h"
+#include "lltrans.h"
+#include "llmultifloater.h"
 
-const S32 MINIMIZED_WIDTH = 160;
-const S32 CLOSE_BOX_FROM_TOP = 1;
 // use this to control "jumping" behavior when Ctrl-Tabbing
 const S32 TABBED_FLOATER_OFFSET = 0;
 
 std::string	LLFloater::sButtonActiveImageNames[BUTTON_COUNT] = 
 {
-	"UIImgBtnCloseActiveUUID",		//BUTTON_CLOSE
-	"UIImgBtnRestoreActiveUUID",	//BUTTON_RESTORE
-	"UIImgBtnMinimizeActiveUUID",	//BUTTON_MINIMIZE
-	"UIImgBtnTearOffActiveUUID",	//BUTTON_TEAR_OFF
-	"UIImgBtnCloseActiveUUID",		//BUTTON_EDIT
+	"closebox.tga",		//BUTTON_CLOSE
+	"restore.tga",	//BUTTON_RESTORE
+	"minimize.tga",	//BUTTON_MINIMIZE
+	"tearoffbox.tga",	//BUTTON_TEAR_OFF
+	"closebox.tga",		//BUTTON_EDIT
 };
 
 std::string	LLFloater::sButtonInactiveImageNames[BUTTON_COUNT] = 
 {
-	"UIImgBtnCloseInactiveUUID",	//BUTTON_CLOSE
-	"UIImgBtnRestoreInactiveUUID",	//BUTTON_RESTORE
-	"UIImgBtnMinimizeInactiveUUID",	//BUTTON_MINIMIZE
-	"UIImgBtnTearOffInactiveUUID",	//BUTTON_TEAR_OFF
-	"UIImgBtnCloseInactiveUUID",	//BUTTON_EDIT
+	"close_inactive_blue.tga",	//BUTTON_CLOSE
+	"restore_inactive.tga",	//BUTTON_RESTORE
+	"minimize_inactive.tga",	//BUTTON_MINIMIZE
+	"tearoffbox.tga",	//BUTTON_TEAR_OFF
+	"close_inactive_blue.tga",	//BUTTON_EDIT
 };
 
 std::string	LLFloater::sButtonPressedImageNames[BUTTON_COUNT] = 
 {
-	"UIImgBtnClosePressedUUID",		//BUTTON_CLOSE
-	"UIImgBtnRestorePressedUUID",	//BUTTON_RESTORE
-	"UIImgBtnMinimizePressedUUID",	//BUTTON_MINIMIZE
-	"UIImgBtnTearOffPressedUUID",	//BUTTON_TEAR_OFF
-	"UIImgBtnClosePressedUUID",		//BUTTON_EDIT
+	"close_in_blue.tga",		//BUTTON_CLOSE
+	"restore_pressed.tga",	//BUTTON_RESTORE
+	"minimize_pressed.tga",	//BUTTON_MINIMIZE
+	"tearoff_pressed.tga",	//BUTTON_TEAR_OFF
+	"close_in_blue.tga",		//BUTTON_EDIT
 };
 
 std::string	LLFloater::sButtonNames[BUTTON_COUNT] = 
@@ -98,17 +100,20 @@ std::string	LLFloater::sButtonNames[BUTTON_COUNT] =
 	"llfloater_edit_btn",		//BUTTON_EDIT
 };
 
-std::string	LLFloater::sButtonToolTips[BUTTON_COUNT] = 
+std::string LLFloater::sButtonToolTips[BUTTON_COUNT] = {};
+
+
+std::string LLFloater::sButtonToolTipsIndex[BUTTON_COUNT]=
 {
 #ifdef LL_DARWIN
-	"Close (Cmd-W)",	//BUTTON_CLOSE
+	"BUTTON_CLOSE_DARWIN",//LLTrans::getString("BUTTON_CLOSE_DARWIN"), //"Close (Cmd-W)",	//BUTTON_CLOSE
 #else
-	"Close (Ctrl-W)",	//BUTTON_CLOSE
+	"BUTTON_CLOSE_WIN", //LLTrans::getString("BUTTON_CLOSE_WIN"), //"Close (Ctrl-W)",	//BUTTON_CLOSE
 #endif
-	"Restore",	//BUTTON_RESTORE
-	"Minimize",	//BUTTON_MINIMIZE
-	"Tear Off",	//BUTTON_TEAR_OFF
-	"Edit",		//BUTTON_EDIT
+	"BUTTON_RESTORE",//LLTrans::getString("BUTTON_RESTORE"), //"Restore",	//BUTTON_RESTORE
+	"BUTTON_MINIMIZE",//LLTrans::getString("BUTTON_MINIMIZE"),	//"Minimize",	//BUTTON_MINIMIZE
+	"BUTTON_TEAR_OFF",//LLTrans::getString("BUTTON_TEAR_OFF"),	//"Tear Off",	//BUTTON_TEAR_OFF
+	"BUTTON_EDIT", //LLTrans::getString("BUTTON_EDIT"), //	"Edit",		//BUTTON_EDIT
 };
 
 LLFloater::click_callback LLFloater::sButtonCallbacks[BUTTON_COUNT] =
@@ -126,59 +131,118 @@ LLFloater::handle_map_t	LLFloater::sFloaterMap;
 
 LLFloaterView* gFloaterView = NULL;
 
-LLFloater::LLFloater() :
-	//FIXME: we should initialize *all* member variables here
-	LLPanel(), mAutoFocus(TRUE),
-	mResizable(FALSE),
-	mDragOnLeft(FALSE),
-	mMinWidth(0),
-	mMinHeight(0)
-{
-	// automatically take focus when opened
-	mAutoFocus = TRUE;
+//static
+bool LLFloater::KeyCompare::compare(const LLSD& a, const LLSD& b)
+{
+	if (a.type() != b.type())
+	{
+		//llerrs << "Mismatched LLSD types: (" << a << ") mismatches (" << b << ")" << llendl;
+		return false;
+	}
+	else if (a.isUndefined())
+		return false;
+	else if (a.isInteger())
+		return a.asInteger() < b.asInteger();
+	else if (a.isReal())
+		return a.asReal() < b.asReal();
+	else if (a.isString())
+		return a.asString() < b.asString();
+	else if (a.isUUID())
+		return a.asUUID() < b.asUUID();
+	else if (a.isDate())
+		return a.asDate() < b.asDate();
+	else if (a.isURI())
+		return a.asString() < b.asString(); // compare URIs as strings
+	else if (a.isBoolean())
+		return a.asBoolean() < b.asBoolean();
+	else
+		return false; // no valid operation for Binary
+}
+
+bool LLFloater::KeyCompare::equate(const LLSD& a, const LLSD& b)
+{
+	if (a.type() != b.type())
+	{
+		//llerrs << "Mismatched LLSD types: (" << a << ") mismatches (" << b << ")" << llendl;
+		return false;
+	}
+	else if (a.isUndefined())
+		return true;
+	else if (a.isInteger())
+		return a.asInteger() == b.asInteger();
+	else if (a.isReal())
+		return a.asReal() == b.asReal();
+	else if (a.isString())
+		return a.asString() == b.asString();
+	else if (a.isUUID())
+		return a.asUUID() == b.asUUID();
+	else if (a.isDate())
+		return a.asDate() == b.asDate();
+	else if (a.isURI())
+		return a.asString() == b.asString(); // compare URIs as strings
+	else if (a.isBoolean())
+		return a.asBoolean() == b.asBoolean();
+	else
+		return false; // no valid operation for Binary
+}
+
+//************************************
+
+LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
+	:	LLPanel(),
+		mDragHandle(NULL),
+		mTitle(p.title),
+		mShortTitle(p.short_title),
+		mSingleInstance(p.single_instance),
+		mKey(key),
+		mAutoTile(p.auto_tile),
+		mCanTearOff(p.can_tear_off),
+		mCanMinimize(p.can_minimize),
+		mCanClose(p.can_close),
+		mDragOnLeft(p.can_drag_on_left),
+		mResizable(p.can_resize),
+		mMinWidth(p.min_width),
+		mMinHeight(p.min_height),
+		mMinimized(FALSE),
+		mForeground(FALSE),
+		mFirstLook(TRUE),
+		mEditing(FALSE),
+		mButtonScale(1.0f),
+		mAutoFocus(TRUE), // automatically take focus when opened
+		mHasBeenDraggedWhileMinimized(FALSE),
+		mPreviousMinimizedBottom(0),
+		mPreviousMinimizedLeft(0),
+		mNotificationContext(NULL)
+{
+	static LLUICachedControl<LLColor4> default_background_color ("FloaterDefaultBackgroundColor", *(new LLColor4));
+	static LLUICachedControl<LLColor4> focus_background_color ("FloaterFocusBackgroundColor", *(new LLColor4));
+	
 	for (S32 i = 0; i < BUTTON_COUNT; i++)
 	{
-		mButtonsEnabled[i] = FALSE;
-		mButtons[i] = NULL;
-	}
-	for (S32 i = 0; i < 4; i++) 
-	{
-		mResizeBar[i] = NULL; 
-		mResizeHandle[i] = NULL;
+		sButtonToolTips[i] =LLTrans::getString( sButtonToolTipsIndex[i]);
 	}
-	mDragHandle = NULL;
+	
 	mHandle.bind(this);
 	mNotificationContext = new LLFloaterNotificationContext(getHandle());
-}
+	mBgColorAlpha        = default_background_color;
+	mBgColorOpaque       = focus_background_color;
 
-LLFloater::LLFloater(const std::string& name)
-:	LLPanel(name), mAutoFocus(TRUE) // automatically take focus when opened
-{
-	for (S32 i = 0; i < BUTTON_COUNT; i++)
-	{
-		mButtonsEnabled[i] = FALSE;
-		mButtons[i] = NULL;
-	}
 	for (S32 i = 0; i < 4; i++) 
 	{
-		mResizeBar[i] = NULL; 
+		mResizeBar[i] = NULL;
 		mResizeHandle[i] = NULL;
 	}
-	std::string title; // null string
-	initFloater(title, FALSE, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, FALSE, TRUE, TRUE); // defaults
-}
 
+	// Clicks stop here.
+	setMouseOpaque(TRUE);
+	
+	// Floaters always draw their background, unlike every other panel.
+	setBackgroundVisible(TRUE);
 
-LLFloater::LLFloater(const std::string& name, const LLRect& rect, const std::string& title, 
-	BOOL resizable, 
-	S32 min_width, 
-	S32 min_height,
-	BOOL drag_on_left,
-	BOOL minimizable,
-	BOOL close_btn,
-	BOOL bordered)
-:	LLPanel(name, rect, bordered), mAutoFocus(TRUE) // automatically take focus when opened
-{
+	// Floaters start not minimized.  When minimized, they save their
+	// prior rectangle to be used on restore.
+	mExpandedRect.set(0,0,0,0);
+	
 	for (S32 i = 0; i < BUTTON_COUNT; i++)
 	{
 		mButtonsEnabled[i] = FALSE;
@@ -189,259 +253,176 @@ LLFloater::LLFloater(const std::string& name, const LLRect& rect, const std::str
 		mResizeBar[i] = NULL; 
 		mResizeHandle[i] = NULL;
 	}
-	initFloater( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
-}
+	
+	initFromParams(p);
+	
+	// chrome floaters don't take focus at all
+	setFocusRoot(!getIsChrome());
 
-LLFloater::LLFloater(const std::string& name, const std::string& rect_control, const std::string& title, 
-	BOOL resizable, 
-	S32 min_width, 
-	S32 min_height,
-	BOOL drag_on_left,
-	BOOL minimizable,
-	BOOL close_btn,
-	BOOL bordered)
-:	LLPanel(name, rect_control, bordered), mAutoFocus(TRUE) // automatically take focus when opened
-{
-	for (S32 i = 0; i < BUTTON_COUNT; i++)
-	{
-		mButtonsEnabled[i] = FALSE;
-		mButtons[i] = NULL;
-	}
-	for (S32 i = 0; i < 4; i++) 
-	{
-		mResizeBar[i] = NULL; 
-		mResizeHandle[i] = NULL;
-	}
-	initFloater( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
+	initFloater();
 }
 
-
 // Note: Floaters constructed from XML call init() twice!
-void LLFloater::initFloater(const std::string& title,
-					 BOOL resizable, S32 min_width, S32 min_height,
-					 BOOL drag_on_left, BOOL minimizable, BOOL close_btn)
+void LLFloater::initFloater()
 {
-	mHandle.bind(this);
-	mNotificationContext = new LLFloaterNotificationContext(getHandle());
-
-	// Init function can be called more than once, so clear out old data.
-	for (S32 i = 0; i < BUTTON_COUNT; i++)
-	{
-		mButtonsEnabled[i] = FALSE;
-		if (mButtons[i] != NULL)
-		{
-			removeChild(mButtons[i]);
-			delete mButtons[i];
-			mButtons[i] = NULL;
-		}
-	}
-	mButtonScale = 1.f;
+	addDragHandle();
+	
+	addResizeCtrls();
 
-	//sjb: Thia is a bit of a hack:
-	BOOL need_border = hasBorder();
-	// remove the border since deleteAllChildren() will also delete the border (but not clear mBorder)
-	removeBorder();
-	// this will delete mBorder too
-	deleteAllChildren();
-	// add the border back if we want it
-	if (need_border)
+	// Close button.
+	if (mCanClose)
 	{
-	    addBorder();
+		mButtonsEnabled[BUTTON_CLOSE] = TRUE;
 	}
 
-	// chrome floaters don't take focus at all
-	setFocusRoot(!getIsChrome());
-
-	// Reset cached pointers
-	mDragHandle = NULL;
-	for (S32 i = 0; i < 4; i++) 
+	// Minimize button only for top draggers
+	if ( !mDragOnLeft && mCanMinimize )
 	{
-		mResizeBar[i] = NULL;
-		mResizeHandle[i] = NULL;
+		mButtonsEnabled[BUTTON_MINIMIZE] = TRUE;
 	}
-	mCanTearOff = TRUE;
-	mEditing = FALSE;
 
-	// Clicks stop here.
-	setMouseOpaque(TRUE);
+	buildButtons();
 
-	mFirstLook = TRUE;
-	mForeground = FALSE;
-	mDragOnLeft = drag_on_left == TRUE;
+	// Floaters are created in the invisible state	
+	setVisible(FALSE);
 
-	// Floaters always draw their background, unlike every other panel.
-	setBackgroundVisible(TRUE);
+	// add self to handle->floater map
+	sFloaterMap[mHandle] = this;
 
-	// Floaters start not minimized.  When minimized, they save their
-	// prior rectangle to be used on restore.
-	mMinimized = FALSE;
-	mExpandedRect.set(0,0,0,0);
-	
-	S32 close_pad;			// space to the right of close box
-	S32 close_box_size;		// For layout purposes, how big is the close box?
-	if (close_btn)
-	{
-		close_box_size = LLFLOATER_CLOSE_BOX_SIZE;
-		close_pad = 0;
-	}
-	else
+	if (!getParent())
 	{
-		close_box_size = 0;
-		close_pad = 0;
+		gFloaterView->addChild(this);
 	}
+}
 
-	S32 minimize_box_size;
-	S32 minimize_pad;
-	if (minimizable && !drag_on_left)
-	{
-		minimize_box_size = LLFLOATER_CLOSE_BOX_SIZE;
-		minimize_pad = 0;
-	}
-	else
+void LLFloater::addDragHandle()
+{
+	static LLUICachedControl<S32> floater_close_box_size ("UIFloaterCloseBoxSize", 0);
+	S32 close_box_size = mCanClose ? floater_close_box_size : 0;
+	
+	if (!mDragHandle)
 	{
-		minimize_box_size = 0;
-		minimize_pad = 0;
+		if (mDragOnLeft)
+		{
+			LLDragHandleLeft::Params p;
+			p.name("drag");
+			p.follows.flags(FOLLOWS_ALL);
+			p.label(mTitle);
+			mDragHandle = LLUICtrlFactory::create<LLDragHandleLeft>(p);
+		}
+		else // drag on top
+		{
+			LLDragHandleTop::Params p;
+			p.name("Drag Handle");
+			p.follows.flags(FOLLOWS_ALL);
+			p.label(mTitle);
+			mDragHandle = LLUICtrlFactory::create<LLDragHandleTop>(p);
+		}
+		addChild(mDragHandle);
 	}
-
-	// Drag Handle
-	// Add first so it's in the background.
-//	const S32 drag_pad = 2;
-	if (drag_on_left)
+	LLRect rect;
+	if (mDragOnLeft)
 	{
-		LLRect drag_handle_rect;
-		drag_handle_rect.setOriginAndSize(
-			0, 0,
-			DRAG_HANDLE_WIDTH,
-			getRect().getHeight() - LLPANEL_BORDER_WIDTH - close_box_size);
-		mDragHandle = new LLDragHandleLeft(std::string("drag"), drag_handle_rect, title );
+		rect.setLeftTopAndSize(0, 0, DRAG_HANDLE_WIDTH, getRect().getHeight() - LLPANEL_BORDER_WIDTH - close_box_size);
 	}
 	else // drag on top
 	{
-		LLRect drag_handle_rect( 0, getRect().getHeight(), getRect().getWidth(), 0 );
-		mDragHandle = new LLDragHandleTop( std::string("Drag Handle"), drag_handle_rect, title );
-	}
-	addChild(mDragHandle);
-
-	// Resize Handle
-	mResizable = resizable;
-	mMinWidth = min_width;
-	mMinHeight = min_height;
-
-	if( mResizable )
-	{
-		// Resize bars (sides)
-		const S32 RESIZE_BAR_THICKNESS = 3;
-		mResizeBar[LLResizeBar::LEFT] = new LLResizeBar( 
-			std::string("resizebar_left"),
-			this,
-			LLRect( 0, getRect().getHeight(), RESIZE_BAR_THICKNESS, 0), 
-			min_width, S32_MAX, LLResizeBar::LEFT );
-		addChild( mResizeBar[0] );
-
-		mResizeBar[LLResizeBar::TOP] = new LLResizeBar( 
-			std::string("resizebar_top"),
-			this,
-			LLRect( 0, getRect().getHeight(), getRect().getWidth(), getRect().getHeight() - RESIZE_BAR_THICKNESS), 
-			min_height, S32_MAX, LLResizeBar::TOP );
-		addChild( mResizeBar[1] );
-
-		mResizeBar[LLResizeBar::RIGHT] = new LLResizeBar( 
-			std::string("resizebar_right"),
-			this,
-			LLRect( getRect().getWidth() - RESIZE_BAR_THICKNESS, getRect().getHeight(), getRect().getWidth(), 0), 
-			min_width, S32_MAX, LLResizeBar::RIGHT );
-		addChild( mResizeBar[2] );
-
-		mResizeBar[LLResizeBar::BOTTOM] = new LLResizeBar( 
-			std::string("resizebar_bottom"),
-			this,
-			LLRect( 0, RESIZE_BAR_THICKNESS, getRect().getWidth(), 0), 
-			min_height, S32_MAX, LLResizeBar::BOTTOM );
-		addChild( mResizeBar[3] );
-
-
-		// Resize handles (corners)
-		mResizeHandle[0] = new LLResizeHandle( 
-			std::string("Resize Handle"),
-			LLRect( getRect().getWidth() - RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT, getRect().getWidth(), 0),
-			min_width,
-			min_height,
-			LLResizeHandle::RIGHT_BOTTOM);
-		addChild(mResizeHandle[0]);
-
-		mResizeHandle[1] = new LLResizeHandle(
-			std::string("resize"), 
-			LLRect( getRect().getWidth() - RESIZE_HANDLE_WIDTH, getRect().getHeight(), getRect().getWidth(), getRect().getHeight() - RESIZE_HANDLE_HEIGHT),
-			min_width,
-			min_height,
-			LLResizeHandle::RIGHT_TOP );
-		addChild(mResizeHandle[1]);
-		
-		mResizeHandle[2] = new LLResizeHandle( std::string("resize"), 
-											   LLRect( 0, RESIZE_HANDLE_HEIGHT, RESIZE_HANDLE_WIDTH, 0 ),
-											   min_width,
-											   min_height,
-											   LLResizeHandle::LEFT_BOTTOM );
-		addChild(mResizeHandle[2]);
-
-		mResizeHandle[3] = new LLResizeHandle( std::string("resize"), 
-			LLRect( 0, getRect().getHeight(), RESIZE_HANDLE_WIDTH, getRect().getHeight() - RESIZE_HANDLE_HEIGHT ),
-			min_width,
-			min_height,
-			LLResizeHandle::LEFT_TOP );
-		addChild(mResizeHandle[3]);
+		rect = getLocalRect();
 	}
+	mDragHandle->setRect(rect);
+	updateButtons();
+	applyTitle();
+}
 
-	// Close button.
-	if (close_btn)
+void LLFloater::addResizeCtrls()
+{
+	for (S32 i = 0; i < 4; i++) 
 	{
-		mButtonsEnabled[BUTTON_CLOSE] = TRUE;
+		if (mResizeBar[i])
+		{
+			removeChild(mResizeBar[i]);
+			delete mResizeBar[i];
+			mResizeBar[i] = NULL;
+		}
+		if (mResizeHandle[i])
+		{
+			removeChild(mResizeHandle[i]);
+			delete mResizeHandle[i];
+			mResizeHandle[i] = NULL;
+		}
 	}
-
-	// Minimize button only for top draggers
-	if ( !drag_on_left && minimizable )
+	if( !mResizable )
 	{
-		mButtonsEnabled[BUTTON_MINIMIZE] = TRUE;
+		return;
 	}
+	
+	// Resize bars (sides)
+	const S32 RESIZE_BAR_THICKNESS = 3;
+	LLResizeBar::Params p;
+	p.name("resizebar_left");
+	p.resizing_view(this);
+	p.rect(LLRect( 0, getRect().getHeight(), RESIZE_BAR_THICKNESS, 0));
+	p.min_size(mMinWidth);
+	p.side(LLResizeBar::LEFT);
+	mResizeBar[LLResizeBar::LEFT] = LLUICtrlFactory::create<LLResizeBar>(p);
+	addChild( mResizeBar[LLResizeBar::LEFT] );
+
+	p.name("resizebar_top");
+	p.rect(LLRect( 0, getRect().getHeight(), getRect().getWidth(), getRect().getHeight() - RESIZE_BAR_THICKNESS));
+	p.min_size(mMinHeight);
+	p.side(LLResizeBar::TOP);
+
+	mResizeBar[LLResizeBar::TOP] = LLUICtrlFactory::create<LLResizeBar>(p);
+	addChild( mResizeBar[LLResizeBar::TOP] );
+
+	p.name("resizebar_right");
+	p.rect(LLRect(getRect().getWidth() - RESIZE_BAR_THICKNESS, getRect().getHeight(), getRect().getWidth(), 0));
+	p.min_size(mMinWidth);
+	p.side(LLResizeBar::RIGHT);
+	
+	mResizeBar[LLResizeBar::RIGHT] = LLUICtrlFactory::create<LLResizeBar>(p);
+	addChild( mResizeBar[LLResizeBar::RIGHT] );
+
+	p.name("resizebar_bottom");
+	p.rect(LLRect(0, RESIZE_BAR_THICKNESS, getRect().getWidth(), 0));
+	p.min_size(mMinHeight);
+	p.side(LLResizeBar::BOTTOM);
+	mResizeBar[LLResizeBar::BOTTOM] = LLUICtrlFactory::create<LLResizeBar>(p);
+	addChild( mResizeBar[LLResizeBar::BOTTOM] );
+
+	// Resize handles (corners)
+	LLResizeHandle::Params handle_p;
+	handle_p.rect(LLRect( getRect().getWidth() - RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT, getRect().getWidth(), 0));
+	handle_p.min_width(mMinWidth);
+	handle_p.min_height(mMinHeight);
+	handle_p.corner(LLResizeHandle::RIGHT_BOTTOM);
+	mResizeHandle[0] = LLUICtrlFactory::create<LLResizeHandle>(handle_p);
+	addChild(mResizeHandle[0]);
+
+	handle_p.rect(LLRect( getRect().getWidth() - RESIZE_HANDLE_WIDTH, getRect().getHeight(), getRect().getWidth(), getRect().getHeight() - RESIZE_HANDLE_HEIGHT));
+	handle_p.corner(LLResizeHandle::RIGHT_TOP);
+	mResizeHandle[1] = LLUICtrlFactory::create<LLResizeHandle>(handle_p);
+	addChild(mResizeHandle[1]);
+	
+	handle_p.rect(LLRect( 0, RESIZE_HANDLE_HEIGHT, RESIZE_HANDLE_WIDTH, 0 ));
+	handle_p.corner(LLResizeHandle::LEFT_BOTTOM);
+	mResizeHandle[2] = LLUICtrlFactory::create<LLResizeHandle>(handle_p);
+	addChild(mResizeHandle[2]);
 
-	// Keep track of whether this window has ever been dragged while it
-	// was minimized.  If it has, we'll remember its position for the
-	// next time it's minimized.
-	mHasBeenDraggedWhileMinimized = FALSE;
-	mPreviousMinimizedLeft = 0;
-	mPreviousMinimizedBottom = 0;
-
-	buildButtons();
-
-	// JC - Don't do this here, because many floaters first construct themselves,
-	// then show themselves.  Put it in setVisibleAndFrontmost.
-	// make_ui_sound("UISndWindowOpen");
-
-	// RN: floaters are created in the invisible state	
-	setVisible(FALSE);
-
-	// add self to handle->floater map
-	sFloaterMap[mHandle] = this;
-
-	if (!getParent())
-	{
-		gFloaterView->addChild(this);
-	}
+	handle_p.rect(LLRect( 0, getRect().getHeight(), RESIZE_HANDLE_WIDTH, getRect().getHeight() - RESIZE_HANDLE_HEIGHT ));
+	handle_p.corner(LLResizeHandle::LEFT_TOP);
+	mResizeHandle[3] = LLUICtrlFactory::create<LLResizeHandle>(handle_p);
+	addChild(mResizeHandle[3]);
 }
 
 // virtual
 LLFloater::~LLFloater()
 {
+	LLFloaterReg::removeInstance(mInstanceName, mKey);
+	
 	delete mNotificationContext;
 	mNotificationContext = NULL;
 
-	control_map_t::iterator itor;
-	for (itor = mFloaterControls.begin(); itor != mFloaterControls.end(); ++itor)
-	{
-		delete itor->second;
-	}
-	mFloaterControls.clear();
-
 	//// am I not hosted by another floater?
 	//if (mHostHandle.isDead())
 	//{
@@ -469,8 +450,27 @@ LLFloater::~LLFloater()
 		delete mResizeBar[i];
 		delete mResizeHandle[i];
 	}
+
+	storeRectControl();
+	setVisible(false); // We're not visible if we're destroyed
+	storeVisibilityControl();
+}
+
+void LLFloater::storeRectControl()
+{
+	if( mRectControl.size() > 1 )
+	{
+		LLUI::sSettingGroups["floater"]->setRect( mRectControl, getRect() );
+	}
 }
 
+void LLFloater::storeVisibilityControl()
+{
+	if( mVisibilityControl.size() > 1 )
+	{
+		LLUI::sSettingGroups["floater"]->setBOOL( mVisibilityControl, getVisible() );
+	}
+}
 
 void LLFloater::setVisible( BOOL visible )
 {
@@ -504,10 +504,25 @@ void LLFloater::setVisible( BOOL visible )
 		}
 		++dependent_it;
 	}
+
+	storeVisibilityControl();
+}
+
+// virtual
+void LLFloater::onVisibilityChange ( BOOL new_visibility )
+{
+	if (new_visibility)
+	{
+		if (getHost())
+			getHost()->setFloaterFlashing(this, FALSE);
+	}
+	LLPanel::onVisibilityChange ( new_visibility );
 }
 
-void LLFloater::open()	/* Flawfinder: ignore */
+void LLFloater::openFloater(const LLSD& key)
 {
+	mKey = key; // in case we need to open ourselves again
+	
 	if (getSoundFlags() != SILENT 
 	// don't play open sound for hosted (tabbed) windows
 		&& !getHost() 
@@ -525,9 +540,11 @@ void LLFloater::open()	/* Flawfinder: ignore */
 		// only select tabs if window they are hosted in is visible
 		getFloaterHost()->addFloater(this, getFloaterHost()->getVisible());
 	}
-	else if (getHost() != NULL)
+
+	if (getHost() != NULL)
 	{
-		// already hosted
+		getHost()->setMinimized(FALSE);
+		getHost()->setVisibleAndFrontmost(mAutoFocus);
 		getHost()->showFloater(this);
 	}
 	else
@@ -536,10 +553,10 @@ void LLFloater::open()	/* Flawfinder: ignore */
 		setVisibleAndFrontmost(mAutoFocus);
 	}
 
-	onOpen();
+	onOpen(key);
 }
 
-void LLFloater::close(bool app_quitting)
+void LLFloater::closeFloater(bool app_quitting)
 {
 	// Always unminimize before trying to close.
 	// Most of the time the user will never see this state.
@@ -570,7 +587,7 @@ void LLFloater::close(bool app_quitting)
 			if (floaterp)
 			{
 				++dependent_it;
-				floaterp->close();
+				floaterp->closeFloater(app_quitting);
 			}
 			else
 			{
@@ -597,7 +614,7 @@ void LLFloater::close(bool app_quitting)
 				}
 			}
 		}
-
+		
 		// Let floater do cleanup.
 		onClose(app_quitting);
 	}
@@ -607,6 +624,7 @@ void LLFloater::close(bool app_quitting)
 void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent)
 {
 	LLPanel::reshape(width, height, called_from_parent);
+	storeRectControl();
 }
 
 void LLFloater::releaseFocus()
@@ -664,15 +682,23 @@ void LLFloater::center()
 	centerWithin(gFloaterView->getRect());
 }
 
+LLMultiFloater* LLFloater::getHost()
+{ 
+	return (LLMultiFloater*)mHostHandle.get(); 
+}
+
 void LLFloater::applyRectControl()
 {
-	if (!getRectControl().empty())
+	if (mRectControl.size() > 1)
 	{
-		const LLRect& rect = LLUI::sConfigGroup->getRect(getRectControl());
-		translate( rect.mLeft - getRect().mLeft, rect.mBottom - getRect().mBottom);
-		if (mResizable)
+		const LLRect& rect = LLUI::sSettingGroups["floater"]->getRect(mRectControl);
+		if (rect.getWidth() > 0 && rect.getHeight() > 0)
 		{
-			reshape(llmax(mMinWidth, rect.getWidth()), llmax(mMinHeight, rect.getHeight()));
+			translate( rect.mLeft - getRect().mLeft, rect.mBottom - getRect().mBottom);
+			if (mResizable)
+			{
+				reshape(llmax(mMinWidth, rect.getWidth()), llmax(mMinHeight, rect.getHeight()));
+			}
 		}
 	}
 }
@@ -763,7 +789,7 @@ BOOL LLFloater::canSnapTo(const LLView* other_view)
 	return LLPanel::canSnapTo(other_view);
 }
 
-void LLFloater::snappedTo(const LLView* snap_view)
+void LLFloater::setSnappedTo(const LLView* snap_view)
 {
 	if (!snap_view || snap_view == getParent())
 	{
@@ -778,10 +804,10 @@ void LLFloater::snappedTo(const LLView* snap_view)
 	}
 }
 
-void LLFloater::userSetShape(const LLRect& new_rect)
+void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
 {
 	const LLRect old_rect = getRect();
-	LLView::userSetShape(new_rect);
+	LLView::handleReshape(new_rect, by_user);
 
 	// if not minimized, adjust all snapped dependents to new shape
 	if (!isMinimized())
@@ -816,7 +842,7 @@ void LLFloater::userSetShape(const LLRect& new_rect)
 				delta_y += new_rect.mBottom - old_rect.mBottom;
 
 				dependent_rect.translate(delta_x, delta_y);
-				floaterp->userSetShape(dependent_rect);
+				floaterp->setShape(dependent_rect, by_user);
 			}
 		}
 	}
@@ -834,6 +860,9 @@ void LLFloater::userSetShape(const LLRect& new_rect)
 
 void LLFloater::setMinimized(BOOL minimize)
 {
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+	static LLUICachedControl<S32> minimized_width ("UIMinimizedWidth", 0);
+
 	if (minimize == mMinimized) return;
 
 	if (minimize)
@@ -902,7 +931,7 @@ void LLFloater::setMinimized(BOOL minimize)
 		mMinimized = TRUE;
 
 		// Reshape *after* setting mMinimized
-		reshape( MINIMIZED_WIDTH, LLFLOATER_HEADER_SIZE, TRUE);
+		reshape( minimized_width, floater_header_size, TRUE);
 	}
 	else
 	{
@@ -995,6 +1024,13 @@ void LLFloater::setFocus( BOOL b )
 	}
 }
 
+// virtual
+void LLFloater::setRect(const LLRect &rect)
+{
+	LLPanel::setRect(rect);
+	addDragHandle(); // re-add drag handle, sized based on rect
+}
+
 // virtual
 void LLFloater::setIsChrome(BOOL is_chrome)
 {
@@ -1276,19 +1312,18 @@ void LLFloater::setEditModeEnabled(BOOL enable)
 
 
 // static
-void LLFloater::onClickMinimize(void *userdata)
+void LLFloater::onClickMinimize(LLFloater* self)
 {
-	LLFloater* self = (LLFloater*) userdata;
-	if (!self) return;
-
+	if (!self)
+		return;
 	self->setMinimized( !self->isMinimized() );
 }
 
-void LLFloater::onClickTearOff(void *userdata)
+void LLFloater::onClickTearOff(LLFloater* self)
 {
-	LLFloater* self = (LLFloater*) userdata;
-	if (!self) return;
-
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+	if (!self)
+		return;
 	LLMultiFloater* host_floater = self->getHost();
 	if (host_floater) //Tear off
 	{
@@ -1297,12 +1332,12 @@ void LLFloater::onClickTearOff(void *userdata)
 		// reparent to floater view
 		gFloaterView->addChild(self);
 
-		self->open();	/* Flawfinder: ignore */
+		self->openFloater(self->getKey());
 		
 		// only force position for floaters that don't have that data saved
-		if (self->getRectControl().empty())
+		if (self->mRectControl.size() <= 1)
 		{
-			new_rect.setLeftTopAndSize(host_floater->getRect().mLeft + 5, host_floater->getRect().mTop - LLFLOATER_HEADER_SIZE - 5, self->getRect().getWidth(), self->getRect().getHeight());
+			new_rect.setLeftTopAndSize(host_floater->getRect().mLeft + 5, host_floater->getRect().mTop - floater_header_size - 5, self->getRect().getWidth(), self->getRect().getHeight());
 			self->setRect(new_rect);
 		}
 		gFloaterView->adjustToFitScreen(self, FALSE);
@@ -1317,17 +1352,16 @@ void LLFloater::onClickTearOff(void *userdata)
 			self->setMinimized(FALSE); // to reenable minimize button if it was minimized
 			new_host->showFloater(self);
 			// make sure host is visible
-			new_host->open();
+			new_host->openFloater(new_host->getKey());
 		}
 	}
 }
 
 // static
-void LLFloater::onClickEdit(void *userdata)
+void LLFloater::onClickEdit(LLFloater* self)
 {
-	LLFloater* self = (LLFloater*) userdata;
-	if (!self) return;
-
+	if (!self)
+		return;
 	self->mEditing = self->mEditing ? FALSE : TRUE;
 }
 
@@ -1373,7 +1407,7 @@ void LLFloater::closeFocusedFloater()
 	LLFloater* floater_to_close = LLFloater::getClosableFloaterFromFocus();
 	if(floater_to_close)
 	{
-		floater_to_close->close();
+		floater_to_close->closeFloater();
 	}
 
 	// if nothing took focus after closing focused floater
@@ -1388,12 +1422,11 @@ void LLFloater::closeFocusedFloater()
 
 
 // static
-void LLFloater::onClickClose( void* userdata )
+void LLFloater::onClickClose( LLFloater* self )
 {
-	LLFloater* self = (LLFloater*) userdata;
-	if (!self) return;
-
-	self->close();
+	if (!self)
+		return;
+	self->closeFloater(false);
 }
 
 
@@ -1408,8 +1441,11 @@ void LLFloater::draw()
 		S32 right = getRect().getWidth() - LLPANEL_BORDER_WIDTH;
 		S32 bottom = LLPANEL_BORDER_WIDTH;
 
-		LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
-		F32 shadow_offset = (F32)LLUI::sConfigGroup->getS32("DropShadowFloater");
+		static LLUICachedControl<S32> shadow_offset_S32 ("DropShadowFloater", 0);
+		static LLUICachedControl<LLColor4> shadow_color_cached ("ColorDropShadow", *(new LLColor4));
+		LLColor4 shadow_color = shadow_color_cached;
+		F32 shadow_offset = (F32)shadow_offset_S32;
+
 		if (!isBackgroundOpaque())
 		{
 			shadow_offset *= 0.2f;
@@ -1422,20 +1458,21 @@ void LLFloater::draw()
 		// No transparent windows in simple UI
 		if (isBackgroundOpaque())
 		{
-			gl_rect_2d( left, top, right, bottom, getBackgroundColor() );
+			gl_rect_2d( left, top, right, bottom, mBgColorOpaque );
 		}
 		else
 		{
-			gl_rect_2d( left, top, right, bottom, getTransparentColor() );
+			gl_rect_2d( left, top, right, bottom, mBgColorAlpha );
 		}
 
 		if(gFocusMgr.childHasKeyboardFocus(this) && !getIsChrome() && !getCurrentTitle().empty())
 		{
+			static LLUICachedControl<LLColor4> titlebar_focus_color ("TitleBarFocusColor", *(new LLColor4));
 			// draw highlight on title bar to indicate focus.  RDW
-			const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
+			const LLFontGL* font = LLFontGL::getFontSansSerif();
 			LLRect r = getRect();
 			gl_rect_2d_offset_local(0, r.getHeight(), r.getWidth(), r.getHeight() - (S32)font->getLineHeight() - 1, 
-				LLUI::sColorsGroup->getColor("TitleBarFocusColor"), 0, TRUE);
+				titlebar_focus_color, 0, TRUE);
 		}
 	}
 
@@ -1489,8 +1526,10 @@ void LLFloater::draw()
 	{
 		// add in a border to improve spacialized visual aclarity ;)
 		// use lines instead of gl_rect_2d so we can round the edges as per james' recommendation
+		static LLUICachedControl<LLColor4> focus_border_color ("FloaterFocusBorderColor", *(new LLColor4));
+		static LLUICachedControl<LLColor4> unfocus_border_color ("FloaterUnfocusBorderColor", *(new LLColor4));
 		LLUI::setLineWidth(1.5f);
-		LLColor4 outlineColor = gFocusMgr.childHasKeyboardFocus(this) ? LLUI::sColorsGroup->getColor("FloaterFocusBorderColor") : LLUI::sColorsGroup->getColor("FloaterUnfocusBorderColor");
+		LLColor4 outlineColor = gFocusMgr.childHasKeyboardFocus(this) ? focus_border_color() : unfocus_border_color;
 		gl_rect_2d_offset_local(0, getRect().getHeight() + 1, getRect().getWidth() + 1, 0, outlineColor, -LLPANEL_BORDER_WIDTH, FALSE);
 		LLUI::setLineWidth(1.f);
 	}
@@ -1511,6 +1550,7 @@ void	LLFloater::setCanMinimize(BOOL can_minimize)
 {
 	// if removing minimize/restore button programmatically,
 	// go ahead and unminimize floater
+	mCanMinimize = can_minimize;
 	if (!can_minimize)
 	{
 		setMinimized(FALSE);
@@ -1524,6 +1564,7 @@ void	LLFloater::setCanMinimize(BOOL can_minimize)
 
 void	LLFloater::setCanClose(BOOL can_close)
 {
+	mCanClose = can_close;
 	mButtonsEnabled[BUTTON_CLOSE] = can_close;
 
 	updateButtons();
@@ -1538,83 +1579,10 @@ void	LLFloater::setCanTearOff(BOOL can_tear_off)
 }
 
 
-void	LLFloater::setCanResize(BOOL can_resize)
+void LLFloater::setCanResize(BOOL can_resize)
 {
-	if (mResizable && !can_resize)
-	{
-		for (S32 i = 0; i < 4; i++) 
-		{
-			removeChild(mResizeBar[i], TRUE);
-			mResizeBar[i] = NULL; 
-
-			removeChild(mResizeHandle[i], TRUE);
-			mResizeHandle[i] = NULL;
-		}
-	}
-	else if (!mResizable && can_resize)
-	{
-		// Resize bars (sides)
-		const S32 RESIZE_BAR_THICKNESS = 3;
-		mResizeBar[0] = new LLResizeBar( 
-			std::string("resizebar_left"),
-			this,
-			LLRect( 0, getRect().getHeight(), RESIZE_BAR_THICKNESS, 0), 
-			mMinWidth, S32_MAX, LLResizeBar::LEFT );
-		addChild( mResizeBar[0] );
-
-		mResizeBar[1] = new LLResizeBar( 
-			std::string("resizebar_top"),
-			this,
-			LLRect( 0, getRect().getHeight(), getRect().getWidth(), getRect().getHeight() - RESIZE_BAR_THICKNESS), 
-			mMinHeight, S32_MAX, LLResizeBar::TOP );
-		addChild( mResizeBar[1] );
-
-		mResizeBar[2] = new LLResizeBar( 
-			std::string("resizebar_right"),
-			this,
-			LLRect( getRect().getWidth() - RESIZE_BAR_THICKNESS, getRect().getHeight(), getRect().getWidth(), 0), 
-			mMinWidth, S32_MAX, LLResizeBar::RIGHT );
-		addChild( mResizeBar[2] );
-
-		mResizeBar[3] = new LLResizeBar( 
-			std::string("resizebar_bottom"),
-			this,
-			LLRect( 0, RESIZE_BAR_THICKNESS, getRect().getWidth(), 0), 
-			mMinHeight, S32_MAX, LLResizeBar::BOTTOM );
-		addChild( mResizeBar[3] );
-
-
-		// Resize handles (corners)
-		mResizeHandle[0] = new LLResizeHandle( 
-			std::string("Resize Handle"),
-			LLRect( getRect().getWidth() - RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT, getRect().getWidth(), 0),
-			mMinWidth,
-			mMinHeight,
-			LLResizeHandle::RIGHT_BOTTOM);
-		addChild(mResizeHandle[0]);
-
-		mResizeHandle[1] = new LLResizeHandle( std::string("resize"), 
-			LLRect( getRect().getWidth() - RESIZE_HANDLE_WIDTH, getRect().getHeight(), getRect().getWidth(), getRect().getHeight() - RESIZE_HANDLE_HEIGHT),
-			mMinWidth,
-			mMinHeight,
-			LLResizeHandle::RIGHT_TOP );
-		addChild(mResizeHandle[1]);
-		
-		mResizeHandle[2] = new LLResizeHandle( std::string("resize"), 
-											   LLRect( 0, RESIZE_HANDLE_HEIGHT, RESIZE_HANDLE_WIDTH, 0 ),
-											   mMinWidth,
-											   mMinHeight,
-											   LLResizeHandle::LEFT_BOTTOM );
-		addChild(mResizeHandle[2]);
-
-		mResizeHandle[3] = new LLResizeHandle( std::string("resize"), 
-			LLRect( 0, getRect().getHeight(), RESIZE_HANDLE_WIDTH, getRect().getHeight() - RESIZE_HANDLE_HEIGHT ),
-			mMinWidth,
-			mMinHeight,
-			LLResizeHandle::LEFT_TOP );
-		addChild(mResizeHandle[3]);
-	}
 	mResizable = can_resize;
+	addResizeCtrls();
 }
 
 void LLFloater::setCanDrag(BOOL can_drag)
@@ -1633,6 +1601,8 @@ void LLFloater::setCanDrag(BOOL can_drag)
 
 void LLFloater::updateButtons()
 {
+	static LLUICachedControl<S32> floater_close_box_size ("UIFloaterCloseBoxSize", 0);
+	static LLUICachedControl<S32> close_box_from_top ("UICloseBoxFromTop", 0);
 	S32 button_count = 0;
 	for (S32 i = 0; i < BUTTON_COUNT; i++)
 	{
@@ -1652,17 +1622,17 @@ void LLFloater::updateButtons()
 			{
 				btn_rect.setLeftTopAndSize(
 					LLPANEL_BORDER_WIDTH,
-					getRect().getHeight() - CLOSE_BOX_FROM_TOP - (LLFLOATER_CLOSE_BOX_SIZE + 1) * button_count,
-					llround((F32)LLFLOATER_CLOSE_BOX_SIZE * mButtonScale),
-					llround((F32)LLFLOATER_CLOSE_BOX_SIZE * mButtonScale));
+					getRect().getHeight() - close_box_from_top - (floater_close_box_size + 1) * button_count,
+					llround((F32)floater_close_box_size * mButtonScale),
+					llround((F32)floater_close_box_size * mButtonScale));
 			}
 			else
 			{
 				btn_rect.setLeftTopAndSize(
-					getRect().getWidth() - LLPANEL_BORDER_WIDTH - (LLFLOATER_CLOSE_BOX_SIZE + 1) * button_count,
-					getRect().getHeight() - CLOSE_BOX_FROM_TOP,
-					llround((F32)LLFLOATER_CLOSE_BOX_SIZE * mButtonScale),
-					llround((F32)LLFLOATER_CLOSE_BOX_SIZE * mButtonScale));
+					getRect().getWidth() - LLPANEL_BORDER_WIDTH - (floater_close_box_size + 1) * button_count,
+					getRect().getHeight() - close_box_from_top,
+					llround((F32)floater_close_box_size * mButtonScale),
+					llround((F32)floater_close_box_size * mButtonScale));
 			}
 
 			mButtons[i]->setRect(btn_rect);
@@ -1676,50 +1646,56 @@ void LLFloater::updateButtons()
 		}
 	}
 	if (mDragHandle)
-		mDragHandle->setMaxTitleWidth(getRect().getWidth() - (button_count * (LLFLOATER_CLOSE_BOX_SIZE + 1)));
+		mDragHandle->setMaxTitleWidth(getRect().getWidth() - (button_count * (floater_close_box_size + 1)));
 }
 
 void LLFloater::buildButtons()
 {
+	static LLUICachedControl<S32> floater_close_box_size ("UIFloaterCloseBoxSize", 0);
+	static LLUICachedControl<S32> close_box_from_top ("UICloseBoxFromTop", 0);
 	for (S32 i = 0; i < BUTTON_COUNT; i++)
 	{
+		if (mButtons[i])
+		{
+			removeChild(mButtons[i]);
+			delete mButtons[i];
+			mButtons[i] = NULL;
+		}
+		
 		LLRect btn_rect;
 		if (mDragOnLeft)
 		{
 			btn_rect.setLeftTopAndSize(
 				LLPANEL_BORDER_WIDTH,
-				getRect().getHeight() - CLOSE_BOX_FROM_TOP - (LLFLOATER_CLOSE_BOX_SIZE + 1) * (i + 1),
-				llround(LLFLOATER_CLOSE_BOX_SIZE * mButtonScale),
-				llround(LLFLOATER_CLOSE_BOX_SIZE * mButtonScale));
+				getRect().getHeight() - close_box_from_top - (floater_close_box_size + 1) * (i + 1),
+				llround(floater_close_box_size * mButtonScale),
+				llround(floater_close_box_size * mButtonScale));
 		}
 		else
 		{
 			btn_rect.setLeftTopAndSize(
-				getRect().getWidth() - LLPANEL_BORDER_WIDTH - (LLFLOATER_CLOSE_BOX_SIZE + 1) * (i + 1),
-				getRect().getHeight() - CLOSE_BOX_FROM_TOP,
-				llround(LLFLOATER_CLOSE_BOX_SIZE * mButtonScale),
-				llround(LLFLOATER_CLOSE_BOX_SIZE * mButtonScale));
-		}
-
-		LLButton* buttonp = new LLButton(
-			sButtonNames[i],
-			btn_rect,
-			sButtonActiveImageNames[i],
-			sButtonPressedImageNames[i],
-			LLStringUtil::null,
-			sButtonCallbacks[i],
-			this,
-			LLFontGL::getFontSansSerif());
-
-		buttonp->setTabStop(FALSE);
-		buttonp->setFollowsTop();
-		buttonp->setFollowsRight();
-		buttonp->setToolTip( sButtonToolTips[i] );
-		buttonp->setImageColor(LLUI::sColorsGroup->getColor("FloaterButtonImageColor"));
-		buttonp->setHoverImages(sButtonPressedImageNames[i],
-								sButtonPressedImageNames[i]);
-		buttonp->setScaleImage(TRUE);
-		buttonp->setSaveToXML(false);
+				getRect().getWidth() - LLPANEL_BORDER_WIDTH - (floater_close_box_size + 1) * (i + 1),
+				getRect().getHeight() - close_box_from_top,
+				llround(floater_close_box_size * mButtonScale),
+				llround(floater_close_box_size * mButtonScale));
+		}
+
+		LLButton::Params p;
+		p.name(sButtonNames[i]);
+		p.rect(btn_rect);
+		p.label("");
+		p.image_unselected.name(sButtonActiveImageNames[i]);
+		p.image_selected.name(sButtonPressedImageNames[i]);
+		p.image_hover_selected.name(sButtonPressedImageNames[i]);
+		p.image_hover_unselected.name(sButtonPressedImageNames[i]);
+		p.click_callback.function(boost::bind(sButtonCallbacks[i], this));
+		p.tab_stop(false);
+		p.follows.flags(FOLLOWS_TOP|FOLLOWS_RIGHT);
+		p.tool_tip(sButtonToolTips[i]);
+		p.image_color(LLUI::getCachedColorFunctor("FloaterButtonImageColor"));
+		p.scale_image(true);
+
+		LLButton* buttonp = LLUICtrlFactory::create<LLButton>(p);
 		addChild(buttonp);
 		mButtons[i] = buttonp;
 	}
@@ -1730,13 +1706,11 @@ void LLFloater::buildButtons()
 /////////////////////////////////////////////////////
 // LLFloaterView
 
-LLFloaterView::LLFloaterView( const std::string& name, const LLRect& rect )
-:	LLUICtrl( name, rect, FALSE, NULL, NULL, FOLLOWS_ALL ),
+LLFloaterView::LLFloaterView (const Params& p)
+:	LLUICtrl (p),
 	mFocusCycleMode(FALSE),
 	mSnapOffsetBottom(0)
 {
-	setTabStop(FALSE);
-	resetStartingFloaterPosition();
 }
 
 // By default, adjust vertical.
@@ -1830,69 +1804,6 @@ void LLFloaterView::restoreAll()
 }
 
 
-void LLFloaterView::getNewFloaterPosition(S32* left,S32* top)
-{
-	// Workaround: mRect may change between when this object is created and the first time it is used.
-	static BOOL first = TRUE;
-	if( first )
-	{
-		resetStartingFloaterPosition();
-		first = FALSE;
-	}
-	
-	const S32 FLOATER_PAD = 16;
-	LLCoordWindow window_size;
-	getWindow()->getSize(&window_size);
-	LLRect full_window(0, window_size.mY, window_size.mX, 0);
-	LLRect floater_creation_rect(
-		160,
-		full_window.getHeight() - 2 * MENU_BAR_HEIGHT,
-		full_window.getWidth() * 2 / 3,
-		130 );
-	floater_creation_rect.stretch( -FLOATER_PAD );
-
-	*left = mNextLeft;
-	*top = mNextTop;
-
-	const S32 STEP = 25;
-	S32 bottom = floater_creation_rect.mBottom + 2 * STEP;
-	S32 right = floater_creation_rect.mRight - 4 * STEP;
-
-	mNextTop -= STEP;
-	mNextLeft += STEP;
-
-	if( (mNextTop < bottom ) || (mNextLeft > right) )
-	{
-		mColumn++;
-		mNextTop = floater_creation_rect.mTop;
-		mNextLeft = STEP * mColumn;
-
-		if( (mNextTop < bottom) || (mNextLeft > right) )
-		{
-			// Advancing the column didn't work, so start back at the beginning
-			resetStartingFloaterPosition();
-		}
-	}
-}
-
-void LLFloaterView::resetStartingFloaterPosition()
-{
-	const S32 FLOATER_PAD = 16;
-	LLCoordWindow window_size;
-	getWindow()->getSize(&window_size);
-	LLRect full_window(0, window_size.mY, window_size.mX, 0);
-	LLRect floater_creation_rect(
-		160,
-		full_window.getHeight() - 2 * MENU_BAR_HEIGHT,
-		full_window.getWidth() * 2 / 3,
-		130 );
-	floater_creation_rect.stretch( -FLOATER_PAD );
-
-	mNextLeft = floater_creation_rect.mLeft;
-	mNextTop = floater_creation_rect.mTop;
-	mColumn = 0;
-}
-
 LLRect LLFloaterView::findNeighboringPosition( LLFloater* reference_floater, LLFloater* neighbor )
 {
 	LLRect base_rect = reference_floater->getRect();
@@ -2104,15 +2015,17 @@ void LLFloaterView::focusFrontFloater()
 
 void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
 {
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+	static LLUICachedControl<S32> minimized_width ("UIMinimizedWidth", 0);
 	S32 col = 0;
 	LLRect snap_rect_local = getLocalSnapRect();
 	for(S32 row = snap_rect_local.mBottom;
-		row < snap_rect_local.getHeight() - LLFLOATER_HEADER_SIZE;
-		row += LLFLOATER_HEADER_SIZE ) //loop rows
+		row < snap_rect_local.getHeight() - floater_header_size;
+		row += floater_header_size ) //loop rows
 	{
 		for(col = snap_rect_local.mLeft;
-			col < snap_rect_local.getWidth() - MINIMIZED_WIDTH;
-			col += MINIMIZED_WIDTH)
+			col < snap_rect_local.getWidth() - minimized_width;
+			col += minimized_width)
 		{
 			bool foundGap = TRUE;
 			for(child_list_const_iter_t child_it = getChildList()->begin();
@@ -2124,10 +2037,10 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
 				if(floater->isMinimized()) 
 				{
 					LLRect r = floater->getRect();
-					if((r.mBottom < (row + LLFLOATER_HEADER_SIZE))
-					   && (r.mBottom > (row - LLFLOATER_HEADER_SIZE))
-					   && (r.mLeft < (col + MINIMIZED_WIDTH))
-					   && (r.mLeft > (col - MINIMIZED_WIDTH)))
+					if((r.mBottom < (row + floater_header_size))
+					   && (r.mBottom > (row - floater_header_size))
+					   && (r.mLeft < (col + minimized_width))
+					   && (r.mLeft > (col - minimized_width)))
 					{
 						// needs the check for off grid. can't drag,
 						// but window resize makes them off
@@ -2179,7 +2092,7 @@ void LLFloaterView::closeAllChildren(bool app_quitting)
 		// dialogs to appear.
 		if (floaterp->canClose() && !floaterp->isDead())
 		{
-			floaterp->close(app_quitting);
+			floaterp->closeFloater(app_quitting);
 		}
 	}
 }
@@ -2202,14 +2115,13 @@ BOOL LLFloaterView::allChildrenClosed()
 	return true;
 }
 
-
 void LLFloaterView::refresh()
 {
 	// Constrain children to be entirely on the screen
 	for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
 	{
-		LLFloater* floaterp = (LLFloater*)*child_it;
-		if( floaterp->getVisible() )
+		LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it);
+		if (floaterp && floaterp->getVisible() )
 		{
 			// minimized floaters are kept fully onscreen
 			adjustToFitScreen(floaterp, !floaterp->isMinimized());
@@ -2306,7 +2218,7 @@ LLRect LLFloaterView::getSnapRect() const
 	return snap_rect;
 }
 
-LLFloater *LLFloaterView::getFocusedFloater()
+LLFloater *LLFloaterView::getFocusedFloater() const
 {
 	for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
 	{
@@ -2319,7 +2231,7 @@ LLFloater *LLFloaterView::getFocusedFloater()
 	return NULL;
 }
 
-LLFloater *LLFloaterView::getFrontmost()
+LLFloater *LLFloaterView::getFrontmost() const
 {
 	for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
 	{
@@ -2332,7 +2244,7 @@ LLFloater *LLFloaterView::getFrontmost()
 	return NULL;
 }
 
-LLFloater *LLFloaterView::getBackmost()
+LLFloater *LLFloaterView::getBackmost() const
 {
 	LLFloater* back_most = NULL;
 	for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
@@ -2348,18 +2260,51 @@ LLFloater *LLFloaterView::getBackmost()
 
 void LLFloaterView::syncFloaterTabOrder()
 {
-	// bring focused floater to front
-	for ( child_list_const_reverse_iter_t child_it = getChildList()->rbegin(); child_it != getChildList()->rend(); ++child_it)
+	// look for a visible modal dialog, starting from first (should be only one)
+	LLModalDialog* modal_dialog = NULL;
+	for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
 	{
-		LLFloater* floaterp = (LLFloater*)*child_it;
-		if (gFocusMgr.childHasKeyboardFocus(floaterp))
+		LLModalDialog* dialog = dynamic_cast<LLModalDialog*>(*child_it);
+		if (dialog && dialog->isModal() && dialog->getVisible())
 		{
-			bringToFront(floaterp, FALSE);
+			modal_dialog = dialog;
 			break;
 		}
 	}
 
-	// then sync draw order to tab order
+	if (modal_dialog)
+	{
+		// If we have a visible modal dialog, make sure that it has focus
+		if( gFocusMgr.getTopCtrl() != modal_dialog )
+		{
+			gFocusMgr.setTopCtrl( modal_dialog );
+		}
+		
+		if( !gFocusMgr.childHasKeyboardFocus( modal_dialog ) )
+		{
+			modal_dialog->setFocus(TRUE);
+		}
+				
+		if( !gFocusMgr.childHasMouseCapture( modal_dialog ) )
+		{
+			gFocusMgr.setMouseCapture( modal_dialog );
+		}
+	}
+	else
+	{
+		// otherwise, make sure the focused floater is in the front of the child list
+		for ( child_list_const_reverse_iter_t child_it = getChildList()->rbegin(); child_it != getChildList()->rend(); ++child_it)
+		{
+			LLFloater* floaterp = (LLFloater*)*child_it;
+			if (gFocusMgr.childHasKeyboardFocus(floaterp))
+			{
+				bringToFront(floaterp, FALSE);
+				break;
+			}
+		}
+	}
+
+	// sync draw order to tab order
 	for ( child_list_const_reverse_iter_t child_it = getChildList()->rbegin(); child_it != getChildList()->rend(); ++child_it)
 	{
 		LLFloater* floaterp = (LLFloater*)*child_it;
@@ -2367,7 +2312,7 @@ void LLFloaterView::syncFloaterTabOrder()
 	}
 }
 
-LLFloater*	LLFloaterView::getParentFloater(LLView* viewp)
+LLFloater*	LLFloaterView::getParentFloater(LLView* viewp) const
 {
 	LLView* parentp = viewp->getParent();
 
@@ -2426,641 +2371,137 @@ void LLFloaterView::popVisibleAll(const skip_list_t& skip_list)
 	}
 }
 
-//
-// LLMultiFloater
-//
-
-LLMultiFloater::LLMultiFloater() :
-	mTabContainer(NULL),
-	mTabPos(LLTabContainer::TOP),
-	mAutoResize(TRUE),
-	mOrigMinWidth(0),
-	mOrigMinHeight(0)
-{
-
-}
-
-LLMultiFloater::LLMultiFloater(LLTabContainer::TabPosition tab_pos) :
-	mTabContainer(NULL),
-	mTabPos(tab_pos),
-	mAutoResize(TRUE),
-	mOrigMinWidth(0),
-	mOrigMinHeight(0)
+void LLFloater::setInstanceName(const std::string& name)
 {
-
-}
-
-LLMultiFloater::LLMultiFloater(const std::string &name) :
-	LLFloater(name),
-	mTabContainer(NULL),
-	mTabPos(LLTabContainer::TOP),
-	mAutoResize(FALSE),
-	mOrigMinWidth(0),
-	mOrigMinHeight(0)
-{
-}
-
-LLMultiFloater::LLMultiFloater(
-	const std::string& name,
-	const LLRect& rect,
-	LLTabContainer::TabPosition tab_pos,
-	BOOL auto_resize) : 
-	LLFloater(name, rect, name),
-	mTabContainer(NULL),
-	mTabPos(LLTabContainer::TOP),
-	mAutoResize(auto_resize),
-	mOrigMinWidth(0),
-	mOrigMinHeight(0)
-{
-	mTabContainer = new LLTabContainer(std::string("Preview Tabs"), 
-		LLRect(LLPANEL_BORDER_WIDTH, getRect().getHeight() - LLFLOATER_HEADER_SIZE, getRect().getWidth() - LLPANEL_BORDER_WIDTH, 0), 
-		mTabPos, 
-		FALSE, 
-		FALSE);
-	mTabContainer->setFollowsAll();
-	if (isResizable())
-	{
-		mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH);
-	}
-
-	addChild(mTabContainer);
-}
-
-LLMultiFloater::LLMultiFloater(
-	const std::string& name,
-	const std::string& rect_control,
-	LLTabContainer::TabPosition tab_pos,
-	BOOL auto_resize) : 
-	LLFloater(name, rect_control, name),
-	mTabContainer(NULL),
-	mTabPos(tab_pos),
-	mAutoResize(auto_resize),
-	mOrigMinWidth(0),
-	mOrigMinHeight(0)
-{
-	mTabContainer = new LLTabContainer(std::string("Preview Tabs"), 
-		LLRect(LLPANEL_BORDER_WIDTH, getRect().getHeight() - LLFLOATER_HEADER_SIZE, getRect().getWidth() - LLPANEL_BORDER_WIDTH, 0), 
-		mTabPos, 
-		FALSE, 
-		FALSE);
-	mTabContainer->setFollowsAll();
-	if (isResizable() && mTabPos == LLTabContainer::BOTTOM)
-	{
-		mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH);
-	}
-
-	addChild(mTabContainer);
-	
-}
-
-
-void LLMultiFloater::open()	/* Flawfinder: ignore */
-{
-	if (mTabContainer->getTabCount() > 0)
-	{
-		LLFloater::open();	/* Flawfinder: ignore */
-	}
-	else
-	{
-		// for now, don't allow multifloaters
-		// without any child floaters
-		close();
-	}
-}
-
-void LLMultiFloater::onClose(bool app_quitting)
-{
-	if(closeAllFloaters() == TRUE)
-	{
-		LLFloater::onClose(app_quitting);
-	}//else not all tabs could be closed...
-}
-
-void LLMultiFloater::draw()
-{
-	if (mTabContainer->getTabCount() == 0)
-	{
-		//RN: could this potentially crash in draw hierarchy?
-		close();
-	}
-	else
+	if (name == mInstanceName)
+		return;
+	llassert_always(mInstanceName.empty());
+	mInstanceName = name;
+	if (!mInstanceName.empty())
 	{
-		for (S32 i = 0; i < mTabContainer->getTabCount(); i++)
+		// save_rect and save_visibility only apply to registered floaters
+		if (!mRectControl.empty())
 		{
-			LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(i);
-			if (floaterp->getShortTitle() != mTabContainer->getPanelTitle(i))
-			{
-				mTabContainer->setPanelTitle(i, floaterp->getShortTitle());
-			}
+			mRectControl = LLFloaterReg::declareRectControl(mInstanceName);
 		}
-		LLFloater::draw();
-	}
-}
-
-BOOL LLMultiFloater::closeAllFloaters()
-{
-	S32	tabToClose = 0;
-	S32	lastTabCount = mTabContainer->getTabCount();
-	while (tabToClose < mTabContainer->getTabCount())
-	{
-		LLFloater* first_floater = (LLFloater*)mTabContainer->getPanelByIndex(tabToClose);
-		first_floater->close();
-		if(lastTabCount == mTabContainer->getTabCount())
+		if (!mVisibilityControl.empty())
 		{
-			//Tab did not actually close, possibly due to a pending Save Confirmation dialog..
-			//so try and close the next one in the list...
-			tabToClose++;
-		}else
-		{
-			//Tab closed ok.
-			lastTabCount = mTabContainer->getTabCount();
+			mVisibilityControl = LLFloaterReg::declareVisibilityControl(mInstanceName);
 		}
 	}
-	if( mTabContainer->getTabCount() != 0 )
-		return FALSE; // Couldn't close all the tabs (pending save dialog?) so return FALSE.
-	return TRUE; //else all tabs were successfully closed...
 }
 
-void LLMultiFloater::growToFit(S32 content_width, S32 content_height)
+void LLFloater::setKey(const LLSD& newkey)
 {
-	S32 new_width = llmax(getRect().getWidth(), content_width + LLPANEL_BORDER_WIDTH * 2);
-	S32 new_height = llmax(getRect().getHeight(), content_height + LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT);
-
-    if (isMinimized())
-    {
-        LLRect newrect;
-        newrect.setLeftTopAndSize(getExpandedRect().mLeft, getExpandedRect().mTop, new_width, new_height);
-        setExpandedRect(newrect);
-    }
-	else
-	{
-		S32 old_height = getRect().getHeight();
-		reshape(new_width, new_height);
-		// keep top left corner in same position
-		translate(0, old_height - new_height);
-	}
+	// Note: We don't have to do anything special with registration when we change keys
+	mKey = newkey;
 }
 
-/**
-  void addFloater(LLFloater* floaterp, BOOL select_added_floater)
-
-  Adds the LLFloater pointed to by floaterp to this.
-  If floaterp is already hosted by this, then it is re-added to get
-  new titles, etc.
-  If select_added_floater is true, the LLFloater pointed to by floaterp will
-  become the selected tab in this
-
-  Affects: mTabContainer, floaterp
-**/
-void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point)
+void LLFloater::initFromParams(const LLFloater::Params& p)
 {
-	if (!floaterp)
-	{
-		return;
-	}
-
-	if (!mTabContainer)
-	{
-		llerrs << "Tab Container used without having been initialized." << llendl;
-		return;
-	}
-
-	if (floaterp->getHost() == this)
-	{
-		// already hosted by me, remove
-		// do this so we get updated title, etc.
-		mFloaterDataMap.erase(floaterp->getHandle());
-		mTabContainer->removeTabPanel(floaterp);
-	}
-	else if (floaterp->getHost())
-	{
-		// floaterp is hosted by somebody else and
-		// this is adding it, so remove it from it's old host
-		floaterp->getHost()->removeFloater(floaterp);
-	}
-	else if (floaterp->getParent() == gFloaterView)
-	{
-		// rehost preview floater as child panel
-		gFloaterView->removeChild(floaterp);
-	}
-
-	// store original configuration
-	LLFloaterData floater_data;
-	floater_data.mWidth = floaterp->getRect().getWidth();
-	floater_data.mHeight = floaterp->getRect().getHeight();
-	floater_data.mCanMinimize = floaterp->isMinimizeable();
-	floater_data.mCanResize = floaterp->isResizable();
-
-	// remove minimize and close buttons
-	floaterp->setCanMinimize(FALSE);
-	floaterp->setCanResize(FALSE);
-	floaterp->setCanDrag(FALSE);
-	floaterp->storeRectControl();
-	// avoid double rendering of floater background (makes it more opaque)
-	floaterp->setBackgroundVisible(FALSE);
-
-	if (mAutoResize)
-	{
-		growToFit(floater_data.mWidth, floater_data.mHeight);
-	}
+	 // control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible
+	LLPanel::initFromParams(p);
 
-	//add the panel, add it to proper maps
-	mTabContainer->addTabPanel(floaterp, floaterp->getShortTitle(), FALSE, onTabSelected, this, 0, FALSE, insertion_point);
-	mFloaterDataMap[floaterp->getHandle()] = floater_data;
+	mTitle = p.title;
+	mShortTitle = p.short_title;
+	applyTitle();
 
-	updateResizeLimits();
+	setCanTearOff(p.can_tear_off);
+	setCanMinimize(p.can_minimize);
+	setCanClose(p.can_close);
+	
+	mDragOnLeft = p.can_drag_on_left;
+	mResizable = p.can_resize;
+	mMinWidth = p.min_width;
+	mMinHeight = p.min_height;
+	mSingleInstance = p.single_instance;
+	mAutoTile = p.auto_tile;
 
-	if ( select_added_floater )
+	if (p.save_rect)
 	{
-		mTabContainer->selectTabPanel(floaterp);
+		mRectControl = "t"; // flag to build mRectControl name once mInstanceName is set
 	}
-	else
+	if (p.save_visibility)
 	{
-		// reassert visible tab (hiding new floater if necessary)
-		mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex());
+		mVisibilityControl = "t"; // flag to build mVisibilityControl name once mInstanceName is set
 	}
-
-	floaterp->setHost(this);
-	if (isMinimized())
-	{
-		floaterp->setVisible(FALSE);
-	}
-}
-
-/**
-	BOOL selectFloater(LLFloater* floaterp)
-
-	If the LLFloater pointed to by floaterp is hosted by this,
-	then its tab is selected and returns true.  Otherwise returns false.
-
-	Affects: mTabContainer
-**/
-BOOL LLMultiFloater::selectFloater(LLFloater* floaterp)
-{
-	return mTabContainer->selectTabPanel(floaterp);
-}
-
-// virtual
-void LLMultiFloater::selectNextFloater()
-{
-	mTabContainer->selectNextTab();
 }
 
-// virtual
-void LLMultiFloater::selectPrevFloater()
+void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, BOOL open_floater, LLXMLNodePtr output_node)
 {
-	mTabContainer->selectPrevTab();
-}
+	Params params(LLUICtrlFactory::getDefaultParams<LLFloater::Params>());
+	LLXUIParser::instance().readXUI(node, params);
 
-void LLMultiFloater::showFloater(LLFloater* floaterp)
-{
-	// we won't select a panel that already is selected
-	// it is hard to do this internally to tab container
-	// as tab selection is handled via index and the tab at a given
-	// index might have changed
-	if (floaterp != mTabContainer->getCurrentPanel() &&
-		!mTabContainer->selectTabPanel(floaterp))
+	if (output_node)
 	{
-		addFloater(floaterp, TRUE);
+		Params output_params(params);
+		setupParamsForExport(output_params, parent);
+        Params default_params(LLUICtrlFactory::getDefaultParams<LLFloater::Params>());
+		output_node->setName(node->getName()->mString);
+		LLXUIParser::instance().writeXUI(
+			output_node, output_params, &default_params);
 	}
-}
 
-void LLMultiFloater::removeFloater(LLFloater* floaterp)
-{
-	if ( floaterp->getHost() != this )
-		return;
-
-	floater_data_map_t::iterator found_data_it = mFloaterDataMap.find(floaterp->getHandle());
-	if (found_data_it != mFloaterDataMap.end())
+	setupParams(params, parent);
+ 	initFromParams(params);
+	
+	initFloater();
+	
+	LLMultiFloater* last_host = LLFloater::getFloaterHost();
+	if (node->hasName("multi_floater"))
 	{
-		LLFloaterData& floater_data = found_data_it->second;
-		floaterp->setCanMinimize(floater_data.mCanMinimize);
-		if (!floater_data.mCanResize)
-		{
-			// restore original size
-			floaterp->reshape(floater_data.mWidth, floater_data.mHeight);
-		}
-		floaterp->setCanResize(floater_data.mCanResize);
-		mFloaterDataMap.erase(found_data_it);
+		LLFloater::setFloaterHost((LLMultiFloater*) this);
 	}
-	mTabContainer->removeTabPanel(floaterp);
-	floaterp->setBackgroundVisible(TRUE);
-	floaterp->setCanDrag(TRUE);
-	floaterp->setHost(NULL);
-	floaterp->applyRectControl();
-
-	updateResizeLimits();
-
-	tabOpen((LLFloater*)mTabContainer->getCurrentPanel(), false);
-}
 
-void LLMultiFloater::tabOpen(LLFloater* opened_floater, bool from_click)
-{
-	// default implementation does nothing
-}
+	addChildren(node, output_node);
 
-void LLMultiFloater::tabClose()
-{
-	if (mTabContainer->getTabCount() == 0)
+	if (node->hasName("multi_floater"))
 	{
-		// no more children, close myself
-		close();
+		LLFloater::setFloaterHost(last_host);
 	}
-}
-
-void LLMultiFloater::setVisible(BOOL visible)
-{
-	// *FIX: shouldn't have to do this, fix adding to minimized multifloater
-	LLFloater::setVisible(visible);
 	
-	if (mTabContainer)
-	{
-		LLPanel* cur_floaterp = mTabContainer->getCurrentPanel();
-
-		if (cur_floaterp)
-		{
-			cur_floaterp->setVisible(visible);
-		}
-
-		// if no tab selected, and we're being shown,
-		// select last tab to be added
-		if (visible && !cur_floaterp)
-		{
-			mTabContainer->selectLastTab();
-		}
-	}
-}
+	BOOL result = postBuild();
 
-BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask)
-{
-	if (key == 'W' && mask == MASK_CONTROL)
+	if (!result)
 	{
-		LLFloater* floater = getActiveFloater();
-		// is user closeable and is system closeable
-		if (floater && floater->canClose() && floater->isCloseable())
-		{
-			floater->close();
-		}
-		return TRUE;
+		llerrs << "Failed to construct floater " << getName() << llendl;
 	}
 
-	return LLFloater::handleKeyHere(key, mask);
-}
-
-LLFloater* LLMultiFloater::getActiveFloater()
-{
-	return (LLFloater*)mTabContainer->getCurrentPanel();
-}
-
-S32	LLMultiFloater::getFloaterCount()
-{
-	return mTabContainer->getTabCount();
-}
-
-/**
-	BOOL isFloaterFlashing(LLFloater* floaterp)
-
-	Returns true if the LLFloater pointed to by floaterp
-	is currently in a flashing state and is hosted by this.
-	False otherwise.
-
-	Requires: floaterp != NULL
-**/
-BOOL LLMultiFloater::isFloaterFlashing(LLFloater* floaterp)
-{
-	if ( floaterp && floaterp->getHost() == this )
-		return mTabContainer->getTabPanelFlashing(floaterp);
-
-	return FALSE;
-}
-
-/**
-	BOOL setFloaterFlashing(LLFloater* floaterp, BOOL flashing)
-
-	Sets the current flashing state of the LLFloater pointed
-	to by floaterp to be the BOOL flashing if the LLFloater pointed
-	to by floaterp is hosted by this.
-
-	Requires: floaterp != NULL
-**/
-void LLMultiFloater::setFloaterFlashing(LLFloater* floaterp, BOOL flashing)
-{
-	if ( floaterp && floaterp->getHost() == this )
-		mTabContainer->setTabPanelFlashing(floaterp, flashing);
-}
-
-//static
-void LLMultiFloater::onTabSelected(void* userdata, bool from_click)
-{
-	LLMultiFloater* floaterp = (LLMultiFloater*)userdata;
-
-	floaterp->tabOpen((LLFloater*)floaterp->mTabContainer->getCurrentPanel(), from_click);
-}
+	applyRectControl(); // If we have a saved rect control, apply it
+	gFloaterView->adjustToFitScreen(this, FALSE); // Floaters loaded from XML should all fit on screen	
 
-void LLMultiFloater::setCanResize(BOOL can_resize)
-{
-	LLFloater::setCanResize(can_resize);
-	if (isResizable() && mTabContainer->getTabPosition() == LLTabContainer::BOTTOM)
+	if (open_floater)
 	{
-		mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH);
-	}
-	else
-	{
-		mTabContainer->setRightTabBtnOffset(0);
+		this->openFloater(getKey());
 	}
+
+	moveResizeHandlesToFront();
 }
 
-BOOL LLMultiFloater::postBuild()
+// visibility methods
+bool VisibilityPolicy<LLFloater>::visible(LLFloater* instance, const LLSD& key)
 {
-	// remember any original xml minimum size
-	getResizeLimits(&mOrigMinWidth, &mOrigMinHeight);
-
-	if (mTabContainer)
-	{
-		return TRUE;
-	}
-
-	requires<LLTabContainer>("Preview Tabs");
-	if (checkRequirements())
+	if (instance) 
 	{
-		mTabContainer = getChild<LLTabContainer>("Preview Tabs");
-		return TRUE;
+		return !instance->isMinimized() && instance->isInVisibleChain();
 	}
-
 	return FALSE;
 }
 
-void LLMultiFloater::updateResizeLimits()
+void VisibilityPolicy<LLFloater>::show(LLFloater* instance, const LLSD& key)
 {
-	// initialize minimum size constraint to the original xml values.
-	S32 new_min_width = mOrigMinWidth;
-	S32 new_min_height = mOrigMinHeight;
-	// possibly increase minimum size constraint due to children's minimums.
-	for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx)
+	if (instance) 
 	{
-		LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(tab_idx);
-		if (floaterp)
+		instance->openFloater(key);
+		if (instance->getHost())
 		{
-			new_min_width = llmax(new_min_width, floaterp->getMinWidth() + LLPANEL_BORDER_WIDTH * 2);
-			new_min_height = llmax(new_min_height, floaterp->getMinHeight() + LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT);
+			instance->getHost()->openFloater(key);
 		}
 	}
-	setResizeLimits(new_min_width, new_min_height);
-
-	S32 cur_height = getRect().getHeight();
-	S32 new_width = llmax(getRect().getWidth(), new_min_width);
-	S32 new_height = llmax(getRect().getHeight(), new_min_height);
-
-	if (isMinimized())
-	{
-		const LLRect& expanded = getExpandedRect();
-		LLRect newrect;
-		newrect.setLeftTopAndSize(expanded.mLeft, expanded.mTop, llmax(expanded.getWidth(), new_width), llmax(expanded.getHeight(), new_height));
-		setExpandedRect(newrect);
-	}
-	else
-	{
-		reshape(new_width, new_height);
-
-		// make sure upper left corner doesn't move
-		translate(0, cur_height - getRect().getHeight());
-
-		// make sure this window is visible on screen when it has been modified
-		// (tab added, etc)
-		gFloaterView->adjustToFitScreen(this, TRUE);
-	}
-}
-
-// virtual
-LLXMLNodePtr LLFloater::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLPanel::getXML();
-
-	node->createChild("title", TRUE)->setStringValue(getCurrentTitle());
-
-	node->createChild("can_resize", TRUE)->setBoolValue(isResizable());
-
-	node->createChild("can_minimize", TRUE)->setBoolValue(isMinimizeable());
-
-	node->createChild("can_close", TRUE)->setBoolValue(isCloseable());
-
-	node->createChild("can_drag_on_left", TRUE)->setBoolValue(isDragOnLeft());
-
-	node->createChild("min_width", TRUE)->setIntValue(getMinWidth());
-
-	node->createChild("min_height", TRUE)->setIntValue(getMinHeight());
-
-	node->createChild("can_tear_off", TRUE)->setBoolValue(mCanTearOff);
-	
-	return node;
 }
 
-// static
-LLView* LLFloater::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
+void VisibilityPolicy<LLFloater>::hide(LLFloater* instance, const LLSD& key)
 {
-	std::string name("floater");
-	node->getAttributeString("name", name);
-
-	LLFloater *floaterp = new LLFloater(name);
-
-	std::string filename;
-	node->getAttributeString("filename", filename);
-
-	if (filename.empty())
-	{
-		// Load from node
-		floaterp->initFloaterXML(node, parent, factory);
-	}
-	else
-	{
-		// Load from file
-		factory->buildFloater(floaterp, filename);
-	}
-
-	return floaterp;
+	if (instance) instance->closeFloater();
 }
 
-void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory, BOOL open)	/* Flawfinder: ignore */
-{
-	std::string name(getName());
-	std::string title(getCurrentTitle());
-	std::string short_title(getShortTitle());
-	std::string rect_control("");
-	BOOL resizable = isResizable();
-	S32 min_width = getMinWidth();
-	S32 min_height = getMinHeight();
-	BOOL drag_on_left = isDragOnLeft();
-	BOOL minimizable = isMinimizeable();
-	BOOL close_btn = isCloseable();
-	LLRect rect;
-
-	node->getAttributeString("name", name);
-	node->getAttributeString("title", title);
-	node->getAttributeString("short_title", short_title);
-	node->getAttributeString("rect_control", rect_control);
-	node->getAttributeBOOL("can_resize", resizable);
-	node->getAttributeBOOL("can_minimize", minimizable);
-	node->getAttributeBOOL("can_close", close_btn);
-	node->getAttributeBOOL("can_drag_on_left", drag_on_left);
-	node->getAttributeS32("min_width", min_width);
-	node->getAttributeS32("min_height", min_height);
-
-	if (! rect_control.empty())
-	{
-		setRectControl(rect_control);
-	}
-
-	createRect(node, rect, parent, LLRect());
-	
-	setRect(rect);
-	setName(name);
-	
-	initFloater(title,
-			resizable,
-			min_width,
-			min_height,
-			drag_on_left,
-			minimizable,
-			close_btn);
-
-	setTitle(title);
-	applyTitle ();
-
-	setShortTitle(short_title);
-
-	BOOL can_tear_off;
-	if (node->getAttributeBOOL("can_tear_off", can_tear_off))
-	{
-		setCanTearOff(can_tear_off);
-	}
-	
-	initFromXML(node, parent);
-
-	LLMultiFloater* last_host = LLFloater::getFloaterHost();
-	if (node->hasName("multi_floater"))
-	{
-		LLFloater::setFloaterHost((LLMultiFloater*) this);
-	}
-
-	initChildrenXML(node, factory);
-
-	if (node->hasName("multi_floater"))
-	{
-		LLFloater::setFloaterHost(last_host);
-	}
-
-	BOOL result = postBuild();
-
-	if (!result)
-	{
-		llerrs << "Failed to construct floater " << name << llendl;
-	}
-
-	applyRectControl();
-	if (open)	/* Flawfinder: ignore */
-	{
-		this->open();	/* Flawfinder: ignore */
-	}
-
-	moveResizeHandlesToFront();
-}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 0e3d148b09..f6c783b0bf 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -39,7 +39,6 @@
 
 #include "llpanel.h"
 #include "lluuid.h"
-#include "lltabcontainer.h"
 #include "llnotifications.h"
 #include <set>
 
@@ -50,17 +49,10 @@ class LLButton;
 class LLMultiFloater;
 class LLFloater;
 
-const S32 LLFLOATER_VPAD = 6;
-const S32 LLFLOATER_HPAD = 6;
-const S32 LLFLOATER_CLOSE_BOX_SIZE = 16;
-const S32 LLFLOATER_HEADER_SIZE = 18;
 
 const BOOL RESIZE_YES = TRUE;
 const BOOL RESIZE_NO = FALSE;
 
-const S32 DEFAULT_MIN_WIDTH = 100;
-const S32 DEFAULT_MIN_HEIGHT = 100;
-
 const BOOL DRAG_ON_TOP = FALSE;
 const BOOL DRAG_ON_LEFT = TRUE;
 
@@ -87,11 +79,22 @@ private:
 	LLHandle<LLFloater> mFloaterHandle;
 };
 
-
 class LLFloater : public LLPanel
 {
 friend class LLFloaterView;
+friend class LLFloaterReg;
+friend class LLMultiFloater;
 public:
+	struct KeyCompare
+	{
+		static bool compare(const LLSD& a, const LLSD& b);
+		static bool equate(const LLSD& a, const LLSD& b);
+		bool operator()(const LLSD& a, const LLSD& b) const
+		{
+			return compare(a, b);
+		}
+	};
+	
 	enum EFloaterButtons
 	{
 		BUTTON_CLOSE,
@@ -102,49 +105,63 @@ public:
 		BUTTON_COUNT
 	};
 	
-	LLFloater();
- 	LLFloater(const std::string& name); //simple constructor for data-driven initialization
-	LLFloater(	const std::string& name, const LLRect& rect, const std::string& title,
-		BOOL resizable = FALSE,
-		S32 min_width = DEFAULT_MIN_WIDTH,
-		S32 min_height = DEFAULT_MIN_HEIGHT,
-		BOOL drag_on_left = FALSE,
-		BOOL minimizable = TRUE,
-		BOOL close_btn = TRUE,
-		BOOL bordered = BORDER_NO);
-
-	LLFloater(	const std::string& name, const std::string& rect_control, const std::string& title,
-		BOOL resizable = FALSE,
-		S32 min_width = DEFAULT_MIN_WIDTH, 
-		S32 min_height = DEFAULT_MIN_HEIGHT,
-		BOOL drag_on_left = FALSE,
-		BOOL minimizable = TRUE,
-		BOOL close_btn = TRUE,
-		BOOL bordered = BORDER_NO);
+	struct Params 
+	:	public LLInitParam::Block<Params, LLPanel::Params>
+	{
+		Optional<std::string>	title,
+								short_title;
+		
+		Optional<bool>			single_instance,
+								auto_tile,
+								can_resize,
+								can_minimize,
+								can_close,
+								can_drag_on_left,
+								can_tear_off,
+								save_rect,
+								save_visibility;
+
+		Params() :
+			title("title"),
+			short_title("short_title"),
+			single_instance("single_instance", false),
+			auto_tile("auto_tile", false),
+			can_resize("can_resize", false),
+			can_minimize("can_minimize", true),
+			can_close("can_close", true),
+			can_drag_on_left("can_drag_on_left", false),
+			can_tear_off("can_tear_off", true),
+			save_rect("save_rect", false),
+			save_visibility("save_visibility", false)
+		{
+			name = "floater";
+			// defaults that differ from LLPanel:
+			background_visible = true;
+			visible = false;
+		}
+	};
+	
+	LLFloater(const LLSD& key = LLSD(), const LLFloater::Params& params = LLFloater::Params());
 
 	virtual ~LLFloater();
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-	void initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory, BOOL open = TRUE);
+	void initFromParams(const LLFloater::Params& p);
+	void initFloaterXML(LLXMLNodePtr node, LLView *parent, BOOL open_floater = TRUE, LLXMLNodePtr output_node = NULL);
 
-	/*virtual*/ void userSetShape(const LLRect& new_rect);
+	/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
 	/*virtual*/ BOOL canSnapTo(const LLView* other_view);
-	/*virtual*/ void snappedTo(const LLView* snap_view);
+	/*virtual*/ void setSnappedTo(const LLView* snap_view);
 	/*virtual*/ void setFocus( BOOL b );
 	/*virtual*/ void setIsChrome(BOOL is_chrome);
+	/*virtual*/ void setRect(const LLRect &rect);
 
-	// Can be called multiple times to reset floater parameters.
-	// Deletes all children of the floater.
-	virtual void		initFloater(const std::string& title, BOOL resizable, 
-						S32 min_width, S32 min_height, BOOL drag_on_left,
-						BOOL minimizable, BOOL close_btn);
+	void 			initFloater();
 
-	virtual void	open();	/* Flawfinder: ignore */
+	void			openFloater(const LLSD& key = LLSD());
 
 	// If allowed, close the floater cleanly, releasing focus.
 	// app_quitting is passed to onClose() below.
-	virtual void	close(bool app_quitting = false);
+	void			closeFloater(bool app_quitting = false);
 
 	/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 	
@@ -153,11 +170,8 @@ public:
 
 	// moves to center of gFloaterView
 	void			center();
-	// applies rectangle stored in mRectControl, if any
-	void			applyRectControl();
 
-
-	LLMultiFloater* getHost() { return (LLMultiFloater*)mHostHandle.get(); }
+	LLMultiFloater* getHost();
 
 	void			applyTitle();
 	const std::string&	getCurrentTitle() const;
@@ -185,9 +199,8 @@ public:
 	void			setResizeLimits( S32 min_width, S32 min_height );
 	void			getResizeLimits( S32* min_width, S32* min_height ) { *min_width = mMinWidth; *min_height = mMinHeight; }
 
-	bool			isMinimizeable() const{ return mButtonsEnabled[BUTTON_MINIMIZE]; }
-	// Does this window have a close button, NOT can we close it right now.
-	bool			isCloseable() const{ return (mButtonsEnabled[BUTTON_CLOSE]); }
+	bool			isMinimizeable() const{ return mCanMinimize; }
+	bool			isCloseable() const{ return mCanClose; }
 	bool			isDragOnLeft() const{ return mDragOnLeft; }
 	S32				getMinWidth() const{ return mMinWidth; }
 	S32				getMinHeight() const{ return mMinHeight; }
@@ -198,7 +211,7 @@ public:
 	virtual BOOL	handleMiddleMouseDown(S32 x, S32 y, MASK mask);
 	virtual void	draw();
 
-	virtual void	onOpen() {}
+	virtual void	onOpen(const LLSD& key) {}
 
 	// Call destroy() to free memory, or setVisible(FALSE) to keep it
 	// If app_quitting, you might not want to save your visibility.
@@ -210,8 +223,10 @@ public:
 	virtual BOOL	canClose() { return TRUE; }
 
 	virtual void	setVisible(BOOL visible);
+	virtual void	onVisibilityChange ( BOOL curVisibilityIn );
+	
 	void			setFrontmost(BOOL take_focus = TRUE);
-
+	
 	// Defaults to false.
 	virtual BOOL	canSaveAs() const { return FALSE; }
 
@@ -222,6 +237,8 @@ public:
 	LLHandle<LLFloater>	getSnapTarget() const { return mSnappedTo; }
 
 	LLHandle<LLFloater> getHandle() const { return mHandle; }
+	const LLSD& 	getKey() { return mKey; }
+	BOOL		 	matchesKey(const LLSD& key) { return mSingleInstance || KeyCompare::equate(key, mKey); }
 
 	// Return a closeable floater, if any, given the current focus.
 	static LLFloater* getClosableFloaterFromFocus(); 
@@ -235,22 +252,30 @@ public:
 	    return LLNotification::Params(name).context(mNotificationContext); 
 	}
 
-	static void		onClickClose(void *userdata);
-	static void		onClickMinimize(void *userdata);
-	static void		onClickTearOff(void *userdata);
-	static void		onClickEdit(void *userdata);
+	static void		onClickClose(LLFloater* floater);
+	static void		onClickMinimize(LLFloater* floater);
+	static void		onClickTearOff(LLFloater* floater);
+	static void		onClickEdit(LLFloater* floater);
 
 	static void		setFloaterHost(LLMultiFloater* hostp) {sHostp = hostp; }
 	static void		setEditModeEnabled(BOOL enable);
 	static BOOL		getEditModeEnabled() { return sEditModeEnabled; }
-	static LLMultiFloater*		getFloaterHost() {return sHostp; }
-
+	static LLMultiFloater* getFloaterHost() {return sHostp; }
+		
 protected:
 
+	void			setRectControl(const std::string& rectname) { mRectControl = rectname; };
+	void			applyRectControl();
+	void			storeRectControl();
+	void			storeVisibilityControl();
+
+	void		 	setKey(const LLSD& key);
+	void		 	setInstanceName(const std::string& name);
+	
 	virtual void	bringToFront(S32 x, S32 y);
 	virtual void	setVisibleAndFrontmost(BOOL take_focus=TRUE);    
 	
-	void		setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized
+	void			setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized
 	const LLRect&	getExpandedRect() const { return mExpandedRect; }
 
 	void			setAutoFocus(BOOL focus) { mAutoFocus = focus; } // whether to automatically take focus when opened
@@ -266,31 +291,48 @@ private:
 	void			updateButtons();
 	void			buildButtons();
 	BOOL			offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButtons index);
-
+	void			addResizeCtrls();
+	void 			addDragHandle();
+	
+protected:
+	std::string		mRectControl;
+	std::string		mVisibilityControl;
+	
+	LLSD			mKey;				// Key used for retrieving instances; set (for now) by LLFLoaterReg
+	
+private:
 	LLRect			mExpandedRect;
 	LLDragHandle*	mDragHandle;
 	LLResizeBar*	mResizeBar[4];
 	LLResizeHandle*	mResizeHandle[4];
-	LLButton		*mMinimizeButton;
+	
+	LLUIString		mTitle;
+	LLUIString		mShortTitle;
+	
+	BOOL			mSingleInstance;	// TRUE if there is only ever one instance of the floater
+	std::string		mInstanceName;		// Store the instance name so we can remove ourselves from the list
+	BOOL			mAutoTile;			// TRUE if placement of new instances tiles
+	
 	BOOL			mCanTearOff;
+	BOOL			mCanMinimize;
+	BOOL			mCanClose;
+	BOOL			mDragOnLeft;
+	BOOL			mResizable;
+	
+	S32				mMinWidth;
+	S32				mMinHeight;
+	
 	BOOL			mMinimized;
 	BOOL			mForeground;
 	LLHandle<LLFloater>	mDependeeHandle;
-	std::string		mTitle;
-	std::string		mShortTitle;
+	
 
 	BOOL			mFirstLook;			// TRUE if the _next_ time this floater is visible will be the first time in the session that it is visible.
-
-	BOOL			mResizable;
-	S32				mMinWidth;
-	S32				mMinHeight;
-
 	BOOL			mEditing;
 	
 	typedef std::set<LLHandle<LLFloater> > handle_set_t;
 	typedef std::set<LLHandle<LLFloater> >::iterator handle_set_iter_t;
 	handle_set_t	mDependents;
-	bool			mDragOnLeft;
 
 	BOOL			mButtonsEnabled[BUTTON_COUNT];
 	LLButton*		mButtons[BUTTON_COUNT];
@@ -308,7 +350,9 @@ private:
 	static std::string	sButtonPressedImageNames[BUTTON_COUNT];
 	static std::string	sButtonNames[BUTTON_COUNT];
 	static std::string	sButtonToolTips[BUTTON_COUNT];
-	typedef void (*click_callback)(void *);
+	static std::string  sButtonToolTipsIndex[BUTTON_COUNT];
+	
+	typedef void(*click_callback)(LLFloater*);
 	static click_callback sButtonCallbacks[BUTTON_COUNT];
 
 	typedef std::map<LLHandle<LLFloater>, LLFloater*> handle_map_t;
@@ -320,7 +364,10 @@ private:
 	BOOL			mHasBeenDraggedWhileMinimized;
 	S32				mPreviousMinimizedBottom;
 	S32				mPreviousMinimizedLeft;
-	
+
+	LLColor4		mBgColorAlpha;
+	LLColor4		mBgColorOpaque;
+
 	LLFloaterNotificationContext* mNotificationContext;
 	LLRootHandle<LLFloater>		mHandle;	
 };
@@ -331,18 +378,18 @@ private:
 
 class LLFloaterView : public LLUICtrl
 {
-public:
-	LLFloaterView( const std::string& name, const LLRect& rect );
+protected:
+	LLFloaterView (const Params& p);
+	friend class LLUICtrlFactory;
 
+public:
 	/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 	void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical);
 
 	/*virtual*/ void draw();
 	/*virtual*/ LLRect getSnapRect() const;
-	void refresh();
+	/*virtual*/ void refresh();
 
-	void			getNewFloaterPosition( S32* left, S32* top );
-	void			resetStartingFloaterPosition();
 	LLRect			findNeighboringPosition( LLFloater* reference_floater, LLFloater* neighbor );
 
 	// Given a child of gFloaterView, make sure this view can fit entirely onscreen.
@@ -365,10 +412,10 @@ public:
 	void			closeAllChildren(bool app_quitting);
 	BOOL			allChildrenClosed();
 
-	LLFloater* getFrontmost();
-	LLFloater* getBackmost();
-	LLFloater* getParentFloater(LLView* viewp);
-	LLFloater* getFocusedFloater();
+	LLFloater* getFrontmost() const;
+	LLFloater* getBackmost() const;
+	LLFloater* getParentFloater(LLView* viewp) const;
+	LLFloater* getFocusedFloater() const;
 	void		syncFloaterTabOrder();
 
 	// Returns z order of child provided. 0 is closest, larger numbers
@@ -386,99 +433,23 @@ private:
 	S32				mSnapOffsetBottom;
 };
 
-// https://wiki.lindenlab.com/mediawiki/index.php?title=LLMultiFloater&oldid=81376
-class LLMultiFloater : public LLFloater
-{
-public:
-	LLMultiFloater();
-	LLMultiFloater(LLTabContainer::TabPosition tab_pos);
-	LLMultiFloater(const std::string& name);
-	LLMultiFloater(const std::string& name, const LLRect& rect, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE);
-	LLMultiFloater(const std::string& name, const std::string& rect_control, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE);
-	virtual ~LLMultiFloater() {};
-
-	virtual BOOL postBuild();
-	/*virtual*/ void open();	/* Flawfinder: ignore */
-	/*virtual*/ void onClose(bool app_quitting);
-	/*virtual*/ void draw();
-	/*virtual*/ void setVisible(BOOL visible);
-	/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
-
-	virtual void setCanResize(BOOL can_resize);
-	virtual void growToFit(S32 content_width, S32 content_height);
-	virtual void addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
-
-	virtual void showFloater(LLFloater* floaterp);
-	virtual void removeFloater(LLFloater* floaterp);
-
-	virtual void tabOpen(LLFloater* opened_floater, bool from_click);
-	virtual void tabClose();
-
-	virtual BOOL selectFloater(LLFloater* floaterp);
-	virtual void selectNextFloater();
-	virtual void selectPrevFloater();
-
-	virtual LLFloater*	getActiveFloater();
-	virtual BOOL		isFloaterFlashing(LLFloater* floaterp);
-	virtual S32			getFloaterCount();
-
-	virtual void setFloaterFlashing(LLFloater* floaterp, BOOL flashing);
-	virtual BOOL closeAllFloaters();	//Returns FALSE if the floater could not be closed due to pending confirmation dialogs
-	void setTabContainer(LLTabContainer* tab_container) { if (!mTabContainer) mTabContainer = tab_container; }
-	static void onTabSelected(void* userdata, bool);
-
-	virtual void updateResizeLimits();
-
-protected:
-	struct LLFloaterData
-	{
-		S32		mWidth;
-		S32		mHeight;
-		BOOL	mCanMinimize;
-		BOOL	mCanResize;
-	};
-
-	LLTabContainer*		mTabContainer;
-	
-	typedef std::map<LLHandle<LLFloater>, LLFloaterData> floater_data_map_t;
-	floater_data_map_t	mFloaterDataMap;
-	
-	LLTabContainer::TabPosition mTabPos;
-	BOOL				mAutoResize;
-	S32					mOrigMinWidth, mOrigMinHeight;  // logically const but initialized late
-};
+// singleton implementation for floaters
+// https://wiki.lindenlab.com/mediawiki/index.php?title=LLFloaterSingleton&oldid=164990
 
+//*******************************************************
+//* TO BE DEPRECATED
+//*******************************************************
 // visibility policy specialized for floaters
 template<>
 class VisibilityPolicy<LLFloater>
 {
 public:
 	// visibility methods
-	static bool visible(LLFloater* instance, const LLSD& key)
-	{
-		if (instance) 
-		{
-			return !instance->isMinimized() && instance->isInVisibleChain();
-		}
-		return FALSE;
-	}
+	static bool visible(LLFloater* instance, const LLSD& key);
 
-	static void show(LLFloater* instance, const LLSD& key)
-	{
-		if (instance) 
-		{
-			instance->open();
-			if (instance->getHost())
-			{
-				instance->getHost()->open();
-			}
-		}
-	}
+	static void show(LLFloater* instance, const LLSD& key);
 
-	static void hide(LLFloater* instance, const LLSD& key)
-	{
-		if (instance) instance->close();
-	}
+	static void hide(LLFloater* instance, const LLSD& key);
 };
 
 
@@ -489,6 +460,10 @@ template <class T> class LLFloaterSingleton : public LLUISingleton<T, Visibility
 {
 };
 
+//
+// Globals
+//
+
 extern LLFloaterView* gFloaterView;
 
 #endif  // LL_FLOATER_H
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
new file mode 100644
index 0000000000..faa763cea9
--- /dev/null
+++ b/indra/llui/llfloaterreg.cpp
@@ -0,0 +1,423 @@
+/** 
+ * @file llfloaterreg.cpp
+ * @brief LLFloaterReg Floater Registration Class
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llfloaterreg.h"
+
+#include "llfloater.h"
+#include "llmultifloater.h"
+
+//*******************************************************
+
+//static
+LLFloaterReg::instance_list_t LLFloaterReg::sNullInstanceList;
+LLFloaterReg::instance_map_t LLFloaterReg::sInstanceMap;
+LLFloaterReg::build_map_t LLFloaterReg::sBuildMap;
+std::map<std::string,std::string> LLFloaterReg::sGroupMap;
+
+//*******************************************************
+
+//static
+void LLFloaterReg::add(const std::string& name, const std::string& filename, const LLFloaterBuildFunc& func, const std::string& groupname)
+{
+	sBuildMap[name].mFunc = func;
+	sBuildMap[name].mFile = filename;
+	sGroupMap[name] = groupname.empty() ? name : groupname;
+	sGroupMap[groupname] = groupname; // for referencing directly by group name
+}
+
+//static
+LLRect LLFloaterReg::getFloaterRect(const std::string& name)
+{
+	LLRect rect;
+	const std::string& groupname = sGroupMap[name];
+	if (!groupname.empty())
+	{
+		instance_list_t& list = sInstanceMap[groupname];
+		if (!list.empty())
+		{
+			static LLUICachedControl<S32> floater_offset ("UIFloaterOffset", 16);
+			LLFloater* last_floater = list.back();
+			if (last_floater->getHost())
+			{
+				rect = last_floater->getHost()->getRect();
+			}
+			else
+			{
+				rect = last_floater->getRect();
+			}
+			rect.translate(floater_offset, -floater_offset);
+		}
+	}
+	return rect;
+}
+
+//static
+LLFloater* LLFloaterReg::findInstance(const std::string& name, const LLSD& key)
+{
+	LLFloater* res = NULL;
+	const std::string& groupname = sGroupMap[name];
+	if (!groupname.empty())
+	{
+		instance_list_t& list = sInstanceMap[groupname];
+		for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
+		{
+			LLFloater* inst = *iter;
+			if (inst->matchesKey(key))
+			{
+				res = inst;
+				break;
+			}
+		}
+	}
+	return res;
+}
+
+//static
+LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key) 
+{
+	LLFloater* res = findInstance(name, key);
+	if (!res)
+	{
+		const LLFloaterBuildFunc& build_func = sBuildMap[name].mFunc;
+		const std::string& xui_file = sBuildMap[name].mFile;
+		if (build_func)
+		{
+			const std::string& groupname = sGroupMap[name];
+			if (!groupname.empty())
+			{
+				instance_list_t& list = sInstanceMap[groupname];
+				int index = list.size();
+
+				res = build_func(key);
+				
+				const bool DONT_OPEN_FLOATER = false;
+				LLUICtrlFactory::getInstance()->buildFloater(res, xui_file, DONT_OPEN_FLOATER);
+				
+				// Note: key should eventually be a non optional LLFloater arg; for now, set mKey to be safe
+				res->mKey = key;
+				res->setInstanceName(name);
+				res->applyRectControl(); // Can't apply rect control until setting instance name
+				if (res->mAutoTile && !res->getHost() && index > 0)
+				{
+					const LLRect& cur_rect = res->getRect();
+					LLRect next_rect = getFloaterRect(groupname);
+					next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, cur_rect.getWidth(), cur_rect.getHeight());
+					res->setRect(next_rect);
+					res->setRectControl(LLStringUtil::null); // don't save rect of tiled floaters
+					gFloaterView->adjustToFitScreen(res, true);
+				}
+				else
+				{
+					gFloaterView->adjustToFitScreen(res, false);
+				}
+				list.push_back(res);
+			}
+		}
+		if (!res)
+		{
+			llwarns << "Floater type: '" << name << "' not registered." << llendl;
+		}
+	}
+	return res;
+}
+
+//static
+LLFloater* LLFloaterReg::removeInstance(const std::string& name, const LLSD& key)
+{
+	LLFloater* res = NULL;
+	const std::string& groupname = sGroupMap[name];
+	if (!groupname.empty())
+	{
+		instance_list_t& list = sInstanceMap[groupname];
+		for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
+		{
+			LLFloater* inst = *iter;
+			if (inst->matchesKey(key))
+			{
+				res = inst;
+				list.erase(iter);
+				break;
+			}
+		}
+	}
+	return res;
+}
+
+//static
+// returns true if the instance existed
+bool LLFloaterReg::destroyInstance(const std::string& name, const LLSD& key)
+{
+	LLFloater* inst = removeInstance(name, key);
+	if (inst)
+	{
+		delete inst;
+		return true;
+	}
+	else
+	{
+		return false;
+	}
+}
+
+// Iterators
+//static
+LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(const std::string& name)
+{
+	instance_map_t::iterator iter = sInstanceMap.find(name);
+	if (iter != sInstanceMap.end())
+	{
+		return iter->second;
+	}
+	else
+	{
+		return sNullInstanceList;
+	}
+}
+
+// Visibility Management
+
+//static
+LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus) 
+{
+	LLFloater* instance = getInstance(name, key); 
+	if (instance) 
+	{
+		instance->openFloater(key);
+		if (focus)
+			instance->setFocus(TRUE);
+	}
+	return instance;
+}
+
+//static
+// returns true if the instance exists
+bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key) 
+{ 
+	LLFloater* instance = findInstance(name, key); 
+	if (instance)
+	{
+		// When toggling *visibility*, close the host instead of the floater when hosted
+		if (instance->getHost())
+			instance->getHost()->closeFloater();
+		else
+			instance->closeFloater();
+		return true;
+	}
+	else
+	{
+		return false;
+	}
+}
+
+//static
+// returns true if the instance is visible when completed
+bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key)
+{
+	LLFloater* instance = findInstance(name, key); 
+	if (instance && !instance->isMinimized() && instance->isInVisibleChain())
+	{
+		// When toggling *visibility*, close the host instead of the floater when hosted
+		if (instance->getHost())
+			instance->getHost()->closeFloater();
+		else
+			instance->closeFloater();
+		return false;
+	}
+	else
+	{
+		return showInstance(name, key, TRUE) ? true : false;
+	}
+}
+
+//static
+// returns true if the instance exists and is visible
+bool LLFloaterReg::instanceVisible(const std::string& name, const LLSD& key)
+{
+	LLFloater* instance = findInstance(name, key); 
+	if (instance && !instance->isMinimized() && instance->isInVisibleChain())
+	{
+		return true;
+	}
+	else
+	{
+		return false;
+	}
+}
+
+//static
+void LLFloaterReg::showInitialVisibleInstances() 
+{
+	// Iterate through alll registered instance names and show any with a save visible state
+	for (build_map_t::iterator iter = sBuildMap.begin(); iter != sBuildMap.end(); ++iter)
+	{
+		const std::string& name = iter->first;
+		std::string controlname = getVisibilityControlName(name);
+		if (LLUI::sSettingGroups["floater"]->controlExists(controlname))
+		{
+			BOOL isvis = LLUI::sSettingGroups["floater"]->getBOOL(controlname);
+			if (isvis)
+			{
+				showInstance(name, LLSD()); // keyed floaters shouldn't set save_vis to true
+			}
+		}
+	}
+}
+
+//static
+void LLFloaterReg::hideVisibleInstances(const std::set<std::string>& exceptions)
+{
+	// Iterate through alll active instances and hide them
+	for (instance_map_t::iterator iter = sInstanceMap.begin(); iter != sInstanceMap.end(); ++iter)
+	{
+		const std::string& name = iter->first;
+		if (exceptions.find(name) != exceptions.end())
+			continue;
+		instance_list_t& list = iter->second;
+		for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
+		{
+			LLFloater* floater = *iter;
+			floater->pushVisible(FALSE);
+		}
+	}
+}
+
+//static
+void LLFloaterReg::restoreVisibleInstances()
+{
+	// Iterate through all active instances and restore visibility
+	for (instance_map_t::iterator iter = sInstanceMap.begin(); iter != sInstanceMap.end(); ++iter)
+	{
+		instance_list_t& list = iter->second;
+		for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
+		{
+			LLFloater* floater = *iter;
+			floater->popVisible();
+		}
+	}
+}
+
+//static
+std::string LLFloaterReg::getRectControlName(const std::string& name)
+{
+	std::string res = std::string("floater_rect_") + name;
+	LLStringUtil::replaceChar( res, ' ', '_' );
+	return res;
+}
+
+//static
+std::string LLFloaterReg::declareRectControl(const std::string& name)
+{
+	std::string controlname = getRectControlName(name);
+	LLUI::sSettingGroups["floater"]->declareRect(controlname, LLRect(),
+												 llformat("Window Position and Size for %s", name.c_str()),
+												 TRUE);
+	return controlname;
+}
+
+//static
+std::string LLFloaterReg::getVisibilityControlName(const std::string& name)
+{
+	std::string res = std::string("floater_vis_") + name;
+	LLStringUtil::replaceChar( res, ' ', '_' );
+	return res;
+}
+
+//static
+std::string LLFloaterReg::declareVisibilityControl(const std::string& name)
+{
+	std::string controlname = getVisibilityControlName(name);
+	LLUI::sSettingGroups["floater"]->declareBOOL(controlname, FALSE,
+												 llformat("Window Visibility for %s", name.c_str()),
+												 TRUE);
+	return controlname;
+}
+
+// Callbacks
+
+// static
+// Call once (i.e use for init callbacks)
+void LLFloaterReg::initUICtrlToFloaterVisibilityControl(LLUICtrl* ctrl, const LLSD& sdname)
+{
+	// Get the visibility control name for the floater
+	std::string vis_control_name = LLFloaterReg::declareVisibilityControl(sdname.asString());
+	// Set the control value to the floater visibility control (Sets the value as well)
+	ctrl->setControlVariable(LLUI::sSettingGroups["floater"]->getControl(vis_control_name));
+}
+
+// callback args may use "floatername.key" format
+static void parse_name_key(std::string& name, LLSD& key)
+{
+	std::string instname = name;
+	std::size_t dotpos = instname.find(".");
+	if (dotpos != std::string::npos)
+	{
+		name = instname.substr(0, dotpos);
+		key = LLSD(instname.substr(dotpos+1, std::string::npos));
+	}
+}
+
+//static
+void LLFloaterReg::showFloaterInstance(const LLSD& sdname)
+{
+	LLSD key;
+	std::string name = sdname.asString();
+	parse_name_key(name, key);
+	showInstance(name, key, TRUE);
+}
+//static
+void LLFloaterReg::hideFloaterInstance(const LLSD& sdname)
+{
+	LLSD key;
+	std::string name = sdname.asString();
+	parse_name_key(name, key);
+	hideInstance(name, key);
+}
+//static
+void LLFloaterReg::toggleFloaterInstance(const LLSD& sdname)
+{
+	LLSD key;
+	std::string name = sdname.asString();
+	parse_name_key(name, key);
+	toggleInstance(name, key);
+}
+
+//static
+bool LLFloaterReg::floaterInstanceVisible(const LLSD& sdname)
+{
+	LLSD key;
+	std::string name = sdname.asString();
+	parse_name_key(name, key);
+	return instanceVisible(name, key);
+}
+
diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h
new file mode 100644
index 0000000000..af1bfc5ec1
--- /dev/null
+++ b/indra/llui/llfloaterreg.h
@@ -0,0 +1,149 @@
+/** 
+ * @file llfloaterreg.h
+ * @brief LLFloaterReg Floater Registration Class
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+/// llcommon
+#include "llboost.h"
+#include "llrect.h"
+#include "llstl.h"
+#include "llsd.h"
+
+/// llui
+#include "lluictrl.h"
+
+#include <boost/function.hpp>
+
+//*******************************************************
+//
+// Floater Class Registry
+//
+
+class LLFloater;
+
+typedef boost::function<LLFloater* (const LLSD& key)> LLFloaterBuildFunc;
+
+class LLFloaterReg
+{
+public:
+	// We use a list of LLFloater's instead of a set for two reasons:
+	// 1) With a list we have a predictable ordering, useful for finding the last opened floater of a given type.
+	// 2) We can change the key of a floater without altering the list.
+	typedef std::list<LLFloater*> instance_list_t;
+	typedef const instance_list_t const_instance_list_t;
+	typedef std::map<std::string, instance_list_t> instance_map_t;
+
+	struct BuildData
+	{
+		LLFloaterBuildFunc mFunc;
+		std::string mFile;
+	};
+	typedef std::map<std::string, BuildData> build_map_t;
+	
+private:
+	static instance_list_t sNullInstanceList;
+	static instance_map_t sInstanceMap;
+	static build_map_t sBuildMap;
+	static std::map<std::string,std::string> sGroupMap;
+	
+public:
+	// Registration
+	
+	// usage: LLFloaterClassRegistry::add("foo", (LLFloaterBuildFunc)&LLFloaterClassRegistry::build<LLFloaterFoo>);
+	template <class T>
+	static LLFloater* build(const LLSD& key)
+	{
+		T* floater = new T(key);
+		return floater;
+	}
+	
+	static void add(const std::string& name, const std::string& file, const LLFloaterBuildFunc& func,
+					const std::string& groupname = LLStringUtil::null);
+
+	// Helpers
+	static LLRect getFloaterRect(const std::string& name);
+	
+	// Find / get (create) / remove / destroy
+	static LLFloater* findInstance(const std::string& name, const LLSD& key = LLSD());
+	static LLFloater* getInstance(const std::string& name, const LLSD& key = LLSD());
+	static LLFloater* removeInstance(const std::string& name, const LLSD& key = LLSD());
+	static bool destroyInstance(const std::string& name, const LLSD& key = LLSD());
+	
+	// Iterators
+	static const_instance_list_t& getFloaterList(const std::string& name);
+
+	// Visibility Management
+	// return NULL if instance not found or can't create instance (no builder)
+	static LLFloater* showInstance(const std::string& name, const LLSD& key = LLSD(), BOOL focus = FALSE);
+	// Close a floater (may destroy or set invisible)
+	// return false if can't find instance
+	static bool hideInstance(const std::string& name, const LLSD& key = LLSD());
+	// return true if instance is visible:
+	static bool toggleInstance(const std::string& name, const LLSD& key = LLSD());
+	static bool instanceVisible(const std::string& name, const LLSD& key = LLSD());
+
+	static void showInitialVisibleInstances();
+	static void hideVisibleInstances(const std::set<std::string>& exceptions = std::set<std::string>());
+	static void restoreVisibleInstances();
+
+	// Control Variables
+	static std::string getRectControlName(const std::string& name);
+	static std::string declareRectControl(const std::string& name);
+	static std::string getVisibilityControlName(const std::string& name);
+	static std::string declareVisibilityControl(const std::string& name);
+
+	// Callback wrappers
+	static void initUICtrlToFloaterVisibilityControl(LLUICtrl* ctrl, const LLSD& sdname);
+	static void showFloaterInstance(const LLSD& sdname);
+	static void hideFloaterInstance(const LLSD& sdname);
+	static void toggleFloaterInstance(const LLSD& sdname);
+	static bool floaterInstanceVisible(const LLSD& sdname);
+	
+	// Typed find / get / show
+	template <class T>
+	static T* findTypedInstance(const std::string& name, const LLSD& key = LLSD())
+	{
+		return dynamic_cast<T*>(findInstance(name, key));
+	}
+
+	template <class T>
+	static T* getTypedInstance(const std::string& name, const LLSD& key = LLSD())
+	{
+		return dynamic_cast<T*>(getInstance(name, key));
+	}
+
+	template <class T>
+	static T* showTypedInstance(const std::string& name, const LLSD& key = LLSD(), BOOL focus = FALSE)
+	{
+		return dynamic_cast<T*>(showInstance(name, key, focus));
+	}
+	
+};
+
diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp
new file mode 100644
index 0000000000..6b7c174726
--- /dev/null
+++ b/indra/llui/llflyoutbutton.cpp
@@ -0,0 +1,94 @@
+/** 
+ * @file llflyoutbutton.cpp
+ * @brief LLFlyoutButton base class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+// file includes
+#include "llflyoutbutton.h"
+
+static LLRegisterWidget<LLFlyoutButton> r2("flyout_button");
+
+const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24;
+
+LLFlyoutButton::LLFlyoutButton(const Params& p)
+:	LLComboBox(p),
+	mToggleState(FALSE),
+	mActionButton(NULL)
+{
+	// Always use text box 
+	// Text label button
+	LLButton::Params bp(p.action_button);
+	bp.name(p.label);
+	bp.rect.left(0).bottom(0).width(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH).height(getRect().getHeight());
+	bp.click_callback.function(boost::bind(&LLFlyoutButton::onActionButtonClick, this, _2));
+	bp.follows.flags(FOLLOWS_ALL);
+
+	mActionButton = LLUICtrlFactory::create<LLButton>(bp);
+	addChild(mActionButton);
+
+	mButton->setOrigin(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH, 0);
+	mButton->reshape(FLYOUT_BUTTON_ARROW_WIDTH, getRect().getHeight());
+	mButton->setFollows(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
+	mButton->setImageOverlay(mListPosition == BELOW ? "down_arrow.tga" : "up_arrow.tga", LLFontGL::RIGHT);
+}
+
+void LLFlyoutButton::onActionButtonClick(const LLSD& data)
+{
+	// remember last list selection?
+	mList->deselect();
+	onCommit();
+}
+
+void LLFlyoutButton::draw()
+{
+	mActionButton->setToggleState(mToggleState);
+	mButton->setToggleState(mToggleState);
+
+	//FIXME: this should be an attribute of comboboxes, whether they have a distinct label or
+	// the label reflects the last selected item, for now we have to manually remove the label
+	mButton->setLabel(LLStringUtil::null);
+	LLComboBox::draw();	
+}
+
+void LLFlyoutButton::setEnabled(BOOL enabled)
+{
+	mActionButton->setEnabled(enabled);
+	LLComboBox::setEnabled(enabled);
+}
+
+
+void LLFlyoutButton::setToggleState(BOOL state)
+{
+	mToggleState = state;
+}
+
+
diff --git a/indra/llui/llflyoutbutton.h b/indra/llui/llflyoutbutton.h
new file mode 100644
index 0000000000..f60fe1eb35
--- /dev/null
+++ b/indra/llui/llflyoutbutton.h
@@ -0,0 +1,71 @@
+/** 
+ * @file llflyoutbutton.h
+ * @brief LLFlyoutButton base class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// A control that displays the name of the chosen item, which when clicked
+// shows a scrolling box of choices.
+
+#ifndef LL_LLFLYOUTBUTTON_H
+#define LL_LLFLYOUTBUTTON_H
+
+#include "llcombobox.h"
+
+// Classes
+
+class LLFlyoutButton : public LLComboBox
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLComboBox::Params>
+	{
+		Optional<LLButton::Params> action_button;
+
+		Params()
+		:	action_button("action_button")
+		{}
+
+	};
+protected:
+	LLFlyoutButton(const Params&);
+	friend class LLUICtrlFactory;
+public:
+	virtual void	draw();
+	virtual void	setEnabled(BOOL enabled);
+
+	void setToggleState(BOOL state);
+
+	void onActionButtonClick(const LLSD& data);
+
+protected:
+	LLButton*				mActionButton;
+	BOOL					mToggleState;
+};
+
+#endif // LL_LLFLYOUTBUTTON_H
diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp
index 661ffdd467..9a4ec7627e 100644
--- a/indra/llui/llfocusmgr.cpp
+++ b/indra/llui/llfocusmgr.cpp
@@ -220,24 +220,19 @@ void LLFocusMgr::setMouseCapture( LLMouseHandler* new_captor )
 	{
 		LLMouseHandler* old_captor = mMouseCaptor;
 		mMouseCaptor = new_captor;
-		/*
-		if (new_captor)
+		
+		if (LLView::sDebugMouseHandling)
 		{
-			if ( new_captor->getName() == "Stickto")
+			if (new_captor)
 			{
 				llinfos << "New mouse captor: " << new_captor->getName() << llendl;
 			}
 			else
 			{
-				llinfos << "New mouse captor: " << new_captor->getName() << llendl;
+				llinfos << "New mouse captor: NULL" << llendl;
 			}
 		}
-		else
-		{
-			llinfos << "New mouse captor: NULL" << llendl;
-		}
-		*/
-
+			
 		if( old_captor )
 		{
 			old_captor->onMouseCaptureLost();
@@ -295,7 +290,7 @@ void LLFocusMgr::setTopCtrl( LLUICtrl* new_top  )
 
 		if (old_top)
 		{
-			old_top->onLostTop();
+			old_top->onTopLost();
 		}
 	}
 }
@@ -328,7 +323,8 @@ F32 LLFocusMgr::getFocusFlashAmt() const
 
 LLColor4 LLFocusMgr::getFocusColor() const
 {
-	LLColor4 focus_color = lerp(LLUI::sColorsGroup->getColor( "FocusColor" ), LLColor4::white, getFocusFlashAmt());
+	static LLUICachedControl<LLColor4> focus_color_cached ("FocusColor", *(new LLColor4));
+	LLColor4 focus_color = lerp(focus_color_cached, LLColor4::white, getFocusFlashAmt());
 	// de-emphasize keyboard focus when app has lost focus (to avoid typing into wrong window problem)
 	if (!mAppHasFocus)
 	{
diff --git a/indra/llui/llfunctorregistry.h b/indra/llui/llfunctorregistry.h
index 8864f7af15..2c0bcc6012 100644
--- a/indra/llui/llfunctorregistry.h
+++ b/indra/llui/llfunctorregistry.h
@@ -40,7 +40,7 @@
 #include <boost/function.hpp>
 
 #include "llsd.h"
-#include "llmemory.h"
+#include "llsingleton.h"
 
 /**
  * @class LLFunctorRegistry
diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp
index cb3b2a3a62..d01679cd1c 100644
--- a/indra/llui/lliconctrl.cpp
+++ b/indra/llui/lliconctrl.cpp
@@ -40,65 +40,33 @@
 #include "llcontrol.h"
 #include "llui.h"
 #include "lluictrlfactory.h"
-
-const F32 RESOLUTION_BUMP = 1.f;
+#include "lluiimage.h"
 
 static LLRegisterWidget<LLIconCtrl> r("icon");
 
-LLIconCtrl::LLIconCtrl(const std::string& name, const LLRect &rect, const LLUUID &image_id)
-:	LLUICtrl(name, 
-			 rect, 
-			 FALSE, // mouse opaque
-			 NULL, NULL, 
-			 FOLLOWS_LEFT | FOLLOWS_TOP),
-	mColor( LLColor4::white )
-{
-	setImage( image_id );
-	setTabStop(FALSE);
-}
-
-LLIconCtrl::LLIconCtrl(const std::string& name, const LLRect &rect, const std::string &image_name)
-:	LLUICtrl(name, 
-			 rect, 
-			 FALSE, // mouse opaque
-			 NULL, NULL, 
-			 FOLLOWS_LEFT | FOLLOWS_TOP),
-	mColor( LLColor4::white ),
-	mImageName(image_name)
-{
-	setImage( image_name );
-	setTabStop(FALSE);
-}
-
-
-LLIconCtrl::~LLIconCtrl()
+LLIconCtrl::Params::Params()
+:	image("image_name"),
+	color("color"),
+	scale_image("scale_image")
 {
-	mImagep = NULL;
+	tab_stop = false;
+	mouse_opaque = false;
 }
 
-
-void LLIconCtrl::setImage(const std::string& image_name)
+LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p)
+:	LLUICtrl(p),
+	mColor(p.color()),
+	mImagep(p.image)
 {
-	//RN: support UUIDs masquerading as strings
-	if (LLUUID::validate(image_name))
-	{
-		mImageID = LLUUID(image_name);
-
-		setImage(mImageID);
-	}
-	else
+	if (mImagep.notNull())
 	{
-		mImageName = image_name;
-		mImagep = LLUI::sImageProvider->getUIImage(image_name);
-		mImageID.setNull();
+		LLUICtrl::setValue(mImagep->getName());
 	}
 }
 
-void LLIconCtrl::setImage(const LLUUID& image_id)
+LLIconCtrl::~LLIconCtrl()
 {
-	mImageName.clear();
-	mImagep = LLUI::sImageProvider->getUIImageByID(image_id);
-	mImageID = image_id;
+	mImagep = NULL;
 }
 
 
@@ -106,69 +74,37 @@ void LLIconCtrl::draw()
 {
 	if( mImagep.notNull() )
 	{
-		mImagep->draw(getLocalRect(), mColor );
+		mImagep->draw(getLocalRect(), mColor.get() );
 	}
 
 	LLUICtrl::draw();
 }
 
 // virtual
+// value might be a string or a UUID
 void LLIconCtrl::setValue(const LLSD& value )
 {
-	if (value.isUUID())
+	LLSD tvalue(value);
+	if (value.isString() && LLUUID::validate(value.asString()))
 	{
-		setImage(value.asUUID());
+		//RN: support UUIDs masquerading as strings
+		tvalue = LLSD(LLUUID(value.asString()));
 	}
-	else
+	LLUICtrl::setValue(tvalue);
+	if (tvalue.isUUID())
 	{
-		setImage(value.asString());
+		mImagep = LLUI::getUIImageByID(tvalue.asUUID());
 	}
-}
-
-// virtual
-LLSD LLIconCtrl::getValue() const
-{
-	LLSD ret = getImage();
-	return ret;
-}
-
-// virtual
-LLXMLNodePtr LLIconCtrl::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	if (mImageName != "")
+	else
 	{
-		node->createChild("image_name", TRUE)->setStringValue(mImageName);
+		mImagep = LLUI::getUIImage(tvalue.asString());
 	}
-
-	node->createChild("color", TRUE)->setFloatValue(4, mColor.mV);
-
-	return node;
 }
 
-LLView* LLIconCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
+std::string LLIconCtrl::getImageName() const
 {
-	std::string name("icon");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	std::string image_name;
-	if (node->hasAttribute("image_name"))
-	{
-		node->getAttributeString("image_name", image_name);
-	}
-
-	LLColor4 color(LLColor4::white);
-	LLUICtrlFactory::getAttributeColor(node,"color", color);
-
-	LLIconCtrl* icon = new LLIconCtrl(name, rect, image_name);
-
-	icon->setColor(color);
-
-	icon->initFromXML(node, parent);
-
-	return icon;
+	if (getValue().isString())
+		return getValue().asString();
+	else
+		return std::string();
 }
diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h
index 50778cf226..ad0f6f563f 100644
--- a/indra/llui/lliconctrl.h
+++ b/indra/llui/lliconctrl.h
@@ -45,35 +45,37 @@ class LLUICtrlFactory;
 //
 // Classes
 //
+
+// 
 class LLIconCtrl
 : public LLUICtrl
 {
 public:
-	LLIconCtrl(const std::string& name, const LLRect &rect, const LLUUID &image_id);
-	LLIconCtrl(const std::string& name, const LLRect &rect, const std::string &image_name);
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<LLUIImage*>	image;
+		Optional<LLUIColor>		color;
+		Deprecated				scale_image;
+		Params();
+	};
+protected:
+	LLIconCtrl(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	virtual ~LLIconCtrl();
 
 	// llview overrides
 	virtual void	draw();
 
-	void			setImage(const std::string& image_name);
-	void			setImage(const LLUUID& image_name);
-	const LLUUID	&getImage() const						{ return mImageID; }
-	std::string		getImageName() const						{ return mImageName; }
-
-	// Takes a UUID, wraps get/setImage
+	// lluictrl overrides
 	virtual void	setValue(const LLSD& value );
-	virtual LLSD	getValue() const;
 
-	void			setColor(const LLColor4& color) { mColor = color; }
+	std::string	getImageName() const;
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
+	void			setColor(const LLColor4& color) { mColor = color; }
 
 private:
-	LLColor4		mColor;
-	std::string		mImageName;
-	LLUUID			mImageID;
+	LLUIColor mColor;
 	LLPointer<LLUIImage>	mImagep;
 };
 
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 51ef3dbacf..30796a5ab9 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -223,8 +223,8 @@ LLColor3 LLKeywords::readColor( const std::string& s )
 {
 	F32 r, g, b;
 	r = g = b = 0.0f;
-	S32 read = sscanf(s.c_str(), "%f, %f, %f]", &r, &g, &b );
-	if( read != 3 )	/* Flawfinder: ignore */
+	S32 values_read = sscanf(s.c_str(), "%f, %f, %f]", &r, &g, &b );
+	if( values_read != 3 )
 	{
 		llinfos << " poorly formed color in keyword file" << llendl;
 	}
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
new file mode 100644
index 0000000000..483c1358ae
--- /dev/null
+++ b/indra/llui/lllayoutstack.cpp
@@ -0,0 +1,718 @@
+/** 
+ * @file lllayoutstack.cpp
+ * @brief LLLayout class - dynamic stacking of UI elements
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Opaque view with a background and a border.  Can contain LLUICtrls.
+
+#include "linden_common.h"
+
+#include "lllayoutstack.h"
+#include "llresizebar.h"
+#include "llcriticaldamp.h"
+
+//
+// LLLayoutStack
+//
+struct LLLayoutStack::LLEmbeddedPanel
+{
+	LLEmbeddedPanel(LLPanel* panelp, ELayoutOrientation orientation, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize)	:	mPanel(panelp), 
+		mMinWidth(min_width), 
+		mMinHeight(min_height),
+		mAutoResize(auto_resize),
+		mUserResize(user_resize),
+		mOrientation(orientation),
+		mCollapsed(FALSE),
+		mCollapseAmt(0.f),
+		mVisibleAmt(1.f), // default to fully visible
+		mResizeBar(NULL) 
+	{
+		LLResizeBar::Side side = (orientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM;
+		LLRect resize_bar_rect = panelp->getRect();
+
+		S32 min_dim;
+		if (orientation == HORIZONTAL)
+		{
+			min_dim = mMinHeight;
+		}
+		else
+		{
+			min_dim = mMinWidth;
+		}
+		LLResizeBar::Params p;
+		p.name("resize");
+		p.resizing_view(mPanel);
+		p.min_size(min_dim);
+		p.side(side);
+		p.snapping_enabled(false);
+		mResizeBar = LLUICtrlFactory::create<LLResizeBar>(p);
+		// panels initialized as hidden should not start out partially visible
+		if (!mPanel->getVisible())
+		{
+			mVisibleAmt = 0.f;
+		}
+	}
+
+	~LLEmbeddedPanel()
+	{
+		// probably not necessary, but...
+		delete mResizeBar;
+		mResizeBar = NULL;
+	}
+
+	F32 getCollapseFactor()
+	{
+		if (mOrientation == HORIZONTAL)
+		{
+			F32 collapse_amt = 
+				clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinWidth / (F32)llmax(1, mPanel->getRect().getWidth()));
+			return mVisibleAmt * collapse_amt;
+		}
+		else
+		{
+			F32 collapse_amt = 
+				clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)mMinHeight / (F32)llmax(1, mPanel->getRect().getHeight())));
+			return mVisibleAmt * collapse_amt;
+		}
+	}
+
+	LLPanel* mPanel;
+	S32 mMinWidth;
+	S32 mMinHeight;
+	BOOL mAutoResize;
+	BOOL mUserResize;
+	BOOL mCollapsed;
+	LLResizeBar* mResizeBar;
+	ELayoutOrientation mOrientation;
+	F32 mVisibleAmt;
+	F32 mCollapseAmt;
+};
+
+static LLRegisterWidget<LLLayoutStack> r2("layout_stack", &LLLayoutStack::fromXML);
+
+LLLayoutStack::Params::Params()
+:	orientation("orientation", std::string("vertical")),
+	border_size("border_size", LLCachedControl<S32>(*LLUI::sSettingGroups["config"], "UIResizeBarHeight", 0))
+{
+	name="stack";
+}
+
+LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p) 
+:	LLView(p),
+	mMinWidth(0),
+	mMinHeight(0),
+	mPanelSpacing(p.border_size),
+	mOrientation((p.orientation() == "vertical") ? VERTICAL : HORIZONTAL)
+{}
+
+LLLayoutStack::~LLLayoutStack()
+{
+	e_panel_list_t panels = mPanels; // copy list of panel pointers
+	mPanels.clear(); // clear so that removeChild() calls don't cause trouble
+	std::for_each(panels.begin(), panels.end(), DeletePointer());
+}
+
+void LLLayoutStack::draw()
+{
+	updateLayout();
+
+	e_panel_list_t::iterator panel_it;
+	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
+	{
+		// clip to layout rectangle, not bounding rectangle
+		LLRect clip_rect = (*panel_it)->mPanel->getRect();
+		// scale clipping rectangle by visible amount
+		if (mOrientation == HORIZONTAL)
+		{
+			clip_rect.mRight = clip_rect.mLeft + llround((F32)clip_rect.getWidth() * (*panel_it)->getCollapseFactor());
+		}
+		else
+		{
+			clip_rect.mBottom = clip_rect.mTop - llround((F32)clip_rect.getHeight() * (*panel_it)->getCollapseFactor());
+		}
+
+		LLPanel* panelp = (*panel_it)->mPanel;
+
+		LLLocalClipRect clip(clip_rect);
+		// only force drawing invisible children if visible amount is non-zero
+		drawChild(panelp, 0, 0, !clip_rect.isNull());
+	}
+}
+
+void LLLayoutStack::removeChild(LLView* view)
+{
+	LLEmbeddedPanel* embedded_panelp = findEmbeddedPanel(dynamic_cast<LLPanel*>(view));
+
+	if (embedded_panelp)
+	{
+		mPanels.erase(std::find(mPanels.begin(), mPanels.end(), embedded_panelp));
+		delete embedded_panelp;
+	}
+
+	// need to update resizebars
+
+	calcMinExtents();
+
+	LLView::removeChild(view);
+}
+
+BOOL LLLayoutStack::postBuild()
+{
+	updateLayout();
+	return TRUE;
+}
+
+static void get_attribute_s32_and_write(LLXMLNodePtr node,
+										const char* name,
+										S32 *value,
+										S32 default_value,
+										LLXMLNodePtr output_child)
+{
+	BOOL has_attr = node->getAttributeS32(name, *value);
+	if (has_attr && *value != default_value && output_child)
+	{
+		// create an attribute child node
+		LLXMLNodePtr child_attr = output_child->createChild(name, TRUE);
+		child_attr->setIntValue(*value);
+	}
+}
+
+static void get_attribute_bool_and_write(LLXMLNodePtr node,
+										const char* name,
+										BOOL *value,
+										BOOL default_value,
+										LLXMLNodePtr output_child)
+{
+	BOOL has_attr = node->getAttributeBOOL(name, *value);
+	if (has_attr && *value != default_value && output_child)
+	{
+		LLXMLNodePtr child_attr = output_child->createChild(name, TRUE);
+		child_attr->setBoolValue(*value);
+	}
+}
+//static 
+LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)
+{
+	LLLayoutStack::Params p(LLUICtrlFactory::getDefaultParams<LLLayoutStack::Params>());
+	LLXUIParser::instance().readXUI(node, p);
+	setupParams(p, parent);
+	LLLayoutStack* layout_stackp = LLUICtrlFactory::create<LLLayoutStack>(p);
+
+	if (parent && layout_stackp)
+	{
+		S32 tab_group = p.tab_group.isProvided() ? p.tab_group() : parent->getLastTabGroup();
+
+		parent->addChild(layout_stackp, tab_group);
+	}
+
+	if (output_node)
+	{
+		Params output_params(p);
+		setupParamsForExport(output_params, parent);
+		LLLayoutStack::Params default_params(LLUICtrlFactory::getDefaultParams<LLLayoutStack::Params>());
+		output_node->setName(node->getName()->mString);
+		LLXUIParser::instance().writeXUI(
+			output_node, output_params, &default_params);
+	}
+
+	for (LLXMLNodePtr child_node = node->getFirstChild(); child_node.notNull(); child_node = child_node->getNextSibling())
+	{
+		const S32 DEFAULT_MIN_WIDTH = 0;
+		const S32 DEFAULT_MIN_HEIGHT = 0;
+		const BOOL DEFAULT_AUTO_RESIZE = TRUE;
+
+		S32 min_width = DEFAULT_MIN_WIDTH;
+		S32 min_height = DEFAULT_MIN_HEIGHT;
+		BOOL auto_resize = DEFAULT_AUTO_RESIZE;
+
+		LLXMLNodePtr output_child;
+		if (output_node) 
+		{
+			output_child = output_node->createChild("", FALSE);
+		}
+
+		// Layout stack allows child nodes to acquire additional attributes,
+		// such as "min_width" in:  <button label="Foo" min_width="100"/>
+		// If these attributes exist and have non-default values, write them
+		// to the output node.
+		get_attribute_s32_and_write(child_node, "min_width", &min_width,
+			DEFAULT_MIN_WIDTH, output_child);
+		get_attribute_s32_and_write(child_node, "min_height", &min_height,
+			DEFAULT_MIN_HEIGHT, output_child);
+		get_attribute_bool_and_write(child_node, "auto_resize", &auto_resize,
+			DEFAULT_AUTO_RESIZE, output_child);
+
+		if (child_node->hasName("layout_panel"))
+		{
+			BOOL user_resize = TRUE;
+			get_attribute_bool_and_write(child_node, "user_resize", &user_resize,
+				TRUE, output_child);
+			LLPanel* panelp = (LLPanel*)LLPanel::fromXML(child_node, layout_stackp, output_child);
+			if (panelp)
+			{
+				panelp->setFollowsNone();
+				layout_stackp->addPanel(panelp, min_width, min_height, auto_resize, user_resize);
+			}
+		}
+		else
+		{
+			BOOL user_resize = FALSE;
+			get_attribute_bool_and_write(child_node, "user_resize", &user_resize,
+				FALSE, output_child);
+
+			LLPanel* panelp = new LLPanel();
+			LLView* new_child = LLUICtrlFactory::getInstance()->createFromXML(child_node, panelp, LLStringUtil::null, output_child);
+			if (new_child)
+			{
+				// put child in new embedded panel
+				layout_stackp->addPanel(panelp, min_width, min_height, auto_resize, user_resize);
+				// resize panel to contain widget and move widget to be contained in panel
+				panelp->setRect(new_child->getRect());
+				new_child->setOrigin(0, 0);
+			}
+			else
+			{
+				panelp->die();
+			}
+		}
+		
+		if (output_child && !output_child->mChildren && output_child->mAttributes.empty() && output_child->getValue().empty())
+		{
+			output_node->deleteChild(output_child);
+		}
+	}
+
+	if (!layout_stackp->postBuild())
+	{
+		delete layout_stackp;
+		return NULL;
+	}
+
+	return layout_stackp;
+}
+
+S32 LLLayoutStack::getDefaultHeight(S32 cur_height)
+{
+	// if we are spanning our children (crude upward propagation of size)
+	// then don't enforce our size on our children
+	if (mOrientation == HORIZONTAL)
+	{
+		cur_height = llmax(mMinHeight, getRect().getHeight());
+	}
+
+	return cur_height;
+}
+
+S32 LLLayoutStack::getDefaultWidth(S32 cur_width)
+{
+	// if we are spanning our children (crude upward propagation of size)
+	// then don't enforce our size on our children
+	if (mOrientation == VERTICAL)
+	{
+		cur_width = llmax(mMinWidth, getRect().getWidth());
+	}
+
+	return cur_width;
+}
+
+void LLLayoutStack::addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize, EAnimate animate, S32 index)
+{
+	// panel starts off invisible (collapsed)
+	if (animate == ANIMATE)
+	{
+		panel->setVisible(FALSE);
+	}
+	LLEmbeddedPanel* embedded_panel = new LLEmbeddedPanel(panel, mOrientation, min_width, min_height, auto_resize, user_resize);
+	
+	mPanels.insert(mPanels.begin() + llclamp(index, 0, (S32)mPanels.size()), embedded_panel);
+	
+	if (panel->getParent() != this) 
+	{
+		addChild(panel);
+	}
+	addChild(embedded_panel->mResizeBar);
+
+	// bring all resize bars to the front so that they are clickable even over the panels
+	// with a bit of overlap
+	for (e_panel_list_t::iterator panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
+	{
+		LLResizeBar* resize_barp = (*panel_it)->mResizeBar;
+		sendChildToFront(resize_barp);
+	}
+
+	// start expanding panel animation
+	if (animate == ANIMATE)
+	{
+		panel->setVisible(TRUE);
+	}
+}
+
+void LLLayoutStack::removePanel(LLPanel* panel)
+{
+	removeChild(panel);
+}
+
+void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed)
+{
+	LLEmbeddedPanel* panel_container = findEmbeddedPanel(panel);
+	if (!panel_container) return;
+
+	panel_container->mCollapsed = collapsed;
+}
+
+void LLLayoutStack::updateLayout(BOOL force_resize)
+{
+	static LLUICachedControl<S32> resize_bar_overlap ("UIResizeBarOverlap", 0);
+	calcMinExtents();
+
+	// calculate current extents
+	S32 total_width = 0;
+	S32 total_height = 0;
+
+	const F32 ANIM_OPEN_TIME = 0.02f;
+	const F32 ANIM_CLOSE_TIME = 0.03f;
+
+	e_panel_list_t::iterator panel_it;
+	for (panel_it = mPanels.begin(); panel_it != mPanels.end();	++panel_it)
+	{
+		LLPanel* panelp = (*panel_it)->mPanel;
+		if (panelp->getVisible()) 
+		{
+			(*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_OPEN_TIME));
+			if ((*panel_it)->mVisibleAmt > 0.99f)
+			{
+				(*panel_it)->mVisibleAmt = 1.f;
+			}
+		}
+		else // not visible
+		{
+			(*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
+			if ((*panel_it)->mVisibleAmt < 0.001f)
+			{
+				(*panel_it)->mVisibleAmt = 0.f;
+			}
+		}
+
+		if ((*panel_it)->mCollapsed)
+		{
+			(*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
+		}
+		else
+		{
+			(*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
+		}
+
+		if (mOrientation == HORIZONTAL)
+		{
+			// enforce minimize size constraint by default
+			if (panelp->getRect().getWidth() < (*panel_it)->mMinWidth)
+			{
+				panelp->reshape((*panel_it)->mMinWidth, panelp->getRect().getHeight());
+			}
+        	total_width += llround(panelp->getRect().getWidth() * (*panel_it)->getCollapseFactor());
+        	// want n-1 panel gaps for n panels
+			if (panel_it != mPanels.begin())
+			{
+				total_width += mPanelSpacing;
+			}
+		}
+		else //VERTICAL
+		{
+			// enforce minimize size constraint by default
+			if (panelp->getRect().getHeight() < (*panel_it)->mMinHeight)
+			{
+				panelp->reshape(panelp->getRect().getWidth(), (*panel_it)->mMinHeight);
+			}
+			total_height += llround(panelp->getRect().getHeight() * (*panel_it)->getCollapseFactor());
+			if (panel_it != mPanels.begin())
+			{
+				total_height += mPanelSpacing;
+			}
+		}
+	}
+
+	S32 num_resizable_panels = 0;
+	S32 shrink_headroom_available = 0;
+	S32 shrink_headroom_total = 0;
+	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
+	{
+		// panels that are not fully visible do not count towards shrink headroom
+		if ((*panel_it)->getCollapseFactor() < 1.f) 
+		{
+			continue;
+		}
+
+		// if currently resizing a panel or the panel is flagged as not automatically resizing
+		// only track total available headroom, but don't use it for automatic resize logic
+		if ((*panel_it)->mResizeBar->hasMouseCapture() 
+			|| (!(*panel_it)->mAutoResize 
+				&& !force_resize))
+		{
+			if (mOrientation == HORIZONTAL)
+			{
+				shrink_headroom_total += (*panel_it)->mPanel->getRect().getWidth() - (*panel_it)->mMinWidth;
+			}
+			else //VERTICAL
+			{
+				shrink_headroom_total += (*panel_it)->mPanel->getRect().getHeight() - (*panel_it)->mMinHeight;
+			}
+		}
+		else
+		{
+			num_resizable_panels++;
+			if (mOrientation == HORIZONTAL)
+			{
+				shrink_headroom_available += (*panel_it)->mPanel->getRect().getWidth() - (*panel_it)->mMinWidth;
+				shrink_headroom_total += (*panel_it)->mPanel->getRect().getWidth() - (*panel_it)->mMinWidth;
+			}
+			else //VERTICAL
+			{
+				shrink_headroom_available += (*panel_it)->mPanel->getRect().getHeight() - (*panel_it)->mMinHeight;
+				shrink_headroom_total += (*panel_it)->mPanel->getRect().getHeight() - (*panel_it)->mMinHeight;
+			}
+		}
+	}
+
+	// calculate how many pixels need to be distributed among layout panels
+	// positive means panels need to grow, negative means shrink
+	S32 pixels_to_distribute;
+	if (mOrientation == HORIZONTAL)
+	{
+		pixels_to_distribute = getRect().getWidth() - total_width;
+	}
+	else //VERTICAL
+	{
+		pixels_to_distribute = getRect().getHeight() - total_height;
+	}
+
+	// now we distribute the pixels...
+	S32 cur_x = 0;
+	S32 cur_y = getRect().getHeight();
+
+	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
+	{
+		LLPanel* panelp = (*panel_it)->mPanel;
+
+		S32 cur_width = panelp->getRect().getWidth();
+		S32 cur_height = panelp->getRect().getHeight();
+		S32 new_width = llmax((*panel_it)->mMinWidth, cur_width);
+		S32 new_height = llmax((*panel_it)->mMinHeight, cur_height); 
+
+		S32 delta_size = 0;
+
+		// if panel can automatically resize (not animating, and resize flag set)...
+		if ((*panel_it)->getCollapseFactor() == 1.f 
+			&& (force_resize || (*panel_it)->mAutoResize) 
+			&& !(*panel_it)->mResizeBar->hasMouseCapture()) 
+		{
+			if (mOrientation == HORIZONTAL)
+			{
+				// if we're shrinking
+				if (pixels_to_distribute < 0)
+				{
+					// shrink proportionally to amount over minimum
+					// so we can do this in one pass
+					delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_width - (*panel_it)->mMinWidth) / (F32)shrink_headroom_available)) : 0;
+					shrink_headroom_available -= (cur_width - (*panel_it)->mMinWidth);
+				}
+				else
+				{
+					// grow all elements equally
+					delta_size = llround((F32)pixels_to_distribute / (F32)num_resizable_panels);
+					num_resizable_panels--;
+				}
+				pixels_to_distribute -= delta_size;
+				new_width = llmax((*panel_it)->mMinWidth, cur_width + delta_size);
+			}
+			else
+			{
+				new_width = getDefaultWidth(new_width);
+			}
+
+			if (mOrientation == VERTICAL)
+			{
+				if (pixels_to_distribute < 0)
+				{
+					// shrink proportionally to amount over minimum
+					// so we can do this in one pass
+					delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_height - (*panel_it)->mMinHeight) / (F32)shrink_headroom_available)) : 0;
+					shrink_headroom_available -= (cur_height - (*panel_it)->mMinHeight);
+				}
+				else
+				{
+					delta_size = llround((F32)pixels_to_distribute / (F32)num_resizable_panels);
+					num_resizable_panels--;
+				}
+				pixels_to_distribute -= delta_size;
+				new_height = llmax((*panel_it)->mMinHeight, cur_height + delta_size);
+			}
+			else
+			{
+				new_height = getDefaultHeight(new_height);
+			}
+		}
+		else
+		{
+			if (mOrientation == HORIZONTAL)
+			{
+				new_height = getDefaultHeight(new_height);
+			}
+			else // VERTICAL
+			{
+				new_width = getDefaultWidth(new_width);
+			}
+		}
+
+		// adjust running headroom count based on new sizes
+		shrink_headroom_total += delta_size;
+
+		panelp->reshape(new_width, new_height);
+		panelp->setOrigin(cur_x, cur_y - new_height);
+
+		LLRect panel_rect = panelp->getRect();
+		LLRect resize_bar_rect = panel_rect;
+		if (mOrientation == HORIZONTAL)
+		{
+			resize_bar_rect.mLeft = panel_rect.mRight - resize_bar_overlap;
+			resize_bar_rect.mRight = panel_rect.mRight + mPanelSpacing + resize_bar_overlap;
+		}
+		else
+		{
+			resize_bar_rect.mTop = panel_rect.mBottom + resize_bar_overlap;
+			resize_bar_rect.mBottom = panel_rect.mBottom - mPanelSpacing - resize_bar_overlap;
+		}
+		(*panel_it)->mResizeBar->setRect(resize_bar_rect);
+
+		if (mOrientation == HORIZONTAL)
+		{
+			cur_x += llround(new_width * (*panel_it)->getCollapseFactor()) + mPanelSpacing;
+		}
+		else //VERTICAL
+		{
+			cur_y -= llround(new_height * (*panel_it)->getCollapseFactor()) + mPanelSpacing;
+		}
+	}
+
+	// update resize bars with new limits
+	LLResizeBar* last_resize_bar = NULL;
+	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
+	{
+		LLPanel* panelp = (*panel_it)->mPanel;
+
+		if (mOrientation == HORIZONTAL)
+		{
+			(*panel_it)->mResizeBar->setResizeLimits(
+				(*panel_it)->mMinWidth, 
+				(*panel_it)->mMinWidth + shrink_headroom_total);
+		}
+		else //VERTICAL
+		{
+			(*panel_it)->mResizeBar->setResizeLimits(
+				(*panel_it)->mMinHeight, 
+				(*panel_it)->mMinHeight + shrink_headroom_total);
+		}
+
+		// toggle resize bars based on panel visibility, resizability, etc
+		BOOL resize_bar_enabled = panelp->getVisible() && (*panel_it)->mUserResize;
+		(*panel_it)->mResizeBar->setVisible(resize_bar_enabled);
+
+		if (resize_bar_enabled)
+		{
+			last_resize_bar = (*panel_it)->mResizeBar;
+		}
+	}
+
+	// hide last resize bar as there is nothing past it
+	// resize bars need to be in between two resizable panels
+	if (last_resize_bar)
+	{
+		last_resize_bar->setVisible(FALSE);
+	}
+
+	// not enough room to fit existing contents
+	if (force_resize == FALSE
+		// layout did not complete by reaching target position
+		&& ((mOrientation == VERTICAL && cur_y != -mPanelSpacing)
+			|| (mOrientation == HORIZONTAL && cur_x != getRect().getWidth() + mPanelSpacing)))
+	{
+		// do another layout pass with all stacked elements contributing
+		// even those that don't usually resize
+		llassert_always(force_resize == FALSE);
+		updateLayout(TRUE);
+	}
+} // end LLLayoutStack::updateLayout
+
+
+LLLayoutStack::LLEmbeddedPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const
+{
+	if (!panelp) return NULL;
+
+	e_panel_list_t::const_iterator panel_it;
+	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
+	{
+		if ((*panel_it)->mPanel == panelp)
+		{
+			return *panel_it;
+		}
+	}
+	return NULL;
+}
+
+// Compute sum of min_width or min_height of children
+void LLLayoutStack::calcMinExtents()
+{
+	mMinWidth = 0;
+	mMinHeight = 0;
+
+	e_panel_list_t::iterator panel_it;
+	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
+	{
+		if (mOrientation == HORIZONTAL)
+		{
+			mMinHeight = llmax(	mMinHeight, 
+								(*panel_it)->mMinHeight);
+            mMinWidth += (*panel_it)->mMinWidth;
+			if (panel_it != mPanels.begin())
+			{
+				mMinWidth += mPanelSpacing;
+			}
+		}
+		else //VERTICAL
+		{
+	        mMinWidth = llmax(	mMinWidth, 
+								(*panel_it)->mMinWidth);
+			mMinHeight += (*panel_it)->mMinHeight;
+			if (panel_it != mPanels.begin())
+			{
+				mMinHeight += mPanelSpacing;
+			}
+		}
+	}
+}
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
new file mode 100644
index 0000000000..600690f67d
--- /dev/null
+++ b/indra/llui/lllayoutstack.h
@@ -0,0 +1,102 @@
+/** 
+ * @file lllayoutstack.h
+ * @author Richard Nelson
+ * @brief LLLayout class - dynamic stacking of UI elements
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLLAYOUTSTACK_H
+#define LL_LLLAYOUTSTACK_H
+
+#include "llpanel.h"
+
+class LLLayoutStack : public LLView
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Optional<std::string>	orientation;
+		Optional<S32>			border_size;
+		// mMinWidth and mMinHeight are calculated, not set in XML
+
+		Params();
+	};
+
+	typedef enum e_layout_orientation
+	{
+		HORIZONTAL,
+		VERTICAL
+	} ELayoutOrientation;
+
+	virtual ~LLLayoutStack();
+
+	/*virtual*/ void draw();
+	/*virtual*/ void removeChild(LLView*);
+	/*virtual*/ BOOL postBuild();
+
+	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL);
+
+	S32 getMinWidth() const { return mMinWidth; }
+	S32 getMinHeight() const { return mMinHeight; }
+	
+	typedef enum e_animate
+	{
+		NO_ANIMATE,
+		ANIMATE
+	} EAnimate;
+
+	void addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize, EAnimate animate = NO_ANIMATE, S32 index = S32_MAX);
+	void removePanel(LLPanel* panel);
+	void collapsePanel(LLPanel* panel, BOOL collapsed = TRUE);
+	S32 getNumPanels() { return mPanels.size(); }
+
+protected:
+	LLLayoutStack(const Params&);
+	friend class LLUICtrlFactory;
+
+private:
+	struct LLEmbeddedPanel;
+
+	void updateLayout(BOOL force_resize = FALSE);
+	void calcMinExtents();
+	S32 getDefaultHeight(S32 cur_height);
+	S32 getDefaultWidth(S32 cur_width);
+
+	const ELayoutOrientation mOrientation;
+
+	typedef std::vector<LLEmbeddedPanel*> e_panel_list_t;
+	e_panel_list_t mPanels;
+	LLEmbeddedPanel* findEmbeddedPanel(LLPanel* panelp) const;
+
+	S32 mMinWidth;  // calculated by calcMinExtents
+	S32 mMinHeight;  // calculated by calcMinExtents
+	S32 mPanelSpacing;
+}; // end class LLLayoutStack
+
+#endif
diff --git a/indra/llui/lllazyvalue.h b/indra/llui/lllazyvalue.h
new file mode 100644
index 0000000000..da0af6f522
--- /dev/null
+++ b/indra/llui/lllazyvalue.h
@@ -0,0 +1,83 @@
+/** 
+ * @file lllazyvalue.h
+ * @brief generic functor/value abstraction for lazy evaluation of a value
+ * parsing construction parameters from xml and LLSD
+ *
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LAZY_VALUE_H
+#define LL_LAZY_VALUE_H
+
+#include <boost/function.hpp>
+
+// Holds on to a value of type T *or* calls a functor to generate a value of type T
+template<typename T>
+class LLLazyValue
+{
+public:
+	typedef typename boost::add_reference<typename boost::add_const<T>::type>::type	T_const_ref;
+	typedef typename boost::function<T_const_ref (void)>							function_type;
+
+public:
+	LLLazyValue(const function_type& value) 
+	:	mValueGetter(value)
+	{} 
+	LLLazyValue(T_const_ref value)
+	:	mValue(value)
+	{}
+	LLLazyValue()
+	:	mValue()
+	{}
+
+	void set(const LLLazyValue& val)
+	{
+		mValueGetter = val.mValueGetter;
+	}
+
+	void set(T_const_ref val)
+	{
+		mValue = val;
+		mValueGetter = NULL;
+	}
+
+	T_const_ref get() const
+	{
+		if (!mValueGetter.empty())
+		{
+			return mValueGetter();
+		}
+		return mValue;
+	}
+
+private:
+	function_type	mValueGetter;
+	T				mValue;
+};
+
+#endif // LL_LAZY_VALUE_H
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 964254d93f..c03ef7968f 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -34,6 +34,8 @@
 
 #include "linden_common.h"
  
+#define INSTANTIATE_GETCHILD_LINEEDITOR
+
 #include "lllineeditor.h"
 
 #include "lltexteditor.h"
@@ -64,79 +66,102 @@
 // Constants
 //
 
-const S32	UI_LINEEDITOR_CURSOR_THICKNESS = 2;
-const S32	UI_LINEEDITOR_H_PAD = 2;
-const S32	UI_LINEEDITOR_V_PAD = 1;
 const F32	CURSOR_FLASH_DELAY = 1.0f;  // in seconds
 const S32	SCROLL_INCREMENT_ADD = 0;	// make space for typing
 const S32   SCROLL_INCREMENT_DEL = 4;	// make space for baskspacing
 const F32   AUTO_SCROLL_TIME = 0.05f;
 
-const F32	PREEDIT_MARKER_BRIGHTNESS = 0.4f;
-const S32	PREEDIT_MARKER_GAP = 1;
-const S32	PREEDIT_MARKER_POSITION = 2;
-const S32	PREEDIT_MARKER_THICKNESS = 1;
-const F32	PREEDIT_STANDOUT_BRIGHTNESS = 0.6f;
-const S32	PREEDIT_STANDOUT_GAP = 1;
-const S32	PREEDIT_STANDOUT_POSITION = 2;
-const S32	PREEDIT_STANDOUT_THICKNESS = 2;
-
 static LLRegisterWidget<LLLineEditor> r1("line_editor");
 
-/* static */ LLPointer<LLUIImage> LLLineEditor::sImage;
+template LLLineEditor* LLView::getChild<LLLineEditor>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
 
 //
 // Member functions
 //
- 
-LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
-						   const std::string& default_text, const LLFontGL* font,
-						   S32 max_length_bytes,
-						   void (*commit_callback)(LLUICtrl* caller, void* user_data ),
-						   void (*keystroke_callback)(LLLineEditor* caller, void* user_data ),
-						   void (*focus_lost_callback)(LLFocusableElement* caller, void* user_data ),
-						   void* userdata,
-						   LLLinePrevalidateFunc prevalidate_func,
-						   LLViewBorder::EBevel border_bevel,
-						   LLViewBorder::EStyle border_style,
-						   S32 border_thickness)
-	:
-		LLUICtrl( name, rect, TRUE, commit_callback, userdata, FOLLOWS_TOP | FOLLOWS_LEFT ),
-		mMaxLengthBytes(max_length_bytes),
-		mCursorPos( 0 ),
-		mScrollHPos( 0 ),
-		mTextPadLeft(0),
-		mTextPadRight(0),
-		mCommitOnFocusLost( TRUE ),
-		mRevertOnEsc( TRUE ),
-		mKeystrokeCallback( keystroke_callback ),
-		mIsSelecting( FALSE ),
-		mSelectionStart( 0 ),
-		mSelectionEnd( 0 ),
-		mLastSelectionX(-1),
-		mLastSelectionY(-1),
-		mLastSelectionStart(-1),
-		mLastSelectionEnd(-1),
-		mPrevalidateFunc( prevalidate_func ),
-		mCursorColor(		LLUI::sColorsGroup->getColor( "TextCursorColor" ) ),
-		mFgColor(			LLUI::sColorsGroup->getColor( "TextFgColor" ) ),
-		mReadOnlyFgColor(	LLUI::sColorsGroup->getColor( "TextFgReadOnlyColor" ) ),
-		mTentativeFgColor(	LLUI::sColorsGroup->getColor( "TextFgTentativeColor" ) ),
-		mWriteableBgColor(	LLUI::sColorsGroup->getColor( "TextBgWriteableColor" ) ),
-		mReadOnlyBgColor(	LLUI::sColorsGroup->getColor( "TextBgReadOnlyColor" ) ),
-		mFocusBgColor(		LLUI::sColorsGroup->getColor( "TextBgFocusColor" ) ),
-		mBorderThickness( border_thickness ),
-		mIgnoreArrowKeys( FALSE ),
-		mIgnoreTab( TRUE ),
-		mDrawAsterixes( FALSE ),
-		mHandleEditKeysDirectly( FALSE ),
-		mSelectAllonFocusReceived( FALSE ),
-		mPassDelete(FALSE),
-		mReadOnly(FALSE),
-		mImage( sImage ),
-		mReplaceNewlinesWithSpaces( TRUE )
-{
-	llassert( max_length_bytes > 0 );
+
+void LLLineEditor::PrevalidateNamedFuncs::declareValues()
+{
+	declare("ascii", LLLineEditor::prevalidateASCII);
+	declare("float", LLLineEditor::prevalidateFloat);
+	declare("int", LLLineEditor::prevalidateInt);
+	declare("positive_s32", LLLineEditor::prevalidatePositiveS32);
+	declare("non_negative_s32", LLLineEditor::prevalidateNonNegativeS32);
+	declare("alpha_num", LLLineEditor::prevalidateAlphaNum);
+	declare("alpha_num_space", LLLineEditor::prevalidateAlphaNumSpace);
+	declare("printable_not_pipe", LLLineEditor::prevalidatePrintableNotPipe);
+	declare("printable_no_space", LLLineEditor::prevalidatePrintableNoSpace);
+}
+
+LLLineEditor::Params::Params()
+:	max_length_bytes("max_length", 254),
+	background_image("background_image"),
+	select_on_focus("select_on_focus", false),
+	handle_edit_keys_directly("handle_edit_keys_directly", false),
+	commit_on_focus_lost("commit_on_focus_lost", true),
+	ignore_tab("ignore_tab", true),
+	cursor_color("cursor_color"),
+	text_color("text_color"),
+	text_readonly_color("text_readonly_color"),
+	text_tentative_color("text_tentative_color"),
+	bg_readonly_color("bg_readonly_color"),
+	bg_writeable_color("bg_writeable_color"),
+	bg_focus_color("bg_focus_color"),
+	border(""),
+	is_unicode("is_unicode"),
+	drop_shadow_visible("drop_shadow_visible"),
+	border_drop_shadow_visible("border_drop_shadow_visible"),
+	bg_visible("bg_visible"),
+	text_pad_left("text_pad_left"),
+	text_pad_right("text_pad_right"),
+	default_text("default_text")
+{
+	mouse_opaque = true;
+	addSynonym(select_on_focus, "select_all_on_focus_received");
+	addSynonym(border, "border");
+}
+
+LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
+:	LLUICtrl(p),
+	mMaxLengthBytes(p.max_length_bytes),
+	mCursorPos( 0 ),
+	mScrollHPos( 0 ),
+	mTextPadLeft(p.text_pad_left),
+	mTextPadRight(p.text_pad_right),
+	mCommitOnFocusLost( p.commit_on_focus_lost ),
+	mRevertOnEsc( TRUE ),
+	mKeystrokeCallback( p.keystroke_callback() ),
+	mIsSelecting( FALSE ),
+	mSelectionStart( 0 ),
+	mSelectionEnd( 0 ),
+	mLastSelectionX(-1),
+	mLastSelectionY(-1),
+	mLastSelectionStart(-1),
+	mLastSelectionEnd(-1),
+	mBorderThickness( 0 ),
+	mIgnoreArrowKeys( FALSE ),
+	mIgnoreTab( p.ignore_tab ),
+	mDrawAsterixes( FALSE ),
+	mHandleEditKeysDirectly(p.handle_edit_keys_directly),
+	mSelectAllonFocusReceived( p.select_on_focus ),
+	mPassDelete(FALSE),
+	mReadOnly(FALSE),
+	mImage( NULL ),
+	mReplaceNewlinesWithSpaces( TRUE ),
+	mLabel(p.label),
+	mCursorColor(p.cursor_color()),
+	mFgColor(p.text_color()),
+	mReadOnlyFgColor(p.text_readonly_color()),
+	mTentativeFgColor(p.text_tentative_color()),
+	mWriteableBgColor(p.bg_writeable_color()),
+	mReadOnlyBgColor(p.bg_readonly_color()),
+	mFocusBgColor(p.bg_focus_color()),
+	mGLFont(p.font),
+	mGLFontStyle(LLFontGL::getStyleFromString(p.font.style))
+{
+	llassert( mMaxLengthBytes > 0 );
+
+	mScrollTimer.reset();
+	setText(p.default_text());
 
 	// line history support:
 	// - initialize line history list
@@ -146,40 +171,24 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
 	// - reset current history line pointer
 	mCurrentHistoryLine = 0;
 
-	if (font)
-	{
-		mGLFont = font;
-	}
-	else
-	{
-		mGLFont = LLFontGL::getFontSansSerifSmall();
-	}
-
-	setFocusLostCallback(focus_lost_callback);
-
-	setTextPadding(0, 0);
-
-	mScrollTimer.reset();
+	LLRect border_rect(getLocalRect());
+	// adjust for gl line drawing glitch
+	border_rect.mTop -= 1;
+	border_rect.mRight -=1;
+	LLViewBorder::Params border_p(p.border);
+	border_p.rect = border_rect;
+	border_p.follows.flags = FOLLOWS_ALL;
+	border_p.bevel_type = LLViewBorder::BEVEL_IN;
+	mBorder = LLUICtrlFactory::create<LLViewBorder>(border_p);
+	addChild( mBorder );
 
-	setText(default_text);
-	
+	// clamp text padding to current editor size
+	updateTextPadding();
 	setCursor(mText.length());
 
-	// Scalable UI somehow made these rectangles off-by-one.
-	// I don't know why. JC
-	LLRect border_rect(0, getRect().getHeight()-1, getRect().getWidth()-1, 0);
-	mBorder = new LLViewBorder( std::string("line ed border"), border_rect, border_bevel, border_style, mBorderThickness );
-	addChild( mBorder );
-	mBorder->setFollows(FOLLOWS_LEFT|FOLLOWS_RIGHT|FOLLOWS_TOP|FOLLOWS_BOTTOM);
-
-	if( ! sImage)
-	{
-		sImage = LLUI::getUIImage("sm_rounded_corners_simple.tga");
-	}
-	mImage = sImage;
+	setPrevalidate(p.prevalidate_callback());
 }
-
-
+ 
 LLLineEditor::~LLLineEditor()
 {
 	mCommitOnFocusLost = FALSE;
@@ -227,6 +236,7 @@ void LLLineEditor::onCommit()
 	// put current line into the line history
 	updateHistory();
 
+	setControlValue(getValue());
 	LLUICtrl::onCommit();
 	selectAll();
 }
@@ -255,7 +265,7 @@ void LLLineEditor::updateHistory()
 void LLLineEditor::reshape(S32 width, S32 height, BOOL called_from_parent)
 {
 	LLUICtrl::reshape(width, height, called_from_parent);
-	setTextPadding(mTextPadLeft, mTextPadRight); // For clamping side-effect.
+	updateTextPadding(); // For clamping side-effect.
 	setCursor(mCursorPos); // For clamping side-effect.
 }
 
@@ -273,11 +283,12 @@ void LLLineEditor::setMaxTextLength(S32 max_text_length)
 	mMaxLengthBytes = max_len;
 } 
 
-void LLLineEditor::setTextPadding(S32 left, S32 right)
+void LLLineEditor::updateTextPadding()
 {
-	mTextPadLeft = llclamp(left, 0, getRect().getWidth());
-	mTextPadRight = llclamp(right, 0, getRect().getWidth());
-	mMinHPixels = UI_LINEEDITOR_H_PAD + mTextPadLeft;
+	static LLUICachedControl<S32> line_editor_hpad ("UILineEditorHPad", 0);
+	mTextPadLeft = llclamp(mTextPadLeft, 0, getRect().getWidth());
+	mTextPadRight = llclamp(mTextPadRight, 0, getRect().getWidth());
+	mMinHPixels = line_editor_hpad + mTextPadLeft;
 	mMaxHPixels = getRect().getWidth() - mMinHPixels - mTextPadRight;
 }
 
@@ -362,7 +373,7 @@ void LLLineEditor::setCursor( S32 pos )
 	{
 		S32 width_chars_to_left = mGLFont->getWidth(mText.getWString().c_str(), 0, mScrollHPos);
 		S32 last_visible_char = mGLFont->maxDrawableChars(mText.getWString().c_str(), llmax(0.f, (F32)(mMaxHPixels - mMinHPixels + width_chars_to_left))); 
-		S32 min_scroll = mGLFont->firstDrawableChar(mText.getWString().c_str(), (F32)(mMaxHPixels - mMinHPixels - UI_LINEEDITOR_CURSOR_THICKNESS - UI_LINEEDITOR_H_PAD), mText.length(), getCursor());
+		S32 min_scroll = mGLFont->firstDrawableChar(mText.getWString().c_str(), (F32)(mMaxHPixels - mMinHPixels), mText.length(), getCursor());
 		if (old_cursor_pos == last_visible_char)
 		{
 			mScrollHPos = llmin(mText.length(), llmax(min_scroll, mScrollHPos + SCROLL_INCREMENT_ADD));
@@ -936,7 +947,7 @@ void LLLineEditor::cut()
 		else
 		if( mKeystrokeCallback )
 		{
-			mKeystrokeCallback( this, mCallbackUserData );
+			mKeystrokeCallback( this );
 		}
 	}
 }
@@ -1057,7 +1068,7 @@ void LLLineEditor::pasteHelper(bool is_primary)
 			else
 			if( mKeystrokeCallback )
 			{
-				mKeystrokeCallback( this, mCallbackUserData );
+				mKeystrokeCallback( this );
 			}
 		}
 	}
@@ -1370,7 +1381,7 @@ BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask )
 			{
 				if (mKeystrokeCallback)
 				{
-					mKeystrokeCallback(this, mCallbackUserData);
+					mKeystrokeCallback(this);
 				}
 			}
 		}
@@ -1420,7 +1431,7 @@ BOOL LLLineEditor::handleUnicodeCharHere(llwchar uni_char)
 			{
 				// HACK! The only usage of this callback doesn't do anything with the character.
 				// We'll have to do something about this if something ever changes! - Doug
-				mKeystrokeCallback( this, mCallbackUserData );
+				mKeystrokeCallback( this );
 			}
 		}
 	}
@@ -1461,7 +1472,7 @@ void LLLineEditor::doDelete()
 		{
 			if( mKeystrokeCallback )
 			{
-				mKeystrokeCallback( this, mCallbackUserData );
+				mKeystrokeCallback( this );
 			}
 		}
 	}
@@ -1471,6 +1482,16 @@ void LLLineEditor::doDelete()
 void LLLineEditor::draw()
 {
 	S32 text_len = mText.length();
+	static LLUICachedControl<S32> lineeditor_cursor_thickness ("UILineEditorCursorThickness", 0);
+	static LLUICachedControl<S32> lineeditor_v_pad ("UILineEditorVPad", 0);
+	static LLUICachedControl<F32> preedit_marker_brightness ("UIPreeditMarkerBrightness", 0);
+	static LLUICachedControl<S32> preedit_marker_gap ("UIPreeditMarkerGap", 0);
+	static LLUICachedControl<S32> preedit_marker_position ("UIPreeditMarkerPosition", 0);
+	static LLUICachedControl<S32> preedit_marker_thickness ("UIPreeditMarkerThickness", 0);
+	static LLUICachedControl<F32> preedit_standout_brightness ("UIPreeditStandoutBrightness", 0);
+	static LLUICachedControl<S32> preedit_standout_gap ("UIPreeditStandoutGap", 0);
+	static LLUICachedControl<S32> preedit_standout_position ("UIPreeditStandoutPosition", 0);
+	static LLUICachedControl<S32> preedit_standout_thickness ("UIPreeditStandoutThickness", 0);
 
 	std::string saved_text;
 	if (mDrawAsterixes)
@@ -1488,7 +1509,7 @@ void LLLineEditor::draw()
 	LLRect background( 0, getRect().getHeight(), getRect().getWidth(), 0 );
 	background.stretch( -mBorderThickness );
 
-	LLColor4 bg_color = mReadOnlyBgColor;
+	LLColor4 bg_color = mReadOnlyBgColor.get();
 
 #if 0 // for when we're ready for image art.
 	if( hasFocus())
@@ -1505,11 +1526,11 @@ void LLLineEditor::draw()
 		{
 			if( gFocusMgr.getKeyboardFocus() == this )
 			{
-				bg_color = mFocusBgColor;
+				bg_color = mFocusBgColor.get();
 			}
 			else
 			{
-				bg_color = mWriteableBgColor;
+				bg_color = mWriteableBgColor.get();
 			}
 		}
 		gl_rect_2d(background, bg_color);
@@ -1526,18 +1547,18 @@ void LLLineEditor::draw()
 	{
 		if (!getTentative())
 		{
-			text_color = mFgColor;
+			text_color = mFgColor.get();
 		}
 		else
 		{
-			text_color = mTentativeFgColor;
+			text_color = mTentativeFgColor.get();
 		}
 	}
 	else
 	{
-		text_color = mReadOnlyFgColor;
+		text_color = mReadOnlyFgColor.get();
 	}
-	LLColor4 label_color = mTentativeFgColor;
+	LLColor4 label_color = mTentativeFgColor.get();
 
 	if (hasPreeditString())
 	{
@@ -1556,19 +1577,19 @@ void LLLineEditor::draw()
 				}
 				if (mPreeditStandouts[i])
 				{
-					gl_rect_2d(preedit_pixels_left + PREEDIT_STANDOUT_GAP,
-						background.mBottom + PREEDIT_STANDOUT_POSITION,
-						preedit_pixels_right - PREEDIT_STANDOUT_GAP - 1,
-						background.mBottom + PREEDIT_STANDOUT_POSITION - PREEDIT_STANDOUT_THICKNESS,
-						(text_color * PREEDIT_STANDOUT_BRIGHTNESS + bg_color * (1 - PREEDIT_STANDOUT_BRIGHTNESS)).setAlpha(1.0f));
+					gl_rect_2d(preedit_pixels_left + preedit_standout_gap,
+						background.mBottom + preedit_standout_position,
+						preedit_pixels_right - preedit_standout_gap - 1,
+						background.mBottom + preedit_standout_position - preedit_standout_thickness,
+						(text_color * preedit_standout_brightness + bg_color * (1 - preedit_standout_brightness)).setAlpha(1.0f));
 				}
 				else
 				{
-					gl_rect_2d(preedit_pixels_left + PREEDIT_MARKER_GAP,
-						background.mBottom + PREEDIT_MARKER_POSITION,
-						preedit_pixels_right - PREEDIT_MARKER_GAP - 1,
-						background.mBottom + PREEDIT_MARKER_POSITION - PREEDIT_MARKER_THICKNESS,
-						(text_color * PREEDIT_MARKER_BRIGHTNESS + bg_color * (1 - PREEDIT_MARKER_BRIGHTNESS)).setAlpha(1.0f));
+					gl_rect_2d(preedit_pixels_left + preedit_marker_gap,
+						background.mBottom + preedit_marker_position,
+						preedit_pixels_right - preedit_marker_gap - 1,
+						background.mBottom + preedit_marker_position - preedit_marker_thickness,
+						(text_color * preedit_marker_brightness + bg_color * (1 - preedit_marker_brightness)).setAlpha(1.0f));
 				}
 			}
 		}
@@ -1576,7 +1597,7 @@ void LLLineEditor::draw()
 
 	S32 rendered_text = 0;
 	F32 rendered_pixels_right = (F32)mMinHPixels;
-	F32 text_bottom = (F32)background.mBottom + (F32)UI_LINEEDITOR_V_PAD;
+	F32 text_bottom = (F32)background.mBottom + (F32)lineeditor_v_pad;
 
 	if( (gFocusMgr.getKeyboardFocus() == this) && hasSelection() )
 	{
@@ -1601,7 +1622,8 @@ void LLLineEditor::draw()
 				rendered_pixels_right, text_bottom,
 				text_color,
 				LLFontGL::LEFT, LLFontGL::BOTTOM,
-				LLFontGL::NORMAL,
+				mGLFontStyle,
+				LLFontGL::NO_SHADOW,
 				select_left - mScrollHPos,
 				mMaxHPixels - llround(rendered_pixels_right),
 				&rendered_pixels_right);
@@ -1620,7 +1642,8 @@ void LLLineEditor::draw()
 				rendered_pixels_right, text_bottom,
 				LLColor4( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], 1 ),
 				LLFontGL::LEFT, LLFontGL::BOTTOM,
-				LLFontGL::NORMAL,
+				mGLFontStyle,
+				LLFontGL::NO_SHADOW,
 				select_right - mScrollHPos - rendered_text,
 				mMaxHPixels - llround(rendered_pixels_right),
 				&rendered_pixels_right);
@@ -1634,7 +1657,8 @@ void LLLineEditor::draw()
 				rendered_pixels_right, text_bottom,
 				text_color,
 				LLFontGL::LEFT, LLFontGL::BOTTOM,
-				LLFontGL::NORMAL,
+				mGLFontStyle,
+				LLFontGL::NO_SHADOW,
 				S32_MAX,
 				mMaxHPixels - llround(rendered_pixels_right),
 				&rendered_pixels_right);
@@ -1647,7 +1671,8 @@ void LLLineEditor::draw()
 			rendered_pixels_right, text_bottom,
 			text_color,
 			LLFontGL::LEFT, LLFontGL::BOTTOM,
-			LLFontGL::NORMAL,
+			mGLFontStyle,
+			LLFontGL::NO_SHADOW,
 			S32_MAX,
 			mMaxHPixels - llround(rendered_pixels_right),
 			&rendered_pixels_right);
@@ -1667,8 +1692,8 @@ void LLLineEditor::draw()
 			if( (elapsed < CURSOR_FLASH_DELAY ) || (S32(elapsed * 2) & 1) )
 			{
 				S32 cursor_left = findPixelNearestPos();
-				cursor_left -= UI_LINEEDITOR_CURSOR_THICKNESS / 2;
-				S32 cursor_right = cursor_left + UI_LINEEDITOR_CURSOR_THICKNESS;
+				cursor_left -= lineeditor_cursor_thickness / 2;
+				S32 cursor_right = cursor_left + lineeditor_cursor_thickness;
 				if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode() && !hasSelection())
 				{
 					const LLWString space(utf8str_to_wstring(std::string(" ")));
@@ -1681,17 +1706,18 @@ void LLLineEditor::draw()
 					cursor_right, cursor_bottom, text_color);
 				if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode() && !hasSelection())
 				{
-					mGLFont->render(mText, getCursor(), (F32)(cursor_left + UI_LINEEDITOR_CURSOR_THICKNESS / 2), text_bottom, 
+					mGLFont->render(mText, getCursor(), (F32)(cursor_left + lineeditor_cursor_thickness / 2), text_bottom, 
 						LLColor4( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], 1 ),
 						LLFontGL::LEFT, LLFontGL::BOTTOM,
-						LLFontGL::NORMAL,
+						mGLFontStyle,
+						LLFontGL::NO_SHADOW,
 						1);
 				}
 
 				// Make sure the IME is in the right place
 				S32 pixels_after_scroll = findPixelNearestPos();	// RCalculcate for IME position
-				LLRect screen_pos = getScreenRect();
-				LLCoordGL ime_pos( screen_pos.mLeft + pixels_after_scroll, screen_pos.mTop - UI_LINEEDITOR_V_PAD );
+				LLRect screen_pos = calcScreenRect();
+				LLCoordGL ime_pos( screen_pos.mLeft + pixels_after_scroll, screen_pos.mTop - lineeditor_v_pad );
 
 				ime_pos.mX = (S32) (ime_pos.mX * LLUI::sGLScaleFactor.mV[VX]);
 				ime_pos.mY = (S32) (ime_pos.mY * LLUI::sGLScaleFactor.mV[VY]);
@@ -1709,7 +1735,8 @@ void LLLineEditor::draw()
 							label_color,
 							LLFontGL::LEFT,
 							LLFontGL::BOTTOM,
-							LLFontGL::NORMAL,
+							mGLFontStyle,
+							LLFontGL::NO_SHADOW,
 							S32_MAX,
 							mMaxHPixels - llround(rendered_pixels_right),
 							&rendered_pixels_right, FALSE);
@@ -1733,7 +1760,8 @@ void LLLineEditor::draw()
 							label_color,
 							LLFontGL::LEFT,
 							LLFontGL::BOTTOM,
-							LLFontGL::NORMAL,
+							mGLFontStyle,
+							LLFontGL::NO_SHADOW,
 							S32_MAX,
 							mMaxHPixels - llround(rendered_pixels_right),
 							&rendered_pixels_right, FALSE);
@@ -1849,7 +1877,7 @@ void LLLineEditor::setRect(const LLRect& rect)
 	}
 }
 
-void LLLineEditor::setPrevalidate(BOOL (*func)(const LLWString &))
+void LLLineEditor::setPrevalidate(LLLinePrevalidateFunc func)
 {
 	mPrevalidateFunc = func;
 	updateAllowingLanguageInput();
@@ -2169,244 +2197,11 @@ void LLLineEditor::setSelectAllonFocusReceived(BOOL b)
 }
 
 
-void LLLineEditor::setKeystrokeCallback(void (*keystroke_callback)(LLLineEditor* caller, void* user_data))
-{
-	mKeystrokeCallback = keystroke_callback;
-}
-
-// virtual
-LLXMLNodePtr LLLineEditor::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("max_length", TRUE)->setIntValue(mMaxLengthBytes);
-
-	node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mGLFont));
-
-	if (mBorder)
-	{
-		std::string bevel;
-		switch(mBorder->getBevel())
-		{
-		default:
-		case LLViewBorder::BEVEL_NONE:	bevel = "none"; break;
-		case LLViewBorder::BEVEL_IN:	bevel = "in"; break;
-		case LLViewBorder::BEVEL_OUT:	bevel = "out"; break;
-		case LLViewBorder::BEVEL_BRIGHT:bevel = "bright"; break;
-		}
-		node->createChild("bevel_style", TRUE)->setStringValue(bevel);
-
-		std::string style;
-		switch(mBorder->getStyle())
-		{
-		default:
-		case LLViewBorder::STYLE_LINE:		style = "line"; break;
-		case LLViewBorder::STYLE_TEXTURE:	style = "texture"; break;
-		}
-		node->createChild("border_style", TRUE)->setStringValue(style);
-
-		node->createChild("border_thickness", TRUE)->setIntValue(mBorder->getBorderWidth());
-	}
-
-	if (!mLabel.empty())
-	{
-		node->createChild("label", TRUE)->setStringValue(mLabel.getString());
-	}
-
-	node->createChild("select_all_on_focus_received", TRUE)->setBoolValue(mSelectAllonFocusReceived);
-
-	node->createChild("handle_edit_keys_directly", TRUE)->setBoolValue(mHandleEditKeysDirectly );
-
-	addColorXML(node, mCursorColor, "cursor_color", "TextCursorColor");
-	addColorXML(node, mFgColor, "text_color", "TextFgColor");
-	addColorXML(node, mReadOnlyFgColor, "text_readonly_color", "TextFgReadOnlyColor");
-	addColorXML(node, mTentativeFgColor, "text_tentative_color", "TextFgTentativeColor");
-	addColorXML(node, mReadOnlyBgColor, "bg_readonly_color", "TextBgReadOnlyColor");
-	addColorXML(node, mWriteableBgColor, "bg_writeable_color", "TextBgWriteableColor");
-	addColorXML(node, mFocusBgColor, "bg_focus_color", "TextBgFocusColor");
-
-	node->createChild("select_on_focus", TRUE)->setBoolValue(mSelectAllonFocusReceived );
-
-	return node;
-}
-
-// static
-LLView* LLLineEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("line_editor");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	S32 max_text_length = 128;
-	node->getAttributeS32("max_length", max_text_length);
-
-	LLFontGL* font = LLView::selectFont(node);
-
-	std::string text = node->getTextContents().substr(0, max_text_length - 1);
-
-	LLViewBorder::EBevel bevel_style = LLViewBorder::BEVEL_IN;
-	LLViewBorder::getBevelFromAttribute(node, bevel_style);
-	
-	LLViewBorder::EStyle border_style = LLViewBorder::STYLE_LINE;
-	std::string border_string;
-	node->getAttributeString("border_style", border_string);
-	LLStringUtil::toLower(border_string);
-
-	if (border_string == "texture")
-	{
-		border_style = LLViewBorder::STYLE_TEXTURE;
-	}
-
-	S32 border_thickness = 1;
-	node->getAttributeS32("border_thickness", border_thickness);
-
-	LLUICtrlCallback commit_callback = NULL;
-
-	LLLineEditor* line_editor = new LLLineEditor(name,
-								rect, 
-								text, 
-								font,
-								max_text_length,
-								commit_callback,
-								NULL,
-								NULL,
-								NULL,
-								NULL,
-								bevel_style,
-								border_style,
-								border_thickness);
-
-	std::string label;
-	if(node->getAttributeString("label", label))
-	{
-		line_editor->setLabel(label);
-	}
-	BOOL select_all_on_focus_received = FALSE;
-	if (node->getAttributeBOOL("select_all_on_focus_received", select_all_on_focus_received))
-	{
-		line_editor->setSelectAllonFocusReceived(select_all_on_focus_received);
-	}
-	BOOL handle_edit_keys_directly = FALSE;
-	if (node->getAttributeBOOL("handle_edit_keys_directly", handle_edit_keys_directly))
-	{
-		line_editor->setHandleEditKeysDirectly(handle_edit_keys_directly);
-	}
-	BOOL commit_on_focus_lost = TRUE;
-	if (node->getAttributeBOOL("commit_on_focus_lost", commit_on_focus_lost))
-	{
-		line_editor->setCommitOnFocusLost(commit_on_focus_lost);
-	}
-	
-	line_editor->setColorParameters(node);
-	
-	if(node->hasAttribute("select_on_focus"))
-	{
-		BOOL selectall = FALSE;
-		node->getAttributeBOOL("select_on_focus", selectall);
-		line_editor->setSelectAllonFocusReceived(selectall);
-	}
-
-	std::string prevalidate;
-	if(node->getAttributeString("prevalidate", prevalidate))
-	{
-		LLStringUtil::toLower(prevalidate);
-
-		if ("ascii" == prevalidate)
-		{
-			line_editor->setPrevalidate( LLLineEditor::prevalidateASCII );
-		}
-		else if ("float" == prevalidate)
-		{
-			line_editor->setPrevalidate( LLLineEditor::prevalidateFloat );
-		}
-		else if ("int" == prevalidate)
-		{
-			line_editor->setPrevalidate( LLLineEditor::prevalidateInt );
-		}
-		else if ("positive_s32" == prevalidate)
-		{
-			line_editor->setPrevalidate( LLLineEditor::prevalidatePositiveS32 );
-		}
-		else if ("non_negative_s32" == prevalidate)
-		{
-			line_editor->setPrevalidate( LLLineEditor::prevalidateNonNegativeS32 );
-		}
-		else if ("alpha_num" == prevalidate)
-		{
-			line_editor->setPrevalidate( LLLineEditor::prevalidateAlphaNum );
-		}
-		else if ("alpha_num_space" == prevalidate)
-		{
-			line_editor->setPrevalidate( LLLineEditor::prevalidateAlphaNumSpace );
-		}
-		else if ("printable_not_pipe" == prevalidate)
-		{
-			line_editor->setPrevalidate( LLLineEditor::prevalidatePrintableNotPipe );
-		}
-		else if ("printable_no_space" == prevalidate)
-		{
-			line_editor->setPrevalidate( LLLineEditor::prevalidatePrintableNoSpace );
-		}
-	}
-	
-	line_editor->initFromXML(node, parent);
-	
-	return line_editor;
-}
-
-//static
-void LLLineEditor::cleanupLineEditor()
-{
-	sImage = NULL;
-}
-
-/* static */ 
-LLPointer<LLUIImage> LLLineEditor::parseImage(std::string name, LLXMLNodePtr from, LLPointer<LLUIImage> def)
+void LLLineEditor::setKeystrokeCallback(callback_t callback, void* user_data)
 {
-	std::string xml_name;
-	if (from->hasAttribute(name.c_str())) from->getAttributeString(name.c_str(), xml_name);
-	if (xml_name == LLStringUtil::null) return def;
-	LLPointer<LLUIImage> image = LLUI::getUIImage(xml_name);
-	return image.isNull() ? def : image;
+	mKeystrokeCallback = boost::bind(callback, _1, user_data);
 }
 
-void LLLineEditor::setColorParameters(LLXMLNodePtr node)
-{
-	// overrides default image if supplied.
-	mImage = parseImage(std::string("image"), node, mImage);
-
-	LLColor4 color;
-	if (LLUICtrlFactory::getAttributeColor(node,"cursor_color", color)) 
-	{
-		setCursorColor(color);
-	}
-	if(node->hasAttribute("text_color"))
-	{
-		LLUICtrlFactory::getAttributeColor(node,"text_color", color);
-		setFgColor(color);
-	}
-	if(node->hasAttribute("text_readonly_color"))
-	{
-		LLUICtrlFactory::getAttributeColor(node,"text_readonly_color", color);
-		setReadOnlyFgColor(color);
-	}
-	if (LLUICtrlFactory::getAttributeColor(node,"text_tentative_color", color))
-	{
-		setTentativeFgColor(color);
-	}
-	if(node->hasAttribute("bg_readonly_color"))
-	{
-		LLUICtrlFactory::getAttributeColor(node,"bg_readonly_color", color);
-		setReadOnlyBgColor(color);
-	}
-	if(node->hasAttribute("bg_writeable_color"))
-	{
-		LLUICtrlFactory::getAttributeColor(node,"bg_writeable_color", color);
-		setWriteableBgColor(color);
-	}
-}
 
 BOOL LLLineEditor::setTextArg( const std::string& key, const LLStringExplicit& text )
 {
@@ -2429,13 +2224,19 @@ void LLLineEditor::updateAllowingLanguageInput()
 	// fine on 1.15.0.2, since all prevalidate func reject any
 	// non-ASCII characters.  I'm not sure on future versions,
 	// however...
+	LLWindow* window = getWindow();
+	if (!window)
+	{
+		// test app, no window available
+		return;	
+	}
 	if (hasFocus() && !mReadOnly && !mDrawAsterixes && mPrevalidateFunc == NULL)
 	{
-		getWindow()->allowLanguageTextInput(this, TRUE);
+		window->allowLanguageTextInput(this, TRUE);
 	}
 	else
 	{
-		getWindow()->allowLanguageTextInput(this, FALSE);
+		window->allowLanguageTextInput(this, FALSE);
 	}
 }
 
@@ -2513,7 +2314,7 @@ void LLLineEditor::updatePreedit(const LLWString &preedit_string,
 	mKeystrokeTimer.reset();
 	if( mKeystrokeCallback )
 	{
-		mKeystrokeCallback( this, mCallbackUserData );
+		mKeystrokeCallback( this );
 	}
 }
 
@@ -2656,146 +2457,19 @@ LLWString LLLineEditor::getConvertedText() const
 	return text;
 }
 
-static LLRegisterWidget<LLSearchEditor> r2("search_editor");
-
-
-LLSearchEditor::LLSearchEditor(const std::string& name, 
-		const LLRect& rect,
-		S32 max_length_bytes,
-		void (*search_callback)(const std::string& search_string, void* user_data),
-		void* userdata)
-	: 
-		LLUICtrl(name, rect, TRUE, NULL, userdata),
-		mSearchCallback(search_callback)
-{
-	LLRect search_edit_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
-	mSearchEdit = new LLLineEditor(std::string("search edit"),
-								   search_edit_rect,
-								   LLStringUtil::null,
-								   NULL,
-								   max_length_bytes,
-								   NULL,
-								   onSearchEdit,
-								   NULL,
-								   this);
-
-	mSearchEdit->setFollowsAll();
-	mSearchEdit->setSelectAllonFocusReceived(TRUE);
-
-	addChild(mSearchEdit);
-
-	S32 btn_width = rect.getHeight(); // button is square, and as tall as search editor
-	LLRect clear_btn_rect(rect.getWidth() - btn_width, rect.getHeight(), rect.getWidth(), 0);
-	mClearSearchButton = new LLButton(std::string("clear search"), 
-								clear_btn_rect, 
-								std::string("icn_clear_lineeditor.tga"),
-								std::string("UIImgBtnCloseInactiveUUID"),
-								LLStringUtil::null,
-								onClearSearch,
-								this,
-								NULL,
-								LLStringUtil::null);
-	mClearSearchButton->setFollowsRight();
-	mClearSearchButton->setFollowsTop();
-	mClearSearchButton->setImageColor(LLUI::sColorsGroup->getColor("TextFgTentativeColor"));
-	mClearSearchButton->setTabStop(FALSE);
-	mSearchEdit->addChild(mClearSearchButton);
-
-	mSearchEdit->setTextPadding(0, btn_width);
-}
-
-
-//virtual
-void LLSearchEditor::setValue(const LLSD& value )
-{
-	mSearchEdit->setValue(value);
-}
-
-//virtual
-LLSD LLSearchEditor::getValue() const
+namespace LLInitParam
 {
-	return mSearchEdit->getValue();
-}
-
-//virtual
-BOOL LLSearchEditor::setTextArg( const std::string& key, const LLStringExplicit& text )
-{
-	return mSearchEdit->setTextArg(key, text);
-}
-
-//virtual
-BOOL LLSearchEditor::setLabelArg( const std::string& key, const LLStringExplicit& text )
-{
-	return mSearchEdit->setLabelArg(key, text);
-}
-
-//virtual
-void LLSearchEditor::clear()
-{
-	if (mSearchEdit)
+	template<>
+	bool ParamCompare<LLLinePrevalidateFunc>::equals(const LLLinePrevalidateFunc &a, const LLLinePrevalidateFunc &b)
 	{
-		mSearchEdit->clear();
+		return false;
 	}
-}
-
-void LLSearchEditor::draw()
-{
-	mClearSearchButton->setVisible(!mSearchEdit->getWText().empty());
-
-	LLUICtrl::draw();
-}
 
-
-//static
-void LLSearchEditor::onSearchEdit(LLLineEditor* caller, void* user_data )
-{
-	LLSearchEditor* search_editor = (LLSearchEditor*)user_data;
-	if (search_editor->mSearchCallback)
-	{
-		search_editor->mSearchCallback(caller->getText(), search_editor->mCallbackUserData);
-	}
-}
-
-//static
-void LLSearchEditor::onClearSearch(void* user_data)
-{
-	LLSearchEditor* search_editor = (LLSearchEditor*)user_data;
-
-	search_editor->setText(LLStringUtil::null);
-	if (search_editor->mSearchCallback)
-	{
-		search_editor->mSearchCallback(LLStringUtil::null, search_editor->mCallbackUserData);
-	}
-}
-
-// static
-LLView* LLSearchEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("search_editor");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	S32 max_text_length = 128;
-	node->getAttributeS32("max_length", max_text_length);
-
-	std::string text = node->getValue().substr(0, max_text_length - 1);
-
-	LLSearchEditor* search_editor = new LLSearchEditor(name,
-								rect, 
-								max_text_length,
-								NULL, NULL);
-
-	std::string label;
-	if(node->getAttributeString("label", label))
+	template<>
+	bool ParamCompare<boost::function<void (LLLineEditor *)> >::equals(
+		const boost::function<void (LLLineEditor *)> &a,
+		const boost::function<void (LLLineEditor *)> &b)
 	{
-		search_editor->mSearchEdit->setLabel(label);
+		return false;
 	}
-	
-	search_editor->setText(text);
-
-	search_editor->initFromXML(node, parent);
-	
-	return search_editor;
 }
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index fc5fcc5b90..4c2a9b77b2 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -51,39 +51,71 @@
 #include "llviewborder.h"
 
 #include "llpreeditor.h"
+#include <boost/function.hpp>
 
 class LLFontGL;
 class LLLineEditorRollback;
 class LLButton;
 
-typedef BOOL (*LLLinePrevalidateFunc)(const LLWString &wstr);
-
+typedef boost::function<BOOL (const LLWString &wstr)> LLLinePrevalidateFunc;
 
 class LLLineEditor
 : public LLUICtrl, public LLEditMenuHandler, protected LLPreeditor
 {
-
 public:
-	LLLineEditor(const std::string& name, 
-				 const LLRect& rect,
-				 const std::string& default_text = LLStringUtil::null,
-				 const LLFontGL* glfont = NULL,
-				 S32 max_length_bytes = 254,
-				 void (*commit_callback)(LLUICtrl* caller, void* user_data) = NULL,
-				 void (*keystroke_callback)(LLLineEditor* caller, void* user_data) = NULL,
-				 void (*focus_lost_callback)(LLFocusableElement* caller, void* user_data) = NULL,
-				 void* userdata = NULL,
-				 LLLinePrevalidateFunc prevalidate_func = NULL,
-				 LLViewBorder::EBevel border_bevel = LLViewBorder::BEVEL_IN,
-				 LLViewBorder::EStyle border_style = LLViewBorder::STYLE_LINE,
-				 S32 border_thickness = 1);
 
-	virtual ~LLLineEditor();
+	struct PrevalidateNamedFuncs
+	:	public LLInitParam::TypeValuesHelper<LLLinePrevalidateFunc, PrevalidateNamedFuncs>
+
+	{
+		static void declareValues();
+	};
+	
+	typedef boost::function<void (LLLineEditor* caller)> keystroke_callback_t;
+	
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<std::string>			default_text;
+		Optional<S32>					max_length_bytes;
+
+		Optional<keystroke_callback_t>	keystroke_callback;
+
+		Optional<LLLinePrevalidateFunc, PrevalidateNamedFuncs>	prevalidate_callback;
+		
+		Optional<LLViewBorder::Params>	border;
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	void setColorParameters(LLXMLNodePtr node);
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-	static void cleanupLineEditor();
+		Optional<LLUIImage*>			background_image;
+
+		Optional<bool>					select_on_focus,
+										handle_edit_keys_directly,
+										commit_on_focus_lost,
+										ignore_tab;
+
+		// colors
+		Optional<LLUIColor>				cursor_color,
+										text_color,
+										text_readonly_color,
+										text_tentative_color,
+										bg_readonly_color,
+										bg_writeable_color,
+										bg_focus_color;
+
+		Optional<S32>					text_pad_left,
+										text_pad_right;
+
+		Deprecated						is_unicode,
+										drop_shadow_visible,	
+										border_drop_shadow_visible,
+										bg_visible;
+
+		Params();
+	};
+protected:
+	LLLineEditor(const Params&);
+	friend class LLUICtrlFactory;
+	friend class LLFloaterEditUI;
+public:
+	virtual ~LLLineEditor();
 
 	// mousehandler overrides
 	/*virtual*/ BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
@@ -144,7 +176,7 @@ public:
 	void			setText(const LLStringExplicit &new_text);
 
 	const std::string& getText() const		{ return mText.getString(); }
-	const LLWString& getWText() const	{ return mText.getWString(); }
+	LLWString       getWText() const	{ return mText.getWString(); }
 	LLWString getConvertedText() const; // trimmed text with paragraphs converted to newlines
 
 	S32				getLength() const	{ return mText.length(); }
@@ -160,7 +192,7 @@ public:
 	void			setRevertOnEsc( BOOL b )		{ mRevertOnEsc = b; }
 
 	void setCursorColor(const LLColor4& c)			{ mCursorColor = c; }
-	const LLColor4& getCursorColor() const			{ return mCursorColor; }
+	const LLColor4& getCursorColor() const			{ return mCursorColor.get(); }
 
 	void setFgColor( const LLColor4& c )			{ mFgColor = c; }
 	void setReadOnlyFgColor( const LLColor4& c )	{ mReadOnlyFgColor = c; }
@@ -169,12 +201,12 @@ public:
 	void setReadOnlyBgColor( const LLColor4& c )	{ mReadOnlyBgColor = c; }
 	void setFocusBgColor(const LLColor4& c)			{ mFocusBgColor = c; }
 
-	const LLColor4& getFgColor() const			{ return mFgColor; }
-	const LLColor4& getReadOnlyFgColor() const	{ return mReadOnlyFgColor; }
-	const LLColor4& getTentativeFgColor() const { return mTentativeFgColor; }
-	const LLColor4& getWriteableBgColor() const	{ return mWriteableBgColor; }
-	const LLColor4& getReadOnlyBgColor() const	{ return mReadOnlyBgColor; }
-	const LLColor4& getFocusBgColor() const		{ return mFocusBgColor; }
+	const LLColor4& getFgColor() const			{ return mFgColor.get(); }
+	const LLColor4& getReadOnlyFgColor() const	{ return mReadOnlyFgColor.get(); }
+	const LLColor4& getTentativeFgColor() const { return mTentativeFgColor.get(); }
+	const LLColor4& getWriteableBgColor() const	{ return mWriteableBgColor.get(); }
+	const LLColor4& getReadOnlyBgColor() const	{ return mReadOnlyBgColor.get(); }
+	const LLColor4& getFocusBgColor() const		{ return mFocusBgColor.get(); }
 
 	void			setIgnoreArrowKeys(BOOL b)		{ mIgnoreArrowKeys = b; }
 	void			setIgnoreTab(BOOL b)			{ mIgnoreTab = b; }
@@ -193,14 +225,14 @@ public:
 
 	void			setHandleEditKeysDirectly( BOOL b ) { mHandleEditKeysDirectly = b; }
 	void			setSelectAllonFocusReceived(BOOL b);
-
-	void			setKeystrokeCallback(void (*keystroke_callback)(LLLineEditor* caller, void* user_data));
+	
+	typedef boost::function<void (LLLineEditor* caller, void* user_data)> callback_t;
+	void			setKeystrokeCallback(callback_t callback, void* user_data);
 
 	void			setMaxTextLength(S32 max_text_length);
-	void			setTextPadding(S32 left, S32 right); // Used to specify room for children before or after text.
 
 	// Prevalidation controls which keystrokes can affect the editor
-	void			setPrevalidate( BOOL (*func)(const LLWString &) );
+	void			setPrevalidate( LLLinePrevalidateFunc func );
 	static BOOL		prevalidateFloat(const LLWString &str );
 	static BOOL		prevalidateInt(const LLWString &str );
 	static BOOL		prevalidatePositiveS32(const LLWString &str);
@@ -233,6 +265,7 @@ private:
 	BOOL			handleSelectionKey(KEY key, MASK mask);
 	BOOL			handleControlKey(KEY key, MASK mask);
 	S32				handleCommitKey(KEY key, MASK mask);
+	void			updateTextPadding();
 
 	//
 	// private data members
@@ -261,6 +294,7 @@ protected:
 
 	LLViewBorder* mBorder;
 	const LLFontGL*	mGLFont;
+	U8          mGLFontStyle;
 	S32			mMaxLengthBytes;			// Max length of the UTF8 string in bytes
 	S32			mCursorPos;					// I-beam is just after the mCursorPos-th character.
 	S32			mScrollHPos;				// Horizontal offset from the start of mText.  Used for scrolling.
@@ -273,7 +307,7 @@ protected:
 	BOOL		mCommitOnFocusLost;
 	BOOL		mRevertOnEsc;
 
-	void		(*mKeystrokeCallback)( LLLineEditor* caller, void* userdata );
+	keystroke_callback_t mKeystrokeCallback;
 
 	BOOL		mIsSelecting;				// Selection for clipboard operations
 	S32			mSelectionStart;
@@ -283,18 +317,17 @@ protected:
 	S32			mLastSelectionStart;
 	S32			mLastSelectionEnd;
 
-	S32			(*mPrevalidateFunc)(const LLWString &str);
+	LLLinePrevalidateFunc mPrevalidateFunc;
 
 	LLFrameTimer mKeystrokeTimer;
 
-	LLColor4	mCursorColor;
-
-	LLColor4	mFgColor;
-	LLColor4	mReadOnlyFgColor;
-	LLColor4	mTentativeFgColor;
-	LLColor4	mWriteableBgColor;
-	LLColor4	mReadOnlyBgColor;
-	LLColor4	mFocusBgColor;
+	LLUIColor	mCursorColor;
+	LLUIColor	mFgColor;
+	LLUIColor	mReadOnlyFgColor;
+	LLUIColor	mTentativeFgColor;
+	LLUIColor	mWriteableBgColor;
+	LLUIColor	mReadOnlyBgColor;
+	LLUIColor	mFocusBgColor;
 
 	S32			mBorderThickness;
 
@@ -314,11 +347,6 @@ protected:
 	LLPreeditor::standouts_t mPreeditStandouts;
 
 private:
-	// Utility on top of LLUI::getUIImage, looks up a named image in a given XML node and returns it if possible
-	// or returns a given default image if anything in the process fails.
-	static LLPointer<LLUIImage> parseImage(std::string name, LLXMLNodePtr from, LLPointer<LLUIImage> def);
-	// Global instance used as default for member instance below.
-	static LLPointer<LLUIImage> sImage;
 	// Instances that by default point to the statics but can be overidden in XML.
 	LLPointer<LLUIImage> mImage;
 
@@ -363,45 +391,22 @@ private:
 
 }; // end class LLLineEditor
 
+#ifdef LL_WINDOWS
+#ifndef INSTANTIATE_GETCHILD_LINEEDITOR
+#pragma warning (disable : 4231)
+extern template LLLineEditor* LLView::getChild<LLLineEditor>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
+#endif
+#endif
 
-
-/*
- * @brief A line editor with a button to clear it and a callback to call on every edit event.
- */
-class LLSearchEditor : public LLUICtrl
+namespace LLInitParam
 {
-public:
-	LLSearchEditor(const std::string& name, 
-		const LLRect& rect,
-		S32 max_length_bytes,
-		void (*search_callback)(const std::string& search_string, void* user_data),
-		void* userdata);
-
-	virtual ~LLSearchEditor() {}
-
-	/*virtual*/ void	draw();
-
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
-	void setText(const LLStringExplicit &new_text) { mSearchEdit->setText(new_text); }
-
-	void setSearchCallback(void (*search_callback)(const std::string& search_string, void* user_data), void* data) { mSearchCallback = search_callback; mCallbackUserData = data; }
-
-	// LLUICtrl interface
-	virtual void	setValue(const LLSD& value );
-	virtual LLSD	getValue() const;
-	virtual BOOL	setTextArg( const std::string& key, const LLStringExplicit& text );
-	virtual BOOL	setLabelArg( const std::string& key, const LLStringExplicit& text );
-	virtual void	clear();
-
-private:
-	static void onSearchEdit(LLLineEditor* caller, void* user_data );
-	static void onClearSearch(void* user_data);
-
-	LLLineEditor* mSearchEdit;
-	class LLButton* mClearSearchButton;
-	void (*mSearchCallback)(const std::string& search_string, void* user_data);
-
-};
+    template<>
+	bool ParamCompare<LLLinePrevalidateFunc>::equals(
+		const LLLinePrevalidateFunc &a, const LLLinePrevalidateFunc &b); 
+
+    template<>
+	bool ParamCompare<boost::function<void (LLLineEditor *)> >::equals(
+		const boost::function<void (LLLineEditor *)> &a, const boost::function<void (LLLineEditor *)> &b); 
+}
 
 #endif  // LL_LINEEDITOR_
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 5fb0e57c06..a3588d9dae 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -59,8 +59,6 @@
 #include "llresmgr.h"
 #include "llui.h"
 
-#include "lluitrans.h"
-
 #include "llstl.h"
 
 #include "v2math.h"
@@ -78,7 +76,6 @@ S32 MENU_BAR_WIDTH = 0;
 ///============================================================================
 
 const std::string SEPARATOR_NAME("separator");
-const std::string TEAROFF_SEPARATOR_LABEL( "~~~~~~~~~~~" );
 const std::string SEPARATOR_LABEL( "-----------" );
 const std::string VERTICAL_SEPARATOR_LABEL( "|" );
 
@@ -110,12 +107,6 @@ const F32 MAX_MOUSE_SLOPE_SUB_MENU = 0.9f;
 
 const S32 PIE_GESTURE_ACTIVATE_DISTANCE = 10;
 
-LLColor4 LLMenuItemGL::sEnabledColor( 0.0f, 0.0f, 0.0f, 1.0f );
-LLColor4 LLMenuItemGL::sDisabledColor( 0.5f, 0.5f, 0.5f, 1.0f );
-LLColor4 LLMenuItemGL::sHighlightBackground( 0.0f, 0.0f, 0.7f, 1.0f );
-LLColor4 LLMenuItemGL::sHighlightForeground( 1.0f, 1.0f, 1.0f, 1.0f );
-
-LLColor4 LLMenuGL::sDefaultBackgroundColor( 0.25f, 0.25f, 0.25f, 0.75f );
 BOOL LLMenuGL::sKeyboardMode = FALSE;
 
 LLHandle<LLView> LLMenuHolderGL::sItemLastSelectedHandle;
@@ -131,69 +122,59 @@ const F32 ACTIVATE_HIGHLIGHT_TIME = 0.3f;
 ///============================================================================
 /// Class LLMenuItemGL
 ///============================================================================
-
 // Default constructor
-LLMenuItemGL::LLMenuItemGL( const std::string& name, const std::string& label, KEY key, MASK mask ) :
-	LLView( name, TRUE ),
-	mJumpKey(KEY_NONE),
-	mAcceleratorKey( key ),
-	mAcceleratorMask( mask ),
+LLMenuItemGL::LLMenuItemGL(const LLMenuItemGL::Params& p)
+:	LLUICtrl(p),
+	mJumpKey(p.jump_key),
 	mAllowKeyRepeat(FALSE),
 	mHighlight( FALSE ),
 	mGotHover( FALSE ),
 	mBriefItem( FALSE ),
-	mFont( LLFontGL::getFontSansSerif() ),
-	mStyle(LLFontGL::NORMAL),
-	mDrawTextDisabled( FALSE )
-{
-	setLabel( label );
-}
-
-// virtual
-LLXMLNodePtr LLMenuItemGL::getXML(bool save_children) const
+	mDrawTextDisabled( FALSE ),
+	mFont(p.font),
+	mAcceleratorKey(KEY_NONE),
+	mAcceleratorMask(MASK_NONE),
+	mLabel(p.label.isProvided() ? p.label() : p.name()),
+	mEnabledColor(p.enabled_color()),
+	mDisabledColor(p.disabled_color()),
+	mHighlightBackground(p.highlight_bg_color()),
+	mHighlightForeground(p.highlight_fg_color())
 {
-	LLXMLNodePtr node = LLView::getXML();
-
-	node->createChild("type", TRUE)->setStringValue(getType());
-
-	node->createChild("label", TRUE)->setStringValue(mLabel);
-
-	if (mAcceleratorKey != KEY_NONE)
+#ifdef LL_DARWIN
+	// See if this Mac accelerator should really use the ctrl key and not get mapped to cmd
+	BOOL useMacCtrl = p.use_mac_ctrl;
+#endif // LL_DARWIN
+	
+	std::string shortcut = p.shortcut;
+	if (shortcut.find("control") != shortcut.npos)
 	{
-		std::stringstream out;
-		if (mAcceleratorMask & MASK_CONTROL)
-		{
-			out << "control|";
-		}
-		if (mAcceleratorMask & MASK_ALT)
-		{
-			out << "alt|";
-		}
-		if (mAcceleratorMask & MASK_SHIFT)
-		{
-			out << "shift|";
-		}
-		out << LLKeyboard::stringFromKey(mAcceleratorKey);
-
-		node->createChild("shortcut", TRUE)->setStringValue(out.str());
-		
 #ifdef LL_DARWIN
-		// Write in special tag if this key is really a ctrl combination on the Mac
-		if (mAcceleratorMask & MASK_MAC_CONTROL)
+		if ( useMacCtrl )
 		{
-			node->createChild("useMacCtrl", TRUE)->setBoolValue( TRUE );
+			mAcceleratorMask |= MASK_MAC_CONTROL;
 		}
 #endif // LL_DARWIN
+		mAcceleratorMask |= MASK_CONTROL;
+	}
+	if (shortcut.find("alt") != shortcut.npos)
+	{
+		mAcceleratorMask |= MASK_ALT;
 	}
+	if (shortcut.find("shift") != shortcut.npos)
+	{
+		mAcceleratorMask |= MASK_SHIFT;
+	}
+	S32 pipe_pos = shortcut.rfind("|");
+	std::string key_str = shortcut.substr(pipe_pos+1);
 
-	return node;
+	LLKeyboard::keyFromString(key_str, &mAcceleratorKey);
 }
 
 BOOL LLMenuItemGL::handleAcceleratorKey(KEY key, MASK mask)
 {
 	if( getEnabled() && (!gKeyboard->getKeyRepeated(key) || mAllowKeyRepeat) && (key == mAcceleratorKey) && (mask == (mAcceleratorMask & MASK_NORMALKEYS)) )
 	{
-		doIt();
+		onCommit();
 		return TRUE;
 	}
 	return FALSE;
@@ -269,24 +250,24 @@ void LLMenuItemGL::appendAcceleratorString( std::string& st ) const
 	{
 		if ( mAcceleratorMask & MASK_MAC_CONTROL )
 		{
-			st.append( LLUITrans::getString("accel-mac-control") );
+			st.append( "Ctrl-" );
 		}
 		else
 		{
-			st.append( LLUITrans::getString("accel-mac-command") );		// Symbol would be "\xE2\x8C\x98"
+			st.append( "Cmd-" );		// Symbol would be "\xE2\x8C\x98"
 		}
 	}
 	if( mAcceleratorMask & MASK_ALT )
-		st.append( LLUITrans::getString("accel-mac-option") );		// Symbol would be "\xE2\x8C\xA5"
+		st.append( "Opt-" );		// Symbol would be "\xE2\x8C\xA5"
 	if( mAcceleratorMask & MASK_SHIFT )
-		st.append( LLUITrans::getString("accel-mac-shift") );		// Symbol would be "\xE2\x8C\xA7"
+		st.append( "Shift-" );		// Symbol would be "\xE2\x8C\xA7"
 #else
 	if( mAcceleratorMask & MASK_CONTROL )
-		st.append( LLUITrans::getString("accel-win-control") );
+		st.append( "Ctrl-" );
 	if( mAcceleratorMask & MASK_ALT )
-		st.append( LLUITrans::getString("accel-win-alt") );
+		st.append( "Alt-" );
 	if( mAcceleratorMask & MASK_SHIFT )
-		st.append( LLUITrans::getString("accel-win-shift") );
+		st.append( "Shift-" );
 #endif
 
 	std::string keystr = LLKeyboard::stringFromKey( mAcceleratorKey );
@@ -354,7 +335,7 @@ void LLMenuItemGL::buildDrawLabel( void )
 	mDrawAccelLabel = st;
 }
 
-void LLMenuItemGL::doIt( void )
+void LLMenuItemGL::onCommit( void )
 {
 	// close all open menus by default
 	// if parent menu is actually visible (and we are not triggering menu item via accelerator)
@@ -363,6 +344,8 @@ void LLMenuItemGL::doIt( void )
 	{
 		LLMenuGL::sMenuContainer->hideMenus();
 	}
+	
+	LLUICtrl::onCommit();
 }
 
 // set the hover status (called by it's menu)
@@ -402,7 +385,7 @@ BOOL LLMenuItemGL::handleKeyHere( KEY key, MASK mask )
 			// switch to keyboard navigation mode
 			LLMenuGL::setKeyboardMode(TRUE);
 
-			doIt();
+			onCommit();
 			return TRUE;
 		}
 	}
@@ -415,7 +398,7 @@ BOOL LLMenuItemGL::handleMouseUp( S32 x, S32 y, MASK )
 	// switch to mouse navigation mode
 	LLMenuGL::setKeyboardMode(FALSE);
 
-	doIt();
+	onCommit();
 	make_ui_sound("UISndClickRelease");
 	return TRUE;
 }
@@ -439,55 +422,58 @@ void LLMenuItemGL::draw( void )
 	// let disabled items be highlighted, just don't draw them as such
 	if( getEnabled() && getHighlight() && !mBriefItem)
 	{
-		gGL.color4fv( sHighlightBackground.mV );
+		int debug_count = 0;
+		if (dynamic_cast<LLMenuItemCallGL*>(this))
+			debug_count++;
+		gGL.color4fv( mHighlightBackground.get().mV );
 		gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0 );
 	}
 
 	LLColor4 color;
 
-	U8 font_style = mStyle;
+	LLFontGL::ShadowType shadow_style = LLFontGL::NO_SHADOW;
 	if (getEnabled() && !mDrawTextDisabled )
 	{
-		font_style |= LLFontGL::DROP_SHADOW_SOFT;
+		shadow_style = LLFontGL::DROP_SHADOW_SOFT;
 	}
 
 	if ( getEnabled() && getHighlight() )
 	{
-		color = sHighlightForeground;
+		color = mHighlightForeground.get();
 	}
 	else if( getEnabled() && !mDrawTextDisabled )
 	{
-		color = sEnabledColor;
+		color = mEnabledColor.get();
 	}
 	else
 	{
-		color = sDisabledColor;
+		color = mDisabledColor.get();
 	}
 
 	// Draw the text on top.
 	if (mBriefItem)
 	{
 		mFont->render( mLabel, 0, BRIEF_PAD_PIXELS / 2, 0, color,
-					   LLFontGL::LEFT, LLFontGL::BOTTOM, font_style );
+					   LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, shadow_style );
 	}
 	else
 	{
 		if( !mDrawBoolLabel.empty() )
 		{
 			mFont->render( mDrawBoolLabel.getWString(), 0, (F32)LEFT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f) + 1.f, color,
-						   LLFontGL::LEFT, LLFontGL::BOTTOM, font_style, S32_MAX, S32_MAX, NULL, FALSE );
+						   LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, shadow_style, S32_MAX, S32_MAX, NULL, FALSE );
 		}
 		mFont->render( mLabel.getWString(), 0, (F32)LEFT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f) + 1.f, color,
-					   LLFontGL::LEFT, LLFontGL::BOTTOM, font_style, S32_MAX, S32_MAX, NULL, FALSE );
+					   LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, shadow_style, S32_MAX, S32_MAX, NULL, FALSE );
 		if( !mDrawAccelLabel.empty() )
 		{
 			mFont->render( mDrawAccelLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f) + 1.f, color,
-						   LLFontGL::RIGHT, LLFontGL::BOTTOM, font_style, S32_MAX, S32_MAX, NULL, FALSE );
+						   LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, shadow_style, S32_MAX, S32_MAX, NULL, FALSE );
 		}
 		if( !mDrawBranchLabel.empty() )
 		{
 			mFont->render( mDrawBranchLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f) + 1.f, color,
-						   LLFontGL::RIGHT, LLFontGL::BOTTOM, font_style, S32_MAX, S32_MAX, NULL, FALSE );
+						   LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, shadow_style, S32_MAX, S32_MAX, NULL, FALSE );
 		}
 	}
 
@@ -515,38 +501,41 @@ BOOL LLMenuItemGL::setLabelArg( const std::string& key, const LLStringExplicit&
 	return TRUE;
 }
 
+void LLMenuItemGL::onVisibilityChange(BOOL new_visibility)
+{
+	if (getMenu())
+	{
+		getMenu()->needsArrange();
+	}
+}
+
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLMenuItemSeparatorGL
 //
 // This class represents a separator.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+static LLRegisterWidget<LLMenuItemSeparatorGL> register_separator("menu_item_separator");
 
-class LLMenuItemSeparatorGL : public LLMenuItemGL
+LLMenuItemSeparatorGL::Params::Params()
 {
-public:
-	LLMenuItemSeparatorGL( const std::string &name = SEPARATOR_NAME );
-
-	virtual std::string getType() const	{ return "separator"; }
-
-	// doIt() - do the primary funcationality of the menu item.
-	virtual void doIt( void ) {}
-
-	virtual void draw( void );
-	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
-	virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
-	virtual BOOL handleHover(S32 x, S32 y, MASK mask);
+	name = "separator";
+	label = SEPARATOR_LABEL;
+}
 
-	virtual U32 getNominalHeight( void ) const { return SEPARATOR_HEIGHT_PIXELS; }
-};
+LLMenuItemSeparatorGL::LLMenuItemSeparatorGL(const LLMenuItemSeparatorGL::Params& p) :
+	LLMenuItemGL( p )
+{
+}
 
-LLMenuItemSeparatorGL::LLMenuItemSeparatorGL( const std::string &name ) :
-	LLMenuItemGL( name, SEPARATOR_LABEL )
+//virtual
+U32 LLMenuItemSeparatorGL::getNominalHeight( void ) const
 {
+	return SEPARATOR_HEIGHT_PIXELS;
 }
 
 void LLMenuItemSeparatorGL::draw( void )
 {
-	gGL.color4fv( getDisabledColor().mV );
+	gGL.color4fv( mDisabledColor.get().mV );
 	const S32 y = getRect().getHeight() / 2;
 	const S32 PAD = 6;
 	gl_line_2d( PAD, y, getRect().getWidth() - PAD, y );
@@ -557,11 +546,13 @@ BOOL LLMenuItemSeparatorGL::handleMouseDown(S32 x, S32 y, MASK mask)
 	LLMenuGL* parent_menu = getMenu();
 	if (y > getRect().getHeight() / 2)
 	{
-		return parent_menu->handleMouseDown(x + getRect().mLeft, getRect().mTop + 1, mask);
+		LLView* prev_menu_item = parent_menu->findPrevSibling(this);
+		return prev_menu_item ? prev_menu_item->handleMouseDown(x, prev_menu_item->getRect().getHeight(), mask) : FALSE;
 	}
 	else
 	{
-		return parent_menu->handleMouseDown(x + getRect().mLeft, getRect().mBottom - 1, mask);
+		LLView* next_menu_item = parent_menu->findNextSibling(this);
+		return next_menu_item ? next_menu_item->handleMouseDown(x, 0, mask) : FALSE;
 	}
 }
 
@@ -570,11 +561,13 @@ BOOL LLMenuItemSeparatorGL::handleMouseUp(S32 x, S32 y, MASK mask)
 	LLMenuGL* parent_menu = getMenu();
 	if (y > getRect().getHeight() / 2)
 	{
-		return parent_menu->handleMouseUp(x + getRect().mLeft, getRect().mTop + 1, mask);
+		LLView* prev_menu_item = parent_menu->findPrevSibling(this);
+		return prev_menu_item ? prev_menu_item->handleMouseUp(x, prev_menu_item->getRect().getHeight(), mask) : FALSE;
 	}
 	else
 	{
-		return parent_menu->handleMouseUp(x + getRect().mLeft, getRect().mBottom - 1, mask);
+		LLView* next_menu_item = parent_menu->findNextSibling(this);
+		return next_menu_item ? next_menu_item->handleMouseUp(x, 0, mask) : FALSE;
 	}
 }
 
@@ -593,7 +586,6 @@ BOOL LLMenuItemSeparatorGL::handleHover(S32 x, S32 y, MASK mask)
 	}
 }
 
-
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLMenuItemVerticalSeparatorGL
 //
@@ -617,19 +609,19 @@ LLMenuItemVerticalSeparatorGL::LLMenuItemVerticalSeparatorGL( void )
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLMenuItemTearOffGL
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-LLMenuItemTearOffGL::LLMenuItemTearOffGL(LLHandle<LLFloater> parent_floater_handle) : 
-	LLMenuItemGL(std::string("tear off"), TEAROFF_SEPARATOR_LABEL), 
-	mParentHandle(parent_floater_handle)
+LLMenuItemTearOffGL::LLMenuItemTearOffGL(const LLMenuItemTearOffGL::Params& p) 
+:	LLMenuItemGL(p), 
+	mParentHandle(p.parent_floater_handle)
 {
 }
 
 
-void LLMenuItemTearOffGL::doIt()
+void LLMenuItemTearOffGL::onCommit()
 {
 	if (getMenu()->getTornOff())
 	{
 		LLTearOffMenu* torn_off_menu = (LLTearOffMenu*)(getMenu()->getParent());
-		torn_off_menu->close();
+		torn_off_menu->closeFloater();
 	}
 	else
 	{
@@ -639,7 +631,7 @@ void LLMenuItemTearOffGL::doIt()
 			getMenu()->highlightNextItem(this);
 		}
 
-		getMenu()->arrange();
+		getMenu()->needsArrange();
 
 		LLFloater* parent_floater = mParentHandle.get();
 		LLFloater* tear_off_menu = LLTearOffMenu::create(getMenu());
@@ -656,7 +648,7 @@ void LLMenuItemTearOffGL::doIt()
 			tear_off_menu->setFocus(TRUE);
 		}
 	}
-	LLMenuItemGL::doIt();
+	LLMenuItemGL::onCommit();
 }
 
 void LLMenuItemTearOffGL::draw()
@@ -664,17 +656,17 @@ void LLMenuItemTearOffGL::draw()
 	// disabled items can be highlighted, but shouldn't render as such
 	if( getEnabled() && getHighlight() && !isBriefItem())
 	{
-		gGL.color4fv( getHighlightBGColor().mV );
+		gGL.color4fv( mHighlightBackground.get().mV );
 		gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0 );
 	}
 
 	if (getEnabled())
 	{
-		gGL.color4fv( getEnabledColor().mV );
+		gGL.color4fv( mEnabledColor.get().mV );
 	}
 	else
 	{
-		gGL.color4fv( getDisabledColor().mV );
+		gGL.color4fv( mDisabledColor.get().mV );
 	}
 	const S32 y = getRect().getHeight() / 3;
 	const S32 PAD = 6;
@@ -697,11 +689,16 @@ U32 LLMenuItemTearOffGL::getNominalHeight( void ) const
 class LLMenuItemBlankGL : public LLMenuItemGL
 {
 public:
-	LLMenuItemBlankGL( void ) :	LLMenuItemGL( LLStringUtil::null, LLStringUtil::null )
+	struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
 	{
-		setEnabled(FALSE);
-	}
-	virtual void doIt( void ) {}
+		Params()
+		{
+			name="";
+			enabled = false;
+		}
+	};
+	LLMenuItemBlankGL( const Params& p ) :	LLMenuItemGL( p )
+	{}
 	virtual void draw( void ) {}
 };
 
@@ -709,239 +706,117 @@ public:
 ///============================================================================
 /// Class LLMenuItemCallGL
 ///============================================================================
+static LLRegisterWidget<LLMenuItemCallGL> register_menu_item_call_gl("menu_item_call");
 
-LLMenuItemCallGL::LLMenuItemCallGL( const std::string& name, 
-									const std::string& label, 
-									menu_callback clicked_cb, 
-								    enabled_callback enabled_cb,
-									void* user_data,
-									KEY key, MASK mask,
-									BOOL enabled,
-									on_disabled_callback on_disabled_cb) :
-	LLMenuItemGL( name, label, key, mask ),
-	mCallback( clicked_cb ),
-	mEnabledCallback( enabled_cb ),
-	mLabelCallback(NULL),
-	mUserData( user_data ),
-	mOnDisabledCallback(on_disabled_cb)
-{
-	if(!enabled) setEnabled(FALSE);
-}
-
-LLMenuItemCallGL::LLMenuItemCallGL( const std::string& name, 
-									menu_callback clicked_cb, 
-								    enabled_callback enabled_cb,
-									void* user_data,
-									KEY key, MASK mask,
-									BOOL enabled,
-									on_disabled_callback on_disabled_cb) :
-	LLMenuItemGL( name, name, key, mask ),
-	mCallback( clicked_cb ),
-	mEnabledCallback( enabled_cb ),
-	mLabelCallback(NULL),
-	mUserData( user_data ),
-	mOnDisabledCallback(on_disabled_cb)
-{
-	if(!enabled) setEnabled(FALSE);
-}
-
-LLMenuItemCallGL::LLMenuItemCallGL(const std::string& name,
-								   const std::string& label,
-								   menu_callback clicked_cb,
-								   enabled_callback enabled_cb,
-								   label_callback label_cb,
-								   void* user_data,
-								   KEY key, MASK mask,
-								   BOOL enabled,
-								   on_disabled_callback on_disabled_cb) :
-	LLMenuItemGL(name, label, key, mask),
-	mCallback(clicked_cb),
-	mEnabledCallback(enabled_cb),
-	mLabelCallback(label_cb),
-	mUserData(user_data),
-	mOnDisabledCallback(on_disabled_cb)
-{
-	if(!enabled) setEnabled(FALSE);
-}
-
-LLMenuItemCallGL::LLMenuItemCallGL(const std::string& name,
-								   menu_callback clicked_cb,
-								   enabled_callback enabled_cb,
-								   label_callback label_cb,
-								   void* user_data,
-								   KEY key, MASK mask,
-								   BOOL enabled,
-								   on_disabled_callback on_disabled_cb) :
-	LLMenuItemGL(name, name, key, mask),
-	mCallback(clicked_cb),
-	mEnabledCallback(enabled_cb),
-	mLabelCallback(label_cb),
-	mUserData(user_data),
-	mOnDisabledCallback(on_disabled_cb)
-{
-	if(!enabled) setEnabled(FALSE);
-}
-
-void LLMenuItemCallGL::setEnabledControl(std::string enabled_control, LLView *context)
-{
-	// Register new listener
-	if (!enabled_control.empty())
-	{
-		LLControlVariable *control = context->findControl(enabled_control);
-		if (!control)
-		{
-			context->addBoolControl(enabled_control, getEnabled());
-			control = context->findControl(enabled_control);
-			llassert_always(control);
-		}
-		control->getSignal()->connect(boost::bind(&LLView::controlListener, _1, getHandle(), std::string("enabled")));
-		setEnabled(control->getValue());
-	}
-}
-
-void LLMenuItemCallGL::setVisibleControl(std::string visible_control, LLView *context)
+LLMenuItemCallGL::LLMenuItemCallGL(const LLMenuItemCallGL::Params& p)
+:	LLMenuItemGL(p)
 {
-	// Register new listener
-	if (!visible_control.empty())
-	{
-		LLControlVariable *control = context->findControl(visible_control);
-		if (!control)
-		{
-			context->addBoolControl(visible_control, getVisible());
-			control = context->findControl(visible_control);
-			llassert_always(control);
-		}
-		control->getSignal()->connect(boost::bind(&LLView::controlListener, _1, getHandle(), std::string("visible")));
-		setVisible(control->getValue());
-	}
 }
 
-// virtual
-LLXMLNodePtr LLMenuItemCallGL::getXML(bool save_children) const
+void LLMenuItemCallGL::initFromParams(const Params& p)
 {
-	LLXMLNodePtr node = LLMenuItemGL::getXML();
-
-	// Contents
-
-	std::vector<LLListenerEntry> listeners = mDispatcher->getListeners();
-	std::vector<LLListenerEntry>::iterator itor;
-	for (itor = listeners.begin(); itor != listeners.end(); ++itor)
+	if (p.on_enable.isProvided())
 	{
-		std::string listener_name = findEventListener((LLSimpleListener*)itor->listener);
-		if (!listener_name.empty())
+		initEnableCallback(p.on_enable, mEnableSignal);
+		// Set the enabled control variable (for backwards compatability)
+		if (p.on_enable.control_name.isProvided() && !p.on_enable.control_name().empty())
 		{
-			LLXMLNodePtr child_node = node->createChild("on_click", FALSE);
-			child_node->createChild("function", TRUE)->setStringValue(listener_name);
-			child_node->createChild("filter", TRUE)->setStringValue(itor->filter.asString());
-			child_node->createChild("userdata", TRUE)->setStringValue(itor->userdata.asString());
+			LLControlVariable* control = findControl(p.on_enable.control_name());
+			if (control)
+				setEnabledControlVariable(control);
 		}
 	}
-
-	return node;
+	if (p.on_click.isProvided())
+		initCommitCallback(p.on_click, mCommitSignal);
+		
+	LLUICtrl::initFromParams(p);
 }
 
-// doIt() - Call the callback provided
-void LLMenuItemCallGL::doIt( void )
+void LLMenuItemCallGL::onCommit( void )
 {
 	// RN: menu item can be deleted in callback, so beware
 	getMenu()->setItemLastSelected( this );
+	
+	LLMenuItemGL::onCommit();
+}
 
-	if( mCallback )
+void LLMenuItemCallGL::updateEnabled( void )
+{
+	if (mEnableSignal.num_slots() > 0)
 	{
-		mCallback( mUserData );
+		bool enabled = mEnableSignal(this, LLSD());
+		if (mEnabledControlVariable)
+		{
+			if (!enabled)
+				mEnabledControlVariable->set(false); // callback overrides control variable; this will call setEnabled()
+		}
+		else
+		{
+			setEnabled(enabled);
+		}
 	}
-	LLPointer<LLEvent> fired_event = new LLEvent(this);
-	fireEvent(fired_event, "on_click");
-	LLMenuItemGL::doIt();
 }
 
 void LLMenuItemCallGL::buildDrawLabel( void )
 {
-	LLPointer<LLEvent> fired_event = new LLEvent(this);
-	fireEvent(fired_event, "on_build");
-	if( mEnabledCallback )
-	{
-		setEnabled( mEnabledCallback( mUserData ) );
-	}
-	if(mLabelCallback)
-	{
-		std::string label;
-		mLabelCallback(label, mUserData);
-		mLabel = label;
-	}
+	updateEnabled();
 	LLMenuItemGL::buildDrawLabel();
 }
 
+BOOL LLMenuItemCallGL::handleKeyHere( KEY key, MASK mask )
+{
+	return LLMenuItemGL::handleKeyHere(key, mask);
+}
+
 BOOL LLMenuItemCallGL::handleAcceleratorKey( KEY key, MASK mask )
 {
- 	if( (!gKeyboard->getKeyRepeated(key) || getAllowKeyRepeat()) && (key == mAcceleratorKey) && (mask == (mAcceleratorMask & MASK_NORMALKEYS)) )
+	if( (!gKeyboard->getKeyRepeated(key) || getAllowKeyRepeat()) && (key == mAcceleratorKey) && (mask == (mAcceleratorMask & MASK_NORMALKEYS)) )
 	{
-		LLPointer<LLEvent> fired_event = new LLEvent(this);
-		fireEvent(fired_event, "on_build");
-		if( mEnabledCallback )
+		updateEnabled();
+		if (getEnabled())
 		{
-			setEnabled( mEnabledCallback( mUserData ) );
-		}
-		if( !getEnabled() )
-		{
-			if( mOnDisabledCallback )
-			{
-				mOnDisabledCallback( mUserData );
-			}
+			onCommit();
+			return TRUE;
 		}
 	}
-	return LLMenuItemGL::handleAcceleratorKey(key, mask);
+	return FALSE;
 }
 
 ///============================================================================
 /// Class LLMenuItemCheckGL
 ///============================================================================
+static LLRegisterWidget<LLMenuItemCheckGL> register_menu_item_check_gl("menu_item_check");
 
-LLMenuItemCheckGL::LLMenuItemCheckGL ( const std::string& name, 
-									   const std::string& label,
-									   menu_callback clicked_cb,
-									   enabled_callback enabled_cb,
-									   check_callback check_cb,
-									   void* user_data,
-									   KEY key, MASK mask ) :
-	LLMenuItemCallGL( name, label, clicked_cb, enabled_cb, user_data, key, mask ),
-	mCheckCallback( check_cb ), 
-	mChecked(FALSE)
+LLMenuItemCheckGL::LLMenuItemCheckGL (const LLMenuItemCheckGL::Params& p)
+:	LLMenuItemCallGL(p)
 {
 }
 
-LLMenuItemCheckGL::LLMenuItemCheckGL ( const std::string& name, 
-									   menu_callback clicked_cb,
-									   enabled_callback enabled_cb,
-									   check_callback check_cb,
-									   void* user_data,
-									   KEY key, MASK mask ) :
-	LLMenuItemCallGL( name, name, clicked_cb, enabled_cb, user_data, key, mask ),
-	mCheckCallback( check_cb ), 
-	mChecked(FALSE)
+void LLMenuItemCheckGL::initFromParams(const Params& p)
 {
+	if (p.on_check.isProvided())
+	{
+		initEnableCallback(p.on_check, mCheckSignal);
+		// Set the control name (for backwards compatability)
+		if (p.on_check.control_name.isProvided() && !p.on_check.control_name().empty())
+		{
+			setControlName(p.on_check.control_name());
+		}
+	}
+		
+	LLMenuItemCallGL::initFromParams(p);
 }
 
-LLMenuItemCheckGL::LLMenuItemCheckGL ( const std::string& name, 
-									   const std::string& label,
-									   menu_callback clicked_cb,
-									   enabled_callback enabled_cb,
-									   std::string control_name,
-									   LLView *context,
-									   void* user_data,
-									   KEY key, MASK mask ) :
-	LLMenuItemCallGL( name, label, clicked_cb, enabled_cb, user_data, key, mask ),
-	mCheckCallback( NULL ),
-	mChecked(FALSE)
+void LLMenuItemCheckGL::onCommit( void )
 {
-	setControlName(control_name, context);
+	LLMenuItemCallGL::onCommit();
 }
 
 //virtual
 void LLMenuItemCheckGL::setValue(const LLSD& value)
 {
-	mChecked = value.asBoolean();
-	if(mChecked)
+	LLUICtrl::setValue(value);
+	if(value.asBoolean())
 	{
 		mDrawBoolLabel = BOOLEAN_TRUE_PREFIX;
 	}
@@ -951,68 +826,21 @@ void LLMenuItemCheckGL::setValue(const LLSD& value)
 	}
 }
 
-void LLMenuItemCheckGL::setCheckedControl(std::string checked_control, LLView *context)
-{
-	// Register new listener
-	if (!checked_control.empty())
-	{
-		LLControlVariable *control = context->findControl(checked_control);
-		if (!control)
-		{
-			context->addBoolControl(checked_control, mChecked);
-			control = context->findControl(checked_control);
-			llassert_always(control);
-		}
-		control->getSignal()->connect(boost::bind(&LLView::controlListener, _1, getHandle(), std::string("value")));
-		mChecked = control->getValue();
-	}
-}
-
-// virtual
-LLXMLNodePtr LLMenuItemCheckGL::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLMenuItemCallGL::getXML();
-	return node;
-}
-
 // called to rebuild the draw label
 void LLMenuItemCheckGL::buildDrawLabel( void )
 {
-	if(mChecked || (mCheckCallback && mCheckCallback( getUserData() ) ) )
+	// Note: mCheckSignal() returns true if no callbacks are set
+	bool checked = mCheckSignal(this, LLSD());
+	if (mControlVariable)
 	{
-		mDrawBoolLabel = BOOLEAN_TRUE_PREFIX;
+		if (!checked) 
+			setControlValue(false); // callback overrides control variable; this will call setValue()
 	}
 	else
 	{
-		mDrawBoolLabel.clear();
+		setValue(checked);
 	}
-	LLMenuItemCallGL::buildDrawLabel();
-}
-
-
-///============================================================================
-/// Class LLMenuItemToggleGL
-///============================================================================
-
-LLMenuItemToggleGL::LLMenuItemToggleGL( const std::string& name, const std::string& label, BOOL* toggle,
-										KEY key, MASK mask ) :
-	LLMenuItemGL( name, label, key, mask ),
-	mToggle( toggle )
-{
-}
-
-LLMenuItemToggleGL::LLMenuItemToggleGL( const std::string& name, BOOL* toggle,
-										KEY key, MASK mask ) :
-	LLMenuItemGL( name, name, key, mask ),
-	mToggle( toggle )
-{
-}
-
-
-// called to rebuild the draw label
-void LLMenuItemToggleGL::buildDrawLabel( void )
-{
-	if( *mToggle )
+	if(getValue().asBoolean())
 	{
 		mDrawBoolLabel = BOOLEAN_TRUE_PREFIX;
 	}
@@ -1020,64 +848,48 @@ void LLMenuItemToggleGL::buildDrawLabel( void )
 	{
 		mDrawBoolLabel.clear();
 	}
-	mDrawAccelLabel.clear();
-	std::string st = mDrawAccelLabel;
-	appendAcceleratorString( st );
-	mDrawAccelLabel = st;
-}
-
-// doIt() - do the primary funcationality of the menu item.
-void LLMenuItemToggleGL::doIt( void )
-{
-	getMenu()->setItemLastSelected( this );
-	//llinfos << "LLMenuItemToggleGL::doIt " << mLabel.c_str() << llendl;
-	*mToggle = !(*mToggle);
-	buildDrawLabel();
-	LLMenuItemGL::doIt();
+	LLMenuItemCallGL::buildDrawLabel();
 }
 
-
-LLMenuItemBranchGL::LLMenuItemBranchGL( const std::string& name, const std::string& label, LLHandle<LLView> branch,
-										KEY key, MASK mask ) :
-	LLMenuItemGL( name, label, key, mask ),
-	mBranch( branch )
+///============================================================================
+/// Class LLMenuItemBranchGL
+///============================================================================
+LLMenuItemBranchGL::LLMenuItemBranchGL(const LLMenuItemBranchGL::Params& p)
+  : LLMenuItemGL(p)
 {
-	if(!dynamic_cast<LLMenuGL*>(branch.get()))
+	LLMenuGL* branch = p.branch;
+	if (branch)
 	{
-		llerrs << "Non-menu handle passed as branch reference." << llendl;
-	}
-
-	if(getBranch())
-	{
-		getBranch()->setVisible( FALSE );
-		getBranch()->setParentMenuItem(this);
+		mBranchHandle = branch->getHandle();
+		branch->setVisible(FALSE);
+		branch->setParentMenuItem(this);
 	}
 }
 
 LLMenuItemBranchGL::~LLMenuItemBranchGL()
 {
-	LLView::deleteViewByHandle(mBranch);
+	LLView::deleteViewByHandle(mBranchHandle);
 }
 
 // virtual
 LLView* LLMenuItemBranchGL::getChildView(const std::string& name, BOOL recurse, BOOL create_if_missing) const
 {
+	LLMenuGL* branch = getBranch();
+	if (!branch)
+		return LLView::getChildView(name, recurse, create_if_missing);
+
 	// richard: this is redundant with parent, remove
-	if (getBranch())
+	if (branch->getName() == name)
 	{
-		if(getBranch()->getName() == name)
-		{
-			return getBranch();
-		}
-
-		// Always recurse on branches
-		LLView* child = getBranch()->getChildView(name, recurse, FALSE);
-		if(child)
-		{
-			return child;
-		}
+		return branch;
+	}
+	// Always recurse on branches
+	LLView* child = branch->getChildView(name, recurse, FALSE);
+	if (!child)
+	{
+		child = LLView::getChildView(name, recurse, create_if_missing);
 	}
-	return LLView::getChildView(name, recurse, create_if_missing);;
+	return child;
 }
 
 // virtual
@@ -1086,49 +898,35 @@ BOOL LLMenuItemBranchGL::handleMouseUp(S32 x, S32 y, MASK mask)
 	// switch to mouse navigation mode
 	LLMenuGL::setKeyboardMode(FALSE);
 
-	doIt();
+	onCommit();
 	make_ui_sound("UISndClickRelease");
 	return TRUE;
 }
 
 BOOL LLMenuItemBranchGL::handleAcceleratorKey(KEY key, MASK mask)
 {
-	if(getBranch())
-	{
-		return getBranch()->handleAcceleratorKey(key, mask);
-	}
-	return FALSE;
-}
-
-// virtual
-LLXMLNodePtr LLMenuItemBranchGL::getXML(bool save_children) const
-{
-	if (getBranch())
-	{
-		return getBranch()->getXML();
-	}
-
-	return LLMenuItemGL::getXML();
+	return getBranch() && getBranch()->handleAcceleratorKey(key, mask);
 }
 
-
 // This function checks to see if the accelerator key is already in use;
 // if not, it will be added to the list
 BOOL LLMenuItemBranchGL::addToAcceleratorList(std::list<LLKeyBinding*> *listp)
 {
-	if(getBranch())
-	{
-		U32 item_count = getBranch()->getItemCount();
-		LLMenuItemGL *item;
+	LLMenuGL* branch = getBranch();
+	if (!branch)
+		return FALSE;
 
-		while (item_count--)
+	U32 item_count = branch->getItemCount();
+	LLMenuItemGL *item;
+	
+	while (item_count--)
+	{
+		if ((item = branch->getItem(item_count)))
 		{
-			if ((item = getBranch()->getItem(item_count)))
-			{
-				return item->addToAcceleratorList(listp);
-			}
+			return item->addToAcceleratorList(listp);
 		}
 	}
+
 	return FALSE;
 }
 
@@ -1143,23 +941,24 @@ void LLMenuItemBranchGL::buildDrawLabel( void )
 	mDrawBranchLabel = BRANCH_SUFFIX;
 }
 
-// doIt() - do the primary functionality of the menu item.
-void LLMenuItemBranchGL::doIt( void )
+void LLMenuItemBranchGL::onCommit( void )
 {
 	openMenu();
 
 	// keyboard navigation automatically propagates highlight to sub-menu
 	// to facilitate fast menu control via jump keys
-	if (getBranch() && LLMenuGL::getKeyboardMode() && !getBranch()->getHighlightedItem())
+	if (LLMenuGL::getKeyboardMode() && getBranch()&& !getBranch()->getHighlightedItem())
 	{
 		getBranch()->highlightNextItem(NULL);
 	}
+	
+	LLUICtrl::onCommit();
 }
 
 BOOL LLMenuItemBranchGL::handleKey(KEY key, MASK mask, BOOL called_from_parent)
 {
 	BOOL handled = FALSE;
-	if (called_from_parent && getBranch())
+	if (getBranch() && called_from_parent)
 	{
 		handled = getBranch()->handleKey(key, mask, called_from_parent);
 	}
@@ -1175,7 +974,7 @@ BOOL LLMenuItemBranchGL::handleKey(KEY key, MASK mask, BOOL called_from_parent)
 BOOL LLMenuItemBranchGL::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent)
 {
 	BOOL handled = FALSE;
-	if (called_from_parent && getBranch())
+	if (getBranch() && called_from_parent)
 	{
 		handled = getBranch()->handleUnicodeChar(uni_char, TRUE);
 	}
@@ -1191,21 +990,21 @@ BOOL LLMenuItemBranchGL::handleUnicodeChar(llwchar uni_char, BOOL called_from_pa
 
 void LLMenuItemBranchGL::setHighlight( BOOL highlight )
 {
-	if (highlight == getHighlight()) return;
+	if (highlight == getHighlight())
+		return;
 
-	if(!getBranch())
-	{ 
+	LLMenuGL* branch = getBranch();
+	if (!branch)
 		return;
-	}
 
-	BOOL auto_open = getEnabled() && (!getBranch()->getVisible() || getBranch()->getTornOff());
+	BOOL auto_open = getEnabled() && (!branch->getVisible() || branch->getTornOff());
 	// torn off menus don't open sub menus on hover unless they have focus
 	if (getMenu()->getTornOff() && !((LLFloater*)getMenu()->getParent())->hasFocus())
 	{
 		auto_open = FALSE;
 	}
 	// don't auto open torn off sub-menus (need to explicitly active menu item to give them focus)
-	if (getBranch()->getTornOff())
+	if (branch->getTornOff())
 	{
 		auto_open = FALSE;
 	}
@@ -1219,14 +1018,14 @@ void LLMenuItemBranchGL::setHighlight( BOOL highlight )
 	}
 	else
 	{
-		if (getBranch()->getTornOff())
+		if (branch->getTornOff())
 		{
-			((LLFloater*)getBranch()->getParent())->setFocus(FALSE);
-			getBranch()->clearHoverItem();
+			((LLFloater*)branch->getParent())->setFocus(FALSE);
+			branch->clearHoverItem();
 		}
 		else
 		{
-			getBranch()->setVisible( FALSE );
+			branch->setVisible( FALSE );
 		}
 	}
 }
@@ -1260,15 +1059,19 @@ void LLMenuItemBranchGL::onVisibilityChange( BOOL new_visibility )
 
 BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask )
 {
-	if (getMenu()->getVisible() && getBranch() && getBranch()->getVisible() && key == KEY_LEFT)
+	LLMenuGL* branch = getBranch();
+	if (!branch)
+		return LLMenuItemGL::handleKeyHere(key, mask);
+
+	if (getMenu()->getVisible() && branch->getVisible() && key == KEY_LEFT)
 	{
 		// switch to keyboard navigation mode
 		LLMenuGL::setKeyboardMode(TRUE);
 
-		BOOL handled = getBranch()->clearHoverItem();
-		if (getBranch()->getTornOff())
+		BOOL handled = branch->clearHoverItem();
+		if (branch->getTornOff())
 		{
-			((LLFloater*)getBranch()->getParent())->setFocus(FALSE);
+			((LLFloater*)branch->getParent())->setFocus(FALSE);
 		}
 		if (handled && getMenu()->getTornOff())
 		{
@@ -1279,12 +1082,12 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask )
 
 	if (getHighlight() && 
 		getMenu()->isOpen() && 
-		key == KEY_RIGHT && getBranch() && !getBranch()->getHighlightedItem())
+		key == KEY_RIGHT && !branch->getHighlightedItem())
 	{
 		// switch to keyboard navigation mode
 		LLMenuGL::setKeyboardMode(TRUE);
 
-		LLMenuItemGL* itemp = getBranch()->highlightNextItem(NULL);
+		LLMenuItemGL* itemp = branch->highlightNextItem(NULL);
 		if (itemp)
 		{
 			return TRUE;
@@ -1296,39 +1099,41 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask )
 
 void LLMenuItemBranchGL::openMenu()
 {
-	if(!getBranch()) return;
+	LLMenuGL* branch = getBranch();
+	if (!branch)
+		return;
 
-	if (getBranch()->getTornOff())
+	if (branch->getTornOff())
 	{
-		gFloaterView->bringToFront((LLFloater*)getBranch()->getParent());
+		gFloaterView->bringToFront((LLFloater*)branch->getParent());
 		// this might not be necessary, as torn off branches don't get focus and hence no highligth
-		getBranch()->highlightNextItem(NULL);
+		branch->highlightNextItem(NULL);
 	}
-	else if( !getBranch()->getVisible() )
+	else if( !branch->getVisible() )
 	{
 		// get valid rectangle for menus
 		const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getMenuRect();
 
-		getBranch()->arrange();
+		branch->arrange();
 
-		LLRect rect = getBranch()->getRect();
+		LLRect rect = branch->getRect();
 		// calculate root-view relative position for branch menu
 		S32 left = getRect().mRight;
 		S32 top = getRect().mTop - getRect().mBottom;
 
-		localPointToOtherView(left, top, &left, &top, getBranch()->getParent());
+		localPointToOtherView(left, top, &left, &top, branch->getParent());
 
 		rect.setLeftTopAndSize( left, top,
 								rect.getWidth(), rect.getHeight() );
 
-		if (getBranch()->getCanTearOff())
+		if (branch->getCanTearOff())
 		{
 			rect.translate(0, TEAROFF_SEPARATOR_HEIGHT_PIXELS);
 		}
-		getBranch()->setRect( rect );
+		branch->setRect( rect );
 		S32 x = 0;
 		S32 y = 0;
-		getBranch()->localPointToOtherView( 0, 0, &x, &y, getBranch()->getParent() ); 
+		branch->localPointToOtherView( 0, 0, &x, &y, branch->getParent() ); 
 		S32 delta_x = 0;
 		S32 delta_y = 0;
 		if( y < menu_region_rect.mBottom )
@@ -1342,9 +1147,9 @@ void LLMenuItemBranchGL::openMenu()
 			// move sub-menu over to left side
 			delta_x = llmax(-x, (-1 * (rect.getWidth() + getRect().getWidth())));
 		}
-		getBranch()->translate( delta_x, delta_y );
-		getBranch()->setVisible( TRUE );
-		getBranch()->getParent()->sendChildToFront(getBranch());
+		branch->translate( delta_x, delta_y );
+		branch->setVisible( TRUE );
+		branch->getParent()->sendChildToFront(branch);
 	}
 }
 
@@ -1361,10 +1166,7 @@ class LLMenuItemBranchDownGL : public LLMenuItemBranchGL
 protected:
 
 public:
-	LLMenuItemBranchDownGL( const std::string& name, const std::string& label, LLHandle<LLView> branch,
-							KEY key = KEY_NONE, MASK mask = MASK_NONE );
-
-	virtual std::string getType() const	{ return "menu"; }
+	LLMenuItemBranchDownGL( const Params& );
 
 	// returns the normal width of this control in pixels - this is
 	// used for calculating the widest item, as well as for horizontal
@@ -1392,11 +1194,8 @@ public:
 	virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
 };
 
-LLMenuItemBranchDownGL::LLMenuItemBranchDownGL( const std::string& name,
-												const std::string& label,
-												LLHandle<LLView> branch, 
-												KEY key, MASK mask ) :
-	LLMenuItemBranchGL( name, label, branch, key, mask )
+LLMenuItemBranchDownGL::LLMenuItemBranchDownGL( const Params& p) :
+	LLMenuItemBranchGL(p)
 {
 }
 
@@ -1501,7 +1300,7 @@ BOOL LLMenuItemBranchDownGL::handleMouseDown( S32 x, S32 y, MASK mask )
 {
 	// switch to mouse control mode
 	LLMenuGL::setKeyboardMode(FALSE);
-	doIt();
+	onCommit();
 	make_ui_sound("UISndClick");
 	return TRUE;
 }
@@ -1540,7 +1339,7 @@ BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask)
 			// open new menu only if previous menu was open
 			if (itemp && itemp->getEnabled() && menu_open)
 			{
-				itemp->doIt();
+				itemp->onCommit();
 			}
 
 			return TRUE;
@@ -1554,7 +1353,7 @@ BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask)
 			// open new menu only if previous menu was open
 			if (itemp && itemp->getEnabled() && menu_open)
 			{
-				itemp->doIt();
+				itemp->onCommit();
 			}
 
 			return TRUE;
@@ -1566,7 +1365,7 @@ BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask)
 
 			if (!isActive())
 			{
-				doIt();
+				onCommit();
 			}
 			getBranch()->highlightNextItem(NULL);
 			return TRUE;
@@ -1578,7 +1377,7 @@ BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask)
 
 			if (!isActive())
 			{
-				doIt();
+				onCommit();
 			}
 			getBranch()->highlightPrevItem(NULL);
 			return TRUE;
@@ -1598,31 +1397,31 @@ void LLMenuItemBranchDownGL::draw( void )
 
 	if( getHighlight() )
 	{
-		gGL.color4fv( getHighlightBGColor().mV );
+		gGL.color4fv( mHighlightBackground.get().mV );
 		gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0 );
 	}
 
-	U8 font_style = getFontStyle();
+	LLFontGL::ShadowType shadow_style = LLFontGL::NO_SHADOW;
 	if (getEnabled() && !getDrawTextDisabled() )
 	{
-		font_style |= LLFontGL::DROP_SHADOW_SOFT;
+		shadow_style = LLFontGL::DROP_SHADOW_SOFT;
 	}
 
 	LLColor4 color;
 	if (getHighlight())
 	{
-		color = getHighlightFGColor();
+		color = mHighlightForeground.get();
 	}
 	else if( getEnabled() )
 	{
-		color = getEnabledColor();
+		color = mEnabledColor.get();
 	}
 	else
 	{
-		color = getDisabledColor();
+		color = mDisabledColor.get();
 	}
 	getFont()->render( mLabel.getWString(), 0, (F32)getRect().getWidth() / 2.f, (F32)LABEL_BOTTOM_PAD_PIXELS, color,
-				   LLFontGL::HCENTER, LLFontGL::BOTTOM, font_style );
+				   LLFontGL::HCENTER, LLFontGL::BOTTOM, LLFontGL::NORMAL, shadow_style );
 
 
 	// underline navigation key only when keyboard navigation has been initiated
@@ -1651,16 +1450,14 @@ void LLMenuItemBranchDownGL::draw( void )
 
 static LLRegisterWidget<LLMenuGL> r1("menu");
 
-// Default constructor
-LLMenuGL::LLMenuGL( const std::string& name, const std::string& label, LLHandle<LLFloater> parent_floater_handle )
-:	LLUICtrl( name, LLRect(), FALSE, NULL, NULL ),
-	mBackgroundColor( sDefaultBackgroundColor ),
-	mBgVisible( TRUE ),
-	mParentMenuItem( NULL ),
-	mLabel( label ),
-	mDropShadowed( TRUE ),
-	mHorizontalLayout( FALSE ),
-	mKeepFixedSize( FALSE ),
+LLMenuGL::LLMenuGL(const LLMenuGL::Params& p)
+:	LLUICtrl(p),
+	mBackgroundColor( p.bg_color() ),
+	mBgVisible( p.bg_visible ),
+	mDropShadowed( p.drop_shadow ),
+	mHorizontalLayout( p.horizontal_layout ),
+	mKeepFixedSize( p.keep_fixed_size ),
+	mLabel (p.label),
 	mLastMouseX(0),
 	mLastMouseY(0),
 	mMouseVelX(0),
@@ -1669,37 +1466,36 @@ LLMenuGL::LLMenuGL( const std::string& name, const std::string& label, LLHandle<
 	mTearOffItem(NULL),
 	mSpilloverBranch(NULL),
 	mSpilloverMenu(NULL),
-	mParentFloaterHandle(parent_floater_handle),
-	mJumpKey(KEY_NONE)
+	mJumpKey(p.jump_key),
+	mCreateJumpKeys(p.create_jump_keys),
+	mParentFloaterHandle(p.parent_floater),
+	mNeedsArrange(FALSE)
 {
+	typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
+	boost::char_separator<char> sep("_");
+	tokenizer tokens(p.label(), sep);
+	tokenizer::iterator token_iter;
+
+	S32 token_count = 0;
+	std::string new_menu_label;
+	for( token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
+	{
+		new_menu_label += (*token_iter);
+		if (token_count > 0)
+		{
+			setJumpKey((*token_iter).c_str()[0]);
+		}
+		++token_count;
+	}
+	setLabel(new_menu_label);
+
 	mFadeTimer.stop();
-	setCanTearOff(TRUE, parent_floater_handle);
-	setTabStop(FALSE);
-}
-
-LLMenuGL::LLMenuGL( const std::string& label, LLHandle<LLFloater> parent_floater_handle )
-:	LLUICtrl( label, LLRect(), FALSE, NULL, NULL ),
-	mBackgroundColor( sDefaultBackgroundColor ),
-	mBgVisible( TRUE ),
-	mParentMenuItem( NULL ),
-	mLabel( label ),
-	mDropShadowed( TRUE ),
-	mHorizontalLayout( FALSE ),
-	mKeepFixedSize( FALSE ),
-	mLastMouseX(0),
-	mLastMouseY(0),
-	mMouseVelX(0),
-	mMouseVelY(0),
-	mTornOff(FALSE),
-	mTearOffItem(NULL),
-	mSpilloverBranch(NULL),
-	mSpilloverMenu(NULL),
-	mParentFloaterHandle(parent_floater_handle),
-	mJumpKey(KEY_NONE)
+}
+
+void LLMenuGL::initFromParams(const LLMenuGL::Params& p)
 {
-	mFadeTimer.stop();
-	setCanTearOff(TRUE, parent_floater_handle);
-	setTabStop(FALSE);
+	LLUICtrl::initFromParams(p);
+	setCanTearOff(p.can_tear_off, p.parent_floater);
 }
 
 // Destroys the object
@@ -1715,10 +1511,10 @@ void LLMenuGL::setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_h
 {
 	if (tear_off && mTearOffItem == NULL)
 	{
-		mTearOffItem = new LLMenuItemTearOffGL(parent_floater_handle);
-		mItems.insert(mItems.begin(), mTearOffItem);
-		addChildAtEnd(mTearOffItem);
-		arrange();
+		LLMenuItemTearOffGL::Params p;
+		p.parent_floater_handle = parent_floater_handle;
+		mTearOffItem = LLUICtrlFactory::create<LLMenuItemTearOffGL>(p);
+		addChildInBack(mTearOffItem);
 	}
 	else if (!tear_off && mTearOffItem != NULL)
 	{
@@ -1726,337 +1522,68 @@ void LLMenuGL::setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_h
 		removeChild(mTearOffItem);
 		delete mTearOffItem;
 		mTearOffItem = NULL;
-		arrange();
+		needsArrange();
 	}
 }
 
-// virtual
-LLXMLNodePtr LLMenuGL::getXML(bool save_children) const
+bool LLMenuGL::addChild(LLView* view, S32 tab_group)
 {
-	LLXMLNodePtr node = LLView::getXML();
-
-	// Attributes
-
-	node->createChild("opaque", TRUE)->setBoolValue(mBgVisible);
-
-	node->createChild("drop_shadow", TRUE)->setBoolValue(mDropShadowed);
-
-	node->createChild("tear_off", TRUE)->setBoolValue((mTearOffItem != NULL));
-
-	if (mBgVisible)
+	if (LLMenuGL* menup = dynamic_cast<LLMenuGL*>(view))
 	{
-		// TomY TODO: this should save out the color control name
-		node->createChild("color", TRUE)->setFloatValue(4, mBackgroundColor.mV);
+		appendMenu(menup);
+		return true;
 	}
-
-	// Contents
-	item_list_t::const_iterator item_iter;
-	for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
+	else if (LLMenuItemGL* itemp = dynamic_cast<LLMenuItemGL*>(view))
 	{
-		LLView* child = (*item_iter);
-		LLMenuItemGL* item = (LLMenuItemGL*)child;
-
-		LLXMLNodePtr child_node = item->getXML();
-
-		node->addChild(child_node);
+		append(itemp);
+		return true;
 	}
-
-	return node;
+	return false;
 }
 
-void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory *factory)
+void LLMenuGL::removeChild( LLView* ctrl)
 {
-	if (child->hasName(LL_MENU_GL_TAG))
+	LLMenuItemGL* itemp = dynamic_cast<LLMenuItemGL*>(ctrl);
+	if (itemp)
 	{
-		// SUBMENU
-		LLMenuGL *submenu = (LLMenuGL*)LLMenuGL::fromXML(child, parent, factory);
-		appendMenu(submenu);
-		if (LLMenuGL::sMenuContainer != NULL)
-		{
-			submenu->updateParent(LLMenuGL::sMenuContainer);
-		}
-		else
+		item_list_t::iterator found_it = std::find(mItems.begin(), mItems.end(), (itemp));
+		if (found_it != mItems.end())
 		{
-			submenu->updateParent(parent);
+			mItems.erase(found_it);
 		}
 	}
-	else if (child->hasName(LL_MENU_ITEM_CALL_GL_TAG) || 
-			child->hasName(LL_MENU_ITEM_CHECK_GL_TAG) || 
-			child->hasName(LL_MENU_ITEM_SEPARATOR_GL_TAG))
-	{
-		LLMenuItemGL *item = NULL;
+	return LLUICtrl::removeChild(ctrl);
+}
 
-		std::string type;
-		std::string item_name;
-		std::string source_label;
-		std::string item_label;
-		KEY		 jump_key = KEY_NONE;
+BOOL LLMenuGL::postBuild()
+{
+	createJumpKeys();
+	return LLUICtrl::postBuild();
+}
 
-		child->getAttributeString("type", type);
-		child->getAttributeString("name", item_name);
-		child->getAttributeString("label", source_label);
 
-		// parse jump key out of label
-		typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
-		boost::char_separator<char> sep("_");
-		tokenizer tokens(source_label, sep);
-		tokenizer::iterator token_iter;
-		S32 token_count = 0;
-		for( token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
-		{
-			item_label += (*token_iter);
-			if (token_count > 0)
-			{
-				jump_key = (*token_iter).c_str()[0];
-			}
-			++token_count;
-		}
+// are we the childmost active menu and hence our jump keys should be enabled?
+// or are we a free-standing torn-off menu (which uses jump keys too)
+BOOL LLMenuGL::jumpKeysActive()
+{
+	LLMenuItemGL* highlighted_item = getHighlightedItem();
+	BOOL active = getVisible() && getEnabled();
+	if (getTornOff())
+	{
+		// activation of jump keys on torn off menus controlled by keyboard focus
+		active = active && ((LLFloater*)getParent())->hasFocus();
 
-
-		if (child->hasName(LL_MENU_ITEM_SEPARATOR_GL_TAG))
-		{
-			appendSeparator(item_name);
-		}
-		else
-		{
-			// ITEM
-			if (child->hasName(LL_MENU_ITEM_CALL_GL_TAG) || 
-				child->hasName(LL_MENU_ITEM_CHECK_GL_TAG))
-			{
-				MASK mask = 0;
-							
-#ifdef LL_DARWIN
-				// See if this Mac accelerator should really use the ctrl key and not get mapped to cmd
-				BOOL useMacCtrl = FALSE;
-				child->getAttributeBOOL("useMacCtrl", useMacCtrl);
-#endif // LL_DARWIN
-				
-				std::string shortcut;
-				child->getAttributeString("shortcut", shortcut);
-				if (shortcut.find("control") != shortcut.npos)
-				{
-#ifdef LL_DARWIN
-					if ( useMacCtrl )
-					{
-						mask |= MASK_MAC_CONTROL;
-					}
-#endif // LL_DARWIN
-					mask |= MASK_CONTROL;
-				}
-				if (shortcut.find("alt") != shortcut.npos)
-				{
-					mask |= MASK_ALT;
-				}
-				if (shortcut.find("shift") != shortcut.npos)
-				{
-					mask |= MASK_SHIFT;
-				}
-				S32 pipe_pos = shortcut.rfind("|");
-				std::string key_str = shortcut.substr(pipe_pos+1);
-
-				KEY key = KEY_NONE;
-				LLKeyboard::keyFromString(key_str, &key);
-
-				LLMenuItemCallGL *new_item;
-				LLXMLNodePtr call_child;
-
-				if (child->hasName(LL_MENU_ITEM_CHECK_GL_TAG))
-				{
-					std::string control_name;
-					child->getAttributeString("control_name", control_name);
-
-					new_item = new LLMenuItemCheckGL(item_name, item_label, 0, 0, control_name, parent, 0, key, mask);
-
-					for (call_child = child->getFirstChild(); call_child.notNull(); call_child = call_child->getNextSibling())
-					{
-						if (call_child->hasName("on_check"))
-						{
-							std::string callback_name;
-							std::string control_name;
-							if (call_child->hasAttribute("function"))
-							{
-								call_child->getAttributeString("function", callback_name);
-
-								control_name = callback_name;
-
-								std::string callback_data = item_name;
-								if (call_child->hasAttribute("userdata"))
-								{
-									call_child->getAttributeString("userdata", callback_data);
-									if (!callback_data.empty())
-									{
-										control_name = llformat("%s(%s)", callback_name.c_str(), callback_data.c_str());
-									}
-								}
-
-								LLSD userdata;
-								userdata["control"] = control_name;
-								userdata["data"] = callback_data;
-
-								LLSimpleListener* callback = parent->getListenerByName(callback_name);
-
-								if (!callback) continue;
-
-								new_item->addListener(callback, "on_build", userdata);
-							}
-							else if (call_child->hasAttribute("control"))
-							{
-								call_child->getAttributeString("control", control_name);
-							}
-							else
-							{
-								continue;
-							}
-							LLControlVariable *control = parent->findControl(control_name);
-							if (!control)
-							{
-								parent->addBoolControl(control_name, FALSE);
-							}
-							((LLMenuItemCheckGL*)new_item)->setCheckedControl(control_name, parent);
-						}
-					}
-				}
-				else
-				{
-					new_item = new LLMenuItemCallGL(item_name, item_label, 0, 0, 0, 0, key, mask);
-				}
-
-				for (call_child = child->getFirstChild(); call_child.notNull(); call_child = call_child->getNextSibling())
-				{
-					if (call_child->hasName("on_click"))
-					{
-						std::string callback_name;
-						call_child->getAttributeString("function", callback_name);
-
-						std::string callback_data = item_name;
-						if (call_child->hasAttribute("userdata"))
-						{
-							call_child->getAttributeString("userdata", callback_data);
-						}
-
-						LLSimpleListener* callback = parent->getListenerByName(callback_name);
-
-						if (!callback) continue;
-
-						new_item->addListener(callback, "on_click", callback_data);
-					}
-					if (call_child->hasName("on_enable"))
-					{
-						std::string callback_name;
-						std::string control_name;
-						if (call_child->hasAttribute("function"))
-						{
-							call_child->getAttributeString("function", callback_name);
-
-							control_name = callback_name;
-
-							std::string callback_data;
-							if (call_child->hasAttribute("userdata"))
-							{
-								call_child->getAttributeString("userdata", callback_data);
-								if (!callback_data.empty())
-								{
-									control_name = llformat("%s(%s)", callback_name.c_str(), callback_data.c_str());
-								}
-							}
-
-							LLSD userdata;
-							userdata["control"] = control_name;
-							userdata["data"] = callback_data;
-
-							LLSimpleListener* callback = parent->getListenerByName(callback_name);
-
-							if (!callback) continue;
-
-							new_item->addListener(callback, "on_build", userdata);
-						}
-						else if (call_child->hasAttribute("control"))
-						{
-							call_child->getAttributeString("control", control_name);
-						}
-						else
-						{
-							continue;
-						}
-						new_item->setEnabledControl(control_name, parent);
-					}
-					if (call_child->hasName("on_visible"))
-					{
-						std::string callback_name;
-						std::string control_name;
-						if (call_child->hasAttribute("function"))
-						{
-							call_child->getAttributeString("function", callback_name);
-
-							control_name = callback_name;
-
-							std::string callback_data;
-							if (call_child->hasAttribute("userdata"))
-							{
-								call_child->getAttributeString("userdata", callback_data);
-								if (!callback_data.empty())
-								{
-									control_name = llformat("%s(%s)", callback_name.c_str(), callback_data.c_str());
-								}
-							}
-
-							LLSD userdata;
-							userdata["control"] = control_name;
-							userdata["data"] = callback_data;
-
-							LLSimpleListener* callback = parent->getListenerByName(callback_name);
-
-							if (!callback) continue;
-
-							new_item->addListener(callback, "on_build", userdata);
-						}
-						else if (call_child->hasAttribute("control"))
-						{
-							call_child->getAttributeString("control", control_name);
-						}
-						else
-						{
-							continue;
-						}
-						new_item->setVisibleControl(control_name, parent);
-					}
-				}
-				item = new_item;
-				item->setLabel(item_label);
-				if (jump_key != KEY_NONE)
-					item->setJumpKey(jump_key);
-			}
-
-			if (item != NULL)
-			{
-				append(item);
-			}
-		}
-	}
-}
-
-// are we the childmost active menu and hence our jump keys should be enabled?
-// or are we a free-standing torn-off menu (which uses jump keys too)
-BOOL LLMenuGL::jumpKeysActive()
-{
-	LLMenuItemGL* highlighted_item = getHighlightedItem();
-	BOOL active = getVisible() && getEnabled();
-	if (getTornOff())
-	{
-		// activation of jump keys on torn off menus controlled by keyboard focus
-		active = active && ((LLFloater*)getParent())->hasFocus();
-
-	}
-	else
-	{
-		// Are we the terminal active menu?
-		// Yes, if parent menu item deems us to be active (just being visible is sufficient for top-level menus)
-		// and we don't have a highlighted menu item pointing to an active sub-menu
-		active = active && (!getParentMenuItem() || getParentMenuItem()->isActive()) // I have a parent that is active...
-		                && (!highlighted_item || !highlighted_item->isActive()); //... but no child that is active
-	}
-	return active;
-}
+	}
+	else
+	{
+		// Are we the terminal active menu?
+		// Yes, if parent menu item deems us to be active (just being visible is sufficient for top-level menus)
+		// and we don't have a highlighted menu item pointing to an active sub-menu
+		active = active && (!getParentMenuItem() || getParentMenuItem()->isActive()) // I have a parent that is active...
+		                && (!highlighted_item || !highlighted_item->isActive()); //... but no child that is active
+	}
+	return active;
+}
 
 BOOL LLMenuGL::isOpen()
 {
@@ -2079,75 +1606,6 @@ BOOL LLMenuGL::isOpen()
 		return getVisible();
 	}
 }
-// static
-LLView* LLMenuGL::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("menu");
-	node->getAttributeString("name", name);
-
-	std::string label = name;
-	node->getAttributeString("label", label);
-
-	// parse jump key out of label
-	std::string new_menu_label;
-
-	typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
-	boost::char_separator<char> sep("_");
-	tokenizer tokens(label, sep);
-	tokenizer::iterator token_iter;
-
-	KEY jump_key = KEY_NONE;
-	S32 token_count = 0;
-	for( token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
-	{
-		new_menu_label += (*token_iter);
-		if (token_count > 0)
-		{
-			jump_key = (*token_iter).c_str()[0];
-		}
-		++token_count;
-	}
-
-	BOOL opaque = FALSE;
-	node->getAttributeBOOL("opaque", opaque);
-
-	LLMenuGL *menu = new LLMenuGL(name, new_menu_label);
-
-	menu->setJumpKey(jump_key);
-
-	BOOL tear_off = FALSE;
-	node->getAttributeBOOL("tear_off", tear_off);
-	menu->setCanTearOff(tear_off);
-
-	if (node->hasAttribute("drop_shadow"))
-	{
-		BOOL drop_shadow = FALSE;
-		node->getAttributeBOOL("drop_shadow", drop_shadow);
-		menu->setDropShadowed(drop_shadow);
-	}
-
-	menu->setBackgroundVisible(opaque);
-	LLColor4 color(0,0,0,1);
-	if (opaque && LLUICtrlFactory::getAttributeColor(node,"color", color))
-	{
-		menu->setBackgroundColor(color);
-	}
-
-	BOOL create_jump_keys = FALSE;
-	node->getAttributeBOOL("create_jump_keys", create_jump_keys);
-
-	LLXMLNodePtr child;
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-	{
-		menu->parseChildXML(child, parent, factory);
-	}
-
-	if (create_jump_keys)
-	{
-		menu->createJumpKeys();
-	}
-	return menu;
-}
 
 
 // rearrange the child rects so they fit the shape of the menu.
@@ -2169,7 +1627,7 @@ void LLMenuGL::arrange( void )
 		U32 max_width = getTornOff() ? U32_MAX : menu_region_rect.getWidth();
 		U32 max_height = getTornOff() ? U32_MAX : menu_region_rect.getHeight();
 		// *FIX: create the item first and then ask for its dimensions?
-		S32 spillover_item_width = PLAIN_PAD_PIXELS + LLFontGL::getFontSansSerif()->getWidth( std::string("More") );
+		S32 spillover_item_width = PLAIN_PAD_PIXELS + LLFontGL::getFontSansSerif()->getWidth( std::string("More") ); // *TODO: Translate
 		S32 spillover_item_height = llround(LLFontGL::getFontSansSerif()->getLineHeight()) + MENU_ITEM_PADDING;
 
 		if (mHorizontalLayout)
@@ -2179,22 +1637,25 @@ void LLMenuGL::arrange( void )
 			{
 				if ((*item_iter)->getVisible())
 				{
-					if (!getTornOff() && width + (*item_iter)->getNominalWidth() > max_width - spillover_item_width)
+					if (!getTornOff() 
+						&& *item_iter != mSpilloverBranch
+						&& width + (*item_iter)->getNominalWidth() > max_width - spillover_item_width)
 					{
 						// no room for any more items
 						createSpilloverBranch();
 
-						item_list_t::iterator spillover_iter;
-						for (spillover_iter = item_iter; spillover_iter != mItems.end(); ++spillover_iter)
+						std::vector<LLMenuItemGL*> items_to_remove;
+						std::copy(item_iter, mItems.end(), std::back_inserter(items_to_remove));
+						std::vector<LLMenuItemGL*>::iterator spillover_iter;
+						for (spillover_iter= items_to_remove.begin(); spillover_iter != items_to_remove.end(); ++spillover_iter)
 						{
 							LLMenuItemGL* itemp = (*spillover_iter);
 							removeChild(itemp);
-							mSpilloverMenu->append(itemp);
+							mSpilloverMenu->addChild(itemp);
 						}
-						mItems.erase(item_iter, mItems.end());
-						
-						mItems.push_back(mSpilloverBranch);
+
 						addChild(mSpilloverBranch);
+						
 						height = llmax(height, mSpilloverBranch->getNominalHeight());
 						width += mSpilloverBranch->getNominalWidth();
 
@@ -2216,21 +1677,26 @@ void LLMenuGL::arrange( void )
 			{
 				if ((*item_iter)->getVisible())
 				{
-					if (!getTornOff() && height + (*item_iter)->getNominalHeight() > max_height - spillover_item_height)
+					if (!getTornOff() 
+						&& *item_iter != mSpilloverBranch
+						&& height + (*item_iter)->getNominalHeight() > max_height - spillover_item_height)
 					{
 						// no room for any more items
 						createSpilloverBranch();
 
-						item_list_t::iterator spillover_iter;
-						for (spillover_iter= item_iter; spillover_iter != mItems.end(); ++spillover_iter)
+						std::vector<LLMenuItemGL*> items_to_remove;
+						std::copy(item_iter, mItems.end(), std::back_inserter(items_to_remove));
+						std::vector<LLMenuItemGL*>::iterator spillover_iter;
+						for (spillover_iter= items_to_remove.begin(); spillover_iter != items_to_remove.end(); ++spillover_iter)
 						{
 							LLMenuItemGL* itemp = (*spillover_iter);
 							removeChild(itemp);
-							mSpilloverMenu->append(itemp);
+							mSpilloverMenu->addChild(itemp);
 						}
-						mItems.erase(item_iter, mItems.end());
-						mItems.push_back(mSpilloverBranch);
+
+
 						addChild(mSpilloverBranch);
+
 						height += mSpilloverBranch->getNominalHeight();
 						width = llmax( width, mSpilloverBranch->getNominalWidth() );
 
@@ -2278,6 +1744,15 @@ void LLMenuGL::arrange( void )
 	}
 }
 
+void LLMenuGL::arrangeAndClear( void )
+{
+	if (mNeedsArrange)
+	{
+		arrange();
+		mNeedsArrange = FALSE;
+	}
+}
+
 void LLMenuGL::createSpilloverBranch()
 {
 	if (!mSpilloverBranch)
@@ -2286,14 +1761,24 @@ void LLMenuGL::createSpilloverBranch()
 		delete mSpilloverMenu;
 		// technically, you can't tear off spillover menus, but we're passing the handle
 		// along just to be safe
-		mSpilloverMenu = new LLMenuGL(std::string("More"), std::string("More"), mParentFloaterHandle);
+		LLMenuGL::Params p;
+		p.name("More");
+		p.label("More"); // *TODO: Translate
+		p.parent_floater(mParentFloaterHandle);
+		p.bg_color(mBackgroundColor);
+		p.bg_visible(true);
+		p.can_tear_off(false);
+		mSpilloverMenu = new LLMenuGL(p);
 		mSpilloverMenu->updateParent(LLMenuGL::sMenuContainer);
-		// Inherit colors
-		mSpilloverMenu->setBackgroundColor( mBackgroundColor );
-		mSpilloverMenu->setCanTearOff(FALSE);
 
-		mSpilloverBranch = new LLMenuItemBranchGL(std::string("More"), std::string("More"), mSpilloverMenu->getHandle());
-		mSpilloverBranch->setFontStyle(LLFontGL::ITALIC);
+		LLMenuItemBranchGL::Params branch_params;
+		branch_params.name = "More";
+		branch_params.label = "More"; // *TODO: Translate
+		branch_params.branch = mSpilloverMenu;
+		branch_params.font.style = "italic";
+
+
+		mSpilloverBranch = LLUICtrlFactory::create<LLMenuItemBranchGL>(branch_params);
 	}
 }
 
@@ -2304,25 +1789,15 @@ void LLMenuGL::cleanupSpilloverBranch()
 		// head-recursion to propagate items back up to root menu
 		mSpilloverMenu->cleanupSpilloverBranch();
 
-		removeChild(mSpilloverBranch);
-
-		item_list_t::iterator found_iter = std::find(mItems.begin(), mItems.end(), mSpilloverBranch);
-		if (found_iter != mItems.end())
-		{
-			mItems.erase(found_iter);
-		}
-
 		// pop off spillover items
 		while (mSpilloverMenu->getItemCount())
 		{
 			LLMenuItemGL* itemp = mSpilloverMenu->getItem(0);
 			mSpilloverMenu->removeChild(itemp);
-			mSpilloverMenu->mItems.erase(mSpilloverMenu->mItems.begin());
 			// put them at the end of our own list
-			mItems.push_back(itemp);
 			addChild(itemp);
 		}
-
+		
 		// Delete the branch, and since the branch will delete the menu,
 		// set the menu* to null.
 		delete mSpilloverBranch;
@@ -2333,6 +1808,9 @@ void LLMenuGL::cleanupSpilloverBranch()
 
 void LLMenuGL::createJumpKeys()
 {
+	if (!mCreateJumpKeys) return;
+	mCreateJumpKeys = FALSE;
+
 	mJumpKeys.clear();
 
 	std::set<std::string> unique_words;
@@ -2442,7 +1920,7 @@ void LLMenuGL::empty( void )
 void LLMenuGL::setLeftAndBottom(S32 left, S32 bottom)
 {
 	setRect(LLRect(left, getRect().mTop, getRect().mRight, bottom));
-	arrange();
+	needsArrange();
 }
 
 BOOL LLMenuGL::handleJumpKey(KEY key)
@@ -2455,12 +1933,9 @@ BOOL LLMenuGL::handleJumpKey(KEY key)
 		// switch to keyboard navigation mode
 		LLMenuGL::setKeyboardMode(TRUE);
 
-		// force highlight to close old menus and any open sub-menus
-
-		//clearHoverItem();
 		// force highlight to close old menus and open and sub-menus
 		found_it->second->setHighlight(TRUE);
-		found_it->second->doIt();
+		found_it->second->onCommit();
 
 	}
 	// if we are navigating the menus, we need to eat the keystroke
@@ -2472,21 +1947,18 @@ BOOL LLMenuGL::handleJumpKey(KEY key)
 // Add the menu item to this menu.
 BOOL LLMenuGL::append( LLMenuItemGL* item )
 {
+	if (!item) return FALSE;
 	mItems.push_back( item );
-	addChild( item );
-	arrange();
+	LLUICtrl::addChild(item);
+	needsArrange();
 	return TRUE;
 }
 
 // add a separator to this menu
-BOOL LLMenuGL::appendSeparator( const std::string &separator_name )
+BOOL LLMenuGL::addSeparator()
 {
-	LLMenuItemGL* separator;
-	if (separator_name.empty())
-		separator = new LLMenuItemSeparatorGL(std::string("separator"));
-	else
-		separator = new LLMenuItemSeparatorGL(separator_name);
-	return append( separator );
+	LLMenuItemGL* separator = new LLMenuItemSeparatorGL();
+	return addChild(separator);
 }
 
 // add a menu - this will create a cascading menu
@@ -2499,14 +1971,22 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu )
 	}
 	BOOL success = TRUE;
 
-	LLMenuItemBranchGL* branch = NULL;
-	branch = new LLMenuItemBranchGL( menu->getName(), menu->getLabel(), menu->getHandle() );
-	branch->setJumpKey(menu->getJumpKey());
+	LLMenuItemBranchGL::Params p;
+	p.name = menu->getName();
+	p.label = menu->getLabel();
+	p.branch = menu;
+	p.jump_key = menu->getJumpKey();
+	p.enabled_color=LLUI::getCachedColorFunctor("MenuItemEnabledColor");
+	p.disabled_color=LLUI::getCachedColorFunctor("MenuItemDisabledColor");
+	p.highlight_bg_color=LLUI::getCachedColorFunctor("MenuItemHighlightBgColor");
+	p.highlight_fg_color=LLUI::getCachedColorFunctor("MenuItemHighlightFgColor");
+
+	LLMenuItemBranchGL* branch = LLUICtrlFactory::create<LLMenuItemBranchGL>(p);
 	success &= append( branch );
 
 	// Inherit colors
 	menu->setBackgroundColor( mBackgroundColor );
-
+	menu->updateParent(LLMenuGL::sMenuContainer);
 	return success;
 }
 
@@ -2544,6 +2024,7 @@ void LLMenuGL::setItemVisible( const std::string& name, BOOL visible )
 		if( (*item_iter)->getName() == name )
 		{
 			(*item_iter)->setVisible( visible );
+			needsArrange();
 			break;
 		}
 	}
@@ -2556,7 +2037,7 @@ void LLMenuGL::setItemLastSelected(LLMenuItemGL* item)
 		LLMenuHolderGL::setActivatedItem(item);
 	}
 
-	// fix the checkmarks
+	// update enabled and checkmark status
 	item->buildDrawLabel();
 }
 
@@ -2654,7 +2135,7 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa
 	while(1)
 	{
 		// skip separators and disabled/invisible items
-		if ((*next_item_iter)->getEnabled() && (*next_item_iter)->getVisible() && (*next_item_iter)->getType() != SEPARATOR_NAME)
+		if ((*next_item_iter)->getEnabled() && (*next_item_iter)->getVisible() && !dynamic_cast<LLMenuItemSeparatorGL*>(*next_item_iter))
 		{
 			if (cur_item)
 			{
@@ -2761,7 +2242,10 @@ void LLMenuGL::updateParent(LLView* parentp)
 	{
 		getParent()->removeChild(this);
 	}
-	parentp->addChild(this);
+	if (parentp)
+	{
+		parentp->addChild(this);
+	}
 	item_list_t::iterator item_iter;
 	for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
 	{
@@ -2864,29 +2348,39 @@ BOOL LLMenuGL::handleHover( S32 x, S32 y, MASK mask )
 		}
 	}
 	getWindow()->setCursor(UI_CURSOR_ARROW);
+
+	//ProductEngine: what behavior is this addressing?
+	// *HACK Release the mouse capture
+	gFocusMgr.setMouseCapture( NULL );
+
 	return TRUE;
 }
 
 void LLMenuGL::draw( void )
 {
+	if (mNeedsArrange)
+	{
+		arrange();
+		mNeedsArrange = FALSE;
+	}
 	if (mDropShadowed && !mTornOff)
 	{
+		static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0);
+		static LLUICachedControl<LLColor4> color_drop_shadow ("ColorDropShadow", *(new LLColor4));
 		gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, 
-			LLUI::sColorsGroup->getColor("ColorDropShadow"), 
-			LLUI::sConfigGroup->getS32("DropShadowFloater") );
+			color_drop_shadow, drop_shadow_floater );
 	}
 
-	LLColor4 bg_color = mBackgroundColor;
-
 	if( mBgVisible )
 	{
-		gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor );
+		gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor.get() );
 	}
 	LLView::draw();
 }
 
-void LLMenuGL::drawBackground(LLMenuItemGL* itemp, LLColor4& color)
+void LLMenuGL::drawBackground(LLMenuItemGL* itemp, F32 alpha)
 {
+	LLColor4 color = itemp->getHighlightBgColor() % alpha;
 	gGL.color4fv( color.mV );
 	LLRect item_rect = itemp->getRect();
 	gl_rect_2d( 0, item_rect.getHeight(), item_rect.getWidth(), 0);
@@ -2962,6 +2456,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
 	const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getMenuRect();
 
 	const S32 HPAD = 2;
+	menu->arrangeAndClear(); // Fix menu rect if needed.
 	LLRect rect = menu->getRect();
 	//LLView* cur_view = spawning_view;
 	S32 left = x + HPAD;
@@ -3001,1461 +2496,956 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
 	menu->getParent()->sendChildToFront(menu);
 }
 
-//-----------------------------------------------------------------------------
-// class LLPieMenuBranch
-// A branch to another pie menu
-//-----------------------------------------------------------------------------
-class LLPieMenuBranch : public LLMenuItemGL
-{
-public:
-	LLPieMenuBranch(const std::string& name, const std::string& label, LLPieMenu* branch);
-
-	// called to rebuild the draw label
-	virtual void buildDrawLabel( void );
-
-	// doIt() - do the primary funcationality of the menu item.
-	virtual void doIt( void );
+///============================================================================
+/// Class LLMenuBarGL
+///============================================================================
 
-	LLPieMenu* getBranch() { return mBranch; }
+static LLRegisterWidget<LLMenuBarGL> r2("menu_bar");
 
-protected:
-	LLPieMenu* mBranch;
-};
+LLMenuBarGL::LLMenuBarGL( const Params& p )
+:	LLMenuGL(p),
+	mAltKeyTrigger(FALSE)
+{}
 
-LLPieMenuBranch::LLPieMenuBranch(const std::string& name,
-								 const std::string& label,
-								 LLPieMenu* branch) 
-:	LLMenuItemGL( name, label, KEY_NONE, MASK_NONE ),
-	mBranch( branch )
+// Default destructor
+LLMenuBarGL::~LLMenuBarGL()
 {
-	mBranch->hide(FALSE);
-	mBranch->setParentMenuItem(this);
+	std::for_each(mAccelerators.begin(), mAccelerators.end(), DeletePointer());
+	mAccelerators.clear();
 }
 
-// called to rebuild the draw label
-void LLPieMenuBranch::buildDrawLabel( void )
+
+BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask)
 {
+	if (getHighlightedItem() && mask == MASK_NONE)
 	{
-		// default enablement is this -- if any of the subitems are
-		// enabled, this item is enabled. JC
-		U32 sub_count = mBranch->getItemCount();
-		U32 i;
-		BOOL any_enabled = FALSE;
-		for (i = 0; i < sub_count; i++)
-		{
-			LLMenuItemGL* item = mBranch->getItem(i);
-			item->buildDrawLabel();
-			if (item->getEnabled() && !item->getDrawTextDisabled() )
-			{
-				any_enabled = TRUE;
-				break;
-			}
-		}
-		setDrawTextDisabled(!any_enabled);
-		setEnabled(TRUE);
+		// unmodified key accelerators are ignored when navigating menu
+		// (but are used as jump keys so will still work when appropriate menu is up)
+		return FALSE;
+	}
+	BOOL result = LLMenuGL::handleAcceleratorKey(key, mask);
+	if (result && mask & MASK_ALT)
+	{
+		// ALT key used to trigger hotkey, don't use as shortcut to open menu
+		mAltKeyTrigger = FALSE;
 	}
 
-	mDrawAccelLabel.clear();
-	std::string st = mDrawAccelLabel;
-	appendAcceleratorString( st );
-	mDrawAccelLabel = st;
-	
-	// No special branch suffix
-	mDrawBranchLabel.clear();
-}
-
-// doIt() - do the primary funcationality of the menu item.
-void LLPieMenuBranch::doIt( void )
-{
-	LLPieMenu *parent = (LLPieMenu *)getParent();
-
-	LLRect rect = parent->getRect();
-	S32 center_x;
-	S32 center_y;
-	parent->localPointToScreen(rect.getWidth() / 2, rect.getHeight() / 2, &center_x, &center_y);
-
-	parent->hide(FALSE);
-	mBranch->show(	center_x, center_y, FALSE );
-}
-
-//-----------------------------------------------------------------------------
-// class LLPieMenu
-// A circular menu of items, icons, etc.
-//-----------------------------------------------------------------------------
-LLPieMenu::LLPieMenu(const std::string& name, const std::string& label)
-:	LLMenuGL(name, label),
-	mFirstMouseDown(FALSE),
-	mUseInfiniteRadius(FALSE),
-	mHoverItem(NULL),
-	mHoverThisFrame(FALSE),
-	mHoveredAnyItem(FALSE),
-	mOuterRingAlpha(1.f),
-	mCurRadius(0.f),
-	mRightMouseDown(FALSE)
-{ 
-	LLMenuGL::setVisible(FALSE);
-	setCanTearOff(FALSE);
-}
-
-LLPieMenu::LLPieMenu(const std::string& name)
-:	LLMenuGL(name, name),
-	mFirstMouseDown(FALSE),
-	mUseInfiniteRadius(FALSE),
-	mHoverItem(NULL),
-	mHoverThisFrame(FALSE),
-	mHoveredAnyItem(FALSE),
-	mOuterRingAlpha(1.f),
-	mCurRadius(0.f),
-	mRightMouseDown(FALSE)
-{ 
-	LLMenuGL::setVisible(FALSE);
-	setCanTearOff(FALSE);
-}
-
-
-void LLPieMenu::initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory)
-{
-	LLXMLNodePtr child;
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
+	if(!result && (key == KEY_F10 && mask == MASK_CONTROL) && !gKeyboard->getKeyRepeated(key))
 	{
-		if (child->hasName(LL_PIE_MENU_TAG))
+		if (getHighlightedItem())
 		{
-			// SUBMENU
-			std::string name("menu");
-			child->getAttributeString("name", name);
-			std::string label(name);
-			child->getAttributeString("label", label);
-
-			LLPieMenu *submenu = new LLPieMenu(name, label);
-			appendPieMenu(submenu);
-			submenu->initXML(child, context, factory);
+			clearHoverItem();
 		}
 		else
 		{
-			parseChildXML(child, context, factory);
+			// close menus originating from other menu bars when first opening menu via keyboard
+			LLMenuGL::sMenuContainer->hideMenus();
+			highlightNextItem(NULL);
+			LLMenuGL::setKeyboardMode(TRUE);
 		}
+		return TRUE;
 	}
-}
 
-// virtual
-void LLPieMenu::setVisible(BOOL visible)
-{
-	if (!visible)
-	{
-		hide(FALSE);
-	}
+	return result;
 }
 
-BOOL LLPieMenu::handleHover( S32 x, S32 y, MASK mask )
+BOOL LLMenuBarGL::handleKeyHere(KEY key, MASK mask)
 {
-	// This is mostly copied from the llview class, but it continues
-	// the hover handle code after a hover handler has been found.
-	BOOL handled = FALSE;
-
-	// If we got a hover event, we've already moved the cursor
-	// for any menu shifts, so subsequent mouseup messages will be in the
-	// correct position.  No need to correct them.
-	//mShiftHoriz = 0;
-	//mShiftVert = 0;
-
-	// release mouse capture after short period of visibility if we're using a finite boundary
-	// so that right click outside of boundary will trigger new pie menu
-	if (hasMouseCapture() && 
-		!mRightMouseDown && 
-		mShrinkBorderTimer.getStarted() && 
-		mShrinkBorderTimer.getElapsedTimeF32() >= PIE_SHRINK_TIME)
-	{
-		gFocusMgr.setMouseCapture(NULL);
-		mUseInfiniteRadius = FALSE;
-	}
-
-	LLMenuItemGL *item = pieItemFromXY( x, y );
-
-	if (item && item->getEnabled())
+	static LLUICachedControl<bool> use_altkey_for_menus ("UseAltKeyForMenus", 0);
+	if(key == KEY_ALT && !gKeyboard->getKeyRepeated(key) && use_altkey_for_menus)
 	{
-		getWindow()->setCursor(UI_CURSOR_ARROW);
-		lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;		
-		handled = TRUE;
-
-		if (item != mHoverItem)
-		{
-			if (mHoverItem)
-			{
-				mHoverItem->setHighlight( FALSE );
-			}
-			mHoverItem = item;
-			mHoverItem->setHighlight( TRUE );
-
-			switch(pieItemIndexFromXY(x, y))
-			{
-			case 0:
-				make_ui_sound("UISndPieMenuSliceHighlight0");
-				break;
-			case 1:
-				make_ui_sound("UISndPieMenuSliceHighlight1");
-				break;
-			case 2:
-				make_ui_sound("UISndPieMenuSliceHighlight2");
-				break;
-			case 3:
-				make_ui_sound("UISndPieMenuSliceHighlight3");
-				break;
-			case 4:
-				make_ui_sound("UISndPieMenuSliceHighlight4");
-				break;
-			case 5:
-				make_ui_sound("UISndPieMenuSliceHighlight5");
-				break;
-			case 6:
-				make_ui_sound("UISndPieMenuSliceHighlight6");
-				break;
-			case 7:
-				make_ui_sound("UISndPieMenuSliceHighlight7");
-				break;
-			default:
-				make_ui_sound("UISndPieMenuSliceHighlight0");
-				break;
-			}
-		}
-		mHoveredAnyItem = TRUE;
+		mAltKeyTrigger = TRUE;
 	}
-	else
+	else // if any key other than ALT hit, clear out waiting for Alt key mode
 	{
-		// clear out our selection
-		if (mHoverItem)
-		{
-			mHoverItem->setHighlight(FALSE);
-			mHoverItem = NULL;
-		}
+		mAltKeyTrigger = FALSE;
 	}
-
-	if( !handled && pointInView( x, y ) )
+	
+	if (key == KEY_ESCAPE && mask == MASK_NONE)
 	{
-		getWindow()->setCursor(UI_CURSOR_ARROW);
-		lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;		
-		handled = TRUE;
+		LLMenuGL::setKeyboardMode(FALSE);
+		// if any menus are visible, this will return TRUE, stopping further processing of ESCAPE key
+		return LLMenuGL::sMenuContainer->hideMenus();
 	}
 
-	mHoverThisFrame = TRUE;
+	// before processing any other key, check to see if ALT key has triggered menu access
+	checkMenuTrigger();
 
-	return handled;
+	return LLMenuGL::handleKeyHere(key, mask);
 }
 
-BOOL LLPieMenu::handleMouseDown( S32 x, S32 y, MASK mask )
+BOOL LLMenuBarGL::handleJumpKey(KEY key)
 {
-	BOOL handled = FALSE;
-	// The click was somewhere within our rectangle
-	LLMenuItemGL *item = pieItemFromXY( x, y );
-
-	if (item)
+	// perform case-insensitive comparison
+	key = toupper(key);
+	navigation_key_map_t::iterator found_it = mJumpKeys.find(key);
+	if(found_it != mJumpKeys.end() && found_it->second->getEnabled())
 	{
-		// lie to the item about where the click happened
-		// to make sure it's within the item's rectangle
-		handled = item->handleMouseDown( 0, 0, mask );
+		// switch to keyboard navigation mode
+		LLMenuGL::setKeyboardMode(TRUE);
+
+		found_it->second->setHighlight(TRUE);
+		found_it->second->onCommit();
 	}
-	else if (!mRightMouseDown)
+	return TRUE;
+}
+
+BOOL LLMenuBarGL::handleMouseDown(S32 x, S32 y, MASK mask)
+{
+	// clicks on menu bar closes existing menus from other contexts but leave
+	// own menu open so that we get toggle behavior
+	if (!getHighlightedItem() || !getHighlightedItem()->isActive())
 	{
-		// call hidemenus to make sure transient selections get cleared
-		((LLMenuHolderGL*)getParent())->hideMenus();
+		LLMenuGL::sMenuContainer->hideMenus();
 	}
 
-	// always handle mouse down as mouse up will close open menus
-	return handled;
+	return LLMenuGL::handleMouseDown(x, y, mask);
 }
 
-BOOL LLPieMenu::handleRightMouseDown(S32 x, S32 y, MASK mask)
+BOOL LLMenuBarGL::handleRightMouseDown(S32 x, S32 y, MASK mask)
 {
-	BOOL handled = FALSE;
-
-	mRightMouseDown = TRUE;
-
-	// The click was somewhere within our rectangle
-	LLMenuItemGL *item = pieItemFromXY( x, y );
-	S32 delta_x = x /*+ mShiftHoriz*/ - getLocalRect().getCenterX();
-	S32 delta_y = y /*+ mShiftVert*/ - getLocalRect().getCenterY();
-	BOOL clicked_in_pie = ((delta_x * delta_x) + (delta_y * delta_y) < mCurRadius*mCurRadius) || mUseInfiniteRadius;
-
-	// grab mouse if right clicking anywhere within pie (even deadzone in middle), to detect drag outside of pie
-	if (clicked_in_pie)
-	{
-		// capture mouse cursor as if on initial menu show
-		gFocusMgr.setMouseCapture(this);
-		mShrinkBorderTimer.stop();
-		mUseInfiniteRadius = TRUE;
-		handled = TRUE;
-	}
-	
-	if (item)
+	// clicks on menu bar closes existing menus from other contexts but leave
+	// own menu open so that we get toggle behavior
+	if (!getHighlightedItem() || !getHighlightedItem()->isActive())
 	{
-		// lie to the item about where the click happened
-		// to make sure it's within the item's rectangle
-		if (item->handleMouseDown( 0, 0, mask ))
-		{
-			handled = TRUE;
-		}
+		LLMenuGL::sMenuContainer->hideMenus();
 	}
 
-	return handled;
+	return LLMenuGL::handleMouseDown(x, y, mask);
 }
 
-BOOL LLPieMenu::handleRightMouseUp( S32 x, S32 y, MASK mask )
+
+void LLMenuBarGL::draw()
 {
-	// release mouse capture when right mouse button released, and we're past the shrink time
-	if (mShrinkBorderTimer.getStarted() && 
-		mShrinkBorderTimer.getElapsedTimeF32() > PIE_SHRINK_TIME)
+	LLMenuItemGL* itemp = getHighlightedItem();
+	// If we are in mouse-control mode and the mouse cursor is not hovering over
+	// the current highlighted menu item and it isn't open, then remove the
+	// highlight. This is done via a polling mechanism here, as we don't receive
+    // notifications when the mouse cursor moves off of us
+	if (itemp && !itemp->isOpen() && !itemp->getHover() && !LLMenuGL::getKeyboardMode())
 	{
-		mUseInfiniteRadius = FALSE;
-		gFocusMgr.setMouseCapture(NULL);
+		clearHoverItem();
 	}
 
-	S32 delta_x = x /*+ mShiftHoriz*/ - getLocalRect().getCenterX();
-	S32 delta_y = y /*+ mShiftVert*/ - getLocalRect().getCenterY();
-	if (!mHoveredAnyItem && !mFirstMouseDown && (delta_x * delta_x) + (delta_y * delta_y) < PIE_CENTER_SIZE * PIE_CENTER_SIZE)
-	{
-		// user released right mouse button in middle of pie, interpret this as closing the menu
-		sMenuContainer->hideMenus();
-		return TRUE;
-	}
+	checkMenuTrigger();
 
+	LLMenuGL::draw();
+}
 
-	BOOL result = handleMouseUp( x, y, mask );
-	mRightMouseDown = FALSE;
-	mHoveredAnyItem = FALSE;
 
-	return result;
+void LLMenuBarGL::checkMenuTrigger()
+{
+	// has the ALT key been pressed and subsequently released?
+	if (mAltKeyTrigger && !gKeyboard->getKeyDown(KEY_ALT))
+	{
+		// if alt key was released quickly, treat it as a menu access key
+		// otherwise it was probably an Alt-zoom or similar action
+		static LLUICachedControl<F32> menu_access_key_time ("MenuAccessKeyTime", 0);
+		if (gKeyboard->getKeyElapsedTime(KEY_ALT) <= menu_access_key_time ||
+			gKeyboard->getKeyElapsedFrameCount(KEY_ALT) < 2)
+		{
+			if (getHighlightedItem())
+			{
+				clearHoverItem();
+			}
+			else
+			{
+				// close menus originating from other menu bars
+				LLMenuGL::sMenuContainer->hideMenus();
+
+				highlightNextItem(NULL);
+				LLMenuGL::setKeyboardMode(TRUE);
+			}
+		}
+		mAltKeyTrigger = FALSE;
+	}
 }
 
-BOOL LLPieMenu::handleMouseUp( S32 x, S32 y, MASK mask )
+BOOL LLMenuBarGL::jumpKeysActive()
 {
-	BOOL handled = FALSE;
-
-	// The click was somewhere within our rectangle
-	LLMenuItemGL *item = pieItemFromXY( x, y );
+	// require user to be in keyboard navigation mode to activate key triggers
+	// as menu bars are always visible and it is easy to leave the mouse cursor over them
+	return LLMenuGL::getKeyboardMode() && getHighlightedItem() && LLMenuGL::jumpKeysActive();
+}
 
-	if (item)
+// rearrange the child rects so they fit the shape of the menu bar.
+void LLMenuBarGL::arrange( void )
+{
+	U32 pos = 0;
+	LLRect rect( 0, getRect().getHeight(), 0, 0 );
+	item_list_t::const_iterator item_iter;
+	for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
 	{
-		// lie to the item about where the click happened
-		// to make sure it's within the item's rectangle
-		if (item->getEnabled())
+		LLMenuItemGL* item = *item_iter;
+		if (item->getVisible())
 		{
-			handled = item->handleMouseUp( 0, 0, mask );
-			hide(TRUE);
+			rect.mLeft = pos;
+			pos += item->getNominalWidth();
+			rect.mRight = pos;
+			item->setRect( rect );
+			item->buildDrawLabel();
 		}
 	}
-	else if (!mRightMouseDown)
-	{
-		// call hidemenus to make sure transient selections get cleared
-		((LLMenuHolderGL*)getParent())->hideMenus();
-	}
+	reshape(rect.mRight, rect.getHeight());
+}
 
-	if (handled)
-	{
-		make_ui_sound("UISndClickRelease");
-	}
 
-	if (!handled && !mUseInfiniteRadius)
+S32 LLMenuBarGL::getRightmostMenuEdge()
+{
+	// Find the last visible menu
+	item_list_t::reverse_iterator item_iter;
+	for (item_iter = mItems.rbegin(); item_iter != mItems.rend(); ++item_iter)
 	{
-		// call hidemenus to make sure transient selections get cleared
-		sMenuContainer->hideMenus();
+		if ((*item_iter)->getVisible())
+		{
+			break;
+		}
 	}
 
-	if (mFirstMouseDown)
-	{
-		make_ui_sound("UISndPieMenuAppear");
-		mFirstMouseDown = FALSE;
-	}
-	
-	// *FIX: is this necessary?
-	if (!mShrinkBorderTimer.getStarted())
+	if (item_iter == mItems.rend())
 	{
-		mShrinkBorderTimer.start();
+		return 0;
 	}
-
-	return handled;
+	return (*item_iter)->getRect().mRight;
 }
 
-
-// virtual
-void LLPieMenu::draw()
+// add a vertical separator to this menu
+BOOL LLMenuBarGL::addSeparator()
 {
-	// clear hover if mouse moved away
-	if (!mHoverThisFrame && mHoverItem)
-	{
-		mHoverItem->setHighlight(FALSE);
-		mHoverItem = NULL;
-	}
-
-	F32 width = (F32) getRect().getWidth();
-	F32 height = (F32) getRect().getHeight();
-	mCurRadius = PIE_SCALE_FACTOR * llmax( width/2, height/2 );
+	LLMenuItemGL* separator = new LLMenuItemVerticalSeparatorGL();
+	return append( separator );
+}
 
-	mOuterRingAlpha = mUseInfiniteRadius ? 0.f : 1.f;
-	if (mShrinkBorderTimer.getStarted())
+// add a menu - this will create a drop down menu.
+BOOL LLMenuBarGL::appendMenu( LLMenuGL* menu )
+{
+	if( menu == this )
 	{
-		mOuterRingAlpha = clamp_rescale(mShrinkBorderTimer.getElapsedTimeF32(), 0.f, PIE_SHRINK_TIME, 0.f, 1.f);
-		mCurRadius *= clamp_rescale(mShrinkBorderTimer.getElapsedTimeF32(), 0.f, PIE_SHRINK_TIME, 1.f, 1.f / PIE_SCALE_FACTOR);
+		llerrs << "** Attempt to attach menu to itself. This is certainly "
+			   << "a logic error." << llendl;
 	}
 
-	// correct for non-square pixels
-	F32 center_x = width/2;
-	F32 center_y = height/2;
-	S32 steps = 100;
+	BOOL success = TRUE;
 
-	gGL.pushMatrix();
-	{
-		gGL.translatef(center_x, center_y, 0.f);
+	// *TODO: Hack! Fix this
+	LLMenuItemBranchDownGL::Params p;
+	p.name = menu->getName();
+	p.label = menu->getLabel();
+	p.visible = menu->getVisible();
+	p.branch = menu;
+	p.enabled_color=LLUI::getCachedColorFunctor("MenuItemEnabledColor");
+	p.disabled_color=LLUI::getCachedColorFunctor("MenuItemDisabledColor");
+	p.highlight_bg_color=LLUI::getCachedColorFunctor("MenuItemHighlightBgColor");
+	p.highlight_fg_color=LLUI::getCachedColorFunctor("MenuItemHighlightFgColor");
+
+	LLMenuItemBranchDownGL* branch = LLUICtrlFactory::create<LLMenuItemBranchDownGL>(p);
+	success &= branch->addToAcceleratorList(&mAccelerators);
+	success &= append( branch );
+	branch->setJumpKey(branch->getJumpKey());
+	menu->updateParent(LLMenuGL::sMenuContainer);
+	
+	return success;
+}
 
-		F32 line_width = LLUI::sConfigGroup->getF32("PieMenuLineWidth");
-		LLColor4 line_color = LLUI::sColorsGroup->getColor("PieMenuLineColor");
-		LLColor4 bg_color = LLUI::sColorsGroup->getColor("PieMenuBgColor");
-		LLColor4 selected_color = LLUI::sColorsGroup->getColor("PieMenuSelectedColor");
+BOOL LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask )
+{
+	BOOL handled = FALSE;
+	LLView* active_menu = NULL;
 
-		// main body
-		LLColor4 outer_color = bg_color;
-		outer_color.mV[VALPHA] *= mOuterRingAlpha;
-		gl_washer_2d( mCurRadius, (F32) PIE_CENTER_SIZE, steps, bg_color, outer_color );
+	BOOL no_mouse_data = mLastMouseX == 0 && mLastMouseY == 0;
+	S32 mouse_delta_x = no_mouse_data ? 0 : x - mLastMouseX;
+	S32 mouse_delta_y = no_mouse_data ? 0 : y - mLastMouseY;
+	mMouseVelX = (mMouseVelX / 2) + (mouse_delta_x / 2);
+	mMouseVelY = (mMouseVelY / 2) + (mouse_delta_y / 2);
+	mLastMouseX = x;
+	mLastMouseY = y;
 
-		// selected wedge
-		item_list_t::iterator item_iter;
-		S32 i = 0;
-		for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
-		{
-			if ((*item_iter)->getHighlight())
-			{
-				F32 arc_size = F_PI * 0.25f;
-
-				F32 start_radians = (i * arc_size) - (arc_size * 0.5f);
-				F32 end_radians = start_radians + arc_size;
-
-				LLColor4 outer_color = selected_color;
-				outer_color.mV[VALPHA] *= mOuterRingAlpha;
-				gl_washer_segment_2d( mCurRadius, (F32)PIE_CENTER_SIZE, start_radians, end_radians, steps / 8, selected_color, outer_color );
+	// if nothing currently selected or mouse has moved since last call, pick menu item via mouse
+	// otherwise let keyboard control it
+	if (!getHighlightedItem() || !LLMenuGL::getKeyboardMode() || llabs(mMouseVelX) > 0 || llabs(mMouseVelY) > 0)
+	{
+		// find current active menu
+		for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
+		{
+			LLView* viewp = *child_it;
+			if (((LLMenuItemGL*)viewp)->isOpen())
+			{
+				active_menu = viewp;
 			}
-			i++;
 		}
 
-		LLUI::setLineWidth( line_width );
-
-		// inner lines
-		outer_color = line_color;
-		outer_color.mV[VALPHA] *= mOuterRingAlpha;
-		gl_washer_spokes_2d( mCurRadius, (F32)PIE_CENTER_SIZE, 8, line_color, outer_color );
-
-		// inner circle
-		gGL.color4fv( line_color.mV );
-		gl_circle_2d( 0, 0, (F32)PIE_CENTER_SIZE, steps, FALSE );
-
-		// outer circle
-		gGL.color4fv( outer_color.mV );
-		gl_circle_2d( 0, 0, mCurRadius, steps, FALSE );
-
-		LLUI::setLineWidth(1.0f);
-	}
-	gGL.popMatrix();
-
-	mHoverThisFrame = FALSE;
-
-	LLView::draw();
-}
-
-void LLPieMenu::drawBackground(LLMenuItemGL* itemp, LLColor4& color)
-{
-	F32 width = (F32) getRect().getWidth();
-	F32 height = (F32) getRect().getHeight();
-	F32 center_x = width/2;
-	F32 center_y = height/2;
-	S32 steps = 100;
-
-	gGL.color4fv( color.mV );
-	gGL.pushMatrix();
-	{
-		gGL.translatef(center_x - itemp->getRect().mLeft, center_y - itemp->getRect().mBottom, 0.f);
-
-		item_list_t::iterator item_iter;
-		S32 i = 0;
-		for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
+		// check for new active menu
+		for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
 		{
-			if ((*item_iter) == itemp)
+			LLView* viewp = *child_it;
+			S32 local_x = x - viewp->getRect().mLeft;
+			S32 local_y = y - viewp->getRect().mBottom;
+			if( viewp->getVisible() && 
+				viewp->getEnabled() &&
+				viewp->pointInView(local_x, local_y) && 
+				viewp->handleHover(local_x, local_y, mask))
 			{
-				F32 arc_size = F_PI * 0.25f;
-
-				F32 start_radians = (i * arc_size) - (arc_size * 0.5f);
-				F32 end_radians = start_radians + arc_size;
+				((LLMenuItemGL*)viewp)->setHighlight(TRUE);
+				handled = TRUE;
+				if (active_menu && active_menu != viewp)
+				{
+					((LLMenuItemGL*)viewp)->onCommit();
+					LLMenuGL::setKeyboardMode(FALSE);
+				}
+				LLMenuGL::setKeyboardMode(FALSE);
+			}
+		}
 
-				LLColor4 outer_color = color;
-				outer_color.mV[VALPHA] *= mOuterRingAlpha;
-				gl_washer_segment_2d( mCurRadius, (F32)PIE_CENTER_SIZE, start_radians, end_radians, steps / 8, color, outer_color );
+		if (handled)
+		{
+			// set hover false on inactive menus
+			for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
+			{
+				LLView* viewp = *child_it;
+				S32 local_x = x - viewp->getRect().mLeft;
+				S32 local_y = y - viewp->getRect().mBottom;
+				if (!viewp->pointInView(local_x, local_y) && ((LLMenuItemGL*)viewp)->getHighlight())
+				{
+					((LLMenuItemGL*)viewp)->setHighlight(FALSE);
+				}
 			}
-			i++;
 		}
 	}
-	gGL.popMatrix();
-}
 
-// virtual
-BOOL LLPieMenu::append(LLMenuItemGL *item)
-{
-	item->setBriefItem(TRUE);
-	item->setFont( LLFontGL::getFontSansSerifSmall() );
-	return LLMenuGL::append(item);
+	getWindow()->setCursor(UI_CURSOR_ARROW);
+	
+	return TRUE;
 }
 
-// virtual
-BOOL LLPieMenu::appendSeparator(const std::string &separator_name)
+///============================================================================
+/// Class LLMenuHolderGL
+///============================================================================
+LLMenuHolderGL::LLMenuHolderGL()
+	: LLPanel()
 {
-	LLMenuItemGL* separator = new LLMenuItemBlankGL();
-	separator->setFont( LLFontGL::getFontSansSerifSmall() );
-	return append( separator );
+	setName("Menu Holder");
+	setMouseOpaque(FALSE);
+	sItemActivationTimer.stop();
+	mCanHide = TRUE;
 }
 
-
-BOOL LLPieMenu::appendPieMenu(LLPieMenu *menu)
+void LLMenuHolderGL::draw()
 {
-	if (menu == this)
+	LLView::draw();
+	// now draw last selected item as overlay
+	LLMenuItemGL* selecteditem = (LLMenuItemGL*)sItemLastSelectedHandle.get();
+	if (selecteditem && sItemActivationTimer.getStarted() && sItemActivationTimer.getElapsedTimeF32() < ACTIVATE_HIGHLIGHT_TIME)
 	{
-		llerrs << "Can't attach a pie menu to itself" << llendl;
+		// make sure toggle items, for example, show the proper state when fading out
+		selecteditem->buildDrawLabel();
+
+		LLRect item_rect;
+		selecteditem->localRectToOtherView(selecteditem->getLocalRect(), &item_rect, this);
+
+		F32 interpolant = sItemActivationTimer.getElapsedTimeF32() / ACTIVATE_HIGHLIGHT_TIME;
+		
+		LLUI::pushMatrix();
+		{
+			LLUI::translate((F32)item_rect.mLeft, (F32)item_rect.mBottom, 0.f);
+			selecteditem->getMenu()->drawBackground(selecteditem, interpolant);
+			selecteditem->draw();
+		}
+		LLUI::popMatrix();
 	}
-	LLPieMenuBranch *item;
-	item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu);
-	getParent()->addChild(item->getBranch());
-	item->setFont( LLFontGL::getFontSansSerifSmall() );
-	return append( item );
 }
 
-// virtual
-void LLPieMenu::arrange()
+BOOL LLMenuHolderGL::handleMouseDown( S32 x, S32 y, MASK mask )
 {
-	const S32 rect_height = 190;
-	const S32 rect_width = 190;
-
-	// all divide by 6
-	const S32 CARD_X = 60;
-	const S32 DIAG_X = 48;
-	const S32 CARD_Y = 76;
-	const S32 DIAG_Y = 42;
-
-	const S32 ITEM_CENTER_X[] = { CARD_X, DIAG_X,      0, -DIAG_X, -CARD_X, -DIAG_X,       0,  DIAG_X };
-	const S32 ITEM_CENTER_Y[] = {      0, DIAG_Y, CARD_Y,  DIAG_Y,       0, -DIAG_Y, -CARD_Y, -DIAG_Y };
-
-	LLRect rect;
-	
-	S32 font_height = 0;
-	if( mItems.size() )
+	BOOL handled = LLView::childrenHandleMouseDown(x, y, mask) != NULL;
+	if (!handled)
 	{
-		font_height = (*mItems.begin())->getNominalHeight();
+		// clicked off of menu, hide them all
+		hideMenus();
 	}
-	S32 item_width = 0;
-
-//	F32 sin_delta = OO_SQRT2;	// sin(45 deg)
-//	F32 cos_delta = OO_SQRT2;	// cos(45 deg)
-
-	// TODO: Compute actual bounding rect for menu
-
-	// HACK: casting away const.  Should use setRect or some helper function instead.
-	const_cast<LLRect&>(getRect()).setOriginAndSize(getRect().mLeft, getRect().mBottom, rect_width, rect_height );
+	return handled;
+}
 
-	// place items around a circle, with item 0 at positive X,
-	// rotating counter-clockwise
-	item_list_t::iterator item_iter;
-	S32 i = 0;
-	for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
+BOOL LLMenuHolderGL::handleRightMouseDown( S32 x, S32 y, MASK mask )
+{
+	BOOL handled = LLView::childrenHandleRightMouseDown(x, y, mask) != NULL;
+	if (!handled)
 	{
-		LLMenuItemGL *item = *item_iter;
-
-		item_width = item->getNominalWidth();
-
-		// Put in the right place around a circle centered at 0,0
-		rect.setCenterAndSize(ITEM_CENTER_X[i],
-							  ITEM_CENTER_Y[i], 
-							  item_width, font_height );
-
-		// Correct for the actual rectangle size
-		rect.translate( rect_width/2, rect_height/2 );
-
-		item->setRect( rect );
-
-		// Make sure enablement is correct
-		item->buildDrawLabel();
-		i++;
+		// clicked off of menu, hide them all
+		hideMenus();
 	}
+	return handled;
 }
 
-LLMenuItemGL *LLPieMenu::pieItemFromXY(S32 x, S32 y)
+void LLMenuHolderGL::reshape(S32 width, S32 height, BOOL called_from_parent)
 {
-	// We might have shifted this menu on draw.  If so, we need
-	// to shift over mouseup events until we get a hover event.
-	//x += mShiftHoriz;
-	//y += mShiftVert; 
-
-	// An arc of the pie menu is 45 degrees
-	const F32 ARC_DEG = 45.f;
-	S32 delta_x = x - getRect().getWidth() / 2;
-	S32 delta_y = y - getRect().getHeight() / 2;
-
-	// circle safe zone in the center
-	S32 dist_squared = delta_x*delta_x + delta_y*delta_y;
-	if (dist_squared < PIE_CENTER_SIZE*PIE_CENTER_SIZE)
+	if (width != getRect().getWidth() || height != getRect().getHeight())
 	{
-		return NULL;
+		hideMenus();
 	}
+	LLView::reshape(width, height, called_from_parent);
+}
 
-	// infinite radius is only used with right clicks
-	S32 radius = llmax( getRect().getWidth()/2, getRect().getHeight()/2 );
-	if (!(mUseInfiniteRadius && mRightMouseDown) && dist_squared > radius * radius)
+BOOL LLMenuHolderGL::hasVisibleMenu() const
+{
+	for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
 	{
-		return NULL;
+		LLView* viewp = *child_it;
+		if (viewp->getVisible() && dynamic_cast<LLMenuBarGL*>(viewp) == NULL)
+		{
+			return TRUE;
+		}
 	}
+	return FALSE;
+}
 
-	F32 angle = RAD_TO_DEG * (F32) atan2((F32)delta_y, (F32)delta_x);
-	
-	// rotate marks CCW so that east = [0, ARC_DEG) instead of
-	// [-ARC_DEG/2, ARC_DEG/2)
-	angle += ARC_DEG / 2.f;
-
-	// make sure we're only using positive angles
-	if (angle < 0.f) angle += 360.f;
-
-	S32 which = S32( angle / ARC_DEG );
 
-	if (0 <= which && which < (S32)mItems.size() )
+BOOL LLMenuHolderGL::hideMenus()
+{
+	if (!mCanHide)
 	{
-		item_list_t::iterator item_iter;
-		for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
+		return FALSE;
+	}
+	BOOL menu_visible = hasVisibleMenu();
+	if (menu_visible)
+	{
+		LLMenuGL::setKeyboardMode(FALSE);
+		// clicked off of menu, hide them all
+		for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
 		{
-			if (which == 0)
+			LLView* viewp = *child_it;
+			// clicks off of menu do not hide menu bar
+			if (dynamic_cast<LLMenuBarGL*>(viewp) == NULL && viewp->getVisible())
 			{
-				return (*item_iter);
+				viewp->setVisible(FALSE);
 			}
-			which--;
 		}
 	}
+	//if (gFocusMgr.childHasKeyboardFocus(this))
+	//{
+	//	gFocusMgr.setKeyboardFocus(NULL);
+	//}
 
-	return NULL;
+	return menu_visible;
 }
 
-S32 LLPieMenu::pieItemIndexFromXY(S32 x, S32 y)
+void LLMenuHolderGL::setActivatedItem(LLMenuItemGL* item)
 {
-	// An arc of the pie menu is 45 degrees
-	const F32 ARC_DEG = 45.f;
-	// correct for non-square pixels
-	S32 delta_x = x - getRect().getWidth() / 2;
-	S32 delta_y = y - getRect().getHeight() / 2;
-
-	// circle safe zone in the center
-	if (delta_x*delta_x + delta_y*delta_y < PIE_CENTER_SIZE*PIE_CENTER_SIZE)
-	{
-		return -1;
-	}
-
-	F32 angle = RAD_TO_DEG * (F32) atan2((F32)delta_y, (F32)delta_x);
-	
-	// rotate marks CCW so that east = [0, ARC_DEG) instead of
-	// [-ARC_DEG/2, ARC_DEG/2)
-	angle += ARC_DEG / 2.f;
-
-	// make sure we're only using positive angles
-	if (angle < 0.f) angle += 360.f;
-
-	S32 which = S32( angle / ARC_DEG );
-	return which;
+	sItemLastSelectedHandle = item->getHandle();
+	sItemActivationTimer.start();
 }
 
-void LLPieMenu::show(S32 x, S32 y, BOOL mouse_down)
+///============================================================================
+/// Class LLTearOffMenu
+///============================================================================
+LLTearOffMenu::LLTearOffMenu(LLMenuGL* menup) : 
+	LLFloater()
 {
-	S32 width = getRect().getWidth();
-	S32 height = getRect().getHeight();
-
-	const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getMenuRect();
-
-	LLView* parent_view = getParent();
-	BOOL moved = FALSE;
-
-	S32 local_x, local_y;
-	parent_view->screenPointToLocal(x, y, &local_x, &local_y);
-
-	// HACK: casting away const.  Should use setRect or some helper function instead.
-	const_cast<LLRect&>(getRect()).setCenterAndSize(local_x, local_y, width, height);
-	arrange();
-
-	// Adjust the pie rectangle to keep it on screen
-	if (getRect().mLeft < menu_region_rect.mLeft) 
-	{
-		//mShiftHoriz = menu_region_rect.mLeft - getRect().mLeft;
-		//getRect().translate( mShiftHoriz, 0 );
-		// HACK: casting away const.  Should use setRect or some helper function instead.
-		const_cast<LLRect&>(getRect()).translate( menu_region_rect.mLeft - getRect().mLeft, 0 );
-		moved = TRUE;
-	}
-
-	if (getRect().mRight > menu_region_rect.mRight) 
-	{
-		//mShiftHoriz = menu_region_rect.mRight - getRect().mRight;
-		//getRect().translate( mShiftHoriz, 0);
-		// HACK: casting away const.  Should use setRect or some helper function instead.
-		const_cast<LLRect&>(getRect()).translate( menu_region_rect.mRight - getRect().mRight, 0 );
-		moved = TRUE;
-	}
-
-	if (getRect().mBottom < menu_region_rect.mBottom)
-	{
-		//mShiftVert = menu_region_rect.mBottom - getRect().mBottom;
-		//getRect().translate( 0, mShiftVert );
-		// HACK: casting away const.  Should use setRect or some helper function instead.
-		const_cast<LLRect&>(getRect()).translate( 0, menu_region_rect.mBottom - getRect().mBottom );
-		moved = TRUE;
-	}
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
 
+	setName(menup->getName());
+	setTitle(menup->getLabel());
+	setCanMinimize(FALSE);
+	// flag menu as being torn off
+	menup->setTornOff(TRUE);
+	// update menu layout as torn off menu (no spillover menus)
+	menup->needsArrange();
 
-	if (getRect().mTop > menu_region_rect.mTop)
-	{
-		//mShiftVert = menu_region_rect.mTop - getRect().mTop;
-		//getRect().translate( 0, mShiftVert );
-		// HACK: casting away const. Should use setRect or some helper function instead.
-		const_cast<LLRect&>(getRect()).translate( 0, menu_region_rect.mTop - getRect().mTop );
-		moved = TRUE;
-	}
-
-	// If we had to relocate the pie menu, put the cursor in the
-	// center of its rectangle
-	if (moved)
-	{
-		LLCoordGL center;
-		center.mX = (getRect().mLeft + getRect().mRight) / 2;
-		center.mY = (getRect().mTop + getRect().mBottom) / 2;
+	LLRect rect;
+	menup->localRectToOtherView(LLRect(-1, menup->getRect().getHeight(), menup->getRect().getWidth() + 3, 0), &rect, gFloaterView);
+	// make sure this floater is big enough for menu
+	mTargetHeight = (F32)(rect.getHeight() + floater_header_size + 5);
+	reshape(rect.getWidth(), rect.getHeight());
+	setRect(rect);
 
-		LLUI::setCursorPositionLocal(getParent(), center.mX, center.mY);
-	}
+	// attach menu to floater
+	menup->setFollowsAll();
+	mOldParent = menup->getParent();
+	addChild(menup);
+	menup->setVisible(TRUE);
+	menup->translate(-menup->getRect().mLeft + 1, -menup->getRect().mBottom + 1);
+	menup->setDropShadowed(FALSE);
 
-	// *FIX: what happens when mouse buttons reversed?
-	mRightMouseDown = mouse_down;
-	mFirstMouseDown = mouse_down;
-	mUseInfiniteRadius = TRUE;
-	mHoveredAnyItem = FALSE;
+	mMenu = menup;
 
-	if (!mFirstMouseDown)
-	{
-		make_ui_sound("UISndPieMenuAppear");
-	}
+	// highlight first item (tear off item will be disabled)
+	mMenu->highlightNextItem(NULL);
+}
 
-	LLView::setVisible(TRUE);
 
-	// we want all mouse events in case user does quick right click again off of pie menu
-	// rectangle, to support gestural menu traversal
-	gFocusMgr.setMouseCapture(this);
+void LLTearOffMenu::draw()
+{
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+	mMenu->setBackgroundVisible(isBackgroundOpaque());
+	mMenu->needsArrange();
 
-	if (mouse_down)
+	if (getRect().getHeight() != mTargetHeight)
 	{
-		mShrinkBorderTimer.stop();
+		// animate towards target height
+		reshape(getRect().getWidth(), llceil(lerp((F32)getRect().getHeight(), mTargetHeight, LLCriticalDamp::getInterpolant(0.05f))));
 	}
-	else 
+	else
 	{
-		mShrinkBorderTimer.start();
+		// when in stasis, remain big enough to hold menu contents
+		mTargetHeight = (F32)(mMenu->getRect().getHeight() + floater_header_size + 4);
+		reshape(mMenu->getRect().getWidth() + 3, mMenu->getRect().getHeight() + floater_header_size + 5);
 	}
+	LLFloater::draw();
 }
 
-void LLPieMenu::hide(BOOL item_selected)
+void LLTearOffMenu::onFocusReceived()
 {
-	if (!getVisible()) return;
-
-	if (mHoverItem)
+	// if nothing is highlighted, just highlight first item
+	if (!mMenu->getHighlightedItem())
 	{
-		mHoverItem->setHighlight( FALSE );
-		mHoverItem = NULL;
+		mMenu->highlightNextItem(NULL);
 	}
 
-	make_ui_sound("UISndPieMenuHide");
-
-	mFirstMouseDown = FALSE;
-	mRightMouseDown = FALSE;
-	mUseInfiniteRadius = FALSE;
-	mHoveredAnyItem = FALSE;
-
-	LLView::setVisible(FALSE);
-
-	gFocusMgr.setMouseCapture(NULL);
-}
-
-///============================================================================
-/// Class LLMenuBarGL
-///============================================================================
-
-static LLRegisterWidget<LLMenuBarGL> r2("menu_bar");
-
-// Default constructor
-LLMenuBarGL::LLMenuBarGL( const std::string& name ) : LLMenuGL ( name, name )
-{
-	mHorizontalLayout = TRUE;
-	setCanTearOff(FALSE);
-	mKeepFixedSize = TRUE;
-	mAltKeyTrigger = FALSE;
-}
-
-// Default destructor
-LLMenuBarGL::~LLMenuBarGL()
-{
-	std::for_each(mAccelerators.begin(), mAccelerators.end(), DeletePointer());
-	mAccelerators.clear();
-}
-
-// virtual
-LLXMLNodePtr LLMenuBarGL::getXML(bool save_children) const
-{
-	// Sorty of hacky: reparent items to this and then back at the end of the export
-	LLView *orig_parent = NULL;
-	item_list_t::const_iterator item_iter;
-	for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
-	{
-		LLMenuItemGL* child = *item_iter;
-		LLMenuItemBranchGL* branch = (LLMenuItemBranchGL*)child;
-		LLMenuGL *menu = branch->getBranch();
-		orig_parent = menu->getParent();
-		menu->updateParent((LLView *)this);
-	}
-
-	LLXMLNodePtr node = LLMenuGL::getXML();
-
-	for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
-	{
-		LLMenuItemGL* child = *item_iter;
-		LLMenuItemBranchGL* branch = (LLMenuItemBranchGL*)child;
-		LLMenuGL *menu = branch->getBranch();
-		menu->updateParent(orig_parent);
-	}
-
-	return node;
-}
-
-LLView* LLMenuBarGL::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("menu");
-	node->getAttributeString("name", name);
-
-	BOOL opaque = FALSE;
-	node->getAttributeBOOL("opaque", opaque);
-
-	LLMenuBarGL *menubar = new LLMenuBarGL(name);
-
-	LLHandle<LLFloater> parent_handle;
-	LLFloater* parent_floater = dynamic_cast<LLFloater*>(parent);
-	if (parent_floater)
-	{
-		parent_handle = parent_floater->getHandle();
-	}
-
-	// We need to have the rect early so that it's around when building
-	// the menu items
-	LLRect view_rect;
-	createRect(node, view_rect, parent, menubar->getRequiredRect());
-	menubar->setRect(view_rect);
-
-	if (node->hasAttribute("drop_shadow"))
-	{
-		BOOL drop_shadow = FALSE;
-		node->getAttributeBOOL("drop_shadow", drop_shadow);
-		menubar->setDropShadowed(drop_shadow);
-	}
-
-	menubar->setBackgroundVisible(opaque);
-	LLColor4 color(0,0,0,0);
-	if (opaque && LLUICtrlFactory::getAttributeColor(node,"color", color))
-	{
-		menubar->setBackgroundColor(color);
-	}
-
-	LLXMLNodePtr child;
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
+	// parent menu items get highlights so navigation logic keeps working
+	LLMenuItemGL* parent_menu_item = mMenu->getParentMenuItem();
+	while(parent_menu_item)
 	{
-		if (child->hasName("menu"))
+		if (parent_menu_item->getMenu()->getVisible())
 		{
-			LLMenuGL *menu = (LLMenuGL*)LLMenuGL::fromXML(child, parent, factory);
-			// because of lazy initialization, have to disable tear off functionality
-			// and then re-enable with proper parent handle
-			if (menu->getCanTearOff())
-			{
-				menu->setCanTearOff(FALSE);
-				menu->setCanTearOff(TRUE, parent_handle);
-			}
-			menubar->appendMenu(menu);
-			if (LLMenuGL::sMenuContainer != NULL)
-			{
-				menu->updateParent(LLMenuGL::sMenuContainer);
-			}
-			else
-			{
-				menu->updateParent(parent);
-			}
+			parent_menu_item->setHighlight(TRUE);
+			parent_menu_item = parent_menu_item->getMenu()->getParentMenuItem();
+		}
+		else
+		{
+			break;
 		}
 	}
+	LLFloater::onFocusReceived();
+}
 
-	menubar->initFromXML(node, parent);
-
-	BOOL create_jump_keys = FALSE;
-	node->getAttributeBOOL("create_jump_keys", create_jump_keys);
-	if (create_jump_keys)
-	{
-		menubar->createJumpKeys();
-	}
-
-	return menubar;
+void LLTearOffMenu::onFocusLost()
+{
+	// remove highlight from parent item and our own menu
+	mMenu->clearHoverItem();
+	LLFloater::onFocusLost();
 }
 
-BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask)
+BOOL LLTearOffMenu::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent)
 {
-	if (getHighlightedItem() && mask == MASK_NONE)
-	{
-		// unmodified key accelerators are ignored when navigating menu
-		// (but are used as jump keys so will still work when appropriate menu is up)
-		return FALSE;
-	}
-	BOOL result = LLMenuGL::handleAcceleratorKey(key, mask);
-	if (result && mask & MASK_ALT)
-	{
-		// ALT key used to trigger hotkey, don't use as shortcut to open menu
-		mAltKeyTrigger = FALSE;
-	}
+	// pass keystrokes down to menu
+	return mMenu->handleUnicodeChar(uni_char, TRUE);
+}
 
-	if(!result && (key == KEY_F10 && mask == MASK_CONTROL) && !gKeyboard->getKeyRepeated(key))
+BOOL LLTearOffMenu::handleKeyHere(KEY key, MASK mask)
+{
+	if (!mMenu->getHighlightedItem())
 	{
-		if (getHighlightedItem())
+		if (key == KEY_UP)
 		{
-			clearHoverItem();
+			mMenu->highlightPrevItem(NULL);		
+			return TRUE;
 		}
-		else
+		else if (key == KEY_DOWN)
 		{
-			// close menus originating from other menu bars when first opening menu via keyboard
-			LLMenuGL::sMenuContainer->hideMenus();
-			highlightNextItem(NULL);
-			LLMenuGL::setKeyboardMode(TRUE);
+			mMenu->highlightNextItem(NULL);
+			return TRUE;
 		}
-		return TRUE;
 	}
-
-	return result;
+	// pass keystrokes down to menu
+	return mMenu->handleKey(key, mask, TRUE);
 }
 
-BOOL LLMenuBarGL::handleKeyHere(KEY key, MASK mask)
+void LLTearOffMenu::translate(S32 x, S32 y)
 {
-	if(key == KEY_ALT && !gKeyboard->getKeyRepeated(key) && LLUI::sConfigGroup->getBOOL("UseAltKeyForMenus"))
-	{
-		mAltKeyTrigger = TRUE;
-	}
-	else // if any key other than ALT hit, clear out waiting for Alt key mode
-	{
-		mAltKeyTrigger = FALSE;
-	}
-	
-	if (key == KEY_ESCAPE && mask == MASK_NONE)
+	if (x != 0 && y != 0)
 	{
-		LLMenuGL::setKeyboardMode(FALSE);
-		// if any menus are visible, this will return TRUE, stopping further processing of ESCAPE key
-		return LLMenuGL::sMenuContainer->hideMenus();
+		// hide open sub-menus by clearing current hover item
+		mMenu->clearHoverItem();
 	}
-
-	// before processing any other key, check to see if ALT key has triggered menu access
-	checkMenuTrigger();
-
-	return LLMenuGL::handleKeyHere(key, mask);
+	LLFloater::translate(x, y);
 }
 
-BOOL LLMenuBarGL::handleJumpKey(KEY key)
+//static
+LLTearOffMenu* LLTearOffMenu::create(LLMenuGL* menup)
 {
-	// perform case-insensitive comparison
-	key = toupper(key);
-	navigation_key_map_t::iterator found_it = mJumpKeys.find(key);
-	if(found_it != mJumpKeys.end() && found_it->second->getEnabled())
-	{
-		// switch to keyboard navigation mode
-		LLMenuGL::setKeyboardMode(TRUE);
+	LLTearOffMenu* tearoffp = new LLTearOffMenu(menup);
+	// keep onscreen
+	gFloaterView->adjustToFitScreen(tearoffp, FALSE);
+	tearoffp->openFloater(LLSD());
 
-		found_it->second->setHighlight(TRUE);
-		found_it->second->doIt();
-	}
-	return TRUE;
+	return tearoffp;
 }
 
-BOOL LLMenuBarGL::handleMouseDown(S32 x, S32 y, MASK mask)
+void LLTearOffMenu::onClose(bool app_quitting)
 {
-	// clicks on menu bar closes existing menus from other contexts but leave
-	// own menu open so that we get toggle behavior
-	if (!getHighlightedItem() || !getHighlightedItem()->isActive())
-	{
-		LLMenuGL::sMenuContainer->hideMenus();
-	}
-
-	return LLMenuGL::handleMouseDown(x, y, mask);
+	removeChild(mMenu);
+	mOldParent->addChild(mMenu);
+	mMenu->clearHoverItem();
+	mMenu->setFollowsNone();
+	mMenu->setBackgroundVisible(TRUE);
+	mMenu->setVisible(FALSE);
+	mMenu->setTornOff(FALSE);
+	mMenu->setDropShadowed(TRUE);
+	destroy();
 }
 
-BOOL LLMenuBarGL::handleRightMouseDown(S32 x, S32 y, MASK mask)
+
+//-----------------------------------------------------------------------------
+// class LLContextMenuBranch
+// A branch to another context menu
+//-----------------------------------------------------------------------------
+class LLContextMenuBranch : public LLMenuItemGL
 {
-	// clicks on menu bar closes existing menus from other contexts but leave
-	// own menu open so that we get toggle behavior
-	if (!getHighlightedItem() || !getHighlightedItem()->isActive())
+public:
+	struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
 	{
-		LLMenuGL::sMenuContainer->hideMenus();
-	}
-
-	return LLMenuGL::handleMouseDown(x, y, mask);
-}
+		Mandatory<LLContextMenu*> branch;
+	};
 
+	LLContextMenuBranch(const Params&);
 
-void LLMenuBarGL::draw()
-{
-	LLMenuItemGL* itemp = getHighlightedItem();
-	// If we are in mouse-control mode and the mouse cursor is not hovering over
-	// the current highlighted menu item and it isn't open, then remove the
-	// highlight. This is done via a polling mechanism here, as we don't receive
-    // notifications when the mouse cursor moves off of us
-	if (itemp && !itemp->isOpen() && !itemp->getHover() && !LLMenuGL::getKeyboardMode())
-	{
-		clearHoverItem();
-	}
+	// called to rebuild the draw label
+	virtual void	buildDrawLabel( void );
 
-	checkMenuTrigger();
+	// onCommit() - do the primary funcationality of the menu item.
+	virtual void	onCommit( void );
 
-	LLMenuGL::draw();
-}
+	LLContextMenu*	getBranch() { return mBranch; }
+	void			setHighlight( BOOL highlight );
 
-void LLMenuBarGL::checkMenuTrigger()
-{
-	// has the ALT key been pressed and subsequently released?
-	if (mAltKeyTrigger && !gKeyboard->getKeyDown(KEY_ALT))
-	{
-		// if alt key was released quickly, treat it as a menu access key
-		// otherwise it was probably an Alt-zoom or similar action
-		if (gKeyboard->getKeyElapsedTime(KEY_ALT) <= LLUI::sConfigGroup->getF32("MenuAccessKeyTime") ||
-			gKeyboard->getKeyElapsedFrameCount(KEY_ALT) < 2)
-		{
-			if (getHighlightedItem())
-			{
-				clearHoverItem();
-			}
-			else
-			{
-				// close menus originating from other menu bars
-				LLMenuGL::sMenuContainer->hideMenus();
+protected:
+	void	showSubMenu();
 
-				highlightNextItem(NULL);
-				LLMenuGL::setKeyboardMode(TRUE);
-			}
-		}
-		mAltKeyTrigger = FALSE;
-	}
-}
+	LLContextMenu* mBranch;
+};
 
-BOOL LLMenuBarGL::jumpKeysActive()
+LLContextMenuBranch::LLContextMenuBranch(const LLContextMenuBranch::Params& p) 
+:	LLMenuItemGL(p),
+	mBranch( p.branch )
 {
-	// require user to be in keyboard navigation mode to activate key triggers
-	// as menu bars are always visible and it is easy to leave the mouse cursor over them
-	return LLMenuGL::getKeyboardMode() && getHighlightedItem() && LLMenuGL::jumpKeysActive();
+	mBranch->hide();
+	mBranch->setParentMenuItem(this);
 }
 
-// rearrange the child rects so they fit the shape of the menu bar.
-void LLMenuBarGL::arrange( void )
+// called to rebuild the draw label
+void LLContextMenuBranch::buildDrawLabel( void )
 {
-	U32 pos = 0;
-	LLRect rect( 0, getRect().getHeight(), 0, 0 );
-	item_list_t::const_iterator item_iter;
-	for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
 	{
-		LLMenuItemGL* item = *item_iter;
-		if (item->getVisible())
+		// default enablement is this -- if any of the subitems are
+		// enabled, this item is enabled. JC
+		U32 sub_count = mBranch->getItemCount();
+		U32 i;
+		BOOL any_enabled = FALSE;
+		for (i = 0; i < sub_count; i++)
 		{
-			rect.mLeft = pos;
-			pos += item->getNominalWidth();
-			rect.mRight = pos;
-			item->setRect( rect );
+			LLMenuItemGL* item = mBranch->getItem(i);
 			item->buildDrawLabel();
+			if (item->getEnabled() && !item->getDrawTextDisabled() )
+			{
+				any_enabled = TRUE;
+				break;
+			}
 		}
-	}
-	reshape(rect.mRight, rect.getHeight());
-}
-
-
-S32 LLMenuBarGL::getRightmostMenuEdge()
-{
-	// Find the last visible menu
-	item_list_t::reverse_iterator item_iter;
-	for (item_iter = mItems.rbegin(); item_iter != mItems.rend(); ++item_iter)
-	{
-		if ((*item_iter)->getVisible())
-		{
-			break;
-		}
+		setDrawTextDisabled(!any_enabled);
+		setEnabled(TRUE);
 	}
 
-	if (item_iter == mItems.rend())
-	{
-		return 0;
-	}
-	return (*item_iter)->getRect().mRight;
+	mDrawAccelLabel.clear();
+	std::string st = mDrawAccelLabel;
+	appendAcceleratorString( st );
+	mDrawAccelLabel = st;
+	
+	// No special branch suffix
+	mDrawBranchLabel.clear();
 }
 
-// add a vertical separator to this menu
-BOOL LLMenuBarGL::appendSeparator( const std::string &separator_name )
+void	LLContextMenuBranch::showSubMenu()
 {
-	LLMenuItemGL* separator = new LLMenuItemVerticalSeparatorGL();
-	return append( separator );
+	S32 center_x;
+	S32 center_y;
+	localPointToScreen(getRect().getWidth(), getRect().getHeight() , &center_x, &center_y);
+	mBranch->show(	center_x, center_y, FALSE);
 }
 
-// add a menu - this will create a drop down menu.
-BOOL LLMenuBarGL::appendMenu( LLMenuGL* menu )
+// onCommit() - do the primary funcationality of the menu item.
+void LLContextMenuBranch::onCommit( void )
 {
-	if( menu == this )
-	{
-		llerrs << "** Attempt to attach menu to itself. This is certainly "
-			   << "a logic error." << llendl;
-	}
-
-	BOOL success = TRUE;
+	showSubMenu();
 
-	LLMenuItemBranchGL* branch = NULL;
-	branch = new LLMenuItemBranchDownGL( menu->getName(), menu->getLabel(), menu->getHandle());
-	success &= branch->addToAcceleratorList(&mAccelerators);
-	success &= append( branch );
-	branch->setJumpKey(branch->getJumpKey());
-	return success;
 }
-
-BOOL LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask )
+void LLContextMenuBranch::setHighlight( BOOL highlight )
 {
-	BOOL handled = FALSE;
-	LLView* active_menu = NULL;
-
-	BOOL no_mouse_data = mLastMouseX == 0 && mLastMouseY == 0;
-	S32 mouse_delta_x = no_mouse_data ? 0 : x - mLastMouseX;
-	S32 mouse_delta_y = no_mouse_data ? 0 : y - mLastMouseY;
-	mMouseVelX = (mMouseVelX / 2) + (mouse_delta_x / 2);
-	mMouseVelY = (mMouseVelY / 2) + (mouse_delta_y / 2);
-	mLastMouseX = x;
-	mLastMouseY = y;
-
-	// if nothing currently selected or mouse has moved since last call, pick menu item via mouse
-	// otherwise let keyboard control it
-	if (!getHighlightedItem() || !LLMenuGL::getKeyboardMode() || llabs(mMouseVelX) > 0 || llabs(mMouseVelY) > 0)
+	if (highlight == getHighlight()) return;
+	LLMenuItemGL::setHighlight(highlight);
+	if( highlight )
 	{
-		// find current active menu
-		for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
-		{
-			LLView* viewp = *child_it;
-			if (((LLMenuItemGL*)viewp)->isOpen())
-			{
-				active_menu = viewp;
-			}
-		}
+		showSubMenu();
+	}
+	else
+	{
+		mBranch->hide();
+	}
+}
 
-		// check for new active menu
-		for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
-		{
-			LLView* viewp = *child_it;
-			S32 local_x = x - viewp->getRect().mLeft;
-			S32 local_y = y - viewp->getRect().mBottom;
-			if( viewp->getVisible() && 
-				viewp->getEnabled() &&
-				viewp->pointInView(local_x, local_y) && 
-				viewp->handleHover(local_x, local_y, mask))
-			{
-				((LLMenuItemGL*)viewp)->setHighlight(TRUE);
-				handled = TRUE;
-				if (active_menu && active_menu != viewp)
-				{
-					((LLMenuItemGL*)viewp)->doIt();
-					LLMenuGL::setKeyboardMode(FALSE);
-				}
-				LLMenuGL::setKeyboardMode(FALSE);
-			}
-		}
 
-		if (handled)
-		{
-			// set hover false on inactive menus
-			for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
-			{
-				LLView* viewp = *child_it;
-				S32 local_x = x - viewp->getRect().mLeft;
-				S32 local_y = y - viewp->getRect().mBottom;
-				if (!viewp->pointInView(local_x, local_y) && ((LLMenuItemGL*)viewp)->getHighlight())
-				{
-					((LLMenuItemGL*)viewp)->setHighlight(FALSE);
-				}
-			}
-		}
-	}
+///////////////////////////////////////////////////////////////////////////////////////////////////////////
+//-----------------------------------------------------------------------------
+// class LLContextMenu
+// A context menu
+//-----------------------------------------------------------------------------
+static LLRegisterWidget<LLContextMenu> context_menu_register("context_menu");
 
-	getWindow()->setCursor(UI_CURSOR_ARROW);
-	
-	return TRUE;
-}
+LLContextMenu::LLContextMenu(const Params& p)
+:	LLMenuGL(p),
+	mHoveredAnyItem(FALSE),
+	mHoverItem(NULL)
 
-///============================================================================
-/// Class LLMenuHolderGL
-///============================================================================
-LLMenuHolderGL::LLMenuHolderGL()
-	:	LLPanel(std::string("Menu Holder"))
 {
-	setMouseOpaque(FALSE);
-	sItemActivationTimer.stop();
-	mCanHide = TRUE;
+	//setBackgroundVisible(TRUE);
 }
 
-LLMenuHolderGL::LLMenuHolderGL(const std::string& name, const LLRect& rect, BOOL mouse_opaque, U32 follows) 
-:	LLPanel(name, rect, FALSE)
+void LLContextMenu::setVisible(BOOL visible)
 {
-	setMouseOpaque(mouse_opaque);
-	sItemActivationTimer.stop();
-	mCanHide = TRUE;
+	if (!visible)
+		hide();
 }
 
-
-void LLMenuHolderGL::draw()
+void LLContextMenu::show(S32 x, S32 y,BOOL adjustCursor)
 {
-	LLView::draw();
-	// now draw last selected item as overlay
-	LLMenuItemGL* selecteditem = (LLMenuItemGL*)sItemLastSelectedHandle.get();
-	if (selecteditem && sItemActivationTimer.getStarted() && sItemActivationTimer.getElapsedTimeF32() < ACTIVATE_HIGHLIGHT_TIME)
-	{
-		// make sure toggle items, for example, show the proper state when fading out
-		selecteditem->buildDrawLabel();
+	S32 width = getRect().getWidth();
+	S32 height = getRect().getHeight();
 
-		LLRect item_rect;
-		selecteditem->localRectToOtherView(selecteditem->getLocalRect(), &item_rect, this);
+	const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getMenuRect();
 
-		F32 interpolant = sItemActivationTimer.getElapsedTimeF32() / ACTIVATE_HIGHLIGHT_TIME;
-		F32 alpha = lerp(LLMenuItemGL::getHighlightBGColor().mV[VALPHA], 0.f, interpolant);
-		LLColor4 bg_color(LLMenuItemGL::getHighlightBGColor().mV[VRED], 
-			LLMenuItemGL::getHighlightBGColor().mV[VGREEN], 
-			LLMenuItemGL::getHighlightBGColor().mV[VBLUE], 
-			alpha);
-		
-		LLUI::pushMatrix();
-		{
-			LLUI::translate((F32)item_rect.mLeft, (F32)item_rect.mBottom, 0.f);
-			selecteditem->getMenu()->drawBackground(selecteditem, bg_color);
-			selecteditem->draw();
-		}
-		LLUI::popMatrix();
-	}
-}
+	LLView* parent_view = getParent();
 
-BOOL LLMenuHolderGL::handleMouseDown( S32 x, S32 y, MASK mask )
-{
-	BOOL handled = LLView::childrenHandleMouseDown(x, y, mask) != NULL;
-	if (!handled)
-	{
-		// clicked off of menu, hide them all
-		hideMenus();
-	}
-	return handled;
-}
+	S32 local_x, local_y;
+	parent_view->screenPointToLocal(x, y, &local_x, &local_y);
 
-BOOL LLMenuHolderGL::handleRightMouseDown( S32 x, S32 y, MASK mask )
-{
-	BOOL handled = LLView::childrenHandleRightMouseDown(x, y, mask) != NULL;
-	if (!handled)
-	{
-		// clicked off of menu, hide them all
-		hideMenus();
-	}
-	return handled;
-}
+	// HACK: casting away const.  Should use setRect or some helper function instead.
+	const_cast<LLRect&>(getRect()).setCenterAndSize(local_x + width/2, local_y - height/2, width, height);
+	arrange();
 
-void LLMenuHolderGL::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
-	if (width != getRect().getWidth() || height != getRect().getHeight())
+
+	if (translateIntoRect(menu_region_rect,FALSE) && adjustCursor)
 	{
-		hideMenus();
+		LLUI::setCursorPositionLocal(getParent(), getRect().mLeft , getRect().mTop);
 	}
-	LLView::reshape(width, height, called_from_parent);
+
+	LLView::setVisible(TRUE);
+
 }
 
-BOOL LLMenuHolderGL::hasVisibleMenu() const
+void LLContextMenu::hide()
 {
-	for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
+	if (!getVisible()) return;
+
+	LLView::setVisible(FALSE);
+
+	gFocusMgr.setMouseCapture(NULL);
+	
+	if (mHoverItem)
 	{
-		LLView* viewp = *child_it;
-		if (viewp->getVisible() && dynamic_cast<LLMenuBarGL*>(viewp) == NULL)
-		{
-			return TRUE;
-		}
+		mHoverItem->setHighlight( FALSE );
 	}
-	return FALSE;
+	mHoverItem = NULL;
 }
 
 
-BOOL LLMenuHolderGL::hideMenus()
+BOOL LLContextMenu::handleHover( S32 x, S32 y, MASK mask )
 {
-	if (!mCanHide)
-	{
-		return FALSE;
-	}
-	BOOL menu_visible = hasVisibleMenu();
-	if (menu_visible)
+	BOOL handled = FALSE;
+
+	LLMenuItemGL *item = getItemFromXY( x, y );
+
+	if (item && item->getEnabled())
 	{
-		LLMenuGL::setKeyboardMode(FALSE);
-		// clicked off of menu, hide them all
-		for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
+		getWindow()->setCursor(UI_CURSOR_ARROW);
+		handled = TRUE;
+
+		if (item != mHoverItem)
 		{
-			LLView* viewp = *child_it;
-			// clicks off of menu do not hide menu bar
-			if (dynamic_cast<LLMenuBarGL*>(viewp) == NULL && viewp->getVisible())
+			if (mHoverItem)
 			{
-				viewp->setVisible(FALSE);
+				mHoverItem->setHighlight( FALSE );
 			}
+			mHoverItem = item;
+			mHoverItem->setHighlight( TRUE );
+		}
+		mHoveredAnyItem = TRUE;
+	}
+	else
+	{
+		// clear out our selection
+		if (mHoverItem)
+		{
+			mHoverItem->setHighlight(FALSE);
+			mHoverItem = NULL;
 		}
 	}
-	//if (gFocusMgr.childHasKeyboardFocus(this))
-	//{
-	//	gFocusMgr.setKeyboardFocus(NULL);
-	//}
 
-	return menu_visible;
-}
+	if( !handled && pointInView( x, y ) )
+	{
+		getWindow()->setCursor(UI_CURSOR_ARROW);
+		handled = TRUE;
+	}
 
-void LLMenuHolderGL::setActivatedItem(LLMenuItemGL* item)
-{
-	sItemLastSelectedHandle = item->getHandle();
-	sItemActivationTimer.start();
+	return handled;
 }
 
-///============================================================================
-/// Class LLTearOffMenu
-///============================================================================
-LLTearOffMenu::LLTearOffMenu(LLMenuGL* menup) : 
-	LLFloater(menup->getName(), LLRect(0, 100, 100, 0), menup->getLabel(), FALSE, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, FALSE, FALSE)
+BOOL LLContextMenu::handleMouseDown( S32 x, S32 y, MASK mask )
 {
-	// flag menu as being torn off
-	menup->setTornOff(TRUE);
-	// update menu layout as torn off menu (no spillover menus)
-	menup->arrange();
-
-	LLRect rect;
-	menup->localRectToOtherView(LLRect(-1, menup->getRect().getHeight(), menup->getRect().getWidth() + 3, 0), &rect, gFloaterView);
-	// make sure this floater is big enough for menu
-	mTargetHeight = (F32)(rect.getHeight() + LLFLOATER_HEADER_SIZE + 5);
-	reshape(rect.getWidth(), rect.getHeight());
-	setRect(rect);
-
-	// attach menu to floater
-	menup->setFollowsAll();
-	mOldParent = menup->getParent();
-	addChild(menup);
-	menup->setVisible(TRUE);
-	menup->translate(-menup->getRect().mLeft + 1, -menup->getRect().mBottom + 1);
-	menup->setDropShadowed(FALSE);
+	BOOL handled = FALSE;
+	// The click was somewhere within our rectangle
+	LLMenuItemGL *item = getItemFromXY( x, y );
 
-	mMenu = menup;
+	if (item)
+	{
+		// lie to the item about where the click happened
+		// to make sure it's within the item's rectangle
+		handled = item->handleMouseDown( 0, 0, mask );
+	}
+	else 
+	{
+		// call hidemenus to make sure transient selections get cleared
+		((LLMenuHolderGL*)getParent())->hideMenus();
+	}
 
-	// highlight first item (tear off item will be disabled)
-	mMenu->highlightNextItem(NULL);
+	// always handle mouse down as mouse up will close open menus
+	return handled;
 }
-
-
-void LLTearOffMenu::draw()
+BOOL LLContextMenu::handleMouseUp( S32 x, S32 y, MASK mask )
 {
-	mMenu->setBackgroundVisible(isBackgroundOpaque());
-	mMenu->arrange();
+	BOOL handled = FALSE;
 
-	if (getRect().getHeight() != mTargetHeight)
+	// The click was somewhere within our rectangle
+	LLMenuItemGL *item = getItemFromXY( x, y );
+
+	if (item)
 	{
-		// animate towards target height
-		reshape(getRect().getWidth(), llceil(lerp((F32)getRect().getHeight(), mTargetHeight, LLCriticalDamp::getInterpolant(0.05f))));
+		// lie to the item about where the click happened
+		// to make sure it's within the item's rectangle
+		if (item->getEnabled())
+		{
+			handled = item->handleMouseUp( 0, 0, mask );
+			hide();
+		}
 	}
-	else
+	else 
 	{
-		// when in stasis, remain big enough to hold menu contents
-		mTargetHeight = (F32)(mMenu->getRect().getHeight() + LLFLOATER_HEADER_SIZE + 4);
-		reshape(mMenu->getRect().getWidth() + 3, mMenu->getRect().getHeight() + LLFLOATER_HEADER_SIZE + 5);
+		// call hidemenus to make sure transient selections get cleared
+		((LLMenuHolderGL*)getParent())->hideMenus();
 	}
-	LLFloater::draw();
+
+	if (!handled)
+	{
+		// call hidemenus to make sure transient selections get cleared
+		sMenuContainer->hideMenus();
+	}
+
+	return handled;
 }
 
-void LLTearOffMenu::onFocusReceived()
+BOOL LLContextMenu::handleRightMouseDown(S32 x, S32 y, MASK mask)
 {
-	// if nothing is highlighted, just highlight first item
-	if (!mMenu->getHighlightedItem())
+	BOOL handled = FALSE;
+
+	// The click was somewhere within our rectangle
+	LLMenuItemGL *item = getItemFromXY( x, y );
+
+	S32 local_x = x - getRect().mLeft;
+	S32 local_y = y - getRect().mBottom;
+
+	BOOL clicked_in_menu = pointInView(local_x, local_y) ;
+
+	// grab mouse if right clicking anywhere within pie (even deadzone in middle), to detect drag outside of pie
+	if (clicked_in_menu)
 	{
-		mMenu->highlightNextItem(NULL);
+		// capture mouse cursor as if on initial menu show
+		handled = TRUE;
 	}
-
-	// parent menu items get highlights so navigation logic keeps working
-	LLMenuItemGL* parent_menu_item = mMenu->getParentMenuItem();
-	while(parent_menu_item)
+	
+	if (item)
 	{
-		if (parent_menu_item->getMenu()->getVisible())
-		{
-			parent_menu_item->setHighlight(TRUE);
-			parent_menu_item = parent_menu_item->getMenu()->getParentMenuItem();
-		}
-		else
+		// lie to the item about where the click happened
+		// to make sure it's within the item's rectangle
+		if (item->handleMouseDown( 0, 0, mask ))
 		{
-			break;
+			handled = TRUE;
 		}
 	}
-	LLFloater::onFocusReceived();
-}
 
-void LLTearOffMenu::onFocusLost()
-{
-	// remove highlight from parent item and our own menu
-	mMenu->clearHoverItem();
-	LLFloater::onFocusLost();
+	return handled;
 }
 
-BOOL LLTearOffMenu::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent)
+BOOL LLContextMenu::handleRightMouseUp( S32 x, S32 y, MASK mask )
 {
-	// pass keystrokes down to menu
-	return mMenu->handleUnicodeChar(uni_char, TRUE);
-}
+	// release mouse capture when right mouse button released, and we're past the shrink time
 
-BOOL LLTearOffMenu::handleKeyHere(KEY key, MASK mask)
-{
-	if (!mMenu->getHighlightedItem())
+	S32 local_x = x - getRect().mLeft;
+	S32 local_y = y - getRect().mBottom;
+
+	if (!mHoveredAnyItem && !pointInView(local_x, local_y))
 	{
-		if (key == KEY_UP)
-		{
-			mMenu->highlightPrevItem(NULL);		
-			return TRUE;
-		}
-		else if (key == KEY_DOWN)
-		{
-			mMenu->highlightNextItem(NULL);
-			return TRUE;
-		}
+		gFocusMgr.setMouseCapture(NULL);
+		sMenuContainer->hideMenus();
+		return TRUE;
 	}
-	// pass keystrokes down to menu
-	return mMenu->handleKey(key, mask, TRUE);
+
+
+	BOOL result = handleMouseUp( x, y, mask );
+	mHoveredAnyItem = FALSE;
+	
+	return result;
 }
 
-void LLTearOffMenu::translate(S32 x, S32 y)
+LLMenuItemGL*	LLContextMenu::getItemFromXY		(S32 x, S32 y)
 {
-	if (x != 0 && y != 0)
+	item_list_t::iterator item_iter;
+	for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
 	{
-		// hide open sub-menus by clearing current hover item
-		mMenu->clearHoverItem();
+		S32 local_x = x - (**item_iter).getRect().mLeft;
+		S32 local_y = y - (**item_iter).getRect().mBottom;
+		if((**item_iter).pointInView(local_x,local_y))
+			return *item_iter;
 	}
-	LLFloater::translate(x, y);
+	return NULL;
 }
 
-//static
-LLTearOffMenu* LLTearOffMenu::create(LLMenuGL* menup)
+void	LLContextMenu::draw				()
 {
-	LLTearOffMenu* tearoffp = new LLTearOffMenu(menup);
-	// keep onscreen
-	gFloaterView->adjustToFitScreen(tearoffp, FALSE);
-	tearoffp->open();	/* Flawfinder: ignore */
+	LLMenuGL::draw();
+}
 
-	return tearoffp;
+BOOL	LLContextMenu::appendContextSubMenu(LLContextMenu *menu)
+{
+	
+	if (menu == this)
+	{
+		llerrs << "Can't attach a context menu to itself" << llendl;
+	}
+
+	LLContextMenuBranch *item;
+	LLContextMenuBranch::Params p;
+	p.name = menu->getName();
+	p.label = menu->getLabel();
+	p.branch = menu;
+
+	item = LLUICtrlFactory::create<LLContextMenuBranch>(p);
+	LLMenuGL::sMenuContainer->addChild(item->getBranch());
+	item->setFont( LLFontGL::getFontSansSerifSmall() );
+
+	return append( item );
 }
 
-void LLTearOffMenu::onClose(bool app_quitting)
+bool LLContextMenu::addChild(LLView* view, S32 tab_group)
 {
-	removeChild(mMenu);
-	mOldParent->addChild(mMenu);
-	mMenu->clearHoverItem();
-	mMenu->setFollowsNone();
-	mMenu->setBackgroundVisible(TRUE);
-	mMenu->setVisible(FALSE);
-	mMenu->setTornOff(FALSE);
-	mMenu->setDropShadowed(TRUE);
-	destroy();
+	LLContextMenu* context = dynamic_cast<LLContextMenu*>(view);
+	if (context)
+		return appendContextSubMenu(context);
+
+	LLMenuItemSeparatorGL* separator = dynamic_cast<LLMenuItemSeparatorGL*>(view);
+	if (separator)
+		return append(separator);
+
+	LLMenuItemGL* item = dynamic_cast<LLMenuItemGL*>(view);
+	if (item)
+		return append(item);
+
+	return false;
 }
 
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index a2ef968bcd..3cb76efce0 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -38,78 +38,87 @@
 #include "llstring.h"
 #include "v4color.h"
 #include "llframetimer.h"
-#include "llevent.h"
 
 #include "llkeyboard.h"
 #include "llfloater.h"
 #include "lluistring.h"
 #include "llview.h"
-
+#include <boost/function.hpp>
 
 extern S32 MENU_BAR_HEIGHT;
 extern S32 MENU_BAR_WIDTH;
 
-// These callbacks are used by the LLMenuItemCallGL and LLMenuItemCheckGL
-// classes during their work.
-typedef void (*menu_callback)(void*);
-
-// These callbacks are used by the LLMenuItemCallGL 
-// classes during their work.
-typedef void (*on_disabled_callback)(void*);
-
-// This callback is used by the LLMenuItemCallGL and LLMenuItemCheckGL
-// to determine if the current menu is enabled.
-typedef BOOL (*enabled_callback)(void*);
-
-// This callback is used by LLMenuItemCheckGL to determine it's
-// 'checked' state.
-typedef BOOL (*check_callback)(void*);
-
-// This callback is potentially used by LLMenuItemCallGL. If provided,
-// this function is called whenever it's time to determine the label's
-// contents. Put the contents of the label in the provided parameter.
-typedef void (*label_callback)(std::string&,void*);
-
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLMenuItemGL
 //
 // The LLMenuItemGL represents a single menu item in a menu. 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-class LLMenuItemGL : public LLView
+class LLMenuItemGL : public LLUICtrl
 {
 public:
-	// static functions to control the global color scheme.
-	static void setEnabledColor( const LLColor4& color ) { sEnabledColor = color; }
-	static const LLColor4& getEnabledColor() { return sEnabledColor; }
-	static void setDisabledColor( const LLColor4& color ) { sDisabledColor = color; }
-	static const LLColor4& getDisabledColor() { return sDisabledColor; }
-	static void setHighlightBGColor( const LLColor4& color ) { sHighlightBackground = color; }
-	static const LLColor4& getHighlightBGColor() { return sHighlightBackground; }
-	static void setHighlightFGColor( const LLColor4& color ) { sHighlightForeground = color; }
-	static const LLColor4& getHighlightFGColor() { return sHighlightForeground; }
-
-	LLMenuItemGL( const std::string& name, const std::string& label, KEY key = KEY_NONE, MASK = MASK_NONE );
-	virtual ~LLMenuItemGL() {};
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<std::string>	shortcut;
+		Optional<KEY>			jump_key;
+		Optional<bool>			use_mac_ctrl;
+
+		Deprecated				rect,
+								left,
+								top,
+								right,
+								bottom,
+								width,
+								height,
+								bottom_delta,
+								left_delta;
+
+		Optional<LLUIColor>		enabled_color,
+								disabled_color,
+								highlight_bg_color,
+								highlight_fg_color;
+
+
+		Params()
+		:	shortcut("shortcut"),
+			jump_key("", KEY_NONE),
+			use_mac_ctrl("use_mac_ctrl", false),
+			rect("rect"),
+			left("left"),
+			top("top"),
+			right("right"),
+			bottom("bottom"),
+			width("width"),
+			height("height"),
+			bottom_delta("bottom_delta"),
+			left_delta("left_delta"),
+			enabled_color("enabled_color"),
+			disabled_color("disabled_color"),
+			highlight_bg_color("highlight_bg_color"),
+			highlight_fg_color("highlight_fg_color")
+		{	
+			mouse_opaque = true;
+		}
+	};
 
+protected:
+	LLMenuItemGL(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	virtual void setValue(const LLSD& value) { setLabel(value.asString()); }
-
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-
-	virtual std::string getType() const	{ return "item"; }
+	/*virtual*/ void onVisibilityChange(BOOL new_visibility);
 
 	virtual BOOL handleHover(S32 x, S32 y, MASK mask);
-
 	virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
 
+	LLColor4 getHighlightBgColor() { return mHighlightBackground.get(); }
+
 	void setJumpKey(KEY key);
 	KEY getJumpKey() const { return mJumpKey; }
 	
 	// set the font used by this item.
 	void setFont(const LLFontGL* font) { mFont = font; }
 	const LLFontGL* getFont() const { return mFont; }
-	void setFontStyle(U8 style) { mStyle = style; }
-	U8 getFontStyle() const { return mStyle; }
 
 	// returns the height in pixels for the current font.
 	virtual U32 getNominalHeight( void ) const;
@@ -140,7 +149,7 @@ public:
 	// lead to visual errors if the state of the object changes
 	// without the knowledge of the menu item. For example, if a
 	// boolean being watched is changed outside of the menu item's
-	// doIt() function, the draw buffer will not be updated and will
+	// onCommit() function, the draw buffer will not be updated and will
 	// reflect the wrong value. If this ever becomes an issue, there
 	// are ways to fix this.
 	// Returns the enabled state of the item.
@@ -149,8 +158,7 @@ public:
 	// for branching menu items, bring sub menus up to root level of menu hierarchy
 	virtual void updateBranchParent( LLView* parentp ){};
 	
-	// doIt() - do the primary funcationality of the menu item.
-	virtual void doIt( void );
+	virtual void onCommit( void );
 
 	virtual void setHighlight( BOOL highlight );
 	virtual BOOL getHighlight() const { return mHighlight; }
@@ -180,7 +188,10 @@ protected:
 	// This function appends the character string representation of
 	// the current accelerator key and mask to the provided string.
 	void appendAcceleratorString( std::string& st ) const;
-
+	
+	void initMenuEnableCallback(const EnableCallbackParam& cb, enable_signal_t& sig);
+	
+protected:
 	KEY mAcceleratorKey;
 	MASK mAcceleratorMask;
 	// mLabel contains the actual label specified by the user.
@@ -193,13 +204,13 @@ protected:
 	LLUIString mDrawAccelLabel;
 	LLUIString mDrawBranchLabel;
 
+	LLUIColor mEnabledColor;
+	LLUIColor mDisabledColor;
+	LLUIColor mHighlightBackground;
+	LLUIColor mHighlightForeground;
+
 	BOOL mHighlight;
 private:
-	static LLColor4 sEnabledColor;
-	static LLColor4 sDisabledColor;
-	static LLColor4 sHighlightBackground;
-	static LLColor4 sHighlightForeground;
-
 	// Keyboard and mouse variables
 	BOOL mAllowKeyRepeat;
 	BOOL mGotHover;
@@ -210,12 +221,32 @@ private:
 
 	// Font for this item
 	const LLFontGL* mFont;
-	U8	mStyle;
 	BOOL mDrawTextDisabled;
 
 	KEY mJumpKey;
 };
 
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLMenuItemSeparatorGL
+//
+// This class represents a separator.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+class LLMenuItemSeparatorGL : public LLMenuItemGL
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
+	{
+		Params();
+	};
+	LLMenuItemSeparatorGL(const LLMenuItemSeparatorGL::Params& p = LLMenuItemSeparatorGL::Params());
+
+	/*virtual*/ void draw( void );
+	/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+	/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+	/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
+
+	/*virtual*/ U32 getNominalHeight( void ) const;
+};
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLMenuItemCallGL
@@ -224,78 +255,48 @@ private:
 // calls a user defined callback.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-class LLMenuItemCallGL : public LLMenuItemGL, public LLObservable
+class LLMenuItemCallGL : public LLMenuItemGL
 {
 public:
-	// normal constructor
-	LLMenuItemCallGL( const std::string& name,
- 					  menu_callback clicked_cb, 
-					  enabled_callback enabled_cb = NULL,
-					  void* user_data = NULL, 
-					  KEY key = KEY_NONE, MASK mask = MASK_NONE,
-					  BOOL enabled = TRUE,
-					  on_disabled_callback on_disabled_cb = NULL);
-	LLMenuItemCallGL( const std::string& name,
-					  const std::string& label,
- 					  menu_callback clicked_cb, 
-					  enabled_callback enabled_cb = NULL,
-					  void* user_data = NULL, 
-					  KEY key = KEY_NONE, MASK mask = MASK_NONE,
-					  BOOL enabled = TRUE,
-					  on_disabled_callback on_disabled_cb = NULL);
-
-	// constructor for when you want to trap the arrange method.
-	LLMenuItemCallGL( const std::string& name,
-					  const std::string& label,
-					  menu_callback clicked_cb,
-					  enabled_callback enabled_cb,
-					  label_callback label_cb,
-					  void* user_data,
-					  KEY key = KEY_NONE, MASK mask = MASK_NONE,
-					  BOOL enabled = TRUE,
-					  on_disabled_callback on_disabled_c = NULL);
-	LLMenuItemCallGL( const std::string& name,
-					  menu_callback clicked_cb,
-					  enabled_callback enabled_cb,
-					  label_callback label_cb,
-					  void* user_data,
-					  KEY key = KEY_NONE, MASK mask = MASK_NONE,
-					  BOOL enabled = TRUE,
-					  on_disabled_callback on_disabled_c = NULL);
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-
-	virtual std::string getType() const	{ return "call"; }
-
-
-	void setEnabledControl(std::string enabled_control, LLView *context);
-	void setVisibleControl(std::string enabled_control, LLView *context);
-
-	void setMenuCallback(menu_callback callback, void* data) { mCallback = callback;  mUserData = data; };
-	menu_callback getMenuCallback() const { return mCallback; }
-
-	void setEnabledCallback(enabled_callback callback) { mEnabledCallback = callback; };
-
-	void setUserData(void *userdata)	{ mUserData = userdata; }
-	void* getUserData() const { return mUserData; }
+	struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
+	{
+		Optional<EnableCallbackParam > on_enable;
+		Optional<CommitCallbackParam > on_click;
+		Params()
+			: on_enable("on_enable"),
+			  on_click("on_click")
+		{}
+	};
+protected:
+	LLMenuItemCallGL(const Params&);
+	friend class LLUICtrlFactory;
+	void updateEnabled( void );
 
+public:
+	void initFromParams(const Params& p);
+	
 	// called to rebuild the draw label
 	virtual void buildDrawLabel( void );
 
-	// doIt() - do the primary funcationality of the menu item.
-	virtual void doIt( void );
+	virtual void onCommit( void );
 
 	virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
-
+	virtual BOOL handleKeyHere(KEY key, MASK mask);
+	
 	//virtual void draw();
-
-
+	
+	boost::signals::connection setClickCallback( const commit_signal_t::slot_type& cb )
+	{
+		return setCommitCallback(cb);
+	}
+	
+	boost::signals::connection setEnableCallback( const enable_signal_t::slot_type& cb )
+	{
+		return mEnableSignal.connect(cb);
+	}
+	
 private:
-	menu_callback			mCallback;
-	// mEnabledCallback should return TRUE if the item should be enabled
-	enabled_callback		mEnabledCallback;	
-	label_callback			mLabelCallback;
-	void*					mUserData;
-	on_disabled_callback	mOnDisabledCallback;
+	enable_signal_t mEnableSignal;
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -312,78 +313,37 @@ class LLMenuItemCheckGL
 :	public LLMenuItemCallGL
 {
 public:
-	LLMenuItemCheckGL( const std::string& name, 
-					   const std::string& label,
-					   menu_callback callback,
-					   enabled_callback enabled_cb,
-					   check_callback check,
-					   void* user_data,
-					   KEY key = KEY_NONE, MASK mask = MASK_NONE );
-	LLMenuItemCheckGL( const std::string& name, 
-					   menu_callback callback,
-					   enabled_callback enabled_cb,
-					   check_callback check,
-					   void* user_data,
-					   KEY key = KEY_NONE, MASK mask = MASK_NONE );
-	LLMenuItemCheckGL( const std::string& name, 
-					   const std::string& label,
-					   menu_callback callback,
-					   enabled_callback enabled_cb,
-					   std::string control_name,
-					   LLView *context,
-					   void* user_data,
-					   KEY key = KEY_NONE, MASK mask = MASK_NONE );
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-
-	void setCheckedControl(std::string checked_control, LLView *context);
-
-	virtual void setValue(const LLSD& value);
-
-	virtual std::string getType() const	{ return "check"; }
-
-	// called to rebuild the draw label
-	virtual void buildDrawLabel( void );
-
-private:
-	check_callback mCheckCallback;
-	BOOL mChecked;
-};
-
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLMenuItemToggleGL
-//
-// The LLMenuItemToggleGL is a menu item that wraps around a user
-// specified and controlled boolean.
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	struct Params : public LLInitParam::Block<Params, LLMenuItemCallGL::Params>
+	{
+		Optional<EnableCallbackParam > on_check;
+		Params()
+		:	on_check("on_check")
+		{}
+	};
 
-class LLMenuItemToggleGL : public LLMenuItemGL
-{
+protected:
+	LLMenuItemCheckGL(const Params&);
+	friend class LLUICtrlFactory;
 public:
-	LLMenuItemToggleGL( const std::string& name, const std::string& label,
-						BOOL* toggle, 
-						KEY key = KEY_NONE, MASK mask = MASK_NONE );
-
-	LLMenuItemToggleGL( const std::string& name,
-						BOOL* toggle, 
-						KEY key = KEY_NONE, MASK mask = MASK_NONE );
+	
+	void initFromParams(const Params& p);
 
-	virtual std::string getType() const	{ return "toggle"; }
+	virtual void onCommit( void );
+	
+	virtual void setValue(const LLSD& value);
 
 	// called to rebuild the draw label
 	virtual void buildDrawLabel( void );
-
-	// doIt() - do the primary funcationality of the menu item.
-	virtual void doIt( void );
-
-	// LLView Functionality
-	//virtual void draw( void );
-
+	
+	boost::signals::connection setCheckCallback( const enable_signal_t::slot_type& cb )
+	{
+		return mCheckSignal.connect(cb);
+	}
+	
 private:
-	BOOL* mToggle;
+	enable_signal_t mCheckSignal;
 };
 
-
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLMenuGL
 //
@@ -397,27 +357,55 @@ private:
 
 class LLMenuGL 
 :	public LLUICtrl
-// TODO: The menu and menu item classes share a great deal of functionality and perhaps should be united.
-// I think it may make the most sense to make LLMenuGL be a subclass of LLMenuItemGL. -MG
 {
+public:
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<LLHandle<LLFloater> >	parent_floater;
+		Optional<KEY>					jump_key;
+		Optional<bool>					horizontal_layout,
+										can_tear_off,
+										drop_shadow,
+										bg_visible,
+										create_jump_keys,
+										keep_fixed_size;
+		Optional<LLUIColor>				bg_color;
+
+		Params()
+		:	jump_key("", KEY_NONE),
+			can_tear_off("tear_off", false),
+			drop_shadow("drop_shadow", true),
+			bg_visible("bg_visible", true),
+			create_jump_keys("create_jump_keys", false),
+			bg_color("bg_color",  LLUI::getCachedColorFunctor( "MenuDefaultBgColor" ))
+		{
+			addSynonym(bg_visible, "opaque");
+			addSynonym(bg_color, "color");
+
+			name = "menu";
+		}
+	};
+	void initFromParams(const Params&);
+
+protected:
+	LLMenuGL(const LLMenuGL::Params& p);
+	friend class LLUICtrlFactory;
 	// let branching menu items use my protected traversal methods
 	friend class LLMenuItemBranchGL;
 public:
-	LLMenuGL( const std::string& name, const std::string& label, LLHandle<LLFloater> parent_floater = LLHandle<LLFloater>());
-	LLMenuGL( const std::string& label, LLHandle<LLFloater> parent_floater = LLHandle<LLFloater>() );
 	virtual ~LLMenuGL( void );
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
-	void parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory *factory);
 
+	void parseChildXML(LLXMLNodePtr child, LLView* parent);
 
 	// LLView Functionality
-	virtual BOOL handleUnicodeCharHere( llwchar uni_char );
-	virtual BOOL handleHover( S32 x, S32 y, MASK mask );
-	virtual void draw( void );
-	virtual void drawBackground(LLMenuItemGL* itemp, LLColor4& color);
-	virtual void setVisible(BOOL visible);
+	/*virtual*/ BOOL handleUnicodeCharHere( llwchar uni_char );
+	/*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask );
+	/*virtual*/ void draw( void );
+	/*virtual*/ void drawBackground(LLMenuItemGL* itemp, F32 alpha);
+	/*virtual*/ void setVisible(BOOL visible);
+	/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
+	/*virtual*/ void removeChild( LLView* ctrl);
+	/*virtual*/ BOOL postBuild();
 
 	virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
 
@@ -430,20 +418,13 @@ public:
 	void setLabel(const LLStringExplicit& label) { mLabel = label; }
 
 	// background colors
-	static void setDefaultBackgroundColor( const LLColor4& color ) { sDefaultBackgroundColor = color; }
-	void setBackgroundColor( const LLColor4& color ) { mBackgroundColor = color; }
-	const LLColor4& getBackgroundColor() const { return mBackgroundColor; }
+	void setBackgroundColor( const LLUIColor& color ) { mBackgroundColor = color; }
+	const LLUIColor& getBackgroundColor() const { return mBackgroundColor; }
 	void setBackgroundVisible( BOOL b )	{ mBgVisible = b; }
 	void setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>());
 
-	// Add the menu item to this menu.
-	virtual BOOL append( LLMenuItemGL* item );
-
 	// add a separator to this menu
-	virtual BOOL appendSeparator( const std::string &separator_name = LLStringUtil::null );
-
-	// add a menu - this will create a cascading menu
-	virtual BOOL appendMenu( LLMenuGL* menu );
+	virtual BOOL addSeparator();
 
 	// for branching menu items, bring sub menus up to root level of menu hierarchy
 	virtual void updateParent( LLView* parentp );
@@ -467,19 +448,17 @@ public:
 
 	virtual BOOL isOpen();
 
+	void needsArrange() { mNeedsArrange = TRUE; }
 	// Shape this menu to fit the current state of the children, and
 	// adjust the child rects to fit. This is called automatically
 	// when you add items. *FIX: We may need to deal with visibility
 	// arrangement.
 	virtual void arrange( void );
+	void arrangeAndClear( void );
 
 	// remove all items on the menu
 	void empty( void );
 
-	// Rearrange the components, and do the right thing if the menu doesn't
-	// fit in the bounds.
-	// virtual void arrangeWithBounds(LLRect bounds);
-
 	void			setItemLastSelected(LLMenuItemGL* item);	// must be in menu
 	U32				getItemCount();				// number of menu items
 	LLMenuItemGL*	getItem(S32 number);		// 0 = first item
@@ -500,8 +479,8 @@ public:
 	// Whether to drop shadow menu bar 
 	void setDropShadowed( const BOOL shadowed );
 
-	void setParentMenuItem( LLMenuItemGL* parent_menu_item ) { mParentMenuItem = parent_menu_item; }
-	LLMenuItemGL* getParentMenuItem() const { return mParentMenuItem; }
+	void setParentMenuItem( LLMenuItemGL* parent_menu_item ) { mParentMenuItem = parent_menu_item->getHandle(); }
+	LLMenuItemGL* getParentMenuItem() const { return dynamic_cast<LLMenuItemGL*>(mParentMenuItem.get()); }
 
 	void setTornOff(BOOL torn_off);
 	BOOL getTornOff() { return mTornOff; }
@@ -519,6 +498,11 @@ public:
 protected:
 	void createSpilloverBranch();
 	void cleanupSpilloverBranch();
+	// Add the menu item to this menu.
+	virtual BOOL append( LLMenuItemGL* item );
+
+	// add a menu - this will create a cascading menu
+	virtual BOOL appendMenu( LLMenuGL* menu );
 
 	// TODO: create accessor methods for these?
 	typedef std::list< LLMenuItemGL* > item_list_t;
@@ -531,14 +515,17 @@ protected:
 	S32				mMouseVelY;
 	BOOL			mHorizontalLayout;
 	BOOL			mKeepFixedSize;
+	BOOL			mNeedsArrange;
 
 private:
+
+
 	static LLColor4 sDefaultBackgroundColor;
 	static BOOL		sKeyboardMode;
 
-	LLColor4		mBackgroundColor;
+	LLUIColor		mBackgroundColor;
 	BOOL			mBgVisible;
-	LLMenuItemGL*	mParentMenuItem;
+	LLHandle<LLView> mParentMenuItem;
 	LLUIString		mLabel;
 	BOOL mDropShadowed; 	//  Whether to drop shadow 
 	BOOL			mHasSelection;
@@ -549,6 +536,7 @@ private:
 	LLMenuGL*		mSpilloverMenu;
 	LLHandle<LLFloater>	mParentFloaterHandle;
 	KEY				mJumpKey;
+	BOOL			mCreateJumpKeys;
 }; // end class LLMenuGL
 
 
@@ -563,15 +551,17 @@ private:
 class LLMenuItemBranchGL : public LLMenuItemGL
 {
 public:
-	LLMenuItemBranchGL( const std::string& name, const std::string& label, LLHandle<LLView> branch,
-						KEY key = KEY_NONE, MASK mask = MASK_NONE );
+	struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
+	{
+		Optional<LLMenuGL*>	branch;
+	};
 
+protected:
+	LLMenuItemBranchGL(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	virtual ~LLMenuItemBranchGL();
-
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-
-	virtual std::string getType() const { return "menu"; }
-
+	
 	virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
 
 	virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
@@ -582,8 +572,7 @@ public:
 	// called to rebuild the draw label
 	virtual void buildDrawLabel( void );
 
-	// doIt() - do the primary funcationality of the menu item.
-	virtual void doIt( void );
+	virtual void onCommit( void );
 
 	virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
 	virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
@@ -594,11 +583,11 @@ public:
 
 	virtual BOOL handleKeyHere(KEY key, MASK mask);
 
-	virtual BOOL isActive() const { return isOpen() && getBranch()->getHighlightedItem(); }
+	virtual BOOL isActive() const { return isOpen() && getBranch() && getBranch()->getHighlightedItem(); }
 
 	virtual BOOL isOpen() const { return getBranch() && getBranch()->isOpen(); }
 
-	LLMenuGL *getBranch() const { return (LLMenuGL*)(mBranch.get()); }
+	LLMenuGL* getBranch() const { return (LLMenuGL*)mBranchHandle.get(); }
 
 	virtual void updateBranchParent( LLView* parentp );
 
@@ -607,77 +596,72 @@ public:
 
 	virtual void draw();
 
-	virtual void setEnabledSubMenus(BOOL enabled) { if(getBranch()) getBranch()->setEnabledSubMenus(enabled); }
+	virtual void setEnabledSubMenus(BOOL enabled) { if (getBranch()) getBranch()->setEnabledSubMenus(enabled); }
 
 	virtual void openMenu();
 
 	virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
 
 private:
-	LLHandle<LLView> mBranch;
+	LLHandle<LLView> mBranchHandle;
 }; // end class LLMenuItemBranchGL
 
 
-
 //-----------------------------------------------------------------------------
-// class LLPieMenu
-// A circular menu of items, icons, etc.
+// class LLContextMenu
+// A context menu
 //-----------------------------------------------------------------------------
 
-class LLPieMenu
+class LLContextMenu
 : public LLMenuGL
 {
 public:
-	LLPieMenu(const std::string& name, const std::string& label);
-	LLPieMenu(const std::string& name);
-	virtual ~LLPieMenu() {}
+	struct Params : public LLInitParam::Block<Params, LLMenuGL::Params>
+	{
+		Params()
+		{
+			visible = false;
+		}
+	};
 
-	void initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory);
+protected:
+	LLContextMenu(const Params& p);
+	friend class LLUICtrlFactory;
+
+public:
+	virtual ~LLContextMenu() {}
 
 	// LLView Functionality
 	// can't set visibility directly, must call show or hide
-	virtual void setVisible(BOOL visible);
+	virtual void	setVisible			(BOOL visible);
 	
-	virtual BOOL handleHover( S32 x, S32 y, MASK mask );
-	virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
-	virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
-	virtual BOOL handleRightMouseUp( S32 x, S32 y, MASK mask );
-	virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
-	virtual void draw();
-	virtual void drawBackground(LLMenuItemGL* itemp, LLColor4& color);
+	virtual void	draw				();
+	
+	virtual void	show				(S32 x, S32 y, BOOL adjustCursor = TRUE);
+	virtual void	hide				();
 
-	virtual BOOL append(LLMenuItemGL* item);
-	virtual BOOL appendSeparator( const std::string &separator_name = LLStringUtil::null );
+	
 
-	BOOL appendPieMenu(LLPieMenu *menu);
+	virtual BOOL	handleHover			( S32 x, S32 y, MASK mask );
+	virtual BOOL	handleMouseDown		( S32 x, S32 y, MASK mask );
+	virtual BOOL	handleRightMouseDown( S32 x, S32 y, MASK mask );
+	virtual BOOL	handleRightMouseUp	( S32 x, S32 y, MASK mask );
+	virtual BOOL	handleMouseUp		( S32 x, S32 y, MASK mask );
 
-	virtual void arrange( void );
+	virtual bool	addChild			(LLView* view, S32 tab_group = 0);
 
-	// Display the menu centered on this point on the screen.
-	void show(S32 x, S32 y, BOOL mouse_down);
-	void hide(BOOL item_selected);
+			BOOL	appendContextSubMenu(LLContextMenu *menu);
 
-private:
-	LLMenuItemGL *pieItemFromXY(S32 x, S32 y);
-	S32			  pieItemIndexFromXY(S32 x, S32 y);
-
-	// These cause menu items to be spuriously selected by right-clicks
-	// near the window edge at low frame rates.  I don't think they are
-	// needed unless you shift the menu position in the draw() function. JC
-	//S32				mShiftHoriz;	// non-zero if menu had to shift this frame
-	//S32				mShiftVert;		// non-zero if menu had to shift this frame
-	BOOL			mFirstMouseDown;	// true from show until mouse up
-	BOOL			mUseInfiniteRadius;	// allow picking pie menu items anywhere outside of center circle
-	LLMenuItemGL*	mHoverItem;
-	BOOL			mHoverThisFrame;
+protected:
+	LLMenuItemGL*	getItemFromXY		(S32 x, S32 y);
+
+protected:
 	BOOL			mHoveredAnyItem;
-	LLFrameTimer	mShrinkBorderTimer;
-	F32				mOuterRingAlpha; // for rendering pie menus as both bounded and unbounded
-	F32				mCurRadius;
-	BOOL			mRightMouseDown;
+	LLMenuItemGL*	mHoverItem;
 };
 
 
+
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLMenuBarGL
 //
@@ -687,10 +671,19 @@ private:
 class LLMenuBarGL : public LLMenuGL
 {
 public:
-	LLMenuBarGL( const std::string& name );
+	struct Params : public LLInitParam::Block<Params, LLMenuGL::Params>
+	{
+		Params()
+		{
+			can_tear_off = false;
+			keep_fixed_size = true;
+			horizontal_layout = true;
+			visible = true;
+			drop_shadow = false;
+		}
+	};
+	LLMenuBarGL( const Params& p );
 	virtual ~LLMenuBarGL();
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
 
 	virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
 	virtual BOOL handleKeyHere(KEY key, MASK mask);
@@ -698,17 +691,11 @@ public:
 	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
 	virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
 
-	// rearrange the child rects so they fit the shape of the menu
-	// bar.
-	virtual void arrange( void );
 	virtual void draw();
 	virtual BOOL jumpKeysActive();
 
 	// add a vertical separator to this menu
-	virtual BOOL appendSeparator( const std::string &separator_name = LLStringUtil::null );
-
-	// add a menu - this will create a drop down menu.
-	virtual BOOL appendMenu( LLMenuGL* menu );
+	virtual BOOL addSeparator();
 
 	// LLView Functionality
 	virtual BOOL handleHover( S32 x, S32 y, MASK mask );
@@ -719,6 +706,12 @@ public:
 	void resetMenuTrigger() { mAltKeyTrigger = FALSE; }
 
 private:
+	// add a menu - this will create a drop down menu.
+	virtual BOOL appendMenu( LLMenuGL* menu );
+	// rearrange the child rects so they fit the shape of the menu
+	// bar.
+	virtual void arrange( void );
+
 	void checkMenuTrigger();
 
 	std::list <LLKeyBinding*>	mAccelerators;
@@ -734,7 +727,6 @@ class LLMenuHolderGL : public LLPanel
 {
 public:
 	LLMenuHolderGL();
-	LLMenuHolderGL(const std::string& name, const LLRect& rect, BOOL mouse_opaque, U32 follows = FOLLOWS_NONE);
 	virtual ~LLMenuHolderGL() {}
 
 	virtual BOOL hideMenus();
@@ -794,11 +786,19 @@ private:
 class LLMenuItemTearOffGL : public LLMenuItemGL
 {
 public:
-	LLMenuItemTearOffGL( LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>());
-
-	virtual std::string getType() const { return "tearoff_menu"; }
-
-	virtual void doIt(void);
+	struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
+	{
+		Optional<LLHandle<LLFloater> > parent_floater_handle;
+		Params()
+		{
+			name = "tear off";
+			label = "~~~~~~~~~~~";
+		}
+	};
+
+	LLMenuItemTearOffGL( const Params& );
+
+	virtual void onCommit(void);
 	virtual void draw(void);
 	virtual U32 getNominalHeight() const;
 
@@ -820,4 +820,31 @@ private:
 	LLEditMenuHandlerMgr() {};
 };
 
+
+// *TODO: Eliminate
+// For backwards compatability only; generally just use boost::bind
+class view_listener_t : public boost::signals::trackable
+{
+public:
+	virtual bool handleEvent(const LLSD& userdata) = 0;
+	virtual ~view_listener_t() {}
+	
+	static void addEnable(view_listener_t* listener, const std::string& name)
+	{
+		LLUICtrl::EnableCallbackRegistry::currentRegistrar().add(name, boost::bind(&view_listener_t::handleEvent, listener, _2));
+	}
+	
+	static void addCommit(view_listener_t* listener, const std::string& name)
+	{
+		LLUICtrl::CommitCallbackRegistry::currentRegistrar().add(name, boost::bind(&view_listener_t::handleEvent, listener, _2));
+	}
+	
+	static void addMenu(view_listener_t* listener, const std::string& name)
+	{
+		// For now, add to both click and enable registries
+		addEnable(listener, name);
+		addCommit(listener, name);
+	}
+};
+
 #endif // LL_LLMENUGL_H
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 1662ff7db6..8779eee28d 100644
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -45,17 +45,16 @@
 std::list<LLModalDialog*> LLModalDialog::sModalStack;
 
 LLModalDialog::LLModalDialog( const std::string& title, S32 width, S32 height, BOOL modal )
-	: LLFloater( std::string("modal container"),
-				 LLRect( 0, height, width, 0 ),
-				 title,
-				 FALSE, // resizable
-				 DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT,
-				 FALSE, // drag_on_left
-				 modal ? FALSE : TRUE, // minimizable
-				 modal ? FALSE : TRUE, // close button
-				 TRUE), // bordered
+	: LLFloater(),
 	  mModal( modal )
 {
+	setRect(LLRect( 0, height, width, 0 ));
+	setTitle(title);
+	if (modal)
+	{
+		setCanMinimize(FALSE);
+		setCanClose(FALSE);
+	}
 	setVisible( FALSE );
 	setBackgroundVisible(TRUE);
 	setBackgroundOpaque(TRUE);
@@ -72,12 +71,12 @@ LLModalDialog::~LLModalDialog()
 }
 
 // virtual
-void LLModalDialog::open()	/* Flawfinder: ignore */
+void LLModalDialog::openFloater(const LLSD& key)
 {
 	// SJB: Hack! Make sure we don't ever host a modal dialog
 	LLMultiFloater* thost = LLFloater::getFloaterHost();
 	LLFloater::setFloaterHost(NULL);
-	LLFloater::open();
+	LLFloater::openFloater(key);
 	LLFloater::setFloaterHost(thost);
 }
 
@@ -229,7 +228,7 @@ BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask )
 		BOOL enough_time_elapsed = mVisibleTime.getElapsedTimeF32() > 1.0f;
 		if (enough_time_elapsed && key == KEY_ESCAPE)
 		{
-			close();
+			closeFloater();
 			return TRUE;
 		}
 		return FALSE;
@@ -245,32 +244,15 @@ void LLModalDialog::onClose(bool app_quitting)
 // virtual
 void LLModalDialog::draw()
 {
-	LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
-	S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater");
+	static LLUICachedControl<LLColor4> shadow_color ("ColorDropShadow", *(new LLColor4));
+	static LLUICachedControl<S32> shadow_lines ("DropShadowFloater", 0);
 
 	gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0,
 		shadow_color, shadow_lines);
 
 	LLFloater::draw();
-
-	if (mModal)
-	{
-		// If we've lost focus to a non-child, get it back ASAP.
-		if( gFocusMgr.getTopCtrl() != this )
-		{
-			gFocusMgr.setTopCtrl( this );
-		}
-
-		if( !gFocusMgr.childHasKeyboardFocus( this ) )
-		{
-			setFocus(TRUE);
-		}
-
-		if( !gFocusMgr.childHasMouseCapture( this ) )
-		{
-			gFocusMgr.setMouseCapture( this );
-		}
-	}
+	
+	// Focus retrieval moved to LLFloaterView::refresh()
 }
 
 void LLModalDialog::centerOnScreen()
diff --git a/indra/llui/llmodaldialog.h b/indra/llui/llmodaldialog.h
index f6abd0a7ac..dad92ab82a 100644
--- a/indra/llui/llmodaldialog.h
+++ b/indra/llui/llmodaldialog.h
@@ -48,7 +48,7 @@ public:
 	LLModalDialog( const std::string& title, S32 width, S32 height, BOOL modal = true );
 	/*virtual*/ ~LLModalDialog();
 
-	/*virtual*/ void	open();	/* Flawfinder: ignore */
+	/*virtual*/ void	openFloater(const LLSD& key = LLSD());
 	
 	/*virtual*/ void 	reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 	
diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp
new file mode 100644
index 0000000000..c0fe7ff32d
--- /dev/null
+++ b/indra/llui/llmultifloater.cpp
@@ -0,0 +1,510 @@
+/** 
+ * @file llmultifloater.cpp
+ * @brief LLFloater that hosts other floaters
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Floating "windows" within the GL display, like the inventory floater,
+// mini-map floater, etc.
+
+#include "linden_common.h"
+
+#include "llmultifloater.h"
+#include "llresizehandle.h"
+
+//
+// LLMultiFloater
+//
+
+LLMultiFloater::LLMultiFloater(const LLFloater::Params& params)
+	: LLFloater(),
+	  mTabContainer(NULL),
+	  mTabPos(LLTabContainer::TOP),
+	  mAutoResize(TRUE),
+	  mOrigMinWidth(0),
+	  mOrigMinHeight(0)
+{
+}
+
+void LLMultiFloater::buildTabContainer()
+{
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+	
+	LLTabContainer::Params p;
+	p.name(std::string("Preview Tabs"));
+	p.rect(LLRect(LLPANEL_BORDER_WIDTH, getRect().getHeight() - floater_header_size, getRect().getWidth() - LLPANEL_BORDER_WIDTH, 0));
+	p.tab_position(mTabPos);
+	p.follows.flags(FOLLOWS_ALL);
+	p.commit_callback.function(boost::bind(&LLMultiFloater::onTabSelected, this));
+
+	mTabContainer = LLUICtrlFactory::create<LLTabContainer>(p);
+	addChild(mTabContainer);
+	
+	if (isResizable())
+	{
+		mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH);
+	}
+}
+
+void LLMultiFloater::onOpen(const LLSD& key)
+{
+	if (mTabContainer->getTabCount() <= 0)
+	{
+		// for now, don't allow multifloaters
+		// without any child floaters
+		closeFloater();
+	}
+}
+
+void LLMultiFloater::onClose(bool app_quitting)
+{
+	if(closeAllFloaters() == TRUE)
+	{
+		LLFloater::onClose(app_quitting);
+	}//else not all tabs could be closed...
+}
+
+void LLMultiFloater::draw()
+{
+	if (mTabContainer->getTabCount() == 0)
+	{
+		//RN: could this potentially crash in draw hierarchy?
+		closeFloater();
+	}
+	else
+	{
+		for (S32 i = 0; i < mTabContainer->getTabCount(); i++)
+		{
+			LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(i);
+			if (floaterp->getShortTitle() != mTabContainer->getPanelTitle(i))
+			{
+				mTabContainer->setPanelTitle(i, floaterp->getShortTitle());
+			}
+		}
+		LLFloater::draw();
+	}
+}
+
+BOOL LLMultiFloater::closeAllFloaters()
+{
+	S32	tabToClose = 0;
+	S32	lastTabCount = mTabContainer->getTabCount();
+	while (tabToClose < mTabContainer->getTabCount())
+	{
+		LLFloater* first_floater = (LLFloater*)mTabContainer->getPanelByIndex(tabToClose);
+		first_floater->closeFloater();
+		if(lastTabCount == mTabContainer->getTabCount())
+		{
+			//Tab did not actually close, possibly due to a pending Save Confirmation dialog..
+			//so try and close the next one in the list...
+			tabToClose++;
+		}else
+		{
+			//Tab closed ok.
+			lastTabCount = mTabContainer->getTabCount();
+		}
+	}
+	if( mTabContainer->getTabCount() != 0 )
+		return FALSE; // Couldn't close all the tabs (pending save dialog?) so return FALSE.
+	return TRUE; //else all tabs were successfully closed...
+}
+
+void LLMultiFloater::growToFit(S32 content_width, S32 content_height)
+{
+	static LLUICachedControl<S32> tabcntr_close_btn_size ("UITabCntrCloseBtnSize", 0);
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+	S32 tabcntr_header_height = LLPANEL_BORDER_WIDTH + tabcntr_close_btn_size;
+	S32 new_width = llmax(getRect().getWidth(), content_width + LLPANEL_BORDER_WIDTH * 2);
+	S32 new_height = llmax(getRect().getHeight(), content_height + floater_header_size + tabcntr_header_height);
+
+    if (isMinimized())
+    {
+        LLRect newrect;
+        newrect.setLeftTopAndSize(getExpandedRect().mLeft, getExpandedRect().mTop, new_width, new_height);
+        setExpandedRect(newrect);
+    }
+	else
+	{
+		S32 old_height = getRect().getHeight();
+		reshape(new_width, new_height);
+		// keep top left corner in same position
+		translate(0, old_height - new_height);
+	}
+}
+
+/**
+  void addFloater(LLFloater* floaterp, BOOL select_added_floater)
+
+  Adds the LLFloater pointed to by floaterp to this.
+  If floaterp is already hosted by this, then it is re-added to get
+  new titles, etc.
+  If select_added_floater is true, the LLFloater pointed to by floaterp will
+  become the selected tab in this
+
+  Affects: mTabContainer, floaterp
+**/
+void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point)
+{
+	if (!floaterp)
+	{
+		return;
+	}
+
+	if (!mTabContainer)
+	{
+		llerrs << "Tab Container used without having been initialized." << llendl;
+		return;
+	}
+
+	if (floaterp->getHost() == this)
+	{
+		// already hosted by me, remove
+		// do this so we get updated title, etc.
+		mFloaterDataMap.erase(floaterp->getHandle());
+		mTabContainer->removeTabPanel(floaterp);
+	}
+	else if (floaterp->getHost())
+	{
+		// floaterp is hosted by somebody else and
+		// this is adding it, so remove it from it's old host
+		floaterp->getHost()->removeFloater(floaterp);
+	}
+	else if (floaterp->getParent() == gFloaterView)
+	{
+		// rehost preview floater as child panel
+		gFloaterView->removeChild(floaterp);
+	}
+
+	// store original configuration
+	LLFloaterData floater_data;
+	floater_data.mWidth = floaterp->getRect().getWidth();
+	floater_data.mHeight = floaterp->getRect().getHeight();
+	floater_data.mCanMinimize = floaterp->isMinimizeable();
+	floater_data.mCanResize = floaterp->isResizable();
+
+	// remove minimize and close buttons
+	floaterp->setCanMinimize(FALSE);
+	floaterp->setCanResize(FALSE);
+	floaterp->setCanDrag(FALSE);
+	floaterp->storeRectControl();
+	// avoid double rendering of floater background (makes it more opaque)
+	floaterp->setBackgroundVisible(FALSE);
+
+	if (mAutoResize)
+	{
+		growToFit(floater_data.mWidth, floater_data.mHeight);
+	}
+
+	//add the panel, add it to proper maps
+	mTabContainer->addTabPanel(
+		LLTabContainer::TabPanelParams()
+			.panel(floaterp)
+			.label(floaterp->getShortTitle())
+			.insert_at(insertion_point));
+	mFloaterDataMap[floaterp->getHandle()] = floater_data;
+
+	updateResizeLimits();
+
+	if ( select_added_floater )
+	{
+		mTabContainer->selectTabPanel(floaterp);
+	}
+	else
+	{
+		// reassert visible tab (hiding new floater if necessary)
+		mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex());
+	}
+
+	floaterp->setHost(this);
+	if (isMinimized())
+	{
+		floaterp->setVisible(FALSE);
+	}
+}
+
+/**
+	BOOL selectFloater(LLFloater* floaterp)
+
+	If the LLFloater pointed to by floaterp is hosted by this,
+	then its tab is selected and returns true.  Otherwise returns false.
+
+	Affects: mTabContainer
+**/
+BOOL LLMultiFloater::selectFloater(LLFloater* floaterp)
+{
+	return mTabContainer->selectTabPanel(floaterp);
+}
+
+// virtual
+void LLMultiFloater::selectNextFloater()
+{
+	mTabContainer->selectNextTab();
+}
+
+// virtual
+void LLMultiFloater::selectPrevFloater()
+{
+	mTabContainer->selectPrevTab();
+}
+
+void LLMultiFloater::showFloater(LLFloater* floaterp, LLTabContainer::eInsertionPoint insertion_point)
+{
+	// we won't select a panel that already is selected
+	// it is hard to do this internally to tab container
+	// as tab selection is handled via index and the tab at a given
+	// index might have changed
+	if (floaterp != mTabContainer->getCurrentPanel() &&
+		!mTabContainer->selectTabPanel(floaterp))
+	{
+		addFloater(floaterp, TRUE, insertion_point);
+	}
+}
+
+void LLMultiFloater::removeFloater(LLFloater* floaterp)
+{
+	if ( floaterp->getHost() != this )
+		return;
+
+	floater_data_map_t::iterator found_data_it = mFloaterDataMap.find(floaterp->getHandle());
+	if (found_data_it != mFloaterDataMap.end())
+	{
+		LLFloaterData& floater_data = found_data_it->second;
+		floaterp->setCanMinimize(floater_data.mCanMinimize);
+		if (!floater_data.mCanResize)
+		{
+			// restore original size
+			floaterp->reshape(floater_data.mWidth, floater_data.mHeight);
+		}
+		floaterp->setCanResize(floater_data.mCanResize);
+		mFloaterDataMap.erase(found_data_it);
+	}
+	mTabContainer->removeTabPanel(floaterp);
+	floaterp->setBackgroundVisible(TRUE);
+	floaterp->setCanDrag(TRUE);
+	floaterp->setHost(NULL);
+	floaterp->applyRectControl();
+
+	updateResizeLimits();
+
+	tabOpen((LLFloater*)mTabContainer->getCurrentPanel(), false);
+}
+
+void LLMultiFloater::tabOpen(LLFloater* opened_floater, bool from_click)
+{
+	// default implementation does nothing
+}
+
+void LLMultiFloater::tabClose()
+{
+	if (mTabContainer->getTabCount() == 0)
+	{
+		// no more children, close myself
+		closeFloater();
+	}
+}
+
+void LLMultiFloater::setVisible(BOOL visible)
+{
+	// *FIX: shouldn't have to do this, fix adding to minimized multifloater
+	LLFloater::setVisible(visible);
+	
+	if (mTabContainer)
+	{
+		LLPanel* cur_floaterp = mTabContainer->getCurrentPanel();
+
+		if (cur_floaterp)
+		{
+			cur_floaterp->setVisible(visible);
+		}
+
+		// if no tab selected, and we're being shown,
+		// select last tab to be added
+		if (visible && !cur_floaterp)
+		{
+			mTabContainer->selectLastTab();
+		}
+	}
+}
+
+BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask)
+{
+	if (key == 'W' && mask == MASK_CONTROL)
+	{
+		LLFloater* floater = getActiveFloater();
+		// is user closeable and is system closeable
+		if (floater && floater->canClose() && floater->isCloseable())
+		{
+			floater->closeFloater();
+		}
+		return TRUE;
+	}
+
+	return LLFloater::handleKeyHere(key, mask);
+}
+
+bool LLMultiFloater::addChild(LLView* child, S32 tab_group)
+{
+	LLTabContainer* tab_container = dynamic_cast<LLTabContainer*>(child);
+	if (tab_container)
+	{
+		// store pointer to tab container
+		setTabContainer(tab_container);
+	}
+
+	// then go ahead and add child as usual
+	return LLFloater::addChild(child, tab_group);
+}
+
+LLFloater* LLMultiFloater::getActiveFloater()
+{
+	return (LLFloater*)mTabContainer->getCurrentPanel();
+}
+
+S32	LLMultiFloater::getFloaterCount()
+{
+	return mTabContainer->getTabCount();
+}
+
+/**
+	BOOL isFloaterFlashing(LLFloater* floaterp)
+
+	Returns true if the LLFloater pointed to by floaterp
+	is currently in a flashing state and is hosted by this.
+	False otherwise.
+
+	Requires: floaterp != NULL
+**/
+BOOL LLMultiFloater::isFloaterFlashing(LLFloater* floaterp)
+{
+	if ( floaterp && floaterp->getHost() == this )
+		return mTabContainer->getTabPanelFlashing(floaterp);
+
+	return FALSE;
+}
+
+/**
+	BOOL setFloaterFlashing(LLFloater* floaterp, BOOL flashing)
+
+	Sets the current flashing state of the LLFloater pointed
+	to by floaterp to be the BOOL flashing if the LLFloater pointed
+	to by floaterp is hosted by this.
+
+	Requires: floaterp != NULL
+**/
+void LLMultiFloater::setFloaterFlashing(LLFloater* floaterp, BOOL flashing)
+{
+	if ( floaterp && floaterp->getHost() == this )
+		mTabContainer->setTabPanelFlashing(floaterp, flashing);
+}
+
+void LLMultiFloater::onTabSelected()
+{
+	LLFloater* floaterp = dynamic_cast<LLFloater*>(mTabContainer->getCurrentPanel());
+	if (floaterp)
+	{
+		tabOpen(floaterp, true);
+	}
+}
+
+void LLMultiFloater::setCanResize(BOOL can_resize)
+{
+	LLFloater::setCanResize(can_resize);
+	if (isResizable() && mTabContainer->getTabPosition() == LLTabContainer::BOTTOM)
+	{
+		mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH);
+	}
+	else
+	{
+		mTabContainer->setRightTabBtnOffset(0);
+	}
+}
+
+BOOL LLMultiFloater::postBuild()
+{
+	// remember any original xml minimum size
+	getResizeLimits(&mOrigMinWidth, &mOrigMinHeight);
+
+	if (mTabContainer)
+	{
+		return TRUE;
+	}
+
+	requires<LLTabContainer>("Preview Tabs");
+	if (checkRequirements())
+	{
+		mTabContainer = getChild<LLTabContainer>("Preview Tabs");
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
+void LLMultiFloater::updateResizeLimits()
+{
+	static LLUICachedControl<S32> tabcntr_close_btn_size ("UITabCntrCloseBtnSize", 0);
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+	S32 tabcntr_header_height = LLPANEL_BORDER_WIDTH + tabcntr_close_btn_size;
+	// initialize minimum size constraint to the original xml values.
+	S32 new_min_width = mOrigMinWidth;
+	S32 new_min_height = mOrigMinHeight;
+	// possibly increase minimum size constraint due to children's minimums.
+	for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx)
+	{
+		LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(tab_idx);
+		if (floaterp)
+		{
+			new_min_width = llmax(new_min_width, floaterp->getMinWidth() + LLPANEL_BORDER_WIDTH * 2);
+			new_min_height = llmax(new_min_height, floaterp->getMinHeight() + floater_header_size + tabcntr_header_height);
+		}
+	}
+	setResizeLimits(new_min_width, new_min_height);
+
+	S32 cur_height = getRect().getHeight();
+	S32 new_width = llmax(getRect().getWidth(), new_min_width);
+	S32 new_height = llmax(getRect().getHeight(), new_min_height);
+
+	if (isMinimized())
+	{
+		const LLRect& expanded = getExpandedRect();
+		LLRect newrect;
+		newrect.setLeftTopAndSize(expanded.mLeft, expanded.mTop, llmax(expanded.getWidth(), new_width), llmax(expanded.getHeight(), new_height));
+		setExpandedRect(newrect);
+	}
+	else
+	{
+		reshape(new_width, new_height);
+
+		// make sure upper left corner doesn't move
+		translate(0, cur_height - getRect().getHeight());
+
+		// make sure this window is visible on screen when it has been modified
+		// (tab added, etc)
+		gFloaterView->adjustToFitScreen(this, TRUE);
+	}
+}
diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h
new file mode 100644
index 0000000000..ea8a9841e3
--- /dev/null
+++ b/indra/llui/llmultifloater.h
@@ -0,0 +1,107 @@
+/** 
+ * @file llmultifloater.h
+ * @brief LLFloater that hosts other floaters
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Floating "windows" within the GL display, like the inventory floater,
+// mini-map floater, etc.
+
+
+#ifndef LL_MULTI_FLOATER_H
+#define LL_MULTI_FLOATER_H
+
+#include "llfloater.h"
+#include "lltabcontainer.h" // for LLTabContainer::eInsertionPoint
+
+// https://wiki.lindenlab.com/mediawiki/index.php?title=LLMultiFloater&oldid=81376
+class LLMultiFloater : public LLFloater
+{
+public:
+	LLMultiFloater(const LLFloater::Params& params = LLFloater::Params());
+	virtual ~LLMultiFloater() {};
+	
+	void buildTabContainer();
+	
+	virtual BOOL postBuild();
+	/*virtual*/ void onOpen(const LLSD& key);
+	/*virtual*/ void onClose(bool app_quitting);
+	/*virtual*/ void draw();
+	/*virtual*/ void setVisible(BOOL visible);
+	/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
+	/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
+
+	virtual void setCanResize(BOOL can_resize);
+	virtual void growToFit(S32 content_width, S32 content_height);
+	virtual void addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
+
+	virtual void showFloater(LLFloater* floaterp, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
+	virtual void removeFloater(LLFloater* floaterp);
+
+	virtual void tabOpen(LLFloater* opened_floater, bool from_click);
+	virtual void tabClose();
+
+	virtual BOOL selectFloater(LLFloater* floaterp);
+	virtual void selectNextFloater();
+	virtual void selectPrevFloater();
+
+	virtual LLFloater*	getActiveFloater();
+	virtual BOOL		isFloaterFlashing(LLFloater* floaterp);
+	virtual S32			getFloaterCount();
+
+	virtual void setFloaterFlashing(LLFloater* floaterp, BOOL flashing);
+	virtual BOOL closeAllFloaters();	//Returns FALSE if the floater could not be closed due to pending confirmation dialogs
+	void setTabContainer(LLTabContainer* tab_container) { if (!mTabContainer) mTabContainer = tab_container; }
+	void onTabSelected();
+
+	virtual void updateResizeLimits();
+
+protected:
+	struct LLFloaterData
+	{
+		S32		mWidth;
+		S32		mHeight;
+		BOOL	mCanMinimize;
+		BOOL	mCanResize;
+	};
+
+	LLTabContainer*		mTabContainer;
+	
+	typedef std::map<LLHandle<LLFloater>, LLFloaterData> floater_data_map_t;
+	floater_data_map_t	mFloaterDataMap;
+	
+	LLTabContainer::TabPosition mTabPos;
+	BOOL				mAutoResize;
+	S32					mOrigMinWidth, mOrigMinHeight;  // logically const but initialized late
+};
+
+#endif  // LL_MULTI_FLOATER_H
+
+
+
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index c1487be553..24b83b0120 100644
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -41,64 +41,59 @@
 #include "llkeyboard.h"			// for the MASK constants
 #include "llcontrol.h"
 #include "llimagegl.h"
+#include "lluictrlfactory.h"
 
 #include <sstream>
 
 static LLRegisterWidget<LLMultiSlider> r("multi_slider_bar");
 
-const S32 MULTI_THUMB_WIDTH = 8;
-const S32 MULTI_TRACK_HEIGHT = 6;
 const F32 FLOAT_THRESHOLD = 0.00001f;
-const S32 EXTRA_TRIANGLE_WIDTH = 2;
-const S32 EXTRA_TRIANGLE_HEIGHT = -2;
 
 S32 LLMultiSlider::mNameCounter = 0;
 
-LLMultiSlider::LLMultiSlider( 
-	const std::string& name,
-	const LLRect& rect,
-	void (*on_commit_callback)(LLUICtrl* ctrl, void* userdata),
-	void* callback_userdata,
-	F32 initial_value,
-	F32 min_value,
-	F32 max_value,
-	F32 increment,
-	S32 max_sliders,
-	BOOL allow_overlap,
-	BOOL draw_track,
-	BOOL use_triangle,
-	const std::string& control_name)
-	:
-	LLUICtrl( name, rect, TRUE,	on_commit_callback, callback_userdata, 
-		FOLLOWS_LEFT | FOLLOWS_TOP),
-
-	mInitialValue( initial_value ),
-	mMinValue( min_value ),
-	mMaxValue( max_value ),
-	mIncrement( increment ),
-	mMaxNumSliders(max_sliders),
-	mAllowOverlap(allow_overlap),
-	mDrawTrack(draw_track),
-	mUseTriangle(use_triangle),
+LLMultiSlider::Params::Params()
+:	max_sliders("max_sliders", 1),
+	allow_overlap("allow_overlap", false),
+	draw_track("draw_track", true),
+	use_triangle("use_triangle", false),
+	track_color("track_color"),
+	thumb_disabled_color("thumb_disabled_color"),
+	thumb_outline_color("thumb_outline_color"),
+	thumb_center_color("thumb_center_color"),
+	thumb_center_selected_color("thumb_center_selected_color"),
+	triangle_color("triangle_color"),
+	mouse_down_callback("mouse_down_callback"),
+	mouse_up_callback("mouse_up_callback"),
+	thumb_width("thumb_width")
+{
+	name = "multi_slider_bar";
+	mouse_opaque(true);
+	follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
+}
+
+LLMultiSlider::LLMultiSlider(const LLMultiSlider::Params& p)
+:	LLF32UICtrl(p),
 	mMouseOffset( 0 ),
-	mDragStartThumbRect( 0, getRect().getHeight(), MULTI_THUMB_WIDTH, 0 ),
-	mTrackColor(		LLUI::sColorsGroup->getColor( "MultiSliderTrackColor" ) ),
-	mThumbOutlineColor(	LLUI::sColorsGroup->getColor( "MultiSliderThumbOutlineColor" ) ),
-	mThumbCenterColor(	LLUI::sColorsGroup->getColor( "MultiSliderThumbCenterColor" ) ),
-	mThumbCenterSelectedColor(	LLUI::sColorsGroup->getColor( "MultiSliderThumbCenterSelectedColor" ) ),
-	mDisabledThumbColor(LLUI::sColorsGroup->getColor( "MultiSliderDisabledThumbColor" ) ),
-	mTriangleColor(LLUI::sColorsGroup->getColor( "MultiSliderTriangleColor" ) ),
-	mMouseDownCallback( NULL ),
-	mMouseUpCallback( NULL )
+	mDragStartThumbRect( 0, getRect().getHeight(), p.thumb_width, 0 ),
+	mMaxNumSliders(p.max_sliders),
+	mAllowOverlap(p.allow_overlap),
+	mDrawTrack(p.draw_track),
+	mUseTriangle(p.use_triangle),
+	mTrackColor(p.track_color()),
+	mThumbOutlineColor(p.thumb_outline_color()),
+	mThumbCenterColor(p.thumb_center_color()),
+	mThumbCenterSelectedColor(p.thumb_center_selected_color()),
+	mDisabledThumbColor(p.thumb_disabled_color()),
+	mTriangleColor(p.triangle_color()),
+	mThumbWidth(p.thumb_width)
 {
 	mValue.emptyMap();
 	mCurSlider = LLStringUtil::null;
-
-	// properly handle setting the starting thumb rect
-	// do it this way to handle both the operating-on-settings
-	// and standalone ways of using this
-	setControlName(control_name, NULL);
-	setValue(getValue());
+	
+	if (p.mouse_down_callback.isProvided())
+		initCommitCallback(p.mouse_down_callback, mMouseDownSignal);
+	if (p.mouse_up_callback.isProvided())
+		initCommitCallback(p.mouse_up_callback, mMouseUpSignal);
 }
 
 void LLMultiSlider::setSliderValue(const std::string& name, F32 value, BOOL from_event)
@@ -152,12 +147,12 @@ void LLMultiSlider::setSliderValue(const std::string& name, F32 value, BOOL from
 	
 	F32 t = (newValue - mMinValue) / (mMaxValue - mMinValue);
 
-	S32 left_edge = MULTI_THUMB_WIDTH/2;
-	S32 right_edge = getRect().getWidth() - (MULTI_THUMB_WIDTH/2);
+	S32 left_edge = mThumbWidth/2;
+	S32 right_edge = getRect().getWidth() - (mThumbWidth/2);
 
 	S32 x = left_edge + S32( t * (right_edge - left_edge) );
-	mThumbRects[name].mLeft = x - (MULTI_THUMB_WIDTH/2);
-	mThumbRects[name].mRight = x + (MULTI_THUMB_WIDTH/2);
+	mThumbRects[name].mLeft = x - (mThumbWidth/2);
+	mThumbRects[name].mRight = x + (mThumbWidth/2);
 }
 
 void LLMultiSlider::setValue(const LLSD& value)
@@ -211,7 +206,7 @@ const std::string& LLMultiSlider::addSlider(F32 val)
 	}
 
 	// add a new thumb rect
-	mThumbRects[newName.str()] = LLRect( 0, getRect().getHeight(), MULTI_THUMB_WIDTH, 0 );
+	mThumbRects[newName.str()] = LLRect( 0, getRect().getHeight(), mThumbWidth, 0 );
 
 	// add the value and set the current slider to this one
 	mValue.insert(newName.str(), initVal);
@@ -295,15 +290,15 @@ void LLMultiSlider::clear()
 		deleteCurSlider();
 	}
 
-	LLUICtrl::clear();
+	LLF32UICtrl::clear();
 }
 
 BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
 {
 	if( gFocusMgr.getMouseCapture() == this )
 	{
-		S32 left_edge = MULTI_THUMB_WIDTH/2;
-		S32 right_edge = getRect().getWidth() - (MULTI_THUMB_WIDTH/2);
+		S32 left_edge = mThumbWidth/2;
+		S32 right_edge = getRect().getWidth() - (mThumbWidth/2);
 
 		x += mMouseOffset;
 		x = llclamp( x, left_edge, right_edge );
@@ -331,10 +326,8 @@ BOOL LLMultiSlider::handleMouseUp(S32 x, S32 y, MASK mask)
 	{
 		gFocusMgr.setMouseCapture( NULL );
 
-		if( mMouseUpCallback )
-		{
-			mMouseUpCallback( this, mCallbackUserData );
-		}
+		mMouseUpSignal( this, LLSD() );
+
 		handled = TRUE;
 		make_ui_sound("UISndClickRelease");
 	}
@@ -353,10 +346,7 @@ BOOL LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask)
 	{
 		setFocus(TRUE);
 	}
-	if( mMouseDownCallback )
-	{
-		mMouseDownCallback( this, mCallbackUserData );
-	}
+	mMouseDownSignal( this, LLSD() );
 
 	if (MASK_CONTROL & mask) // if CTRL is modifying
 	{
@@ -379,7 +369,7 @@ BOOL LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask)
 		// Find the offset of the actual mouse location from the center of the thumb.
 		if (mThumbRects[mCurSlider].pointInRect(x,y))
 		{
-			mMouseOffset = (mThumbRects[mCurSlider].mLeft + MULTI_THUMB_WIDTH/2) - x;
+			mMouseOffset = (mThumbRects[mCurSlider].mLeft + mThumbWidth/2) - x;
 		}
 		else
 		{
@@ -424,6 +414,8 @@ BOOL	LLMultiSlider::handleKeyHere(KEY key, MASK mask)
 
 void LLMultiSlider::draw()
 {
+	static LLUICachedControl<S32> extra_triangle_height ("UIExtraTriangleHeight", 0);
+	static LLUICachedControl<S32> extra_triangle_width ("UIExtraTriangleWidth", 0);
 	LLColor4 curThumbColor;
 
 	std::map<std::string, LLRect>::iterator mIt;
@@ -439,16 +431,17 @@ void LLMultiSlider::draw()
 	F32 opacity = getEnabled() ? 1.f : 0.3f;
 
 	// Track
-	LLUIImagePtr thumb_imagep = LLUI::sImageProvider->getUIImage("rounded_square.tga");
+	LLUIImagePtr thumb_imagep = LLUI::getUIImage("rounded_square.tga");
 
-	S32 height_offset = (getRect().getHeight() - MULTI_TRACK_HEIGHT) / 2;
+	static LLUICachedControl<S32> multi_track_height ("UIMultiTrackHeight", 0);
+	S32 height_offset = (getRect().getHeight() - multi_track_height) / 2;
 	LLRect track_rect(0, getRect().getHeight() - height_offset, getRect().getWidth(), height_offset );
 
 
 	if(mDrawTrack)
 	{
 		track_rect.stretch(-1);
-		thumb_imagep->draw(track_rect, mTrackColor % opacity);
+		thumb_imagep->draw(track_rect, mTrackColor.get() % opacity);
 	}
 
 	// if we're supposed to use a drawn triangle
@@ -458,13 +451,13 @@ void LLMultiSlider::draw()
 		for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) {
 
 			gl_triangle_2d(
-				mIt->second.mLeft - EXTRA_TRIANGLE_WIDTH, 
-				mIt->second.mTop + EXTRA_TRIANGLE_HEIGHT,
-				mIt->second.mRight + EXTRA_TRIANGLE_WIDTH, 
-				mIt->second.mTop + EXTRA_TRIANGLE_HEIGHT,
+				mIt->second.mLeft - extra_triangle_width, 
+				mIt->second.mTop + extra_triangle_height,
+				mIt->second.mRight + extra_triangle_width, 
+				mIt->second.mTop + extra_triangle_height,
 				mIt->second.mLeft + mIt->second.getWidth() / 2, 
-				mIt->second.mBottom - EXTRA_TRIANGLE_HEIGHT,
-				mTriangleColor, TRUE);
+				mIt->second.mBottom - extra_triangle_height,
+				mTriangleColor.get(), TRUE);
 		}
 	}
 	else if (!thumb_imagep)
@@ -474,7 +467,7 @@ void LLMultiSlider::draw()
 		for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) {
 			
 			// choose the color
-			curThumbColor = mThumbCenterColor;
+			curThumbColor = mThumbCenterColor.get();
 			if(mIt->first == mCurSlider) {
 				
 				curSldrIt = mIt;
@@ -488,19 +481,19 @@ void LLMultiSlider::draw()
 
 		// now draw the current slider
 		if(curSldrIt != mThumbRects.end()) {
-			gl_rect_2d(curSldrIt->second, mThumbCenterSelectedColor, TRUE);
+			gl_rect_2d(curSldrIt->second, mThumbCenterSelectedColor.get(), TRUE);
 		}
 
 		// and draw the drag start
 		if (gFocusMgr.getMouseCapture() == this)
 		{
-			gl_rect_2d(mDragStartThumbRect, mThumbCenterColor % opacity, FALSE);
+			gl_rect_2d(mDragStartThumbRect, mThumbCenterColor.get() % opacity, FALSE);
 		}
 	}
 	else if( gFocusMgr.getMouseCapture() == this )
 	{
 		// draw drag start
-		thumb_imagep->drawSolid(mDragStartThumbRect, mThumbCenterColor % 0.3f);
+		thumb_imagep->drawSolid(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f);
 
 		// draw the highlight
 		if (hasFocus())
@@ -513,7 +506,7 @@ void LLMultiSlider::draw()
 		for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) 
 		{
 			// choose the color
-			curThumbColor = mThumbCenterColor;
+			curThumbColor = mThumbCenterColor.get();
 			if(mIt->first == mCurSlider) 
 			{
 				// don't draw now, draw last
@@ -528,7 +521,7 @@ void LLMultiSlider::draw()
 		// draw cur slider last
 		if(curSldrIt != mThumbRects.end()) 
 		{
-			thumb_imagep->drawSolid(curSldrIt->second, mThumbCenterSelectedColor);
+			thumb_imagep->drawSolid(curSldrIt->second, mThumbCenterSelectedColor.get());
 		}
 		
 	}
@@ -546,7 +539,7 @@ void LLMultiSlider::draw()
 		{
 			
 			// choose the color
-			curThumbColor = mThumbCenterColor;
+			curThumbColor = mThumbCenterColor.get();
 			if(mIt->first == mCurSlider) 
 			{
 				curSldrIt = mIt;
@@ -559,74 +552,9 @@ void LLMultiSlider::draw()
 
 		if(curSldrIt != mThumbRects.end()) 
 		{
-			thumb_imagep->drawSolid(curSldrIt->second, mThumbCenterSelectedColor % opacity);
+			thumb_imagep->drawSolid(curSldrIt->second, mThumbCenterSelectedColor.get() % opacity);
 		}
 	}
 
-	LLUICtrl::draw();
-}
-
-// virtual
-LLXMLNodePtr LLMultiSlider::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("initial_val", TRUE)->setFloatValue(getInitialValue());
-	node->createChild("min_val", TRUE)->setFloatValue(getMinValue());
-	node->createChild("max_val", TRUE)->setFloatValue(getMaxValue());
-	node->createChild("increment", TRUE)->setFloatValue(getIncrement());
-
-	return node;
-}
-
-
-//static
-LLView* LLMultiSlider::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("multi_slider_bar");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	F32 initial_value = 0.f;
-	node->getAttributeF32("initial_val", initial_value);
-
-	F32 min_value = 0.f;
-	node->getAttributeF32("min_val", min_value);
-
-	F32 max_value = 1.f; 
-	node->getAttributeF32("max_val", max_value);
-
-	F32 increment = 0.1f;
-	node->getAttributeF32("increment", increment);
-
-	S32 max_sliders = 1;
-	node->getAttributeS32("max_sliders", max_sliders);
-
-	BOOL allow_overlap = FALSE;
-	node->getAttributeBOOL("allow_overlap", allow_overlap);
-
-	BOOL draw_track = TRUE;
-	node->getAttributeBOOL("draw_track", draw_track);
-
-	BOOL use_triangle = FALSE;
-	node->getAttributeBOOL("use_triangle", use_triangle);
-
-	LLMultiSlider* multiSlider = new LLMultiSlider(name,
-							rect,
-							NULL,
-							NULL,
-							initial_value,
-							min_value,
-							max_value,
-							increment,
-							max_sliders,
-							allow_overlap,
-							draw_track,
-							use_triangle);
-
-	multiSlider->initFromXML(node, parent);
-
-	return multiSlider;
+	LLF32UICtrl::draw();
 }
diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h
index cdbdb597f9..9c01b528a7 100644
--- a/indra/llui/llmultislider.h
+++ b/indra/llui/llmultislider.h
@@ -33,32 +33,40 @@
 #ifndef LL_MULTI_SLIDER_H
 #define LL_MULTI_SLIDER_H
 
-#include "lluictrl.h"
+#include "llf32uictrl.h"
 #include "v4color.h"
 
 class LLUICtrlFactory;
 
-class LLMultiSlider : public LLUICtrl
+class LLMultiSlider : public LLF32UICtrl
 {
 public:
-	LLMultiSlider( 
-		const std::string& name,
-		const LLRect& rect,
-		void (*on_commit_callback)(LLUICtrl* ctrl, void* userdata),
-		void* callback_userdata,
-		F32 initial_value,
-		F32 min_value,
-		F32 max_value,
-		F32 increment,
-		S32 max_sliders,
-		BOOL allow_overlap,
-		BOOL draw_track,
-		BOOL use_triangle,
-		const std::string& control_name = LLStringUtil::null );
-
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static  LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
+	struct Params : public LLInitParam::Block<Params, LLF32UICtrl::Params>
+	{
+		Optional<S32>	max_sliders;
 
+		Optional<bool>	allow_overlap,
+						draw_track,
+						use_triangle;
+
+		Optional<LLUIColor>	track_color,
+							thumb_disabled_color,
+							thumb_outline_color,
+							thumb_center_color,
+							thumb_center_selected_color,
+							triangle_color;
+
+		Optional<CommitCallbackParam>	mouse_down_callback,
+										mouse_up_callback;
+		Optional<S32>		thumb_width;
+
+		Params();
+	};
+
+protected:
+	LLMultiSlider(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	void			setSliderValue(const std::string& name, F32 value, BOOL from_event = FALSE);
 	F32				getSliderValue(const std::string& name) const;
 
@@ -67,41 +75,27 @@ public:
 	void			setCurSlider(const std::string& name);
 	void			setCurSliderValue(F32 val, BOOL from_event = false) { setSliderValue(mCurSlider, val, from_event); }
 
-	virtual void	setValue(const LLSD& value);
-	virtual LLSD	getValue() const		{ return mValue; }
-
-	virtual void	setMinValue(LLSD min_value)	{ setMinValue((F32)min_value.asReal()); }
-	virtual void	setMaxValue(LLSD max_value)	{ setMaxValue((F32)max_value.asReal());  }
+	/*virtual*/ void	setValue(const LLSD& value);
+	/*virtual*/ LLSD	getValue() const		{ return mValue; }
 
-	F32				getInitialValue() const { return mInitialValue; }
-	F32				getMinValue() const		{ return mMinValue; }
-	F32				getMaxValue() const		{ return mMaxValue; }
-	F32				getIncrement() const	{ return mIncrement; }
-	void			setMinValue(F32 min_value) { mMinValue = min_value; }
-	void			setMaxValue(F32 max_value) { mMaxValue = max_value; }
-	void			setIncrement(F32 increment) { mIncrement = increment; }
-	void			setMouseDownCallback( void (*cb)(LLUICtrl* ctrl, void* userdata) ) { mMouseDownCallback = cb; }
-	void			setMouseUpCallback(	void (*cb)(LLUICtrl* ctrl, void* userdata) ) { mMouseUpCallback = cb; }
+	boost::signals::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
+	boost::signals::connection setMouseUpCallback(	const commit_signal_t::slot_type& cb )   { return mMouseUpSignal.connect(cb); }
 
-	bool findUnusedValue(F32& initVal);
+	bool			findUnusedValue(F32& initVal);
 	const std::string&	addSlider();
 	const std::string&	addSlider(F32 val);
 	void			deleteSlider(const std::string& name);
 	void			deleteCurSlider()			{ deleteSlider(mCurSlider); }
 	void			clear();
 
-	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);
-	virtual BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
-	virtual BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
-	virtual BOOL	handleKeyHere(KEY key, MASK mask);
-	virtual void	draw();
+	/*virtual*/ BOOL	handleHover(S32 x, S32 y, MASK mask);
+	/*virtual*/ BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
+	/*virtual*/ BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
+	/*virtual*/ BOOL	handleKeyHere(KEY key, MASK mask);
+	/*virtual*/ void	draw();
 
 protected:
 	LLSD			mValue;
-	F32				mInitialValue;
-	F32				mMinValue;
-	F32				mMaxValue;
-	F32				mIncrement;
 	std::string		mCurSlider;
 	static S32		mNameCounter;
 
@@ -112,17 +106,18 @@ protected:
 
 	S32				mMouseOffset;
 	LLRect			mDragStartThumbRect;
+	S32				mThumbWidth;
 
 	std::map<std::string, LLRect>	mThumbRects;
-	LLColor4		mTrackColor;
-	LLColor4		mThumbOutlineColor;
-	LLColor4		mThumbCenterColor;
-	LLColor4		mThumbCenterSelectedColor;
-	LLColor4		mDisabledThumbColor;
-	LLColor4		mTriangleColor;
+	LLUIColor		mTrackColor;
+	LLUIColor		mThumbOutlineColor;
+	LLUIColor		mThumbCenterColor;
+	LLUIColor		mThumbCenterSelectedColor;
+	LLUIColor		mDisabledThumbColor;
+	LLUIColor		mTriangleColor;
 	
-	void			(*mMouseDownCallback)(LLUICtrl* ctrl, void* userdata);
-	void			(*mMouseUpCallback)(LLUICtrl* ctrl, void* userdata);
+	commit_signal_t	mMouseDownSignal;
+	commit_signal_t	mMouseUpSignal;
 };
 
 #endif  // LL_LLSLIDER_H
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp
index 8bcf9f9b76..14584e6df5 100644
--- a/indra/llui/llmultisliderctrl.cpp
+++ b/indra/llui/llmultisliderctrl.cpp
@@ -50,90 +50,100 @@
 #include "llcontrol.h"
 #include "llfocusmgr.h"
 #include "llresmgr.h"
+#include "lluictrlfactory.h"
 
 static LLRegisterWidget<LLMultiSliderCtrl> r("multi_slider");
 
 const U32 MAX_STRING_LENGTH = 10;
-
+LLMultiSliderCtrl::Params::Params()
+:	text_width("text_width"),
+	label_width("label_width"),
+	show_text("show_text", true),
+	can_edit_text("can_edit_text", false),
+	max_sliders("max_sliders", 1),
+	allow_overlap("allow_overlap", false),
+	draw_track("draw_track", true),
+	use_triangle("use_triangle", false),
+	decimal_digits("decimal_digits", 3),
+	text_color("text_color"),
+	text_disabled_color("text_disabled_color"),
+	mouse_down_callback("mouse_down_callback"),
+	mouse_up_callback("mouse_up_callback")
+{
+	mouse_opaque = true;
+}
  
-LLMultiSliderCtrl::LLMultiSliderCtrl(const std::string& name, const LLRect& rect, 
-						   const std::string& label,
-						   const LLFontGL* font,
-						   S32 label_width,
-						   S32 text_left,
-						   BOOL show_text,
-						   BOOL can_edit_text,
-						   void (*commit_callback)(LLUICtrl*, void*),
-						   void* callback_user_data,
-						   F32 initial_value, F32 min_value, F32 max_value, F32 increment,
-						   S32 max_sliders, BOOL allow_overlap,
-						   BOOL draw_track,
-						   BOOL use_triangle,
-						   const std::string& control_which)
-	: LLUICtrl(name, rect, TRUE, commit_callback, callback_user_data ),
-	  mFont(font),
-	  mShowText( show_text ),
-	  mCanEditText( can_edit_text ),
-	  mPrecision( 3 ),
-	  mLabelBox( NULL ),
-	  mLabelWidth( label_width ),
-
-	  mEditor( NULL ),
-	  mTextBox( NULL ),
-	  mTextEnabledColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ),
-	  mTextDisabledColor( LLUI::sColorsGroup->getColor( "LabelDisabledColor" ) ),
-	  mSliderMouseUpCallback( NULL ),
-	  mSliderMouseDownCallback( NULL )
+LLMultiSliderCtrl::LLMultiSliderCtrl(const LLMultiSliderCtrl::Params& p)
+:	LLF32UICtrl(p),
+	mLabelBox( NULL ),
+	mEditor( NULL ),
+	mTextBox( NULL ),
+	mTextEnabledColor(p.text_color()),
+	mTextDisabledColor(p.text_disabled_color())
 {
+	static LLUICachedControl<S32> multi_sliderctrl_spacing ("UIMultiSliderctrlSpacing", 0);
+
 	S32 top = getRect().getHeight();
 	S32 bottom = 0;
 	S32 left = 0;
 
+	S32 label_width = p.label_width;
+	S32 text_width = p.text_width;
+
 	// Label
-	if( !label.empty() )
+	if( !p.label().empty() )
 	{
-		if (label_width == 0)
+		if (p.label_width == 0)
 		{
-			label_width = font->getWidth(label);
+			label_width = p.font()->getWidth(p.label);
 		}
 		LLRect label_rect( left, top, label_width, bottom );
-		mLabelBox = new LLTextBox( std::string("MultiSliderCtrl Label"), label_rect, label, font );
+		LLTextBox::Params params;
+		params.name("MultiSliderCtrl Label");
+		params.rect(label_rect);
+		params.text(p.label);
+		params.font(p.font);
+		mLabelBox = LLUICtrlFactory::create<LLTextBox> (params);
 		addChild(mLabelBox);
 	}
 
 	S32 slider_right = getRect().getWidth();
-	if( show_text )
-	{
-		slider_right = text_left - MULTI_SLIDERCTRL_SPACING;
-	}
 
-	S32 slider_left = label_width ? label_width + MULTI_SLIDERCTRL_SPACING : 0;
-	LLRect slider_rect( slider_left, top, slider_right, bottom );
-	mMultiSlider = new LLMultiSlider( 
-		std::string("multi_slider"),
-		slider_rect, 
-		LLMultiSliderCtrl::onSliderCommit, this, 
-		initial_value, min_value, max_value, increment,
-		max_sliders, allow_overlap, draw_track,
-		use_triangle,
-		control_which );
-	addChild( mMultiSlider );
-	mCurValue = mMultiSlider->getCurSliderValue();
-	
-	if( show_text )
+	if (p.show_text)
 	{
+		if (!p.text_width.isProvided())
+		{
+			text_width = 0;
+			// calculate the size of the text box (log max_value is number of digits - 1 so plus 1)
+			if ( p.max_value() )
+				text_width = p.font()->getWidth(std::string("0")) * ( static_cast < S32 > ( log10  ( p.max_value ) ) + p.decimal_digits + 1 );
+
+			if ( p.increment < 1.0f )
+				text_width += p.font()->getWidth(std::string("."));	// (mostly) take account of decimal point in value
+
+			if ( p.min_value < 0.0f || p.max_value < 0.0f )
+				text_width += p.font()->getWidth(std::string("-"));	// (mostly) take account of minus sign 
+
+			// padding to make things look nicer
+			text_width += 8;
+		}
+		S32 text_left = getRect().getWidth() - text_width;
+
+		slider_right = text_left - multi_sliderctrl_spacing;
+
 		LLRect text_rect( text_left, top, getRect().getWidth(), bottom );
-		if( can_edit_text )
+		if( p.can_edit_text )
 		{
-			mEditor = new LLLineEditor( std::string("MultiSliderCtrl Editor"), text_rect,
-				LLStringUtil::null, font,
-				MAX_STRING_LENGTH,
-				&LLMultiSliderCtrl::onEditorCommit, NULL, NULL, this,
-				&LLLineEditor::prevalidateFloat );
-			mEditor->setFollowsLeft();
-			mEditor->setFollowsBottom();
+			LLLineEditor::Params params;
+			params.name("MultiSliderCtrl Editor");
+			params.rect(text_rect);
+			params.font(p.font);
+			params.max_length_bytes(MAX_STRING_LENGTH);
+			params.commit_callback.function(LLMultiSliderCtrl::onEditorCommit);
+			params.prevalidate_callback(&LLLineEditor::prevalidateFloat);
+			params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
+			mEditor = LLUICtrlFactory::create<LLLineEditor> (params);
 			mEditor->setFocusReceivedCallback( &LLMultiSliderCtrl::onEditorGainFocus );
-			mEditor->setIgnoreTab(TRUE);
 			// don't do this, as selecting the entire text is single clicking in some cases
 			// and double clicking in others
 			//mEditor->setSelectAllonFocusReceived(TRUE);
@@ -141,13 +151,37 @@ LLMultiSliderCtrl::LLMultiSliderCtrl(const std::string& name, const LLRect& rect
 		}
 		else
 		{
-			mTextBox = new LLTextBox( std::string("MultiSliderCtrl Text"), text_rect,	LLStringUtil::null,	font);
-			mTextBox->setFollowsLeft();
-			mTextBox->setFollowsBottom();
+			LLTextBox::Params params;
+			params.name("MultiSliderCtrl Text");
+			params.rect(text_rect);
+			params.font(p.font);
+			params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
+			mTextBox = LLUICtrlFactory::create<LLTextBox> (params);
 			addChild(mTextBox);
 		}
 	}
 
+	S32 slider_left = label_width ? label_width + multi_sliderctrl_spacing : 0;
+	LLRect slider_rect( slider_left, top, slider_right, bottom );
+	LLMultiSlider::Params params;
+	params.rect(slider_rect);
+	params.commit_callback.function( LLMultiSliderCtrl::onSliderCommit );
+	params.mouse_down_callback( p.mouse_down_callback );
+	params.mouse_up_callback( p.mouse_up_callback );
+	params.initial_value(p.initial_value());
+	params.min_value(p.min_value);
+	params.max_value(p.max_value);
+	params.increment(p.increment);
+	params.max_sliders(p.max_sliders);
+	params.allow_overlap(p.allow_overlap);
+	params.draw_track(p.draw_track);
+	params.use_triangle(p.use_triangle);
+	params.control_name(p.control_name);
+	mMultiSlider = LLUICtrlFactory::create<LLMultiSlider> (params);
+	addChild( mMultiSlider );
+	mCurValue = mMultiSlider->getCurSliderValue();
+
+
 	updateText();
 }
 
@@ -203,7 +237,8 @@ BOOL LLMultiSliderCtrl::setLabelArg( const std::string& key, const LLStringExpli
 			S32 delta = rect.mRight - prev_right;
 			rect = mMultiSlider->getRect();
 			S32 left = rect.mLeft + delta;
-			left = llclamp(left, 0, rect.mRight-MULTI_SLIDERCTRL_SPACING);
+			static LLUICachedControl<S32> multi_slider_ctrl_spacing ("UIMultiSliderctrlSpacing", 0);
+			left = llclamp(left, 0, rect.mRight - multi_slider_ctrl_spacing);
 			rect.mLeft = left;
 			mMultiSlider->setRect(rect);
 		}
@@ -294,11 +329,12 @@ void LLMultiSliderCtrl::updateText()
 }
 
 // static
-void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
+void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata)
 {
-	LLMultiSliderCtrl* self = (LLMultiSliderCtrl*) userdata;
-	llassert( caller == self->mEditor );
-
+	LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl);
+	if (!ctrl)
+		return;
+	
 	BOOL success = FALSE;
 	F32 val = self->mCurValue;
 	F32 saved_val = self->mCurValue;
@@ -310,17 +346,9 @@ void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
 		val = (F32) atof( text.c_str() );
 		if( self->mMultiSlider->getMinValue() <= val && val <= self->mMultiSlider->getMaxValue() )
 		{
-			if( self->mValidateCallback )
-			{
-				self->setCurSliderValue( val );  // set the value temporarily so that the callback can retrieve it.
-				if( self->mValidateCallback( self, self->mCallbackUserData ) )
-				{
-					success = TRUE;
-				}
-			}
-			else
+			self->setCurSliderValue( val );  // set the value temporarily so that the callback can retrieve it.
+			if( self->mValidateSignal( self, val ) )
 			{
-				self->setCurSliderValue( val );
 				success = TRUE;
 			}
 		}
@@ -342,26 +370,19 @@ void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
 }
 
 // static
-void LLMultiSliderCtrl::onSliderCommit( LLUICtrl* caller, void *userdata )
+void LLMultiSliderCtrl::onSliderCommit(LLUICtrl* ctrl, const LLSD& userdata)
 {
-	LLMultiSliderCtrl* self = (LLMultiSliderCtrl*) userdata;
-	//llassert( caller == self->mSlider );
-
+	LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl);
+	if (!self)
+		return;
+	
 	BOOL success = FALSE;
 	F32 saved_val = self->mCurValue;
 	F32 new_val = self->mMultiSlider->getCurSliderValue();
 
-	if( self->mValidateCallback )
+	self->mCurValue = new_val;  // set the value temporarily so that the callback can retrieve it.
+	if( self->mValidateSignal( self, new_val ) )
 	{
-		self->mCurValue = new_val;  // set the value temporarily so that the callback can retrieve it.
-		if( self->mValidateCallback( self, self->mCallbackUserData ) )
-		{
-			success = TRUE;
-		}
-	}
-	else
-	{
-		self->mCurValue = new_val;
 		success = TRUE;
 	}
 
@@ -382,11 +403,11 @@ void LLMultiSliderCtrl::onSliderCommit( LLUICtrl* caller, void *userdata )
 
 void LLMultiSliderCtrl::setEnabled(BOOL b)
 {
-	LLUICtrl::setEnabled( b );
+	LLF32UICtrl::setEnabled( b );
 
 	if( mLabelBox )
 	{
-		mLabelBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
+		mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
 	}
 
 	mMultiSlider->setEnabled( b );
@@ -398,7 +419,7 @@ void LLMultiSliderCtrl::setEnabled(BOOL b)
 
 	if( mTextBox )
 	{
-		mTextBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
+		mTextBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
 	}
 }
 
@@ -409,7 +430,7 @@ void LLMultiSliderCtrl::setTentative(BOOL b)
 	{
 		mEditor->setTentative(b);
 	}
-	LLUICtrl::setTentative(b);
+	LLF32UICtrl::setTentative(b);
 }
 
 
@@ -422,7 +443,8 @@ void LLMultiSliderCtrl::onCommit()
 		mEditor->setTentative(FALSE);
 	}
 
-	LLUICtrl::onCommit();
+	setControlValue(getValueF32());
+	LLF32UICtrl::onCommit();
 }
 
 
@@ -438,37 +460,14 @@ void LLMultiSliderCtrl::setPrecision(S32 precision)
 	updateText();
 }
 
-void LLMultiSliderCtrl::setSliderMouseDownCallback( void (*slider_mousedown_callback)(LLUICtrl* caller, void* userdata) )
-{
-	mSliderMouseDownCallback = slider_mousedown_callback;
-	mMultiSlider->setMouseDownCallback( LLMultiSliderCtrl::onSliderMouseDown );
-}
-
-// static
-void LLMultiSliderCtrl::onSliderMouseDown(LLUICtrl* caller, void* userdata)
+boost::signals::connection LLMultiSliderCtrl::setSliderMouseDownCallback( const commit_signal_t::slot_type& cb )
 {
-	LLMultiSliderCtrl* self = (LLMultiSliderCtrl*) userdata;
-	if( self->mSliderMouseDownCallback )
-	{
-		self->mSliderMouseDownCallback( self, self->mCallbackUserData );
-	}
+	return mMultiSlider->setMouseDownCallback( cb );
 }
 
-
-void LLMultiSliderCtrl::setSliderMouseUpCallback( void (*slider_mouseup_callback)(LLUICtrl* caller, void* userdata) )
+boost::signals::connection LLMultiSliderCtrl::setSliderMouseUpCallback( const commit_signal_t::slot_type& cb )
 {
-	mSliderMouseUpCallback = slider_mouseup_callback;
-	mMultiSlider->setMouseUpCallback( LLMultiSliderCtrl::onSliderMouseUp );
-}
-
-// static
-void LLMultiSliderCtrl::onSliderMouseUp(LLUICtrl* caller, void* userdata)
-{
-	LLMultiSliderCtrl* self = (LLMultiSliderCtrl*) userdata;
-	if( self->mSliderMouseUpCallback )
-	{
-		self->mSliderMouseUpCallback( self, self->mCallbackUserData );
-	}
+	return mMultiSlider->setMouseUpCallback( cb );
 }
 
 void LLMultiSliderCtrl::onTabInto()
@@ -484,154 +483,9 @@ void LLMultiSliderCtrl::reportInvalidData()
 	make_ui_sound("UISndBadKeystroke");
 }
 
-//virtual
-std::string LLMultiSliderCtrl::getControlName() const
-{
-	return mMultiSlider->getControlName();
-}
-
 // virtual
 void LLMultiSliderCtrl::setControlName(const std::string& control_name, LLView* context)
 {
 	mMultiSlider->setControlName(control_name, context);
 }
 
-// virtual
-LLXMLNodePtr LLMultiSliderCtrl::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("show_text", TRUE)->setBoolValue(mShowText);
-
-	node->createChild("can_edit_text", TRUE)->setBoolValue(mCanEditText);
-
-	node->createChild("decimal_digits", TRUE)->setIntValue(mPrecision);
-
-	if (mLabelBox)
-	{
-		node->createChild("label", TRUE)->setStringValue(mLabelBox->getText());
-	}
-
-	// TomY TODO: Do we really want to export the transient state of the slider?
-	node->createChild("value", TRUE)->setFloatValue(mCurValue);
-
-	if (mMultiSlider)
-	{
-		node->createChild("initial_val", TRUE)->setFloatValue(mMultiSlider->getInitialValue());
-		node->createChild("min_val", TRUE)->setFloatValue(mMultiSlider->getMinValue());
-		node->createChild("max_val", TRUE)->setFloatValue(mMultiSlider->getMaxValue());
-		node->createChild("increment", TRUE)->setFloatValue(mMultiSlider->getIncrement());
-	}
-	addColorXML(node, mTextEnabledColor, "text_enabled_color", "LabelTextColor");
-	addColorXML(node, mTextDisabledColor, "text_disabled_color", "LabelDisabledColor");
-
-	return node;
-}
-
-LLView* LLMultiSliderCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("multi_slider");
-	node->getAttributeString("name", name);
-
-	std::string label;
-	node->getAttributeString("label", label);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	LLFontGL* font = LLView::selectFont(node);
-
-	// HACK: Font might not be specified.
-	if (!font)
-	{
-		font = LLFontGL::getFontSansSerifSmall();
-	}
-
-	S32 label_width = 0;
-	node->getAttributeS32("label_width", label_width);
-
-	BOOL show_text = TRUE;
-	node->getAttributeBOOL("show_text", show_text);
-
-	BOOL can_edit_text = FALSE;
-	node->getAttributeBOOL("can_edit_text", can_edit_text);
-	
-	BOOL allow_overlap = FALSE;
-	node->getAttributeBOOL("allow_overlap", allow_overlap);
-
-	BOOL draw_track = TRUE;
-	node->getAttributeBOOL("draw_track", draw_track);
-
-	BOOL use_triangle = FALSE;
-	node->getAttributeBOOL("use_triangle", use_triangle);
-
-	F32 initial_value = 0.f;
-	node->getAttributeF32("initial_val", initial_value);
-
-	F32 min_value = 0.f;
-	node->getAttributeF32("min_val", min_value);
-
-	F32 max_value = 1.f; 
-	node->getAttributeF32("max_val", max_value);
-
-	F32 increment = 0.1f;
-	node->getAttributeF32("increment", increment);
-
-	U32 precision = 3;
-	node->getAttributeU32("decimal_digits", precision);
-
-	S32 max_sliders = 1;
-	node->getAttributeS32("max_sliders", max_sliders);
-
-
-	S32 text_left = 0;
-	if (show_text)
-	{
-		// calculate the size of the text box (log max_value is number of digits - 1 so plus 1)
-		if ( max_value )
-			text_left = font->getWidth(std::string("0")) * ( static_cast < S32 > ( log10  ( max_value ) ) + precision + 1 );
-
-		if ( increment < 1.0f )
-			text_left += font->getWidth(std::string("."));	// (mostly) take account of decimal point in value
-
-		if ( min_value < 0.0f || max_value < 0.0f )
-			text_left += font->getWidth(std::string("-"));	// (mostly) take account of minus sign 
-
-		// padding to make things look nicer
-		text_left += 8;
-	}
-
-	LLUICtrlCallback callback = NULL;
-
-	if (label.empty())
-	{
-		label.assign(node->getTextContents());
-	}
-
-	LLMultiSliderCtrl* slider = new LLMultiSliderCtrl(name,
-							rect,
-							label,
-							font,
-							label_width,
-							rect.getWidth() - text_left,
-							show_text,
-							can_edit_text,
-							callback,
-							NULL,
-							initial_value,
-							min_value, 
-							max_value,
-							increment,
-							max_sliders,
-							allow_overlap,
-							draw_track,
-							use_triangle);
-
-	slider->setPrecision(precision);
-
-	slider->initFromXML(node, parent);
-
-	slider->updateText();
-	
-	return slider;
-}
diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h
index b62b5ec323..85ba77b7df 100644
--- a/indra/llui/llmultisliderctrl.h
+++ b/indra/llui/llmultisliderctrl.h
@@ -33,17 +33,12 @@
 #ifndef LL_MULTI_SLIDERCTRL_H
 #define LL_MULTI_SLIDERCTRL_H
 
-#include "lluictrl.h"
+#include "llf32uictrl.h"
 #include "v4color.h"
 #include "llmultislider.h"
 #include "lltextbox.h"
 #include "llrect.h"
 
-//
-// Constants
-//
-const S32	MULTI_SLIDERCTRL_SPACING	=  4;			// space between label, slider, and text
-const S32	MULTI_SLIDERCTRL_HEIGHT		=  16;
 
 //
 // Classes
@@ -53,27 +48,35 @@ class LLLineEditor;
 class LLSlider;
 
 
-class LLMultiSliderCtrl : public LLUICtrl
+class LLMultiSliderCtrl : public LLF32UICtrl
 {
 public:
-	LLMultiSliderCtrl(const std::string& name, 
-		const LLRect& rect, 
-		const std::string& label, 
-		const LLFontGL* font,
-		S32 slider_left,
-		S32 text_left,
-		BOOL show_text,
-		BOOL can_edit_text,
-		void (*commit_callback)(LLUICtrl*, void*),
-		void* callback_userdata,
-		F32 initial_value, F32 min_value, F32 max_value, F32 increment,
-		S32 max_sliders, BOOL allow_overlap, BOOL draw_track,
-		BOOL use_triangle,
-		const std::string& control_which = LLStringUtil::null );
-
+	struct Params : public LLInitParam::Block<Params, LLF32UICtrl::Params>
+	{
+		Optional<S32>			label_width,
+								text_width;
+		Optional<bool>			show_text,
+								can_edit_text;
+		Optional<S32>			decimal_digits;
+		Optional<S32>			max_sliders;	
+		Optional<bool>			allow_overlap,
+								draw_track,
+								use_triangle;
+
+		Optional<LLUIColor>		text_color,
+								text_disabled_color;
+
+		Optional<CommitCallbackParam>	mouse_down_callback,
+										mouse_up_callback;
+
+		Params();
+	};
+
+protected:
+	LLMultiSliderCtrl(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	virtual ~LLMultiSliderCtrl();
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
 
 	F32				getSliderValue(const std::string& name) const;
 	void			setSliderValue(const std::string& name, F32 v, BOOL from_event = FALSE);
@@ -112,8 +115,8 @@ public:
 	void			setLabelColor(const LLColor4& c)			{ mTextEnabledColor = c; }
 	void			setDisabledLabelColor(const LLColor4& c)	{ mTextDisabledColor = c; }
 
-	void			setSliderMouseDownCallback(	void (*slider_mousedown_callback)(LLUICtrl* caller, void* userdata) );
-	void			setSliderMouseUpCallback(	void (*slider_mouseup_callback)(LLUICtrl* caller, void* userdata) );
+	boost::signals::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
+	boost::signals::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
 
 	virtual void	onTabInto();
 
@@ -121,13 +124,10 @@ public:
 	virtual void	onCommit();						// mark not tentative, then commit
 
 	virtual void		setControlName(const std::string& control_name, LLView* context);
-	virtual std::string 	getControlName() const;
 	
-	static void		onSliderCommit(LLUICtrl* caller, void* userdata);
-	static void		onSliderMouseDown(LLUICtrl* caller,void* userdata);
-	static void		onSliderMouseUp(LLUICtrl* caller,void* userdata);
-
-	static void		onEditorCommit(LLUICtrl* caller, void* userdata);
+	static void		onSliderCommit(LLUICtrl* caller, const LLSD& userdata);
+	
+	static void		onEditorCommit(LLUICtrl* ctrl, const LLSD& userdata);
 	static void		onEditorGainFocus(LLFocusableElement* caller, void *userdata);
 	static void		onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata);
 
@@ -149,11 +149,8 @@ private:
 	LLLineEditor*	mEditor;
 	LLTextBox*		mTextBox;
 
-	LLColor4		mTextEnabledColor;
-	LLColor4		mTextDisabledColor;
-
-	void			(*mSliderMouseUpCallback)( LLUICtrl* ctrl, void* userdata );
-	void			(*mSliderMouseDownCallback)( LLUICtrl* ctrl, void* userdata );
+	LLUIColor	mTextEnabledColor;
+	LLUIColor	mTextDisabledColor;
 };
 
 #endif  // LL_MULTI_SLIDERCTRL_H
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 2ae96726af..34ff21268e 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -31,11 +31,14 @@
 */
 
 #include "linden_common.h"
+
+#include "llnotifications.h"
+
+#include "lluictrl.h"
 #include "lluictrlfactory.h"
 #include "lldir.h"
 #include "llsdserialize.h"
-
-#include "llnotifications.h"
+#include "lltrans.h"
 
 #include <algorithm>
 #include <boost/regex.hpp>
@@ -161,7 +164,7 @@ bool filterIgnoredNotifications(LLNotificationPtr notification)
 	// Check to see if the user wants to ignore this alert
 	if (form->getIgnoreType() != LLNotificationForm::IGNORE_NO)
 	{
-		return LLUI::sConfigGroup->getWarning(notification->getName());
+		return LLUI::sSettingGroups["ignores"]->getBOOL(notification->getName());
 	}
 
 	return true;
@@ -182,7 +185,7 @@ bool handleIgnoredNotification(const LLSD& payload)
 			response = pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON);
 			break;
 		case LLNotificationForm::IGNORE_WITH_LAST_RESPONSE:
-			response = LLUI::sIgnoresGroup->getLLSD("Default" + pNotif->getName());
+			response = LLUI::sSettingGroups["ignores"]->getLLSD("Default" + pNotif->getName());
 			break;
 		case LLNotificationForm::IGNORE_SHOW_AGAIN:
 			break;
@@ -240,10 +243,11 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLXMLNodeP
 			{
 				// remember last option chosen by user and automatically respond with that in the future
 				mIgnore = IGNORE_WITH_LAST_RESPONSE;
-				LLUI::sIgnoresGroup->declareLLSD(std::string("Default") + name, "", std::string("Default response for notification " + name));
+				LLUI::sSettingGroups["ignores"]->declareLLSD(std::string("Default") + name, "", std::string("Default response for notification " + name));
 			}
 			child->getAttributeString("text", mIgnoreMsg);
-			LLUI::sIgnoresGroup->addWarning(name);
+			BOOL show_notification = TRUE;
+			LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Ignore notification with this name", TRUE);
 		}
 		else
 		{
@@ -339,13 +343,13 @@ void LLNotificationForm::formatElements(const LLSD& substitutions)
 		if ((*it).has("text"))
 		{
 			std::string text = (*it)["text"].asString();
-			text = LLNotification::format(text, substitutions);
+			LLStringUtil::format(text, substitutions);
 			(*it)["text"] = text;
 		}
 		if ((*it)["type"].asString() == "text" && (*it).has("value"))
 		{
 			std::string value = (*it)["value"].asString();
-			value = LLNotification::format(value, substitutions);
+			LLStringUtil::format(value, substitutions);
 			(*it)["value"] = value;
 		}
 	}
@@ -366,6 +370,7 @@ LLNotificationTemplate::LLNotificationTemplate() :
 	mExpireSeconds(0),
 	mExpireOption(-1),
 	mURLOption(-1),
+    mURLOpenExternally(-1),
 	mUnique(false),
 	mPriority(NOTIFICATION_PRIORITY_NORMAL)
 {
@@ -377,13 +382,24 @@ LLNotification::LLNotification(const LLNotification::Params& p) :
 	mSubstitutions(p.substitutions),
 	mPayload(p.payload),
 	mExpiresAt(0),
-	mResponseFunctorName(p.functor_name),
-	mTemporaryResponder(p.mTemporaryResponder),
+	mTemporaryResponder(false),
 	mRespondedTo(false),
 	mPriority(p.priority),
 	mCancelled(false),
 	mIgnored(false)
 {
+	if (p.functor.name.isChosen())
+	{
+		mResponseFunctorName = p.functor.name;
+	}
+	else if (p.functor.function.isChosen())
+	{
+		mResponseFunctorName = LLUUID::generateNewID().asString();
+		LLNotificationFunctorRegistry::instance().registerFunctor(mResponseFunctorName, p.functor.function());
+
+		mTemporaryResponder = true;
+	}
+
 	mId.generate();
 	init(p.name, p.form_elements);
 }
@@ -525,7 +541,8 @@ std::string LLNotification::getSelectedOptionName(const LLSD& response)
 void LLNotification::respond(const LLSD& response)
 {
 	mRespondedTo = true;
-	LLNotificationFunctorRegistry::instance().getFunctor(mResponseFunctorName)(asLLSD(), response);
+	LLNotificationResponder func = LLNotificationFunctorRegistry::instance().getFunctor(mResponseFunctorName);
+	func(asLLSD(), response);
 	if (mTemporaryResponder)
 	{
 		LLNotificationFunctorRegistry::instance().unregisterFunctor(mResponseFunctorName);
@@ -535,10 +552,11 @@ void LLNotification::respond(const LLSD& response)
 
 	if (mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
 	{
-		LLUI::sIgnoresGroup->setWarning(getName(), !mIgnored);
+		BOOL show_notification = mIgnored ? FALSE : TRUE;
+		LLUI::sSettingGroups["ignores"]->setBOOL(getName(), show_notification);
 		if (mIgnored && mForm->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE)
 		{
-			LLUI::sIgnoresGroup->setLLSD("Default" + getName(), response);
+			LLUI::sSettingGroups["ignores"]->setLLSD("Default" + getName(), response);
 		}
 	}
 
@@ -596,8 +614,12 @@ void LLNotification::init(const std::string& template_name, const LLSD& form_ele
 	if (!mTemplatep) return;
 
 	// add default substitutions
-	// TODO: change this to read from the translatable strings file!
-	mSubstitutions["SECOND_LIFE"] = "Second Life";
+	const LLStringUtil::format_map_t& default_args = LLTrans::getDefaultArgs();
+	for (LLStringUtil::format_map_t::const_iterator iter = default_args.begin();
+		 iter != default_args.end(); ++iter)
+	{
+		mSubstitutions[iter->first] = iter->second;
+	}
 	mSubstitutions["_URL"] = getURL();
 	mSubstitutions["_NAME"] = template_name;
 	// TODO: something like this so that a missing alert is sensible:
@@ -631,64 +653,6 @@ std::string LLNotification::summarize() const
 	return s;
 }
 
-//static
-std::string LLNotification::format(const std::string& s, const LLSD& substitutions)
-{
-	if (!substitutions.isMap()) 
-	{
-		return s;
-	}
-
-	std::ostringstream output;
-	// match strings like [NAME]
-	const boost::regex key("\\[([0-9_A-Z]+)]");
-	
-	std::string::const_iterator start = s.begin();
-	std::string::const_iterator end = s.end();
-	boost::smatch match;
-	
-	while (boost::regex_search(start, end, match, key, boost::match_default))
-	{
-		bool found_replacement = false;
-		std::string replacement;
-		
-		// see if we have a replacement for the bracketed string (without the brackets)
-		// test first using has() because if we just look up with operator[] we get back an
-		// empty string even if the value is missing. We want to distinguish between 
-		// missing replacements and deliberately empty replacement strings.
-		if (substitutions.has(std::string(match[1].first, match[1].second)))
-		{
-			replacement = substitutions[std::string(match[1].first, match[1].second)].asString();
-			found_replacement = true;
-		}
-		// if not, see if there's one WITH brackets
-		else if (substitutions.has(std::string(match[0].first, match[0].second)))
-		{
-			replacement = substitutions[std::string(match[0].first, match[0].second)].asString();
-			found_replacement = true;
-		}
-		
-		if (found_replacement)
-		{
-			// found a replacement
-			// "hello world" is output
-			output << std::string(start, match[0].first) << replacement;
-		}
-		else
-		{
-			// we had no replacement, so leave the string we searched for so that it gets noticed by QA
-			// "hello [NAME_NOT_FOUND]" is output
-			output << std::string(start, match[0].second);
-		}
-		
-		// update search position 
-		start = match[0].second; 
-	}
-	// send the remainder of the string (with no further matches for bracketed names)
-	output << std::string(start, end);
-	return output.str();
-}
-
 std::string LLNotification::getMessage() const
 {
 	// all our callers cache this result, so it gives us more flexibility
@@ -696,15 +660,27 @@ std::string LLNotification::getMessage() const
 	// cache it in the notification
 	if (!mTemplatep)
 		return std::string();
-	return format(mTemplatep->mMessage, mSubstitutions);
+
+	std::string message = mTemplatep->mMessage;
+	LLStringUtil::format(message, mSubstitutions);
+	return message;
 }
 
 std::string LLNotification::getLabel() const
 {
-	return (mTemplatep ? format(mTemplatep->mLabel, mSubstitutions) : "");
+	std::string label = mTemplatep->mLabel;
+	LLStringUtil::format(label, mSubstitutions);
+	return (mTemplatep ? label : "");
 }
 
-
+std::string LLNotification::getURL() const
+{
+	if (!mTemplatep)
+		return std::string();
+	std::string url = mTemplatep->mURL;
+	LLStringUtil::format(url, mSubstitutions);
+	return (mTemplatep ? url : "");
+}
 
 // =========================================================
 // LLNotificationChannel implementation
@@ -948,6 +924,7 @@ std::string LLNotificationChannel::summarize()
 LLNotifications::LLNotifications() : LLNotificationChannelBase(LLNotificationFilters::includeEverything,
 															   LLNotificationComparators::orderByUUID())
 {
+	LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2));
 }
 
 
@@ -1097,9 +1074,6 @@ void LLNotifications::createDefaultChannels()
 		connectFailedFilter(&handleIgnoredNotification);
 }
 
-static std::string sStringSkipNextTime("Skip this dialog next time");
-static std::string sStringAlwaysChoose("Always choose this option");
-
 bool LLNotifications::addTemplate(const std::string &name, 
 								  LLNotificationTemplatePtr theTemplate)
 {
@@ -1320,8 +1294,17 @@ bool LLNotifications::loadTemplates()
 		item->getAttributeString("sound", sound);
 		if (!sound.empty())
 		{
-			// TODO: test for bad sound effect name / missing effect
-			pTemplate->mSoundEffect = LLUUID(LLUI::sConfigGroup->getString(sound.c_str()));
+			// test for bad sound effect name / missing effect
+			if (LLUI::sSettingGroups["config"]->controlExists(sound))
+			{
+				pTemplate->mSoundEffect = 
+					LLUUID(LLUI::sSettingGroups["config"]->getString(sound));
+			}
+			else
+			{
+				llwarns << "Unknown sound effect control name " << sound
+					<< llendl;
+			}
 		}
 
 		for (LLXMLNodePtr child = item->getFirstChild();
@@ -1334,6 +1317,7 @@ bool LLNotifications::loadTemplates()
 			{
 				pTemplate->mURL = child->getTextContents();
 				child->getAttributeU32("option", pTemplate->mURLOption);
+				child->getAttributeU32("openexternally", pTemplate->mURLOpenExternally);
 			}
 			
             if (child->hasName("unique"))
@@ -1373,12 +1357,20 @@ bool LLNotifications::loadTemplates()
 	return true;
 }
 
+// Add a simple notification (from XUI)
+void LLNotifications::addFromCallback(const LLSD& name)
+{
+	add(LLNotification::Params().name(name.asString()));	
+}
+
 // we provide a couple of simple add notification functions so that it's reasonable to create notifications in one line
 LLNotificationPtr LLNotifications::add(const std::string& name, 
 										const LLSD& substitutions, 
 										const LLSD& payload)
 {
-	return add(LLNotification::Params(name).substitutions(substitutions).payload(payload));	
+	LLNotification::Params::Functor functor_p;
+	functor_p.name = name;
+	return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));	
 }
 
 LLNotificationPtr LLNotifications::add(const std::string& name, 
@@ -1386,7 +1378,9 @@ LLNotificationPtr LLNotifications::add(const std::string& name,
 										const LLSD& payload, 
 										const std::string& functor_name)
 {
-	return add(LLNotification::Params(name).substitutions(substitutions).payload(payload).functor_name(functor_name));	
+	LLNotification::Params::Functor functor_p;
+	functor_p.name = functor_name;
+	return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));	
 }
 
 LLNotificationPtr LLNotifications::add(const std::string& name, 
@@ -1394,7 +1388,9 @@ LLNotificationPtr LLNotifications::add(const std::string& name,
 										const LLSD& payload, 
 										LLNotificationFunctorRegistry::ResponseFunctor functor)
 {
-	return add(LLNotification::Params(name).substitutions(substitutions).payload(payload).functor(functor));	
+	LLNotification::Params::Functor functor_p;
+	functor_p.function = functor;
+	return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));	
 }
 
 // generalized add function that takes a parameter block object for more complex instantiations
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index bb379121cc..de86f5daa2 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -100,6 +100,7 @@
 // and we need this to manage the notification callbacks
 #include "llfunctorregistry.h"
 #include "llui.h"
+#include "llmemory.h"
 
 class LLNotification;
 typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
@@ -280,6 +281,11 @@ struct LLNotificationTemplate
     // that URL. Obsolete this and eliminate the buttons for affected
     // messages when we allow clickable URLs in the UI
     U32 mURLOption;
+	
+	U32 mURLOpenExternally;
+	//This is a flag that tells if the url needs to open externally dispite 
+	//what the user setting is.
+	
 	// does this notification persist across sessions? if so, it will be
 	// serialized to disk on first receipt and read on startup
 	bool mPersist;
@@ -322,42 +328,49 @@ friend class LLNotifications;
 
 public:
 	// parameter object used to instantiate a new notification
-	class Params : public LLParamBlock<Params>
+	struct Params : public LLInitParam::Block<Params>
 	{
 		friend class LLNotification;
-	public:
-		Params(const std::string& _name) 
-			:	name(_name),
-				mTemporaryResponder(false),
-				functor_name(_name),
-				priority(NOTIFICATION_PRIORITY_UNSPECIFIED),
-				timestamp(LLDate::now())
+	
+		Mandatory<std::string>					name;
+
+		// optional
+		Optional<LLSD>							substitutions;
+		Optional<LLSD>							payload;
+		Optional<ENotificationPriority>			priority;
+		Optional<LLSD>							form_elements;
+		Optional<LLDate>						timestamp;
+		Optional<LLNotificationContext*>		context;
+
+		struct Functor : public LLInitParam::Choice<Functor>
 		{
+			Option<std::string>										name;
+			Option<LLNotificationFunctorRegistry::ResponseFunctor>	function;
+
+			Functor()
+			:	name("functor_name"),
+				function("functor")
+			{}
+		};
+		Optional<Functor>						functor;
+
+		Params()
+		:	name("name"),
+			priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED),
+			timestamp("time_stamp")
+		{
+			timestamp = LLDate::now();
 		}
 
-		// pseudo-param
-		Params& functor(LLNotificationFunctorRegistry::ResponseFunctor f) 
-		{ 	
-			functor_name = LLUUID::generateNewID().asString();
-			LLNotificationFunctorRegistry::instance().registerFunctor(functor_name, f);
-
-			mTemporaryResponder = true;
-			return *this;
+		Params(const std::string& _name) 
+			:	name("name"),
+				priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED),
+				timestamp("time_stamp")
+		{
+			functor.name = _name;
+			name = _name;
+			timestamp = LLDate::now();
 		}
-
-		LLMandatoryParam<std::string>					name;
-
-		// optional
-		LLOptionalParam<LLSD>							substitutions;
-		LLOptionalParam<LLSD>							payload;
-		LLOptionalParam<ENotificationPriority>			priority;
-		LLOptionalParam<LLSD>							form_elements;
-		LLOptionalParam<LLDate>							timestamp;
-		LLOptionalParam<LLNotificationContext*>			context;
-		LLOptionalParam<std::string>					functor_name;
-
-	private:
-		bool					mTemporaryResponder;
 	};
 
 private:
@@ -410,10 +423,6 @@ public:
 	// constructor from a saved notification
 	LLNotification(const LLSD& sd);
 
-	// This is a string formatter for substituting into the message directly 
-	// from LLSD without going through the hopefully-to-be-obsoleted LLString
-	static std::string format(const std::string& text, const LLSD& substitutions);
-
 	void setResponseFunctor(std::string const &responseFunctorName);
 
 	typedef enum e_response_template_type
@@ -505,16 +514,21 @@ public:
 	std::string getMessage() const;
 	std::string getLabel() const;
 
-	std::string getURL() const
-	{
-		return (mTemplatep ? mTemplatep->mURL : "");
-	}
+	std::string getURL() const;
+//	{
+//		return (mTemplatep ? mTemplatep->mURL : "");
+//	}
 
 	S32 getURLOption() const
 	{
 		return (mTemplatep ? mTemplatep->mURLOption : -1);
 	}
-
+    
+	S32 getURLOpenExternally() const
+	{
+		return(mTemplatep? mTemplatep->mURLOpenExternally : -1);
+	}
+	
 	const LLNotificationFormPtr getForm();
 
 	const LLDate getExpiration() const
@@ -813,7 +827,10 @@ public:
 	// OK to call more than once because it will reload
 	bool loadTemplates();  
 	LLXMLNodePtr checkForXMLTemplate(LLXMLNodePtr item);
-
+	
+	// Add a simple notification (from XUI)
+	void addFromCallback(const LLSD& name);
+	
 	// we provide a collection of simple add notification functions so that it's reasonable to create notifications in one line
 	LLNotificationPtr add(const std::string& name, 
 						const LLSD& substitutions = LLSD(), 
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 92d045d114..35871dc078 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -54,74 +54,47 @@
 #include "lluictrlfactory.h"
 #include "llviewborder.h"
 #include "llbutton.h"
+#include "lltabcontainer.h"
 
-// LLLayoutStack
-#include "llresizebar.h"
-#include "llcriticaldamp.h"
+static LLRegisterWidget<LLPanel> r1("panel", &LLPanel::fromXML);
 
-const S32 RESIZE_BAR_OVERLAP = 1;
-const S32 RESIZE_BAR_HEIGHT = 3;
-
-static LLRegisterWidget<LLPanel> r1("panel");
-
-void LLPanel::init()
+LLPanel::Params::Params()
+:	has_border("border", false),
+	bg_opaque_color("bg_opaque_color"),
+	bg_alpha_color("bg_alpha_color"),
+	background_visible("background_visible", false),
+	background_opaque("background_opaque", false),
+	min_width("min_width", 100),
+	min_height("min_height", 100),
+	strings("string"),
+	filename("filename")
 {
-	// mRectControl
-	mBgColorAlpha        = LLUI::sColorsGroup->getColor( "DefaultBackgroundColor" );
-	mBgColorOpaque       = LLUI::sColorsGroup->getColor( "FocusBackgroundColor" );
-	mDefaultBtnHighlight = LLUI::sColorsGroup->getColor( "DefaultHighlightLight" );
-	mBgVisible = FALSE;
-	mBgOpaque = FALSE;
-	mBorder = NULL;
-	mDefaultBtn = NULL;
-	setIsChrome(FALSE); //is this a decorator to a live window or a form?
-	mLastTabGroup = 0;
-
-	mPanelHandle.bind(this);
-	setTabStop(FALSE);
+	name = "panel";
+	addSynonym(background_visible, "bg_visible");
+	addSynonym(has_border, "border_visible");
+	addSynonym(label, "title");
 }
 
-LLPanel::LLPanel()
-: mRectControl()
-{
-	init();
-	setName(std::string("panel"));
-}
 
-LLPanel::LLPanel(const std::string& name)
-:	LLUICtrl(name, LLRect(0, 0, 0, 0), TRUE, NULL, NULL),
-	mRectControl()
+LLPanel::LLPanel(const LLPanel::Params& p)
+:	LLUICtrl(p),
+	mBgColorAlpha(p.bg_alpha_color().get()),
+	mBgColorOpaque(p.bg_opaque_color().get()),
+	mBgVisible(p.background_visible),
+	mBgOpaque(p.background_opaque),
+	mDefaultBtn(NULL),
+	mBorder(NULL),
+	mLabel(p.label),
+	mCommitCallbackRegistrar(false)
 {
-	init();
-}
-
-
-LLPanel::LLPanel(const std::string& name, const LLRect& rect, BOOL bordered)
-:	LLUICtrl(name, rect, TRUE, NULL, NULL),
-	mRectControl()
-{
-	init();
-	if (bordered)
-	{
-		addBorder();
-	}
-}
+	setIsChrome(FALSE);
 
-
-LLPanel::LLPanel(const std::string& name, const std::string& rect_control, BOOL bordered)
-:	LLUICtrl(name, LLUI::sConfigGroup->getRect(rect_control), TRUE, NULL, NULL),
-	mRectControl( rect_control )
-{
-	init();
-	if (bordered)
+	if (p.has_border)
 	{
-		addBorder();
+		addBorder(p.border);
 	}
-}
-
-LLPanel::~LLPanel()
-{
-	storeRectControl();
+	
+	mPanelHandle.bind(this);
 }
 
 // virtual
@@ -130,27 +103,23 @@ BOOL LLPanel::isPanel() const
 	return TRUE;
 }
 
-// virtual
-BOOL LLPanel::postBuild()
-{
-	return TRUE;
-}
-
-void LLPanel::addBorder(LLViewBorder::EBevel border_bevel,
-						LLViewBorder::EStyle border_style, S32 border_thickness)
+void LLPanel::addBorder(LLViewBorder::Params p)
 {
 	removeBorder();
-	mBorder = new LLViewBorder( std::string("panel border"), 
-								LLRect(0, getRect().getHeight(), getRect().getWidth(), 0), 
-								border_bevel, border_style, border_thickness );
-	mBorder->setSaveToXML(false);
+	p.rect = getLocalRect();
+
+	mBorder = LLUICtrlFactory::create<LLViewBorder>(p);
 	addChild( mBorder );
 }
 
 void LLPanel::removeBorder()
 {
-	delete mBorder;
-	mBorder = NULL;
+	if (mBorder)
+	{
+		removeChild(mBorder);
+		delete mBorder;
+		mBorder = NULL;
+	}
 }
 
 
@@ -258,20 +227,6 @@ void LLPanel::setDefaultBtn(const std::string& id)
 	}
 }
 
-void LLPanel::addCtrl( LLUICtrl* ctrl, S32 tab_group)
-{
-	mLastTabGroup = tab_group;
-
-	LLView::addCtrl(ctrl, tab_group);
-}
-
-void LLPanel::addCtrlAtEnd( LLUICtrl* ctrl, S32 tab_group)
-{
-	mLastTabGroup = tab_group;
-
-	LLView::addCtrlAtEnd(ctrl, tab_group);
-}
-
 BOOL LLPanel::handleKeyHere( KEY key, MASK mask )
 {
 	BOOL handled = FALSE;
@@ -364,12 +319,10 @@ void LLPanel::setFocus(BOOL b)
 	{
 		if (!gFocusMgr.childHasKeyboardFocus(this))
 		{
-			//refresh();
-			if (!focusFirstItem())
-			{
-				LLUICtrl::setFocus(TRUE);
-			}
-			onFocusReceived();
+			// give ourselves focus preemptively, to avoid infinite loop
+			LLUICtrl::setFocus(TRUE);
+			// then try to pass to first valid child
+			focusFirstItem();
 		}
 	}
 	else
@@ -399,191 +352,135 @@ void LLPanel::setBorderVisible(BOOL b)
 	}
 }
 
-// virtual
-LLXMLNodePtr LLPanel::getXML(bool save_children) const
+LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_node)
 {
-	LLXMLNodePtr node = LLView::getXML();
+	std::string name("panel");
+	node->getAttributeString("name", name);
 
-	if (mBorder && mBorder->getVisible())
-	{
-		node->createChild("border", TRUE)->setBoolValue(TRUE);
-	}
+	LLPanel* panelp = LLUICtrlFactory::getInstance()->createFactoryPanel(name); 
 
-	if (!mRectControl.empty())
+	// factory panels may have registered their own factory maps
+	if (!panelp->getFactoryMap().empty())
 	{
-		node->createChild("rect_control", TRUE)->setStringValue(mRectControl);
+		LLUICtrlFactory::instance().pushFactoryFunctions(&panelp->getFactoryMap());
 	}
+	panelp->mCommitCallbackRegistrar.pushScope(); // for local registry callbacks; define in constructor, referenced in XUI or postBuild
 
-	if (!mLabel.empty())
-	{
-		node->createChild("label", TRUE)->setStringValue(mLabel);
-	}
+	panelp->initPanelXML(node, parent, output_node);
+	
+	panelp->mCommitCallbackRegistrar.popScope();
 
-	if (save_children)
+	if (panelp && !panelp->getFactoryMap().empty())
 	{
-		LLView::child_list_const_reverse_iter_t rit;
-		for (rit = getChildList()->rbegin(); rit != getChildList()->rend(); ++rit)
-		{
-			LLView* childp = *rit;
-
-			if (childp->getSaveToXML())
-			{
-				LLXMLNodePtr xml_node = childp->getXML();
-
-				node->addChild(xml_node);
-			}
-		}
+		LLUICtrlFactory::instance().popFactoryFunctions();
 	}
 
-	return node;
+	return panelp;
 }
 
-LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory *factory)
+void LLPanel::initFromParams(const LLPanel::Params& p)
 {
-	std::string name("panel");
-	node->getAttributeString("name", name);
+	 // control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible
+	LLUICtrl::initFromParams(p);
 
-	LLPanel* panelp = factory->createFactoryPanel(name);
-	// Fall back on a default panel, if there was no special factory.
-	if (!panelp)
-	{
-		LLRect rect;
-		createRect(node, rect, parent, LLRect());
-		// create a new panel without a border, by default
-		panelp = new LLPanel(name, rect, FALSE);
-		panelp->initPanelXML(node, parent, factory);
-		// preserve panel's width and height, but override the location
-		const LLRect& panelrect = panelp->getRect();
-		S32 w = panelrect.getWidth();
-		S32 h = panelrect.getHeight();
-		rect.setLeftTopAndSize(rect.mLeft, rect.mTop, w, h);
-		panelp->setRect(rect);
-	}
-	else
+	for (LLInitParam::ParamIterator<LocalizedString>::const_iterator it = p.strings().begin();
+		it != p.strings().end();
+		++it)
 	{
-		panelp->initPanelXML(node, parent, factory);
+		mUIStrings[it->name] = it->text;
 	}
 
-	return panelp;
-}
-
-BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name = getName();
-	node->getAttributeString("name", name);
-	setName(name);
-
-	setPanelParameters(node, parent);
+	setName(p.name());
+	setLabel(p.label());
 
-	initChildrenXML(node, factory);
+	setShape(p.rect);
+	parseFollowsFlags(p);
 
-	std::string xml_filename;
-	node->getAttributeString("filename", xml_filename);
-
-	BOOL didPost;
-
-	if (!xml_filename.empty())
+	setEnabled(p.enabled);
+	setVisible(p.visible);
+	setToolTip(p.tool_tip());
+	setSaveToXML(p.serializable);
+	
+	mHoverCursor = getCursorFromString(p.hover_cursor);
+	
+	if (p.has_border)
 	{
-		didPost = factory->buildPanel(this, xml_filename, NULL);
-
-		LLRect new_rect = getRect();
-		// override rectangle with embedding parameters as provided
-		createRect(node, new_rect, parent);
-		setOrigin(new_rect.mLeft, new_rect.mBottom);
-		reshape(new_rect.getWidth(), new_rect.getHeight());
-		// optionally override follows flags from including nodes
-		parseFollowsFlags(node);
+		addBorder(p.border);
 	}
-	else
+	// let constructors set this value if not provided
+	if (p.use_bounding_rect.isProvided())
 	{
-		didPost = FALSE;
+		setUseBoundingRect(p.use_bounding_rect);
 	}
+	setDefaultTabGroup(p.default_tab_group);
+	setMouseOpaque(p.mouse_opaque);
+	
+	setBackgroundVisible(p.background_visible);
+	setBackgroundOpaque(p.background_opaque);
+	setBackgroundColor(p.bg_opaque_color().get());
+	setTransparentColor(p.bg_alpha_color().get());
 	
-	if (!didPost)
-	{
-		postBuild();
-		didPost = TRUE;
-	}
-
-	return didPost;
 }
 
-void LLPanel::initChildrenXML(LLXMLNodePtr node, LLUICtrlFactory* factory)
+BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)
 {
-	LLXMLNodePtr child;
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
+	const LLPanel::Params& default_params(LLUICtrlFactory::getDefaultParams<LLPanel::Params>());
+	Params params(default_params);
+
+	LLXMLNodePtr referenced_xml;
+	std::string xml_filename;
+	node->getAttributeString("filename", xml_filename);
+
+	if (!xml_filename.empty())
 	{
-		// look for string declarations for programmatic text
-		if (child->hasName("string"))
+		if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml))
 		{
-			std::string string_name;
-			child->getAttributeString("name", string_name);
-			if (!string_name.empty())
-			{
-				mUIStrings[string_name] = child->getTextContents();
-			}
-		}
-		else
-		{
-			factory->createWidget(this, child);
+			llwarns << "Couldn't parse panel from: " << xml_filename << llendl;
+
+			return FALSE;
 		}
-	}
-}
 
-void LLPanel::setPanelParameters(LLXMLNodePtr node, LLView* parent)
-{
-	/////// Rect, follows, tool_tip, enabled, visible attributes ///////
-	initFromXML(node, parent);
+		LLXUIParser::instance().readXUI(referenced_xml, params);
 
-	/////// Border attributes ///////
-	BOOL border = mBorder != NULL;
-	node->getAttributeBOOL("border", border);
-	if (border)
-	{
-		LLViewBorder::EBevel bevel_style = LLViewBorder::BEVEL_OUT;
-		LLViewBorder::getBevelFromAttribute(node, bevel_style);
+		// add children using dimensions from referenced xml for consistent layout
+		setShape(params.rect);
+		addChildren(referenced_xml);
+	}
 
-		LLViewBorder::EStyle border_style = LLViewBorder::STYLE_LINE;
-		std::string border_string;
-		node->getAttributeString("border_style", border_string);
-		LLStringUtil::toLower(border_string);
+	LLXUIParser::instance().readXUI(node, params);
 
-		if (border_string == "texture")
-		{
-			border_style = LLViewBorder::STYLE_TEXTURE;
-		}
+	if (output_node)
+	{
+		Params output_params(params);
+		setupParamsForExport(output_params, parent);
+		output_node->setName(node->getName()->mString);
+		LLXUIParser::instance().writeXUI(
+			output_node, output_params, &default_params);
+	}
+	
+	setupParams(params, parent);
+	initFromParams(params);
 
-		S32 border_thickness = LLPANEL_BORDER_WIDTH;
-		node->getAttributeS32("border_thickness", border_thickness);
+	// add children
+	addChildren(node, output_node);
 
-		addBorder(bevel_style, border_style, border_thickness);
-	}
-	else
+	// Connect to parent after children are built, because tab containers
+	// do a reshape() on their child panels, which requires that the children
+	// be built/added. JC
+	if (parent)
 	{
-		removeBorder();
+		S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : -1;
+		parent->addChild(this, tab_group);
 	}
 
-	/////// Background attributes ///////
-	BOOL background_visible = mBgVisible;
-	node->getAttributeBOOL("background_visible", background_visible);
-	setBackgroundVisible(background_visible);
-	
-	BOOL background_opaque = mBgOpaque;
-	node->getAttributeBOOL("background_opaque", background_opaque);
-	setBackgroundOpaque(background_opaque);
-
-	LLColor4 color;
-	color = mBgColorOpaque;
-	LLUICtrlFactory::getAttributeColor(node,"bg_opaque_color", color);
-	setBackgroundColor(color);
-
-	color = mBgColorAlpha;
-	LLUICtrlFactory::getAttributeColor(node,"bg_alpha_color", color);
-	setTransparentColor(color);
-
-	std::string label = getLabel();
-	node->getAttributeString("label", label);
-	setLabel(label);
+	postBuild();
+
+	return TRUE;
+}
+
+bool LLPanel::hasString(const std::string& name)
+{
+	return mUIStrings.find(name) != mUIStrings.end();
 }
 
 std::string LLPanel::getString(const std::string& name, const LLStringUtil::format_map_t& args) const
@@ -597,9 +494,7 @@ std::string LLPanel::getString(const std::string& name, const LLStringUtil::form
 		return formatted_string.getString();
 	}
 	std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate
-	// *TODO: once the QAR-369 ui-cleanup work on settings is in we need to change the following line to be
-	//if(LLUI::sConfigGroup->getBOOL("QAMode"))
-	if(LLUI::sQAMode)
+	if(LLUI::sSettingGroups["config"]->getBOOL("QAMode"))
 	{
 		llerrs << err_str << llendl;
 	}
@@ -618,7 +513,7 @@ std::string LLPanel::getString(const std::string& name) const
 		return found_it->second;
 	}
 	std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate
-	if(LLUI::sQAMode)
+	if(LLUI::sSettingGroups["config"]->getBOOL("QAMode"))
 	{
 		llerrs << err_str << llendl;
 	}
@@ -632,7 +527,7 @@ std::string LLPanel::getString(const std::string& name) const
 
 void LLPanel::childSetVisible(const std::string& id, bool visible)
 {
-	LLView* child = getChild<LLView>(id);
+	LLView* child = findChild<LLView>(id);
 	if (child)
 	{
 		child->setVisible(visible);
@@ -641,7 +536,7 @@ void LLPanel::childSetVisible(const std::string& id, bool visible)
 
 bool LLPanel::childIsVisible(const std::string& id) const
 {
-	LLView* child = getChild<LLView>(id);
+	LLView* child = findChild<LLView>(id);
 	if (child)
 	{
 		return (bool)child->getVisible();
@@ -651,7 +546,7 @@ bool LLPanel::childIsVisible(const std::string& id) const
 
 void LLPanel::childSetEnabled(const std::string& id, bool enabled)
 {
-	LLView* child = getChild<LLView>(id);
+	LLView* child = findChild<LLView>(id);
 	if (child)
 	{
 		child->setEnabled(enabled);
@@ -660,7 +555,7 @@ void LLPanel::childSetEnabled(const std::string& id, bool enabled)
 
 void LLPanel::childSetTentative(const std::string& id, bool tentative)
 {
-	LLView* child = getChild<LLView>(id);
+	LLView* child = findChild<LLView>(id);
 	if (child)
 	{
 		child->setTentative(tentative);
@@ -669,7 +564,7 @@ void LLPanel::childSetTentative(const std::string& id, bool tentative)
 
 bool LLPanel::childIsEnabled(const std::string& id) const
 {
-	LLView* child = getChild<LLView>(id);
+	LLView* child = findChild<LLView>(id);
 	if (child)
 	{
 		return (bool)child->getEnabled();
@@ -680,7 +575,7 @@ bool LLPanel::childIsEnabled(const std::string& id) const
 
 void LLPanel::childSetToolTip(const std::string& id, const std::string& msg)
 {
-	LLView* child = getChild<LLView>(id);
+	LLView* child = findChild<LLView>(id);
 	if (child)
 	{
 		child->setToolTip(msg);
@@ -689,7 +584,7 @@ void LLPanel::childSetToolTip(const std::string& id, const std::string& msg)
 
 void LLPanel::childSetRect(const std::string& id, const LLRect& rect)
 {
-	LLView* child = getChild<LLView>(id);
+	LLView* child = findChild<LLView>(id);
 	if (child)
 	{
 		child->setRect(rect);
@@ -698,7 +593,7 @@ void LLPanel::childSetRect(const std::string& id, const LLRect& rect)
 
 bool LLPanel::childGetRect(const std::string& id, LLRect& rect) const
 {
-	LLView* child = getChild<LLView>(id);
+	LLView* child = findChild<LLView>(id);
 	if (child)
 	{
 		rect = child->getRect();
@@ -709,7 +604,7 @@ bool LLPanel::childGetRect(const std::string& id, LLRect& rect) const
 
 void LLPanel::childSetFocus(const std::string& id, BOOL focus)
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		child->setFocus(focus);
@@ -718,7 +613,7 @@ void LLPanel::childSetFocus(const std::string& id, BOOL focus)
 
 BOOL LLPanel::childHasFocus(const std::string& id)
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		return child->hasFocus();
@@ -730,60 +625,28 @@ BOOL LLPanel::childHasFocus(const std::string& id)
 	}
 }
 
-
-void LLPanel::childSetFocusChangedCallback(const std::string& id, void (*cb)(LLFocusableElement*, void*), void* user_data)
-{
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
-	if (child)
-	{
-		child->setFocusChangedCallback(cb, user_data);
-	}
-}
-
-void LLPanel::childSetCommitCallback(const std::string& id, void (*cb)(LLUICtrl*, void*), void *userdata )
-{
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
-	if (child)
-	{
-		child->setCommitCallback(cb);
-		child->setCallbackUserData(userdata);
-	}
-}
-
-void LLPanel::childSetDoubleClickCallback(const std::string& id, void (*cb)(void*), void *userdata )
+// *TODO: Deprecate; for backwards compatability only:
+void LLPanel::childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data)
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
-		child->setDoubleClickCallback(cb);
-		if (userdata)
-		{
-			child->setCallbackUserData(userdata);
-		}
+		child->setCommitCallback(boost::bind(cb, child, data));
 	}
 }
 
-void LLPanel::childSetValidate(const std::string& id, BOOL (*cb)(LLUICtrl*, void*))
+void LLPanel::childSetValidate(const std::string& id, boost::function<bool (const LLSD& data)> cb)
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		child->setValidateBeforeCommit(cb);
 	}
 }
 
-void LLPanel::childSetUserData(const std::string& id, void* userdata)
-{
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
-	if (child)
-	{
-		child->setCallbackUserData(userdata);
-	}
-}
-
 void LLPanel::childSetColor(const std::string& id, const LLColor4& color)
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		child->setColor(color);
@@ -792,7 +655,7 @@ void LLPanel::childSetColor(const std::string& id, const LLColor4& color)
 
 LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string& id) const
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		return child->getSelectionInterface();
@@ -802,7 +665,7 @@ LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string&
 
 LLCtrlListInterface* LLPanel::childGetListInterface(const std::string& id) const
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		return child->getListInterface();
@@ -812,7 +675,7 @@ LLCtrlListInterface* LLPanel::childGetListInterface(const std::string& id) const
 
 LLCtrlScrollInterface* LLPanel::childGetScrollInterface(const std::string& id) const
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		return child->getScrollInterface();
@@ -822,7 +685,7 @@ LLCtrlScrollInterface* LLPanel::childGetScrollInterface(const std::string& id) c
 
 void LLPanel::childSetValue(const std::string& id, LLSD value)
 {
-	LLView* child = getChild<LLView>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		child->setValue(value);
@@ -831,7 +694,7 @@ void LLPanel::childSetValue(const std::string& id, LLSD value)
 
 LLSD LLPanel::childGetValue(const std::string& id) const
 {
-	LLView* child = getChild<LLView>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		return child->getValue();
@@ -842,7 +705,7 @@ LLSD LLPanel::childGetValue(const std::string& id) const
 
 BOOL LLPanel::childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		return child->setTextArg(key, text);
@@ -852,7 +715,7 @@ BOOL LLPanel::childSetTextArg(const std::string& id, const std::string& key, con
 
 BOOL LLPanel::childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
 {
-	LLView* child = getChild<LLView>(id);
+	LLView* child = findChild<LLView>(id);
 	if (child)
 	{
 		return child->setLabelArg(key, text);
@@ -862,7 +725,7 @@ BOOL LLPanel::childSetLabelArg(const std::string& id, const std::string& key, co
 
 BOOL LLPanel::childSetToolTipArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
 {
-	LLView* child = getChildView(id, true, FALSE);
+	LLView* child = findChild<LLView>(id);
 	if (child)
 	{
 		return child->setToolTipArg(key, text);
@@ -872,7 +735,7 @@ BOOL LLPanel::childSetToolTipArg(const std::string& id, const std::string& key,
 
 void LLPanel::childSetMinValue(const std::string& id, LLSD min_value)
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		child->setMinValue(min_value);
@@ -881,7 +744,7 @@ void LLPanel::childSetMinValue(const std::string& id, LLSD min_value)
 
 void LLPanel::childSetMaxValue(const std::string& id, LLSD max_value)
 {
-	LLUICtrl* child = getChild<LLUICtrl>(id, true);
+	LLUICtrl* child = findChild<LLUICtrl>(id);
 	if (child)
 	{
 		child->setMaxValue(max_value);
@@ -890,7 +753,7 @@ void LLPanel::childSetMaxValue(const std::string& id, LLSD max_value)
 
 void LLPanel::childShowTab(const std::string& id, const std::string& tabname, bool visible)
 {
-	LLTabContainer* child = getChild<LLTabContainer>(id);
+	LLTabContainer* child = findChild<LLTabContainer>(id);
 	if (child)
 	{
 		child->selectTabByName(tabname);
@@ -899,7 +762,7 @@ void LLPanel::childShowTab(const std::string& id, const std::string& tabname, bo
 
 LLPanel *LLPanel::childGetVisibleTab(const std::string& id) const
 {
-	LLTabContainer* child = getChild<LLTabContainer>(id);
+	LLTabContainer* child = findChild<LLTabContainer>(id);
 	if (child)
 	{
 		return child->getCurrentPanel();
@@ -907,40 +770,9 @@ LLPanel *LLPanel::childGetVisibleTab(const std::string& id) const
 	return NULL;
 }
 
-void LLPanel::childSetTabChangeCallback(const std::string& id, const std::string& tabname, void (*on_tab_clicked)(void*, bool), void *userdata, void (*on_precommit)(void*,bool))
-{
-	LLTabContainer* child = getChild<LLTabContainer>(id);
-	if (child)
-	{
-		LLPanel *panel = child->getPanelByName(tabname);
-		if (panel)
-		{
-			child->setTabChangeCallback(panel, on_tab_clicked);
-			child->setTabUserData(panel, userdata);
-			if (on_precommit)
-			{
-				child->setTabPrecommitChangeCallback(panel, on_precommit);
-			}
-		}
-	}
-}
-
-void LLPanel::childSetKeystrokeCallback(const std::string& id, void (*keystroke_callback)(LLLineEditor* caller, void* user_data), void *user_data)
-{
-	LLLineEditor* child = getChild<LLLineEditor>(id);
-	if (child)
-	{
-		child->setKeystrokeCallback(keystroke_callback);
-		if (user_data)
-		{
-			child->setCallbackUserData(user_data);
-		}
-	}
-}
-
 void LLPanel::childSetPrevalidate(const std::string& id, BOOL (*func)(const LLWString &) )
 {
-	LLLineEditor* child = getChild<LLLineEditor>(id);
+	LLLineEditor* child = findChild<LLLineEditor>(id);
 	if (child)
 	{
 		child->setPrevalidate(func);
@@ -949,7 +781,7 @@ void LLPanel::childSetPrevalidate(const std::string& id, BOOL (*func)(const LLWS
 
 void LLPanel::childSetWrappedText(const std::string& id, const std::string& text, bool visible)
 {
-	LLTextBox* child = getChild<LLTextBox>(id);
+	LLTextBox* child = findChild<LLTextBox>(id);
 	if (child)
 	{
 		child->setVisible(visible);
@@ -957,18 +789,18 @@ void LLPanel::childSetWrappedText(const std::string& id, const std::string& text
 	}
 }
 
-void LLPanel::childSetAction(const std::string& id, void(*function)(void*), void* value)
+void LLPanel::childSetAction(const std::string& id, boost::function<void(void*)> function, void* value)
 {
-	LLButton* button = getChild<LLButton>(id);
+	LLButton* button = findChild<LLButton>(id);
 	if (button)
 	{
-		button->setClickedCallback(function, value);
+		button->setClickedCallback(boost::bind(function, value));
 	}
 }
 
 void LLPanel::childSetActionTextbox(const std::string& id, void(*function)(void*), void* value)
 {
-	LLTextBox* textbox = getChild<LLTextBox>(id);
+	LLTextBox* textbox = findChild<LLTextBox>(id);
 	if (textbox)
 	{
 		textbox->setClickedCallback(function, value);
@@ -977,7 +809,7 @@ void LLPanel::childSetActionTextbox(const std::string& id, void(*function)(void*
 
 void LLPanel::childSetControlName(const std::string& id, const std::string& control_name)
 {
-	LLView* view = getChild<LLView>(id);
+	LLUICtrl* view = findChild<LLUICtrl>(id);
 	if (view)
 	{
 		view->setControlName(control_name, NULL);
@@ -995,7 +827,11 @@ LLView* LLPanel::getChildView(const std::string& name, BOOL recurse, BOOL create
 	}
 	if (!view && create_if_missing)
 	{
-		view = createDummyWidget<LLView>(name);
+		view = getDummyWidget<LLView>(name);
+		if (!view)
+		{
+			view = LLUICtrlFactory::createDummyWidget<LLView>(name);
+		}
 	}
 	return view;
 }
@@ -1028,617 +864,8 @@ void LLPanel::childDisplayNotFound()
 	LLNotifications::instance().add("FloaterNotFound", args);
 }
 
-void LLPanel::storeRectControl()
+void LLPanel::requires(const std::string& name)
 {
-	if( !mRectControl.empty() )
-	{
-		LLUI::sConfigGroup->setRect( mRectControl, getRect() );
-	}
+	requires<LLView>(name);
 }
 
-
-//
-// LLLayoutStack
-//
-struct LLLayoutStack::LLEmbeddedPanel
-{
-	LLEmbeddedPanel(LLPanel* panelp, eLayoutOrientation orientation, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize) : 
-			mPanel(panelp), 
-			mMinWidth(min_width), 
-			mMinHeight(min_height),
-			mAutoResize(auto_resize),
-			mUserResize(user_resize),
-			mOrientation(orientation),
-			mCollapsed(FALSE),
-			mCollapseAmt(0.f),
-			mVisibleAmt(1.f) // default to fully visible
-	{
-		LLResizeBar::Side side = (orientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM;
-		LLRect resize_bar_rect = panelp->getRect();
-
-		S32 min_dim;
-		if (orientation == HORIZONTAL)
-		{
-			min_dim = mMinHeight;
-		}
-		else
-		{
-			min_dim = mMinWidth;
-		}
-		mResizeBar = new LLResizeBar(std::string("resizer"), mPanel, LLRect(), min_dim, S32_MAX, side);
-		mResizeBar->setEnableSnapping(FALSE);
-		// panels initialized as hidden should not start out partially visible
-		if (!mPanel->getVisible())
-		{
-			mVisibleAmt = 0.f;
-		}
-	}
-
-	~LLEmbeddedPanel()
-	{
-		// probably not necessary, but...
-		delete mResizeBar;
-		mResizeBar = NULL;
-	}
-
-	F32 getCollapseFactor()
-	{
-		if (mOrientation == HORIZONTAL)
-		{
-			return mVisibleAmt * clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinWidth / (F32)mPanel->getRect().getWidth());
-		}
-		else
-		{
-			return mVisibleAmt * clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinHeight / (F32)mPanel->getRect().getHeight());
-		}
-	}
-
-	LLPanel* mPanel;
-	S32 mMinWidth;
-	S32 mMinHeight;
-	BOOL mAutoResize;
-	BOOL mUserResize;
-	BOOL mCollapsed;
-	LLResizeBar* mResizeBar;
-	eLayoutOrientation mOrientation;
-	F32 mVisibleAmt;
-	F32 mCollapseAmt;
-};
-
-static LLRegisterWidget<LLLayoutStack> r2("layout_stack");
-
-LLLayoutStack::LLLayoutStack(eLayoutOrientation orientation) : 
-		mOrientation(orientation),
-		mMinWidth(0),
-		mMinHeight(0),
-		mPanelSpacing(RESIZE_BAR_HEIGHT)
-{
-}
-
-LLLayoutStack::~LLLayoutStack()
-{
-	std::for_each(mPanels.begin(), mPanels.end(), DeletePointer());
-}
-
-void LLLayoutStack::draw()
-{
-	updateLayout();
-
-	e_panel_list_t::iterator panel_it;
-	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
-	{
-		// clip to layout rectangle, not bounding rectangle
-		LLRect clip_rect = (*panel_it)->mPanel->getRect();
-		// scale clipping rectangle by visible amount
-		if (mOrientation == HORIZONTAL)
-		{
-			clip_rect.mRight = clip_rect.mLeft + llround((F32)clip_rect.getWidth() * (*panel_it)->getCollapseFactor());
-		}
-		else
-		{
-			clip_rect.mBottom = clip_rect.mTop - llround((F32)clip_rect.getHeight() * (*panel_it)->getCollapseFactor());
-		}
-
-		LLPanel* panelp = (*panel_it)->mPanel;
-
-		LLLocalClipRect clip(clip_rect);
-		// only force drawing invisible children if visible amount is non-zero
-		drawChild(panelp, 0, 0, !clip_rect.isNull());
-	}
-}
-
-void LLLayoutStack::removeCtrl(LLUICtrl* ctrl)
-{
-	LLEmbeddedPanel* embedded_panelp = findEmbeddedPanel((LLPanel*)ctrl);
-
-	if (embedded_panelp)
-	{
-		mPanels.erase(std::find(mPanels.begin(), mPanels.end(), embedded_panelp));
-		delete embedded_panelp;
-	}
-
-	// need to update resizebars
-
-	calcMinExtents();
-
-	LLView::removeCtrl(ctrl);
-}
-
-LLXMLNodePtr LLLayoutStack::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLView::getXML();
-	return node;
-}
-
-//static 
-LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string orientation_string("vertical");
-	node->getAttributeString("orientation", orientation_string);
-
-	eLayoutOrientation orientation = VERTICAL;
-
-	if (orientation_string == "horizontal")
-	{
-		orientation = HORIZONTAL;
-	}
-	else if (orientation_string == "vertical")
-	{
-		orientation = VERTICAL;
-	}
-	else
-	{
-		llwarns << "Unknown orientation " << orientation_string << ", using vertical" << llendl;
-	}
-
-	LLLayoutStack* layout_stackp = new LLLayoutStack(orientation);
-
-	node->getAttributeS32("border_size", layout_stackp->mPanelSpacing);
-	// don't allow negative spacing values
-	layout_stackp->mPanelSpacing = llmax(layout_stackp->mPanelSpacing, 0);
-
-	std::string name("stack");
-	node->getAttributeString("name", name);
-
-	layout_stackp->setName(name);
-	layout_stackp->initFromXML(node, parent);
-
-	LLXMLNodePtr child;
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-	{
-		S32 min_width = 0;
-		S32 min_height = 0;
-		BOOL auto_resize = TRUE;
-
-		child->getAttributeS32("min_width", min_width);
-		child->getAttributeS32("min_height", min_height);
-		child->getAttributeBOOL("auto_resize", auto_resize);
-
-		if (child->hasName("layout_panel"))
-		{
-			BOOL user_resize = TRUE;
-			child->getAttributeBOOL("user_resize", user_resize);
-			LLPanel* panelp = (LLPanel*)LLPanel::fromXML(child, layout_stackp, factory);
-			if (panelp)
-			{
-				panelp->setFollowsNone();
-				layout_stackp->addPanel(panelp, min_width, min_height, auto_resize, user_resize);
-			}
-		}
-		else
-		{
-			BOOL user_resize = FALSE;
-			child->getAttributeBOOL("user_resize", user_resize);
-
-			LLPanel* panelp = new LLPanel(std::string("auto_panel"));
-			LLView* new_child = factory->createWidget(panelp, child);
-			if (new_child)
-			{
-				// put child in new embedded panel
-				layout_stackp->addPanel(panelp, min_width, min_height, auto_resize, user_resize);
-				// resize panel to contain widget and move widget to be contained in panel
-				panelp->setRect(new_child->getRect());
-				new_child->setOrigin(0, 0);
-			}
-			else
-			{
-				panelp->die();
-			}
-		}
-	}
-	layout_stackp->updateLayout();
-
-	return layout_stackp;
-}
-
-S32 LLLayoutStack::getDefaultHeight(S32 cur_height)
-{
-	// if we are spanning our children (crude upward propagation of size)
-	// then don't enforce our size on our children
-	if (mOrientation == HORIZONTAL)
-	{
-		cur_height = llmax(mMinHeight, getRect().getHeight());
-	}
-
-	return cur_height;
-}
-
-S32 LLLayoutStack::getDefaultWidth(S32 cur_width)
-{
-	// if we are spanning our children (crude upward propagation of size)
-	// then don't enforce our size on our children
-	if (mOrientation == VERTICAL)
-	{
-		cur_width = llmax(mMinWidth, getRect().getWidth());
-	}
-
-	return cur_width;
-}
-
-void LLLayoutStack::addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize, EAnimate animate, S32 index)
-{
-	// panel starts off invisible (collapsed)
-	if (animate == ANIMATE)
-	{
-		panel->setVisible(FALSE);
-	}
-	LLEmbeddedPanel* embedded_panel = new LLEmbeddedPanel(panel, mOrientation, min_width, min_height, auto_resize, user_resize);
-	
-	mPanels.insert(mPanels.begin() + llclamp(index, 0, (S32)mPanels.size()), embedded_panel);
-	
-	addChild(panel);
-	addChild(embedded_panel->mResizeBar);
-
-	// bring all resize bars to the front so that they are clickable even over the panels
-	// with a bit of overlap
-	for (e_panel_list_t::iterator panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
-	{
-		LLResizeBar* resize_barp = (*panel_it)->mResizeBar;
-		sendChildToFront(resize_barp);
-	}
-
-	// start expanding panel animation
-	if (animate == ANIMATE)
-	{
-		panel->setVisible(TRUE);
-	}
-}
-
-void LLLayoutStack::removePanel(LLPanel* panel)
-{
-	removeChild(panel);
-}
-
-void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed)
-{
-	LLEmbeddedPanel* panel_container = findEmbeddedPanel(panel);
-	if (!panel_container) return;
-
-	panel_container->mCollapsed = collapsed;
-}
-
-void LLLayoutStack::updateLayout(BOOL force_resize)
-{
-	calcMinExtents();
-
-	// calculate current extents
-	S32 total_width = 0;
-	S32 total_height = 0;
-
-	const F32 ANIM_OPEN_TIME = 0.02f;
-	const F32 ANIM_CLOSE_TIME = 0.03f;
-
-	e_panel_list_t::iterator panel_it;
-	for (panel_it = mPanels.begin(); panel_it != mPanels.end();	++panel_it)
-	{
-		LLPanel* panelp = (*panel_it)->mPanel;
-		if (panelp->getVisible()) 
-		{
-			(*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_OPEN_TIME));
-			if ((*panel_it)->mVisibleAmt > 0.99f)
-			{
-				(*panel_it)->mVisibleAmt = 1.f;
-			}
-		}
-		else // not visible
-		{
-			(*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
-			if ((*panel_it)->mVisibleAmt < 0.001f)
-			{
-				(*panel_it)->mVisibleAmt = 0.f;
-			}
-		}
-
-		if ((*panel_it)->mCollapsed)
-		{
-			(*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
-		}
-		else
-		{
-			(*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
-		}
-
-		if (mOrientation == HORIZONTAL)
-		{
-			// enforce minimize size constraint by default
-			if (panelp->getRect().getWidth() < (*panel_it)->mMinWidth)
-			{
-				panelp->reshape((*panel_it)->mMinWidth, panelp->getRect().getHeight());
-			}
-        	total_width += llround(panelp->getRect().getWidth() * (*panel_it)->getCollapseFactor());
-        	// want n-1 panel gaps for n panels
-			if (panel_it != mPanels.begin())
-			{
-				total_width += mPanelSpacing;
-			}
-		}
-		else //VERTICAL
-		{
-			// enforce minimize size constraint by default
-			if (panelp->getRect().getHeight() < (*panel_it)->mMinHeight)
-			{
-				panelp->reshape(panelp->getRect().getWidth(), (*panel_it)->mMinHeight);
-			}
-			total_height += llround(panelp->getRect().getHeight() * (*panel_it)->getCollapseFactor());
-			if (panel_it != mPanels.begin())
-			{
-				total_height += mPanelSpacing;
-			}
-		}
-	}
-
-	S32 num_resizable_panels = 0;
-	S32 shrink_headroom_available = 0;
-	S32 shrink_headroom_total = 0;
-	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
-	{
-		// panels that are not fully visible do not count towards shrink headroom
-		if ((*panel_it)->getCollapseFactor() < 1.f) 
-		{
-			continue;
-		}
-
-		// if currently resizing a panel or the panel is flagged as not automatically resizing
-		// only track total available headroom, but don't use it for automatic resize logic
-		if ((*panel_it)->mResizeBar->hasMouseCapture() 
-			|| (!(*panel_it)->mAutoResize 
-				&& !force_resize))
-		{
-			if (mOrientation == HORIZONTAL)
-			{
-				shrink_headroom_total += (*panel_it)->mPanel->getRect().getWidth() - (*panel_it)->mMinWidth;
-			}
-			else //VERTICAL
-			{
-				shrink_headroom_total += (*panel_it)->mPanel->getRect().getHeight() - (*panel_it)->mMinHeight;
-			}
-		}
-		else
-		{
-			num_resizable_panels++;
-			if (mOrientation == HORIZONTAL)
-			{
-				shrink_headroom_available += (*panel_it)->mPanel->getRect().getWidth() - (*panel_it)->mMinWidth;
-				shrink_headroom_total += (*panel_it)->mPanel->getRect().getWidth() - (*panel_it)->mMinWidth;
-			}
-			else //VERTICAL
-			{
-				shrink_headroom_available += (*panel_it)->mPanel->getRect().getHeight() - (*panel_it)->mMinHeight;
-				shrink_headroom_total += (*panel_it)->mPanel->getRect().getHeight() - (*panel_it)->mMinHeight;
-			}
-		}
-	}
-
-	// calculate how many pixels need to be distributed among layout panels
-	// positive means panels need to grow, negative means shrink
-	S32 pixels_to_distribute;
-	if (mOrientation == HORIZONTAL)
-	{
-		pixels_to_distribute = getRect().getWidth() - total_width;
-	}
-	else //VERTICAL
-	{
-		pixels_to_distribute = getRect().getHeight() - total_height;
-	}
-
-	// now we distribute the pixels...
-	S32 cur_x = 0;
-	S32 cur_y = getRect().getHeight();
-
-	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
-	{
-		LLPanel* panelp = (*panel_it)->mPanel;
-
-		S32 cur_width = panelp->getRect().getWidth();
-		S32 cur_height = panelp->getRect().getHeight();
-		S32 new_width = llmax((*panel_it)->mMinWidth, cur_width);
-		S32 new_height = llmax((*panel_it)->mMinHeight, cur_height); 
-
-		S32 delta_size = 0;
-
-		// if panel can automatically resize (not animating, and resize flag set)...
-		if ((*panel_it)->getCollapseFactor() == 1.f 
-			&& (force_resize || (*panel_it)->mAutoResize) 
-			&& !(*panel_it)->mResizeBar->hasMouseCapture()) 
-		{
-			if (mOrientation == HORIZONTAL)
-			{
-				// if we're shrinking
-				if (pixels_to_distribute < 0)
-				{
-					// shrink proportionally to amount over minimum
-					// so we can do this in one pass
-					delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_width - (*panel_it)->mMinWidth) / (F32)shrink_headroom_available)) : 0;
-					shrink_headroom_available -= (cur_width - (*panel_it)->mMinWidth);
-				}
-				else
-				{
-					// grow all elements equally
-					delta_size = llround((F32)pixels_to_distribute / (F32)num_resizable_panels);
-					num_resizable_panels--;
-				}
-				pixels_to_distribute -= delta_size;
-				new_width = llmax((*panel_it)->mMinWidth, cur_width + delta_size);
-			}
-			else
-			{
-				new_width = getDefaultWidth(new_width);
-			}
-
-			if (mOrientation == VERTICAL)
-			{
-				if (pixels_to_distribute < 0)
-				{
-					// shrink proportionally to amount over minimum
-					// so we can do this in one pass
-					delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_height - (*panel_it)->mMinHeight) / (F32)shrink_headroom_available)) : 0;
-					shrink_headroom_available -= (cur_height - (*panel_it)->mMinHeight);
-				}
-				else
-				{
-					delta_size = llround((F32)pixels_to_distribute / (F32)num_resizable_panels);
-					num_resizable_panels--;
-				}
-				pixels_to_distribute -= delta_size;
-				new_height = llmax((*panel_it)->mMinHeight, cur_height + delta_size);
-			}
-			else
-			{
-				new_height = getDefaultHeight(new_height);
-			}
-		}
-		else
-		{
-			if (mOrientation == HORIZONTAL)
-			{
-				new_height = getDefaultHeight(new_height);
-			}
-			else // VERTICAL
-			{
-				new_width = getDefaultWidth(new_width);
-			}
-		}
-
-		// adjust running headroom count based on new sizes
-		shrink_headroom_total += delta_size;
-
-		panelp->reshape(new_width, new_height);
-		panelp->setOrigin(cur_x, cur_y - new_height);
-
-		LLRect panel_rect = panelp->getRect();
-		LLRect resize_bar_rect = panel_rect;
-		if (mOrientation == HORIZONTAL)
-		{
-			resize_bar_rect.mLeft = panel_rect.mRight - RESIZE_BAR_OVERLAP;
-			resize_bar_rect.mRight = panel_rect.mRight + mPanelSpacing + RESIZE_BAR_OVERLAP;
-		}
-		else
-		{
-			resize_bar_rect.mTop = panel_rect.mBottom + RESIZE_BAR_OVERLAP;
-			resize_bar_rect.mBottom = panel_rect.mBottom - mPanelSpacing - RESIZE_BAR_OVERLAP;
-		}
-		(*panel_it)->mResizeBar->setRect(resize_bar_rect);
-
-		if (mOrientation == HORIZONTAL)
-		{
-			cur_x += llround(new_width * (*panel_it)->getCollapseFactor()) + mPanelSpacing;
-		}
-		else //VERTICAL
-		{
-			cur_y -= llround(new_height * (*panel_it)->getCollapseFactor()) + mPanelSpacing;
-		}
-	}
-
-	// update resize bars with new limits
-	LLResizeBar* last_resize_bar = NULL;
-	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
-	{
-		LLPanel* panelp = (*panel_it)->mPanel;
-
-		if (mOrientation == HORIZONTAL)
-		{
-			(*panel_it)->mResizeBar->setResizeLimits(
-				(*panel_it)->mMinWidth, 
-				(*panel_it)->mMinWidth + shrink_headroom_total);
-		}
-		else //VERTICAL
-		{
-			(*panel_it)->mResizeBar->setResizeLimits(
-				(*panel_it)->mMinHeight, 
-				(*panel_it)->mMinHeight + shrink_headroom_total);
-		}
-
-		// toggle resize bars based on panel visibility, resizability, etc
-		BOOL resize_bar_enabled = panelp->getVisible() && (*panel_it)->mUserResize;
-		(*panel_it)->mResizeBar->setVisible(resize_bar_enabled);
-
-		if (resize_bar_enabled)
-		{
-			last_resize_bar = (*panel_it)->mResizeBar;
-		}
-	}
-
-	// hide last resize bar as there is nothing past it
-	// resize bars need to be in between two resizable panels
-	if (last_resize_bar)
-	{
-		last_resize_bar->setVisible(FALSE);
-	}
-
-	// not enough room to fit existing contents
-	if (force_resize == FALSE
-		// layout did not complete by reaching target position
-		&& ((mOrientation == VERTICAL && cur_y != -mPanelSpacing)
-			|| (mOrientation == HORIZONTAL && cur_x != getRect().getWidth() + mPanelSpacing)))
-	{
-		// do another layout pass with all stacked elements contributing
-		// even those that don't usually resize
-		llassert_always(force_resize == FALSE);
-		updateLayout(TRUE);
-	}
-} // end LLLayoutStack::updateLayout
-
-
-LLLayoutStack::LLEmbeddedPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const
-{
-	e_panel_list_t::const_iterator panel_it;
-	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
-	{
-		if ((*panel_it)->mPanel == panelp)
-		{
-			return *panel_it;
-		}
-	}
-	return NULL;
-}
-
-void LLLayoutStack::calcMinExtents()
-{
-	mMinWidth = 0;
-	mMinHeight = 0;
-
-	e_panel_list_t::iterator panel_it;
-	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
-	{
-		if (mOrientation == HORIZONTAL)
-		{
-			mMinHeight = llmax(	mMinHeight, 
-								(*panel_it)->mMinHeight);
-            mMinWidth += (*panel_it)->mMinWidth;
-			if (panel_it != mPanels.begin())
-			{
-				mMinWidth += mPanelSpacing;
-			}
-		}
-		else //VERTICAL
-		{
-	        mMinWidth = llmax(	mMinWidth, 
-								(*panel_it)->mMinWidth);
-			mMinHeight += (*panel_it)->mMinHeight;
-			if (panel_it != mPanels.begin())
-			{
-				mMinHeight += mPanelSpacing;
-			}
-		}
-	}
-}
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 756d02ef7d..5f4f8d16e7 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -56,42 +56,70 @@ const BOOL BORDER_NO = FALSE;
  * With or without border,
  * Can contain LLUICtrls.
  */
-class LLPanel : public LLUICtrl, public boost::signals::trackable
+class LLPanel : public LLUICtrl
 {
 public:
+	struct LocalizedString : public LLInitParam::Block<LocalizedString>
+	{
+		Mandatory<std::string>	name;
+		Mandatory<std::string>	text;
+		
+		LocalizedString()
+		:	name("name"),
+			text("value")
+		{}
+	};
+
+	struct Params 
+	:	public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<bool>			has_border;
+		Optional<LLViewBorder::Params>	border;
+
+		Optional<LLUIColor>		bg_opaque_color,
+								bg_alpha_color;
+
+		Optional<bool>			background_visible,
+								background_opaque;
+
+		Optional<S32>			min_width,
+								min_height;
+
+		Optional<std::string>	filename;
 
-	// minimal constructor for data-driven initialization
-	LLPanel();
-	LLPanel(const std::string& name);
+		Multiple<LocalizedString>	strings;
 
-	// Position and size not saved
-	LLPanel(const std::string& name, const LLRect& rect, BOOL bordered = TRUE);
+		Params();
+	};
 
-	// Position and size are saved to rect_control
-	LLPanel(const std::string& name, const std::string& rect_control, BOOL bordered = TRUE);	
+	// RN: for some reason you can't just use LLUICtrlFactory::getDefaultParams as a default argument in VC8
+	static const Params& defaultParams() { return LLUICtrlFactory::getDefaultParams<LLPanel::Params>(); }
+
+	// Panels can get constructed directly
+	LLPanel(const Params& params = defaultParams());
 	
-	/*virtual*/ ~LLPanel();
+public:
+// 	LLPanel(const std::string& name, const LLRect& rect = LLRect(), BOOL bordered = TRUE);
+	/*virtual*/ ~LLPanel() {}
 
 	// LLView interface
 	/*virtual*/ BOOL 	isPanel() const;
 	/*virtual*/ void	draw();	
 	/*virtual*/ BOOL	handleKeyHere( KEY key, MASK mask );
-	/*virtual*/ LLXMLNodePtr getXML(bool save_children = true) const;
+
 	// Override to set not found list:
-	virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
+	/*virtual*/ LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
 
 	// From LLFocusableElement
 	/*virtual*/ void	setFocus( BOOL b );
 	
 	// New virtuals
 	virtual 	void	refresh();	// called in setFocus()
-	virtual 	BOOL	postBuild();
 	virtual 	void	clearCtrls(); // overridden in LLPanelObject and LLPanelVolume
 
 	// Border controls
-	void addBorder( LLViewBorder::EBevel border_bevel = LLViewBorder::BEVEL_OUT,
-					LLViewBorder::EStyle border_style = LLViewBorder::STYLE_LINE,
-					S32 border_thickness = LLPANEL_BORDER_WIDTH );
+	void addBorder( LLViewBorder::Params p);
+	void addBorder() {  LLViewBorder::Params p; p.border_thickness(LLPANEL_BORDER_WIDTH); addBorder(p); }
 	void			removeBorder();
 	BOOL			hasBorder() const { return mBorder != NULL; }
 	void			setBorderVisible( BOOL b );
@@ -106,10 +134,7 @@ public:
 	}
 	
 	// requires LLView by default
-	void requires(const std::string& name)
-	{
-		requires<LLView>(name);
-	}
+	void requires(const std::string& name);
 	BOOL			checkRequirements();
 
 	void			setBackgroundColor( const LLColor4& color ) { mBgColorOpaque = color; }
@@ -126,22 +151,18 @@ public:
 	void			setLabel(const LLStringExplicit& label) { mLabel = label; }
 	std::string		getLabel() const { return mLabel; }
 	
-	void            setRectControl(const std::string& rect_control) { mRectControl.assign(rect_control); }
-	const std::string&	getRectControl() const { return mRectControl; }
-	void			storeRectControl();
-
 	void			setCtrlsEnabled(BOOL b);
 
 	LLHandle<LLPanel>	getHandle() const { return mPanelHandle; }
 
-	S32				getLastTabGroup() const { return mLastTabGroup; }
-
 	const LLCallbackMap::map_t& getFactoryMap() const { return mFactoryMap; }
-
-	BOOL initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-	void initChildrenXML(LLXMLNodePtr node, LLUICtrlFactory* factory);
-	void setPanelParameters(LLXMLNodePtr node, LLView *parentp);
-
+	
+	CommitCallbackRegistry::ScopedRegistrar& getCommitCallbackRegistrar() { return mCommitCallbackRegistrar; }
+	
+	void initFromParams(const Params& p);
+	BOOL initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL);
+	
+	bool hasString(const std::string& name);
 	std::string getString(const std::string& name, const LLStringUtil::format_map_t& args) const;
 	std::string getString(const std::string& name) const;
 
@@ -166,12 +187,10 @@ public:
 	// LLUICtrl
 	void childSetFocus(const std::string& id, BOOL focus = TRUE);
 	BOOL childHasFocus(const std::string& id);
-	void childSetFocusChangedCallback(const std::string& id, void (*cb)(LLFocusableElement*, void*), void* user_data = NULL);
 	
-	void childSetCommitCallback(const std::string& id, void (*cb)(LLUICtrl*, void*), void* userdata = NULL );
-	void childSetDoubleClickCallback(const std::string& id, void (*cb)(void*), void* userdata = NULL );
-	void childSetValidate(const std::string& id, BOOL (*cb)(LLUICtrl*, void*) );
-	void childSetUserData(const std::string& id, void* userdata);
+	// *TODO: Deprecate; for backwards compatability only:
+	void childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data);	
+	void childSetValidate(const std::string& id, boost::function<bool (const LLSD& data)> cb );
 
 	void childSetColor(const std::string& id, const LLColor4& color);
 
@@ -196,21 +215,21 @@ public:
 	// LLTabContainer
 	void childShowTab(const std::string& id, const std::string& tabname, bool visible = true);
 	LLPanel *childGetVisibleTab(const std::string& id) const;
-	void childSetTabChangeCallback(const std::string& id, const std::string& tabname, void (*on_tab_clicked)(void*, bool), void *userdata, void (*on_precommit)(void*,bool) = NULL);
 
 	// LLTextBox
 	void childSetWrappedText(const std::string& id, const std::string& text, bool visible = true);
 
 	// LLTextBox/LLTextEditor/LLLineEditor
 	void childSetText(const std::string& id, const LLStringExplicit& text) { childSetValue(id, LLSD(text)); }
+
+	// *NOTE: Does not return text from <string> tags, use getString()
 	std::string childGetText(const std::string& id) const { return childGetValue(id).asString(); }
 
 	// LLLineEditor
-	void childSetKeystrokeCallback(const std::string& id, void (*keystroke_callback)(LLLineEditor* caller, void* user_data), void *user_data);
 	void childSetPrevalidate(const std::string& id, BOOL (*func)(const LLWString &) );
 
 	// LLButton
-	void childSetAction(const std::string& id, void(*function)(void*), void* value);
+	void childSetAction(const std::string& id, boost::function<void(void*)> function, void* value = NULL);
 	void childSetActionTextbox(const std::string& id, void(*function)(void*), void* value = NULL);
 	void childSetControlName(const std::string& id, const std::string& control_name);
 
@@ -218,36 +237,27 @@ public:
 	void childNotFound(const std::string& id) const;
 	void childDisplayNotFound();
 
-	static LLView*	fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
+	static LLView*	fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL);
 	
 protected:
 	// Override to set not found list
 	LLButton*		getDefaultButton() { return mDefaultBtn; }
 	LLCallbackMap::map_t mFactoryMap;
-
+	CommitCallbackRegistry::ScopedRegistrar mCommitCallbackRegistrar;
+	
 private:
-	// common construction logic
-	void init();
-
-	// From LLView
-	virtual void	addCtrl( LLUICtrl* ctrl, S32 tab_group );
-	virtual void	addCtrlAtEnd( LLUICtrl* ctrl, S32 tab_group);
-
 	// Unified error reporting for the child* functions
 	typedef std::set<std::string> expected_members_list_t;
 	mutable expected_members_list_t mExpectedMembers;
 	mutable expected_members_list_t mNewExpectedMembers;
 
-	std::string		mRectControl;
 	LLColor4		mBgColorAlpha;
 	LLColor4		mBgColorOpaque;
-	LLColor4		mDefaultBtnHighlight;
 	BOOL			mBgVisible;
 	BOOL			mBgOpaque;
 	LLViewBorder*	mBorder;
 	LLButton*		mDefaultBtn;
-	std::string		mLabel;
-	S32				mLastTabGroup;
+	LLUIString		mLabel;
 	LLRootHandle<LLPanel> mPanelHandle;
 
 	typedef std::map<std::string, std::string> ui_string_map_t;
@@ -257,56 +267,4 @@ private:
 
 }; // end class LLPanel
 
-
-class LLLayoutStack : public LLView
-{
-public:
-	typedef enum e_layout_orientation
-	{
-		HORIZONTAL,
-		VERTICAL
-	} eLayoutOrientation;
-
-	LLLayoutStack(eLayoutOrientation orientation);
-	virtual ~LLLayoutStack();
-
-	/*virtual*/ void draw();
-	/*virtual*/ LLXMLNodePtr getXML(bool save_children = true) const;
-	/*virtual*/ void removeCtrl(LLUICtrl* ctrl);
-
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
-	S32 getMinWidth() const { return mMinWidth; }
-	S32 getMinHeight() const { return mMinHeight; }
-	
-	typedef enum e_animate
-	{
-		NO_ANIMATE,
-		ANIMATE
-	} EAnimate;
-
-	void addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize, EAnimate animate = NO_ANIMATE, S32 index = S32_MAX);
-	void removePanel(LLPanel* panel);
-	void collapsePanel(LLPanel* panel, BOOL collapsed = TRUE);
-	S32 getNumPanels() { return mPanels.size(); }
-
-private:
-	struct LLEmbeddedPanel;
-
-	void updateLayout(BOOL force_resize = FALSE);
-	void calcMinExtents();
-	S32 getDefaultHeight(S32 cur_height);
-	S32 getDefaultWidth(S32 cur_width);
-
-	const eLayoutOrientation mOrientation;
-
-	typedef std::vector<LLEmbeddedPanel*> e_panel_list_t;
-	e_panel_list_t mPanels;
-	LLEmbeddedPanel* findEmbeddedPanel(LLPanel* panelp) const;
-
-	S32 mMinWidth;
-	S32 mMinHeight;
-	S32 mPanelSpacing;
-}; // end class LLLayoutStack
-
 #endif
diff --git a/indra/llui/llprogressbar.cpp b/indra/llui/llprogressbar.cpp
index 8833494af8..693c331797 100644
--- a/indra/llui/llprogressbar.cpp
+++ b/indra/llui/llprogressbar.cpp
@@ -44,26 +44,32 @@
 #include "llglheaders.h"
 
 #include "llfocusmgr.h"
+#include "lluictrlfactory.h"
 
 static LLRegisterWidget<LLProgressBar> r("progress_bar");
 
-LLProgressBar::LLProgressBar(const std::string& name, const LLRect &rect) 
-	: LLView(name, rect, FALSE),
-	  mImageBar( NULL ),
-	  mImageShadow( NULL )
-{
-	mPercentDone = 0.f;
-
-	// Defaults:
-
-	setImageBar("rounded_square.tga");	
-	setImageShadow("rounded_square_soft.tga");
-
-	mColorBackground = LLColor4(0.3254f, 0.4000f, 0.5058f, 1.0f);
-	mColorBar        = LLColor4(0.5764f, 0.6627f, 0.8352f, 1.0f);
-	mColorBar2       = LLColor4(0.5764f, 0.6627f, 0.8352f, 1.0f);
-	mColorShadow     = LLColor4(0.2000f, 0.2000f, 0.4000f, 1.0f);
-}
+LLProgressBar::Params::Params()
+:	image_bar("image_bar"),
+	image_fill("image_fill"),
+	image_shadow("image_shadow"),
+	color_bar("color_bar"),
+	color_bar2("color_bar2"),
+	color_shadow("color_shadow"),
+	color_bg("color_bg")
+{}
+
+
+LLProgressBar::LLProgressBar(const LLProgressBar::Params& p) 
+:	LLView(p),
+	mImageBar(p.image_bar),
+	mImageShadow(p.image_shadow),
+	mImageFill(p.image_fill),
+	mColorBackground(p.color_bg()),
+	mColorBar(p.color_bar()),
+	mColorBar2(p.color_bar2()),
+	mColorShadow(p.color_shadow()),
+	mPercentDone(0.f)
+{}
 
 LLProgressBar::~LLProgressBar()
 {
@@ -74,108 +80,19 @@ void LLProgressBar::draw()
 {
 	static LLTimer timer;
 
-	LLUIImagePtr shadow_imagep = LLUI::getUIImage("rounded_square_soft.tga");
 	LLUIImagePtr bar_fg_imagep = LLUI::getUIImage("progressbar_fill.tga");
-	LLUIImagePtr bar_bg_imagep = LLUI::getUIImage("progressbar_track.tga");
-	LLUIImagePtr bar_imagep = LLUI::getUIImage("rounded_square.tga");
-	LLColor4 background_color = LLUI::sColorsGroup->getColor("LoginProgressBarBgColor");
 	
-	bar_bg_imagep->draw(getLocalRect(),
-		background_color);
+	mImageBar->draw(getLocalRect(), mColorBackground.get());
 
 	F32 alpha = 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32()));
-	LLColor4 bar_color = LLUI::sColorsGroup->getColor("LoginProgressBarFgColor");
+	LLColor4 bar_color = mColorBar.get();
 	bar_color.mV[3] = alpha;
 	LLRect progress_rect = getLocalRect();
 	progress_rect.mRight = llround(getRect().getWidth() * (mPercentDone / 100.f));
-	bar_fg_imagep->draw(progress_rect);
+	mImageFill->draw(progress_rect);
 }
 
 void LLProgressBar::setPercent(const F32 percent)
 {
 	mPercentDone = llclamp(percent, 0.f, 100.f);
 }
-
-void LLProgressBar::setImageBar( const std::string &bar_name )
-{
-	mImageBar = LLUI::sImageProvider->getUIImage(bar_name)->getImage();
-}
-
-void LLProgressBar::setImageShadow(const std::string &shadow_name)
-{
-	mImageShadow = LLUI::sImageProvider->getUIImage(shadow_name)->getImage();
-}
-
-void LLProgressBar::setColorBar(const LLColor4 &c)
-{
-	mColorBar = c;
-}
-void LLProgressBar::setColorBar2(const LLColor4 &c)
-{
-	mColorBar2 = c;
-}
-void LLProgressBar::setColorShadow(const LLColor4 &c)
-{
-	mColorShadow = c;
-}
-void LLProgressBar::setColorBackground(const LLColor4 &c)
-{
-	mColorBackground = c;
-}
-
-
-// static
-LLView* LLProgressBar::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("progress_bar");
-	node->getAttributeString("name", name);
-
-	LLProgressBar *progress = new LLProgressBar(name, LLRect());
-
-
-	std::string image_bar;
-	if (node->hasAttribute("image_bar")) node->getAttributeString("image_bar",image_bar);
-	if (image_bar != LLStringUtil::null) progress->setImageBar(image_bar);
-
-
-	std::string image_shadow;
-	if (node->hasAttribute("image_shadow")) node->getAttributeString("image_shadow",image_shadow);
-	if (image_shadow != LLStringUtil::null) progress->setImageShadow(image_shadow);
-
-
-	LLColor4 color_bar;
-	if (node->hasAttribute("color_bar"))
-	{
-		node->getAttributeColor4("color_bar",color_bar);
-		progress->setColorBar(color_bar);
-	}
-
-
-	LLColor4 color_bar2;
-	if (node->hasAttribute("color_bar2"))
-	{
-		node->getAttributeColor4("color_bar2",color_bar2);
-		progress->setColorBar2(color_bar2);
-	}
-
-
-	LLColor4 color_shadow;
-	if (node->hasAttribute("color_shadow"))
-	{
-		node->getAttributeColor4("color_shadow",color_shadow);
-		progress->setColorShadow(color_shadow);
-	}
-
-
-	LLColor4 color_bg;
-	if (node->hasAttribute("color_bg"))
-	{
-		node->getAttributeColor4("color_bg",color_bg);
-		progress->setColorBackground(color_bg);
-	}
-
-	
-	progress->initFromXML(node, parent);
-	
-	return progress;
-}
diff --git a/indra/llui/llprogressbar.h b/indra/llui/llprogressbar.h
index 00ad61d540..5c2f73ef9e 100644
--- a/indra/llui/llprogressbar.h
+++ b/indra/llui/llprogressbar.h
@@ -40,37 +40,38 @@ class LLProgressBar
 	: public LLView
 {
 public:
-	LLProgressBar(const std::string& name, const LLRect &rect);
-	virtual ~LLProgressBar();
-
-	void setPercent(const F32 percent);
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Optional<LLUIImage*>	image_bar,
+								image_fill,
+								image_shadow;
 
-	void setImageBar(const std::string &bar_name);
-	void setImageShadow(const std::string &shadow_name);
+		Optional<LLUIColor>		color_bar,
+								color_bar2,
+								color_shadow,
+								color_bg;
 
-	void setColorBar(const LLColor4 &c);
-	void setColorBar2(const LLColor4 &c);
-	void setColorShadow(const LLColor4 &c);
-	void setColorBackground(const LLColor4 &c);
+		Params();
+	};
+	LLProgressBar(const Params&);
+	virtual ~LLProgressBar();
 
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
+	void setPercent(const F32 percent);
 
 	/*virtual*/ void draw();
 
-protected:
+private:
 	F32 mPercentDone;
 
-	LLPointer<LLImageGL>  mImageBar;
-	//LLUUID                mImageBarID;
-	//LLString              mImageBarName;
-	LLColor4              mColorBar;
-	LLColor4              mColorBar2;
+	LLPointer<LLUIImage>	mImageBar;
+	LLUIColor	mColorBar;
+	LLUIColor	mColorBar2;
 
-	LLPointer<LLImageGL>  mImageShadow;
-	//LLUUID                mImageShadowID;
-	//LLString              mImageShadowName;
-	LLColor4              mColorShadow;
-	LLColor4              mColorBackground;
+	LLPointer<LLUIImage>	mImageShadow;
+	LLUIColor    mColorShadow;
+	LLUIColor    mColorBackground;
+	
+	LLPointer<LLUIImage>	mImageFill;
 };
 
 #endif // LL_LLPROGRESSBAR_H
diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp
index 33b93985d7..7d34841431 100644
--- a/indra/llui/llradiogroup.cpp
+++ b/indra/llui/llradiogroup.cpp
@@ -42,52 +42,49 @@
 #include "llcontrol.h"
 #include "llui.h"
 #include "llfocusmgr.h"
+#include "lluictrlfactory.h"
 
-static LLRegisterWidget<LLRadioGroup> r("radio_group");
+static LLRegisterWidget<LLRadioGroup> r1("radio_group");
+static LLRegisterWidget<LLRadioCtrl> r2("radio_item");
 
-LLRadioGroup::LLRadioGroup(const std::string& name, const LLRect& rect,
-						   const std::string& control_name,
-						   LLUICtrlCallback callback,
-						   void* userdata,
-						   BOOL border)
-:	LLUICtrl(name, rect, TRUE, callback, userdata, FOLLOWS_LEFT | FOLLOWS_TOP),
-	mSelectedIndex(0)
+LLRadioGroup::Params::Params()
+:	has_border("draw_border")
 {
-	setControlName(control_name, NULL);
-	init(border);
+	name = "radio_group";
+	mouse_opaque = true;
+	follows.flags = FOLLOWS_LEFT | FOLLOWS_TOP;
 }
 
-LLRadioGroup::LLRadioGroup(const std::string& name, const LLRect& rect,
-						   S32 initial_index,
-						   LLUICtrlCallback callback,
-						   void* userdata,
-						   BOOL border) :
-	LLUICtrl(name, rect, TRUE, callback, userdata, FOLLOWS_LEFT | FOLLOWS_TOP),
-	mSelectedIndex(initial_index)
-{
-	init(border);
-}
-
-void LLRadioGroup::init(BOOL border)
-{
-	if (border)
+LLRadioGroup::LLRadioGroup(const LLRadioGroup::Params& p)
+:	LLUICtrl(p),
+	mFont(p.font.isProvided() ? p.font() : LLFontGL::getFontSansSerifSmall()),
+	mSelectedIndex(-1),
+	mHasBorder(p.has_border)
+{	
+	if (mHasBorder)
 	{
-		addChild( new LLViewBorder( std::string("radio group border"), 
-									LLRect(0, getRect().getHeight(), getRect().getWidth(), 0), 
-									LLViewBorder::BEVEL_NONE, 
-									LLViewBorder::STYLE_LINE, 
-									1 ) );
+		LLViewBorder::Params params;
+		params.name("radio group border");
+		params.rect(LLRect(0, getRect().getHeight(), getRect().getWidth(), 0));
+		params.bevel_type(LLViewBorder::BEVEL_NONE);
+		LLViewBorder * vb = LLUICtrlFactory::create<LLViewBorder> (params);
+		addChild (vb);
 	}
-	mHasBorder = border;
 }
 
-
-
-
 LLRadioGroup::~LLRadioGroup()
 {
 }
 
+// virtual
+BOOL LLRadioGroup::postBuild()
+{
+	if (mControlVariable)
+	{
+		setSelectedIndex(mControlVariable->getValue().asInteger());
+	}
+	return TRUE;
+}
 
 // virtual
 void LLRadioGroup::setEnabled(BOOL enabled)
@@ -250,48 +247,52 @@ void LLRadioGroup::draw()
 	LLView::draw();
 }
 
-
-// When adding a button, we need to ensure that the radio
+// When adding a child button, we need to ensure that the radio
 // group gets a message when the button is clicked.
-LLRadioCtrl* LLRadioGroup::addRadioButton(const std::string& name, const std::string& label, const LLRect& rect, const LLFontGL* font )
+
+/*virtual*/
+bool LLRadioGroup::addChild(LLView* view, S32 tab_group)
 {
-	// Highlight will get fixed in draw method above
-	LLRadioCtrl* radio = new LLRadioCtrl(name, rect, label, font,
-		onClickButton, this);
-	addChild(radio);
-	mRadioButtons.push_back(radio);
-	return radio;
+	bool res = LLView::addChild(view, tab_group);
+	if (res)
+	{
+		LLRadioCtrl* radio_ctrl = dynamic_cast<LLRadioCtrl*>(view);
+		if (radio_ctrl)
+		{
+			radio_ctrl->setFont(mFont);
+			radio_ctrl->setCommitCallback(boost::bind(&LLRadioGroup::onClickButton, this, _1));
+			mRadioButtons.push_back(radio_ctrl);
+		}
+	}
+	return res;
 }
 
 // Handle one button being clicked.  All child buttons must have this
 // function as their callback function.
 
-// static
-void LLRadioGroup::onClickButton(LLUICtrl* ui_ctrl, void* userdata)
+void LLRadioGroup::onClickButton(LLUICtrl* ctrl)
 {
 	// llinfos << "LLRadioGroup::onClickButton" << llendl;
-
-	LLRadioCtrl* clickedRadio = (LLRadioCtrl*) ui_ctrl;
-	LLRadioGroup* self = (LLRadioGroup*) userdata;
-
-	S32 counter = 0;
-	for (button_list_t::iterator iter = self->mRadioButtons.begin();
-		 iter != self->mRadioButtons.end(); ++iter)
+	LLRadioCtrl* clicked_radio = dynamic_cast<LLRadioCtrl*>(ctrl);
+	if (!clicked_radio)
+	    return;
+	S32 index = 0;
+	for (button_list_t::iterator iter = mRadioButtons.begin();
+		 iter != mRadioButtons.end(); ++iter)
 	{
 		LLRadioCtrl* radio = *iter;
-		if (radio == clickedRadio)
+		if (radio == clicked_radio)
 		{
-			// llinfos << "clicked button " << counter << llendl;
-			self->setSelectedIndex(counter);
-			self->setControlValue(counter);
+			// llinfos << "clicked button " << index << llendl;
+			setSelectedIndex(index);
 			
 			// BUG: Calls click callback even if button didn't actually change
-			self->onCommit();
+			onCommit();
 
 			return;
 		}
 
-		counter++;
+		index++;
 	}
 
 	llwarns << "LLRadioGroup::onClickButton - clicked button that isn't a child" << llendl;
@@ -340,107 +341,6 @@ LLSD LLRadioGroup::getValue() const
 	return LLSD();
 }
 
-// virtual
-LLXMLNodePtr LLRadioGroup::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	// Attributes
-
-	node->createChild("draw_border", TRUE)->setBoolValue(mHasBorder);
-
-	// Contents
-
-	for (button_list_t::const_iterator iter = mRadioButtons.begin();
-		 iter != mRadioButtons.end(); ++iter)
-	{
-		LLRadioCtrl* radio = *iter;
-
-		LLXMLNodePtr child_node = radio->LLView::getXML();
-		child_node->setStringValue(radio->getLabel());
-		child_node->setName(std::string("radio_item"));
-
-		node->addChild(child_node);
-	}
-
-	return node;
-}
-
-// static
-LLView* LLRadioGroup::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("radio_group");
-	node->getAttributeString("name", name);
-
-	U32 initial_value = 0;
-	node->getAttributeU32("initial_value", initial_value);
-
-	BOOL draw_border = TRUE;
-	node->getAttributeBOOL("draw_border", draw_border);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	LLRadioGroup* radio_group = new LLRadioGroup(name, 
-		rect,
-		initial_value,
-		NULL,
-		NULL,
-		draw_border);
-
-	const std::string& contents = node->getValue();
-
-	LLRect group_rect = radio_group->getRect();
-
-	LLFontGL *font = LLView::selectFont(node);
-
-	if (contents.find_first_not_of(" \n\t") != contents.npos)
-	{
-		// ...old school default vertical layout
-		typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
-		boost::char_separator<char> sep("\t\n");
-		tokenizer tokens(contents, sep);
-		tokenizer::iterator token_iter = tokens.begin();
-	
-		const S32 HPAD = 4, VPAD = 4;
-		S32 cur_y = group_rect.getHeight() - VPAD;
-	
-		while(token_iter != tokens.end())
-		{
-			const std::string& line = *token_iter;
-			LLRect rect(HPAD, cur_y, group_rect.getWidth() - (2 * HPAD), cur_y - 15);
-			cur_y -= VPAD + 15;
-			radio_group->addRadioButton(std::string("radio"), line, rect, font);
-			++token_iter;
-		}
-		llwarns << "Legacy radio group format used! Please convert to use <radio_item> tags!" << llendl;
-	}
-	else
-	{
-		// ...per pixel layout
-		LLXMLNodePtr child;
-		for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-		{
-			if (child->hasName("radio_item"))
-			{
-				LLRect item_rect;
-				createRect(child, item_rect, radio_group, rect);
-
-				std::string radioname("radio");
-				child->getAttributeString("name", radioname);
-				std::string item_label = child->getTextContents();
-				LLRadioCtrl* radio = radio_group->addRadioButton(radioname, item_label, item_rect, font);
-
-				radio->initFromXML(child, radio_group);
-			}
-		}
-	}
-
-	radio_group->initFromXML(node, parent);
-
-	return radio_group;
-}
-
 // LLCtrlSelectionInterface functions
 BOOL	LLRadioGroup::setCurrentByID( const LLUUID& id )
 {
@@ -504,6 +404,22 @@ BOOL	LLRadioGroup::operateOnAll(EOperation op)
 	return FALSE;
 }
 
+LLRadioCtrl::LLRadioCtrl(const LLRadioCtrl::Params& p)
+	: LLCheckBoxCtrl(p)
+{
+}
+
+BOOL LLRadioCtrl::postBuild()
+{
+	// Old-style radio_item used the text contents to indicate the label,
+	// but new-style radio_item uses label attribute.
+	std::string value = getValue().asString();
+	if (!value.empty())
+	{
+		setLabel(value);
+	}
+	return TRUE;
+}
 
 LLRadioCtrl::~LLRadioCtrl()
 {
@@ -515,3 +431,19 @@ void LLRadioCtrl::setValue(const LLSD& value)
 	mButton->setTabStop(value.asBoolean());
 }
 
+// *TODO: Remove this function after the initial XUI XML re-export pass.
+// static
+void LLRadioCtrl::setupParamsForExport(Params& p, LLView* parent)
+{
+	std::string label = p.label;
+	if (label.empty())
+	{
+		// We don't have a label attribute, so move the text contents
+		// stored in "value" into the label
+		std::string initial_value = p.LLUICtrl::Params::initial_value();
+		p.label = initial_value;
+		p.LLUICtrl::Params::initial_value = LLSD();
+	}
+
+	LLCheckBoxCtrl::setupParamsForExport(p, parent);
+}
diff --git a/indra/llui/llradiogroup.h b/indra/llui/llradiogroup.h
index 3410b74104..3dfab9b2b3 100644
--- a/indra/llui/llradiogroup.h
+++ b/indra/llui/llradiogroup.h
@@ -39,20 +39,35 @@
 
 
 /*
- * A checkbox control with use_radio_style == true.
+ * An invisible view containing multiple mutually exclusive toggling 
+ * buttons (usually radio buttons).  Automatically handles the mutex
+ * condition by highlighting only one button at a time.
  */
 class LLRadioCtrl : public LLCheckBoxCtrl 
 {
 public:
-	LLRadioCtrl(const std::string& name, const LLRect& rect, const std::string& label, const LLFontGL* font = NULL,
-		void (*commit_callback)(LLUICtrl*, void*) = NULL, void* callback_userdata = NULL) :
-				LLCheckBoxCtrl(name, rect, label, font, commit_callback, callback_userdata, FALSE, RADIO_STYLE)
+	struct Params : public LLInitParam::Block<Params, LLCheckBoxCtrl::Params>
 	{
-		setTabStop(FALSE);
-	}
-	/*virtual*/ ~LLRadioCtrl();
+		Deprecated length;
+		Deprecated type;
+
+		Params() 
+		:	length("length"),
+			type("type")
+		{}
+	};
 
+	/*virtual*/ ~LLRadioCtrl();
 	/*virtual*/ void setValue(const LLSD& value);
+
+	/*virtual*/ BOOL postBuild();
+
+	// Ensure label is in an attribute, not the contents
+	static void setupParamsForExport(Params& p, LLView* parent);
+
+protected:
+	LLRadioCtrl(const Params& p);
+	friend class LLUICtrlFactory;
 };
 
 
@@ -65,30 +80,26 @@ class LLRadioGroup
 :	public LLUICtrl, public LLCtrlSelectionInterface
 {
 public:
-	// Build a radio group.  The number (0...n-1) of the currently selected
-	// element will be stored in the named control.  After the control is
-	// changed the callback will be called.
-	LLRadioGroup(const std::string& name, const LLRect& rect, 
-		const std::string& control_name, 
-		LLUICtrlCallback callback = NULL,
-		void* userdata = NULL,
-		BOOL border = TRUE);
-
-	// Another radio group constructor, but this one doesn't rely on
-	// needing a control
-	LLRadioGroup(const std::string& name, const LLRect& rect,
-				 S32 initial_index,
-				 LLUICtrlCallback callback = NULL,
-				 void* userdata = NULL,
-				 BOOL border = TRUE);
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<bool> has_border;
+		Params();
+	};
 
-	virtual ~LLRadioGroup();
+protected:
+	LLRadioGroup(const Params&);
+	friend class LLUICtrlFactory;
 
+public:
+	virtual ~LLRadioGroup();
+	
+	virtual BOOL postBuild();
+	
+	virtual bool addChild(LLView* view, S32 tab_group = 0);
+	
 	virtual BOOL handleKeyHere(KEY key, MASK mask);
 
 	virtual void setEnabled(BOOL enabled);
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
 	void setIndexEnabled(S32 index, BOOL enabled);
 	
 	// return the index value of the selected item
@@ -104,13 +115,8 @@ public:
 	// Draw the group, but also fix the highlighting based on the control.
 	void draw();
 
-	// You must use this method to add buttons to a radio group.
-	// Don't use addChild -- it won't set the callback function
-	// correctly.
-	LLRadioCtrl* addRadioButton(const std::string& name, const std::string& label, const LLRect& rect, const LLFontGL* font);
-	LLRadioCtrl* getRadioButton(const S32& index) { return mRadioButtons[index]; }
 	// Update the control as needed.  Userdata must be a pointer to the button.
-	static void onClickButton(LLUICtrl* radio, void* userdata);
+	void onClickButton(LLUICtrl* clicked_radio);
 	
 	//========================================================================
 	LLCtrlSelectionInterface* getSelectionInterface()	{ return (LLCtrlSelectionInterface*)this; };
@@ -131,9 +137,7 @@ public:
 	/*virtual*/ BOOL	operateOnAll(EOperation op);
 
 private:
-	// protected function shared by the two constructors.
-	void init(BOOL border);
-
+	const LLFontGL* mFont;
 	S32 mSelectedIndex;
 	typedef std::vector<LLRadioCtrl*> button_list_t;
 	button_list_t mRadioButtons;
diff --git a/indra/llui/llresizebar.cpp b/indra/llui/llresizebar.cpp
index 5b9fe72e99..304ac64f31 100644
--- a/indra/llui/llresizebar.cpp
+++ b/indra/llui/llresizebar.cpp
@@ -40,22 +40,22 @@
 #include "llfocusmgr.h"
 #include "llwindow.h"
 
-LLResizeBar::LLResizeBar( const std::string& name, LLView* resizing_view, const LLRect& rect, S32 min_size, S32 max_size, Side side )
-	:
-	LLView( name, rect, TRUE ),
+LLResizeBar::LLResizeBar(const LLResizeBar::Params& p)
+:	LLView(p),
 	mDragLastScreenX( 0 ),
 	mDragLastScreenY( 0 ),
 	mLastMouseScreenX( 0 ),
 	mLastMouseScreenY( 0 ),
-	mMinSize( min_size ),
-	mMaxSize( max_size ),
-	mSide( side ),
-	mSnappingEnabled(TRUE),
-	mAllowDoubleClickSnapping(TRUE),
-	mResizingView(resizing_view)
+	mMinSize( p.min_size ),
+	mMaxSize( p.max_size ),
+	mSide( p.side ),
+	mSnappingEnabled(p.snapping_enabled),
+	mAllowDoubleClickSnapping(p.allow_double_click_snapping),
+	mResizingView(p.resizing_view)
 {
+	setFollowsNone();
 	// set up some generically good follow code.
-	switch( side )
+	switch( mSide )
 	{
 	case LEFT:
 		setFollowsLeft();
@@ -80,8 +80,6 @@ LLResizeBar::LLResizeBar( const std::string& name, LLView* resizing_view, const
 	default:
 		break;
 	}
-	// this is just a decorator
-	setSaveToXML(FALSE);
 }
 
 
@@ -185,30 +183,31 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask)
 
 			if (mSnappingEnabled)
 			{
+				static LLUICachedControl<S32> snap_margin ("SnapMargin", 0);
 				switch( mSide )
 				{
 				case LEFT:
-					snap_view = mResizingView->findSnapEdge(scaled_rect.mLeft, mouse_dir, SNAP_LEFT, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
+					snap_view = mResizingView->findSnapEdge(scaled_rect.mLeft, mouse_dir, SNAP_LEFT, SNAP_PARENT_AND_SIBLINGS, snap_margin);
 					break;
 				case TOP:
-					snap_view = mResizingView->findSnapEdge(scaled_rect.mTop, mouse_dir, SNAP_TOP, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
+					snap_view = mResizingView->findSnapEdge(scaled_rect.mTop, mouse_dir, SNAP_TOP, SNAP_PARENT_AND_SIBLINGS, snap_margin);
 					break;
 				case RIGHT:
-					snap_view = mResizingView->findSnapEdge(scaled_rect.mRight, mouse_dir, SNAP_RIGHT, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
+					snap_view = mResizingView->findSnapEdge(scaled_rect.mRight, mouse_dir, SNAP_RIGHT, SNAP_PARENT_AND_SIBLINGS, snap_margin);
 					break;
 				case BOTTOM:
-					snap_view = mResizingView->findSnapEdge(scaled_rect.mBottom, mouse_dir, SNAP_BOTTOM, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
+					snap_view = mResizingView->findSnapEdge(scaled_rect.mBottom, mouse_dir, SNAP_BOTTOM, SNAP_PARENT_AND_SIBLINGS, snap_margin);
 					break;
 				}
 			}
 
 			// register "snap" behavior with snapped view
-			mResizingView->snappedTo(snap_view);
+			mResizingView->setSnappedTo(snap_view);
 
 			// restore original rectangle so the appropriate changes are detected
 			mResizingView->setRect(orig_rect);
 			// change view shape as user operation
-			mResizingView->userSetShape(scaled_rect);
+			mResizingView->setShape(scaled_rect, true);
 
 			// update last valid mouse cursor position based on resized view's actual size
 			LLRect new_rect = mResizingView->getRect();
@@ -284,7 +283,7 @@ BOOL LLResizeBar::handleDoubleClick(S32 x, S32 y, MASK mask)
 			break;
 		}
 
-		mResizingView->userSetShape(scaled_rect);
+		mResizingView->setShape(scaled_rect, true);
 	}
 
 	return TRUE;
diff --git a/indra/llui/llresizebar.h b/indra/llui/llresizebar.h
index b9fc40593d..4ad3d5035a 100644
--- a/indra/llui/llresizebar.h
+++ b/indra/llui/llresizebar.h
@@ -41,7 +41,31 @@ class LLResizeBar : public LLView
 public:
 	enum Side { LEFT, TOP, RIGHT, BOTTOM };
 
-	LLResizeBar(const std::string& name, LLView* resizing_view, const LLRect& rect, S32 min_size, S32 max_size, Side side );
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Mandatory<LLView*> resizing_view;
+		Mandatory<Side>	side;
+
+		Optional<S32>	min_size;
+		Optional<S32>	max_size;
+		Optional<bool>	snapping_enabled;
+		Optional<bool>	allow_double_click_snapping;
+
+		Params()
+		:	max_size("", S32_MAX),
+			snapping_enabled("", true),
+			resizing_view("resizing_view"),
+			side("side"),
+			allow_double_click_snapping("", true)
+		{
+			name = "resize_bar";
+		}
+	};
+
+protected:
+	LLResizeBar(const LLResizeBar::Params& p);
+	friend class LLUICtrlFactory;
+public:
 
 //	virtual void	draw();  No appearance
 	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);
diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp
index c5d57d8d6c..943e2f55f1 100644
--- a/indra/llui/llresizehandle.cpp
+++ b/indra/llui/llresizehandle.cpp
@@ -44,37 +44,37 @@
 
 const S32 RESIZE_BORDER_WIDTH = 3;
 
-LLResizeHandle::LLResizeHandle( const std::string& name, const LLRect& rect, S32 min_width, S32 min_height, ECorner corner )
-	:
-	LLView( name, rect, TRUE ),
+LLResizeHandle::Params::Params()
+:	corner("corner")
+{
+	name = "resize_handle";
+}
+
+LLResizeHandle::LLResizeHandle(const LLResizeHandle::Params& p)
+:	LLView(p),
 	mDragLastScreenX( 0 ),
 	mDragLastScreenY( 0 ),
 	mLastMouseScreenX( 0 ),
 	mLastMouseScreenY( 0 ),
 	mImage( NULL ),
-	mMinWidth( min_width ),
-	mMinHeight( min_height ),
-	mCorner( corner )
+	mMinWidth( p.min_width ),
+	mMinHeight( p.min_height ),
+	mCorner( p.corner )
 {
-	setSaveToXML(false);
-
 	if( RIGHT_BOTTOM == mCorner)
 	{
-		mImage = LLUI::sImageProvider->getUIImage("UIImgResizeBottomRightUUID");
+		mImage = LLUI::getUIImage("resize_handle_bottom_right_blue.tga");
 	}
-
-	switch( mCorner )
+	switch( p.corner )
 	{
-	case LEFT_TOP:		setFollows( FOLLOWS_LEFT | FOLLOWS_TOP );		break;
-	case LEFT_BOTTOM:	setFollows( FOLLOWS_LEFT | FOLLOWS_BOTTOM );	break;
-	case RIGHT_TOP:		setFollows( FOLLOWS_RIGHT | FOLLOWS_TOP );		break;
-	case RIGHT_BOTTOM:	setFollows( FOLLOWS_RIGHT | FOLLOWS_BOTTOM );	break;
+		case LEFT_TOP:		setFollows( FOLLOWS_LEFT | FOLLOWS_TOP );		break;
+		case LEFT_BOTTOM:	setFollows( FOLLOWS_LEFT | FOLLOWS_BOTTOM );	break;
+		case RIGHT_TOP:		setFollows( FOLLOWS_RIGHT | FOLLOWS_TOP );		break;
+		case RIGHT_BOTTOM:	setFollows( FOLLOWS_RIGHT | FOLLOWS_BOTTOM );	break;
 	}
-
-	// decorator object, don't serialize
-	setSaveToXML(FALSE);
 }
 
+
 BOOL LLResizeHandle::handleMouseDown(S32 x, S32 y, MASK mask)
 {
 	BOOL handled = FALSE;
@@ -205,36 +205,37 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask)
 			LLView* snap_view = NULL;
 			LLView* test_view = NULL;
 
+			static LLUICachedControl<S32> snap_margin ("SnapMargin", 0);
 			// now do snapping
 			switch(mCorner)
 			{
 			case LEFT_TOP:		
-				snap_view = resizing_view->findSnapEdge(scaled_rect.mLeft, mouse_dir, SNAP_LEFT, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
-				test_view = resizing_view->findSnapEdge(scaled_rect.mTop, mouse_dir, SNAP_TOP, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
+				snap_view = resizing_view->findSnapEdge(scaled_rect.mLeft, mouse_dir, SNAP_LEFT, SNAP_PARENT_AND_SIBLINGS, snap_margin);
+				test_view = resizing_view->findSnapEdge(scaled_rect.mTop, mouse_dir, SNAP_TOP, SNAP_PARENT_AND_SIBLINGS, snap_margin);
 				if (!snap_view)
 				{
 					snap_view = test_view;
 				}
 				break;
 			case LEFT_BOTTOM:	
-				snap_view = resizing_view->findSnapEdge(scaled_rect.mLeft, mouse_dir, SNAP_LEFT, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
-				test_view = resizing_view->findSnapEdge(scaled_rect.mBottom, mouse_dir, SNAP_BOTTOM, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
+				snap_view = resizing_view->findSnapEdge(scaled_rect.mLeft, mouse_dir, SNAP_LEFT, SNAP_PARENT_AND_SIBLINGS, snap_margin);
+				test_view = resizing_view->findSnapEdge(scaled_rect.mBottom, mouse_dir, SNAP_BOTTOM, SNAP_PARENT_AND_SIBLINGS, snap_margin);
 				if (!snap_view)
 				{
 					snap_view = test_view;
 				}
 				break;
 			case RIGHT_TOP:		
-				snap_view = resizing_view->findSnapEdge(scaled_rect.mRight, mouse_dir, SNAP_RIGHT, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
-				test_view = resizing_view->findSnapEdge(scaled_rect.mTop, mouse_dir, SNAP_TOP, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
+				snap_view = resizing_view->findSnapEdge(scaled_rect.mRight, mouse_dir, SNAP_RIGHT, SNAP_PARENT_AND_SIBLINGS, snap_margin);
+				test_view = resizing_view->findSnapEdge(scaled_rect.mTop, mouse_dir, SNAP_TOP, SNAP_PARENT_AND_SIBLINGS, snap_margin);
 				if (!snap_view)
 				{
 					snap_view = test_view;
 				}
 				break;
 			case RIGHT_BOTTOM:	
-				snap_view = resizing_view->findSnapEdge(scaled_rect.mRight, mouse_dir, SNAP_RIGHT, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
-				test_view = resizing_view->findSnapEdge(scaled_rect.mBottom, mouse_dir, SNAP_BOTTOM, SNAP_PARENT_AND_SIBLINGS, LLUI::sConfigGroup->getS32("SnapMargin"));
+				snap_view = resizing_view->findSnapEdge(scaled_rect.mRight, mouse_dir, SNAP_RIGHT, SNAP_PARENT_AND_SIBLINGS, snap_margin);
+				test_view = resizing_view->findSnapEdge(scaled_rect.mBottom, mouse_dir, SNAP_BOTTOM, SNAP_PARENT_AND_SIBLINGS, snap_margin);
 				if (!snap_view)
 				{
 					snap_view = test_view;
@@ -243,13 +244,13 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask)
 			}
 
 			// register "snap" behavior with snapped view
-			resizing_view->snappedTo(snap_view);
+			resizing_view->setSnappedTo(snap_view);
 
 			// reset parent rect
 			resizing_view->setRect(orig_rect);
 
 			// translate and scale to new shape
-			resizing_view->userSetShape(scaled_rect);
+			resizing_view->setShape(scaled_rect, true);
 			
 			// update last valid mouse cursor position based on resized view's actual size
 			LLRect new_rect = resizing_view->getRect();
diff --git a/indra/llui/llresizehandle.h b/indra/llui/llresizehandle.h
index 0e23d526fa..e4e3c81cec 100644
--- a/indra/llui/llresizehandle.h
+++ b/indra/llui/llresizehandle.h
@@ -44,9 +44,18 @@ class LLResizeHandle : public LLView
 public:
 	enum ECorner { LEFT_TOP, LEFT_BOTTOM, RIGHT_TOP, RIGHT_BOTTOM };
 
-	
-	LLResizeHandle(const std::string& name, const LLRect& rect, S32 min_width, S32 min_height, ECorner corner = RIGHT_BOTTOM );
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Mandatory<ECorner>	corner;
+		Optional<S32>		min_width;
+		Optional<S32>		min_height;
+		Params();
+	};
 
+protected:
+	LLResizeHandle(const LLResizeHandle::Params&);
+	friend class LLUICtrlFactory;
+public:
 	virtual void	draw();
 	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp
index 141b08c39d..a4e23a605b 100644
--- a/indra/llui/llresmgr.cpp
+++ b/indra/llui/llresmgr.cpp
@@ -43,106 +43,8 @@
 
 LLResMgr::LLResMgr()
 {
-	U32 i;
-
-	// Init values for each locale.
-	// Note: This is only the most bare-bones version.  In the future, load these dynamically, on demand.
-
-	//////////////////////////////////////////////////////////////////////////////
-	// USA
-	// USA Fonts
-	for( i=0; i<LLFONT_COUNT; i++ )
-	{
-		mUSAFonts[i] = NULL;
-	}
-	mUSAFonts[ LLFONT_OCRA ]			= LLFontGL::getFontMonospace();
-	mUSAFonts[ LLFONT_SANSSERIF ]		= LLFontGL::getFontSansSerif();
-	mUSAFonts[ LLFONT_SANSSERIF_SMALL ]	= LLFontGL::getFontSansSerifSmall();
-	mUSAFonts[ LLFONT_SANSSERIF_BIG ]	= LLFontGL::getFontSansSerifBig();
-	mUSAFonts[ LLFONT_SMALL ]			= LLFontGL::getFontMonospace();
-/*
-	// USA Strings
-	for( i=0; i<LLSTR_COUNT; i++ )
-	{
-		mUSAStrings[i] = "";
-	}
-	mUSAStrings[ LLSTR_HELLO ]			= "hello";
-	mUSAStrings[ LLSTR_GOODBYE ]		= "goodbye";
-	mUSAStrings[ LLSTR_CHAT_LABEL ]		= "Chat";
-	mUSAStrings[ LLSTR_STATUS_LABEL ]	= "Properties";
-	mUSAStrings[ LLSTR_X ]				= "X";
-	mUSAStrings[ LLSTR_Y ]				= "Y";
-	mUSAStrings[ LLSTR_Z ]				= "Z";
-	mUSAStrings[ LLSTR_POSITION ]		= "Position (meters)";
-	mUSAStrings[ LLSTR_SCALE ]			= "Size (meters)";
-	mUSAStrings[ LLSTR_ROTATION ]		= "Rotation (degrees)";
-	mUSAStrings[ LLSTR_HAS_PHYSICS ]	= "Has Physics";
-	mUSAStrings[ LLSTR_SCRIPT ]			= "Script";
-	mUSAStrings[ LLSTR_HELP ]			= "Help";
-	mUSAStrings[ LLSTR_REMOVE ]			= "Remove";
-	mUSAStrings[ LLSTR_CLEAR ]			= "Clear";
-	mUSAStrings[ LLSTR_APPLY ]			= "Apply";
-	mUSAStrings[ LLSTR_CANCEL ]			= "Cancel";
-	mUSAStrings[ LLSTR_MATERIAL ]		= "Material";
-	mUSAStrings[ LLSTR_FACE ]			= "Face";
-	mUSAStrings[ LLSTR_TEXTURE ]		= "Texture";
-	mUSAStrings[ LLSTR_TEXTURE_SIZE ]	= "Repeats per Face";
-	mUSAStrings[ LLSTR_TEXTURE_OFFSET ]	= "Offset";
-	mUSAStrings[ LLSTR_TEXTURE_ROTATION ]	= "Rotation (degrees)";
-	mUSAStrings[ LLSTR_U ]				= "U";
-	mUSAStrings[ LLSTR_V ]				= "V";
-	mUSAStrings[ LLSTR_OWNERSHIP ]		= "Ownership";
-	mUSAStrings[ LLSTR_PUBLIC ]			= "Public";
-	mUSAStrings[ LLSTR_PRIVATE ]		= "Private";
-	mUSAStrings[ LLSTR_REVERT ]			= "Revert";
-	mUSAStrings[ LLSTR_INSERT_SAMPLE ]	= "Insert Sample";
-	mUSAStrings[ LLSTR_SET_TEXTURE ]	= "Set Texture";
-	mUSAStrings[ LLSTR_EDIT_SCRIPT ]	= "Edit Script...";
-	mUSAStrings[ LLSTR_MOUSELOOK_INSTRUCTIONS ] = "Press ESC to leave Mouselook.";
-	mUSAStrings[ LLSTR_EDIT_FACE_INSTRUCTIONS ] = "Click on face to select part.  Click and hold on a picture to look more like that.  Press ESC to leave Face Edit Mode.";
-	mUSAStrings[ LLSTR_CLOSE ]			= "Close";
-	mUSAStrings[ LLSTR_MOVE ]			= "Move";
-	mUSAStrings[ LLSTR_ROTATE ]			= "Rotate";
-	mUSAStrings[ LLSTR_RESIZE ]			= "Resize";
-	mUSAStrings[ LLSTR_PLACE_BOX ]		= "Place Box";
-	mUSAStrings[ LLSTR_PLACE_PRISM ]	= "Place Prism";
-	mUSAStrings[ LLSTR_PLACE_PYRAMID ]	= "Place Pyramid";
-	mUSAStrings[ LLSTR_PLACE_TETRAHEDRON ]	= "Place Tetrahedron";
-	mUSAStrings[ LLSTR_PLACE_CYLINDER ]	= "Place Cylinder";
-	mUSAStrings[ LLSTR_PLACE_HALF_CYLINDER ] = "Place Half-Cylinder";
-	mUSAStrings[ LLSTR_PLACE_CONE ]		= "Place Cone";
-	mUSAStrings[ LLSTR_PLACE_HALF_CONE ] = "Place Half-Cone";
-	mUSAStrings[ LLSTR_PLACE_SPHERE ]	= "Place Sphere";
-	mUSAStrings[ LLSTR_PLACE_HALF_SPHERE ] = "Place Half-Sphere";
-	mUSAStrings[ LLSTR_PLACE_BIRD ]		= "Place Bird";
-	mUSAStrings[ LLSTR_PLACE_SNAKE ]	= "Place Silly Snake";
-	mUSAStrings[ LLSTR_PLACE_ROCK ]		= "Place Rock";
-	mUSAStrings[ LLSTR_PLACE_TREE ]		= "Place Tree";
-	mUSAStrings[ LLSTR_PLACE_GRASS ]	= "Place Grass";
-	mUSAStrings[ LLSTR_MODIFY_LAND ]	= "Modify Land";
-*/
-	//////////////////////////////////////////////////////////////////////////////
-	// UK
-	// The Brits are a lot like us Americans, so initially assume we're the same and only code the exceptions.
-
-	// UK Fonts
-	for( i=0; i<LLFONT_COUNT; i++ )
-	{
-		mUKFonts[i] = mUSAFonts[i];
-	}
-/*
-	// UK Strings
-	for( i=0; i<LLSTR_COUNT; i++ )
-	{
-		mUKStrings[i] = mUSAStrings[i];
-	}
-	mUKStrings[ LLSTR_HELLO ]			= "hullo";
-	mUKStrings[ LLSTR_GOODBYE ]			= "cheerio";
-*/
-	//////////////////////////////////////////////////////////////////////////////
 	// Set default
 	setLocale( LLLOCALE_USA );
-
 }
 
 
@@ -151,9 +53,9 @@ void LLResMgr::setLocale( LLLOCALE_ID locale_id )
 	mLocale = locale_id;
 
 	//RN: for now, use normal 'C' locale for everything but specific UI input/output routines
-	switch( locale_id )
-	{
-	case LLLOCALE_USA: 
+//	switch( locale_id )
+//	{
+//	case LLLOCALE_USA: 
 //#if LL_WINDOWS
 //		// Windows doesn't use ISO country codes.
 //		llinfos << "Setting locale to " << setlocale( LC_ALL, "english-usa" ) << llendl;
@@ -161,11 +63,8 @@ void LLResMgr::setLocale( LLLOCALE_ID locale_id )
 //		// posix version should work everywhere else.
 //		llinfos << "Setting locale to " << setlocale( LC_ALL, "en_US" ) << llendl;
 //#endif
-
-//		mStrings	= mUSAStrings;
-		mFonts		= mUSAFonts;
-		break;
-	case LLLOCALE_UK:
+//		break;
+//	case LLLOCALE_UK:
 //#if LL_WINDOWS
 //		// Windows doesn't use ISO country codes.
 //		llinfos << "Setting locale to " << setlocale( LC_ALL, "english-uk" ) << llendl;
@@ -173,15 +72,12 @@ void LLResMgr::setLocale( LLLOCALE_ID locale_id )
 //		// posix version should work everywhere else.
 //		llinfos << "Setting locale to " << setlocale( LC_ALL, "en_GB" ) << llendl;
 //#endif
-
-//		mStrings	= mUKStrings;
-		mFonts		= mUKFonts;
-		break;
-	default:
-		llassert(0);
-		setLocale(LLLOCALE_USA);
-		break;
-	}
+//		break;
+//	default:
+//		llassert(0);
+//		setLocale(LLLOCALE_USA);
+//		break;
+//	}
 }
 
 char LLResMgr::getDecimalPoint() const					
@@ -418,27 +314,6 @@ void LLResMgr::getIntegerString( std::string& output, S32 input ) const
 	}
 }
 
-const std::string LLFONT_ID_NAMES[] =
-{
-	std::string("OCRA"),
-	std::string("SANSSERIF"),
-	std::string("SANSSERIF_SMALL"),
-	std::string("SANSSERIF_BIG"),
-	std::string("SMALL"),
-};
-
-const LLFontGL* LLResMgr::getRes( std::string font_id ) const
-{
-	for (S32 i=0; i<LLFONT_COUNT; ++i)
-	{
-		if (LLFONT_ID_NAMES[i] == font_id)
-		{
-			return getRes((LLFONT_ID)i);
-		}
-	}
-	return NULL;
-}
-
 #if LL_WINDOWS
 const std::string LLLocale::USER_LOCALE("English_United States.1252");// = LLStringUtil::null;
 const std::string LLLocale::SYSTEM_LOCALE("English_United States.1252");
diff --git a/indra/llui/llresmgr.h b/indra/llui/llresmgr.h
index d54505c503..c8fa340990 100644
--- a/indra/llui/llresmgr.h
+++ b/indra/llui/llresmgr.h
@@ -37,7 +37,7 @@
 #include "locale.h"
 #include "stdtypes.h"
 #include "llstring.h"
-#include "llmemory.h"
+#include "llsingleton.h"
 
 enum LLLOCALE_ID
 {
@@ -46,18 +46,6 @@ enum LLLOCALE_ID
 	LLLOCALE_COUNT	// Number of values in this enum.  Keep at end.
 };
 
-enum LLFONT_ID
-{
-	LLFONT_OCRA,
-	LLFONT_SANSSERIF,
-	LLFONT_SANSSERIF_SMALL,
-	LLFONT_SANSSERIF_BIG,
-	LLFONT_SMALL,
-	LLFONT_COUNT	// Number of values in this enum.  Keep at end.
-};
-
-class LLFontGL;
-
 class LLResMgr : public LLSingleton<LLResMgr>
 {
 public:
@@ -74,20 +62,9 @@ public:
 	std::string			getMonetaryString( S32 input ) const;
 	void				getIntegerString( std::string& output, S32 input ) const;
 
-//	const char*			getRes( LLSTR_ID string_id ) const		{ return mStrings[ string_id ]; }
-	const LLFontGL*		getRes( LLFONT_ID font_id ) const		{ return mFonts[ font_id ]; }
-	const LLFontGL*		getRes( std::string font_id ) const;
 
 private:
 	LLLOCALE_ID			mLocale;
-//	const char**		mStrings;
-	const LLFontGL**	mFonts;
-
-//	const char*			mUSAStrings[LLSTR_COUNT];
-	const LLFontGL*		mUSAFonts[LLFONT_COUNT];
-
-//	const char*			mUKStrings[LLSTR_COUNT];
-	const LLFontGL*		mUKFonts[LLFONT_COUNT];
 };
 
 class LLLocale
diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp
index 65086d833d..1a2603420b 100644
--- a/indra/llui/llscrollbar.cpp
+++ b/indra/llui/llscrollbar.cpp
@@ -46,101 +46,84 @@
 #include "llwindow.h"
 #include "llcontrol.h"
 #include "llrender.h"
+#include "lluictrlfactory.h"
+
+static LLRegisterWidget<LLScrollbar> register_scrollbar("scroll_bar");
+
+LLScrollbar::Params::Params()
+:	orientation ("orientation", HORIZONTAL),
+	doc_size ("doc_size", 0),
+	doc_pos ("doc_pos", 0),
+	page_size ("page_size", 0),
+	step_size ("step_size", 1),
+	thumb_image("thumb_image"),
+	track_image("track_image"),
+	track_color("track_color"),
+	thumb_color("thumb_color"),
+	thickness("thickness"),
+	up_button("up_button"),
+	down_button("down_button")
+{
+	tab_stop = false;
+}
 
-LLScrollbar::LLScrollbar(
-		const std::string& name, LLRect rect,
-		LLScrollbar::ORIENTATION orientation,
-		S32 doc_size, S32 doc_pos, S32 page_size,
-		void (*change_callback)( S32 new_pos, LLScrollbar* self, void* userdata ),
-		void* callback_user_data,
-		S32 step_size)
-:		LLUICtrl( name, rect, TRUE, NULL, NULL ),
-
-		mChangeCallback( change_callback ),
-		mCallbackUserData( callback_user_data ),
-		mOrientation( orientation ),
-		mDocSize( doc_size ),
-		mDocPos( doc_pos ),
-		mPageSize( page_size ),
-		mStepSize( step_size ),
+LLScrollbar::LLScrollbar(const Params & p)
+:		LLUICtrl(p),
+		mChangeCallback( p.change_callback() ),
+		mOrientation( p.orientation ),
+		mDocSize( p.doc_size ),
+		mDocPos( p.doc_pos ),
+		mPageSize( p.page_size ),
+		mStepSize( p.step_size ),
 		mDocChanged(FALSE),
 		mDragStartX( 0 ),
 		mDragStartY( 0 ),
 		mHoverGlowStrength(0.15f),
 		mCurGlowStrength(0.f),
-		mTrackColor( LLUI::sColorsGroup->getColor("ScrollbarTrackColor") ),
-		mThumbColor ( LLUI::sColorsGroup->getColor("ScrollbarThumbColor") ),
-		mHighlightColor ( LLUI::sColorsGroup->getColor("DefaultHighlightLight") ),
-		mShadowColor ( LLUI::sColorsGroup->getColor("DefaultShadowLight") ),
+		mTrackColor( p.track_color() ),
+		mThumbColor ( p.thumb_color() ),
 		mOnScrollEndCallback( NULL ),
-		mOnScrollEndData( NULL )
+		mOnScrollEndData( NULL ),
+		mThumbImage(p.thumb_image),
+		mTrackImage(p.track_image),
+		mThickness(p.thickness.isProvided() ? p.thickness : LLUI::sSettingGroups["config"]->getS32("UIScrollbarSize"))
 {
-	//llassert( 0 <= mDocSize );
-	//llassert( 0 <= mDocPos && mDocPos <= mDocSize );
-	
-	setTabStop(FALSE);
 	updateThumbRect();
 	
 	// Page up and page down buttons
 	LLRect line_up_rect;
-	std::string line_up_img;
-	std::string line_up_selected_img;
-	std::string line_down_img;
-	std::string line_down_selected_img;
-
 	LLRect line_down_rect;
 
-	if( LLScrollbar::VERTICAL == mOrientation )
+	if( VERTICAL == mOrientation )
 	{
-		line_up_rect.setLeftTopAndSize( 0, getRect().getHeight(), SCROLLBAR_SIZE, SCROLLBAR_SIZE );
-		line_up_img="UIImgBtnScrollUpOutUUID";
-		line_up_selected_img="UIImgBtnScrollUpInUUID";
-
-		line_down_rect.setOriginAndSize( 0, 0, SCROLLBAR_SIZE, SCROLLBAR_SIZE );
-		line_down_img="UIImgBtnScrollDownOutUUID";
-		line_down_selected_img="UIImgBtnScrollDownInUUID";
+		line_up_rect.setLeftTopAndSize( 0, getRect().getHeight(), mThickness, mThickness );
+		line_down_rect.setOriginAndSize( 0, 0, mThickness, mThickness );
 	}
-	else
+	else // HORIZONTAL
 	{
-		// Horizontal
-		line_up_rect.setOriginAndSize( 0, 0, SCROLLBAR_SIZE, SCROLLBAR_SIZE );
-		line_up_img="UIImgBtnScrollLeftOutUUID";
-		line_up_selected_img="UIImgBtnScrollLeftInUUID";
-
-		line_down_rect.setOriginAndSize( getRect().getWidth() - SCROLLBAR_SIZE, 0, SCROLLBAR_SIZE, SCROLLBAR_SIZE );
-		line_down_img="UIImgBtnScrollRightOutUUID";
-		line_down_selected_img="UIImgBtnScrollRightInUUID";
+		line_up_rect.setOriginAndSize( 0, 0, mThickness, mThickness );
+		line_down_rect.setOriginAndSize( getRect().getWidth() - mThickness, 0, mThickness, mThickness );
 	}
 
-	LLButton* line_up_btn = new LLButton(std::string("Line Up"), line_up_rect,
-										 line_up_img, line_up_selected_img, LLStringUtil::null,
-										 &LLScrollbar::onLineUpBtnPressed, this, LLFontGL::getFontSansSerif() );
-	if( LLScrollbar::VERTICAL == mOrientation )
-	{
-		line_up_btn->setFollowsRight();
-		line_up_btn->setFollowsTop();
-	}
-	else
-	{
-		// horizontal
-		line_up_btn->setFollowsLeft();
-		line_up_btn->setFollowsBottom();
-	}
-	line_up_btn->setHeldDownCallback( &LLScrollbar::onLineUpBtnPressed );
-	line_up_btn->setTabStop(FALSE);
-	line_up_btn->setScaleImage(TRUE);
-
-	addChild(line_up_btn);
-
-	LLButton* line_down_btn = new LLButton(std::string("Line Down"), line_down_rect,
-										   line_down_img, line_down_selected_img, LLStringUtil::null,
-										   &LLScrollbar::onLineDownBtnPressed, this, LLFontGL::getFontSansSerif() );
-	line_down_btn->setFollowsRight();
-	line_down_btn->setFollowsBottom();
-	line_down_btn->setHeldDownCallback( &LLScrollbar::onLineDownBtnPressed );
-	line_down_btn->setTabStop(FALSE);
-	line_down_btn->setScaleImage(TRUE);
-	addChild(line_down_btn);
+	LLButton::Params up_btn(mOrientation == VERTICAL ? p.up_button : p.left_button);
+	up_btn.name(std::string("Line Up"));
+	up_btn.rect(line_up_rect);
+	up_btn.click_callback.function(boost::bind(&LLScrollbar::onLineUpBtnPressed, this, _2));
+	up_btn.mouse_held_callback.function(boost::bind(&LLScrollbar::onLineUpBtnPressed, this, _2));
+	up_btn.tab_stop(false);
+	up_btn.follows.flags = (mOrientation == VERTICAL ? (FOLLOWS_RIGHT | FOLLOWS_TOP) : (FOLLOWS_LEFT | FOLLOWS_BOTTOM));
+
+	addChild(LLUICtrlFactory::create<LLButton>(up_btn));
+
+	LLButton::Params down_btn(mOrientation == VERTICAL ? p.down_button : p.right_button);
+	down_btn.name(std::string("Line Down"));
+	down_btn.rect(line_down_rect);
+	down_btn.follows.flags(FOLLOWS_RIGHT|FOLLOWS_BOTTOM);
+	down_btn.click_callback.function(boost::bind(&LLScrollbar::onLineDownBtnPressed, this, _2));
+	down_btn.mouse_held_callback.function(boost::bind(&LLScrollbar::onLineDownBtnPressed, this, _2));
+	down_btn.tab_stop(false);
+
+	addChild(LLUICtrlFactory::create<LLButton>(down_btn));
 }
 
 
@@ -168,7 +151,7 @@ void LLScrollbar::setDocPos(S32 pos, BOOL update_thumb)
 
 		if( mChangeCallback )
 		{
-			mChangeCallback( mDocPos, this, mCallbackUserData );
+			mChangeCallback( mDocPos, this );
 		}
 
 		if( update_thumb )
@@ -221,7 +204,7 @@ void LLScrollbar::updateThumbRect()
 	const S32 THUMB_MIN_LENGTH = 16;
 
 	S32 window_length = (mOrientation == LLScrollbar::HORIZONTAL) ? getRect().getWidth() : getRect().getHeight();
-	S32 thumb_bg_length = llmax(0, window_length - 2 * SCROLLBAR_SIZE);
+	S32 thumb_bg_length = llmax(0, window_length - 2 * mThickness);
 	S32 visible_lines = llmin( mDocSize, mPageSize );
 	S32 thumb_length = mDocSize ? llmin(llmax( visible_lines * thumb_bg_length / mDocSize, THUMB_MIN_LENGTH), thumb_bg_length) : thumb_bg_length;
 
@@ -229,24 +212,24 @@ void LLScrollbar::updateThumbRect()
 
 	if( mOrientation == LLScrollbar::VERTICAL )
 	{ 
-		S32 thumb_start_max = thumb_bg_length + SCROLLBAR_SIZE;
-		S32 thumb_start_min = SCROLLBAR_SIZE + THUMB_MIN_LENGTH;
+		S32 thumb_start_max = thumb_bg_length + mThickness;
+		S32 thumb_start_min = mThickness + THUMB_MIN_LENGTH;
 		S32 thumb_start = variable_lines ? llmin( llmax(thumb_start_max - (mDocPos * (thumb_bg_length - thumb_length)) / variable_lines, thumb_start_min), thumb_start_max ) : thumb_start_max;
 
 		mThumbRect.mLeft =  0;
 		mThumbRect.mTop = thumb_start;
-		mThumbRect.mRight = SCROLLBAR_SIZE;
+		mThumbRect.mRight = mThickness;
 		mThumbRect.mBottom = thumb_start - thumb_length;
 	}
 	else
 	{
 		// Horizontal
-		S32 thumb_start_max = thumb_bg_length + SCROLLBAR_SIZE - thumb_length;
-		S32 thumb_start_min = SCROLLBAR_SIZE;
+		S32 thumb_start_max = thumb_bg_length + mThickness - thumb_length;
+		S32 thumb_start_min = mThickness;
 		S32 thumb_start = variable_lines ? llmin(llmax( thumb_start_min + (mDocPos * (thumb_bg_length - thumb_length)) / variable_lines, thumb_start_min), thumb_start_max ) : thumb_start_min;
 	
 		mThumbRect.mLeft = thumb_start;
-		mThumbRect.mTop = SCROLLBAR_SIZE;
+		mThumbRect.mTop = mThickness;
 		mThumbRect.mRight = thumb_start + thumb_length;
 		mThumbRect.mBottom = 0;
 	}
@@ -318,21 +301,21 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
 //			S32 old_pos = mThumbRect.mTop;
 
 			S32 delta_pixels = y - mDragStartY;
-			if( mOrigRect.mBottom + delta_pixels < SCROLLBAR_SIZE )
+			if( mOrigRect.mBottom + delta_pixels < mThickness )
 			{
-				delta_pixels = SCROLLBAR_SIZE - mOrigRect.mBottom - 1;
+				delta_pixels = mThickness - mOrigRect.mBottom - 1;
 			}
 			else
-			if( mOrigRect.mTop + delta_pixels > height - SCROLLBAR_SIZE )
+			if( mOrigRect.mTop + delta_pixels > height - mThickness )
 			{
-				delta_pixels = height - SCROLLBAR_SIZE - mOrigRect.mTop + 1;
+				delta_pixels = height - mThickness - mOrigRect.mTop + 1;
 			}
 
 			mThumbRect.mTop = mOrigRect.mTop + delta_pixels;
 			mThumbRect.mBottom = mOrigRect.mBottom + delta_pixels;
 
 			S32 thumb_length = mThumbRect.getHeight();
-			S32 thumb_track_length = height - 2 * SCROLLBAR_SIZE;
+			S32 thumb_track_length = height - 2 * mThickness;
 
 
 			if( delta_pixels != mLastDelta || mDocChanged)
@@ -343,7 +326,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
 				{
 					S32 variable_lines = getDocPosMax();
 					S32 pos = mThumbRect.mTop;
-					F32 ratio = F32(pos - SCROLLBAR_SIZE - thumb_length) / usable_track_length;	
+					F32 ratio = F32(pos - mThickness - thumb_length) / usable_track_length;	
 	
 					S32 new_pos = llclamp( S32(variable_lines - ratio * variable_lines + 0.5f), 0, variable_lines );
 					// Note: we do not call updateThumbRect() here.  Instead we let the thumb and the document go slightly
@@ -362,21 +345,21 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
 
 			S32 delta_pixels = x - mDragStartX;
 
-			if( mOrigRect.mLeft + delta_pixels < SCROLLBAR_SIZE )
+			if( mOrigRect.mLeft + delta_pixels < mThickness )
 			{
-				delta_pixels = SCROLLBAR_SIZE - mOrigRect.mLeft - 1;
+				delta_pixels = mThickness - mOrigRect.mLeft - 1;
 			}
 			else
-			if( mOrigRect.mRight + delta_pixels > width - SCROLLBAR_SIZE )
+			if( mOrigRect.mRight + delta_pixels > width - mThickness )
 			{
-				delta_pixels = width - SCROLLBAR_SIZE - mOrigRect.mRight + 1;
+				delta_pixels = width - mThickness - mOrigRect.mRight + 1;
 			}
 
 			mThumbRect.mLeft = mOrigRect.mLeft + delta_pixels;
 			mThumbRect.mRight = mOrigRect.mRight + delta_pixels;
 			
 			S32 thumb_length = mThumbRect.getWidth();
-			S32 thumb_track_length = width - 2 * SCROLLBAR_SIZE;
+			S32 thumb_track_length = width - 2 * mThickness;
 
 			if( delta_pixels != mLastDelta || mDocChanged)
 			{	
@@ -386,7 +369,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
 				{
 					S32 variable_lines = getDocPosMax();
 					S32 pos = mThumbRect.mLeft;
-					F32 ratio = F32(pos - SCROLLBAR_SIZE) / usable_track_length;	
+					F32 ratio = F32(pos - mThickness) / usable_track_length;	
 	
 					S32 new_pos = llclamp( S32(ratio * variable_lines + 0.5f), 0, variable_lines);
 	
@@ -475,14 +458,14 @@ void LLScrollbar::reshape(S32 width, S32 height, BOOL called_from_parent)
 
 	if (mOrientation == VERTICAL)
 	{
-		up_button->reshape(up_button->getRect().getWidth(), llmin(getRect().getHeight() / 2, SCROLLBAR_SIZE));
-		down_button->reshape(down_button->getRect().getWidth(), llmin(getRect().getHeight() / 2, SCROLLBAR_SIZE));
+		up_button->reshape(up_button->getRect().getWidth(), llmin(getRect().getHeight() / 2, mThickness));
+		down_button->reshape(down_button->getRect().getWidth(), llmin(getRect().getHeight() / 2, mThickness));
 		up_button->setOrigin(up_button->getRect().mLeft, getRect().getHeight() - up_button->getRect().getHeight());
 	}
 	else
 	{
-		up_button->reshape(llmin(getRect().getWidth() / 2, SCROLLBAR_SIZE), up_button->getRect().getHeight());
-		down_button->reshape(llmin(getRect().getWidth() / 2, SCROLLBAR_SIZE), down_button->getRect().getHeight());
+		up_button->reshape(llmin(getRect().getWidth() / 2, mThickness), up_button->getRect().getHeight());
+		down_button->reshape(llmin(getRect().getWidth() / 2, mThickness), down_button->getRect().getHeight());
 		down_button->setOrigin(getRect().getWidth() - down_button->getRect().getWidth(), down_button->getRect().mBottom);
 	}
 	updateThumbRect();
@@ -507,28 +490,25 @@ void LLScrollbar::draw()
 		mCurGlowStrength = lerp(mCurGlowStrength, 0.f, LLCriticalDamp::getInterpolant(0.05f));
 	}
 
-
 	// Draw background and thumb.
-	LLUIImage* rounded_rect_imagep = LLUI::sImageProvider->getUIImage("rounded_square.tga");
-
-	if (!rounded_rect_imagep)
+	if (mTrackImage.isNull() || mThumbImage.isNull())
 	{
-		gl_rect_2d(mOrientation == HORIZONTAL ? SCROLLBAR_SIZE : 0, 
-		mOrientation == VERTICAL ? getRect().getHeight() - 2 * SCROLLBAR_SIZE : getRect().getHeight(),
-		mOrientation == HORIZONTAL ? getRect().getWidth() - 2 * SCROLLBAR_SIZE : getRect().getWidth(), 
-		mOrientation == VERTICAL ? SCROLLBAR_SIZE : 0, mTrackColor, TRUE);
+		gl_rect_2d(mOrientation == HORIZONTAL ? mThickness : 0, 
+		mOrientation == VERTICAL ? getRect().getHeight() - 2 * mThickness : getRect().getHeight(),
+		mOrientation == HORIZONTAL ? getRect().getWidth() - 2 * mThickness : getRect().getWidth(), 
+		mOrientation == VERTICAL ? mThickness : 0, mTrackColor.get(), TRUE);
 
-		gl_rect_2d(mThumbRect, mThumbColor, TRUE);
+		gl_rect_2d(mThumbRect, mThumbColor.get(), TRUE);
 
 	}
 	else
 	{
 		// Background
-		rounded_rect_imagep->drawSolid(mOrientation == HORIZONTAL ? SCROLLBAR_SIZE : 0, 
-			mOrientation == VERTICAL ? SCROLLBAR_SIZE : 0,
-			mOrientation == HORIZONTAL ? getRect().getWidth() - 2 * SCROLLBAR_SIZE : getRect().getWidth(), 
-			mOrientation == VERTICAL ? getRect().getHeight() - 2 * SCROLLBAR_SIZE : getRect().getHeight(),
-			mTrackColor);
+		mTrackImage->drawSolid(mOrientation == HORIZONTAL ? mThickness : 0, 
+			mOrientation == VERTICAL ? mThickness : 0,
+			mOrientation == HORIZONTAL ? getRect().getWidth() - 2 * mThickness : getRect().getWidth(), 
+			mOrientation == VERTICAL ? getRect().getHeight() - 2 * mThickness : getRect().getHeight(),
+			mTrackColor.get());
 
 		// Thumb
 		LLRect outline_rect = mThumbRect;
@@ -536,14 +516,14 @@ void LLScrollbar::draw()
 
 		if (gFocusMgr.getKeyboardFocus() == this)
 		{
-			rounded_rect_imagep->draw(outline_rect, gFocusMgr.getFocusColor());
+			mTrackImage->draw(outline_rect, gFocusMgr.getFocusColor());
 		}
 
-		rounded_rect_imagep->draw(mThumbRect, mThumbColor);
+		mThumbImage->draw(mThumbRect, mThumbColor.get());
 		if (mCurGlowStrength > 0.01f)
 		{
 			gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
-			rounded_rect_imagep->drawSolid(mThumbRect, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength));
+			mThumbImage->drawSolid(mThumbRect, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength));
 			gGL.setSceneBlendType(LLRender::BT_ALPHA);
 		}
 
@@ -625,19 +605,24 @@ void LLScrollbar::pageDown(S32 overlap)
 	}
 }
 
-// static
-void LLScrollbar::onLineUpBtnPressed( void* userdata )
+void LLScrollbar::onLineUpBtnPressed( const LLSD& data )
 {
-	LLScrollbar* self = (LLScrollbar*) userdata;
-
-	self->changeLine( - self->mStepSize, TRUE );
+	changeLine( -mStepSize, TRUE );
 }
 
-// static
-void LLScrollbar::onLineDownBtnPressed( void* userdata )
+void LLScrollbar::onLineDownBtnPressed( const LLSD& data )
 {
-	LLScrollbar* self = (LLScrollbar*) userdata;
-	self->changeLine( self->mStepSize, TRUE );
+	changeLine( mStepSize, TRUE );
 }
 
 
+namespace LLInitParam
+{
+    template<>
+	bool ParamCompare<boost::function<void (S32, LLScrollbar*)> >::equals(
+		const boost::function<void (S32, LLScrollbar*)> &a,
+		const boost::function<void (S32, LLScrollbar*)> &b) 
+	{
+		return false;
+	}
+}
diff --git a/indra/llui/llscrollbar.h b/indra/llui/llscrollbar.h
index 0bbf8662aa..43604d37b7 100644
--- a/indra/llui/llscrollbar.h
+++ b/indra/llui/llscrollbar.h
@@ -36,12 +36,7 @@
 #include "stdtypes.h"
 #include "lluictrl.h"
 #include "v4color.h"
-
-//
-// Constants
-//
-const S32 SCROLLBAR_SIZE = 16;
-
+#include "llbutton.h"
 
 //
 // Classes
@@ -50,15 +45,41 @@ class LLScrollbar
 : public LLUICtrl
 {
 public:
+
 	enum ORIENTATION { HORIZONTAL, VERTICAL };
+	
+	typedef boost::function<void (S32, LLScrollbar*)> callback_t;
+	struct Params 
+	:	public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Mandatory<ORIENTATION>			orientation;
+		Mandatory<S32>					doc_size;
+		Mandatory<S32>					doc_pos;
+		Mandatory<S32>					page_size;
+
+		Optional<callback_t> 			change_callback;
+		Optional<S32>					step_size;
+		Optional<S32>					thickness;
+
+		Optional<LLUIImage*>			thumb_image,
+										track_image;
 
-	LLScrollbar(const std::string& name, LLRect rect,
-		ORIENTATION orientation,
-		S32 doc_size, S32 doc_pos, S32 page_size,
-		void(*change_callback)( S32 new_pos, LLScrollbar* self, void* userdata ),
-		void* callback_user_data = NULL,
-		S32 step_size = 1);
+		Optional<LLUIColor>				track_color,
+										thumb_color;
 
+		Optional<LLButton::Params>		up_button;
+		Optional<LLButton::Params>		down_button;
+		Optional<LLButton::Params>		left_button;
+		Optional<LLButton::Params>		right_button;
+
+		Params();
+	};
+
+protected:
+	LLScrollbar (const Params & p);
+	friend class LLUICtrlFactory;
+
+public:
 	virtual ~LLScrollbar();
 
 	virtual void setValue(const LLSD& value);
@@ -101,13 +122,11 @@ public:
 	void				pageUp(S32 overlap);
 	void				pageDown(S32 overlap);
 
-	static void			onLineUpBtnPressed(void* userdata);
-	static void			onLineDownBtnPressed(void* userdata);
+	void				onLineUpBtnPressed(const LLSD& data);
+	void				onLineDownBtnPressed(const LLSD& data);
 
 	void setTrackColor( const LLColor4& color ) { mTrackColor = color; }
 	void setThumbColor( const LLColor4& color ) { mThumbColor = color; }
-	void setHighlightColor( const LLColor4& color ) { mHighlightColor = color; }
-	void setShadowColor( const LLColor4& color ) { mShadowColor = color; }
 
 	void setOnScrollEndCallback(void (*callback)(void*), void* userdata) { mOnScrollEndCallback = callback; mOnScrollEndData = userdata;}
 
@@ -115,8 +134,7 @@ private:
 	void				updateThumbRect();
 	void				changeLine(S32 delta, BOOL update_thumb );
 
-	void				(*mChangeCallback)( S32 new_pos, LLScrollbar* self, void* userdata );
-	void*				mCallbackUserData;
+	callback_t			mChangeCallback;
 
 	const ORIENTATION	mOrientation;	
 	S32					mDocSize;		// Size of the document that the scrollbar is modeling.  Units depend on the user.  0 <= mDocSize.
@@ -134,16 +152,24 @@ private:
 	LLRect				mOrigRect;
 	S32					mLastDelta;
 
-	LLColor4			mTrackColor;
-	LLColor4			mThumbColor;
-	LLColor4			mFocusColor;
-	LLColor4			mHighlightColor;
-	LLColor4			mShadowColor;
+	LLUIColor			mTrackColor;
+	LLUIColor			mThumbColor;
+
+	LLUIImagePtr		mThumbImage;
+	LLUIImagePtr		mTrackImage;
+
+	S32					mThickness;
 
 	void			(*mOnScrollEndCallback)(void*);
 	void			*mOnScrollEndData;
 };
 
 
+namespace LLInitParam
+{
+    template<>
+	bool ParamCompare<boost::function<void (S32, LLScrollbar*)> >::equals(
+		const boost::function<void (S32, LLScrollbar*)> &a, const boost::function<void (S32, LLScrollbar*)> &b); 
+}
 
 #endif  // LL_SCROLLBAR_H
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index cf03259879..dfe3ef29fc 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -1,6 +1,6 @@
 /** 
  * @file llscrollcontainer.cpp
- * @brief LLScrollableContainerView base class
+ * @brief LLScrollContainer base class
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
  * 
@@ -33,8 +33,12 @@
 
 #include "linden_common.h"
 
-#include "llrender.h"
 #include "llscrollcontainer.h"
+
+#include "llrender.h"
+#include "llcontainerview.h"
+// #include "llfolderview.h"
+#include "llscrollingpanellist.h"
 #include "llscrollbar.h"
 #include "llui.h"
 #include "llkeyboard.h"
@@ -42,6 +46,7 @@
 #include "llfocusmgr.h"
 #include "llframetimer.h"
 #include "lluictrlfactory.h"
+#include "llpanel.h"
 #include "llfontgl.h"
 
 ///----------------------------------------------------------------------------
@@ -55,98 +60,79 @@ static const F32 MAX_AUTO_SCROLL_RATE = 500.f;
 static const F32 AUTO_SCROLL_RATE_ACCEL = 120.f;
 
 ///----------------------------------------------------------------------------
-/// Class LLScrollableContainerView
+/// Class LLScrollContainer
 ///----------------------------------------------------------------------------
 
-static LLRegisterWidget<LLScrollableContainerView> r("scroll_container");
+static LLRegisterWidget<LLScrollContainer> r("scroll_container");
 
-// Default constructor
-LLScrollableContainerView::LLScrollableContainerView( const std::string& name,
-													  const LLRect& rect,
-													  LLView* scrolled_view,
-													  BOOL is_opaque,
-													  const LLColor4& bg_color ) :
-	LLUICtrl( name, rect, FALSE, NULL, NULL ),
-	mScrolledView( scrolled_view ),
-	mIsOpaque( is_opaque ),
-	mBackgroundColor( bg_color ),
-	mReserveScrollCorner( FALSE ),
-	mAutoScrolling( FALSE ),
-	mAutoScrollRate( 0.f )
+LLScrollContainer::Params::Params()
+:	is_opaque("opaque"),
+	bg_color("color"),
+	reserve_scroll_corner("reserve_scroll_corner", false)
 {
-	if( mScrolledView )
-	{
-		addChild( mScrolledView );
-	}
-
-	init();
+	name = "scroll_container";
+	mouse_opaque(true);
+	tab_stop(false);
 }
 
-// LLUICtrl constructor
-LLScrollableContainerView::LLScrollableContainerView( const std::string& name, const LLRect& rect,
-							   LLUICtrl* scrolled_ctrl, BOOL is_opaque,
-							   const LLColor4& bg_color) :
-	LLUICtrl( name, rect, FALSE, NULL, NULL ),
-	mScrolledView( scrolled_ctrl ),
-	mIsOpaque( is_opaque ),
-	mBackgroundColor( bg_color ),
-	mReserveScrollCorner( FALSE ),
-	mAutoScrolling( FALSE ),
-	mAutoScrollRate( 0.f )
-{
-	if( scrolled_ctrl )
-	{
-		addChild( scrolled_ctrl );
-	}
 
-	init();
-}
-
-void LLScrollableContainerView::init()
+// Default constructor
+LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p)
+:	LLUICtrl(p),
+	mAutoScrolling( FALSE ),
+	mAutoScrollRate( 0.f ),
+	mBackgroundColor(p.bg_color()),
+	mIsOpaque(p.is_opaque),
+	mReserveScrollCorner(p.reserve_scroll_corner),
+	mScrolledView(NULL)
 {
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
 	LLRect border_rect( 0, getRect().getHeight(), getRect().getWidth(), 0 );
-	mBorder = new LLViewBorder( std::string("scroll border"), border_rect, LLViewBorder::BEVEL_IN );
-	addChild( mBorder );
+	LLViewBorder::Params params;
+	params.name("scroll border");
+	params.rect(border_rect);
+	params.bevel_type(LLViewBorder::BEVEL_IN);
+	mBorder = LLUICtrlFactory::create<LLViewBorder> (params);
+	LLView::addChild( mBorder );
 
 	mInnerRect.set( 0, getRect().getHeight(), getRect().getWidth(), 0 );
 	mInnerRect.stretch( -mBorder->getBorderWidth()  );
 
 	LLRect vertical_scroll_rect = mInnerRect;
-	vertical_scroll_rect.mLeft = vertical_scroll_rect.mRight - SCROLLBAR_SIZE;
-	mScrollbar[VERTICAL] = new LLScrollbar( std::string("scrollable vertical"),
-											vertical_scroll_rect,
-											LLScrollbar::VERTICAL,
-											mInnerRect.getHeight(), 
-											0,
-											mInnerRect.getHeight(),
-											NULL, this,
-											VERTICAL_MULTIPLE);
-	addChild( mScrollbar[VERTICAL] );
+	vertical_scroll_rect.mLeft = vertical_scroll_rect.mRight - scrollbar_size;
+	LLScrollbar::Params sbparams;
+	sbparams.name("scrollable vertical");
+	sbparams.rect(vertical_scroll_rect);
+	sbparams.orientation(LLScrollbar::VERTICAL);
+	sbparams.doc_size(mInnerRect.getHeight());
+	sbparams.doc_pos(0);
+	sbparams.page_size(mInnerRect.getHeight());
+	sbparams.step_size(VERTICAL_MULTIPLE);
+	mScrollbar[VERTICAL] = LLUICtrlFactory::create<LLScrollbar> (sbparams);
+	LLView::addChild( mScrollbar[VERTICAL] );
 	mScrollbar[VERTICAL]->setVisible( FALSE );
 	mScrollbar[VERTICAL]->setFollowsRight();
 	mScrollbar[VERTICAL]->setFollowsTop();
 	mScrollbar[VERTICAL]->setFollowsBottom();
 	
 	LLRect horizontal_scroll_rect = mInnerRect;
-	horizontal_scroll_rect.mTop = horizontal_scroll_rect.mBottom + SCROLLBAR_SIZE;
-	mScrollbar[HORIZONTAL] = new LLScrollbar( std::string("scrollable horizontal"),
-											  horizontal_scroll_rect,
-											  LLScrollbar::HORIZONTAL,
-											  mInnerRect.getWidth(),
-											  0,
-											  mInnerRect.getWidth(),
-											  NULL, this,
-											  HORIZONTAL_MULTIPLE);
-	addChild( mScrollbar[HORIZONTAL] );
+	horizontal_scroll_rect.mTop = horizontal_scroll_rect.mBottom + scrollbar_size;
+	sbparams.name("scrollable horizontal");
+	sbparams.rect(horizontal_scroll_rect);
+	sbparams.orientation(LLScrollbar::HORIZONTAL);
+	sbparams.doc_size(mInnerRect.getWidth());
+	sbparams.doc_pos(0);
+	sbparams.page_size(mInnerRect.getWidth());
+	sbparams.step_size(VERTICAL_MULTIPLE);
+	mScrollbar[HORIZONTAL] = LLUICtrlFactory::create<LLScrollbar> (sbparams);
+	LLView::addChild( mScrollbar[HORIZONTAL] );
 	mScrollbar[HORIZONTAL]->setVisible( FALSE );
 	mScrollbar[HORIZONTAL]->setFollowsLeft();
 	mScrollbar[HORIZONTAL]->setFollowsRight();
-
-	setTabStop(FALSE);
 }
 
 // Destroys the object
-LLScrollableContainerView::~LLScrollableContainerView( void )
+LLScrollContainer::~LLScrollContainer( void )
 {
 	// mScrolledView and mScrollbar are child views, so the LLView
 	// destructor takes care of memory deallocation.
@@ -159,9 +145,9 @@ LLScrollableContainerView::~LLScrollableContainerView( void )
 
 // internal scrollbar handlers
 // virtual
-void LLScrollableContainerView::scrollHorizontal( S32 new_pos )
+void LLScrollContainer::scrollHorizontal( S32 new_pos )
 {
-	//llinfos << "LLScrollableContainerView::scrollHorizontal()" << llendl;
+	//llinfos << "LLScrollContainer::scrollHorizontal()" << llendl;
 	if( mScrolledView )
 	{
 		LLRect doc_rect = mScrolledView->getRect();
@@ -171,9 +157,9 @@ void LLScrollableContainerView::scrollHorizontal( S32 new_pos )
 }
 
 // virtual
-void LLScrollableContainerView::scrollVertical( S32 new_pos )
+void LLScrollContainer::scrollVertical( S32 new_pos )
 {
-	// llinfos << "LLScrollableContainerView::scrollVertical() " << new_pos << llendl;
+	// llinfos << "LLScrollContainer::scrollVertical() " << new_pos << llendl;
 	if( mScrolledView )
 	{
 		LLRect doc_rect = mScrolledView->getRect();
@@ -183,7 +169,7 @@ void LLScrollableContainerView::scrollVertical( S32 new_pos )
 }
 
 // LLView functionality
-void LLScrollableContainerView::reshape(S32 width, S32 height,
+void LLScrollContainer::reshape(S32 width, S32 height,
 										BOOL called_from_parent)
 {
 	LLUICtrl::reshape( width, height, called_from_parent );
@@ -209,7 +195,7 @@ void LLScrollableContainerView::reshape(S32 width, S32 height,
 	}
 }
 
-BOOL LLScrollableContainerView::handleKeyHere(KEY key, MASK mask)
+BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask)
 {
 	for( S32 i = 0; i < SCROLLBAR_COUNT; i++ )
 	{
@@ -222,7 +208,7 @@ BOOL LLScrollableContainerView::handleKeyHere(KEY key, MASK mask)
 	return FALSE;
 }
 
-BOOL LLScrollableContainerView::handleScrollWheel( S32 x, S32 y, S32 clicks )
+BOOL LLScrollContainer::handleScrollWheel( S32 x, S32 y, S32 clicks )
 {
 	for( S32 i = 0; i < SCROLLBAR_COUNT; i++ )
 	{
@@ -239,7 +225,7 @@ BOOL LLScrollableContainerView::handleScrollWheel( S32 x, S32 y, S32 clicks )
 	return TRUE;
 }
 
-BOOL LLScrollableContainerView::needsToScroll(S32 x, S32 y, LLScrollableContainerView::SCROLL_ORIENTATION axis) const
+BOOL LLScrollContainer::needsToScroll(S32 x, S32 y, LLScrollContainer::SCROLL_ORIENTATION axis) const
 {
 	if(mScrollbar[axis]->getVisible())
 	{
@@ -247,7 +233,8 @@ BOOL LLScrollableContainerView::needsToScroll(S32 x, S32 y, LLScrollableContaine
 		const S32 AUTOSCROLL_SIZE = 10;
 		if(mScrollbar[axis]->getVisible())
 		{
-			inner_rect_local.mRight -= SCROLLBAR_SIZE;
+			static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+			inner_rect_local.mRight -= scrollbar_size;
 			inner_rect_local.mTop += AUTOSCROLL_SIZE;
 			inner_rect_local.mBottom = inner_rect_local.mTop - AUTOSCROLL_SIZE;
 		}
@@ -260,13 +247,14 @@ BOOL LLScrollableContainerView::needsToScroll(S32 x, S32 y, LLScrollableContaine
 	return FALSE;
 }
 
-BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask,
+BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
 												  BOOL drop,
 												  EDragAndDropType cargo_type,
 												  void* cargo_data,
 												  EAcceptance* accept,
 												  std::string& tooltip_msg)
 {
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
 	// Scroll folder view if needed.  Never accepts a drag or drop.
 	*accept = ACCEPT_NO;
 	BOOL handled = FALSE;
@@ -278,11 +266,11 @@ BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask,
 		LLRect inner_rect_local( 0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0 );
 		if(	mScrollbar[HORIZONTAL]->getVisible() )
 		{
-			inner_rect_local.mBottom += SCROLLBAR_SIZE;
+			inner_rect_local.mBottom += scrollbar_size;
 		}
 		if(	mScrollbar[VERTICAL]->getVisible() )
 		{
-			inner_rect_local.mRight -= SCROLLBAR_SIZE;
+			inner_rect_local.mRight -= scrollbar_size;
 		}
 
 		if(	mScrollbar[HORIZONTAL]->getVisible() )
@@ -337,7 +325,7 @@ BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask,
 }
 
 
-BOOL LLScrollableContainerView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect)
+BOOL LLScrollContainer::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect)
 {
 	S32 local_x, local_y;
 	for( S32 i = 0; i < SCROLLBAR_COUNT; i++ )
@@ -364,14 +352,15 @@ BOOL LLScrollableContainerView::handleToolTip(S32 x, S32 y, std::string& msg, LL
 	return TRUE;
 }
 
-void LLScrollableContainerView::calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const
+void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const
 {
 	const LLRect& rect = mScrolledView->getRect();
 	calcVisibleSize(rect, visible_width, visible_height, show_h_scrollbar, show_v_scrollbar);
 }
 
-void LLScrollableContainerView::calcVisibleSize( const LLRect& doc_rect, S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const
+void LLScrollContainer::calcVisibleSize( const LLRect& doc_rect, S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const
 {
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
 	S32 doc_width = doc_rect.getWidth();
 	S32 doc_height = doc_rect.getHeight();
 
@@ -382,26 +371,28 @@ void LLScrollableContainerView::calcVisibleSize( const LLRect& doc_rect, S32 *vi
 	if( *visible_height < doc_height )
 	{
 		*show_v_scrollbar = TRUE;
-		*visible_width -= SCROLLBAR_SIZE;
+		*visible_width -= scrollbar_size;
 	}
 
 	*show_h_scrollbar = FALSE;
 	if( *visible_width < doc_width )
 	{
 		*show_h_scrollbar = TRUE;
-		*visible_height -= SCROLLBAR_SIZE;
+		*visible_height -= scrollbar_size;
 
 		// Must retest now that visible_height has changed
 		if( !*show_v_scrollbar && (*visible_height < doc_height) )
 		{
 			*show_v_scrollbar = TRUE;
-			*visible_width -= SCROLLBAR_SIZE;
+			*visible_width -= scrollbar_size;
 		}
 	}
 }
+	
 
-void LLScrollableContainerView::draw()
+void LLScrollContainer::draw()
 {
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
 	if (mAutoScrolling)
 	{
 		// add acceleration to autoscroll
@@ -427,7 +418,7 @@ void LLScrollableContainerView::draw()
 	if( mIsOpaque )
 	{
 		gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-		gGL.color4fv( mBackgroundColor.mV );
+		gGL.color4fv( mBackgroundColor.get().mV );
 		gl_rect_2d( mInnerRect );
 	}
 	
@@ -448,9 +439,9 @@ void LLScrollableContainerView::draw()
 			calcVisibleSize( mScrolledView->getRect(), &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar );
 
 			LLLocalClipRect clip(LLRect(mInnerRect.mLeft, 
-					mInnerRect.mBottom + (show_h_scrollbar ? SCROLLBAR_SIZE : 0) + visible_height,
+					mInnerRect.mBottom + (show_h_scrollbar ? scrollbar_size : 0) + visible_height,
 					visible_width,
-					mInnerRect.mBottom + (show_h_scrollbar ? SCROLLBAR_SIZE : 0)
+					mInnerRect.mBottom + (show_h_scrollbar ? scrollbar_size : 0)
 					));
 			drawChild(mScrolledView);
 		}
@@ -487,10 +478,44 @@ void LLScrollableContainerView::draw()
 		drawDebugRect();
 	}
 
+	//// *HACK: also draw debug rectangles around currently-being-edited LLView, and any elements that are being highlighted by GUI preview code (see LLFloaterUIPreview)
+	//std::set<LLView*>::iterator iter = std::find(sPreviewHighlightedElements.begin(), sPreviewHighlightedElements.end(), this);
+	//if ((sEditingUI && this == sEditingUIView) || (iter != sPreviewHighlightedElements.end() && sDrawPreviewHighlights))
+	//{
+	//	drawDebugRect();
+	//}
+
 } // end draw
 
-void LLScrollableContainerView::updateScroll()
+bool LLScrollContainer::addChild(LLView* view, S32 tab_group)
 {
+	if (!mScrolledView)
+	{
+		//*TODO: Move LLFolderView to llui and enable this check
+// 		if (dynamic_cast<LLPanel*>(view) || dynamic_cast<LLContainerView*>(view) || dynamic_cast<LLScrollingPanelList*>(view) || dynamic_cast<LLFolderView*>(view))
+		{
+			// Use the first panel or container as the scrollable view (bit of a hack)
+			mScrolledView = view;
+		}
+	}
+
+	bool ret_val = LLView::addChild(view, tab_group);
+
+	//bring the scrollbars to the front
+	sendChildToFront( mScrollbar[HORIZONTAL] );
+	sendChildToFront( mScrollbar[VERTICAL] );
+
+	return ret_val;
+}
+
+
+void LLScrollContainer::updateScroll()
+{
+	if (!mScrolledView)
+	{
+		return;
+	}
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
 	LLRect doc_rect = mScrolledView->getRect();
 	S32 doc_width = doc_rect.getWidth();
 	S32 doc_height = doc_rect.getHeight();
@@ -514,15 +539,15 @@ void LLScrollableContainerView::updateScroll()
 		S32 v_scrollbar_height = visible_height;
 		if( !show_h_scrollbar && mReserveScrollCorner )
 		{
-			v_scrollbar_height -= SCROLLBAR_SIZE;
+			v_scrollbar_height -= scrollbar_size;
 		}
-		mScrollbar[VERTICAL]->reshape( SCROLLBAR_SIZE, v_scrollbar_height, TRUE );
+		mScrollbar[VERTICAL]->reshape( scrollbar_size, v_scrollbar_height, TRUE );
 
 		// Make room for the horizontal scrollbar (or not)
 		S32 v_scrollbar_offset = 0;
 		if( show_h_scrollbar || mReserveScrollCorner )
 		{
-			v_scrollbar_offset = SCROLLBAR_SIZE;
+			v_scrollbar_offset = scrollbar_size;
 		}
 		LLRect r = mScrollbar[VERTICAL]->getRect();
 		r.translate( 0, mInnerRect.mBottom - r.mBottom + v_scrollbar_offset );
@@ -552,9 +577,9 @@ void LLScrollableContainerView::updateScroll()
 		S32 h_scrollbar_width = visible_width;
 		if( !show_v_scrollbar && mReserveScrollCorner )
 		{
-			h_scrollbar_width -= SCROLLBAR_SIZE;
+			h_scrollbar_width -= scrollbar_size;
 		}
-		mScrollbar[HORIZONTAL]->reshape( h_scrollbar_width, SCROLLBAR_SIZE, TRUE );
+		mScrollbar[HORIZONTAL]->reshape( h_scrollbar_width, scrollbar_size, TRUE );
 	}
 	else
 	{
@@ -571,17 +596,17 @@ void LLScrollableContainerView::updateScroll()
 	mScrollbar[VERTICAL]->setPageSize( visible_height );
 } // end updateScroll
 
-void LLScrollableContainerView::setBorderVisible(BOOL b)
+void LLScrollContainer::setBorderVisible(BOOL b)
 {
 	mBorder->setVisible( b );
 }
 
 // Scroll so that as much of rect as possible is showing (where rect is defined in the space of scroller view, not scrolled)
-void LLScrollableContainerView::scrollToShowRect(const LLRect& rect, const LLCoordGL& desired_offset)
+void LLScrollContainer::scrollToShowRect(const LLRect& rect, const LLCoordGL& desired_offset)
 {
 	if (!mScrolledView)
 	{
-		llwarns << "LLScrollableContainerView::scrollToShowRect with no view!" << llendl;
+		llwarns << "LLScrollContainer::scrollToShowRect with no view!" << llendl;
 		return;
 	}
 
@@ -646,27 +671,27 @@ void LLScrollableContainerView::scrollToShowRect(const LLRect& rect, const LLCoo
 	updateScroll();
 }
 
-void LLScrollableContainerView::pageUp(S32 overlap)
+void LLScrollContainer::pageUp(S32 overlap)
 {
 	mScrollbar[VERTICAL]->pageUp(overlap);
 }
 
-void LLScrollableContainerView::pageDown(S32 overlap)
+void LLScrollContainer::pageDown(S32 overlap)
 {
 	mScrollbar[VERTICAL]->pageDown(overlap);
 }
 
-void LLScrollableContainerView::goToTop()
+void LLScrollContainer::goToTop()
 {
 	mScrollbar[VERTICAL]->setDocPos(0);
 }
 
-void LLScrollableContainerView::goToBottom()
+void LLScrollContainer::goToBottom()
 {
 	mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocSize());
 }
 
-S32 LLScrollableContainerView::getBorderWidth() const
+S32 LLScrollContainer::getBorderWidth() const
 {
 	if (mBorder)
 	{
@@ -676,73 +701,3 @@ S32 LLScrollableContainerView::getBorderWidth() const
 	return 0;
 }
 
-// virtual
-LLXMLNodePtr LLScrollableContainerView::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLView::getXML();
-
-	// Attributes
-
-	node->createChild("opaque", TRUE)->setBoolValue(mIsOpaque);
-
-	if (mIsOpaque)
-	{
-		node->createChild("color", TRUE)->setFloatValue(4, mBackgroundColor.mV);
-	}
-
-	// Contents
-
-	LLXMLNodePtr child_node = mScrolledView->getXML();
-
-	node->addChild(child_node);
-
-	return node;
-}
-
-LLView* LLScrollableContainerView::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("scroll_container");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-	
-	BOOL opaque = FALSE;
-	node->getAttributeBOOL("opaque", opaque);
-
-	LLColor4 color(0,0,0,0);
-	LLUICtrlFactory::getAttributeColor(node,"color", color);
-
-	// Create the scroll view
-	LLScrollableContainerView *ret = new LLScrollableContainerView(name, rect, (LLPanel*)NULL, opaque, color);
-
-	LLPanel* panelp = NULL;
-
-	// Find a child panel to add
-	LLXMLNodePtr child;
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-	{
-		LLView *control = factory->createCtrlWidget(panelp, child);
-		if (control && control->isPanel())
-		{
-			if (panelp)
-			{
-				llinfos << "Warning! Attempting to put multiple panels into a scrollable container view!" << llendl;
-				delete control;
-			}
-			else
-			{
-				panelp = (LLPanel*)control;
-			}
-		}
-	}
-
-	if (panelp == NULL)
-	{
-		panelp = new LLPanel(std::string("dummy"), LLRect::null, FALSE);
-	}
-
-	ret->mScrolledView = panelp;
-
-	return ret;
-}
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index 70fc9087d7..7e207645ff 100644
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -1,6 +1,6 @@
 /** 
  * @file llscrollcontainer.h
- * @brief LLScrollableContainerView class header file.
+ * @brief LLScrollContainer class header file.
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
  * 
@@ -53,24 +53,28 @@ class LLUICtrlFactory;
  * the width and height of the view you're scrolling.
  *
  *****************************************************************************/
-class LLScrollableContainerView : public LLUICtrl
+class LLScrollContainer : public LLUICtrl
 {
 public:
 	// Note: vertical comes before horizontal because vertical
 	// scrollbars have priority for mouse and keyboard events.
 	enum SCROLL_ORIENTATION { VERTICAL, HORIZONTAL, SCROLLBAR_COUNT };
 
-	LLScrollableContainerView( const std::string& name, const LLRect& rect,
-							   LLView* scrolled_view, BOOL is_opaque = FALSE,
-							   const LLColor4& bg_color = LLColor4(0,0,0,0) );
-	LLScrollableContainerView( const std::string& name, const LLRect& rect,
-							   LLUICtrl* scrolled_ctrl, BOOL is_opaque = FALSE,
-							   const LLColor4& bg_color = LLColor4(0,0,0,0) );
-	virtual ~LLScrollableContainerView( void );
-
-	void setScrolledView(LLView* view) { mScrolledView = view; }
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<bool>		is_opaque;
+		Optional<LLUIColor>	bg_color;
+		Optional<bool>		reserve_scroll_corner;
+		
+		Params();
+	};
+protected:
+	LLScrollContainer(const Params&);
+	friend class LLUICtrlFactory;
+public:
+	virtual ~LLScrollContainer( void );
 
-	virtual void setValue(const LLSD& value) { mInnerRect.setValue(value); }
+	virtual void 	setValue(const LLSD& value) { mInnerRect.setValue(value); }
 
 	void			calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const;
 	void			calcVisibleSize( const LLRect& doc_rect, S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const;
@@ -99,13 +103,9 @@ public:
 
 	virtual BOOL	handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect);
 	virtual void	draw();
-
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
+	virtual bool	addChild(LLView* view, S32 tab_group = 0);
 
 private:
-	void init();
-
 	// internal scrollbar handlers
 	virtual void scrollHorizontal( S32 new_pos );
 	virtual void scrollVertical( S32 new_pos );
@@ -115,7 +115,7 @@ private:
 	LLView*		mScrolledView;
 	S32			mSize;
 	BOOL		mIsOpaque;
-	LLColor4	mBackgroundColor;
+	LLUIColor	mBackgroundColor;
 	LLRect		mInnerRect;
 	LLViewBorder* mBorder;
 	BOOL		mReserveScrollCorner;
diff --git a/indra/llui/llscrollingpanellist.cpp b/indra/llui/llscrollingpanellist.cpp
index 05d0c6f753..bfeb35704a 100644
--- a/indra/llui/llscrollingpanellist.cpp
+++ b/indra/llui/llscrollingpanellist.cpp
@@ -52,9 +52,9 @@ void LLScrollingPanelList::clearPanels()
 
 void LLScrollingPanelList::addPanel( LLScrollingPanel* panel )
 {
-	addChildAtEnd( panel );
+	addChildInBack( panel );
 	mPanelList.push_front( panel );
-	
+
 	const S32 GAP_BETWEEN_PANELS = 6;
 
 	// Resize this view
@@ -82,7 +82,48 @@ void LLScrollingPanelList::addPanel( LLScrollingPanel* panel )
 		cur_y -= GAP_BETWEEN_PANELS;
 	}
 }
-	
+
+void LLScrollingPanelList::removePanel( U32 panel_index )
+{
+	if ( mPanelList.empty() || panel_index >= mPanelList.size() )
+	{
+		llwarns << "Panel index " << panel_index << " is out of range!" << llendl;
+		return;
+	}
+	else
+	{
+		removeChild( mPanelList.at(panel_index) );
+		mPanelList.erase( mPanelList.begin() + panel_index );
+	}
+
+	const S32 GAP_BETWEEN_PANELS = 6;
+
+	// Resize this view
+	S32 total_height = 0;
+	S32 max_width = 0;
+	S32 cur_gap = 0;
+	for (std::deque<LLScrollingPanel*>::iterator iter = mPanelList.begin();
+		 iter != mPanelList.end(); ++iter)
+	{
+		LLScrollingPanel *childp = *iter;
+		total_height += childp->getRect().getHeight() + cur_gap;
+		max_width = llmax( max_width, childp->getRect().getWidth() );
+		cur_gap = GAP_BETWEEN_PANELS;
+	}
+	reshape( max_width, total_height, FALSE );
+
+	// Reposition each of the child views
+	S32 cur_y = total_height;
+	for (std::deque<LLScrollingPanel*>::iterator iter = mPanelList.begin();
+		 iter != mPanelList.end(); ++iter)
+	{
+		LLScrollingPanel *childp = *iter;
+		cur_y -= childp->getRect().getHeight();
+		childp->translate( -childp->getRect().mLeft, cur_y - childp->getRect().mBottom);
+		cur_y -= GAP_BETWEEN_PANELS;
+	}
+}
+
 void LLScrollingPanelList::updatePanels(BOOL allow_modify)
 {
     for (std::deque<LLScrollingPanel*>::iterator iter = mPanelList.begin();
@@ -138,18 +179,3 @@ void LLScrollingPanelList::draw()
 	LLUICtrl::draw();
 }
 
-
-// static
-LLView* LLScrollingPanelList::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-    std::string name("scrolling_panel_list");
-    node->getAttributeString("name", name);
-
-    LLRect rect;
-    createRect(node, rect, parent, LLRect());
-
-    LLScrollingPanelList* scrolling_panel_list = new LLScrollingPanelList(name, rect);
-    scrolling_panel_list->initFromXML(node, parent);
-    return scrolling_panel_list;
-}
-
diff --git a/indra/llui/llscrollingpanellist.h b/indra/llui/llscrollingpanellist.h
index b9d730978f..5dc23facda 100644
--- a/indra/llui/llscrollingpanellist.h
+++ b/indra/llui/llscrollingpanellist.h
@@ -29,6 +29,9 @@
  * $/LicenseInfo$
  */
 
+#ifndef LL_LLSCROLLINGPANELLIST_H
+#define LL_LLSCROLLINGPANELLIST_H
+
 #include <vector>
 
 #include "llui.h"
@@ -42,7 +45,7 @@
 class LLScrollingPanel : public LLPanel
 {
 public:
-	LLScrollingPanel(const std::string& name, const LLRect& rect) : LLPanel(name, rect) { }
+	LLScrollingPanel(const LLPanel::Params& params) : LLPanel(params) {}
 	virtual void updatePanel(BOOL allow_modify) = 0;
 };
 
@@ -53,23 +56,34 @@ public:
 class LLScrollingPanelList : public LLUICtrl
 {
 public:
-	LLScrollingPanelList(const std::string& name, const LLRect& rect)
-		:	LLUICtrl(name, rect, TRUE, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_BOTTOM ) {}
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Params()
+		{
+			name = "scrolling_panel_list";
+			follows.flags = FOLLOWS_LEFT | FOLLOWS_BOTTOM;
+		}
+	};
+	LLScrollingPanelList(const Params& p)
+	:	LLUICtrl(p) 
+	{}
+	
+	typedef std::deque<LLScrollingPanel*>	panel_list_t;
 
 	virtual void setValue(const LLSD& value) {};
 
-	virtual LLXMLNodePtr getXML(bool save_children) const { return LLUICtrl::getXML(); }
-	
 	virtual void		draw();
 
 	void				clearPanels();
 	void				addPanel( LLScrollingPanel* panel );
+	void				removePanel( U32 panel_index );
 	void				updatePanels(BOOL allow_modify);
+	const panel_list_t&	getPanelList() { return mPanelList; }
 
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-	
 private:
 	void				updatePanelVisiblilty();
 
-	std::deque<LLScrollingPanel*> mPanelList;
+	panel_list_t		mPanelList;
 };
+
+#endif //LL_LLSCROLLINGPANELLIST_H
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp
new file mode 100644
index 0000000000..4e6de24160
--- /dev/null
+++ b/indra/llui/llscrolllistcell.cpp
@@ -0,0 +1,413 @@
+/** 
+ * @file llscrolllistcell.cpp
+ * @brief Scroll lists are composed of rows (items), each of which 
+ * contains columns (cells).
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ * 
+ * Copyright (c) 2007-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llscrolllistcell.h"
+
+#include "llcheckboxctrl.h"
+#include "llui.h"	// LLUIImage
+#include "lluictrlfactory.h"
+
+//static 
+LLScrollListCell* LLScrollListCell::create(const LLScrollListCell::Params& cell_p)
+{
+	LLScrollListCell* cell = NULL;
+
+	if (cell_p.type() == "icon")
+	{
+		cell = new LLScrollListIcon(cell_p);
+	}
+	else if (cell_p.type() == "checkbox")
+	{
+		cell = new LLScrollListCheck(cell_p);
+	}
+	else if (cell_p.type() == "date")
+	{
+		cell = new LLScrollListDate(cell_p);
+	}
+	else	// default is "text"
+	{
+		cell = new LLScrollListText(cell_p);
+	}
+
+	if (cell_p.value.isProvided())
+	{
+		cell->setValue(cell_p.value);
+	}
+
+	return cell;
+}
+
+
+LLScrollListCell::LLScrollListCell(const LLScrollListCell::Params& p)
+:	mWidth(p.width)
+{}
+
+// virtual
+const LLSD LLScrollListCell::getValue() const
+{
+	return LLStringUtil::null;
+}
+
+//
+// LLScrollListIcon
+//
+LLScrollListIcon::LLScrollListIcon(const LLScrollListCell::Params& p)
+:	LLScrollListCell(p),
+	mIcon(LLUI::getUIImage(p.value().asString())),
+	mColor(p.color),
+	mAlignment(p.font_halign)
+{}
+
+LLScrollListIcon::~LLScrollListIcon()
+{
+}
+
+/*virtual*/
+S32		LLScrollListIcon::getHeight() const
+{ return mIcon ? mIcon->getHeight() : 0; }
+
+/*virtual*/
+const LLSD		LLScrollListIcon::getValue() const
+{ return mIcon.isNull() ? LLStringUtil::null : mIcon->getName(); }
+
+void LLScrollListIcon::setValue(const LLSD& value)
+{
+	if (value.isUUID())
+	{
+		// don't use default image specified by LLUUID::null, use no image in that case
+		LLUUID image_id = value.asUUID();
+		mIcon = image_id.notNull() ? LLUI::getUIImageByID(image_id) : LLUIImagePtr(NULL);
+	}
+	else
+	{
+		std::string value_string = value.asString();
+		if (LLUUID::validate(value_string))
+		{
+			setValue(LLUUID(value_string));
+		}
+		else if (!value_string.empty())
+		{
+			mIcon = LLUI::getUIImage(value.asString());
+		}
+		else
+		{
+			mIcon = NULL;
+		}
+	}
+}
+
+
+void LLScrollListIcon::setColor(const LLColor4& color)
+{
+	mColor = color;
+}
+
+S32	LLScrollListIcon::getWidth() const 
+{
+	// if no specified fix width, use width of icon
+	if (LLScrollListCell::getWidth() == 0 && mIcon.notNull())
+	{
+		return mIcon->getWidth();
+	}
+	return LLScrollListCell::getWidth();
+}
+
+
+void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_color)	 const
+{
+	if (mIcon)
+	{
+		switch(mAlignment)
+		{
+		case LLFontGL::LEFT:
+			mIcon->draw(0, 0, mColor);
+			break;
+		case LLFontGL::RIGHT:
+			mIcon->draw(getWidth() - mIcon->getWidth(), 0, mColor);
+			break;
+		case LLFontGL::HCENTER:
+			mIcon->draw((getWidth() - mIcon->getWidth()) / 2, 0, mColor);
+			break;
+		default:
+			break;
+		}
+	}
+}
+
+//
+// LLScrollListText
+//
+U32 LLScrollListText::sCount = 0;
+
+LLScrollListText::LLScrollListText(const LLScrollListCell::Params& p)
+:	LLScrollListCell(p),
+	mText(p.value().asString()),
+	mFont(p.font),
+	mColor(p.color),
+	mUseColor(p.color.isProvided()),
+	mFontStyle(LLFontGL::NORMAL),
+	mFontAlignment(p.font_halign),
+	mVisible(p.visible),
+	mHighlightCount( 0 ),
+	mHighlightOffset( 0 )
+{
+	sCount++;
+
+	// initialize rounded rect image
+	if (!mRoundedRectImage)
+	{
+		mRoundedRectImage = LLUI::getUIImage("rounded_square.tga");
+	}
+}
+
+//virtual 
+void LLScrollListText::highlightText(S32 offset, S32 num_chars)
+{
+	mHighlightOffset = offset;
+	mHighlightCount = num_chars;
+}
+
+//virtual 
+BOOL LLScrollListText::isText() const
+{
+	return TRUE;
+}
+
+//virtual 
+BOOL LLScrollListText::getVisible() const
+{
+	return mVisible;
+}
+
+//virtual 
+S32 LLScrollListText::getHeight() const
+{
+	return llround(mFont->getLineHeight());
+}
+
+
+LLScrollListText::~LLScrollListText()
+{
+	sCount--;
+}
+
+S32	LLScrollListText::getContentWidth() const
+{
+	return mFont->getWidth(mText.getString());
+}
+
+
+void LLScrollListText::setColor(const LLColor4& color)
+{
+	mColor = color;
+	mUseColor = TRUE;
+}
+
+void LLScrollListText::setText(const LLStringExplicit& text)
+{
+	mText = text;
+}
+
+//virtual
+void LLScrollListText::setValue(const LLSD& text)
+{
+	setText(text.asString());
+}
+
+//virtual 
+const LLSD LLScrollListText::getValue() const		
+{ 
+	return LLSD(mText.getString()); 
+}
+
+
+void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_color) const
+{
+	LLColor4 display_color;
+	if (mUseColor)
+	{
+		display_color = mColor;
+	}
+	else
+	{
+		display_color = color;
+	}
+
+	if (mHighlightCount > 0)
+	{
+		S32 left = 0;
+		switch(mFontAlignment)
+		{
+		case LLFontGL::LEFT:
+			left = mFont->getWidth(mText.getString(), 0, mHighlightOffset);
+			break;
+		case LLFontGL::RIGHT:
+			left = getWidth() - mFont->getWidth(mText.getString(), mHighlightOffset, S32_MAX);
+			break;
+		case LLFontGL::HCENTER:
+			left = (getWidth() - mFont->getWidth(mText.getString())) / 2;
+			break;
+		}
+		LLRect highlight_rect(left - 2, 
+				llround(mFont->getLineHeight()) + 1, 
+				left + mFont->getWidth(mText.getString(), mHighlightOffset, mHighlightCount) + 1, 
+				1);
+		mRoundedRectImage->draw(highlight_rect, highlight_color);
+	}
+
+	// Try to draw the entire string
+	F32 right_x;
+	U32 string_chars = mText.length();
+	F32 start_x = 0.f;
+	switch(mFontAlignment)
+	{
+	case LLFontGL::LEFT:
+		start_x = 0.f;
+		break;
+	case LLFontGL::RIGHT:
+		start_x = (F32)getWidth();
+		break;
+	case LLFontGL::HCENTER:
+		start_x = (F32)getWidth() * 0.5f;
+		break;
+	}
+	mFont->render(mText.getWString(), 0, 
+						start_x, 2.f,
+						display_color,
+						mFontAlignment,
+						LLFontGL::BOTTOM, 
+						mFontStyle,
+						LLFontGL::NO_SHADOW,
+						string_chars, 
+						getWidth(),
+						&right_x, 
+						FALSE, 
+						TRUE);
+}
+
+//
+// LLScrollListCheck
+//
+LLScrollListCheck::LLScrollListCheck(const LLScrollListCell::Params& p)
+:	LLScrollListCell(p)
+{
+	LLCheckBoxCtrl::Params checkbox_p;
+	checkbox_p.name("checkbox");
+	checkbox_p.rect.left(0).bottom(0).width(p.width).height(p.width);
+	checkbox_p.enabled(p.enabled);
+	checkbox_p.initial_value(p.value());
+
+	mCheckBox = LLUICtrlFactory::create<LLCheckBoxCtrl>(checkbox_p);
+	 
+	LLRect rect(mCheckBox->getRect());
+	if (p.width)
+	{
+		rect.mRight = rect.mLeft + p.width;
+		mCheckBox->setRect(rect);
+		setWidth(p.width);
+	}
+	else
+	{
+		setWidth(rect.getWidth()); //check_box->getWidth();
+	}
+
+	mCheckBox->setColor(p.color);
+}
+
+
+LLScrollListCheck::~LLScrollListCheck()
+{
+	delete mCheckBox;
+	mCheckBox = NULL;
+}
+
+void LLScrollListCheck::draw(const LLColor4& color, const LLColor4& highlight_color) const
+{
+	mCheckBox->draw();
+}
+
+BOOL LLScrollListCheck::handleClick()
+{ 
+	if (mCheckBox->getEnabled())
+	{
+		mCheckBox->toggle();
+	}
+	// don't change selection when clicking on embedded checkbox
+	return TRUE; 
+}
+
+/*virtual*/
+const LLSD LLScrollListCheck::getValue() const
+{
+	return mCheckBox->getValue();
+}
+
+/*virtual*/
+void LLScrollListCheck::setValue(const LLSD& value)
+{
+	mCheckBox->setValue(value);
+}
+
+/*virtual*/
+void LLScrollListCheck::onCommit()
+{
+	mCheckBox->onCommit();
+}
+
+/*virtual*/
+void LLScrollListCheck::setEnabled(BOOL enable)
+{
+	mCheckBox->setEnabled(enable);
+}
+
+//
+// LLScrollListDate
+//
+
+LLScrollListDate::LLScrollListDate( const LLScrollListCell::Params& p)
+:	LLScrollListText(p),
+	mDate(p.value().asDate())
+{}
+
+void LLScrollListDate::setValue(const LLSD& value)
+{
+	mDate = value.asDate();
+	LLScrollListText::setValue(mDate.asRFC1123());
+}
+
+const LLSD LLScrollListDate::getValue() const
+{
+	return mDate;
+}
diff --git a/indra/llui/llscrolllistcell.h b/indra/llui/llscrolllistcell.h
new file mode 100644
index 0000000000..2ab13f7618
--- /dev/null
+++ b/indra/llui/llscrolllistcell.h
@@ -0,0 +1,223 @@
+/** 
+ * @file llscrolllistcell.h
+ * @brief Scroll lists are composed of rows (items), each of which 
+ * contains columns (cells).
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ * 
+ * Copyright (c) 2007-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LLSCROLLLISTCELL_H
+#define LLSCROLLLISTCELL_H
+
+#include "llfontgl.h"		// HAlign
+#include "llpointer.h"		// LLPointer<>
+#include "lluistring.h"
+#include "v4color.h"
+#include "llui.h"
+
+class LLCheckBoxCtrl;
+class LLSD;
+class LLUIImage;
+
+/*
+ * Represents a cell in a scrollable table.
+ *
+ * Sub-classes must return height and other properties 
+ * though width accessors are implemented by the base class.
+ * It is therefore important for sub-class constructors to call
+ * setWidth() with realistic values.
+ */
+class LLScrollListCell
+{
+public:
+	struct Params : public LLInitParam::Block<Params>
+	{
+		Optional<std::string>		type,
+									column;
+
+		Optional<S32>				width;
+		Optional<bool>				enabled,
+									visible;
+
+		Optional<void*>				userdata;
+		Optional<LLSD>				value;
+
+		Optional<const LLFontGL*>	font;
+		Optional<LLColor4>			font_color;
+		Optional<LLFontGL::HAlign>	font_halign;
+
+		Optional<LLColor4>			color;
+
+		Params()
+		:	type("type", "text"),
+			column("column"),
+			width("width"),
+			enabled("enabled", true),
+			visible("visible", true),
+			value("value"),
+			font("font", LLFontGL::getFontSansSerifSmall()),
+			font_color("font_color", LLColor4::black),
+			color("color", LLColor4::white),
+			font_halign("halign", LLFontGL::LEFT)
+		{
+			addSynonym(column, "name");
+			addSynonym(font_color, "font-color");
+		}
+	};
+
+	static LLScrollListCell* create(const Params&);
+
+	LLScrollListCell(const LLScrollListCell::Params&);
+	virtual ~LLScrollListCell() {};
+	virtual void			draw(const LLColor4& color, const LLColor4& highlight_color) const = 0;		// truncate to given width, if possible
+	virtual S32				getWidth() const {return mWidth;}
+	virtual S32				getContentWidth() const { return 0; }
+	virtual S32				getHeight() const = 0;
+	virtual const LLSD		getValue() const;
+	virtual void			setValue(const LLSD& value) { }
+	virtual BOOL			getVisible() const { return TRUE; }
+	virtual void			setWidth(S32 width) { mWidth = width; }
+	virtual void			highlightText(S32 offset, S32 num_chars) {}
+	virtual BOOL			isText() const = 0;
+	virtual void			setColor(const LLColor4&) {}
+	virtual void			onCommit() {};
+
+	virtual BOOL			handleClick() { return FALSE; }
+	virtual	void			setEnabled(BOOL enable) { }
+
+private:
+	S32 mWidth;
+};
+
+class LLScrollListSpacer : public LLScrollListCell
+{
+public:
+	LLScrollListSpacer(const LLScrollListCell::Params& p) : LLScrollListCell(p) {}
+	/*virtual*/ ~LLScrollListSpacer() {};
+	/*virtual*/ void			draw(const LLColor4& color, const LLColor4& highlight_color) const {}
+	/*virtual*/ S32				getHeight() const { return 0; }
+	/*virtual*/ BOOL			isText() const { return FALSE; }
+};
+
+/*
+ * Cell displaying a text label.
+ */
+class LLScrollListText : public LLScrollListCell
+{
+public:
+	LLScrollListText(const LLScrollListCell::Params&);
+	/*virtual*/ ~LLScrollListText();
+
+	/*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color) const;
+	/*virtual*/ S32		getContentWidth() const;
+	/*virtual*/ S32		getHeight() const;
+	/*virtual*/ void	setValue(const LLSD& value);
+	/*virtual*/ const LLSD getValue() const;
+	/*virtual*/ BOOL	getVisible() const;
+	/*virtual*/ void	highlightText(S32 offset, S32 num_chars);
+
+	/*virtual*/ void	setColor(const LLColor4&);
+	/*virtual*/ BOOL	isText() const;
+
+	void			setText(const LLStringExplicit& text);
+	void			setFontStyle(const U8 font_style) { mFontStyle = font_style; }
+
+private:
+	LLUIString		mText;
+	const LLFontGL*	mFont;
+	LLColor4		mColor;
+	U8				mUseColor;
+	U8				mFontStyle;
+	LLFontGL::HAlign mFontAlignment;
+	BOOL			mVisible;
+	S32				mHighlightCount;
+	S32				mHighlightOffset;
+
+	LLPointer<LLUIImage> mRoundedRectImage;
+
+	static U32 sCount;
+};
+
+/*
+ * Cell displaying an image.
+ */
+class LLScrollListIcon : public LLScrollListCell
+{
+public:
+	LLScrollListIcon(const LLScrollListCell::Params& p);
+	/*virtual*/ ~LLScrollListIcon();
+	/*virtual*/ void	draw(const LLColor4& color, const LLColor4& highlight_color) const;
+	/*virtual*/ S32		getWidth() const;
+	/*virtual*/ S32		getHeight() const;
+	/*virtual*/ const LLSD		getValue() const;
+	/*virtual*/ void	setColor(const LLColor4&);
+	/*virtual*/ BOOL	isText()const { return FALSE; }
+	/*virtual*/ void	setValue(const LLSD& value);
+
+private:
+	LLPointer<LLUIImage>	mIcon;
+	LLColor4				mColor;
+	LLFontGL::HAlign		mAlignment;
+};
+
+/*
+ * An interactive cell containing a check box.
+ */
+class LLScrollListCheck : public LLScrollListCell
+{
+public:
+	LLScrollListCheck( const LLScrollListCell::Params&);
+	/*virtual*/ ~LLScrollListCheck();
+	/*virtual*/ void	draw(const LLColor4& color, const LLColor4& highlight_color) const;
+	/*virtual*/ S32		getHeight() const			{ return 0; } 
+	/*virtual*/ const LLSD	getValue() const;
+	/*virtual*/ void	setValue(const LLSD& value);
+	/*virtual*/ void	onCommit();
+
+	/*virtual*/ BOOL	handleClick();
+	/*virtual*/ void	setEnabled(BOOL enable);
+
+	LLCheckBoxCtrl*	getCheckBox()				{ return mCheckBox; }
+	/*virtual*/ BOOL	isText() const				{ return FALSE; }
+
+private:
+	LLCheckBoxCtrl* mCheckBox;
+};
+
+class LLScrollListDate : public LLScrollListText
+{
+public:
+	LLScrollListDate( const LLScrollListCell::Params& p );
+	virtual void	setValue(const LLSD& value);
+	virtual const LLSD getValue() const;
+
+private:
+	LLDate		mDate;
+};
+
+#endif
diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp
new file mode 100644
index 0000000000..48fddbfb71
--- /dev/null
+++ b/indra/llui/llscrolllistcolumn.cpp
@@ -0,0 +1,320 @@
+/** 
+ * @file llscrollcolumnheader.cpp
+ * @brief Scroll lists are composed of rows (items), each of which 
+ * contains columns (cells).
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ * 
+ * Copyright (c) 2007-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llscrolllistcolumn.h"
+
+#include "llbutton.h"
+#include "llresizebar.h"
+#include "llscrolllistcell.h"
+#include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "lluictrlfactory.h"
+
+const S32 MIN_COLUMN_WIDTH = 20;
+
+//---------------------------------------------------------------------------
+// LLScrollColumnHeader
+//---------------------------------------------------------------------------
+
+LLScrollColumnHeader::LLScrollColumnHeader(const LLScrollColumnHeader::Params& p) 
+:	LLButton(p), // use combobox params to steal images
+	mColumn(p.column),
+	mHasResizableElement(FALSE)
+{
+	setClickedCallback(boost::bind(&LLScrollColumnHeader::onClick, this, _2));
+	
+	// resize handles on left and right
+	const S32 RESIZE_BAR_THICKNESS = 3;
+	LLResizeBar::Params resize_bar_p;
+	resize_bar_p.resizing_view(this);
+	resize_bar_p.rect(LLRect(getRect().getWidth() - RESIZE_BAR_THICKNESS, getRect().getHeight(), getRect().getWidth(), 0));
+	resize_bar_p.min_size(MIN_COLUMN_WIDTH);
+	resize_bar_p.side(LLResizeBar::RIGHT);
+	resize_bar_p.enabled(false);
+	mResizeBar = LLUICtrlFactory::create<LLResizeBar>(resize_bar_p);
+	addChild(mResizeBar);
+
+	setToolTip(p.label());
+}
+
+LLScrollColumnHeader::~LLScrollColumnHeader()
+{}
+
+void LLScrollColumnHeader::draw()
+{
+	std::string sort_column = mColumn->mParentCtrl->getSortColumnName();
+	BOOL draw_arrow = !mColumn->mLabel.empty() 
+			&& mColumn->mParentCtrl->isSorted()
+			// check for indirect sorting column as well as column's sorting name
+			&& (sort_column == mColumn->mSortingColumn || sort_column == mColumn->mName);
+
+	BOOL is_ascending = mColumn->mParentCtrl->getSortAscending();
+	setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, draw_arrow ? LLColor4::white : LLColor4::transparent);
+
+	// Draw children
+	LLButton::draw();
+}
+
+BOOL LLScrollColumnHeader::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+	if (canResize() && mResizeBar->getRect().pointInRect(x, y))
+	{
+		// reshape column to max content width
+		LLRect column_rect = getRect();
+		column_rect.mRight = column_rect.mLeft + mColumn->mMaxContentWidth;
+		setShape(column_rect, true);
+	}
+	else
+	{
+		onClick(LLSD());
+	}
+	return TRUE;
+}
+
+void LLScrollColumnHeader::onClick(const LLSD& data)
+{
+	if (mColumn)
+	{
+		LLScrollListCtrl::onClickColumn(mColumn);
+	}
+}
+
+LLView*	LLScrollColumnHeader::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding)
+{
+	// this logic assumes dragging on right
+	llassert(snap_edge == SNAP_RIGHT);
+
+	// use higher snap threshold for column headers
+	threshold = llmin(threshold, 10);
+
+	LLRect snap_rect = getSnapRect();
+
+	S32 snap_delta = mColumn->mMaxContentWidth - snap_rect.getWidth();
+
+	// x coord growing means column growing, so same signs mean we're going in right direction
+	if (llabs(snap_delta) <= threshold && mouse_dir.mX * snap_delta > 0 ) 
+	{
+		new_edge_val = snap_rect.mRight + snap_delta;
+	}
+	else 
+	{
+		LLScrollListColumn* next_column = mColumn->mParentCtrl->getColumn(mColumn->mIndex + 1);
+		while (next_column)
+		{
+			if (next_column->mHeader)
+			{
+				snap_delta = (next_column->mHeader->getSnapRect().mRight - next_column->mMaxContentWidth) - snap_rect.mRight;
+				if (llabs(snap_delta) <= threshold && mouse_dir.mX * snap_delta > 0 ) 
+				{
+					new_edge_val = snap_rect.mRight + snap_delta;
+				}
+				break;
+			}
+			next_column = mColumn->mParentCtrl->getColumn(next_column->mIndex + 1);
+		}
+	}
+
+	return this;
+}
+
+void LLScrollColumnHeader::handleReshape(const LLRect& new_rect, bool by_user)
+{
+	S32 new_width = new_rect.getWidth();
+	S32 delta_width = new_width - (getRect().getWidth() /*+ mColumn->mParentCtrl->getColumnPadding()*/);
+
+	if (delta_width != 0)
+	{
+		S32 remaining_width = -delta_width;
+		S32 col;
+		for (col = mColumn->mIndex + 1; col < mColumn->mParentCtrl->getNumColumns(); col++)
+		{
+			LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
+			if (!columnp) continue;
+
+			if (columnp->mHeader && columnp->mHeader->canResize())
+			{
+				// how many pixels in width can this column afford to give up?
+				S32 resize_buffer_amt = llmax(0, columnp->getWidth() - MIN_COLUMN_WIDTH);
+				
+				// user shrinking column, need to add width to other columns
+				if (delta_width < 0)
+				{
+					if (columnp->getWidth() > 0)
+					{
+						// statically sized column, give all remaining width to this column
+						columnp->setWidth(columnp->getWidth() + remaining_width);
+						if (columnp->mRelWidth > 0.f)
+						{
+							columnp->mRelWidth = (F32)columnp->getWidth() / (F32)mColumn->mParentCtrl->getItemListRect().getWidth();
+						}
+						// all padding went to this widget, we're done
+						break;
+					}
+				}
+				else
+				{
+					// user growing column, need to take width from other columns
+					remaining_width += resize_buffer_amt;
+
+					if (columnp->getWidth() > 0)
+					{
+						columnp->setWidth(columnp->getWidth() - llmin(columnp->getWidth() - MIN_COLUMN_WIDTH, delta_width));
+						if (columnp->mRelWidth > 0.f)
+						{
+							columnp->mRelWidth = (F32)columnp->getWidth() / (F32)mColumn->mParentCtrl->getItemListRect().getWidth();
+						}
+					}
+
+					if (remaining_width >= 0)
+					{
+						// width sucked up from neighboring columns, done
+						break;
+					}
+				}
+			}
+		}
+
+		// clamp resize amount to maximum that can be absorbed by other columns
+		if (delta_width > 0)
+		{
+			delta_width += llmin(remaining_width, 0);
+		}
+
+		// propagate constrained delta_width to new width for this column
+		new_width = getRect().getWidth() + delta_width - mColumn->mParentCtrl->getColumnPadding();
+
+		// use requested width
+		mColumn->setWidth(new_width);
+
+		// update proportional spacing
+		if (mColumn->mRelWidth > 0.f)
+		{
+			mColumn->mRelWidth = (F32)new_width / (F32)mColumn->mParentCtrl->getItemListRect().getWidth();
+		}
+
+		// tell scroll list to layout columns again
+		// do immediate update to get proper feedback to resize handle
+		// which needs to know how far the resize actually went
+		mColumn->mParentCtrl->updateColumns();
+	}
+}
+
+void LLScrollColumnHeader::setHasResizableElement(BOOL resizable)
+{
+	if (mHasResizableElement != resizable)
+	{
+		mColumn->mParentCtrl->dirtyColumns();
+		mHasResizableElement = resizable;
+	}
+}
+
+void LLScrollColumnHeader::updateResizeBars()
+{
+	S32 num_resizable_columns = 0;
+	S32 col;
+	for (col = 0; col < mColumn->mParentCtrl->getNumColumns(); col++)
+	{
+		LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
+		if (columnp->mHeader && columnp->mHeader->canResize())
+		{
+			num_resizable_columns++;
+		}
+	}
+
+	S32 num_resizers_enabled = 0;
+
+	// now enable/disable resize handles on resizable columns if we have at least two
+	for (col = 0; col < mColumn->mParentCtrl->getNumColumns(); col++)
+	{
+		LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
+		if (!columnp->mHeader) continue;
+		BOOL enable = num_resizable_columns >= 2 && num_resizers_enabled < (num_resizable_columns - 1) && columnp->mHeader->canResize();
+		columnp->mHeader->enableResizeBar(enable);
+		if (enable)
+		{
+			num_resizers_enabled++;
+		}
+	}
+}
+
+void LLScrollColumnHeader::enableResizeBar(BOOL enable)
+{
+	mResizeBar->setEnabled(enable);
+}
+
+BOOL LLScrollColumnHeader::canResize()
+{
+	return getVisible() && (mHasResizableElement || mColumn->mDynamicWidth);
+}
+
+void LLScrollListColumn::SortNames::declareValues()
+{
+	declare("ascending", LLScrollListColumn::ASCENDING);
+	declare("descending", LLScrollListColumn::DESCENDING);
+}
+
+LLScrollListColumn::LLScrollListColumn(const Params& p, LLScrollListCtrl* parent)
+:	mWidth(0),
+	mIndex (-1),
+	mParentCtrl(parent),
+	mName(p.name),
+	mLabel(p.header.label),
+	mHeader(NULL),
+	mMaxContentWidth(0),
+	mDynamicWidth(p.width.dynamic_width),
+	mRelWidth(p.width.relative_width),
+	mFontAlignment(p.halign),
+	mSortingColumn(p.sort_column)
+{
+	if (p.sort_ascending.isProvided())
+	{
+		mSortDirection = p.sort_ascending() ? ASCENDING : DESCENDING;
+	}
+	else
+	{
+		mSortDirection = p.sort_direction;
+	}
+
+	setWidth(p.width.pixel_width);
+}
+
+void LLScrollListColumn::setWidth(S32 width) 
+{ 
+	if (!mDynamicWidth && mRelWidth <= 0.f) 
+	{
+		mParentCtrl->updateStaticColumnWidth(this, width);
+	}
+	mWidth = width;
+}
diff --git a/indra/llui/llscrolllistcolumn.h b/indra/llui/llscrolllistcolumn.h
new file mode 100644
index 0000000000..c1bb86577f
--- /dev/null
+++ b/indra/llui/llscrolllistcolumn.h
@@ -0,0 +1,189 @@
+/** 
+ * @file llscrollcolumnheader.h
+ * @brief Scroll lists are composed of rows (items), each of which 
+ * contains columns (cells).
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ * 
+ * Copyright (c) 2007-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LLSCROLLLISTCOLUMN_H
+#define LLSCROLLLISTCOLUMN_H
+
+#include "llrect.h"
+#include "lluistring.h"
+#include "llbutton.h"
+#include "llinitparam.h"
+
+class LLScrollListColumn;
+class LLResizeBar;
+class LLScrollListCtrl;
+
+class LLScrollColumnHeader : public LLButton
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLButton::Params>
+	{
+		Mandatory<LLScrollListColumn*> column;
+
+		Params()
+		:	column("column")
+		{
+			name  = "column_header";
+			image_unselected.name("square_btn_32x128.tga");
+			image_selected.name("square_btn_selected_32x128.tga");
+			image_disabled.name("square_btn_32x128.tga");
+			image_disabled_selected.name("square_btn_selected_32x128.tga");
+			image_overlay.name("combobox_arrow.tga");
+			image_overlay_alignment("right");
+			font_halign = LLFontGL::LEFT;
+			tab_stop(false);
+			scale_image(true);
+		}
+	};
+	LLScrollColumnHeader(const Params&);
+	~LLScrollColumnHeader();
+
+	/*virtual*/ void draw();
+	/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+
+	/*virtual*/ LLView*	findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding);
+	/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
+	
+	LLScrollListColumn* getColumn() { return mColumn; }
+	void setHasResizableElement(BOOL resizable);
+	void updateResizeBars();
+	BOOL canResize();
+	void enableResizeBar(BOOL enable);
+
+	void onClick(const LLSD& data);
+
+private:
+	LLScrollListColumn* mColumn;
+	LLResizeBar*		mResizeBar;
+	BOOL				mHasResizableElement;
+};
+
+/*
+ * A simple data class describing a column within a scroll list.
+ */
+class LLScrollListColumn
+{
+public:
+	typedef enum e_sort_direction
+	{
+		DESCENDING,
+		ASCENDING
+	} ESortDirection;
+
+	struct SortNames
+	:	public LLInitParam::TypeValuesHelper<LLScrollListColumn::ESortDirection, SortNames>
+	{
+		static void declareValues();
+	};
+
+	struct Params : public LLInitParam::Block<Params>
+	{
+		Optional<std::string>				name,
+											tool_tip;
+		Optional<std::string>				sort_column;
+		Optional<ESortDirection, SortNames>	sort_direction;
+		Optional<bool>						sort_ascending;
+
+		struct Width : public LLInitParam::Choice<Width>
+		{
+			Option<bool>	dynamic_width;
+			Option<S32>		pixel_width;
+			Option<F32>		relative_width;
+
+			Width()
+			:	dynamic_width("dynamicwidth", false),
+				pixel_width("width"),
+				relative_width("relative_width", -1.f)
+			{
+				addSynonym(relative_width, "relwidth");
+			}
+		};
+		Optional<Width>						width;
+
+		// either an image or label is used in column header
+		struct Header : public LLInitParam::Choice<Header>
+		{
+			Option<std::string>			label;
+			Option<LLUIImage*>			image;
+
+			Header()
+			:	label("label"),
+				image("image")
+			{}
+		};
+		Optional<Header>					header;
+
+		Optional<LLFontGL::HAlign>			halign;
+
+		Params()
+		:	name("name"),
+			tool_tip("tool_tip"),
+			sort_column("sort_column"),
+			sort_direction("sort_direction"),
+			sort_ascending("sort_ascending", true),
+			halign("halign", LLFontGL::LEFT)
+		{
+			// default choice to "dynamic_width"
+			width.dynamic_width = true;
+
+			addSynonym(sort_column, "sort");
+		}
+	};
+
+	//NOTE: this is default constructible so we can store it in a map.
+	LLScrollListColumn(const Params& p = Params(), LLScrollListCtrl* = NULL);
+
+	void setWidth(S32 width);
+	S32 getWidth() const { return mWidth; }
+
+public:
+	// Public data is fine so long as this remains a simple struct-like data class.
+	// If it ever gets any smarter than that, these should all become private
+	// with protected or public accessor methods added as needed. -MG
+	std::string				mName;
+	std::string				mSortingColumn;
+	ESortDirection			mSortDirection;
+	LLUIString				mLabel;
+	F32						mRelWidth;
+	BOOL					mDynamicWidth;
+	S32						mMaxContentWidth;
+	S32						mIndex;
+	LLScrollListCtrl*		mParentCtrl;
+	LLScrollColumnHeader*	mHeader;
+	LLFontGL::HAlign		mFontAlignment;
+
+private:
+	S32						mWidth;
+};
+
+#endif
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 5dd4e2d0ee..6f484b1875 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1,6 +1,7 @@
  /** 
  * @file llscrolllistctrl.cpp
- * @brief LLScrollListCtrl base class
+ * @brief Scroll lists are composed of rows (items), each of which 
+ * contains columns (cells).
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
  * 
@@ -30,32 +31,36 @@
  * $/LicenseInfo$
  */
 
-#include <algorithm>
+#define INSTANTIATE_GETCHILD_SCROLLLIST
 
 #include "linden_common.h"
-#include "llstl.h"
-#include "llboost.h"
 
 #include "llscrolllistctrl.h"
 
-#include "indra_constants.h"
+#include <algorithm>
+
+#include "llstl.h"
+#include "llboost.h"
+//#include "indra_constants.h"
 
 #include "llcheckboxctrl.h"
 #include "llclipboard.h"
 #include "llfocusmgr.h"
-#include "llrender.h"
+//#include "llrender.h"
 #include "llresmgr.h"
 #include "llscrollbar.h"
+#include "llscrolllistcell.h"
 #include "llstring.h"
 #include "llui.h"
 #include "lluictrlfactory.h"
 #include "llwindow.h"
 #include "llcontrol.h"
 #include "llkeyboard.h"
-#include "llresizebar.h"
+#include "llviewborder.h"
+#include "lltextbox.h"
+#include "llsdparam.h"
 
-const S32 MIN_COLUMN_WIDTH = 20;
-const S32 LIST_SNAP_PADDING = 5;
+template LLScrollListCtrl* LLView::getChild<LLScrollListCtrl>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
 
 static LLRegisterWidget<LLScrollListCtrl> r("scroll_list");
 
@@ -96,510 +101,89 @@ struct SortScrollListItem
 	const sort_order_t& mSortOrders;
 };
 
-
-//
-// LLScrollListIcon
-//
-LLScrollListIcon::LLScrollListIcon(LLUIImagePtr icon, S32 width)
-	: LLScrollListCell(width),
-	  mIcon(icon),
-	  mColor(LLColor4::white)
-{
-}
-
-LLScrollListIcon::LLScrollListIcon(const LLSD& value, S32 width)
-	: LLScrollListCell(width),
-	mColor(LLColor4::white)
-{
-	setValue(value);
-}
-
-
-LLScrollListIcon::~LLScrollListIcon()
-{
-}
-
-void LLScrollListIcon::setValue(const LLSD& value)
-{
-	if (value.isUUID())
-	{
-		// don't use default image specified by LLUUID::null, use no image in that case
-		LLUUID image_id = value.asUUID();
-		mIcon = image_id.notNull() ? LLUI::sImageProvider->getUIImageByID(image_id) : LLUIImagePtr(NULL);
-	}
-	else
-	{
-		std::string value_string = value.asString();
-		if (LLUUID::validate(value_string))
-		{
-			setValue(LLUUID(value_string));
-		}
-		else if (!value_string.empty())
-		{
-			mIcon = LLUI::getUIImage(value.asString());
-		}
-		else
-		{
-			mIcon = NULL;
-		}
-	}
-}
-
-
-void LLScrollListIcon::setColor(const LLColor4& color)
-{
-	mColor = color;
-}
-
-S32	LLScrollListIcon::getWidth() const 
-{
-	// if no specified fix width, use width of icon
-	if (LLScrollListCell::getWidth() == 0 && mIcon.notNull())
-	{
-		return mIcon->getWidth();
-	}
-	return LLScrollListCell::getWidth();
-}
-
-
-void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_color)	 const
-{
-	if (mIcon)
-	{
-		mIcon->draw(0, 0, mColor);
-	}
-}
-
-//
-// LLScrollListCheck
-//
-LLScrollListCheck::LLScrollListCheck(LLCheckBoxCtrl* check_box, S32 width)
-{
-	mCheckBox = check_box;
-	LLRect rect(mCheckBox->getRect());
-	if (width)
-	{
-		
-		rect.mRight = rect.mLeft + width;
-		mCheckBox->setRect(rect);
-		setWidth(width);
-	}
-	else
-	{
-		setWidth(rect.getWidth()); //check_box->getWidth();
-	}
-}
-
-LLScrollListCheck::~LLScrollListCheck()
-{
-	delete mCheckBox;
-}
-
-void LLScrollListCheck::draw(const LLColor4& color, const LLColor4& highlight_color) const
-{
-	mCheckBox->draw();
-}
-
-BOOL LLScrollListCheck::handleClick()
-{ 
-	if (mCheckBox->getEnabled())
-	{
-		mCheckBox->toggle();
-	}
-	// don't change selection when clicking on embedded checkbox
-	return TRUE; 
-}
-
-//
-// LLScrollListSeparator
-//
-LLScrollListSeparator::LLScrollListSeparator(S32 width) : LLScrollListCell(width)
-{
-}
-
-//virtual 
-S32 LLScrollListSeparator::getHeight() const
-{
-	return 5;
-}
-
-
-void LLScrollListSeparator::draw(const LLColor4& color, const LLColor4& highlight_color) const
-{
-	//*FIXME: use dynamic item heights and make separators narrow, and inactive
-	gl_line_2d(5, 8, llmax(5, getWidth() - 5), 8, color);
-}
-
-//
-// LLScrollListText
-//
-U32 LLScrollListText::sCount = 0;
-
-LLScrollListText::LLScrollListText( const std::string& text, const LLFontGL* font, S32 width, U8 font_style, LLFontGL::HAlign font_alignment, LLColor4& color, BOOL use_color, BOOL visible)
-:	LLScrollListCell(width),
-	mText( text ),
-	mFont( font ),
-	mColor(color),
-	mUseColor(use_color),
-	mFontStyle( font_style ),
-	mFontAlignment( font_alignment ),
-	mVisible( visible ),
-	mHighlightCount( 0 ),
-	mHighlightOffset( 0 )
-{
-	sCount++;
-
-	// initialize rounded rect image
-	if (!mRoundedRectImage)
-	{
-		mRoundedRectImage = LLUI::sImageProvider->getUIImage("rounded_square.tga");
-	}
-}
-//virtual 
-void LLScrollListText::highlightText(S32 offset, S32 num_chars)
-{
-	mHighlightOffset = offset;
-	mHighlightCount = num_chars;
-}
-
-//virtual 
-BOOL LLScrollListText::isText() const
-{
-	return TRUE;
-}
-
-//virtual 
-BOOL LLScrollListText::getVisible() const
-{
-	return mVisible;
-}
-
-//virtual 
-S32 LLScrollListText::getHeight() const
-{
-	return llround(mFont->getLineHeight());
-}
-
-
-LLScrollListText::~LLScrollListText()
-{
-	sCount--;
-}
-
-S32	LLScrollListText::getContentWidth() const
-{
-	return mFont->getWidth(mText.getString());
-}
-
-
-void LLScrollListText::setColor(const LLColor4& color)
-{
-	mColor = color;
-	mUseColor = TRUE;
-}
-
-void LLScrollListText::setText(const LLStringExplicit& text)
-{
-	mText = text;
-}
-
-//virtual
-void LLScrollListText::setValue(const LLSD& text)
-{
-	setText(text.asString());
-}
-
-//virtual 
-const LLSD LLScrollListText::getValue() const		
-{ 
-	return LLSD(mText.getString()); 
-}
-
-
-void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_color) const
-{
-	LLColor4 display_color;
-	if (mUseColor)
-	{
-		display_color = mColor;
-	}
-	else
-	{
-		display_color = color;
-	}
-
-	if (mHighlightCount > 0)
-	{
-		S32 left = 0;
-		switch(mFontAlignment)
-		{
-		case LLFontGL::LEFT:
-			left = mFont->getWidth(mText.getString(), 0, mHighlightOffset);
-			break;
-		case LLFontGL::RIGHT:
-			left = getWidth() - mFont->getWidth(mText.getString(), mHighlightOffset, S32_MAX);
-			break;
-		case LLFontGL::HCENTER:
-			left = (getWidth() - mFont->getWidth(mText.getString())) / 2;
-			break;
-		}
-		LLRect highlight_rect(left - 2, 
-				llround(mFont->getLineHeight()) + 1, 
-				left + mFont->getWidth(mText.getString(), mHighlightOffset, mHighlightCount) + 1, 
-				1);
-		mRoundedRectImage->draw(highlight_rect, highlight_color);
-	}
-
-	// Try to draw the entire string
-	F32 right_x;
-	U32 string_chars = mText.length();
-	F32 start_x = 0.f;
-	switch(mFontAlignment)
-	{
-	case LLFontGL::LEFT:
-		start_x = 0.f;
-		break;
-	case LLFontGL::RIGHT:
-		start_x = (F32)getWidth();
-		break;
-	case LLFontGL::HCENTER:
-		start_x = (F32)getWidth() * 0.5f;
-		break;
-	}
-	mFont->render(mText.getWString(), 0, 
-						start_x, 2.f,
-						display_color,
-						mFontAlignment,
-						LLFontGL::BOTTOM, 
-						mFontStyle,
-						string_chars, 
-						getWidth(),
-						&right_x, 
-						FALSE, 
-						TRUE);
-}
-
-LLScrollListDate::LLScrollListDate( const LLDate& date, const LLFontGL* font, S32 width, U8 font_style, LLFontGL::HAlign font_alignment, LLColor4& color, BOOL use_color, BOOL visible)
-:	LLScrollListText(date.asRFC1123(), font, width, font_style, font_alignment, color, use_color, visible),
-	mDate(date)
-{
-}
-
-void LLScrollListDate::setValue(const LLSD& value)
-{
-	mDate = value.asDate();
-	LLScrollListText::setValue(mDate.asRFC1123());
-}
-
-const LLSD LLScrollListDate::getValue() const
-{
-	return mDate;
-}
-
-LLScrollListItem::~LLScrollListItem()
-{
-	std::for_each(mColumns.begin(), mColumns.end(), DeletePointer());
-}
-
-void LLScrollListItem::setNumColumns(S32 columns)
-{
-	S32 prev_columns = mColumns.size();
-	if (columns < prev_columns)
-	{
-		std::for_each(mColumns.begin()+columns, mColumns.end(), DeletePointer());
-	}
-	
-	mColumns.resize(columns);
-
-	for (S32 col = prev_columns; col < columns; ++col)
-	{
-		mColumns[col] = NULL;
-	}
-}
-
-void LLScrollListItem::setColumn( S32 column, LLScrollListCell *cell )
-{
-	if (column < (S32)mColumns.size())
-	{
-		delete mColumns[column];
-		mColumns[column] = cell;
-	}
-	else
-	{
-		llerrs << "LLScrollListItem::setColumn: bad column: " << column << llendl;
-	}
-}
-
-std::string LLScrollListItem::getContentsCSV() const
-{
-	std::string ret;
-
-	S32 count = getNumColumns();
-	for (S32 i=0; i<count; ++i)
-	{
-		ret += getColumn(i)->getValue().asString();
-		if (i < count-1)
-		{
-			ret += ", ";
-		}
-	}
-
-	return ret;
-}
-
-void LLScrollListItem::draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding)
-{
-	// draw background rect
-	LLRect bg_rect = rect;
-	{
-		gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-		gGL.color4fv(bg_color.mV);
-		gl_rect_2d( bg_rect );
-	}
-
-	S32 cur_x = rect.mLeft;
-	S32 num_cols = getNumColumns();
-	S32 cur_col = 0;
-
-	for (LLScrollListCell* cell = getColumn(0); cur_col < num_cols; cell = getColumn(++cur_col))
-	{
-		// Two ways a cell could be hidden
-		if (cell->getWidth() < 0
-			|| !cell->getVisible()) continue;
-
-		LLUI::pushMatrix();
-		{
-			LLUI::translate((F32) cur_x, (F32) rect.mBottom, 0.0f);
-
-			cell->draw( fg_color, highlight_color );
-		}
-		LLUI::popMatrix();
-		
-		cur_x += cell->getWidth() + column_padding;
-	}
-}
-
-
-void LLScrollListItem::setEnabled(BOOL b)
-{
-	mEnabled = b;
-}
-
-//---------------------------------------------------------------------------
-// LLScrollListItemComment
-//---------------------------------------------------------------------------
-LLScrollListItemComment::LLScrollListItemComment(const std::string& comment_string, const LLColor4& color)
-: LLScrollListItem(FALSE),
-	mColor(color)
-{
-	addColumn( comment_string, LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ) );
-}
-
-void LLScrollListItemComment::draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding)
-{
-	LLScrollListCell* cell = getColumn(0);
-	if (cell)
-	{
-		// Two ways a cell could be hidden
-		if (cell->getWidth() < 0
-			|| !cell->getVisible()) return;
-
-		LLUI::pushMatrix();
-		{
-			LLUI::translate((F32)rect.mLeft, (F32)rect.mBottom, 0.0f);
-
-			// force first cell to be width of entire item
-			cell->setWidth(rect.getWidth());
-			cell->draw( mColor, highlight_color );
-		}
-		LLUI::popMatrix();
-	}
-}
-
-//---------------------------------------------------------------------------
-// LLScrollListItemSeparator
-//---------------------------------------------------------------------------
-LLScrollListItemSeparator::LLScrollListItemSeparator()
-: LLScrollListItem(FALSE)
-{
-	LLScrollListSeparator* cell = new LLScrollListSeparator(0);
-	setNumColumns(1);
-	setColumn(0, cell);
-}
-
-void LLScrollListItemSeparator::draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding)
-{
-	//TODO* move LLScrollListSeparator::draw into here and get rid of it
-	LLScrollListCell* cell = getColumn(0);
-	if (cell)
-	{
-		// Two ways a cell could be hidden
-		if (cell->getWidth() < 0
-			|| !cell->getVisible()) return;
-
-		LLUI::pushMatrix();
-		{
-			LLUI::translate((F32)rect.mLeft, (F32)rect.mBottom, 0.0f);
-
-			// force first cell to be width of entire item
-			cell->setWidth(rect.getWidth());
-			cell->draw( fg_color, highlight_color );
-		}
-		LLUI::popMatrix();
-	}
-}
-
 //---------------------------------------------------------------------------
 // LLScrollListCtrl
 //---------------------------------------------------------------------------
 
-LLScrollListCtrl::LLScrollListCtrl(const std::string& name, const LLRect& rect,
-	void (*commit_callback)(LLUICtrl* ctrl, void* userdata),
-	void* callback_user_data,
-	BOOL allow_multiple_selection,
-	BOOL show_border
-	)
- :	LLUICtrl(name, rect, TRUE, commit_callback, callback_user_data),
+LLScrollListCtrl::Contents::Contents()
+:	columns("columns"),
+	rows("rows")
+{
+	addSynonym(columns, "column");
+	addSynonym(rows, "row");
+}
+
+LLScrollListCtrl::Params::Params()
+:	multi_select("multi_select", false),
+	has_border("draw_border"),
+	draw_heading("draw_heading"),
+	search_column("search_column", 0),
+	sort_column("sort_column", -1),
+	sort_ascending("sort_ascending", true),
+	commit_on_keyboard_movement("commit_on_keyboard_movement", true),
+	heading_height("heading_height"),
+	background_visible("background_visible"),
+	draw_stripes("draw_stripes"),
+	column_padding("column_padding"),
+	fg_unselected_color("fg_unselected_color"),
+	fg_selected_color("fg_selected_color"),
+	bg_selected_color("bg_selected_color"),
+	fg_disable_color("fg_disable_color"),
+	bg_writeable_color("bg_writeable_color"),
+	bg_read_only_color("bg_read_only_color"),
+	bg_stripe_color("bg_stripe_color"),
+	hovered_color("hovered_color"),
+	highlighted_color("highlighted_color")
+{
+	name = "scroll_list";
+	mouse_opaque = true;
+}
+
+LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
+:	LLUICtrl(p),
 	mLineHeight(0),
 	mScrollLines(0),
 	mPageLines(0),
-	mHeadingHeight(20),
 	mMaxSelectable(0),
-	mAllowMultipleSelection( allow_multiple_selection ),
 	mAllowKeyboardMovement(TRUE),
-	mCommitOnKeyboardMovement(TRUE),
+	mCommitOnKeyboardMovement(p.commit_on_keyboard_movement),
 	mCommitOnSelectionChange(FALSE),
 	mSelectionChanged(FALSE),
 	mNeedsScroll(FALSE),
 	mCanSelect(TRUE),
-	mDisplayColumnHeaders(FALSE),
 	mColumnsDirty(FALSE),
 	mMaxItemCount(INT_MAX), 
 	mMaxContentWidth(0),
-	mBackgroundVisible( TRUE ),
-	mDrawStripes(TRUE),
-	mBgWriteableColor(	LLUI::sColorsGroup->getColor( "ScrollBgWriteableColor" ) ),
-	mBgReadOnlyColor(	LLUI::sColorsGroup->getColor( "ScrollBgReadOnlyColor" ) ),
-	mBgSelectedColor( LLUI::sColorsGroup->getColor("ScrollSelectedBGColor") ),
-	mBgStripeColor( LLUI::sColorsGroup->getColor("ScrollBGStripeColor") ),
-	mFgSelectedColor( LLUI::sColorsGroup->getColor("ScrollSelectedFGColor") ),
-	mFgUnselectedColor( LLUI::sColorsGroup->getColor("ScrollUnselectedColor") ),
-	mFgDisabledColor( LLUI::sColorsGroup->getColor("ScrollDisabledColor") ),
-	mHighlightedColor( LLUI::sColorsGroup->getColor("ScrollHighlightedColor") ),
 	mBorderThickness( 2 ),
 	mOnDoubleClickCallback( NULL ),
 	mOnMaximumSelectCallback( NULL ),
 	mOnSortChangedCallback( NULL ),
 	mHighlightedItem(-1),
 	mBorder(NULL),
-	mSearchColumn(0),
 	mNumDynamicWidthColumns(0),
 	mTotalStaticColumnWidth(0),
 	mTotalColumnPadding(0),
-	mSorted(TRUE),
+	mSorted(FALSE),
 	mDirty(FALSE),
 	mOriginalSelection(-1),
-	mDrewSelected(FALSE)
+	mDrewSelected(FALSE),
+	mLastSelected(NULL),
+	mHeadingHeight(p.heading_height),
+	mAllowMultipleSelection(p.multi_select),
+	mDisplayColumnHeaders(p.draw_heading),
+	mBackgroundVisible(p.background_visible),
+	mDrawStripes(p.draw_stripes),
+	mBgWriteableColor(p.bg_writeable_color()),
+	mBgReadOnlyColor(p.bg_read_only_color()),
+	mBgSelectedColor(p.bg_selected_color()),
+	mBgStripeColor(p.bg_stripe_color()),
+	mFgSelectedColor(p.fg_selected_color()),
+	mFgUnselectedColor(p.fg_unselected_color()),
+	mFgDisabledColor(p.fg_disable_color()),
+	mHighlightedColor(p.highlighted_color()),
+	mHoveredColor(p.hovered_color()),
+	mSearchColumn(p.search_column),
+	mColumnPadding(p.column_padding)
 {
 	mItemListRect.setOriginAndSize(
 		mBorderThickness,
@@ -612,37 +196,73 @@ LLScrollListCtrl::LLScrollListCtrl(const std::string& name, const LLRect& rect,
 	mPageLines = mLineHeight? (mItemListRect.getHeight()) / mLineHeight : 0;
 
 	// Init the scrollbar
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+
 	LLRect scroll_rect;
 	scroll_rect.setOriginAndSize( 
-		getRect().getWidth() - mBorderThickness - SCROLLBAR_SIZE,
+		getRect().getWidth() - mBorderThickness - scrollbar_size,
 		mItemListRect.mBottom,
-		SCROLLBAR_SIZE,
+		scrollbar_size,
 		mItemListRect.getHeight());
-	mScrollbar = new LLScrollbar( std::string("Scrollbar"), scroll_rect,
-								  LLScrollbar::VERTICAL,
-								  getItemCount(),
-								  mScrollLines,
-								  mPageLines,
-								  &LLScrollListCtrl::onScrollChange, this );
-	mScrollbar->setFollowsRight();
-	mScrollbar->setFollowsTop();
-	mScrollbar->setFollowsBottom();
-	mScrollbar->setEnabled( TRUE );
-	// scrollbar is visible only when needed
-	mScrollbar->setVisible(FALSE);
+
+	LLScrollbar::Params sbparams;
+	sbparams.name("Scrollbar");
+	sbparams.rect(scroll_rect);
+	sbparams.orientation(LLScrollbar::VERTICAL);
+	sbparams.doc_size(getItemCount());
+	sbparams.doc_pos(mScrollLines);
+	sbparams.page_size(mPageLines);
+	sbparams.change_callback(boost::bind(&LLScrollListCtrl::onScrollChange, this, _1, _2));
+	sbparams.follows.flags(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
+	sbparams.visible(false);
+	mScrollbar = LLUICtrlFactory::create<LLScrollbar> (sbparams);
 	addChild(mScrollbar);
 
 	// Border
-	if (show_border)
-	{
-		LLRect border_rect( 0, getRect().getHeight(), getRect().getWidth(), 0 );
-		mBorder = new LLViewBorder( std::string("dlg border"), border_rect, LLViewBorder::BEVEL_IN, LLViewBorder::STYLE_LINE, 1 );
+	if (p.has_border)
+	{
+		LLRect border_rect = getLocalRect();
+		LLViewBorder::Params params;
+		params.name("dig border");
+		params.rect(border_rect);
+		params.bevel_type(LLViewBorder::BEVEL_IN);
+		mBorder = LLUICtrlFactory::create<LLViewBorder> (params);
 		addChild(mBorder);
 	}
 
-	mColumnPadding = 5;
+	// set border *after* rect is fully initialized
+	if (mBorder)
+	{
+		mBorder->setRect(getLocalRect());
+		mBorder->reshape(getRect().getWidth(), getRect().getHeight());
+	}
+
+	if (p.sort_column >= 0)
+	{
+		sortByColumnIndex(p.sort_column, p.sort_ascending);
+	}
 
-	mLastSelected = NULL;
+	
+	for (LLInitParam::ParamIterator<LLScrollListColumn::Params>::const_iterator row_it = p.contents.columns().begin();
+		row_it != p.contents.columns().end();
+		++row_it)
+	{
+		addColumn(*row_it);
+	}
+
+	for (LLInitParam::ParamIterator<LLScrollListItem::Params>::const_iterator row_it = p.contents.rows().begin();
+		row_it != p.contents.rows().end();
+		++row_it)
+	{
+		addRow(*row_it);
+	}
+
+	LLTextBox::Params text_p;
+	text_p.name("comment_text");
+	text_p.border_visible(false);
+	text_p.rect(mItemListRect);
+	text_p.follows.flags(FOLLOWS_ALL);
+	addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
 }
 
 S32 LLScrollListCtrl::getSearchColumn()
@@ -666,6 +286,18 @@ S32 LLScrollListCtrl::getSearchColumn()
 	}
 	return llclamp(mSearchColumn, 0, getNumColumns());
 }
+/*virtual*/
+bool LLScrollListCtrl::preProcessChildNode(LLXMLNodePtr child)
+{
+	if (child->hasName("column") || child->hasName("row"))
+	{
+		return true; // skip
+	}
+	else
+	{
+		return false;
+	}
+}
 
 LLScrollListCtrl::~LLScrollListCtrl()
 {
@@ -818,6 +450,7 @@ void LLScrollListCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
 
 void LLScrollListCtrl::updateLayout()
 {
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
 	// reserve room for column headers, if needed
 	S32 heading_size = (mDisplayColumnHeaders ? mHeadingHeight : 0);
 	mItemListRect.setOriginAndSize(
@@ -826,22 +459,19 @@ void LLScrollListCtrl::updateLayout()
 		getRect().getWidth() - 2 * mBorderThickness,
 		getRect().getHeight() - (2 * mBorderThickness ) - heading_size );
 
+	getChildView("comment_text")->setShape(mItemListRect);
+
 	// how many lines of content in a single "page"
 	mPageLines = mLineHeight? mItemListRect.getHeight() / mLineHeight : 0;
 	BOOL scrollbar_visible = getItemCount() > mPageLines;
 	if (scrollbar_visible)
 	{
 		// provide space on the right for scrollbar
-		mItemListRect.mRight = getRect().getWidth() - mBorderThickness - SCROLLBAR_SIZE;
+		mItemListRect.mRight = getRect().getWidth() - mBorderThickness - scrollbar_size;
 	}
 
-	// don't allow scrolling off bottom
-	if (mScrollLines + mPageLines > getItemCount())
-	{
-		setScrollPos(llmax(0, getItemCount() - mPageLines));
-	}
-
-	mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0));
+	mScrollbar->setOrigin(getRect().getWidth() - mBorderThickness - scrollbar_size, mItemListRect.mBottom);
+	mScrollbar->reshape(scrollbar_size, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0));
 	mScrollbar->setPageSize( mPageLines );
 	mScrollbar->setDocSize( getItemCount() );
 	mScrollbar->setVisible(scrollbar_visible);
@@ -916,11 +546,11 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r
 		// create new column on demand
 		if (mColumns.empty() && requires_column)
 		{
-			LLSD new_column;
-			new_column["name"] = "default_column";
-			new_column["label"] = "";
-			new_column["dynamicwidth"] = TRUE;
-			addColumn(new_column);
+			LLScrollListColumn::Params col_params;
+			col_params.name =  "default_column";
+			col_params.header.label = "";
+			col_params.width.dynamic_width = true;
+			addColumn(col_params);
 		}
 
 		updateLineHeightInsert(item);
@@ -1017,7 +647,7 @@ void LLScrollListCtrl::updateColumns()
 	// update column headers
 	std::vector<LLScrollListColumn*>::iterator column_ordered_it;
 	S32 left = mItemListRect.mLeft;
-	LLColumnHeader* last_header = NULL;
+	LLScrollColumnHeader* last_header = NULL;
 	for (column_ordered_it = mColumnsIndexed.begin(); column_ordered_it != mColumnsIndexed.end(); ++column_ordered_it)
 	{
 		if ((*column_ordered_it)->getWidth() < 0)
@@ -1052,7 +682,7 @@ void LLScrollListCtrl::updateColumns()
 	}
 
 	// expand last column header we encountered to full list width
-	if (last_header && last_header->canResize())
+	if (last_header)
 	{
 		S32 new_width = llmax(0, mItemListRect.mRight - last_header->getRect().mLeft);
 		last_header->reshape(new_width, last_header->getRect().getHeight());
@@ -1077,13 +707,6 @@ void LLScrollListCtrl::updateColumns()
 
 }
 
-void LLScrollListCtrl::setDisplayHeading(BOOL display)
-{
-	mDisplayColumnHeaders = display;
-
-	updateLayout();
-}
-
 void LLScrollListCtrl::setHeadingHeight(S32 heading_height)
 {
 	mHeadingHeight = heading_height;
@@ -1275,7 +898,15 @@ void LLScrollListCtrl::deleteSelectedItems()
 	dirtyColumns();
 }
 
-void LLScrollListCtrl::highlightNthItem(S32 target_index)
+void LLScrollListCtrl::clearHighlightedItems()
+{	
+	for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); ++iter)
+	{
+		(*iter)->setHighlighted(false);
+	}
+}
+
+void LLScrollListCtrl::mouseOverHighlightNthItem(S32 target_index)
 {
 	if (mHighlightedItem != target_index)
 	{
@@ -1283,14 +914,14 @@ void LLScrollListCtrl::highlightNthItem(S32 target_index)
 	}
 }
 
-S32	LLScrollListCtrl::selectMultiple( LLDynamicArray<LLUUID> ids )
+S32	LLScrollListCtrl::selectMultiple( std::vector<LLUUID> ids )
 {
 	item_list::iterator iter;
 	S32 count = 0;
 	for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
 	{
 		LLScrollListItem* item = *iter;
-		LLDynamicArray<LLUUID>::iterator iditr;
+		std::vector<LLUUID>::iterator iditr;
 		for(iditr = ids.begin(); iditr != ids.end(); ++iditr)
 		{
 			if (item->getEnabled() && (item->getUUID() == (*iditr)))
@@ -1446,35 +1077,51 @@ void LLScrollListCtrl::deselectAllItems(BOOL no_commit_on_change)
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Use this to add comment text such as "Searching", which ignores column settings of list
 
-LLScrollListItem* LLScrollListCtrl::addCommentText(const std::string& comment_text, EAddPosition pos)
+void LLScrollListCtrl::setCommentText(const std::string& comment_text)
 {
-	LLScrollListItem* item = NULL;
-	if (getItemCount() < mMaxItemCount)
-	{
-		// always draw comment text with "enabled" color
-		item = new LLScrollListItemComment( comment_text, mFgUnselectedColor );
-		addItem( item, pos, FALSE );
-	}
-	return item;
+	getChild<LLTextBox>("comment_text")->setValue(comment_text);
 }
 
 LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos)
 {
-	LLScrollListItem* item = new LLScrollListItemSeparator();
-	addItem(item, pos, FALSE);
-	return item;
+	LLScrollListItem::Params separator_params;
+	separator_params.enabled(false);
+	LLScrollListCell::Params cell_params;
+	cell_params.type = "icon";
+	cell_params.value = "menu_separator";
+	cell_params.color = LLColor4(0.f, 0.f, 0.f, 0.7f);
+	cell_params.font_halign = LLFontGL::HCENTER;
+	separator_params.cells.add(cell_params);
+	return addRow( separator_params, pos );
 }
 
 // Selects first enabled item of the given name.
 // Returns false if item not found.
+// Calls getItemByLabel in order to combine functionality
 BOOL LLScrollListCtrl::selectItemByLabel(const std::string& label, BOOL case_sensitive)
 {
-	// ensure that no stale items are selected, even if we don't find a match
-	deselectAllItems(TRUE);
-	//RN: assume no empty items
-	if (label.empty())
+	deselectAllItems(TRUE); 	// ensure that no stale items are selected, even if we don't find a match
+	LLScrollListItem* item = getItemByLabel(label, case_sensitive);
+
+	bool found = NULL != item;
+	if(found)
 	{
-		return FALSE;
+		selectItem(item);
+	}
+
+	if (mCommitOnSelectionChange)
+	{
+		commitIfChanged();
+	}
+
+	return found;
+}
+
+LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, BOOL case_sensitive, S32 column)
+{
+	if (label.empty()) 	//RN: assume no empty items
+	{
+		return NULL;
 	}
 
 	std::string target_text = label;
@@ -1483,34 +1130,21 @@ BOOL LLScrollListCtrl::selectItemByLabel(const std::string& label, BOOL case_sen
 		LLStringUtil::toLower(target_text);
 	}
 
-	BOOL found = FALSE;
-
 	item_list::iterator iter;
-	S32 index = 0;
 	for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
 	{
 		LLScrollListItem* item = *iter;
-		// Only select enabled items with matching names
-		std::string item_text = item->getColumn(0)->getValue().asString();
+		std::string item_text = item->getColumn(column)->getValue().asString();	// Only select enabled items with matching names
 		if (!case_sensitive)
 		{
 			LLStringUtil::toLower(item_text);
 		}
-		BOOL select = !found && item->getEnabled() && item_text == target_text;
-		if (select)
+		if(item_text == target_text)
 		{
-			selectItem(item);
+			return item;
 		}
-		found = found || select;
-		index++;
 	}
-
-	if (mCommitOnSelectionChange)
-	{
-		commitIfChanged();
-	}
-
-	return found;
+	return NULL;
 }
 
 
@@ -1614,14 +1248,16 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const
 
 LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled, S32 column_width)
 {
-	LLScrollListItem* item = NULL;
 	if (getItemCount() < mMaxItemCount)
 	{
-		item = new LLScrollListItem( enabled, NULL, id );
-		item->addColumn(item_text, LLResMgr::getInstance()->getRes(LLFONT_SANSSERIF_SMALL), column_width);
-		addItem( item, pos );
+		LLScrollListItem::Params item_p;
+		item_p.enabled(enabled);
+		item_p.value(id);
+		item_p.cells.add().value(item_text).width(column_width).type("text");
+
+		return addRow( item_p, pos );
 	}
-	return item;
+	return NULL;
 }
 
 // Select the line or lines that match this UUID
@@ -1726,7 +1362,7 @@ void LLScrollListCtrl::drawItems()
 		S32 max_columns = 0;
 
 		LLColor4 highlight_color = LLColor4::white;
-		F32 type_ahead_timeout = LLUI::sConfigGroup->getF32("TypeAheadTimeout");
+		static LLUICachedControl<F32> type_ahead_timeout ("TypeAheadTimeout", 0);
 		highlight_color.mV[VALPHA] = clamp_rescale(mSearchTimer.getElapsedTimeF32(), type_ahead_timeout * 0.7f, type_ahead_timeout, 0.4f, 0.f);
 
 		item_list::iterator iter;
@@ -1754,27 +1390,46 @@ void LLScrollListCtrl::drawItems()
 
 			if( mScrollLines <= line && line < mScrollLines + num_page_lines )
 			{
-				fg_color = (item->getEnabled() ? mFgUnselectedColor : mFgDisabledColor);
+				fg_color = (item->getEnabled() ? mFgUnselectedColor.get() : mFgDisabledColor.get());
 				if( item->getSelected() && mCanSelect)
 				{
-					bg_color = mBgSelectedColor;
-					fg_color = (item->getEnabled() ? mFgSelectedColor : mFgDisabledColor);
+					if(item->getHighlighted())	// if it's highlighted, average the colors
+					{
+						bg_color = lerp(mBgSelectedColor.get(), mHighlightedColor.get(), 0.5f);
+					}
+					else						// otherwise just select-highlight it
+					{
+						bg_color = mBgSelectedColor.get();
+					}
+
+					fg_color = (item->getEnabled() ? mFgSelectedColor.get() : mFgDisabledColor.get());
 				}
 				else if (mHighlightedItem == line && mCanSelect)
 				{
-					bg_color = mHighlightedColor;
+					if(item->getHighlighted())	// if it's highlighted, average the colors
+					{
+						bg_color = lerp(mHoveredColor.get(), mHighlightedColor.get(), 0.5f);
+					}
+					else						// otherwise just hover-highlight it
+					{
+						bg_color = mHoveredColor.get();
+					}
+				}
+				else if (item->getHighlighted())
+				{
+					bg_color = mHighlightedColor.get();
 				}
 				else 
 				{
 					if (mDrawStripes && (line % 2 == 0) && (max_columns > 1))
 					{
-						bg_color = mBgStripeColor;
+						bg_color = mBgStripeColor.get();
 					}
 				}
 
 				if (!item->getEnabled())
 				{
-					bg_color = mBgReadOnlyColor;
+					bg_color = mBgReadOnlyColor.get();
 				}
 
 				item->draw(item_rect, fg_color, bg_color, highlight_color, mColumnPadding);
@@ -1807,8 +1462,7 @@ void LLScrollListCtrl::draw()
 	if (mBackgroundVisible)
 	{
 		gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-		gGL.color4fv( getEnabled() ? mBgWriteableColor.mV : mBgReadOnlyColor.mV );
-		gl_rect_2d(background);
+		gl_rect_2d(background, getEnabled() ? mBgWriteableColor.get() : mBgReadOnlyColor.get() );
 	}
 
 	if (mColumnsDirty)
@@ -1817,6 +1471,8 @@ void LLScrollListCtrl::draw()
 		mColumnsDirty = FALSE;
 	}
 
+	getChildView("comment_text")->setVisible(mItemList.empty());
+
 	drawItems();
 
 	if (mBorder)
@@ -1879,7 +1535,7 @@ BOOL LLScrollListCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sti
 	}
 
 	// otherwise, look for a tooltip associated with this column
-	LLColumnHeader* headerp = columnp->mHeader;
+	LLScrollColumnHeader* headerp = columnp->mHeader;
 	if (headerp && !handled)
 	{
 		headerp->handleToolTip(x, y, msg, sticky_rect_screen);
@@ -1922,7 +1578,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
 						{
 							if(mOnMaximumSelectCallback)
 							{
-								mOnMaximumSelectCallback(mCallbackUserData);
+								mOnMaximumSelectCallback();
 							}
 							break;
 						}
@@ -1960,7 +1616,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
 					{
 						if(mOnMaximumSelectCallback)
 						{
-							mOnMaximumSelectCallback(mCallbackUserData);
+							mOnMaximumSelectCallback();
 						}
 					}
 				}
@@ -2051,7 +1707,7 @@ BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
 		{
 			if( mCanSelect && mOnDoubleClickCallback )
 			{
-				mOnDoubleClickCallback( mCallbackUserData );
+				mOnDoubleClickCallback();
 			}
 		}
 	}
@@ -2221,11 +1877,11 @@ BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask)
 		LLScrollListItem* item = hitItem(x, y);
 		if (item)
 		{
-			highlightNthItem(getItemIndex(item));
+			mouseOverHighlightNthItem(getItemIndex(item));
 		}
 		else
 		{
-			highlightNthItem(-1);
+			mouseOverHighlightNthItem(-1);
 		}
 	}
 
@@ -2234,6 +1890,11 @@ BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask)
 	return handled;
 }
 
+void LLScrollListCtrl::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+	// clear mouse highlight
+	mouseOverHighlightNthItem(-1);
+}
 
 BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask )
 {
@@ -2378,7 +2039,8 @@ BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char)
 	}
 
 	// perform incremental search based on keyboard input
-	if (mSearchTimer.getElapsedTimeF32() > LLUI::sConfigGroup->getF32("TypeAheadTimeout"))
+	static LLUICachedControl<F32> type_ahead_timeout ("TypeAheadTimeout", 0);
+	if (mSearchTimer.getElapsedTimeF32() > type_ahead_timeout)
 	{
 		mSearchString.clear();
 	}
@@ -2554,7 +2216,7 @@ BOOL LLScrollListCtrl::setSort(S32 column_idx, BOOL ascending)
 	LLScrollListColumn* sort_column = getColumn(column_idx);
 	if (!sort_column) return FALSE;
 
-	sort_column->mSortAscending = ascending;
+	sort_column->mSortDirection = ascending ? LLScrollListColumn::ASCENDING : LLScrollListColumn::DESCENDING;
 
 	sort_column_t new_sort_column(column_idx, ascending);
 
@@ -2579,11 +2241,9 @@ BOOL LLScrollListCtrl::setSort(S32 column_idx, BOOL ascending)
 }
 
 // Called by scrollbar
-//static
-void LLScrollListCtrl::onScrollChange( S32 new_pos, LLScrollbar* scrollbar, void* userdata )
+void LLScrollListCtrl::onScrollChange( S32 new_pos, LLScrollbar* scrollbar )
 {
-	LLScrollListCtrl* self = (LLScrollListCtrl*) userdata;
-	self->mScrollLines = new_pos;
+	mScrollLines = new_pos;
 }
 
 
@@ -2656,7 +2316,7 @@ void LLScrollListCtrl::setScrollPos( S32 pos )
 {
 	mScrollbar->setDocPos( pos );
 
-	onScrollChange(mScrollbar->getDocPos(), mScrollbar, this);
+	onScrollChange(mScrollbar->getDocPos(), mScrollbar);
 }
 
 
@@ -2706,293 +2366,6 @@ void LLScrollListCtrl::updateStaticColumnWidth(LLScrollListColumn* col, S32 new_
 	mTotalStaticColumnWidth += llmax(0, new_width) - llmax(0, col->getWidth());
 }
 
-
-// virtual
-LLXMLNodePtr LLScrollListCtrl::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	// Attributes
-
-	node->createChild("multi_select", TRUE)->setBoolValue(mAllowMultipleSelection);
-
-	node->createChild("draw_border", TRUE)->setBoolValue((mBorder != NULL));
-
-	node->createChild("draw_heading", TRUE)->setBoolValue(mDisplayColumnHeaders);
-
-	node->createChild("background_visible", TRUE)->setBoolValue(mBackgroundVisible);
-
-	node->createChild("draw_stripes", TRUE)->setBoolValue(mDrawStripes);
-
-	node->createChild("column_padding", TRUE)->setIntValue(mColumnPadding);
-
-	addColorXML(node, mBgWriteableColor, "bg_writeable_color", "ScrollBgWriteableColor");
-	addColorXML(node, mBgReadOnlyColor, "bg_read_only_color", "ScrollBgReadOnlyColor");
-	addColorXML(node, mBgSelectedColor, "bg_selected_color", "ScrollSelectedBGColor");
-	addColorXML(node, mBgStripeColor, "bg_stripe_color", "ScrollBGStripeColor");
-	addColorXML(node, mFgSelectedColor, "fg_selected_color", "ScrollSelectedFGColor");
-	addColorXML(node, mFgUnselectedColor, "fg_unselected_color", "ScrollUnselectedColor");
-	addColorXML(node, mFgDisabledColor, "fg_disable_color", "ScrollDisabledColor");
-	addColorXML(node, mHighlightedColor, "highlighted_color", "ScrollHighlightedColor");
-
-	// Contents
-
-	std::map<std::string, LLScrollListColumn>::const_iterator itor;
-	std::vector<const LLScrollListColumn*> sorted_list;
-	sorted_list.resize(mColumns.size());
-	for (itor = mColumns.begin(); itor != mColumns.end(); ++itor)
-	{
-		sorted_list[itor->second.mIndex] = &itor->second;
-	}
-
-	std::vector<const LLScrollListColumn*>::iterator itor2;
-	for (itor2 = sorted_list.begin(); itor2 != sorted_list.end(); ++itor2)
-	{
-		LLXMLNodePtr child_node = node->createChild("column", FALSE);
-		const LLScrollListColumn *column = *itor2;
-
-		child_node->createChild("name", TRUE)->setStringValue(column->mName);
-		child_node->createChild("label", TRUE)->setStringValue(column->mLabel);
-		child_node->createChild("width", TRUE)->setIntValue(column->getWidth());
-	}
-
-	return node;
-}
-
-void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node)
-{
-	// James: This is not a good way to do colors. We need a central "UI style"
-	// manager that sets the colors for ALL scroll lists, buttons, etc.
-
-	LLColor4 color;
-	if(node->hasAttribute("fg_unselected_color"))
-	{
-		LLUICtrlFactory::getAttributeColor(node,"fg_unselected_color", color);
-		setFgUnselectedColor(color);
-	}
-	if(node->hasAttribute("fg_selected_color"))
-	{
-		LLUICtrlFactory::getAttributeColor(node,"fg_selected_color", color);
-		setFgSelectedColor(color);
-	}
-	if(node->hasAttribute("bg_selected_color"))
-	{
-		LLUICtrlFactory::getAttributeColor(node,"bg_selected_color", color);
-		setBgSelectedColor(color);
-	}
-	if(node->hasAttribute("fg_disable_color"))
-	{
-		LLUICtrlFactory::getAttributeColor(node,"fg_disable_color", color);
-		setFgDisableColor(color);
-	}
-	if(node->hasAttribute("bg_writeable_color"))
-	{
-		LLUICtrlFactory::getAttributeColor(node,"bg_writeable_color", color);
-		setBgWriteableColor(color);
-	}
-	if(node->hasAttribute("bg_read_only_color"))
-	{
-		LLUICtrlFactory::getAttributeColor(node,"bg_read_only_color", color);
-		setReadOnlyBgColor(color);
-	}
-	if (LLUICtrlFactory::getAttributeColor(node,"bg_stripe_color", color))
-	{
-		setBgStripeColor(color);
-	}
-	if (LLUICtrlFactory::getAttributeColor(node,"highlighted_color", color))
-	{
-		setHighlightedColor(color);
-	}
-
-	if(node->hasAttribute("background_visible"))
-	{
-		BOOL background_visible;
-		node->getAttributeBOOL("background_visible", background_visible);
-		setBackgroundVisible(background_visible);
-	}
-
-	if(node->hasAttribute("draw_stripes"))
-	{
-		BOOL draw_stripes;
-		node->getAttributeBOOL("draw_stripes", draw_stripes);
-		setDrawStripes(draw_stripes);
-	}
-	
-	if(node->hasAttribute("column_padding"))
-	{
-		S32 column_padding;
-		node->getAttributeS32("column_padding", column_padding);
-		setColumnPadding(column_padding);
-	}
-}
-
-// static
-LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("scroll_list");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	BOOL multi_select = FALSE;
-	node->getAttributeBOOL("multi_select", multi_select);
-
-	BOOL draw_border = TRUE;
-	node->getAttributeBOOL("draw_border", draw_border);
-
-	BOOL draw_heading = FALSE;
-	node->getAttributeBOOL("draw_heading", draw_heading);
-
-	S32 search_column = 0;
-	node->getAttributeS32("search_column", search_column);
-
-	S32 sort_column = -1;
-	node->getAttributeS32("sort_column", sort_column);
-
-	BOOL sort_ascending = TRUE;
-	node->getAttributeBOOL("sort_ascending", sort_ascending);
-
-	LLUICtrlCallback callback = NULL;
-
-	LLScrollListCtrl* scroll_list = new LLScrollListCtrl(
-		name,
-		rect,
-		callback,
-		NULL,
-		multi_select,
-		draw_border);
-
-	scroll_list->setDisplayHeading(draw_heading);
-	if (node->hasAttribute("heading_height"))
-	{
-		S32 heading_height;
-		node->getAttributeS32("heading_height", heading_height);
-		scroll_list->setHeadingHeight(heading_height);
-	}
-
-	scroll_list->setScrollListParameters(node);
-
-	scroll_list->initFromXML(node, parent);
-
-	scroll_list->setSearchColumn(search_column);
-
-	LLSD columns;
-	S32 index = 0;
-	LLXMLNodePtr child;
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-	{
-		if (child->hasName("column"))
-		{
-			std::string labelname("");
-			child->getAttributeString("label", labelname);
-
-			std::string columnname(labelname);
-			child->getAttributeString("name", columnname);
-
-			std::string sortname(columnname);
-			child->getAttributeString("sort", sortname);
-		
-			BOOL sort_ascending = TRUE;
-			child->getAttributeBOOL("sort_ascending", sort_ascending);
-
-			std::string imagename;
-			child->getAttributeString("image", imagename);
-
-			BOOL columndynamicwidth = FALSE;
-			child->getAttributeBOOL("dynamicwidth", columndynamicwidth);
-
-			S32 columnwidth = -1;
-			child->getAttributeS32("width", columnwidth);	
-
-			std::string tooltip;
-			child->getAttributeString("tool_tip", tooltip);
-
-			F32 columnrelwidth = 0.f;
-			child->getAttributeF32("relwidth", columnrelwidth);
-
-			LLFontGL::HAlign h_align = LLFontGL::LEFT;
-			h_align = LLView::selectFontHAlign(child);
-
-			columns[index]["name"] = columnname;
-			columns[index]["sort"] = sortname;
-			columns[index]["sort_ascending"] = sort_ascending;
-			columns[index]["image"] = imagename;
-			columns[index]["label"] = labelname;
-			columns[index]["width"] = columnwidth;
-			columns[index]["relwidth"] = columnrelwidth;
-			columns[index]["dynamicwidth"] = columndynamicwidth;
-			columns[index]["halign"] = (S32)h_align;
-			columns[index]["tool_tip"] = tooltip;
-			
-			index++;
-		}
-	}
-	scroll_list->setColumnHeadings(columns);
-
-	if (sort_column >= 0)
-	{
-		scroll_list->sortByColumnIndex(sort_column, sort_ascending);
-	}
-
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-	{
-		if (child->hasName("row"))
-		{
-			LLUUID id;
-			child->getAttributeUUID("id", id);
-
-			LLSD row;
-
-			row["id"] = id;
-
-			S32 column_idx = 0;
-			LLXMLNodePtr row_child;
-			for (row_child = child->getFirstChild(); row_child.notNull(); row_child = row_child->getNextSibling())
-			{
-				if (row_child->hasName("column"))
-				{
-					std::string value = row_child->getTextContents();
-
-					std::string columnname("");
-					row_child->getAttributeString("name", columnname);
-
-					std::string font("");
-					row_child->getAttributeString("font", font);
-
-					std::string font_style("");
-					row_child->getAttributeString("font-style", font_style);
-
-					row["columns"][column_idx]["column"] = columnname;
-					row["columns"][column_idx]["value"] = value;
-					row["columns"][column_idx]["font"] = font;
-					row["columns"][column_idx]["font-style"] = font_style;
-					column_idx++;
-				}
-			}
-			scroll_list->addElement(row);
-		}
-	}
-
-	std::string contents = node->getTextContents();
-	if (!contents.empty())
-	{
-		typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
-		boost::char_separator<char> sep("\t\n");
-		tokenizer tokens(contents, sep);
-		tokenizer::iterator token_iter = tokens.begin();
-
-		while(token_iter != tokens.end())
-		{
-			const std::string& line = *token_iter;
-			scroll_list->addSimpleElement(line);
-			++token_iter;
-		}
-	}
-	
-	return scroll_list;
-}
-
 // LLEditMenuHandler functions
 
 // virtual
@@ -3068,20 +2441,27 @@ BOOL	LLScrollListCtrl::canDeselect() const
 
 void LLScrollListCtrl::addColumn(const LLSD& column, EAddPosition pos)
 {
-	std::string name = column["name"].asString();
+	LLScrollListColumn::Params p;
+	LLParamSDParser::instance().readSD(column, p);
+	addColumn(p, pos);
+}
+
+void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params, EAddPosition pos)
+{
+	if (!column_params.validateBlock()) return;
+
+	std::string name = column_params.name;
 	// if no column name provided, just use ordinal as name
 	if (name.empty())
 	{
-		std::ostringstream new_name;
-		new_name << mColumnsIndexed.size();
-		name = new_name.str();
+		name = llformat("%d", mColumnsIndexed.size());
 	}
+
 	if (mColumns.find(name) == mColumns.end())
 	{
 		// Add column
-		mColumns[name] = LLScrollListColumn(column, this);
+		mColumns[name] = LLScrollListColumn(column_params, this);
 		LLScrollListColumn* new_column = &mColumns[name];
-		new_column->mParentCtrl = this;
 		new_column->mIndex = mColumns.size()-1;
 
 		// Add button
@@ -3101,44 +2481,47 @@ void LLScrollListCtrl::addColumn(const LLSD& column, EAddPosition pos)
 				new_column->setWidth((mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding) / mNumDynamicWidthColumns);
 			}
 			S32 top = mItemListRect.mTop;
+
 			S32 left = mItemListRect.mLeft;
+			for (std::map<std::string, LLScrollListColumn>::iterator itor = mColumns.begin(); 
+				itor != mColumns.end(); 
+				++itor)
 			{
-				std::map<std::string, LLScrollListColumn>::iterator itor;
-				for (itor = mColumns.begin(); itor != mColumns.end(); ++itor)
+				if (itor->second.mIndex < new_column->mIndex &&
+					itor->second.getWidth() > 0)
 				{
-					if (itor->second.mIndex < new_column->mIndex &&
-						itor->second.getWidth() > 0)
-					{
-						left += itor->second.getWidth() + mColumnPadding;
-					}
+					left += itor->second.getWidth() + mColumnPadding;
 				}
 			}
-			std::string button_name = "btn_" + name;
+
 			S32 right = left+new_column->getWidth();
 			if (new_column->mIndex != (S32)mColumns.size()-1)
 			{
 				right += mColumnPadding;
 			}
+
 			LLRect temp_rect = LLRect(left,top+mHeadingHeight,right,top);
-			new_column->mHeader = new LLColumnHeader(button_name, temp_rect, new_column); 
-			if(column["image"].asString() != "")
+
+			LLScrollColumnHeader::Params params;
+			params.name = "btn_" + name;
+			params.rect = temp_rect;
+			params.column = new_column;
+			params.tool_tip = column_params.tool_tip;
+			params.tab_stop = false;
+			params.visible = mDisplayColumnHeaders;
+
+			if(column_params.header.image.isProvided())
 			{
-				//new_column->mHeader->setScaleImage(false);
-				new_column->mHeader->setImage(column["image"].asString());				
+				params.image_selected = column_params.header.image;
+				params.image_unselected = column_params.header.image;
 			}
 			else
 			{
-				new_column->mHeader->setLabel(new_column->mLabel);
-				//new_column->mHeader->setLabel(new_column->mLabel);
+				params.label = column_params.header.label;
 			}
 
-			new_column->mHeader->setToolTip(column["tool_tip"].asString());
-
-			//RN: although it might be useful to change sort order with the keyboard,
-			// mixing tab stops on child items along with the parent item is not supported yet
-			new_column->mHeader->setTabStop(FALSE);
+			new_column->mHeader = LLUICtrlFactory::create<LLScrollColumnHeader>(params); 
 			addChild(new_column->mHeader);
-			new_column->mHeader->setVisible(mDisplayColumnHeaders);
 
 			sendChildToFront(mScrollbar);
 		}
@@ -3159,7 +2542,7 @@ void LLScrollListCtrl::onClickColumn(void *userdata)
 	S32 column_index = info->mIndex;
 
 	LLScrollListColumn* column = parent->mColumnsIndexed[info->mIndex];
-	bool ascending = column->mSortAscending;
+	bool ascending = column->mSortDirection == LLScrollListColumn::ASCENDING;
 	if (column->mSortingColumn != column->mName
 		&& parent->mColumns.find(column->mSortingColumn) != parent->mColumns.end())
 	{
@@ -3178,7 +2561,7 @@ void LLScrollListCtrl::onClickColumn(void *userdata)
 
 	if (parent->mOnSortChangedCallback)
 	{
-		parent->mOnSortChangedCallback(parent->getCallbackUserData());
+		parent->mOnSortChangedCallback();
 	}
 }
 
@@ -3200,7 +2583,7 @@ void LLScrollListCtrl::clearColumns()
 	std::map<std::string, LLScrollListColumn>::iterator itor;
 	for (itor = mColumns.begin(); itor != mColumns.end(); ++itor)
 	{
-		LLColumnHeader *header = itor->second.mHeader;
+		LLScrollColumnHeader *header = itor->second.mHeader;
 		if (header)
 		{
 			removeChild(header);
@@ -3215,13 +2598,13 @@ void LLScrollListCtrl::clearColumns()
 
 void LLScrollListCtrl::setColumnLabel(const std::string& column, const std::string& label)
 {
-	std::map<std::string, LLScrollListColumn>::iterator itor = mColumns.find(column);
-	if (itor != mColumns.end())
+	LLScrollListColumn* columnp = getColumn(column);
+	if (columnp)
 	{
-		itor->second.mLabel = label;
-		if (itor->second.mHeader)
+		columnp->mLabel = label;
+		if (columnp->mHeader)
 		{
-			itor->second.mHeader->setLabel(label);
+			columnp->mHeader->setLabel(label);
 		}
 	}
 }
@@ -3235,74 +2618,62 @@ LLScrollListColumn* LLScrollListCtrl::getColumn(S32 index)
 	return mColumnsIndexed[index];
 }
 
-void LLScrollListCtrl::setColumnHeadings(LLSD headings)
+LLScrollListColumn* LLScrollListCtrl::getColumn(const std::string& name)
 {
-	mColumns.clear();
-	LLSD::array_const_iterator itor;
-	for (itor = headings.beginArray(); itor != headings.endArray(); ++itor)
+	column_map_t::iterator column_itor = mColumns.find(name);
+	if (column_itor != mColumns.end()) 
 	{
-		addColumn(*itor);
+		return &column_itor->second;
 	}
+	return NULL;
 }
 
-LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition pos, void* userdata)
+
+LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata)
 {
-	// ID
-	LLSD id = value["id"];
+	LLScrollListItem::Params item_params;
+	LLParamSDParser::instance().readSD(element, item_params);
+	item_params.userdata = userdata;
+	return addRow(item_params, pos);
+}
 
-	LLScrollListItem *new_item = new LLScrollListItem(id, userdata);
-	if (value.has("enabled"))
-	{
-		new_item->setEnabled( value["enabled"].asBoolean() );
-	}
+LLScrollListItem* LLScrollListCtrl::addRow(const LLScrollListItem::Params& item_p, EAddPosition pos)
+{
+	if (!item_p.validateBlock()) return NULL;
 
+	LLScrollListItem *new_item = new LLScrollListItem(item_p);
 	new_item->setNumColumns(mColumns.size());
 
 	// Add any columns we don't already have
-	LLSD columns = value["columns"];
-	LLSD::array_const_iterator itor;
-	S32 col_index = 0 ;
-	for (itor = columns.beginArray(); itor != columns.endArray(); ++itor)
-	{
-		if (itor->isUndefined())
-		{
-			// skip unused columns in item passed in
-			continue;
-		}
-		std::string column = (*itor)["column"].asString();
+	S32 col_index = 0;
 
-		LLScrollListColumn* columnp = NULL;
+	for(LLInitParam::ParamIterator<LLScrollListCell::Params>::const_iterator itor = item_p.cells().begin();
+		itor != item_p.cells().end();
+		++itor)
+	{
+		LLScrollListCell::Params cell_p = *itor;
+		std::string column = cell_p.column;
 
 		// empty columns strings index by ordinal
 		if (column.empty())
 		{
-			std::ostringstream new_name;
-			new_name << col_index;
-			column = new_name.str();
+			column = llformat("%d", col_index);
 		}
 
-		std::map<std::string, LLScrollListColumn>::iterator column_itor;
-		column_itor = mColumns.find(column);
-		if (column_itor != mColumns.end()) 
-		{
-			columnp = &column_itor->second;
-		}
+		LLScrollListColumn* columnp = getColumn(column);
 
 		// create new column on demand
 		if (!columnp)
 		{
-			LLSD new_column;
-			new_column["name"] = column;
-			new_column["label"] = column;
+			LLScrollListColumn::Params new_column;
+			new_column.name = column;
+			new_column.header.label = column;
+
 			// if width supplied for column, use it, otherwise 
 			// use adaptive width
-			if (itor->has("width"))
-			{
-				new_column["width"] = (*itor)["width"];
-			}
-			else
+			if (cell_p.width.isProvided())
 			{
-				new_column["dynamicwidth"] = true;
+				new_column.width.pixel_width = cell_p.width;
 			}
 			addColumn(new_column);
 			columnp = &mColumns[column];
@@ -3310,91 +2681,48 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition p
 		}
 
 		S32 index = columnp->mIndex;
-		S32 width = columnp->getWidth();
-		LLFontGL::HAlign font_alignment = columnp->mFontAlignment;
-		LLColor4 fcolor = LLColor4::black;
-		
-		LLSD value = (*itor)["value"];
-		std::string fontname = (*itor)["font"].asString();
-		std::string fontstyle = (*itor)["font-style"].asString();
-		std::string type = (*itor)["type"].asString();
-		
-		if ((*itor).has("font-color"))
-		{
-			LLSD sd_color = (*itor)["font-color"];
-			fcolor.setValue(sd_color);
-		}
-		
-		BOOL has_color = (*itor).has("color");
-		LLColor4 color = ((*itor)["color"]);
-		BOOL enabled = !(*itor).has("enabled") || (*itor)["enabled"].asBoolean() == true;
+		cell_p.width.setIfNotProvided(columnp->getWidth());
 
-		const LLFontGL *font = LLResMgr::getInstance()->getRes(fontname);
-		if (!font)
-		{
-			font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL );
-		}
-		U8 font_style = LLFontGL::getStyleFromString(fontstyle);
+		LLScrollListCell* cell = LLScrollListCell::create(cell_p);
 
-		if (type == "icon")
+		if (cell)
 		{
-			LLScrollListIcon* cell = new LLScrollListIcon(value, width);
-			if (has_color)
-			{
-				cell->setColor(color);
-			}
 			new_item->setColumn(index, cell);
-		}
-		else if (type == "checkbox")
-		{
-			LLCheckBoxCtrl* ctrl = new LLCheckBoxCtrl(std::string("check"),
-													  LLRect(0, width, width, 0), std::string(" "));
-			ctrl->setEnabled(enabled);
-			ctrl->setValue(value);
-			LLScrollListCheck* cell = new LLScrollListCheck(ctrl,width);
-			if (has_color)
+			if (columnp->mHeader 
+				&& cell->isText() 
+				&& !cell->getValue().asString().empty())
 			{
-				cell->setColor(color);
-			}
-			new_item->setColumn(index, cell);
-		}
-		else if (type == "separator")
-		{
-			LLScrollListSeparator* cell = new LLScrollListSeparator(width);
-			if (has_color)
-			{
-				cell->setColor(color);
+				columnp->mHeader->setHasResizableElement(TRUE);
 			}
-			new_item->setColumn(index, cell);
 		}
-		else if (type == "date")
+
+		col_index++;
+	}
+
+	if (item_p.cells().empty())
+	{
+		if (mColumns.empty())
 		{
-			LLScrollListDate* cell = new LLScrollListDate(value.asDate(), font, width, font_style, font_alignment);
-			if (has_color)
-			{
-				cell->setColor(color);
-			}
-			new_item->setColumn(index, cell);
-			if (columnp->mHeader && !value.asString().empty())
-			{
-				columnp->mHeader->setHasResizableElement(TRUE);
-			}
+			LLScrollListColumn::Params new_column;
+			new_column.name = "0";
+
+			addColumn(new_column);
+			new_item->setNumColumns(mColumns.size());
 		}
-		else
+
+		LLScrollListCell* cell = LLScrollListCell::create(LLScrollListCell::Params().value(item_p.value));
+		if (cell)
 		{
-			LLScrollListText* cell = new LLScrollListText(value.asString(), font, width, font_style, font_alignment, fcolor, TRUE);
-			if (has_color)
-			{
-				cell->setColor(color);
-			}
-			new_item->setColumn(index, cell);
-			if (columnp->mHeader && !value.asString().empty())
+			LLScrollListColumn* columnp = &(mColumns.begin()->second);
+
+			new_item->setColumn(0, cell);
+			if (columnp->mHeader 
+				&& cell->isText() 
+				&& !cell->getValue().asString().empty())
 			{
 				columnp->mHeader->setHasResizableElement(TRUE);
 			}
 		}
-
-		col_index++;
 	}
 
 	// add dummy cells for missing columns
@@ -3404,12 +2732,14 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition p
 		if (new_item->getColumn(column_idx) == NULL)
 		{
 			LLScrollListColumn* column_ptr = &column_it->second;
-			new_item->setColumn(column_idx, new LLScrollListText(LLStringUtil::null, LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ), column_ptr->getWidth(), LLFontGL::NORMAL));
+			LLScrollListCell::Params cell_p;
+			cell_p.width = column_ptr->getWidth();
+			
+			new_item->setColumn(column_idx, new LLScrollListSpacer(cell_p));
 		}
 	}
 
 	addItem(new_item, pos);
-
 	return new_item;
 }
 
@@ -3422,14 +2752,13 @@ LLScrollListItem* LLScrollListCtrl::addSimpleElement(const std::string& value, E
 		entry_id = value;
 	}
 
-	LLScrollListItem *new_item = new LLScrollListItem(entry_id);
-
-	const LLFontGL *font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL );
-
-	new_item->addColumn(value, font, getRect().getWidth());
-
-	addItem(new_item, pos);
-	return new_item;
+	LLScrollListItem::Params item_params;
+	item_params.value(entry_id);
+	item_params.cells.add()
+		.value(value)
+		.font(LLFontGL::getFontSansSerifSmall());
+	
+	return addRow(item_params, pos);
 }
 
 void LLScrollListCtrl::setValue(const LLSD& value )
@@ -3530,484 +2859,3 @@ void LLScrollListCtrl::onFocusLost()
 	LLUICtrl::onFocusLost();
 }
 
-LLColumnHeader::LLColumnHeader(const std::string& label, const LLRect &rect, LLScrollListColumn* column, const LLFontGL* fontp) : 
-	LLComboBox(label, rect, label, NULL, NULL), 
-	mColumn(column),
-	mOrigLabel(label),
-	mShowSortOptions(FALSE),
-	mHasResizableElement(FALSE)
-{
-	mListPosition = LLComboBox::ABOVE;
-	setCommitCallback(onSelectSort);
-	setCallbackUserData(this);
-	mButton->setTabStop(FALSE);
-	// require at least two frames between mouse down and mouse up event to capture intentional "hold" not just bad framerate
-	mButton->setHeldDownDelay(LLUI::sConfigGroup->getF32("ColumnHeaderDropDownDelay"), 2);
-	mButton->setHeldDownCallback(onHeldDown);
-	mButton->setClickedCallback(onClick);
-	mButton->setMouseDownCallback(onMouseDown);
-
-	mButton->setCallbackUserData(this);
-	mButton->setToolTip(label);
-
-	mAscendingText = std::string("[LOW]...[HIGH](Ascending)"); // *TODO: Translate
-	mDescendingText = std::string("[HIGH]...[LOW](Descending)"); // *TODO: Translate
-
-	mList->reshape(llmax(mList->getRect().getWidth(), 110, getRect().getWidth()), mList->getRect().getHeight());
-
-	// resize handles on left and right
-	const S32 RESIZE_BAR_THICKNESS = 3;
-	mResizeBar = new LLResizeBar( 
-		std::string("resizebar"),
-		this,
-		LLRect( getRect().getWidth() - RESIZE_BAR_THICKNESS, getRect().getHeight(), getRect().getWidth(), 0), 
-		MIN_COLUMN_WIDTH, S32_MAX, LLResizeBar::RIGHT );
-	addChild(mResizeBar);
-
-	mResizeBar->setEnabled(FALSE);
-}
-
-LLColumnHeader::~LLColumnHeader()
-{
-}
-
-void LLColumnHeader::draw()
-{
-	BOOL draw_arrow = !mColumn->mLabel.empty() && mColumn->mParentCtrl->isSorted() && mColumn->mParentCtrl->getSortColumnName() == mColumn->mSortingColumn;
-
-	BOOL is_ascending = mColumn->mParentCtrl->getSortAscending();
-	mButton->setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, draw_arrow ? LLColor4::white : LLColor4::transparent);
-	mArrowImage = mButton->getImageOverlay();
-
-	//BOOL clip = getRect().mRight > mColumn->mParentCtrl->getItemListRect().getWidth();
-	//LLGLEnable scissor_test(clip ? GL_SCISSOR_TEST : GL_FALSE);
-
-	//LLRect column_header_local_rect(-getRect().mLeft, getRect().getHeight(), mColumn->mParentCtrl->getItemListRect().getWidth() - getRect().mLeft, 0);
-	//LLUI::setScissorRegionLocal(column_header_local_rect);
-
-	// Draw children
-	LLComboBox::draw();
-
-	if (mList->getVisible())
-	{
-		// sync sort order with list selection every frame
-		mColumn->mParentCtrl->sortByColumn(mColumn->mSortingColumn, getCurrentIndex() == 0);
-	}
-}
-
-BOOL LLColumnHeader::handleDoubleClick(S32 x, S32 y, MASK mask)
-{
-	if (canResize() && mResizeBar->getRect().pointInRect(x, y))
-	{
-		// reshape column to max content width
-		LLRect column_rect = getRect();
-		column_rect.mRight = column_rect.mLeft + mColumn->mMaxContentWidth;
-		userSetShape(column_rect);
-	}
-	else
-	{
-		onClick(this);
-	}
-	return TRUE;
-}
-
-void LLColumnHeader::setImage(const std::string &image_name)
-{
-	if (mButton)
-	{
-		mButton->setImageSelected(image_name);
-		mButton->setImageUnselected(image_name);
-	}
-}
-
-//static
-void LLColumnHeader::onClick(void* user_data)
-{
-	LLColumnHeader* headerp = (LLColumnHeader*)user_data;
-	if (!headerp) return;
-
-	LLScrollListColumn* column = headerp->mColumn;
-	if (!column) return;
-
-	if (headerp->mList->getVisible())
-	{
-		headerp->hideList();
-	}
-
-	LLScrollListCtrl::onClickColumn(column);
-
-	// propagate new sort order to sort order list
-	headerp->mList->selectNthItem(column->mParentCtrl->getSortAscending() ? 0 : 1);
-}
-
-//static
-void LLColumnHeader::onMouseDown(void* user_data)
-{
-	// for now, do nothing but block the normal showList() behavior
-	return;
-}
-
-//static
-void LLColumnHeader::onHeldDown(void* user_data)
-{
-	LLColumnHeader* headerp = (LLColumnHeader*)user_data;
-	headerp->showList();
-}
-
-void LLColumnHeader::showList()
-{
-	if (mShowSortOptions)
-	{
-		//LLSD item_val = mColumn->mParentCtrl->getFirstData()->getValue();
-		mOrigLabel = mButton->getLabelSelected();
-
-		// move sort column over to this column and do initial sort
-		mColumn->mParentCtrl->sortByColumn(mColumn->mSortingColumn, mColumn->mParentCtrl->getSortAscending());
-
-		std::string low_item_text;
-		std::string high_item_text;
-
-		LLScrollListItem* itemp = mColumn->mParentCtrl->getFirstData();
-		if (itemp)
-		{
-			LLScrollListCell* cell = itemp->getColumn(mColumn->mIndex);
-			if (cell && cell->isText())
-			{
-				if (mColumn->mParentCtrl->getSortAscending())
-				{
-					low_item_text = cell->getValue().asString();
-				}
-				else
-				{
-					high_item_text = cell->getValue().asString();
-				}
-			}
-		}
-
-		itemp = mColumn->mParentCtrl->getLastData();
-		if (itemp)
-		{
-			LLScrollListCell* cell = itemp->getColumn(mColumn->mIndex);
-			if (cell && cell->isText())
-			{
-				if (mColumn->mParentCtrl->getSortAscending())
-				{
-					high_item_text = cell->getValue().asString();
-				}
-				else
-				{
-					low_item_text = cell->getValue().asString();
-				}
-			}
-		}
-
-		LLStringUtil::truncate(low_item_text, 3);
-		LLStringUtil::truncate(high_item_text, 3);
-
-		std::string ascending_string;
-		std::string descending_string;
-
-		if (low_item_text.empty() || high_item_text.empty())
-		{
-			ascending_string = "Ascending";
-			descending_string = "Descending";
-		}
-		else
-		{
-			mAscendingText.setArg("[LOW]", low_item_text);
-			mAscendingText.setArg("[HIGH]", high_item_text);
-			mDescendingText.setArg("[LOW]", low_item_text);
-			mDescendingText.setArg("[HIGH]", high_item_text);
-			ascending_string = mAscendingText.getString();
-			descending_string = mDescendingText.getString();
-		}
-
-		S32 text_width = LLFontGL::getFontSansSerifSmall()->getWidth(ascending_string);
-		text_width = llmax(text_width, LLFontGL::getFontSansSerifSmall()->getWidth(descending_string)) + 10;
-		text_width = llmax(text_width, getRect().getWidth() - 30);
-
-		mList->getColumn(0)->setWidth(text_width);
-		((LLScrollListText*)mList->getFirstData()->getColumn(0))->setText(ascending_string);
-		((LLScrollListText*)mList->getLastData()->getColumn(0))->setText(descending_string);
-
-		mList->reshape(llmax(text_width + 30, 110, getRect().getWidth()), mList->getRect().getHeight());
-
-		LLComboBox::showList();
-	}
-}
-
-//static 
-void LLColumnHeader::onSelectSort(LLUICtrl* ctrl, void* user_data)
-{
-	LLColumnHeader* headerp = (LLColumnHeader*)user_data;
-	if (!headerp) return;
-
-	LLScrollListColumn* column = headerp->mColumn;
-	if (!column) return;
-	LLScrollListCtrl *parent = column->mParentCtrl;
-	if (!parent) return;
-
-	if (headerp->getCurrentIndex() == 0)
-	{
-		// ascending
-		parent->sortByColumn(column->mSortingColumn, TRUE);
-	}
-	else
-	{
-		// descending
-		parent->sortByColumn(column->mSortingColumn, FALSE);
-	}
-
-	// restore original column header
-	headerp->setLabel(headerp->mOrigLabel);
-}
-
-LLView*	LLColumnHeader::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding)
-{
-	// this logic assumes dragging on right
-	llassert(snap_edge == SNAP_RIGHT);
-
-	// use higher snap threshold for column headers
-	threshold = llmin(threshold, 10);
-
-	LLRect snap_rect = getSnapRect();
-
-	S32 snap_delta = mColumn->mMaxContentWidth - snap_rect.getWidth();
-
-	// x coord growing means column growing, so same signs mean we're going in right direction
-	if (llabs(snap_delta) <= threshold && mouse_dir.mX * snap_delta > 0 ) 
-	{
-		new_edge_val = snap_rect.mRight + snap_delta;
-	}
-	else 
-	{
-		LLScrollListColumn* next_column = mColumn->mParentCtrl->getColumn(mColumn->mIndex + 1);
-		while (next_column)
-		{
-			if (next_column->mHeader)
-			{
-				snap_delta = (next_column->mHeader->getSnapRect().mRight - next_column->mMaxContentWidth) - snap_rect.mRight;
-				if (llabs(snap_delta) <= threshold && mouse_dir.mX * snap_delta > 0 ) 
-				{
-					new_edge_val = snap_rect.mRight + snap_delta;
-				}
-				break;
-			}
-			next_column = mColumn->mParentCtrl->getColumn(next_column->mIndex + 1);
-		}
-	}
-
-	return this;
-}
-
-void LLColumnHeader::userSetShape(const LLRect& new_rect)
-{
-	S32 new_width = new_rect.getWidth();
-	S32 delta_width = new_width - (getRect().getWidth() /*+ mColumn->mParentCtrl->getColumnPadding()*/);
-
-	if (delta_width != 0)
-	{
-		S32 remaining_width = -delta_width;
-		S32 col;
-		for (col = mColumn->mIndex + 1; col < mColumn->mParentCtrl->getNumColumns(); col++)
-		{
-			LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
-			if (!columnp) continue;
-
-			if (columnp->mHeader && columnp->mHeader->canResize())
-			{
-				// how many pixels in width can this column afford to give up?
-				S32 resize_buffer_amt = llmax(0, columnp->getWidth() - MIN_COLUMN_WIDTH);
-				
-				// user shrinking column, need to add width to other columns
-				if (delta_width < 0)
-				{
-					if (/*!columnp->mDynamicWidth && */columnp->getWidth() > 0)
-					{
-						// statically sized column, give all remaining width to this column
-						columnp->setWidth(columnp->getWidth() + remaining_width);
-						if (columnp->mRelWidth > 0.f)
-						{
-							columnp->mRelWidth = (F32)columnp->getWidth() / (F32)mColumn->mParentCtrl->getItemListRect().getWidth();
-						}
-						// all padding went to this widget, we're done
-						break;
-					}
-				}
-				else
-				{
-					// user growing column, need to take width from other columns
-					remaining_width += resize_buffer_amt;
-
-					if (/*!columnp->mDynamicWidth && */columnp->getWidth() > 0)
-					{
-						columnp->setWidth(columnp->getWidth() - llmin(columnp->getWidth() - MIN_COLUMN_WIDTH, delta_width));
-						if (columnp->mRelWidth > 0.f)
-						{
-							columnp->mRelWidth = (F32)columnp->getWidth() / (F32)mColumn->mParentCtrl->getItemListRect().getWidth();
-						}
-					}
-
-					if (remaining_width >= 0)
-					{
-						// width sucked up from neighboring columns, done
-						break;
-					}
-				}
-			}
-		}
-
-		// clamp resize amount to maximum that can be absorbed by other columns
-		if (delta_width > 0)
-		{
-			delta_width += llmin(remaining_width, 0);
-		}
-
-		// propagate constrained delta_width to new width for this column
-		new_width = getRect().getWidth() + delta_width - mColumn->mParentCtrl->getColumnPadding();
-
-		// use requested width
-		mColumn->setWidth(new_width);
-
-		// update proportional spacing
-		if (mColumn->mRelWidth > 0.f)
-		{
-			mColumn->mRelWidth = (F32)new_width / (F32)mColumn->mParentCtrl->getItemListRect().getWidth();
-		}
-
-		// tell scroll list to layout columns again
-		// do immediate update to get proper feedback to resize handle
-		// which needs to know how far the resize actually went
-		mColumn->mParentCtrl->updateColumns();
-	}
-}
-
-void LLColumnHeader::setHasResizableElement(BOOL resizable)
-{
-	// for now, dynamically spaced columns can't be resized
-//	if (mColumn->mDynamicWidth) return;
-
-	if (mHasResizableElement != resizable)
-	{
-		mColumn->mParentCtrl->dirtyColumns();
-		mHasResizableElement = resizable;
-	}
-}
-
-void LLColumnHeader::updateResizeBars()
-{
-	S32 num_resizable_columns = 0;
-	S32 col;
-	for (col = 0; col < mColumn->mParentCtrl->getNumColumns(); col++)
-	{
-		LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
-		if (columnp->mHeader && columnp->mHeader->canResize())
-		{
-			num_resizable_columns++;
-		}
-	}
-
-	S32 num_resizers_enabled = 0;
-
-	// now enable/disable resize handles on resizable columns if we have at least two
-	for (col = 0; col < mColumn->mParentCtrl->getNumColumns(); col++)
-	{
-		LLScrollListColumn* columnp = mColumn->mParentCtrl->getColumn(col);
-		if (!columnp->mHeader) continue;
-		BOOL enable = num_resizable_columns >= 2 && num_resizers_enabled < (num_resizable_columns - 1) && columnp->mHeader->canResize();
-		columnp->mHeader->enableResizeBar(enable);
-		if (enable)
-		{
-			num_resizers_enabled++;
-		}
-	}
-}
-
-void LLColumnHeader::enableResizeBar(BOOL enable)
-{
-	// for now, dynamically spaced columns can't be resized
-	//if (!mColumn->mDynamicWidth)
-	{
-		mResizeBar->setEnabled(enable);
-	}
-}
-
-BOOL LLColumnHeader::canResize()
-{
-	return getVisible() && (mHasResizableElement || mColumn->mDynamicWidth);
-}
-
-void LLScrollListColumn::setWidth(S32 width) 
-{ 
-	if (!mDynamicWidth && mRelWidth <= 0.f) 
-	{
-		mParentCtrl->updateStaticColumnWidth(this, width);
-	}
-	mWidth = width;
-}
-
-// Default constructor
-LLScrollListColumn::LLScrollListColumn() : 
-	mName(), 
-	mSortingColumn(), 
-	mSortAscending(TRUE), 
-	mLabel(), 
-	mWidth(-1), 
-	mRelWidth(-1.0), 
-	mDynamicWidth(FALSE), 
-	mMaxContentWidth(0),
-	mIndex(-1), 
-	mParentCtrl(NULL), 
-	mHeader(NULL), 
-	mFontAlignment(LLFontGL::LEFT)
-{ }
-
-LLScrollListColumn::LLScrollListColumn(const LLSD &sd, LLScrollListCtrl* parent) :
-	mWidth(0),
-	mIndex (-1),
-	mParentCtrl(parent),
-	mHeader(NULL),
-	mMaxContentWidth(0),
-	mDynamicWidth(FALSE),
-	mRelWidth(-1.f)
-{
-	mName = sd.get("name").asString();
-	mSortingColumn = mName;
-	if (sd.has("sort"))
-	{
-		mSortingColumn = sd.get("sort").asString();
-	}
-	mSortAscending = TRUE;
-	if (sd.has("sort_ascending"))
-	{
-		mSortAscending = sd.get("sort_ascending").asBoolean();
-	}
-	mLabel = sd.get("label").asString();
-	if (sd.has("relwidth") && (F32)sd.get("relwidth").asReal() > 0)
-	{
-		mRelWidth = (F32)sd.get("relwidth").asReal();
-		if (mRelWidth < 0) mRelWidth = 0;
-		if (mRelWidth > 1) mRelWidth = 1;
-		mDynamicWidth = FALSE;
-	}
-	else if(sd.has("dynamicwidth") && (BOOL)sd.get("dynamicwidth").asBoolean() == TRUE)
-	{
-		mDynamicWidth = TRUE;
-		mRelWidth = -1;
-	}
-	else
-	{
-
-		setWidth(sd.get("width").asInteger());
-	}
-
-	if (sd.has("halign"))
-	{
-		mFontAlignment = (LLFontGL::HAlign)llclamp(sd.get("halign").asInteger(), (S32)LLFontGL::LEFT, (S32)LLFontGL::HCENTER);
-	}
-	else
-	{
-		mFontAlignment = LLFontGL::LEFT;
-	}
-
-}
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 72d8894afa..461df6760f 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -1,5 +1,8 @@
 /** 
  * @file llscrolllistctrl.h
+ * @brief A scrolling list of items.  This is the one you want to use
+ * in UI code.  LLScrollListCell, LLScrollListItem, etc. are utility
+ * classes.
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
  * 
@@ -37,346 +40,109 @@
 
 #include "lluictrl.h"
 #include "llctrlselectioninterface.h"
-#include "lldarray.h"
+//#include "lldarray.h"
 #include "llfontgl.h"
 #include "llui.h"
-#include "llstring.h"
-#include "llimagegl.h"
+#include "llstring.h"	// LLWString
+//#include "llimagegl.h"
 #include "lleditmenuhandler.h"
 #include "llframetimer.h"
-#include "llcheckboxctrl.h"
-#include "llcombobox.h"
+
 #include "llscrollbar.h"
-#include "llresizebar.h"
 #include "lldate.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcolumn.h"
 
-/*
- * Represents a cell in a scrollable table.
- *
- * Sub-classes must return height and other properties 
- * though width accessors are implemented by the base class.
- * It is therefore important for sub-class constructors to call
- * setWidth() with realistic values.
- */
-class LLScrollListCell
-{
-public:
-	LLScrollListCell(S32 width = 0) : mWidth(width) {};
-	virtual ~LLScrollListCell() {};
-	virtual void			draw(const LLColor4& color, const LLColor4& highlight_color) const = 0;		// truncate to given width, if possible
-	virtual S32				getWidth() const {return mWidth;}
-	virtual S32				getContentWidth() const { return 0; }
-	virtual S32				getHeight() const = 0;
-	virtual const LLSD		getValue() const { return LLStringUtil::null; }
-	virtual void			setValue(const LLSD& value) { }
-	virtual BOOL			getVisible() const { return TRUE; }
-	virtual void			setWidth(S32 width) { mWidth = width; }
-	virtual void			highlightText(S32 offset, S32 num_chars) {}
-	virtual BOOL			isText() const = 0;
-	virtual void			setColor(const LLColor4&) {}
-	virtual void			onCommit() {};
-
-	virtual BOOL			handleClick() { return FALSE; }
-	virtual	void			setEnabled(BOOL enable) { }
-
-private:
-	S32 mWidth;
-};
-
-/*
- * Draws a horizontal line.
- */
-class LLScrollListSeparator : public LLScrollListCell
-{
-public:
-	LLScrollListSeparator(S32 width);
-	virtual ~LLScrollListSeparator() {};
-	virtual void			draw(const LLColor4& color, const LLColor4& highlight_color) const;		// truncate to given width, if possible
-	virtual S32				getHeight() const;
-	virtual BOOL			isText() const { return FALSE; }
-};
-
-/*
- * Cell displaying a text label.
- */
-class LLScrollListText : public LLScrollListCell
-{
-public:
-	LLScrollListText( const std::string& text, const LLFontGL* font, S32 width = 0, U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, LLColor4& color = LLColor4::black, BOOL use_color = FALSE, BOOL visible = TRUE);
-	/*virtual*/ ~LLScrollListText();
-
-	virtual void    draw(const LLColor4& color, const LLColor4& highlight_color) const;
-	virtual S32		getContentWidth() const;
-	virtual S32		getHeight() const;
-	virtual void	setValue(const LLSD& value);
-	virtual const LLSD getValue() const;
-	virtual BOOL	getVisible() const;
-	virtual void	highlightText(S32 offset, S32 num_chars);
-
-	virtual void	setColor(const LLColor4&);
-	virtual BOOL	isText() const;
-
-	void			setText(const LLStringExplicit& text);
-	void			setFontStyle(const U8 font_style) { mFontStyle = font_style; }
-
-private:
-	LLUIString		mText;
-	const LLFontGL*	mFont;
-	LLColor4		mColor;
-	U8				mUseColor;
-	U8				mFontStyle;
-	LLFontGL::HAlign mFontAlignment;
-	BOOL			mVisible;
-	S32				mHighlightCount;
-	S32				mHighlightOffset;
-
-	LLPointer<LLUIImage> mRoundedRectImage;
-
-	static U32 sCount;
-};
-
+class LLScrollListCell;
+class LLTextBox;
 
-class LLScrollListDate : public LLScrollListText
-{
-public:
-	LLScrollListDate( const LLDate& date, const LLFontGL* font, S32 width=0, U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, LLColor4& color = LLColor4::black, BOOL use_color = FALSE, BOOL visible = TRUE);
-	virtual void	setValue(const LLSD& value);
-	virtual const LLSD getValue() const;
-
-private:
-	LLDate		mDate;
-};
-
-/*
- * Cell displaying an image.
- */
-class LLScrollListIcon : public LLScrollListCell
-{
-public:
-	LLScrollListIcon( LLUIImagePtr icon, S32 width = 0);
-	LLScrollListIcon(const LLSD& value, S32 width = 0);
-	/*virtual*/ ~LLScrollListIcon();
-	virtual void	draw(const LLColor4& color, const LLColor4& highlight_color) const;
-	virtual S32		getWidth() const;
-	virtual S32		getHeight() const			{ return mIcon ? mIcon->getHeight() : 0; }
-	virtual const LLSD		getValue() const { return mIcon.isNull() ? LLStringUtil::null : mIcon->getName(); }
-	virtual void	setColor(const LLColor4&);
-	virtual BOOL	isText()const { return FALSE; }
-	virtual void	setValue(const LLSD& value);
-
-private:
-	LLUIImagePtr mIcon;
-	LLColor4 mColor;
-};
-
-/*
- * An interactive cell containing a check box.
- */
-class LLScrollListCheck : public LLScrollListCell
-{
-public:
-	LLScrollListCheck( LLCheckBoxCtrl* check_box, S32 width = 0);
-	/*virtual*/ ~LLScrollListCheck();
-	virtual void	draw(const LLColor4& color, const LLColor4& highlight_color) const;
-	virtual S32		getHeight() const			{ return 0; } 
-	virtual const LLSD	getValue() const { return mCheckBox->getValue(); }
-	virtual void	setValue(const LLSD& value) { mCheckBox->setValue(value); }
-	virtual void	onCommit() { mCheckBox->onCommit(); }
-
-	virtual BOOL	handleClick();
-	virtual void	setEnabled(BOOL enable)		{ mCheckBox->setEnabled(enable); }
-
-	LLCheckBoxCtrl*	getCheckBox()				{ return mCheckBox; }
-	virtual BOOL	isText() const				{ return FALSE; }
-
-private:
-	LLCheckBoxCtrl* mCheckBox;
-};
-
-/*
- * A simple data class describing a column within a scroll list.
- */
-class LLScrollListColumn
-{
-public:
-	LLScrollListColumn();
-	LLScrollListColumn(const LLSD &sd, LLScrollListCtrl* parent);
-
-	void setWidth(S32 width);
-	S32 getWidth() const { return mWidth; }
-
-	// Public data is fine so long as this remains a simple struct-like data class.
-	// If it ever gets any smarter than that, these should all become private
-	// with protected or public accessor methods added as needed. -MG
-	std::string			mName;
-	std::string			mSortingColumn;
-	BOOL				mSortAscending;
-	std::string			mLabel;
-	F32					mRelWidth;
-	BOOL				mDynamicWidth;
-	S32					mMaxContentWidth;
-	S32					mIndex;
-	LLScrollListCtrl*	mParentCtrl;
-	class LLColumnHeader*		mHeader;
-	LLFontGL::HAlign	mFontAlignment;
-
-private:
-	S32					mWidth;
-
-};
-
-class LLColumnHeader : public LLComboBox
-{
-public:
-	LLColumnHeader(const std::string& label, const LLRect &rect, LLScrollListColumn* column, const LLFontGL *font = NULL);
-	~LLColumnHeader();
-
-	/*virtual*/ void draw();
-	/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
-
-	/*virtual*/ void showList();
-	/*virtual*/ LLView*	findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding);
-	/*virtual*/ void userSetShape(const LLRect& new_rect);
-	
-	void setImage(const std::string &image_name);
-	LLScrollListColumn* getColumn() { return mColumn; }
-	void setHasResizableElement(BOOL resizable);
-	void updateResizeBars();
-	BOOL canResize();
-	void enableResizeBar(BOOL enable);
-	std::string getLabel() { return mOrigLabel; }
-
-	static void onSelectSort(LLUICtrl* ctrl, void* user_data);
-	static void onClick(void* user_data);
-	static void onMouseDown(void* user_data);
-	static void onHeldDown(void* user_data);
-
-private:
-	LLScrollListColumn* mColumn;
-	LLResizeBar*		mResizeBar;
-	std::string			mOrigLabel;
-	LLUIString			mAscendingText;
-	LLUIString			mDescendingText;
-	BOOL				mShowSortOptions;
-	BOOL				mHasResizableElement;
-};
-
-class LLScrollListItem
+class LLScrollListCtrl : public LLUICtrl, public LLEditMenuHandler, 
+	public LLCtrlListInterface, public LLCtrlScrollInterface
 {
 public:
-	LLScrollListItem( BOOL enabled = TRUE, void* userdata = NULL, const LLUUID& uuid = LLUUID::null )
-		: mSelected(FALSE), mEnabled( enabled ), mUserdata( userdata ), mItemValue( uuid ), mColumns() {}
-	LLScrollListItem( LLSD item_value, void* userdata = NULL )
-		: mSelected(FALSE), mEnabled( TRUE ), mUserdata( userdata ), mItemValue( item_value ), mColumns() {}
-
-	virtual ~LLScrollListItem();
-
-	void	setSelected( BOOL b )			{ mSelected = b; }
-	BOOL	getSelected() const				{ return mSelected; }
-
-	void	setEnabled( BOOL b );
-	BOOL	getEnabled() const 				{ return mEnabled; }
-
-	void	setUserdata( void* userdata )	{ mUserdata = userdata; }
-	void*	getUserdata() const 			{ return mUserdata; }
+	struct Contents : public LLInitParam::Block<Contents>
+	{
+		Multiple<LLScrollListColumn::Params>	columns;
+		Multiple<LLScrollListItem::Params>		rows;
 
-	LLUUID	getUUID() const					{ return mItemValue.asUUID(); }
-	LLSD	getValue() const				{ return mItemValue; }
+		//Multiple<Contents>						groups;
 
-	// If width = 0, just use the width of the text.  Otherwise override with
-	// specified width in pixels.
-	void	addColumn( const std::string& text, const LLFontGL* font, S32 width = 0 , U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, BOOL visible = TRUE)
-				{ mColumns.push_back( new LLScrollListText(text, font, width, font_style, font_alignment, LLColor4::black, FALSE, visible) ); }
+		Contents();
+	};
 
-	void	addColumn( LLUIImagePtr icon, S32 width = 0 )
-				{ mColumns.push_back( new LLScrollListIcon(icon, width) ); }
-
-	void	addColumn( LLCheckBoxCtrl* check, S32 width = 0 )
-				{ mColumns.push_back( new LLScrollListCheck(check,width) ); }
-
-	void	setNumColumns(S32 columns);
-
-	void	setColumn( S32 column, LLScrollListCell *cell );
+	// *TODO: Add callbacks to Params
+	typedef boost::function<void (void)> callback_t;
 	
-	S32		getNumColumns() const			{ return mColumns.size(); }
-
-	LLScrollListCell *getColumn(const S32 i) const	{ if (0 <= i && i < (S32)mColumns.size()) { return mColumns[i]; } return NULL; }
-
-	std::string getContentsCSV() const;
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		// behavioral flags
+		Optional<bool>	multi_select,
+						commit_on_keyboard_movement;
+
+		// display flags
+		Optional<bool>	has_border,
+						draw_heading,
+						draw_stripes,
+						background_visible;
+
+		// layout
+		Optional<S32>	column_padding,
+						heading_height;
+
+		// sort and search behavior
+		Optional<S32>	search_column,
+						sort_column;
+		Optional<bool>	sort_ascending;
+
+		// colors
+		Optional<LLUIColor>	fg_unselected_color,
+							fg_selected_color,
+							bg_selected_color,
+							fg_disable_color,
+							bg_writeable_color,
+							bg_read_only_color,
+							bg_stripe_color,
+							hovered_color,
+							highlighted_color;
+
+		Optional<Contents> contents;
+		
+		Params();
+	};
 
-	virtual void draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding);
+protected:
+	friend class LLUICtrlFactory;
 
-private:
-	BOOL	mSelected;
-	BOOL	mEnabled;
-	void*	mUserdata;
-	LLSD	mItemValue;
-	std::vector<LLScrollListCell *> mColumns;
-};
-
-/*
- * A graphical control representing a scrollable table.
- * Cells in the table can be simple text or more complicated things
- * such as icons or even interactive elements like check boxes.
- */
-class LLScrollListItemComment : public LLScrollListItem
-{
-public:
-	LLScrollListItemComment(const std::string& comment_string, const LLColor4& color);
+	LLScrollListCtrl(const Params&);
 
-	/*virtual*/ void draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding);
-private:
-	LLColor4 mColor;
-};
-
-class LLScrollListItemSeparator : public LLScrollListItem
-{
 public:
-	LLScrollListItemSeparator();
-
-	/*virtual*/ void draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding);
-};
-
-class LLScrollListCtrl : public LLUICtrl, public LLEditMenuHandler, 
-	public LLCtrlListInterface, public LLCtrlScrollInterface
-{
-public:
-	LLScrollListCtrl(
-		const std::string& name,
-		const LLRect& rect,
-		void (*commit_callback)(LLUICtrl*, void*),
-		void* callback_userdata,
-		BOOL allow_multiple_selection,
-		BOOL draw_border = TRUE);
-
 	virtual ~LLScrollListCtrl();
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	void setScrollListParameters(LLXMLNodePtr node);
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
 	S32				isEmpty() const;
 
 	void			deleteAllItems() { clearRows(); }
 	
 	// Sets an array of column descriptors
-	void 	   		setColumnHeadings(LLSD headings);
+	void 	   		setColumnHeadings(const LLSD& headings);
 	void   			sortByColumnIndex(U32 column, BOOL ascending);
 	
 	// LLCtrlListInterface functions
 	virtual S32  getItemCount() const;
 	// Adds a single column descriptor: ["name" : string, "label" : string, "width" : integer, "relwidth" : integer ]
-	virtual void addColumn(const LLSD& column, EAddPosition pos = ADD_BOTTOM);
+	virtual void addColumn(const LLScrollListColumn::Params& column, EAddPosition pos = ADD_BOTTOM);
+	virtual void addColumn(const LLSD& column, EAddPosition pos = ADD_BOTTOM);	
 	virtual void clearColumns();
 	virtual void setColumnLabel(const std::string& column, const std::string& label);
-
+	virtual bool 	preProcessChildNode(LLXMLNodePtr child);
 	virtual LLScrollListColumn* getColumn(S32 index);
+	virtual LLScrollListColumn* getColumn(const std::string& name);
 	virtual S32 getNumColumns() const { return mColumnsIndexed.size(); }
 
 	// Adds a single element, from an array of:
 	// "columns" => [ "column" => column name, "value" => value, "type" => type, "font" => font, "font-style" => style ], "id" => uuid
 	// Creates missing columns automatically.
-	virtual LLScrollListItem* addElement(const LLSD& value, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
+	virtual LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
+	virtual LLScrollListItem* addRow(const LLScrollListItem::Params& value, EAddPosition pos = ADD_BOTTOM);
 	// Simple add element. Takes a single array of:
 	// [ "value" => value, "font" => font, "font-style" => style ]
 	virtual void clearRows(); // clears all elements
@@ -421,10 +187,14 @@ public:
 	void 			deleteSelectedItems();
 	void			deselectAllItems(BOOL no_commit_on_change = FALSE);	// by default, go ahead and commit on selection change
 
-	void			highlightNthItem( S32 index );
-	void			setDoubleClickCallback( void (*cb)(void*) ) { mOnDoubleClickCallback = cb; }
-	void			setMaximumSelectCallback( void (*cb)(void*) ) { mOnMaximumSelectCallback = cb; }
-	void			setSortChangedCallback( void (*cb)(void*) ) { mOnSortChangedCallback = cb; }
+	void			clearHighlightedItems();
+	void			mouseOverHighlightNthItem( S32 index );
+	
+	void			setDoubleClickCallback( callback_t cb ) { mOnDoubleClickCallback = cb; }
+	void			setMaximumSelectCallback( callback_t cb) { mOnMaximumSelectCallback = cb; }
+	void			setSortChangedCallback( callback_t cb) 	{ mOnSortChangedCallback = cb; }
+	// Convenience function; *TODO: replace with setter above + boost::bind() in calling code
+	void			setDoubleClickCallback( boost::function<void (void* userdata)> cb, void* userdata) { mOnDoubleClickCallback = boost::bind(cb, userdata); }
 
 	void			swapWithNext(S32 index);
 	void			swapWithPrevious(S32 index);
@@ -435,21 +205,21 @@ public:
 	S32				getItemIndex( LLScrollListItem* item ) const;
 	S32				getItemIndex( const LLUUID& item_id ) const;
 
-	LLScrollListItem* addCommentText( const std::string& comment_text, EAddPosition pos = ADD_BOTTOM);
+	void setCommentText( const std::string& comment_text);
 	LLScrollListItem* addSeparator(EAddPosition pos);
 
 	// "Simple" interface: use this when you're creating a list that contains only unique strings, only
 	// one of which can be selected at a time.
 	virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD());
 
-
 	BOOL			selectItemByLabel( const std::string& item, BOOL case_sensitive = TRUE );		// FALSE if item not found
 	BOOL			selectItemByPrefix(const std::string& target, BOOL case_sensitive = TRUE);
 	BOOL			selectItemByPrefix(const LLWString& target, BOOL case_sensitive = TRUE);
+	LLScrollListItem*  getItemByLabel( const std::string& item, BOOL case_sensitive = TRUE, S32 column = 0 );
 	const std::string	getSelectedItemLabel(S32 column = 0) const;
 	LLSD			getSelectedValue();
 
-	// DEPRECATED: Use LLSD versions of addCommentText() and getSelectedValue().
+	// DEPRECATED: Use LLSD versions of setCommentText() and getSelectedValue().
 	// "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which
 	// has an associated, unique UUID, and only one of which can be selected at a time.
 	LLScrollListItem*	addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE, S32 column_width = 0);
@@ -475,7 +245,8 @@ public:
 	void setBgStripeColor(const LLColor4& c)	{ mBgStripeColor = c; }
 	void setFgSelectedColor(const LLColor4 &c)	{ mFgSelectedColor = c; }
 	void setFgUnselectedColor(const LLColor4 &c){ mFgUnselectedColor = c; }
-	void setHighlightedColor(const LLColor4 &c)	{ mHighlightedColor = c; }
+	void setHoveredColor(const LLColor4 &c)		{ mHoveredColor = c; }
+	void setHighlightedColor(const LLColor4 &c) { mHighlightedColor = c; }
 	void setFgDisableColor(const LLColor4 &c)	{ mFgDisabledColor = c; }
 
 	void setBackgroundVisible(BOOL b)			{ mBackgroundVisible = b; }
@@ -514,6 +285,7 @@ public:
 	/*virtual*/ void	setFocus( BOOL b );
 	/*virtual*/ void	onFocusReceived();
 	/*virtual*/ void	onFocusLost();
+	/*virtual*/ void	onMouseLeave(S32 x, S32 y, MASK mask);
 	/*virtual*/ void	reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 
 	virtual BOOL	isDirty() const;
@@ -528,15 +300,14 @@ public:
 	LLRect			getItemListRect() { return mItemListRect; }
 
 	// Used "internally" by the scroll bar.
-	static void		onScrollChange( S32 new_pos, LLScrollbar* src, void* userdata );
+	void			onScrollChange( S32 new_pos, LLScrollbar* src );
 
 	static void onClickColumn(void *userdata);
 
-	void updateColumns();
+	virtual void updateColumns();
 	void calcColumnWidths();
 	S32 getMaxContentWidth() { return mMaxContentWidth; }
 
-	void setDisplayHeading(BOOL display);
 	void setHeadingHeight(S32 heading_height);
 	void setCollapseEmptyColumns(BOOL collapse);
 
@@ -561,7 +332,7 @@ public:
 	BOOL			getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; }
 	BOOL			needsSorting();
 
-	S32		selectMultiple( LLDynamicArray<LLUUID> ids );
+	S32		selectMultiple( std::vector<LLUUID> ids );
 	void			sortItems();
 	// sorts a list without affecting the permanent sort order (so further list insertions can be unsorted, for example)
 	void			sortOnce(S32 column, BOOL ascending);
@@ -604,7 +375,6 @@ private:
 	void			commitIfChanged();
 	BOOL			setSort(S32 column, BOOL ascending);
 
-
 	S32				mCurIndex;			// For get[First/Next]Data
 	S32				mCurSelectedIndex;  // For get[First/Next]Selected
 
@@ -621,7 +391,7 @@ private:
 	BOOL			mSelectionChanged;
 	BOOL			mNeedsScroll;
 	BOOL			mCanSelect;
-	BOOL			mDisplayColumnHeaders;
+	const BOOL		mDisplayColumnHeaders;
 	BOOL			mColumnsDirty;
 
 	item_list		mItemList;
@@ -637,19 +407,20 @@ private:
 	BOOL			mBackgroundVisible;
 	BOOL			mDrawStripes;
 
-	LLColor4		mBgWriteableColor;
-	LLColor4		mBgReadOnlyColor;
-	LLColor4		mBgSelectedColor;
-	LLColor4		mBgStripeColor;
-	LLColor4		mFgSelectedColor;
-	LLColor4		mFgUnselectedColor;
-	LLColor4		mFgDisabledColor;
-	LLColor4		mHighlightedColor;
+	LLUIColor		mBgWriteableColor;
+	LLUIColor		mBgReadOnlyColor;
+	LLUIColor		mBgSelectedColor;
+	LLUIColor		mBgStripeColor;
+	LLUIColor		mFgSelectedColor;
+	LLUIColor		mFgUnselectedColor;
+	LLUIColor		mFgDisabledColor;
+	LLUIColor		mHoveredColor;
+	LLUIColor		mHighlightedColor;
 
 	S32				mBorderThickness;
-	void			(*mOnDoubleClickCallback)(void* userdata);
-	void			(*mOnMaximumSelectCallback)(void* userdata );
-	void			(*mOnSortChangedCallback)(void* userdata);
+	callback_t		mOnDoubleClickCallback;
+	callback_t 		mOnMaximumSelectCallback;
+	callback_t 		mOnSortChangedCallback;
 
 	S32				mHighlightedItem;
 	class LLViewBorder*	mBorder;
@@ -678,7 +449,15 @@ private:
 
 	// HACK:  Did we draw one selected item this frame?
 	BOOL mDrewSelected;
+
+	LLTextBox*		mCommentTextBox;
 }; // end class LLScrollListCtrl
 
+#ifdef LL_WINDOWS
+#ifndef INSTANTIATE_GETCHILD_SCROLLLIST
+#pragma warning (disable : 4231)
+extern template LLScrollListCtrl* LLView::getChild<LLScrollListCtrl>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
+#endif
+#endif
 
 #endif  // LL_SCROLLLISTCTRL_H
diff --git a/indra/llui/llscrolllistitem.cpp b/indra/llui/llscrolllistitem.cpp
new file mode 100644
index 0000000000..2ac6925c78
--- /dev/null
+++ b/indra/llui/llscrolllistitem.cpp
@@ -0,0 +1,157 @@
+/** 
+ * @file llscrolllistitem.cpp
+ * @brief Scroll lists are composed of rows (items), each of which 
+ * contains columns (cells).
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llscrolllistitem.h"
+
+#include "llrect.h"
+#include "llresmgr.h"		// LLFONT_SANSSERIF_SMALL
+#include "llui.h"
+
+
+//---------------------------------------------------------------------------
+// LLScrollListItem
+//---------------------------------------------------------------------------
+
+LLScrollListItem::LLScrollListItem( const Params& p )
+:	mSelected(FALSE),
+	mHighlighted(FALSE),
+	mEnabled(p.enabled),
+	mUserdata(p.userdata),
+	mItemValue(p.value)
+{
+}
+
+
+LLScrollListItem::~LLScrollListItem()
+{
+	std::for_each(mColumns.begin(), mColumns.end(), DeletePointer());
+}
+
+void LLScrollListItem::addColumn(const LLScrollListCell::Params& p)
+{
+	mColumns.push_back(LLScrollListCell::create(p));
+}
+
+void LLScrollListItem::setNumColumns(S32 columns)
+{
+	S32 prev_columns = mColumns.size();
+	if (columns < prev_columns)
+	{
+		std::for_each(mColumns.begin()+columns, mColumns.end(), DeletePointer());
+	}
+	
+	mColumns.resize(columns);
+
+	for (S32 col = prev_columns; col < columns; ++col)
+	{
+		mColumns[col] = NULL;
+	}
+}
+
+void LLScrollListItem::setColumn( S32 column, LLScrollListCell *cell )
+{
+	if (column < (S32)mColumns.size())
+	{
+		delete mColumns[column];
+		mColumns[column] = cell;
+	}
+	else
+	{
+		llerrs << "LLScrollListItem::setColumn: bad column: " << column << llendl;
+	}
+}
+
+
+S32 LLScrollListItem::getNumColumns() const
+{
+	return mColumns.size();
+}
+
+LLScrollListCell* LLScrollListItem::getColumn(const S32 i) const
+{
+	if (0 <= i && i < (S32)mColumns.size())
+	{
+		return mColumns[i];
+	} 
+	return NULL;
+}
+
+std::string LLScrollListItem::getContentsCSV() const
+{
+	std::string ret;
+
+	S32 count = getNumColumns();
+	for (S32 i=0; i<count; ++i)
+	{
+		ret += getColumn(i)->getValue().asString();
+		if (i < count-1)
+		{
+			ret += ", ";
+		}
+	}
+
+	return ret;
+}
+
+
+void LLScrollListItem::draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding)
+{
+	// draw background rect
+	gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+	LLRect bg_rect = rect;
+	gl_rect_2d( bg_rect, bg_color );
+
+	S32 cur_x = rect.mLeft;
+	S32 num_cols = getNumColumns();
+	S32 cur_col = 0;
+
+	for (LLScrollListCell* cell = getColumn(0); cur_col < num_cols; cell = getColumn(++cur_col))
+	{
+		// Two ways a cell could be hidden
+		if (cell->getWidth() < 0
+			|| !cell->getVisible()) continue;
+
+		LLUI::pushMatrix();
+		{
+			LLUI::translate((F32) cur_x, (F32) rect.mBottom, 0.0f);
+
+			cell->draw( fg_color, highlight_color );
+		}
+		LLUI::popMatrix();
+		
+		cur_x += cell->getWidth() + column_padding;
+	}
+}
+
diff --git a/indra/llui/llscrolllistitem.h b/indra/llui/llscrolllistitem.h
new file mode 100644
index 0000000000..8d87137c3a
--- /dev/null
+++ b/indra/llui/llscrolllistitem.h
@@ -0,0 +1,129 @@
+/** 
+ * @file llscrolllistitem.h
+ * @brief Scroll lists are composed of rows (items), each of which 
+ * contains columns (cells).
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ * 
+ * Copyright (c) 2007-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LLSCROLLLISTITEM_H
+#define LLSCROLLLISTITEM_H
+
+#include "llfontgl.h"		// LLFontGL::HAlign
+#include "llpointer.h"		// LLPointer<>
+#include "llsd.h"
+#include "lluistring.h"
+#include "v4color.h"
+#include "llinitparam.h"
+#include "llscrolllistcell.h"
+
+#include <vector>
+
+class LLCoordGL;
+class LLCheckBoxCtrl;
+class LLResizeBar;
+class LLScrollListCtrl;
+class LLScrollColumnHeader;
+class LLUIImage;
+
+//---------------------------------------------------------------------------
+// LLScrollListItem
+//---------------------------------------------------------------------------
+class LLScrollListItem
+{
+	friend class LLScrollListCtrl;
+public:
+	struct Params : public LLInitParam::Block<Params>
+	{
+		Optional<bool>		enabled;
+		Optional<void*>		userdata;
+		Optional<LLSD>		value;
+		
+		Deprecated			name; // use for localization tools
+		Deprecated			type; 
+		Deprecated			length; 
+
+		Multiple<LLScrollListCell::Params> cells;
+
+		Params()
+		:	enabled("enabled", true),
+			value("value"),
+			name("name"),
+			type("type"),
+			length("length"),
+			cells("columns")
+		{
+			addSynonym(cells, "column");
+			addSynonym(value, "id");
+		}
+	};
+
+	virtual ~LLScrollListItem();
+
+	void	setSelected( BOOL b )			{ mSelected = b; }
+	BOOL	getSelected() const				{ return mSelected; }
+
+	void	setEnabled( BOOL b )			{ mEnabled = b; }
+	BOOL	getEnabled() const 				{ return mEnabled; }
+
+	void	setHighlighted( BOOL b )		{ mHighlighted = b; }
+	BOOL	getHighlighted() const			{ return mHighlighted; }
+
+	void	setUserdata( void* userdata )	{ mUserdata = userdata; }
+	void*	getUserdata() const 			{ return mUserdata; }
+
+	LLUUID	getUUID() const					{ return mItemValue.asUUID(); }
+	LLSD	getValue() const				{ return mItemValue; }
+
+	void	addColumn( const LLScrollListCell::Params& p );
+
+	void	setNumColumns(S32 columns);
+
+	void	setColumn( S32 column, LLScrollListCell *cell );
+	
+	S32		getNumColumns() const;
+
+	LLScrollListCell *getColumn(const S32 i) const;
+
+	std::string getContentsCSV() const;
+
+	virtual void draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding);
+
+protected:
+	LLScrollListItem( const Params& );
+
+private:
+	BOOL	mSelected;
+	BOOL	mHighlighted;
+	BOOL	mEnabled;
+	void*	mUserdata;
+	LLSD	mItemValue;
+	std::vector<LLScrollListCell *> mColumns;
+};
+
+#endif
diff --git a/indra/llui/llsdparam.cpp b/indra/llui/llsdparam.cpp
new file mode 100644
index 0000000000..1b0f3c9885
--- /dev/null
+++ b/indra/llui/llsdparam.cpp
@@ -0,0 +1,158 @@
+/** 
+ * @file llsdparam.cpp
+ * @brief parameter block abstraction for creating complex objects and 
+ * parsing construction parameters from xml and LLSD
+ *
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+// Project includes
+#include "llsdparam.h"
+
+//
+// LLParamSDParser
+//
+LLParamSDParser::LLParamSDParser()
+{
+	using boost::bind;
+
+	registerParserFuncs<S32>(bind(&LLParamSDParser::readTypedValue<S32>, this, _1, &LLSD::asInteger),
+							bind(&LLParamSDParser::writeTypedValue<S32>, this, _1, _2));
+	registerParserFuncs<U32>(bind(&LLParamSDParser::readTypedValue<U32>, this, _1, &LLSD::asInteger),
+							bind(&LLParamSDParser::writeU32Param, this, _1, _2));
+	registerParserFuncs<F32>(bind(&LLParamSDParser::readTypedValue<F32>, this, _1, &LLSD::asReal),
+							bind(&LLParamSDParser::writeTypedValue<F32>, this, _1, _2));
+	registerParserFuncs<F64>(bind(&LLParamSDParser::readTypedValue<F64>, this, _1, &LLSD::asReal),
+							bind(&LLParamSDParser::writeTypedValue<F64>, this, _1, _2));
+	registerParserFuncs<bool>(bind(&LLParamSDParser::readTypedValue<F32>, this, _1, &LLSD::asBoolean),
+							bind(&LLParamSDParser::writeTypedValue<F32>, this, _1, _2));
+	registerParserFuncs<std::string>(bind(&LLParamSDParser::readTypedValue<std::string>, this, _1, &LLSD::asString),
+							bind(&LLParamSDParser::writeTypedValue<std::string>, this, _1, _2));
+	registerParserFuncs<LLUUID>(bind(&LLParamSDParser::readTypedValue<LLUUID>, this, _1, &LLSD::asUUID),
+							bind(&LLParamSDParser::writeTypedValue<LLUUID>, this, _1, _2));
+	registerParserFuncs<LLDate>(bind(&LLParamSDParser::readTypedValue<LLDate>, this, _1, &LLSD::asDate),
+							bind(&LLParamSDParser::writeTypedValue<LLDate>, this, _1, _2));
+	registerParserFuncs<LLURI>(bind(&LLParamSDParser::readTypedValue<LLURI>, this, _1, &LLSD::asURI),
+							bind(&LLParamSDParser::writeTypedValue<LLURI>, this, _1, _2));
+	registerParserFuncs<LLSD>(bind(&LLParamSDParser::readSDParam, this, _1),
+							bind(&LLParamSDParser::writeTypedValue<LLSD>, this, _1, _2));
+}
+
+bool LLParamSDParser::readSDParam(void* value_ptr)
+{
+	if (!mCurReadSD) return false;
+	*((LLSD*)value_ptr) = *mCurReadSD;
+	return true;
+}
+
+// special case handling of U32 due to ambiguous LLSD::assign overload
+bool LLParamSDParser::writeU32Param(const void* val_ptr, const parser_t::name_stack_t& name_stack)
+{
+	if (!mWriteSD) return false;
+	
+	LLSD* sd_to_write = getSDWriteNode(name_stack);
+	if (!sd_to_write) return false;
+
+	sd_to_write->assign((S32)*((const U32*)val_ptr));
+	return true;
+}
+
+void LLParamSDParser::readSD(const LLSD& sd, LLInitParam::BaseBlock& block, bool silent)
+{
+	mCurReadSD = NULL;
+	mNameStack.clear();
+	setParseSilently(silent);
+
+	// must have named elements at top level to submit for parsing
+	if (sd.isMap())
+	{
+		readSDValues(sd, block);
+	}
+	else
+	{
+		parserWarning("Top level map required for LLSD->Block conversion");
+	}
+}
+
+void LLParamSDParser::writeSD(LLSD& sd, const LLInitParam::BaseBlock& block)
+{
+	mWriteSD = &sd;
+	block.serializeBlock(*this);
+}
+
+void LLParamSDParser::readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block)
+{
+	if (sd.isMap())
+	{
+		for (LLSD::map_const_iterator it = sd.beginMap();
+			it != sd.endMap();
+			++it)
+		{
+			mNameStack.push_back(make_pair(it->first, newParseGeneration()));
+			readSDValues(it->second, block);
+			mNameStack.pop_back();
+		}
+	}
+	else if (sd.isArray())
+	{
+		for (LLSD::array_const_iterator it = sd.beginArray();
+			it != sd.endArray();
+			++it)
+		{
+			mNameStack.back().second = newParseGeneration();
+			readSDValues(*it, block);
+		}
+	}
+	else
+	{
+		mCurReadSD = &sd;
+		block.submitValue(mNameStack, *this);
+	}
+}
+
+/*virtual*/ std::string LLParamSDParser::getCurrentElementName()
+{
+	std::string full_name = "sd";
+	for (name_stack_t::iterator it = mNameStack.begin();	
+		it != mNameStack.end();
+		++it)
+	{
+		full_name += llformat("[%s]", it->first.c_str());
+	}
+
+	return full_name;
+}
+
+LLSD* LLParamSDParser::getSDWriteNode(const parser_t::name_stack_t& name_stack)
+{
+	//TODO: implement nested LLSD writing
+	return mWriteSD;
+}
+
diff --git a/indra/llui/llsdparam.h b/indra/llui/llsdparam.h
new file mode 100644
index 0000000000..12f28f876f
--- /dev/null
+++ b/indra/llui/llsdparam.h
@@ -0,0 +1,107 @@
+/** 
+ * @file llsdparam.h
+ * @brief parameter block abstraction for creating complex objects and 
+ * parsing construction parameters from xml and LLSD
+ *
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSDPARAM_H
+#define LL_LLSDPARAM_H
+
+#include "llinitparam.h"
+
+class LLParamSDParser 
+:	public LLInitParam::Parser, 
+	public LLSingleton<LLParamSDParser>
+{
+LOG_CLASS(LLParamSDParser);
+
+typedef LLInitParam::Parser parser_t;
+
+protected:
+	LLParamSDParser();
+	friend class LLSingleton<LLParamSDParser>;
+public:
+	void readSD(const LLSD& sd, LLInitParam::BaseBlock& block, bool silent = false);
+	void writeSD(LLSD& sd, const LLInitParam::BaseBlock& block);
+
+	/*virtual*/ std::string getCurrentElementName();
+
+private:
+	void readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block);
+
+	template<typename T>
+	bool readTypedValue(void* val_ptr, boost::function<T(const LLSD&)> parser_func)
+    {
+	    if (!mCurReadSD) return false;
+
+	    *((T*)val_ptr) = parser_func(*mCurReadSD);
+	    return true;
+    }
+
+	template<typename T>
+	bool writeTypedValue(const void* val_ptr, const parser_t::name_stack_t& name_stack)
+	{
+		if (!mWriteSD) return false;
+		
+		LLSD* sd_to_write = getSDWriteNode(name_stack);
+		if (!sd_to_write) return false;
+
+		sd_to_write->assign(*((const T*)val_ptr));
+		return true;
+	}
+
+	LLSD* getSDWriteNode(const parser_t::name_stack_t& name_stack);
+
+	bool readSDParam(void* value_ptr);
+	bool writeU32Param(const void* value_ptr, const parser_t::name_stack_t& name_stack);
+
+	Parser::name_stack_t	mNameStack;
+	const LLSD*				mCurReadSD;
+	LLSD*					mWriteSD;
+};
+
+template<typename T>
+class LLSDParamAdapter : public T
+	{
+	public:
+		LLSDParamAdapter() {}
+		LLSDParamAdapter(const LLSD& sd)
+		{
+			LLParamSDParser::instance().readSD(sd, *this);
+		}
+		
+		LLSDParamAdapter(const T& val)
+		{
+			T::operator=(val);
+		}
+	};
+
+#endif // LL_LLSDPARAM_H
+
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
new file mode 100644
index 0000000000..62b204fd56
--- /dev/null
+++ b/indra/llui/llsearcheditor.cpp
@@ -0,0 +1,124 @@
+/** 
+ * @file lllineeditor.cpp
+ * @brief LLLineEditor base class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Text editor widget to let users enter a single line.
+
+#include "linden_common.h"
+ 
+#include "llsearcheditor.h"
+
+static LLRegisterWidget<LLSearchEditor> r2("search_editor");
+
+LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
+:	LLUICtrl(p)
+{
+	LLLineEditor::Params line_editor_p(p);
+	line_editor_p.name("search edit box");
+	line_editor_p.rect(getLocalRect());
+	line_editor_p.follows.flags(FOLLOWS_ALL);
+	line_editor_p.text_pad_right(getRect().getHeight());
+	line_editor_p.keystroke_callback(boost::bind(&LLSearchEditor::onSearchEdit, this, _1));
+
+	mSearchEdit = LLUICtrlFactory::create<LLLineEditor>(line_editor_p);
+	addChild(mSearchEdit);
+
+	S32 btn_width = getRect().getHeight(); // button is square, and as tall as search editor
+	LLRect clear_btn_rect(getRect().getWidth() - btn_width, getRect().getHeight(), getRect().getWidth(), 0);
+	LLButton::Params button_params(p.clear_search_button);
+	button_params.name(std::string("clear search"));
+	button_params.rect(clear_btn_rect) ;
+	button_params.follows.flags(FOLLOWS_RIGHT|FOLLOWS_TOP);
+	button_params.tab_stop(false);
+	button_params.click_callback.function(boost::bind(&LLSearchEditor::onClearSearch, this, _2));
+
+	mClearSearchButton = LLUICtrlFactory::create<LLButton>(button_params);
+	mSearchEdit->addChild(mClearSearchButton);
+}
+
+//virtual
+void LLSearchEditor::setValue(const LLSD& value )
+{
+	mSearchEdit->setValue(value);
+}
+
+//virtual
+LLSD LLSearchEditor::getValue() const
+{
+	return mSearchEdit->getValue();
+}
+
+//virtual
+BOOL LLSearchEditor::setTextArg( const std::string& key, const LLStringExplicit& text )
+{
+	return mSearchEdit->setTextArg(key, text);
+}
+
+//virtual
+BOOL LLSearchEditor::setLabelArg( const std::string& key, const LLStringExplicit& text )
+{
+	return mSearchEdit->setLabelArg(key, text);
+}
+
+//virtual
+void LLSearchEditor::clear()
+{
+	if (mSearchEdit)
+	{
+		mSearchEdit->clear();
+	}
+}
+
+void LLSearchEditor::draw()
+{
+	mClearSearchButton->setVisible(!mSearchEdit->getWText().empty());
+
+	LLUICtrl::draw();
+}
+
+
+void LLSearchEditor::onSearchEdit(LLLineEditor* caller )
+{
+	if (mSearchCallback)
+	{
+		mSearchCallback(caller->getText());
+	}
+}
+
+void LLSearchEditor::onClearSearch(const LLSD& data)
+{
+	setText(LLStringUtil::null);
+	if (mSearchCallback)
+	{
+		mSearchCallback(LLStringUtil::null);
+	}
+}
+
diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h
new file mode 100644
index 0000000000..d8c5093fbf
--- /dev/null
+++ b/indra/llui/llsearcheditor.h
@@ -0,0 +1,98 @@
+/** 
+ * @file llsearcheditor.h
+ * @brief Text editor widget that represents a search operation
+ *
+ * Features: 
+ *		Text entry of a single line (text, delete, left and right arrow, insert, return).
+ *		Callbacks either on every keystroke or just on the return key.
+ *		Focus (allow multiple text entry widgets)
+ *		Clipboard (cut, copy, and paste)
+ *		Horizontal scrolling to allow strings longer than widget size allows 
+ *		Pre-validation (limit which keys can be used)
+ *		Optional line history so previous entries can be recalled by CTRL UP/DOWN
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSEARCHEDITOR_H
+#define LL_LLSEARCHEDITOR_H
+
+#include "lllineeditor.h"
+#include "llbutton.h"
+
+#include <boost/function.hpp>
+
+/*
+ * @brief A line editor with a button to clear it and a callback to call on every edit event.
+ */
+class LLSearchEditor : public LLUICtrl
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLLineEditor::Params>
+	{
+		Optional<boost::function<void(const std::string&, void*)> > search_callback;
+		
+		Optional<LLButton::Params> clear_search_button;
+
+		Params()
+		: clear_search_button("clear_search_button")
+		{
+			name = "search_editor";
+		}
+	};
+
+protected:
+	LLSearchEditor(const Params&);
+	friend class LLUICtrlFactory;
+public:
+	virtual ~LLSearchEditor() {}
+
+	/*virtual*/ void	draw();
+
+	void setText(const LLStringExplicit &new_text) { mSearchEdit->setText(new_text); }
+
+	typedef boost::function<void (const std::string& search_string)> search_callback_t;
+	void setSearchCallback(search_callback_t cb) { mSearchCallback = cb; }
+
+	// LLUICtrl interface
+	virtual void	setValue(const LLSD& value );
+	virtual LLSD	getValue() const;
+	virtual BOOL	setTextArg( const std::string& key, const LLStringExplicit& text );
+	virtual BOOL	setLabelArg( const std::string& key, const LLStringExplicit& text );
+	virtual void	clear();
+
+private:
+	void onSearchEdit(LLLineEditor* caller );
+	void onClearSearch(const LLSD& data);
+
+	LLLineEditor* mSearchEdit;
+	LLButton* mClearSearchButton;
+	search_callback_t mSearchCallback;
+};
+
+#endif  // LL_LLSEARCHEDITOR_H
diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp
index 4dfc904581..ff2f5d3da0 100644
--- a/indra/llui/llslider.cpp
+++ b/indra/llui/llslider.cpp
@@ -41,53 +41,48 @@
 #include "llkeyboard.h"			// for the MASK constants
 #include "llcontrol.h"
 #include "llimagegl.h"
+#include "lluictrlfactory.h"
 
 static LLRegisterWidget<LLSlider> r1("slider_bar");
+//FIXME: make this into an unregistered template so that code constructed sliders don't
+// have ambigious template lookup problem
 static LLRegisterWidget<LLSlider> r2("volume_slider");
 
+LLSlider::Params::Params()
+:	track_color("track_color"),
+	thumb_outline_color("thumb_outline_color"),
+	thumb_center_color("thumb_center_color"),
+	thumb_image("thumb_image"),
+	track_image("track_image"),
+	track_highlight_image("track_highlight_image"),
+	mouse_down_callback("mouse_down_callback"),
+	mouse_up_callback("mouse_up_callback")
+{
+	follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
+}
 
-LLSlider::LLSlider( 
-	const std::string& name,
-	const LLRect& rect,
-	void (*on_commit_callback)(LLUICtrl* ctrl, void* userdata),
-	void* callback_userdata,
-	F32 initial_value,
-	F32 min_value,
-	F32 max_value,
-	F32 increment,
-	BOOL volume,
-	const std::string& control_name)
-	:
-	LLUICtrl( name, rect, TRUE,	on_commit_callback, callback_userdata, 
-		FOLLOWS_LEFT | FOLLOWS_TOP),
-	mValue( initial_value ),
-	mInitialValue( initial_value ),
-	mMinValue( min_value ),
-	mMaxValue( max_value ),
-	mIncrement( increment ),
-	mVolumeSlider( volume ),
+LLSlider::LLSlider(const LLSlider::Params& p)
+:	LLF32UICtrl(p),
 	mMouseOffset( 0 ),
-	mTrackColor(		LLUI::sColorsGroup->getColor( "SliderTrackColor" ) ),
-	mThumbOutlineColor(	LLUI::sColorsGroup->getColor( "SliderThumbOutlineColor" ) ),
-	mThumbCenterColor(	LLUI::sColorsGroup->getColor( "SliderThumbCenterColor" ) ),
-	mMouseDownCallback( NULL ),
-	mMouseUpCallback( NULL )
+	mTrackColor(p.track_color()),
+	mThumbOutlineColor(p.thumb_outline_color()),
+	mThumbCenterColor(p.thumb_center_color()),
+	mThumbImage(p.thumb_image),
+	mTrackImage(p.track_image),
+	mTrackHighlightImage(p.track_highlight_image)
 {
-	mThumbImage = LLUI::sImageProvider->getUIImage("icn_slide-thumb_dark.tga");
-	mTrackImage = LLUI::sImageProvider->getUIImage("icn_slide-groove_dark.tga");
-	mTrackHighlightImage = LLUI::sImageProvider->getUIImage("icn_slide-highlight.tga");
-
-	// properly handle setting the starting thumb rect
-	// do it this way to handle both the operating-on-settings
-	// and standalone ways of using this
-	setControlName(control_name, NULL);
-	setValue(getValueF32());
-
+    mViewModel->setValue(p.initial_value);
 	updateThumbRect();
 	mDragStartThumbRect = mThumbRect;
+	setControlName(p.control_name, NULL);
+	setValue(getValueF32());
+	
+	if (p.mouse_down_callback.isProvided())
+		initCommitCallback(p.mouse_down_callback, mMouseDownSignal);
+	if (p.mouse_up_callback.isProvided())
+		initCommitCallback(p.mouse_up_callback, mMouseUpSignal);
 }
 
-
 void LLSlider::setValue(F32 value, BOOL from_event)
 {
 	value = llclamp( value, mMinValue, mMaxValue );
@@ -98,21 +93,22 @@ void LLSlider::setValue(F32 value, BOOL from_event)
 	value -= fmod(value, mIncrement);
 	value += mMinValue;
 
-	if (!from_event && mValue != value)
+	if (!from_event && getValueF32() != value)
 	{
 		setControlValue(value);
 	}
 
-	mValue = value;
+    LLF32UICtrl::setValue(value);
 	updateThumbRect();
 }
 
 void LLSlider::updateThumbRect()
 {
-	F32 t = (mValue - mMinValue) / (mMaxValue - mMinValue);
+	const S32 DEFAULT_THUMB_SIZE = 16;
+	F32 t = (getValueF32() - mMinValue) / (mMaxValue - mMinValue);
 
-	S32 thumb_width = mThumbImage->getWidth();
-	S32 thumb_height = mThumbImage->getHeight();
+	S32 thumb_width = mThumbImage ? mThumbImage->getWidth() : DEFAULT_THUMB_SIZE;
+	S32 thumb_height = mThumbImage ? mThumbImage->getHeight() : DEFAULT_THUMB_SIZE;
 	S32 left_edge = (thumb_width / 2);
 	S32 right_edge = getRect().getWidth() - (thumb_width / 2);
 
@@ -126,10 +122,10 @@ void LLSlider::updateThumbRect()
 
 void LLSlider::setValueAndCommit(F32 value)
 {
-	F32 old_value = mValue;
+	F32 old_value = getValueF32();
 	setValue(value);
 
-	if (mValue != old_value)
+	if (getValueF32() != old_value)
 	{
 		onCommit();
 	}
@@ -169,10 +165,8 @@ BOOL LLSlider::handleMouseUp(S32 x, S32 y, MASK mask)
 	{
 		gFocusMgr.setMouseCapture( NULL );
 
-		if( mMouseUpCallback )
-		{
-			mMouseUpCallback( this, mCallbackUserData );
-		}
+		mMouseUpSignal( this, getValueF32() );
+
 		handled = TRUE;
 		make_ui_sound("UISndClickRelease");
 	}
@@ -191,10 +185,7 @@ BOOL LLSlider::handleMouseDown(S32 x, S32 y, MASK mask)
 	{
 		setFocus(TRUE);
 	}
-	if( mMouseDownCallback )
-	{
-		mMouseDownCallback( this, mCallbackUserData );
-	}
+	mMouseDownSignal( this, getValueF32() );
 
 	if (MASK_CONTROL & mask) // if CTRL is modifying
 	{
@@ -257,8 +248,8 @@ void LLSlider::draw()
 	gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
 
 	F32 opacity = getEnabled() ? 1.f : 0.3f;
-	LLColor4 center_color = (mThumbCenterColor % opacity);
-	LLColor4 track_color = (mTrackColor % opacity);
+	LLColor4 center_color = (mThumbCenterColor.get() % opacity);
+	LLColor4 track_color = (mTrackColor.get() % opacity);
 
 	// Track
 	LLRect track_rect(mThumbImage->getWidth() / 2, 
@@ -273,7 +264,7 @@ void LLSlider::draw()
 	if( hasMouseCapture() )
 	{
 		// Show ghost where thumb was before dragging began.
-		mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor % 0.3f);
+		mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f);
 	}
 	if (hasFocus())
 	{
@@ -281,61 +272,7 @@ void LLSlider::draw()
 		mThumbImage->drawBorder(mThumbRect, gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth());
 	}
 	// Fill in the thumb.
-	mThumbImage->draw(mThumbRect, hasMouseCapture() ? mThumbOutlineColor : center_color);
+	mThumbImage->draw(mThumbRect, hasMouseCapture() ? mThumbOutlineColor.get() : center_color);
 
 	LLUICtrl::draw();
 }
-
-// virtual
-LLXMLNodePtr LLSlider::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("initial_val", TRUE)->setFloatValue(getInitialValue());
-	node->createChild("min_val", TRUE)->setFloatValue(getMinValue());
-	node->createChild("max_val", TRUE)->setFloatValue(getMaxValue());
-	node->createChild("increment", TRUE)->setFloatValue(getIncrement());
-	node->createChild("volume", TRUE)->setBoolValue(mVolumeSlider);
-
-	return node;
-}
-
-
-//static
-LLView* LLSlider::fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory)
-{
-	std::string name("slider_bar");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	F32 initial_value = 0.f;
-	node->getAttributeF32("initial_val", initial_value);
-
-	F32 min_value = 0.f;
-	node->getAttributeF32("min_val", min_value);
-
-	F32 max_value = 1.f; 
-	node->getAttributeF32("max_val", max_value);
-
-	F32 increment = 0.1f;
-	node->getAttributeF32("increment", increment);
-
-	BOOL volume = node->hasName("volume_slider") ? TRUE : FALSE;
-	node->getAttributeBOOL("volume", volume);
-
-	LLSlider* slider = new LLSlider(name,
-							rect,
-							NULL,
-							NULL,
-							initial_value,
-							min_value,
-							max_value,
-							increment,
-							volume);
-
-	slider->initFromXML(node, parent);
-
-	return slider;
-}
diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h
index 154685fac1..39c55afd8c 100644
--- a/indra/llui/llslider.h
+++ b/indra/llui/llslider.h
@@ -33,47 +33,42 @@
 #ifndef LL_LLSLIDER_H
 #define LL_LLSLIDER_H
 
-#include "lluictrl.h"
+#include "llf32uictrl.h"
 #include "v4color.h"
 
 class LLImageGL;
 
-class LLSlider : public LLUICtrl
+class LLSlider : public LLF32UICtrl
 {
 public:
-	LLSlider( 
-		const std::string& name,
-		const LLRect& rect,
-		void (*on_commit_callback)(LLUICtrl* ctrl, void* userdata),
-		void* callback_userdata,
-		F32 initial_value,
-		F32 min_value,
-		F32 max_value,
-		F32 increment,
-		BOOL volume, //TODO: create a "volume" slider sub-class or just use image art, no?  -MG
-		const std::string& control_name = LLStringUtil::null );
+	struct Params : public LLInitParam::Block<Params, LLF32UICtrl::Params>
+	{
+		Optional<LLUIColor>	track_color,
+							thumb_outline_color,
+							thumb_center_color;
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static  LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory);
+		Optional<LLUIImage*>	thumb_image,
+								track_image,
+								track_highlight_image;
 
-	void			setValue( F32 value, BOOL from_event = FALSE );
-	F32				getValueF32() const { return mValue; }
+		Optional<CommitCallbackParam>	mouse_down_callback,
+										mouse_up_callback;
 
-	virtual void	setValue(const LLSD& value )	{ setValue((F32)value.asReal(), TRUE); }
-	virtual LLSD	getValue() const		{ return LLSD(getValueF32()); }
 
-	virtual void	setMinValue(LLSD min_value)	{ setMinValue((F32)min_value.asReal()); }
-	virtual void	setMaxValue(LLSD max_value)	{ setMaxValue((F32)max_value.asReal());  }
+		Params();
+	};
+protected:
+	LLSlider(const Params&);
+	friend class LLUICtrlFactory;
+public:
+	void			setValue( F32 value, BOOL from_event = FALSE );
+    // overrides for LLF32UICtrl methods
+	virtual void	setValue(const LLSD& value )	{ setValue((F32)value.asReal(), TRUE); }
+	virtual void	setMinValue(F32 min_value) { LLF32UICtrl::setMinValue(min_value); updateThumbRect(); }
+	virtual void	setMaxValue(F32 max_value) { LLF32UICtrl::setMaxValue(max_value); updateThumbRect(); }
 
-	F32				getInitialValue() const { return mInitialValue; }
-	F32				getMinValue() const		{ return mMinValue; }
-	F32				getMaxValue() const		{ return mMaxValue; }
-	F32				getIncrement() const	{ return mIncrement; }
-	void			setMinValue(F32 min_value) {mMinValue = min_value; updateThumbRect(); }
-	void			setMaxValue(F32 max_value) {mMaxValue = max_value; updateThumbRect(); }
-	void			setIncrement(F32 increment) {mIncrement = increment;}
-	void			setMouseDownCallback( void (*cb)(LLUICtrl* ctrl, void* userdata) ) { mMouseDownCallback = cb; }
-	void			setMouseUpCallback(	void (*cb)(LLUICtrl* ctrl, void* userdata) ) { mMouseUpCallback = cb; }
+	boost::signals::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
+	boost::signals::connection setMouseUpCallback(	const commit_signal_t::slot_type& cb )   { return mMouseUpSignal.connect(cb); }
 
 	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
@@ -85,12 +80,6 @@ private:
 	void			setValueAndCommit(F32 value);
 	void			updateThumbRect();
 
-	F32				mValue;
-	F32				mInitialValue;
-	F32				mMinValue;
-	F32				mMaxValue;
-	F32				mIncrement;
-
 	BOOL			mVolumeSlider;
 	S32				mMouseOffset;
 	LLRect			mDragStartThumbRect;
@@ -100,12 +89,12 @@ private:
 	LLUIImage*		mTrackHighlightImage;
 
 	LLRect			mThumbRect;
-	LLColor4		mTrackColor;
-	LLColor4		mThumbOutlineColor;
-	LLColor4		mThumbCenterColor;
+	LLUIColor	mTrackColor;
+	LLUIColor	mThumbOutlineColor;
+	LLUIColor	mThumbCenterColor;
 	
-	void			(*mMouseDownCallback)(LLUICtrl* ctrl, void* userdata);
-	void			(*mMouseUpCallback)(LLUICtrl* ctrl, void* userdata);
+	commit_signal_t	mMouseDownSignal;
+	commit_signal_t	mMouseUpSignal;
 };
 
 #endif  // LL_LLSLIDER_H
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index 31baddd7cc..d5053478a6 100644
--- a/indra/llui/llsliderctrl.cpp
+++ b/indra/llui/llsliderctrl.cpp
@@ -49,84 +49,103 @@
 #include "llcontrol.h"
 #include "llfocusmgr.h"
 #include "llresmgr.h"
+#include "lluictrlfactory.h"
 
 const U32 MAX_STRING_LENGTH = 10;
 
 static LLRegisterWidget<LLSliderCtrl> r("slider");
- 
-LLSliderCtrl::LLSliderCtrl(const std::string& name, const LLRect& rect, 
-						   const std::string& label,
-						   const LLFontGL* font,
-						   S32 label_width,
-						   S32 text_left,
-						   BOOL show_text,
-						   BOOL can_edit_text,
-						   BOOL volume,
-						   void (*commit_callback)(LLUICtrl*, void*),
-						   void* callback_user_data,
-						   F32 initial_value, F32 min_value, F32 max_value, F32 increment,
-						   const std::string& control_which)
-	: LLUICtrl(name, rect, TRUE, commit_callback, callback_user_data ),
-	  mFont(font),
-	  mShowText( show_text ),
-	  mCanEditText( can_edit_text ),
-	  mVolumeSlider( volume ),
-	  mPrecision( 3 ),
-	  mLabelBox( NULL ),
-	  mLabelWidth( label_width ),
-	  mValue( initial_value ),
-	  mEditor( NULL ),
-	  mTextBox( NULL ),
-	  mTextEnabledColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ),
-	  mTextDisabledColor( LLUI::sColorsGroup->getColor( "LabelDisabledColor" ) ),
-	  mSliderMouseUpCallback( NULL ),
-	  mSliderMouseDownCallback( NULL )
+
+LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
+:	LLF32UICtrl(p),
+	mLabelBox( NULL ),
+	mEditor( NULL ),
+	mTextBox( NULL ),
+	mFont(p.font),
+	mShowText(p.show_text),
+	mCanEditText(p.can_edit_text),
+	mPrecision(p.decimal_digits),
+	mTextEnabledColor(p.text_color()),
+	mTextDisabledColor(p.text_disabled_color())
 {
 	S32 top = getRect().getHeight();
 	S32 bottom = 0;
 	S32 left = 0;
 
+	S32 label_width = p.label_width;
+	S32 text_width = p.text_width;
+
 	// Label
-	if( !label.empty() )
+	if( !p.label().empty() )
 	{
-		if (label_width == 0)
+		if (!p.label_width.isProvided())
 		{
-			label_width = font->getWidth(label);
+			label_width = p.font()->getWidth(p.label);
 		}
 		LLRect label_rect( left, top, label_width, bottom );
-		mLabelBox = new LLTextBox( std::string("SliderCtrl Label"), label_rect, label, font );
+		LLTextBox::Params params(p.slider_label);
+		params.rect.setIfNotProvided(label_rect);
+		params.font.setIfNotProvided(p.font);
+		params.text(p.label);
+		mLabelBox = LLUICtrlFactory::create<LLTextBox> (params);
 		addChild(mLabelBox);
 	}
 
+	if (p.show_text && !p.text_width.isProvided())
+	{
+		// calculate the size of the text box (log max_value is number of digits - 1 so plus 1)
+		if ( p.max_value )
+			text_width = p.font()->getWidth(std::string("0")) * ( static_cast < S32 > ( log10  ( p.max_value ) ) + p.decimal_digits + 1 );
+
+		if ( p.increment < 1.0f )
+			text_width += p.font()->getWidth(std::string("."));	// (mostly) take account of decimal point in value
+
+		if ( p.min_value < 0.0f || p.max_value < 0.0f )
+			text_width += p.font()->getWidth(std::string("-"));	// (mostly) take account of minus sign 
+
+		// padding to make things look nicer
+		text_width += 8;
+	}
+
+
+	S32 text_left = getRect().getWidth() - text_width;
+	static LLUICachedControl<S32> sliderctrl_spacing ("UISliderctrlSpacing", 0);
+
 	S32 slider_right = getRect().getWidth();
-	if( show_text )
+	if( p.show_text )
 	{
-		slider_right = text_left - SLIDERCTRL_SPACING;
+		slider_right = text_left - sliderctrl_spacing;
 	}
 
-	S32 slider_left = label_width ? label_width + SLIDERCTRL_SPACING : 0;
-	LLRect slider_rect( slider_left, top, slider_right, bottom );
-	mSlider = new LLSlider(std::string("slider"),
-						   slider_rect, 
-						   LLSliderCtrl::onSliderCommit, this, 
-						   initial_value, min_value, max_value, increment, volume,
-						   control_which );
+	S32 slider_left = label_width ? label_width + sliderctrl_spacing : 0;
+	LLSlider::Params slider_p(p.slider_bar);
+	slider_p.name("slider_bar");
+	slider_p.rect.setIfNotProvided(LLRect(slider_left,top,slider_right,bottom));
+	slider_p.initial_value.setIfNotProvided(p.initial_value().asReal());
+	slider_p.min_value.setIfNotProvided(p.min_value);
+	slider_p.max_value.setIfNotProvided(p.max_value);
+	slider_p.increment.setIfNotProvided(p.increment);
+
+	slider_p.commit_callback.function(&LLSliderCtrl::onSliderCommit);
+	slider_p.control_name(p.control_name);
+	slider_p.mouse_down_callback( p.mouse_down_callback );
+	slider_p.mouse_up_callback( p.mouse_up_callback );
+	mSlider = LLUICtrlFactory::create<LLSlider> (slider_p);
+
 	addChild( mSlider );
 	
-	if( show_text )
+	if( p.show_text() )
 	{
 		LLRect text_rect( text_left, top, getRect().getWidth(), bottom );
-		if( can_edit_text )
+		if( p.can_edit_text() )
 		{
-			mEditor = new LLLineEditor( std::string("SliderCtrl Editor"), text_rect,
-										LLStringUtil::null, font,
-										MAX_STRING_LENGTH,
-										&LLSliderCtrl::onEditorCommit, NULL, NULL, this,
-										&LLLineEditor::prevalidateFloat );
-			mEditor->setFollowsLeft();
-			mEditor->setFollowsBottom();
+			LLLineEditor::Params line_p(p.value_editor);
+			line_p.rect.setIfNotProvided(text_rect);
+			line_p.font.setIfNotProvided(p.font);
+			line_p.commit_callback.function(&LLSliderCtrl::onEditorCommit);
+			line_p.prevalidate_callback(&LLLineEditor::prevalidateFloat);
+			mEditor = LLUICtrlFactory::create<LLLineEditor>(line_p);
+
 			mEditor->setFocusReceivedCallback( &LLSliderCtrl::onEditorGainFocus, this );
-			mEditor->setIgnoreTab(TRUE);
 			// don't do this, as selecting the entire text is single clicking in some cases
 			// and double clicking in others
 			//mEditor->setSelectAllonFocusReceived(TRUE);
@@ -134,9 +153,10 @@ LLSliderCtrl::LLSliderCtrl(const std::string& name, const LLRect& rect,
 		}
 		else
 		{
-			mTextBox = new LLTextBox( std::string("SliderCtrl Text"), text_rect,	LLStringUtil::null,	font);
-			mTextBox->setFollowsLeft();
-			mTextBox->setFollowsBottom();
+			LLTextBox::Params text_p(p.value_text);
+			text_p.rect.setIfNotProvided(text_rect);
+			text_p.font.setIfNotProvided(p.font);
+			mTextBox = LLUICtrlFactory::create<LLTextBox>(text_p);
 			addChild(mTextBox);
 		}
 	}
@@ -144,7 +164,6 @@ LLSliderCtrl::LLSliderCtrl(const std::string& name, const LLRect& rect,
 	updateText();
 }
 
-
 // static
 void LLSliderCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata )
 {
@@ -179,7 +198,8 @@ BOOL LLSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit&
 			S32 delta = rect.mRight - prev_right;
 			rect = mSlider->getRect();
 			S32 left = rect.mLeft + delta;
-			left = llclamp(left, 0, rect.mRight-SLIDERCTRL_SPACING);
+			static LLUICachedControl<S32> sliderctrl_spacing ("UISliderctrlSpacing", 0);
+			left = llclamp(left, 0, rect.mRight - sliderctrl_spacing);
 			rect.mLeft = left;
 			mSlider->setRect(rect);
 		}
@@ -224,10 +244,11 @@ void LLSliderCtrl::updateText()
 }
 
 // static
-void LLSliderCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
+void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata )
 {
-	LLSliderCtrl* self = (LLSliderCtrl*) userdata;
-	llassert( caller == self->mEditor );
+	LLSliderCtrl* self = dynamic_cast<LLSliderCtrl*>(ctrl->getParent());
+	if (!self)
+		return;
 
 	BOOL success = FALSE;
 	F32 val = self->mValue;
@@ -240,17 +261,9 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
 		val = (F32) atof( text.c_str() );
 		if( self->mSlider->getMinValue() <= val && val <= self->mSlider->getMaxValue() )
 		{
-			if( self->mValidateCallback )
+			self->setValue( val );  // set the value temporarily so that the callback can retrieve it.
+			if( self->mValidateSignal( self, val ) )
 			{
-				self->setValue( val );  // set the value temporarily so that the callback can retrieve it.
-				if( self->mValidateCallback( self, self->mCallbackUserData ) )
-				{
-					success = TRUE;
-				}
-			}
-			else
-			{
-				self->setValue( val );
 				success = TRUE;
 			}
 		}
@@ -272,26 +285,19 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
 }
 
 // static
-void LLSliderCtrl::onSliderCommit( LLUICtrl* caller, void *userdata )
+void LLSliderCtrl::onSliderCommit( LLUICtrl* ctrl, const LLSD& userdata )
 {
-	LLSliderCtrl* self = (LLSliderCtrl*) userdata;
-	llassert( caller == self->mSlider );
+	LLSliderCtrl* self = dynamic_cast<LLSliderCtrl*>(ctrl->getParent());
+	if (!self)
+		return;
 
 	BOOL success = FALSE;
 	F32 saved_val = self->mValue;
 	F32 new_val = self->mSlider->getValueF32();
 
-	if( self->mValidateCallback )
+	self->mValue = new_val;  // set the value temporarily so that the callback can retrieve it.
+	if( self->mValidateSignal( self, new_val ) )
 	{
-		self->mValue = new_val;  // set the value temporarily so that the callback can retrieve it.
-		if( self->mValidateCallback( self, self->mCallbackUserData ) )
-		{
-			success = TRUE;
-		}
-	}
-	else
-	{
-		self->mValue = new_val;
 		success = TRUE;
 	}
 
@@ -316,7 +322,7 @@ void LLSliderCtrl::setEnabled(BOOL b)
 
 	if( mLabelBox )
 	{
-		mLabelBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
+		mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
 	}
 
 	mSlider->setEnabled( b );
@@ -328,7 +334,7 @@ void LLSliderCtrl::setEnabled(BOOL b)
 
 	if( mTextBox )
 	{
-		mTextBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
+		mTextBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
 	}
 }
 
@@ -339,7 +345,7 @@ void LLSliderCtrl::setTentative(BOOL b)
 	{
 		mEditor->setTentative(b);
 	}
-	LLUICtrl::setTentative(b);
+	LLF32UICtrl::setTentative(b);
 }
 
 
@@ -351,8 +357,9 @@ void LLSliderCtrl::onCommit()
 	{
 		mEditor->setTentative(FALSE);
 	}
-
-	LLUICtrl::onCommit();
+	
+	setControlValue(getValueF32());
+	LLF32UICtrl::onCommit();
 }
 
 
@@ -368,37 +375,14 @@ void LLSliderCtrl::setPrecision(S32 precision)
 	updateText();
 }
 
-void LLSliderCtrl::setSliderMouseDownCallback( void (*slider_mousedown_callback)(LLUICtrl* caller, void* userdata) )
-{
-	mSliderMouseDownCallback = slider_mousedown_callback;
-	mSlider->setMouseDownCallback( LLSliderCtrl::onSliderMouseDown );
-}
-
-// static
-void LLSliderCtrl::onSliderMouseDown(LLUICtrl* caller, void* userdata)
-{
-	LLSliderCtrl* self = (LLSliderCtrl*) userdata;
-	if( self->mSliderMouseDownCallback )
-	{
-		self->mSliderMouseDownCallback( self, self->mCallbackUserData );
-	}
-}
-
-
-void LLSliderCtrl::setSliderMouseUpCallback( void (*slider_mouseup_callback)(LLUICtrl* caller, void* userdata) )
+boost::signals::connection LLSliderCtrl::setSliderMouseDownCallback( const commit_signal_t::slot_type& cb )
 {
-	mSliderMouseUpCallback = slider_mouseup_callback;
-	mSlider->setMouseUpCallback( LLSliderCtrl::onSliderMouseUp );
+	return mSlider->setMouseDownCallback( cb );
 }
 
-// static
-void LLSliderCtrl::onSliderMouseUp(LLUICtrl* caller, void* userdata)
+boost::signals::connection LLSliderCtrl::setSliderMouseUpCallback( const commit_signal_t::slot_type& cb )
 {
-	LLSliderCtrl* self = (LLSliderCtrl*) userdata;
-	if( self->mSliderMouseUpCallback )
-	{
-		self->mSliderMouseUpCallback( self, self->mCallbackUserData );
-	}
+	return mSlider->setMouseUpCallback( cb );
 }
 
 void LLSliderCtrl::onTabInto()
@@ -414,131 +398,4 @@ void LLSliderCtrl::reportInvalidData()
 	make_ui_sound("UISndBadKeystroke");
 }
 
-// virtual
-LLXMLNodePtr LLSliderCtrl::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("show_text", TRUE)->setBoolValue(mShowText);
-
-	node->createChild("can_edit_text", TRUE)->setBoolValue(mCanEditText);
-
-	node->createChild("volume", TRUE)->setBoolValue(mVolumeSlider);
-	
-	node->createChild("decimal_digits", TRUE)->setIntValue(mPrecision);
-
-	if (mLabelBox)
-	{
-		node->createChild("label", TRUE)->setStringValue(mLabelBox->getText());
-	}
-
-	// TomY TODO: Do we really want to export the transient state of the slider?
-	node->createChild("value", TRUE)->setFloatValue(mValue);
-
-	if (mSlider)
-	{
-		node->createChild("initial_val", TRUE)->setFloatValue(mSlider->getInitialValue());
-		node->createChild("min_val", TRUE)->setFloatValue(mSlider->getMinValue());
-		node->createChild("max_val", TRUE)->setFloatValue(mSlider->getMaxValue());
-		node->createChild("increment", TRUE)->setFloatValue(mSlider->getIncrement());
-	}
-	addColorXML(node, mTextEnabledColor, "text_enabled_color", "LabelTextColor");
-	addColorXML(node, mTextDisabledColor, "text_disabled_color", "LabelDisabledColor");
-
-	return node;
-}
-
-LLView* LLSliderCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("slider");
-	node->getAttributeString("name", name);
-
-	std::string label;
-	node->getAttributeString("label", label);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	LLFontGL* font = LLView::selectFont(node);
-
-	// HACK: Font might not be specified.
-	if (!font)
-	{
-		font = LLFontGL::getFontSansSerifSmall();
-	}
-
-	S32 label_width = 0;
-	node->getAttributeS32("label_width", label_width);
 
-	BOOL show_text = TRUE;
-	node->getAttributeBOOL("show_text", show_text);
-
-	BOOL can_edit_text = FALSE;
-	node->getAttributeBOOL("can_edit_text", can_edit_text);
-
-	BOOL volume = FALSE;
-	node->getAttributeBOOL("volume", volume);
-
-	F32 initial_value = 0.f;
-	node->getAttributeF32("initial_val", initial_value);
-
-	F32 min_value = 0.f;
-	node->getAttributeF32("min_val", min_value);
-
-	F32 max_value = 1.f; 
-	node->getAttributeF32("max_val", max_value);
-
-	F32 increment = 0.1f;
-	node->getAttributeF32("increment", increment);
-
-	U32 precision = 3;
-	node->getAttributeU32("decimal_digits", precision);
-
-	S32 text_left = 0;
-	if (show_text)
-	{
-		// calculate the size of the text box (log max_value is number of digits - 1 so plus 1)
-		if ( max_value )
-			text_left = font->getWidth(std::string("0")) * ( static_cast < S32 > ( log10  ( max_value ) ) + precision + 1 );
-
-		if ( increment < 1.0f )
-			text_left += font->getWidth(std::string("."));	// (mostly) take account of decimal point in value
-
-		if ( min_value < 0.0f || max_value < 0.0f )
-			text_left += font->getWidth(std::string("-"));	// (mostly) take account of minus sign 
-
-		// padding to make things look nicer
-		text_left += 8;
-	}
-
-	LLUICtrlCallback callback = NULL;
-
-	if (label.empty())
-	{
-		label.assign(node->getTextContents());
-	}
-
-	LLSliderCtrl* slider = new LLSliderCtrl(name,
-							rect,
-							label,
-							font,
-							label_width,
-							rect.getWidth() - text_left,
-							show_text,
-							can_edit_text,
-							volume,
-							callback,
-							NULL,
-							initial_value, 
-							min_value, 
-							max_value, 
-							increment);
-
-	slider->setPrecision(precision);
-
-	slider->initFromXML(node, parent);
-
-	slider->updateText();
-	
-	return slider;
-}
diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h
index 272dd7ffd3..0bcb1ccc9b 100644
--- a/indra/llui/llsliderctrl.h
+++ b/indra/llui/llsliderctrl.h
@@ -38,54 +38,71 @@
 #include "llslider.h"
 #include "lltextbox.h"
 #include "llrect.h"
+#include "lllineeditor.h"
 
-//
-// Constants
-//
-const S32	SLIDERCTRL_SPACING		=  4;				// space between label, slider, and text
-const S32	SLIDERCTRL_HEIGHT		=  16;
 
-
-class LLSliderCtrl : public LLUICtrl
+class LLSliderCtrl : public LLF32UICtrl
 {
 public:
-	LLSliderCtrl(const std::string& name, 
-		const LLRect& rect, 
-		const std::string& label, 
-		const LLFontGL* font,
-		S32 slider_left,
-		S32 text_left,
-		BOOL show_text,
-		BOOL can_edit_text,
-		BOOL volume, //TODO: create a "volume" slider sub-class or just use image art, no?  -MG
-		void (*commit_callback)(LLUICtrl*, void*),
-		void* callback_userdata,
-		F32 initial_value, F32 min_value, F32 max_value, F32 increment,
-		const std::string& control_which = LLStringUtil::null );
-
+	struct Params : public LLInitParam::Block<Params, LLF32UICtrl::Params>
+	{
+		Optional<S32>			label_width;
+		Optional<S32>			text_width;
+		Optional<bool>			show_text;
+		Optional<bool>			can_edit_text;
+		Optional<bool>			is_volume_slider;
+		Optional<S32>			decimal_digits;
+
+		Optional<LLUIColor>		text_color,
+								text_disabled_color;
+
+		Optional<CommitCallbackParam>	mouse_down_callback,
+										mouse_up_callback;
+
+		Optional<LLSlider::Params>		slider_bar;
+		Optional<LLLineEditor::Params>	value_editor;
+		Optional<LLTextBox::Params>		value_text;
+		Optional<LLTextBox::Params>		slider_label;
+
+		Params()
+		:	text_width("text_width"),
+			label_width("label_width"),
+			show_text("show_text"),
+			can_edit_text("can_edit_text"),
+			is_volume_slider("volume"),
+			decimal_digits("decimal_digits", 3),
+			text_color("text_color"),
+			text_disabled_color("text_disabled_color"),
+			slider_bar("slider_bar"),
+			value_editor("value_editor"),
+			value_text("value_text"),
+			slider_label("slider_label"),
+			mouse_down_callback("mouse_down_callback"),
+			mouse_up_callback("mouse_up_callback")
+		{}
+	};
+protected:
+	LLSliderCtrl(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	virtual ~LLSliderCtrl() {} // Children all cleaned up by default view destructor.
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
-	F32				getValueF32() const { return mSlider->getValueF32(); }
+	/*virtual*/ F32	getValueF32() const { return mSlider->getValueF32(); }
 	void			setValue(F32 v, BOOL from_event = FALSE);
 
-	virtual void	setValue(const LLSD& value)	{ setValue((F32)value.asReal(), TRUE); }
-	virtual LLSD	getValue() const			{ return LLSD(getValueF32()); }
-	virtual BOOL	setLabelArg( const std::string& key, const LLStringExplicit& text );
-
-	virtual void	setMinValue(LLSD min_value)	{ setMinValue((F32)min_value.asReal()); }
-	virtual void	setMaxValue(LLSD max_value)	{ setMaxValue((F32)max_value.asReal()); }
+	/*virtual*/ void	setValue(const LLSD& value)	{ setValue((F32)value.asReal(), TRUE); }
+	/*virtual*/ LLSD	getValue() const			{ return LLSD(getValueF32()); }
+	/*virtual*/ BOOL	setLabelArg( const std::string& key, const LLStringExplicit& text );
 
 	BOOL			isMouseHeldDown() const { return mSlider->hasMouseCapture(); }
 
-	virtual void    setEnabled( BOOL b );
-	virtual void	clear();
 	virtual void	setPrecision(S32 precision);
-	void			setMinValue(F32 min_value)  { mSlider->setMinValue(min_value); updateText(); }
-	void			setMaxValue(F32 max_value)  { mSlider->setMaxValue(max_value); updateText(); }
-	void			setIncrement(F32 increment) { mSlider->setIncrement(increment);}
+
+	/*virtual*/ void    setEnabled( BOOL b );
+	/*virtual*/ void	clear();
+	/*virtual*/ void	setMinValue(F32 min_value)  { mSlider->setMinValue(min_value); updateText(); }
+	/*virtual*/ void	setMaxValue(F32 max_value)  { mSlider->setMaxValue(max_value); updateText(); }
+	/*virtual*/ void	setIncrement(F32 increment) { mSlider->setIncrement(increment);}
 
 	F32				getMinValue() { return mSlider->getMinValue(); }
 	F32				getMaxValue() { return mSlider->getMaxValue(); }
@@ -94,27 +111,23 @@ public:
 	void			setLabelColor(const LLColor4& c)			{ mTextEnabledColor = c; }
 	void			setDisabledLabelColor(const LLColor4& c)	{ mTextDisabledColor = c; }
 
-	void			setSliderMouseDownCallback(	void (*slider_mousedown_callback)(LLUICtrl* caller, void* userdata) );
-	void			setSliderMouseUpCallback(	void (*slider_mouseup_callback)(LLUICtrl* caller, void* userdata) );
+	boost::signals::connection setSliderMouseDownCallback(	const commit_signal_t::slot_type& cb );
+	boost::signals::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
 
-	virtual void	onTabInto();
+	/*virtual*/ void	onTabInto();
 
-	virtual void	setTentative(BOOL b);			// marks value as tentative
-	virtual void	onCommit();						// mark not tentative, then commit
+	/*virtual*/ void	setTentative(BOOL b);			// marks value as tentative
+	/*virtual*/ void	onCommit();						// mark not tentative, then commit
 
-	virtual void		setControlName(const std::string& control_name, LLView* context)
+	/*virtual*/ void	setControlName(const std::string& control_name, LLView* context)
 	{
-		LLView::setControlName(control_name, context);
+		LLUICtrl::setControlName(control_name, context);
 		mSlider->setControlName(control_name, context);
 	}
 
-	virtual std::string getControlName() const { return mSlider->getControlName(); }
+	static void		onSliderCommit(LLUICtrl* caller, const LLSD& userdata);
 	
-	static void		onSliderCommit(LLUICtrl* caller, void* userdata);
-	static void		onSliderMouseDown(LLUICtrl* caller,void* userdata);
-	static void		onSliderMouseUp(LLUICtrl* caller,void* userdata);
-
-	static void		onEditorCommit(LLUICtrl* caller, void* userdata);
+	static void		onEditorCommit(LLUICtrl* ctrl, const LLSD& userdata);
 	static void		onEditorGainFocus(LLFocusableElement* caller, void *userdata);
 	static void		onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata);
 
@@ -125,7 +138,6 @@ private:
 	const LLFontGL*	mFont;
 	BOOL			mShowText;
 	BOOL			mCanEditText;
-	BOOL			mVolumeSlider;
 	
 	S32				mPrecision;
 	LLTextBox*		mLabelBox;
@@ -136,11 +148,8 @@ private:
 	class LLLineEditor*	mEditor;
 	LLTextBox*		mTextBox;
 
-	LLColor4		mTextEnabledColor;
-	LLColor4		mTextDisabledColor;
-
-	void			(*mSliderMouseUpCallback)( LLUICtrl* ctrl, void* userdata );
-	void			(*mSliderMouseDownCallback)( LLUICtrl* ctrl, void* userdata );
+	LLUIColor	mTextEnabledColor;
+	LLUIColor	mTextDisabledColor;
 };
 
 #endif  // LL_LLSLIDERCTRL_H
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index c54a2cd140..ac4b528aac 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -49,97 +49,119 @@
 #include "llcontrol.h"
 #include "llfocusmgr.h"
 #include "llresmgr.h"
+#include "lluictrlfactory.h"
 
 const U32 MAX_STRING_LENGTH = 32;
 
 static LLRegisterWidget<LLSpinCtrl> r2("spinner");
- 
-LLSpinCtrl::LLSpinCtrl(	const std::string& name, const LLRect& rect, const std::string& label, const LLFontGL* font,
-	void (*commit_callback)(LLUICtrl*, void*),
-	void* callback_user_data,
-	F32 initial_value, F32 min_value, F32 max_value, F32 increment,
-	const std::string& control_name,
-	S32 label_width)
-	:
-	LLUICtrl(name, rect, TRUE, commit_callback, callback_user_data, FOLLOWS_LEFT | FOLLOWS_TOP ),
-	mValue( initial_value ),
-	mInitialValue( initial_value ),
-	mMaxValue( max_value ),
-	mMinValue( min_value ),
-	mIncrement( increment ),
-	mPrecision( 3 ),
-	mLabelBox( NULL ),
-	mTextEnabledColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ),
-	mTextDisabledColor( LLUI::sColorsGroup->getColor( "LabelDisabledColor" ) ),
-	mbHasBeenSet( FALSE )
+
+LLSpinCtrl::Params::Params()
+:	label_width("label_width"),
+	decimal_digits("decimal_digits"),
+	allow_text_entry("allow_text_entry", true),
+	text_enabled_color("text_enabled_color"),
+	text_disabled_color("text_disabled_color")
+{}
+
+LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p)
+:	LLF32UICtrl(p),
+	mLabelBox(NULL),
+	mbHasBeenSet( FALSE ),
+	mPrecision(p.decimal_digits),
+	mTextEnabledColor(p.text_enabled_color()),
+	mTextDisabledColor(p.text_disabled_color())
 {
+	static LLUICachedControl<S32> spinctrl_spacing ("UISpinctrlSpacing", 0);
+	static LLUICachedControl<S32> spinctrl_btn_width ("UISpinctrlBtnWidth", 0);
+	static LLUICachedControl<S32> spinctrl_btn_height ("UISpinctrlBtnHeight", 0);
 	S32 top = getRect().getHeight();
-	S32 bottom = top - 2 * SPINCTRL_BTN_HEIGHT;
+	S32 bottom = top - 2 * spinctrl_btn_height;
 	S32 centered_top = top;
 	S32 centered_bottom = bottom;
 	S32 btn_left = 0;
+	// reserve space for spinner
+	S32 label_width = llclamp(p.label_width(), 0, llmax(0, getRect().getWidth() - 40));
 
 	// Label
-	if( !label.empty() )
+	if( !p.label().empty() )
 	{
 		LLRect label_rect( 0, centered_top, label_width, centered_bottom );
-		mLabelBox = new LLTextBox( std::string("SpinCtrl Label"), label_rect, label, font );
+		LLTextBox::Params params;
+		params.name("SpinCtrl Label");
+		params.rect(label_rect);
+		params.text(p.label);
+		if (p.font.isProvided())
+		{
+			params.font(p.font);
+		}
+		mLabelBox = LLUICtrlFactory::create<LLTextBox> (params);
 		addChild(mLabelBox);
 
-		btn_left += label_rect.mRight + SPINCTRL_SPACING;
+		btn_left += label_rect.mRight + spinctrl_spacing;
 	}
 
-	S32 btn_right = btn_left + SPINCTRL_BTN_WIDTH;
+	S32 btn_right = btn_left + spinctrl_btn_width;
 	
 	// Spin buttons
-	LLRect up_rect( btn_left, top, btn_right, top - SPINCTRL_BTN_HEIGHT );
-	std::string out_id = "UIImgBtnSpinUpOutUUID";
-	std::string in_id = "UIImgBtnSpinUpInUUID";
-	mUpBtn = new LLButton(std::string("SpinCtrl Up"), up_rect,
-								   out_id,
-								   in_id,
-								   LLStringUtil::null,
-								   &LLSpinCtrl::onUpBtn, this, LLFontGL::getFontSansSerif() );
-	mUpBtn->setFollowsLeft();
-	mUpBtn->setFollowsBottom();
-	mUpBtn->setHeldDownCallback( &LLSpinCtrl::onUpBtn );
-	mUpBtn->setTabStop(FALSE);
+	LLButton::Params up_button_params;
+	up_button_params.name(std::string("SpinCtrl Up"));
+	up_button_params.rect
+					.left(btn_left)
+					.top(top)
+					.right(btn_right)
+					.height(spinctrl_btn_height);
+	up_button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM);
+	up_button_params.image_unselected.name("spin_up_out_blue.tga");
+	up_button_params.image_selected.name("spin_up_in_blue.tga");
+	up_button_params.click_callback.function(boost::bind(&LLSpinCtrl::onUpBtn, this, _2));
+	up_button_params.mouse_held_callback.function(boost::bind(&LLSpinCtrl::onUpBtn, this, _2));
+	up_button_params.tab_stop(false);
+
+	mUpBtn = LLUICtrlFactory::create<LLButton>(up_button_params);
 	addChild(mUpBtn);
 
-	LLRect down_rect( btn_left, top - SPINCTRL_BTN_HEIGHT, btn_right, bottom );
-	out_id = "UIImgBtnSpinDownOutUUID";
-	in_id = "UIImgBtnSpinDownInUUID";
-	mDownBtn = new LLButton(std::string("SpinCtrl Down"), down_rect,
-							out_id,
-							in_id,
-							LLStringUtil::null,
-							&LLSpinCtrl::onDownBtn, this, LLFontGL::getFontSansSerif() );
-	mDownBtn->setFollowsLeft();
-	mDownBtn->setFollowsBottom();
-	mDownBtn->setHeldDownCallback( &LLSpinCtrl::onDownBtn );
-	mDownBtn->setTabStop(FALSE);
+	LLRect down_rect( btn_left, top - spinctrl_btn_height, btn_right, bottom );
+
+	LLButton::Params down_button_params;
+	down_button_params.name(std::string("SpinCtrl Down"));
+	down_button_params.rect
+					.left(btn_left)
+					.right(btn_right)
+					.bottom(bottom)
+					.height(spinctrl_btn_height);
+	down_button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM);
+	down_button_params.image_unselected.name("spin_down_out_blue.tga");
+	down_button_params.image_selected.name("spin_down_in_blue.tga");
+	down_button_params.click_callback.function(boost::bind(&LLSpinCtrl::onDownBtn, this, _2));
+	down_button_params.mouse_held_callback.function(boost::bind(&LLSpinCtrl::onDownBtn, this, _2));
+	down_button_params.tab_stop(false);
+	mDownBtn = LLUICtrlFactory::create<LLButton>(down_button_params);
 	addChild(mDownBtn);
 
 	LLRect editor_rect( btn_right + 1, centered_top, getRect().getWidth(), centered_bottom );
-	mEditor = new LLLineEditor( std::string("SpinCtrl Editor"), editor_rect, LLStringUtil::null, font,
-								MAX_STRING_LENGTH,
-								&LLSpinCtrl::onEditorCommit, NULL, NULL, this,
-								&LLLineEditor::prevalidateFloat );
-	mEditor->setFollowsLeft();
-	mEditor->setFollowsBottom();
+	LLLineEditor::Params params;
+	params.name("SpinCtrl Editor");
+	params.rect(editor_rect);
+	if (p.font.isProvided())
+	{
+		params.font(p.font);
+	}
+	params.max_length_bytes(MAX_STRING_LENGTH);
+	params.commit_callback.function((boost::bind(&LLSpinCtrl::onEditorCommit, this, _2)));
+	params.prevalidate_callback(&LLLineEditor::prevalidateFloat);
+	params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
+	mEditor = LLUICtrlFactory::create<LLLineEditor> (params);
 	mEditor->setFocusReceivedCallback( &LLSpinCtrl::onEditorGainFocus, this );
 	//RN: this seems to be a BAD IDEA, as it makes the editor behavior different when it has focus
 	// than when it doesn't.  Instead, if you always have to double click to select all the text, 
 	// it's easier to understand
 	//mEditor->setSelectAllonFocusReceived(TRUE);
-	mEditor->setIgnoreTab(TRUE);
 	addChild(mEditor);
 
 	updateEditor();
 	setUseBoundingRect( TRUE );
 }
 
-
 F32 clamp_precision(F32 value, S32 decimal_precision)
 {
 	// pow() isn't perfect
@@ -157,69 +179,50 @@ F32 clamp_precision(F32 value, S32 decimal_precision)
 }
 
 
-// static
-void LLSpinCtrl::onUpBtn( void *userdata )
+void LLSpinCtrl::onUpBtn( const LLSD& data )
 {
-	LLSpinCtrl* self = (LLSpinCtrl*) userdata;
-	if( self->getEnabled() )
+	if( getEnabled() )
 	{
 		// use getValue()/setValue() to force reload from/to control
-		F32 val = (F32)self->getValue().asReal() + self->mIncrement;
-		val = clamp_precision(val, self->mPrecision);
-		val = llmin( val, self->mMaxValue );
+		F32 val = (F32)getValue().asReal() + mIncrement;
+		val = clamp_precision(val, mPrecision);
+		val = llmin( val, mMaxValue );
 		
-		if( self->mValidateCallback )
+		F32 saved_val = (F32)getValue().asReal();
+		setValue(val);
+		if( !mValidateSignal( this, val ) )
 		{
-			F32 saved_val = (F32)self->getValue().asReal();
-			self->setValue(val);
-			if( !self->mValidateCallback( self, self->mCallbackUserData ) )
-			{
-				self->setValue( saved_val );
-				self->reportInvalidData();
-				self->updateEditor();
-				return;
-			}
-		}
-		else
-		{
-			self->setValue(val);
+			setValue( saved_val );
+			reportInvalidData();
+			updateEditor();
+			return;
 		}
 
-		self->updateEditor();
-		self->onCommit();
+		updateEditor();
+		onCommit();
 	}
 }
 
-// static
-void LLSpinCtrl::onDownBtn( void *userdata )
+void LLSpinCtrl::onDownBtn( const LLSD& data )
 {
-	LLSpinCtrl* self = (LLSpinCtrl*) userdata;
-
-	if( self->getEnabled() )
+	if( getEnabled() )
 	{
-		F32 val = (F32)self->getValue().asReal() - self->mIncrement;
-		val = clamp_precision(val, self->mPrecision);
-		val = llmax( val, self->mMinValue );
+		F32 val = (F32)getValue().asReal() - mIncrement;
+		val = clamp_precision(val, mPrecision);
+		val = llmax( val, mMinValue );
 
-		if( self->mValidateCallback )
-		{
-			F32 saved_val = (F32)self->getValue().asReal();
-			self->setValue(val);
-			if( !self->mValidateCallback( self, self->mCallbackUserData ) )
-			{
-				self->setValue( saved_val );
-				self->reportInvalidData();
-				self->updateEditor();
-				return;
-			}
-		}
-		else
+		F32 saved_val = (F32)getValue().asReal();
+		setValue(val);
+		if( !mValidateSignal( this, val ) )
 		{
-			self->setValue(val);
+			setValue( saved_val );
+			reportInvalidData();
+			updateEditor();
+			return;
 		}
 		
-		self->updateEditor();
-		self->onCommit();
+		updateEditor();
+		onCommit();
 	}
 }
 
@@ -235,10 +238,10 @@ void LLSpinCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata )
 void LLSpinCtrl::setValue(const LLSD& value )
 {
 	F32 v = (F32)value.asReal();
-	if (mValue != v || !mbHasBeenSet)
+	if (getValueF32() != v || !mbHasBeenSet)
 	{
 		mbHasBeenSet = TRUE;
-		mValue = v;
+        LLF32UICtrl::setValue(value);
 		
 		if (!mEditor->hasFocus())
 		{
@@ -251,10 +254,10 @@ void LLSpinCtrl::setValue(const LLSD& value )
 void LLSpinCtrl::forceSetValue(const LLSD& value )
 {
 	F32 v = (F32)value.asReal();
-	if (mValue != v || !mbHasBeenSet)
+	if (getValueF32() != v || !mbHasBeenSet)
 	{
 		mbHasBeenSet = TRUE;
-		mValue = v;
+        LLF32UICtrl::setValue(value);
 		
 		updateEditor();
 	}
@@ -286,55 +289,43 @@ void LLSpinCtrl::updateEditor()
 	mEditor->setText( text );
 }
 
-void LLSpinCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
+void LLSpinCtrl::onEditorCommit( const LLSD& data )
 {
 	BOOL success = FALSE;
 	
-	LLSpinCtrl* self = (LLSpinCtrl*) userdata;
-	llassert( caller == self->mEditor );
-
-	std::string text = self->mEditor->getText();
+	std::string text = mEditor->getText();
 	if( LLLineEditor::postvalidateFloat( text ) )
 	{
 		LLLocale locale(LLLocale::USER_LOCALE);
 		F32 val = (F32) atof(text.c_str());
 
-		if (val < self->mMinValue) val = self->mMinValue;
-		if (val > self->mMaxValue) val = self->mMaxValue;
+		if (val < mMinValue) val = mMinValue;
+		if (val > mMaxValue) val = mMaxValue;
 
-		if( self->mValidateCallback )
+		F32 saved_val = getValueF32();
+		setValue(val);
+		if( mValidateSignal( this, val ) )
 		{
-			F32 saved_val = self->mValue;
-			self->mValue = val;
-			if( self->mValidateCallback( self, self->mCallbackUserData ) )
-			{
-				success = TRUE;
-				self->onCommit();
-			}
-			else
-			{
-				self->mValue = saved_val;
-			}
+			success = TRUE;
+			onCommit();
 		}
 		else
 		{
-			self->mValue = val;
-			self->onCommit();
-			success = TRUE;
+			setValue(saved_val);
 		}
 	}
-	self->updateEditor();
+	updateEditor();
 
 	if( !success )
 	{
-		self->reportInvalidData();		
+		reportInvalidData();		
 	}
 }
 
 
 void LLSpinCtrl::forceEditorCommit()
 {
-	onEditorCommit(mEditor, this);
+	onEditorCommit( LLSD() );
 }
 
 
@@ -348,6 +339,10 @@ void LLSpinCtrl::setEnabled(BOOL b)
 {
 	LLView::setEnabled( b );
 	mEditor->setEnabled( b );
+	if( mLabelBox )
+	{
+		mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+	}
 }
 
 
@@ -368,8 +363,8 @@ BOOL LLSpinCtrl::isMouseHeldDown() const
 void LLSpinCtrl::onCommit()
 {
 	setTentative(FALSE);
-	setControlValue(mValue);
-	LLUICtrl::onCommit();
+	setControlValue(getValueF32());
+	LLF32UICtrl::onCommit();
 }
 
 
@@ -414,29 +409,19 @@ void LLSpinCtrl::reportInvalidData()
 	make_ui_sound("UISndBadKeystroke");
 }
 
-void LLSpinCtrl::draw()
-{
-	if( mLabelBox )
-	{
-		mLabelBox->setColor( getEnabled() ? mTextEnabledColor : mTextDisabledColor );
-	}
-	LLUICtrl::draw();
-}
-
-
 BOOL LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
 {
 	if( clicks > 0 )
 	{
 		while( clicks-- )
 		{
-			LLSpinCtrl::onDownBtn(this);
+			onDownBtn(getValue());
 		}
 	}
 	else
 	while( clicks++ )
 	{
-		LLSpinCtrl::onUpBtn(this);
+		onUpBtn(getValue());
 	}
 
 	return TRUE;
@@ -456,105 +441,15 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
 		}
 		if(key == KEY_UP)
 		{
-			LLSpinCtrl::onUpBtn(this);
+			onUpBtn(getValue());
 			return TRUE;
 		}
 		if(key == KEY_DOWN)
 		{
-			LLSpinCtrl::onDownBtn(this);
+			onDownBtn(getValue());
 			return TRUE;
 		}
 	}
 	return FALSE;
 }
 
-// virtual
-LLXMLNodePtr LLSpinCtrl::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("decimal_digits", TRUE)->setIntValue(mPrecision);
-
-	if (mLabelBox)
-	{
-		node->createChild("label", TRUE)->setStringValue(mLabelBox->getText());
-
-		node->createChild("label_width", TRUE)->setIntValue(mLabelBox->getRect().getWidth());
-	}
-
-	node->createChild("initial_val", TRUE)->setFloatValue(mInitialValue);
-
-	node->createChild("min_val", TRUE)->setFloatValue(mMinValue);
-
-	node->createChild("max_val", TRUE)->setFloatValue(mMaxValue);
-
-	node->createChild("increment", TRUE)->setFloatValue(mIncrement);
-	
-	addColorXML(node, mTextEnabledColor, "text_enabled_color", "LabelTextColor");
-	addColorXML(node, mTextDisabledColor, "text_disabled_color", "LabelDisabledColor");
-
-	return node;
-}
-
-LLView* LLSpinCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("spinner");
-	node->getAttributeString("name", name);
-
-	std::string label;
-	node->getAttributeString("label", label);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	LLFontGL* font = LLView::selectFont(node);
-
-	F32 initial_value = 0.f;
-	node->getAttributeF32("initial_val", initial_value);
-
-	F32 min_value = 0.f;
-	node->getAttributeF32("min_val", min_value);
-
-	F32 max_value = 1.f; 
-	node->getAttributeF32("max_val", max_value);
-
-	F32 increment = 0.1f;
-	node->getAttributeF32("increment", increment);
-
-	U32 precision = 3;
-	node->getAttributeU32("decimal_digits", precision);
-	
-	S32 label_width = llmin(40, rect.getWidth() - 40);
-	node->getAttributeS32("label_width", label_width);
-
-	BOOL allow_text_entry = TRUE;
-	node->getAttributeBOOL("allow_text_entry", allow_text_entry);
-
-	LLUICtrlCallback callback = NULL;
-
-	if(label.empty())
-	{
-		label.assign( node->getValue() );
-	}
-
-	LLSpinCtrl* spinner = new LLSpinCtrl(name,
-							rect,
-							label,
-							font,
-							callback,
-							NULL,
-							initial_value, 
-							min_value, 
-							max_value, 
-							increment,
-							LLStringUtil::null,
-							label_width);
-
-	spinner->setPrecision(precision);
-
-	spinner->initFromXML(node, parent);
-	spinner->setAllowEdit(allow_text_entry);
-
-	return spinner;
-}
-
diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h
index dfd0eb3ac1..eb1a2eb8a7 100644
--- a/indra/llui/llspinctrl.h
+++ b/indra/llui/llspinctrl.h
@@ -35,62 +35,46 @@
 
 
 #include "stdtypes.h"
-#include "lluictrl.h"
+#include "llf32uictrl.h"
 #include "v4color.h"
 #include "llrect.h"
 
-//
-// Constants
-//
-const S32	SPINCTRL_BTN_HEIGHT		=  8;
-const S32	SPINCTRL_BTN_WIDTH		= 16;
-const S32	SPINCTRL_SPACING		=  2;							// space between label right and button left
-const S32	SPINCTRL_HEIGHT			=  2 * SPINCTRL_BTN_HEIGHT;
-const S32	SPINCTRL_DEFAULT_LABEL_WIDTH = 10;
-
 
 class LLSpinCtrl
-: public LLUICtrl
+: public LLF32UICtrl
 {
 public:
-	LLSpinCtrl(const std::string& name, const LLRect& rect,
-		const std::string& label,
-		const LLFontGL* font,
-		void (*commit_callback)(LLUICtrl*, void*),
-		void* callback_userdata,
-		F32 initial_value, F32 min_value, F32 max_value, F32 increment,
-		const std::string& control_name = std::string(),
-		S32 label_width = SPINCTRL_DEFAULT_LABEL_WIDTH );
-
+	struct Params : public LLInitParam::Block<Params, LLF32UICtrl::Params>
+	{
+		Optional<S32> label_width;
+		Optional<U32> decimal_digits;
+		Optional<bool> allow_text_entry;
+
+		Optional<LLUIColor> text_enabled_color;
+		Optional<LLUIColor> text_disabled_color;
+
+		Params();
+	};
+protected:
+	LLSpinCtrl(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	virtual ~LLSpinCtrl() {} // Children all cleaned up by default view destructor.
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory);
-
 	virtual void    forceSetValue(const LLSD& value ) ;
 	virtual void	setValue(const LLSD& value );
-	virtual LLSD	getValue() const { return mValue; }
-			F32		get() const { return (F32)getValue().asReal(); }
+			F32		get() const { return getValueF32(); }
 			void	set(F32 value) { setValue(value); mInitialValue = value; }
 
-	virtual void	setMinValue(LLSD min_value)	{ setMinValue((F32)min_value.asReal()); }
-	virtual void	setMaxValue(LLSD max_value)	{ setMaxValue((F32)max_value.asReal());  }
-
 	BOOL			isMouseHeldDown() const;
 
 	virtual void    setEnabled( BOOL b );
 	virtual void	setFocus( BOOL b );
 	virtual void	clear();
-	virtual BOOL	isDirty() const { return( mValue != mInitialValue ); }
-	virtual void    resetDirty() { mInitialValue = mValue; }
+	virtual BOOL	isDirty() const { return( getValueF32() != mInitialValue ); }
+	virtual void    resetDirty() { mInitialValue = getValueF32(); }
 
 	virtual void	setPrecision(S32 precision);
-	virtual void	setMinValue(F32 min)			{ mMinValue = min; }
-	virtual void	setMaxValue(F32 max)			{ mMaxValue = max; }
-	virtual void	setIncrement(F32 inc)			{ mIncrement = inc; }
-	virtual F32		getMinValue()			{ return mMinValue ; }
-	virtual F32 	getMaxValue()			{ return mMaxValue ; }
-	virtual F32     getIncrement()          { return mIncrement ; }
 
 	void			setLabel(const LLStringExplicit& label);
 	void			setLabelColor(const LLColor4& c)			{ mTextEnabledColor = c; }
@@ -107,31 +91,23 @@ public:
 	virtual BOOL	handleScrollWheel(S32 x,S32 y,S32 clicks);
 	virtual BOOL	handleKeyHere(KEY key, MASK mask);
 
-	virtual void	draw();
-
-	static void		onEditorCommit(LLUICtrl* caller, void* userdata);
+	void			onEditorCommit(const LLSD& data);
 	static void		onEditorGainFocus(LLFocusableElement* caller, void *userdata);
 	static void		onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata);
 
-	static void		onUpBtn(void *userdata);
-	static void		onDownBtn(void *userdata);
+	void			onUpBtn(const LLSD& data);
+	void			onDownBtn(const LLSD& data);
 
 private:
 	void			updateEditor();
 	void			reportInvalidData();
 
-	F32				mValue;
-	F32				mInitialValue;
-	F32				mMaxValue;
-	F32				mMinValue;
-	F32				mIncrement;
-
 	S32				mPrecision;
 	class LLTextBox*	mLabelBox;
 
 	class LLLineEditor*	mEditor;
-	LLColor4		mTextEnabledColor;
-	LLColor4		mTextDisabledColor;
+	LLUIColor	mTextEnabledColor;
+	LLUIColor	mTextDisabledColor;
 
 	class LLButton*		mUpBtn;
 	class LLButton*		mDownBtn;
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
new file mode 100644
index 0000000000..b5383c34ea
--- /dev/null
+++ b/indra/llui/llstatbar.cpp
@@ -0,0 +1,295 @@
+/** 
+ * @file llstatbar.cpp
+ * @brief A little map of the world with network information
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+//#include "llviewerprecompiledheaders.h"
+#include "linden_common.h"
+
+#include "llstatbar.h"
+
+#include "llmath.h"
+#include "llui.h"
+#include "llgl.h"
+#include "llfontgl.h"
+
+#include "llstat.h"
+#include "lluictrlfactory.h"
+
+static LLRegisterWidget<LLStatBar> r1("stat_bar");
+
+///////////////////////////////////////////////////////////////////////////////////
+
+LLStatBar::LLStatBar(const Params& p)
+	: LLView(p),
+	  mLabel(p.label),
+	  mUnitLabel(p.unit_label),
+	  mMinBar(p.bar_min),
+	  mMaxBar(p.bar_max),
+	  mStatp(LLStat::getStat(p.stat)),
+	  mTickSpacing(p.tick_spacing),
+	  mLabelSpacing(p.label_spacing),
+	  mPrecision(p.precision),
+	  mUpdatesPerSec(p.update_rate),
+	  mPerSec(p.show_per_sec),
+	  mDisplayBar(p.show_bar),
+	  mDisplayHistory(p.show_history),
+	  mDisplayMean(p.show_mean)
+{
+}
+
+BOOL LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask)
+{
+	if (mDisplayBar)
+	{
+		if (mDisplayHistory)
+		{
+			mDisplayBar = FALSE;
+			mDisplayHistory = FALSE;
+		}
+		else
+		{
+			mDisplayHistory = TRUE;
+		}
+	}
+	else
+	{
+		mDisplayBar = TRUE;
+	}
+
+	LLView* parent = getParent();
+	parent->reshape(parent->getRect().getWidth(), parent->getRect().getHeight(), FALSE);
+
+	return FALSE;
+}
+
+void LLStatBar::draw()
+{
+	if (!mStatp)
+	{
+//		llinfos << "No stats for statistics bar!" << llendl;
+		return;
+	}
+
+	// Get the values.
+	F32 current, min, max, mean;
+	if (mPerSec)
+	{
+		current = mStatp->getCurrentPerSec();
+		min = mStatp->getMinPerSec();
+		max = mStatp->getMaxPerSec();
+		mean = mStatp->getMeanPerSec();
+	}
+	else
+	{
+		current = mStatp->getCurrent();
+		min = mStatp->getMin();
+		max = mStatp->getMax();
+		mean = mStatp->getMean();
+	}
+
+
+	if ((mUpdatesPerSec == 0.f) || (mUpdateTimer.getElapsedTimeF32() > 1.f/mUpdatesPerSec) || (mValue == 0.f))
+	{
+		if (mDisplayMean)
+		{
+			mValue = mean;
+		}
+		else
+		{
+			mValue = current;
+		}
+		mUpdateTimer.reset();
+	}
+
+	S32 width = getRect().getWidth() - 40;
+	S32 max_width = width;
+	S32 bar_top = getRect().getHeight() - 15; // 16 pixels from top.
+	S32 bar_height = bar_top - 20;
+	S32 tick_height = 4;
+	S32 tick_width = 1;
+	S32 left, top, right, bottom;
+
+	F32 value_scale = max_width/(mMaxBar - mMinBar);
+
+	LLFontGL::getFontMonospace()->renderUTF8(mLabel, 0, 0, getRect().getHeight(), LLColor4(1.f, 1.f, 1.f, 1.f),
+											 LLFontGL::LEFT, LLFontGL::TOP);
+
+	std::string value_format;
+	std::string value_str;
+	if (!mUnitLabel.empty())
+	{
+		value_format = llformat( "%%.%df%%s", mPrecision);
+		value_str = llformat( value_format.c_str(), mValue, mUnitLabel.c_str());
+	}
+	else
+	{
+		value_format = llformat( "%%.%df", mPrecision);
+		value_str = llformat( value_format.c_str(), mValue);
+	}
+
+	// Draw the value.
+	LLFontGL::getFontMonospace()->renderUTF8(value_str, 0, width, getRect().getHeight(), 
+											 LLColor4(1.f, 1.f, 1.f, 0.5f),
+											 LLFontGL::RIGHT, LLFontGL::TOP);
+
+	value_format = llformat( "%%.%df", mPrecision);
+	if (mDisplayBar)
+	{
+		std::string tick_label;
+
+		// Draw the tick marks.
+		F32 tick_value;
+		top = bar_top;
+		bottom = bar_top - bar_height - tick_height/2;
+
+		LLGLSUIDefault gls_ui;
+		gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+		for (tick_value = mMinBar; tick_value <= mMaxBar; tick_value += mTickSpacing)
+		{
+			left = llfloor((tick_value - mMinBar)*value_scale);
+			right = left + tick_width;
+			gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 1.f, 1.f, 0.1f));
+		}
+
+		// Draw the tick labels (and big ticks).
+		bottom = bar_top - bar_height - tick_height;
+		for (tick_value = mMinBar; tick_value <= mMaxBar; tick_value += mLabelSpacing)
+		{
+			left = llfloor((tick_value - mMinBar)*value_scale);
+			right = left + tick_width;
+			gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 1.f, 1.f, 0.25f));
+
+			tick_label = llformat( value_format.c_str(), tick_value);
+			// draw labels for the tick marks
+			LLFontGL::getFontMonospace()->renderUTF8(tick_label, 0, left - 1, bar_top - bar_height - tick_height,
+													 LLColor4(1.f, 1.f, 1.f, 0.5f),
+													 LLFontGL::LEFT, LLFontGL::TOP);
+		}
+
+		// Now, draw the bars
+		top = bar_top;
+		bottom = bar_top - bar_height;
+
+		// draw background bar.
+		left = 0;
+		right = width;
+		gl_rect_2d(left, top, right, bottom, LLColor4(0.f, 0.f, 0.f, 0.25f));
+
+		if (mStatp->getNumValues() == 0)
+		{
+			// No data, don't draw anything...
+			return;
+		}
+		// draw min and max
+		left = (S32) ((min - mMinBar) * value_scale);
+
+		if (left < 0)
+		{
+			left = 0;
+			llwarns << "Min:" << min << llendl;
+		}
+
+		right = (S32) ((max - mMinBar) * value_scale);
+		gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 0.f, 0.f, 0.25f));
+
+		S32 num_values = mStatp->getNumValues() - 1;
+		if (mDisplayHistory)
+		{
+			S32 i;
+			for (i = 0; i < num_values; i++)
+			{
+				if (i == mStatp->getNextBin())
+				{
+					continue;
+				}
+				if (mPerSec)
+				{
+					left = (S32)((mStatp->getPrevPerSec(i) - mMinBar) * value_scale);
+					right = (S32)((mStatp->getPrevPerSec(i) - mMinBar) * value_scale) + 1;
+					gl_rect_2d(left, bottom+i+1, right, bottom+i, LLColor4(1.f, 0.f, 0.f, 1.f));
+				}
+				else
+				{
+					left = (S32)((mStatp->getPrev(i) - mMinBar) * value_scale);
+					right = (S32)((mStatp->getPrev(i) - mMinBar) * value_scale) + 1;
+					gl_rect_2d(left, bottom+i+1, right, bottom+i, LLColor4(1.f, 0.f, 0.f, 1.f));
+				}
+			}
+		}
+		else
+		{
+			// draw current
+			left = (S32) ((current - mMinBar) * value_scale) - 1;
+			right = (S32) ((current - mMinBar) * value_scale) + 1;
+			gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 0.f, 0.f, 1.f));
+		}
+
+		// draw mean bar
+		top = bar_top + 2;
+		bottom = bar_top - bar_height - 2;
+		left = (S32) ((mean - mMinBar) * value_scale) - 1;
+		right = (S32) ((mean - mMinBar) * value_scale) + 1;
+		gl_rect_2d(left, top, right, bottom, LLColor4(0.f, 1.f, 0.f, 1.f));
+	}
+	
+	LLView::draw();
+}
+
+void LLStatBar::setRange(F32 bar_min, F32 bar_max, F32 tick_spacing, F32 label_spacing)
+{
+	mMinBar = bar_min;
+	mMaxBar = bar_max;
+	mTickSpacing = tick_spacing;
+	mLabelSpacing = label_spacing;
+}
+
+LLRect LLStatBar::getRequiredRect()
+{
+	LLRect rect;
+
+	if (mDisplayBar)
+	{
+		if (mDisplayHistory)
+		{
+			rect.mTop = 67;
+		}
+		else
+		{
+			rect.mTop = 40;
+		}
+	}
+	else
+	{
+		rect.mTop = 14;
+	}
+	return rect;
+}
diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h
new file mode 100644
index 0000000000..7de782a24f
--- /dev/null
+++ b/indra/llui/llstatbar.h
@@ -0,0 +1,108 @@
+/** 
+ * @file llstatbar.h
+ * @brief A little map of the world with network information
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSTATBAR_H
+#define LL_LLSTATBAR_H
+
+#include "llview.h"
+#include "llframetimer.h"
+
+class LLStat;
+
+class LLStatBar : public LLView
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Optional<std::string> label;
+		Optional<std::string> unit_label;
+		Optional<F32> bar_min;
+		Optional<F32> bar_max;
+		Optional<F32> tick_spacing;
+		Optional<F32> label_spacing;
+		Optional<U32> precision;
+		Optional<F32> update_rate;
+		Optional<bool> show_per_sec;
+		Optional<bool> show_bar;
+		Optional<bool> show_history;
+		Optional<bool> show_mean;
+		Optional<std::string> stat;
+		Params()
+			: label("label"),
+			  unit_label("unit_label"),
+			  bar_min("bar_min", 0.0f),
+			  bar_max("bar_max", 50.0f),
+			  tick_spacing("tick_spacing", 10.0f),
+			  label_spacing("label_spacing", 10.0f),
+			  precision("precision", 0),
+			  update_rate("update_rate", 5.0f),
+			  show_per_sec("show_per_sec", TRUE),
+			  show_bar("show_bar", TRUE),
+			  show_history("show_history", FALSE),
+			  show_mean("show_mean", TRUE),
+			  stat("stat")
+		{
+			follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
+		}
+	};
+	LLStatBar(const Params&);
+
+	virtual void draw();
+	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+
+	void setStat(LLStat* stat) { mStatp = stat; }
+	void setRange(F32 bar_min, F32 bar_max, F32 tick_spacing, F32 label_spacing);
+	void getRange(F32& bar_min, F32& bar_max) { bar_min = mMinBar; bar_max = mMaxBar; }
+	
+	/*virtual*/ LLRect getRequiredRect();	// Return the height of this object, given the set options.
+
+private:
+	F32 mMinBar;
+	F32 mMaxBar;
+	F32 mTickSpacing;
+	F32 mLabelSpacing;
+	U32 mPrecision;
+	F32 mUpdatesPerSec;
+	BOOL mPerSec;				// Use the per sec stats.
+	BOOL mDisplayBar;			// Display the bar graph.
+	BOOL mDisplayHistory;
+	BOOL mDisplayMean;			// If true, display mean, if false, display current value
+
+	LLStat* mStatp;
+
+	LLFrameTimer mUpdateTimer;
+	LLUIString mLabel;
+	std::string mUnitLabel;
+	F32 mValue;
+};
+
+#endif
diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp
new file mode 100644
index 0000000000..3bd2c9f9e7
--- /dev/null
+++ b/indra/llui/llstatgraph.cpp
@@ -0,0 +1,163 @@
+/** 
+ * @file llstatgraph.cpp
+ * @brief Simpler compact stat graph with tooltip
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+//#include "llviewerprecompiledheaders.h"
+#include "linden_common.h"
+
+#include "llstatgraph.h"
+#include "llrender.h"
+
+#include "llmath.h"
+#include "llui.h"
+#include "llstat.h"
+#include "llgl.h"
+#include "llglheaders.h"
+//#include "llviewercontrol.h"
+
+///////////////////////////////////////////////////////////////////////////////////
+
+LLStatGraph::LLStatGraph(const LLView::Params& p)
+:	LLView(p)
+{
+	mStatp = NULL;
+	setToolTip(p.name());
+	mNumThresholds = 3;
+	mThresholdColors[0] = LLColor4(0.f, 1.f, 0.f, 1.f);
+	mThresholdColors[1] = LLColor4(1.f, 1.f, 0.f, 1.f);
+	mThresholdColors[2] = LLColor4(1.f, 0.f, 0.f, 1.f);
+	mThresholdColors[3] = LLColor4(1.f, 0.f, 0.f, 1.f);
+	mThresholds[0] = 50.f;
+	mThresholds[1] = 75.f;
+	mThresholds[2] = 100.f;
+	mMin = 0.f;
+	mMax = 125.f;
+	mPerSec = TRUE;
+	mValue = 0.f;
+	mPrecision = 0;
+}
+
+void LLStatGraph::draw()
+{
+	F32 range, frac;
+	range = mMax - mMin;
+	if (mStatp)
+	{
+		if (mPerSec)
+		{
+			mValue = mStatp->getMeanPerSec();
+		}
+		else
+		{
+			mValue = mStatp->getMean();
+		}
+	}
+	frac = (mValue - mMin) / range;
+	frac = llmax(0.f, frac);
+	frac = llmin(1.f, frac);
+
+	if (mUpdateTimer.getElapsedTimeF32() > 0.5f)
+	{
+		std::string format_str;
+		std::string tmp_str;
+		format_str = llformat("%%s%%.%df%%s", mPrecision);
+		tmp_str = llformat(format_str.c_str(), mLabel.c_str(), mValue, mUnits.c_str());
+		setToolTip(tmp_str);
+
+		mUpdateTimer.reset();
+	}
+
+	LLColor4 color;
+
+	S32 i;
+	for (i = 0; i < mNumThresholds - 1; i++)
+	{
+		if (mThresholds[i] > mValue)
+		{
+			break;
+		}
+	}
+
+	//gl_drop_shadow(0,  getRect().getHeight(), getRect().getWidth(), 0,
+	//				gSavedSkinSettings.getColor("ColorDropShadow"), 
+	//				(S32) gSavedSettings.getF32("DropShadowFloater") );
+
+	color = LLUI::sSettingGroups["color"]->getColor( "MenuDefaultBgColor" );
+	gGL.color4fv(color.mV);
+	gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE);
+
+	gGL.color4fv(LLColor4::black.mV);
+	gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, FALSE);
+	
+	color = mThresholdColors[i];
+	gGL.color4fv(color.mV);
+	gl_rect_2d(1, llround(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, TRUE);
+}
+
+void LLStatGraph::setValue(const LLSD& value)
+{
+	mValue = (F32)value.asReal();
+}
+
+void LLStatGraph::setMin(const F32 min)
+{
+	mMin = min;
+}
+
+void LLStatGraph::setMax(const F32 max)
+{
+	mMax = max;
+}
+
+void LLStatGraph::setStat(LLStat *statp)
+{
+	mStatp = statp;
+}
+
+void LLStatGraph::setLabel(const std::string& label)
+{
+	mLabel = label;
+}
+
+void LLStatGraph::setUnits(const std::string& units)
+{
+	mUnits = units;
+}
+
+void LLStatGraph::setPrecision(const S32 precision)
+{
+	mPrecision = precision;
+}
+
+void LLStatGraph::setThreshold(const S32 i, F32 value)
+{
+	mThresholds[i] = value;
+}
diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h
new file mode 100644
index 0000000000..dd38050b1b
--- /dev/null
+++ b/indra/llui/llstatgraph.h
@@ -0,0 +1,76 @@
+/** 
+ * @file llstatgraph.h
+ * @brief Simpler compact stat graph with tooltip
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSTATGRAPH_H
+#define LL_LLSTATGRAPH_H
+
+#include "llview.h"
+#include "llframetimer.h"
+#include "v4color.h"
+
+class LLStat;
+
+class LLStatGraph : public LLView
+{
+public:
+	LLStatGraph(const LLView::Params&);
+
+	virtual void draw();
+
+	void setLabel(const std::string& label);
+	void setUnits(const std::string& units);
+	void setPrecision(const S32 precision);
+	void setStat(LLStat *statp);
+	void setThreshold(const S32 i, F32 value);
+	void setMin(const F32 min);
+	void setMax(const F32 max);
+
+	/*virtual*/ void setValue(const LLSD& value);
+	
+	LLStat *mStatp;
+	BOOL mPerSec;
+private:
+	F32 mValue;
+
+	F32 mMin;
+	F32 mMax;
+	LLFrameTimer mUpdateTimer;
+	std::string mLabel;
+	std::string mUnits;
+	S32 mPrecision; // Num of digits of precision after dot
+
+	S32 mNumThresholds;
+	F32 mThresholds[4];
+	LLColor4 mThresholdColors[4];
+};
+
+#endif  // LL_LLSTATGRAPH_H
diff --git a/indra/llui/llstatview.cpp b/indra/llui/llstatview.cpp
new file mode 100644
index 0000000000..e16f2c450e
--- /dev/null
+++ b/indra/llui/llstatview.cpp
@@ -0,0 +1,66 @@
+/** 
+ * @file llstatview.cpp
+ * @brief Container for all statistics info.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llstatview.h"
+
+#include "llerror.h"
+#include "llstatbar.h"
+#include "llfontgl.h"
+#include "llgl.h"
+#include "llui.h"
+
+#include "llstatbar.h"
+
+LLStatView::LLStatView(const LLStatView::Params& p)
+:	LLContainerView(p),
+	mSetting(p.setting)
+{
+	BOOL isopen = getDisplayChildren();
+	if (mSetting.length() > 0)
+	{
+		isopen = LLUI::sSettingGroups["config"]->getBOOL(mSetting);
+	}
+	setDisplayChildren(isopen);
+}
+
+LLStatView::~LLStatView()
+{
+	// Children all cleaned up by default view destructor.
+	if (mSetting.length() > 0)
+	{
+		BOOL isopen = getDisplayChildren();
+		LLUI::sSettingGroups["config"]->setBOOL(mSetting, isopen);
+	}
+}
+
diff --git a/indra/llui/llstatview.h b/indra/llui/llstatview.h
new file mode 100644
index 0000000000..0197c7ceb3
--- /dev/null
+++ b/indra/llui/llstatview.h
@@ -0,0 +1,63 @@
+/** 
+ * @file llstatview.h
+ * @brief Container for all statistics info.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSTATVIEW_H
+#define LL_LLSTATVIEW_H
+
+#include "llstatbar.h"
+#include "llcontainerview.h"
+#include <vector>
+
+class LLStatBar;
+
+class LLStatView : public LLContainerView
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLContainerView::Params>
+	{
+		Optional<std::string> setting;
+		Params() 
+		:	setting("setting")
+		{
+			follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
+		}
+	};
+	~LLStatView();
+
+protected:
+	LLStatView(const Params&);
+	friend class LLUICtrlFactory;
+
+protected:
+	std::string mSetting;
+};
+#endif // LL_STATVIEW_
diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp
index a716cbbaec..432d54dfee 100644
--- a/indra/llui/llstyle.cpp
+++ b/indra/llui/llstyle.cpp
@@ -33,10 +33,11 @@
 #include "linden_common.h"
 
 #include "llstyle.h"
+
+#include "llfontgl.h"
 #include "llstring.h"
 #include "llui.h"
 
-//#include "llviewerimagelist.h"
 
 LLStyle::LLStyle()
 {
@@ -110,7 +111,13 @@ LLStyle &LLStyle::operator=(const LLStyle &rhs)
 	return *this;
 }
 
+//virtual
+const std::string& LLStyle::getFontString() const
+{
+	return mFontName;
+}
 
+//virtual
 void LLStyle::setFontName(const std::string& fontname)
 {
 	mFontName = fontname;
@@ -118,26 +125,35 @@ void LLStyle::setFontName(const std::string& fontname)
 	std::string fontname_lc = fontname;
 	LLStringUtil::toLower(fontname_lc);
 	
-	mFontID = LLFONT_OCRA; // default
-	
+	// cache the font pointer for speed when rendering text
 	if ((fontname_lc == "sansserif") || (fontname_lc == "sans-serif"))
 	{
-		mFontID = LLFONT_SANSSERIF;
+		mFont = LLFontGL::getFontSansSerif();
 	}
 	else if ((fontname_lc == "serif"))
 	{
-		mFontID = LLFONT_SMALL;
+		// *TODO: Do we have a real serif font?
+		mFont = LLFontGL::getFontMonospace();
 	}
 	else if ((fontname_lc == "sansserifbig"))
 	{
-		mFontID = LLFONT_SANSSERIF_BIG;
+		mFont = LLFontGL::getFontSansSerifBig();
 	}
 	else if (fontname_lc ==  "small")
 	{
-		mFontID = LLFONT_SANSSERIF_SMALL;
+		mFont = LLFontGL::getFontSansSerifSmall();
+	}
+	else
+	{
+		mFont = LLFontGL::getFontMonospace();
 	}
 }
 
+//virtual
+LLFontGL* LLStyle::getFont() const
+{
+	return mFont;
+}
 
 void LLStyle::setLinkHREF(const std::string& href)
 {
@@ -166,7 +182,7 @@ LLUIImagePtr LLStyle::getImage() const
 
 void LLStyle::setImage(const LLUUID& src)
 {
-	mImagep = LLUI::sImageProvider->getUIImageByID(src);
+	mImagep = LLUI::getUIImageByID(src);
 }
 
 
diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h
index 3ad379cdd9..890abc7d67 100644
--- a/indra/llui/llstyle.h
+++ b/indra/llui/llstyle.h
@@ -34,10 +34,11 @@
 #define LL_LLSTYLE_H
 
 #include "v4color.h"
-#include "llresmgr.h"
 #include "llfont.h"
 #include "llui.h"
 
+class LLFontGL;
+
 class LLStyle : public LLRefCount
 {
 public:
@@ -55,9 +56,9 @@ public:
 	virtual BOOL isVisible() const;
 	virtual void setVisible(BOOL is_visible);
 
-	virtual const std::string& getFontString() const { return mFontName; }
+	virtual const std::string& getFontString() const;
 	virtual void setFontName(const std::string& fontname);
-	virtual LLFONT_ID getFontID() const { return mFontID; }
+	virtual LLFontGL* getFont() const;
 
 	virtual const std::string& getLinkHREF() const { return mLink; }
 	virtual void setLinkHREF(const std::string& href);
@@ -107,7 +108,7 @@ private:
 	BOOL		mVisible;
 	LLColor4	mColor;
 	std::string	mFontName;
-	LLFONT_ID   mFontID;
+	LLFontGL*   mFont;		// cached for performance
 	std::string	mLink;
 	LLUIImagePtr mImagep;
 	BOOL		mIsEmbeddedItem;
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index f4169488d4..5b24131c90 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -35,73 +35,127 @@
 #include "llfocusmgr.h"
 #include "llbutton.h"
 #include "llrect.h"
-#include "llresmgr.h"
 #include "llresizehandle.h"
 #include "lltextbox.h"
 #include "llcriticaldamp.h"
 #include "lluictrlfactory.h"
-#include "lltabcontainervertical.h"
 #include "llrender.h"
+#include "llfloater.h"
+
+//----------------------------------------------------------------------------
+
+// Implementation Notes:
+//  - Each tab points to a LLPanel (see LLTabTuple below)
+//  - When a tab is selected, the validation callback
+//    (LLUICtrl::mValidateSignal) is called
+//  -  If the validation callback returns true (or none is provided),
+//     the tab is changed and the commit callback
+//     (LLUICtrl::mCommitSignal) is called
+//  - Callbacks pass the LLTabContainer as the control,
+//    and the NAME of the selected PANEL as the LLSD data
+
+//----------------------------------------------------------------------------
 
 const F32 SCROLL_STEP_TIME = 0.4f;
 const F32 SCROLL_DELAY_TIME = 0.5f;
-const S32 TAB_PADDING = 15;
-const S32 TABCNTR_TAB_MIN_WIDTH = 60;
-const S32 TABCNTR_VERT_TAB_MIN_WIDTH = 100;
-const S32 TABCNTR_TAB_MAX_WIDTH = 150;
-const S32 TABCNTR_TAB_PARTIAL_WIDTH = 12;	// When tabs are parially obscured, how much can you still see.
-const S32 TABCNTR_TAB_HEIGHT = 16;
-const S32 TABCNTR_ARROW_BTN_SIZE = 16;
-const S32 TABCNTR_BUTTON_PANEL_OVERLAP = 1;  // how many pixels the tab buttons and tab panels overlap.
-const S32 TABCNTR_TAB_H_PAD = 4;
-
-const S32 TABCNTR_CLOSE_BTN_SIZE = 16;
-const S32 TABCNTR_HEADER_HEIGHT = LLPANEL_BORDER_WIDTH + TABCNTR_CLOSE_BTN_SIZE;
-
-const S32 TABCNTRV_CLOSE_BTN_SIZE = 16;
-const S32 TABCNTRV_HEADER_HEIGHT = LLPANEL_BORDER_WIDTH + TABCNTRV_CLOSE_BTN_SIZE;
-//const S32 TABCNTRV_TAB_WIDTH = 100;
-const S32 TABCNTRV_ARROW_BTN_SIZE = 16;
-const S32 TABCNTRV_PAD = 0;
-
-static LLRegisterWidget<LLTabContainer> r("tab_container");
-
-LLTabContainer::LLTabContainer(const std::string& name, const LLRect& rect, TabPosition pos,
-							   BOOL bordered, BOOL is_vertical )
-	: 
-	LLPanel(name, rect, bordered),
+
+void LLTabContainer::TabPositions::declareValues()
+{
+	declare("top", LLTabContainer::TOP);
+	declare("bottom", LLTabContainer::BOTTOM);
+	declare("left", LLTabContainer::LEFT);
+}
+
+//----------------------------------------------------------------------------
+
+// Structure used to map tab buttons to and from tab panels
+class LLTabTuple
+{
+public:
+	LLTabTuple( LLTabContainer* c, LLPanel* p, LLButton* b, LLTextBox* placeholder = NULL)
+		:
+		mTabContainer(c),
+		mTabPanel(p),
+		mButton(b),
+		mOldState(FALSE),
+		mPlaceholderText(placeholder),
+		mPadding(0)
+	{}
+
+	LLTabContainer*  mTabContainer;
+	LLPanel*		 mTabPanel;
+	LLButton*		 mButton;
+	BOOL			 mOldState;
+	LLTextBox*		 mPlaceholderText;
+	S32				 mPadding;
+};
+
+//----------------------------------------------------------------------------
+
+struct LLPlaceHolderPanel : public LLPanel
+{
+	// create dummy param block to register with "placeholder" nane
+	struct Params : public LLPanel::Params{};
+	LLPlaceHolderPanel(const Params& p) : LLPanel(p)
+	{}
+};
+static LLRegisterWidget<LLPlaceHolderPanel> r1("placeholder");
+static LLRegisterWidget<LLTabContainer> r2("tab_container");
+
+LLTabContainer::Params::Params()
+:	tab_width("tab_width"),
+	tab_position("tab_position"),
+	tab_min_width("tab_min_width"),
+	tab_max_width("tab_max_width"),
+	hide_tabs("hide_tabs", false)
+{
+	name(std::string("tab_container"));
+	mouse_opaque = false;
+}
+
+LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
+:	LLPanel(p),
 	mCurrentTabIdx(-1),
-	mNextTabIdx(-1),
-	mTabsHidden(FALSE),
+	mTabsHidden(p.hide_tabs),
 	mScrolled(FALSE),
 	mScrollPos(0),
 	mScrollPosPixels(0),
 	mMaxScrollPos(0),
-	mCloseCallback( NULL ),
-	mCallbackUserdata( NULL ),
 	mTitleBox(NULL),
 	mTopBorderHeight(LLPANEL_BORDER_WIDTH),
-	mTabPosition(pos),
 	mLockedTabCount(0),
-	mMinTabWidth(TABCNTR_TAB_MIN_WIDTH),
-	mMaxTabWidth(TABCNTR_TAB_MAX_WIDTH),
+	mMinTabWidth(0),
+	mMaxTabWidth(p.tab_max_width),
 	mPrevArrowBtn(NULL),
 	mNextArrowBtn(NULL),
-	mIsVertical(is_vertical),
+	mIsVertical( p.tab_position == LEFT ),
 	// Horizontal Specific
 	mJumpPrevArrowBtn(NULL),
 	mJumpNextArrowBtn(NULL),
-	mRightTabBtnOffset(0),
-	mTotalTabWidth(0)
-{ 
-	//RN: HACK to support default min width for legacy vertical tab containers
-	if (mIsVertical)
+	mRightTabBtnOffset(p.tab_padding_right),
+	mTotalTabWidth(0),
+	mTabPosition(p.tab_position)
+{
+	static LLUICachedControl<S32> tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0);
+
+	mDragAndDropDelayTimer.stop();
+
+	if (p.tab_width.isProvided())
+	{
+		mMinTabWidth = p.tab_width;
+	}
+	else if (!mIsVertical)
 	{
-		mMinTabWidth = TABCNTR_VERT_TAB_MIN_WIDTH;
+		mMinTabWidth = p.tab_min_width;
 	}
-	setMouseOpaque(FALSE);
+	else
+	{
+		// *HACK: support default min width for legacy vertical
+		// tab containers
+		mMinTabWidth = tabcntr_vert_tab_min_width;
+	}
+
 	initButtons( );
-	mDragAndDropDelayTimer.stop();
 }
 
 LLTabContainer::~LLTabContainer()
@@ -150,16 +204,45 @@ LLView* LLTabContainer::getChildView(const std::string& name, BOOL recurse, BOOL
 	return LLView::getChildView(name, recurse, create_if_missing);
 }
 
+bool LLTabContainer::addChild(LLView* view, S32 tab_group)
+{
+	LLPanel* panelp = dynamic_cast<LLPanel*>(view);
+
+	if (panelp)
+	{
+		panelp->setSaveToXML(TRUE);
+
+		addTabPanel(TabPanelParams().panel(panelp).label(panelp->getLabel()).is_placeholder(dynamic_cast<LLPlaceHolderPanel*>(view) != NULL));
+		return true;
+	}
+	else
+	{
+		return LLUICtrl::addChild(view, tab_group);
+	}
+}
+
+BOOL LLTabContainer::postBuild()
+{
+	selectFirstTab();
+
+	return TRUE;
+}
+
 // virtual
 void LLTabContainer::draw()
 {
+	static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
+	static LLUICachedControl<S32> tabcntrv_arrow_btn_size ("UITabCntrvArrowBtnSize", 0);
+	static LLUICachedControl<S32> tabcntr_tab_h_pad ("UITabCntrTabHPad", 0);
+	static LLUICachedControl<S32> tabcntr_arrow_btn_size ("UITabCntrArrowBtnSize", 0);
+	static LLUICachedControl<S32> tabcntr_tab_partial_width ("UITabCntrTabPartialWidth", 0);
 	S32 target_pixel_scroll = 0;
 	S32 cur_scroll_pos = getScrollPos();
 	if (cur_scroll_pos > 0)
 	{
+		S32 available_width_with_arrows = getRect().getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + tabcntr_arrow_btn_size  + tabcntr_arrow_btn_size + 1);
 		if (!mIsVertical)
 		{
-			S32 available_width_with_arrows = getRect().getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + TABCNTR_ARROW_BTN_SIZE  + TABCNTR_ARROW_BTN_SIZE + 1);
 			for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
 			{
 				if (cur_scroll_pos == 0)
@@ -171,26 +254,10 @@ void LLTabContainer::draw()
 			}
 
 			// Show part of the tab to the left of what is fully visible
-			target_pixel_scroll -= TABCNTR_TAB_PARTIAL_WIDTH;
+			target_pixel_scroll -= tabcntr_tab_partial_width;
 			// clamp so that rightmost tab never leaves right side of screen
 			target_pixel_scroll = llmin(mTotalTabWidth - available_width_with_arrows, target_pixel_scroll);
 		}
-		else
-		{
-			S32 available_height_with_arrows = getRect().getHeight() - getTopBorderHeight() - (LLPANEL_BORDER_WIDTH + TABCNTR_ARROW_BTN_SIZE + TABCNTR_ARROW_BTN_SIZE + 1);
-			for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
-			{
-				if (cur_scroll_pos==0)
-				{
-					break;
-				}
-				target_pixel_scroll += (*iter)->mButton->getRect().getHeight();
-				cur_scroll_pos--;
-			}
-			S32 total_tab_height = (BTN_HEIGHT + TABCNTRV_PAD) * getTabCount() + TABCNTRV_PAD;
-			// clamp so that the bottom tab never leaves bottom of panel
-			target_pixel_scroll = llmin(total_tab_height - available_height_with_arrows, target_pixel_scroll);
-		}
 	}
 
 	setScrollPosPixels((S32)lerp((F32)getScrollPosPixels(), (F32)target_pixel_scroll, LLCriticalDamp::getInterpolant(0.08f)));
@@ -207,13 +274,13 @@ void LLTabContainer::draw()
 	S32 left = 0, top = 0;
 	if (mIsVertical)
 	{
-		top = getRect().getHeight() - getTopBorderHeight() - LLPANEL_BORDER_WIDTH - 1 - (has_scroll_arrows ? TABCNTRV_ARROW_BTN_SIZE : 0);
+		top = getRect().getHeight() - getTopBorderHeight() - LLPANEL_BORDER_WIDTH - 1 - (has_scroll_arrows ? tabcntrv_arrow_btn_size : 0);
 		top += getScrollPosPixels();
 	}
 	else
 	{
 		// Set the leftmost position of the tab buttons.
-		left = LLPANEL_BORDER_WIDTH + (has_scroll_arrows ? (TABCNTR_ARROW_BTN_SIZE * 2) : TABCNTR_TAB_H_PAD);
+		left = LLPANEL_BORDER_WIDTH + (has_scroll_arrows ? (tabcntr_arrow_btn_size * 2) : tabcntr_tab_h_pad);
 		left -= getScrollPosPixels();
 	}
 	
@@ -243,8 +310,8 @@ void LLTabContainer::draw()
 			// ...but clip them.
 			if (mIsVertical)
 			{
-				clip_rect.mBottom = mNextArrowBtn->getRect().mTop + 3*TABCNTRV_PAD;
-				clip_rect.mTop = mPrevArrowBtn->getRect().mBottom - 3*TABCNTRV_PAD;
+				clip_rect.mBottom = mNextArrowBtn->getRect().mTop + 3*tabcntrv_pad;
+				clip_rect.mTop = mPrevArrowBtn->getRect().mBottom - 3*tabcntrv_pad;
 			}
 			else
 			{
@@ -262,7 +329,7 @@ void LLTabContainer::draw()
 
 			tuple->mButton->translate( left ? left - tuple->mButton->getRect().mLeft : 0,
 									   top ? top - tuple->mButton->getRect().mTop : 0 );
-			if (top) top -= BTN_HEIGHT + TABCNTRV_PAD;
+			if (top) top -= BTN_HEIGHT + tabcntrv_pad;
 			if (left) left += tuple->mButton->getRect().getWidth();
 
 			if (!mIsVertical)
@@ -316,6 +383,7 @@ void LLTabContainer::draw()
 // virtual
 BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
 {
+	static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
 	BOOL handled = FALSE;
 	BOOL has_scroll_arrows = (getMaxScrollPos() > 0);
 
@@ -359,9 +427,9 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
 		if (mIsVertical)
 		{
 			tab_rect = LLRect(firsttuple->mButton->getRect().mLeft,
-							  has_scroll_arrows ? mPrevArrowBtn->getRect().mBottom - TABCNTRV_PAD : mPrevArrowBtn->getRect().mTop,
+							  has_scroll_arrows ? mPrevArrowBtn->getRect().mBottom - tabcntrv_pad : mPrevArrowBtn->getRect().mTop,
 							  firsttuple->mButton->getRect().mRight,
-							  has_scroll_arrows ? mNextArrowBtn->getRect().mTop + TABCNTRV_PAD : mNextArrowBtn->getRect().mBottom );
+							  has_scroll_arrows ? mNextArrowBtn->getRect().mTop + tabcntrv_pad : mNextArrowBtn->getRect().mBottom );
 		}
 		else
 		{
@@ -483,6 +551,7 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask )
 // virtual
 BOOL LLTabContainer::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rect )
 {
+	static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
 	BOOL handled = LLPanel::handleToolTip( x, y, msg, sticky_rect );
 	if (!handled && getTabCount() > 0) 
 	{
@@ -493,9 +562,9 @@ BOOL LLTabContainer::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic
 		if (mIsVertical)
 		{
 			clip = LLRect(firsttuple->mButton->getRect().mLeft,
-						  has_scroll_arrows ? mPrevArrowBtn->getRect().mBottom - TABCNTRV_PAD : mPrevArrowBtn->getRect().mTop,
+						  has_scroll_arrows ? mPrevArrowBtn->getRect().mBottom - tabcntrv_pad : mPrevArrowBtn->getRect().mTop,
 						  firsttuple->mButton->getRect().mRight,
-						  has_scroll_arrows ? mNextArrowBtn->getRect().mTop + TABCNTRV_PAD : mNextArrowBtn->getRect().mBottom );
+						  has_scroll_arrows ? mNextArrowBtn->getRect().mTop + tabcntrv_pad : mNextArrowBtn->getRect().mBottom );
 		}
 		else
 		{
@@ -616,14 +685,6 @@ BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask)
 	return handled;
 }
 
-// virtual
-LLXMLNodePtr LLTabContainer::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLPanel::getXML();
-	node->createChild("tab_position", TRUE)->setStringValue((getTabPosition() == TOP ? "top" : "bottom"));
-	return node;
-}
-
 // virtual
 BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,	BOOL drop,	EDragAndDropType type, void* cargo_data, EAcceptance *accept, std::string	&tooltip)
 {
@@ -676,21 +737,33 @@ BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,	BOOL drop,	EDrag
 	return LLView::handleDragAndDrop(x,	y, mask, drop, type, cargo_data,  accept, tooltip);
 }
 
-void LLTabContainer::addTabPanel(LLPanel* child, 
-								 const std::string& label, 
-								 BOOL select, 
-								 void (*on_tab_clicked)(void*, bool), 
-								 void* userdata,
-								 S32 indent,
-								 BOOL placeholder,
-								 eInsertionPoint insertion_point)
+void LLTabContainer::addTabPanel(LLPanel* panelp)
+{
+	addTabPanel(TabPanelParams().panel(panelp));
+}
+
+void LLTabContainer::addTabPanel(const TabPanelParams& panel)
 {
+	LLPanel* child = panel.panel();
+	const std::string& label = panel.label.isProvided() 
+			? panel.label() 
+			: panel.panel()->getLabel();
+	BOOL select = panel.select_tab(); 
+	S32 indent = panel.indent();
+	BOOL placeholder = panel.is_placeholder;
+	eInsertionPoint insertion_point = panel.insert_at();
+
+	static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
+	static LLUICachedControl<S32> tabcntr_button_panel_overlap ("UITabCntrButtonPanelOverlap", 0);
+	static LLUICachedControl<S32> tabcntr_tab_height ("UITabCntrTabHeight", 0);
+	static LLUICachedControl<S32> tab_padding ("UITabPadding", 0);
 	if (child->getParent() == this)
 	{
 		// already a child of mine
 		return;
 	}
-	const LLFontGL* font = LLResMgr::getInstance()->getRes( mIsVertical ? LLFONT_SANSSERIF : LLFONT_SANSSERIF_SMALL );
+	const LLFontGL* font =
+		(mIsVertical ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifSmall());
 
 	// Store the original label for possible xml export.
 	child->setLabel(label);
@@ -700,7 +773,7 @@ void LLTabContainer::addTabPanel(LLPanel* child,
 	S32 button_width = mMinTabWidth;
 	if (!mIsVertical)
 	{
-		button_width = llclamp(font->getWidth(trimmed_label) + TAB_PADDING, mMinTabWidth, mMaxTabWidth);
+		button_width = llclamp(font->getWidth(trimmed_label) + tab_padding, mMinTabWidth, mMaxTabWidth);
 	}
 	
 	// Tab panel
@@ -708,20 +781,20 @@ void LLTabContainer::addTabPanel(LLPanel* child,
 	S32 tab_panel_bottom;
 	if( getTabPosition() == LLTabContainer::TOP )
 	{
-		S32 tab_height = mIsVertical ? BTN_HEIGHT : TABCNTR_TAB_HEIGHT;
-		tab_panel_top = getRect().getHeight() - getTopBorderHeight() - (tab_height - TABCNTR_BUTTON_PANEL_OVERLAP);	
+		S32 tab_height = mIsVertical ? BTN_HEIGHT : tabcntr_tab_height;
+		tab_panel_top = getRect().getHeight() - getTopBorderHeight() - (tab_height - tabcntr_button_panel_overlap);	
 		tab_panel_bottom = LLPANEL_BORDER_WIDTH;
 	}
 	else
 	{
 		tab_panel_top = getRect().getHeight() - getTopBorderHeight();
-		tab_panel_bottom = (TABCNTR_TAB_HEIGHT - TABCNTR_BUTTON_PANEL_OVERLAP);  // Run to the edge, covering up the border
+		tab_panel_bottom = (tabcntr_tab_height - tabcntr_button_panel_overlap);  // Run to the edge, covering up the border
 	}
 	
 	LLRect tab_panel_rect;
 	if (mIsVertical)
 	{
-		tab_panel_rect = LLRect(mMinTabWidth + (LLPANEL_BORDER_WIDTH * 2) + TABCNTRV_PAD, 
+		tab_panel_rect = LLRect(mMinTabWidth + (LLPANEL_BORDER_WIDTH * 2) + tabcntrv_pad, 
 								getRect().getHeight() - LLPANEL_BORDER_WIDTH,
 								getRect().getWidth() - LLPANEL_BORDER_WIDTH,
 								LLPANEL_BORDER_WIDTH);
@@ -750,20 +823,20 @@ void LLTabContainer::addTabPanel(LLPanel* child,
 
 	if (mIsVertical)
 	{
-		btn_rect.setLeftTopAndSize(TABCNTRV_PAD + LLPANEL_BORDER_WIDTH + 2,	// JC - Fudge factor
-								   (getRect().getHeight() - getTopBorderHeight() - LLPANEL_BORDER_WIDTH - 1) - ((BTN_HEIGHT + TABCNTRV_PAD) * getTabCount()),
+		btn_rect.setLeftTopAndSize(tabcntrv_pad + LLPANEL_BORDER_WIDTH + 2,	// JC - Fudge factor
+								   (getRect().getHeight() - getTopBorderHeight() - LLPANEL_BORDER_WIDTH - 1) - ((BTN_HEIGHT + tabcntrv_pad) * getTabCount()),
 								   mMinTabWidth,
 								   BTN_HEIGHT);
 	}
 	else if( getTabPosition() == LLTabContainer::TOP )
 	{
-		btn_rect.setLeftTopAndSize( 0, getRect().getHeight() - getTopBorderHeight() + tab_fudge, button_width, TABCNTR_TAB_HEIGHT );
+		btn_rect.setLeftTopAndSize( 0, getRect().getHeight() - getTopBorderHeight() + tab_fudge, button_width, tabcntr_tab_height );
 		tab_img = "tab_top_blue.tga";
 		tab_selected_img = "tab_top_selected_blue.tga";
 	}
 	else
 	{
-		btn_rect.setOriginAndSize( 0, 0 + tab_fudge, button_width, TABCNTR_TAB_HEIGHT );
+		btn_rect.setOriginAndSize( 0, 0 + tab_fudge, button_width, tabcntr_tab_height );
 		tab_img = "tab_bottom_blue.tga";
 		tab_selected_img = "tab_bottom_selected_blue.tga";
 	}
@@ -774,31 +847,38 @@ void LLTabContainer::addTabPanel(LLPanel* child,
 	if (placeholder)
 	{
 		btn_rect.translate(0, -LLBUTTON_V_PAD-2);
-		textbox = new LLTextBox(trimmed_label, btn_rect, trimmed_label, font);
+		LLTextBox::Params params;
+		params.name(trimmed_label);
+		params.rect(btn_rect);
+		params.text(trimmed_label);
+		params.font(font);
+		textbox = LLUICtrlFactory::create<LLTextBox> (params);
 		
-		btn = new LLButton(LLStringUtil::null, LLRect(0,0,0,0));
+		LLButton::Params p;
+		p.name("");
+		btn = LLUICtrlFactory::create<LLButton>(p);
 	}
 	else
 	{
 		if (mIsVertical)
 		{
-			btn = new LLButton(std::string("vert tab button"),
-							   btn_rect,
-							   LLStringUtil::null,
-							   LLStringUtil::null, 
-							   LLStringUtil::null, 
-							   &LLTabContainer::onTabBtn, NULL,
-							   font,
-							   trimmed_label, trimmed_label);
-			btn->setImages(std::string("tab_left.tga"), std::string("tab_left_selected.tga"));
-			btn->setScaleImage(TRUE);
-			btn->setHAlign(LLFontGL::LEFT);
-			btn->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
-			btn->setTabStop(FALSE);
+			LLButton::Params p;
+			p.name(std::string("vert tab button"));
+			p.rect(btn_rect);
+			p.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
+			p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child));
+			p.font(font);
+			p.label(trimmed_label);
+			p.image_unselected.name("tab_left.tga");
+			p.image_selected.name("tab_left_selected.tga");
+			p.scale_image(true);
+			p.font_halign = LLFontGL::LEFT;
+			p.tab_stop(false);
 			if (indent)
 			{
-				btn->setLeftHPad(indent);
+				p.pad_left(indent);
 			}
+			btn = LLUICtrlFactory::create<LLButton>(p);
 		}
 		else
 		{
@@ -806,39 +886,44 @@ void LLTabContainer::addTabPanel(LLPanel* child,
 			tooltip += "\nAlt-Left arrow for previous tab";
 			tooltip += "\nAlt-Right arrow for next tab";
 
-			btn = new LLButton(std::string(child->getName()) + " tab",
-							   btn_rect, 
-							   LLStringUtil::null, LLStringUtil::null, LLStringUtil::null,
-							   &LLTabContainer::onTabBtn, NULL, // set userdata below
-							   font,
-							   trimmed_label, trimmed_label );
-			btn->setVisible( FALSE );
-			btn->setToolTip( tooltip );
-			btn->setScaleImage(TRUE);
-			btn->setImages(tab_img, tab_selected_img);
-
+			LLButton::Params p;
+			p.name(std::string(child->getName()) + " tab");
+			p.rect(btn_rect);
+			p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child));
+			p.font(font);
+			p.label(trimmed_label);
+			p.visible(false);
+			p.tool_tip(tooltip);
+			p.scale_image(true);
+			p.image_unselected.name(tab_img);
+			p.image_selected.name(tab_selected_img);
+			p.tab_stop(false);
 			// Try to squeeze in a bit more text
-			btn->setLeftHPad( 4 );
-			btn->setRightHPad( 2 );
-			btn->setHAlign(LLFontGL::LEFT);
-			btn->setTabStop(FALSE);
+			p.pad_left(4);
+			p.pad_right(2);
+			p.font_halign = LLFontGL::LEFT;
+			p.follows.flags = FOLLOWS_LEFT;
+			p.follows.flags = FOLLOWS_LEFT;
+	
 			if (indent)
 			{
-				btn->setLeftHPad(indent);
+				p.pad_left(indent);
 			}
 
 			if( getTabPosition() == TOP )
 			{
-				btn->setFollowsTop();
+				p.follows.flags = p.follows.flags() | FOLLOWS_TOP;
 			}
 			else
 			{
-				btn->setFollowsBottom();
+				p.follows.flags = p.follows.flags() | FOLLOWS_BOTTOM;
 			}
+
+			btn = LLUICtrlFactory::create<LLButton>(p);
 		}
 	}
 	
-	LLTabTuple* tuple = new LLTabTuple( this, child, btn, on_tab_clicked, userdata, textbox );
+	LLTabTuple* tuple = new LLTabTuple( this, child, btn, textbox );
 	insertTuple( tuple, insertion_point );
 
 	if (textbox)
@@ -849,12 +934,11 @@ void LLTabContainer::addTabPanel(LLPanel* child,
 	if (btn)
 	{
 		btn->setSaveToXML(false);
-		btn->setCallbackUserData( tuple );
 		addChild( btn, 0 );
 	}
 	if (child)
 	{
-		addChild(child, 1);
+		LLUICtrl::addChild(child, 1);
 	}
 	
 	if( select )
@@ -867,11 +951,12 @@ void LLTabContainer::addTabPanel(LLPanel* child,
 
 void LLTabContainer::addPlaceholder(LLPanel* child, const std::string& label)
 {
-	addTabPanel(child, label, FALSE, NULL, NULL, 0, TRUE);
+	addTabPanel(TabPanelParams().panel(child).label(label).is_placeholder(true));
 }
 
 void LLTabContainer::removeTabPanel(LLPanel* child)
 {
+	static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
 	if (mIsVertical)
 	{
 		// Fix-up button sizes
@@ -880,8 +965,8 @@ void LLTabContainer::removeTabPanel(LLPanel* child)
 		{
 			LLTabTuple* tuple = *iter;
 			LLRect rect;
-			rect.setLeftTopAndSize(TABCNTRV_PAD + LLPANEL_BORDER_WIDTH + 2,	// JC - Fudge factor
-								   (getRect().getHeight() - LLPANEL_BORDER_WIDTH - 1) - ((BTN_HEIGHT + TABCNTRV_PAD) * (tab_count)),
+			rect.setLeftTopAndSize(tabcntrv_pad + LLPANEL_BORDER_WIDTH + 2,	// JC - Fudge factor
+								   (getRect().getHeight() - LLPANEL_BORDER_WIDTH - 1) - ((BTN_HEIGHT + tabcntrv_pad) * (tab_count)),
 								   mMinTabWidth,
 								   BTN_HEIGHT);
 			if (tuple->mPlaceholderText)
@@ -1044,7 +1129,7 @@ S32 LLTabContainer::getPanelIndexByTitle(const std::string& title)
 	return -1;
 }
 
-LLPanel *LLTabContainer::getPanelByName(const std::string& name)
+LLPanel* LLTabContainer::getPanelByName(const std::string& name)
 {
 	for (S32 index = 0 ; index < (S32)mTabList.size(); index++)
 	{
@@ -1138,42 +1223,36 @@ BOOL LLTabContainer::selectTabPanel(LLPanel* child)
 
 BOOL LLTabContainer::selectTab(S32 which)
 {
-	if (which >= getTabCount()) return FALSE;
-	if (which < 0) return FALSE;
-
-	//if( gFocusMgr.childHasKeyboardFocus( this ) )
-	//{
-	//	gFocusMgr.setKeyboardFocus( NULL );
-	//}
+	if (which >= getTabCount() || which < 0)
+		return FALSE;
 
 	LLTabTuple* selected_tuple = getTab(which);
 	if (!selected_tuple)
 	{
 		return FALSE;
 	}
+	
+	LLSD cbdata;
+	if (selected_tuple->mTabPanel)
+		cbdata = selected_tuple->mTabPanel->getName();
 
-	if (!selected_tuple->mPrecommitChangeCallback)
+	BOOL res = FALSE;
+	if( mValidateSignal( this, cbdata ) )
 	{
-		return setTab(which);
+		res = setTab(which);
+		if (res)
+		{
+			mCommitSignal(this, cbdata);
+		}
 	}
-
-	mNextTabIdx = which;
-	selected_tuple->mPrecommitChangeCallback(selected_tuple->mUserData, false);
-	return TRUE;
+	
+	return res;
 }
 
+// private
 BOOL LLTabContainer::setTab(S32 which)
 {
-	if (which == -1)
-	{
-		if (mNextTabIdx == -1)
-		{
-			return FALSE;
-		}
-		which = mNextTabIdx;
-		mNextTabIdx = -1;
-	}
-
+	static LLUICachedControl<S32> tabcntr_arrow_btn_size ("UITabCntrArrowBtnSize", 0);
 	LLTabTuple* selected_tuple = getTab(which);
 	if (!selected_tuple)
 	{
@@ -1196,7 +1275,7 @@ BOOL LLTabContainer::setTab(S32 which)
 			// RN: this limits tab-stops to active button only, which would require arrow keys to switch tabs
 			tuple->mButton->setTabStop( is_selected );
 			
-			if( is_selected && (mIsVertical || (getMaxScrollPos() > 0)))
+			if (is_selected)
 			{
 				// Make sure selected tab is within scroll region
 				if (mIsVertical)
@@ -1212,7 +1291,7 @@ BOOL LLTabContainer::setTab(S32 which)
 						is_visible = FALSE;
 					}
 				}
-				else
+				else if (getMaxScrollPos() > 0)
 				{
 					if( i < getScrollPos() )
 					{
@@ -1220,7 +1299,7 @@ BOOL LLTabContainer::setTab(S32 which)
 					}
 					else
 					{
-						S32 available_width_with_arrows = getRect().getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + TABCNTR_ARROW_BTN_SIZE  + TABCNTR_ARROW_BTN_SIZE + 1);
+						S32 available_width_with_arrows = getRect().getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + tabcntr_arrow_btn_size  + tabcntr_arrow_btn_size + 1);
 						S32 running_tab_width = tuple->mButton->getRect().getWidth();
 						S32 j = i - 1;
 						S32 min_scroll_pos = i;
@@ -1243,13 +1322,13 @@ BOOL LLTabContainer::setTab(S32 which)
 					}
 					is_visible = TRUE;
 				}
+				else
+				{
+					is_visible = TRUE;
+				}
 			}
 			i++;
 		}
-		if( selected_tuple->mOnChangeCallback )
-		{
-			selected_tuple->mOnChangeCallback( selected_tuple->mUserData, false );
-		}
 	}
 	if (mIsVertical && getCurrentPanelIndex() >= 0)
 	{
@@ -1295,6 +1374,7 @@ void LLTabContainer::setTabPanelFlashing(LLPanel* child, BOOL state )
 
 void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const LLColor4& color)
 {
+	static LLUICachedControl<S32> tab_padding ("UITabPadding", 0);
 	LLTabTuple* tuple = getTabByPanel(child);
 	if( tuple )
 	{
@@ -1302,7 +1382,7 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const L
 
 		if (!mIsVertical)
 		{
-			const LLFontGL* fontp = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL );
+			const LLFontGL* fontp = LLFontGL::getFontSansSerifSmall();
 			// remove current width from total tab strip width
 			mTotalTabWidth -= tuple->mButton->getRect().getWidth();
 
@@ -1313,7 +1393,7 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const L
 			tuple->mPadding = image_overlay_width;
 
 			tuple->mButton->setRightHPad(6);
-			tuple->mButton->reshape(llclamp(fontp->getWidth(tuple->mButton->getLabelSelected()) + TAB_PADDING + tuple->mPadding, mMinTabWidth, mMaxTabWidth), 
+			tuple->mButton->reshape(llclamp(fontp->getWidth(tuple->mButton->getLabelSelected()) + tab_padding + tuple->mPadding, mMinTabWidth, mMaxTabWidth), 
 									tuple->mButton->getRect().getHeight());
 			// add back in button width to total tab strip width
 			mTotalTabWidth += tuple->mButton->getRect().getWidth();
@@ -1352,33 +1432,6 @@ S32 LLTabContainer::getTopBorderHeight() const
 	return mTopBorderHeight;
 }
 
-void LLTabContainer::setTabChangeCallback(LLPanel* tab, void (*on_tab_clicked)(void*, bool))
-{
-	LLTabTuple* tuplep = getTabByPanel(tab);
-	if (tuplep)
-	{
-		tuplep->mOnChangeCallback = on_tab_clicked;
-	}
-}
-
-void LLTabContainer::setTabPrecommitChangeCallback(LLPanel* tab, void (*on_precommit)(void*, bool))
-{
-	LLTabTuple* tuplep = getTabByPanel(tab);
-	if (tuplep)
-	{
-		tuplep->mPrecommitChangeCallback = on_precommit;
-	}
-}
-
-void LLTabContainer::setTabUserData(LLPanel* tab, void* userdata)
-{
-	LLTabTuple* tuplep = getTabByPanel(tab);
-	if (tuplep)
-	{
-		tuplep->mUserData = userdata;
-	}
-}
-
 void LLTabContainer::setRightTabBtnOffset(S32 offset)
 {
 	mNextArrowBtn->translate( -offset - mRightTabBtnOffset, 0 );
@@ -1388,13 +1441,15 @@ void LLTabContainer::setRightTabBtnOffset(S32 offset)
 
 void LLTabContainer::setPanelTitle(S32 index, const std::string& title)
 {
+	static LLUICachedControl<S32> tab_padding ("UITabPadding", 0);
+
 	if (index >= 0 && index < getTabCount())
 	{
 		LLTabTuple* tuple = getTab(index);
 		LLButton* tab_button = tuple->mButton;
-		const LLFontGL* fontp = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL );
+		const LLFontGL* fontp = LLFontGL::getFontSansSerifSmall();
 		mTotalTabWidth -= tab_button->getRect().getWidth();
-		tab_button->reshape(llclamp(fontp->getWidth(title) + TAB_PADDING + tuple->mPadding, mMinTabWidth, mMaxTabWidth), tab_button->getRect().getHeight());
+		tab_button->reshape(llclamp(fontp->getWidth(title) + tab_padding + tuple->mPadding, mMinTabWidth, mMaxTabWidth), tab_button->getRect().getHeight());
 		mTotalTabWidth += tab_button->getRect().getWidth();
 		tab_button->setLabelSelected(title);
 		tab_button->setLabelUnselected(title);
@@ -1403,184 +1458,62 @@ void LLTabContainer::setPanelTitle(S32 index, const std::string& title)
 }
 
 
-// static 
-void LLTabContainer::onTabBtn( void* userdata )
+void LLTabContainer::onTabBtn( const LLSD& data, LLPanel* panel )
 {
-	LLTabTuple* tuple = (LLTabTuple*) userdata;
-	LLTabContainer* self = tuple->mTabContainer;
-	self->selectTabPanel( tuple->mTabPanel );
+	LLTabTuple* tuple = getTabByPanel(panel);
+	selectTabPanel( panel );
 
 	tuple->mTabPanel->setFocus(TRUE);
 }
 
-// static 
-void LLTabContainer::onCloseBtn( void* userdata )
-{
-	LLTabContainer* self = (LLTabContainer*) userdata;
-	if( self->mCloseCallback )
-	{
-		self->mCloseCallback( self->mCallbackUserdata );
-	}
-}
-
-// static 
-void LLTabContainer::onNextBtn( void* userdata )
+void LLTabContainer::onNextBtn( const LLSD& data )
 {
-	// Scroll tabs to the left
-	LLTabContainer* self = (LLTabContainer*) userdata;
-	if (!self->mScrolled)
+	if (!mScrolled)
 	{
-		self->scrollNext();
+		scrollNext();
 	}
-	self->mScrolled = FALSE;
+	mScrolled = FALSE;
 }
 
-// static 
-void LLTabContainer::onNextBtnHeld( void* userdata )
+void LLTabContainer::onNextBtnHeld( const LLSD& data )
 {
-	LLTabContainer* self = (LLTabContainer*) userdata;
-	if (self->mScrollTimer.getElapsedTimeF32() > SCROLL_STEP_TIME)
+	if (mScrollTimer.getElapsedTimeF32() > SCROLL_STEP_TIME)
 	{
-		self->mScrollTimer.reset();
-		self->scrollNext();
-		self->mScrolled = TRUE;
+		mScrollTimer.reset();
+		scrollNext();
+		mScrolled = TRUE;
 	}
 }
 
-// static 
-void LLTabContainer::onPrevBtn( void* userdata )
+void LLTabContainer::onPrevBtn( const LLSD& data )
 {
-	LLTabContainer* self = (LLTabContainer*) userdata;
-	if (!self->mScrolled)
+	if (!mScrolled)
 	{
-		self->scrollPrev();
+		scrollPrev();
 	}
-	self->mScrolled = FALSE;
+	mScrolled = FALSE;
 }
 
-// static 
-void LLTabContainer::onJumpFirstBtn( void* userdata )
+void LLTabContainer::onJumpFirstBtn( const LLSD& data )
 {
-	LLTabContainer* self = (LLTabContainer*) userdata;
-	self->mScrollPos = 0;
+	mScrollPos = 0;
 }
 
-// static 
-void LLTabContainer::onJumpLastBtn( void* userdata )
+void LLTabContainer::onJumpLastBtn( const LLSD& data )
 {
-	LLTabContainer* self = (LLTabContainer*) userdata;
-	self->mScrollPos = self->mMaxScrollPos;
+	mScrollPos = mMaxScrollPos;
 }
 
-// static 
-void LLTabContainer::onPrevBtnHeld( void* userdata )
+void LLTabContainer::onPrevBtnHeld( const LLSD& data )
 {
-	LLTabContainer* self = (LLTabContainer*) userdata;
-	if (self->mScrollTimer.getElapsedTimeF32() > SCROLL_STEP_TIME)
+	if (mScrollTimer.getElapsedTimeF32() > SCROLL_STEP_TIME)
 	{
-		self->mScrollTimer.reset();
-		self->scrollPrev();
-		self->mScrolled = TRUE;
+		mScrollTimer.reset();
+		scrollPrev();
+		mScrolled = TRUE;
 	}
 }
 
-// static
-LLView* LLTabContainer::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("tab_container");
-	node->getAttributeString("name", name);
-
-	// Figure out if we are creating a vertical or horizontal tab container.
-	bool is_vertical = false;
-	LLTabContainer::TabPosition tab_position = LLTabContainer::TOP;
-	if (node->hasAttribute("tab_position"))
-	{
-		std::string tab_position_string;
-		node->getAttributeString("tab_position", tab_position_string);
-		LLStringUtil::toLower(tab_position_string);
-
-		if ("top" == tab_position_string)
-		{
-			tab_position = LLTabContainer::TOP;
-			is_vertical = false;
-		}
-		else if ("bottom" == tab_position_string)
-		{
-			tab_position = LLTabContainer::BOTTOM;
-			is_vertical = false;
-		}
-		else if ("left" == tab_position_string)
-		{
-			is_vertical = true;
-		}
-	}
-	BOOL border = FALSE;
-	node->getAttributeBOOL("border", border);
-
-	LLTabContainer*	tab_container = new LLTabContainer(name, LLRect::null, tab_position, border, is_vertical);
-	
-	S32 tab_min_width = tab_container->mMinTabWidth;
-	if (node->hasAttribute("tab_width"))
-	{
-		node->getAttributeS32("tab_width", tab_min_width);
-	}
-	else if( node->hasAttribute("tab_min_width"))
-	{
-		node->getAttributeS32("tab_min_width", tab_min_width);
-	}
-
-	S32	tab_max_width = tab_container->mMaxTabWidth;
-	if (node->hasAttribute("tab_max_width"))
-	{
-		node->getAttributeS32("tab_max_width", tab_max_width);
-	}
-
-	tab_container->setMinTabWidth(tab_min_width); 
-	tab_container->setMaxTabWidth(tab_max_width); 
-	
-	BOOL hidden(tab_container->getTabsHidden());
-	node->getAttributeBOOL("hide_tabs", hidden);
-	tab_container->setTabsHidden(hidden);
-
-	tab_container->setPanelParameters(node, parent);
-
-	if (LLFloater::getFloaterHost())
-	{
-		LLFloater::getFloaterHost()->setTabContainer(tab_container);
-	}
-
-	//parent->addChild(tab_container);
-
-	// Add all tab panels.
-	LLXMLNodePtr child;
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-	{
-		LLView *control = factory->createCtrlWidget(tab_container, child);
-		if (control && control->isPanel())
-		{
-			LLPanel* panelp = (LLPanel*)control;
-			std::string label;
-			child->getAttributeString("label", label);
-			if (label.empty())
-			{
-				label = panelp->getLabel();
-			}
-			BOOL placeholder = FALSE;
-			child->getAttributeBOOL("placeholder", placeholder);
-			tab_container->addTabPanel(panelp, label, false,
-									   NULL, NULL, 0, placeholder);
-		}
-	}
-
-	tab_container->selectFirstTab();
-
-	tab_container->postBuild();
-
-	tab_container->initButtons(); // now that we have the correct rect
-	
-	return tab_container;
-}
-
 // private
 
 void LLTabContainer::initButtons()
@@ -1591,99 +1524,105 @@ void LLTabContainer::initButtons()
 		return; // Don't have a rect yet or already got called
 	}
 	
-	std::string out_id;
-	std::string in_id;
-
 	if (mIsVertical)
 	{
+		static LLUICachedControl<S32> tabcntrv_arrow_btn_size ("UITabCntrvArrowBtnSize", 0);
 		// Left and right scroll arrows (for when there are too many tabs to show all at once).
 		S32 btn_top = getRect().getHeight();
-		S32 btn_top_lower = getRect().mBottom+TABCNTRV_ARROW_BTN_SIZE;
+		S32 btn_top_lower = getRect().mBottom+tabcntrv_arrow_btn_size;
 
 		LLRect up_arrow_btn_rect;
-		up_arrow_btn_rect.setLeftTopAndSize( mMinTabWidth/2 , btn_top, TABCNTRV_ARROW_BTN_SIZE, TABCNTRV_ARROW_BTN_SIZE );
+		up_arrow_btn_rect.setLeftTopAndSize( mMinTabWidth/2 , btn_top, tabcntrv_arrow_btn_size, tabcntrv_arrow_btn_size );
 
 		LLRect down_arrow_btn_rect;
-		down_arrow_btn_rect.setLeftTopAndSize( mMinTabWidth/2 , btn_top_lower, TABCNTRV_ARROW_BTN_SIZE, TABCNTRV_ARROW_BTN_SIZE );
-
-		out_id = "UIImgBtnScrollUpOutUUID";
-		in_id = "UIImgBtnScrollUpInUUID";
-		mPrevArrowBtn = new LLButton(std::string("Up Arrow"), up_arrow_btn_rect,
-									 out_id, in_id, LLStringUtil::null,
-									 &onPrevBtn, this, NULL );
-		mPrevArrowBtn->setFollowsTop();
-		mPrevArrowBtn->setFollowsLeft();
-
-		out_id = "UIImgBtnScrollDownOutUUID";
-		in_id = "UIImgBtnScrollDownInUUID";
-		mNextArrowBtn = new LLButton(std::string("Down Arrow"), down_arrow_btn_rect,
-									 out_id, in_id, LLStringUtil::null,
-									 &onNextBtn, this, NULL );
-		mNextArrowBtn->setFollowsBottom();
-		mNextArrowBtn->setFollowsLeft();
+		down_arrow_btn_rect.setLeftTopAndSize( mMinTabWidth/2 , btn_top_lower, tabcntrv_arrow_btn_size, tabcntrv_arrow_btn_size );
+
+		LLButton::Params prev_btn_params;
+		prev_btn_params.name(std::string("Up Arrow"));
+		prev_btn_params.rect(up_arrow_btn_rect);
+		prev_btn_params.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
+		prev_btn_params.image_unselected.name("scrollbutton_up_out_blue.tga");
+		prev_btn_params.image_selected.name("scrollbutton_up_in_blue.tga");
+		prev_btn_params.click_callback.function(boost::bind(&LLTabContainer::onPrevBtn, this, _2));
+		mPrevArrowBtn = LLUICtrlFactory::create<LLButton>(prev_btn_params);
+
+		LLButton::Params next_btn_params;
+		next_btn_params.name(std::string("Down Arrow"));
+		next_btn_params.rect(down_arrow_btn_rect);
+		next_btn_params.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_LEFT);
+		next_btn_params.image_unselected.name("scrollbutton_down_out_blue.tga");
+		next_btn_params.image_selected.name("scrollbutton_down_in_blue.tga");
+		next_btn_params.click_callback.function(boost::bind(&LLTabContainer::onNextBtn, this, _2));
+		mNextArrowBtn = LLUICtrlFactory::create<LLButton>(next_btn_params);
 	}
 	else // Horizontal
 	{
+		static LLUICachedControl<S32> tabcntr_arrow_btn_size ("UITabCntrArrowBtnSize", 0);
 		S32 arrow_fudge = 1;		//  match new art better 
 
-		// tabs on bottom reserve room for resize handle (just in case)
-		if (getTabPosition() == BOTTOM)
-		{
-			mRightTabBtnOffset = RESIZE_HANDLE_WIDTH;
-		}
-
 		// Left and right scroll arrows (for when there are too many tabs to show all at once).
-		S32 btn_top = (getTabPosition() == TOP ) ? getRect().getHeight() - getTopBorderHeight() : TABCNTR_ARROW_BTN_SIZE + 1;
+		S32 btn_top = (getTabPosition() == TOP ) ? getRect().getHeight() - getTopBorderHeight() : tabcntr_arrow_btn_size + 1;
 
 		LLRect left_arrow_btn_rect;
-		left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1+TABCNTR_ARROW_BTN_SIZE, btn_top + arrow_fudge, TABCNTR_ARROW_BTN_SIZE, TABCNTR_ARROW_BTN_SIZE );
+		left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1+tabcntr_arrow_btn_size, btn_top + arrow_fudge, tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
 
 		LLRect jump_left_arrow_btn_rect;
-		jump_left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1, btn_top + arrow_fudge, TABCNTR_ARROW_BTN_SIZE, TABCNTR_ARROW_BTN_SIZE );
+		jump_left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1, btn_top + arrow_fudge, tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
 
-		S32 right_pad = TABCNTR_ARROW_BTN_SIZE + LLPANEL_BORDER_WIDTH + 1;
+		S32 right_pad = tabcntr_arrow_btn_size + LLPANEL_BORDER_WIDTH + 1;
 
 		LLRect right_arrow_btn_rect;
-		right_arrow_btn_rect.setLeftTopAndSize( getRect().getWidth() - mRightTabBtnOffset - right_pad - TABCNTR_ARROW_BTN_SIZE,
+		right_arrow_btn_rect.setLeftTopAndSize( getRect().getWidth() - mRightTabBtnOffset - right_pad - tabcntr_arrow_btn_size,
 												btn_top + arrow_fudge,
-												TABCNTR_ARROW_BTN_SIZE, TABCNTR_ARROW_BTN_SIZE );
+												tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
 
 
 		LLRect jump_right_arrow_btn_rect;
 		jump_right_arrow_btn_rect.setLeftTopAndSize( getRect().getWidth() - mRightTabBtnOffset - right_pad,
 													 btn_top + arrow_fudge,
-													 TABCNTR_ARROW_BTN_SIZE, TABCNTR_ARROW_BTN_SIZE );
-
-		out_id = "UIImgBtnJumpLeftOutUUID";
-		in_id = "UIImgBtnJumpLeftInUUID";
-		mJumpPrevArrowBtn = new LLButton(std::string("Jump Left Arrow"), jump_left_arrow_btn_rect,
-										 out_id, in_id, LLStringUtil::null,
-										 &LLTabContainer::onJumpFirstBtn, this, LLFontGL::getFontSansSerif() );
-		mJumpPrevArrowBtn->setFollowsLeft();
-
-		out_id = "UIImgBtnScrollLeftOutUUID";
-		in_id = "UIImgBtnScrollLeftInUUID";
-		mPrevArrowBtn = new LLButton(std::string("Left Arrow"), left_arrow_btn_rect,
-									 out_id, in_id, LLStringUtil::null,
-									 &LLTabContainer::onPrevBtn, this, LLFontGL::getFontSansSerif() );
-		mPrevArrowBtn->setHeldDownCallback(onPrevBtnHeld);
-		mPrevArrowBtn->setFollowsLeft();
-	
-		out_id = "UIImgBtnJumpRightOutUUID";
-		in_id = "UIImgBtnJumpRightInUUID";
-		mJumpNextArrowBtn = new LLButton(std::string("Jump Right Arrow"), jump_right_arrow_btn_rect,
-										 out_id, in_id, LLStringUtil::null,
-										 &LLTabContainer::onJumpLastBtn, this,
-										 LLFontGL::getFontSansSerif());
-		mJumpNextArrowBtn->setFollowsRight();
-
-		out_id = "UIImgBtnScrollRightOutUUID";
-		in_id = "UIImgBtnScrollRightInUUID";
-		mNextArrowBtn = new LLButton(std::string("Right Arrow"), right_arrow_btn_rect,
-									 out_id, in_id, LLStringUtil::null,
-									 &LLTabContainer::onNextBtn, this,
-									 LLFontGL::getFontSansSerif());
-		mNextArrowBtn->setFollowsRight();
+													 tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
+
+		LLButton::Params p;
+		p.name(std::string("Jump Left Arrow"));
+		p.image_unselected.name("jump_left_out.tga");
+		p.image_selected.name("jump_left_in.tga");
+		p.click_callback.function(boost::bind(&LLTabContainer::onJumpFirstBtn, this, _2));
+		p.rect(jump_left_arrow_btn_rect);
+		p.follows.flags(FOLLOWS_LEFT);
+		
+		mJumpPrevArrowBtn = LLUICtrlFactory::create<LLButton>(p);
+
+		p = LLButton::Params();
+		p.name(std::string("Left Arrow"));
+		p.rect(left_arrow_btn_rect);
+		p.follows.flags(FOLLOWS_LEFT);
+		p.image_unselected.name("scrollbutton_left_out_blue.tga");
+		p.image_selected.name("scrollbutton_left_in_blue.tga");
+		p.click_callback.function(boost::bind(&LLTabContainer::onPrevBtn, this, _2));
+		p.mouse_held_callback.function(boost::bind(&LLTabContainer::onPrevBtnHeld, this, _2));
+		
+		mPrevArrowBtn = LLUICtrlFactory::create<LLButton>(p);
+
+		p = LLButton::Params();
+		p.name(std::string("Jump Right Arrow"));
+		p.rect(jump_right_arrow_btn_rect);
+		p.follows.flags(FOLLOWS_RIGHT);
+		p.image_unselected.name("jump_right_out.tga");
+		p.image_selected.name("jump_right_in.tga");
+		p.click_callback.function(boost::bind(&LLTabContainer::onJumpLastBtn, this, _2));
+
+		mJumpNextArrowBtn = LLUICtrlFactory::create<LLButton>(p);
+
+		p = LLButton::Params();
+		p.name(std::string("Right Arrow"));
+		p.rect(right_arrow_btn_rect);
+		p.follows.flags(FOLLOWS_RIGHT);
+		p.image_unselected.name("scrollbutton_right_out_blue.tga");
+		p.image_selected.name("scrollbutton_right_in_blue.tga");
+		p.click_callback.function(boost::bind(&LLTabContainer::onNextBtn, this, _2));
+		p.mouse_held_callback.function(boost::bind(&LLTabContainer::onNextBtnHeld, this, _2));
+
+		mNextArrowBtn = LLUICtrlFactory::create<LLButton>(p);
 
 		if( getTabPosition() == TOP )
 		{
@@ -1701,12 +1640,10 @@ void LLTabContainer::initButtons()
 		}
 	}
 
-	mPrevArrowBtn->setHeldDownCallback(onPrevBtnHeld);
 	mPrevArrowBtn->setSaveToXML(false);
 	mPrevArrowBtn->setTabStop(FALSE);
 	addChild(mPrevArrowBtn);
 
-	mNextArrowBtn->setHeldDownCallback(onNextBtnHeld);
 	mNextArrowBtn->setSaveToXML(false);
 	mNextArrowBtn->setTabStop(FALSE);
 	addChild(mNextArrowBtn);
@@ -1729,7 +1666,17 @@ void LLTabContainer::initButtons()
 	setDefaultTabGroup(1);
 }
 
-LLTabContainer::LLTabTuple* LLTabContainer::getTabByPanel(LLPanel* child)
+//this is a work around for the current LLPanel::initFromParams hack
+//so that it doesn't overwrite the default tab group.
+//will be removed when LLPanel is fixed soon.
+void LLTabContainer::initFromParams(const LLPanel::Params& p)
+{
+	LLPanel::initFromParams(p);
+
+	setDefaultTabGroup(1);
+}
+
+LLTabTuple* LLTabContainer::getTabByPanel(LLPanel* child)
 {
 	for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
 	{
@@ -1775,14 +1722,16 @@ void LLTabContainer::insertTuple(LLTabTuple * tuple, eInsertionPoint insertion_p
 
 void LLTabContainer::updateMaxScrollPos()
 {
+	static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
 	BOOL no_scroll = TRUE;
 	if (mIsVertical)
 	{
-		S32 tab_total_height = (BTN_HEIGHT + TABCNTRV_PAD) * getTabCount();
+		S32 tab_total_height = (BTN_HEIGHT + tabcntrv_pad) * getTabCount();
 		S32 available_height = getRect().getHeight() - getTopBorderHeight();
 		if( tab_total_height > available_height )
 		{
-			S32 available_height_with_arrows = getRect().getHeight() - 2*(TABCNTRV_ARROW_BTN_SIZE + 3*TABCNTRV_PAD);
+			static LLUICachedControl<S32> tabcntrv_arrow_btn_size ("UITabCntrvArrowBtnSize", 0);
+			S32 available_height_with_arrows = getRect().getHeight() - 2*(tabcntrv_arrow_btn_size + 3*tabcntrv_pad);
 			S32 additional_needed = tab_total_height - available_height_with_arrows;
 			setMaxScrollPos((S32) ceil(additional_needed / float(BTN_HEIGHT) ) );
 			no_scroll = FALSE;
@@ -1790,16 +1739,19 @@ void LLTabContainer::updateMaxScrollPos()
 	}
 	else
 	{
+		static LLUICachedControl<S32> tabcntr_tab_h_pad ("UITabCntrTabHPad", 0);
+		static LLUICachedControl<S32> tabcntr_arrow_btn_size ("UITabCntrArrowBtnSize", 0);
+		static LLUICachedControl<S32> tabcntr_tab_partial_width ("UITabCntrTabPartialWidth", 0);
 		S32 tab_space = 0;
 		S32 available_space = 0;
 		tab_space = mTotalTabWidth;
-		available_space = getRect().getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + TABCNTR_TAB_H_PAD);
+		available_space = getRect().getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + tabcntr_tab_h_pad);
 
 		if( tab_space > available_space )
 		{
-			S32 available_width_with_arrows = getRect().getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + TABCNTR_ARROW_BTN_SIZE  + TABCNTR_ARROW_BTN_SIZE + 1);
+			S32 available_width_with_arrows = getRect().getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + tabcntr_arrow_btn_size  + tabcntr_arrow_btn_size + 1);
 			// subtract off reserved portion on left
-			available_width_with_arrows -= TABCNTR_TAB_PARTIAL_WIDTH;
+			available_width_with_arrows -= tabcntr_tab_partial_width;
 
 			S32 running_tab_width = 0;
 			setMaxScrollPos(getTabCount());
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 8117cdee9b..7ed1a0f4bf 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -37,7 +37,7 @@
 #include "lltextbox.h"
 #include "llframetimer.h"
 
-extern const S32 TABCNTR_HEADER_HEIGHT;
+class LLTabTuple;
 
 class LLTabContainer : public LLPanel
 {
@@ -56,8 +56,31 @@ public:
 		RIGHT_OF_CURRENT
 	} eInsertionPoint;
 
-	LLTabContainer( const std::string& name, const LLRect& rect, TabPosition pos,
-					BOOL bordered, BOOL is_vertical);
+	struct TabPositions : public LLInitParam::TypeValuesHelper<LLTabContainer::TabPosition, TabPositions>
+	{
+		static void declareValues();
+	};
+
+	struct Params
+	:	public LLInitParam::Block<Params, LLPanel::Params>
+	{
+		Optional<TabPosition, TabPositions>	tab_position;
+		Optional<S32>						tab_width,
+											tab_min_width,
+											tab_max_width;
+		Optional<bool>						hide_tabs;
+		Optional<S32>						tab_padding_right;
+
+		Params();
+	};
+
+protected:
+	LLTabContainer(const Params&);
+	friend class LLUICtrlFactory;
+
+public:
+	//LLTabContainer( const std::string& name, const LLRect& rect, TabPosition pos,
+	//				BOOL bordered, BOOL is_vertical);
 
 	/*virtual*/ ~LLTabContainer();
 
@@ -74,17 +97,30 @@ public:
 	/*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,	BOOL drop,
 									   EDragAndDropType type, void* cargo_data,
 									   EAcceptance* accept, std::string& tooltip);
-	/*virtual*/ LLXMLNodePtr getXML(bool save_children = true) const;
 	/*virtual*/ LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
+	/*virtual*/ void initFromParams(const LLPanel::Params& p);
+	/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
+	/*virtual*/ BOOL postBuild();
+
+	struct TabPanelParams : public LLInitParam::Block<TabPanelParams>
+	{
+		Mandatory<LLPanel*>			panel;
+		
+		Optional<std::string>		label;
+		Optional<bool>				select_tab,
+									is_placeholder;
+		Optional<S32>				indent;
+		Optional<eInsertionPoint>	insert_at;
+		Optional<void*>				user_data;
+
+		TabPanelParams()
+		:	panel("panel", NULL),
+			insert_at("insert_at", END)
+		{}
+	};
 
-	void 		addTabPanel(LLPanel* child, 
-							const std::string& label, 
-							BOOL select = FALSE,  
-							void (*on_tab_clicked)(void*, bool) = NULL, 
-							void* userdata = NULL,
-							S32 indent = 0,
-							BOOL placeholder = FALSE,
-							eInsertionPoint insertion_point = END);
+	void		addTabPanel(LLPanel* panel);
+	void		addTabPanel(const TabPanelParams& panel);
 	void 		addPlaceholder(LLPanel* child, const std::string& label);
 	void 		removeTabPanel( LLPanel* child );
 	void 		lockTabs(S32 num_tabs = 0);
@@ -108,7 +144,6 @@ public:
 	BOOL 		selectTabPanel( LLPanel* child );
 	BOOL 		selectTab(S32 which);
 	BOOL 		selectTabByName(const std::string& title);
-	BOOL		setTab(S32 which);
 
 	BOOL        getTabPanelFlashing(LLPanel* child);
 	void		setTabPanelFlashing(LLPanel* child, BOOL state);
@@ -119,10 +154,6 @@ public:
 	void		setTopBorderHeight(S32 height);
 	S32			getTopBorderHeight() const;
 	
-	void 		setTabChangeCallback(LLPanel* tab, void (*on_tab_clicked)(void*,bool));
-	void		setTabPrecommitChangeCallback(LLPanel* tab, void (*on_precommit)(void*, bool));
-	void 		setTabUserData(LLPanel* tab, void* userdata);
-
 	void 		setRightTabBtnOffset( S32 offset );
 	void 		setPanelTitle(S32 index, const std::string& title);
 
@@ -134,51 +165,20 @@ public:
 
 	void		startDragAndDropDelayTimer() { mDragAndDropDelayTimer.start(); }
 	
-	static void	onCloseBtn(void* userdata);
-	static void	onTabBtn(void* userdata);
-	static void	onNextBtn(void* userdata);
-	static void	onNextBtnHeld(void* userdata);
-	static void	onPrevBtn(void* userdata);
-	static void	onPrevBtnHeld(void* userdata);
-	static void onJumpFirstBtn( void* userdata );
-	static void onJumpLastBtn( void* userdata );
-
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
+	void onTabBtn( const LLSD& data, LLPanel* panel );
+	void onNextBtn(const LLSD& data);
+	void onNextBtnHeld(const LLSD& data);
+	void onPrevBtn(const LLSD& data);
+	void onPrevBtnHeld(const LLSD& data);
+	void onJumpFirstBtn( const LLSD& data );
+	void onJumpLastBtn( const LLSD& data );
 
 private:
-	// Structure used to map tab buttons to and from tab panels
-	struct LLTabTuple
-	{
-		LLTabTuple( LLTabContainer* c, LLPanel* p, LLButton* b,
-					void (*cb)(void*,bool), void* userdata, LLTextBox* placeholder = NULL, 
-					void (*pcb)(void*,bool) = NULL)
-			:
-			mTabContainer(c),
-			mTabPanel(p),
-			mButton(b),
-			mOnChangeCallback( cb ),
-			mPrecommitChangeCallback( pcb ),
-			mUserData( userdata ),
-			mOldState(FALSE),
-			mPlaceholderText(placeholder),
-			mPadding(0)
-			{}
-
-		LLTabContainer*  mTabContainer;
-		LLPanel*		 mTabPanel;
-		LLButton*		 mButton;
-		void			 (*mOnChangeCallback)(void*, bool);
-		void			 (*mPrecommitChangeCallback)(void*,bool);		// Precommit callback gets called before tab is changed and 
-																		// can prevent it from being changed. onChangeCallback is called
-																		// immediately after tab is actually changed - Nyx
-		void*			 mUserData;
-		BOOL			 mOldState;
-		LLTextBox*		 mPlaceholderText;
-		S32				 mPadding;
-	};
 
 	void initButtons();
 	
+	BOOL		setTab(S32 which);
+
 	LLTabTuple* getTab(S32 index) 		{ return mTabList[index]; }
 	LLTabTuple* getTabByPanel(LLPanel* child);
 	void insertTuple(LLTabTuple * tuple, eInsertionPoint insertion_point);
@@ -207,7 +207,6 @@ private:
 	tuple_list_t					mTabList;
 	
 	S32								mCurrentTabIdx;
-	S32								mNextTabIdx;
 	BOOL							mTabsHidden;
 
 	BOOL							mScrolled;
@@ -216,9 +215,6 @@ private:
 	S32								mScrollPosPixels;
 	S32								mMaxScrollPos;
 
-	void							(*mCloseCallback)(void*);
-	void*							mCallbackUserdata;
-
 	LLTextBox*						mTitleBox;
 
 	S32								mTopBorderHeight;
@@ -242,5 +238,4 @@ private:
 	LLFrameTimer					mDragAndDropDelayTimer;
 };
 
-
 #endif  // LL_TABCONTAINER_H
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp
index 89893bcf8d..95990bbfc2 100644
--- a/indra/llui/lltextbox.cpp
+++ b/indra/llui/lltextbox.cpp
@@ -30,65 +30,66 @@
  * $/LicenseInfo$
  */
 
+#define INSTANTIATE_GETCHILD_TEXTBOX
+
 #include "linden_common.h"
 #include "lltextbox.h"
 #include "lluictrlfactory.h"
 #include "llfocusmgr.h"
 #include "llwindow.h"
 
-static LLRegisterWidget<LLTextBox> r("text");
-
-LLTextBox::LLTextBox(const std::string& name, const LLRect& rect, const std::string& text,
-					 const LLFontGL* font, BOOL mouse_opaque)
-:	LLUICtrl(name, rect, mouse_opaque, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP ),
-	mFontGL(font ? font : LLFontGL::getFontSansSerifSmall())
-{
-	initDefaults();
-	setText( text );
-	setTabStop(FALSE);
-}
-
-LLTextBox::LLTextBox(const std::string& name, const std::string& text, F32 max_width,
-					 const LLFontGL* font, BOOL mouse_opaque) :
-	LLUICtrl(name, LLRect(0, 0, 1, 1), mouse_opaque, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP),	
-	mFontGL(font ? font : LLFontGL::getFontSansSerifSmall())
-{
-	initDefaults();
-	setWrappedText(text, max_width);
-	reshapeToFitText();
-	setTabStop(FALSE);
-}
+template LLTextBox* LLView::getChild<LLTextBox>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
 
-LLTextBox::LLTextBox(const std::string& name_and_label, const LLRect& rect) :
-	LLUICtrl(name_and_label, rect, TRUE, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP),	
-	mFontGL(LLFontGL::getFontSansSerifSmall())
-{
-	initDefaults();
-	setText( name_and_label );
-	setTabStop(FALSE);
-}
+static LLRegisterWidget<LLTextBox> r("text");
 
-void LLTextBox::initDefaults()
+LLTextBox::Params::Params()
+:	text_color("text_color"),
+	length("length"),
+	type("type"),
+	highlight_on_hover("hover", false),
+	border_visible("border_visible", false),
+	border_drop_shadow_visible("border_drop_shadow_visible", false),
+	bg_visible("bg_visible", false),
+	use_ellipses("use_ellipses"),
+	word_wrap("word_wrap", false),
+	drop_shadow_visible("drop_shadow_visible"),
+	hover_color("hover_color"),
+	disabled_color("disabled_color"),
+	background_color("background_color"),
+	border_color("border_color"),
+	v_pad("v_pad", 0),
+	h_pad("h_pad", 0),
+	line_spacing("line_spacing", 0),
+	text("text"),
+	font_shadow("font_shadow", LLFontGL::NO_SHADOW)
+{}
+
+LLTextBox::LLTextBox(const LLTextBox::Params& p)
+:	LLUICtrl(p),
+    mFontGL(p.font),
+	mHoverActive( p.highlight_on_hover ),
+	mHasHover( FALSE ),
+	mBackgroundVisible( p.bg_visible ),
+	mBorderVisible( p.border_visible ),
+	mShadowType( p.font_shadow ),
+	mBorderDropShadowVisible( p.border_drop_shadow_visible ),
+	mUseEllipses( p.use_ellipses ),
+	mHPad(p.h_pad),
+	mVPad(p.v_pad),
+	mVAlign( LLFontGL::TOP ),
+	mClickedCallback(NULL),
+	mTextColor(p.text_color()),
+	mDisabledColor(p.disabled_color()),
+	mBackgroundColor(p.background_color()),
+	mBorderColor(p.border_color()),
+	mHoverColor(p.hover_color()),
+	mHAlign(p.font_halign),
+	mLineSpacing(p.line_spacing),
+	mWordWrap( p.word_wrap ),
+	mDidWordWrap(FALSE),
+	mFontStyle(LLFontGL::getStyleFromString(p.font.style))
 {
-	mTextColor = LLUI::sColorsGroup->getColor("LabelTextColor");
-	mDisabledColor = LLUI::sColorsGroup->getColor("LabelDisabledColor");
-	mBackgroundColor = LLUI::sColorsGroup->getColor("DefaultBackgroundColor");
-	mBorderColor = LLUI::sColorsGroup->getColor("DefaultHighlightLight");
-	mHoverColor = LLUI::sColorsGroup->getColor( "LabelSelectedColor" );
-	mHoverActive = FALSE;
-	mHasHover = FALSE;
-	mBackgroundVisible = FALSE;
-	mBorderVisible = FALSE;
-	mFontStyle = LLFontGL::DROP_SHADOW_SOFT;
-	mBorderDropShadowVisible = FALSE;
-	mUseEllipses = FALSE;
-	mLineSpacing = 0;
-	mHPad = 0;
-	mVPad = 0;
-	mHAlign = LLFontGL::LEFT;
-	mVAlign = LLFontGL::TOP;
-	mClickedCallback = NULL;
-	mCallbackUserData = NULL;
+	setText( p.text() );
 }
 
 BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask)
@@ -113,7 +114,6 @@ BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask)
 	return handled;
 }
 
-
 BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask)
 {
 	BOOL	handled = FALSE;
@@ -139,7 +139,7 @@ BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask)
 		// If mouseup in the widget, it's been clicked
 		if (mClickedCallback)
 		{
-			(*mClickedCallback)( mCallbackUserData );
+			mClickedCallback();
 		}
 	}
 
@@ -160,8 +160,15 @@ BOOL LLTextBox::handleHover(S32 x, S32 y, MASK mask)
 
 void LLTextBox::setText(const LLStringExplicit& text)
 {
-	mText.assign(text);
-	setLineLengths();
+	if(mWordWrap && !mDidWordWrap)
+	{
+		setWrappedText(text);
+	}
+	else
+	{
+		mText.assign(text);
+		setLineLengths();
+	}
 }
 
 void LLTextBox::setLineLengths()
@@ -193,7 +200,7 @@ void LLTextBox::setLineLengths()
 
 void LLTextBox::setWrappedText(const LLStringExplicit& in_text, F32 max_width)
 {
-	if (max_width < 0.0)
+	if (max_width < 0.0f)
 	{
 		max_width = (F32)getRect().getWidth();
 	}
@@ -203,7 +210,8 @@ void LLTextBox::setWrappedText(const LLStringExplicit& in_text, F32 max_width)
 
 	LLWString::size_type  cur = 0;;
 	LLWString::size_type  len = wtext.size();
-
+	F32 line_height =  mFontGL->getLineHeight();
+	S32 line_num = 1;
 	while (cur < len)
 	{
 		LLWString::size_type end = wtext.find('\n', cur);
@@ -221,6 +229,8 @@ void LLTextBox::setWrappedText(const LLStringExplicit& in_text, F32 max_width)
 
 			final_wtext.append(wtext, cur, useLen);
 			cur += useLen;
+			// not enough room to add any more characters
+			if (useLen == 0) break;
 		}
 
 		if (cur < len)
@@ -229,12 +239,22 @@ void LLTextBox::setWrappedText(const LLStringExplicit& in_text, F32 max_width)
 			{
 				cur += 1;
 			}
-			final_wtext += '\n';
+			line_num +=1;
+			// Don't wrap the last line if the text is going to spill off
+			// the bottom of the rectangle.  Assume we prefer to run off
+			// the right edge.
+			// *TODO: Is this the right behavior?
+			if((line_num-1)*line_height <= (F32)getRect().getHeight())
+			{
+				final_wtext += '\n';
+			}
 		}
 	}
-
+	
+	mDidWordWrap = TRUE;
 	std::string final_text = wstring_to_utf8str(final_wtext);
 	setText(final_text);
+
 }
 
 S32 LLTextBox::getTextPixelWidth()
@@ -272,6 +292,11 @@ S32 LLTextBox::getTextPixelHeight()
 	return (S32)(num_lines * mFontGL->getLineHeight());
 }
 
+void LLTextBox::setValue(const LLSD& value )
+{ 
+	mDidWordWrap = FALSE;
+	setText(value.asString());
+}
 
 BOOL LLTextBox::setTextArg( const std::string& key, const LLStringExplicit& text )
 {
@@ -289,8 +314,8 @@ void LLTextBox::draw()
 
 	if( mBorderDropShadowVisible )
 	{
-		static LLColor4 color_drop_shadow = LLUI::sColorsGroup->getColor("ColorDropShadow");
-		static S32 drop_shadow_tooltip = LLUI::sConfigGroup->getS32("DropShadowTooltip");
+		static LLUICachedControl<LLColor4> color_drop_shadow ("ColorDropShadow", *(new LLColor4));
+		static LLUICachedControl<S32> drop_shadow_tooltip ("DropShadowTooltip", 0);
 		gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
 			color_drop_shadow, drop_shadow_tooltip);
 	}
@@ -298,7 +323,7 @@ void LLTextBox::draw()
 	if (mBackgroundVisible)
 	{
 		LLRect r( 0, getRect().getHeight(), getRect().getWidth(), 0 );
-		gl_rect_2d( r, mBackgroundColor );
+		gl_rect_2d( r, mBackgroundColor.get() );
 	}
 
 	S32 text_x = 0;
@@ -321,16 +346,16 @@ void LLTextBox::draw()
 	{
 		if(mHasHover)
 		{
-			drawText( text_x, text_y, mHoverColor );
+			drawText( text_x, text_y, mHoverColor.get() );
 		}
 		else
 		{
-			drawText( text_x, text_y, mTextColor );
+			drawText( text_x, text_y, mTextColor.get() );
 		}				
 	}
 	else
 	{
-		drawText( text_x, text_y, mDisabledColor );
+		drawText( text_x, text_y, mDisabledColor.get() );
 	}
 
 	if (sDebugRects)
@@ -338,6 +363,13 @@ void LLTextBox::draw()
 		drawDebugRect();
 	}
 
+	//// *HACK: also draw debug rectangles around currently-being-edited LLView, and any elements that are being highlighted by GUI preview code (see LLFloaterUIPreview)
+	//std::set<LLView*>::iterator iter = std::find(sPreviewHighlightedElements.begin(), sPreviewHighlightedElements.end(), this);
+	//if ((sEditingUI && this == sEditingUIView) || (iter != sPreviewHighlightedElements.end() && sDrawPreviewHighlights))
+	//{
+	//	drawDebugRect();
+	//}
+
 	mHasHover = FALSE; // This is reset every frame.
 }
 
@@ -355,6 +387,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color )
 		mFontGL->render(mText.getWString(), 0, (F32)x, (F32)y, color,
 						mHAlign, mVAlign, 
 						mFontStyle,
+						mShadowType,
 						S32_MAX, getRect().getWidth(), NULL, TRUE, mUseEllipses);
 	}
 	else
@@ -367,6 +400,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color )
 			mFontGL->render(mText.getWString(), cur_pos, (F32)x, (F32)y, color,
 							mHAlign, mVAlign,
 							mFontStyle,
+							mShadowType,
 							line_length, getRect().getWidth(), NULL, TRUE, mUseEllipses );
 			cur_pos += line_length + 1;
 			y -= llfloor(mFontGL->getLineHeight()) + mLineSpacing;
@@ -380,86 +414,3 @@ void LLTextBox::reshapeToFitText()
 	S32 height = getTextPixelHeight();
 	reshape( width + 2 * mHPad, height + 2 * mVPad );
 }
-
-// virtual
-LLXMLNodePtr LLTextBox::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	// Attributes
-	node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mFontGL));
-	node->createChild("halign", TRUE)->setStringValue(LLFontGL::nameFromHAlign(mHAlign));
-	addColorXML(node, mTextColor, "text_color", "LabelTextColor");
-	addColorXML(node, mDisabledColor, "disabled_color", "LabelDisabledColor");
-	addColorXML(node, mBackgroundColor, "bg_color", "DefaultBackgroundColor");
-	addColorXML(node, mBorderColor, "border_color", "DefaultHighlightLight");
-	node->createChild("bg_visible", TRUE)->setBoolValue(mBackgroundVisible);
-	node->createChild("border_visible", TRUE)->setBoolValue(mBorderVisible);
-	node->createChild("border_drop_shadow_visible", TRUE)->setBoolValue(mBorderDropShadowVisible);
-	node->createChild("h_pad", TRUE)->setIntValue(mHPad);
-	node->createChild("v_pad", TRUE)->setIntValue(mVPad);
-
-	// Contents
-	node->setStringValue(mText);
-
-	return node;
-}
-
-// static
-LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("text_box");
-	node->getAttributeString("name", name);
-	LLFontGL* font = LLView::selectFont(node);
-
-	std::string text = node->getTextContents();
-
-	LLTextBox* text_box = new LLTextBox(name,
-		LLRect(),
-		text,
-		font,
-		FALSE);
-		
-
-	LLFontGL::HAlign halign = LLView::selectFontHAlign(node);
-	text_box->setHAlign(halign);
-
-	text_box->initFromXML(node, parent);
-
-	node->getAttributeS32("line_spacing", text_box->mLineSpacing);
-
-	std::string font_style;
-	if (node->getAttributeString("font-style", font_style))
-	{
-		text_box->mFontStyle = LLFontGL::getStyleFromString(font_style);
-	}
-	
-	BOOL mouse_opaque = text_box->getMouseOpaque();
-	if (node->getAttributeBOOL("mouse_opaque", mouse_opaque))
-	{
-		text_box->setMouseOpaque(mouse_opaque);
-	}	
-
-	if(node->hasAttribute("text_color"))
-	{
-		LLColor4 color;
-		LLUICtrlFactory::getAttributeColor(node, "text_color", color);
-		text_box->setColor(color);
-	}
-
-	if(node->hasAttribute("hover_color"))
-	{
-		LLColor4 color;
-		LLUICtrlFactory::getAttributeColor(node, "hover_color", color);
-		text_box->setHoverColor(color);
-		text_box->setHoverActive(true);
-	}
-
-	BOOL hover_active = FALSE;
-	if(node->getAttributeBOOL("hover", hover_active))
-	{
-		text_box->setHoverActive(hover_active);
-	}
-
-	return text_box;
-}
diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h
index 07a6aa3622..aae538a221 100644
--- a/indra/llui/lltextbox.h
+++ b/indra/llui/lltextbox.h
@@ -43,27 +43,46 @@ class LLTextBox
 :	public LLUICtrl
 {
 public:
-	// By default, follows top and left and is mouse-opaque.
-	// If no text, text = name.
-	// If no font, uses default system font.
-	LLTextBox(const std::string& name, const LLRect& rect, const std::string& text,
-			  const LLFontGL* font = NULL, BOOL mouse_opaque = TRUE );
+	
+	// *TODO: Add callback to Params
+	typedef boost::function<void (void)> callback_t;
+	
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<std::string> text;
 
-	// Construct a textbox which handles word wrapping for us.
-	LLTextBox(const std::string& name, const std::string& text, F32 max_width = 200,
-			  const LLFontGL* font = NULL, BOOL mouse_opaque = TRUE );
+		Optional<bool>		highlight_on_hover,
+							border_visible,
+							border_drop_shadow_visible,
+							bg_visible,
+							use_ellipses,
+							word_wrap;
 
-	// "Simple" constructors for text boxes that have the same name and label *TO BE DEPRECATED*
-	LLTextBox(const std::string& name_and_label, const LLRect& rect);
+		Optional<LLFontGL::ShadowType>	font_shadow;
 
-	// Consolidate common member initialization
-	// 20+ initializers times 3+ constructors is unmaintainable.
-	void initDefaults(); 
+		Deprecated			drop_shadow_visible,
+							type,
+							length;
 
-	virtual ~LLTextBox() {}
+		Optional<LLUIColor>	text_color,
+							hover_color,
+							disabled_color,
+							background_color,
+							border_color;
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory);
+		Optional<S32>		v_pad,
+							h_pad,
+							line_spacing;
+
+		Params();
+	};
+
+protected:
+	LLTextBox(const Params&);
+	friend class LLUICtrlFactory;
+
+public:
+	virtual ~LLTextBox() {}
 
 	virtual void	draw();
 	virtual void	reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
@@ -81,18 +100,17 @@ public:
 	void			setHoverActive( BOOL active )			{ mHoverActive = active; }
 
 	void			setText( const LLStringExplicit& text );
-	void			setWrappedText(const LLStringExplicit& text, F32 max_width = -1.0); // -1 means use existing control width
+	void			setWrappedText(const LLStringExplicit& text, F32 max_width = -1.f); // -1 means use existing control width
 	void			setUseEllipses( BOOL use_ellipses )		{ mUseEllipses = use_ellipses; }
 	
 	void			setBackgroundVisible(BOOL visible)		{ mBackgroundVisible = visible; }
 	void			setBorderVisible(BOOL visible)			{ mBorderVisible = visible; }
-	void			setFontStyle(U8 style)					{ mFontStyle = style; }
 	void			setBorderDropshadowVisible(BOOL visible){ mBorderDropShadowVisible = visible; }
 	void			setHPad(S32 pixels)						{ mHPad = pixels; }
 	void			setVPad(S32 pixels)						{ mVPad = pixels; }
 	void			setRightAlign()							{ mHAlign = LLFontGL::RIGHT; }
 	void			setHAlign( LLFontGL::HAlign align )		{ mHAlign = align; }
-	void			setClickedCallback( void (*cb)(void *data), void* data = NULL ){ mClickedCallback = cb; mCallbackUserData = data; }		// mouse down and up within button
+	void			setClickedCallback( boost::function<void (void*)> cb, void* userdata = NULL ){ mClickedCallback = boost::bind(cb, userdata); }		// mouse down and up within button
 
 	const LLFontGL* getFont() const							{ return mFontGL; }
 
@@ -102,7 +120,7 @@ public:
 	S32				getTextPixelWidth();
 	S32				getTextPixelHeight();
 
-	virtual void	setValue(const LLSD& value )			{ setText(value.asString()); }
+	virtual void	setValue(const LLSD& value );		
 	virtual LLSD	getValue() const						{ return LLSD(getText()); }
 	virtual BOOL	setTextArg( const std::string& key, const LLStringExplicit& text );
 
@@ -112,18 +130,21 @@ private:
 
 	LLUIString		mText;
 	const LLFontGL*	mFontGL;
-	LLColor4		mTextColor;
-	LLColor4		mDisabledColor;
-	LLColor4		mBackgroundColor;
-	LLColor4		mBorderColor;
-	LLColor4		mHoverColor;
+	LLUIColor	mTextColor;
+	LLUIColor	mDisabledColor;
+	LLUIColor	mBackgroundColor;
+	LLUIColor	mBorderColor;
+	LLUIColor	mHoverColor;
 
 	BOOL			mHoverActive;	
 	BOOL			mHasHover;
 	BOOL			mBackgroundVisible;
 	BOOL			mBorderVisible;
+	BOOL			mWordWrap;
+	BOOL            mDidWordWrap;
 	
 	U8				mFontStyle; // style bit flags for font
+	LLFontGL::ShadowType mShadowType;
 	BOOL			mBorderDropShadowVisible;
 	BOOL			mUseEllipses;
 
@@ -135,8 +156,14 @@ private:
 	LLFontGL::VAlign mVAlign;
 
 	std::vector<S32> mLineLengthList;
-	void			(*mClickedCallback)(void* data );
-	void*			mCallbackUserData;
+	callback_t		mClickedCallback;
 };
 
+#ifdef LL_WINDOWS
+#ifndef INSTANTIATE_GETCHILD_TEXTBOX
+#pragma warning (disable : 4231)
+extern template LLTextBox* LLView::getChild<LLTextBox>( const std::string& name, BOOL recurse, BOOL create_if_missing ) const;
+#endif
+#endif
+
 #endif
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 5e54c7a307..44d98e75c8 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -65,30 +65,15 @@
 //
 static LLRegisterWidget<LLTextEditor> r("simple_text_editor");
 
-BOOL gDebugTextEditorTips = FALSE;
-
 //
 // Constants
 //
-const S32	UI_TEXTEDITOR_BUFFER_BLOCK_SIZE = 512;
-const S32	UI_TEXTEDITOR_BORDER = 1;
-const S32	UI_TEXTEDITOR_H_PAD = 4;
-const S32	UI_TEXTEDITOR_V_PAD_TOP = 4;
 const S32	UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32;
 const S32	UI_TEXTEDITOR_LINE_NUMBER_DIGITS = 4;
 const F32	CURSOR_FLASH_DELAY = 1.0f;  // in seconds
 const S32	CURSOR_THICKNESS = 2;
 const S32	SPACES_PER_TAB = 4;
 
-const F32	PREEDIT_MARKER_BRIGHTNESS = 0.4f;
-const S32	PREEDIT_MARKER_GAP = 1;
-const S32	PREEDIT_MARKER_POSITION = 2;
-const S32	PREEDIT_MARKER_THICKNESS = 1;
-const F32	PREEDIT_STANDOUT_BRIGHTNESS = 0.6f;
-const S32	PREEDIT_STANDOUT_GAP = 1;
-const S32	PREEDIT_STANDOUT_POSITION = 2;
-const S32	PREEDIT_STANDOUT_THICKNESS = 2;
-
 
 LLColor4 LLTextEditor::mLinkColor = LLColor4::blue;
 void (* LLTextEditor::mURLcallback)(const std::string&)   = NULL;
@@ -243,18 +228,9 @@ private:
 
 
 ///////////////////////////////////////////////////////////////////
-
-LLTextEditor::LLTextEditor(	
-	const std::string& name, 
-	const LLRect& rect, 
-	S32 max_length,						// In bytes
-	const std::string &default_text, 
-	const LLFontGL* font,
-	BOOL allow_embedded_items)
-	:	
-	LLUICtrl( name, rect, TRUE, NULL, NULL, FOLLOWS_TOP | FOLLOWS_LEFT ),
-	mTextIsUpToDate(TRUE),
-	mMaxTextByteLength( max_length ),
+LLTextEditor::LLTextEditor(const LLTextEditor::Params& p)
+	:	LLUICtrl(p, LLTextViewModelPtr(new LLTextViewModel)),
+	mMaxTextByteLength( p.max_text_length ),
 	mBaseDocIsPristine(TRUE),
 	mPristineCmd( NULL ),
 	mLastCmd( NULL ),
@@ -265,45 +241,40 @@ LLTextEditor::LLTextEditor(
 	mScrolledToBottom( TRUE ),
 	mOnScrollEndCallback( NULL ),
 	mOnScrollEndData( NULL ),
-	mCursorColor(		LLUI::sColorsGroup->getColor( "TextCursorColor" ) ),
-	mFgColor(			LLUI::sColorsGroup->getColor( "TextFgColor" ) ),
-	mDefaultColor(		LLUI::sColorsGroup->getColor( "TextDefaultColor" ) ),
-	mReadOnlyFgColor(	LLUI::sColorsGroup->getColor( "TextFgReadOnlyColor" ) ),
-	mWriteableBgColor(	LLUI::sColorsGroup->getColor( "TextBgWriteableColor" ) ),
-	mReadOnlyBgColor(	LLUI::sColorsGroup->getColor( "TextBgReadOnlyColor" ) ),
-	mFocusBgColor(		LLUI::sColorsGroup->getColor( "TextBgFocusColor" ) ),
-	mReadOnly(FALSE),
-	mWordWrap( FALSE ),
+	mCursorColor(		p.cursor_color() ),
+	mFgColor(			p.text_color() ),
+	mDefaultColor(		p.default_color() ),
+	mReadOnlyFgColor(	p.text_readonly_color() ),
+	mWriteableBgColor(	p.bg_writeable_color() ),
+	mReadOnlyBgColor(	p.bg_readonly_color() ),
+	mFocusBgColor(		p.bg_focus_color() ),
+	mReadOnly(p.read_only),
+	mWordWrap( p.word_wrap ),
 	mShowLineNumbers ( FALSE ),
-	mTabsToNextField( TRUE ),
 	mCommitOnFocusLost( FALSE ),
 	mHideScrollbarForShortDocs( FALSE ),
-	mTakesNonScrollClicks( TRUE ),
-	mTrackBottom( FALSE ),
-	mAllowEmbeddedItems( allow_embedded_items ),
+	mTakesNonScrollClicks( p.takes_non_scroll_clicks ),
+	mTrackBottom( p.track_bottom ),
+	mAllowEmbeddedItems( p.allow_embedded_items ),
 	mAcceptCallingCardNames(FALSE),
 	mHandleEditKeysDirectly( FALSE ),
 	mMouseDownX(0),
 	mMouseDownY(0),
 	mLastSelectionX(-1),
-	mLastSelectionY(-1),
 	mReflowNeeded(FALSE),
-	mScrollNeeded(FALSE)
+	mScrollNeeded(FALSE),
+	mLastSelectionY(-1),
+	mTabsToNextField(p.ignore_tab),
+	mGLFont(p.font),
+	mGLFontStyle(LLFontGL::getStyleFromString(p.font.style))
 {
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+
 	mSourceID.generate();
 
 	// reset desired x cursor position
 	mDesiredXPixel = -1;
 
-	if (font)
-	{
-		mGLFont = font;
-	}
-	else
-	{
-		mGLFont = LLFontGL::getFontSansSerif();
-	}
-
 	updateTextRect();
 
 	S32 line_height = llround( mGLFont->getLineHeight() );
@@ -312,36 +283,57 @@ LLTextEditor::LLTextEditor(
 	// Init the scrollbar
 	LLRect scroll_rect;
 	scroll_rect.setOriginAndSize( 
-		getRect().getWidth() - SCROLLBAR_SIZE,
+		getRect().getWidth() - scrollbar_size,
 		1,
-		SCROLLBAR_SIZE,
+		scrollbar_size,
 		getRect().getHeight() - 1);
 	S32 lines_in_doc = getLineCount();
-	mScrollbar = new LLScrollbar( std::string("Scrollbar"), scroll_rect,
-		LLScrollbar::VERTICAL,
-		lines_in_doc,						
-		0,						
-		page_size,
-		NULL, this );
-	mScrollbar->setFollowsRight();
-	mScrollbar->setFollowsTop();
-	mScrollbar->setFollowsBottom();
-	mScrollbar->setEnabled( TRUE );
-	mScrollbar->setVisible( TRUE );
+	LLScrollbar::Params sbparams;
+	sbparams.name("Scrollbar");
+	sbparams.rect(scroll_rect);
+	sbparams.orientation(LLScrollbar::VERTICAL);
+	sbparams.doc_size(lines_in_doc);
+	sbparams.doc_pos(0);
+	sbparams.page_size(page_size);
+	sbparams.follows.flags(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
+	mScrollbar = LLUICtrlFactory::create<LLScrollbar> (sbparams);
 	mScrollbar->setOnScrollEndCallback(mOnScrollEndCallback, mOnScrollEndData);
 	addChild(mScrollbar);
 
-	mBorder = new LLViewBorder( std::string("text ed border"), LLRect(0, getRect().getHeight(), getRect().getWidth(), 0), LLViewBorder::BEVEL_IN, LLViewBorder::STYLE_LINE, UI_TEXTEDITOR_BORDER );
+	static LLUICachedControl<S32> text_editor_border ("UITextEditorBorder", 0);
+	LLViewBorder::Params params;
+	params.name("text ed border");
+	params.rect(getLocalRect());
+	params.bevel_type(LLViewBorder::BEVEL_IN);
+	params.border_thickness(text_editor_border);
+	mBorder = LLUICtrlFactory::create<LLViewBorder> (params);
 	addChild( mBorder );
+	mBorder->setVisible(!p.hide_border);
 
-	appendText(default_text, FALSE, FALSE);
-	
-	resetDirty();		// Update saved text state
+	appendText(p.default_text, FALSE, FALSE);
+
+	setHideScrollbarForShortDocs(p.hide_scrollbar);
 
 	mParseHTML=FALSE;
 	mHTML.clear();
 }
 
+void LLTextEditor::initFromParams( const LLTextEditor::Params& p)
+{
+	resetDirty();		// Update saved text state
+	LLUICtrl::initFromParams(p);
+	// HACK: work around enabled == readonly design bug -- RN
+	// setEnabled will modify our read only status, so do this after
+	// LLUICtrl::initFromParams
+	if (p.read_only.isProvided())
+	{
+		mReadOnly = p.read_only;
+		updateSegments();
+		updateAllowingLanguageInput();
+	}
+	// HACK:  text editors always need to be enabled so that we can scroll
+	LLView::setEnabled(true);
+}
 
 LLTextEditor::~LLTextEditor()
 {
@@ -360,6 +352,11 @@ LLTextEditor::~LLTextEditor()
 	std::for_each(mUndoStack.begin(), mUndoStack.end(), DeletePointer());
 }
 
+LLTextViewModel* LLTextEditor::getViewModel() const
+{
+	return (LLTextViewModel*)mViewModel.get();
+}
+
 void LLTextEditor::setTrackColor( const LLColor4& color )
 { 
 	mScrollbar->setTrackColor(color); 
@@ -370,16 +367,6 @@ void LLTextEditor::setThumbColor( const LLColor4& color )
 	mScrollbar->setThumbColor(color); 
 }
 
-void LLTextEditor::setHighlightColor( const LLColor4& color ) 
-{ 
-	mScrollbar->setHighlightColor(color); 
-}
-
-void LLTextEditor::setShadowColor( const LLColor4& color ) 
-{ 
-	mScrollbar->setShadowColor(color); 
-}
-
 void LLTextEditor::updateLineStartList(S32 startpos)
 {
 	updateSegments();
@@ -400,7 +387,8 @@ void LLTextEditor::updateLineStartList(S32 startpos)
 		seg_offset = iter->mOffset;
 		mLineStartList.erase(iter, mLineStartList.end());
 	}
-	
+
+    LLWString text(getWText());
 	while( seg_idx < seg_num )
 	{
 		mLineStartList.push_back(line_info(seg_idx,seg_offset));
@@ -412,7 +400,7 @@ void LLTextEditor::updateLineStartList(S32 startpos)
 			LLTextSegment* segment = mSegments[seg_idx];
 			S32 start_idx = segment->getStart() + seg_offset;
 			S32 end_idx = start_idx;
-			while (end_idx < segment->getEnd() && mWText[end_idx] != '\n')
+			while (end_idx < segment->getEnd() && text[end_idx] != '\n')
 			{
 				end_idx++;
 			}
@@ -433,7 +421,7 @@ void LLTextEditor::updateLineStartList(S32 startpos)
 			}
 			else
 			{ 
-				const llwchar* str = mWText.c_str() + start_idx;
+				const llwchar* str = text.c_str() + start_idx;
 				S32 drawn = mGLFont->maxDrawableChars(str, (F32)abs(mTextRect.getWidth()) - line_width,
 													  end_idx - start_idx, mWordWrap, mAllowEmbeddedItems );
 				if( 0 == drawn && line_width == start_x)
@@ -447,7 +435,7 @@ void LLTextEditor::updateLineStartList(S32 startpos)
 				if (end_idx < segment->getEnd())
 				{
 					line_ended = TRUE;
-					if (mWText[end_idx] == '\n')
+					if (text[end_idx] == '\n')
 					{
 						seg_offset++; // skip newline
 					}
@@ -490,17 +478,17 @@ BOOL LLTextEditor::truncate()
 	BOOL did_truncate = FALSE;
 
 	// First rough check - if we're less than 1/4th the size, we're OK
-	if (mWText.size() >= (size_t) (mMaxTextByteLength / 4))
+	if (getLength() >= S32(mMaxTextByteLength / 4))
 	{	
 		// Have to check actual byte size
-		S32 utf8_byte_size = wstring_utf8_length( mWText );
+        LLWString text(getWText());
+		S32 utf8_byte_size = wstring_utf8_length(text);
 		if ( utf8_byte_size > mMaxTextByteLength )
 		{
 			// Truncate safely in UTF-8
-			std::string temp_utf8_text = wstring_to_utf8str( mWText );
+			std::string temp_utf8_text = wstring_to_utf8str(text);
 			temp_utf8_text = utf8str_truncate( temp_utf8_text, mMaxTextByteLength );
-			mWText = utf8str_to_wstring( temp_utf8_text );
-			mTextIsUpToDate = FALSE;
+			getViewModel()->setDisplay(utf8str_to_wstring( temp_utf8_text ));
 			did_truncate = TRUE;
 		}
 	}
@@ -511,10 +499,7 @@ BOOL LLTextEditor::truncate()
 void LLTextEditor::setText(const LLStringExplicit &utf8str)
 {
 	// LLStringUtil::removeCRLF(utf8str);
-	mUTF8Text = utf8str_removeCRLF(utf8str);
-	// mUTF8Text = utf8str;
-	mWText = utf8str_to_wstring(mUTF8Text);
-	mTextIsUpToDate = TRUE;
+	mViewModel->setValue(utf8str_removeCRLF(utf8str));
 
 	truncate();
 	blockUndo();
@@ -529,9 +514,7 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str)
 
 void LLTextEditor::setWText(const LLWString &wtext)
 {
-	mWText = wtext;
-	mUTF8Text.clear();
-	mTextIsUpToDate = FALSE;
+	getViewModel()->setDisplay(wtext);
 
 	truncate();
 	blockUndo();
@@ -550,24 +533,13 @@ void LLTextEditor::setValue(const LLSD& value)
 	setText(value.asString());
 }
 
-const std::string& LLTextEditor::getText() const
+std::string LLTextEditor::getText() const
 {
-	if (!mTextIsUpToDate)
+	if (mAllowEmbeddedItems)
 	{
-		if (mAllowEmbeddedItems)
-		{
-			llwarns << "getText() called on text with embedded items (not supported)" << llendl;
-		}
-		mUTF8Text = wstring_to_utf8str(mWText);
-		mTextIsUpToDate = TRUE;
+		llwarns << "getText() called on text with embedded items (not supported)" << llendl;
 	}
-	return mUTF8Text;
-}
-
-// virtual
-LLSD LLTextEditor::getValue() const
-{
-	return LLSD(getText());
+	return mViewModel->getValue().asString();
 }
 
 void LLTextEditor::setWordWrap(BOOL b)
@@ -709,7 +681,7 @@ void LLTextEditor::setCursorAtLocalPos( S32 local_x, S32 local_y, BOOL round )
 
 S32 LLTextEditor::prevWordPos(S32 cursorPos) const
 {
-	const LLWString& wtext = mWText;
+	LLWString wtext(getWText());
 	while( (cursorPos > 0) && (wtext[cursorPos-1] == ' ') )
 	{
 		cursorPos--;
@@ -723,7 +695,7 @@ S32 LLTextEditor::prevWordPos(S32 cursorPos) const
 
 S32 LLTextEditor::nextWordPos(S32 cursorPos) const
 {
-	const LLWString& wtext = mWText;
+	LLWString wtext(getWText());
 	while( (cursorPos < getLength()) && isPartOfWord( wtext[cursorPos] ) )
 	{
 		cursorPos++;
@@ -849,12 +821,13 @@ S32 LLTextEditor::getCursorPosFromLocalCoord( S32 local_x, S32 local_y, BOOL rou
 	{
 		S32 line_len = line_end - line_start;
 		S32 pos;
+        LLWString text(getWText());
 
 		if (mAllowEmbeddedItems)
 		{
 			// Figure out which character we're nearest to.
 			bindEmbeddedChars(mGLFont);
-			pos = mGLFont->charFromPixelOffset(mWText.c_str(), line_start,
+			pos = mGLFont->charFromPixelOffset(text.c_str(), line_start,
 											   (F32)(local_x - mTextRect.mLeft),
 											   (F32)(mTextRect.getWidth()),
 											   line_len,
@@ -863,7 +836,7 @@ S32 LLTextEditor::getCursorPosFromLocalCoord( S32 local_x, S32 local_y, BOOL rou
 		}
 		else
 		{
-			pos = mGLFont->charFromPixelOffset(mWText.c_str(), line_start,
+			pos = mGLFont->charFromPixelOffset(text.c_str(), line_start,
 											   (F32)(local_x - mTextRect.mLeft),
 											   (F32)mTextRect.getWidth(),
 											   line_len,
@@ -876,14 +849,15 @@ S32 LLTextEditor::getCursorPosFromLocalCoord( S32 local_x, S32 local_y, BOOL rou
 
 void LLTextEditor::setCursor(S32 row, S32 column)
 {
-	const llwchar* doc = mWText.c_str();
+    LLWString text(getWText());
+	const llwchar* doc = text.c_str();
 	const char CR = 10;
 	while(row--)
 	{
 		while (CR != *doc++);
 	}
 	doc += column;
-	setCursorPos(doc - mWText.c_str());
+	setCursorPos(doc - text.c_str());
 }
 
 void LLTextEditor::setCursorPos(S32 offset)
@@ -935,7 +909,7 @@ BOOL LLTextEditor::selectionContainsLineBreaks()
 		S32 left = llmin(mSelectionStart, mSelectionEnd);
 		S32 right = left + llabs(mSelectionStart - mSelectionEnd);
 
-		const LLWString &wtext = mWText;
+		LLWString wtext = getWText();
 		for( S32 i = left; i < right; i++ )
 		{
 			if (wtext[i] == '\n')
@@ -972,7 +946,7 @@ S32 LLTextEditor::indentLine( S32 pos, S32 spaces )
 		// Unindent
 		for(S32 i=0; i < -spaces; i++)
 		{
-			const LLWString &wtext = mWText;
+			LLWString wtext = getWText();
 			if (wtext[pos] == ' ')
 			{
 				delta_spaces += remove( pos, 1, FALSE );
@@ -987,7 +961,7 @@ void LLTextEditor::indentSelectedLines( S32 spaces )
 {
 	if( hasSelection() )
 	{
-		const LLWString &text = mWText;
+		LLWString text = getWText();
 		S32 left = llmin( mSelectionStart, mSelectionEnd );
 		S32 right = left + llabs( mSelectionStart - mSelectionEnd );
 		BOOL cursor_on_right = (mSelectionEnd > mSelectionStart);
@@ -1217,6 +1191,7 @@ BOOL LLTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
 
 BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
 {
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
 	BOOL handled = FALSE;
 
 	mHoverSegment = NULL;
@@ -1291,7 +1266,7 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
 		if( !handled )
 		{
 			lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;		
-			if (!mScrollbar->getVisible() || x < getRect().getWidth() - SCROLLBAR_SIZE)
+			if (!mScrollbar->getVisible() || x < getRect().getWidth() - scrollbar_size)
 			{
 				getWindow()->setCursor(UI_CURSOR_IBEAM);
 			}
@@ -1374,7 +1349,7 @@ BOOL LLTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
 		setCursorAtLocalPos( x, y, FALSE );
 		deselect();
 
-		const LLWString &text = mWText;
+		LLWString text = getWText();
 		
 		if( isPartOfWord( text[mCursorPos] ) )
 		{
@@ -1471,12 +1446,12 @@ S32 LLTextEditor::remove(const S32 pos, const S32 length, const BOOL group_with_
 
 S32 LLTextEditor::append(const LLWString &wstr, const BOOL group_with_next_op)
 {
-	return insert(mWText.length(), wstr, group_with_next_op);
+	return insert(getLength(), wstr, group_with_next_op);
 }
 
 S32 LLTextEditor::overwriteChar(S32 pos, llwchar wc)
 {
-	if ((S32)mWText.length() == pos)
+	if ((S32)getLength() == pos)
 	{
 		return addChar(pos, wc);
 	}
@@ -1498,7 +1473,7 @@ void LLTextEditor::removeCharOrTab()
 	{
 		S32 chars_to_remove = 1;
 
-		const LLWString &text = mWText;
+		LLWString text = getWText();
 		if (text[mCursorPos - 1] == ' ')
 		{
 			// Try to remove a "tab"
@@ -1563,7 +1538,7 @@ void LLTextEditor::removeChar()
 // Add a single character to the text
 S32 LLTextEditor::addChar(S32 pos, llwchar wc)
 {
-	if ( (wstring_utf8_length( mWText ) + wchar_utf8_length( wc ))  >= mMaxTextByteLength)
+	if ( (wstring_utf8_length( getWText() ) + wchar_utf8_length( wc ))  >= mMaxTextByteLength)
 	{
 		make_ui_sound("UISndBadKeystroke");
 		return 0;
@@ -1865,7 +1840,7 @@ void LLTextEditor::cut()
 	}
 	S32 left_pos = llmin( mSelectionStart, mSelectionEnd );
 	S32 length = llabs( mSelectionStart - mSelectionEnd );
-	gClipboard.copyFromSubstring( mWText, left_pos, length, mSourceID );
+	gClipboard.copyFromSubstring( getWText(), left_pos, length, mSourceID );
 	deleteSelection( FALSE );
 
 	needsReflow();
@@ -1885,7 +1860,7 @@ void LLTextEditor::copy()
 	}
 	S32 left_pos = llmin( mSelectionStart, mSelectionEnd );
 	S32 length = llabs( mSelectionStart - mSelectionEnd );
-	gClipboard.copyFromSubstring(mWText, left_pos, length, mSourceID);
+	gClipboard.copyFromSubstring(getWText(), left_pos, length, mSourceID);
 }
 
 BOOL LLTextEditor::canPaste() const
@@ -1986,7 +1961,7 @@ void LLTextEditor::copyPrimary()
 	}
 	S32 left_pos = llmin( mSelectionStart, mSelectionEnd );
 	S32 length = llabs( mSelectionStart - mSelectionEnd );
-	gClipboard.copyFromPrimarySubstring(mWText, left_pos, length, mSourceID);
+	gClipboard.copyFromPrimarySubstring(getWText(), left_pos, length, mSourceID);
 }
 
 BOOL LLTextEditor::canPastePrimary() const
@@ -2237,7 +2212,7 @@ void LLTextEditor::unindentLineBeforeCloseBrace()
 {
 	if( mCursorPos >= 1 )
 	{
-		const LLWString &text = mWText;
+		LLWString text = getWText();
 		if( ' ' == text[ mCursorPos - 1 ] )
 		{
 			removeCharOrTab();
@@ -2401,7 +2376,7 @@ void LLTextEditor::doDelete()
 	{	
 		S32 i;
 		S32 chars_to_remove = 1;
-		const LLWString &text = mWText;
+		LLWString text = getWText();
 		if( (text[ mCursorPos ] == ' ') && (mCursorPos + SPACES_PER_TAB < getLength()) )
 		{
 			// Try to remove a full tab's worth of spaces
@@ -2565,10 +2540,10 @@ void LLTextEditor::drawBackground()
 	S32 right = getRect().getWidth();
 	S32 bottom = 0;
 
-	LLColor4 bg_color = mReadOnly ? mReadOnlyBgColor
-		: gFocusMgr.getKeyboardFocus() == this ? mFocusBgColor : mWriteableBgColor;
+	LLColor4 bg_color = mReadOnly ? mReadOnlyBgColor.get()
+		: gFocusMgr.getKeyboardFocus() == this ? mFocusBgColor.get() : mWriteableBgColor.get();
 	if( mShowLineNumbers ) {
-		gl_rect_2d(left, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN, bottom, mReadOnlyBgColor ); // line number area always read-only
+		gl_rect_2d(left, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN, bottom, mReadOnlyBgColor.get() ); // line number area always read-only
 		gl_rect_2d(UI_TEXTEDITOR_LINE_NUMBER_MARGIN, top, right, bottom, bg_color); // body text area to the right of line numbers
 		gl_rect_2d(UI_TEXTEDITOR_LINE_NUMBER_MARGIN, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN-1, bottom, LLColor4::grey3); // separator
 	} else {
@@ -2584,7 +2559,7 @@ void LLTextEditor::drawSelectionBackground()
 	// Draw selection even if we don't have keyboard focus for search/replace
 	if( hasSelection() )
 	{
-		const LLWString &text = mWText;
+		LLWString text = getWText();
 		const S32 text_len = getLength();
 		std::queue<S32> line_endings;
 
@@ -2683,7 +2658,7 @@ void LLTextEditor::drawSelectionBackground()
 		if( selection_visible )
 		{
 			gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-			const LLColor4& color = mReadOnly ? mReadOnlyBgColor : mWriteableBgColor;
+			const LLColor4& color = mReadOnly ? mReadOnlyBgColor.get() : mWriteableBgColor.get();
 			F32 alpha = hasFocus() ? 1.f : 0.5f;
 			gGL.color4f( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], alpha );
 			S32 margin_offset = mShowLineNumbers ? UI_TEXTEDITOR_LINE_NUMBER_MARGIN : 0;
@@ -2735,7 +2710,7 @@ void LLTextEditor::drawCursor()
 	if( gFocusMgr.getKeyboardFocus() == this
 		&& gShowTextEditCursor && !mReadOnly)
 	{
-		const LLWString &text = mWText;
+		LLWString text = getWText();
 		const S32 text_len = getLength();
 
 		// Skip through the lines we aren't drawing.
@@ -2819,7 +2794,7 @@ void LLTextEditor::drawCursor()
 				
 				gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
 
-				gGL.color4fv( mCursorColor.mV );
+				gGL.color4fv( mCursorColor.get().mV );
 				
 				gl_rect_2d(llfloor(cursor_left), llfloor(cursor_top),
 					llfloor(cursor_right), llfloor(cursor_bottom));
@@ -2834,21 +2809,22 @@ void LLTextEditor::drawCursor()
 					}
 					else if (mReadOnly)
 					{
-						text_color = mReadOnlyFgColor;
+						text_color = mReadOnlyFgColor.get();
 					}
 					else
 					{
-						text_color = mFgColor;
+						text_color = mFgColor.get();
 					}
 					mGLFont->render(text, mCursorPos, next_char_left, cursor_bottom + line_height, 
 						LLColor4(1.f - text_color.mV[VRED], 1.f - text_color.mV[VGREEN], 1.f - text_color.mV[VBLUE], 1.f),
 						LLFontGL::LEFT, LLFontGL::TOP,
 						LLFontGL::NORMAL,
+						LLFontGL::NO_SHADOW,
 						1);
 				}
 
 				// Make sure the IME is in the right place
-				LLRect screen_pos = getScreenRect();
+				LLRect screen_pos = calcScreenRect();
 				LLCoordGL ime_pos( screen_pos.mLeft + llfloor(cursor_left), screen_pos.mBottom + llfloor(cursor_top) );
 
 				ime_pos.mX = (S32) (ime_pos.mX * LLUI::sGLScaleFactor.mV[VX]);
@@ -2861,12 +2837,22 @@ void LLTextEditor::drawCursor()
 
 void LLTextEditor::drawPreeditMarker()
 {
+	static LLUICachedControl<F32> preedit_marker_brightness ("UIPreeditMarkerBrightness", 0);
+	static LLUICachedControl<S32> preedit_marker_gap ("UIPreeditMarkerGap", 0);
+	static LLUICachedControl<S32> preedit_marker_position ("UIPreeditMarkerPosition", 0);
+	static LLUICachedControl<S32> preedit_marker_thickness ("UIPreeditMarkerThickness", 0);
+	static LLUICachedControl<F32> preedit_standout_brightness ("UIPreeditStandoutBrightness", 0);
+	static LLUICachedControl<S32> preedit_standout_gap ("UIPreeditStandoutGap", 0);
+	static LLUICachedControl<S32> preedit_standout_position ("UIPreeditStandoutPosition", 0);
+	static LLUICachedControl<S32> preedit_standout_thickness ("UIPreeditStandoutThickness", 0);
+
 	if (!hasPreeditString())
 	{
 		return;
 	}
 
-	const llwchar *text = mWText.c_str();
+    const LLWString textString(getWText());
+	const llwchar *text = textString.c_str();
 	const S32 text_len = getLength();
 	const S32 num_lines = getLineCount();
 
@@ -2929,19 +2915,19 @@ void LLTextEditor::drawPreeditMarker()
 
 				if (mPreeditStandouts[i])
 				{
-					gl_rect_2d(preedit_left + PREEDIT_STANDOUT_GAP,
-							line_y + PREEDIT_STANDOUT_POSITION,
-							preedit_right - PREEDIT_STANDOUT_GAP - 1,
-							line_y + PREEDIT_STANDOUT_POSITION - PREEDIT_STANDOUT_THICKNESS,
-							(mCursorColor * PREEDIT_STANDOUT_BRIGHTNESS + mWriteableBgColor * (1 - PREEDIT_STANDOUT_BRIGHTNESS)).setAlpha(1.0f));
+					gl_rect_2d(preedit_left + preedit_standout_gap,
+							line_y + preedit_standout_position,
+							preedit_right - preedit_standout_gap - 1,
+							line_y + preedit_standout_position - preedit_standout_thickness,
+							(mCursorColor.get() * preedit_standout_brightness + mWriteableBgColor.get() * (1 - preedit_standout_brightness)).setAlpha(1.0f));
 				}
 				else
 				{
-					gl_rect_2d(preedit_left + PREEDIT_MARKER_GAP,
-							line_y + PREEDIT_MARKER_POSITION,
-							preedit_right - PREEDIT_MARKER_GAP - 1,
-							line_y + PREEDIT_MARKER_POSITION - PREEDIT_MARKER_THICKNESS,
-							(mCursorColor * PREEDIT_MARKER_BRIGHTNESS + mWriteableBgColor * (1 - PREEDIT_MARKER_BRIGHTNESS)).setAlpha(1.0f));
+					gl_rect_2d(preedit_left + preedit_marker_gap,
+							line_y + preedit_marker_position,
+							preedit_right - preedit_marker_gap - 1,
+							line_y + preedit_marker_position - preedit_marker_thickness,
+							(mCursorColor.get() * preedit_marker_brightness + mWriteableBgColor.get() * (1 - preedit_marker_brightness)).setAlpha(1.0f));
 				}
 			}
 		}
@@ -2956,9 +2942,12 @@ void LLTextEditor::drawPreeditMarker()
 
 void LLTextEditor::drawText()
 {
-	const LLWString &text = mWText;
+	LLWString text = getWText();
 	const S32 text_len = getLength();
-	if( text_len <= 0 ) return;
+	if( text_len <= 0 )
+	{
+		return;
+	}
 	S32 selection_left = -1;
 	S32 selection_right = -1;
 	// Draw selection even if we don't have keyboard focus for search/replace
@@ -2970,26 +2959,14 @@ void LLTextEditor::drawText()
 
 	LLGLSUIDefault gls_ui;
 
-	// There are several concepts that are important for understanding the following drawing code.
-	// The document is logically a sequence of characters (stored in a LLWString).
-	// Variables below with "start" or "end" in their names refer to positions or offsets into it.
-	// Next there are two kinds of "line" variables to understand. Newline characters in the
-	// character sequence represent logical lines. These are what get numbered and so variables
-	// representing this kind of line have "num" in their names.
-	// The others represent line fragments or displayed lines which the scrollbar deals with.
-	// When the "show line numbers" property is turned on, we draw line numbers to the left of the 
-	// beginning of each logical line and not in front of wrapped "continuation" display lines. -MG
-
-	S32 cur_line = mScrollbar->getDocPos(); // scrollbar counts each wrap as a new line.
+	S32 cur_line = mScrollbar->getDocPos();
 	S32 num_lines = getLineCount();
-	if (cur_line >= num_lines) return;
-	S32 line_start = getLineStart(cur_line);
-	S32 prev_start = getLineStart(cur_line-1);
-	S32 cur_line_num  = getLineForPosition(line_start); // doesn't count wraps. i.e. only counts newlines.
-	S32 prev_line_num = getLineForPosition(prev_start);
-	BOOL cur_line_is_continuation = cur_line_num > 0 && cur_line_num == prev_line_num;
-	BOOL line_wraps = FALSE;
+	if (cur_line >= num_lines)
+	{
+		return;
+	}
 	
+	S32 line_start = getLineStart(cur_line);
 	LLTextSegment t(line_start);
 	segment_list_t::iterator seg_iter;
 	seg_iter = std::upper_bound(mSegments.begin(), mSegments.end(), &t, LLTextSegment::compare());
@@ -3008,36 +2985,12 @@ void LLTextEditor::drawText()
 			next_start = getLineStart(cur_line + 1);
 			line_end = next_start;
 		}
-		line_wraps = text[line_end-1] != '\n';
-		if ( ! line_wraps )
+		if ( text[line_end-1] == '\n' )
 		{
-			--line_end; // don't attempt to draw the newline char.
+			--line_end;
 		}
 		
-		F32 text_start = (F32)mTextRect.mLeft;
-		F32 text_x = text_start + (mShowLineNumbers ? UI_TEXTEDITOR_LINE_NUMBER_MARGIN : 0);
-		
-		// draw the line numbers
-		if( mShowLineNumbers && !cur_line_is_continuation) 
-		{
-			const LLFontGL *num_font = LLFontGL::getFontMonospace();
-			F32 y_top = text_y + ((F32)llround(num_font->getLineHeight()) / 2);
-			const LLWString ltext = utf8str_to_wstring(llformat("%*d", UI_TEXTEDITOR_LINE_NUMBER_DIGITS, cur_line_num ));
-			BOOL is_cur_line = getCurrentLine() == cur_line_num;
-			const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL;
-			const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor;
-			num_font->render( 
-				ltext, // string to draw
-				0, // begin offset
-				3., // x
-				y_top, // y
-				fg_color, 
-				LLFontGL::LEFT, // horizontal alignment
-				LLFontGL::VCENTER, // vertical alignment
-				style, 
-				S32_MAX, // max chars
-				UI_TEXTEDITOR_LINE_NUMBER_MARGIN); // max pixels
-		}
+		F32 text_x = (F32)mTextRect.mLeft;
 
 		S32 seg_start = line_start;
 		while( seg_start < line_end )
@@ -3082,31 +3035,20 @@ void LLTextEditor::drawText()
 
 				drawClippedSegment( text, seg_start, clipped_end, text_x, text_y, selection_left, selection_right, style, &text_x );
 
-				if( text_x == text_start && mShowLineNumbers ) 
-				{
-					text_x += UI_TEXTEDITOR_LINE_NUMBER_MARGIN;
-				}
-
 				// Note: text_x is incremented by drawClippedSegment()
 				seg_start += clipped_len;
 			}
 		}
 
-		// move down one line
-		text_y -= (F32)line_height;
-
-		if( line_wraps )
-		{
-			cur_line_num--;
-		}
-		cur_line_is_continuation = line_wraps; // so as to not not number the continuation lines
+			// move down one line
+			text_y -= (F32)line_height;
 
 		line_start = next_start;
 		cur_line++;
-		cur_line_num++;
 	}
 }
 
+
 // Draws a single text segment, reversing the color for selection if needed.
 void LLTextEditor::drawClippedSegment(const LLWString &text, S32 seg_start, S32 seg_end, F32 x, F32 y, S32 selection_left, S32 selection_right, const LLStyleSP& style, F32* right_x )
 {
@@ -3121,7 +3063,7 @@ void LLTextEditor::drawClippedSegment(const LLWString &text, S32 seg_start, S32
 
 	if ( style->getFontString()[0] )
 	{
-		font = LLResMgr::getInstance()->getRes(style->getFontID());
+		font = style->getFont();
 	}
 
 	U8 font_flags = LLFontGL::NORMAL;
@@ -3141,13 +3083,15 @@ void LLTextEditor::drawClippedSegment(const LLWString &text, S32 seg_start, S32
 
 	if (style->getIsEmbeddedItem())
 	{
+		static LLUICachedControl<LLColor4> text_embedded_item_readonly_color ("TextEmbeddedItemReadOnlyColor", *(new LLColor4));
+		static LLUICachedControl<LLColor4> text_embedded_item_color ("TextEmbeddedItemColor", *(new LLColor4));
 		if (mReadOnly)
 		{
-			color = LLUI::sColorsGroup->getColor("TextEmbeddedItemReadOnlyColor");
+			color = text_embedded_item_readonly_color;
 		}
 		else
 		{
-			color = LLUI::sColorsGroup->getColor("TextEmbeddedItemColor");
+			color = text_embedded_item_color;
 		}
 	}
 
@@ -3159,7 +3103,7 @@ void LLTextEditor::drawClippedSegment(const LLWString &text, S32 seg_start, S32
 		S32 start = seg_start;
 		S32 end = llmin( selection_left, seg_end );
 		S32 length =  end - start;
-		font->render(text, start, x, y_top, color, LLFontGL::LEFT, LLFontGL::TOP, font_flags, length, S32_MAX, right_x, mAllowEmbeddedItems);
+		font->render(text, start, x, y_top, color, LLFontGL::LEFT, LLFontGL::TOP, mGLFontStyle, LLFontGL::NO_SHADOW, length, S32_MAX, right_x, mAllowEmbeddedItems);
 	}
 	x = *right_x;
 	
@@ -3172,7 +3116,7 @@ void LLTextEditor::drawClippedSegment(const LLWString &text, S32 seg_start, S32
 
 		font->render(text, start, x, y_top,
 					 LLColor4( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], 1.f ),
-					 LLFontGL::LEFT, LLFontGL::TOP, font_flags, length, S32_MAX, right_x, mAllowEmbeddedItems);
+					 LLFontGL::LEFT, LLFontGL::TOP, mGLFontStyle, LLFontGL::NO_SHADOW, length, S32_MAX, right_x, mAllowEmbeddedItems);
 	}
 	x = *right_x;
 	if( selection_right < seg_end )
@@ -3181,7 +3125,7 @@ void LLTextEditor::drawClippedSegment(const LLWString &text, S32 seg_start, S32
 		S32 start = llmax( selection_right, seg_start );
 		S32 end = seg_end;
 		S32 length = end - start;
-		font->render(text, start, x, y_top, color, LLFontGL::LEFT, LLFontGL::TOP, font_flags, length, S32_MAX, right_x, mAllowEmbeddedItems);
+		font->render(text, start, x, y_top, color, LLFontGL::LEFT, LLFontGL::TOP, mGLFontStyle, LLFontGL::NO_SHADOW, length, S32_MAX, right_x, mAllowEmbeddedItems);
 	}
  }
 
@@ -3203,17 +3147,18 @@ void LLTextEditor::draw()
 	}
 
 	{
-		LLLocalClipRect clip(LLRect(0, getRect().getHeight(), getRect().getWidth() - (mScrollbar->getVisible() ? SCROLLBAR_SIZE : 0), 0));
+		static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+		LLLocalClipRect clip(LLRect(0, getRect().getHeight(), getRect().getWidth() - (mScrollbar->getVisible() ? scrollbar_size : 0), 0));
 
-			bindEmbeddedChars(mGLFont);
+		bindEmbeddedChars( mGLFont );
 
-			drawBackground();
-			drawSelectionBackground();
-			drawPreeditMarker();
-			drawText();
-			drawCursor();
+		drawBackground();
+		drawSelectionBackground();
+		drawPreeditMarker();
+		drawText();
+		drawCursor();
 
-			unbindEmbeddedChars(mGLFont);
+		unbindEmbeddedChars( mGLFont );
 
 		//RN: the decision was made to always show the orange border for keyboard focus but do not put an insertion caret
 		// when in readonly mode
@@ -3346,7 +3291,8 @@ void LLTextEditor::changeLine( S32 delta )
 	// if remembered position was reset (thus -1), calculate new one here
 	if( desired_x_pixel == -1 )
 	{
-		desired_x_pixel = mGLFont->getWidth(mWText.c_str(), line_start, offset, mAllowEmbeddedItems );
+        LLWString text(getWText());
+		desired_x_pixel = mGLFont->getWidth(text.c_str(), line_start, offset, mAllowEmbeddedItems );
 	}
 
 	S32 new_line = 0;
@@ -3376,7 +3322,8 @@ void LLTextEditor::changeLine( S32 delta )
 	S32 new_line_len = new_line_end - new_line_start;
 
 	S32 new_offset;
-	new_offset = mGLFont->charFromPixelOffset(mWText.c_str(), new_line_start,
+    LLWString text(getWText());
+	new_offset = mGLFont->charFromPixelOffset(text.c_str(), new_line_start,
 											  (F32)desired_x_pixel,
 											  (F32)mTextRect.getWidth(),
 											  new_line_len,
@@ -3424,7 +3371,7 @@ void LLTextEditor::getLineAndColumnForPosition( S32 position, S32* line, S32* co
 	}
 	else
 	{
-		const LLWString &text = mWText;
+		LLWString text = getWText();
 		S32 line_count = 0;
 		S32 line_start = 0;
 		S32 i;
@@ -3561,7 +3508,7 @@ void LLTextEditor::autoIndent()
 	S32 space_count = 0;
 	S32 i;
 
-	const LLWString &text = mWText;
+	LLWString text = getWText();
 	while( ' ' == text[line_start] )
 	{
 		space_count++;
@@ -3813,17 +3760,18 @@ void LLTextEditor::removeTextFromEnd(S32 num_chars)
 
 S32 LLTextEditor::insertStringNoUndo(const S32 pos, const LLWString &wstr)
 {
-	S32 old_len = mWText.length();		// length() returns character length
+    LLWString text(getWText());
+	S32 old_len = text.length();		// length() returns character length
 	S32 insert_len = wstr.length();
 
-	mWText.insert(pos, wstr);
-	mTextIsUpToDate = FALSE;
+	text.insert(pos, wstr);
+    getViewModel()->setDisplay(text);
 
 	if ( truncate() )
 	{
 		// The user's not getting everything he's hoping for
 		make_ui_sound("UISndBadKeystroke");
-		insert_len = mWText.length() - old_len;
+		insert_len = getLength() - old_len;
 	}
 
 	return insert_len;
@@ -3831,19 +3779,21 @@ S32 LLTextEditor::insertStringNoUndo(const S32 pos, const LLWString &wstr)
 
 S32 LLTextEditor::removeStringNoUndo(S32 pos, S32 length)
 {
-	mWText.erase(pos, length);
-	mTextIsUpToDate = FALSE;
+    LLWString text(getWText());
+	text.erase(pos, length);
+    getViewModel()->setDisplay(text);
 	return -length;	// This will be wrong if someone calls removeStringNoUndo with an excessive length
 }
 
 S32 LLTextEditor::overwriteCharNoUndo(S32 pos, llwchar wc)
 {
-	if (pos > (S32)mWText.length())
+	if (pos > (S32)getLength())
 	{
 		return 0;
 	}
-	mWText[pos] = wc;
-	mTextIsUpToDate = FALSE;
+    LLWString text(getWText());
+	text[pos] = wc;
+    getViewModel()->setDisplay(text);
 	return 1;
 }
 
@@ -3912,11 +3862,16 @@ BOOL LLTextEditor::tryToRevertToPristineState()
 
 void LLTextEditor::updateTextRect()
 {
+	static LLUICachedControl<S32> texteditor_border ("UITextEditorBorder", 0);
+	static LLUICachedControl<S32> texteditor_h_pad ("UITextEditorHPad", 0);
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+	static LLUICachedControl<S32> texteditor_vpad_top ("UITextEditorVPadTop", 0);
+
 	mTextRect.setOriginAndSize( 
-		UI_TEXTEDITOR_BORDER + UI_TEXTEDITOR_H_PAD,
-		UI_TEXTEDITOR_BORDER, 
-		getRect().getWidth() - SCROLLBAR_SIZE - 2 * (UI_TEXTEDITOR_BORDER + UI_TEXTEDITOR_H_PAD),
-		getRect().getHeight() - 2 * UI_TEXTEDITOR_BORDER - UI_TEXTEDITOR_V_PAD_TOP );
+		texteditor_border + texteditor_h_pad,
+		texteditor_border, 
+		getRect().getWidth() - scrollbar_size - 2 * (texteditor_border + texteditor_h_pad),
+		getRect().getHeight() - 2 * texteditor_border - texteditor_vpad_top );
 }
 
 void LLTextEditor::loadKeywords(const std::string& filename,
@@ -3933,7 +3888,7 @@ void LLTextEditor::loadKeywords(const std::string& filename,
 			mKeywords.addToken(LLKeywordToken::WORD, name, color, tooltips[i] );
 		}
 
-		mKeywords.findSegments( &mSegments, mWText, mDefaultColor );
+		mKeywords.findSegments( &mSegments, getWText(), mDefaultColor.get() );
 
 		llassert( mSegments.front()->getStart() == 0 );
 		llassert( mSegments.back()->getEnd() == getLength() );
@@ -3945,7 +3900,7 @@ void LLTextEditor::updateSegments()
 	if (mKeywords.isLoaded())
 	{
 		// HACK:  No non-ascii keywords for now
-		mKeywords.findSegments(&mSegments, mWText, mDefaultColor);
+		mKeywords.findSegments(&mSegments, getWText(), mDefaultColor.get());
 	}
 	else if (mAllowEmbeddedItems)
 	{
@@ -3960,8 +3915,8 @@ void LLTextEditor::updateSegments()
 	}
 	if (mSegments.empty())
 	{
-		LLColor4& text_color = ( mReadOnly ? mReadOnlyFgColor : mFgColor );
-		LLTextSegment* default_segment = new LLTextSegment( text_color, 0, mWText.length() );
+		LLColor4 text_color = ( mReadOnly ? mReadOnlyFgColor.get() : mFgColor.get() );
+		LLTextSegment* default_segment = new LLTextSegment( text_color, 0, getLength() );
 		default_segment->setIsDefault(TRUE);
 		mSegments.push_back(default_segment);
 	}
@@ -3971,7 +3926,7 @@ void LLTextEditor::updateSegments()
 // *NOTE: Using this will invalidate references to mSegments from mLineStartList.
 void LLTextEditor::pruneSegments()
 {
-	S32 len = mWText.length();
+	S32 len = getLength();
 	// Find and update the first valid segment
 	segment_list_t::iterator iter = mSegments.end();
 	while(iter != mSegments.begin())
@@ -4008,7 +3963,7 @@ void LLTextEditor::findEmbeddedItemSegments()
 	mSegments.clear();
 
 	BOOL found_embedded_items = FALSE;
-	const LLWString &text = mWText;
+	LLWString text = getWText();
 	S32 idx = 0;
 	while( text[idx] )
 	{
@@ -4029,7 +3984,7 @@ void LLTextEditor::findEmbeddedItemSegments()
 
 	BOOL in_text = FALSE;
 
-	LLColor4& text_color = ( mReadOnly ? mReadOnlyFgColor : mFgColor  );
+	LLColor4 text_color = ( mReadOnly ? mReadOnlyFgColor.get() : mFgColor.get()  );
 
 	if( idx > 0 )
 	{
@@ -4222,7 +4177,7 @@ BOOL LLTextEditor::exportBuffer(std::string &buffer )
 	outstream << "Linden text version 1\n";
 	outstream << "{\n";
 
-	outstream << llformat("Text length %d\n", mWText.length() );
+	outstream << llformat("Text length %d\n", getLength() );
 	outstream << getText();
 	outstream << "}\n";
 
@@ -4297,103 +4252,6 @@ void LLTextSegment::dump() const
 
 }
 
-// virtual
-LLXMLNodePtr LLTextEditor::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	// Attributes
-
-	node->createChild("max_length", TRUE)->setIntValue(getMaxLength());
-	node->createChild("embedded_items", TRUE)->setBoolValue(mAllowEmbeddedItems);
-	node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mGLFont));
-	node->createChild("word_wrap", TRUE)->setBoolValue(mWordWrap);
-	node->createChild("hide_scrollbar", TRUE)->setBoolValue(mHideScrollbarForShortDocs);
-
-	addColorXML(node, mCursorColor, "cursor_color", "TextCursorColor");
-	addColorXML(node, mFgColor, "text_color", "TextFgColor");
-	addColorXML(node, mDefaultColor, "text_default_color", "TextDefaultColor");
-	addColorXML(node, mReadOnlyFgColor, "text_readonly_color", "TextFgReadOnlyColor");
-	addColorXML(node, mReadOnlyBgColor, "bg_readonly_color", "TextBgReadOnlyColor");
-	addColorXML(node, mWriteableBgColor, "bg_writeable_color", "TextBgWriteableColor");
-	addColorXML(node, mFocusBgColor, "bg_focus_color", "TextBgFocusColor");
-
-	// Contents
- 	node->setStringValue(getText());
-
-	return node;
-}
-
-// static
-LLView* LLTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("text_editor");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	U32 max_text_length = 255;
-	node->getAttributeU32("max_length", max_text_length);
-
-	BOOL allow_embedded_items;
-	node->getAttributeBOOL("embedded_items", allow_embedded_items);
-
-	LLFontGL* font = LLView::selectFont(node);
-
-	std::string text = node->getTextContents().substr(0, max_text_length - 1);
-
-	LLTextEditor* text_editor = new LLTextEditor(name, 
-								rect,
-								max_text_length,
-								text,
-								font,
-								allow_embedded_items);
-
-	text_editor->setTextEditorParameters(node);
-
-	BOOL hide_scrollbar = FALSE;
-	node->getAttributeBOOL("hide_scrollbar",hide_scrollbar);
-	text_editor->setHideScrollbarForShortDocs(hide_scrollbar);
-
-	text_editor->initFromXML(node, parent);
-
-	return text_editor;
-}
-
-void LLTextEditor::setTextEditorParameters(LLXMLNodePtr node)
-{
-	BOOL word_wrap = FALSE;
-	node->getAttributeBOOL("word_wrap", word_wrap);
-	setWordWrap(word_wrap);
-
-	node->getAttributeBOOL("show_line_numbers", mShowLineNumbers);
-
-	node->getAttributeBOOL("track_bottom", mTrackBottom);
-
-	LLColor4 color;
-	if (LLUICtrlFactory::getAttributeColor(node,"cursor_color", color)) 
-	{
-		setCursorColor(color);
-	}
-	if(LLUICtrlFactory::getAttributeColor(node,"text_color", color))
-	{
-		setFgColor(color);
-	}
-	if(LLUICtrlFactory::getAttributeColor(node,"text_readonly_color", color))
-	{
-		setReadOnlyFgColor(color);
-	}
-	if(LLUICtrlFactory::getAttributeColor(node,"bg_readonly_color", color))
-	{
-		setReadOnlyBgColor(color);
-	}
-	if(LLUICtrlFactory::getAttributeColor(node,"bg_writeable_color", color))
-	{
-		setWriteableBgColor(color);
-	}
-}
-
 ///////////////////////////////////////////////////////////////////
 // Refactoring note: We may eventually want to replace this with boost::regex or 
 // boost::tokenizer capabilities since we've already fixed at least two JIRAs
@@ -4559,13 +4417,19 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end) const
 
 void LLTextEditor::updateAllowingLanguageInput()
 {
+	LLWindow* window = getWindow();
+	if (!window)
+	{
+		// test app, no window available
+		return;	
+	}
 	if (hasFocus() && !mReadOnly)
 	{
-		getWindow()->allowLanguageTextInput(this, TRUE);
+		window->allowLanguageTextInput(this, TRUE);
 	}
 	else
 	{
-		getWindow()->allowLanguageTextInput(this, FALSE);
+		window->allowLanguageTextInput(this, FALSE);
 	}
 }
 
@@ -4694,7 +4558,8 @@ BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect
 		current_line++;
 	}
 
-	const llwchar * const text = mWText.c_str();
+    const LLWString textString(getWText());
+	const llwchar * const text = textString.c_str();
 	const S32 line_height = llround(mGLFont->getLineHeight());
 
 	if (coord)
@@ -4772,7 +4637,7 @@ void LLTextEditor::markAsPreedit(S32 position, S32 length)
 	{
 		llwarns << "markAsPreedit invoked when hasPreeditString is true." << llendl;
 	}
-	mPreeditWString = LLWString( mWText, position, length );
+	mPreeditWString = LLWString( getWText(), position, length );
 	if (length > 0)
 	{
 		mPreeditPositions.resize(2);
@@ -4800,3 +4665,8 @@ S32 LLTextEditor::getPreeditFontSize() const
 {
 	return llround(mGLFont->getLineHeight() * LLUI::sGLScaleFactor.mV[VY]);
 }
+
+LLWString       LLTextEditor::getWText() const
+{
+    return getViewModel()->getDisplay();
+}
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 9291e1c436..efedb30f47 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -43,18 +43,79 @@
 #include "llstyle.h"
 #include "lleditmenuhandler.h"
 #include "lldarray.h"
+#include "llviewborder.h" // for params
 
 #include "llpreeditor.h"
+#include "llcontrol.h"
 
 class LLFontGL;
 class LLScrollbar;
-class LLViewBorder;
 class LLKeywordToken;
 class LLTextCmd;
 class LLUICtrlFactory;
 
 class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor
 {
+public:
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<std::string>	default_text;
+		Optional<S32>			max_text_length;
+
+		Optional<bool>			read_only,
+								allow_embedded_items,
+								hide_scrollbar,
+								word_wrap,
+								ignore_tab,
+								hide_border,
+								track_bottom,
+								takes_non_scroll_clicks;
+
+		//colors
+		Optional<LLUIColor>		cursor_color,
+								default_color,
+								text_color,
+								text_readonly_color,
+								bg_readonly_color,
+								bg_writeable_color,
+								bg_focus_color;
+
+		Optional<LLViewBorder::Params> border;
+
+		Deprecated				type,
+								length,
+								is_unicode;
+
+
+		Params()
+		:	max_text_length("max_length", 255),
+			read_only("read_only", false),
+			allow_embedded_items("embedded_items", false),
+			hide_scrollbar("hide_scrollbar", false),
+			hide_border("hide_border", false),
+			word_wrap("word_wrap", false),
+			ignore_tab("ignore_tab", true),
+			track_bottom("track_bottom", false),
+			takes_non_scroll_clicks("takes_non_scroll_clicks", true),
+			cursor_color("cursor_color"),
+			default_color("default_color"),
+			text_color("text_color"),
+			text_readonly_color("text_readonly_color"),
+			bg_readonly_color("bg_readonly_color"),
+			bg_writeable_color("bg_writeable_color"),
+			bg_focus_color("bg_focus_color"),
+			length("length"),
+			type("type"),
+			is_unicode("is_unicode")
+		{}
+			
+			
+	};
+
+	void initFromParams(const Params&);
+protected:
+	LLTextEditor(const Params&);
+	friend class LLUICtrlFactory;
 public:
 	//
 	// Constants
@@ -63,18 +124,8 @@ public:
 	static const llwchar LAST_EMBEDDED_CHAR =  0x10ffff;
 	static const S32 MAX_EMBEDDED_ITEMS = LAST_EMBEDDED_CHAR - FIRST_EMBEDDED_CHAR + 1;
 
-	LLTextEditor(const std::string& name,
-				 const LLRect& rect,
-				 S32 max_length,
-				 const std::string &default_text, 
-				 const LLFontGL* glfont = NULL,
-				 BOOL allow_embedded_items = FALSE);
-
 	virtual ~LLTextEditor();
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory);
-	void    setTextEditorParameters(LLXMLNodePtr node);
 	void	setParseHTML(BOOL parsing) {mParseHTML=parsing;}
 	void	setParseHighlights(BOOL parsing) {mParseHighlights=parsing;}
 
@@ -195,8 +246,6 @@ public:
 	void 			setReadOnlyBgColor( const LLColor4& c )		{ mReadOnlyBgColor = c; }
 	void			setTrackColor( const LLColor4& color );
 	void			setThumbColor( const LLColor4& color );
-	void			setHighlightColor( const LLColor4& color );
-	void			setShadowColor( const LLColor4& color );
 
 	// Hacky methods to make it into a word-wrapping, potentially scrolling,
 	// read-only text box.
@@ -235,9 +284,8 @@ public:
 
 	// new methods
 	void 			setValue(const LLSD& value);
-	LLSD 			getValue() const;
 
- 	const std::string&	getText() const;
+ 	std::string     getText() const;
 	
 	// Non-undoable
 	void			setText(const LLStringExplicit &utf8str);
@@ -255,9 +303,9 @@ public:
 	BOOL			isScrolledToBottom();
 
 	// Getters
-	const LLWString& getWText() const { return mWText; }
-	llwchar			getWChar(S32 pos) const { return mWText[pos]; }
-	LLWString		getWSubString(S32 pos, S32 len) const { return mWText.substr(pos, len); }
+	LLWString       getWText() const;
+	llwchar			getWChar(S32 pos) const { return getWText()[pos]; }
+	LLWString		getWSubString(S32 pos, S32 len) const { return getWText().substr(pos, len); }
 	
 	const LLTextSegment*	getCurrentSegment() const { return getSegmentAtOffset(mCursorPos); }
 	const LLTextSegment*	getPreviousSegment() const;
@@ -270,7 +318,7 @@ protected:
 	// Methods
 	//
 
-	S32				getLength() const { return mWText.length(); }
+	S32				getLength() const { return getWText().length(); }
 	void			getSegmentAndOffset( S32 startpos, S32* segidxp, S32* offsetp ) const;
 	void			drawPreeditMarker();
 
@@ -439,8 +487,10 @@ private:
 	//
 	// Methods
 	//
-	void	                pasteHelper(bool is_primary);
+	void	        pasteHelper(bool is_primary);
 
+	virtual 		LLTextViewModel* getViewModel() const;
+					
 	void			updateSegments();
 	void			pruneSegments();
 
@@ -473,13 +523,10 @@ private:
 	class LLTextCmdOverwriteChar;
 	class LLTextCmdRemove;
 
-	LLWString		mWText;
-	mutable std::string mUTF8Text;
-	mutable BOOL	mTextIsUpToDate;
-	
 	S32				mMaxTextByteLength;		// Maximum length mText is allowed to be in bytes
 
 	const LLFontGL*	mGLFont;
+	U8              mGLFontStyle; // the font style from xml
 
 	class LLViewBorder*	mBorder;
 
@@ -519,14 +566,13 @@ private:
 
 	LLFrameTimer	mKeystrokeTimer;
 
-	LLColor4		mCursorColor;
-
-	LLColor4		mFgColor;
-	LLColor4		mDefaultColor;
-	LLColor4		mReadOnlyFgColor;
-	LLColor4		mWriteableBgColor;
-	LLColor4		mReadOnlyBgColor;
-	LLColor4		mFocusBgColor;
+	LLUIColor	mCursorColor;
+	LLUIColor	mFgColor;
+	LLUIColor	mDefaultColor;
+	LLUIColor	mReadOnlyFgColor;
+	LLUIColor	mWriteableBgColor;
+	LLUIColor	mReadOnlyBgColor;
+	LLUIColor	mFocusBgColor;
 
 	BOOL			mReadOnly;
 	BOOL			mWordWrap;
diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp
index 227d24a865..707dd0afdd 100644
--- a/indra/llui/lltextparser.cpp
+++ b/indra/llui/lltextparser.cpp
@@ -1,10 +1,9 @@
 /** 
- * @file lltexteditor.cpp
- * @brief LLTextEditor base class
+ * @file lltextparser.cpp
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
  * 
- * Copyright (c) 2001-2007, Linden Research, Inc.
+ * Copyright (c) 2001-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +11,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
@@ -31,6 +31,8 @@
 
 #include "linden_common.h"
 
+#include "lltextparser.h"
+
 #include "llsd.h"
 #include "llsdserialize.h"
 #include "llerror.h"
@@ -39,22 +41,12 @@
 #include "message.h"
 #include "llmath.h"
 #include "v4color.h"
-#include "audioengine.h"
-#include "llwindow.h"
 #include "lldir.h"
 
-#include "lltextparser.h"
-//#include "lltexttospeech.h"
-
 // Routines used for parsing text for TextParsers and html
 
 LLTextParser* LLTextParser::sInstance = NULL;
 
-//
-// Constants
-//
-const F32 SOUND_GAIN = 1.0f;
-
 //
 // Member Functions
 //
@@ -75,38 +67,7 @@ LLTextParser* LLTextParser::getInstance()
 	return sInstance;
 }
 
-void LLTextParser::triggerAlerts(LLUUID agent_id, LLVector3d position, std::string text, LLWindow* viewer_window)
-{
-//    bool spoken=FALSE;
-	for (S32 i=0;i<mHighlights.size();i++)
-	{
-		if (findPattern(text,mHighlights[i]) >= 0 )
-		{
-			if(gAudiop)
-			{
-				if ((std::string)mHighlights[i]["sound_lluuid"] != LLUUID::null.asString())
-				{
-					gAudiop->triggerSound(mHighlights[i]["sound_lluuid"].asUUID(), agent_id, SOUND_GAIN, LLAudioEngine::AUDIO_TYPE_UI, position);
-				}
-/*				
-				if (!spoken) 
-				{
-					LLTextToSpeech* text_to_speech = NULL;
-					text_to_speech = LLTextToSpeech::getInstance();
-					spoken = text_to_speech->speak((LLString)mHighlights[i]["voice"],text); 
-				}
- */
-			}
-			if (mHighlights[i]["flash"])
-			{
-				if (viewer_window && viewer_window->getMinimized())
-				{
-					viewer_window->flashIcon(5.f);
-				}
-			}
-		}
-	}
-}
+// Moved triggerAlerts() to llfloaterchat.cpp to break llui/llaudio library dependency.
 
 S32 LLTextParser::findPattern(const std::string &text, LLSD highlight)
 {
diff --git a/indra/llui/lltextparser.h b/indra/llui/lltextparser.h
index 5c5c3f3301..fb1a7758b7 100644
--- a/indra/llui/lltextparser.h
+++ b/indra/llui/lltextparser.h
@@ -3,6 +3,30 @@
  * @brief GUI for user-defined highlights
  *
  * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  *
  */
@@ -10,12 +34,10 @@
 #ifndef LL_LLTEXTPARSER_H
 #define LL_LLTEXTPARSER_H
 
-#include <vector>
-#include "linden_common.h"
-
 #include "lltextparser.h"
 
-class LLSD;
+#include "llsd.h"
+
 class LLUUID;
 class LLVector3d;
 class LLColor4;
@@ -35,13 +57,13 @@ public:
 	S32  findPattern(const std::string &text, LLSD highlight);
 	LLSD parsePartialLineHighlights(const std::string &text,const LLColor4 &color,S32 part=WHOLE, S32 index=0);
 	bool parseFullLineHighlights(const std::string &text, LLColor4 *color);
-	void triggerAlerts(LLUUID agent_id, LLVector3d position, std::string text, LLWindow* viewer_window);
 
 	std::string getFileName();
 	LLSD loadFromDisk();
 	bool saveToDisk(LLSD highlights);
+
 public:
-		LLSD	mHighlights;
+	LLSD	mHighlights;
 private:
 	static LLTextParser* sInstance;
 };
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 57ce13c9c6..dfe435d2e3 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -52,8 +52,15 @@
 #include "llui.h"
 #include "llview.h"
 #include "lllineeditor.h"
+#include "llfloater.h"
+#include "llfloaterreg.h"
+#include "llmenugl.h"
 #include "llwindow.h"
 
+// for XUIParse
+#include "llquaternion.h"
+#include <boost/tokenizer.hpp>
+
 //
 // Globals
 //
@@ -65,18 +72,18 @@ BOOL gShowTextEditCursor = TRUE;
 // Language for UI construction
 std::map<std::string, std::string> gTranslation;
 std::list<std::string> gUntranslated;
+/*static*/ LLUI::settings_map_t LLUI::sSettingGroups;
+/*static*/ LLImageProviderInterface* LLUI::sImageProvider = NULL;
+/*static*/ LLUIAudioCallback LLUI::sAudioCallback = NULL;
+/*static*/ LLVector2		LLUI::sGLScaleFactor(1.f, 1.f);
+/*static*/ LLWindow*		LLUI::sWindow = NULL;
+/*static*/ LLHtmlHelp*		LLUI::sHtmlHelp = NULL;
+/*static*/ LLView*			LLUI::sRootView = NULL;
+/*static*/ BOOL            LLUI::sShowXUINames = FALSE;
+/*static*/ std::stack<LLRect> LLScreenClipRect::sClipRectStack;
+
+/*static*/ std::vector<std::string> LLUI::sXUIPaths;
 
-LLControlGroup* LLUI::sConfigGroup = NULL;
-LLControlGroup* LLUI::sIgnoresGroup = NULL;
-LLControlGroup* LLUI::sColorsGroup = NULL;
-LLImageProviderInterface* LLUI::sImageProvider = NULL;
-LLUIAudioCallback LLUI::sAudioCallback = NULL;
-LLVector2		LLUI::sGLScaleFactor(1.f, 1.f);
-LLWindow*		LLUI::sWindow = NULL;
-LLHtmlHelp*		LLUI::sHtmlHelp = NULL;
-BOOL            LLUI::sShowXUINames = FALSE;
-std::stack<LLRect> LLScreenClipRect::sClipRectStack;
-BOOL            LLUI::sQAMode = FALSE;
 
 //
 // Functions
@@ -84,18 +91,18 @@ BOOL            LLUI::sQAMode = FALSE;
 void make_ui_sound(const char* namep)
 {
 	std::string name = ll_safe_string(namep);
-	if (!LLUI::sConfigGroup->controlExists(name))
+	if (!LLUI::sSettingGroups["config"]->controlExists(name))
 	{
 		llwarns << "tried to make ui sound for unknown sound name: " << name << llendl;	
 	}
 	else
 	{
-		LLUUID uuid(LLUI::sConfigGroup->getString(name));		
+		LLUUID uuid(LLUI::sSettingGroups["config"]->getString(name));
 		if (uuid.isNull())
 		{
-			if (LLUI::sConfigGroup->getString(name) == LLUUID::null.asString())
+			if (LLUI::sSettingGroups["config"]->getString(name) == LLUUID::null.asString())
 			{
-				if (LLUI::sConfigGroup->getBOOL("UISndDebugSpamToggle"))
+				if (LLUI::sSettingGroups["config"]->getBOOL("UISndDebugSpamToggle"))
 				{
 					llinfos << "ui sound name: " << name << " triggered but silent (null uuid)" << llendl;	
 				}				
@@ -108,7 +115,7 @@ void make_ui_sound(const char* namep)
 		}
 		else if (LLUI::sAudioCallback != NULL)
 		{
-			if (LLUI::sConfigGroup->getBOOL("UISndDebugSpamToggle"))
+			if (LLUI::sSettingGroups["config"]->getBOOL("UISndDebugSpamToggle"))
 			{
 				llinfos << "ui sound name: " << name << llendl;	
 			}
@@ -1554,21 +1561,18 @@ bool handleShowXUINamesChanged(const LLSD& newvalue)
 	return true;
 }
 
-void LLUI::initClass(LLControlGroup* config, 
-					 LLControlGroup* ignores, 
-					 LLControlGroup* colors, 
+void LLUI::initClass(const settings_map_t& settings,
 					 LLImageProviderInterface* image_provider,
 					 LLUIAudioCallback audio_callback,
 					 const LLVector2* scale_factor,
 					 const std::string& language)
 {
-	sConfigGroup = config;
-	sIgnoresGroup = ignores;
-	sColorsGroup = colors;
+	sSettingGroups = settings;
 
-	if (sConfigGroup == NULL
-		|| sIgnoresGroup == NULL
-		|| sColorsGroup == NULL)
+	if ((get_ptr_in_map(sSettingGroups, std::string("config")) == NULL) ||
+		(get_ptr_in_map(sSettingGroups, std::string("color")) == NULL) ||
+		(get_ptr_in_map(sSettingGroups, std::string("floater")) == NULL) ||
+		(get_ptr_in_map(sSettingGroups, std::string("ignores")) == NULL))
 	{
 		llerrs << "Failure to initialize configuration groups" << llendl;
 	}
@@ -1577,16 +1581,31 @@ void LLUI::initClass(LLControlGroup* config,
 	sAudioCallback = audio_callback;
 	sGLScaleFactor = (scale_factor == NULL) ? LLVector2(1.f, 1.f) : *scale_factor;
 	sWindow = NULL; // set later in startup
-	LLFontGL::sShadowColor = colors->getColor("ColorDropShadow");
+	LLFontGL::sShadowColor = LLUI::sSettingGroups["color"]->getColor("ColorDropShadow");
 
-	LLUI::sShowXUINames = LLUI::sConfigGroup->getBOOL("ShowXUINames");
-	LLUI::sConfigGroup->getControl("ShowXUINames")->getSignal()->connect(&handleShowXUINamesChanged);
+	static LLUICachedControl<bool> show_xui_names ("ShowXUINames", false);
+	LLUI::sShowXUINames = show_xui_names;
+	LLUI::sSettingGroups["config"]->getControl("ShowXUINames")->getSignal()->connect(boost::bind(&handleShowXUINamesChanged, _2));
+	
+	// Callbacks for associating controls with floater visibilty:
+	LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.Toggle", boost::bind(&LLFloaterReg::toggleFloaterInstance, _2));
+	LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.Show", boost::bind(&LLFloaterReg::showFloaterInstance, _2));
+	LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.Hide", boost::bind(&LLFloaterReg::hideFloaterInstance, _2));
+	LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.InitToVisibilityControl", boost::bind(&LLFloaterReg::initUICtrlToFloaterVisibilityControl, _1, _2));
+	
+	// Button initialization callback for toggle buttons
+	LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.SetFloaterToggle", boost::bind(&LLButton::setFloaterToggle, _1, _2));
+	
+	// Currently unused, but kept for reference:
+	LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.ToggleFloater", boost::bind(&LLButton::toggleFloaterAndSetToggleState, _1, _2));
+	
+	// Used by menus along with Floater.Toggle to display visibility as a checkmark
+	LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", boost::bind(&LLFloaterReg::floaterInstanceVisible, _2));
 }
 
 void LLUI::cleanupClass()
 {
 	sImageProvider->cleanUp();
-	LLLineEditor::cleanupLineEditor();
 }
 
 
@@ -1679,16 +1698,16 @@ void LLUI::getCursorPositionLocal(const LLView* viewp, S32 *x, S32 *y)
 std::string LLUI::getLanguage()
 {
 	std::string language = "en-us";
-	if (sConfigGroup)
+	if (sSettingGroups["config"])
 	{
-		language = sConfigGroup->getString("Language");
+		language = sSettingGroups["config"]->getString("Language");
 		if (language.empty() || language == "default")
 		{
-			language = sConfigGroup->getString("InstallLanguage");
+			language = sSettingGroups["config"]->getString("InstallLanguage");
 		}
 		if (language.empty() || language == "default")
 		{
-			language = sConfigGroup->getString("SystemLanguage");
+			language = sSettingGroups["config"]->getString("SystemLanguage");
 		}
 		if (language.empty() || language == "default")
 		{
@@ -1698,6 +1717,40 @@ std::string LLUI::getLanguage()
 	return language;
 }
 
+//static
+void LLUI::setupPaths()
+{
+	std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "paths.xml");
+
+	LLXMLNodePtr root;
+	BOOL success  = LLXMLNode::parseFile(filename, root, NULL);
+	sXUIPaths.clear();
+	
+	if (success)
+	{
+		LLStringUtil::format_map_t path_args;
+		path_args["[LANGUAGE]"] = LLUI::getLanguage();
+		
+		for (LLXMLNodePtr path = root->getFirstChild(); path.notNull(); path = path->getNextSibling())
+		{
+			std::string path_val_ui(path->getValue());
+			LLStringUtil::format(path_val_ui, path_args);
+			if (std::find(sXUIPaths.begin(), sXUIPaths.end(), path_val_ui) == sXUIPaths.end())
+			{
+				sXUIPaths.push_back(path_val_ui);
+			}
+		}
+	}
+	else // parsing failed
+	{
+		std::string slash = gDirUtilp->getDirDelimiter();
+		std::string dir = "xui" + slash + "en-us";
+		llwarns << "XUI::config file unable to open: " << filename << llendl;
+		sXUIPaths.push_back(dir);
+	}
+}
+
+
 //static
 std::string LLUI::locateSkin(const std::string& filename)
 {
@@ -1707,7 +1760,7 @@ std::string LLUI::locateSkin(const std::string& filename)
 	{
 		found_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); // Should be CUSTOM_SKINS?
 	}
-	if (sConfigGroup && sConfigGroup->controlExists("Language"))
+	if (sSettingGroups["config"] && sSettingGroups["config"]->controlExists("Language"))
 	{
 		if (!gDirUtilp->fileExists(found_file))
 		{
@@ -1765,10 +1818,23 @@ void LLUI::glRectToScreen(const LLRect& gl, LLRect *screen)
 	glPointToScreen(gl.mRight, gl.mBottom, &screen->mRight, &screen->mBottom);
 }
 
+//static
+LLPointer<LLUIImage> LLUI::getUIImageByID(const LLUUID& image_id)
+{
+	if (sImageProvider)
+	{
+		return sImageProvider->getUIImageByID(image_id);
+	}
+	else
+	{
+		return NULL;
+	}
+}
+
 //static 
-LLUIImage* LLUI::getUIImage(const std::string& name)
+LLPointer<LLUIImage> LLUI::getUIImage(const std::string& name)
 {
-	if (!name.empty())
+	if (!name.empty() && sImageProvider)
 		return sImageProvider->getUIImage(name);
 	else
 		return NULL;
@@ -1780,10 +1846,23 @@ void LLUI::setHtmlHelp(LLHtmlHelp* html_help)
 	LLUI::sHtmlHelp = html_help;
 }
 
-//static 
-void LLUI::setQAMode(BOOL b)
+// static
+boost::function<const LLColor4&()> LLUI::getCachedColorFunctor(const std::string& color_name)
+{
+	return LLCachedControl<LLColor4>(*sSettingGroups["color"], color_name, LLColor4::magenta);
+}
+
+// static
+LLControlGroup& LLUI::getControlControlGroup (const std::string& controlname)
 {
-	LLUI::sQAMode = b;
+	for (settings_map_t::iterator itor = sSettingGroups.begin();
+		 itor != sSettingGroups.end(); ++itor)
+	{
+		if (sSettingGroups[(itor->first)]->controlExists(controlname))
+			return *sSettingGroups[(itor->first)];
+	}
+
+	return *sSettingGroups["config"]; // default group
 }
 
 LLScreenClipRect::LLScreenClipRect(const LLRect& rect, BOOL enabled) : mScissorState(GL_SCISSOR_TEST), mEnabled(enabled)
@@ -1849,102 +1928,163 @@ LLLocalClipRect::LLLocalClipRect(const LLRect &rect, BOOL enabled)
 {
 }
 
-
-//
-// LLUIImage
-//
-
-LLUIImage::LLUIImage(const std::string& name, LLPointer<LLImageGL> image) :
-						mName(name),
-						mImage(image),
-						mScaleRegion(0.f, 1.f, 1.f, 0.f),
-						mClipRegion(0.f, 1.f, 1.f, 0.f),
-						mUniformScaling(TRUE),
-						mNoClip(TRUE)
+namespace LLInitParam
 {
-}
+	TypedParam<LLUIColor >::TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLUIColor& value, ParamDescriptor::validation_func_t func)
+	:	super_t(descriptor, name, value, func),
+		red("red"),
+		green("green"),
+		blue("blue"),
+		alpha("alpha"),
+		control("")
+	{}
 
-void LLUIImage::setClipRegion(const LLRectf& region) 
-{ 
-	mClipRegion = region; 
-	mNoClip = mClipRegion.mLeft == 0.f
-				&& mClipRegion.mRight == 1.f
-				&& mClipRegion.mBottom == 0.f
-				&& mClipRegion.mTop == 1.f;
-}
+	LLUIColor TypedParam<LLUIColor>::getValueFromBlock() const
+	{
+		if (control.isProvided())
+		{
+			return LLUI::getCachedColorFunctor(control);
+		}
+		else
+		{
+			return LLColor4(red, green, blue, alpha);
+		}
+	}
 
-void LLUIImage::setScaleRegion(const LLRectf& region) 
-{ 
-	mScaleRegion = region; 
-	mUniformScaling = mScaleRegion.mLeft == 0.f
-					&& mScaleRegion.mRight == 1.f
-					&& mScaleRegion.mBottom == 0.f
-					&& mScaleRegion.mTop == 1.f;
-}
+	void TypeValues<LLUIColor>::declareValues()
+	{
+		declare("white", LLColor4::white);
+		declare("black", LLColor4::black);
+		declare("red", LLColor4::red);
+		declare("green", LLColor4::green);
+		declare("blue", LLColor4::blue);
+	}
 
-//TODO: move drawing implementation inside class
-void LLUIImage::draw(S32 x, S32 y, const LLColor4& color) const
-{
-	gl_draw_image(x, y, mImage, color, mClipRegion);
-}
+	TypedParam<const LLFontGL*>::TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLFontGL*const value, ParamDescriptor::validation_func_t func)
+	:	super_t(descriptor, name, value, func),
+		name("", std::string("")),
+		size("size", std::string("")),
+		style("style", std::string(""))
+	{}
 
-void LLUIImage::draw(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) const
-{
-	if (mUniformScaling)
+	const LLFontGL* TypedParam<const LLFontGL*>::getValueFromBlock() const
 	{
-		gl_draw_scaled_image(x, y, width, height, mImage, color, mClipRegion);
+		if (name.isProvided())
+		{
+			const LLFontGL* res_fontp = LLFontGL::getFontByName(name);
+			if (res_fontp)
+			{
+				return res_fontp;
+			}
+
+			U8 fontstyle = 0;
+			fontstyle = LLFontGL::getStyleFromString(style());
+			LLFontDescriptor desc(name(), size(), fontstyle);
+			const LLFontGL* fontp = LLFontGL::getFont(desc);
+			if (fontp)
+			{
+				return fontp;
+			}
+		}
+
+		// default to current value
+		return mData.mValue;
 	}
-	else
+
+	TypedParam<LLRect>::TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLRect& value, ParamDescriptor::validation_func_t func)
+	:	super_t(descriptor, name, value, func),
+		left("left"),
+		top("top"),
+		right("right"),
+		bottom("bottom"),
+		width("width"),
+		height("height")
+	{}
+
+	LLRect TypedParam<LLRect>::getValueFromBlock() const
 	{
-		gl_draw_scaled_image_with_border(
-			x, y, 
-			width, height, 
-			mImage, 
-			color,
-			FALSE,
-			mClipRegion,
-			mScaleRegion);
-	}
-}
+		LLRect rect;
 
-void LLUIImage::drawSolid(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) const
-{
-	gl_draw_scaled_image_with_border(
-		x, y, 
-		width, height, 
-		mImage, 
-		color, 
-		TRUE,
-		mClipRegion,
-		mScaleRegion);
-}
+		//calculate from params
+		// prefer explicit left and right
+		if (left.isProvided() && right.isProvided())
+		{
+			rect.mLeft = left;
+			rect.mRight = right;
+		}
+		// otherwise use width along with specified side, if any
+		else if (width.isProvided())
+		{
+			// only right + width provided
+			if (right.isProvided())
+			{
+				rect.mRight = right;
+				rect.mLeft = right - width;
+			}
+			else // left + width, or just width
+			{
+				rect.mLeft = left;
+				rect.mRight = left + width;
+			}
+		}
+		// just left, just right, or none
+		else
+		{
+			rect.mLeft = left;
+			rect.mRight = right;
+		}
 
-void LLUIImage::drawBorder(S32 x, S32 y, S32 width, S32 height, const LLColor4& color, S32 border_width) const
-{
-	LLRect border_rect;
-	border_rect.setOriginAndSize(x, y, width, height);
-	border_rect.stretch(border_width, border_width);
-	drawSolid(border_rect, color);
-}
+		// prefer explicit bottom and top
+		if (bottom.isProvided() && top.isProvided())
+		{
+			rect.mBottom = bottom;
+			rect.mTop = top;
+		}
+		// otherwise height along with specified side, if any
+		else if (height.isProvided())
+		{
+			// top + height provided
+			if (top.isProvided())
+			{
+				rect.mTop = top;
+				rect.mBottom = top - height;
+			}
+			// bottom + height or just height
+			else
+			{
+				rect.mBottom = bottom;
+				rect.mTop = bottom + height;
+			}
+		}
+		// just bottom, just top, or none
+		else
+		{
+			rect.mBottom = bottom;
+			rect.mTop = top;
+		}
+		return rect;
+	}
 
-S32 LLUIImage::getWidth() const
-{ 
-	// return clipped dimensions of actual image area
-	return llround((F32)mImage->getWidth(0) * mClipRegion.getWidth()); 
-}
+	void TypeValues<LLFontGL::HAlign>::declareValues()
+	{
+		declare("left", LLFontGL::LEFT);
+		declare("right", LLFontGL::RIGHT);
+		declare("center", LLFontGL::HCENTER);
+	}
 
-S32 LLUIImage::getHeight() const
-{ 
-	// return clipped dimensions of actual image area
-	return llround((F32)mImage->getHeight(0) * mClipRegion.getHeight()); 
-}
+	void TypeValues<LLFontGL::VAlign>::declareValues()
+	{
+		declare("top", LLFontGL::TOP);
+		declare("center", LLFontGL::VCENTER);
+		declare("baseline", LLFontGL::BASELINE);
+		declare("bottom", LLFontGL::BOTTOM);
+	}
 
-S32 LLUIImage::getTextureWidth() const
-{
-	return mImage->getWidth(0);
+	void TypeValues<LLFontGL::ShadowType>::declareValues()
+	{
+		declare("none", LLFontGL::NO_SHADOW);
+		declare("hard", LLFontGL::DROP_SHADOW);
+		declare("soft", LLFontGL::DROP_SHADOW_SOFT);
+	}
 }
 
-S32 LLUIImage::getTextureHeight() const
-{
-	return mImage->getHeight(0);
-}
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index ebcc7304b1..b5a42bce13 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -35,28 +35,34 @@
 #ifndef LL_LLUI_H
 #define LL_LLUI_H
 
+#include "llpointer.h"		// LLPointer<>
 #include "llrect.h"
 #include "llcontrol.h"
-#include "llrect.h"
 #include "llcoord.h"
 //#include "llhtmlhelp.h"
 #include "llgl.h"			// *TODO: break this dependency
 #include <stack>
-//#include "llimagegl.h"
+#include "lluiimage.h"		// *TODO: break this dependency, need to add #include "lluiimage.h" to all widgets that hold an Optional<LLUIImage*> in their paramblocks
+#include "llinitparam.h"
+#include "llregistry.h"
 #include <boost/signal.hpp>
+#include "lllazyvalue.h"
 
 // LLUIFactory
 #include "llsd.h"
 
+// for initparam specialization
+#include "llfontgl.h"
+
 class LLColor4; 
 class LLHtmlHelp;
 class LLImageGL;
 class LLVector3;
 class LLVector2;
+class LLUIImage;
 class LLUUID;
 class LLWindow;
 class LLView;
-class LLUIImage;
 
 // UI colors
 extern const LLColor4 UI_VERTEX_COLOR;
@@ -157,9 +163,8 @@ public:
 	//
 	// Methods
 	//
-	static void initClass(LLControlGroup* config, 
-						  LLControlGroup* ignores,
-						  LLControlGroup* colors, 
+	typedef std::map<std::string, LLControlGroup*> settings_map_t;
+	static void initClass(const settings_map_t& settings,
 						  LLImageProviderInterface* image_provider,
 						  LLUIAudioCallback audio_callback = NULL,
 						  const LLVector2 *scale_factor = NULL,
@@ -174,41 +179,45 @@ public:
 	// Return the ISO639 language name ("en", "ko", etc.) for the viewer UI.
 	// http://www.loc.gov/standards/iso639-2/php/code_list.php
 	static std::string getLanguage();
-
+	
+	static void setupPaths();
+	static const std::vector<std::string>& getXUIPaths() { return sXUIPaths; }
+	static std::string getSkinPath() { return sXUIPaths.front(); }
+	
 	//helper functions (should probably move free standing rendering helper functions here)
+	static LLView* getRootView() { return sRootView; }
+	static void setRootView(LLView* view) { sRootView = view; }
 	static std::string locateSkin(const std::string& filename);
 	static void setCursorPositionScreen(S32 x, S32 y);
 	static void setCursorPositionLocal(const LLView* viewp, S32 x, S32 y);
 	static void getCursorPositionLocal(const LLView* viewp, S32 *x, S32 *y);
 	static void setScaleFactor(const LLVector2& scale_factor);
 	static void setLineWidth(F32 width);
-	static LLUIImage* getUIImage(const std::string& name);
+	static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id);
+	static LLPointer<LLUIImage> getUIImage(const std::string& name);
 	static LLVector2 getWindowSize();
 	static void screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y);
 	static void glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y);
 	static void screenRectToGL(const LLRect& screen, LLRect *gl);
 	static void glRectToScreen(const LLRect& gl, LLRect *screen);
 	static void setHtmlHelp(LLHtmlHelp* html_help);
-
+	static boost::function<const LLColor4&()> getCachedColorFunctor(const std::string& color_name);
+	// Returns the control group containing the control name, or the default group
+	static LLControlGroup& getControlControlGroup (const std::string& controlname);
+	
 	//
 	// Data
 	//
-	static LLControlGroup* sConfigGroup;
-	static LLControlGroup* sIgnoresGroup;
-	static LLControlGroup* sColorsGroup;
-	static LLImageProviderInterface* sImageProvider;
+	static settings_map_t sSettingGroups;
 	static LLUIAudioCallback sAudioCallback;
 	static LLVector2		sGLScaleFactor;
 	static LLWindow*		sWindow;
 	static BOOL             sShowXUINames;
 	static LLHtmlHelp*		sHtmlHelp;
-
-	// *TODO: remove the following when QAR-369 settings clean-up work is in.
-	// Also remove the call to this method which will then be obsolete.
-	// Search for QAR-369 below to enable the proper accessing of this feature. -MG
-	static void setQAMode(BOOL b);
-	static BOOL sQAMode;
-
+	static LLView*			sRootView;
+private:
+	static LLImageProviderInterface* sImageProvider;
+	static std::vector<std::string> sXUIPaths;
 };
 
 //	FactoryPolicy is a static class that controls the creation and lookup of UI elements, 
@@ -365,7 +374,6 @@ protected:
 
 	// T must derive from LLUISingleton<T>
 	LLUISingleton() { sInstance = static_cast<T*>(this); }
-
 	~LLUISingleton() { sInstance = NULL; }
 
 public:
@@ -383,6 +391,12 @@ public:
 		return sInstance;
 	}
 
+	static void destroyInstance()
+	{
+		delete sInstance;
+		sInstance = NULL;
+	}
+	
 private:
 	static T*	sInstance;
 };
@@ -413,49 +427,6 @@ public:
 	LLLocalClipRect(const LLRect& rect, BOOL enabled = TRUE);
 };
 
-class LLUIImage : public LLRefCount
-{
-public:
-	LLUIImage(const std::string& name, LLPointer<LLImageGL> image);
-
-	void setClipRegion(const LLRectf& region);
-	void setScaleRegion(const LLRectf& region);
-
-	LLPointer<LLImageGL> getImage() { return mImage; }
-	const LLPointer<LLImageGL>& getImage() const { return mImage; }
-
-	void draw(S32 x, S32 y, S32 width, S32 height, const LLColor4& color = UI_VERTEX_COLOR) const;
-	void draw(S32 x, S32 y, const LLColor4& color = UI_VERTEX_COLOR) const;
-	void draw(const LLRect& rect, const LLColor4& color = UI_VERTEX_COLOR) const { draw(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color); }
-	
-	void drawSolid(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) const;
-	void drawSolid(const LLRect& rect, const LLColor4& color) const { drawSolid(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color); }
-	void drawSolid(S32 x, S32 y, const LLColor4& color) const { drawSolid(x, y, mImage->getWidth(0), mImage->getHeight(0), color); }
-
-	void drawBorder(S32 x, S32 y, S32 width, S32 height, const LLColor4& color, S32 border_width) const;
-	void drawBorder(const LLRect& rect, const LLColor4& color, S32 border_width) const { drawBorder(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color, border_width); }
-	void drawBorder(S32 x, S32 y, const LLColor4& color, S32 border_width) const { drawBorder(x, y, mImage->getWidth(0), mImage->getHeight(0), color, border_width); }
-	
-	const std::string& getName() const { return mName; }
-
-	S32 getWidth() const;
-	S32 getHeight() const;
-
-	// returns dimensions of underlying textures, which might not be equal to ui image portion
-	S32 getTextureWidth() const;
-	S32 getTextureHeight() const;
-
-protected:
-	std::string			mName;
-	LLRectf				mScaleRegion;
-	LLRectf				mClipRegion;
-	LLPointer<LLImageGL> mImage;
-	BOOL				mUniformScaling;
-	BOOL				mNoClip;
-};
-
-typedef LLPointer<LLUIImage> LLUIImagePtr;
-
 template <typename T>
 class LLTombStone : public LLRefCount
 {
@@ -593,71 +564,15 @@ private:
 //RN: maybe this needs to moved elsewhere?
 class LLImageProviderInterface
 {
-public:
+protected:
 	LLImageProviderInterface() {};
 	virtual ~LLImageProviderInterface() {};
-
-	virtual LLUIImagePtr getUIImage(const std::string& name) = 0;
-	virtual LLUIImagePtr getUIImageByID(const LLUUID& id) = 0;
-	virtual void cleanUp() = 0;
-};
-
-// This mix-in class adds support for tracking all instances of the specificed class parameter T
-// The (optional) key associates a value of type KEY with a given instance of T, for quick lookup
-// If KEY is not provided, then instances are stored in a simple list
-template<typename T, typename KEY = T*>
-class LLInstanceTracker : boost::noncopyable
-{
 public:
-	typedef typename std::map<KEY, T*>::iterator instance_iter;
-	typedef typename std::map<KEY, T*>::const_iterator instance_const_iter;
-
-	static T* getInstance(KEY k) { instance_iter found = sInstances.find(k); return (found == sInstances.end()) ? NULL : found->second; }
-
-	static instance_iter beginInstances() { return sInstances.begin(); }
-	static instance_iter endInstances() { return sInstances.end(); }
-	static S32 instanceCount() { return sInstances.size(); }
-protected:
-	LLInstanceTracker(KEY key) { add(key); }
-	virtual ~LLInstanceTracker() { remove(); }
-	virtual void setKey(KEY key) { remove(); add(key); }
-	virtual const KEY& getKey() const { return mKey; }
-
-private:
-	void add(KEY key) 
-	{ 
-		mKey = key; 
-		sInstances[key] = static_cast<T*>(this); 
-	}
-	void remove() { sInstances.erase(mKey); }
-
-private:
-
-	KEY mKey;
-	static std::map<KEY, T*> sInstances;
-};
-
-template<typename T>
-class LLInstanceTracker<T, T*> : boost::noncopyable
-{
-public:
-	typedef typename std::set<T*>::iterator instance_iter;
-	typedef typename std::set<T*>::const_iterator instance_const_iter;
-
-	static instance_iter instancesBegin() { return sInstances.begin(); }
-	static instance_iter instancesEnd() { return sInstances.end(); }
-	static S32 instanceCount() { return sInstances.size(); }
-
-protected:
-	LLInstanceTracker() { sInstances.insert(static_cast<T*>(this)); }
-	virtual ~LLInstanceTracker() { sInstances.erase(static_cast<T*>(this)); }
-
-	static std::set<T*> sInstances;
+	virtual LLPointer<LLUIImage> getUIImage(const std::string& name) = 0;
+	virtual LLPointer<LLUIImage> getUIImageByID(const LLUUID& id) = 0;
+	virtual void cleanUp() = 0;
 };
 
-template <typename T, typename KEY> std::map<KEY, T*> LLInstanceTracker<T, KEY>::sInstances;
-template <typename T> std::set<T*> LLInstanceTracker<T, T*>::sInstances;
-
 class LLCallbackRegistry
 {
 public:
@@ -746,93 +661,116 @@ private:
 template <typename T> LLRegisterWith<LLInitClassList> LLInitClass<T>::sRegister(&T::initClass);
 template <typename T> LLRegisterWith<LLDestroyClassList> LLDestroyClass<T>::sRegister(&T::destroyClass);
 
+// useful parameter blocks
+struct TimeIntervalParam : public LLInitParam::Choice<TimeIntervalParam>
+{
+	Option<F32>		seconds;
+	Option<S32>		frames;
+	TimeIntervalParam()
+	:	seconds("seconds"),
+		frames("frames")
+	{}
+};
 
-template <typename DERIVED>
-class LLParamBlock
+template <class T>
+class LLUICachedControl : public LLCachedControl<T>
 {
-protected:
-	LLParamBlock() { sBlock = (DERIVED*)this; }
+public:
+	// This constructor will declare a control if it doesn't exist in the contol group
+	LLUICachedControl(const std::string& name,
+					  const T& default_value,
+					  const std::string& comment = "Declared In Code")
+	:	LLCachedControl<T>(LLUI::getControlControlGroup(name), name, default_value, comment)
+	{}
+
+	// This constructor will signal an error if the control doesn't exist in the control group
+	LLUICachedControl(const std::string& name)
+	:	LLCachedControl<T>(LLUI::getControlControlGroup(name), name)
+	{}
+};
 
-	typedef typename boost::add_const<DERIVED>::type Tconst;
+typedef LLLazyValue<LLColor4> LLUIColor;
 
-	template <typename T>
-	class LLMandatoryParam
+namespace LLInitParam
+{
+	template<>
+	class TypedParam<LLRect> 
+	:	public BlockValue<LLRect>
 	{
+        typedef BlockValue<LLRect> super_t;
 	public:
-		typedef typename boost::add_const<T>::type T_const;
+		Optional<S32>	left,
+						top,
+						right,
+						bottom,
+						width,
+						height;
 
-		LLMandatoryParam(T_const initial_val) : mVal(initial_val), mBlock(sBlock) {}
-		LLMandatoryParam(const LLMandatoryParam<T>& other) : mVal(other.mVal) {}
+		TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLRect& value, ParamDescriptor::validation_func_t func);
 
-		DERIVED& operator ()(T_const set_value) { mVal = set_value; return *mBlock; }
-		operator T() const { return mVal; } 
-		T operator=(T_const set_value) { mVal = set_value; return mVal; }
+		LLRect getValueFromBlock() const;
+	};
 
-	private: 
-		T	mVal;
-		DERIVED* mBlock;
+	template<>
+	struct TypeValues<LLUIColor> : public TypeValuesHelper<LLUIColor>
+	{
+		static void declareValues();
 	};
 
-	template <typename T>
-	class LLOptionalParam
+	template<>
+	class TypedParam<LLUIColor> 
+	:	public BlockValue<LLUIColor>
 	{
+        typedef BlockValue<LLUIColor> super_t;
 	public:
-		typedef typename boost::add_const<T>::type T_const;
-
-		LLOptionalParam(T_const initial_val) : mVal(initial_val), mBlock(sBlock) {}
-		LLOptionalParam() : mBlock(sBlock) {}
-		LLOptionalParam(const LLOptionalParam<T>& other) : mVal(other.mVal) {}
-
-		DERIVED& operator ()(T_const set_value) { mVal = set_value; return *mBlock; }
-		operator T() const { return mVal; } 
-		T operator=(T_const set_value) { mVal = set_value; return mVal; }
-
-	private:
-		T	mVal;
-		DERIVED* mBlock;
+		Optional<F32> red;
+		Optional<F32> green;
+		Optional<F32> blue;
+		Optional<F32> alpha;
+		Optional<std::string> control;
+
+		TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLUIColor& value, ParamDescriptor::validation_func_t func);
+		LLUIColor getValueFromBlock() const;
 	};
 
-	// specialization that requires initialization for reference types 
-	template <typename T>
-	class LLOptionalParam <T&>
+	template<>
+	class TypedParam<const LLFontGL*> 
+	:	public BlockValue<const LLFontGL*>
 	{
+        typedef BlockValue<const LLFontGL*> super_t;
 	public:
-		typedef typename boost::add_const<T&>::type T_const;
+		Optional<std::string> name;
+		Optional<std::string> size;
+		Optional<std::string> style;
 
-		LLOptionalParam(T_const initial_val) : mVal(initial_val), mBlock(sBlock) {}
-		LLOptionalParam(const LLOptionalParam<T&>& other) : mVal(other.mVal) {}
-
-		DERIVED& operator ()(T_const set_value) { mVal = set_value; return *mBlock; }
-		operator T&() const { return mVal; } 
-		T& operator=(T_const set_value) { mVal = set_value; return mVal; }
+		TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLFontGL* const value, ParamDescriptor::validation_func_t func);
+		const LLFontGL* getValueFromBlock() const;
+	};
 
-	private:
-		T&	mVal;
-		DERIVED* mBlock;
+	template<>
+	struct TypeValues<LLFontGL::HAlign> : public TypeValuesHelper<LLFontGL::HAlign>
+	{
+		static void declareValues();
 	};
 
-	// specialization that initializes pointer params to NULL
-	template<typename T> 
-	class LLOptionalParam<T*>
+	template<>
+	struct TypeValues<LLFontGL::VAlign> : public TypeValuesHelper<LLFontGL::VAlign>
 	{
-	public:
-		typedef typename boost::add_const<T*>::type T_const;
-
-		LLOptionalParam(T_const initial_val) : mVal(initial_val), mBlock(sBlock) {}
-		LLOptionalParam() : mVal((T*)NULL), mBlock(sBlock)  {}
-		LLOptionalParam(const LLOptionalParam<T*>& other) : mVal(other.mVal) {}
-
-		DERIVED& operator ()(T_const set_value) { mVal = set_value; return *mBlock; }
-		operator T*() const { return mVal; } 
-		T* operator=(T_const set_value) { mVal = set_value; return mVal; }
-	private:
-		T*	mVal;
-		DERIVED* mBlock;
+		static void declareValues();
 	};
 
-	static DERIVED* sBlock;
-};
+	template<>
+	struct TypeValues<LLFontGL::ShadowType> : public TypeValuesHelper<LLFontGL::ShadowType>
+	{
+		static void declareValues();
+	};
+}
 
-template <typename T> T* LLParamBlock<T>::sBlock = NULL;
+namespace LLInitParam
+{
+    template<>
+	bool ParamCompare<LLLazyValue<LLColor4> >::equals(
+		const LLLazyValue<LLColor4> &a, const LLLazyValue<LLColor4> &b); 
+}
 
 #endif
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 9d97312ab0..da0db0424a 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -36,13 +36,30 @@
 #include "lluictrl.h"
 #include "llfocusmgr.h"
 #include "llpanel.h"
+#include "lluictrlfactory.h"
 
 static LLRegisterWidget<LLUICtrl> r("ui_ctrl");
 
+LLUICtrl::Params::Params()
+:	tab_stop("tab_stop", true),
+	label("label"),
+	initial_value("initial_value"),
+	init_callback("init_callback"),
+	commit_callback("commit_callback"),
+	validate_callback("validate_callback"),
+	control_name("control_name"),
+	enabled_control("enabled_control")
+{
+	addSynonym(initial_value, "initial_val");
+	// this is the canonical name for text contents of an xml node
+	addSynonym(initial_value, "value");
+}
+
 LLFocusableElement::LLFocusableElement()
 :	mFocusLostCallback(NULL),
 	mFocusReceivedCallback(NULL),
 	mFocusChangedCallback(NULL),
+	mTopLostCallback(NULL),
 	mFocusCallbackUserData(NULL)
 {
 }
@@ -77,6 +94,14 @@ void LLFocusableElement::onFocusLost()
 	}
 }
 
+void LLFocusableElement::onTopLost()
+{
+	if (mTopLostCallback)
+	{
+		mTopLostCallback(this, mFocusCallbackUserData);
+	}
+}
+
 BOOL LLFocusableElement::hasFocus() const
 {
 	return FALSE;
@@ -86,36 +111,61 @@ void LLFocusableElement::setFocus(BOOL b)
 {
 }
 
-
-
-LLUICtrl::LLUICtrl() :
-	mCommitCallback(NULL),
-	mLostTopCallback(NULL),
-	mValidateCallback(NULL),
-	mCallbackUserData(NULL),
+LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel) 
+:	LLView(p),
 	mTentative(FALSE),
-	mTabStop(TRUE),
-	mIsChrome(FALSE)
+	mIsChrome(FALSE),
+    mViewModel(viewmodel),
+	mControlVariable(NULL),
+	mEnabledControlVariable(NULL)
 {
+	mUICtrlHandle.bind(this);
 }
 
-LLUICtrl::LLUICtrl(const std::string& name, const LLRect& rect, BOOL mouse_opaque,
-	void (*on_commit_callback)(LLUICtrl*, void*),
-	void* callback_userdata,
-	U32 reshape)
-:	// can't make this automatically follow top and left, breaks lots
-	// of buttons in the UI. JC 7/20/2002
-	LLView( name, rect, mouse_opaque, reshape ),
-	mCommitCallback( on_commit_callback) ,
-	mLostTopCallback( NULL ),
-	mValidateCallback( NULL ),
-	mCallbackUserData( callback_userdata ),
-	mTentative( FALSE ),
-	mTabStop( TRUE ),
-	mIsChrome(FALSE)
+void LLUICtrl::initFromParams(const Params& p)
 {
+	LLView::initFromParams(p);
+
+	setControlName(p.control_name);
+	if (p.enabled_control.isProvided())
+	{
+		LLControlVariable* control = findControl(p.enabled_control);
+		if (control)
+			setEnabledControlVariable(control);
+	}
+	setTabStop(p.tab_stop);
+	setFocusLostCallback(p.focus_lost_callback());
+
+	if (p.initial_value.isProvided() 
+		&& !p.control_name.isProvided())
+	{
+        setValue(p.initial_value);
+	}
+	
+	if (p.commit_callback.isProvided())
+		initCommitCallback(p.commit_callback, mCommitSignal);
+	
+	if (p.validate_callback.isProvided())
+		initEnableCallback(p.validate_callback, mValidateSignal);
+	
+	if (p.init_callback.isProvided())
+	{
+		if (p.init_callback.function.isProvided())
+		{
+			p.init_callback.function()(this, p.init_callback.parameter);
+		}
+		else
+		{
+			commit_callback_t* initfunc = (CallbackRegistry<commit_callback_t>::getValue(p.init_callback.function_name));
+			if (initfunc)
+			{
+				(*initfunc)(this, p.init_callback.parameter);
+			}
+		}
+	}
 }
 
+
 LLUICtrl::~LLUICtrl()
 {
 	gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit()
@@ -127,24 +177,178 @@ LLUICtrl::~LLUICtrl()
 	}
 }
 
-void LLUICtrl::onCommit()
+void LLUICtrl::initCommitCallback(const CommitCallbackParam& cb, commit_signal_t& sig)
 {
-	if( mCommitCallback )
+	if (cb.function.isProvided())
 	{
-		mCommitCallback( this, mCallbackUserData );
+		if (cb.parameter.isProvided())
+			sig.connect(boost::bind(cb.function(), _1, cb.parameter));
+		else
+			sig.connect(cb.function());
+	}
+	else
+	{
+		std::string function_name = cb.function_name;
+		commit_callback_t* func = (CallbackRegistry<commit_callback_t>::getValue(function_name));
+		if (func)
+		{
+			if (cb.parameter.isProvided())
+				sig.connect(boost::bind((*func), _1, cb.parameter));
+			else
+				sig.connect(*func);
+		}
+		else if (!function_name.empty())
+		{
+			llwarns << "No callback found for: '" << function_name << "' in control: " << getName() << llendl;
+		}			
 	}
 }
 
+void LLUICtrl::initEnableCallback(const EnableCallbackParam& cb, enable_signal_t& sig)
+{
+	// Set the callback function
+	if (cb.function.isProvided())
+	{
+		if (cb.parameter.isProvided())
+			sig.connect(boost::bind(cb.function(), this, cb.parameter));
+		else
+			sig.connect(cb.function());
+	}
+	else
+	{
+		enable_callback_t* func = (EnableCallbackRegistry::getValue(cb.function_name));
+		if (func)
+		{
+			if (cb.parameter.isProvided())
+				sig.connect(boost::bind((*func), this, cb.parameter));
+			else
+				sig.connect(*func);
+		}
+	}
+}
+
+
+void LLUICtrl::onCommit()
+{
+	mCommitSignal(this, getValue());
+}
+
 //virtual
 BOOL LLUICtrl::isCtrl() const
 {
 	return TRUE;
 }
 
+//virtual 
+void LLUICtrl::setValue(const LLSD& value)
+{
+    mViewModel->setValue(value);
+}
+
 //virtual
 LLSD LLUICtrl::getValue() const
 {
-	return LLSD();
+	return mViewModel->getValue();
+}
+
+/// When two widgets are displaying the same data (e.g. during a skin
+/// change), share their ViewModel.
+void    LLUICtrl::shareViewModelFrom(const LLUICtrl& other)
+{
+    // Because mViewModel is an LLViewModelPtr, this assignment will quietly
+    // dispose of the previous LLViewModel -- unless it's already shared by
+    // somebody else.
+    mViewModel = other.mViewModel;
+}
+
+//virtual
+LLViewModel* LLUICtrl::getViewModel() const
+{
+	return mViewModel;
+}
+
+bool LLUICtrl::setControlValue(const LLSD& value)
+{
+	if (mControlVariable)
+	{
+		mControlVariable->set(value);
+		return true;
+	}
+	return false;
+}
+
+void LLUICtrl::setControlVariable(LLControlVariable* control)
+{
+	if (mControlVariable)
+	{
+		//RN: this will happen in practice, should we try to avoid it?
+		//llwarns << "setControlName called twice on same control!" << llendl;
+		mControlConnection.disconnect(); // disconnect current signal
+		mControlVariable = NULL;
+	}
+	
+	if (control)
+	{
+		mControlVariable = control;
+		mControlConnection = mControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("value")));
+		setValue(mControlVariable->getValue());
+	}
+}
+
+//virtual
+void LLUICtrl::setControlName(const std::string& control_name, LLView *context)
+{
+	if (context == NULL)
+	{
+		context = this;
+	}
+
+	// Register new listener
+	if (!control_name.empty())
+	{
+		LLControlVariable* control = context->findControl(control_name);
+		setControlVariable(control);
+	}
+}
+
+void LLUICtrl::setEnabledControlVariable(LLControlVariable* control)
+{
+	if (mEnabledControlVariable)
+	{
+		mEnabledControlConnection.disconnect(); // disconnect current signal
+		mEnabledControlVariable = NULL;
+	}
+	if (control)
+	{
+		mEnabledControlVariable = control;
+		mEnabledControlConnection = mEnabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("enabled")));
+		setEnabled(mEnabledControlVariable->getValue().asBoolean());
+	}
+}
+
+// static
+bool LLUICtrl::controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type)
+{
+	LLUICtrl* ctrl = handle.get();
+	if (ctrl)
+	{
+		if (type == "value")
+		{
+			ctrl->setValue(newvalue);
+			return true;
+		}
+		else if (type == "enabled")
+		{
+			ctrl->setEnabled(newvalue.asBoolean());
+			return true;
+		}
+		else if (type == "visible")
+		{
+			ctrl->setVisible(newvalue.asBoolean());
+			return true;
+		}
+	}
+	return false;
 }
 
 // virtual
@@ -248,12 +452,10 @@ void LLUICtrl::onFocusLost()
 	}
 }
 
-void LLUICtrl::onLostTop()
+void LLUICtrl::onTopLost()
 {
-	if (mLostTopCallback)
-	{
-		mLostTopCallback(this, mCallbackUserData);
-	}
+	// trigger callbacks
+	LLFocusableElement::onTopLost();
 }
 
 
@@ -278,12 +480,13 @@ BOOL LLUICtrl::acceptsTextInput() const
 //virtual
 BOOL LLUICtrl::isDirty() const
 {
-	return FALSE;
+	return mViewModel->isDirty();
 };
 
 //virtual
 void LLUICtrl::resetDirty()
 {
+    mViewModel->resetDirty();
 }
 
 // virtual
@@ -456,7 +659,8 @@ BOOL LLUICtrl::focusNextItem(BOOL text_fields_only)
 {
 	// this assumes that this method is called on the focus root.
 	LLCtrlQuery query = getTabOrderQuery();
-	if(text_fields_only || LLUI::sConfigGroup->getBOOL("TabToTextFieldsOnly"))
+	static LLUICachedControl<bool> tab_to_text_fields_only ("TabToTextFieldsOnly", false);
+	if(text_fields_only || tab_to_text_fields_only)
 	{
 		query.addPreFilter(LLUICtrl::LLTextInputFilter::getInstance());
 	}
@@ -468,7 +672,8 @@ BOOL LLUICtrl::focusPrevItem(BOOL text_fields_only)
 {
 	// this assumes that this method is called on the focus root.
 	LLCtrlQuery query = getTabOrderQuery();
-	if(text_fields_only || LLUI::sConfigGroup->getBOOL("TabToTextFieldsOnly"))
+	static LLUICachedControl<bool> tab_to_text_fields_only ("TabToTextFieldsOnly", false);
+	if(text_fields_only || tab_to_text_fields_only)
 	{
 		query.addPreFilter(LLUICtrl::LLTextInputFilter::getInstance());
 	}
@@ -524,33 +729,6 @@ BOOL LLUICtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect
 	return handled;
 }*/
 
-void LLUICtrl::initFromXML(LLXMLNodePtr node, LLView* parent)
-{
-	BOOL has_tab_stop = hasTabStop();
-	node->getAttributeBOOL("tab_stop", has_tab_stop);
-
-	setTabStop(has_tab_stop);
-
-	LLView::initFromXML(node, parent);
-}
-
-LLXMLNodePtr LLUICtrl::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLView::getXML(save_children);
-	node->createChild("tab_stop", TRUE)->setBoolValue(hasTabStop());
-
-	return node;
-}
-
-//static 
-LLView* LLUICtrl::fromXML(LLXMLNodePtr node, LLView* parent, class LLUICtrlFactory* factory)
-{
-	LLUICtrl* ctrl = new LLUICtrl();
-	ctrl->initFromXML(node, parent);
-	return ctrl;
-}
-
-
 // Skip over any parents that are not LLUICtrl's
 //  Used in focus logic since only LLUICtrl elements can have focus
 LLUICtrl* LLUICtrl::getParentUICtrl() const
@@ -570,6 +748,16 @@ LLUICtrl* LLUICtrl::getParentUICtrl() const
 	return NULL;
 }
 
+// *TODO: Deprecate; for backwards compatability only:
+boost::signals::connection LLUICtrl::setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data)
+{
+	return setCommitCallback( boost::bind(cb, _1, data));
+}
+boost::signals::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb )
+{
+	return mValidateSignal.connect(boost::bind(cb, _2));
+}
+
 // virtual
 void LLUICtrl::setTentative(BOOL b)									
 { 
@@ -582,11 +770,6 @@ BOOL LLUICtrl::getTentative() const
 	return mTentative; 
 }
 
-// virtual
-void LLUICtrl::setDoubleClickCallback( void (*cb)(void*) )				
-{ 
-}
-
 // virtual
 void LLUICtrl::setColor(const LLColor4& color)							
 { }
@@ -598,3 +781,40 @@ void LLUICtrl::setMinValue(LLSD min_value)
 // virtual
 void LLUICtrl::setMaxValue(LLSD max_value)								
 { }
+
+
+
+namespace LLInitParam
+{
+    template<> 
+	bool ParamCompare<LLUICtrl::commit_callback_t>::equals(
+		const LLUICtrl::commit_callback_t &a, 
+		const LLUICtrl::commit_callback_t &b)
+    {
+    	return false;
+    }
+    
+    template<> 
+	bool ParamCompare<LLUICtrl::focus_callback_t>::equals(
+		const LLUICtrl::focus_callback_t &a, 
+		const LLUICtrl::focus_callback_t &b)
+    {
+    	return false;
+    }
+    
+    template<> 
+	bool ParamCompare<LLUICtrl::enable_callback_t>::equals(
+		const LLUICtrl::enable_callback_t &a, 
+		const LLUICtrl::enable_callback_t &b)
+    {
+    	return false;
+    }
+
+    template<> 
+	bool ParamCompare<LLLazyValue<LLColor4> >::equals(
+		const LLLazyValue<LLColor4> &a, 
+		const LLLazyValue<LLColor4> &b)    
+    {
+    	return a.get() == b.get();
+    }
+}
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index db41af8470..e82102d531 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -34,10 +34,17 @@
 #ifndef LL_LLUICTRL_H
 #define LL_LLUICTRL_H
 
-#include "llview.h"
+#include "llboost.h"
 #include "llrect.h"
 #include "llsd.h"
+#include <boost/function.hpp>
+
+#include "llinitparam.h"
+#include "llview.h"
+#include "llviewmodel.h"
 
+const BOOL TAKE_FOCUS_YES = TRUE;
+const BOOL TAKE_FOCUS_NO  = FALSE;
 
 class LLFocusableElement
 {
@@ -49,39 +56,104 @@ public:
 	virtual void	setFocus( BOOL b );
 	virtual BOOL	hasFocus() const;
 
-	void			setFocusLostCallback(void (*cb)(LLFocusableElement* caller, void*), void* user_data = NULL) { mFocusLostCallback = cb; mFocusCallbackUserData = user_data; }
-	void			setFocusReceivedCallback( void (*cb)(LLFocusableElement*, void*), void* user_data = NULL)	{ mFocusReceivedCallback = cb; mFocusCallbackUserData = user_data; }
-	void			setFocusChangedCallback( void (*cb)(LLFocusableElement*, void*), void* user_data = NULL )		{ mFocusChangedCallback = cb; mFocusCallbackUserData = user_data; }
+	typedef boost::function<void(LLFocusableElement*, void*)> focus_callback_t;
+	void	setFocusLostCallback(focus_callback_t cb, void* user_data = NULL)	{ mFocusLostCallback = cb; mFocusCallbackUserData = user_data; }
+	void	setFocusReceivedCallback(focus_callback_t cb, void* user_data = NULL)	{ mFocusReceivedCallback = cb; mFocusCallbackUserData = user_data; }
+	void	setFocusChangedCallback(focus_callback_t cb, void* user_data = NULL )	{ mFocusChangedCallback = cb; mFocusCallbackUserData = user_data; }
+	void	setTopLostCallback(focus_callback_t cb, void* user_data = NULL )	{ mTopLostCallback = cb; mFocusCallbackUserData = user_data; }
 
 protected:
 	virtual void	onFocusReceived();
 	virtual void	onFocusLost();
-	void			(*mFocusLostCallback)( LLFocusableElement* caller, void* userdata );
-	void			(*mFocusReceivedCallback)( LLFocusableElement* ctrl, void* userdata );
-	void			(*mFocusChangedCallback)( LLFocusableElement* ctrl, void* userdata );
+	virtual void	onTopLost();	// called when registered as top ctrl and user clicks elsewhere
+	focus_callback_t mFocusLostCallback;
+	focus_callback_t mFocusReceivedCallback;
+	focus_callback_t mFocusChangedCallback;
+	focus_callback_t mTopLostCallback;
 	void*			mFocusCallbackUserData;
 };
 
 class LLUICtrl
-: public LLView, public LLFocusableElement
+	: public LLView, public LLFocusableElement, public boost::signals::trackable
 {
 public:
-	typedef void (*LLUICtrlCallback)(LLUICtrl* ctrl, void* userdata);
-	typedef BOOL (*LLUICtrlValidate)(LLUICtrl* ctrl, void* userdata);
-
-	LLUICtrl();
-	LLUICtrl( const std::string& name, const LLRect& rect, BOOL mouse_opaque,
-		LLUICtrlCallback callback,
-		void* callback_userdata,
-		U32 reshape=FOLLOWS_NONE);
+
+
+	typedef boost::function<void (LLUICtrl* ctrl, const LLSD& param)> commit_callback_t;
+	typedef boost::signal<void (LLUICtrl* ctrl, const LLSD& param)> commit_signal_t;
+	
+	typedef boost::function<bool (LLUICtrl* ctrl, const LLSD& param)> enable_callback_t;
+	typedef boost::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> enable_signal_t;
+	
+	struct CallbackParam : public LLInitParam::Block<CallbackParam>
+	{
+		Deprecated				name;
+
+		Optional<std::string>	function_name;
+		Optional<LLSD>			parameter;
+
+		Optional<std::string>	control_name;
+		
+		CallbackParam()
+		  :	name("name"),
+			function_name("function"),
+			parameter("parameter"),
+			control_name("control") // Shortcut to control -> "control_name" for backwards compatability			
+		{
+			addSynonym(parameter, "userdata");
+		}
+	};
+
+	struct CommitCallbackParam : public LLInitParam::Block<CommitCallbackParam, CallbackParam >
+	{
+		Optional<commit_callback_t> function;
+	};
+	
+	struct EnableCallbackParam : public LLInitParam::Block<EnableCallbackParam, CallbackParam >
+	{
+		Optional<enable_callback_t> function;
+	};
+	
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Optional<std::string>			label;
+		Optional<bool>					tab_stop;
+		Optional<LLSD>					initial_value;
+
+		Optional<CommitCallbackParam>	init_callback,
+										commit_callback;
+		Optional<EnableCallbackParam>	validate_callback;
+		
+		Optional<focus_callback_t>		focus_lost_callback;
+		
+		Optional<std::string>			control_name;
+		Optional<std::string>			enabled_control;
+		
+		Params();
+	};
+
 	/*virtual*/ ~LLUICtrl();
 
+	void initFromParams(const Params& p);
+protected:
+	friend class LLUICtrlFactory;
+	LLUICtrl(const Params& p = LLUICtrl::Params(),
+             const LLViewModelPtr& viewmodel=LLViewModelPtr(new LLViewModel));
+	
+	void initCommitCallback(const CommitCallbackParam& cb, commit_signal_t& sig);
+	void initEnableCallback(const EnableCallbackParam& cb, enable_signal_t& sig);
+
+	// We need this virtual so we can override it with derived versions
+	virtual LLViewModel* getViewModel() const;
+    // We shouldn't ever need to set this directly
+    //virtual void    setViewModel(const LLViewModelPtr&);
+	
+public:
 	// LLView interface
-	/*virtual*/ void	initFromXML(LLXMLNodePtr node, LLView* parent);
-	/*virtual*/ LLXMLNodePtr getXML(bool save_children = true) const;
 	/*virtual*/ BOOL	setLabelArg( const std::string& key, const LLStringExplicit& text );
 	/*virtual*/ void	onFocusReceived();
 	/*virtual*/ void	onFocusLost();
+	/*virtual*/ void	onTopLost();
 	/*virtual*/ BOOL	isCtrl() const;
 	/*virtual*/ void	setTentative(BOOL b);
 	/*virtual*/ BOOL	getTentative() const;
@@ -97,7 +169,20 @@ public:
 	virtual class LLCtrlListInterface* getListInterface();
 	virtual class LLCtrlScrollInterface* getScrollInterface();
 
+	bool setControlValue(const LLSD& value);
+	void setControlVariable(LLControlVariable* control);
+	virtual void setControlName(const std::string& control, LLView *context = NULL);
+	
+	LLControlVariable* getControlVariable() { return mControlVariable; } 
+	
+	void setEnabledControlVariable(LLControlVariable* control);
+
+	virtual void	setValue(const LLSD& value);
 	virtual LLSD	getValue() const;
+    /// When two widgets are displaying the same data (e.g. during a skin
+    /// change), share their ViewModel.
+    virtual void    shareViewModelFrom(const LLUICtrl& other);
+
 	virtual BOOL	setTextArg(  const std::string& key, const LLStringExplicit& text );
 	virtual void	setIsChrome(BOOL is_chrome);
 
@@ -108,14 +193,12 @@ public:
 	virtual BOOL	isDirty() const; // Defauls to false
 	virtual void	resetDirty(); //Defaults to no-op
 	
-	// Call appropriate callbacks
-	virtual void	onLostTop();	// called when registered as top ctrl and user clicks elsewhere
+	// Call appropriate callback
 	virtual void	onCommit();
 	
 	// Default to no-op:
 	virtual void	onTabInto();
 	virtual void	clear();
-	virtual	void	setDoubleClickCallback( void (*cb)(void*) );
 	virtual void	setColor(const LLColor4& color);
 	virtual void	setMinValue(LLSD min_value);
 	virtual void	setMaxValue(LLSD max_value);
@@ -126,6 +209,7 @@ public:
 	BOOL	focusLastItem(BOOL prefer_text_fields = FALSE);
 
 	// Non Virtuals
+	LLHandle<LLUICtrl> getUICtrlHandle() const { return mUICtrlHandle; }
 	BOOL			getIsChrome() const;
 	
 	void			setTabStop( BOOL b );
@@ -133,16 +217,14 @@ public:
 
 	LLUICtrl*		getParentUICtrl() const;
 
-	void*			getCallbackUserData() const								{ return mCallbackUserData; }
-	void			setCallbackUserData( void* data )						{ mCallbackUserData = data; }
+	boost::signals::connection setCommitCallback( const commit_signal_t::slot_type& cb ) { return mCommitSignal.connect(cb); }
+	boost::signals::connection setValidateCallback( const enable_signal_t::slot_type& cb ) { return mValidateSignal.connect(cb); }
 	
-	void			setCommitCallback( void (*cb)(LLUICtrl*, void*) )		{ mCommitCallback = cb; }
-	void			setValidateBeforeCommit( BOOL(*cb)(LLUICtrl*, void*) )	{ mValidateCallback = cb; }
-	void			setLostTopCallback( void (*cb)(LLUICtrl*, void*) )		{ mLostTopCallback = cb; }
+	// *TODO: Deprecate; for backwards compatability only:
+	boost::signals::connection setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data);	
+	boost::signals::connection setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb );
 	
-	static LLView* fromXML(LLXMLNodePtr node, LLView* parent, class LLUICtrlFactory* factory);
-
-	LLUICtrl*		findRootMostFocusRoot();
+	LLUICtrl* findRootMostFocusRoot();
 
 	class LLTextInputFilter : public LLQueryFilter, public LLSingleton<LLTextInputFilter>
 	{
@@ -151,22 +233,53 @@ public:
 			return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl *>(view)->acceptsTextInput(), TRUE);
 		}
 	};
+	
+	template <typename F> class CallbackRegistry : public LLRegistrySingleton<std::string, F, CallbackRegistry<F> >
+	{};	
 
+	typedef CallbackRegistry<commit_callback_t> CommitCallbackRegistry;
+	typedef CallbackRegistry<enable_callback_t> EnableCallbackRegistry;
+	
 protected:
 
-	void			(*mCommitCallback)( LLUICtrl* ctrl, void* userdata );
-	void			(*mLostTopCallback)( LLUICtrl* ctrl, void* userdata );
-	BOOL			(*mValidateCallback)( LLUICtrl* ctrl, void* userdata );
+	static bool controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type);
+
+	commit_signal_t	mCommitSignal;
+	enable_signal_t mValidateSignal;
 
-	void*			mCallbackUserData;
+    LLViewModelPtr  mViewModel;
+
+	LLControlVariable* mControlVariable;
+	boost::signals::connection mControlConnection;
+	LLControlVariable* mEnabledControlVariable;
+	boost::signals::connection mEnabledControlConnection;
 
 private:
 
 	BOOL			mTabStop;
 	BOOL			mIsChrome;
 	BOOL			mTentative;
+	LLRootHandle<LLUICtrl> mUICtrlHandle;
 
 	class DefaultTabGroupFirstSorter;
 };
 
+namespace LLInitParam
+{   
+    template<> 
+	bool ParamCompare<LLUICtrl::commit_callback_t>::equals(
+		const LLUICtrl::commit_callback_t &a, 
+		const LLUICtrl::commit_callback_t &b); 
+		
+    template<> 
+	bool ParamCompare<LLUICtrl::enable_callback_t>::equals(
+		const LLUICtrl::enable_callback_t &a, 
+		const LLUICtrl::enable_callback_t &b); 
+    
+	template<> 
+	bool ParamCompare<LLUICtrl::focus_callback_t>::equals(
+		const LLUICtrl::focus_callback_t &a, 
+		const LLUICtrl::focus_callback_t &b); 
+}
+
 #endif  // LL_LLUICTRL_H
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 983cc53f69..1f487bdb7e 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -41,6 +41,8 @@
 #include "llcontrol.h"
 #include "lldir.h"
 #include "v4color.h"
+#include "v3dmath.h"
+#include "llquaternion.h"
 
 // this library includes
 #include "llbutton.h"
@@ -64,7 +66,6 @@
 #include "llmultisliderctrl.h"
 #include "llspinctrl.h"
 #include "lltabcontainer.h"
-#include "lltabcontainervertical.h"
 #include "lltextbox.h"
 #include "lltexteditor.h"
 #include "llui.h"
@@ -77,27 +78,32 @@ const S32 VPAD = 4;
 const S32 FLOATER_H_MARGIN = 15;
 const S32 MIN_WIDGET_HEIGHT = 10;
 
-std::vector<std::string> LLUICtrlFactory::sXUIPaths;
+//-----------------------------------------------------------------------------
+// Register widgets that are purely data driven here so they get linked in
+#include "llstatview.h"
+static LLRegisterWidget<LLStatView> register_stat_view("stat_view");
+
+//-----------------------------------------------------------------------------
 
 // UI Ctrl class for padding
 class LLUICtrlLocate : public LLUICtrl
 {
 public:
-	LLUICtrlLocate() : LLUICtrl(std::string("locate"), LLRect(0,0,0,0), FALSE, NULL, NULL) { setTabStop(FALSE); }
-	virtual void draw() { }
-
-	static LLView *fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
 	{
-		std::string name("pad");
-		node->getAttributeString("name", name);
+		Params()
+		{
+			name = "locate";
+			tab_stop = false;
+		}
+	};
+
+	LLUICtrlLocate(const Params& p) : LLUICtrl(p) {}
+	virtual void draw() { }
 
-		LLUICtrlLocate *new_ctrl = new LLUICtrlLocate();
-		new_ctrl->setName(name);
-		new_ctrl->initFromXML(node, parent);
-		return new_ctrl;
-	}
 };
 
+//FIXME: this created an ambiguous lookup of template (locate.xml or pad.xml?)
 static LLRegisterWidget<LLUICtrlLocate> r1("locate");
 static LLRegisterWidget<LLUICtrlLocate> r2("pad");
 
@@ -105,9 +111,8 @@ static LLRegisterWidget<LLUICtrlLocate> r2("pad");
 // LLUICtrlFactory()
 //-----------------------------------------------------------------------------
 LLUICtrlFactory::LLUICtrlFactory()
-	: mDummyPanel(NULL)
+	: mDummyPanel(NULL) // instantiated when first needed
 {
-	setupPaths();
 }
 
 LLUICtrlFactory::~LLUICtrlFactory()
@@ -116,43 +121,15 @@ LLUICtrlFactory::~LLUICtrlFactory()
 	mDummyPanel = NULL;
 }
 
-void LLUICtrlFactory::setupPaths()
+void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitParam::BaseBlock& block)
 {
-	std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "paths.xml");
+	std::string filename = std::string("widgets") + gDirUtilp->getDirDelimiter() + widget_tag + ".xml";
+	LLXMLNodePtr root_node;
 
-	LLXMLNodePtr root;
-	BOOL success  = LLXMLNode::parseFile(filename, root, NULL);
-	sXUIPaths.clear();
-	
-	if (success)
+	if (LLUICtrlFactory::getLayeredXMLNode(filename, root_node))
 	{
-		LLXMLNodePtr path;
-	
-		for (path = root->getFirstChild(); path.notNull(); path = path->getNextSibling())
-		{
-			LLUIString path_val_ui(path->getValue());
-			std::string language = LLUI::getLanguage();
-			path_val_ui.setArg("[LANGUAGE]", language);
-
-			if (std::find(sXUIPaths.begin(), sXUIPaths.end(), path_val_ui.getString()) == sXUIPaths.end())
-			{
-				sXUIPaths.push_back(path_val_ui.getString());
-			}
-		}
+		LLXUIParser::instance().readXUI(root_node, block);
 	}
-	else // parsing failed
-	{
-		std::string slash = gDirUtilp->getDirDelimiter();
-		std::string dir = "xui" + slash + "en-us";
-		llwarns << "XUI::config file unable to open: " << filename << llendl;
-		sXUIPaths.push_back(dir);
-	}
-}
-
-// static
-const std::vector<std::string>& LLUICtrlFactory::getXUIPaths()
-{
-	return sXUIPaths;
 }
 
 //-----------------------------------------------------------------------------
@@ -160,97 +137,61 @@ const std::vector<std::string>& LLUICtrlFactory::getXUIPaths()
 //-----------------------------------------------------------------------------
 bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root)
 {
-	std::string full_filename = gDirUtilp->findSkinnedFilename(sXUIPaths.front(), xui_filename);
-	if (full_filename.empty())
-	{
-		llwarns << "Couldn't find UI description file: " << sXUIPaths.front() + gDirUtilp->getDirDelimiter() + xui_filename << llendl;
-		return false;
-	}
-
-	if (!LLXMLNode::parseFile(full_filename, root, NULL))
-	{
-		// try filename as passed in since sometimes we load an xml file from a user-supplied path
-		if (!LLXMLNode::parseFile(xui_filename, root, NULL))
-		{
-			llwarns << "Problem reading UI description file: " << xui_filename << llendl;
-			return false;
-		}
-	}
-
-	LLXMLNodePtr updateRoot;
-
-	std::vector<std::string>::const_iterator itor;
-
-	for (itor = sXUIPaths.begin(), ++itor; itor != sXUIPaths.end(); ++itor)
-	{
-		std::string nodeName;
-		std::string updateName;
-
-		std::string layer_filename = gDirUtilp->findSkinnedFilename((*itor), xui_filename);
-		if(layer_filename.empty())
-		{
-			// no localized version of this file, that's ok, keep looking
-			continue;
-		}
-
-		if (!LLXMLNode::parseFile(layer_filename, updateRoot, NULL))
-		{
-			llwarns << "Problem reading localized UI description file: " << (*itor) + gDirUtilp->getDirDelimiter() + xui_filename << llendl;
-			return false;
-		}
-
-		updateRoot->getAttributeString("name", updateName);
-		root->getAttributeString("name", nodeName);
-
-		if (updateName == nodeName)
-		{
-			LLXMLNode::updateNode(root, updateRoot);
-		}
-	}
-
-	return true;
+	return LLXMLNode::getLayeredXMLNode(xui_filename, root, LLUI::getXUIPaths());
 }
 
-
 //-----------------------------------------------------------------------------
 // buildFloater()
 //-----------------------------------------------------------------------------
-void LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filename, 
-									const LLCallbackMap::map_t* factory_map, BOOL open) /* Flawfinder: ignore */
+void LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filename, BOOL open_floater, LLXMLNodePtr output_node)
 {
 	LLXMLNodePtr root;
 
 	if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
 	{
+		llwarns << "Couldn't parse floater from: " << LLUI::getSkinPath() + gDirUtilp->getDirDelimiter() + filename << llendl;
 		return;
 	}
 	
 	// root must be called floater
-	if( !(root->hasName("floater") || root->hasName("multi_floater") ) )
+	if( !(root->hasName("floater") || root->hasName("multi_floater")) )
 	{
 		llwarns << "Root node should be named floater in: " << filename << llendl;
 		return;
 	}
 
-	if (factory_map)
+	lldebugs << "Building floater " << filename << llendl;
+	mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename));
 	{
-		mFactoryStack.push_front(factory_map);
-	}
-
-	floaterp->initFloaterXML(root, NULL, this, open);	/* Flawfinder: ignore */
-
-	if (LLUI::sShowXUINames)
-	{
-		floaterp->setToolTip(filename);
-	}
+		if (!floaterp->getFactoryMap().empty())
+		{
+			mFactoryStack.push_front(&floaterp->getFactoryMap());
+		}
+		
+		floaterp->getCommitCallbackRegistrar().pushScope(); // for local registry callbacks; define in constructor, referenced in XUI or postBuild
+		
+		floaterp->initFloaterXML(root, floaterp->getParent(), open_floater, output_node);
 
-	if (factory_map)
-	{
-		mFactoryStack.pop_front();
+		if (LLUI::sShowXUINames)
+		{
+			floaterp->setToolTip(filename);
+		}
+		
+		floaterp->getCommitCallbackRegistrar().popScope();
+		
+		if (!floaterp->getFactoryMap().empty())
+		{
+			mFactoryStack.pop_front();
+		}
 	}
+	mFileNames.pop_back();
+}
 
-	LLHandle<LLFloater> handle = floaterp->getHandle();
-	mBuiltFloaters[handle] = filename;
+LLFloater* LLUICtrlFactory::buildFloaterFromXML(const std::string& filename, BOOL open_floater)
+{
+	LLFloater* floater = new LLFloater();
+	buildFloater(floater, filename, open_floater);
+	return floater;
 }
 
 //-----------------------------------------------------------------------------
@@ -258,34 +199,20 @@ void LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filen
 //-----------------------------------------------------------------------------
 S32 LLUICtrlFactory::saveToXML(LLView* viewp, const std::string& filename)
 {
-	llofstream out(filename);
-	if (!out.good())
-	{
-		llwarns << "Unable to open " << filename << " for output." << llendl;
-		return 1;
-	}
-
-	out << XML_HEADER;
-
-	LLXMLNodePtr xml_node = viewp->getXML();
-
-	xml_node->writeToOstream(out);
-
-	out.close();
 	return 0;
 }
 
 //-----------------------------------------------------------------------------
 // buildPanel()
 //-----------------------------------------------------------------------------
-BOOL LLUICtrlFactory::buildPanel(LLPanel* panelp, const std::string& filename,
-									const LLCallbackMap::map_t* factory_map)
+BOOL LLUICtrlFactory::buildPanel(LLPanel* panelp, const std::string& filename, LLXMLNodePtr output_node)
 {
 	BOOL didPost = FALSE;
 	LLXMLNodePtr root;
 
 	if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
 	{
+		llwarns << "Couldn't parse panel from: " << LLUI::getSkinPath() + gDirUtilp->getDirDelimiter() + filename << llendl;
 		return didPost;
 	}
 
@@ -296,246 +223,733 @@ BOOL LLUICtrlFactory::buildPanel(LLPanel* panelp, const std::string& filename,
 		return didPost;
 	}
 
-	if (factory_map)
+	lldebugs << "Building panel " << filename << llendl;
+
+	mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename));
 	{
-		mFactoryStack.push_front(factory_map);
+		if (!panelp->getFactoryMap().empty())
+		{
+			mFactoryStack.push_front(&panelp->getFactoryMap());
+		}
+		
+		didPost = panelp->initPanelXML(root, NULL, output_node);
+		
+		if (LLUI::sShowXUINames)
+		{
+			panelp->setToolTip(filename);
+		}
+
+		if (!panelp->getFactoryMap().empty())
+		{
+			mFactoryStack.pop_front();
+		}
 	}
+	mFileNames.pop_back();
+	return didPost;
+}
 
-	didPost = panelp->initPanelXML(root, NULL, this);
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
+LLView *LLUICtrlFactory::createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename,  LLXMLNodePtr output_node)
+{
+	std::string ctrl_type = node->getName()->mString;
+	LLStringUtil::toLower(ctrl_type);
 	
-	if (LLUI::sShowXUINames)
+	LLWidgetCreatorFunc* funcp = LLWidgetCreatorRegistry::getInstance()->getValue(ctrl_type);
+
+	if (funcp == NULL)
 	{
-		panelp->setToolTip(filename);
+		return NULL;
 	}
 
-	LLHandle<LLPanel> handle = panelp->getHandle();
-	mBuiltPanels[handle] = filename;
-
-	if (factory_map)
+	if (parent == NULL)
+	{
+		if (mDummyPanel == NULL)
+		{
+			mDummyPanel = new LLPanel();
+		}
+		parent = mDummyPanel;
+	}
+	LLView *view = (*funcp)(node, parent, output_node);	
+	if (LLUI::sShowXUINames && view && !filename.empty())
 	{
-		mFactoryStack.pop_front();
+		view->setToolTip(filename);
 	}
-
-	return didPost;
+	
+	return view;
 }
 
 //-----------------------------------------------------------------------------
-// buildMenu()
+// createFactoryPanel()
 //-----------------------------------------------------------------------------
-LLMenuGL *LLUICtrlFactory::buildMenu(const std::string &filename, LLView* parentp)
+LLPanel* LLUICtrlFactory::createFactoryPanel(const std::string& name)
 {
-	// TomY TODO: Break this function into buildMenu and buildMenuBar
-	LLXMLNodePtr root;
-	LLMenuGL*    menu;
-
-	if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
+	std::deque<const LLCallbackMap::map_t*>::iterator itor;
+	for (itor = mFactoryStack.begin(); itor != mFactoryStack.end(); ++itor)
 	{
-		return NULL;
+		const LLCallbackMap::map_t* factory_map = *itor;
+
+		// Look up this panel's name in the map.
+		LLCallbackMap::map_const_iter_t iter = factory_map->find( name );
+		if (iter != factory_map->end())
+		{
+			// Use the factory to create the panel, instead of using a default LLPanel.
+			LLPanel *ret = (LLPanel*) iter->second.mCallback( iter->second.mData );
+			return ret;
+		}
 	}
+	return new LLPanel();
+}
 
-	// root must be called panel
-	if( !root->hasName( "menu_bar" ) && !root->hasName( "menu" ))
+//-----------------------------------------------------------------------------
+
+//static
+BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const std::string& name, LLColor4& color)
+{
+	std::string colorstring;
+	BOOL res = node->getAttributeString(name.c_str(), colorstring);
+	if (res && LLUI::sSettingGroups["color"])
 	{
-		llwarns << "Root node should be named menu bar or menu in : " << filename << llendl;
-		return NULL;
+		if (LLUI::sSettingGroups["color"]->controlExists(colorstring))
+		{
+			color.setVec(LLUI::sSettingGroups["color"]->getColor(colorstring));
+		}
+		else
+		{
+			res = FALSE;
+		}
+	}
+	if (!res)
+	{
+		res = LLColor4::parseColor(colorstring, &color);
+	}	
+	if (!res)
+	{
+		res = node->getAttributeColor(name.c_str(), color);
 	}
+	return res;
+}
 
-	if (root->hasName("menu"))
+//static
+void LLUICtrlFactory::setCtrlParent(LLView* view, LLView* parent, S32 tab_group)
+{
+	if (tab_group < 0) tab_group = parent->getLastTabGroup();
+	parent->addChild(view, tab_group);
+}
+
+
+// Avoid directly using LLUI and LLDir in the template code
+//static
+std::string LLUICtrlFactory::findSkinnedFilename(const std::string& filename)
+{
+	return gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename);
+}
+
+void LLUICtrlFactory::pushFactoryFunctions(const LLCallbackMap::map_t* map)
+{
+	mFactoryStack.push_back(map);
+}
+
+void LLUICtrlFactory::popFactoryFunctions()
+{
+	if (!mFactoryStack.empty())
 	{
-		menu = (LLMenuGL*)LLMenuGL::fromXML(root, parentp, this);
+		mFactoryStack.pop_back();
 	}
-	else
+}
+
+
+//
+// LLXUIParser
+//
+LLXUIParser::LLXUIParser()
+:	mLastWriteGeneration(-1)
+{
+	registerParserFuncs<bool>(boost::bind(&LLXUIParser::readBoolValue, this, _1),
+								boost::bind(&LLXUIParser::writeBoolValue, this, _1, _2));
+	registerParserFuncs<std::string>(boost::bind(&LLXUIParser::readStringValue, this, _1),
+								boost::bind(&LLXUIParser::writeStringValue, this, _1, _2));
+	registerParserFuncs<U8>(boost::bind(&LLXUIParser::readU8Value, this, _1),
+								boost::bind(&LLXUIParser::writeU8Value, this, _1, _2));
+	registerParserFuncs<S8>(boost::bind(&LLXUIParser::readS8Value, this, _1),
+								boost::bind(&LLXUIParser::writeS8Value, this, _1, _2));
+	registerParserFuncs<U16>(boost::bind(&LLXUIParser::readU16Value, this, _1),
+								boost::bind(&LLXUIParser::writeU16Value, this, _1, _2));
+	registerParserFuncs<S16>(boost::bind(&LLXUIParser::readS16Value, this, _1),
+								boost::bind(&LLXUIParser::writeS16Value, this, _1, _2));
+	registerParserFuncs<U32>(boost::bind(&LLXUIParser::readU32Value, this, _1),
+								boost::bind(&LLXUIParser::writeU32Value, this, _1, _2));
+	registerParserFuncs<S32>(boost::bind(&LLXUIParser::readS32Value, this, _1),
+								boost::bind(&LLXUIParser::writeS32Value, this, _1, _2));
+	registerParserFuncs<F32>(boost::bind(&LLXUIParser::readF32Value, this, _1),
+								boost::bind(&LLXUIParser::writeF32Value, this, _1, _2));
+	registerParserFuncs<F64>(boost::bind(&LLXUIParser::readF64Value, this, _1),
+								boost::bind(&LLXUIParser::writeF64Value, this, _1, _2));
+	registerParserFuncs<LLColor4>(boost::bind(&LLXUIParser::readColor4Value, this, _1),
+								boost::bind(&LLXUIParser::writeColor4Value, this, _1, _2));
+	registerParserFuncs<LLUIColor>(boost::bind(&LLXUIParser::readUIColorValue, this, _1),
+								boost::bind(&LLXUIParser::writeUIColorValue, this, _1, _2));
+	registerParserFuncs<LLUUID>(boost::bind(&LLXUIParser::readUUIDValue, this, _1),
+								boost::bind(&LLXUIParser::writeUUIDValue, this, _1, _2));
+	registerParserFuncs<LLSD>(boost::bind(&LLXUIParser::readSDValue, this, _1),
+								boost::bind(&LLXUIParser::writeSDValue, this, _1, _2));
+}
+
+void LLXUIParser::readXUI(LLXMLNodePtr node, LLInitParam::BaseBlock& block, bool silent)
+{
+	mNameStack.clear();
+	setParseSilently(silent);
+
+	if (node.isNull())
 	{
-		menu = (LLMenuGL*)LLMenuBarGL::fromXML(root, parentp, this);
+		parserWarning("Invalid node");
 	}
-	
-	if (LLUI::sShowXUINames)
+	else
 	{
-		menu->setToolTip(filename);
+		readXUIImpl(node, std::string(node->getName()->mString), block);
 	}
+}
 
-    return menu;
+void LLXUIParser::writeXUI(LLXMLNodePtr node, const LLInitParam::BaseBlock &block, const LLInitParam::BaseBlock* diff_block)
+{
+	mLastWriteGeneration = -1;
+	mWriteRootNode = node;
+	block.serializeBlock(*this, Parser::name_stack_t(), diff_block);
 }
 
-//-----------------------------------------------------------------------------
-// buildMenu()
-//-----------------------------------------------------------------------------
-LLPieMenu *LLUICtrlFactory::buildPieMenu(const std::string &filename, LLView* parentp)
+// go from a stack of names to a specific XML node
+LLXMLNodePtr LLXUIParser::getNode(const name_stack_t& stack)
 {
-	LLXMLNodePtr root;
+	if (stack.empty() || mWriteRootNode.isNull()) return NULL;
+
+	std::string attribute_name = stack.front().first;
+
+	// heuristic to make font always attribute of parent node
+	bool is_font = (attribute_name == "font");
+	// XML spec says that attributes have their whitespace normalized
+	// on parse: http://www.w3.org/TR/REC-xml/#AVNormalize
+	// Therefore text-oriented widgets that might have carriage returns
+	// have their values serialized as text contents, not the
+	// initial_value attribute. JC
+	if (attribute_name == "initial_value")
+	{
+		const char* root_node_name = mWriteRootNode->getName()->mString;
+		if (!strcmp(root_node_name, "text")		// LLTextBox
+			|| !strcmp(root_node_name, "text_editor") 
+			|| !strcmp(root_node_name, "line_editor")) // for consistency
+		{
+			// writeStringValue will write to this node
+			return mWriteRootNode;
+		}
+	}
 
-	if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
+	for (name_stack_t::const_iterator it = ++stack.begin();
+		it != stack.end();
+		++it)
 	{
-		return NULL;
+		attribute_name += ".";
+		attribute_name += it->first;
 	}
 
-	// root must be called panel
-	if( !root->hasName( LL_PIE_MENU_TAG ))
+	LLXMLNodePtr attribute_node;
+
+	const char* attribute_cstr = attribute_name.c_str();
+	if (stack.size() != 1
+		&& !is_font)
 	{
-		llwarns << "Root node should be named " << LL_PIE_MENU_TAG << " in : " << filename << llendl;
-		return NULL;
-	}
+		std::string child_node_name(mWriteRootNode->getName()->mString);
+		child_node_name += ".";
+		child_node_name += stack.front().first;
+
+		LLXMLNodePtr child_node;
 
-	std::string name("menu");
-	root->getAttributeString("name", name);
+		if (mLastWriteGeneration == stack.front().second)
+		{
+			child_node = mLastWrittenChild;
+		}
+		else
+		{
+			mLastWriteGeneration = stack.front().second;
+			child_node = mWriteRootNode->createChild(child_node_name.c_str(), false);
+		}
+
+		mLastWrittenChild = child_node;
 
-	LLPieMenu *menu = new LLPieMenu(name);
-	parentp->addChild(menu);
-	menu->initXML(root, parentp, this);
+		name_stack_t::const_iterator it = ++stack.begin();
+		std::string short_attribute_name(it->first);
+
+		for (++it;
+			it != stack.end();
+			++it)
+		{
+			short_attribute_name += ".";
+			short_attribute_name += it->first;
+		}
+
+		if (child_node->hasAttribute(short_attribute_name.c_str()))
+		{
+			llerrs << "Attribute " << short_attribute_name << " already exists!" << llendl;
+		}
 
-	if (LLUI::sShowXUINames)
+		attribute_node = child_node->createChild(short_attribute_name.c_str(), true);
+	}
+	else
 	{
-		menu->setToolTip(filename);
+		if (mWriteRootNode->hasAttribute(attribute_cstr))
+		{
+			mWriteRootNode->getAttribute(attribute_cstr, attribute_node);
+		}
+		else
+		{
+			attribute_node = mWriteRootNode->createChild(attribute_name.c_str(), true);
+		}
 	}
 
-	return menu;
+	return attribute_node;
 }
 
-//-----------------------------------------------------------------------------
-// rebuild()
-//-----------------------------------------------------------------------------
-void LLUICtrlFactory::rebuild()
+
+bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, const std::string& scope, LLInitParam::BaseBlock& block)
 {
-	built_panel_t::iterator built_panel_it;
-	for (built_panel_it = mBuiltPanels.begin();
-		built_panel_it != mBuiltPanels.end();
-		++built_panel_it)
-	{
-		std::string filename = built_panel_it->second;
-		LLPanel* panelp = built_panel_it->first.get();
-		if (!panelp)
+	typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
+	boost::char_separator<char> sep(".");
+
+	bool values_parsed = false;
+
+	// submit attributes for current node
+	values_parsed |= readAttributes(nodep, block);
+
+	// treat text contents of xml node as "value" parameter
+	std::string text_contents = nodep->getSanitizedValue();
+	if (!text_contents.empty())
+	{
+		mCurReadNode = nodep;
+		mNameStack.push_back(std::make_pair(std::string("value"), newParseGeneration()));
+		block.submitValue(mNameStack, *this);
+		mNameStack.pop_back();
+	}
+
+	// then traverse children
+	// child node must start with last name of parent node (our "scope")
+	// for example: "<button><button.param nested_param1="foo"><param.nested_param2 nested_param3="bar"/></button.param></button>"
+	// which equates to the following nesting:
+	// button
+	//     param
+	//         nested_param1
+	//         nested_param2
+	//             nested_param3	
+	for(LLXMLNodePtr childp = nodep->getFirstChild(); childp.notNull();)
+	{
+		std::string child_name(childp->getName()->mString);
+		S32 num_tokens_pushed = 0;
+
+		// for non "dotted" child nodes	check to see if child node maps to another widget type
+		// and if not, treat as a child element of the current node
+		// e.g. <button><rect left="10"/></button> will interpret <rect> as "button.rect"
+		// since there is no widget named "rect"
+		if (child_name.find(".") == std::string::npos) 
 		{
-			continue;
+			// skip over children with registered names
+			if (LLWidgetCreatorRegistry::instance().exists(child_name))
+			{
+				childp = childp->getNextSibling();
+				continue;
+			}
+
+			mNameStack.push_back(std::make_pair(child_name, newParseGeneration()));
+			num_tokens_pushed++;
 		}
-		llinfos << "Rebuilding UI panel " << panelp->getName() 
-			<< " from " << filename
-			<< llendl;
-		BOOL visible = panelp->getVisible();
-		panelp->setVisible(FALSE);
-		panelp->setFocus(FALSE);
-		panelp->deleteAllChildren();
+		else
+		{
+			// parse out "dotted" name into individual tokens
+			tokenizer name_tokens(child_name, sep);
+
+			tokenizer::iterator name_token_it = name_tokens.begin();
+			if(name_token_it == name_tokens.end()) 
+			{
+				childp = childp->getNextSibling();
+				continue;
+			}
 
-		buildPanel(panelp, filename.c_str(), &panelp->getFactoryMap());
-		panelp->setVisible(visible);
+			// check for proper nesting
+			if(!scope.empty() && *name_token_it != scope)
+			{
+				childp = childp->getNextSibling();
+				continue;
+			}
+
+			// now ignore first token
+			++name_token_it; 
+
+			// copy remaining tokens on to our running token list
+			for(tokenizer::iterator token_to_push = name_token_it; token_to_push != name_tokens.end(); ++token_to_push)
+			{
+				mNameStack.push_back(std::make_pair(*token_to_push, newParseGeneration()));
+				num_tokens_pushed++;
+			}
+		}
+
+		// recurse and visit children XML nodes
+		if(readXUIImpl(childp, mNameStack.empty() ? scope : mNameStack.back().first, block))
+		{
+			// child node successfully parsed, remove from DOM
+
+			values_parsed = true;
+			LLXMLNodePtr node_to_remove = childp;
+			childp = childp->getNextSibling();
+
+			nodep->deleteChild(node_to_remove);
+		}
+		else
+		{
+			childp = childp->getNextSibling();
+		}
+
+		while(num_tokens_pushed-- > 0)
+		{
+			mNameStack.pop_back();
+		}
 	}
+	return values_parsed;
+}
+
+bool LLXUIParser::readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
+{
+	typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
+	boost::char_separator<char> sep(".");
 
-	built_floater_t::iterator built_floater_it;
-	for (built_floater_it = mBuiltFloaters.begin();
-		built_floater_it != mBuiltFloaters.end();
-		++built_floater_it)
+	bool any_parsed = false;
+
+	for(LLXMLAttribList::const_iterator attribute_it = nodep->mAttributes.begin(); 
+		attribute_it != nodep->mAttributes.end(); 
+		++attribute_it)
 	{
-		LLFloater* floaterp = built_floater_it->first.get();
-		if (!floaterp)
+		S32 num_tokens_pushed = 0;
+		std::string attribute_name(attribute_it->first->mString);
+		mCurReadNode = attribute_it->second;
+
+		tokenizer name_tokens(attribute_name, sep);
+		// copy remaining tokens on to our running token list
+		for(tokenizer::iterator token_to_push = name_tokens.begin(); token_to_push != name_tokens.end(); ++token_to_push)
 		{
-			continue;
+			mNameStack.push_back(std::make_pair(*token_to_push, newParseGeneration()));
+			num_tokens_pushed++;
 		}
-		std::string filename = built_floater_it->second;
-		llinfos << "Rebuilding UI floater " << floaterp->getName()
-			<< " from " << filename
-			<< llendl;
-		BOOL visible = floaterp->getVisible();
-		floaterp->setVisible(FALSE);
-		floaterp->setFocus(FALSE);
-		floaterp->deleteAllChildren();
 
-		gFloaterView->removeChild(floaterp);
-		buildFloater(floaterp, filename, &floaterp->getFactoryMap());
-		floaterp->setVisible(visible);
+		any_parsed |= block.submitValue(mNameStack, *this);
+		
+		while(num_tokens_pushed-- > 0)
+		{
+			mNameStack.pop_back();
+		}
 	}
+
+	return any_parsed;
 }
 
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
+bool LLXUIParser::readBoolValue(void* val_ptr)
+{
+	S32 value;
+	bool success = mCurReadNode->getBoolValue(1, &value);
+	*((bool*)val_ptr) = (value != FALSE);
+	return success;
+}
 
-LLView *LLUICtrlFactory::createCtrlWidget(LLPanel *parent, LLXMLNodePtr node)
+bool LLXUIParser::writeBoolValue(const void* val_ptr, const name_stack_t& stack)
 {
-	std::string ctrl_type = node->getName()->mString;
-	LLStringUtil::toLower(ctrl_type);
-	
-	LLWidgetClassRegistry::factory_func_t func = LLWidgetClassRegistry::getInstance()->getCreatorFunc(ctrl_type);
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
+	{
+		node->setBoolValue(*((bool*)val_ptr));
+		return true;
+	}
+	return false;
+}
 
-	if (func == NULL)
+bool LLXUIParser::readStringValue(void* val_ptr)
+{
+	*((std::string*)val_ptr) = mCurReadNode->getSanitizedValue();
+	return true;
+}
+
+bool LLXUIParser::writeStringValue(const void* val_ptr, const name_stack_t& stack)
+{
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
 	{
-		llwarns << "Unknown control type " << ctrl_type << llendl;
-		return NULL;
+		node->setStringValue(*((std::string*)val_ptr));
+		return true;
 	}
+	return false;
+}
 
-	if (parent == NULL)
+bool LLXUIParser::readU8Value(void* val_ptr)
+{
+	return mCurReadNode->getByteValue(1, (U8*)val_ptr);
+}
+
+bool LLXUIParser::writeU8Value(const void* val_ptr, const name_stack_t& stack)
+{
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
 	{
-		if (mDummyPanel == NULL)
-		{
-			mDummyPanel = new LLPanel;
-		}
-		parent = mDummyPanel;
+		node->setUnsignedValue(*((U8*)val_ptr));
+		return true;
 	}
-	LLView *ctrl = func(node, parent, this);
+	return false;
+}
 
-	return ctrl;
+bool LLXUIParser::readS8Value(void* val_ptr)
+{
+	S32 value;
+	if(mCurReadNode->getIntValue(1, &value))
+	{
+		*((S8*)val_ptr) = value;
+		return true;
+	}
+	return false;
 }
 
-LLView* LLUICtrlFactory::createWidget(LLPanel *parent, LLXMLNodePtr node)
+bool LLXUIParser::writeS8Value(const void* val_ptr, const name_stack_t& stack)
 {
-	LLView* view = createCtrlWidget(parent, node);
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
+	{
+		node->setIntValue(*((S8*)val_ptr));
+		return true;
+	}
+	return false;
+}
 
-	S32 tab_group = parent->getLastTabGroup();
-	node->getAttributeS32("tab_group", tab_group);
+bool LLXUIParser::readU16Value(void* val_ptr)
+{
+	U32 value;
+	if(mCurReadNode->getUnsignedValue(1, &value))
+	{
+		*((U16*)val_ptr) = value;
+		return true;
+	}
+	return false;
+}
 
-	if (view)
+bool LLXUIParser::writeU16Value(const void* val_ptr, const name_stack_t& stack)
+{
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
 	{
-		parent->addChild(view, tab_group);
+		node->setUnsignedValue(*((U16*)val_ptr));
+		return true;
 	}
+	return false;
+}
 
-	return view;
+bool LLXUIParser::readS16Value(void* val_ptr)
+{
+	S32 value;
+	if(mCurReadNode->getIntValue(1, &value))
+	{
+		*((S16*)val_ptr) = value;
+		return true;
+	}
+	return false;
 }
 
-//-----------------------------------------------------------------------------
-// createFactoryPanel()
-//-----------------------------------------------------------------------------
-LLPanel* LLUICtrlFactory::createFactoryPanel(const std::string& name)
+bool LLXUIParser::writeS16Value(const void* val_ptr, const name_stack_t& stack)
 {
-	std::deque<const LLCallbackMap::map_t*>::iterator itor;
-	for (itor = mFactoryStack.begin(); itor != mFactoryStack.end(); ++itor)
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
 	{
-		const LLCallbackMap::map_t* factory_map = *itor;
+		node->setIntValue(*((S16*)val_ptr));
+		return true;
+	}
+	return false;
+}
 
-		// Look up this panel's name in the map.
-		LLCallbackMap::map_const_iter_t iter = factory_map->find( name );
-		if (iter != factory_map->end())
-		{
-			// Use the factory to create the panel, instead of using a default LLPanel.
-			LLPanel *ret = (LLPanel*) iter->second.mCallback( iter->second.mData );
-			return ret;
-		}
+bool LLXUIParser::readU32Value(void* val_ptr)
+{
+	return mCurReadNode->getUnsignedValue(1, (U32*)val_ptr);
+}
+
+bool LLXUIParser::writeU32Value(const void* val_ptr, const name_stack_t& stack)
+{
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
+	{
+		node->setUnsignedValue(*((U32*)val_ptr));
+		return true;
 	}
-	return NULL;
+	return false;
 }
 
-//-----------------------------------------------------------------------------
+bool LLXUIParser::readS32Value(void* val_ptr)
+{
+	return mCurReadNode->getIntValue(1, (S32*)val_ptr);
+}
 
-//static
-BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const std::string& name, LLColor4& color)
+bool LLXUIParser::writeS32Value(const void* val_ptr, const name_stack_t& stack)
 {
-	std::string colorstring;
-	BOOL res = node->getAttributeString(name.c_str(), colorstring);
-	if (res && LLUI::sColorsGroup)
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
 	{
-		if (LLUI::sColorsGroup->controlExists(colorstring))
-		{
-			color.setVec(LLUI::sColorsGroup->getColor(colorstring));
-		}
-		else
-		{
-			res = FALSE;
-		}
+		node->setIntValue(*((S32*)val_ptr));
+		return true;
 	}
-	if (!res)
+	return false;
+}
+
+bool LLXUIParser::readF32Value(void* val_ptr)
+{
+	return mCurReadNode->getFloatValue(1, (F32*)val_ptr);
+}
+
+bool LLXUIParser::writeF32Value(const void* val_ptr, const name_stack_t& stack)
+{
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
 	{
-		res = LLColor4::parseColor(colorstring, &color);
-	}	
-	if (!res)
+		node->setFloatValue(*((F32*)val_ptr));
+		return true;
+	}
+	return false;
+}
+
+bool LLXUIParser::readF64Value(void* val_ptr)
+{
+	return mCurReadNode->getDoubleValue(1, (F64*)val_ptr);
+}
+
+bool LLXUIParser::writeF64Value(const void* val_ptr, const name_stack_t& stack)
+{
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
 	{
-		res = node->getAttributeColor(name.c_str(), color);
+		node->setDoubleValue(*((F64*)val_ptr));
+		return true;
 	}
-	return res;
+	return false;
 }
 
+bool LLXUIParser::readColor4Value(void* val_ptr)
+{
+	LLColor4* colorp = (LLColor4*)val_ptr;
+	if(mCurReadNode->getFloatValue(4, colorp->mV) >= 3)
+	{
+		return true;
+	}
+
+	return false;
+}
+
+bool LLXUIParser::writeColor4Value(const void* val_ptr, const name_stack_t& stack)
+{
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
+	{
+		LLColor4 color = *((LLColor4*)val_ptr);
+		node->setFloatValue(4, color.mV);
+		return true;
+	}
+	return false;
+}
+
+bool LLXUIParser::readUIColorValue(void* val_ptr)
+{
+	LLUIColor* param = (LLUIColor*)val_ptr;
+	LLColor4 color;
+	bool success =  mCurReadNode->getFloatValue(4, color.mV) >= 3;
+	if (success)
+	{
+		param->set(color);
+		return true;
+	}
+	return false;
+}
+
+bool LLXUIParser::writeUIColorValue(const void* val_ptr, const name_stack_t& stack)
+{
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
+	{
+		LLUIColor color = *((LLUIColor*)val_ptr);
+		node->setFloatValue(4, color.get().mV);
+		return true;
+	}
+	return false;
+}
+
+bool LLXUIParser::readUUIDValue(void* val_ptr)
+{
+	LLUUID temp_id;
+	// LLUUID::set is destructive, so use temporary value
+	if (temp_id.set(mCurReadNode->getSanitizedValue()))
+	{
+		*(LLUUID*)(val_ptr) = temp_id;
+		return true;
+	}
+	return false;
+}
+
+bool LLXUIParser::writeUUIDValue(const void* val_ptr, const name_stack_t& stack)
+{
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
+	{
+		node->setStringValue(((LLUUID*)val_ptr)->asString());
+		return true;
+	}
+	return false;
+}
+
+bool LLXUIParser::readSDValue(void* val_ptr)
+{
+	*((LLSD*)val_ptr) = LLSD(mCurReadNode->getSanitizedValue());
+	return true;
+}
+
+bool LLXUIParser::writeSDValue(const void* val_ptr, const name_stack_t& stack)
+{
+	LLXMLNodePtr node = getNode(stack);
+	if (node.notNull())
+	{
+		node->setStringValue(((LLSD*)val_ptr)->asString());
+		return true;
+	}
+	return false;
+}
+
+/*virtual*/ std::string LLXUIParser::getCurrentElementName()
+{
+	std::string full_name;
+	for (name_stack_t::iterator it = mNameStack.begin();	
+		it != mNameStack.end();
+		++it)
+	{
+		full_name += it->first + "."; // build up dotted names: "button.param.nestedparam."
+	}
+
+	return full_name;
+}
+
+void LLXUIParser::parserWarning(const std::string& message)
+{
+#ifdef LL_WINDOWS
+	// use Visual Studo friendly formatting of output message for easy access to originating xml
+	llutf16string utf16str = utf8str_to_utf16str(llformat("%s(%d):\t%s", LLUICtrlFactory::getInstance()->getCurFileName().c_str(), mCurReadNode->getLineNumber(), message.c_str()).c_str());
+	utf16str += '\n';
+	OutputDebugString(utf16str.c_str());
+#else
+	Parser::parserWarning(message);
+#endif
+}
+
+void LLXUIParser::parserError(const std::string& message)
+{
+#ifdef LL_WINDOWS
+	llutf16string utf16str = utf8str_to_utf16str(llformat("%s(%d):\t%s", LLUICtrlFactory::getInstance()->getCurFileName().c_str(), mCurReadNode->getLineNumber(), message.c_str()).c_str());
+	utf16str += '\n';
+	OutputDebugString(utf16str.c_str());
+#else
+	Parser::parserError(message);
+#endif
+}
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 5e7c24efc0..5b04557368 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -33,68 +33,326 @@
 #ifndef LLUICTRLFACTORY_H
 #define LLUICTRLFACTORY_H
 
+#include "llcallbackmap.h"
+#include "llinitparam.h"
+#include "llxmlnode.h"
+
+#include <boost/function.hpp>
 #include <iosfwd>
 #include <stack>
 
-#include "llcallbackmap.h"
-#include "llfloater.h"
-
-class LLView;
 class LLPanel;
+class LLFloater;
+class LLView;
 
-class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
+class LLXUIParser : public LLInitParam::Parser, public LLSingleton<LLXUIParser>
 {
+LOG_CLASS(LLXUIParser);
+
+protected:
+	LLXUIParser();
+	friend class LLSingleton<LLXUIParser>;
 public:
+	typedef LLInitParam::Parser::name_stack_t name_stack_t;
+
+	/*virtual*/ std::string getCurrentElementName();
+	/*virtual*/ void parserWarning(const std::string& message);
+	/*virtual*/ void parserError(const std::string& message);
+
+	void readXUI(LLXMLNodePtr node, LLInitParam::BaseBlock& block, bool silent=false);
+	void writeXUI(LLXMLNodePtr node, const LLInitParam::BaseBlock& block, const LLInitParam::BaseBlock* diff_block = NULL);
+
+private:
+	typedef std::list<std::pair<std::string, bool> >	token_list_t;
+
+	bool readXUIImpl(LLXMLNodePtr node, const std::string& scope, LLInitParam::BaseBlock& block);
+	bool readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block);
+
+	//reader helper functions
+	bool readBoolValue(void* val_ptr);
+	bool readStringValue(void* val_ptr);
+	bool readU8Value(void* val_ptr);
+	bool readS8Value(void* val_ptr);
+	bool readU16Value(void* val_ptr);
+	bool readS16Value(void* val_ptr);
+	bool readU32Value(void* val_ptr);
+	bool readS32Value(void* val_ptr);
+	bool readF32Value(void* val_ptr);
+	bool readF64Value(void* val_ptr);
+	bool readColor4Value(void* val_ptr);
+	bool readUIColorValue(void* val_ptr);
+	bool readUUIDValue(void* val_ptr);
+	bool readSDValue(void* val_ptr);
+
+	//writer helper functions
+	bool writeBoolValue(const void* val_ptr, const name_stack_t&);
+	bool writeStringValue(const void* val_ptr, const name_stack_t&);
+	bool writeU8Value(const void* val_ptr, const name_stack_t&);
+	bool writeS8Value(const void* val_ptr, const name_stack_t&);
+	bool writeU16Value(const void* val_ptr, const name_stack_t&);
+	bool writeS16Value(const void* val_ptr, const name_stack_t&);
+	bool writeU32Value(const void* val_ptr, const name_stack_t&);
+	bool writeS32Value(const void* val_ptr, const name_stack_t&);
+	bool writeF32Value(const void* val_ptr, const name_stack_t&);
+	bool writeF64Value(const void* val_ptr, const name_stack_t&);
+	bool writeColor4Value(const void* val_ptr, const name_stack_t&);
+	bool writeUIColorValue(const void* val_ptr, const name_stack_t&);
+	bool writeUUIDValue(const void* val_ptr, const name_stack_t&);
+	bool writeSDValue(const void* val_ptr, const name_stack_t&);
+
+	LLXMLNodePtr getNode(const name_stack_t& stack);
+
+private:
+	Parser::name_stack_t			mNameStack;
+	LLXMLNodePtr					mCurReadNode;
+	// Root of the widget XML sub-tree, for example, "line_editor"
+	LLXMLNodePtr					mWriteRootNode;
+	S32								mLastWriteGeneration;
+	LLXMLNodePtr					mLastWrittenChild;
+};
+
+// global static instance for registering all widget types
+typedef boost::function<LLView* (LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)> LLWidgetCreatorFunc;
+
+class LLWidgetCreatorRegistry : public LLRegistrySingleton<std::string, LLWidgetCreatorFunc, LLWidgetCreatorRegistry>
+{
+protected:
+	LLWidgetCreatorRegistry() {}
+	
+private:
+	friend class LLSingleton<LLWidgetCreatorRegistry>;
+};
+
+struct LLCompareTypeID
+{
+	bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
+	{
+		return lhs->before(*rhs);
+	}
+};
+
+
+class LLWidgetTemplateRegistry 
+:	public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetTemplateRegistry, LLCompareTypeID>
+{
+
+};
+
+// local static instance for registering a particular widget
+template<typename T, typename PARAM_BLOCK = typename T::Params>
+class LLRegisterWidget
+:	public LLWidgetCreatorRegistry::StaticRegistrar
+{
+public:
+	// register with either the provided builder, or the generic templated builder
+	LLRegisterWidget(const char* tag, LLWidgetCreatorFunc func = NULL);
+};
+
+class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
+{
+private:
+	friend class LLSingleton<LLUICtrlFactory>;
 	LLUICtrlFactory();
-	// do not call!  needs to be public so run-time can clean up the singleton
-	virtual ~LLUICtrlFactory();
+	~LLUICtrlFactory();
+
+	// only partial specialization allowed in inner classes, so use extra dummy parameter
+	template <typename T, int DUMMY>
+	class ParamDefaults : public LLSingleton<ParamDefaults<T, DUMMY> > 
+	{
+	public:
+		ParamDefaults()
+		{
+			// recursively initialize from base class param block
+			((typename T::base_block_t&)mPrototype).fillFrom(ParamDefaults<typename T::base_block_t, DUMMY>::instance().get());
+			// after initializing base classes, look up template file for this param block
+			std::string* param_block_tag = LLWidgetTemplateRegistry::instance().getValue(&typeid(T));
+			if (param_block_tag)
+			{
+				LLUICtrlFactory::loadWidgetTemplate(*param_block_tag, mPrototype);
+			}
+		}
 
-	void setupPaths();
+		const T& get() { return mPrototype; }
 
-	void buildFloater(LLFloater* floaterp, const std::string &filename, 
-					const LLCallbackMap::map_t* factory_map = NULL, BOOL open = TRUE);
-	BOOL buildPanel(LLPanel* panelp, const std::string &filename,
-					const LLCallbackMap::map_t* factory_map = NULL);
+	private:
+		T mPrototype;
+	};
 
-	void removePanel(LLPanel* panelp) { mBuiltPanels.erase(panelp->getHandle()); }
-	void removeFloater(LLFloater* floaterp) { mBuiltFloaters.erase(floaterp->getHandle()); }
+	// base case for recursion, there are NO base classes of LLInitParam::BaseBlock
+	template<int DUMMY>
+	class ParamDefaults<LLInitParam::BaseBlock, DUMMY> : public LLSingleton<ParamDefaults<LLInitParam::BaseBlock, DUMMY> >
+	{
+	public:
+		const LLInitParam::BaseBlock& get() { return mBaseBlock; }
+	private:
+		LLInitParam::BaseBlock mBaseBlock;
+	};
 
-	class LLMenuGL *buildMenu(const std::string &filename, LLView* parentp);
-	class LLPieMenu *buildPieMenu(const std::string &filename, LLView* parentp);
+public:
+
+	template<typename T>
+	static const T& getDefaultParams()
+	{
+		//#pragma message("Generating ParamDefaults")
+		return ParamDefaults<T, 0>::instance().get();
+	}
+
+	void buildFloater(LLFloater* floaterp, const std::string &filename, BOOL open_floater = TRUE, LLXMLNodePtr output_node = NULL);
+	LLFloater* buildFloaterFromXML(const std::string& filename, BOOL open_floater = TRUE);
+	BOOL buildPanel(LLPanel* panelp, const std::string &filename, LLXMLNodePtr output_node = NULL);
 
 	// Does what you want for LLFloaters and LLPanels
 	// Returns 0 on success
 	S32 saveToXML(LLView* viewp, const std::string& filename);
 
-	// Rebuilds all currently built panels.
-	void rebuild();
+	std::string getCurFileName() { return mFileNames.empty() ? "" : mFileNames.back(); }
 
 	static BOOL getAttributeColor(LLXMLNodePtr node, const std::string& name, LLColor4& color);
 
 	LLPanel* createFactoryPanel(const std::string& name);
 
-	virtual LLView* createCtrlWidget(LLPanel *parent, LLXMLNodePtr node);
-	virtual LLView* createWidget(LLPanel *parent, LLXMLNodePtr node);
+	void pushFactoryFunctions(const LLCallbackMap::map_t* map);
+	void popFactoryFunctions();
 
-	static bool getLayeredXMLNode(const std::string &filename, LLXMLNodePtr& root);
+	template<typename T>
+	static T* create(typename T::Params& params, LLView* parent = NULL)
+	{
+		//#pragma message("Generating LLUICtrlFactory::create")
+		params.fillFrom(ParamDefaults<typename T::Params, 0>::instance().get());
+		//S32 foo = "test";
 
-	static const std::vector<std::string>& getXUIPaths();
+		if (!params.validateBlock())
+		{
+			llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl;
+		}
+		T* widget = new T(params);
+		widget->initFromParams(params);
+		if (parent)
+			widget->setParent(parent);
+		return widget;
+	}
 
-private:
-	bool getLayeredXMLNodeImpl(const std::string &filename, LLXMLNodePtr& root);
+	LLView* createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename = LLStringUtil::null,  LLXMLNodePtr output_node = NULL);
+
+	template<typename T>
+	static T* createFromFile(const std::string &filename, LLView *parent)
+	{
+		//#pragma message("Generating LLUICtrlFactory::createFromFile")
+		T* widget = NULL;
+
+		std::string skinned_filename = findSkinnedFilename(filename);
+		getInstance()->mFileNames.push_back(skinned_filename);
+		{
+			LLXMLNodePtr root_node;
+
+			if (LLUICtrlFactory::getLayeredXMLNode(filename, root_node))
+			{
+				LLView* view = getInstance()->createFromXML(root_node, parent, filename);
+				if (view)
+				{
+					widget = dynamic_cast<T*>(view);
+					// not of right type, so delete it
+					if (!widget) 
+					{
+						delete view;
+						view = NULL;
+					}
+				
+				}
+			}
+			else
+			{
+				llwarns << "Couldn't parse XUI file: " << skinned_filename << llendl;
+			}
+		}
+		getInstance()->mFileNames.pop_back();
 
-	typedef std::map<LLHandle<LLPanel>, std::string> built_panel_t;
-	built_panel_t mBuiltPanels;
+		return widget;
+	}
 
-	typedef std::map<LLHandle<LLFloater>, std::string> built_floater_t;
-	built_floater_t mBuiltFloaters;
+	template <class T> 
+	static T* createDummyWidget(const std::string& name) 
+	{
+		//#pragma message("Generating LLUICtrlFactory::createDummyWidget")
+		typename T::Params params;
+		params.name(name);
+		
+		return create<T>(params);
+	}
 
-	std::deque<const LLCallbackMap::map_t*> mFactoryStack;
+	template<typename T, typename PARAM_BLOCK>
+	static T* defaultBuilder(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)
+	{
+		//#pragma message("Generating LLUICtrlFactory::defaultBuilder")
+		PARAM_BLOCK params(getDefaultParams<PARAM_BLOCK>());
 
-	static std::vector<std::string> sXUIPaths;
+		LLXUIParser::instance().readXUI(node, params);
 
-	LLPanel* mDummyPanel;
+		if (output_node)
+		{
+			// We always want to output top-left coordinates
+			PARAM_BLOCK output_params(params);
+			T::setupParamsForExport(output_params, parent);
+			// Export only the differences between this any default params
+			PARAM_BLOCK default_params(getDefaultParams<PARAM_BLOCK>());
+			output_node->setName(node->getName()->mString);
+			LLXUIParser::instance().writeXUI(
+				output_node, output_params, &default_params);
+		}
+
+		// Apply layout transformations, usually munging rect
+		T::setupParams(params, parent);
+
+		if (!params.validateBlock())
+		{
+			llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl;
+		}
+		T* widget = new T(params);
+		widget->initFromParams(params);
+
+		if (parent)
+		{
+			S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : -1;
+			setCtrlParent(widget, parent, tab_group);
+		}
+
+		widget->addChildren(node, output_node);
+
+		if (!widget->postBuild())
+		{
+			delete widget;
+			return NULL;
+		}
+
+		return widget;
+	}
+
+	static bool getLayeredXMLNode(const std::string &filename, LLXMLNodePtr& root);
+
+	static void loadWidgetTemplate(const std::string& widget_tag, LLInitParam::BaseBlock& block);
+
+private:
+	//static void setCtrlValue(LLView* view, LLXMLNodePtr node);
+	static void setCtrlParent(LLView* view, LLView* parent, S32 tab_group);
+
+	// Avoid directly using LLUI and LLDir in the template code
+	static std::string findSkinnedFilename(const std::string& filename);
+
+	typedef std::deque<const LLCallbackMap::map_t*> factory_stack_t;
+	factory_stack_t					mFactoryStack;
+
+	LLPanel*		mDummyPanel;
+	std::vector<std::string>	mFileNames;
 };
 
+// this is here to make gcc happy with reference to LLUICtrlFactory
+template<typename T, typename PARAM_BLOCK>
+LLRegisterWidget<T, PARAM_BLOCK>::LLRegisterWidget(const char* tag, LLWidgetCreatorFunc func)
+:	LLWidgetCreatorRegistry::StaticRegistrar(tag, func.empty() ? (LLWidgetCreatorFunc)&LLUICtrlFactory::defaultBuilder<T, PARAM_BLOCK> : func)
+{
+	//FIXME: inventory_panel will register itself with LLPanel::Params but it does have its own params...:(
+	LLWidgetTemplateRegistry::instance().defaultRegistrar().add(&typeid(PARAM_BLOCK), tag);
+}
+
 
 #endif //LLUICTRLFACTORY_H
diff --git a/indra/llui/lluifwd.h b/indra/llui/lluifwd.h
index 32d5c9b44f..f99bb39fdd 100644
--- a/indra/llui/lluifwd.h
+++ b/indra/llui/lluifwd.h
@@ -53,7 +53,6 @@ class LLSlider;
 class LLSliderCtrl;
 class LLSpinCtrl;
 class LLTabContainer;
-class LLTabContainerVertical;
 class LLTextBox;
 class LLTextEditor;
 class LLTextureCtrl;
diff --git a/indra/llui/lluiimage.cpp b/indra/llui/lluiimage.cpp
new file mode 100644
index 0000000000..0ed2283742
--- /dev/null
+++ b/indra/llui/lluiimage.cpp
@@ -0,0 +1,158 @@
+/** 
+ * @file lluiimage.cpp
+ * @brief UI implementation
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ * 
+ * Copyright (c) 2007-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Utilities functions the user interface needs
+
+//#include "llviewerprecompiledheaders.h"
+#include "linden_common.h"
+
+// Project includes
+#include "lluiimage.h"
+#include "llui.h"
+
+LLUIImage::LLUIImage(const std::string& name, LLPointer<LLImageGL> image) :
+						mName(name),
+						mImage(image),
+						mScaleRegion(0.f, 1.f, 1.f, 0.f),
+						mClipRegion(0.f, 1.f, 1.f, 0.f),
+						mUniformScaling(TRUE),
+						mNoClip(TRUE)
+{
+}
+
+void LLUIImage::setClipRegion(const LLRectf& region) 
+{ 
+	mClipRegion = region; 
+	mNoClip = mClipRegion.mLeft == 0.f
+				&& mClipRegion.mRight == 1.f
+				&& mClipRegion.mBottom == 0.f
+				&& mClipRegion.mTop == 1.f;
+}
+
+void LLUIImage::setScaleRegion(const LLRectf& region) 
+{ 
+	mScaleRegion = region; 
+	mUniformScaling = mScaleRegion.mLeft == 0.f
+					&& mScaleRegion.mRight == 1.f
+					&& mScaleRegion.mBottom == 0.f
+					&& mScaleRegion.mTop == 1.f;
+}
+
+//TODO: move drawing implementation inside class
+void LLUIImage::draw(S32 x, S32 y, const LLColor4& color) const
+{
+	gl_draw_image(x, y, mImage, color, mClipRegion);
+}
+
+void LLUIImage::draw(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) const
+{
+	if (mUniformScaling)
+	{
+		gl_draw_scaled_image(x, y, width, height, mImage, color, mClipRegion);
+	}
+	else
+	{
+		gl_draw_scaled_image_with_border(
+			x, y, 
+			width, height, 
+			mImage, 
+			color,
+			FALSE,
+			mClipRegion,
+			mScaleRegion);
+	}
+}
+
+void LLUIImage::drawSolid(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) const
+{
+	gl_draw_scaled_image_with_border(
+		x, y, 
+		width, height, 
+		mImage, 
+		color, 
+		TRUE,
+		mClipRegion,
+		mScaleRegion);
+}
+
+void LLUIImage::drawBorder(S32 x, S32 y, S32 width, S32 height, const LLColor4& color, S32 border_width) const
+{
+	LLRect border_rect;
+	border_rect.setOriginAndSize(x, y, width, height);
+	border_rect.stretch(border_width, border_width);
+	drawSolid(border_rect, color);
+}
+
+S32 LLUIImage::getWidth() const
+{ 
+	// return clipped dimensions of actual image area
+	return llround((F32)mImage->getWidth(0) * mClipRegion.getWidth()); 
+}
+
+S32 LLUIImage::getHeight() const
+{ 
+	// return clipped dimensions of actual image area
+	return llround((F32)mImage->getHeight(0) * mClipRegion.getHeight()); 
+}
+
+S32 LLUIImage::getTextureWidth() const
+{
+	return mImage->getWidth(0);
+}
+
+S32 LLUIImage::getTextureHeight() const
+{
+	return mImage->getHeight(0);
+}
+
+namespace LLInitParam
+{
+	LLUIImage* TypedParam<LLUIImage*>::getValueFromBlock() const
+	{
+		LLUIImage* imagep =  LLUI::getUIImage(name());
+		if (!imagep)
+		{
+			// default to current value
+			imagep = mData.mValue;
+		}
+		return imagep;
+	}
+
+	template<>
+	bool ParamCompare<LLUIImage*>::equals(
+		LLUIImage* const &a,
+		LLUIImage* const &b)
+	{
+		// force all LLUIImages for XML UI export to be "non-default"
+		return false;
+	}
+}
diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h
new file mode 100644
index 0000000000..cd660a0954
--- /dev/null
+++ b/indra/llui/lluiimage.h
@@ -0,0 +1,113 @@
+/** 
+ * @file lluiimage.h
+ * @brief wrapper for images used in the UI that handles smart scaling, etc.
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ * 
+ * Copyright (c) 2007-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLUIIMAGE_H
+#define LL_LLUIIMAGE_H
+
+#include "llgl.h"
+#include "llimagegl.h"
+#include "llrefcount.h"
+#include "llrect.h"
+#include <boost/function.hpp>
+#include "llinitparam.h"
+
+extern const LLColor4 UI_VERTEX_COLOR;
+
+class LLUIImage : public LLRefCount
+{
+public:
+	LLUIImage(const std::string& name, LLPointer<LLImageGL> image);
+
+	void setClipRegion(const LLRectf& region);
+	void setScaleRegion(const LLRectf& region);
+
+	LLPointer<LLImageGL> getImage() { return mImage; }
+	const LLPointer<LLImageGL>& getImage() const { return mImage; }
+
+	void draw(S32 x, S32 y, S32 width, S32 height, const LLColor4& color = UI_VERTEX_COLOR) const;
+	void draw(S32 x, S32 y, const LLColor4& color = UI_VERTEX_COLOR) const;
+	void draw(const LLRect& rect, const LLColor4& color = UI_VERTEX_COLOR) const { draw(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color); }
+	
+	void drawSolid(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) const;
+	void drawSolid(const LLRect& rect, const LLColor4& color) const { drawSolid(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color); }
+	void drawSolid(S32 x, S32 y, const LLColor4& color) const { drawSolid(x, y, mImage->getWidth(0), mImage->getHeight(0), color); }
+
+	void drawBorder(S32 x, S32 y, S32 width, S32 height, const LLColor4& color, S32 border_width) const;
+	void drawBorder(const LLRect& rect, const LLColor4& color, S32 border_width) const { drawBorder(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color, border_width); }
+	void drawBorder(S32 x, S32 y, const LLColor4& color, S32 border_width) const { drawBorder(x, y, mImage->getWidth(0), mImage->getHeight(0), color, border_width); }
+	
+	const std::string& getName() const { return mName; }
+
+	S32 getWidth() const;
+	S32 getHeight() const;
+
+	// returns dimensions of underlying textures, which might not be equal to ui image portion
+	S32 getTextureWidth() const;
+	S32 getTextureHeight() const;
+
+protected:
+	std::string			mName;
+	LLRectf				mScaleRegion;
+	LLRectf				mClipRegion;
+	LLPointer<LLImageGL> mImage;
+	BOOL				mUniformScaling;
+	BOOL				mNoClip;
+};
+
+namespace LLInitParam
+{
+	template<>
+	class TypedParam<LLUIImage*, TypeValues<LLUIImage*>, false> 
+	:	public BlockValue<LLUIImage*>
+	{
+		typedef boost::add_reference<boost::add_const<LLUIImage*>::type>::type	T_const_ref;
+		typedef BlockValue<LLUIImage*> super_t;
+	public:
+		Optional<std::string> name;
+
+		TypedParam(BlockDescriptor& descriptor, const std::string& name, super_t::value_assignment_t value, ParamDescriptor::validation_func_t func)
+		:	super_t(descriptor, name, value, func)
+		{
+		}
+
+		LLUIImage* getValueFromBlock() const;
+	};
+
+	// Need custom comparison function for our test app, which only loads
+	// LLUIImage* as NULL.
+	template<>
+	bool ParamCompare<LLUIImage*>::equals(
+		LLUIImage* const &a, LLUIImage* const &b);
+}
+
+typedef LLPointer<LLUIImage> LLUIImagePtr;
+#endif
diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp
index 0b76b8e814..ce73990d27 100644
--- a/indra/llui/lluistring.cpp
+++ b/indra/llui/lluistring.cpp
@@ -33,6 +33,7 @@
 #include "linden_common.h"
 #include "lluistring.h"
 #include "llsd.h"
+#include "lltrans.h"
 
 const LLStringUtil::format_map_t LLUIString::sNullArgs;
 
@@ -112,6 +113,10 @@ void LLUIString::clear()
 void LLUIString::format()
 {
 	mResult = mOrig;
-	LLStringUtil::format(mResult, mArgs);
+	
+	// get the defailt args + local args
+	LLStringUtil::format_map_t combined_args = LLTrans::getDefaultArgs();
+	combined_args.insert(mArgs.begin(), mArgs.end());
+	LLStringUtil::format(mResult, combined_args);
 	mWResult = utf8str_to_wstring(mResult);
 }
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 2350ea6050..462fd16b60 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -56,17 +56,18 @@
 #include "lltexteditor.h"
 #include "lltextbox.h"
 
-//HACK: this allows you to instantiate LLView from xml with "<view/>" which we don't want
-static LLRegisterWidget<LLView> r("view");
-
 BOOL	LLView::sDebugRects = FALSE;
 BOOL	LLView::sDebugKeys = FALSE;
 S32		LLView::sDepth = 0;
 BOOL	LLView::sDebugMouseHandling = FALSE;
 std::string LLView::sMouseHandlerMessage;
-BOOL	LLView::sEditingUI = FALSE;
+//BOOL	LLView::sEditingUI = FALSE;
 BOOL	LLView::sForceReshape = FALSE;
-LLView*	LLView::sEditingUIView = NULL;
+//LLView*	LLView::sEditingUIView = NULL;
+std::set<LLView*> LLView::sPreviewHighlightedElements;
+BOOL LLView::sHighlightingDiffs = FALSE;
+LLView* LLView::sPreviewClickedElement = NULL;
+BOOL	LLView::sDrawPreviewHighlights = FALSE;
 S32		LLView::sLastLeftXML = S32_MIN;
 S32		LLView::sLastBottomXML = S32_MIN;
 
@@ -74,77 +75,76 @@ S32		LLView::sLastBottomXML = S32_MIN;
 BOOL LLView::sIsDrawing = FALSE;
 #endif
 
-LLView::LLView() :
-	mParentView(NULL),
-	mReshapeFlags(FOLLOWS_NONE),
-	mDefaultTabGroup(0),
-	mEnabled(TRUE),
-	mMouseOpaque(TRUE),
-	mSoundFlags(MOUSE_UP), // default to only make sound on mouse up
-	mSaveToXML(TRUE),
-	mIsFocusRoot(FALSE),
-	mLastVisible(TRUE),
-	mUseBoundingRect(FALSE),
-	mVisible(TRUE),
-	mNextInsertionOrdinal(0),
-	mHoverCursor(UI_CURSOR_ARROW)
-{
-}
-
-LLView::LLView(const std::string& name, BOOL mouse_opaque) :
+LLView::Params::Params()
+:	name("name", std::string("unnamed")),
+	enabled("enabled", true),
+	visible("visible", true),
+	mouse_opaque("mouse_opaque", true),
+	follows("follows"),
+	hover_cursor("hover_cursor", "UI_CURSOR_ARROW"),
+	use_bounding_rect("use_bounding_rect", false),
+	tab_group("tab_group", 0),
+	default_tab_group("default_tab_group"),
+	tool_tip("tool_tip"),
+	sound_flags("sound_flags", MOUSE_UP),
+	font("font", LLFontGL::getFontSansSerif()),
+	font_halign("halign"),
+	font_valign("valign"),
+	layout("layout"),
+	rect("rect"),
+	bottom_delta("bottom_delta", S32_MAX),
+	left_delta("left_delta", S32_MAX),
+	top_delta("top_delta"),
+	right_delta("right_delta"),
+	center_horiz("center_horiz", false),
+	center_vert("center_vert", false),
+	serializable("", false),
+	user_resize("user_resize"),
+	auto_resize("auto_resize"),
+	needs_translate("translate")
+{
+	addSynonym(rect, "");
+}
+
+LLView::LLView(const LLView::Params& p)
+:	mName(p.name),
 	mParentView(NULL),
-	mName(name),
 	mReshapeFlags(FOLLOWS_NONE),
-	mDefaultTabGroup(0),
-	mEnabled(TRUE),
-	mMouseOpaque(mouse_opaque),
-	mSoundFlags(MOUSE_UP), // default to only make sound on mouse up
-	mSaveToXML(TRUE),
-	mIsFocusRoot(FALSE),
-	mLastVisible(TRUE),
-	mUseBoundingRect(FALSE),
-	mVisible(TRUE),
-	mNextInsertionOrdinal(0),
-	mHoverCursor(UI_CURSOR_ARROW)
-{
-}
-
-
-LLView::LLView(
-	const std::string& name, const LLRect& rect, BOOL mouse_opaque, U32 reshape) :
-	mParentView(NULL),
-	mName(name),
-	mRect(rect),
-	mBoundingRect(rect),
-	mReshapeFlags(reshape),
-	mDefaultTabGroup(0),
-	mEnabled(TRUE),
-	mMouseOpaque(mouse_opaque),
-	mSoundFlags(MOUSE_UP), // default to only make sound on mouse up
-	mSaveToXML(TRUE),
+	mSaveToXML(p.serializable),
 	mIsFocusRoot(FALSE),
-	mLastVisible(TRUE),
-	mUseBoundingRect(FALSE),
-	mVisible(TRUE),
+	mLastVisible(FALSE),
 	mNextInsertionOrdinal(0),
-	mHoverCursor(UI_CURSOR_ARROW)
+	mHoverCursor(getCursorFromString(p.hover_cursor)),
+	mEnabled(p.enabled),
+	mVisible(p.visible),
+	mMouseOpaque(p.mouse_opaque),
+	mSoundFlags(p.sound_flags),
+	mUseBoundingRect(p.use_bounding_rect),
+	mDefaultTabGroup(p.default_tab_group),
+	mLastTabGroup(0),
+	mToolTipMsg((LLStringExplicit)p.tool_tip())
 {
+	// create rect first, as this will supply initial follows flags
+	setShape(p.rect);
+	parseFollowsFlags(p);
 }
 
-
 LLView::~LLView()
 {
 	//llinfos << "Deleting view " << mName << ":" << (void*) this << llendl;
 // 	llassert(LLView::sIsDrawing == FALSE);
+	
+//	llassert_always(sDepth == 0); // avoid deleting views while drawing! It can subtly break list iterators
+	
 	if( gFocusMgr.getKeyboardFocus() == this )
 	{
-		llwarns << "View holding keyboard focus deleted: " << getName() << ".  Keyboard focus removed." << llendl;
+		//llwarns << "View holding keyboard focus deleted: " << getName() << ".  Keyboard focus removed." << llendl;
 		gFocusMgr.removeKeyboardFocusWithoutCallback( this );
 	}
 
 	if( hasMouseCapture() )
 	{
-		llwarns << "View holding mouse capture deleted: " << getName() << ".  Mouse capture removed." << llendl;
+		//llwarns << "View holding mouse capture deleted: " << getName() << ".  Mouse capture removed." << llendl;
 		gFocusMgr.removeMouseCaptureWithoutCallback( this );
 	}
 
@@ -155,14 +155,6 @@ LLView::~LLView()
 		mParentView->removeChild(this);
 	}
 
-	dispatch_list_t::iterator itor;
-	for (itor = mDispatchList.begin(); itor != mDispatchList.end(); ++itor)
-	{
-		(*itor).second->clearDispatchers();
-	}
-
-	std::for_each(mFloaterControls.begin(), mFloaterControls.end(),
-				  DeletePairedPointer());
 	std::for_each(mDummyWidgets.begin(), mDummyWidgets.end(),
 				  DeletePairedPointer());
 }
@@ -185,7 +177,6 @@ BOOL LLView::isPanel() const
 	return FALSE;
 }
 
-// virtual
 void LLView::setToolTip(const LLStringExplicit& msg)
 {
 	mToolTipMsg = msg;
@@ -232,19 +223,31 @@ const std::string& LLView::getName() const
 
 void LLView::sendChildToFront(LLView* child)
 {
+// 	llassert_always(sDepth == 0); // Avoid re-ordering while drawing; it can cause subtle iterator bugs
 	if (child && child->getParent() == this) 
 	{
-		mChildList.remove( child );
-		mChildList.push_front(child);
+		// minor optimization, but more importantly,
+		//  won't temporarily create an empty list
+		if (child != mChildList.front())
+		{
+			mChildList.remove( child );
+			mChildList.push_front(child);
+		}
 	}
 }
 
 void LLView::sendChildToBack(LLView* child)
 {
+// 	llassert_always(sDepth == 0); // Avoid re-ordering while drawing; it can cause subtle iterator bugs
 	if (child && child->getParent() == this) 
 	{
-		mChildList.remove( child );
-		mChildList.push_back(child);
+		// minor optimization, but more importantly,
+		//  won't temporarily create an empty list
+		if (child != mChildList.back())
+		{
+			mChildList.remove( child );
+			mChildList.push_back(child);
+		}
 	}
 }
 
@@ -264,12 +267,46 @@ void LLView::moveChildToBackOfTabGroup(LLUICtrl* child)
 	}
 }
 
-void LLView::addChild(LLView* child, S32 tab_group)
+void LLView::addChildren(LLXMLNodePtr node, LLXMLNodePtr output_node)
+{
+	if (node.isNull()) return;
+
+	for (LLXMLNodePtr child_node = node->getFirstChild(); child_node.notNull(); child_node = child_node->getNextSibling())
+	{
+		LLXMLNodePtr outputChild;
+		if (output_node) 
+		{
+			outputChild = output_node->createChild("", FALSE);
+		}
+
+		if (!LLUICtrlFactory::getInstance()->createFromXML(child_node, this, LLStringUtil::null, outputChild))
+		{
+			std::string child_name = std::string(child_node->getName()->mString);
+			if (child_name.find(".") == std::string::npos)
+			{
+				llwarns << "Could not create widget named " << child_node->getName()->mString << llendl;
+			}
+		}
+
+		if (outputChild && !outputChild->mChildren && outputChild->mAttributes.empty() && outputChild->getValue().empty())
+		{
+			output_node->deleteChild(outputChild);
+		}
+	}
+}
+
+// virtual
+bool LLView::addChild(LLView* child, S32 tab_group)
 {
+	if (!child)
+	{
+		return false;
+	}
 	if (mParentView == child) 
 	{
 		llerrs << "Adding view " << child->getName() << " as child of itself" << llendl;
 	}
+
 	// remove from current parent
 	if (child->mParentView) 
 	{
@@ -282,55 +319,46 @@ void LLView::addChild(LLView* child, S32 tab_group)
 	// add to ctrl list if is LLUICtrl
 	if (child->isCtrl())
 	{
-		// controls are stored in reverse order from render order
-		addCtrlAtEnd((LLUICtrl*) child, tab_group);
+		LLUICtrl* ctrl = static_cast<LLUICtrl*>(child);
+		mCtrlOrder.insert(tab_order_pair_t(ctrl,
+							tab_order_t(tab_group, mNextInsertionOrdinal)));
+
+		mNextInsertionOrdinal++;
 	}
 
 	child->mParentView = this;
 	updateBoundingRect();
+	mLastTabGroup = tab_group;
+	return true;
 }
 
 
-void LLView::addChildAtEnd(LLView* child, S32 tab_group)
+bool LLView::addChildInBack(LLView* child, S32 tab_group)
 {
-	if (mParentView == child) 
-	{
-		llerrs << "Adding view " << child->getName() << " as child of itself" << llendl;
-	}
-	// remove from current parent
-	if (child->mParentView) 
+	if(addChild(child, tab_group))
 	{
-		child->mParentView->removeChild(child);
+		sendChildToBack(child);
+		return true;
 	}
 
-	// add to back of child list
-	mChildList.push_back(child);
-
-	// add to ctrl list if is LLUICtrl
-	if (child->isCtrl())
-	{
-		// controls are stored in reverse order from render order
-		addCtrl((LLUICtrl*) child, tab_group);
-	}
-	
-	child->mParentView = this;
-	updateBoundingRect();
+	return false;
 }
 
 // remove the specified child from the view, and set it's parent to NULL.
-void LLView::removeChild(LLView* child, BOOL deleteIt)
+void LLView::removeChild(LLView* child)
 {
+	//llassert_always(sDepth == 0); // Avoid re-ordering while drawing; it can cause subtle iterator bugs
 	if (child->mParentView == this) 
 	{
 		mChildList.remove( child );
 		child->mParentView = NULL;
 		if (child->isCtrl())
 		{
-			removeCtrl((LLUICtrl*)child);
-		}
-		if (deleteIt)
-		{
-			delete child;
+			child_tab_order_t::iterator found = mCtrlOrder.find(static_cast<LLUICtrl*>(child));
+			if(found != mCtrlOrder.end())
+			{
+				mCtrlOrder.erase(found);
+			}
 		}
 	}
 	else
@@ -340,28 +368,6 @@ void LLView::removeChild(LLView* child, BOOL deleteIt)
 	updateBoundingRect();
 }
 
-void LLView::addCtrlAtEnd(LLUICtrl* ctrl, S32 tab_group)
-{
-	mCtrlOrder.insert(tab_order_pair_t(ctrl,
-								tab_order_t(tab_group, mNextInsertionOrdinal++)));
-}
-
-void LLView::addCtrl( LLUICtrl* ctrl, S32 tab_group)
-{
-	// add to front of list by using negative ordinal, which monotonically increases
-	mCtrlOrder.insert(tab_order_pair_t(ctrl,
-								tab_order_t(tab_group, -1 * mNextInsertionOrdinal++)));
-}
-
-void LLView::removeCtrl(LLUICtrl* ctrl)
-{
-	child_tab_order_t::iterator found = mCtrlOrder.find(ctrl);
-	if(found != mCtrlOrder.end())
-	{
-		mCtrlOrder.erase(found);
-	}
-}
-
 LLView::ctrl_list_t LLView::getCtrlList() const
 {
 	ctrl_list_t controls;
@@ -651,7 +657,7 @@ BOOL LLView::canSnapTo(const LLView* other_view)
 }
 
 // virtual
-void LLView::snappedTo(const LLView* snap_view)
+void LLView::setSnappedTo(const LLView* snap_view)
 {
 }
 
@@ -669,6 +675,17 @@ BOOL LLView::handleHover(S32 x, S32 y, MASK mask)
 	return handled;
 }
 
+void LLView::onMouseEnter(S32 x, S32 y, MASK mask)
+{
+	//llinfos << "Mouse entered " << getName() << llendl;
+}
+
+void LLView::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+	//llinfos << "Mouse left " << getName() << llendl;
+}
+
+
 std::string LLView::getShowNamesToolTip()
 {
 	LLView* view = getParent();
@@ -729,23 +746,14 @@ BOOL LLView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_s
 
 	// get our own tooltip
 	tool_tip = mToolTipMsg.getString();
-	if (
-		LLUI::sShowXUINames 
+	
+	if (LLUI::sShowXUINames 
 		&& (tool_tip.find(".xml", 0) == std::string::npos) 
 		&& (mName.find("Drag", 0) == std::string::npos))
 	{
 		tool_tip = getShowNamesToolTip();
 	}
 
-	BOOL show_names_text_box = LLUI::sShowXUINames && dynamic_cast<LLTextBox*>(this) != NULL;
-
-	// don't allow any siblings to handle this event
-	// even if we don't have a tooltip
-	if (getMouseOpaque() || show_names_text_box)
-	{
-		handled = TRUE;
-	}
-
 	if(!tool_tip.empty())
 	{
 		msg = tool_tip;
@@ -757,7 +765,13 @@ BOOL LLView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_s
 		localPointToScreen(
 			mRect.getWidth(), mRect.getHeight(),
 			&(sticky_rect_screen->mRight), &(sticky_rect_screen->mTop) );
-		
+	}
+	// don't allow any siblings to handle this event
+	// even if we don't have a tooltip
+	if (getMouseOpaque() || 
+		(!tool_tip.empty() && 
+		 (!LLUI::sShowXUINames || dynamic_cast<LLTextBox*>(this))))
+	{
 		handled = TRUE;
 	}
 
@@ -923,22 +937,22 @@ BOOL LLView::handleMouseDown(S32 x, S32 y, MASK mask)
 		handled_view = this;
 	}
 
-	// HACK If we're editing UI, select the leaf view that ate the click.
-	if (sEditingUI && handled_view)
-	{
-		// need to find leaf views, big hack
-		LLButton* buttonp = dynamic_cast<LLButton*>(handled_view);
-		LLLineEditor* line_editorp = dynamic_cast<LLLineEditor*>(handled_view);
-		LLTextEditor* text_editorp = dynamic_cast<LLTextEditor*>(handled_view);
-		LLTextBox* text_boxp = dynamic_cast<LLTextBox*>(handled_view);
-		if (buttonp
-			|| line_editorp
-			|| text_editorp
-			|| text_boxp)
-		{
-			sEditingUIView = handled_view;
-		}
-	}
+	//// HACK If we're editing UI, select the leaf view that ate the click.
+	//if (sEditingUI && handled_view)
+	//{
+	//	// need to find leaf views, big hack
+	//	LLButton* buttonp = dynamic_cast<LLButton*>(handled_view);
+	//	LLLineEditor* line_editorp = dynamic_cast<LLLineEditor*>(handled_view);
+	//	LLTextEditor* text_editorp = dynamic_cast<LLTextEditor*>(handled_view);
+	//	LLTextBox* text_boxp = dynamic_cast<LLTextBox*>(handled_view);
+	//	if (buttonp
+	//		|| line_editorp
+	//		|| text_editorp
+	//		|| text_boxp)
+	//	{
+	//		sEditingUIView = handled_view;
+	//	}
+	//}
 
 	return handled;
 }
@@ -1164,6 +1178,7 @@ LLView* LLView::childrenHandleRightMouseDown(S32 x, S32 y, MASK mask)
 				{
 					sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
 				}
+
 				handled_view = viewp;
 				break;
 			}
@@ -1326,55 +1341,58 @@ void LLView::draw()
 		}
 	}
 
-	LLRect rootRect = getRootView()->getRect();
-	LLRect screenRect;
-
-	// draw focused control on top of everything else
-	LLView* focus_view = gFocusMgr.getKeyboardFocus();
-	if (focus_view && focus_view->getParent() != this)
+	if (!mChildList.empty())
 	{
-		focus_view = NULL;
-	}
+		LLRect rootRect = getRootView()->getRect();
+		LLRect screenRect;
 
-	++sDepth;
-	for (child_list_reverse_iter_t child_iter = mChildList.rbegin(); child_iter != mChildList.rend(); ++child_iter)
-	{
-		LLView *viewp = *child_iter;
+		// draw focused control on top of everything else
+		LLView* focus_view = gFocusMgr.getKeyboardFocus();
+		if (focus_view && focus_view->getParent() != this)
+		{
+			focus_view = NULL;
+		}
+
+		++sDepth;
 
-		if (viewp->getVisible() && viewp != focus_view && viewp->getRect().isValid())
+		for (child_list_reverse_iter_t child_iter = mChildList.rbegin(); child_iter != mChildList.rend();)  // ++child_iter)
 		{
-			// Only draw views that are within the root view
-			localRectToScreen(viewp->getRect(),&screenRect);
-			if ( rootRect.rectInRect(&screenRect) )
+			child_list_reverse_iter_t child = child_iter++;
+			LLView *viewp = *child;
+
+			if (viewp->getVisible() && viewp != focus_view && viewp->getRect().isValid())
 			{
-				glMatrixMode(GL_MODELVIEW);
-				LLUI::pushMatrix();
+				// Only draw views that are within the root view
+				localRectToScreen(viewp->getRect(),&screenRect);
+				if ( rootRect.rectInRect(&screenRect) )
 				{
-					LLUI::translate((F32)viewp->getRect().mLeft, (F32)viewp->getRect().mBottom, 0.f);
-					viewp->draw();
+					glMatrixMode(GL_MODELVIEW);
+					LLUI::pushMatrix();
+					{
+						LLUI::translate((F32)viewp->getRect().mLeft, (F32)viewp->getRect().mBottom, 0.f);
+						viewp->draw();
+					}
+					LLUI::popMatrix();
 				}
-				LLUI::popMatrix();
 			}
-		}
 
-	}
-	--sDepth;
+		}
+		--sDepth;
 
-	if (focus_view && focus_view->getVisible())
-	{
-		drawChild(focus_view);
+		if (focus_view && focus_view->getVisible())
+		{
+			drawChild(focus_view);
+		}
 	}
 
-	// HACK
-	if (sEditingUI && this == sEditingUIView)
-	{
-		drawDebugRect();
-	}
+	gGL.getTexUnit(0)->disable();
 }
 
 //Draw a box for debugging.
 void LLView::drawDebugRect()
 {
+	std::set<LLView*>::iterator preview_iter = std::find(sPreviewHighlightedElements.begin(), sPreviewHighlightedElements.end(), this);	// figure out if it's a previewed element
+
 	LLUI::pushMatrix();
 	{
 		// drawing solids requires texturing be disabled
@@ -1389,9 +1407,21 @@ void LLView::drawDebugRect()
 
 		// draw red rectangle for the border
 		LLColor4 border_color(0.f, 0.f, 0.f, 1.f);
-		if (sEditingUI)
+		//if (sEditingUI)
+		//{
+		//	border_color.mV[0] = 1.f;
+		//}
+		if(preview_iter != sPreviewHighlightedElements.end())
 		{
-			border_color.mV[0] = 1.f;
+			if(LLView::sPreviewClickedElement && this == sPreviewClickedElement)
+			{
+				border_color = LLColor4::red;
+			}
+			else
+			{
+				static LLUICachedControl<LLColor4> scroll_highlighted_color ("ScrollHighlightedColor", *(new LLColor4));
+				border_color = scroll_highlighted_color;
+			}
 		}
 		else
 		{
@@ -1414,8 +1444,8 @@ void LLView::drawDebugRect()
 			gGL.vertex2i(0, debug_rect.getHeight() - 1);
 		gGL.end();
 
-		// Draw the name if it's not a leaf node
-		if (mChildList.size() && !sEditingUI)
+		// Draw the name if it's not a leaf node or not in editing or preview mode
+		if (mChildList.size() && preview_iter == sPreviewHighlightedElements.end())
 		{
 			//char temp[256];
 			S32 x, y;
@@ -1425,7 +1455,7 @@ void LLView::drawDebugRect()
 			std::string debug_text = llformat("%s (%d x %d)", getName().c_str(),
 										debug_rect.getWidth(), debug_rect.getHeight());
 			LLFontGL::getFontSansSerifSmall()->renderUTF8(debug_text, 0, (F32)x, (F32)y, border_color,
-												LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::NORMAL,
+												LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
 												S32_MAX, S32_MAX, NULL, FALSE);
 		}
 	}
@@ -1581,15 +1611,28 @@ void LLView::updateBoundingRect()
 	}
 }
 
-LLRect LLView::getScreenRect() const
+LLRect LLView::calcScreenRect() const
 {
-	// *FIX: check for one-off error
 	LLRect screen_rect;
 	localPointToScreen(0, 0, &screen_rect.mLeft, &screen_rect.mBottom);
 	localPointToScreen(getRect().getWidth(), getRect().getHeight(), &screen_rect.mRight, &screen_rect.mTop);
 	return screen_rect;
 }
 
+LLRect LLView::calcScreenBoundingRect() const
+{
+	LLRect screen_rect;
+	// get bounding rect, if used
+	LLRect bounding_rect = mUseBoundingRect ? mBoundingRect : mRect;
+
+	// convert to local coordinates, as defined by mRect
+	bounding_rect.translate(-mRect.mLeft, -mRect.mBottom);
+
+	localPointToScreen(bounding_rect.mLeft, bounding_rect.mBottom, &screen_rect.mLeft, &screen_rect.mBottom);
+	localPointToScreen(bounding_rect.mRight, bounding_rect.mTop, &screen_rect.mRight, &screen_rect.mTop);
+	return screen_rect;
+}
+
 LLRect LLView::getLocalBoundingRect() const
 {
 	LLRect local_bounding_rect = getBoundingRect();
@@ -1688,7 +1731,12 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse, BOOL create_
 
 	if (create_if_missing)
 	{
-		return createDummyWidget<LLView>(name);
+		LLView* view = getDummyWidget<LLView>(name);
+		if (!view)
+		{
+			 view = LLUICtrlFactory::createDummyWidget<LLView>(name);
+		}
+		return view;
 	}
 	return NULL;
 }
@@ -1777,12 +1825,32 @@ LLView* LLView::getRootView()
 	return view;
 }
 
-BOOL LLView::deleteViewByHandle(LLHandle<LLView> handle)
+LLView* LLView::findPrevSibling(LLView* child)
+{
+	child_list_t::iterator prev_it = std::find(mChildList.begin(), mChildList.end(), child);
+	if (prev_it != mChildList.end() && prev_it != mChildList.begin())
+	{
+		return *(--prev_it);
+	}
+	return NULL;
+}
+
+LLView* LLView::findNextSibling(LLView* child)
+{
+	child_list_t::iterator next_it = std::find(mChildList.begin(), mChildList.end(), child);
+	if (next_it != mChildList.end())
+	{
+		next_it++;
+	}
+
+	return (next_it != mChildList.end()) ? *next_it : NULL;
+}
+
+void LLView::deleteViewByHandle(LLHandle<LLView> handle)
 {
 	LLView* viewp = handle.get();
 
 	delete viewp;
-	return viewp != NULL;
 }
 
 
@@ -1943,132 +2011,6 @@ BOOL LLView::localRectToOtherView( const LLRect& local, LLRect* other, LLView* o
 	return FALSE;
 }
 
-// virtual
-LLXMLNodePtr LLView::getXML(bool save_children) const
-{
-	//FIXME: need to provide actual derived type tag, probably outside this method
-	LLXMLNodePtr node = new LLXMLNode("view", FALSE);
-
-	node->createChild("name", TRUE)->setStringValue(getName());
-	node->createChild("width", TRUE)->setIntValue(getRect().getWidth());
-	node->createChild("height", TRUE)->setIntValue(getRect().getHeight());
-
-	LLView* parent = getParent();
-	S32 left = getRect().mLeft;
-	S32 bottom = getRect().mBottom;
-	if (parent) bottom -= parent->getRect().getHeight();
-
-	node->createChild("left", TRUE)->setIntValue(left);
-	node->createChild("bottom", TRUE)->setIntValue(bottom);
-
-	U32 follows_flags = getFollows();
-	if (follows_flags)
-	{
-		std::stringstream buffer;
-		bool pipe = false;
-		if (followsLeft())
-		{
-			buffer << "left";
-			pipe = true;
-		}
-		if (followsTop())
-		{
-			if (pipe) buffer << "|";
-			buffer << "top";
-			pipe = true;
-		}
-		if (followsRight())
-		{
-			if (pipe) buffer << "|";
-			buffer << "right";
-			pipe = true;
-		}
-		if (followsBottom())
-		{
-			if (pipe) buffer << "|";
-			buffer << "bottom";
-		}
-		node->createChild("follows", TRUE)->setStringValue(buffer.str());
-	}
-	// Export all widgets as enabled and visible - code must disable.
-	node->createChild("mouse_opaque", TRUE)->setBoolValue(mMouseOpaque );
-	if (!mToolTipMsg.getString().empty())
-	{
-		node->createChild("tool_tip", TRUE)->setStringValue(mToolTipMsg.getString());
-	}
-	if (mSoundFlags != MOUSE_UP)
-	{
-		node->createChild("sound_flags", TRUE)->setIntValue((S32)mSoundFlags);
-	}
-
-	node->createChild("enabled", TRUE)->setBoolValue(getEnabled());
-
-	if (!mControlName.empty())
-	{
-		node->createChild("control_name", TRUE)->setStringValue(mControlName);
-	}
-	return node;
-}
-
-//static 
-LLView* LLView::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	LLView* viewp = new LLView();
-	viewp->initFromXML(node, parent);
-	return viewp;
-}
-
-// static
-void LLView::addColorXML(LLXMLNodePtr node, const LLColor4& color,
-							const char* xml_name, const char* control_name)
-{
-	if (color != LLUI::sColorsGroup->getColor(ll_safe_string(control_name)))
-	{
-		node->createChild(xml_name, TRUE)->setFloatValue(4, color.mV);
-	}
-}
-
-//static 
-std::string LLView::escapeXML(const std::string& xml, std::string& indent)
-{
-	std::string ret = indent + "\"" + LLXMLNode::escapeXML(xml);
-
-	//replace every newline with a close quote, new line, indent, open quote
-	size_t index = ret.size()-1;
-	size_t fnd;
-	
-	while ((fnd = ret.rfind("\n", index)) != std::string::npos)
-	{
-		ret.replace(fnd, 1, "\"\n" + indent + "\"");
-		index = fnd-1;
-	}
-
-	//append close quote
-	ret.append("\"");
-	
-	return ret;	
-}
-
-// static
-LLWString LLView::escapeXML(const LLWString& xml)
-{
-	LLWString out;
-	for (LLWString::size_type i = 0; i < xml.size(); ++i)
-	{
-		llwchar c = xml[i];
-		switch(c)
-		{
-		case '"':	out.append(utf8string_to_wstring("&quot;"));	break;
-		case '\'':	out.append(utf8string_to_wstring("&apos;"));	break;
-		case '&':	out.append(utf8string_to_wstring("&amp;"));		break;
-		case '<':	out.append(utf8string_to_wstring("&lt;"));		break;
-		case '>':	out.append(utf8string_to_wstring("&gt;"));		break;
-		default:	out.push_back(c); break;
-		}
-	}
-	return out;
-}
-
 // static
 const LLCtrlQuery & LLView::getTabOrderQuery()
 {
@@ -2105,7 +2047,12 @@ const LLCtrlQuery & LLView::getFocusRootsQuery()
 }
 
 
-void	LLView::userSetShape(const LLRect& new_rect)
+void	LLView::setShape(const LLRect& new_rect, bool by_user)
+{
+	handleReshape(new_rect, by_user);
+}
+
+void LLView::handleReshape(const LLRect& new_rect, bool by_user)
 {
 	reshape(new_rect.getWidth(), new_rect.getHeight());
 	translate(new_rect.mLeft - getRect().mLeft, new_rect.mBottom - getRect().mBottom);
@@ -2353,306 +2300,52 @@ LLView*	LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESna
 // Listener dispatch functions
 //-----------------------------------------------------------------------------
 
-void LLView::registerEventListener(std::string name, LLSimpleListener* function)
-{
-	mDispatchList.insert(std::pair<std::string, LLSimpleListener*>(name, function));
-}
-
-void LLView::deregisterEventListener(std::string name)
-{
-	dispatch_list_t::iterator itor = mDispatchList.find(name);
-	if (itor != mDispatchList.end())
-	{
-		mDispatchList.erase(itor);
-	}
-}
-
-std::string LLView::findEventListener(LLSimpleListener *listener) const
-{
-	dispatch_list_t::const_iterator itor;
-	for (itor = mDispatchList.begin(); itor != mDispatchList.end(); ++itor)
-	{
-		if (itor->second == listener)
-		{
-			return itor->first;
-		}
-	}
-	if (mParentView)
-	{
-		return mParentView->findEventListener(listener);
-	}
-	return LLStringUtil::null;
-}
-
-LLSimpleListener* LLView::getListenerByName(const std::string& callback_name)
-{
-	LLSimpleListener* callback = NULL;
-	dispatch_list_t::iterator itor = mDispatchList.find(callback_name);
-	if (itor != mDispatchList.end())
-	{
-		callback = itor->second;
-	}
-	else if (mParentView)
-	{
-		callback = mParentView->getListenerByName(callback_name);
-	}
-	return callback;
-}
 
 LLControlVariable *LLView::findControl(const std::string& name)
 {
-	control_map_t::iterator itor = mFloaterControls.find(name);
-	if (itor != mFloaterControls.end())
+	LLControlVariable* control;
+	control = LLUI::sSettingGroups["color"]->getControl(name);
+	if (control)
 	{
-		return itor->second;
+		return control;
 	}
-	if (mParentView)
-	{
-		return mParentView->findControl(name);
-	}
-	return LLUI::sConfigGroup->getControl(name);
+	
+	return LLUI::sSettingGroups["config"]->getControl(name);
 }
 
 const S32 FLOATER_H_MARGIN = 15;
 const S32 MIN_WIDGET_HEIGHT = 10;
 const S32 VPAD = 4;
 
-// static
-U32 LLView::createRect(LLXMLNodePtr node, LLRect &rect, LLView* parent_view, const LLRect &required_rect)
-{
-	U32 follows = 0;
-	S32 x = rect.mLeft;
-	S32 y = rect.mBottom;
-	S32 w = rect.getWidth();
-	S32 h = rect.getHeight();
-
-	U32 last_x = 0;
-	U32 last_y = 0;
-	if (parent_view)
-	{
-		last_y = parent_view->getRect().getHeight();
-		child_list_t::const_iterator itor = parent_view->getChildList()->begin();
-		if (itor != parent_view->getChildList()->end())
-		{
-			LLView *last_view = (*itor);
-			if (last_view->getSaveToXML())
-			{
-				last_x = last_view->getRect().mLeft;
-				last_y = last_view->getRect().mBottom;
-			}
-		}
-	}
-
-	std::string rect_control;
-	node->getAttributeString("rect_control", rect_control);
-	if (! rect_control.empty())
-	{
-		LLRect rect = LLUI::sConfigGroup->getRect(rect_control);
-		x = rect.mLeft;
-		y = rect.mBottom;
-		w = rect.getWidth();
-		h = rect.getHeight();
-	}
-	
-	if (node->hasAttribute("left"))
-	{
-		node->getAttributeS32("left", x);
-	}
-	if (node->hasAttribute("bottom"))
-	{
-		node->getAttributeS32("bottom", y);
-	}
-
-	// Make your width the width of the containing
-	// view if you don't specify a width.
-	if (parent_view)
-	{
-		if(w == 0)
-		{
-			w = llmax(required_rect.getWidth(), parent_view->getRect().getWidth() - (FLOATER_H_MARGIN) - x);
-		}
-
-		if(h == 0)
-		{
-			h = llmax(MIN_WIDGET_HEIGHT, required_rect.getHeight());
-		}
-	}
-
-	if (node->hasAttribute("width"))
-	{
-		node->getAttributeS32("width", w);
-	}
-	if (node->hasAttribute("height"))
-	{
-		node->getAttributeS32("height", h);
-	}
-
-	if (parent_view)
-	{
-		if (node->hasAttribute("left_delta"))
-		{
-			S32 left_delta = 0;
-			node->getAttributeS32("left_delta", left_delta);
-			x = last_x + left_delta;
-		}
-		else if (node->hasAttribute("left") && node->hasAttribute("right"))
-		{
-			// compute width based on left and right
-			S32 right = 0;
-			node->getAttributeS32("right", right);
-			if (right < 0)
-			{
-				right = parent_view->getRect().getWidth() + right;
-			}
-			w = right - x;
-		}
-		else if (node->hasAttribute("left"))
-		{
-			if (x < 0)
-			{
-				x = parent_view->getRect().getWidth() + x;
-				follows |= FOLLOWS_RIGHT;
-			}
-			else
-			{
-				follows |= FOLLOWS_LEFT;
-			}
-		}
-		else if (node->hasAttribute("width") && node->hasAttribute("right"))
-		{
-			S32 right = 0;
-			node->getAttributeS32("right", right);
-			if (right < 0)
-			{
-				right = parent_view->getRect().getWidth() + right;
-			}
-			x = right - w;
-		}
-		else
-		{
-			// left not specified, same as last
-			x = last_x;
-		}
-
-		if (node->hasAttribute("bottom_delta"))
-		{
-			S32 bottom_delta = 0;
-			node->getAttributeS32("bottom_delta", bottom_delta);
-			y = last_y + bottom_delta;
-		}
-		else if (node->hasAttribute("top"))
-		{
-			// compute height based on top
-			S32 top = 0;
-			node->getAttributeS32("top", top);
-			if (top < 0)
-			{
-				top = parent_view->getRect().getHeight() + top;
-			}
-			h = top - y;
-		}
-		else if (node->hasAttribute("bottom"))
-		{
-			if (y < 0)
-			{
-				y = parent_view->getRect().getHeight() + y;
-				follows |= FOLLOWS_TOP;
-			}
-			else
-			{
-				follows |= FOLLOWS_BOTTOM;
-			}
-		}
-		else
-		{
-			// if bottom not specified, generate automatically
-			if (last_y == 0)
-			{
-				// treat first child as "bottom"
-				y = parent_view->getRect().getHeight() - (h + VPAD);
-				follows |= FOLLOWS_TOP;
-			}
-			else
-			{
-				// treat subsequent children as "bottom_delta"
-				y = last_y - (h + VPAD);
-			}
-		}
-	}
-	else
-	{
-		x = llmax(x, 0);
-		y = llmax(y, 0);
-		follows = FOLLOWS_LEFT | FOLLOWS_TOP;
-	}
-	rect.setOriginAndSize(x, y, w, h);
-
-	return follows;
-}
-
-void LLView::initFromXML(LLXMLNodePtr node, LLView* parent)
+void LLView::initFromParams(const LLView::Params& params)
 {
-	// create rect first, as this will supply initial follows flags
-	LLRect view_rect;
-	U32 follows_flags = createRect(node, view_rect, parent, getRequiredRect());
-	// call reshape in case there are any child elements that need to be layed out
-	reshape(view_rect.getWidth(), view_rect.getHeight());
-	setRect(view_rect);
-	setFollows(follows_flags);
-
-	parseFollowsFlags(node);
+	LLRect required_rect = getRequiredRect();
 
-	if (node->hasAttribute("control_name"))
-	{
-		std::string control_name;
-		node->getAttributeString("control_name", control_name);
-		setControlName(control_name, NULL);
-	}
+	S32 width = llmax(getRect().getWidth(), required_rect.getWidth());
+	S32 height = llmax(getRect().getHeight(), required_rect.getHeight());
 
-	if (node->hasAttribute("tool_tip"))
-	{
-		std::string tool_tip_msg;
-		node->getAttributeString("tool_tip", tool_tip_msg);
-		setToolTip(tool_tip_msg);
-	}
+	reshape(width, height);
 
-	if (node->hasAttribute("enabled"))
-	{
-		BOOL enabled;
-		node->getAttributeBOOL("enabled", enabled);
-		setEnabled(enabled);
-	}
-	
-	if (node->hasAttribute("visible"))
-	{
-		BOOL visible;
-		node->getAttributeBOOL("visible", visible);
-		setVisible(visible);
-	}
+	// call virtual methods with most recent data
+	// use getters because these values might not come through parameter block
+	setEnabled(getEnabled());
+	setVisible(getVisible());
 
-	if (node->hasAttribute("hover_cursor"))
+	if (!params.name().empty())
 	{
-		std::string cursor_string;
-		node->getAttributeString("hover_cursor", cursor_string);
-		mHoverCursor = getCursorFromString(cursor_string);
+		setName(params.name());
 	}
-	
-	node->getAttributeBOOL("use_bounding_rect", mUseBoundingRect);
-	node->getAttributeBOOL("mouse_opaque", mMouseOpaque);
 
-	node->getAttributeS32("default_tab_group", mDefaultTabGroup);
-	
-	reshape(view_rect.getWidth(), view_rect.getHeight());
+	mLayout = params.layout();
 }
 
-void LLView::parseFollowsFlags(LLXMLNodePtr node)
+void LLView::parseFollowsFlags(const LLView::Params& params)
 {
-	if (node->hasAttribute("follows"))
+	if (params.follows.string.isProvided())
 	{
-		setFollowsNone();
+		setFollows(FOLLOWS_NONE);
 
-		std::string follows;
-		node->getAttributeString("follows", follows);
+		std::string follows = params.follows.string;
 
 		typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
 		boost::char_separator<char> sep("|");
@@ -2685,45 +2378,13 @@ void LLView::parseFollowsFlags(LLXMLNodePtr node)
 			++token_iter;
 		}
 	}
-}
-
-// static
-LLFontGL* LLView::selectFont(LLXMLNodePtr node)
-{
-	std::string font_name, font_size, font_style;
-	U8 style = 0;
-	
-	if (node->hasAttribute("font"))
-	{
-		node->getAttributeString("font", font_name);
-	}
-	
-	if (node->hasAttribute("font_size"))
-	{
-		node->getAttributeString("font_size", font_size);
-	}
-
-	if (node->hasAttribute("font_style"))
-	{
-		node->getAttributeString("font_style", font_style);
-		style = LLFontGL::getStyleFromString(font_style);
-	}
-
-	if (node->hasAttribute("font-style"))
+	else if (params.follows.flags.isProvided())
 	{
-		node->getAttributeString("font-style", font_style);
-		style = LLFontGL::getStyleFromString(font_style);
+		setFollows(params.follows.flags);
 	}
-
-	if (font_name.empty())
-		return NULL;
-
-	LLFontDescriptor desc(font_name, font_size, style);
-	LLFontGL* gl_font = LLFontGL::getFont(desc);
-
-	return gl_font;
 }
 
+
 // static
 LLFontGL::HAlign LLView::selectFontHAlign(LLXMLNodePtr node)
 {
@@ -2738,175 +2399,216 @@ LLFontGL::HAlign LLView::selectFontHAlign(LLXMLNodePtr node)
 	return gl_hfont_align;
 }
 
-// static
-LLFontGL::VAlign LLView::selectFontVAlign(LLXMLNodePtr node)
+//static
+void LLView::setupParams(LLView::Params& p, LLView* parent)
 {
-	LLFontGL::VAlign gl_vfont_align = LLFontGL::BASELINE;
+	const S32 VPAD = 4;
+	const S32 MIN_WIDGET_HEIGHT = 10;
+	
+	p.serializable(true);
+
+	// *NOTE: Do not inherit layout from parent until we re-export
+	// all nodes and make topleft the default. JC
+	//if (p.layout().empty() && parent) 
+	//	p.layout = parent->getLayout();
 
-	if (node->hasAttribute("valign"))
+	if (parent)
 	{
-		std::string vert_align_name;
-		node->getAttributeString("valign", vert_align_name);
-		gl_vfont_align = LLFontGL::vAlignFromName(vert_align_name);
-	}
-	return gl_vfont_align;
-}
+		LLRect parent_rect = parent->getLocalRect();
+		// overwrite uninitialized rect params, using context
+		LLRect last_rect = parent->getLocalRect();
 
-// static
-LLFontGL::StyleFlags LLView::selectFontStyle(LLXMLNodePtr node)
-{
-	LLFontGL::StyleFlags gl_font_style = LLFontGL::NORMAL;
+		bool layout_topleft = (p.layout() == "topleft");
+		if (layout_topleft)
+		{
+			//invert top to bottom
+			if (p.rect.top.isProvided()) p.rect.top = parent_rect.getHeight() - p.rect.top;
+			if (p.rect.bottom.isProvided()) p.rect.bottom = parent_rect.getHeight() - p.rect.bottom;
+		}
 
-	if (node->hasAttribute("style"))
-	{
-		std::string style_flags_name;
-		node->getAttributeString("style", style_flags_name);
+		// convert negative or centered coordinates to parent relative values
+		// Note: some of this logic matches the logic in TypedParam<LLRect>::getValueFromBlock()
 
-		if (style_flags_name == "normal")
+		if (p.center_horiz)
 		{
-			gl_font_style = LLFontGL::NORMAL;
+			if (p.rect.left.isProvided() && p.rect.right.isProvided())
+			{
+				S32 width = p.rect.right - p.rect.left;
+				width = llmax(width, 0);
+				S32 offset = parent_rect.getWidth()/2 - width/2;
+				p.rect.left = p.rect.left + offset;
+				p.rect.right = p.rect.right + offset;
+			}
+			else
+			{
+				p.rect.left = p.rect.left + parent_rect.getWidth()/2 - p.rect.width/2;
+			}
 		}
-		else if (style_flags_name == "bold")
+		else
 		{
-			gl_font_style = LLFontGL::BOLD;
+			if (p.rect.left < 0) p.rect.left = p.rect.left + parent_rect.getWidth();
+			if (p.rect.right < 0) p.rect.right = p.rect.right + parent_rect.getWidth();
 		}
-		else if (style_flags_name == "italic")
+		if (p.center_vert)
 		{
-			gl_font_style = LLFontGL::ITALIC;
+			if (p.rect.bottom.isProvided() && p.rect.top.isProvided())
+			{
+				S32 height = p.rect.top - p.rect.bottom;
+				height = llmax(height, 0);
+				S32 offset = parent_rect.getHeight()/2 - height/2;
+				p.rect.bottom = p.rect.bottom + offset;
+				p.rect.top = p.rect.top + offset;
+			}
+			else
+			{
+				p.rect.bottom = p.rect.bottom + parent_rect.getHeight()/2 - p.rect.height/2;
+			}
 		}
-		else if (style_flags_name == "underline")
+		else
 		{
-			gl_font_style = LLFontGL::UNDERLINE;
+			if (p.rect.bottom < 0) p.rect.bottom = p.rect.bottom + parent_rect.getHeight();
+			if (p.rect.top < 0) p.rect.top = p.rect.top + parent_rect.getHeight();
 		}
-		//else leave left
-	}
-	return gl_font_style;
-}
-
-bool LLView::setControlValue(const LLSD& value)
-{
-	std::string ctrlname = getControlName();
-	if (!ctrlname.empty())
-	{
-		LLUI::sConfigGroup->setValue(ctrlname, value);
-		return true;
-	}
-	return false;
-}
 
-//virtual
-void LLView::setControlName(const std::string& control_name, LLView *context)
-{
-	if (context == NULL)
-	{
-		context = this;
-	}
 
-	if (!mControlName.empty())
-	{
-		llwarns << "setControlName called twice on same control!" << llendl;
-		mControlConnection.disconnect(); // disconnect current signal
-		mControlName.clear();
-	}
-	
-	// Register new listener
-	if (!control_name.empty())
-	{
-		LLControlVariable *control = context->findControl(control_name);
-		if (control)
+		// DEPRECATE: automatically fall back to height of MIN_WIDGET_HEIGHT pixels
+		if (!p.rect.height.isProvided() && !p.rect.top.isProvided())
 		{
-			mControlName = control_name;
-			mControlConnection = control->getSignal()->connect(boost::bind(&controlListener, _1, getHandle(), std::string("value")));
-			setValue(control->getValue());
+			p.rect.height = MIN_WIDGET_HEIGHT;
 		}
-	}
-}
 
-// static
-bool LLView::controlListener(const LLSD& newvalue, LLHandle<LLView> handle, std::string type)
-{
-	LLView* view = handle.get();
-	if (view)
-	{
-		if (type == "value")
+		last_rect.translate(0, last_rect.getHeight());
+
+		LLView::child_list_t::const_iterator itor = parent->getChildList()->begin();
+		for (;itor != parent->getChildList()->end(); ++itor)
 		{
-			view->setValue(newvalue);
-			return true;
+			LLView *last_view = (*itor);
+			if (last_view->getSaveToXML())
+			{
+				last_rect = last_view->getRect();
+				break;
+			}
 		}
-		else if (type == "enabled")
+
+		if (layout_topleft)
 		{
-			view->setEnabled(newvalue.asBoolean());
-			return true;
+			S32 left_delta = 0;
+			p.bottom_delta.setIfNotProvided(0, false);
+
+			// Invert the sense of bottom_delta for topleft layout
+			if (p.bottom_delta.isProvided())
+			{
+				p.bottom_delta = -p.bottom_delta;
+			}
+			else if (p.top_delta.isProvided()) 
+			{
+				p.bottom_delta = -(p.rect.height + p.top_delta);
+			}
+			else if (!p.left_delta.isProvided() && !p.right_delta.isProvided() && !p.top_delta.isProvided())
+			{
+				// set default position is just below last rect
+				p.bottom_delta.setIfNotProvided(-(p.rect.height + VPAD), false);
+			}
+	
+			// *TODO: Add left_pad for padding off the last widget's right edge
+			// if (p.left_pad.isProvided())
+			//{
+			//	left_delta = p.left_pad + last_rect.getWidth();
+			//}
+			//else if ...
+			if (p.left_delta.isProvided())
+			{
+				left_delta = p.left_delta;
+			}
+			else if (p.right_delta.isProvided())
+			{
+				left_delta = -(p.right_delta + p.rect.width);
+			}
+			
+			last_rect.translate(left_delta, p.bottom_delta);				
 		}
-		else if (type == "visible")
-		{
-			view->setVisible(newvalue.asBoolean());
-			return true;
+		else
+		{	
+			// set default position is just below last rect
+			p.bottom_delta.setIfNotProvided(-(p.rect.height + VPAD), false);
+			p.left_delta.setIfNotProvided(0, false);
+			last_rect.translate(p.left_delta, p.bottom_delta);
 		}
-	}
-	return false;
-}
 
-void LLView::addBoolControl(const std::string& name, bool initial_value)
-{
-	mFloaterControls[name] = new LLControlVariable(name, TYPE_BOOLEAN, initial_value, std::string("Internal floater control"));
-}
+		// this handles case where *both* x and x_delta are provided
+		// ignore x in favor of default x + x_delta
+		if (p.bottom_delta.isProvided()) p.rect.bottom.set(0, false);
+		if (p.left_delta.isProvided()) p.rect.left.set(0, false);
 
-LLControlVariable *LLView::getControl(const std::string& name)
-{
-	control_map_t::iterator itor = mFloaterControls.find(name);
-	if (itor != mFloaterControls.end())
-	{
-		return itor->second;
+		// selectively apply rectangle defaults, making sure that
+		// params are not flagged as having been "provided"
+		// as rect params are overconstrained and rely on provided flags
+		p.rect.left.setIfNotProvided(last_rect.mLeft, false);
+		p.rect.bottom.setIfNotProvided(last_rect.mBottom, false);
+		p.rect.top.setIfNotProvided(last_rect.mTop, false);
+		p.rect.right.setIfNotProvided(last_rect.mRight, false);
+		p.rect.width.setIfNotProvided(last_rect.getWidth(), false);
+		p.rect.height.setIfNotProvided(last_rect.getHeight(), false);
 	}
-	return NULL;
-}
-
-//virtual 
-void	LLView::setValue(const LLSD& value)
-{
 }
 
-//virtual 
-LLSD	LLView::getValue() const 
+static S32 invert_vertical(S32 y, LLView* parent)
 {
-	return LLSD();
+	if (y < 0)
+	{
+		// already based on top-left, just invert
+		return -y;
+	}
+	else if (parent)
+	{
+		// use parent to flip coordinate
+		S32 parent_height = parent->getRect().getHeight();
+		return parent_height - y;
+	}
+	else
+	{
+		llwarns << "Attempting to convert layout to top-left with no parent" << llendl;
+		return y;
+	}
 }
 
-LLView* LLView::createWidget(LLXMLNodePtr xml_node) const
+//static
+void LLView::setupParamsForExport(Params& p, LLView* parent)
 {
-	// forward requests to ui ctrl factory
-	return LLUICtrlFactory::getInstance()->createCtrlWidget(NULL, xml_node);
-}
-
-//
-// LLWidgetClassRegistry
-//
-
-LLWidgetClassRegistry::LLWidgetClassRegistry()
-{ 
-}
+	// Don't convert if already top-left based
+	if (p.layout() == "topleft") 
+	{
+		return;
+	}
 
-void LLWidgetClassRegistry::registerCtrl(const std::string& tag, LLWidgetClassRegistry::factory_func_t function)
-{ 
-	std::string lower_case_tag = tag;
-	LLStringUtil::toLower(lower_case_tag);
-	
-	mCreatorFunctions[lower_case_tag] = function;
+	if (p.rect.top.isProvided())
+	{
+		p.rect.top = invert_vertical(p.rect.top, parent);
+	}
+	if (p.top_delta.isProvided())
+	{
+		p.top_delta = -p.top_delta;
+	}
+	if (p.rect.bottom.isProvided())
+	{
+		p.rect.bottom = invert_vertical(p.rect.bottom, parent);
+	}
+	if (p.bottom_delta.isProvided())
+	{
+		p.bottom_delta = -p.bottom_delta;
+	}
+	p.layout = "topleft";
 }
 
-BOOL LLWidgetClassRegistry::isTagRegistered(const std::string &tag)
+LLView::tree_iterator_t LLView::beginTree() 
 { 
-	return mCreatorFunctions.find(tag) != mCreatorFunctions.end();
+	return tree_iterator_t(this, 
+							boost::bind(boost::mem_fn(&LLView::beginChild), _1), 
+							boost::bind(boost::mem_fn(&LLView::endChild), _1)); 
 }
 
-LLWidgetClassRegistry::factory_func_t LLWidgetClassRegistry::getCreatorFunc(const std::string& ctrl_type)
+LLView::tree_iterator_t LLView::endTree() 
 { 
-	factory_map_t::const_iterator found_it = mCreatorFunctions.find(ctrl_type);
-	if (found_it == mCreatorFunctions.end())
-	{
-		return NULL;
-	}
-	return found_it->second;
+	// an empty iterator is an "end" iterator
+	return tree_iterator_t();
 }
-
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index e0e0f6ba47..69ae7dd993 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -47,12 +47,15 @@
 #include "llrect.h"
 #include "llui.h"
 #include "lluistring.h"
-#include "lluixmltags.h"
 #include "llviewquery.h"
 #include "llxmlnode.h"
 #include "stdenums.h"
 #include "lluistring.h"
 #include "llcursortypes.h"
+#include "lluictrlfactory.h"
+#include "lltreeiterators.h"
+
+#include <list>
 
 const U32	FOLLOWS_NONE	= 0x00;
 const U32	FOLLOWS_LEFT	= 0x01;
@@ -75,9 +78,6 @@ virtual BOOL isPanel();
 		LLPanel
 virtual void setRect(const LLRect &rect);
 		LLLineEditor
-virtual void	addCtrl( LLUICtrl* ctrl, S32 tab_group);
-virtual void	addCtrlAtEnd( LLUICtrl* ctrl, S32 tab_group);
-virtual void	removeCtrl( LLUICtrl* ctrl);
 		LLPanel
 virtual BOOL canFocusChildren() const		{ return TRUE; }
 		LLFolderView
@@ -103,7 +103,7 @@ virtual void	reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 		LLUICtrl, et. al.
 virtual void	translate( S32 x, S32 y );
 		LLMenuGL		
-virtual void	userSetShape(const LLRect& new_rect);
+virtual void	setShape(const LLRect& new_rect, bool by_user);
 		LLFloater, LLScrollLIstVtrl
 virtual LLView*	findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0);
 virtual LLView*	findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0);
@@ -121,10 +121,6 @@ virtual BOOL	handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,EDragAndDropTy
 virtual void	draw();
 		*
 
-		*
-virtual LLXMLNodePtr getXML(bool save_children = true) const;
-		*
-virtual void initFromXML(LLXMLNodePtr node, LLView* parent);
 		*
 virtual void onFocusLost() {}
 		LLUICtrl, LLScrollListCtrl, LLMenuGL, LLLineEditor, LLComboBox
@@ -132,14 +128,8 @@ virtual void onFocusReceived() {}
 		LLUICtrl, LLTextEditor, LLScrollListVtrl, LLMenuGL, LLLineEditor
 virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
 		LLTabContainer, LLPanel, LLMenuGL
-virtual void	setControlName(const std::string& control, LLView *context);
-		LLSliderCtrl, LLCheckBoxCtrl
-virtual std::string getControlName() const { return mControlName; }
-		LLSliderCtrl, LLCheckBoxCtrl
 virtual bool	handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
 		LLMenuItem
-virtual void	setValue(const LLSD& value);
-		*
 
 protected:
 virtual BOOL	handleKeyHere(KEY key, MASK mask);
@@ -148,67 +138,65 @@ virtual BOOL	handleUnicodeCharHere(llwchar uni_char);
 		*
 */
 
-class LLUICtrlFactory;
-
-// maps xml strings to widget classes
-class LLWidgetClassRegistry : public LLSingleton<LLWidgetClassRegistry>
+class LLView : public LLMouseHandler, public LLMortician
 {
-	friend class LLSingleton<LLWidgetClassRegistry>;
 public:
-	typedef LLView* (*factory_func_t)(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-	typedef std::map<std::string, factory_func_t> factory_map_t;
-
-	void registerCtrl(const std::string& xml_tag, factory_func_t function);
-	BOOL isTagRegistered(const std::string& xml_tag);
-	factory_func_t getCreatorFunc(const std::string& xml_tag);
-
-	// get (first) xml tag for a given class
-	template <class T> std::string getTag()
+	struct Follows : public LLInitParam::Choice<Follows>
 	{
-		factory_map_t::iterator it;
-		for(it = mCreatorFunctions.begin(); it != mCreatorFunctions.end(); ++it)
-		{
-			if (it->second == T::fromXML)
-			{
-				return it->first;
-			}
-		}
-
-		return "";
-	}
-
-private:
-	LLWidgetClassRegistry();
-	virtual ~LLWidgetClassRegistry() {};
-
-	typedef std::set<std::string> ctrl_name_set_t;
-	ctrl_name_set_t mUICtrlNames;
+		Option<std::string>	string;
+		Option<U32>			flags;
 
-	// map of xml tags to widget creator functions
-	factory_map_t mCreatorFunctions;
-};
+        Follows()
+		:   string(""),
+			flags("flags", FOLLOWS_LEFT | FOLLOWS_TOP)
+        {}
+	};
 
-template<class T>
-class LLRegisterWidget
-{
-public:
-	LLRegisterWidget(const std::string& tag) 
+	struct Params : public LLInitParam::Block<Params>
 	{
-		LLWidgetClassRegistry* registry = LLWidgetClassRegistry::getInstance();
-		if (registry->isTagRegistered(tag))
-		{
-			//error!
-			llerrs << "Widget named " << tag << " already registered!" << llendl;
-		}
-		else
-		{
-			registry->registerCtrl(tag, T::fromXML);
-		}
-	}
-};
+		Mandatory<std::string>	name;
+
+		Optional<bool>			enabled,
+								visible;
+		Optional<bool>			mouse_opaque;
+		Optional<bool>			use_bounding_rect;
+		Optional<S32>			tab_group,
+								default_tab_group;
+		Optional<std::string>	tool_tip;
+
+		Optional<S32>			sound_flags;
+		Optional<bool>			serializable;
+		Optional<Follows>		follows;
+		Optional<std::string>	hover_cursor;
+		
+		// font params
+		Optional<const LLFontGL*>	font;
+		Optional<LLFontGL::HAlign>	font_halign;
+		Optional<LLFontGL::VAlign>	font_valign;
+
+		Optional<std::string>	layout;
+		Optional<LLRect>		rect;
+		Optional<S32>			top_delta,
+								bottom_delta,
+								right_delta,
+								left_delta;
+								
+		Optional<bool>			center_horiz,
+								center_vert;
+
+		// these are nested attributes for LLLayoutPanel
+		//FIXME: get parent context involved in parsing traversal
+		Deprecated				user_resize,
+								auto_resize,
+								needs_translate;
+
+		Params();
+	};
+	void initFromParams(const LLView::Params&);
 
-class LLView : public LLMouseHandler, public LLMortician
-{
+protected:
+	LLView(const LLView::Params&);
+	friend class LLUICtrlFactory;
 
 public:
 #if LL_DEBUG
@@ -253,10 +241,6 @@ public:
 	typedef child_tab_order_t::reverse_iterator			child_tab_order_reverse_iter_t;
 	typedef child_tab_order_t::const_reverse_iterator	child_tab_order_const_reverse_iter_t;
 
-	LLView();
-	LLView(const std::string& name, BOOL mouse_opaque);
-	LLView(const std::string& name, const LLRect& rect, BOOL mouse_opaque, U32 follows=FOLLOWS_NONE);
-
 	virtual ~LLView();
 
 	// Hack to support LLFocusMgr (from LLMouseHandler)
@@ -300,15 +284,21 @@ public:
 	void		sendChildToBack(LLView* child);
 	void		moveChildToFrontOfTabGroup(LLUICtrl* child);
 	void		moveChildToBackOfTabGroup(LLUICtrl* child);
+	
+	void		addChildren(LLXMLNodePtr node, LLXMLNodePtr output_node = NULL);
+	
+	virtual bool addChild(LLView* view, S32 tab_group = 0);
+
+	// implemented in terms of addChild()
+	bool		addChildInBack(LLView* view,  S32 tab_group = 0);
 
-	void		addChild(LLView* view, S32 tab_group = 0);
-	void		addChildAtEnd(LLView* view,  S32 tab_group = 0);
 	// remove the specified child from the view, and set it's parent to NULL.
-	void		removeChild(LLView* view, BOOL deleteIt = FALSE);
+	virtual void	removeChild(LLView* view);
+
+	// helper function for lluictrlfactory.h create<> template
+	void setParent(LLView* parent) { if (parent) parent->addChild(this); }
 
-	virtual void	addCtrl( LLUICtrl* ctrl, S32 tab_group);
-	virtual void	addCtrlAtEnd( LLUICtrl* ctrl, S32 tab_group);
-	virtual void	removeCtrl( LLUICtrl* ctrl);
+	virtual BOOL	postBuild() { return TRUE; }
 
 	child_tab_order_t getCtrlOrder() const		{ return mCtrlOrder; }
 	ctrl_list_t getCtrlList() const;
@@ -316,6 +306,7 @@ public:
 	
 	void setDefaultTabGroup(S32 d)				{ mDefaultTabGroup = d; }
 	S32 getDefaultTabGroup() const				{ return mDefaultTabGroup; }
+	S32 getLastTabGroup()						{ return mLastTabGroup; }
 
 	BOOL		isInVisibleChain() const;
 	BOOL		isInEnabledChain() const;
@@ -347,7 +338,7 @@ public:
 	virtual void	onVisibilityChange ( BOOL curVisibilityIn );
 
 	void			pushVisible(BOOL visible)	{ mLastVisible = mVisible; setVisible(visible); }
-	void			popVisible()				{ setVisible(mLastVisible); mLastVisible = TRUE; }
+	void			popVisible()				{ setVisible(mLastVisible); }
 	
 	LLHandle<LLView>	getHandle()				{ mHandle.bind(this); return mHandle; }
 
@@ -361,11 +352,14 @@ public:
 	const LLRect&	getRect() const				{ return mRect; }
 	const LLRect&	getBoundingRect() const		{ return mBoundingRect; }
 	LLRect	getLocalBoundingRect() const;
-	LLRect	getScreenRect() const;
+	LLRect	calcScreenRect() const;
+	LLRect	calcScreenBoundingRect() const;
 	LLRect	getLocalRect() const;
 	virtual LLRect getSnapRect() const;
 	LLRect getLocalSnapRect() const;
 
+	std::string getLayout() { return mLayout; }
+
 	// Override and return required size for this object. 0 for width/height means don't care.
 	virtual LLRect getRequiredRect();
 	void updateBoundingRect();
@@ -373,12 +367,17 @@ public:
 	LLView*		getRootView();
 	LLView*		getParent() const				{ return mParentView; }
 	LLView*		getFirstChild() const			{ return (mChildList.empty()) ? NULL : *(mChildList.begin()); }
+	LLView*		findPrevSibling(LLView* child);
+	LLView*		findNextSibling(LLView* child);
 	S32			getChildCount()	const			{ return (S32)mChildList.size(); }
 	template<class _Pr3> void sortChildren(_Pr3 _Pred) { mChildList.sort(_Pred); }
 	BOOL		hasAncestor(const LLView* parentp) const;
 	BOOL		hasChild(const std::string& childname, BOOL recurse = FALSE) const;
 	BOOL 		childHasKeyboardFocus( const std::string& childname ) const;
-
+	
+	typedef LLTreeDFSIter<LLView, child_list_const_iter_t> tree_iterator_t;
+	tree_iterator_t beginTree();
+	tree_iterator_t endTree();
 
 	//
 	// UTILITIES
@@ -391,13 +390,11 @@ public:
 	BOOL			translateIntoRect( const LLRect& constraint, BOOL allow_partial_outside );
 	void			centerWithin(const LLRect& bounds);
 
-	virtual void	userSetShape(const LLRect& new_rect);
+	void	setShape(const LLRect& new_rect, bool by_user = false);
 	virtual LLView*	findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0);
 	virtual LLView*	findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0);
-
 	virtual BOOL	canSnapTo(const LLView* other_view);
-
-	virtual void	snappedTo(const LLView* snap_view);
+	virtual void	setSnappedTo(const LLView* snap_view);
 
 	virtual BOOL	handleKey(KEY key, MASK mask, BOOL called_from_parent);
 	virtual BOOL	handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
@@ -407,15 +404,11 @@ public:
 									  EAcceptance* accept,
 									  std::string& tooltip_msg);
 
-	std::string getShowNamesToolTip();
+	virtual std::string getShowNamesToolTip();
 
 	virtual void	draw();
 
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	//FIXME: make LLView non-instantiable from XML
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory);
-	virtual void initFromXML(LLXMLNodePtr node, LLView* parent);
-	void parseFollowsFlags(LLXMLNodePtr node);
+	void parseFollowsFlags(const LLView::Params& params);
 
 	// Some widgets, like close box buttons, don't need to be saved
 	BOOL getSaveToXML() const { return mSaveToXML; }
@@ -440,25 +433,16 @@ public:
 	void screenRectToLocal( const LLRect& screen, LLRect* local ) const;
 	void localRectToScreen( const LLRect& local, LLRect* screen ) const;
 	
-	// Listener dispatching functions (Dispatcher deletes pointers to listeners on deregistration or destruction)
-	LLSimpleListener* getListenerByName(const std::string& callback_name);
-	void registerEventListener(std::string name, LLSimpleListener* function);
-	void deregisterEventListener(std::string name);
-	std::string findEventListener(LLSimpleListener *listener) const;
-	void addListenerToControl(LLEventDispatcher *observer, const std::string& name, LLSD filter, LLSD userdata);
-
-	void addBoolControl(const std::string& name, bool initial_value);
-	LLControlVariable *getControl(const std::string& name);
 	LLControlVariable *findControl(const std::string& name);
 
-	bool setControlValue(const LLSD& value);
-	virtual void	setControlName(const std::string& control, LLView *context);
-	virtual std::string getControlName() const { return mControlName; }
+    // Moved setValue(), getValue(), setControlValue(), setControlName(),
+    // controlListener() to LLUICtrl because an LLView is NOT assumed to
+    // contain a value. If that's what you want, use LLUICtrl instead.
 //	virtual bool	handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
-	virtual void	setValue(const LLSD& value);
-	virtual LLSD	getValue() const;
 
 	const child_list_t*	getChildList() const { return &mChildList; }
+	const child_list_const_iter_t	beginChild()  { return mChildList.begin(); }
+	const child_list_const_iter_t	endChild()  { return mChildList.end(); }
 
 	// LLMouseHandler functions
 	//  Default behavior is to pass events to children
@@ -479,26 +463,20 @@ public:
 	/*virtual*/ void	screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const;
 	/*virtual*/ void	localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const;
 
-	template <class T> T* getChild(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const
+	// view-specific handlers 
+	virtual void	onMouseEnter(S32 x, S32 y, MASK mask);
+	virtual void	onMouseLeave(S32 x, S32 y, MASK mask);
+
+
+	template <class T> T* findChild(const std::string& name, BOOL recurse = TRUE) const
 	{
 		LLView* child = getChildView(name, recurse, FALSE);
 		T* result = dynamic_cast<T*>(child);
-		if (!result)
-		{
-			// did we find *something* with that name?
-			if (child)
-			{
-				llwarns << "Found child named " << name << " but of wrong type " << typeid(child).name() << ", expecting " << typeid(T).name() << llendl;
-			}
-			if (create_if_missing)
-			{
-				// create dummy widget instance here
-				result = createDummyWidget<T>(name);
-			}
-		}
 		return result;
 	}
 
+	template <class T> T* getChild(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
+
 	template <class T> T& getChildRef(const std::string& name, BOOL recurse = TRUE) const
 	{
 		return *getChild<T>(name, recurse, TRUE);
@@ -506,39 +484,6 @@ public:
 
 	virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
 
-	template <class T> T* createDummyWidget(const std::string& name) const
-	{
-		T* widget = getDummyWidget<T>(name);
-		if (!widget)
-		{
-			// get xml tag name corresponding to requested widget type (e.g. "button")
-			std::string xml_tag = LLWidgetClassRegistry::getInstance()->getTag<T>();
-			if (xml_tag.empty())
-			{
-				llwarns << "No xml tag registered for this class " << llendl;
-				return NULL;
-			}
-			// create dummy xml node (<button name="foo"/>)
-			LLXMLNodePtr new_node_ptr = new LLXMLNode(xml_tag.c_str(), FALSE);
-			new_node_ptr->createChild("name", TRUE)->setStringValue(name);
-			
-			widget = dynamic_cast<T*>(createWidget(new_node_ptr));
-			if (widget)
-			{
-				// need non-const to update private dummy widget cache
-				llwarns << "Making dummy " << xml_tag << " named " << name << " in " << getName() << llendl;
-				mDummyWidgets.insert(std::make_pair(name, widget));
-			}
-			else
-			{
-				// dynamic cast will fail if T::fromXML only registered for base class
-				llwarns << "Failed to create dummy widget of requested type " << llendl;
-				return NULL;
-			}
-		}
-		return widget;
-	}
-
 	template <class T> T* getDummyWidget(const std::string& name) const
 	{
 		dummy_widget_map_t::const_iterator found_it = mDummyWidgets.find(name);
@@ -549,29 +494,11 @@ public:
 		return dynamic_cast<T*>(found_it->second);
 	}
 
-	LLView* createWidget(LLXMLNodePtr xml_node) const;
-
-
+	//////////////////////////////////////////////
 	// statics
-	static U32 createRect(LLXMLNodePtr node, LLRect &rect, LLView* parent_view, const LLRect &required_rect = LLRect());
-	
-	static LLFontGL* selectFont(LLXMLNodePtr node);
+	//////////////////////////////////////////////
 	static LLFontGL::HAlign selectFontHAlign(LLXMLNodePtr node);
-	static LLFontGL::VAlign selectFontVAlign(LLXMLNodePtr node);
-	static LLFontGL::StyleFlags selectFontStyle(LLXMLNodePtr node);
-
-	
-	// Only saves color if different from default setting.
-	static void addColorXML(LLXMLNodePtr node, const LLColor4& color,
-							const char* xml_name, const char* control_name);
-	// Escapes " (quot) ' (apos) & (amp) < (lt) > (gt)
-	//static std::string escapeXML(const std::string& xml);
-	static LLWString escapeXML(const LLWString& xml);
 	
-	//same as above, but wraps multiple lines in quotes and prepends
-	//indent as leading white space on each line
-	static std::string escapeXML(const std::string& xml, std::string& indent);
-
 	// focuses the item in the list after the currently-focused item, wrapping if necessary
 	static	BOOL focusNext(LLView::child_list_t & result);
 	// focuses the item in the list before the currently-focused item, wrapping if necessary
@@ -582,14 +509,24 @@ public:
 	// return query for iterating over focus roots in tab order
 	static const LLCtrlQuery & getFocusRootsQuery();
 
-	static BOOL deleteViewByHandle(LLHandle<LLView> handle);
+	static void deleteViewByHandle(LLHandle<LLView> handle);
 	static LLWindow*	getWindow(void) { return LLUI::sWindow; }
 
+	// Set up params after XML load before calling new(),
+	// usually to adjust layout.
+	static void setupParams(Params& p, LLView* parent);
+
+	// For re-export of floaters and panels, convert the coordinate system
+	// to be top-left based.
+	static void setupParamsForExport(Params& p, LLView* parent);
 	
 protected:
+	//virtual BOOL	addChildFromParam(const LLInitParam::BaseBlock& params) { return TRUE; }
 	virtual BOOL	handleKeyHere(KEY key, MASK mask);
 	virtual BOOL	handleUnicodeCharHere(llwchar uni_char);
 
+	virtual void	handleReshape(const LLRect& rect, bool by_user);
+
 	void			drawDebugRect();
 	void			drawChild(LLView* childp, S32 x_offset = 0, S32 y_offset = 0, BOOL force_draw = FALSE);
 
@@ -612,11 +549,8 @@ protected:
 	LLView* childrenHandleRightMouseDown(S32 x, S32 y, MASK mask);
 	LLView* childrenHandleRightMouseUp(S32 x, S32 y, MASK mask);
 
-	static bool controlListener(const LLSD& newvalue, LLHandle<LLView> handle, std::string type);
-
-	typedef std::map<std::string, LLControlVariable*> control_map_t;
-	control_map_t mFloaterControls;
-
+	ECursorType mHoverCursor;
+	
 private:
 	LLView*		mParentView;
 	child_list_t mChildList;
@@ -625,11 +559,13 @@ private:
 	// location in pixels, relative to surrounding structure, bottom,left=0,0
 	LLRect		mRect;
 	LLRect		mBoundingRect;
+	std::string mLayout;
 	
 	U32			mReshapeFlags;
 
 	child_tab_order_t mCtrlOrder;
 	S32			mDefaultTabGroup;
+	S32			mLastTabGroup;
 
 	BOOL		mEnabled;		// Enabled means "accepts input that has an effect on the state of the application."
 								// A disabled view, for example, may still have a scrollbar that responds to mouse events.
@@ -651,18 +587,9 @@ private:
 
 	static LLWindow* sWindow;	// All root views must know about their window.
 
-	typedef std::map<std::string, LLPointer<LLSimpleListener> > dispatch_list_t;
-	dispatch_list_t mDispatchList;
-
-	std::string		mControlName;
-
 	typedef std::map<std::string, LLView*> dummy_widget_map_t;
 	mutable dummy_widget_map_t mDummyWidgets;
 
-	boost::signals::connection mControlConnection;
-
-	ECursorType mHoverCursor;
-	
 public:
 	static BOOL	sDebugRects;	// Draw debug rects behind everything.
 	static BOOL sDebugKeys;
@@ -670,8 +597,12 @@ public:
 	static BOOL sDebugMouseHandling;
 	static std::string sMouseHandlerMessage;
 	static S32	sSelectID;
-	static BOOL sEditingUI;
-	static LLView* sEditingUIView;
+//	static BOOL sEditingUI;
+//	static LLView* sEditingUIView;
+	static std::set<LLView*> sPreviewHighlightedElements;	// DEV-16869
+	static BOOL sHighlightingDiffs;							// DEV-16869
+	static LLView* sPreviewClickedElement;					// DEV-16869
+	static BOOL sDrawPreviewHighlights;
 	static S32 sLastLeftXML;
 	static S32 sLastBottomXML;
 	static BOOL sForceReshape;
@@ -688,5 +619,39 @@ private:
 	LLView::child_tab_order_t mTabOrder;
 };
 
+template <class T> T* LLView::getChild(const std::string& name, BOOL recurse, BOOL create_if_missing) const
+{
+	LLView* child = getChildView(name, recurse, FALSE);
+	T* result = dynamic_cast<T*>(child);
+	if (!result)
+	{
+		// did we find *something* with that name?
+		if (child)
+		{
+			llwarns << "Found child named " << name << " but of wrong type " << typeid(child).name() << ", expecting " << typeid(T*).name() << llendl;
+		}
+		if (create_if_missing)
+		{
+			result = getDummyWidget<T>(name);
+			if (!result)
+			{
+				result = LLUICtrlFactory::createDummyWidget<T>(name);
+
+				if (result)
+				{
+					llwarns << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << llendl;
+				}
+				else
+				{
+					llwarns << "Failed to create dummy " << typeid(T).name() << llendl;
+					return NULL;
+				}
+
+				mDummyWidgets[name] = result;
+			}
+		}
+	}
+	return result;
+}
 
 #endif //LL_LLVIEW_H
diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp
index d4a9e9d1bf..540a9f7513 100644
--- a/indra/llui/llviewborder.cpp
+++ b/indra/llui/llviewborder.cpp
@@ -33,25 +33,52 @@
 #include "llviewborder.h"
 #include "llrender.h"
 #include "llfocusmgr.h"
+#include "lluictrlfactory.h"
 
 static LLRegisterWidget<LLViewBorder> r("view_border");
 
-LLViewBorder::LLViewBorder( const std::string& name, const LLRect& rect, EBevel bevel, EStyle style, S32 width )
-	:
-	LLView( name, rect, FALSE ),
-	mBevel( bevel ),
-	mStyle( style ),
-	mHighlightLight( LLUI::sColorsGroup->getColor( "DefaultHighlightLight" ) ),
-	mHighlightDark(	LLUI::sColorsGroup->getColor( "DefaultHighlightDark" ) ),
-	mShadowLight( LLUI::sColorsGroup->getColor( "DefaultShadowLight" ) ),
-	mShadowDark( LLUI::sColorsGroup->getColor( "DefaultShadowDark" ) ),
-	mBorderWidth( width ),
-	mTexture( NULL ),
-	mHasKeyboardFocus( FALSE )
+void LLViewBorder::BevelValues::declareValues()
+{
+	declare("in", LLViewBorder::BEVEL_IN);
+	declare("out", LLViewBorder::BEVEL_OUT);
+	declare("bright", LLViewBorder::BEVEL_BRIGHT);
+	declare("none", LLViewBorder::BEVEL_NONE);
+}
+
+void LLViewBorder::StyleValues::declareValues()
+{
+	declare("line", LLViewBorder::STYLE_LINE);
+	declare("texture", LLViewBorder::STYLE_TEXTURE);
+}
+
+LLViewBorder::Params::Params()
+:	bevel_type("bevel_style", BEVEL_OUT),
+	render_style("border_style", STYLE_LINE),
+	border_thickness("border_thickness"),
+	highlight_light_color("highlight_light_color"),
+	highlight_dark_color("highlight_dark_color"),
+	shadow_light_color("shadow_light_color"),
+	shadow_dark_color("shadow_dark_color")
 {
-	setFollowsAll();
+	name = "view_border";
+	mouse_opaque = false;
+	follows.flags = FOLLOWS_ALL;
 }
 
+
+LLViewBorder::LLViewBorder(const LLViewBorder::Params& p)
+:	LLView(p),
+	mTexture( NULL ),
+	mHasKeyboardFocus( FALSE ),
+	mBorderWidth(p.border_thickness),
+	mHighlightLight(p.highlight_light_color()),
+	mHighlightDark(p.highlight_dark_color()),
+	mShadowLight(p.shadow_light_color()),
+	mShadowDark(p.shadow_dark_color()),
+	mBevel(p.bevel_type),
+	mStyle(p.render_style)
+{}
+
 void LLViewBorder::setColors( const LLColor4& shadow_dark, const LLColor4& highlight_light )
 {
 	mShadowDark = shadow_dark;
@@ -69,7 +96,7 @@ void LLViewBorder::setColorsExtended( const LLColor4& shadow_light, const LLColo
 
 void LLViewBorder::setTexture( const LLUUID &image_id )
 {
-	mTexture = LLUI::sImageProvider->getUIImageByID(image_id);
+	mTexture = LLUI::getUIImageByID(image_id);
 }
 
 
@@ -114,17 +141,17 @@ void LLViewBorder::drawOnePixelLines()
 {
 	gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
 
-	LLColor4 top_color = mHighlightLight;
-	LLColor4 bottom_color = mHighlightLight;
+	LLColor4 top_color = mHighlightLight.get();
+	LLColor4 bottom_color = mHighlightLight.get();
 	switch( mBevel )
 	{
 	case BEVEL_OUT:
-		top_color		= mHighlightLight;
-		bottom_color	= mShadowDark;
+		top_color		= mHighlightLight.get();
+		bottom_color	= mShadowDark.get();
 		break;
 	case BEVEL_IN:
-		top_color		= mShadowDark;
-		bottom_color	= mHighlightLight;
+		top_color		= mShadowDark.get();
+		bottom_color	= mHighlightLight.get();
 		break;
 	case BEVEL_NONE:
 		// use defaults
@@ -163,31 +190,36 @@ void LLViewBorder::drawTwoPixelLines()
 	
 	LLColor4 focus_color = gFocusMgr.getFocusColor();
 
-	F32* top_in_color		= mShadowDark.mV;
-	F32* top_out_color		= mShadowDark.mV;
-	F32* bottom_in_color	= mShadowDark.mV;
-	F32* bottom_out_color	= mShadowDark.mV;
+	LLColor4 top_in_color;
+	LLColor4 top_out_color;
+	LLColor4 bottom_in_color;
+	LLColor4 bottom_out_color;
+
 	switch( mBevel )
 	{
 	case BEVEL_OUT:
-		top_in_color		= mHighlightLight.mV;
-		top_out_color		= mHighlightDark.mV;
-		bottom_in_color		= mShadowLight.mV;
-		bottom_out_color	= mShadowDark.mV;
+		top_in_color		= mHighlightLight.get();
+		top_out_color		= mHighlightDark.get();
+		bottom_in_color		= mShadowLight.get();
+		bottom_out_color	= mShadowDark.get();
 		break;
 	case BEVEL_IN:
-		top_in_color		= mShadowDark.mV;
-		top_out_color		= mShadowLight.mV;
-		bottom_in_color		= mHighlightDark.mV;
-		bottom_out_color	= mHighlightLight.mV;
+		top_in_color		= mShadowDark.get();
+		top_out_color		= mShadowLight.get();
+		bottom_in_color		= mHighlightDark.get();
+		bottom_out_color	= mHighlightLight.get();
 		break;
 	case BEVEL_BRIGHT:
-		top_in_color		= mHighlightLight.mV;
-		top_out_color		= mHighlightLight.mV;
-		bottom_in_color		= mHighlightLight.mV;
-		bottom_out_color	= mHighlightLight.mV;
+		top_in_color		= mHighlightLight.get();
+		top_out_color		= mHighlightLight.get();
+		bottom_in_color		= mHighlightLight.get();
+		bottom_out_color	= mHighlightLight.get();
 		break;
 	case BEVEL_NONE:
+		top_in_color		= mShadowDark.get();
+		top_out_color		= mShadowDark.get();
+		bottom_in_color		= mShadowDark.get();
+		bottom_out_color	= mShadowDark.get();
 		// use defaults
 		break;
 	default:
@@ -196,8 +228,8 @@ void LLViewBorder::drawTwoPixelLines()
 
 	if( mHasKeyboardFocus )
 	{
-		top_out_color = focus_color.mV;
-		bottom_out_color = focus_color.mV;
+		top_out_color = focus_color;
+		bottom_out_color = focus_color;
 	}
 
 	S32 left	= 0;
@@ -206,19 +238,19 @@ void LLViewBorder::drawTwoPixelLines()
 	S32 bottom	= 0;
 
 	// draw borders
-	gGL.color3fv( top_out_color );
+	gGL.color3fv( top_out_color.mV );
 	gl_line_2d(left, bottom, left, top-1);
 	gl_line_2d(left, top-1, right, top-1);
 
-	gGL.color3fv( top_in_color );
+	gGL.color3fv( top_in_color.mV );
 	gl_line_2d(left+1, bottom+1, left+1, top-2);
 	gl_line_2d(left+1, top-2, right-1, top-2);
 
-	gGL.color3fv( bottom_out_color );
+	gGL.color3fv( bottom_out_color.mV );
 	gl_line_2d(right-1, top-1, right-1, bottom);
 	gl_line_2d(left, bottom, right, bottom);
 
-	gGL.color3fv( bottom_in_color );
+	gGL.color3fv( bottom_in_color.mV );
 	gl_line_2d(right-2, top-2, right-2, bottom+1);
 	gl_line_2d(left+1, bottom+1, right-1, bottom+1);
 }
@@ -302,26 +334,3 @@ BOOL LLViewBorder::getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel
 	return FALSE;
 }
 
-
-// static
-LLView* LLViewBorder::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("view_border");
-	node->getAttributeString("name", name);
-
-	LLViewBorder::EBevel bevel_style = LLViewBorder::BEVEL_IN;
-	getBevelFromAttribute(node, bevel_style);
-
-	S32 border_thickness = 1;
-	node->getAttributeS32("border_thickness", border_thickness);
-
-	LLViewBorder* border = new LLViewBorder(name, 
-									LLRect(), 
-									bevel_style,
-									LLViewBorder::STYLE_LINE,
-									border_thickness);
-
-	border->initFromXML(node, parent);
-	
-	return border;
-}
diff --git a/indra/llui/llviewborder.h b/indra/llui/llviewborder.h
index a40e6534a8..37e13fb181 100644
--- a/indra/llui/llviewborder.h
+++ b/indra/llui/llviewborder.h
@@ -35,15 +35,41 @@
 
 #include "llview.h"
 
-
 class LLViewBorder : public LLView
 {
 public:
-	enum EBevel { BEVEL_IN, BEVEL_OUT, BEVEL_BRIGHT, BEVEL_NONE };
-	enum EStyle { STYLE_LINE, STYLE_TEXTURE };
-
-	LLViewBorder( const std::string& name, const LLRect& rect, EBevel bevel = BEVEL_OUT, EStyle style = STYLE_LINE, S32 width = 1 );
-
+	typedef enum e_bevel { BEVEL_IN, BEVEL_OUT, BEVEL_BRIGHT, BEVEL_NONE } EBevel ;
+	typedef enum e_style { STYLE_LINE, STYLE_TEXTURE } EStyle;
+
+	struct BevelValues
+	:	public LLInitParam::TypeValuesHelper<LLViewBorder::EBevel, BevelValues>
+	{
+		static void declareValues();
+	};
+
+	struct StyleValues
+	:	public LLInitParam::TypeValuesHelper<LLViewBorder::EStyle, StyleValues>
+	{
+		static void declareValues();
+	};
+
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Optional<EBevel, BevelValues>	bevel_type;
+		Optional<EStyle, StyleValues>	render_style;	
+		Optional<S32>					border_thickness;
+
+		Optional<LLUIColor>		highlight_light_color,
+								highlight_dark_color,
+								shadow_light_color,
+								shadow_dark_color;
+
+		Params();
+	};
+protected:
+	LLViewBorder(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	virtual void setValue(const LLSD& val) { setRect(LLRect(val)); }
 
 	virtual BOOL isCtrl() const { return FALSE; }
@@ -51,7 +77,6 @@ public:
 	// llview functionality
 	virtual void draw();
 	
-	static  LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory);
 	static BOOL getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style);
 
 	void		setBorderWidth(S32 width)			{ mBorderWidth = width; }
@@ -63,8 +88,8 @@ public:
 				  				   const LLColor4& highlight_light, const LLColor4& highlight_dark );
 	void		setTexture( const class LLUUID &image_id );
 
-	LLColor4	getHighlightLight() {return mHighlightLight;}
-	LLColor4	getShadowDark() {return mHighlightDark;}
+	LLColor4	getHighlightLight() {return mHighlightLight.get();}
+	LLColor4	getShadowDark() {return mHighlightDark.get();}
 
 	EStyle		getStyle() const { return mStyle; }
 
@@ -77,14 +102,14 @@ private:
 	void		drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32 start_x, F32 start_y );
 
 	EBevel		mBevel;
-	const EStyle mStyle;
-	LLColor4	mHighlightLight;
-	LLColor4	mHighlightDark;
-	LLColor4	mShadowLight;
-	LLColor4	mShadowDark;
-	LLColor4	mBackgroundColor;
+	EStyle		mStyle;
+	LLUIColor	mHighlightLight;
+	LLUIColor	mHighlightDark;
+	LLUIColor	mShadowLight;
+	LLUIColor	mShadowDark;
+	LLUIColor	mBackgroundColor;
 	S32			mBorderWidth;
-	LLUIImagePtr	mTexture;
+	LLPointer<LLUIImage>	mTexture;
 	BOOL		mHasKeyboardFocus;
 };
 
diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp
new file mode 100644
index 0000000000..4107289e85
--- /dev/null
+++ b/indra/llui/llviewmodel.cpp
@@ -0,0 +1,163 @@
+/**
+ * @file   llviewmodel.cpp
+ * @author Nat Goodspeed
+ * @date   2008-08-08
+ * @brief  Implementation for llviewmodel.
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "llviewmodel.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+
+///
+LLViewModel::LLViewModel()
+ : mDirty(false)
+{
+}
+
+/// Instantiate an LLViewModel with an existing data value
+LLViewModel::LLViewModel(const LLSD& value)
+  : mDirty(false)
+{
+    setValue(value);
+}
+
+/// Update the stored value
+void LLViewModel::setValue(const LLSD& value)
+{
+    mValue = value;
+    mDirty = true;
+}
+
+LLSD LLViewModel::getValue() const
+{
+    return mValue;
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+///
+LLTextViewModel::LLTextViewModel()
+  : LLViewModel(false),
+	mUpdateFromDisplay(false)
+{
+}
+
+/// Instantiate an LLViewModel with an existing data value
+LLTextViewModel::LLTextViewModel(const LLSD& value)
+  : LLViewModel(value),
+	mUpdateFromDisplay(false)
+{
+}
+
+/// Update the stored value
+void LLTextViewModel::setValue(const LLSD& value)
+{
+	LLViewModel::setValue(value);
+    mDisplay = utf8str_to_wstring(value.asString());
+    // mDisplay and mValue agree
+    mUpdateFromDisplay = false;
+}
+
+void LLTextViewModel::setDisplay(const LLWString& value)
+{
+    // This is the strange way to alter the value. Normally we'd setValue()
+    // and do the utf8str_to_wstring() to get the corresponding mDisplay
+    // value. But a text editor might want to edit the display string
+    // directly, then convert back to UTF8 on commit.
+    mDisplay = value;
+    mDirty = true;
+    // Don't immediately convert to UTF8 -- do it lazily -- we expect many
+    // more setDisplay() calls than getValue() calls. Just flag that it needs
+    // doing.
+    mUpdateFromDisplay = true;
+}
+
+LLSD LLTextViewModel::getValue() const
+{
+    // Has anyone called setDisplay() since the last setValue()? If so, have
+    // to convert mDisplay back to UTF8.
+    if (mUpdateFromDisplay)
+    {
+        // The fact that we're lazily updating fields in this object should be
+        // transparent to clients, which is why this method is left
+        // conventionally const. Nor do we particularly want to make these
+        // members mutable. Just cast away constness in this one place.
+        LLTextViewModel* nthis = const_cast<LLTextViewModel*>(this);
+        nthis->mUpdateFromDisplay = false;
+        nthis->mValue = wstring_to_utf8str(mDisplay);
+    }
+    return LLViewModel::getValue();
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+
+LLListViewModel::LLListViewModel(const LLSD& values)
+  : LLViewModel()
+{
+}
+
+void LLListViewModel::addColumn(const LLSD& column, EAddPosition pos)
+{
+}
+
+void LLListViewModel::clearColumns()
+{
+}
+
+void LLListViewModel::setColumnLabel(const std::string& column, const std::string& label)
+{
+}
+
+LLScrollListItem* LLListViewModel::addElement(const LLSD& value, EAddPosition pos,
+                                         void* userdata)
+{
+    return NULL;
+}
+
+LLScrollListItem* LLListViewModel::addSimpleElement(const std::string& value, EAddPosition pos,
+                                               const LLSD& id)
+{
+    return NULL;
+}
+
+void LLListViewModel::clearRows()
+{
+}
+
+void LLListViewModel::sortByColumn(const std::string& name, bool ascending)
+{
+}
diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h
new file mode 100644
index 0000000000..c8a9b52cca
--- /dev/null
+++ b/indra/llui/llviewmodel.h
@@ -0,0 +1,219 @@
+/**
+ * @file   llviewmodel.h
+ * @author Nat Goodspeed
+ * @date   2008-08-08
+ * @brief  Define "View Model" classes intended to store data values for use
+ *         by LLUICtrl subclasses. The phrase is borrowed from Microsoft
+ *         terminology, in which "View Model" means the storage object
+ *         underlying a specific widget object -- as in our case -- rather
+ *         than the business "model" object underlying the overall "view"
+ *         presented by the collection of widgets.
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLVIEWMODEL_H)
+#define LL_LLVIEWMODEL_H
+
+#include "llpointer.h"
+#include "llsd.h"
+#include "llrefcount.h"
+#include "stdenums.h"
+#include "llstring.h"
+#include <string>
+
+class LLScrollListItem;
+
+class LLViewModel;
+class LLTextViewModel;
+class LLListViewModel;
+// Because LLViewModel is derived from LLRefCount, always pass, store
+// and return LLViewModelPtr rather than plain LLViewModel*.
+typedef LLPointer<LLViewModel> LLViewModelPtr;
+typedef LLPointer<LLTextViewModel> LLTextViewModelPtr;
+typedef LLPointer<LLListViewModel> LLListViewModelPtr;
+
+/**
+ * LLViewModel stores a scalar LLSD data item, the current display value of a
+ * scalar LLUICtrl widget. LLViewModel subclasses are used to store data
+ * collections used for aggregate widgets. LLViewModel is ref-counted because
+ * -- for multiple skins -- we may have distinct widgets sharing the same
+ * LLViewModel data. This way, the LLViewModel is quietly deleted when the
+ * last referencing widget is destroyed.
+ */
+class LLViewModel: public LLRefCount
+{
+public:
+    LLViewModel();
+    /// Instantiate an LLViewModel with an existing data value
+    LLViewModel(const LLSD& value);
+
+    /// Update the stored value
+    virtual void setValue(const LLSD& value);
+    /// Get the stored value, in appropriate type.
+    virtual LLSD getValue() const;
+
+    /// Has the value been changed since last time we checked?
+    bool isDirty() const { return mDirty; }
+    /// Once the value has been saved to a file, or otherwise consumed by the
+    /// app, we no longer need to enable the Save button
+    void resetDirty() { mDirty = false; }
+	// 
+    void setDirty() { mDirty = true; }
+
+protected:
+    LLSD mValue;
+    bool mDirty;
+};
+
+/**
+ * LLTextViewModel stores a value displayed as text. 
+ */
+class LLTextViewModel: public LLViewModel
+{
+public:
+    LLTextViewModel();
+    /// Instantiate an LLViewModel with an existing data value
+    LLTextViewModel(const LLSD& value);
+	
+	// LLViewModel functions
+    virtual void setValue(const LLSD& value);
+    virtual LLSD getValue() const;
+
+	// New functions
+    /// Get the stored value in string form
+    LLWString getDisplay() const { return mDisplay; }
+    /**
+     * Set the display string directly (see LLTextEditor). What the user is
+     * editing is actually the LLWString value rather than the underlying
+     * UTF-8 value.
+     */
+    void setDisplay(const LLWString& value);
+	
+private:
+    /// To avoid converting every widget's stored value from LLSD to LLWString
+    /// every frame, cache the converted value
+    LLWString mDisplay;
+    /// As the user edits individual characters (setDisplay()), defer
+    /// LLWString-to-UTF8 conversions until s/he's done.
+    bool mUpdateFromDisplay;
+};
+
+/**
+ * LLListViewModel stores a list of data items. The semantics are borrowed
+ * from LLScrollListCtrl.
+ */
+class LLListViewModel: public LLViewModel
+{
+public:
+    LLListViewModel() {}
+    LLListViewModel(const LLSD& values);
+
+    virtual void addColumn(const LLSD& column, EAddPosition pos = ADD_BOTTOM);
+    virtual void clearColumns();
+    virtual void setColumnLabel(const std::string& column, const std::string& label);
+    virtual LLScrollListItem* addElement(const LLSD& value, EAddPosition pos = ADD_BOTTOM,
+                                         void* userdata = NULL);
+    virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos,
+                                               const LLSD& id);
+    virtual void clearRows();
+    virtual void sortByColumn(const std::string& name, bool ascending);
+};
+
+//namespace LLViewModel
+//{
+//	class Value
+//	{
+//	public:
+//		Value(const LLSD& value = LLSD());
+//
+//		LLSD getValue() const { return mValue; }
+//		void setValue(const LLSD& value) { mValue = value; }
+//
+//		bool isAvailable() const { return false; }
+//		bool isReadOnly() const { return false; }
+//
+//		bool undo() { return false; }
+//		bool redo() { return false; }
+//
+//	    /// Has the value been changed since last time we checked?
+//		bool isDirty() const { return mDirty; }
+//		/// Once the value has been saved to a file, or otherwise consumed by the
+//		/// app, we no longer need to enable the Save button
+//		void resetDirty() { mDirty = false; }
+//		// 
+//		void setDirty() { mDirty = true; }
+//
+//	protected:
+//		LLSD	mValue;
+//		bool mDirty;
+//	};
+//
+//	class Numeric : public Value
+//	{
+//	public:
+//		Numeric(S32 value = 0);
+//		Numeric(F32 value);
+//
+//		F32 getPrecision();
+//		F32 getMin();
+//		F32 getMax();
+//
+//		void increment();
+//		void decrement();
+//	};
+//
+//	class MultipleValues : public Value
+//	{
+//		class Selector
+//		{};
+//
+//		MultipleValues();
+//		virtual S32 numElements();
+//	};
+//
+//	class Tuple : public MultipleValues
+//	{
+//		Tuple(S32 size);
+//		LLSD getValue(S32 which) const;
+//		void setValue(S32 which, const LLSD& value);
+//	};
+//
+//	class List : public MultipleValues
+//	{
+//		List();
+//
+//		void add(const ValueModel& value);
+//		bool remove(const Selector& item);
+//
+//		void setSortElement(const Selector& element);
+//		void sort();
+//	};
+//
+//};
+#endif /* ! defined(LL_LLVIEWMODEL_H) */
diff --git a/indra/llui/llviewquery.h b/indra/llui/llviewquery.h
index e87795f9a3..98d9bf8796 100644
--- a/indra/llui/llviewquery.h
+++ b/indra/llui/llviewquery.h
@@ -35,7 +35,7 @@
 
 #include <list>	
 
-#include "llmemory.h"
+#include "llsingleton.h"
 #include "llui.h"
 
 class LLView;
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index d6a6eca341..54af8b43ad 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -41,7 +41,9 @@
 #endif
 
 #include "lldir.h"
+
 #include "llerror.h"
+#include "lltimer.h"	// ms_sleep()
 #include "lluuid.h"
 
 #if LL_WINDOWS
@@ -125,16 +127,20 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
 }
 
 const std::string LLDir::findFile(const std::string &filename, 
-						   const std::string searchPath1, 
-						   const std::string searchPath2, 
-						   const std::string searchPath3) const
+						   const std::string& searchPath1, 
+						   const std::string& searchPath2, 
+						   const std::string& searchPath3) const
 {
 	std::vector<std::string> search_paths;
 	search_paths.push_back(searchPath1);
 	search_paths.push_back(searchPath2);
 	search_paths.push_back(searchPath3);
+	return findFile(filename, search_paths);
+}
 
-	std::vector<std::string>::iterator search_path_iter;
+const std::string LLDir::findFile(const std::string& filename, const std::vector<std::string> search_paths) const
+{
+	std::vector<std::string>::const_iterator search_path_iter;
 	for (search_path_iter = search_paths.begin();
 		search_path_iter != search_paths.end();
 		++search_path_iter)
@@ -319,19 +325,13 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd
 		prefix += mDirDelimiter;
 		prefix += "app_settings";
 		break;
-		
+	
 	case LL_PATH_CHARACTER:
 		prefix = getAppRODataDir();
 		prefix += mDirDelimiter;
 		prefix += "character";
 		break;
 		
-	case LL_PATH_MOTIONS:
-		prefix = getAppRODataDir();
-		prefix += mDirDelimiter;
-		prefix += "motions";
-		break;
-		
 	case LL_PATH_HELP:
 		prefix = "help";
 		break;
@@ -372,17 +372,29 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd
 		prefix = getSkinDir();
 		break;
 
+	case LL_PATH_DEFAULT_SKIN:
+		prefix = getDefaultSkinDir();
+		break;
+
+	case LL_PATH_USER_SKIN:
+		prefix = getOSUserAppDir();
+		prefix += mDirDelimiter;
+		prefix += "user_settings";
+		prefix += mDirDelimiter;
+		prefix += "skins";
+		break;
+
 	case LL_PATH_SKINS:
 		prefix = getAppRODataDir();
 		prefix += mDirDelimiter;
 		prefix += "skins";
 		break;
 
-	//case LL_PATH_HTML:
-	//	prefix = getSkinDir();
-	//	prefix += mDirDelimiter;
-	//	prefix += "html";
-	//	break;
+	case LL_PATH_LOCAL_ASSETS:
+		prefix = getAppRODataDir();
+		prefix += mDirDelimiter;
+		prefix += "local_assets";
+		break;
 
 	case LL_PATH_MOZILLA_PROFILE:
 		prefix = getOSUserAppDir();
@@ -488,11 +500,14 @@ std::string LLDir::findSkinnedFilename(const std::string &subdir1, const std::st
 	std::string subdirs = ((subdir1.empty() ? "" : mDirDelimiter) + subdir1)
 						 + ((subdir2.empty() ? "" : mDirDelimiter) + subdir2);
 
-	std::string found_file = findFile(filename,
-		getUserSkinDir() + subdirs,		// first look in user skin override
-		getSkinDir() + subdirs,			// then in current skin
-		getDefaultSkinDir() + subdirs); // and last in default skin
+	std::vector<std::string> search_paths;
+	
+	search_paths.push_back(getUserSkinDir() + subdirs);		// first look in user skin override
+	search_paths.push_back(getSkinDir() + subdirs);			// then in current skin
+	search_paths.push_back(getDefaultSkinDir() + subdirs);  // then default skin
+	search_paths.push_back(getCacheDir() + subdirs);		// and last in preload directory
 
+	std::string found_file = findFile(filename, search_paths);
 	return found_file;
 }
 
diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h
index 760b6512a5..a33f7a2914 100644
--- a/indra/llvfs/lldir.h
+++ b/indra/llvfs/lldir.h
@@ -47,17 +47,19 @@ typedef enum ELLPath
 	LL_PATH_PER_SL_ACCOUNT = 3,	
 	LL_PATH_CACHE = 4,	
 	LL_PATH_CHARACTER = 5,	
-	LL_PATH_MOTIONS = 6,
-	LL_PATH_HELP = 7,		
-	LL_PATH_LOGS = 8,
-	LL_PATH_TEMP = 9,
-	LL_PATH_SKINS = 10,
-	LL_PATH_TOP_SKIN = 11,
-	LL_PATH_CHAT_LOGS = 12,
-	LL_PATH_PER_ACCOUNT_CHAT_LOGS = 13,
-	LL_PATH_MOZILLA_PROFILE = 14,
-//	LL_PATH_HTML = 15,
+	LL_PATH_HELP = 6,		
+	LL_PATH_LOGS = 7,
+	LL_PATH_TEMP = 8,
+	LL_PATH_SKINS = 9,
+	LL_PATH_TOP_SKIN = 10,
+	LL_PATH_CHAT_LOGS = 11,
+	LL_PATH_PER_ACCOUNT_CHAT_LOGS = 12,
+	LL_PATH_MOZILLA_PROFILE = 13,
+	LL_PATH_USER_SKIN = 14,
+	LL_PATH_LOCAL_ASSETS = 15,
+//	LL_PATH_HTML = 16,
 	LL_PATH_EXECUTABLE = 16,
+	LL_PATH_DEFAULT_SKIN = 17,
 	LL_PATH_LAST
 } ELLPath;
 
@@ -68,8 +70,13 @@ class LLDir
 	LLDir();
 	virtual ~LLDir();
 
-	virtual void initAppDirs(const std::string &app_name) = 0;
- public:	
+	// app_name - Usually SecondLife, used for creating settings directories
+	// in OS-specific location, such as C:\Documents and Settings
+	// app_read_only_data_dir - Usually the source code directory, used
+	// for test applications to read newview data files.
+	virtual void initAppDirs(const std::string &app_name, 
+		const std::string& app_read_only_data_dir = "") = 0;
+
 	virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask);
 
 // pure virtual functions
@@ -79,7 +86,8 @@ class LLDir
 	virtual std::string getCurPath() = 0;
 	virtual BOOL fileExists(const std::string &filename) const = 0;
 
-	const std::string findFile(const std::string &filename, const std::string searchPath1 = "", const std::string searchPath2 = "", const std::string searchPath3 = "") const;
+	const std::string findFile(const std::string& filename, const std::vector<std::string> filenames) const; 
+	const std::string findFile(const std::string& filename, const std::string& searchPath1 = "", const std::string& searchPath2 = "", const std::string& searchPath3 = "") const;
 	const std::string &getExecutablePathAndName() const;	// Full pathname of the executable
 	const std::string &getAppName() const;			// install directory under progams/ ie "SecondLife"
 	const std::string &getExecutableDir() const;	// Directory where the executable is located
diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp
index 8ff8c5d1c6..2d724f0f9f 100644
--- a/indra/llvfs/lldir_linux.cpp
+++ b/indra/llvfs/lldir_linux.cpp
@@ -139,8 +139,14 @@ LLDir_Linux::~LLDir_Linux()
 // Implementation
 
 
-void LLDir_Linux::initAppDirs(const std::string &app_name)
+void LLDir_Linux::initAppDirs(const std::string &app_name,
+							  const std::string& app_read_only_data_dir)
 {
+	// Allow override so test apps can read newview directory
+	if (!app_read_only_data_dir.empty())
+	{
+		mAppRODataDir = app_read_only_data_dir;
+	}
 	mAppName = app_name;
 
 	std::string upper_app_name(app_name);
diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h
index 20b408f8dc..a78a9854ff 100644
--- a/indra/llvfs/lldir_linux.h
+++ b/indra/llvfs/lldir_linux.h
@@ -44,7 +44,8 @@ public:
 	LLDir_Linux();
 	virtual ~LLDir_Linux();
 
-	virtual void initAppDirs(const std::string &app_name);
+	/*virtual*/ void initAppDirs(const std::string &app_name,
+		const std::string& app_read_only_data_dir);
 public:	
 	virtual std::string getCurPath();
 	virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp
index d4dee5a02e..04577bfc3b 100644
--- a/indra/llvfs/lldir_mac.cpp
+++ b/indra/llvfs/lldir_mac.cpp
@@ -203,8 +203,14 @@ LLDir_Mac::~LLDir_Mac()
 // Implementation
 
 
-void LLDir_Mac::initAppDirs(const std::string &app_name)
+void LLDir_Mac::initAppDirs(const std::string &app_name,
+							const std::string& app_read_only_data_dir)
 {
+	// Allow override so test apps can read newview directory
+	if (!app_read_only_data_dir.empty())
+	{
+		mAppRODataDir = app_read_only_data_dir;
+	}
 	mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
 
 	//dumpCurrentDirectories();
diff --git a/indra/llvfs/lldir_mac.h b/indra/llvfs/lldir_mac.h
index 28d48a0b6a..82ac94ed4c 100644
--- a/indra/llvfs/lldir_mac.h
+++ b/indra/llvfs/lldir_mac.h
@@ -43,7 +43,8 @@ public:
 	LLDir_Mac();
 	virtual ~LLDir_Mac();
 
-	virtual void initAppDirs(const std::string &app_name);
+	/*virtual*/ void initAppDirs(const std::string &app_name,
+		const std::string& app_read_only_data_dir);
 public:	
 	virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask);
 	virtual std::string getCurPath();
diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp
index 9553d923aa..ba71bc0eb4 100644
--- a/indra/llvfs/lldir_solaris.cpp
+++ b/indra/llvfs/lldir_solaris.cpp
@@ -172,8 +172,14 @@ LLDir_Solaris::~LLDir_Solaris()
 // Implementation
 
 
-void LLDir_Solaris::initAppDirs(const std::string &app_name)
+void LLDir_Solaris::initAppDirs(const std::string &app_name,
+								const std::string& app_read_only_data_dir)
 {
+	// Allow override so test apps can read newview directory
+	if (!app_read_only_data_dir.empty())
+	{
+		mAppRODataDir = app_read_only_data_dir;
+	}
 	mAppName = app_name;
 
 	std::string upper_app_name(app_name);
diff --git a/indra/llvfs/lldir_solaris.h b/indra/llvfs/lldir_solaris.h
index 139754ba28..1fa8348355 100644
--- a/indra/llvfs/lldir_solaris.h
+++ b/indra/llvfs/lldir_solaris.h
@@ -44,7 +44,8 @@ public:
 	LLDir_Solaris();
 	virtual ~LLDir_Solaris();
 
-	virtual void initAppDirs(const std::string &app_name);
+	/*virtual*/ void initAppDirs(const std::string &app_name,
+		const std::string& app_read_only_data_dir);
 public:	
 	virtual std::string getCurPath();
 	virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp
index 19b9bcc6ea..1fdd31c635 100644
--- a/indra/llvfs/lldir_win32.cpp
+++ b/indra/llvfs/lldir_win32.cpp
@@ -151,8 +151,14 @@ LLDir_Win32::~LLDir_Win32()
 
 // Implementation
 
-void LLDir_Win32::initAppDirs(const std::string &app_name)
+void LLDir_Win32::initAppDirs(const std::string &app_name,
+							  const std::string& app_read_only_data_dir)
 {
+	// Allow override so test apps can read newview directory
+	if (!app_read_only_data_dir.empty())
+	{
+		mAppRODataDir = app_read_only_data_dir;
+	}
 	mAppName = app_name;
 	mOSUserAppDir = mOSUserDir;
 	mOSUserAppDir += "\\";
@@ -205,7 +211,14 @@ void LLDir_Win32::initAppDirs(const std::string &app_name)
 			llwarns << "Couldn't create LL_PATH_MOZILLA_PROFILE dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl;
 		}
 	}
-	
+	res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SKIN,""));
+	if (res == -1)
+	{
+		if (errno != EEXIST)
+		{
+			llwarns << "Couldn't create LL_PATH_SKINS dir " << getExpandedFilename(LL_PATH_USER_SKIN,"") << llendl;
+		}
+	}
 	mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
 }
 
diff --git a/indra/llvfs/lldir_win32.h b/indra/llvfs/lldir_win32.h
index 8710ca50e1..d2497901e4 100644
--- a/indra/llvfs/lldir_win32.h
+++ b/indra/llvfs/lldir_win32.h
@@ -41,7 +41,8 @@ public:
 	LLDir_Win32();
 	virtual ~LLDir_Win32();
 
-	/*virtual*/ void initAppDirs(const std::string &app_name);
+	/*virtual*/ void initAppDirs(const std::string &app_name,
+		const std::string& app_read_only_data_dir);
 
 	/*virtual*/ std::string getCurPath();
 	/*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask);
diff --git a/indra/llvfs/lllfsthread.h b/indra/llvfs/lllfsthread.h
index 5a11cb33d7..3139693302 100644
--- a/indra/llvfs/lllfsthread.h
+++ b/indra/llvfs/lllfsthread.h
@@ -39,7 +39,7 @@
 #include <set>
 
 #include "llapr.h"
-
+#include "llpointer.h"
 #include "llqueuedthread.h"
 
 //============================================================================
diff --git a/indra/llvfs/llpidlock.cpp b/indra/llvfs/llpidlock.cpp
index e231002a52..93ac120302 100755
--- a/indra/llvfs/llpidlock.cpp
+++ b/indra/llvfs/llpidlock.cpp
@@ -5,7 +5,7 @@
  *
  * $LicenseInfo:firstyear=2007&license=viewergpl$
  * 
- * Copyright (c) 2007, Linden Research, Inc.
+ * Copyright (c) 2007-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -13,12 +13,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/llvfs/llpidlock.h b/indra/llvfs/llpidlock.h
index 44ed8caf46..42aee4dc4f 100755
--- a/indra/llvfs/llpidlock.h
+++ b/indra/llvfs/llpidlock.h
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
  * 
- * Copyright (c) 2001-2007, Linden Research, Inc.
+ * Copyright (c) 2001-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp
index ef8c4d6c7f..9ce1e75d06 100644
--- a/indra/llvfs/llvfs.cpp
+++ b/indra/llvfs/llvfs.cpp
@@ -46,7 +46,9 @@
 #endif
     
 #include "llvfs.h"
+
 #include "llstl.h"
+#include "lltimer.h"
     
 const S32 FILE_BLOCK_MASK = 0x000003FF;	 // 1024-byte blocks
 const S32 VFS_CLEANUP_SIZE = 5242880;  // how much space we free up in a single stroke
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index e1f7406287..f5d06b7258 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -37,7 +37,7 @@ set(llwindow_SOURCE_FILES
     llwindowheadless.cpp
     )
 
-set(llwindows_HEADER_FILES
+set(llwindow_HEADER_FILES
     CMakeLists.txt
 
     llkeyboard.h
@@ -47,10 +47,12 @@ set(llwindows_HEADER_FILES
 set(viewer_SOURCE_FILES
     llwindow.cpp
     llmousehandler.cpp
+    llwindowcallbacks.cpp
     )
 
 set(viewer_HEADER_FILES
     llwindow.h
+    llwindowcallbacks.h
     llpreeditor.h
     llmousehandler.h
     )
@@ -143,7 +145,7 @@ if (SERVER AND NOT WINDOWS AND NOT DARWIN)
     ${llwindow_SOURCE_FILES}
     ${server_SOURCE_FILES}
     )
-  # *TODO: This should probably have target_link_libraries
+  target_link_libraries (llwindowheadless ${llwindow_LINK_LIBRARIES})
 endif (SERVER AND NOT WINDOWS AND NOT DARWIN)
 
 if (llwindow_HEADER_FILES)
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index beab131856..d33a0a6eea 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -47,6 +47,7 @@
 
 #include "llstring.h"
 #include "llstl.h"
+#include "lltimer.h"
 
 void (*gWriteDebug)(const char* msg) = NULL;
 LLDXHardware gDXHardware;
diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp
index 02b4ed17c2..f0f618aef1 100644
--- a/indra/llwindow/llkeyboard.cpp
+++ b/indra/llwindow/llkeyboard.cpp
@@ -34,7 +34,7 @@
 #include "indra_constants.h"
 #include "llkeyboard.h"
 
-#include "llwindow.h"
+#include "llwindowcallbacks.h"
 
 
 //
diff --git a/indra/llwindow/llkeyboardmacosx.cpp b/indra/llwindow/llkeyboardmacosx.cpp
index ec82032161..f53773c393 100644
--- a/indra/llwindow/llkeyboardmacosx.cpp
+++ b/indra/llwindow/llkeyboardmacosx.cpp
@@ -34,7 +34,7 @@
 
 #include "linden_common.h"
 #include "llkeyboardmacosx.h"
-#include "llwindow.h"
+#include "llwindowcallbacks.h"
 
 #include <Carbon/Carbon.h>
 
diff --git a/indra/llwindow/llkeyboardsdl.cpp b/indra/llwindow/llkeyboardsdl.cpp
index 8a6b6d6298..8a0b1de98c 100644
--- a/indra/llwindow/llkeyboardsdl.cpp
+++ b/indra/llwindow/llkeyboardsdl.cpp
@@ -34,7 +34,7 @@
 
 #include "linden_common.h"
 #include "llkeyboardsdl.h"
-#include "llwindow.h"
+#include "llwindowcallbacks.h"
 #include "SDL/SDL.h"
 
 LLKeyboardSDL::LLKeyboardSDL()
diff --git a/indra/llwindow/llkeyboardwin32.cpp b/indra/llwindow/llkeyboardwin32.cpp
index a06f19149c..ea11e0537e 100644
--- a/indra/llwindow/llkeyboardwin32.cpp
+++ b/indra/llwindow/llkeyboardwin32.cpp
@@ -34,14 +34,16 @@
 
 #include "linden_common.h"
 
-#include "llkeyboardwin32.h"
-
-#include "llwindow.h"
-
 #define WIN32_LEAN_AND_MEAN
 #include <winsock2.h>
 #include <windows.h>
 
+#include "llkeyboardwin32.h"
+
+#include "llwindowcallbacks.h"
+
+
+
 LLKeyboardWin32::LLKeyboardWin32()
 {
 	// Set up key mapping for windows - eventually can read this from a file?
diff --git a/indra/llwindow/llpreeditor.h b/indra/llwindow/llpreeditor.h
index 370f76cb85..dd63a98606 100644
--- a/indra/llwindow/llpreeditor.h
+++ b/indra/llwindow/llpreeditor.h
@@ -94,7 +94,7 @@ public:
 	// Get the contents of this preeditor as a LLWString.  If there is an active preedit,
 	// the returned LLWString contains it.
 
-	virtual const LLWString & getWText() const = 0;
+	virtual LLWString getWText() const = 0;
 
 	// Handle a UTF-32 char on this preeditor, i.e., add the character
 	// to the contents.
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 7e412a14de..1c6c9e6e9d 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -46,14 +46,12 @@
 #include "llerror.h"
 #include "llkeyboard.h"
 #include "linked_lists.h"
+#include "llwindowcallbacks.h"
 
-//static instance for default callbacks
-LLWindowCallbacks	LLWindow::sDefaultCallbacks;
 
 //
-// LLWindowCallbacks
+// Globals
 //
-
 LLSplashScreen *gSplashScreenp = NULL;
 BOOL gDebugClicks = FALSE;
 BOOL gDebugWindowProc = FALSE;
@@ -67,158 +65,6 @@ const std::string gURLProtocolWhitelist[] = { "file:", "http:", "https:" };
 //     Important - these lists should match - protocol to handler
 const std::string gURLProtocolWhitelistHandler[] = { "http", "http", "https" };	
 
-BOOL LLWindowCallbacks::handleTranslatedKeyDown(const KEY key, const MASK mask, BOOL repeated)
-{
-	return FALSE;
-}
-
-
-BOOL LLWindowCallbacks::handleTranslatedKeyUp(const KEY key, const MASK mask)
-{
-	return FALSE;
-}
-
-void LLWindowCallbacks::handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level)
-{
-}
-
-BOOL LLWindowCallbacks::handleUnicodeChar(llwchar uni_char, MASK mask)
-{
-	return FALSE;
-}
-
-
-BOOL LLWindowCallbacks::handleMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
-{
-	return FALSE;
-}
-
-BOOL LLWindowCallbacks::handleMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
-{
-	return FALSE;
-}
-
-void LLWindowCallbacks::handleMouseLeave(LLWindow *window)
-{
-	return;
-}
-
-BOOL LLWindowCallbacks::handleCloseRequest(LLWindow *window)
-{
-	//allow the window to close
-	return TRUE;
-}
-
-void LLWindowCallbacks::handleQuit(LLWindow *window)
-{
-	if(LLWindowManager::destroyWindow(window) == FALSE)	
-	{
-		llerrs << "LLWindowCallbacks::handleQuit() : Couldn't destroy window" << llendl;
-	}
-}
-
-BOOL LLWindowCallbacks::handleRightMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
-{
-	return FALSE;
-}
-
-BOOL LLWindowCallbacks::handleRightMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
-{
-	return FALSE;
-}
-
-BOOL LLWindowCallbacks::handleMiddleMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
-{
-	return FALSE;
-}
-
-BOOL LLWindowCallbacks::handleMiddleMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
-{
-	return FALSE;
-}
-
-BOOL LLWindowCallbacks::handleActivate(LLWindow *window, BOOL activated)
-{
-	return FALSE;
-}
-
-BOOL LLWindowCallbacks::handleActivateApp(LLWindow *window, BOOL activating)
-{
-	return FALSE;
-}
-
-void LLWindowCallbacks::handleMouseMove(LLWindow *window, const LLCoordGL pos, MASK mask)
-{
-}
-
-void LLWindowCallbacks::handleScrollWheel(LLWindow *window, S32 clicks)
-{
-}
-
-void LLWindowCallbacks::handleResize(LLWindow *window, const S32 width, const S32 height)
-{
-}
-
-void LLWindowCallbacks::handleFocus(LLWindow *window)
-{
-}
-
-void LLWindowCallbacks::handleFocusLost(LLWindow *window)
-{
-}
-
-void LLWindowCallbacks::handleMenuSelect(LLWindow *window, const S32 menu_item)
-{
-}
-
-BOOL LLWindowCallbacks::handlePaint(LLWindow *window, const S32 x, const S32 y, 
-									const S32 width, const S32 height)
-{
-	return FALSE;
-}
-
-BOOL LLWindowCallbacks::handleDoubleClick(LLWindow *window, const LLCoordGL pos, MASK mask)
-{
-	return FALSE;
-}
-
-void LLWindowCallbacks::handleWindowBlock(LLWindow *window)
-{
-}
-
-void LLWindowCallbacks::handleWindowUnblock(LLWindow *window)
-{
-}
-
-void LLWindowCallbacks::handleDataCopy(LLWindow *window, S32 data_type, void *data)
-{
-}
-
-BOOL LLWindowCallbacks::handleTimerEvent(LLWindow *window)
-{
-	return FALSE;
-}
-
-BOOL LLWindowCallbacks::handleDeviceChange(LLWindow *window)
-{
-	return FALSE;
-}
-
-void LLWindowCallbacks::handlePingWatchdog(LLWindow *window, const char * msg)
-{
-
-}
-
-void LLWindowCallbacks::handlePauseWatchdog(LLWindow *window)
-{
-
-}
-
-void LLWindowCallbacks::handleResumeWatchdog(LLWindow *window)
-{
-
-}
-
 
 S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
 {
@@ -257,8 +103,8 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
 // LLWindow
 //
 
-LLWindow::LLWindow(BOOL fullscreen, U32 flags)
-	: mCallbacks(&sDefaultCallbacks),
+LLWindow::LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags)
+	: mCallbacks(callbacks),
 	  mPostQuit(TRUE),
 	  mFullscreen(fullscreen),
 	  mFullscreenWidth(0),
@@ -275,9 +121,23 @@ LLWindow::LLWindow(BOOL fullscreen, U32 flags)
 	  mHideCursorPermanent(FALSE),
 	  mFlags(flags),
 	  mHighSurrogate(0)
+{ }
+
+LLWindow::~LLWindow()
+{ }
+
+//virtual
+BOOL LLWindow::isValid()
 {
+	return TRUE;
 }
-	
+
+//virtual
+BOOL LLWindow::canDelete()
+{
+	return TRUE;
+}
+
 // virtual
 void LLWindow::incBusyCount()
 {
@@ -293,13 +153,28 @@ void LLWindow::decBusyCount()
 	}
 }
 
-void LLWindow::setCallbacks(LLWindowCallbacks *callbacks)
+//virtual
+void LLWindow::resetBusyCount()
 {
-	mCallbacks = callbacks;
-	if (gKeyboard)
-	{
-		gKeyboard->setCallbacks(callbacks);
-	}
+	mBusyCount = 0;
+}
+
+//virtual
+S32 LLWindow::getBusyCount() const
+{
+	return mBusyCount;
+}
+
+//virtual
+ECursorType LLWindow::getCursor() const
+{
+	return mCurrentCursor;
+}
+
+//virtual
+BOOL LLWindow::dialogColorPicker(F32 *r, F32 *g, F32 *b)
+{
+	return FALSE;
 }
 
 void *LLWindow::getMediaWindow()
@@ -462,23 +337,7 @@ void LLSplashScreen::hide()
 static std::set<LLWindow*> sWindowList;
 
 LLWindow* LLWindowManager::createWindow(
-	const std::string& title,
-	const std::string& name,
-	LLCoordScreen upper_left,
-	LLCoordScreen size,
-	U32 flags,
-	BOOL fullscreen, 
-	BOOL clearBg,
-	BOOL disable_vsync,
-	BOOL use_gl,
-	BOOL ignore_pixel_depth)
-{
-	return createWindow(
-		title, name, upper_left.mX, upper_left.mY, size.mX, size.mY, flags, 
-		fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth);
-}
-
-LLWindow* LLWindowManager::createWindow(
+	LLWindowCallbacks* callbacks,
 	const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, U32 flags,
 	BOOL fullscreen, 
 	BOOL clearBg,
@@ -492,26 +351,26 @@ LLWindow* LLWindowManager::createWindow(
 	if (use_gl)
 	{
 #if LL_MESA_HEADLESS
-		new_window = new LLWindowMesaHeadless(
+		new_window = new LLWindowMesaHeadless(callbacks,
 			title, name, x, y, width, height, flags, 
 			fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth);
 #elif LL_SDL
-		new_window = new LLWindowSDL(
+		new_window = new LLWindowSDL(callbacks,
 			title, x, y, width, height, flags, 
 			fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
 #elif LL_WINDOWS
-		new_window = new LLWindowWin32(
+		new_window = new LLWindowWin32(callbacks,
 			title, name, x, y, width, height, flags, 
 			fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
 #elif LL_DARWIN
-		new_window = new LLWindowMacOSX(
+		new_window = new LLWindowMacOSX(callbacks,
 			title, name, x, y, width, height, flags, 
 			fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
 #endif
 	}
 	else
 	{
-		new_window = new LLWindowHeadless(
+		new_window = new LLWindowHeadless(callbacks,
 			title, name, x, y, width, height, flags, 
 			fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth);
 	}
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index 8361771b66..8602225108 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -39,52 +39,8 @@
 #include "llcursortypes.h"
 
 class LLSplashScreen;
-
-class LLWindow;
-
 class LLPreeditor;
-
-class LLWindowCallbacks
-{
-public:
-	virtual ~LLWindowCallbacks() {}
-	virtual BOOL handleTranslatedKeyDown(KEY key,  MASK mask, BOOL repeated);
-	virtual BOOL handleTranslatedKeyUp(KEY key,  MASK mask);
-	virtual void handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level);
-	virtual BOOL handleUnicodeChar(llwchar uni_char, MASK mask);
-
-	virtual BOOL handleMouseDown(LLWindow *window,  LLCoordGL pos, MASK mask);
-	virtual BOOL handleMouseUp(LLWindow *window,  LLCoordGL pos, MASK mask);
-	virtual void handleMouseLeave(LLWindow *window);
-	// return TRUE to allow window to close, which will then cause handleQuit to be called
-	virtual BOOL handleCloseRequest(LLWindow *window);
-	// window is about to be destroyed, clean up your business
-	virtual void handleQuit(LLWindow *window);
-	virtual BOOL handleRightMouseDown(LLWindow *window,  LLCoordGL pos, MASK mask);
-	virtual BOOL handleRightMouseUp(LLWindow *window,  LLCoordGL pos, MASK mask);
-	virtual BOOL handleMiddleMouseDown(LLWindow *window,  LLCoordGL pos, MASK mask);
-	virtual BOOL handleMiddleMouseUp(LLWindow *window,  LLCoordGL pos, MASK mask);
-	virtual BOOL handleActivate(LLWindow *window, BOOL activated);
-	virtual BOOL handleActivateApp(LLWindow *window, BOOL activating);
-	virtual void handleMouseMove(LLWindow *window,  LLCoordGL pos, MASK mask);
-	virtual void handleScrollWheel(LLWindow *window,  S32 clicks);
-	virtual void handleResize(LLWindow *window,  S32 width,  S32 height);
-	virtual void handleFocus(LLWindow *window);
-	virtual void handleFocusLost(LLWindow *window);
-	virtual void handleMenuSelect(LLWindow *window,  S32 menu_item);
-	virtual BOOL handlePaint(LLWindow *window,  S32 x,  S32 y,  S32 width,  S32 height);
-	virtual BOOL handleDoubleClick(LLWindow *window,  LLCoordGL pos, MASK mask);			// double-click of left mouse button
-	virtual void handleWindowBlock(LLWindow *window);							// window is taking over CPU for a while
-	virtual void handleWindowUnblock(LLWindow *window);							// window coming back after taking over CPU for a while
-	virtual void handleDataCopy(LLWindow *window, S32 data_type, void *data);
-	virtual BOOL handleTimerEvent(LLWindow *window);
-	virtual BOOL handleDeviceChange(LLWindow *window);
-
-	virtual void handlePingWatchdog(LLWindow *window, const char * msg);
-	virtual void handlePauseWatchdog(LLWindow *window);
-	virtual void handleResumeWatchdog(LLWindow *window);
-
-};
+class LLWindowCallbacks;
 
 // Refer to llwindow_test in test/common/llwindow for usage example
 
@@ -134,12 +90,12 @@ public:
 	// arrow/hour if busycount > 0.
 	virtual void incBusyCount();
 	virtual void decBusyCount();
-	virtual void resetBusyCount() { mBusyCount = 0; }
-	virtual S32 getBusyCount() const { return mBusyCount; }
+	virtual void resetBusyCount();
+	virtual S32 getBusyCount() const;
 
 	// Sets cursor, may set to arrow+hourglass
 	virtual void setCursor(ECursorType cursor) = 0;
-	virtual ECursorType getCursor() const { return mCurrentCursor; }
+	virtual ECursorType getCursor() const;
 
 	virtual void captureMouse() = 0;
 	virtual void releaseMouse() = 0;
@@ -183,13 +139,12 @@ public:
 	virtual F32 getPixelAspectRatio() = 0;
 	virtual void setNativeAspectRatio(F32 aspect) = 0;
 	
-	void setCallbacks(LLWindowCallbacks *callbacks);
-
 	virtual void beforeDialog() {};	// prepare to put up an OS dialog (if special measures are required, such as in fullscreen mode)
 	virtual void afterDialog() {};	// undo whatever was done in beforeDialog()
 
-// opens system default color picker
-	virtual BOOL dialog_color_picker (F32 *r, F32 *g, F32 *b) { return FALSE; };
+	// opens system default color picker, modally
+	// Returns TRUE if valid color selected
+	virtual BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b);
 
 // return a platform-specific window reference (HWND on Windows, WindowRef on the Mac, Gtk window on Linux)
 	virtual void *getPlatformWindow() = 0;
@@ -207,12 +162,12 @@ public:
 	static std::vector<std::string> getDynamicFallbackFontList();
 
 protected:
-	LLWindow(BOOL fullscreen, U32 flags);
-	virtual ~LLWindow() {}
-	virtual BOOL isValid() {return TRUE;}
-	virtual BOOL canDelete() {return TRUE;}
-protected:
-	static LLWindowCallbacks	sDefaultCallbacks;
+	LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags);
+	virtual ~LLWindow();
+	// Defaults to true
+	virtual BOOL isValid();
+	// Defaults to true
+	virtual BOOL canDelete();
 
 protected:
 	LLWindowCallbacks*	mCallbacks;
@@ -294,18 +249,8 @@ const S32 OSBTN_CANCEL = 3;
 class LLWindowManager
 {
 public:
-	static LLWindow* createWindow(
-		const std::string& title,
-		const std::string& name,
-		LLCoordScreen upper_left = LLCoordScreen(10, 10),
-		LLCoordScreen size = LLCoordScreen(320, 240),
-		U32 flags = 0,
-		BOOL fullscreen = FALSE,
-		BOOL clearBg = FALSE,
-		BOOL disable_vsync = TRUE,
-		BOOL use_gl = TRUE,
-		BOOL ignore_pixel_depth = FALSE);
 	static LLWindow *createWindow(
+		LLWindowCallbacks* callbacks,
 		const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
 		U32 flags = 0,
 		BOOL fullscreen = FALSE,
diff --git a/indra/llwindow/llwindowcallbacks.cpp b/indra/llwindow/llwindowcallbacks.cpp
new file mode 100644
index 0000000000..72f9997149
--- /dev/null
+++ b/indra/llwindow/llwindowcallbacks.cpp
@@ -0,0 +1,201 @@
+/** 
+ * @file llwindowcallbacks.cpp
+ * @brief OS event callback class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llwindowcallbacks.h"
+
+#include "llcoord.h"
+
+//
+// LLWindowCallbacks
+//
+
+BOOL LLWindowCallbacks::handleTranslatedKeyDown(const KEY key, const MASK mask, BOOL repeated)
+{
+	return FALSE;
+}
+
+
+BOOL LLWindowCallbacks::handleTranslatedKeyUp(const KEY key, const MASK mask)
+{
+	return FALSE;
+}
+
+void LLWindowCallbacks::handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level)
+{
+}
+
+BOOL LLWindowCallbacks::handleUnicodeChar(llwchar uni_char, MASK mask)
+{
+	return FALSE;
+}
+
+
+BOOL LLWindowCallbacks::handleMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
+{
+	return FALSE;
+}
+
+BOOL LLWindowCallbacks::handleMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
+{
+	return FALSE;
+}
+
+void LLWindowCallbacks::handleMouseLeave(LLWindow *window)
+{
+	return;
+}
+
+BOOL LLWindowCallbacks::handleCloseRequest(LLWindow *window)
+{
+	//allow the window to close
+	return TRUE;
+}
+
+void LLWindowCallbacks::handleQuit(LLWindow *window)
+{
+}
+
+BOOL LLWindowCallbacks::handleRightMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
+{
+	return FALSE;
+}
+
+BOOL LLWindowCallbacks::handleRightMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
+{
+	return FALSE;
+}
+
+BOOL LLWindowCallbacks::handleMiddleMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask)
+{
+	return FALSE;
+}
+
+BOOL LLWindowCallbacks::handleMiddleMouseUp(LLWindow *window, const LLCoordGL pos, MASK mask)
+{
+	return FALSE;
+}
+
+BOOL LLWindowCallbacks::handleActivate(LLWindow *window, BOOL activated)
+{
+	return FALSE;
+}
+
+BOOL LLWindowCallbacks::handleActivateApp(LLWindow *window, BOOL activating)
+{
+	return FALSE;
+}
+
+void LLWindowCallbacks::handleMouseMove(LLWindow *window, const LLCoordGL pos, MASK mask)
+{
+}
+
+void LLWindowCallbacks::handleScrollWheel(LLWindow *window, S32 clicks)
+{
+}
+
+void LLWindowCallbacks::handleResize(LLWindow *window, const S32 width, const S32 height)
+{
+}
+
+void LLWindowCallbacks::handleFocus(LLWindow *window)
+{
+}
+
+void LLWindowCallbacks::handleFocusLost(LLWindow *window)
+{
+}
+
+void LLWindowCallbacks::handleMenuSelect(LLWindow *window, const S32 menu_item)
+{
+}
+
+BOOL LLWindowCallbacks::handlePaint(LLWindow *window, const S32 x, const S32 y, 
+									const S32 width, const S32 height)
+{
+	return FALSE;
+}
+
+BOOL LLWindowCallbacks::handleDoubleClick(LLWindow *window, const LLCoordGL pos, MASK mask)
+{
+	return FALSE;
+}
+
+void LLWindowCallbacks::handleWindowBlock(LLWindow *window)
+{
+}
+
+void LLWindowCallbacks::handleWindowUnblock(LLWindow *window)
+{
+}
+
+void LLWindowCallbacks::handleDataCopy(LLWindow *window, S32 data_type, void *data)
+{
+}
+
+BOOL LLWindowCallbacks::handleTimerEvent(LLWindow *window)
+{
+	return FALSE;
+}
+
+BOOL LLWindowCallbacks::handleDeviceChange(LLWindow *window)
+{
+	return FALSE;
+}
+
+void LLWindowCallbacks::handlePingWatchdog(LLWindow *window, const char * msg)
+{
+
+}
+
+void LLWindowCallbacks::handlePauseWatchdog(LLWindow *window)
+{
+
+}
+
+void LLWindowCallbacks::handleResumeWatchdog(LLWindow *window)
+{
+
+}
+
+std::string LLWindowCallbacks::translateString(const char* tag)
+{
+    return std::string();
+}
+
+//virtual
+std::string LLWindowCallbacks::translateString(const char* tag,
+		const std::map<std::string, std::string>& args)
+{
+	return std::string();
+}
diff --git a/indra/llwindow/llwindowcallbacks.h b/indra/llwindow/llwindowcallbacks.h
new file mode 100644
index 0000000000..abc66c42a2
--- /dev/null
+++ b/indra/llwindow/llwindowcallbacks.h
@@ -0,0 +1,85 @@
+/** 
+ * @file llwindowcallbacks.h
+ * @brief OS event callback class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#ifndef LLWINDOWCALLBACKS_H
+#define LLWINDOWCALLBACKS_H
+
+class LLCoordGL;
+class LLWindow;
+
+class LLWindowCallbacks
+{
+public:
+	virtual ~LLWindowCallbacks() {}
+	virtual BOOL handleTranslatedKeyDown(KEY key,  MASK mask, BOOL repeated);
+	virtual BOOL handleTranslatedKeyUp(KEY key,  MASK mask);
+	virtual void handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level);
+	virtual BOOL handleUnicodeChar(llwchar uni_char, MASK mask);
+
+	virtual BOOL handleMouseDown(LLWindow *window,  LLCoordGL pos, MASK mask);
+	virtual BOOL handleMouseUp(LLWindow *window,  LLCoordGL pos, MASK mask);
+	virtual void handleMouseLeave(LLWindow *window);
+	// return TRUE to allow window to close, which will then cause handleQuit to be called
+	virtual BOOL handleCloseRequest(LLWindow *window);
+	// window is about to be destroyed, clean up your business
+	virtual void handleQuit(LLWindow *window);
+	virtual BOOL handleRightMouseDown(LLWindow *window,  LLCoordGL pos, MASK mask);
+	virtual BOOL handleRightMouseUp(LLWindow *window,  LLCoordGL pos, MASK mask);
+	virtual BOOL handleMiddleMouseDown(LLWindow *window,  LLCoordGL pos, MASK mask);
+	virtual BOOL handleMiddleMouseUp(LLWindow *window,  LLCoordGL pos, MASK mask);
+	virtual BOOL handleActivate(LLWindow *window, BOOL activated);
+	virtual BOOL handleActivateApp(LLWindow *window, BOOL activating);
+	virtual void handleMouseMove(LLWindow *window,  LLCoordGL pos, MASK mask);
+	virtual void handleScrollWheel(LLWindow *window,  S32 clicks);
+	virtual void handleResize(LLWindow *window,  S32 width,  S32 height);
+	virtual void handleFocus(LLWindow *window);
+	virtual void handleFocusLost(LLWindow *window);
+	virtual void handleMenuSelect(LLWindow *window,  S32 menu_item);
+	virtual BOOL handlePaint(LLWindow *window,  S32 x,  S32 y,  S32 width,  S32 height);
+	virtual BOOL handleDoubleClick(LLWindow *window,  LLCoordGL pos, MASK mask);			// double-click of left mouse button
+	virtual void handleWindowBlock(LLWindow *window);							// window is taking over CPU for a while
+	virtual void handleWindowUnblock(LLWindow *window);							// window coming back after taking over CPU for a while
+	virtual void handleDataCopy(LLWindow *window, S32 data_type, void *data);
+	virtual BOOL handleTimerEvent(LLWindow *window);
+	virtual BOOL handleDeviceChange(LLWindow *window);
+
+	virtual void handlePingWatchdog(LLWindow *window, const char * msg);
+	virtual void handlePauseWatchdog(LLWindow *window);
+	virtual void handleResumeWatchdog(LLWindow *window);
+
+    // Look up a localized string, usually for an error message
+    virtual std::string translateString(const char* tag);
+	virtual std::string translateString(const char* tag,
+		const std::map<std::string, std::string>& args);
+};
+
+
+#endif
diff --git a/indra/llwindow/llwindowheadless.cpp b/indra/llwindow/llwindowheadless.cpp
index 3742846440..b4e9009321 100644
--- a/indra/llwindow/llwindowheadless.cpp
+++ b/indra/llwindow/llwindowheadless.cpp
@@ -38,10 +38,10 @@
 //
 // LLWindowHeadless
 //
-LLWindowHeadless::LLWindowHeadless(const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
-							 U32 flags,  BOOL fullscreen, BOOL clearBg,
+LLWindowHeadless::LLWindowHeadless(LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
+							 U32 flags,  BOOL fullscreen, BOOL clear_background,
 							 BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth)
-	: LLWindow(fullscreen, flags)
+	: LLWindow(callbacks, fullscreen, flags)
 {
 }
 
diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h
index 4353d157b5..3cffd2bbf6 100644
--- a/indra/llwindow/llwindowheadless.h
+++ b/indra/llwindow/llwindowheadless.h
@@ -94,9 +94,12 @@ public:
 	/*virtual*/ void *getPlatformWindow() { return 0; };
 	/*virtual*/ void bringToFront() {};
 	
-	LLWindowHeadless(const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
-				  U32 flags,  BOOL fullscreen, BOOL clearBg,
-				  BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
+	LLWindowHeadless(LLWindowCallbacks* callbacks,
+		const std::string& title, const std::string& name,
+		S32 x, S32 y, 
+		S32 width, S32 height,
+		U32 flags,  BOOL fullscreen, BOOL clear_background,
+		BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
 	virtual ~LLWindowHeadless();
 
 private:
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 65a40dcef4..82dc5e4a13 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -32,19 +32,21 @@
 
 #include "linden_common.h"
 
-#include <Carbon/Carbon.h>
-#include <OpenGL/OpenGL.h>
-
 #include "llwindowmacosx.h"
+
 #include "llkeyboardmacosx.h"
+#include "llwindowcallbacks.h"
+#include "llwindowmacosx-objc.h"
+#include "llpreeditor.h"
+
 #include "llerror.h"
 #include "llgl.h"
 #include "llstring.h"
 #include "lldir.h"
 #include "indra_constants.h"
 
-#include "llwindowmacosx-objc.h"
-#include "llpreeditor.h"
+#include <Carbon/Carbon.h>
+#include <OpenGL/OpenGL.h>
 
 extern BOOL gDebugWindowProc;
 
@@ -214,19 +216,27 @@ static LLWindowMacOSX *gWindowImplementation = NULL;
 
 
 
-LLWindowMacOSX::LLWindowMacOSX(const std::string& title, const std::string& name, S32 x, S32 y, S32 width,
+LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
+							   const std::string& title, const std::string& name, S32 x, S32 y, S32 width,
 							   S32 height, U32 flags,
 							   BOOL fullscreen, BOOL clearBg,
 							   BOOL disable_vsync, BOOL use_gl,
 							   BOOL ignore_pixel_depth,
 							   U32 fsaa_samples)
-	: LLWindow(fullscreen, flags)
+	: LLWindow(NULL, fullscreen, flags)
 {
+	// *HACK: During window construction we get lots of OS events for window
+	// reshape, activate, etc. that the viewer isn't ready to handle.
+	// Route them to a dummy callback structure until the end of constructor.
+	LLWindowCallbacks null_callbacks;
+	mCallbacks = &null_callbacks;
+	
 	// Voodoo for calling cocoa from carbon (see llwindowmacosx-objc.mm).
 	setupCocoa();
 	
 	// Initialize the keyboard
 	gKeyboard = new LLKeyboardMacOSX();
+	gKeyboard->setCallbacks(callbacks);
 
 	// Ignore use_gl for now, only used for drones on PC
 	mWindow = NULL;
@@ -315,6 +325,7 @@ LLWindowMacOSX::LLWindowMacOSX(const std::string& title, const std::string& name
 		setCursor( UI_CURSOR_ARROW );
 	}
 
+	mCallbacks = callbacks;
 	stop_glerror();
 }
 
@@ -3202,7 +3213,7 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url)
 }
 
 
-BOOL LLWindowMacOSX::dialog_color_picker ( F32 *r, F32 *g, F32 *b)
+BOOL LLWindowMacOSX::dialogColorPicker( F32 *r, F32 *g, F32 *b)
 {
 	BOOL	retval = FALSE;
 	OSErr	error = noErr;
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 3886782732..17074080eb 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -35,6 +35,8 @@
 
 #include "llwindow.h"
 
+#include "lltimer.h"
+
 #include <Carbon/Carbon.h>
 #include <AGL/agl.h>
 
@@ -103,7 +105,7 @@ public:
 	/*virtual*/ void beforeDialog();
 	/*virtual*/ void afterDialog();
 
-	/*virtual*/ BOOL dialog_color_picker(F32 *r, F32 *g, F32 *b);
+	/*virtual*/ BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b);
 
 	/*virtual*/ void *getPlatformWindow();
 	/*virtual*/ void *getMediaWindow();
@@ -116,7 +118,7 @@ public:
 	static std::vector<std::string> getDynamicFallbackFontList();
 
 protected:
-	LLWindowMacOSX(
+	LLWindowMacOSX(LLWindowCallbacks* callbacks,
 		const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
 		BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
 		BOOL ignore_pixel_depth,
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 24bd70d57f..3c203d9f5c 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -36,15 +36,16 @@
 #include "linden_common.h"
 
 #include "llwindowsdl.h"
+
+#include "llwindowcallbacks.h"
 #include "llkeyboardsdl.h"
+
 #include "llerror.h"
 #include "llgl.h"
 #include "llstring.h"
 #include "lldir.h"
 #include "llfindlocale.h"
 
-#include "indra_constants.h"
-
 #if LL_GTK
 extern "C" {
 # include "gtk/gtk.h"
@@ -187,16 +188,19 @@ Display* LLWindowSDL::get_SDL_Display(void)
 #endif // LL_X11
 
 
-LLWindowSDL::LLWindowSDL(const std::string& title, S32 x, S32 y, S32 width,
+LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
+			 const std::string& title, S32 x, S32 y, S32 width,
 			 S32 height, U32 flags,
 			 BOOL fullscreen, BOOL clearBg,
 			 BOOL disable_vsync, BOOL use_gl,
 			 BOOL ignore_pixel_depth, U32 fsaa_samples)
-	: LLWindow(fullscreen, flags), Lock_Display(NULL),
+	: LLWindow(callbacks, fullscreen, flags),
+	  Lock_Display(NULL),
 	  Unlock_Display(NULL), mGamma(1.0f)
 {
 	// Initialize the keyboard
 	gKeyboard = new LLKeyboardSDL();
+	gKeyboard->setCallbacks(callbacks);
 	// Note that we can't set up key-repeat until after SDL has init'd video
 
 	// Ignore use_gl for now, only used for drones on PC
@@ -2229,7 +2233,7 @@ static void color_changed_callback(GtkWidget *widget,
 	gtk_color_selection_get_current_color(colorsel, colorp);
 }
 
-BOOL LLWindowSDL::dialog_color_picker ( F32 *r, F32 *g, F32 *b)
+BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
 {
 	BOOL rtn = FALSE;
 
@@ -2306,7 +2310,7 @@ S32 OSMessageBoxSDL(const std::string& text, const std::string& caption, U32 typ
 	return 0;
 }
 
-BOOL LLWindowSDL::dialog_color_picker ( F32 *r, F32 *g, F32 *b)
+BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
 {
 	return (FALSE);
 }
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index 632d8fc1fa..1e4dffd7a6 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -36,6 +36,7 @@
 // Simple Directmedia Layer (http://libsdl.org/) implementation of LLWindow class
 
 #include "llwindow.h"
+#include "lltimer.h"
 
 #include "SDL/SDL.h"
 #include "SDL/SDL_endian.h"
@@ -118,7 +119,7 @@ public:
 	/*virtual*/ void beforeDialog();
 	/*virtual*/ void afterDialog();
 
-	/*virtual*/ BOOL dialog_color_picker(F32 *r, F32 *g, F32 *b);
+	/*virtual*/ BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b);
 
 	/*virtual*/ void *getPlatformWindow();
 	/*virtual*/ void bringToFront();
@@ -147,7 +148,7 @@ public:
 #endif // LL_X11	
 
 protected:
-	LLWindowSDL(
+	LLWindowSDL(LLWindowCallbacks* callbacks,
 		const std::string& title, int x, int y, int width, int height, U32 flags,
 		BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
 		BOOL ignore_pixel_depth, U32 fsaa_samples);
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 6280868dfb..b60740c7e4 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -36,6 +36,17 @@
 
 #include "llwindowwin32.h"
 
+// LLWindow library includes
+#include "llkeyboardwin32.h"
+#include "llpreeditor.h"
+#include "llwindowcallbacks.h"
+
+// Linden library includes
+#include "llerror.h"
+#include "llgl.h"
+#include "llstring.h"
+
+// System includes
 #include <commdlg.h>
 #include <WinUser.h>
 #include <mapi.h>
@@ -49,16 +60,6 @@
 #include <dinput.h>
 #include <Dbt.h.>
 
-#include "llkeyboardwin32.h"
-#include "llerror.h"
-#include "llgl.h"
-#include "llstring.h"
-#include "lldir.h"
-
-#include "indra_constants.h"
-
-#include "llpreeditor.h"
-
 // culled from winuser.h
 #ifndef WM_MOUSEWHEEL /* Added to be compatible with later SDK's */
 const S32	WM_MOUSEWHEEL = 0x020A;
@@ -358,13 +359,14 @@ LLWinImm::~LLWinImm()
 }
 
 
-LLWindowWin32::LLWindowWin32(const std::string& title, const std::string& name, S32 x, S32 y, S32 width,
+LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
+							 const std::string& title, const std::string& name, S32 x, S32 y, S32 width,
 							 S32 height, U32 flags, 
 							 BOOL fullscreen, BOOL clearBg,
 							 BOOL disable_vsync, BOOL use_gl,
 							 BOOL ignore_pixel_depth,
 							 U32 fsaa_samples)
-	: LLWindow(fullscreen, flags)
+	: LLWindow(callbacks, fullscreen, flags)
 {
 	mFSAASamples = fsaa_samples;
 	mIconResource = gIconResource;
@@ -378,6 +380,7 @@ LLWindowWin32::LLWindowWin32(const std::string& title, const std::string& name,
 
 	// Initialize the keyboard
 	gKeyboard = new LLKeyboardWin32();
+	gKeyboard->setCallbacks(callbacks);
 
 	// Initialize (boot strap) the Language text input management,
 	// based on the system's (user's) default settings.
@@ -481,7 +484,8 @@ LLWindowWin32::LLWindowWin32(const std::string& title, const std::string& name,
 
 		if (!RegisterClass(&wc))
 		{
-			OSMessageBox("RegisterClass failed", "Error", OSMB_OK);
+			OSMessageBox(mCallbacks->translateString("MBRegClassFailed"), 
+				mCallbacks->translateString("MBError"), OSMB_OK);
 			return;
 		}
 		sIsClassRegistered = TRUE;
@@ -572,8 +576,11 @@ LLWindowWin32::LLWindowWin32(const std::string& title, const std::string& name,
 			mFullscreenBits    = -1;
 			mFullscreenRefresh = -1;
 
-			std::string error = llformat("Unable to run fullscreen at %d x %d.\nRunning in window.", width, height);
-			OSMessageBox(error, "Error", OSMB_OK);
+			std::map<std::string,std::string> args;
+			args["[WIDTH]"] = llformat("%d", width);
+			args["[HEIGHT]"] = llformat ("%d", height);
+			OSMessageBox(mCallbacks->translateString("MBFullScreenErr", args),
+				mCallbacks->translateString("MBError"), OSMB_OK);
 		}
 	}
 
@@ -712,7 +719,9 @@ void LLWindowWin32::close()
 	// This causes WM_DESTROY to be sent *immediately*
 	if (!DestroyWindow(mWindowHandle))
 	{
-		OSMessageBox("DestroyWindow(mWindowHandle) failed", "Shutdown Error", OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBDestroyWinFailed"),
+			mCallbacks->translateString("MBShutdownErr"),
+			OSMB_OK);
 	}
 
 	mWindowHandle = NULL;
@@ -1015,14 +1024,16 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
 	if (!(mhDC = GetDC(mWindowHandle)))
 	{
 		close();
-		OSMessageBox("Can't make GL device context", "Error", OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBDevContextErr"),
+			mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
 	if (!(pixel_format = ChoosePixelFormat(mhDC, &pfd)))
 	{
 		close();
-		OSMessageBox("Can't find suitable pixel format", "Error", OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBPixelFmtErr"),
+			mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
@@ -1031,57 +1042,48 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
 		&pfd))
 	{
 		close();
-		OSMessageBox("Can't get pixel format description", "Error", OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBPixelFmtDescErr"),
+			mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
 	if (pfd.cColorBits < 32)
 	{
 		close();
-		OSMessageBox(
-			"Second Life requires True Color (32-bit) to run in a window.\n"
-			"Please go to Control Panels -> Display -> Settings and\n"
-			"set the screen to 32-bit color.\n"
-			"Alternately, if you choose to run fullscreen, Second Life\n"
-			"will automatically adjust the screen each time it runs.",
-			"Error",
-			OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBTrueColorWindow"),
+			mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
 	if (pfd.cAlphaBits < 8)
 	{
 		close();
-		OSMessageBox(
-			"Second Life is unable to run because it can't get an 8 bit alpha\n"
-			"channel.  Usually this is due to video card driver issues.\n"
-			"Please make sure you have the latest video card drivers installed.\n"
-			"Also be sure your monitor is set to True Color (32-bit) in\n"
-			"Control Panels -> Display -> Settings.\n"
-			"If you continue to receive this message, contact customer service.",
-			"Error",
-			OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBAlpha"),
+			mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
 	if (!SetPixelFormat(mhDC, pixel_format, &pfd))
 	{
 		close();
-		OSMessageBox("Can't set pixel format", "Error", OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBPixelFmtSetErr"),
+			mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
 	if (!(mhRC = wglCreateContext(mhDC)))
 	{
 		close();
-		OSMessageBox("Can't create GL rendering context", "Error", OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBGLContextErr"),
+			mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
 	if (!wglMakeCurrent(mhDC, mhRC))
 	{
 		close();
-		OSMessageBox("Can't activate GL rendering context", "Error", OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBGLContextActErr"),
+			mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
@@ -1243,14 +1245,15 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
 		if (!(mhDC = GetDC(mWindowHandle)))
 		{
 			close();
-			OSMessageBox("Can't make GL device context", "Error", OSMB_OK);
+			OSMessageBox(mCallbacks->translateString("MBDevContextErr"), mCallbacks->translateString("MBError"), OSMB_OK);
 			return FALSE;
 		}
 
 		if (!SetPixelFormat(mhDC, pixel_format, &pfd))
 		{
 			close();
-			OSMessageBox("Can't set pixel format", "Error", OSMB_OK);
+			OSMessageBox(mCallbacks->translateString("MBPixelFmtSetErr"),
+				mCallbacks->translateString("MBError"), OSMB_OK);
 			return FALSE;
 		}
 
@@ -1287,7 +1290,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
 		&pfd))
 	{
 		close();
-		OSMessageBox("Can't get pixel format description", "Error", OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBPixelFmtDescErr"), mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
@@ -1300,57 +1303,35 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
 	if (pfd.cColorBits < 32 || GetDeviceCaps(mhDC, BITSPIXEL) < 32)
 	{
 		close();
-		OSMessageBox(
-			"Second Life requires True Color (32-bit) to run in a window.\n"
-			"Please go to Control Panels -> Display -> Settings and\n"
-			"set the screen to 32-bit color.\n"
-			"Alternately, if you choose to run fullscreen, Second Life\n"
-			"will automatically adjust the screen each time it runs.",
-			"Error",
-			OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBTrueColorWindow"), mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
 	if (pfd.cAlphaBits < 8)
 	{
 		close();
-		OSMessageBox(
-			"Second Life is unable to run because it can't get an 8 bit alpha\n"
-			"channel.  Usually this is due to video card driver issues.\n"
-			"Please make sure you have the latest video card drivers installed.\n"
-			"Also be sure your monitor is set to True Color (32-bit) in\n"
-			"Control Panels -> Display -> Settings.\n"
-			"If you continue to receive this message, contact customer service.",
-			"Error",
-			OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBAlpha"), mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
 	if (!(mhRC = wglCreateContext(mhDC)))
 	{
 		close();
-		OSMessageBox("Can't create GL rendering context", "Error", OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBGLContextErr"), mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
 	if (!wglMakeCurrent(mhDC, mhRC))
 	{
 		close();
-		OSMessageBox("Can't activate GL rendering context", "Error", OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBGLContextActErr"), mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
 	if (!gGLManager.initGL())
 	{
 		close();
-		OSMessageBox(
-					 "Second Life is unable to run because your video card drivers\n"
-					 "did not install properly, are out of date, or are for unsupported\n" 
-					 "hardware. Please make sure you have the latest video card drivers\n"
-					 "and even if you do have the latest, try reinstalling them.\n\n"
-					 "If you continue to receive this message, contact customer service.",
-					 "Error",
-					 OSMB_OK);
+		OSMessageBox(mCallbacks->translateString("MBVideoDrvErr"), mCallbacks->translateString("MBError"), OSMB_OK);
 		return FALSE;
 	}
 
@@ -3030,7 +3011,7 @@ void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url )
 }
 
 
-BOOL LLWindowWin32::dialog_color_picker ( F32 *r, F32 *g, F32 *b )
+BOOL LLWindowWin32::dialogColorPicker( F32 *r, F32 *g, F32 *b )
 {
 	BOOL retval = FALSE;
 
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 237f834318..e14324c9f1 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -100,7 +100,7 @@ public:
 	/*virtual*/ F32 getPixelAspectRatio();
 	/*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; }
 
-	/*virtual*/	BOOL dialog_color_picker (F32 *r, F32 *g, F32 *b );
+	/*virtual*/	BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b );
 
 	/*virtual*/ void *getPlatformWindow();
 	/*virtual*/ void bringToFront();
@@ -115,7 +115,7 @@ public:
 	static std::vector<std::string> getDynamicFallbackFontList();
 
 protected:
-	LLWindowWin32(
+	LLWindowWin32(LLWindowCallbacks* callbacks,
 		const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags, 
 		BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
 		BOOL ignore_pixel_depth, U32 fsaa_samples);
diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt
index dc7787beea..b1ac85812c 100644
--- a/indra/llxml/CMakeLists.txt
+++ b/indra/llxml/CMakeLists.txt
@@ -5,11 +5,13 @@ project(llxml)
 include(00-Common)
 include(LLCommon)
 include(LLMath)
+include(LLVFS)
 include(LLXML)
 
 include_directories(
     ${LLCOMMON_INCLUDE_DIRS}
     ${LLMATH_INCLUDE_DIRS}
+    ${LLVFS_INCLUDE_DIRS}
     )
 
 set(llxml_SOURCE_FILES
@@ -38,6 +40,7 @@ add_library (llxml ${llxml_SOURCE_FILES})
 # Libraries on which this library depends, needed for Linux builds
 # Sort by high-level to low-level
 target_link_libraries( llxml
+    llvfs
     llmath
     ${BOOST_SIGNALS_LIBRARY}
     ${EXPAT_LIBRARIES}
diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp
index d9ed45ab9d..2271c02cd0 100644
--- a/indra/llxml/llcontrol.cpp
+++ b/indra/llxml/llcontrol.cpp
@@ -56,6 +56,45 @@
 #define CONTROL_ERRS LL_WARNS("ControlErrors")
 #endif
 
+
+template <> eControlType get_control_type<U32>();
+template <> eControlType get_control_type<S32>();
+template <> eControlType get_control_type<F32>();
+template <> eControlType get_control_type<bool>();
+// Yay BOOL, its really an S32.
+//template <> eControlType get_control_type<BOOL> () ;
+template <> eControlType get_control_type<std::string>();
+
+template <> eControlType get_control_type<LLVector3>();
+template <> eControlType get_control_type<LLVector3d>();
+template <> eControlType get_control_type<LLRect>();
+template <> eControlType get_control_type<LLColor4>();
+template <> eControlType get_control_type<LLColor3>();
+template <> eControlType get_control_type<LLColor4U>();
+template <> eControlType get_control_type<LLSD>();
+
+template <> LLSD convert_to_llsd<U32>(const U32& in);
+template <> LLSD convert_to_llsd<LLVector3>(const LLVector3& in);
+template <> LLSD convert_to_llsd<LLVector3d>(const LLVector3d& in);
+template <> LLSD convert_to_llsd<LLRect>(const LLRect& in);
+template <> LLSD convert_to_llsd<LLColor4>(const LLColor4& in);
+template <> LLSD convert_to_llsd<LLColor3>(const LLColor3& in);
+template <> LLSD convert_to_llsd<LLColor4U>(const LLColor4U& in);
+
+template <> bool convert_from_llsd<bool>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> S32 convert_from_llsd<S32>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> U32 convert_from_llsd<U32>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> F32 convert_from_llsd<F32>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> std::string convert_from_llsd<std::string>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> LLWString convert_from_llsd<LLWString>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> LLVector3 convert_from_llsd<LLVector3>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> LLVector3d convert_from_llsd<LLVector3d>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> LLRect convert_from_llsd<LLRect>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> LLColor4 convert_from_llsd<LLColor4>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> LLColor4U convert_from_llsd<LLColor4U>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> LLColor3 convert_from_llsd<LLColor3>(const LLSD& sd, eControlType type, const std::string& control_name);
+template <> LLSD convert_from_llsd<LLSD>(const LLSD& sd, eControlType type, const std::string& control_name);
+
 //this defines the current version of the settings file
 const S32 CURRENT_VERSION = 101;
 
@@ -87,9 +126,6 @@ bool LLControlVariable::llsd_compare(const LLSD& a, const LLSD & b)
 	case TYPE_COL3:
 		result = LLColor3(a) == LLColor3(b);
 		break;
-	case TYPE_COL4U:
-		result = LLColor4U(a) == LLColor4U(b);
-		break;
 	case TYPE_STRING:
 		result = a.asString() == b.asString();
 		break;
@@ -148,9 +184,15 @@ LLSD LLControlVariable::getComparableValue(const LLSD& value)
 	return storable_value;
 }
 
-void LLControlVariable::setValue(const LLSD& value, bool saved_value)
+void LLControlVariable::setValue(const LLSD& new_value, bool saved_value)
 {
-	LLSD storable_value = getComparableValue(value);
+	if (mValidateSignal(this, new_value) == false)
+	{
+		// can not set new value, exit
+		return;
+	}
+	
+	LLSD storable_value = getComparableValue(new_value);
 	bool value_changed = llsd_compare(getValue(), storable_value) == FALSE;
 	if(saved_value)
 	{
@@ -163,7 +205,7 @@ void LLControlVariable::setValue(const LLSD& value, bool saved_value)
 	}
     else
     {
-        // This is a unsaved value. Its needs to reside at
+        // This is an unsaved value. Its needs to reside at
         // mValues[2] (or greater). It must not affect 
         // the result of getSaveValue()
 	    if (llsd_compare(mValues.back(), storable_value) == FALSE)
@@ -185,10 +227,9 @@ void LLControlVariable::setValue(const LLSD& value, bool saved_value)
 	    }
     }
 
-
     if(value_changed)
     {
-        mSignal(storable_value); 
+        mCommitSignal(this, storable_value); 
     }
 }
 
@@ -262,7 +303,8 @@ LLPointer<LLControlVariable> LLControlGroup::getControl(const std::string& name)
 
 ////////////////////////////////////////////////////////////////////////////
 
-LLControlGroup::LLControlGroup()
+LLControlGroup::LLControlGroup(const std::string& name)
+:	LLInstanceTracker<LLControlGroup, std::string>(name)
 {
 	mTypeString[TYPE_U32] = "U32";
 	mTypeString[TYPE_S32] = "S32";
@@ -274,7 +316,6 @@ LLControlGroup::LLControlGroup()
 	mTypeString[TYPE_RECT] = "Rect";
 	mTypeString[TYPE_COL4] = "Color4";
 	mTypeString[TYPE_COL3] = "Color3";
-	mTypeString[TYPE_COL4U] = "Color4u";
 	mTypeString[TYPE_LLSD] = "LLSD";
 }
 
@@ -309,10 +350,13 @@ BOOL LLControlGroup::declareControl(const std::string& name, eControlType type,
  	{
 		if (persist && existing_control->isType(type))
 		{
-			// Sometimes we need to declare a control *after* it has been loaded from a settings file.
-			LLSD cur_value = existing_control->getValue(); // get the current value
-			existing_control->setDefaultValue(initial_val); // set the default to the declared value
-			existing_control->setValue(cur_value); // now set to the loaded value
+			if (!existing_control->llsd_compare(existing_control->getDefault(), initial_val))
+			{
+				// Sometimes we need to declare a control *after* it has been loaded from a settings file.
+				LLSD cur_value = existing_control->getValue(); // get the current value
+				existing_control->setDefaultValue(initial_val); // set the default to the declared value
+				existing_control->setValue(cur_value); // now set to the loaded value
+			}
 		}
 		else
 		{
@@ -367,11 +411,6 @@ BOOL LLControlGroup::declareRect(const std::string& name, const LLRect &initial_
 	return declareControl(name, TYPE_RECT, initial_val.getValue(), comment, persist);
 }
 
-BOOL LLControlGroup::declareColor4U(const std::string& name, const LLColor4U &initial_val, const std::string& comment, BOOL persist )
-{
-	return declareControl(name, TYPE_COL4U, initial_val.getValue(), comment, persist);
-}
-
 BOOL LLControlGroup::declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, BOOL persist )
 {
 	return declareControl(name, TYPE_COL4, initial_val.getValue(), comment, persist);
@@ -389,81 +428,32 @@ BOOL LLControlGroup::declareLLSD(const std::string& name, const LLSD &initial_va
 
 BOOL LLControlGroup::getBOOL(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_BOOLEAN))
-		return control->get().asBoolean();
-	else
-	{
-		CONTROL_ERRS << "Invalid BOOL control " << name << llendl;
-		return FALSE;
-	}
+	return (BOOL)get<bool>(name);
 }
 
 S32 LLControlGroup::getS32(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_S32))
-		return control->get().asInteger();
-	else
-	{
-		CONTROL_ERRS << "Invalid S32 control " << name << llendl;
-		return 0;
-	}
+	return get<S32>(name);
 }
 
 U32 LLControlGroup::getU32(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_U32))		
-		return control->get().asInteger();
-	else
-	{
-		CONTROL_ERRS << "Invalid U32 control " << name << llendl;
-		return 0;
-	}
+	return get<U32>(name);
 }
 
 F32 LLControlGroup::getF32(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_F32))
-		return (F32) control->get().asReal();
-	else
-	{
-		CONTROL_ERRS << "Invalid F32 control " << name << llendl;
-		return 0.0f;
-	}
-}
-
-std::string LLControlGroup::findString(const std::string& name)
-{
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_STRING))
-		return control->get().asString();
-	return LLStringUtil::null;
+	return get<F32>(name);
 }
 
 std::string LLControlGroup::getString(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_STRING))
-		return control->get().asString();
-	else
-	{
-		CONTROL_ERRS << "Invalid string control " << name << llendl;
-		return LLStringUtil::null;
-	}
+	return get<std::string>(name);
 }
 
 LLWString LLControlGroup::getWString(const std::string& name)
 {
-	return utf8str_to_wstring(getString(name));
+	return get<LLWString>(name);
 }
 
 std::string LLControlGroup::getText(const std::string& name)
@@ -476,123 +466,38 @@ std::string LLControlGroup::getText(const std::string& name)
 
 LLVector3 LLControlGroup::getVector3(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_VEC3))
-		return control->get();
-	else
-	{
-		CONTROL_ERRS << "Invalid LLVector3 control " << name << llendl;
-		return LLVector3::zero;
-	}
+	return get<LLVector3>(name);
 }
 
 LLVector3d LLControlGroup::getVector3d(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_VEC3D))
-		return control->get();
-	else
-	{
-		CONTROL_ERRS << "Invalid LLVector3d control " << name << llendl;
-		return LLVector3d::zero;
-	}
+	return get<LLVector3d>(name);
 }
 
 LLRect LLControlGroup::getRect(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_RECT))
-		return control->get();
-	else
-	{
-		CONTROL_ERRS << "Invalid rect control " << name << llendl;
-		return LLRect::null;
-	}
+	return get<LLRect>(name);
 }
 
 
 LLColor4 LLControlGroup::getColor(const std::string& name)
 {
-	ctrl_name_table_t::const_iterator i = mNameTable.find(name);
-
-	if (i != mNameTable.end())
-	{
-		LLControlVariable* control = i->second;
-
-		switch(control->mType)
-		{
-		case TYPE_COL4:
-			{
-				return LLColor4(control->get());
-			}
-		case TYPE_COL4U:
-			{
-				return LLColor4(LLColor4U(control->get()));
-			}
-		default:
-			{
-				CONTROL_ERRS << "Control " << name << " not a color" << llendl;
-				return LLColor4::white;
-			}
-		}
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid getColor control " << name << llendl;
-		return LLColor4::white;
-	}
-}
-
-LLColor4U LLControlGroup::getColor4U(const std::string& name)
-{
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_COL4U))
-		return control->get();
-	else
-	{
-		CONTROL_ERRS << "Invalid LLColor4 control " << name << llendl;
-		return LLColor4U::white;
-	}
+	return get<LLColor4>(name);
 }
 
 LLColor4 LLControlGroup::getColor4(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_COL4))
-		return control->get();
-	else
-	{
-		CONTROL_ERRS << "Invalid LLColor4 control " << name << llendl;
-		return LLColor4::white;
-	}
+	return get<LLColor4>(name);
 }
 
 LLColor3 LLControlGroup::getColor3(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_COL3))
-		return control->get();
-	else
-	{
-		CONTROL_ERRS << "Invalid LLColor3 control " << name << llendl;
-		return LLColor3::white;
-	}
+	return get<LLColor3>(name);
 }
 
 LLSD LLControlGroup::getLLSD(const std::string& name)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_LLSD))
-		return control->getValue();
-	CONTROL_ERRS << "Invalid LLSD control " << name << llendl;
-	return LLSD();
+	return get<LLSD>(name);
 }
 
 BOOL LLControlGroup::controlExists(const std::string& name)
@@ -601,170 +506,67 @@ BOOL LLControlGroup::controlExists(const std::string& name)
 	return iter != mNameTable.end();
 }
 
+
 //-------------------------------------------------------------------
 // Set functions
 //-------------------------------------------------------------------
 
 void LLControlGroup::setBOOL(const std::string& name, BOOL val)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_BOOLEAN))
-	{
-		control->set(val);
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid control " << name << llendl;
-	}
+	set<bool>(name, val);
 }
 
 
 void LLControlGroup::setS32(const std::string& name, S32 val)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_S32))
-	{
-		control->set(val);
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid control " << name << llendl;
-	}
+	set(name, val);
 }
 
 
 void LLControlGroup::setF32(const std::string& name, F32 val)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_F32))
-	{
-		control->set(val);
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid control " << name << llendl;
-	}
+	set(name, val);
 }
 
 
 void LLControlGroup::setU32(const std::string& name, U32 val)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_U32))
-	{
-		control->set((LLSD::Integer) val);
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid control " << name << llendl;
-	}
+	set(name, val);
 }
 
 
 void LLControlGroup::setString(const std::string& name, const std::string &val)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_STRING))
-	{
-		control->set(val);
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid control " << name << llendl;
-	}
+	set(name, val);
 }
 
 
 void LLControlGroup::setVector3(const std::string& name, const LLVector3 &val)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_VEC3))
-	{
-		control->set(val.getValue());
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid control " << name << llendl;
-	}
+	set(name, val);
 }
 
 void LLControlGroup::setVector3d(const std::string& name, const LLVector3d &val)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_VEC3D))
-	{
-		control->set(val.getValue());
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid control " << name << llendl;
-	}
+	set(name, val);
 }
 
 void LLControlGroup::setRect(const std::string& name, const LLRect &val)
 {
-	LLControlVariable* control = getControl(name);
-
-	if (control && control->isType(TYPE_RECT))
-	{
-		control->set(val.getValue());
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid rect control " << name << llendl;
-	}
-}
-
-void LLControlGroup::setColor4U(const std::string& name, const LLColor4U &val)
-{
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_COL4U))
-	{
-		control->set(val.getValue());
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid LLColor4 control " << name << llendl;
-	}
+	set(name, val);
 }
 
 void LLControlGroup::setColor4(const std::string& name, const LLColor4 &val)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_COL4))
-	{
-		control->set(val.getValue());
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid LLColor4 control " << name << llendl;
-	}
+	set(name, val);
 }
 
 void LLControlGroup::setLLSD(const std::string& name, const LLSD& val)
 {
-	LLControlVariable* control = getControl(name);
-	
-	if (control && control->isType(TYPE_LLSD))
-	{
-		setValue(name, val);
-	}
-	else
-	{
-		CONTROL_ERRS << "Invalid LLSD control " << name << llendl;
-	}
+	set(name, val);
 }
 
-void LLControlGroup::setValue(const std::string& name, const LLSD& val)
+void LLControlGroup::setUntypedValue(const std::string& name, const LLSD& val)
 {
 	if (name.empty())
 	{
@@ -775,7 +577,7 @@ void LLControlGroup::setValue(const std::string& name, const LLSD& val)
 	
 	if (control)
 	{
-		control->set(val);
+		control->setValue(val);
 	}
 	else
 	{
@@ -783,6 +585,7 @@ void LLControlGroup::setValue(const std::string& name, const LLSD& val)
 	}
 }
 
+
 //---------------------------------------------------------------
 // Load and save
 //---------------------------------------------------------------
@@ -851,9 +654,6 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require
 			case TYPE_COL4:
 				declareColor4(name, LLColor4::white, LLStringUtil::null, NO_PERSIST);
 				break;
-			case TYPE_COL4U:
-				declareColor4U(name, LLColor4U::white, LLStringUtil::null, NO_PERSIST);
-				break;
 			case TYPE_STRING:
 			default:
 				declareString(name, LLStringUtil::null, LLStringUtil::null, NO_PERSIST);
@@ -951,15 +751,6 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require
 				validitems++;
 			}
 			break;
-		case TYPE_COL4U:
-			{
-				LLColor4U color;
-
-				child_nodep->getAttributeColor4U("value", color);
-				control->set(color.getValue());
-				validitems++;
-			}
-			break;
 		case TYPE_COL4:
 			{
 				LLColor4 color;
@@ -1059,10 +850,11 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
 	}
 
 	U32	validitems = 0;
-	bool persist = true;
 	bool hidefromsettingseditor = false;
+	
 	for(LLSD::map_const_iterator itr = settings.beginMap(); itr != settings.endMap(); ++itr)
 	{
+		bool persist = true;
 		name = (*itr).first;
 		control_map = (*itr).second;
 		
@@ -1152,55 +944,6 @@ void LLControlGroup::applyToAll(ApplyFunctor* func)
 	}
 }
 
-//============================================================================
-// First-use
-
-static std::string get_warn_name(const std::string& name)
-{
-	std::string warnname = "Warn" + name;
-	for (std::string::iterator iter = warnname.begin(); iter != warnname.end(); ++iter)
-	{
-		char c = *iter;
-		if (!isalnum(c))
-		{
-			*iter = '_';
-		}
-	}
-	return warnname;
-}
-
-void LLControlGroup::addWarning(const std::string& name)
-{
-	std::string warnname = get_warn_name(name);
-	if(mNameTable.find(warnname) == mNameTable.end())
-	{
-		std::string comment = std::string("Enables ") + name + std::string(" warning dialog");
-		declareBOOL(warnname, TRUE, comment);
-		mWarnings.insert(warnname);
-	}
-}
-
-BOOL LLControlGroup::getWarning(const std::string& name)
-{
-	std::string warnname = get_warn_name(name);
-	return getBOOL(warnname);
-}
-
-void LLControlGroup::setWarning(const std::string& name, BOOL val)
-{
-	std::string warnname = get_warn_name(name);
-	setBOOL(warnname, val);
-}
-
-void LLControlGroup::resetWarnings()
-{
-	for (std::set<std::string>::iterator iter = mWarnings.begin();
-		 iter != mWarnings.end(); ++iter)
-	{
-		setBOOL(*iter, TRUE);
-	}
-}
-
 //============================================================================
 
 #ifdef TEST_HARNESS
@@ -1265,4 +1008,297 @@ void main()
 #endif
 
 
+template <> eControlType get_control_type<U32>() 
+{ 
+	return TYPE_U32; 
+}
+
+template <> eControlType get_control_type<S32>() 
+{ 
+	return TYPE_S32; 
+}
+
+template <> eControlType get_control_type<F32>() 
+{ 
+	return TYPE_F32; 
+}
+
+template <> eControlType get_control_type<bool> () 
+{ 
+	return TYPE_BOOLEAN; 
+}
+/*
+// Yay BOOL, its really an S32.
+template <> eControlType get_control_type<BOOL> () 
+{ 
+	return TYPE_BOOLEAN; 
+}
+*/
+template <> eControlType get_control_type<std::string>() 
+{ 
+	return TYPE_STRING; 
+}
+
+template <> eControlType get_control_type<LLVector3>() 
+{ 
+	return TYPE_VEC3; 
+}
+
+template <> eControlType get_control_type<LLVector3d>() 
+{ 
+	return TYPE_VEC3D; 
+}
+
+template <> eControlType get_control_type<LLRect>() 
+{ 
+	return TYPE_RECT; 
+}
+
+template <> eControlType get_control_type<LLColor4>() 
+{ 
+	return TYPE_COL4; 
+}
+
+template <> eControlType get_control_type<LLColor3>() 
+{ 
+	return TYPE_COL3; 
+}
+
+template <> eControlType get_control_type<LLSD>() 
+{ 
+	return TYPE_LLSD; 
+}
+
+
+template <> LLSD convert_to_llsd<U32>(const U32& in) 
+{ 
+	return (LLSD::Integer)in; 
+}
+
+template <> LLSD convert_to_llsd<LLVector3>(const LLVector3& in) 
+{ 
+	return in.getValue(); 
+}
+
+template <> LLSD convert_to_llsd<LLVector3d>(const LLVector3d& in) 
+{ 
+	return in.getValue(); 
+}
+
+template <> LLSD convert_to_llsd<LLRect>(const LLRect& in) 
+{ 
+	return in.getValue(); 
+}
+
+template <> LLSD convert_to_llsd<LLColor4>(const LLColor4& in) 
+{ 
+	return in.getValue(); 
+}
+
+template <> LLSD convert_to_llsd<LLColor3>(const LLColor3& in) 
+{ 
+	return in.getValue(); 
+}
+
+template <> LLSD convert_to_llsd<LLColor4U>(const LLColor4U& in) 
+{ 
+	return in.getValue();
+}
+
+
+template<>
+bool convert_from_llsd<bool>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	if (type == TYPE_BOOLEAN)
+		return sd.asBoolean();
+	else
+	{
+		CONTROL_ERRS << "Invalid BOOL value" << llendl;
+		return FALSE;
+	}
+}
+
+template<>
+S32 convert_from_llsd<S32>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	if (type == TYPE_S32)
+		return sd.asInteger();
+	else
+	{
+		CONTROL_ERRS << "Invalid S32 value" << llendl;
+		return 0;
+	}
+}
+
+template<>
+U32 convert_from_llsd<U32>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	if (type == TYPE_U32)	
+		return sd.asInteger();
+	else
+	{
+		CONTROL_ERRS << "Invalid U32 value" << llendl;
+		return 0;
+	}
+}
+
+template<>
+F32 convert_from_llsd<F32>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	if (type == TYPE_F32)
+		return (F32) sd.asReal();
+	else
+	{
+		CONTROL_ERRS << "Invalid F32 value" << llendl;
+		return 0.0f;
+	}
+}
+
+template<>
+std::string convert_from_llsd<std::string>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	if (type == TYPE_STRING)
+		return sd.asString();
+	else
+	{
+		CONTROL_ERRS << "Invalid string value" << llendl;
+		return LLStringUtil::null;
+	}
+}
+
+template<>
+LLWString convert_from_llsd<LLWString>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	return utf8str_to_wstring(convert_from_llsd<std::string>(sd, type, control_name));
+}
+
+template<>
+LLVector3 convert_from_llsd<LLVector3>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	if (type == TYPE_VEC3)
+		return sd;
+	else
+	{
+		CONTROL_ERRS << "Invalid LLVector3 value" << llendl;
+		return LLVector3::zero;
+	}
+}
+
+template<>
+LLVector3d convert_from_llsd<LLVector3d>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	if (type == TYPE_VEC3D)
+		return sd;
+	else
+	{
+		CONTROL_ERRS << "Invalid LLVector3d value" << llendl;
+		return LLVector3d::zero;
+	}
+}
+
+template<>
+LLRect convert_from_llsd<LLRect>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	if (type == TYPE_RECT)
+		return sd;
+	else
+	{
+		CONTROL_ERRS << "Invalid rect value" << llendl;
+		return LLRect::null;
+	}
+}
+
+
+template<>
+LLColor4 convert_from_llsd<LLColor4>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	if (type == TYPE_COL4)
+	{
+		LLColor4 color(sd);
+		if (color.mV[VRED] < 0.f || color.mV[VRED] > 1.f)
+		{
+			llwarns << "Color " << control_name << " value out of range " << llendl;
+		}
+		else if (color.mV[VGREEN] < 0.f || color.mV[VGREEN] > 1.f)
+		{
+			llwarns << "Color " << control_name << " value out of range " << llendl;
+		}
+		else if (color.mV[VBLUE] < 0.f || color.mV[VBLUE] > 1.f)
+		{
+			llwarns << "Color " << control_name << " value out of range " << llendl;
+		}
+		else if (color.mV[VALPHA] < 0.f || color.mV[VALPHA] > 1.f)
+		{
+			llwarns << "Color " << control_name << " value out of range " << llendl;
+		}
+
+		return LLColor4(sd);
+	}
+	else
+	{
+		CONTROL_ERRS << "Control " << control_name << " not a color" << llendl;
+		return LLColor4::white;
+	}
+}
+
+template<>
+LLColor3 convert_from_llsd<LLColor3>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	if (type == TYPE_COL3)
+		return sd;
+	else
+	{
+		CONTROL_ERRS << "Invalid LLColor3 value" << llendl;
+		return LLColor3::white;
+	}
+}
+
+template<>
+LLSD convert_from_llsd<LLSD>(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	return sd;
+}
+
+
+#if TEST_CACHED_CONTROL
+
+#define DECL_LLCC(T, V) static LLCachedControl<T> mySetting_##T("TestCachedControl"#T, V)
+DECL_LLCC(U32, (U32)666);
+DECL_LLCC(S32, (S32)-666);
+DECL_LLCC(F32, (F32)-666.666);
+DECL_LLCC(bool, true);
+DECL_LLCC(BOOL, FALSE);
+static LLCachedControl<std::string> mySetting_string("TestCachedControlstring", "Default String Value");
+DECL_LLCC(LLVector3, LLVector3(1.0f, 2.0f, 3.0f));
+DECL_LLCC(LLVector3d, LLVector3d(6.0f, 5.0f, 4.0f));
+DECL_LLCC(LLRect, LLRect(0, 0, 100, 500));
+DECL_LLCC(LLColor4, LLColor4(0.0f, 0.5f, 1.0f));
+DECL_LLCC(LLColor3, LLColor3(1.0f, 0.f, 0.5f));
+DECL_LLCC(LLColor4U, LLColor4U(255, 200, 100, 255));
+
+LLSD test_llsd = LLSD()["testing1"] = LLSD()["testing2"];
+DECL_LLCC(LLSD, test_llsd);
+
+static LLCachedControl<std::string> test_BrowserHomePage("BrowserHomePage", "hahahahahha", "Not the real comment");
+
+void test_cached_control()
+{
+#define TEST_LLCC(T, V) if((T)mySetting_##T != V) llerrs << "Fail "#T << llendl
+	TEST_LLCC(U32, 666);
+	TEST_LLCC(S32, (S32)-666);
+	TEST_LLCC(F32, (F32)-666.666);
+	TEST_LLCC(bool, true);
+	TEST_LLCC(BOOL, FALSE);
+	if((std::string)mySetting_string != "Default String Value") llerrs << "Fail string" << llendl;
+	TEST_LLCC(LLVector3, LLVector3(1.0f, 2.0f, 3.0f));
+	TEST_LLCC(LLVector3d, LLVector3d(6.0f, 5.0f, 4.0f));
+	TEST_LLCC(LLRect, LLRect(0, 0, 100, 500));
+	TEST_LLCC(LLColor4, LLColor4(0.0f, 0.5f, 1.0f));
+	TEST_LLCC(LLColor3, LLColor3(1.0f, 0.f, 0.5f));
+	TEST_LLCC(LLColor4U, LLColor4U(255, 200, 100, 255));
+//There's no LLSD comparsion for LLCC yet. TEST_LLCC(LLSD, test_llsd); 
+
+	if((std::string)test_BrowserHomePage != "http://www.secondlife.com") llerrs << "Fail BrowserHomePage" << llendl;
+}
+#endif // TEST_CACHED_CONTROL
 
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index ba0a1c7cbf..1782c20a7e 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -33,11 +33,14 @@
 #ifndef LL_LLCONTROL_H
 #define LL_LLCONTROL_H
 
+#include "llboost.h"
 #include "llevent.h"
 #include "llnametable.h"
 #include "llmap.h"
 #include "llstring.h"
 #include "llrect.h"
+#include "llrefcount.h"
+#include "llinstancetracker.h"
 
 #include "llcontrolgroupreader.h"
 
@@ -65,7 +68,6 @@ class LLVector3;
 class LLVector3d;
 class LLColor4;
 class LLColor3;
-class LLColor4U;
 
 const BOOL NO_PERSIST = FALSE;
 
@@ -81,15 +83,17 @@ typedef enum e_control_type
 	TYPE_RECT,
 	TYPE_COL4,
 	TYPE_COL3,
-	TYPE_COL4U,
 	TYPE_LLSD,
 	TYPE_COUNT
 } eControlType;
 
-class LLControlVariable : public LLRefCount
+class LLControlVariable : public LLRefCount, boost::noncopyable
 {
 	friend class LLControlGroup;
-	typedef boost::signal<void(const LLSD&)> signal_t;
+	
+public:
+	typedef boost::signal<bool(LLControlVariable* control, const LLSD&), boost_boolean_combiner> validate_signal_t;
+	typedef boost::signal<void(LLControlVariable* control, const LLSD&)> commit_signal_t;
 
 private:
 	std::string		mName;
@@ -99,7 +103,8 @@ private:
 	bool			mHideFromSettingsEditor;
 	std::vector<LLSD> mValues;
 	
-	signal_t mSignal;
+	commit_signal_t mCommitSignal;
+	validate_signal_t mValidateSignal;
 	
 public:
 	LLControlVariable(const std::string& name, eControlType type,
@@ -116,7 +121,9 @@ public:
 
 	void resetToDefault(bool fire_signal = false);
 
-	signal_t* getSignal() { return &mSignal; }
+	commit_signal_t* getSignal() { return &mCommitSignal; } // shorthand for commit signal
+	commit_signal_t* getCommitSignal() { return &mCommitSignal; }
+	validate_signal_t* getValidateSignal() { return &mValidateSignal; }
 
 	bool isDefault() { return (mValues.size() == 1); }
 	bool isSaveValueDefault();
@@ -136,31 +143,55 @@ public:
 
 	void firePropertyChanged()
 	{
-		mSignal(mValues.back());
+		mCommitSignal(this, mValues.back());
 	}
 private:
 	LLSD getComparableValue(const LLSD& value);
 	bool llsd_compare(const LLSD& a, const LLSD & b);
-
 };
 
+typedef LLPointer<LLControlVariable> LLControlVariablePtr;
+
+//! Helper functions for converting between static types and LLControl values
+template <class T> 
+eControlType get_control_type()
+{
+	llwarns << "Usupported control type: " << typeid(T).name() << "." << llendl;
+	return TYPE_COUNT;
+}
+
+template <class T> 
+LLSD convert_to_llsd(const T& in)
+{
+	// default implementation
+	return LLSD(in);
+}
+
+template <class T>
+T convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name)
+{
+	// needs specialization
+	return T(sd);
+}
+
 //const U32 STRING_CACHE_SIZE = 10000;
-class LLControlGroup : public LLControlGroupReader
+class LLControlGroup : public LLInstanceTracker<LLControlGroup, std::string>
 {
 protected:
-	typedef std::map<std::string, LLPointer<LLControlVariable> > ctrl_name_table_t;
+	typedef std::map<std::string, LLControlVariablePtr > ctrl_name_table_t;
 	ctrl_name_table_t mNameTable;
-	std::set<std::string> mWarnings;
 	std::string mTypeString[TYPE_COUNT];
 
 	eControlType typeStringToEnum(const std::string& typestr);
 	std::string typeEnumToString(eControlType typeenum);	
 public:
-	LLControlGroup();
+	LLControlGroup(const std::string& name);
 	~LLControlGroup();
 	void cleanup();
 	
-	LLPointer<LLControlVariable> getControl(const std::string& name);
+	typedef LLInstanceTracker<LLControlGroup, std::string>::instance_iter instance_iter;
+
+	LLControlVariablePtr getControl(const std::string& name);
 
 	struct ApplyFunctor
 	{
@@ -178,33 +209,47 @@ public:
 	BOOL declareVec3(const std::string& name, const LLVector3 &initial_val,const std::string& comment,  BOOL persist = TRUE);
 	BOOL declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, BOOL persist = TRUE);
 	BOOL declareRect(const std::string& name, const LLRect &initial_val, const std::string& comment, BOOL persist = TRUE);
-	BOOL declareColor4U(const std::string& name, const LLColor4U &initial_val, const std::string& comment, BOOL persist = TRUE);
 	BOOL declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, BOOL persist = TRUE);
 	BOOL declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, BOOL persist = TRUE);
 	BOOL declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, BOOL persist = TRUE);
-	
-	std::string 	findString(const std::string& name);
 
-	std::string 	getString(const std::string& name);
-	LLWString	getWString(const std::string& name);
-	std::string	getText(const std::string& name);
-	LLVector3	getVector3(const std::string& name);
-	LLVector3d	getVector3d(const std::string& name);
-	LLRect		getRect(const std::string& name);
+	std::string getString(const std::string& name);
+	std::string getText(const std::string& name);
 	BOOL		getBOOL(const std::string& name);
 	S32			getS32(const std::string& name);
 	F32			getF32(const std::string& name);
 	U32			getU32(const std::string& name);
+	
+	LLWString	getWString(const std::string& name);
+	LLVector3	getVector3(const std::string& name);
+	LLVector3d	getVector3d(const std::string& name);
+	LLRect		getRect(const std::string& name);
 	LLSD        getLLSD(const std::string& name);
 
 
-	// Note: If an LLColor4U control exists, it will cast it to the correct
-	// LLColor4 for you.
 	LLColor4	getColor(const std::string& name);
-	LLColor4U	getColor4U(const std::string& name);
 	LLColor4	getColor4(const std::string& name);
 	LLColor3	getColor3(const std::string& name);
 
+	// generic getter
+	template<typename T> T get(const std::string& name)
+	{
+		LLControlVariable* control = getControl(name);
+		LLSD value;
+		eControlType type = TYPE_COUNT;
+
+		if (control)		
+		{
+			value = control->get();
+			type = control->type();
+		}
+		else
+		{
+			llwarns << "Control " << name << " not found." << llendl;
+		}
+		return convert_from_llsd<T>(value, type, name);
+	}
+
 	void	setBOOL(const std::string& name, BOOL val);
 	void	setS32(const std::string& name, S32 val);
 	void	setF32(const std::string& name, F32 val);
@@ -213,12 +258,26 @@ public:
 	void	setVector3(const std::string& name, const LLVector3 &val);
 	void	setVector3d(const std::string& name, const LLVector3d &val);
 	void	setRect(const std::string& name, const LLRect &val);
-	void	setColor4U(const std::string& name, const LLColor4U &val);
 	void	setColor4(const std::string& name, const LLColor4 &val);
-	void	setColor3(const std::string& name, const LLColor3 &val);
 	void    setLLSD(const std::string& name, const LLSD& val);
-	void	setValue(const std::string& name, const LLSD& val);
+
+	// type agnostic setter that takes LLSD
+	void	setUntypedValue(const std::string& name, const LLSD& val);
+
+	// generic setter
+	template<typename T> void set(const std::string& name, const T& val)
+	{
+		LLControlVariable* control = getControl(name);
 	
+		if (control && control->isType(get_control_type<T>()))
+		{
+			control->set(convert_to_llsd(val));
+		}
+		else
+		{
+			llwarns << "Invalid control " << name << llendl;
+		}
+	}
 	
 	BOOL    controlExists(const std::string& name);
 
@@ -229,17 +288,170 @@ public:
  	U32 saveToFile(const std::string& filename, BOOL nondefault_only);
  	U32	loadFromFile(const std::string& filename, bool default_values = false);
 	void	resetToDefaults();
+};
 
+
+//! Publish/Subscribe object to interact with LLControlGroups.
+
+//! Use an LLCachedControl instance to connect to a LLControlVariable
+//! without have to manually create and bind a listener to a local
+//! object.
+template <class T>
+class LLControlCache : public LLRefCount, public LLInstanceTracker<LLControlCache<T>, std::string>
+{
+public:
+	// This constructor will declare a control if it doesn't exist in the contol group
+	LLControlCache(LLControlGroup& group,
+					const std::string& name, 
+					const T& default_value, 
+					const std::string& comment)
+	:	LLInstanceTracker<LLControlCache<T>, std::string >(name)
+	{
+		if(!group.controlExists(name))
+		{
+			if(!declareTypedControl(group, name, default_value, comment))
+			{
+				llerrs << "The control could not be created!!!" << llendl;
+			}
+		}
+
+		bindToControl(group, name);
+	}
+
+	LLControlCache(LLControlGroup& group,
+					const std::string& name)
+	:	LLInstanceTracker<LLControlCache<T>, std::string >(name)
+	{
+		if(!group.controlExists(name))
+		{
+			llerrs << "Control named " << name << "not found." << llendl;
+		}
+
+		bindToControl(group, name);
+	}
+
+	~LLControlCache()
+	{
+		if(mConnection.connected())
+		{
+			mConnection.disconnect();
+		}
+	}
+
+	const T& getValue() const { return mCachedValue; }
 	
-	// Ignorable Warnings
-	
-	// Add a config variable to be reset on resetWarnings()
-	void addWarning(const std::string& name);
-	BOOL getWarning(const std::string& name);
-	void setWarning(const std::string& name, BOOL val);
-	
-	// Resets all ignorables
-	void resetWarnings();
+private:
+	void bindToControl(LLControlGroup& group, const std::string& name)
+	{
+		LLControlVariablePtr controlp = group.getControl(name);
+		mType = controlp->type();
+		mCachedValue = convert_from_llsd<T>(controlp->get(), mType, name);
+
+		// Add a listener to the controls signal...
+		mConnection = controlp->getSignal()->connect(
+			boost::bind(&LLControlCache<T>::handleValueChange, this, _2)
+			);
+		mType = controlp->type();
+	}
+	bool declareTypedControl(LLControlGroup& group,
+							const std::string& name, 
+							 const T& default_value,
+							 const std::string& comment)
+	{
+		LLSD init_value;
+		eControlType type = get_control_type<T>();
+		init_value = convert_to_llsd(default_value);
+		if(type < TYPE_COUNT)
+		{
+			group.declareControl(name, type, init_value, comment, FALSE);
+			return true;
+		}
+		return false;
+	}
+
+	bool handleValueChange(const LLSD& newvalue)
+	{
+		mCachedValue = convert_from_llsd<T>(newvalue, mType, "");
+		return true;
+	}
+
+private:
+    T							mCachedValue;
+	eControlType				mType;
+    boost::signals::connection	mConnection;
+};
+
+template <typename T>
+class LLCachedControl
+{
+public:
+	LLCachedControl(LLControlGroup& group,
+					const std::string& name, 
+					const T& default_value, 
+					const std::string& comment = "Declared In Code")
+	{
+		mCachedControlPtr = LLControlCache<T>::getInstance(name);
+		if (mCachedControlPtr.isNull())
+		{
+			mCachedControlPtr = new LLControlCache<T>(group, name, default_value, comment);
+		}
+	}
+
+	LLCachedControl(LLControlGroup& group,
+					const std::string& name)
+	{
+		mCachedControlPtr = LLControlCache<T>::getInstance(name);
+		if (mCachedControlPtr.isNull())
+		{
+			mCachedControlPtr = new LLControlCache<T>(group, name);
+		}
+	}
+
+	operator const T&() const { return mCachedControlPtr->getValue(); }
+	operator boost::function<const T&()> () const { return boost::function<const T&()>(*this); }
+	const T& operator()() { return mCachedControlPtr->getValue(); }
+
+private:
+	LLPointer<LLControlCache<T> > mCachedControlPtr;
 };
 
+template <> eControlType get_control_type<U32>();
+template <> eControlType get_control_type<S32>();
+template <> eControlType get_control_type<F32>();
+template <> eControlType get_control_type<bool>(); 
+// Yay BOOL, its really an S32.
+//template <> eControlType get_control_type<BOOL> () 
+template <> eControlType get_control_type<std::string>();
+template <> eControlType get_control_type<LLVector3>();
+template <> eControlType get_control_type<LLVector3d>(); 
+template <> eControlType get_control_type<LLRect>();
+template <> eControlType get_control_type<LLColor4>();
+template <> eControlType get_control_type<LLColor3>();
+template <> eControlType get_control_type<LLSD>();
+
+template <> LLSD convert_to_llsd<U32>(const U32& in);
+template <> LLSD convert_to_llsd<LLVector3>(const LLVector3& in);
+template <> LLSD convert_to_llsd<LLVector3d>(const LLVector3d& in); 
+template <> LLSD convert_to_llsd<LLRect>(const LLRect& in);
+template <> LLSD convert_to_llsd<LLColor4>(const LLColor4& in);
+template <> LLSD convert_to_llsd<LLColor3>(const LLColor3& in);
+
+template<> std::string convert_from_llsd<std::string>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> LLWString convert_from_llsd<LLWString>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> LLVector3 convert_from_llsd<LLVector3>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> LLVector3d convert_from_llsd<LLVector3d>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> LLRect convert_from_llsd<LLRect>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> bool convert_from_llsd<bool>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> S32 convert_from_llsd<S32>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> F32 convert_from_llsd<F32>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> U32 convert_from_llsd<U32>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> LLColor3 convert_from_llsd<LLColor3>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> LLColor4 convert_from_llsd<LLColor4>(const LLSD& sd, eControlType type, const std::string& control_name);
+template<> LLSD convert_from_llsd<LLSD>(const LLSD& sd, eControlType type, const std::string& control_name);
+
+//#define TEST_CACHED_CONTROL 1
+#ifdef TEST_CACHED_CONTROL
+void test_cached_control();
+#endif // TEST_CACHED_CONTROL
+
 #endif
diff --git a/indra/llxml/llcontrolgroupreader.h b/indra/llxml/llcontrolgroupreader.h
index 960b19036e..116ea2eae0 100644
--- a/indra/llxml/llcontrolgroupreader.h
+++ b/indra/llxml/llcontrolgroupreader.h
@@ -3,7 +3,30 @@
  * @brief Interface providing readonly access to LLControlGroup (intended for unit testing)
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
  * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
 
@@ -13,9 +36,11 @@
 #include "stdtypes.h"
 #include <string>
 
-// Many of the types below are commented out because for the purposes of the early testing we're doing,
-// we don't need them and we don't want to pull in all the machinery to support them.
-// But the model is here for future unit test extensions.
+#include "v3math.h"
+#include "v3dmath.h"
+#include "v3color.h"
+#include "v4color.h"
+#include "llrect.h"
 
 class LLControlGroupReader
 {
@@ -23,22 +48,32 @@ public:
 	LLControlGroupReader() {}
 	virtual ~LLControlGroupReader() {}
 
-	virtual std::string 	getString(const std::string& name) = 0;
-	//virtual LLWString	getWString(const std::string& name) = 0;
-	virtual std::string	getText(const std::string& name) = 0;
-	//virtual LLVector3	getVector3(const std::string& name) = 0;
-	//virtual LLVector3d	getVector3d(const std::string& name) = 0;
-	//virtual LLRect		getRect(const std::string& name) = 0;
-	virtual BOOL		getBOOL(const std::string& name) = 0;
-	virtual S32			getS32(const std::string& name) = 0;
-	virtual F32			getF32(const std::string& name) = 0;
-	virtual U32			getU32(const std::string& name) = 0;
-	//virtual LLSD        getLLSD(const std::string& name) = 0;
-
-	//virtual LLColor4	getColor(const std::string& name) = 0;
-	//virtual LLColor4U	getColor4U(const std::string& name) = 0;
-	//virtual LLColor4	getColor4(const std::string& name) = 0;
-	//virtual LLColor3	getColor3(const std::string& name) = 0;
+	virtual std::string getString(const std::string& name) { return ""; }
+	virtual LLWString	getWString(const std::string& name) { return LLWString(); }
+	virtual std::string	getText(const std::string& name) { return ""; }
+	virtual LLVector3	getVector3(const std::string& name) { return LLVector3(); }
+	virtual LLVector3d	getVector3d(const std::string& name) { return LLVector3d(); }
+	virtual LLRect		getRect(const std::string& name) { return LLRect(); }
+	virtual BOOL		getBOOL(const std::string& name) { return FALSE; }
+	virtual S32			getS32(const std::string& name) { return 0; }
+	virtual F32			getF32(const std::string& name) {return 0.0f; }
+	virtual U32			getU32(const std::string& name) {return 0; }
+	virtual LLSD        getLLSD(const std::string& name) { return LLSD(); }
+
+	virtual LLColor4	getColor(const std::string& name) { return LLColor4(); }
+	virtual LLColor4	getColor4(const std::string& name) { return LLColor4(); }
+	virtual LLColor3	getColor3(const std::string& name) { return LLColor3(); }
+	
+	virtual void		setBOOL(const std::string& name, BOOL val) {}
+	virtual void		setS32(const std::string& name, S32 val) {}
+	virtual void		setF32(const std::string& name, F32 val) {}
+	virtual void		setU32(const std::string& name, U32 val) {}
+	virtual void		setString(const std::string&  name, const std::string& val) {}
+	virtual void		setVector3(const std::string& name, const LLVector3 &val) {}
+	virtual void		setVector3d(const std::string& name, const LLVector3d &val) {}
+	virtual void		setRect(const std::string& name, const LLRect &val) {}
+	virtual void		setColor4(const std::string& name, const LLColor4 &val) {}
+	virtual void    	setLLSD(const std::string& name, const LLSD& val) {}
 };
 
 #endif /* LL_LLCONTROLGROUPREADER_H */
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index 800b13573f..e97aa55190 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -47,6 +47,7 @@
 #include "llquaternion.h"
 #include "llstring.h"
 #include "lluuid.h"
+#include "lldir.h"
 
 const S32 MAX_COLUMN_WIDTH = 80;
 
@@ -64,6 +65,7 @@ LLXMLNode::LLXMLNode() :
 	mPrecision(64),
 	mType(TYPE_CONTAINER),
 	mEncoding(ENCODING_DEFAULT),
+	mLineNumber(-1),
 	mParent(NULL),
 	mChildren(NULL),
 	mAttributes(),
@@ -85,6 +87,7 @@ LLXMLNode::LLXMLNode(const char* name, BOOL is_attribute) :
 	mPrecision(64),
 	mType(TYPE_CONTAINER), 
 	mEncoding(ENCODING_DEFAULT),
+	mLineNumber(-1),
 	mParent(NULL),
 	mChildren(NULL),
 	mAttributes(),
@@ -106,6 +109,7 @@ LLXMLNode::LLXMLNode(LLStringTableEntry* name, BOOL is_attribute) :
 	mPrecision(64),
 	mType(TYPE_CONTAINER), 
 	mEncoding(ENCODING_DEFAULT),
+	mLineNumber(-1),
 	mParent(NULL),
 	mChildren(NULL),
 	mAttributes(),
@@ -226,6 +230,10 @@ BOOL LLXMLNode::removeChild(LLXMLNode *target_child)
 				{
 					mChildren->head = target_child->mNext;
 				}
+				if (target_child == mChildren->tail)
+				{
+					mChildren->tail = target_child->mPrev;
+				}
 
 				LLXMLNodePtr prev = target_child->mPrev;
 				LLXMLNodePtr next = target_child->mNext;
@@ -387,6 +395,7 @@ void XMLCALL StartXMLNode(void *userData,
 {
 	// Create a new node
 	LLXMLNode *new_node_ptr = new LLXMLNode(name, FALSE);
+
 	LLXMLNodePtr new_node = new_node_ptr;
 	new_node->mID.clear();
 	LLXMLNodePtr ptr_new_node = new_node;
@@ -401,7 +410,8 @@ void XMLCALL StartXMLNode(void *userData,
 	}
 
 	new_node_ptr->mParser = parent->mParser;
-
+	new_node_ptr->setLineNumber(XML_GetCurrentLineNumber(*new_node_ptr->mParser));
+	
 	// Set the current active node to the new node
 	XML_Parser *parser = parent->mParser;
 	XML_SetUserData(*parser, (void *)new_node_ptr);
@@ -492,6 +502,7 @@ void XMLCALL StartXMLNode(void *userData,
 		if (!new_node->getAttribute(attr_name.c_str(), attr_node, FALSE))
 		{
 			attr_node = new LLXMLNode(attr_name.c_str(), TRUE);
+			attr_node->setLineNumber(XML_GetCurrentLineNumber(*new_node_ptr->mParser));
 		}
 		attr_node->setValue(attr_value);
 		new_node->addChild(attr_node);
@@ -836,12 +847,66 @@ BOOL LLXMLNode::isFullyDefault()
 }
 
 // static
-void LLXMLNode::writeHeaderToFile(LLFILE *fOut)
+bool LLXMLNode::getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root,
+								  const std::vector<std::string>& paths)
+{
+	std::string full_filename = gDirUtilp->findSkinnedFilename(paths.front(), xui_filename);
+	if (full_filename.empty())
+	{
+		return false;
+	}
+
+	if (!LLXMLNode::parseFile(full_filename, root, NULL))
+	{
+		// try filename as passed in since sometimes we load an xml file from a user-supplied path
+		if (!LLXMLNode::parseFile(xui_filename, root, NULL))
+		{
+			llwarns << "Problem reading UI description file: " << xui_filename << llendl;
+			return false;
+		}
+	}
+
+	LLXMLNodePtr updateRoot;
+
+	std::vector<std::string>::const_iterator itor;
+
+	for (itor = paths.begin(), ++itor; itor != paths.end(); ++itor)
+	{
+		std::string nodeName;
+		std::string updateName;
+
+		std::string layer_filename = gDirUtilp->findSkinnedFilename((*itor), xui_filename);
+		if(layer_filename.empty())
+		{
+			// no localized version of this file, that's ok, keep looking
+			continue;
+		}
+
+		if (!LLXMLNode::parseFile(layer_filename, updateRoot, NULL))
+		{
+			llwarns << "Problem reading localized UI description file: " << (*itor) + gDirUtilp->getDirDelimiter() + xui_filename << llendl;
+			return false;
+		}
+
+		updateRoot->getAttributeString("name", updateName);
+		root->getAttributeString("name", nodeName);
+
+		if (updateName == nodeName)
+		{
+			LLXMLNode::updateNode(root, updateRoot);
+		}
+	}
+
+	return true;
+}
+
+// static
+void LLXMLNode::writeHeaderToFile(LLFILE *out_file)
 {
-	fprintf(fOut, "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>\n");
+	fprintf(out_file, "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>\n");
 }
 
-void LLXMLNode::writeToFile(LLFILE *fOut, const std::string& indent)
+void LLXMLNode::writeToFile(LLFILE *out_file, const std::string& indent)
 {
 	if (isFullyDefault())
 	{
@@ -852,7 +917,8 @@ void LLXMLNode::writeToFile(LLFILE *fOut, const std::string& indent)
 	std::ostringstream ostream;
 	writeToOstream(ostream, indent);
 	std::string outstring = ostream.str();
-	if (fwrite(outstring.c_str(), 1, outstring.length(), fOut) != outstring.length())
+	size_t written = fwrite(outstring.c_str(), 1, outstring.length(), out_file);
+	if (written != outstring.length())
 	{
 		llwarns << "Short write" << llendl;
 	}
@@ -872,12 +938,12 @@ void LLXMLNode::writeToOstream(std::ostream& output_stream, const std::string& i
 	BOOL has_default_length = mDefault.isNull()?FALSE:(mLength == mDefault->mLength);
 
 	// stream the name
-	output_stream << indent << "<" << mName->mString;
+	output_stream << indent << "<" << mName->mString << "\n";
 
 	// ID
 	if (mID != "")
 	{
-		output_stream << " id=\"" << mID << "\"";
+		output_stream << indent << " id=\"" << mID << "\"\n";
 	}
 
 	// Type
@@ -886,22 +952,22 @@ void LLXMLNode::writeToOstream(std::ostream& output_stream, const std::string& i
 		switch (mType)
 		{
 		case TYPE_BOOLEAN:
-			output_stream << " type=\"boolean\"";
+			output_stream << indent << " type=\"boolean\"\n";
 			break;
 		case TYPE_INTEGER:
-			output_stream << " type=\"integer\"";
+			output_stream << indent << " type=\"integer\"\n";
 			break;
 		case TYPE_FLOAT:
-			output_stream << " type=\"float\"";
+			output_stream << indent << " type=\"float\"\n";
 			break;
 		case TYPE_STRING:
-			output_stream << " type=\"string\"";
+			output_stream << indent << " type=\"string\"\n";
 			break;
 		case TYPE_UUID:
-			output_stream << " type=\"uuid\"";
+			output_stream << indent << " type=\"uuid\"\n";
 			break;
 		case TYPE_NODEREF:
-			output_stream << " type=\"noderef\"";
+			output_stream << indent << " type=\"noderef\"\n";
 			break;
 		default:
 			// default on switch(enum) eliminates a warning on linux
@@ -915,13 +981,13 @@ void LLXMLNode::writeToOstream(std::ostream& output_stream, const std::string& i
 		switch (mEncoding)
 		{
 		case ENCODING_DECIMAL:
-			output_stream << " encoding=\"decimal\"";
+			output_stream << indent << " encoding=\"decimal\"\n";
 			break;
 		case ENCODING_HEX:
-			output_stream << " encoding=\"hex\"";
+			output_stream << indent << " encoding=\"hex\"\n";
 			break;
 		/*case ENCODING_BASE32:
-			output_stream << " encoding=\"base32\"";
+			output_stream << indent << " encoding=\"base32\"\n";
 			break;*/
 		default:
 			// default on switch(enum) eliminates a warning on linux
@@ -932,24 +998,23 @@ void LLXMLNode::writeToOstream(std::ostream& output_stream, const std::string& i
 	// Precision
 	if (!has_default_precision && (mType == TYPE_INTEGER || mType == TYPE_FLOAT))
 	{
-		output_stream << " precision=\"" << mPrecision << "\"";
+		output_stream << indent << " precision=\"" << mPrecision << "\"\n";
 	}
 
 	// Version
 	if (mVersionMajor > 0 || mVersionMinor > 0)
 	{
-		output_stream << " version=\"" << mVersionMajor << "." << mVersionMinor << "\"";
+		output_stream << indent << " version=\"" << mVersionMajor << "." << mVersionMinor << "\"\n";
 	}
 
 	// Array length
 	if (!has_default_length && mLength > 0)
 	{
-		output_stream << " length=\"" << mLength << "\"";
+		output_stream << indent << " length=\"" << mLength << "\"\n";
 	}
 
 	{
 		// Write out attributes
-		S32 col_pos = 0;
 		LLXMLAttribList::const_iterator attr_itr;
 		LLXMLAttribList::const_iterator attr_end = mAttributes.end();
 		for (attr_itr = mAttributes.begin(); attr_itr != attr_end; ++attr_itr)
@@ -971,17 +1036,14 @@ void LLXMLNode::writeToOstream(std::ostream& output_stream, const std::string& i
 				std::string attr_str = llformat(" %s=\"%s\"",
 											 attr.c_str(),
 											 escapeXML(child->mValue).c_str());
-				if (col_pos + (S32)attr_str.length() > MAX_COLUMN_WIDTH)
-				{
-					output_stream << "\n" << indent << "    ";
-					col_pos = 4;
-				}
-				col_pos += attr_str.length();
-				output_stream << attr_str;
+				output_stream << indent << attr_str << "\n";
 			}
 		}
 	}
 
+	// erase last \n before attaching final > or />
+	output_stream.seekp(-1, std::ios::cur);
+
 	if (mChildren.isNull() && mValue == "")
 	{
 		output_stream << " />\n";
@@ -993,7 +1055,7 @@ void LLXMLNode::writeToOstream(std::ostream& output_stream, const std::string& i
 		if (mChildren.notNull())
 		{
 			// stream non-attributes
-			std::string next_indent = indent + "\t";
+			std::string next_indent = indent + "    ";
 			for (LLXMLNode* child = getFirstChild(); child; child = child->getNextSibling())
 			{
 				child->writeToOstream(output_stream, next_indent);
@@ -1002,7 +1064,7 @@ void LLXMLNode::writeToOstream(std::ostream& output_stream, const std::string& i
 		if (!mValue.empty())
 		{
 			std::string contents = getTextContents();
-			output_stream << indent << "\t" << escapeXML(contents) << "\n";
+			output_stream << indent << "    " << escapeXML(contents) << "\n";
 		}
 		output_stream << indent << "</" << mName->mString << ">\n";
 	}
@@ -2475,14 +2537,15 @@ std::string LLXMLNode::escapeXML(const std::string& xml)
 	return out;
 }
 
-void LLXMLNode::setStringValue(U32 length, const std::string *array)
+void LLXMLNode::setStringValue(U32 length, const std::string *strings)
 {
 	if (length == 0) return;
 
 	std::string new_value;
 	for (U32 pos=0; pos<length; ++pos)
 	{
-		new_value.append(escapeXML(array[pos]));
+		// *NOTE: Do not escape strings here - do it on output
+		new_value.append( strings[pos] );
 		if (pos < length-1) new_value.append(" ");
 	}
 
@@ -3150,6 +3213,19 @@ LLXMLNodePtr LLXMLNode::getNextSibling() const
 	return ret;
 }
 
+std::string LLXMLNode::getSanitizedValue() const 
+{ 
+	if (mIsAttribute) 
+	{
+		return getValue() ;
+	}
+	else 
+	{
+		return getTextContents(); 
+	}
+}
+
+
 std::string LLXMLNode::getTextContents() const
 {
 	std::string msg;
@@ -3215,3 +3291,13 @@ std::string LLXMLNode::getTextContents() const
 	}
 	return msg;
 }
+
+void LLXMLNode::setLineNumber(S32 line_number)
+{
+	mLineNumber = line_number;
+}
+
+S32 LLXMLNode::getLineNumber()
+{
+	return mLineNumber;
+}
diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h
index d4e127b05c..c983a14410 100644
--- a/indra/llxml/llxmlnode.h
+++ b/indra/llxml/llxmlnode.h
@@ -44,8 +44,8 @@
 #include <map>
 
 #include "indra_constants.h"
-#include "llmemory.h"
-#include "llthread.h"
+#include "llpointer.h"
+#include "llthread.h"		// LLThreadSafeRefCount
 #include "llstring.h"
 #include "llstringtable.h"
 
@@ -153,8 +153,18 @@ public:
 		LLXMLNodePtr& node,
 		LLXMLNodePtr& update_node);
 	static LLXMLNodePtr replaceNode(LLXMLNodePtr node, LLXMLNodePtr replacement_node);
-	static void writeHeaderToFile(LLFILE *fOut);
-    void writeToFile(LLFILE *fOut, const std::string& indent = std::string());
+	
+	static bool getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root,
+								  const std::vector<std::string>& paths);
+	
+	
+	// Write standard XML file header:
+	// <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+	static void writeHeaderToFile(LLFILE *out_file);
+	
+	// Write XML to file with one attribute per line.
+	// XML escapes values as they are written.
+    void writeToFile(LLFILE *out_file, const std::string& indent = std::string());
     void writeToOstream(std::ostream& output_stream, const std::string& indent = std::string());
 
     // Utility
@@ -207,6 +217,7 @@ public:
     U32 getLength() const { return mLength; }
     U32 getPrecision() const { return mPrecision; }
     const std::string& getValue() const { return mValue; }
+	std::string getSanitizedValue() const;
 	std::string getTextContents() const;
     const LLStringTableEntry* getName() const { return mName; }
 	BOOL hasName(const char* name) const { return mName == gStringTable.checkStringEntry(name); }
@@ -227,6 +238,8 @@ public:
 	bool getAttribute(const char* name, LLXMLNodePtr& node, BOOL use_default_if_missing = TRUE);
 	bool getAttribute(const LLStringTableEntry* name, LLXMLNodePtr& node, BOOL use_default_if_missing = TRUE);
 
+	S32 getLineNumber();
+
 	// The following skip over attributes
 	LLXMLNodePtr getFirstChild() const;
 	LLXMLNodePtr getNextSibling() const;
@@ -262,6 +275,8 @@ public:
 	void setName(const std::string& name);
 	void setName(LLStringTableEntry* name);
 
+	void setLineNumber(S32 line_number);
+
 	// Escapes " (quot) ' (apos) & (amp) < (lt) > (gt)
 	static std::string escapeXML(const std::string& xml);
 
@@ -300,6 +315,7 @@ public:
 	U32 mPrecision;				// The number of BITS per array item
 	ValueType mType;			// The value type
 	Encoding mEncoding;			// The value encoding
+	S32 mLineNumber;			// line number in source file, if applicable
 
 	LLXMLNode* mParent;				// The parent node
 	LLXMLChildrenPtr mChildren;		// The child nodes
@@ -312,7 +328,11 @@ public:
 	
 protected:
 	LLStringTableEntry *mName;		// The name of this node
-	std::string mValue;			// The value of this node (use getters/setters only)
+
+	// The value of this node (use getters/setters only)
+	// Values are not XML-escaped in memory
+	// They may contain " (quot) ' (apos) & (amp) < (lt) > (gt)
+	std::string mValue;
 
 	LLXMLNodePtr mDefault;		// Mirror node in the default tree
 
diff --git a/indra/lscript/lscript_execute.h b/indra/lscript/lscript_execute.h
index 9a631c4c8f..245fc320d1 100644
--- a/indra/lscript/lscript_execute.h
+++ b/indra/lscript/lscript_execute.h
@@ -37,6 +37,8 @@
 #include "linked_lists.h"
 #include "lscript_library.h"
 
+class LLTimer;
+
 // Return values for run() methods
 const U32 NO_DELETE_FLAG	= 0x0000;
 const U32 DELETE_FLAG		= 0x0001;
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 668b710c22..9533281688 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -74,6 +74,8 @@ set(viewer_SOURCE_FILES
     llassetuploadresponders.cpp
     llassetuploadqueue.cpp
     llaudiosourcevo.cpp
+    llavatariconctrl.cpp
+    llavatarpropertiesprocessor.cpp
     llbbox.cpp
     llbox.cpp
     llcallbacklist.cpp
@@ -83,15 +85,11 @@ set(viewer_SOURCE_FILES
     llclassifiedinfo.cpp
     llclassifiedstatsresponder.cpp
     llcloud.cpp
-    llcolorscheme.cpp
     llcolorswatch.cpp
     llcommandhandler.cpp
     llcommandlineparser.cpp
-    llcompass.cpp
     llcompilequeue.cpp
     llconfirmationmanager.cpp
-    llconsole.cpp
-    llcontainerview.cpp
     llcurrencyuimanager.cpp
     llcylinder.cpp
     lldebugmessagebox.cpp
@@ -118,6 +116,7 @@ set(viewer_SOURCE_FILES
     lleventpoll.cpp
     llface.cpp
     llfasttimerview.cpp
+    llfavoritesbar.cpp
     llfeaturemanager.cpp
     llfilepicker.cpp
     llfirstuse.cpp
@@ -137,6 +136,7 @@ set(viewer_SOURCE_FILES
     llfloaterbuy.cpp
     llfloaterbuycurrency.cpp
     llfloaterbuyland.cpp
+    llfloatercall.cpp
     llfloatercamera.cpp
     llfloaterchat.cpp
     llfloaterchatterbox.cpp
@@ -145,7 +145,6 @@ set(viewer_SOURCE_FILES
     llfloatercustomize.cpp
     llfloaterdaycycle.cpp
     llfloaterdirectory.cpp
-    llfloatereditui.cpp
     llfloaterenvsettings.cpp
     llfloaterevent.cpp
     llfloaterfriends.cpp
@@ -168,17 +167,14 @@ set(viewer_SOURCE_FILES
     llfloaterlagmeter.cpp
     llfloaterland.cpp
     llfloaterlandholdings.cpp
-    llfloaterlandmark.cpp
     llfloatermap.cpp
     llfloatermemleak.cpp
     llfloatermute.cpp
     llfloaternamedesc.cpp
-    llfloaternewim.cpp
     llfloaternotificationsconsole.cpp
     llfloaterobjectiminfo.cpp
     llfloateropenobject.cpp
     llfloaterparcel.cpp
-    llfloaterpermissionsmgr.cpp
     llfloaterperms.cpp
     llfloaterpostcard.cpp
     llfloaterpostprocess.cpp
@@ -190,12 +186,11 @@ set(viewer_SOURCE_FILES
     llfloatersellland.cpp
     llfloatersettingsdebug.cpp
     llfloatersnapshot.cpp
-    llfloaterstats.cpp
     llfloatertelehub.cpp
-    llfloatertest.cpp
     llfloatertools.cpp
     llfloatertopobjects.cpp
     llfloatertos.cpp
+    llfloateruipreview.cpp
     llfloaterurldisplay.cpp
     llfloaterurlentry.cpp
     llfloatervoicedevicesettings.cpp
@@ -204,8 +199,6 @@ set(viewer_SOURCE_FILES
     llfloaterworldmap.cpp
     llfolderview.cpp
     llfollowcam.cpp
-    llframestats.cpp
-    llframestatview.cpp
     llgesturemgr.cpp
     llgivemoney.cpp
     llglsandbox.cpp
@@ -233,6 +226,8 @@ set(viewer_SOURCE_FILES
     llinventoryview.cpp
     lljoystickbutton.cpp
     lllandmarklist.cpp
+    lllocationhistory.cpp
+    lllocationinputctrl.cpp
     lllogchat.cpp
     llloginhandler.cpp
     llmanip.cpp
@@ -250,15 +245,17 @@ set(viewer_SOURCE_FILES
     llnamebox.cpp
     llnameeditor.cpp
     llnamelistctrl.cpp
+    llnavigationbar.cpp
     llnetmap.cpp
     llnotify.cpp
+    lloutputmonitorctrl.cpp
     lloverlaybar.cpp
     llpanelaudioprefs.cpp
     llpanelaudiovolume.cpp
     llpanelavatar.cpp
+    llpanelavatarrow.cpp
     llpanelclassified.cpp
     llpanelcontents.cpp
-    llpaneldebug.cpp
     llpaneldirbrowser.cpp
     llpaneldirclassified.cpp
     llpaneldirevents.cpp
@@ -267,7 +264,6 @@ set(viewer_SOURCE_FILES
     llpaneldirland.cpp
     llpaneldirpeople.cpp
     llpaneldirplaces.cpp
-    llpaneldirpopular.cpp
     llpaneldisplay.cpp
     llpanelevent.cpp
     llpanelface.cpp
@@ -282,16 +278,14 @@ set(viewer_SOURCE_FILES
     llpanelinventory.cpp
     llpanelland.cpp
     llpanellandmedia.cpp
-    llpanellandobjects.cpp
-    llpanellandoptions.cpp
     llpanellogin.cpp
-    llpanelmorph.cpp
     llpanelmsgs.cpp
     llpanelnetwork.cpp
     llpanelobject.cpp
     llpanelpermissions.cpp
     llpanelpick.cpp
     llpanelplace.cpp
+    llpanelshower.cpp
     llpanelskins.cpp
     llpanelvolume.cpp
     llpanelweb.cpp
@@ -317,17 +311,16 @@ set(viewer_SOURCE_FILES
     llsavedsettingsglue.cpp
     llselectmgr.cpp
     llsky.cpp
+    llslurl.cpp
     llspatialpartition.cpp
     llsprite.cpp
     llsrv.cpp
     llstartup.cpp
-    llstatbar.cpp
-    llstatgraph.cpp
     llstatusbar.cpp
-    llstatview.cpp
     llstylemap.cpp
     llsurface.cpp
     llsurfacepatch.cpp
+    llteleporthistory.cpp
     lltexlayer.cpp
     lltexturecache.cpp
     lltexturectrl.cpp
@@ -352,9 +345,7 @@ set(viewer_SOURCE_FILES
     lltoolselect.cpp
     lltoolselectland.cpp
     lltoolselectrect.cpp
-    lltoolview.cpp
     lltracker.cpp
-    lltrans.cpp
     lluploaddialog.cpp
     llurl.cpp
     llurldispatcher.cpp
@@ -363,13 +354,13 @@ set(viewer_SOURCE_FILES
     llurlwhitelist.cpp
     lluserauth.cpp
     llvectorperfoptions.cpp
-    llvelocitybar.cpp
     llviewchildren.cpp
     llviewerassetstorage.cpp
     llvieweraudio.cpp
     llviewercamera.cpp
     llviewercontrol.cpp
     llviewerdisplay.cpp
+    llviewerfloaterreg.cpp
     llviewergenericmessage.cpp
     llviewergesture.cpp
     llviewerimage.cpp
@@ -477,6 +468,8 @@ set(viewer_HEADER_FILES
     llassetuploadresponders.h
     llassetuploadqueue.h
     llaudiosourcevo.h
+    llavatariconctrl.h
+    llavatarpropertiesprocessor.h
     llbbox.h
     llbox.h
     llcallbacklist.h
@@ -486,15 +479,11 @@ set(viewer_HEADER_FILES
     llclassifiedinfo.h
     llclassifiedstatsresponder.h
     llcloud.h
-    llcolorscheme.h
     llcolorswatch.h
     llcommandhandler.h
     llcommandlineparser.h
-    llcompass.h
     llcompilequeue.h
     llconfirmationmanager.h
-    llconsole.h
-    llcontainerview.h
     llcurrencyuimanager.h
     llcylinder.h
     lldebugmessagebox.h
@@ -522,6 +511,7 @@ set(viewer_HEADER_FILES
     lleventpoll.h
     llface.h
     llfasttimerview.h
+    llfavoritesbar.h
     llfeaturemanager.h
     llfilepicker.h
     llfirstuse.h
@@ -541,6 +531,7 @@ set(viewer_HEADER_FILES
     llfloaterbuycontents.h
     llfloaterbuycurrency.h
     llfloaterbuyland.h
+    llfloatercall.h
     llfloatercamera.h
     llfloaterchat.h
     llfloaterchatterbox.h
@@ -549,7 +540,6 @@ set(viewer_HEADER_FILES
     llfloatercustomize.h
     llfloaterdaycycle.h
     llfloaterdirectory.h
-    llfloatereditui.h
     llfloaterenvsettings.h
     llfloaterevent.h
     llfloaterfonttest.h
@@ -572,17 +562,14 @@ set(viewer_HEADER_FILES
     llfloaterlagmeter.h
     llfloaterland.h
     llfloaterlandholdings.h
-    llfloaterlandmark.h
     llfloatermap.h
     llfloatermemleak.h
     llfloatermute.h
     llfloaternamedesc.h
-    llfloaternewim.h
     llfloaternotificationsconsole.h
     llfloaterobjectiminfo.h
     llfloateropenobject.h
     llfloaterparcel.h
-    llfloaterpermissionsmgr.h
     llfloaterpostcard.h
     llfloaterpostprocess.h
     llfloaterpreference.h
@@ -594,12 +581,11 @@ set(viewer_HEADER_FILES
     llfloatersellland.h
     llfloatersettingsdebug.h
     llfloatersnapshot.h
-    llfloaterstats.h
     llfloatertelehub.h
-    llfloatertest.h
     llfloatertools.h
     llfloatertopobjects.h
     llfloatertos.h
+    llfloateruipreview.h
     llfloaterurldisplay.h
     llfloaterurlentry.h
     llfloatervoicedevicesettings.h
@@ -608,8 +594,6 @@ set(viewer_HEADER_FILES
     llfloaterworldmap.h
     llfolderview.h
     llfollowcam.h
-    llframestats.h
-    llframestatview.h
     llgesturemgr.h
     llgivemoney.h
     llgroupmgr.h
@@ -636,6 +620,8 @@ set(viewer_HEADER_FILES
     lljoystickbutton.h
     lllandmarklist.h
     lllightconstants.h
+    lllocationhistory.h
+    lllocationinputctrl.h
     lllogchat.h
     llloginhandler.h
     llmanip.h
@@ -653,15 +639,17 @@ set(viewer_HEADER_FILES
     llnamebox.h
     llnameeditor.h
     llnamelistctrl.h
+    llnavigationbar.h
     llnetmap.h
     llnotify.h
+    lloutputmonitorctrl.h
     lloverlaybar.h
     llpanelaudioprefs.h
     llpanelaudiovolume.h
     llpanelavatar.h
+    llpanelavatarrow.h
     llpanelclassified.h
     llpanelcontents.h
-    llpaneldebug.h
     llpaneldirbrowser.h
     llpaneldirclassified.h
     llpaneldirevents.h
@@ -670,7 +658,6 @@ set(viewer_HEADER_FILES
     llpaneldirland.h
     llpaneldirpeople.h
     llpaneldirplaces.h
-    llpaneldirpopular.h
     llpaneldisplay.h
     llpanelevent.h
     llpanelface.h
@@ -685,17 +672,14 @@ set(viewer_HEADER_FILES
     llpanelinventory.h
     llpanelland.h
     llpanellandmedia.h
-    llpanellandobjects.h
-    llpanellandoptions.h
-    llpanelLCD.h
     llpanellogin.h
-    llpanelmorph.h
     llpanelmsgs.h
     llpanelnetwork.h
     llpanelobject.h
     llpanelpermissions.h
     llpanelpick.h
     llpanelplace.h
+    llpanelshower.h
     llpanelskins.h
     llpanelvolume.h
     llpanelweb.h
@@ -722,18 +706,17 @@ set(viewer_HEADER_FILES
     llsavedsettingsglue.h
     llselectmgr.h
     llsky.h
+    llslurl.h
     llspatialpartition.h
     llsprite.h
     llsrv.h
     llstartup.h
-    llstatbar.h
-    llstatgraph.h
     llstatusbar.h
-    llstatview.h
     llstylemap.h
     llsurface.h
     llsurfacepatch.h
     lltable.h
+    llteleporthistory.h
     lltexlayer.h
     lltexturecache.h
     lltexturectrl.h
@@ -758,9 +741,7 @@ set(viewer_HEADER_FILES
     lltoolselect.h
     lltoolselectland.h
     lltoolselectrect.h
-    lltoolview.h
     lltracker.h
-    lltrans.h
     lluiconstants.h
     lluploaddialog.h
     llurl.h
@@ -770,7 +751,6 @@ set(viewer_HEADER_FILES
     llurlwhitelist.h
     lluserauth.h
     llvectorperfoptions.h
-    llvelocitybar.h
     llviewchildren.h
     llviewerassetstorage.h
     llvieweraudio.h
@@ -778,6 +758,7 @@ set(viewer_HEADER_FILES
     llviewercamera.h
     llviewercontrol.h
     llviewerdisplay.h
+    llviewerfloaterreg.h
     llviewergenericmessage.h
     llviewergesture.h
     llviewerimage.h
@@ -935,6 +916,10 @@ if (WINDOWS)
             )        
     endforeach( src_file ${viewer_SOURCE_FILES} )
     list(APPEND viewer_SOURCE_FILES llviewerprecompiledheaders.cpp)
+    # llstartup.cpp needs special symbols for audio libraries, so it resets
+    # COMPILE_FLAGS below.  Make sure it maintains precompiled header settings.
+    set(LLSTARTUP_COMPILE_FLAGS 
+        "${LLSTARTUP_COMPILE_FLAGS} /Yullviewerprecompiledheaders.h")
     
     # Add resource files to the project.
     # viewerRes.rc is the only buildable file, but
@@ -1031,16 +1016,27 @@ endif (WINDOWS)
 
 # Add the xui files. This is handy for searching for xui elements
 # from within the IDE.
-
-file(GLOB viewer_XUI_FILE_GLOB_LIST
-     ${CMAKE_CURRENT_SOURCE_DIR}/skins/default/xui/en-us/*.xml)
-
 set(viewer_XUI_FILES
-    ${CMAKE_CURRENT_SOURCE_DIR}/skins/default/colors.xml
-    ${CMAKE_CURRENT_SOURCE_DIR}/skins/default/colors_base.xml
+    skins/default/colors.xml
+    skins/default/textures/textures.xml
     )
+file(GLOB DEFAULT_XUI_FILE_GLOB_LIST
+     ${CMAKE_CURRENT_SOURCE_DIR}/skins/default/xui/en-us/*.xml)
+list(APPEND viewer_XUI_FILES ${DEFAULT_XUI_FILE_GLOB_LIST})
+
+file(GLOB DEFAULT_WIDGET_FILE_GLOB_LIST
+     ${CMAKE_CURRENT_SOURCE_DIR}/skins/default/xui/en-us/widgets/*.xml)
+list(APPEND viewer_XUI_FILES ${DEFAULT_WIDGET_FILE_GLOB_LIST})
+
+file(GLOB SILVER_XUI_FILE_GLOB_LIST
+     ${CMAKE_CURRENT_SOURCE_DIR}/skins/silver/xui/en-us/*.xml)
+list(APPEND viewer_XUI_FILES ${SILVER_XUI_FILE_GLOB_LIST})
+
+# Cannot append empty lists in CMake, wait until we have files here.
+#file(GLOB SILVER_WIDGET_FILE_GLOB_LIST
+#     ${CMAKE_CURRENT_SOURCE_DIR}/skins/silver/xui/en-us/widgets/*.xml)
+#list(APPEND viewer_XUI_FILES ${SILVER_WIDGET_FILE_GLOB_LIST})
 
-list(APPEND viewer_XUI_FILES ${viewer_XUI_FILE_GLOB_LIST})
 list(SORT viewer_XUI_FILES)
 
 source_group("XUI Files" FILES ${viewer_XUI_FILES})
@@ -1164,7 +1160,7 @@ if (WINDOWS)
     set_target_properties(${VIEWER_BINARY_NAME}
         PROPERTIES
         LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS"
-        LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\""
+        LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
         LINK_FLAGS_RELEASE ${release_flags}
         )
 
diff --git a/indra/newview/app_settings/ignorable_dialogs.xml b/indra/newview/app_settings/ignorable_dialogs.xml
new file mode 100644
index 0000000000..669235af1b
--- /dev/null
+++ b/indra/newview/app_settings/ignorable_dialogs.xml
@@ -0,0 +1,291 @@
+<?xml version="1.0" ?>
+<llsd>
+<map>
+    <key>FirstAppearance</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstAppearance warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstAttach</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstAttach warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstBalanceDecrease</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstBalanceDecrease warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstBalanceIncrease</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstBalanceIncrease warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstBuild</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstBuild warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstDebugMenus</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstDebugMenus warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstFlexible</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstFlexible warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstGoTo</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstGoTo warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstInventory</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstInventory warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstLeftClickNoHit</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstLeftClickNoHit warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstMap</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstMap warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstMedia</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstMedia warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstOverrideKeys</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstOverrideKeys warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstSandbox</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstSandbox warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstSculptedPrim</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstSculptedPrim warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstSit</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstSit warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstStreamingMusic</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstStreamingMusic warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstStreamingVideo</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstStreamingVideo warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstTeleport</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstTeleport warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>FirstVoice</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables FirstVoice warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>AboutDirectX9</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables AboutDirectX9 warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>BrowserLaunch</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables BrowserLaunch warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>DeedObject</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables DeedObject warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+  <key>NewClassified</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables NewClassified warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>QuickTimeInstalled</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables QuickTimeInstalled warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+    <key>ReturnToOwner</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables ReturnToOwner warning dialog</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
+  </map>
+</llsd>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 0081893869..f396226165 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -23,38 +23,6 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>UserChatColor</key>
-        <map>
-        <key>Comment</key>
-            <string>Color of your chat messages</string>
-        <key>Persist</key>
-            <integer>1</integer>
-        <key>Type</key>
-            <string>Color4</string>
-        <key>Value</key>
-            <array>
-                <real>1.0</real>
-                <real>1.0</real>
-                <real>1.0</real>
-                <real>1.0</real>
-            </array>
-        </map>
-    <key>AgentChatColor</key>
-    <map>
-      <key>Comment</key>
-      <string>Color of chat messages from other residents</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Color4</string>
-      <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
-    </map>
     <key>AlertedUnsupportedHardware</key>
     <map>
       <key>Comment</key>
@@ -594,22 +562,6 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>BackgroundChatColor</key>
-    <map>
-      <key>Comment</key>
-      <string>Color of chat bubble background</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Color4</string>
-      <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>0.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
-    </map>
     <key>BackgroundYieldTime</key>
     <map>
       <key>Comment</key>
@@ -621,38 +573,6 @@
       <key>Value</key>
       <integer>40</integer>
     </map>
-    <key>BackwardBtnRect</key>
-    <map>
-      <key>Comment</key>
-      <string />
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>45</integer>
-        <integer>29</integer>
-        <integer>66</integer>
-        <integer>4</integer>
-      </array>
-    </map>
-    <key>BasicHelpRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for help window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>404</integer>
-        <integer>467</integer>
-        <integer>0</integer>
-      </array>
-    </map>
     <key>BeaconAlwaysOn</key>
     <map>
       <key>Comment</key>
@@ -884,6 +804,17 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
+    <key>BuildBtnEnabled</key>
+    <map>
+      <key>Comment</key>
+      <string />
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>BuildFeathering</key>
     <map>
       <key>Comment</key>
@@ -1391,22 +1322,6 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>ChatterboxRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for chatterbox window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>400</integer>
-        <integer>350</integer>
-        <integer>0</integer>
-      </array>
-    </map>
     <key>CheesyBeacon</key>
     <map>
       <key>Comment</key>
@@ -1421,7 +1336,7 @@
     <key>ClientSettingsFile</key>
     <map>
       <key>Comment</key>
-      <string>Persisted client settings file name (per install).</string>
+      <string>Client settings file name (per install).</string>
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
@@ -1497,777 +1412,623 @@
         <string />
       </array>
     </map>
-    <key>ColorPaletteEntry01</key>
+    <key>CompressSnapshotsToDisk</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Compress snapshots saved to disk (Using JPEG 2000)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>0.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
-    </map>
-    <key>ColorPaletteEntry02</key>
+      <integer>0</integer>
+    </map>    
+    <key>ConnectAsGod</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Log in a god if you have god access.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.5</real>
-        <real>0.5</real>
-        <real>0.5</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry03</key>
+    <key>ConnectionPort</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Custom connection port number</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>U32</string>
       <key>Value</key>
-      <array>
-        <real>0.5</real>
-        <real>0.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>13000</integer>
     </map>
-    <key>ColorPaletteEntry04</key>
+    <key>ConnectionPortEnabled</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Use the custom connection port?</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.5</real>
-        <real>0.5</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry05</key>
+    <key>ConsoleBackgroundOpacity</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Opacity of chat console (0.0 = completely transparent, 1.0 = completely opaque)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>0.5</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <real>0.700</real>
     </map>
-    <key>ColorPaletteEntry06</key>
+    <key>ConsoleBufferSize</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Size of chat console history (lines of chat)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>0.5</real>
-        <real>0.5</real>
-        <real>1.0</real>
-      </array>
+      <integer>40</integer>
     </map>
-    <key>ColorPaletteEntry07</key>
+    <key>ConsoleMaxLines</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Max number of lines of chat text visible in console.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>0.0</real>
-        <real>0.5</real>
-        <real>1.0</real>
-      </array>
+      <integer>40</integer>
     </map>
-    <key>ColorPaletteEntry08</key>
+    <key>ContactsTornOff</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Show contacts window separately from Communicate window.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.5</real>
-        <real>0.0</real>
-        <real>0.5</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry09</key>
+    <key>CookiesEnabled</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Accept cookies from Web sites?</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.5</real>
-        <real>0.5</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>1</integer>
     </map>
-    <key>ColorPaletteEntry10</key>
+    <key>CreateToolCopyCenters</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string />
       <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
       <integer>1</integer>
+    </map>
+    <key>CreateToolCopyRotates</key>
+    <map>
+      <key>Comment</key>
+      <string />
+      <key>Persist</key>
+      <integer>0</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>0.25</real>
-        <real>0.25</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry11</key>
+    <key>CreateToolCopySelection</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>0.5</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry12</key>
+    <key>CreateToolKeepSelected</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>After using create tool, keep the create tool active</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>0.25</real>
-        <real>0.5</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry13</key>
+    <key>Cursor3D</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Tread Joystick values as absolute positions (not deltas).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.5</real>
-        <real>0.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>1</integer>
     </map>
-    <key>ColorPaletteEntry14</key>
+    <key>CustomServer</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Specifies IP address or hostname of grid to which you connect</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>String</string>
       <key>Value</key>
-      <array>
-        <real>0.5</real>
-        <real>0.25</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <string />
     </map>
-    <key>ColorPaletteEntry15</key>
+    <key>DebugBeaconLineWidth</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Size of lines for Debug Beacons</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>1</integer>
     </map>
-    <key>ColorPaletteEntry16</key>
+    <key>DebugInventoryFilters</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Turn on debugging display for inventory filtering</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry17</key>
+    <key>DebugPermissions</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Log permissions for selected inventory items</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry18</key>
+    <key>DebugShowColor</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Show color under cursor</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.75</real>
-        <real>0.75</real>
-        <real>0.75</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry19</key>
+    <key>DebugShowRenderInfo</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Show depth buffer contents</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>0.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry20</key>
+  <key>DebugShowRenderMatrices</key>
+  <map>
+    <key>Comment</key>
+    <string>Display values of current view and projection matrices.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>Boolean</string>
+    <key>Value</key>
+    <integer>0</integer>
+  </map>
+  <key>DebugShowTime</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Show depth buffer contents</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ColorPaletteEntry21</key>
+    <key>DebugStatModeFPS</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>1.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry22</key>
+    <key>DebugStatModeBandwidth</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry23</key>
+    <key>DebugStatModePacketLoss</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry24</key>
+    <key>DebugStatMode</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry25</key>
+    <key>DebugStatModeKTrisDrawnFr</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>0.5</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry26</key>
+    <key>DebugStatModeKTrisDrawnSec</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>1.0</real>
-        <real>0.5</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry27</key>
+    <key>DebugStatModeTotalObjs</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>0.5</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry28</key>
+    <key>DebugStatModeNewObjs</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>0.5</real>
-        <real>0.5</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry29</key>
+    <key>DebugStatModeTextureCount</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>0.0</real>
-        <real>0.5</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry30</key>
+    <key>DebugStatModeRawCount</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>0.5</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry31</key>
+    <key>DebugStatModeGLMem</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColorPaletteEntry32</key>
+    <key>DebugStatModeFormattedMem</key>
     <map>
       <key>Comment</key>
-      <string>Color picker palette entry</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ColumnHeaderDropDownDelay</key>
+    <key>DebugStatModeRawMem</key>
     <map>
       <key>Comment</key>
-      <string>Time in seconds of mouse click before column header shows sort options list</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.300000011921</real>
+      <integer>-1</integer>
     </map>
-    <key>CompileOutputRect</key>
+    <key>DebugStatModeBoundMem</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for script Recompile Everything output window</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>400</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
+      <integer>-1</integer>
     </map>
-    <key>ConnectAsGod</key>
+    <key>DebugStatModePacketsIn</key>
     <map>
       <key>Comment</key>
-      <string>Log in a god if you have god access.</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-    <key>ConnectionPort</key>
+    <key>DebugStatModePacketsOut</key>
     <map>
       <key>Comment</key>
-      <string>Custom connection port number</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>U32</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>13000</integer>
+      <integer>-1</integer>
     </map>
-    <key>ConnectionPortEnabled</key>
+    <key>DebugStatModeObjects</key>
     <map>
       <key>Comment</key>
-      <string>Use the custom connection port?</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-    <key>ConsoleBackgroundOpacity</key>
+    <key>DebugStatModeTexture</key>
     <map>
       <key>Comment</key>
-      <string>Opacity of chat console (0.0 = completely transparent, 1.0 = completely opaque)</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.700</real>
+      <integer>-1</integer>
     </map>
-    <key>ConsoleBufferSize</key>
+    <key>DebugStatModeAsset</key>
     <map>
       <key>Comment</key>
-      <string>Size of chat console history (lines of chat)</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>40</integer>
+      <integer>-1</integer>
     </map>
-    <key>ConsoleMaxLines</key>
+    <key>DebugStatModeLayers</key>
     <map>
       <key>Comment</key>
-      <string>Max number of lines of chat text visible in console.</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>40</integer>
+      <integer>-1</integer>
     </map>
-    <key>ContactsTornOff</key>
+    <key>DebugStatModeActualIn</key>
     <map>
       <key>Comment</key>
-      <string>Show contacts window separately from Communicate window.</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-    <key>CookiesEnabled</key>
+    <key>DebugStatModeActualOut</key>
     <map>
       <key>Comment</key>
-      <string>Accept cookies from Web sites?</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>-1</integer>
     </map>
-    <key>CreateToolCopyCenters</key>
+    <key>DebugStatModeVFSPendingOps</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>-1</integer>
     </map>
-    <key>CreateToolCopyRotates</key>
+    <key>DebugStatModeTimeDialation</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-    <key>CreateToolCopySelection</key>
+    <key>DebugStatModeSimFPS</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-    <key>CreateToolKeepSelected</key>
+    <key>DebugStatModePhysicsFPS</key>
     <map>
       <key>Comment</key>
-      <string>After using create tool, keep the create tool active</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-    <key>Cursor3D</key>
+    <key>DebugStatModePinnedObjects</key>
     <map>
       <key>Comment</key>
-      <string>Tread Joystick values as absolute positions (not deltas).</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>-1</integer>
     </map>
-    <key>CustomServer</key>
+    <key>DebugStatModeLowLODObjects</key>
     <map>
       <key>Comment</key>
-      <string>Specifies IP address or hostname of grid to which you connect</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string />
+      <integer>-1</integer>
     </map>
-    <key>DebugBeaconLineWidth</key>
+    <key>DebugStatModeMemoryAllocated</key>
     <map>
       <key>Comment</key>
-      <string>Size of lines for Debug Beacons</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>-1</integer>
     </map>
-    <key>DebugInventoryFilters</key>
+    <key>DebugStatModeAgentUpdatesSec</key>
     <map>
       <key>Comment</key>
-      <string>Turn on debugging display for inventory filtering</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-    <key>DebugPermissions</key>
+    <key>DebugStatModeMainAgents</key>
     <map>
       <key>Comment</key>
-      <string>Log permissions for selected inventory items</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-    <key>DebugShowColor</key>
+    <key>DebugStatModeChildAgents</key>
     <map>
       <key>Comment</key>
-      <string>Show color under cursor</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-    <key>DebugShowRenderInfo</key>
+    <key>DebugStatModeSimObjects</key>
     <map>
       <key>Comment</key>
-      <string>Show depth buffer contents</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-  <key>DebugShowRenderMatrices</key>
-  <map>
-    <key>Comment</key>
-    <string>Display values of current view and projection matrices.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Boolean</string>
-    <key>Value</key>
-    <integer>0</integer>
-  </map>
-  <key>DebugShowTime</key>
+    <key>DebugStatModeSimActiveObjects</key>
     <map>
       <key>Comment</key>
-      <string>Show depth buffer contents</string>
+      <string>Mode of stat in Statistics floater</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>-1</integer>
     </map>
-    <key>DebugStatModeFPS</key>
+    <key>DebugStatModeSimActiveScripts</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2278,7 +2039,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeBandwidth</key>
+    <key>DebugStatModeSimScriptEvents</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2289,7 +2050,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModePacketLoss</key>
+    <key>DebugStatModeSimInPPS</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2300,7 +2061,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatMode</key>
+    <key>DebugStatModeSimOutPPS</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2311,7 +2072,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeKTrisDrawnFr</key>
+    <key>DebugStatModeSimPendingDownloads</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2322,7 +2083,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeKTrisDrawnSec</key>
+    <key>SimPendingUploads</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2333,7 +2094,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeTotalObjs</key>
+    <key>DebugStatModeSimTotalUnackedBytes</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2344,7 +2105,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeNewObjs</key>
+    <key>DebugStatModeSimFrameMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2355,7 +2116,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeTextureCount</key>
+    <key>DebugStatModeSimNetMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2366,7 +2127,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeRawCount</key>
+    <key>DebugStatModeSimSimPhysicsMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2377,7 +2138,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeGLMem</key>
+    <key>DebugStatModeSimSimOtherMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2388,7 +2149,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeFormattedMem</key>
+    <key>DebugStatModeSimAgentMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2399,7 +2160,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeRawMem</key>
+    <key>DebugStatModeSimImagesMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2410,7 +2171,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeBoundMem</key>
+    <key>DebugStatModeSimScriptMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2421,7 +2182,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModePacketsIn</key>
+    <key>DebugStatModeSimSpareMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2432,7 +2193,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModePacketsOut</key>
+    <key>DebugStatModeSimSimPhysicsStepMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2443,7 +2204,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeObjects</key>
+    <key>DebugStatModeSimSimPhysicsShapeUpdateMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2454,7 +2215,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeTexture</key>
+    <key>DebugStatModeSimSimPhysicsOtherMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2465,7 +2226,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeAsset</key>
+    <key>DebugStatModeSimSleepMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2476,7 +2237,7 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeLayers</key>
+    <key>DebugStatModeSimPumpIOMsec</key>
     <map>
       <key>Comment</key>
       <string>Mode of stat in Statistics floater</string>
@@ -2487,384 +2248,384 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugStatModeActualIn</key>
+    <key>DebugViews</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Display debugging info for views.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>DebugStatModeActualOut</key>
+    <key>DebugWindowProc</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Log windows messages</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>DebugStatModeVFSPendingOps</key>
+    <key>DefaultObjectTexture</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Texture used as 'Default' in texture picker. (UUID texture reference)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <string>89556747-24cb-43ed-920b-47caed15465f</string>
     </map>
-    <key>DebugStatModeTimeDialation</key>
+    <key>DisableCameraConstraints</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Disable the normal bounds put on the camera by avatar position</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>DebugStatModeSimFPS</key>
+    <key>DisableRendering</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Disable GL rendering and GUI (load testing)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>DebugStatModePhysicsFPS</key>
+    <key>DisableVerticalSync</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Update frames as fast as possible (FALSE = update frames between display scans)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>1</integer>
     </map>
-    <key>DebugStatModePinnedObjects</key>
+    <key>DisplayAvatarAgentTarget</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Show avatar positioning locators (animation debug)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>DebugStatModeLowLODObjects</key>
+    <key>DisplayChat</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Display Latest Chat message on LCD</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>1</integer>
     </map>
-    <key>DebugStatModeMemoryAllocated</key>
+    <key>DisplayDebug</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Display Network Information on LCD</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>1</integer>
     </map>
-    <key>DebugStatModeAgentUpdatesSec</key>
+    <key>DisplayDebugConsole</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Display Console Debug Information on LCD</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>1</integer>
     </map>
-    <key>DebugStatModeMainAgents</key>
+    <key>DisplayIM</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Display Latest IM message on LCD</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>1</integer>
     </map>
-    <key>DebugStatModeChildAgents</key>
+    <key>DisplayLinden</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Display Account Information on LCD</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>1</integer>
     </map>
-    <key>DebugStatModeSimObjects</key>
+    <key>DisplayRegion</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Display Location information on LCD</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>1</integer>
     </map>
-    <key>DebugStatModeSimActiveObjects</key>
+    <key>DisplayTimecode</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Display timecode on screen</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>DebugStatModeSimActiveScripts</key>
+    <key>Disregard128DefaultDrawDistance</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Whether to use the auto default to 128 draw distance</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>1</integer>
     </map>
-    <key>DebugStatModeSimScriptEvents</key>
+    <key>Disregard96DefaultDrawDistance</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Whether to use the auto default to 96 draw distance</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>1</integer>
     </map>
-    <key>DebugStatModeSimInPPS</key>
+    <key>DoubleClickAutoPilot</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Enable double-click auto pilot</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>DebugStatModeSimOutPPS</key>
+    <key>DragAndDropToolTipDelay</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Seconds before displaying tooltip when performing drag and drop operation</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <real>0.10000000149</real>
     </map>
-    <key>DebugStatModeSimPendingDownloads</key>
+    <key>DropShadowButton</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Drop shadow width for buttons (pixels)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>2</integer>
     </map>
-    <key>SimPendingUploads</key>
+    <key>DropShadowFloater</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Drop shadow width for floaters (pixels)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>5</integer>
     </map>
-    <key>DebugStatModeSimTotalUnackedBytes</key>
+    <key>DropShadowSlider</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Drop shadow width for sliders (pixels)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>3</integer>
     </map>
-    <key>DebugStatModeSimFrameMsec</key>
+    <key>DropShadowTooltip</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Drop shadow width for tooltips (pixels)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>4</integer>
     </map>
-    <key>DebugStatModeSimNetMsec</key>
+    <key>DynamicCameraStrength</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Amount camera lags behind avatar motion (0 = none, 30 = avatar velocity)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <real>2.0</real>
     </map>
-    <key>DebugStatModeSimSimPhysicsMsec</key>
+    <key>EditCameraMovement</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>When entering build mode, camera moves up above avatar</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>DebugStatModeSimSimOtherMsec</key>
+    <key>EditLinkedParts</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Select individual parts of linked objects</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>DebugStatModeSimAgentMsec</key>
+    <key>EnableRippleWater</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Whether to use ripple water shader or not</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
-    </map>
-    <key>DebugStatModeSimImagesMsec</key>
-    <map>
-      <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
-      <key>Persist</key>
       <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>-1</integer>
     </map>
-    <key>DebugStatModeSimScriptMsec</key>
+    <key>EnableVoiceChat</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Enable talking to other residents with a microphone</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
-    </map>
-    <key>DebugStatModeSimSpareMsec</key>
-    <map>
-      <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
-      <key>Persist</key>
       <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>-1</integer>
     </map>
-    <key>DebugStatModeSimSimPhysicsStepMsec</key>
+    <key>EnergyFromTop</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>20</integer>
     </map>
-    <key>DebugStatModeSimSimPhysicsShapeUpdateMsec</key>
+    <key>EnergyHeight</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>40</integer>
     </map>
-    <key>DebugStatModeSimSimPhysicsOtherMsec</key>
+    <key>EnergyWidth</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>175</integer>
     </map>
-    <key>DebugStatModeSimSleepMsec</key>
+    <key>EveryoneCopy</key>
+      <map>
+        <key>Comment</key>
+        <string>Everyone can copy the newly created objects</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>Boolean</string>
+        <key>Value</key>
+        <integer>0</integer>
+    </map>
+    <key>FPSLogFrequency</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Seconds between display of FPS in log (0 for never)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <real>60.0</real>
     </map>
-    <key>DebugStatModeSimPumpIOMsec</key>
+    <key>FPSLogFrequency</key>
+        <map>
+        <key>Comment</key>
+            <string>Seconds between display of FPS in log (0 for never)</string>
+        <key>Persist</key>
+            <integer>1</integer>
+        <key>Type</key>
+            <string>F32</string>
+        <key>Value</key>
+            <real>10.0</real>
+        </map>
+    <key>FilterItemsPerFrame</key>
     <map>
       <key>Comment</key>
-      <string>Mode of stat in Statistics floater</string>
+      <string>Maximum number of inventory items to match against search filter every frame (lower to increase framerate while searching, higher to improve search speed)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>500</integer>
     </map>
-    <key>DebugViews</key>
+    <key>FindLandArea</key>
     <map>
       <key>Comment</key>
-      <string>Display debugging info for views.</string>
+      <string>Enables filtering of land search results by area</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -2872,54 +2633,54 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>DebugWindowProc</key>
+    <key>FindLandPrice</key>
     <map>
       <key>Comment</key>
-      <string>Log windows messages</string>
+      <string>Enables filtering of land search results by price</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>DefaultObjectTexture</key>
+    <key>FindLandType</key>
     <map>
       <key>Comment</key>
-      <string>Texture used as 'Default' in texture picker. (UUID texture reference)</string>
+      <string>Controls which type of land you are searching for in Find Land interface ("All", "Auction", "For Sale")</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>89556747-24cb-43ed-920b-47caed15465f</string>
+      <string>All</string>
     </map>
-    <key>DisableCameraConstraints</key>
+    <key>FindPeopleOnline</key>
     <map>
       <key>Comment</key>
-      <string>Disable the normal bounds put on the camera by avatar position</string>
+      <string>Limits people search to only users who are logged on</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>DisableRendering</key>
+    <key>FindPlacesPictures</key>
     <map>
       <key>Comment</key>
-      <string>Disable GL rendering and GUI (load testing)</string>
+      <string>Display only results of find places that have pictures</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>DisableVerticalSync</key>
+    <key>FirstLoginThisInstall</key>
     <map>
       <key>Comment</key>
-      <string>Update frames as fast as possible (FALSE = update frames between display scans)</string>
+      <string>Specifies that you have not successfully logged in since you installed the latest update</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -2927,43 +2688,43 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>DisplayAvatarAgentTarget</key>
+    <key>FirstName</key>
     <map>
       <key>Comment</key>
-      <string>Show avatar positioning locators (animation debug)</string>
+      <string>Login first name</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>0</integer>
+      <string />
     </map>
-    <key>DisplayChat</key>
+    <key>FirstPersonAvatarVisible</key>
     <map>
       <key>Comment</key>
-      <string>Display Latest Chat message on LCD</string>
+      <string>Display avatar and attachments below neck while in mouselook</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>DisplayDebug</key>
+    <key>FirstPersonBtnState</key>
     <map>
       <key>Comment</key>
-      <string>Display Network Information on LCD</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>DisplayDebugConsole</key>
+    <key>FirstRunThisInstall</key>
     <map>
       <key>Comment</key>
-      <string>Display Console Debug Information on LCD</string>
+      <string>Specifies that you have not run the viewer since you installed the latest update</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -2971,21 +2732,21 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>DisplayIM</key>
+    <key>FixedWeather</key>
     <map>
       <key>Comment</key>
-      <string>Display Latest IM message on LCD</string>
+      <string>Weather effects do not change over time</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>DisplayLinden</key>
+    <key>FloaterActiveSpeakersSortAscending</key>
     <map>
       <key>Comment</key>
-      <string>Display Account Information on LCD</string>
+      <string>Whether to sort up or down</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -2993,142 +2754,148 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>DisplayRegion</key>
+    <key>FloaterActiveSpeakersSortColumn</key>
     <map>
       <key>Comment</key>
-      <string>Display Location information on LCD</string>
+      <string>Column name to sort on</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>speaking_status</string>
     </map>
-    <key>DisplayTimecode</key>
+    <key>FloaterMapNorth</key>
     <map>
       <key>Comment</key>
-      <string>Display timecode on screen</string>
+      <string>Floater Map North Label</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>0</integer>
+      <string>N</string>
     </map>
-    <key>Disregard128DefaultDrawDistance</key>
+    <key>FloaterMapNorthEast</key>
     <map>
       <key>Comment</key>
-      <string>Whether to use the auto default to 128 draw distance</string>
+      <string>Floater Map North-East Label</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>NE</string>
     </map>
-    <key>Disregard96DefaultDrawDistance</key>
+    <key>FloaterMapNorthWest</key>
     <map>
       <key>Comment</key>
-      <string>Whether to use the auto default to 96 draw distance</string>
+      <string>Floater Map North-West Label</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>NW</string>
     </map>
-    <key>DoubleClickAutoPilot</key>
+    <key>FloaterMapEast</key>
     <map>
       <key>Comment</key>
-      <string>Enable double-click auto pilot</string>
+      <string>Floater Map East Label</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>0</integer>
+      <string>E</string>
     </map>
-    <key>DragAndDropToolTipDelay</key>
+    <key>FloaterMapWest</key>
     <map>
       <key>Comment</key>
-      <string>Seconds before displaying tooltip when performing drag and drop operation</string>
+      <string>Floater Map West Label</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>String</string>
       <key>Value</key>
-      <real>0.10000000149</real>
+      <string>W</string>
     </map>
-    <key>DropShadowButton</key>
+    <key>FloaterMapSouth</key>
     <map>
       <key>Comment</key>
-      <string>Drop shadow width for buttons (pixels)</string>
+      <string>Floater Map South Label</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>2</integer>
+      <string>S</string>
     </map>
-    <key>DropShadowFloater</key>
+    <key>FloaterMapSouthEast</key>
     <map>
       <key>Comment</key>
-      <string>Drop shadow width for floaters (pixels)</string>
+      <string>Floater Map South-East Label</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>5</integer>
+      <string>SE</string>
     </map>
-    <key>DropShadowSlider</key>
+    <key>FloaterMapSouthWest</key>
     <map>
       <key>Comment</key>
-      <string>Drop shadow width for sliders (pixels)</string>
+      <string>Floater Map South-West Label</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>3</integer>
+      <string>SW</string>
     </map>
-    <key>DropShadowTooltip</key>
+  
+    <key>FloaterStatisticsRect</key>
     <map>
       <key>Comment</key>
-      <string>Drop shadow width for tooltips (pixels)</string>
+      <string>Rectangle for chat history</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Rect</string>
       <key>Value</key>
-      <integer>4</integer>
+      <array>
+        <integer>0</integer>
+        <integer>400</integer>
+        <integer>250</integer>
+        <integer>0</integer>
+      </array>
     </map>
-    <key>DynamicCameraStrength</key>
+    <key>FloaterViewBottom</key>
     <map>
       <key>Comment</key>
-      <string>Amount camera lags behind avatar motion (0 = none, 30 = avatar velocity)</string>
+      <string>[DO NOT MODIFY] Controls layout of floating windows within SL window</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>2.0</real>
+      <integer>-1</integer>
     </map>
-    <key>EditCameraMovement</key>
+    <key>FlyBtnEnabled</key>
     <map>
       <key>Comment</key>
-      <string>When entering build mode, camera moves up above avatar</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>EditLinkedParts</key>
+    <key>FlyBtnState</key>
     <map>
       <key>Comment</key>
-      <string>Select individual parts of linked objects</string>
+      <string />
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
@@ -3136,966 +2903,711 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>EffectColor</key>
+    <key>FlycamAbsolute</key>
     <map>
       <key>Comment</key>
-      <string>Particle effects color</string>
+      <string>Treat Flycam values as absolute positions (not deltas).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>EnableRippleWater</key>
+    <key>FlycamAxisDeadZone0</key>
     <map>
       <key>Comment</key>
-      <string>Whether to use ripple water shader or not</string>
+      <string>Flycam axis 0 dead zone.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>0.1</real>
     </map>
-    <key>EnableVoiceChat</key>
+    <key>FlycamAxisDeadZone1</key>
     <map>
       <key>Comment</key>
-      <string>Enable talking to other residents with a microphone</string>
+      <string>Flycam axis 1 dead zone.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>0.1</real>
     </map>
-    <key>EnergyFromTop</key>
+    <key>FlycamAxisDeadZone2</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Flycam axis 2 dead zone.</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>20</integer>
+      <real>0.1</real>
     </map>
-    <key>EnergyHeight</key>
+    <key>FlycamAxisDeadZone3</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Flycam axis 3 dead zone.</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>40</integer>
+      <real>0.1</real>
     </map>
-    <key>EnergyWidth</key>
+    <key>FlycamAxisDeadZone4</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Flycam axis 4 dead zone.</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>175</integer>
-    </map>
-    <key>EveryoneCopy</key>
-      <map>
-        <key>Comment</key>
-        <string>Everyone can copy the newly created objects</string>
-        <key>Persist</key>
-        <integer>1</integer>
-        <key>Type</key>
-        <string>Boolean</string>
-        <key>Value</key>
-        <integer>0</integer>
+      <real>0.1</real>
     </map>
-    <key>FPSLogFrequency</key>
+    <key>FlycamAxisDeadZone5</key>
     <map>
       <key>Comment</key>
-      <string>Seconds between display of FPS in log (0 for never)</string>
+      <string>Flycam axis 5 dead zone.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>60.0</real>
+      <real>0.1</real>
     </map>
-    <key>FPSLogFrequency</key>
-        <map>
-        <key>Comment</key>
-            <string>Seconds between display of FPS in log (0 for never)</string>
-        <key>Persist</key>
-            <integer>1</integer>
-        <key>Type</key>
-            <string>F32</string>
-        <key>Value</key>
-            <real>10.0</real>
-        </map>
-    <key>FilterItemsPerFrame</key>
+    <key>FlycamAxisDeadZone6</key>
     <map>
       <key>Comment</key>
-      <string>Maximum number of inventory items to match against search filter every frame (lower to increase framerate while searching, higher to improve search speed)</string>
+      <string>Flycam axis 6 dead zone.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>500</integer>
+      <real>0.1</real>
     </map>
-    <key>FindLandArea</key>
+    <key>FlycamAxisScale0</key>
     <map>
       <key>Comment</key>
-      <string>Enables filtering of land search results by area</string>
+      <string>Flycam axis 0 scaler.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>1.0</real>
     </map>
-    <key>FindLandPrice</key>
+    <key>FlycamAxisScale1</key>
     <map>
       <key>Comment</key>
-      <string>Enables filtering of land search results by price</string>
+      <string>Flycam axis 1 scaler.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>1.0</real>
     </map>
-    <key>FindLandType</key>
+    <key>FlycamAxisScale2</key>
     <map>
       <key>Comment</key>
-      <string>Controls which type of land you are searching for in Find Land interface ("All", "Auction", "For Sale")</string>
+      <string>Flycam axis 2 scaler.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>All</string>
+      <real>1.0</real>
     </map>
-    <key>FindPeopleOnline</key>
+    <key>FlycamAxisScale3</key>
     <map>
       <key>Comment</key>
-      <string>Limits people search to only users who are logged on</string>
+      <string>Flycam axis 3 scaler.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>1.0</real>
     </map>
-    <key>FindPlacesPictures</key>
+    <key>FlycamAxisScale4</key>
     <map>
       <key>Comment</key>
-      <string>Display only results of find places that have pictures</string>
+      <string>Flycam axis 4 scaler.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>1.0</real>
     </map>
-    <key>FirstLoginThisInstall</key>
+    <key>FlycamAxisScale5</key>
     <map>
       <key>Comment</key>
-      <string>Specifies that you have not successfully logged in since you installed the latest update</string>
+      <string>Flycam axis 5 scaler.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>1.0</real>
     </map>
-    <key>FirstName</key>
+    <key>FlycamAxisScale6</key>
     <map>
       <key>Comment</key>
-      <string>Login first name</string>
+      <string>Flycam axis 6 scaler.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string />
+      <real>1.0</real>
     </map>
-    <key>FirstPersonAvatarVisible</key>
+    <key>FlycamFeathering</key>
     <map>
       <key>Comment</key>
-      <string>Display avatar and attachments below neck while in mouselook</string>
+      <string>Flycam feathering (less is softer)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>16.0</real>
     </map>
-    <key>FirstPersonBtnState</key>
+    <key>FlycamZoomDirect</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Map flycam zoom axis directly to camera zoom.</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>FirstRunThisInstall</key>
+    <key>FlyingAtExit</key>
     <map>
       <key>Comment</key>
-      <string>Specifies that you have not run the viewer since you installed the latest update</string>
+      <string>Was flying when last logged out, so fly when logging in</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>FixedWeather</key>
+    <key>FocusOffsetDefault</key>
     <map>
       <key>Comment</key>
-      <string>Weather effects do not change over time</string>
+      <string>Default focus point offset relative to avatar (x-axis is forward)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>Vector3</string>
       <key>Value</key>
-      <integer>0</integer>
+      <array>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
     </map>
-    <key>FloaterAboutRect</key>
+    <key>FocusPosOnLogout</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for About window</string>
+      <string>Camera focus point when last logged out (global coordinates)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Vector3D</string>
       <key>Value</key>
       <array>
-        <integer>0</integer>
-        <integer>440</integer>
-        <integer>470</integer>
-        <integer>0</integer>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>0.0</real>
       </array>
     </map>
-    <key>FloaterActiveSpeakersRect</key>
+    <key>FolderAutoOpenDelay</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for active speakers window</string>
+      <string>Seconds before automatically expanding the folder under the mouse when performing inventory drag and drop</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>300</integer>
-        <integer>250</integer>
-        <integer>0</integer>
-      </array>
+      <real>0.75</real>
     </map>
-    <key>FloaterActiveSpeakersSortAscending</key>
+    <key>FolderLoadingMessageWaitTime</key>
     <map>
       <key>Comment</key>
-      <string>Whether to sort up or down</string>
+      <string>Seconds to wait before showing the LOADING... text in folder views</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>0.5</real>
     </map>
-    <key>FloaterActiveSpeakersSortColumn</key>
+    <key>FontMonospace</key>
     <map>
       <key>Comment</key>
-      <string>Column name to sort on</string>
+      <string>Name of monospace font that definitely exists (Truetype file name)</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>speaking_status</string>
+      <string>DejaVuSansMono.ttf</string>
     </map>
-    <key>FloaterAdvancedSkyRect</key>
+    <key>FontSansSerif</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Advanced Sky Editor</string>
+      <string>Name of primary sans-serif font that definitely exists (Truetype file name)</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>String</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>220</integer>
-        <integer>700</integer>
-        <integer>0</integer>
-      </array>
+      <string>MtBkLfRg.ttf</string>
     </map>
-    <key>FloaterAdvancedWaterRect</key>
+    <key>FontSansSerifBundledFallback</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Advanced Water Editor</string>
+      <string>Name of secondary sans-serif font that definitely exists (Truetype file name)</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>String</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>240</integer>
-        <integer>700</integer>
-        <integer>0</integer>
-      </array>
+      <string>DejaVuSansCondensed.ttf</string>
     </map>
-    <key>FloaterAudioVolumeRect</key>
+    <key>FontSansSerifBold</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Audio Volume window</string>
+      <string>Name of bold font (Truetype file name)</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>String</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>440</integer>
-        <integer>470</integer>
-        <integer>0</integer>
-      </array>
+      <string>MtBdLfRg.ttf</string>
     </map>
-    <key>FloaterBeaconsRect</key>
-    <map>
-        <key>Comment</key>
-        <string>Rectangle for beacon and highlight controls</string>
-        <key>Persist</key>
-        <integer>1</integer>
-        <key>Type</key>
-        <string>Rect</string>
-        <key>Value</key>
-        <array>
-            <integer>200</integer>
-            <integer>250</integer>
-            <integer>250</integer>
-            <integer>200</integer>
-    </array>
-  </map>
-    <key>FloaterBuildOptionsRect</key>
+    <key>FontSansSerifFallback</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for build options window.</string>
+      <string>Name of sans-serif font (Truetype file name)</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>String</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>0</integer>
-        <integer>0</integer>
-        <integer>0</integer>
-      </array>
+      <string />
     </map>
-    <key>FloaterBumpRect</key>
+    <key>FontSansSerifFallbackScale</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Bumps/Hits window</string>
+      <string>Scale of fallback font relative to huge font (fraction of huge font size)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>180</integer>
-        <integer>400</integer>
-        <integer>0</integer>
-      </array>
+      <real>1.0</real>
     </map>
-    <key>FloaterBuyContentsRect</key>
+    <key>FontScreenDPI</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Buy Contents window</string>
+      <string>Font resolution, higher is bigger (pixels per inch)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>250</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
+      <real>96.0</real>
     </map>
-    <key>FloaterBuyRect</key>
+    <key>FontSizeHuge</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for buy window</string>
+      <string>Size of huge font (points, or 1/72 of an inch)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>250</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
+      <real>16.0</real>
     </map>
-    <key>FloaterCameraRect3</key>
+    <key>FontSizeLarge</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for camera control window</string>
+      <string>Size of large font (points, or 1/72 of an inch)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>64</integer>
-        <integer>176</integer>
-        <integer>0</integer>
-      </array>
+      <real>12.0</real>
     </map>
-    <key>FloaterChatRect</key>
+    <key>FontSizeMedium</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for chat history</string>
+      <string>Size of medium font (points, or 1/72 of an inch)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>172</integer>
-        <integer>500</integer>
-        <integer>0</integer>
-      </array>
+      <real>10.0</real>
     </map>
-    <key>FloaterClothingRect</key>
+    <key>FontSizeMonospace</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for clothing window</string>
+      <string>Size of monospaced font (points, or 1/72 of an inch)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>480</integer>
-        <integer>320</integer>
-        <integer>0</integer>
-      </array>
+      <real>8.1</real>
     </map>
-    <key>FloaterContactsRect</key>
+    <key>FontSizeSmall</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for chat history</string>
+      <string>Size of small font (points, or 1/72 of an inch)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>390</integer>
-        <integer>395</integer>
-        <integer>0</integer>
-      </array>
+      <real>9.0</real>
     </map>
-    <key>FloaterCustomizeAppearanceRect</key>
+    <key>ForceShowGrid</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for avatar customization window</string>
+      <string>Always show grid dropdown on login screen</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>540</integer>
-        <integer>494</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterDayCycleRect</key>
+    <key>ForceMandatoryUpdate</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Day Cycle Editor</string>
+      <string>For QA: On next startup, forces the auto-updater to run</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>646</integer>
-        <integer>275</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterEnvRect</key>
+    <key>FreezeTime</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Environment Editor</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>150</integer>
-        <integer>600</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterFindRect2</key>
+    <key>FullScreen</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Find window</string>
+      <string>Run SL in fullscreen mode</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>570</integer>
-        <integer>780</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterFriendsRect</key>
+    <key>FullScreenAspectRatio</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for friends window</string>
+      <string>Aspect ratio of fullscreen display (width / height)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>400</integer>
-        <integer>250</integer>
-        <integer>0</integer>
-      </array>
+      <real>1.33329999447</real>
     </map>
-    <key>FloaterGestureRect2</key>
+    <key>FullScreenAutoDetectAspectRatio</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for gestures window</string>
+      <string>Automatically detect proper aspect ratio for fullscreen display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>465</integer>
-        <integer>350</integer>
-        <integer>0</integer>
-      </array>
+      <integer>1</integer>
     </map>
-    <key>FloaterHUDRect2</key>
+    <key>FullScreenHeight</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for HUD Floater window</string>
+      <string>Fullscreen resolution in height</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>S32</string>
       <key>Value</key>
-<!-- NOTE: Height and width must match values in settings.xml for 
-     FloaterHUDRect because this floater is resized to those values
-     in LLViewerWindow initialization. JC -->
-      <array>
-        <integer>0</integer>
-        <integer>292</integer>
-        <integer>362</integer>
-        <integer>0</integer>
-      </array>
+      <integer>768</integer>
     </map>
-    <key>FloaterHtmlRect</key>
+    <key>FullScreenWidth</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for HTML window</string>
+      <string>Fullscreen resolution in width</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <integer>100</integer>
-        <integer>460</integer>
-        <integer>370</integer>
-        <integer>100</integer>
-      </array>
+      <integer>1024</integer>
     </map>
-    <key>FloaterIMRect</key>
+    <key>GridCrossSections</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for IM window</string>
+      <string>Highlight cross sections of prims with grid manipulation plane.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>160</integer>
-        <integer>500</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterInspectRect</key>
+    <key>GridDrawSize</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Object Inspect window</string>
+      <string>Visible extent of 2D snap grid (meters)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>400</integer>
-        <integer>400</integer>
-        <integer>0</integer>
-      </array>
+      <real>12.0</real>
     </map>
-    <key>FloaterInventoryRect</key>
+    <key>GridMode</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for inventory window</string>
+      <string>Snap grid reference frame (0 = world, 1 = local, 2 = reference object)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>400</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterJoystickRect</key>
+    <key>GridOpacity</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for joystick controls window.</string>
+      <string>Grid line opacity (0.0 = completely transparent, 1.0 = completely opaque)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>0</integer>
-        <integer>0</integer>
-        <integer>0</integer>
-      </array>
+      <real>0.699999988079</real>
     </map>
-    <key>FloaterLagMeter</key>
+    <key>GridResolution</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for lag meter</string>
+      <string>Size of single grid step (meters)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>142</integer>
-        <integer>350</integer>
-        <integer>0</integer>
-      </array>
+      <real>0.5</real>
     </map>
-    <key>FloaterLandRect5</key>
+    <key>GridSubUnit</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for About Land window</string>
+      <string>Display fractional grid steps, relative to grid size</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>370</integer>
-        <integer>460</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterLandmarkRect</key>
+    <key>GridSubdivision</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for landmark picker</string>
+      <string>Maximum number of times to divide single snap grid unit when GridSubUnit is true</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>290</integer>
-        <integer>310</integer>
-        <integer>0</integer>
-      </array>
+      <integer>32</integer>
     </map>
-    <key>FloaterMediaRect</key>
+    <key>GroupNotifyBoxHeight</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for media browser window</string>
+      <string>Height of group notice messages</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <integer>16</integer>
-        <integer>650</integer>
-        <integer>600</integer>
-        <integer>128</integer>
-      </array>
+      <integer>260</integer>
     </map>
-    <key>FloaterMiniMapRect</key>
+    <key>GroupNotifyBoxWidth</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for world map</string>
+      <string>Width of group notice messages</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>S32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>225</integer>
-        <integer>200</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>FloaterMoveRect2</key>
+      <integer>400</integer>
+    </map>  
+    <key>HelpHomeURL</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for avatar control window</string>
+      <string>URL of initial help page</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>String</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>58</integer>
-        <integer>135</integer>
-        <integer>0</integer>
-      </array>
+      <string>help/index.html</string>
     </map>
-    <key>FloaterMuteRect3</key>
+    <key>HelpLastVisitedURL</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for mute window</string>
+      <string>URL of last help page, will be shown next time help is accessed</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>String</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>300</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
+      <string>help/index.html</string>
     </map>
-  
-  <key>FloaterObjectIMInfo</key>
-  <map>
-    <key>Comment</key>
-    <string>Rectangle for floater object im info windows</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Rect</string>
-    <key>Value</key>
-    <array>
-      <integer>0</integer>
-      <integer>300</integer>
-      <integer>300</integer>
-      <integer>0</integer>
-    </array>
-  </map>
-  <key>FloaterOpenObjectRect</key>
+    <key>HighResSnapshot</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Open Object window</string>
+      <string>Double resolution of snapshot from current window resolution</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>350</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterPayRectB</key>
+    <key>HtmlHelpLastPage</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for pay window</string>
+      <string>Last URL visited via help system</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>String</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>150</integer>
-        <integer>400</integer>
-        <integer>0</integer>
-      </array>
+      <string />
     </map>
-    <key>FloaterPermPrefsRect</key>
+    <key>IMInChatHistory</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for initial permissions preferences</string>
+      <string>Copy IM into chat history</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>200</integer>
-        <integer>250</integer>
-        <integer>250</integer>
-        <integer>200</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterRegionInfo</key>
+    <key>IMShowTimestamps</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for region info window</string>
+      <string>Show timestamps in IM</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>512</integer>
-        <integer>480</integer>
-        <integer>0</integer>
-      </array>
+      <integer>1</integer>
     </map>
-    <key>FloaterScriptDebugRect</key>
+    <key>IgnorePixelDepth</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for Script Error/Debug window</string>
+      <string>Ignore pixel depth settings.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>130</integer>
-        <integer>450</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterSnapshotRect</key>
+    <key>ImagePipelineUseHTTP</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for snapshot window</string>
+      <string>If TRUE use HTTP GET to fetch textures from the server</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>200</integer>
-        <integer>200</integer>
-        <integer>400</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FloaterStatisticsRect</key>
+    <key>InBandwidth</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for chat history</string>
+      <string>Incoming bandwidth throttle (bps)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>400</integer>
-        <integer>250</integer>
-        <integer>0</integer>
-      </array>
+      <real>0.0</real>
     </map>
-    <key>FloaterViewBottom</key>
+    <key>InstallLanguage</key>
     <map>
       <key>Comment</key>
-      <string>[DO NOT MODIFY] Controls layout of floating windows within SL window</string>
+      <string>Language passed from installer (for UI)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <string>default</string>
     </map>
-    <key>FloaterWorldMapRect2</key>
+    <key>InventoryAutoOpenDelay</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for world map window</string>
+      <string>Seconds before automatically opening inventory when mouse is over inventory button when performing inventory drag and drop</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>0</integer>
-        <integer>0</integer>
-        <integer>0</integer>
-      </array>
+      <real>1.0</real>
     </map>
-    <key>FlyBtnState</key>
+    <key>InventorySortOrder</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Specifies sort key for inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>U32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>7</integer>
     </map>
-    <key>FlycamAbsolute</key>
+    <key>InvertMouse</key>
     <map>
       <key>Comment</key>
-      <string>Treat Flycam values as absolute positions (not deltas).</string>
+      <string>When in mouselook, moving mouse up looks down and vice verse (FALSE = moving up looks up)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -4103,485 +3615,484 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>FlycamAxisDeadZone0</key>
+    <key>JoystickAvatarEnabled</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 0 dead zone.</string>
+      <string>Enables the Joystick to control Avatar movement.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>0.1</real>
+      <integer>1</integer>
     </map>
-    <key>FlycamAxisDeadZone1</key>
+    <key>JoystickAxis0</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 1 dead zone.</string>
+      <string>Flycam hardware axis mapping for internal axis 0 ([0, 5]).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.1</real>
+      <integer>1</integer>
     </map>
-    <key>FlycamAxisDeadZone2</key>
+    <key>JoystickAxis1</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 2 dead zone.</string>
+      <string>Flycam hardware axis mapping for internal axis 1 ([0, 5]).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.1</real>
+      <integer>0</integer>
     </map>
-    <key>FlycamAxisDeadZone3</key>
+    <key>JoystickAxis2</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 3 dead zone.</string>
+      <string>Flycam hardware axis mapping for internal axis 2 ([0, 5]).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.1</real>
+      <integer>2</integer>
     </map>
-    <key>FlycamAxisDeadZone4</key>
+    <key>JoystickAxis3</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 4 dead zone.</string>
+      <string>Flycam hardware axis mapping for internal axis 3 ([0, 5]).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.1</real>
+      <integer>4</integer>
     </map>
-    <key>FlycamAxisDeadZone5</key>
+    <key>JoystickAxis4</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 5 dead zone.</string>
+      <string>Flycam hardware axis mapping for internal axis 4 ([0, 5]).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.1</real>
+      <integer>3</integer>
     </map>
-    <key>FlycamAxisDeadZone6</key>
+    <key>JoystickAxis5</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 6 dead zone.</string>
+      <string>Flycam hardware axis mapping for internal axis 5 ([0, 5]).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.1</real>
+      <integer>5</integer>
     </map>
-    <key>FlycamAxisScale0</key>
+    <key>JoystickAxis6</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 0 scaler.</string>
+      <string>Flycam hardware axis mapping for internal axis 6 ([0, 5]).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>1.0</real>
+      <integer>-1</integer>
     </map>
-    <key>FlycamAxisScale1</key>
+    <key>JoystickBuildEnabled</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 1 scaler.</string>
+      <string>Enables the Joystick to move edited objects.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>1.0</real>
+      <integer>0</integer>
     </map>
-    <key>FlycamAxisScale2</key>
+    <key>JoystickEnabled</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 2 scaler.</string>
+      <string>Enables Joystick Input.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>1.0</real>
+      <integer>0</integer>
     </map>
-    <key>FlycamAxisScale3</key>
+    <key>JoystickFlycamEnabled</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 3 scaler.</string>
+      <string>Enables the Joystick to control the flycam.</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>1.0</real>
+      <integer>1</integer>
     </map>
-    <key>FlycamAxisScale4</key>
+    <key>JoystickInitialized</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 4 scaler.</string>
+      <string>Whether or not a joystick has been detected and initiailized.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>String</string>
       <key>Value</key>
-      <real>1.0</real>
+      <string />
     </map>
-    <key>FlycamAxisScale5</key>
+    <key>JoystickRunThreshold</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 5 scaler.</string>
+        <string>Input threshold to initiate running</string>
       <key>Persist</key>
-      <integer>1</integer>
+        <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+        <string>F32</string>
       <key>Value</key>
-      <real>1.0</real>
-    </map>
-    <key>FlycamAxisScale6</key>
+        <real>0.25</real>
+      </map>
+    <key>KeepAspectForSnapshot</key>
     <map>
       <key>Comment</key>
-      <string>Flycam axis 6 scaler.</string>
+      <string>Use full window when taking snapshot, regardless of requested image size</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>1.0</real>
+      <integer>1</integer>
     </map>
-    <key>FlycamFeathering</key>
+    <key>LandBrushSize</key>
     <map>
       <key>Comment</key>
-      <string>Flycam feathering (less is softer)</string>
+        <string>Size of affected region when using teraform tool</string>
       <key>Persist</key>
-      <integer>1</integer>
+        <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+        <string>F32</string>
       <key>Value</key>
-      <real>16.0</real>
+        <real>2.0</real>
     </map>
-    <key>FlycamZoomDirect</key>
+    <key>LCDDestination</key>
     <map>
       <key>Comment</key>
-      <string>Map flycam zoom axis directly to camera zoom.</string>
+      <string>Which LCD to use</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>FlyingAtExit</key>
+    <key>LSLFindCaseInsensitivity</key>
+        <map>
+        <key>Comment</key>
+            <string>Use case insensitivity when searching in LSL editor</string>
+        <key>Persist</key>
+            <integer>1</integer>
+        <key>Type</key>
+            <string>Boolean</string>
+        <key>Value</key>
+            <integer>0</integer>
+        </map>
+    <key>LSLHelpURL</key>
     <map>
       <key>Comment</key>
-      <string>Was flying when last logged out, so fly when logging in</string>
+      <string>URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>0</integer>
+      <string>http://wiki.secondlife.com/wiki/[LSL_STRING]</string>
     </map>
-    <key>FocusOffsetDefault</key>
+    <key>LagMeterShrunk</key>
     <map>
       <key>Comment</key>
-      <string>Default focus point offset relative to avatar (x-axis is forward)</string>
+      <string>Last large/small state for lag meter</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Vector3</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>FocusPosOnLogout</key>
+    <key>Language</key>
     <map>
       <key>Comment</key>
-      <string>Camera focus point when last logged out (global coordinates)</string>
+      <string>Language specifier (for UI)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Vector3D</string>
+      <string>String</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>0.0</real>
-        <real>0.0</real>
-      </array>
+      <string>default</string>
     </map>
-    <key>FolderAutoOpenDelay</key>
+    <key>LanguageIsPublic</key>
+        <map>
+        <key>Comment</key>
+            <string>Let other residents see our language information</string>
+        <key>Persist</key>
+            <integer>1</integer>
+        <key>Type</key>
+            <string>Boolean</string>
+        <key>Value</key>
+            <integer>1</integer>
+        </map>
+    <key>LastFeatureVersion</key>
     <map>
       <key>Comment</key>
-      <string>Seconds before automatically expanding the folder under the mouse when performing inventory drag and drop</string>
+      <string>[DO NOT MODIFY] Version number for tracking hardware changes</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.75</real>
+      <integer>0</integer>
     </map>
-    <key>FolderLoadingMessageWaitTime</key>
+    <key>LastFindPanel</key>
     <map>
       <key>Comment</key>
-      <string>Seconds to wait before showing the LOADING... text in folder views</string>
+      <string>Controls which find operation appears by default when clicking "Find" button </string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>String</string>
       <key>Value</key>
-      <real>0.5</real>
+      <string>find_all_panel</string>
     </map>
-    <key>FontMonospace</key>
+    <key>LastName</key>
     <map>
       <key>Comment</key>
-      <string>Name of monospace font that definitely exists (Truetype file name)</string>
+      <string>Login last name</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>DejaVuSansMono.ttf</string>
+      <string />
     </map>
-    <key>FontSansSerif</key>
+    <key>LastPrefTab</key>
     <map>
       <key>Comment</key>
-      <string>Name of primary sans-serif font that definitely exists (Truetype file name)</string>
+      <string>Last selected tab in preferences window</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>MtBkLfRg.ttf</string>
+      <integer>0</integer>
     </map>
-    <key>FontSansSerifBundledFallback</key>
+    <key>LastRunVersion</key>
     <map>
       <key>Comment</key>
-      <string>Name of secondary sans-serif font that definitely exists (Truetype file name)</string>
+      <string>Version number of last instance of the viewer that you ran</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>DejaVuSansCondensed.ttf</string>
+      <string>0.0.0</string>
     </map>
-    <key>FontSansSerifBold</key>
+  
+    <key>LastSnapshotToEmailHeight</key>
     <map>
       <key>Comment</key>
-      <string>Name of bold font (Truetype file name)</string>
+      <string>The height of the last email snapshot, in px</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>MtBdLfRg.ttf</string>
+      <integer>768</integer>
     </map>
-    <key>FontSansSerifFallback</key>
+    <key>LastSnapshotToEmailWidth</key>
     <map>
       <key>Comment</key>
-      <string>Name of sans-serif font (Truetype file name)</string>
+      <string>The width of the last email snapshot, in px</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string />
+      <integer>1024</integer>
     </map>
-    <key>FontSansSerifFallbackScale</key>
+    <key>LastSnapshotToDiskHeight</key>
     <map>
       <key>Comment</key>
-      <string>Scale of fallback font relative to huge font (fraction of huge font size)</string>
+      <string>The height of the last disk snapshot, in px</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>1.0</real>
+      <integer>768</integer>
     </map>
-    <key>FontScreenDPI</key>
+    <key>LastSnapshotToDiskWidth</key>
     <map>
       <key>Comment</key>
-      <string>Font resolution, higher is bigger (pixels per inch)</string>
+      <string>The width of the last disk snapshot, in px</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>96.0</real>
+      <integer>1024</integer>
     </map>
-    <key>FontSizeHuge</key>
+    <key>LastSnapshotToInventoryHeight</key>
     <map>
       <key>Comment</key>
-      <string>Size of huge font (points, or 1/72 of an inch)</string>
+      <string>The height of the last texture snapshot, in px</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>16.0</real>
+      <integer>512</integer>
     </map>
-    <key>FontSizeLarge</key>
+    <key>LastSnapshotToInventoryWidth</key>
     <map>
       <key>Comment</key>
-      <string>Size of large font (points, or 1/72 of an inch)</string>
+      <string>The width of the last texture snapshot, in px</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>12.0</real>
+      <integer>512</integer>
     </map>
-    <key>FontSizeMedium</key>
+    <key>LastSnapshotType</key>
     <map>
       <key>Comment</key>
-      <string>Size of medium font (points, or 1/72 of an inch)</string>
+      <string>Select this as next type of snapshot to take (0 = postcard, 1 = texture, 2 = local image)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>10.0</real>
+      <integer>0</integer>
     </map>
-    <key>FontSizeMonospace</key>
+    <key>LeftClickShowMenu</key>
     <map>
       <key>Comment</key>
-      <string>Size of monospaced font (points, or 1/72 of an inch)</string>
+      <string>Left click opens pie menu (FALSE = left click touches or grabs object)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>8.1</real>
+      <integer>0</integer>
     </map>
-    <key>FontSizeSmall</key>
+    <key>LimitDragDistance</key>
     <map>
       <key>Comment</key>
-      <string>Size of small font (points, or 1/72 of an inch)</string>
+      <string>Limit translation of object via translate tool</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>9.0</real>
+      <integer>1</integer>
     </map>
-    <key>ForceShowGrid</key>
+    <key>LimitSelectDistance</key>
     <map>
       <key>Comment</key>
-      <string>Always show grid dropdown on login screen</string>
+      <string>Disallow selection of objects beyond max select distance</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ForceMandatoryUpdate</key>
+    <key>LipSyncAah</key>
     <map>
       <key>Comment</key>
-      <string>For QA: On next startup, forces the auto-updater to run</string>
+      <string>Aah (jaw opening) babble loop</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>0</integer>
+      <string>257998776531013446642343</string>
     </map>
-    <key>ForwardBtnRect</key>
+    <key>LipSyncAahPowerTransfer</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Transfer curve for Voice Interface power to aah lip sync amplitude</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>String</string>
       <key>Value</key>
-      <array>
-        <integer>45</integer>
-        <integer>54</integer>
-        <integer>66</integer>
-        <integer>29</integer>
-      </array>
+      <string>0000123456789</string>
     </map>
-    <key>FreezeTime</key>
+    <key>LipSyncEnabled</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>0 disable lip-sync, 1 enable babble loop</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>FullScreen</key>
+    <key>LipSyncOoh</key>
     <map>
       <key>Comment</key>
-      <string>Run SL in fullscreen mode</string>
+      <string>Ooh (mouth width) babble loop</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>0</integer>
+      <string>1247898743223344444443200000</string>
     </map>
-    <key>FullScreenAspectRatio</key>
+    <key>LipSyncOohAahRate</key>
     <map>
       <key>Comment</key>
-      <string>Aspect ratio of fullscreen display (width / height)</string>
+      <string>Rate to babble Ooh and Aah (/sec)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>1.33329999447</real>
+      <real>24.0</real>
     </map>
-    <key>FullScreenAutoDetectAspectRatio</key>
+    <key>LipSyncOohPowerTransfer</key>
     <map>
       <key>Comment</key>
-      <string>Automatically detect proper aspect ratio for fullscreen display</string>
+      <string>Transfer curve for Voice Interface power to ooh lip sync amplitude</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>0012345566778899</string>
     </map>
-    <key>FullScreenHeight</key>
-    <map>
-      <key>Comment</key>
-      <string>Fullscreen resolution in height</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>768</integer>
-    </map>
-    <key>FullScreenWidth</key>
+    <key>LocalCacheVersion</key>
     <map>
       <key>Comment</key>
-      <string>Fullscreen resolution in width</string>
+      <string>Version number of cache</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>1024</integer>
+      <integer>0</integer>
     </map>
-    <key>GridCrossSections</key>
+    <key>LogMessages</key>
     <map>
       <key>Comment</key>
-      <string>Highlight cross sections of prims with grid manipulation plane.</string>
+      <string>Log network traffic</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -4589,54 +4100,43 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>GridDrawSize</key>
-    <map>
-      <key>Comment</key>
-      <string>Visible extent of 2D snap grid (meters)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>12.0</real>
-    </map>
-    <key>GridMode</key>
+    <key>LoginAsGod</key>
     <map>
       <key>Comment</key>
-      <string>Snap grid reference frame (0 = world, 1 = local, 2 = reference object)</string>
+      <string>Attempt to login with god powers (Linden accounts only)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>GridOpacity</key>
+    <key>LoginLocation</key>
     <map>
       <key>Comment</key>
-      <string>Grid line opacity (0.0 = completely transparent, 1.0 = completely opaque)</string>
+      <string>Login at same location you last logged out</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>String</string>
       <key>Value</key>
-      <real>0.699999988079</real>
+      <string>last</string>
     </map>
-    <key>GridResolution</key>
+    <key>LoginPage</key>
     <map>
       <key>Comment</key>
-      <string>Size of single grid step (meters)</string>
+      <string>Login authentication page.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>String</string>
       <key>Value</key>
-      <real>0.5</real>
+      <string />
     </map>
-    <key>GridSubUnit</key>
+    <key>LosslessJ2CUpload</key>
     <map>
       <key>Comment</key>
-      <string>Display fractional grid steps, relative to grid size</string>
+      <string>Use lossless compression for small image uploads</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -4644,108 +4144,98 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>GridSubdivision</key>
+    <key>MainloopTimeoutDefault</key>
     <map>
       <key>Comment</key>
-      <string>Maximum number of times to divide single snap grid unit when GridSubUnit is true</string>
+      <string>Timeout duration for mainloop lock detection, in seconds.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>32</integer>
+      <real>20.0</real>
     </map>
-    <key>GroupNotifyBoxHeight</key>
+    <key>MapOverlayIndex</key>
     <map>
       <key>Comment</key>
-      <string>Height of group notice messages</string>
+      <string>Currently selected world map type</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>260</integer>
+      <integer>0</integer>
     </map>
-    <key>GroupNotifyBoxWidth</key>
+    <key>MapScale</key>
     <map>
       <key>Comment</key>
-      <string>Width of group notice messages</string>
+      <string>World map zoom level (pixels per region)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>400</integer>
+      <real>128.0</real>
     </map>
-    <key>HTMLLinkColor</key>
+    <key>MapShowEvents</key>
     <map>
       <key>Comment</key>
-      <string>Color of hyperlinks</string>
+      <string>Show events on world map</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.600000023842</real>
-        <real>0.600000023842</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>1</integer>
     </map>
-    <key>HelpHomeURL</key>
+    <key>MapShowInfohubs</key>
     <map>
       <key>Comment</key>
-      <string>URL of initial help page</string>
+      <string>Show infohubs on the world map</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>help/index.html</string>
+      <integer>1</integer>
     </map>
-    <key>HelpLastVisitedURL</key>
+    <key>MapShowLandForSale</key>
     <map>
       <key>Comment</key>
-      <string>URL of last help page, will be shown next time help is accessed</string>
+      <string>Show land for sale on world map</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>help/index.html</string>
+      <integer>0</integer>
     </map>
-    <key>HighResSnapshot</key>
+    <key>MapShowPeople</key>
     <map>
       <key>Comment</key>
-      <string>Double resolution of snapshot from current window resolution</string>
+      <string>Show other users on world map</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>HtmlFindRect</key>
+    <key>MapShowTelehubs</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for HTML find window</string>
+      <string>Show telehubs on world map</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>16</integer>
-        <integer>650</integer>
-        <integer>600</integer>
-        <integer>128</integer>
-      </array>
+      <integer>1</integer>
     </map>
-    <key>HtmlHelpLastPage</key>
+    <key>Marker</key>
     <map>
       <key>Comment</key>
-      <string>Last URL visited via help system</string>
+      <string>[NOT USED]</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -4753,58 +4243,43 @@
       <key>Value</key>
       <string />
     </map>
-    <key>HtmlHelpRect</key>
+    <key>MaxDragDistance</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for HTML help window</string>
+      <string>Maximum allowed translation distance in a single operation of translate tool (meters from start point)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>16</integer>
-        <integer>650</integer>
-        <integer>600</integer>
-        <integer>128</integer>
-      </array>
+      <real>48.0</real>
     </map>
-    <key>HtmlReleaseMessage</key>
+    <key>MaxSelectDistance</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for HTML Release Message Floater window</string>
+      <string>Maximum allowed selection distance (meters from avatar)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <integer>46</integer>
-        <integer>520</integer>
-        <integer>400</integer>
-        <integer>128</integer>
-      </array>
+      <real>64.0</real>
     </map>
-    <key>IMChatColor</key>
+    <key>MeanCollisionBump</key>
     <map>
       <key>Comment</key>
-      <string>Color of instant messages from other residents</string>
+      <string>You have experienced an abuse of being bumped by an object or avatar</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>IMInChatHistory</key>
+    <key>MeanCollisionPhysical</key>
     <map>
       <key>Comment</key>
-      <string>Copy IM into chat history</string>
+      <string>You have experienced an abuse from a physical object</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -4812,21 +4287,21 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>IMShowTimestamps</key>
+    <key>MeanCollisionPushObject</key>
     <map>
       <key>Comment</key>
-      <string>Show timestamps in IM</string>
+      <string>You have experienced an abuse of being pushed by a scripted object</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>IgnorePixelDepth</key>
+    <key>MeanCollisionScripted</key>
     <map>
       <key>Comment</key>
-      <string>Ignore pixel depth settings.</string>
+      <string>You have experienced an abuse from a scripted object</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -4834,10 +4309,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ImagePipelineUseHTTP</key>
+    <key>MeanCollisionSelected</key>
     <map>
       <key>Comment</key>
-      <string>If TRUE use HTTP GET to fetch textures from the server</string>
+      <string>You have experienced an abuse of being pushed via a selected object</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -4845,153 +4320,164 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>InBandwidth</key>
+    <key>MemoryLogFrequency</key>
+        <map>
+        <key>Comment</key>
+            <string>Seconds between display of Memory in log (0 for never)</string>
+        <key>Persist</key>
+            <integer>1</integer>
+        <key>Type</key>
+            <string>F32</string>
+        <key>Value</key>
+            <real>600.0</real>
+        </map>
+    <key>MenuAccessKeyTime</key>
     <map>
       <key>Comment</key>
-      <string>Incoming bandwidth throttle (bps)</string>
+      <string>Time (seconds) in which the menu key must be tapped to move focus to the menu bar</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>0.0</real>
+      <real>0.25</real>
     </map>
-    <key>InstallLanguage</key>
+    <key>MenuBarHeight</key>
     <map>
       <key>Comment</key>
-      <string>Language passed from installer (for UI)</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>default</string>
+      <integer>18</integer>
     </map>
-    <key>InventoryAutoOpenDelay</key>
+    <key>MenuBarWidth</key>
     <map>
       <key>Comment</key>
-      <string>Seconds before automatically opening inventory when mouse is over inventory button when performing inventory drag and drop</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>1.0</real>
+      <integer>410</integer>
     </map>
-    <key>InventorySortOrder</key>
+    <key>MigrateCacheDirectory</key>
     <map>
       <key>Comment</key>
-      <string>Specifies sort key for inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string>
+      <string>Check for old version of disk cache to migrate to current location</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>U32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>7</integer>
+      <integer>1</integer>
     </map>
-    <key>InvertMouse</key>
+    <key>MiniMapRotate</key>
     <map>
       <key>Comment</key>
-      <string>When in mouselook, moving mouse up looks down and vice verse (FALSE = moving up looks up)</string>
+      <string>Rotate miniature world map to avatar direction</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>JoystickAvatarEnabled</key>
+    <key>MiniMapScale</key>
     <map>
       <key>Comment</key>
-      <string>Enables the Joystick to control Avatar movement.</string>
+      <string>Miniature world map zoom levle (pixels per region)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>128.0</real>
     </map>
-    <key>JoystickAxis0</key>
+    <key>MouseSensitivity</key>
     <map>
       <key>Comment</key>
-      <string>Flycam hardware axis mapping for internal axis 0 ([0, 5]).</string>
+      <string>Controls responsiveness of mouse when in mouselook mode (fraction or multiple of default mouse sensitivity)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>3.0</real>
     </map>
-    <key>JoystickAxis1</key>
+    <key>MouseSmooth</key>
     <map>
       <key>Comment</key>
-      <string>Flycam hardware axis mapping for internal axis 1 ([0, 5]).</string>
+      <string>Smooths out motion of mouse when in mouselook mode.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>JoystickAxis2</key>
+    <key>MouseSun</key>
     <map>
       <key>Comment</key>
-      <string>Flycam hardware axis mapping for internal axis 2 ([0, 5]).</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>2</integer>
+      <integer>0</integer>
     </map>
-    <key>JoystickAxis3</key>
+    <key>MouselookBtnState</key>
     <map>
       <key>Comment</key>
-      <string>Flycam hardware axis mapping for internal axis 3 ([0, 5]).</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>4</integer>
+      <integer>0</integer>
     </map>
-    <key>JoystickAxis4</key>
+    <key>MuteAmbient</key>
     <map>
       <key>Comment</key>
-      <string>Flycam hardware axis mapping for internal axis 4 ([0, 5]).</string>
+      <string>Ambient sound effects, such as wind noise, play at 0 volume</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>3</integer>
+      <integer>0</integer>
     </map>
-    <key>JoystickAxis5</key>
+    <key>MuteAudio</key>
     <map>
       <key>Comment</key>
-      <string>Flycam hardware axis mapping for internal axis 5 ([0, 5]).</string>
+      <string>All audio plays at 0 volume (streaming audio still takes up bandwidth, for example)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>5</integer>
+      <integer>0</integer>
     </map>
-    <key>JoystickAxis6</key>
+    <key>MuteMedia</key>
     <map>
       <key>Comment</key>
-      <string>Flycam hardware axis mapping for internal axis 6 ([0, 5]).</string>
+      <string>Media plays at 0 volume (streaming audio still takes up bandwidth)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>JoystickBuildEnabled</key>
+    <key>MuteMusic</key>
     <map>
       <key>Comment</key>
-      <string>Enables the Joystick to move edited objects.</string>
+      <string>Music plays at 0 volume (streaming audio still takes up bandwidth)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -4999,10 +4485,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>JoystickEnabled</key>
+    <key>MuteSounds</key>
     <map>
       <key>Comment</key>
-      <string>Enables Joystick Input.</string>
+      <string>Sound effects play at 0 volume</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5010,43 +4496,32 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>JoystickFlycamEnabled</key>
+    <key>MuteUI</key>
     <map>
       <key>Comment</key>
-      <string>Enables the Joystick to control the flycam.</string>
+      <string>UI sound effects play at 0 volume</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>JoystickInitialized</key>
+    <key>MuteVoice</key>
     <map>
       <key>Comment</key>
-      <string>Whether or not a joystick has been detected and initiailized.</string>
+      <string>Voice plays at 0 volume (streaming audio still takes up bandwidth)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string />
+      <integer>0</integer>
     </map>
-    <key>JoystickRunThreshold</key>
-    <map>
-      <key>Comment</key>
-        <string>Input threshold to initiate running</string>
-      <key>Persist</key>
-        <integer>1</integer>
-      <key>Type</key>
-        <string>F32</string>
-      <key>Value</key>
-        <real>0.25</real>
-      </map>
-    <key>KeepAspectForSnapshot</key>
+    <key>MuteWhenMinimized</key>
     <map>
       <key>Comment</key>
-      <string>Use full window when taking snapshot, regardless of requested image size</string>
+      <string>Mute audio when SL window is minimized</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5054,247 +4529,219 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>LandBrushSize</key>
+    <key>NearMeRange</key>
     <map>
       <key>Comment</key>
-        <string>Size of affected region when using teraform tool</string>
+      <string>Search radius for nearby avatars</string>
       <key>Persist</key>
-        <integer>1</integer>
+      <integer>1</integer>
       <key>Type</key>
-        <string>F32</string>
+      <string>F32</string>
       <key>Value</key>
-        <real>2.0</real>
+      <integer>20</integer>
     </map>
-    <key>LCDDestination</key>
+    <key>NextOwnerCopy</key>
     <map>
       <key>Comment</key>
-      <string>Which LCD to use</string>
+      <string>Newly created objects can be copied by next owner</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>LSLFindCaseInsensitivity</key>
-        <map>
-        <key>Comment</key>
-            <string>Use case insensitivity when searching in LSL editor</string>
-        <key>Persist</key>
-            <integer>1</integer>
-        <key>Type</key>
-            <string>Boolean</string>
-        <key>Value</key>
-            <integer>0</integer>
-        </map>
-    <key>LSLHelpRect</key>
+    <key>NextOwnerModify</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for LSL help window</string>
+      <string>Newly created objects can be modified by next owner</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>400</integer>
-        <integer>400</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>LSLHelpURL</key>
+    <key>NextOwnerTransfer</key>
     <map>
       <key>Comment</key>
-      <string>URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword</string>
+      <string>Newly created objects can be resold or given away by next owner</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>http://wiki.secondlife.com/wiki/[LSL_STRING]</string>
+      <integer>1</integer>
     </map>
-    <key>LagMeterShrunk</key>
+    <key>NewCacheLocation</key>
     <map>
       <key>Comment</key>
-      <string>Last large/small state for lag meter</string>
+      <string>Change the location of the local disk cache to this</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>0</integer>
+      <string />
     </map>
-    <key>Language</key>
+    <key>NextLoginLocation</key>
     <map>
       <key>Comment</key>
-      <string>Language specifier (for UI)</string>
+      <string>Location to log into by default.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>default</string>
+      <string />
     </map>
-    <key>LanguageIsPublic</key>
-        <map>
-        <key>Comment</key>
-            <string>Let other residents see our language information</string>
-        <key>Persist</key>
-            <integer>1</integer>
-        <key>Type</key>
-            <string>Boolean</string>
-        <key>Value</key>
-            <integer>1</integer>
-        </map>
-    <key>LastFeatureVersion</key>
+    <key>NoAudio</key>
     <map>
       <key>Comment</key>
-      <string>[DO NOT MODIFY] Version number for tracking hardware changes</string>
+      <string>Disable audio playback.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>LastFindPanel</key>
+    <key>NoHardwareProbe</key>
     <map>
       <key>Comment</key>
-      <string>Controls which find operation appears by default when clicking "Find" button </string>
+      <string>Disable hardware probe.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>find_all_panel</string>
+      <integer>0</integer>
     </map>
-    <key>LastName</key>
+    <key>NoInventoryLibrary</key>
     <map>
       <key>Comment</key>
-      <string>Login last name</string>
+      <string>Do not request inventory library.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string />
+      <integer>0</integer>
     </map>
-    <key>LastPrefTab</key>
+    <key>NoPreload</key>
     <map>
       <key>Comment</key>
-      <string>Last selected tab in preferences window</string>
+      <string>Disable sound and image preload.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>LastRunVersion</key>
+    <key>NoVerifySSLCert</key>
     <map>
       <key>Comment</key>
-      <string>Version number of last instance of the viewer that you ran</string>
+      <string>Do not verify SSL peers.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>0.0.0</string>
+      <integer>0</integer>
     </map>
-  
-    <key>LastSnapshotToEmailHeight</key>
+    <key>NotifyBoxHeight</key>
     <map>
       <key>Comment</key>
-      <string>The height of the last email snapshot, in px</string>
+      <string>Height of notification messages</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>768</integer>
+      <integer>200</integer>
     </map>
-    <key>LastSnapshotToEmailWidth</key>
+    <key>NotifyBoxWidth</key>
     <map>
       <key>Comment</key>
-      <string>The width of the last email snapshot, in px</string>
+      <string>Width of notification messages</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>1024</integer>
+      <integer>350</integer>
     </map>
-    <key>LastSnapshotToDiskHeight</key>
+    <key>NotifyMoneyChange</key>
     <map>
       <key>Comment</key>
-      <string>The height of the last disk snapshot, in px</string>
+      <string>Pop up notifications for all L$ transactions</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>768</integer>
+      <integer>1</integer>
     </map>
-    <key>LastSnapshotToDiskWidth</key>
+    <key>NotifyTipDuration</key>
     <map>
       <key>Comment</key>
-      <string>The width of the last disk snapshot, in px</string>
+      <string>Length of time that notification tips stay on screen (seconds)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1024</integer>
+      <real>4.0</real>
     </map>
-    <key>LastSnapshotToInventoryHeight</key>
+    <key>NumSessions</key>
     <map>
       <key>Comment</key>
-      <string>The height of the last texture snapshot, in px</string>
+      <string>Number of successful logins to Second Life</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>512</integer>
+      <integer>0</integer>
     </map>
-    <key>LastSnapshotToInventoryWidth</key>
+    <key>NumpadControl</key>
     <map>
       <key>Comment</key>
-      <string>The width of the last texture snapshot, in px</string>
+      <string>How numpad keys control your avatar. 0 = Like the normal arrow keys, 1 = Numpad moves avatar when numlock is off, 2 = Numpad moves avatar regardless of numlock (use this if you have no numlock)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>512</integer>
+      <integer>0</integer>
     </map>
-    <key>LastSnapshotType</key>
+    <key>OpenDebugStatAdvanced</key>
     <map>
       <key>Comment</key>
-      <string>Select this as next type of snapshot to take (0 = postcard, 1 = texture, 2 = local image)</string>
+      <string>Expand advanced performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>LeftClickShowMenu</key>
+    <key>OpenDebugStatBasic</key>
     <map>
       <key>Comment</key>
-      <string>Left click opens pie menu (FALSE = left click touches or grabs object)</string>
+      <string>Expand basic performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>LimitDragDistance</key>
+    <key>OpenDebugStatNet</key>
     <map>
       <key>Comment</key>
-      <string>Limit translation of object via translate tool</string>
+      <string>Expand network stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5302,10 +4749,10 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>LimitSelectDistance</key>
+    <key>OpenDebugStatRender</key>
     <map>
       <key>Comment</key>
-      <string>Disallow selection of objects beyond max select distance</string>
+      <string>Expand render stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5313,32 +4760,32 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>LipSyncAah</key>
+    <key>OpenDebugStatSim</key>
     <map>
       <key>Comment</key>
-      <string>Aah (jaw opening) babble loop</string>
+      <string>Expand simulator performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>257998776531013446642343</string>
+      <integer>1</integer>
     </map>
-    <key>LipSyncAahPowerTransfer</key>
+    <key>OpenDebugStatTexture</key>
     <map>
       <key>Comment</key>
-      <string>Transfer curve for Voice Interface power to aah lip sync amplitude</string>
+      <string>Expand Texture performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>0000123456789</string>
+      <integer>0</integer>
     </map>
-    <key>LipSyncEnabled</key>
+    <key>OpenDebugStatPhysicsDetails</key>
     <map>
       <key>Comment</key>
-      <string>0 disable lip-sync, 1 enable babble loop</string>
+      <string>Expand Physics Details performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5346,164 +4793,175 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>LipSyncOoh</key>
+    <key>OpenDebugStatSimTime</key>
     <map>
       <key>Comment</key>
-      <string>Ooh (mouth width) babble loop</string>
+      <string>Expand Simulator Time performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>1247898743223344444443200000</string>
+      <integer>0</integer>
     </map>
-    <key>LipSyncOohAahRate</key>
+    <key>OpenDebugStatSimTimeDetails</key>
     <map>
       <key>Comment</key>
-      <string>Rate to babble Ooh and Aah (/sec)</string>
+      <string>Expand Simulator Time Details performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>24.0</real>
+      <integer>0</integer>
     </map>
-    <key>LipSyncOohPowerTransfer</key>
+    <key>OutBandwidth</key>
     <map>
       <key>Comment</key>
-      <string>Transfer curve for Voice Interface power to ooh lip sync amplitude</string>
+      <string>Expand render stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>0012345566778899</string>
+      <integer>1</integer>
     </map>
-    <key>LocalCacheVersion</key>
+    <key>OutBandwidth</key>
     <map>
       <key>Comment</key>
-      <string>Version number of cache</string>
+      <string>Outgoing bandwidth throttle (bps)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>0.0</real>
     </map>
-    <key>LogMessages</key>
+    <key>OverlayTitle</key>
     <map>
       <key>Comment</key>
-      <string>Log network traffic</string>
+      <string>Controls watermark text message displayed on screen when "ShowOverlayTitle" is enabled (one word, underscores become spaces)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
+      <string>Set_via_OverlayTitle_in_settings.xml</string>
+    </map>
+    <key>PTTCurrentlyEnabled</key>
+    <map>
+      <key>Comment</key>
+      <string>Use Push to Talk mode</string>
+      <key>Persist</key>
       <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
     </map>
-    <key>LoginAsGod</key>
+    <key>PacketDropPercentage</key>
     <map>
       <key>Comment</key>
-      <string>Attempt to login with god powers (Linden accounts only)</string>
+      <string>Percentage of packets dropped by the client.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>0.0</real>
     </map>
-    <key>LoginLastLocation</key>
+    <key>ParcelMediaAutoPlayEnable</key>
     <map>
       <key>Comment</key>
-      <string>Login at same location you last logged out</string>
+      <string>Auto play parcel media when available</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>LoginPage</key>
+    <key>PerAccountSettingsFile</key>
     <map>
       <key>Comment</key>
-      <string>Login authentication page.</string>
+      <string>Persisted client settings file name (per user).</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
       <string />
     </map>
-    <key>LosslessJ2CUpload</key>
+    <key>PermissionsCautionEnabled</key>
     <map>
       <key>Comment</key>
-      <string>Use lossless compression for small image uploads</string>
+      <string>When enabled, changes the handling of script permission requests to help avoid accidental granting of certain permissions, such as the debit permission</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>MainloopTimeoutDefault</key>
+    <key>PermissionsCautionNotifyBoxHeight</key>
     <map>
       <key>Comment</key>
-      <string>Timeout duration for mainloop lock detection, in seconds.</string>
+      <string>Height of caution-style notification messages</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>20.0</real>
+      <integer>344</integer>
     </map>
-    <key>MapOverlayIndex</key>
+    <key>PickerContextOpacity</key>
     <map>
       <key>Comment</key>
-      <string>Currently selected world map type</string>
+      <string>Controls overall opacity of context frustrum connecting color and texture pickers with their swatches</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>0.34999999404</real>
     </map>
-    <key>MapScale</key>
+    <key>PicksPerSecondMouseMoving</key>
     <map>
       <key>Comment</key>
-      <string>World map zoom level (pixels per region)</string>
+      <string>How often to perform hover picks while the mouse is moving (picks per second)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>128.0</real>
+      <real>5.0</real>
     </map>
-    <key>MapShowEvents</key>
+    <key>PicksPerSecondMouseStationary</key>
     <map>
       <key>Comment</key>
-      <string>Show events on world map</string>
+      <string>How often to perform hover picks while the mouse is stationary (picks per second)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>0.0</real>
     </map>
-    <key>MapShowInfohubs</key>
+    <key>PieMenuLineWidth</key>
     <map>
       <key>Comment</key>
-      <string>Show infohubs on the world map</string>
+      <string>Width of lines in pie menu display (pixels)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>2.5</real>
     </map>
-    <key>MapShowLandForSale</key>
+    <key>PingInterpolate</key>
     <map>
       <key>Comment</key>
-      <string>Show land for sale on world map</string>
+      <string>Extrapolate object position along velocity vector based on ping delay</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5511,21 +4969,21 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>MapShowPeople</key>
+    <key>PitchFromMousePosition</key>
     <map>
       <key>Comment</key>
-      <string>Show other users on world map</string>
+      <string>Vertical range over which avatar head tracks mouse position (degrees of head rotation from top of window to bottom)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>90.0</real>
     </map>
-    <key>MapShowTelehubs</key>
+    <key>PlayTypingAnim</key>
     <map>
       <key>Comment</key>
-      <string>Show telehubs on world map</string>
+      <string>Your avatar plays the typing animation whenever you type in the chat bar</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5533,43 +4991,43 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>Marker</key>
+    <key>PrecachingDelay</key>
     <map>
       <key>Comment</key>
-      <string>[NOT USED]</string>
+      <string>Delay when logging in to load world before showing it (seconds)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string />
+      <real>6.0</real>
     </map>
-    <key>MaxDragDistance</key>
+	<key>PreferredMaturity</key>
     <map>
       <key>Comment</key>
-      <string>Maximum allowed translation distance in a single operation of translate tool (meters from start point)</string>
+      <string>Setting for the user's preferred maturity level.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>U32</string>
       <key>Value</key>
-      <real>48.0</real>
+	  <integer>13</integer>
     </map>
-    <key>MaxSelectDistance</key>
+    <key>ProbeHardwareOnStartup</key>
     <map>
       <key>Comment</key>
-      <string>Maximum allowed selection distance (meters from avatar)</string>
+      <string>Query current hardware configuration on application startup</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>64.0</real>
+      <integer>1</integer>
     </map>
-    <key>MeanCollisionBump</key>
+    <key>PurgeCacheOnNextStartup</key>
     <map>
       <key>Comment</key>
-      <string>You have experienced an abuse of being bumped by an object or avatar</string>
+      <string>Clear local file cache next time viewer is run</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5577,10 +5035,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>MeanCollisionPhysical</key>
+    <key>PurgeCacheOnStartup</key>
     <map>
       <key>Comment</key>
-      <string>You have experienced an abuse from a physical object</string>
+      <string>Clear local file cache every time viewer is run</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5588,10 +5046,21 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>MeanCollisionPushObject</key>
+    <key>PushToTalkButton</key>
     <map>
       <key>Comment</key>
-      <string>You have experienced an abuse of being pushed by a scripted object</string>
+      <string>Which button or keyboard key is used for push-to-talk</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>String</string>
+      <key>Value</key>
+      <string>MiddleMouse</string>
+    </map>
+    <key>PushToTalkToggle</key>
+    <map>
+      <key>Comment</key>
+      <string>Should the push-to-talk button behave as a toggle</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5599,10 +5068,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>MeanCollisionScripted</key>
+    <key>QAMode</key>
     <map>
       <key>Comment</key>
-      <string>You have experienced an abuse from a scripted object</string>
+      <string>Enable Testing Features.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5610,10 +5079,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>MeanCollisionSelected</key>
+    <key>QuietSnapshotsToDisk</key>
     <map>
       <key>Comment</key>
-      <string>You have experienced an abuse of being pushed via a selected object</string>
+      <string>Take snapshots to disk without playing animation or sound</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5621,65 +5090,65 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>MemoryLogFrequency</key>
-        <map>
-        <key>Comment</key>
-            <string>Seconds between display of Memory in log (0 for never)</string>
-        <key>Persist</key>
-            <integer>1</integer>
-        <key>Type</key>
-            <string>F32</string>
-        <key>Value</key>
-            <real>600.0</real>
-        </map>
-    <key>MenuAccessKeyTime</key>
+    <key>QuitAfterSeconds</key>
     <map>
       <key>Comment</key>
-      <string>Time (seconds) in which the menu key must be tapped to move focus to the menu bar</string>
+      <string>The duration allowed before quitting.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>0.25</real>
+      <real>0.0</real>
     </map>
-    <key>MenuBarHeight</key>
+    <key>RadioLandBrushAction</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Last selected land modification operation (0 = flatten, 1 = raise, 2 = lower, 3 = smooth, 4 = roughen, 5 = revert)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>18</integer>
+      <integer>0</integer>
     </map>
-    <key>MenuBarWidth</key>
+    <key>RadioLandBrushSize</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Size of land modification brush (0 = small, 1 = medium, 2 = large)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>410</integer>
+      <integer>0</integer>
     </map>
-    <key>MigrateCacheDirectory</key>
+    <key>LandBrushForce</key>
+        <map>
+        <key>Comment</key>
+            <string>Multiplier for land modification brush force.</string>
+        <key>Persist</key>
+            <integer>1</integer>
+        <key>Type</key>
+            <string>F32</string>
+        <key>Value</key>
+            <real>1.0</real>
+        </map>
+    <key>RecentItemsSortOrder</key>
     <map>
       <key>Comment</key>
-      <string>Check for old version of disk cache to migrate to current location</string>
+      <string>Specifies sort key for recent inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>U32</string>
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>MiniMapRotate</key>
+    <key>RectangleSelectInclusive</key>
     <map>
       <key>Comment</key>
-      <string>Rotate miniature world map to avatar direction</string>
+      <string>Select objects that have at least one vertex inside selection rectangle</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5687,32 +5156,32 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>MiniMapScale</key>
+    <key>RegionTextureSize</key>
     <map>
       <key>Comment</key>
-      <string>Miniature world map zoom levle (pixels per region)</string>
+      <string>Terrain texture dimensions (power of 2)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>U32</string>
       <key>Value</key>
-      <real>128.0</real>
+      <integer>256</integer>
     </map>
-    <key>MouseSensitivity</key>
+    <key>RememberPassword</key>
     <map>
       <key>Comment</key>
-      <string>Controls responsiveness of mouse when in mouselook mode (fraction or multiple of default mouse sensitivity)</string>
+      <string>Keep password (in encrypted form) for next login</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>3.0</real>
+      <integer>1</integer>
     </map>
-    <key>MouseSmooth</key>
+    <key>RenderAnisotropic</key>
     <map>
       <key>Comment</key>
-      <string>Smooths out motion of mouse when in mouselook mode.</string>
+      <string>Render textures using anisotropic filtering</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5720,141 +5189,98 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>MouseSun</key>
+    <key>RenderAppleUseMultGL</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Whether we want to use multi-threaded OpenGL on Apple hardware (requires restart of SL).</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>MouselookBtnState</key>
+    <key>RenderAttachedLights</key>
+        <map>
+        <key>Comment</key>
+            <string>Render lighted prims that are attached to avatars</string>
+        <key>Persist</key>
+            <integer>1</integer>
+        <key>Type</key>
+            <string>Boolean</string>
+        <key>Value</key>
+            <integer>1</integer>
+        </map>
+    <key>RenderAttachedParticles</key>
+        <map>
+        <key>Comment</key>
+            <string>Render particle systems that are attached to avatars</string>
+        <key>Persist</key>
+            <integer>1</integer>
+        <key>Type</key>
+            <string>Boolean</string>
+        <key>Value</key>
+            <integer>1</integer>
+        </map>
+  <key>RenderAvatar</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Render Avatars</string>
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>MoveDownBtnRect</key>
-    <map>
-      <key>Comment</key>
-      <string />
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>91</integer>
-        <integer>29</integer>
-        <integer>116</integer>
-        <integer>4</integer>
-      </array>
-    </map>
-    <key>MoveUpBtnRect</key>
-    <map>
-      <key>Comment</key>
-      <string />
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>91</integer>
-        <integer>54</integer>
-        <integer>116</integer>
-        <integer>29</integer>
-      </array>
-    </map>
-    <key>MuteAmbient</key>
-    <map>
-      <key>Comment</key>
-      <string>Ambient sound effects, such as wind noise, play at 0 volume</string>
-      <key>Persist</key>
       <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
     </map>
-    <key>MuteAudio</key>
+  <key>RenderAvatarCloth</key>
     <map>
       <key>Comment</key>
-      <string>All audio plays at 0 volume (streaming audio still takes up bandwidth, for example)</string>
+      <string>Controls if avatars use wavy cloth</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>MuteMedia</key>
-    <map>
-      <key>Comment</key>
-      <string>Media plays at 0 volume (streaming audio still takes up bandwidth)</string>
-      <key>Persist</key>
       <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
     </map>
-    <key>MuteMusic</key>
+    <key>RenderAvatarLODFactor</key>
     <map>
       <key>Comment</key>
-      <string>Music plays at 0 volume (streaming audio still takes up bandwidth)</string>
+      <string>Controls level of detail of avatars (multiplier for current screen area when calculated level of detail)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>0.5</real>
     </map>
-    <key>MuteSounds</key>
+    <key>RenderAvatarMaxVisible</key>
     <map>
       <key>Comment</key>
-      <string>Sound effects play at 0 volume</string>
+      <string>Maximum number of avatars to display at any one time</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>35</integer>
     </map>
-    <key>MuteUI</key>
+    <key>RenderAvatarInvisible</key>
     <map>
       <key>Comment</key>
-      <string>UI sound effects play at 0 volume</string>
+      <string>Set your avatar as Invisible</string>
       <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
       <integer>0</integer>
-    </map>
-    <key>MuteVoice</key>
-    <map>
-      <key>Comment</key>
-      <string>Voice plays at 0 volume (streaming audio still takes up bandwidth)</string>
-      <key>Persist</key>
-      <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>MuteWhenMinimized</key>
+    <key>RenderAvatarVP</key>
     <map>
       <key>Comment</key>
-      <string>Mute audio when SL window is minimized</string>
+      <string>Use vertex programs to perform hardware skinning of avatar</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5862,32 +5288,138 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>NearMeRange</key>
+
+  <key>RenderShadowGaussian</key>
+  <map>
+    <key>Comment</key>
+    <string>Gaussian coefficients for the two shadow/SSAO blurring passes (z component unused).</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>Vector3</string>
+    <key>Value</key>
+    <array>
+      <real>2.0</real>
+      <real>2.0</real>
+      <real>0.0</real>
+    </array>
+  </map>
+
+  <key>RenderShadowNearDist</key>
+  <map>
+    <key>Comment</key>
+    <string>Near clip plane of shadow camera (affects precision of depth shadows).</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>Vector3</string>
+    <key>Value</key>
+    <array>
+      <real>256</real>
+      <real>256</real>
+      <real>256</real>
+    </array>
+  </map>
+  <key>RenderShadowClipPlanes</key>
+  <map>
+    <key>Comment</key>
+    <string>Near clip plane split distances for shadow map frusta.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>Vector3</string>
+    <key>Value</key>
+    <array>
+      <real>4.0</real>
+      <real>8.0</real>
+      <real>24.0</real>
+    </array>
+  </map>
+  <key>RenderSSAOScale</key>
+  <map>
+    <key>Comment</key>
+    <string>Scaling factor for the area to sample for occluders (pixels at 1 meter away, inversely varying with distance)</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>F32</string>
+    <key>Value</key>
+    <real>500.0</real>
+  </map>
+  <key>RenderSSAOMaxScale</key>
+  <map>
+    <key>Comment</key>
+    <string>Maximum screen radius for sampling (pixels)</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>U32</string>
+    <key>Value</key>
+    <integer>60</integer>
+  </map>
+  <key>RenderSSAOFactor</key>
+  <map>
+    <key>Comment</key>
+    <string>Occlusion sensitivity factor for ambient occlusion (larger is more)</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>F32</string>
+    <key>Value</key>
+    <real>0.30</real>
+  </map>
+  <key>RenderSSAOEffect</key>
+  <map>
+    <key>Comment</key>
+    <string>Multiplier for (1) value and (2) saturation (HSV definition), for areas which are totally occluded.  Blends with original color for partly-occluded areas.  (Third component is unused.)</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>Vector3</string>
+    <key>Value</key>
+    <array>
+      <real>0.40</real>
+      <real>1.00</real>
+      <real>0.00</real>
+    </array>
+  </map>
+  <key>RenderBumpmapMinDistanceSquared</key>
     <map>
       <key>Comment</key>
-      <string>Search radius for nearby avatars</string>
+      <string>Maximum distance at which to render bumpmapped primitives (distance in meters, squared)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <integer>20</integer>
+      <real>100.0</real>
     </map>
-    <key>NextOwnerCopy</key>
+  <key>RenderNormalMapScale</key>
+  <map>
+    <key>Comment</key>
+    <string>Scaler applied to height map when generating normal maps</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>F32</string>
+    <key>Value</key>
+    <real>128</real>
+  </map>
+    <key>RenderCubeMap</key>
     <map>
       <key>Comment</key>
-      <string>Newly created objects can be copied by next owner</string>
+      <string>Whether we can render the cube map or not</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>NextOwnerModify</key>
+    <key>RenderCustomSettings</key>
     <map>
       <key>Comment</key>
-      <string>Newly created objects can be modified by next owner</string>
+      <string>Do you want to set the graphics settings yourself</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -5895,1905 +5427,165 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>NextOwnerTransfer</key>
+    <key>RenderDebugGL</key>
     <map>
       <key>Comment</key>
-      <string>Newly created objects can be resold or given away by next owner</string>
+      <string>Enable strict GL debugging.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>NewCacheLocation</key>
+    <key>RenderDebugPipeline</key>
     <map>
       <key>Comment</key>
-      <string>Change the location of the local disk cache to this</string>
+      <string>Enable strict pipeline debugging.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string> 
       <key>Value</key>
-      <string />
+      <integer>0</integer>
     </map>
-    <key>NextLoginLocation</key>
+    <key>RenderDebugTextureBind</key>
     <map>
       <key>Comment</key>
-      <string>Location to log into by default.</string>
+      <string>Enable texture bind performance test.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string />
+      <integer>0</integer>
     </map>
-    <key>NoAudio</key>
-    <map>
-      <key>Comment</key>
-      <string>Disable audio playback.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>NoHardwareProbe</key>
-    <map>
-      <key>Comment</key>
-      <string>Disable hardware probe.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>NoInventoryLibrary</key>
-    <map>
-      <key>Comment</key>
-      <string>Do not request inventory library.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>NoPreload</key>
-    <map>
-      <key>Comment</key>
-      <string>Disable sound and image preload.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>NoVerifySSLCert</key>
-    <map>
-      <key>Comment</key>
-      <string>Do not verify SSL peers.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>NotecardEditorRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for notecard editor</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>400</integer>
-        <integer>400</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>NotifyBoxHeight</key>
-    <map>
-      <key>Comment</key>
-      <string>Height of notification messages</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>200</integer>
-    </map>
-    <key>NotifyBoxWidth</key>
-    <map>
-      <key>Comment</key>
-      <string>Width of notification messages</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>350</integer>
-    </map>
-    <key>NotifyMoneyChange</key>
-    <map>
-      <key>Comment</key>
-      <string>Pop up notifications for all L$ transactions</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>NotifyTipDuration</key>
-    <map>
-      <key>Comment</key>
-      <string>Length of time that notification tips stay on screen (seconds)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>4.0</real>
-    </map>
-    <key>NumSessions</key>
-    <map>
-      <key>Comment</key>
-      <string>Number of successful logins to Second Life</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>NumpadControl</key>
-    <map>
-      <key>Comment</key>
-      <string>How numpad keys control your avatar. 0 = Like the normal arrow keys, 1 = Numpad moves avatar when numlock is off, 2 = Numpad moves avatar regardless of numlock (use this if you have no numlock)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>ObjectChatColor</key>
-    <map>
-      <key>Comment</key>
-      <string>Color of chat messages from objects</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Color4</string>
-      <key>Value</key>
-      <array>
-         <real>0.699999988079</real>
-         <real>0.899999976158</real>
-         <real>0.699999988079</real>
-         <real>1</real>
-      </array>
-    </map>
-    <key>OpenDebugStatAdvanced</key>
-    <map>
-      <key>Comment</key>
-      <string>Expand advanced performance stats display</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>OpenDebugStatBasic</key>
-    <map>
-      <key>Comment</key>
-      <string>Expand basic performance stats display</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>OpenDebugStatNet</key>
-    <map>
-      <key>Comment</key>
-      <string>Expand network stats display</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>OpenDebugStatRender</key>
-    <map>
-      <key>Comment</key>
-      <string>Expand render stats display</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>OpenDebugStatSim</key>
-    <map>
-      <key>Comment</key>
-      <string>Expand simulator performance stats display</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>OpenDebugStatTexture</key>
-    <map>
-      <key>Comment</key>
-      <string>Expand Texture performance stats display</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>OpenDebugStatPhysicsDetails</key>
-    <map>
-      <key>Comment</key>
-      <string>Expand Physics Details performance stats display</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>OpenDebugStatSimTime</key>
-    <map>
-      <key>Comment</key>
-      <string>Expand Simulator Time performance stats display</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>OpenDebugStatSimTimeDetails</key>
-    <map>
-      <key>Comment</key>
-      <string>Expand Simulator Time Details performance stats display</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>OutBandwidth</key>
-    <map>
-      <key>Comment</key>
-      <string>Outgoing bandwidth throttle (bps)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.0</real>
-    </map>
-    <key>OverdrivenColor</key>
-    <map>
-      <key>Comment</key>
-      <string>Color of various indicators when resident is speaking too loud.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Color4</string>
-      <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>0.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
-    </map>
-    <key>OverlayTitle</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls watermark text message displayed on screen when "ShowOverlayTitle" is enabled (one word, underscores become spaces)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string>Set_via_OverlayTitle_in_settings.xml</string>
-    </map>
-    <key>PTTCurrentlyEnabled</key>
-    <map>
-      <key>Comment</key>
-      <string>Use Push to Talk mode</string>
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>PacketDropPercentage</key>
-    <map>
-      <key>Comment</key>
-      <string>Percentage of packets dropped by the client.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.0</real>
-    </map>
-    <key>ParcelMediaAutoPlayEnable</key>
-    <map>
-      <key>Comment</key>
-      <string>Auto play parcel media when available</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>PerAccountSettingsFile</key>
-    <map>
-      <key>Comment</key>
-      <string>Persisted client settings file name (per user).</string>
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string />
-    </map>
-    <key>PermissionsCautionEnabled</key>
-    <map>
-      <key>Comment</key>
-      <string>When enabled, changes the handling of script permission requests to help avoid accidental granting of certain permissions, such as the debit permission</string>
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>PermissionsCautionNotifyBoxHeight</key>
-    <map>
-      <key>Comment</key>
-      <string>Height of caution-style notification messages</string>
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>344</integer>
-    </map>
-    <key>PermissionsManagerRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for permissions manager window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>85</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PickerContextOpacity</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls overall opacity of context frustrum connecting color and texture pickers with their swatches</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.34999999404</real>
-    </map>
-    <key>PicksPerSecondMouseMoving</key>
-    <map>
-      <key>Comment</key>
-      <string>How often to perform hover picks while the mouse is moving (picks per second)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>5.0</real>
-    </map>
-    <key>PicksPerSecondMouseStationary</key>
-    <map>
-      <key>Comment</key>
-      <string>How often to perform hover picks while the mouse is stationary (picks per second)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.0</real>
-    </map>
-    <key>PieMenuLineWidth</key>
-    <map>
-      <key>Comment</key>
-      <string>Width of lines in pie menu display (pixels)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>2.5</real>
-    </map>
-    <key>PinTalkViewOpen</key>
-    <map>
-      <key>Comment</key>
-      <string>Stay in IM after hitting return</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>PingInterpolate</key>
-    <map>
-      <key>Comment</key>
-      <string>Extrapolate object position along velocity vector based on ping delay</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>PitchFromMousePosition</key>
-    <map>
-      <key>Comment</key>
-      <string>Vertical range over which avatar head tracks mouse position (degrees of head rotation from top of window to bottom)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>90.0</real>
-    </map>
-    <key>PlayTypingAnim</key>
-    <map>
-      <key>Comment</key>
-      <string>Your avatar plays the typing animation whenever you type in the chat bar</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>PrecachingDelay</key>
-    <map>
-      <key>Comment</key>
-      <string>Delay when logging in to load world before showing it (seconds)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>6.0</real>
-    </map>
-	<key>PreferredMaturity</key>
-    <map>
-      <key>Comment</key>
-      <string>Setting for the user's preferred maturity level.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>U32</string>
-      <key>Value</key>
-	  <integer>13</integer>
-    </map>
-    <key>PreviewAnimRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for animation preview window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>85</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PreviewClassifiedRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for URL preview window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>530</integer>
-        <integer>420</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PreviewEventRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for Event preview window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>530</integer>
-        <integer>420</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PreviewLandmarkRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for landmark preview window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>90</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PreviewObjectRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for object preview window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>85</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PreviewScriptRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for script preview window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>550</integer>
-        <integer>500</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PreviewSoundRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for sound preview window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>85</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PreviewTextureRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for texture preview window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>400</integer>
-        <integer>400</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PreviewURLRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for URL preview window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>90</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PreviewWearableRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for wearable preview window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>85</integer>
-        <integer>300</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>ProbeHardwareOnStartup</key>
-    <map>
-      <key>Comment</key>
-      <string>Query current hardware configuration on application startup</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>PropertiesRect</key>
-    <map>
-      <key>Comment</key>
-      <string>Rectangle for inventory item properties window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Rect</string>
-      <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>320</integer>
-        <integer>350</integer>
-        <integer>0</integer>
-      </array>
-    </map>
-    <key>PurgeCacheOnNextStartup</key>
-    <map>
-      <key>Comment</key>
-      <string>Clear local file cache next time viewer is run</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>PurgeCacheOnStartup</key>
-    <map>
-      <key>Comment</key>
-      <string>Clear local file cache every time viewer is run</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>PushToTalkButton</key>
-    <map>
-      <key>Comment</key>
-      <string>Which button or keyboard key is used for push-to-talk</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string>MiddleMouse</string>
-    </map>
-    <key>PushToTalkToggle</key>
-    <map>
-      <key>Comment</key>
-      <string>Should the push-to-talk button behave as a toggle</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>QAMode</key>
-    <map>
-      <key>Comment</key>
-      <string>Enable Testing Features.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>QuietSnapshotsToDisk</key>
-    <map>
-      <key>Comment</key>
-      <string>Take snapshots to disk without playing animation or sound</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>QuitAfterSeconds</key>
-    <map>
-      <key>Comment</key>
-      <string>The duration allowed before quitting.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.0</real>
-    </map>
-    <key>RadioLandBrushAction</key>
-    <map>
-      <key>Comment</key>
-      <string>Last selected land modification operation (0 = flatten, 1 = raise, 2 = lower, 3 = smooth, 4 = roughen, 5 = revert)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RadioLandBrushSize</key>
-    <map>
-      <key>Comment</key>
-      <string>Size of land modification brush (0 = small, 1 = medium, 2 = large)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>LandBrushForce</key>
-        <map>
-        <key>Comment</key>
-            <string>Multiplier for land modification brush force.</string>
-        <key>Persist</key>
-            <integer>1</integer>
-        <key>Type</key>
-            <string>F32</string>
-        <key>Value</key>
-            <real>1.0</real>
-        </map>
-    <key>RecentItemsSortOrder</key>
-    <map>
-      <key>Comment</key>
-      <string>Specifies sort key for recent inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>U32</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RectangleSelectInclusive</key>
-    <map>
-      <key>Comment</key>
-      <string>Select objects that have at least one vertex inside selection rectangle</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RegionTextureSize</key>
-    <map>
-      <key>Comment</key>
-      <string>Terrain texture dimensions (power of 2)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>U32</string>
-      <key>Value</key>
-      <integer>256</integer>
-    </map>
-    <key>RememberPassword</key>
-    <map>
-      <key>Comment</key>
-      <string>Keep password (in encrypted form) for next login</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderAnisotropic</key>
-    <map>
-      <key>Comment</key>
-      <string>Render textures using anisotropic filtering</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderAppleUseMultGL</key>
-    <map>
-      <key>Comment</key>
-      <string>Whether we want to use multi-threaded OpenGL on Apple hardware (requires restart of SL).</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderAttachedLights</key>
-        <map>
-        <key>Comment</key>
-            <string>Render lighted prims that are attached to avatars</string>
-        <key>Persist</key>
-            <integer>1</integer>
-        <key>Type</key>
-            <string>Boolean</string>
-        <key>Value</key>
-            <integer>1</integer>
-        </map>
-    <key>RenderAttachedParticles</key>
-        <map>
-        <key>Comment</key>
-            <string>Render particle systems that are attached to avatars</string>
-        <key>Persist</key>
-            <integer>1</integer>
-        <key>Type</key>
-            <string>Boolean</string>
-        <key>Value</key>
-            <integer>1</integer>
-        </map> 
-    <key>RenderAvatarCloth</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls if avatars use wavy cloth</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderAvatarLODFactor</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls level of detail of avatars (multiplier for current screen area when calculated level of detail)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.5</real>
-    </map>
-    <key>RenderAvatarMaxVisible</key>
-    <map>
-      <key>Comment</key>
-      <string>Maximum number of avatars to display at any one time</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>35</integer>
-    </map>
-    <key>RenderAvatarInvisible</key>
-    <map>
-      <key>Comment</key>
-      <string>Set your avatar as Invisible</string>
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderAvatarVP</key>
-    <map>
-      <key>Comment</key>
-      <string>Use vertex programs to perform hardware skinning of avatar</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-
-  <key>RenderShadowGaussian</key>
-  <map>
-    <key>Comment</key>
-    <string>Gaussian coefficients for the two shadow/SSAO blurring passes (z component unused).</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Vector3</string>
-    <key>Value</key>
-    <array>
-      <real>2.0</real>
-      <real>2.0</real>
-      <real>0.0</real>
-    </array>
-  </map>
-
-  <key>RenderShadowNearDist</key>
-  <map>
-    <key>Comment</key>
-    <string>Near clip plane of shadow camera (affects precision of depth shadows).</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Vector3</string>
-    <key>Value</key>
-    <array>
-      <real>256</real>
-      <real>256</real>
-      <real>256</real>
-    </array>
-  </map>
-  <key>RenderShadowClipPlanes</key>
-  <map>
-    <key>Comment</key>
-    <string>Near clip plane split distances for shadow map frusta.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Vector3</string>
-    <key>Value</key>
-    <array>
-      <real>4.0</real>
-      <real>8.0</real>
-      <real>24.0</real>
-    </array>
-  </map>
-  <key>RenderSSAOScale</key>
-  <map>
-    <key>Comment</key>
-    <string>Scaling factor for the area to sample for occluders (pixels at 1 meter away, inversely varying with distance)</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>500.0</real>
-  </map>
-  <key>RenderSSAOMaxScale</key>
-  <map>
-    <key>Comment</key>
-    <string>Maximum screen radius for sampling (pixels)</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>U32</string>
-    <key>Value</key>
-    <integer>60</integer>
-  </map>
-  <key>RenderSSAOFactor</key>
-  <map>
-    <key>Comment</key>
-    <string>Occlusion sensitivity factor for ambient occlusion (larger is more)</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>0.30</real>
-  </map>
-  <key>RenderSSAOEffect</key>
-  <map>
-    <key>Comment</key>
-    <string>Multiplier for (1) value and (2) saturation (HSV definition), for areas which are totally occluded.  Blends with original color for partly-occluded areas.  (Third component is unused.)</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Vector3</string>
-    <key>Value</key>
-    <array>
-      <real>0.40</real>
-      <real>1.00</real>
-      <real>0.00</real>
-    </array>
-  </map>
-  <key>RenderBumpmapMinDistanceSquared</key>
-    <map>
-      <key>Comment</key>
-      <string>Maximum distance at which to render bumpmapped primitives (distance in meters, squared)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>100.0</real>
-    </map>
-  <key>RenderNormalMapScale</key>
-  <map>
-    <key>Comment</key>
-    <string>Scaler applied to height map when generating normal maps</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>128</real>
-  </map>
-    <key>RenderCubeMap</key>
-    <map>
-      <key>Comment</key>
-      <string>Whether we can render the cube map or not</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderCustomSettings</key>
-    <map>
-      <key>Comment</key>
-      <string>Do you want to set the graphics settings yourself</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderDebugGL</key>
-    <map>
-      <key>Comment</key>
-      <string>Enable strict GL debugging.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderDebugPipeline</key>
-    <map>
-      <key>Comment</key>
-      <string>Enable strict pipeline debugging.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string> 
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderDebugTextureBind</key>
-    <map>
-      <key>Comment</key>
-      <string>Enable texture bind performance test.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-  <key>RenderDelayCreation</key>
-  <map>
-    <key>Comment</key>
-    <string>Throttle creation of drawables.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Boolean</string>
-    <key>Value</key>
-    <integer>0</integer>
-  </map>
-  <key>RenderAnimateRes</key>
-  <map>
-    <key>Comment</key>
-    <string>Animate rezing prims.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Boolean</string>
-    <key>Value</key>
-    <integer>0</integer>
-  </map>
-
-  <key>RenderAnimateTrees</key>
-  <map>
-    <key>Comment</key>
-    <string>Use GL matrix ops to animate tree branches.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Boolean</string>
-    <key>Value</key>
-    <integer>0</integer>
-  </map>
-  <key>RenderDeferredAlphaSoften</key>
-  <map>
-    <key>Comment</key>
-    <string>Scalar for softening alpha surfaces (for soft particles).</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>0.75</real>
-  </map>
-  <key>RenderDeferredNoise</key>
-  <map>
-    <key>Comment</key>
-    <string>Noise scalar to hide banding in deferred render.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>4</real>
-  </map>
-  <key>RenderDeferred</key>
-  <map>
-    <key>Comment</key>
-    <string>Use deferred rendering pipeline.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Boolean</string>
-    <key>Value</key>
-    <integer>0</integer>
-  </map>
-  <key>RenderDeferredSunShadow</key>
-  <map>
-    <key>Comment</key>
-    <string>Generate shadows from the sun.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Boolean</string>
-    <key>Value</key>
-    <integer>1</integer>
-  </map>
-  <key>RenderDeferredSunWash</key>
-  <map>
-    <key>Comment</key>
-    <string>Amount local lights are washed out by sun.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>0.5</real>
-  </map>
-  <key>RenderShadowNoise</key>
-  <map>
-    <key>Comment</key>
-    <string>Magnitude of noise on shadow samples.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>-0.0001</real>
-  </map>
-  <key>RenderShadowBlurSize</key>
-  <map>
-    <key>Comment</key>
-    <string>Scale of shadow softening kernel.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>0.7</real>
-  </map>
-  <key>RenderShadowBlurSamples</key>
-  <map>
-    <key>Comment</key>
-    <string>Number of samples to take for each pass of shadow blur (value range 1-16).  Actual number of samples is value * 2 - 1.</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>U32</string>
-    <key>Value</key>
-    <real>5</real>
-  </map>
-  <key>RenderDynamicLOD</key>
-    <map>
-      <key>Comment</key>
-      <string>Dynamically adjust level of detail.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderFSAASamples</key>
-    <map>
-      <key>Comment</key>
-      <string>Number of samples to use for FSAA (0 = no AA).</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>U32</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderFarClip</key>
-    <map>
-      <key>Comment</key>
-      <string>Distance of far clip plane from camera (meters)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>256.0</real>
-    </map>
-    <key>RenderFastAlpha</key>
-    <map>
-      <key>Comment</key>
-      <string>Use lossy alpha rendering optimization (opaque/nonexistent small alpha faces).</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderFastUI</key>
-    <map>
-      <key>Comment</key>
-      <string>[NOT USED]</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderFlexTimeFactor</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls level of detail of flexible objects (multiplier for amount of time spent processing flex objects)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>1.0</real>
-    </map>
-    <key>RenderFogRatio</key>
-    <map>
-      <key>Comment</key>
-      <string>Distance from camera where fog reaches maximum density (fraction or multiple of far clip distance)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>4.0</real>
-    </map>
-    <key>RenderGamma</key>
-    <map>
-      <key>Comment</key>
-      <string>Sets gamma exponent for renderer</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.0</real>
-    </map>
-    <key>RenderGammaFull</key>
-    <map>
-      <key>Comment</key>
-      <string>Use fully controllable gamma correction, instead of faster, hard-coded gamma correction of 2.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <real>1.0</real>
-    </map>
-    <key>RenderGlow</key>
-    <map>
-      <key>Comment</key>
-      <string>Render bloom post effect.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderGlowIterations</key>
-    <map>
-      <key>Comment</key>
-      <string>Number of times to iterate the glow (higher = wider and smoother but slower)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>2</integer>
-    </map>
-    <key>RenderGlowLumWeights</key>
-    <map>
-      <key>Comment</key>
-      <string>Weights for each color channel to be used in calculating luminance (should add up to 1.0)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Vector3</string>
-      <key>Value</key>
-      <array>
-        <real>0.299</real>
-        <real>0.587</real>
-        <real>0.114</real>
-      </array>
-    </map>
-    <key>RenderGlowMaxExtractAlpha</key>
-    <map>
-      <key>Comment</key>
-      <string>Max glow alpha value for brightness extraction to auto-glow.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.065</real>
-    </map>
-    <key>RenderGlowMinLuminance</key>
-    <map>
-      <key>Comment</key>
-      <string>Min luminance intensity necessary to consider an object bright enough to automatically glow.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>2.5</real>
-    </map>
-    <key>RenderGlowResolutionPow</key>
-    <map>
-      <key>Comment</key>
-      <string>Glow map resolution power of two.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>9</integer>
-    </map>
-    <key>RenderGlowStrength</key>
-    <map>
-      <key>Comment</key>
-      <string>Additive strength of glow.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.35</real>
-    </map>
-    <key>RenderGlowWarmthAmount</key>
-    <map>
-      <key>Comment</key>
-      <string>Amount of warmth extraction to use (versus luminance extraction). 0 = lum, 1.0 = warmth</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.0</real>
-    </map>
-    <key>RenderGlowWarmthWeights</key>
-    <map>
-      <key>Comment</key>
-      <string>Weight of each color channel used before finding the max warmth</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Vector3</string>
-      <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>0.5</real>
-        <real>0.7</real>
-      </array>
-    </map>
-    <key>RenderGlowWidth</key>
-    <map>
-      <key>Comment</key>
-      <string>Glow sample size (higher = wider and softer but eventually more pixelated)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>1.3</real>
-    </map>
-    <key>RenderGround</key>
-    <map>
-      <key>Comment</key>
-	  <string>Determines whether we can render the ground pool or not</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderHUDInSnapshot</key>
-    <map>
-      <key>Comment</key>
-      <string>Display HUD attachments in snapshot</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderHiddenSelections</key>
-    <map>
-      <key>Comment</key>
-      <string>Show selection lines on objects that are behind other objects</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderHideGroupTitle</key>
-    <map>
-      <key>Comment</key>
-      <string>Don't show my group title in my name label</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderHideGroupTitleAll</key>
-    <map>
-      <key>Comment</key>
-      <string>Show group titles in name labels</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderInitError</key>
-    <map>
-      <key>Comment</key>
-      <string>Error occured while initializing GL</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderLightRadius</key>
-    <map>
-      <key>Comment</key>
-      <string>Render the radius of selected lights</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderLightingDetail</key>
-    <map>
-      <key>Comment</key>
-      <string>Amount of detail for lighting objects/avatars/terrain (0=sun/moon only, 1=enable local lights)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderMaxPartCount</key>
-    <map>
-      <key>Comment</key>
-      <string>Maximum number of particles to display on screen</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>4096</integer>
-    </map>
-  <key>RenderMaxNodeSize</key>
-  <map>
-    <key>Comment</key>
-    <string>Maximum size of a single node's vertex data (in KB).</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>S32</string>
-    <key>Value</key>
-    <integer>4096</integer>
-  </map>
-    <key>RenderMaxVBOSize</key>
-    <map>
-      <key>Comment</key>
-      <string>Maximum size of a vertex buffer (in KB).</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>512</integer>
-    </map>
-    <key>RenderName</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls display of names above avatars (0 = never, 1 = fade, 2 = always)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>2</integer>
-    </map>
-    <key>RenderNameFadeDuration</key>
-    <map>
-      <key>Comment</key>
-      <string>Time interval over which to fade avatar names (seconds)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>1.0</real>
-    </map>
-    <key>RenderNameHideSelf</key>
-    <map>
-      <key>Comment</key>
-      <string>Don't display own name above avatar</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderNameShowTime</key>
-    <map>
-      <key>Comment</key>
-      <string>Fade avatar names after specified time (seconds)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>10.0</real>
-    </map>
-    <key>RenderObjectBump</key>
-    <map>
-      <key>Comment</key>
-      <string>Show bumpmapping on primitives</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderQualityPerformance</key>
-    <map>
-      <key>Comment</key>
-      <string>Which graphics settings you've chosen</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>U32</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderReflectionDetail</key>
-    <map>
-      <key>Comment</key>
-      <string>Detail of reflection render pass.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>2</integer>
-    </map>
-    <key>RenderReflectionRes</key>
-    <map>
-      <key>Comment</key>
-      <string>Reflection map resolution.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>64</integer>
-    </map>
-    <key>RenderResolutionDivisor</key>
-    <map>
-      <key>Comment</key>
-      <string>Divisor for rendering 3D scene at reduced resolution.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>U32</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderShaderLightingMaxLevel</key>
-    <map>
-      <key>Comment</key>
-      <string>Max lighting level to use in the shader (class 3 is default, 2 is less lights, 1 is sun/moon only.  Works around shader compiler bugs on certain platforms.)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>3</integer>
-    </map>
-    <key>RenderShaderLODThreshold</key>
-    <map>
-      <key>Comment</key>
-      <string>Fraction of draw distance defining the switch to a different shader LOD</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>1.0</real>
-    </map>
-    <key>RenderShaderParticleThreshold</key>
-    <map>
-      <key>Comment</key>
-      <string>Fraction of draw distance to not use shader on particles</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.25</real>
-    </map>
-    <key>RenderSunDynamicRange</key>
-    <map>
-      <key>Comment</key>
-      <string>Defines what percent brighter the sun is than local point lights (1.0 = 100% brighter. Value should not be less than 0. ).</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>1.0</real>
-    </map>
-    <key>RenderTerrainDetail</key>
-    <map>
-      <key>Comment</key>
-      <string>Detail applied to terrain texturing (0 = none, 1 or 2 = full)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>2</integer>
-    </map>
-    <key>RenderTerrainLODFactor</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls level of detail of terrain (multiplier for current screen area when calculated level of detail)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>1.0</real>
-    </map>
-    <key>RenderTerrainScale</key>
-    <map>
-      <key>Comment</key>
-      <string>Terrain detail texture scale</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>12.0</real>
-    </map>
-    <key>RenderTextureMemoryMultiple</key>
-    <map>
-      <key>Comment</key>
-      <string>Multiple of texture memory value to use (should fit: 0 &lt; value &lt;= 1.0)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>1.0</real>
-    </map>
-    <key>RenderTreeLODFactor</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls level of detail of vegetation (multiplier for current screen area when calculated level of detail)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>0.5</real>
-    </map>
-    <key>RenderUIInSnapshot</key>
-    <map>
-      <key>Comment</key>
-      <string>Display user interface in snapshot</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderUnloadedAvatar</key>
-    <map>
-      <key>Comment</key>
-      <string>Show avatars which haven't finished loading</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderUseFBO</key>
-    <map>
-      <key>Comment</key>
-      <string>Whether we want to use GL_EXT_framebuffer_objects.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderUseFarClip</key>
-    <map>
-      <key>Comment</key>
-      <string>If false, frustum culling will ignore far clip plane.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderUseImpostors</key>
-    <map>
-      <key>Comment</key>
-      <string>Whether we want to use impostors for far away avatars.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderUseShaderLOD</key>
-    <map>
-      <key>Comment</key>
-      <string>Whether we want to have different shaders for LOD</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderUseShaderNearParticles</key>
-    <map>
-      <key>Comment</key>
-      <string>Whether we want to use shaders on near particles</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RenderVBOEnable</key>
-    <map>
-      <key>Comment</key>
-      <string>Use GL Vertex Buffer Objects</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderVolumeLODFactor</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls level of detail of primitives (multiplier for current screen area when calculated level of detail)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>1.0</real>
-    </map>
-    <key>RenderWater</key>
-    <map>
-      <key>Comment</key>
-      <string>Display water</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>RenderWaterMipNormal</key>
+  <key>RenderDelayCreation</key>
+  <map>
+    <key>Comment</key>
+    <string>Throttle creation of drawables.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>Boolean</string>
+    <key>Value</key>
+    <integer>0</integer>
+  </map>
+  <key>RenderAnimateRes</key>
+  <map>
+    <key>Comment</key>
+    <string>Animate rezing prims.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>Boolean</string>
+    <key>Value</key>
+    <integer>0</integer>
+  </map>
+
+  <key>RenderAnimateTrees</key>
+  <map>
+    <key>Comment</key>
+    <string>Use GL matrix ops to animate tree branches.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>Boolean</string>
+    <key>Value</key>
+    <integer>0</integer>
+  </map>
+  <key>RenderDeferredAlphaSoften</key>
+  <map>
+    <key>Comment</key>
+    <string>Scalar for softening alpha surfaces (for soft particles).</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>F32</string>
+    <key>Value</key>
+    <real>0.75</real>
+  </map>
+  <key>RenderDeferredNoise</key>
+  <map>
+    <key>Comment</key>
+    <string>Noise scalar to hide banding in deferred render.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>F32</string>
+    <key>Value</key>
+    <real>4</real>
+  </map>
+  <key>RenderDeferred</key>
+  <map>
+    <key>Comment</key>
+    <string>Use deferred rendering pipeline.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>Boolean</string>
+    <key>Value</key>
+    <integer>0</integer>
+  </map>
+  <key>RenderDeferredSunShadow</key>
+  <map>
+    <key>Comment</key>
+    <string>Generate shadows from the sun.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>Boolean</string>
+    <key>Value</key>
+    <integer>1</integer>
+  </map>
+  <key>RenderDeferredSunWash</key>
+  <map>
+    <key>Comment</key>
+    <string>Amount local lights are washed out by sun.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>F32</string>
+    <key>Value</key>
+    <real>0.5</real>
+  </map>
+  <key>RenderShadowNoise</key>
+  <map>
+    <key>Comment</key>
+    <string>Magnitude of noise on shadow samples.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>F32</string>
+    <key>Value</key>
+    <real>-0.0001</real>
+  </map>
+  <key>RenderShadowBlurSize</key>
+  <map>
+    <key>Comment</key>
+    <string>Scale of shadow softening kernel.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>F32</string>
+    <key>Value</key>
+    <real>0.7</real>
+  </map>
+  <key>RenderShadowBlurSamples</key>
+  <map>
+    <key>Comment</key>
+    <string>Number of samples to take for each pass of shadow blur (value range 1-16).  Actual number of samples is value * 2 - 1.</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>U32</string>
+    <key>Value</key>
+    <real>5</real>
+  </map>
+  <key>RenderDynamicLOD</key>
     <map>
       <key>Comment</key>
-      <string>Use mip maps for water normal map.</string>
+      <string>Dynamically adjust level of detail.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -7801,147 +5593,32 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>RenderWaterRefResolution</key>
-    <map>
-      <key>Comment</key>
-      <string>Water planar reflection resolution.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>512</integer>
-    </map>
-    <key>RenderWaterReflections</key>
-    <map>
-      <key>Comment</key>
-      <string>Reflect the environment in the water.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RotateRight</key>
+    <key>RenderFSAASamples</key>
     <map>
       <key>Comment</key>
-      <string>Make the agent rotate to its right.</string>
+      <string>Number of samples to use for FSAA (0 = no AA).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>U32</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>RotationStep</key>
+    <key>RenderFarClip</key>
     <map>
       <key>Comment</key>
-      <string>All rotations via rotation tool are constrained to multiples of this unit (degrees)</string>
+      <string>Distance of far clip plane from camera (meters)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>1.0</real>
-    </map>
-    <key>RunBtnState</key>
-    <map>
-      <key>Comment</key>
-      <string />
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>RunMultipleThreads</key>
-    <map>
-      <key>Comment</key>
-      <string>If TRUE keep background threads active during render</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>SafeMode</key>
-    <map>
-      <key>Comment</key>
-      <string>Reset preferences, run in safe mode.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>SaveMinidump</key>
-    <map>
-      <key>Comment</key>
-      <string>Save minidump for developer debugging on crash</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>ScaleShowAxes</key>
-    <map>
-      <key>Comment</key>
-      <string>Show indicator of selected scale axis when scaling</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>ScaleStretchTextures</key>
-    <map>
-      <key>Comment</key>
-      <string>Stretch textures along with object when scaling</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>ScaleUniform</key>
-    <map>
-      <key>Comment</key>
-      <string>Scale selected objects evenly about center of selection</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>ScriptErrorColor</key>
-    <map>
-      <key>Comment</key>
-      <string>Color of script error messages</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Color4</string>
-      <key>Value</key>
-      <array>
-        <real>0.8235294117</real>
-        <real>0.2745098039</real>
-        <real>0.2745098039</real>
-        <real>1.0</real>
-      </array>
+      <real>256.0</real>
     </map>
-    <key>ScriptErrorsAsChat</key>
+    <key>RenderFastAlpha</key>
     <map>
       <key>Comment</key>
-      <string>Display script errors and warning in chat history</string>
+      <string>Use lossy alpha rendering optimization (opaque/nonexistent small alpha faces).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -7949,10 +5626,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ScriptHelpFollowsCursor</key>
+    <key>RenderFastUI</key>
     <map>
       <key>Comment</key>
-      <string>Scripting help window updates contents based on script editor contents under text cursor</string>
+      <string>[NOT USED]</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -7960,159 +5637,153 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>SearchURLDefault</key>
+    <key>RenderFlexTimeFactor</key>
     <map>
       <key>Comment</key>
-      <string>URL to load for empty searches</string>
+      <string>Controls level of detail of flexible objects (multiplier for amount of time spent processing flex objects)</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>http://search.secondlife.com/client_search.php?</string>
+      <real>1.0</real>
     </map>
-    <key>SearchURLQuery</key>
+    <key>RenderFogRatio</key>
     <map>
       <key>Comment</key>
-      <string>URL to use for searches</string>
+      <string>Distance from camera where fog reaches maximum density (fraction or multiple of far clip distance)</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>http://search.secondlife.com/client_search.php?q=[QUERY]&amp;s=[COLLECTION]&amp;</string>
+      <real>4.0</real>
     </map>
-    <key>SearchURLSuffix2</key>
+    <key>RenderGamma</key>
     <map>
       <key>Comment</key>
-      <string>Parameters added to end of search queries</string>
+      <string>Sets gamma exponent for renderer</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</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>
+      <real>0.0</real>
     </map>
-    <key>SelectMovableOnly</key>
+    <key>RenderGammaFull</key>
     <map>
       <key>Comment</key>
-      <string>Select only objects you can move</string>
+      <string>Use fully controllable gamma correction, instead of faster, hard-coded gamma correction of 2.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>1.0</real>
     </map>
-    <key>SelectOwnedOnly</key>
+    <key>RenderGlow</key>
     <map>
       <key>Comment</key>
-      <string>Select only objects you own</string>
+      <string>Render bloom post effect.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>SelectionHighlightAlpha</key>
+    <key>RenderGlowIterations</key>
     <map>
       <key>Comment</key>
-      <string>Opacity of selection highlight (0.0 = completely transparent, 1.0 = completely opaque)</string>
+      <string>Number of times to iterate the glow (higher = wider and smoother but slower)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.40000000596</real>
+      <integer>2</integer>
     </map>
-    <key>SelectionHighlightAlphaTest</key>
+    <key>RenderGlowMaxExtractAlpha</key>
     <map>
       <key>Comment</key>
-      <string>Alpha value below which pixels are displayed on selection highlight line (0.0 = show all pixels, 1.0 = show now pixels)</string>
+      <string>Max glow alpha value for brightness extraction to auto-glow.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>0.1</real>
+      <real>0.065</real>
     </map>
-    <key>SelectionHighlightThickness</key>
+    <key>RenderGlowMinLuminance</key>
     <map>
       <key>Comment</key>
-      <string>Thickness of selection highlight line (fraction of view distance)</string>
+      <string>Min luminance intensity necessary to consider an object bright enough to automatically glow.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>0.00999999977648</real>
+      <real>2.5</real>
     </map>
-    <key>SelectionHighlightUAnim</key>
+    <key>RenderGlowResolutionPow</key>
     <map>
       <key>Comment</key>
-      <string>Rate at which texture animates along U direction in selection highlight line (fraction of texture per second)</string>
+      <string>Glow map resolution power of two.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>0.0</real>
+      <integer>9</integer>
     </map>
-    <key>SelectionHighlightUScale</key>
+    <key>RenderGlowStrength</key>
     <map>
       <key>Comment</key>
-      <string>Scale of texture display on selection highlight line (fraction of texture size)</string>
+      <string>Additive strength of glow.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>0.1</real>
+      <real>0.35</real>
     </map>
-    <key>SelectionHighlightVAnim</key>
+    <key>RenderGlowWarmthAmount</key>
     <map>
       <key>Comment</key>
-      <string>Rate at which texture animates along V direction in selection highlight line (fraction of texture per second)</string>
+      <string>Amount of warmth extraction to use (versus luminance extraction). 0 = lum, 1.0 = warmth</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>0.5</real>
+      <real>0.0</real>
     </map>
-    <key>SelectionHighlightVScale</key>
+    <key>RenderGlowWidth</key>
     <map>
       <key>Comment</key>
-      <string>Scale of texture display on selection highlight line (fraction of texture size)</string>
+      <string>Glow sample size (higher = wider and softer but eventually more pixelated)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>1.0</real>
+      <real>1.3</real>
     </map>
-    <key>ServerChoice</key>
+    <key>RenderGround</key>
     <map>
       <key>Comment</key>
-      <string>[DO NOT MODIFY] Controls which grid you connect to</string>
+	  <string>Determines whether we can render the ground pool or not</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ShareWithGroup</key>
+    <key>RenderHUDInSnapshot</key>
     <map>
       <key>Comment</key>
-      <string>Newly created objects are shared with the currently active group</string>
+      <string>Display HUD attachments in snapshot</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -8120,21 +5791,21 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowActiveSpeakers</key>
+    <key>RenderHiddenSelections</key>
     <map>
       <key>Comment</key>
-      <string>Display active speakers list on login</string>
+      <string>Show selection lines on objects that are behind other objects</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ShowAllObjectHoverTip</key>
+    <key>RenderHideGroupTitle</key>
     <map>
       <key>Comment</key>
-      <string>Show descriptive tooltip when mouse hovers over non-interactive and interactive objects.</string>
+      <string>Don't show my group title in my name label</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -8142,10 +5813,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowAxes</key>
+    <key>RenderHideGroupTitleAll</key>
     <map>
       <key>Comment</key>
-      <string>Render coordinate frame at your position</string>
+      <string>Show group titles in name labels</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -8153,87 +5824,98 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowBanLines</key>
+    <key>RenderInitError</key>
     <map>
       <key>Comment</key>
-      <string>Show in-world ban/access borders</string>
+      <string>Error occured while initializing GL</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>ShowCameraControls</key>
+    <key>RenderLightRadius</key>
     <map>
       <key>Comment</key>
-      <string>Display camera controls on login</string>
+      <string>Render the radius of selected lights</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>ShowChatHistory</key>
+    <key>RenderLightingDetail</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Amount of detail for lighting objects/avatars/terrain (0=sun/moon only, 1=enable local lights)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ShowCommunicate</key>
+    <key>RenderMaxPartCount</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Maximum number of particles to display on screen</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>4096</integer>
     </map>
-    <key>ShowConsoleWindow</key>
+  <key>RenderMaxNodeSize</key>
+  <map>
+    <key>Comment</key>
+    <string>Maximum size of a single node's vertex data (in KB).</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>S32</string>
+    <key>Value</key>
+    <integer>4096</integer>
+  </map>
+    <key>RenderMaxVBOSize</key>
     <map>
       <key>Comment</key>
-      <string>Show log in separate OS window</string>
+      <string>Maximum size of a vertex buffer (in KB).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>512</integer>
     </map>
-    <key>ShowCrosshairs</key>
+    <key>RenderName</key>
     <map>
       <key>Comment</key>
-      <string>Display crosshairs when in mouselook mode</string>
+      <string>Controls display of names above avatars (0 = never, 1 = fade, 2 = always)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>2</integer>
     </map>
-    <key>ShowDebugConsole</key>
+    <key>RenderNameFadeDuration</key>
     <map>
       <key>Comment</key>
-      <string>Show log in SL window</string>
+      <string>Time interval over which to fade avatar names (seconds)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>1.0</real>
     </map>
-    <key>ShowDebugStats</key>
+    <key>RenderNameHideSelf</key>
     <map>
       <key>Comment</key>
-      <string>Show performance stats display</string>
+      <string>Don't display own name above avatar</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -8241,321 +5923,285 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowDirectory</key>
+    <key>RenderNameShowTime</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Fade avatar names after specified time (seconds)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>10.0</real>
     </map>
-    <key>ShowEmptyFoldersWhenSearching</key>
+    <key>RenderObjectBump</key>
     <map>
       <key>Comment</key>
-      <string>Shows folders that do not have any visible contents when applying a filter to inventory</string>
+      <string>Show bumpmapping on primitives</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ShowHoverTips</key>
+    <key>RenderQualityPerformance</key>
     <map>
       <key>Comment</key>
-      <string>Show descriptive tooltip when mouse hovers over items in world</string>
+      <string>Which graphics settings you've chosen</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>U32</string>
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>ShowInventory</key>
+    <key>RenderReflectionDetail</key>
     <map>
       <key>Comment</key>
-      <string>Open inventory window on login</string>
+      <string>Detail of reflection render pass.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>2</integer>
     </map>
-    <key>ShowLandHoverTip</key>
+    <key>RenderReflectionRes</key>
     <map>
       <key>Comment</key>
-      <string>Show descriptive tooltip when mouse hovers over land</string>
+      <string>Reflection map resolution.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>64</integer>
     </map>
-    <key>ShowLeaders</key>
+    <key>RenderResolutionDivisor</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Divisor for rendering 3D scene at reduced resolution.</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>U32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ShowPGSearchAll</key>
+    <key>RenderShaderLightingMaxLevel</key>
     <map>
       <key>Comment</key>
-      <string>Display results of search All that are flagged as PG</string>
+      <string>Max lighting level to use in the shader (class 3 is default, 2 is less lights, 1 is sun/moon only.  Works around shader compiler bugs on certain platforms.)</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>3</integer>
     </map>
-    <key>ShowMatureSearchAll</key>
+    <key>RenderShaderLODThreshold</key>
     <map>
       <key>Comment</key>
-      <string>Display results of search All that are flagged as mature</string>
+      <string>Fraction of draw distance defining the switch to a different shader LOD</string>
       <key>Persist</key>
-      <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>1.0</real>
     </map>
-    <key>ShowAdultSearchAll</key>
+    <key>RenderShaderParticleThreshold</key>
     <map>
       <key>Comment</key>
-      <string>Display results of search All that are flagged as adult</string>
+      <string>Fraction of draw distance to not use shader on particles</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>0.25</real>
     </map>
-    <key>ShowPGGroups</key>
+    <key>RenderSunDynamicRange</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find groups that are flagged as PG</string>
+      <string>Defines what percent brighter the sun is than local point lights (1.0 = 100% brighter. Value should not be less than 0. ).</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>1.0</real>
     </map>
-    <key>ShowMatureGroups</key>
+    <key>RenderTerrainDetail</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find groups that are flagged as mature</string>
+      <string>Detail applied to terrain texturing (0 = none, 1 or 2 = full)</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>2</integer>
     </map>
-    <key>ShowAdultGroups</key>
+    <key>RenderTerrainLODFactor</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find groups that are flagged as adult</string>
+      <string>Controls level of detail of terrain (multiplier for current screen area when calculated level of detail)</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>1.0</real>
     </map>
-    <key>ShowPGClassifieds</key>
+    <key>RenderTerrainScale</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find classifieds that are flagged as PG</string>
+      <string>Terrain detail texture scale</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <real>12.0</real>
     </map>
-    <key>ShowMatureClassifieds</key>
+    <key>RenderTextureMemoryMultiple</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find classifieds that are flagged as mature</string>
+      <string>Multiple of texture memory value to use (should fit: 0 &lt; value &lt;= 1.0)</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>1.0</real>
     </map>
-    <key>ShowAdultClassifieds</key>
+    <key>RenderTreeLODFactor</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find classifieds that are flagged as adult</string>
+      <string>Controls level of detail of vegetation (multiplier for current screen area when calculated level of detail)</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>0.5</real>
     </map>
-    <key>ShowPGEvents</key>
+    <key>RenderUIInSnapshot</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find events that are flagged as PG</string>
+      <string>Display user interface in snapshot</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>ShowMatureEvents</key>
+    <key>RenderUnloadedAvatar</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find events that are flagged as mature</string>
+      <string>Show avatars which haven't finished loading</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowAdultEvents</key>
+    <key>RenderUseFBO</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find events that are flagged as adult</string>
+      <string>Whether we want to use GL_EXT_framebuffer_objects.</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowPGLand</key>
+    <key>RenderUseFarClip</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find land sales that are flagged as PG</string>
+      <string>If false, frustum culling will ignore far clip plane.</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>ShowMatureLand</key>
+    <key>RenderUseImpostors</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find land sales that are flagged as mature</string>
+      <string>Whether we want to use impostors for far away avatars.</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ShowAdultLand</key>
+    <key>RenderUseShaderLOD</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find land sales that are flagged as adult</string>
+      <string>Whether we want to have different shaders for LOD</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ShowPGSims</key>
+    <key>RenderUseShaderNearParticles</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find places or find popular that are in PG sims</string>
+      <string>Whether we want to use shaders on near particles</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>ShowMatureSims</key>
+    <key>RenderVBOEnable</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find places or find popular that are in mature sims</string>
+      <string>Use GL Vertex Buffer Objects</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ShowAdultSims</key>
+    <key>RenderVolumeLODFactor</key>
     <map>
       <key>Comment</key>
-      <string>Display results of find places or find popular that are in adult sims</string>
+      <string>Controls level of detail of primitives (multiplier for current screen area when calculated level of detail)</string>
       <key>Persist</key>
       <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>1.0</real>
     </map>
-    <key>ShowMiniMap</key>
+    <key>RenderWater</key>
     <map>
       <key>Comment</key>
-      <string>Display mini map on login</string>
+      <string>Display water</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ShowMovementControls</key>
+    <key>RenderWaterMipNormal</key>
     <map>
       <key>Comment</key>
-      <string>Display movement controls on login</string>
+      <string>Use mip maps for water normal map.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -8563,62 +6209,51 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>ShowNearClip</key>
+    <key>RenderWaterRefResolution</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Water planar reflection resolution.</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>512</integer>
     </map>
-    <key>ShowNewInventory</key>
+    <key>RenderWaterReflections</key>
     <map>
       <key>Comment</key>
-      <string>Automatically views new notecards/textures/landmarks</string>
+      <string>Reflect the environment in the water.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>ShowInInventory</key>
-        <map>
-        <key>Comment</key>
-            <string>Automatically opens inventory to show accepted objects</string>
-        <key>Persist</key>
-            <integer>1</integer>
-        <key>Type</key>
-            <string>Boolean</string>
-        <key>Value</key>
-            <integer>1</integer>
-        </map>
-    <key>ShowObjectUpdates</key>
+    <key>RotateRight</key>
     <map>
       <key>Comment</key>
-      <string>Show when update messages are received for individual objects</string>
+      <string>Make the agent rotate to its right.</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowOverlayTitle</key>
+    <key>RotationStep</key>
     <map>
       <key>Comment</key>
-      <string>Prints watermark text message on screen</string>
+      <string>All rotations via rotation tool are constrained to multiples of this unit (degrees)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>1.0</real>
     </map>
-    <key>ShowParcelOwners</key>
+    <key>RunBtnState</key>
     <map>
       <key>Comment</key>
       <string />
@@ -8629,21 +6264,21 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowPermissions</key>
+    <key>RunMultipleThreads</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>If TRUE keep background threads active during render</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowPropertyLines</key>
+    <key>SafeMode</key>
     <map>
       <key>Comment</key>
-      <string>Show line overlay demarking property boundaries</string>
+      <string>Reset preferences, run in safe mode.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -8651,10 +6286,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowSearchBar</key>
+    <key>SaveMinidump</key>
     <map>
       <key>Comment</key>
-      <string>Show the Search Bar in the Status Overlay</string>
+      <string>Save minidump for developer debugging on crash</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -8662,32 +6297,32 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>ShowSelectionBeam</key>
+    <key>ScaleShowAxes</key>
     <map>
       <key>Comment</key>
-      <string>Show selection particle beam when selecting or interacting with objects.</string>
+      <string>Show indicator of selected scale axis when scaling</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>ShowStartLocation</key>
+    <key>ScaleStretchTextures</key>
     <map>
       <key>Comment</key>
-      <string>Display starting location menu on login screen</string>
+      <string>Stretch textures along with object when scaling</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>ShowTangentBasis</key>
+    <key>ScaleUniform</key>
     <map>
       <key>Comment</key>
-      <string>Render normal and binormal (debugging bump mapping)</string>
+      <string>Scale selected objects evenly about center of selection</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -8695,65 +6330,71 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowToolBar</key>
+    <key>ScriptErrorsAsChat</key>
     <map>
       <key>Comment</key>
-      <string>Show toolbar at bottom of screen</string>
+      <string>Display script errors and warning in chat history</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>ShowTools</key>
+    <key>ScriptHelpFollowsCursor</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Scripting help window updates contents based on script editor contents under text cursor</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-	<key>ShowTutorial</key>
-	<map>
-		<key>Comment</key>
-		<string>Show tutorial window on login</string>
-		<key>Persist</key>
-		<integer>1</integer>
-		<key>Type</key>
-		<string>Boolean</string>
-		<key>Value</key>
-		<integer>0</integer>
-	</map>
-	<key>ShowVoiceChannelPopup</key>
+    <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>Controls visibility of the current voice channel popup above the voice tab</string>
+      <string>URL to use for searches</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>0</integer>
+      <string>http://search.secondlife.com/client_search.php?q=[QUERY]&amp;s=[COLLECTION]&amp;</string>
     </map>
-    <key>ShowVolumeSettingsPopup</key>
+    <key>SearchURLSuffix2</key>
     <map>
       <key>Comment</key>
-      <string>Show individual volume slider for voice, sound effects, etc</string>
+      <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>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>0</integer>
+      <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>ShowWorldMap</key>
+    <key>SelectMovableOnly</key>
     <map>
       <key>Comment</key>
-      <string>Display world map on login</string>
+      <string>Select only objects you can move</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -8761,10 +6402,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowXUINames</key>
+    <key>SelectOwnedOnly</key>
     <map>
       <key>Comment</key>
-      <string>Display XUI Names as Tooltips</string>
+      <string>Select only objects you own</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -8772,253 +6413,230 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>SitBtnState</key>
+    <key>SelectionHighlightAlpha</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Opacity of selection highlight (0.0 = completely transparent, 1.0 = completely opaque)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>0.40000000596</real>
     </map>
-    <key>SkinCurrent</key>
+    <key>SelectionHighlightAlphaTest</key>
     <map>
       <key>Comment</key>
-      <string>The currently selected skin.</string>
+      <string>Alpha value below which pixels are displayed on selection highlight line (0.0 = show all pixels, 1.0 = show now pixels)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>default</string>
+      <real>0.1</real>
     </map>
-    <key>SkyAmbientScale</key>
+    <key>SelectionHighlightThickness</key>
     <map>
       <key>Comment</key>
-      <string>Controls strength of ambient, or non-directional light from the sun and moon (fraction or multiple of default ambient level)</string>
+      <string>Thickness of selection highlight line (fraction of view distance)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>0.300000011921</real>
+      <real>0.00999999977648</real>
     </map>
-    <key>SkyEditPresets</key>
+    <key>SelectionHighlightUAnim</key>
     <map>
       <key>Comment</key>
-      <string>Whether to be able to edit the sky defaults or not</string>
+      <string>Rate at which texture animates along U direction in selection highlight line (fraction of texture per second)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>0.0</real>
     </map>
-    <key>SkyNightColorShift</key>
+    <key>SelectionHighlightUScale</key>
     <map>
       <key>Comment</key>
-      <string>Controls moonlight color (base color applied to moon as light source)</string>
+      <string>Scale of texture display on selection highlight line (fraction of texture size)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color3</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <real>0.699999988079</real>
-        <real>0.699999988079</real>
-        <real>1.0</real>
-      </array>
+      <real>0.1</real>
     </map>
-    <key>SkyOverrideSimSunPosition</key>
+    <key>SelectionHighlightVAnim</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Rate at which texture animates along V direction in selection highlight line (fraction of texture per second)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>F32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <real>0.5</real>
     </map>
-    <key>SkySunDefaultPosition</key>
+    <key>SelectionHighlightVScale</key>
     <map>
       <key>Comment</key>
-      <string>Default position of sun in sky (direction in world coordinates)</string>
+      <string>Scale of texture display on selection highlight line (fraction of texture size)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Vector3</string>
+      <string>F32</string>
       <key>Value</key>
-      <array>
-        <real>1.0</real>
-        <real>0.0</real>
-        <real>0.1</real>
-      </array>
+      <real>1.0</real>
     </map>
-    <key>SkyUseClassicClouds</key>
+    <key>ServerChoice</key>
     <map>
       <key>Comment</key>
-      <string>Whether to use the old Second Life particle clouds or not</string>
+      <string>[DO NOT MODIFY] Controls which grid you connect to</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>SlideLeftBtnRect</key>
+    <key>ShareWithGroup</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Newly created objects are shared with the currently active group</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>20</integer>
-        <integer>54</integer>
-        <integer>45</integer>
-        <integer>29</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>SlideRightBtnRect</key>
+    <key>ShowActiveSpeakers</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Display active speakers list on login</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>66</integer>
-        <integer>54</integer>
-        <integer>91</integer>
-        <integer>29</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>SmallAvatarNames</key>
+    <key>ShowAllObjectHoverTip</key>
     <map>
       <key>Comment</key>
-      <string>Display avatar name text in smaller font</string>
+      <string>Show descriptive tooltip when mouse hovers over non-interactive and interactive objects.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>SnapEnabled</key>
+    <key>ShowAxes</key>
     <map>
       <key>Comment</key>
-      <string>Enable snapping to grid</string>
+      <string>Render coordinate frame at your position</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>SnapMargin</key>
+    <key>ShowBanLines</key>
     <map>
       <key>Comment</key>
-      <string>Controls maximum distance between windows before they auto-snap together (pixels)</string>
+      <string>Show in-world ban/access borders</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>10</integer>
+      <integer>1</integer>
     </map>
-    <key>SnapToMouseCursor</key>
+    <key>ShowCameraControls</key>
     <map>
       <key>Comment</key>
-      <string>When snapping to grid, center object on nearest grid point to mouse cursor</string>
+      <string>Display camera controls on login</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>SnapshotFormat</key>
+    <key>ShowConsoleWindow</key>
     <map>
       <key>Comment</key>
-      <string>Save snapshots in this format (0 = PNG, 1 = JPEG, 2 = BMP)</string>
+      <string>Show log in separate OS window</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
-    </map>  
-    <key>SnapshotLocalLastResolution</key>
+    </map>
+    <key>ShowCrosshairs</key>
     <map>
       <key>Comment</key>
-      <string>Take next local snapshot at this resolution</string>
+      <string>Display crosshairs when in mouselook mode</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>SnapshotPostcardLastResolution</key>
+    <key>ShowDebugConsole</key>
     <map>
       <key>Comment</key>
-      <string>Take next postcard snapshot at this resolution</string>
+      <string>Show log in SL window</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>SnapshotQuality</key>
+    <key>ShowDirectory</key>
     <map>
       <key>Comment</key>
-      <string>Quality setting of postcard JPEGs (0 = worst, 100 = best)</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>75</integer>
+      <integer>0</integer>
     </map>
-    <key>SnapshotTextureLastResolution</key>
+    <key>ShowEmptyFoldersWhenSearching</key>
     <map>
       <key>Comment</key>
-      <string>Take next texture snapshot at this resolution</string>
+      <string>Shows folders that do not have any visible contents when applying a filter to inventory</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>SpeakingColor</key>
+    <key>ShowHoverTips</key>
     <map>
       <key>Comment</key>
-      <string>Color of various indicators when resident is speaking on a voice channel.</string>
+      <string>Show descriptive tooltip when mouse hovers over items in world</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.0</real>
-        <real>1.0</real>
-        <real>0.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>1</integer>
     </map>
-    <key>SpeedTest</key>
+    <key>ShowLandHoverTip</key>
     <map>
       <key>Comment</key>
-      <string>Performance testing mode, no network</string>
+      <string>Show descriptive tooltip when mouse hovers over land</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -9026,370 +6644,387 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>StatsAutoRun</key>
+    <key>ShowLeaders</key>
     <map>
       <key>Comment</key>
-      <string>Play back autopilot</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>StatsFile</key>
+    <key>ShowPGSearchAll</key>
     <map>
       <key>Comment</key>
-      <string>Filename for stats logging output</string>
+      <string>Display results of search All that are flagged as PG</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>fs.txt</string>
+      <integer>1</integer>
     </map>
-    <key>StatsNumRuns</key>
+    <key>ShowMatureSearchAll</key>
     <map>
       <key>Comment</key>
-      <string>Loop autopilot playback this number of times</string>
+      <string>Display results of search All that are flagged as mature</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>-1</integer>
+      <integer>0</integer>
     </map>
-    <key>StatsPilotFile</key>
+    <key>ShowAdultSearchAll</key>
     <map>
       <key>Comment</key>
-      <string>Filename for stats logging autopilot path</string>
+      <string>Display results of search All that are flagged as adult</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>pilot.txt</string>
+      <integer>0</integer>
     </map>
-    <key>StatsQuitAfterRuns</key>
+    <key>ShowPGGroups</key>
     <map>
       <key>Comment</key>
-      <string>Quit application after this number of autopilot playback runs</string>
+      <string>Display results of find groups that are flagged as PG</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>1</integer>
     </map>
-    <key>StatsSessionTrackFrameStats</key>
+    <key>ShowMatureGroups</key>
     <map>
       <key>Comment</key>
-      <string>Track rendering and network statistics</string>
+      <string>Display results of find groups that are flagged as mature</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>StatsSummaryFile</key>
+    <key>ShowAdultGroups</key>
     <map>
       <key>Comment</key>
-      <string>Filename for stats logging summary</string>
+      <string>Display results of find groups that are flagged as adult</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>fss.txt</string>
+      <integer>0</integer>
     </map>
-    <key>StatusBarHeight</key>
+    <key>ShowPGClassifieds</key>
     <map>
       <key>Comment</key>
-      <string>Height of menu/status bar at top of screen (pixels)</string>
+      <string>Display results of find classifieds that are flagged as PG</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>26</integer>
+      <integer>1</integer>
     </map>
-    <key>StatusBarPad</key>
+    <key>ShowMatureClassifieds</key>
     <map>
       <key>Comment</key>
-      <string>Spacing between popup buttons at bottom of screen (Stand up, Release Controls)</string>
+      <string>Display results of find classifieds that are flagged as mature</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>10</integer>
+      <integer>0</integer>
     </map>
-    <key>SystemChatColor</key>
+    <key>ShowAdultClassifieds</key>
     <map>
       <key>Comment</key>
-      <string>Color of chat messages from SL System</string>
+      <string>Display results of find classifieds that are flagged as adult</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>Color4</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <real>0.800000011921</real>
-        <real>1.0</real>
-        <real>1.0</real>
-        <real>1.0</real>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>SystemLanguage</key>
+    <key>ShowPGEvents</key>
     <map>
       <key>Comment</key>
-      <string>Language indicated by system settings (for UI)</string>
+      <string>Display results of find events that are flagged as PG</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>en-us</string>
+      <integer>1</integer>
     </map>
-    <key>TabToTextFieldsOnly</key>
+    <key>ShowMatureEvents</key>
     <map>
       <key>Comment</key>
-      <string>TAB key takes you to next text entry field, instead of next widget</string>
+      <string>Display results of find events that are flagged as mature</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>TerrainColorHeightRange</key>
+    <key>ShowAdultEvents</key>
     <map>
       <key>Comment</key>
-      <string>Altitude range over which a given terrain texture has effect (meters)</string>
+      <string>Display results of find events that are flagged as adult</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>60.0</real>
+      <integer>0</integer>
     </map>
-    <key>TerrainColorStartHeight</key>
+    <key>ShowPGLand</key>
     <map>
       <key>Comment</key>
-      <string>Starting altitude for terrain texturing (meters)</string>
+      <string>Display results of find land sales that are flagged as PG</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>20.0</real>
+      <integer>1</integer>
     </map>
-    <key>TextureMemory</key>
+    <key>ShowMatureLand</key>
     <map>
       <key>Comment</key>
-      <string>Amount of memory to use for textures in MB (0 = autodetect)</string>
+      <string>Display results of find land sales that are flagged as mature</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>S32</string>
+      <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>TexturePickerRect</key>
+    <key>ShowAdultLand</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for texture picker</string>
+      <string>Display results of find land sales that are flagged as adult</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>290</integer>
-        <integer>350</integer>
-        <integer>0</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>TexturePickerShowFolders</key>
+    <key>ShowPGSims</key>
     <map>
       <key>Comment</key>
-      <string>Show folders with no texures in texture picker</string>
+      <string>Display results of find places or find popular that are in PG sims</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>TexturePickerSortOrder</key>
+    <key>ShowMatureSims</key>
     <map>
       <key>Comment</key>
-      <string>Specifies sort key for textures in texture picker (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string>
+      <string>Display results of find places or find popular that are in mature sims</string>
       <key>Persist</key>
       <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
-      <string>U32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <integer>2</integer>
+      <integer>0</integer>
     </map>
-    <key>ThirdPersonBtnState</key>
+    <key>ShowAdultSims</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Display results of find places or find popular that are in adult sims</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
+	  <key>HideFromEditor</key>
+	  <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>ThrottleBandwidthKBPS</key>
+    <key>ShowMovementControls</key>
     <map>
       <key>Comment</key>
-      <string>Maximum allowable downstream bandwidth (kilo bits per second)</string>
+      <string>Display movement controls on login</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>500.0</real>
+      <integer>1</integer>
     </map>
-    <key>ToolHelpRect</key>
+    <key>ShowNearClip</key>
     <map>
       <key>Comment</key>
       <string />
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>8</integer>
-        <integer>178</integer>
-        <integer>75</integer>
-        <integer>162</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>ToolTipDelay</key>
+    <key>ShowNewInventory</key>
     <map>
       <key>Comment</key>
-      <string>Seconds before displaying tooltip when mouse stops over UI element</string>
+      <string>Automatically views new notecards/textures/landmarks</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>0.699999988079</real>
+      <integer>1</integer>
     </map>
-    <key>ToolboxAutoMove</key>
+    <key>ShowInInventory</key>
+        <map>
+        <key>Comment</key>
+            <string>Automatically opens inventory to show accepted objects</string>
+        <key>Persist</key>
+            <integer>1</integer>
+        <key>Type</key>
+            <string>Boolean</string>
+        <key>Value</key>
+            <integer>1</integer>
+        </map>
+    <key>ShowObjectUpdates</key>
     <map>
       <key>Comment</key>
-      <string>[NOT USED]</string>
+      <string>Show when update messages are received for individual objects</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ToolboxRect</key>
+    <key>ShowOverlayTitle</key>
     <map>
       <key>Comment</key>
-      <string>Rectangle for tools window</string>
+      <string>Prints watermark text message on screen</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>0</integer>
-        <integer>100</integer>
-        <integer>100</integer>
-        <integer>100</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>TrackFocusObject</key>
+    <key>ShowParcelOwners</key>
     <map>
       <key>Comment</key>
-      <string>Camera tracks last object zoomed on</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>TurnLeftBtnRect</key>
+    <key>ShowPermissions</key>
     <map>
       <key>Comment</key>
       <string />
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>20</integer>
-        <integer>29</integer>
-        <integer>45</integer>
-        <integer>4</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>TurnRightBtnRect</key>
+    <key>ShowPropertyLines</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Show line overlay demarking property boundaries</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>Rect</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <array>
-        <integer>66</integer>
-        <integer>29</integer>
-        <integer>91</integer>
-        <integer>4</integer>
-      </array>
+      <integer>0</integer>
     </map>
-    <key>TutorialURL</key>
+    <key>ShowSearchBar</key>
     <map>
       <key>Comment</key>
-      <string>URL for tutorial menu item, set automatically during login</string>
+      <string>Show the Search Bar in the Status Overlay</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string />
+      <integer>1</integer>
     </map>
-    <key>TypeAheadTimeout</key>
+    <key>ShowSelectionBeam</key>
     <map>
       <key>Comment</key>
-      <string>Time delay before clearing type-ahead buffer in lists (seconds)</string>
+      <string>Show selection particle beam when selecting or interacting with objects.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <real>1.5</real>
+      <integer>1</integer>
     </map>
-    <key>UIAutoScale</key>
+    <key>ShowStartLocation</key>
     <map>
       <key>Comment</key>
-      <string>Keep UI scale consistent across different resolutions</string>
+      <string>Display starting location menu on login screen</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>UIFloaterTestBool</key>
+    <key>ShowTangentBasis</key>
     <map>
       <key>Comment</key>
-      <string>Example saved setting for the test floater</string>
+      <string>Render normal and binormal (debugging bump mapping)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -9397,720 +7032,735 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>UIImgBtnCloseActiveUUID</key>
+    <key>ShowToolBar</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Show toolbar at bottom of screen</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>47a8c844-cd2a-4b1a-be01-df8b1612fe5d</string>
+      <integer>1</integer>
     </map>
-    <key>UIImgBtnCloseInactiveUUID</key>
+    <key>ShowTools</key>
     <map>
       <key>Comment</key>
       <string />
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>779e4fa3-9b13-f74a-fba9-3886fe9c86ba</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnClosePressedUUID</key>
+	<key>ShowTutorial</key>
+	<map>
+		<key>Comment</key>
+		<string>Show tutorial window on login</string>
+		<key>Persist</key>
+		<integer>1</integer>
+		<key>Type</key>
+		<string>Boolean</string>
+		<key>Value</key>
+		<integer>0</integer>
+	</map>
+	<key>ShowVoiceChannelPopup</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Controls visibility of the current voice channel popup above the voice tab</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>e5821134-23c0-4bd0-af06-7fa95b9fb01a</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnForwardInUUID</key>
+    <key>ShowVolumeSettingsPopup</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Show individual volume slider for voice, sound effects, etc</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>54197a61-f5d1-4c29-95d2-c071d08849cb</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnForwardOutUUID</key>
+    <key>ShowXUINames</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Display XUI Names as Tooltips</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>a0eb4021-1b20-4a53-892d-8faa9265a6f5</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnJumpLeftInUUID</key>
+    <key>SitBtnState</key>
     <map>
       <key>Comment</key>
       <string />
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnJumpLeftOutUUID</key>
+    <key>SkinCurrent</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>The currently selected skin.</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>3c18c87e-5f50-14e2-e744-f44734aa365f</string>
+      <string>default</string>
     </map>
-    <key>UIImgBtnJumpRightInUUID</key>
+    <key>SkinningSettingsFile</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Client skin color setting file name (per install).</string>
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>7dabc040-ec13-2309-ddf7-4f161f6de2f4</string>
+      <string />
     </map>
-    <key>UIImgBtnJumpRightOutUUID</key>
+    <key>SkyAmbientScale</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Controls strength of ambient, or non-directional light from the sun and moon (fraction or multiple of default ambient level)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>ff9a71eb-7414-4cf8-866e-a701deb7c3cf</string>
+      <real>0.300000011921</real>
     </map>
-    <key>UIImgBtnLeftInUUID</key>
+    <key>SkyEditPresets</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Whether to be able to edit the sky defaults or not</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>95463c78-aaa6-464d-892d-3a805b6bb7bf</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnLeftOutUUID</key>
+    <key>SkyOverrideSimSunPosition</key>
     <map>
       <key>Comment</key>
       <string />
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>13a93910-6b44-45eb-ad3a-4d1324c59bac</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnMinimizeActiveUUID</key>
+    <key>SkySunDefaultPosition</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Default position of sun in sky (direction in world coordinates)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Vector3</string>
       <key>Value</key>
-      <string>34c9398d-bb78-4643-9633-46a2fa3e9637</string>
+      <array>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>0.1</real>
+      </array>
     </map>
-    <key>UIImgBtnMinimizeInactiveUUID</key>
+    <key>SkyUseClassicClouds</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Whether to use the old Second Life particle clouds or not</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>6e72abba-1378-437f-bf7a-f0c15f3e99a3</string>
+      <integer>1</integer>
     </map>
-    <key>UIImgBtnMinimizePressedUUID</key>
+    <key>SmallAvatarNames</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Display avatar name text in smaller font</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>39801651-26cb-4926-af57-7af9352c273c</string>
+      <integer>1</integer>
     </map>
-    <key>UIImgBtnMoveDownInUUID</key>
+    <key>SnapEnabled</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Enable snapping to grid</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>b92a70b9-c841-4c94-b4b3-cee9eb460d48</string>
+      <integer>1</integer>
     </map>
-    <key>UIImgBtnMoveDownOutUUID</key>
+    <key>SnapMargin</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Controls maximum distance between windows before they auto-snap together (pixels)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>b5abc9fa-9e62-4e03-bc33-82c4c1b6b689</string>
+      <integer>10</integer>
     </map>
-    <key>UIImgBtnMoveUpInUUID</key>
+    <key>SnapToMouseCursor</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>When snapping to grid, center object on nearest grid point to mouse cursor</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>49b4b357-e430-4b56-b9e0-05b8759c3c82</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnMoveUpOutUUID</key>
+    <key>SnapshotFormat</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Save snapshots in this format (0 = PNG, 1 = JPEG, 2 = BMP)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>f887146d-829f-4e39-9211-cf872b78f97c</string>
-    </map>
-    <key>UIImgBtnPanDownInUUID</key>
+      <integer>0</integer>
+    </map>  
+    <key>SnapshotLocalLastResolution</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Take next local snapshot at this resolution</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>e5821134-23c0-4bd0-af06-7fa95b9fb01a</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnPanDownOutUUID</key>
+    <key>SnapshotPostcardLastResolution</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Take next postcard snapshot at this resolution</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>47a8c844-cd2a-4b1a-be01-df8b1612fe5d</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnPanLeftInUUID</key>
+    <key>SnapshotQuality</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Quality setting of postcard JPEGs (0 = worst, 100 = best)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>e5821134-23c0-4bd0-af06-7fa95b9fb01a</string>
+      <integer>75</integer>
     </map>
-    <key>UIImgBtnPanLeftOutUUID</key>
+    <key>SnapshotTextureLastResolution</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Take next texture snapshot at this resolution</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>47a8c844-cd2a-4b1a-be01-df8b1612fe5d</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnPanRightInUUID</key>
+    <key>SpeedTest</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Performance testing mode, no network</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>e5821134-23c0-4bd0-af06-7fa95b9fb01a</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnPanRightOutUUID</key>
+    <key>StatsAutoRun</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Play back autopilot</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>47a8c844-cd2a-4b1a-be01-df8b1612fe5d</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnPanUpInUUID</key>
+    <key>StatsFile</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Filename for stats logging output</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>e5821134-23c0-4bd0-af06-7fa95b9fb01a</string>
+      <string>fs.txt</string>
     </map>
-    <key>UIImgBtnPanUpOutUUID</key>
+    <key>StatsNumRuns</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Loop autopilot playback this number of times</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>47a8c844-cd2a-4b1a-be01-df8b1612fe5d</string>
+      <integer>-1</integer>
     </map>
-    <key>UIImgBtnRestoreActiveUUID</key>
+    <key>StatsPilotFile</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Filename for stats logging autopilot path</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>111b39de-8928-4690-b7b2-e17d5c960277</string>
+      <string>pilot.txt</string>
     </map>
-    <key>UIImgBtnRestoreInactiveUUID</key>
+    <key>StatsQuitAfterRuns</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Quit application after this number of autopilot playback runs</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>0eafa471-70af-4882-b8c1-40a310929744</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnRestorePressedUUID</key>
+    <key>StatsSessionTrackFrameStats</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Track rendering and network statistics</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>90a0ed5c-2e7b-4845-9958-a64a1b30f312</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnRightInUUID</key>
+    <key>StatsSummaryFile</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Filename for stats logging summary</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>5e616d0d-4335-476f-9977-560bccd009da</string>
+      <string>fss.txt</string>
     </map>
-    <key>UIImgBtnRightOutUUID</key>
+    <key>StatusBarHeight</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Height of menu/status bar at top of screen (pixels)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>5a44fd04-f52b-4c30-8b00-4a31e27614bd</string>
+      <integer>26</integer>
     </map>
-    <key>UIImgBtnScrollDownInUUID</key>
+    <key>StatusBarPad</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Spacing between popup buttons at bottom of screen (Stand up, Release Controls)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>d2421bab-2eaf-4863-b8f6-5e4c52519247</string>
+      <integer>10</integer>
     </map>
-    <key>UIImgBtnScrollDownOutUUID</key>
+    <key>SystemLanguage</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Language indicated by system settings (for UI)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>b4ecdecf-5c8d-44e7-b882-17a77e88ed55</string>
+      <string>en-us</string>
     </map>
-    <key>UIImgBtnScrollLeftInUUID</key>
+    <key>TabToTextFieldsOnly</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>TAB key takes you to next text entry field, instead of next widget</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>ea137a32-6718-4d05-9c22-7d570d27b2cd</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnScrollLeftOutUUID</key>
+    <key>TerrainColorHeightRange</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Altitude range over which a given terrain texture has effect (meters)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>43773e8d-49aa-48e0-80f3-a04715f4677a</string>
+      <real>60.0</real>
     </map>
-    <key>UIImgBtnScrollRightInUUID</key>
+    <key>TerrainColorStartHeight</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Starting altitude for terrain texturing (meters)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>b749de64-e903-4c3c-ac0b-25fb6fa39cb5</string>
+      <real>20.0</real>
     </map>
-    <key>UIImgBtnScrollRightOutUUID</key>
+    <key>TextureMemory</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Amount of memory to use for textures in MB (0 = autodetect)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>3d700d19-e708-465d-87f2-46c8c0ee7938</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnScrollUpInUUID</key>
+    <key>TexturePickerShowFolders</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Show folders with no texures in texture picker</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>a93abdf3-27b5-4e22-a8fa-c48216cd2e3a</string>
+      <integer>1</integer>
     </map>
-    <key>UIImgBtnScrollUpOutUUID</key>
+    <key>TexturePickerSortOrder</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Specifies sort key for textures in texture picker (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>U32</string>
       <key>Value</key>
-      <string>dad084d7-9a46-452a-b0ff-4b9f1cefdde9</string>
+      <integer>2</integer>
     </map>
-    <key>UIImgBtnSlideLeftInUUID</key>
+    <key>ThirdPersonBtnState</key>
     <map>
       <key>Comment</key>
       <string />
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>724996f5-b956-46f6-9844-4fcfce1d5e83</string>
+      <integer>1</integer>
     </map>
-    <key>UIImgBtnSlideLeftOutUUID</key>
+    <key>ThrottleBandwidthKBPS</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Maximum allowable downstream bandwidth (kilo bits per second)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>82476321-0374-4c26-9567-521535ab4cd7</string>
+      <real>500.0</real>
     </map>
-    <key>UIImgBtnSlideRightInUUID</key>
+    <key>ToolTipDelay</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Seconds before displaying tooltip when mouse stops over UI element</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>7eeb57d2-3f37-454d-a729-8b217b8be443</string>
+      <real>0.699999988079</real>
     </map>
-    <key>UIImgBtnSlideRightOutUUID</key>
+    <key>ToolboxAutoMove</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>[NOT USED]</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>1fbe4e60-0607-44d1-a50a-032eff56ae75</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgBtnSpinDownInUUID</key>
+    <key>TrackFocusObject</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Camera tracks last object zoomed on</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>a985ac71-052f-48e6-9c33-d931c813ac92</string>
+      <integer>1</integer>
     </map>
-    <key>UIImgBtnSpinDownOutUUID</key>
+    <key>TutorialURL</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>URL for tutorial menu item, set automatically during login</string>
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>b6d240dd-5602-426f-b606-bbb49a30726d</string>
+      <string />
     </map>
-    <key>UIImgBtnSpinUpInUUID</key>
+    <key>TypeAheadTimeout</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Time delay before clearing type-ahead buffer in lists (seconds)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>c8450082-96a0-4319-8090-d3ff900b4954</string>
+      <real>1.5</real>
     </map>
-    <key>UIImgBtnSpinUpOutUUID</key>
+    <key>UIAutoScale</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Keep UI scale consistent across different resolutions</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>56576e6e-6710-4e66-89f9-471b59122794</string>
+      <integer>1</integer>
     </map>
-    <key>UIImgBtnTabBottomInUUID</key>
+    <key>UIAvatariconctrlSymbolHPad</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Avatar Icon Control Symbol Horizontal Pad</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>c001d8fd-a869-4b6f-86a1-fdcb106df9c7</string>
-    </map>
-    <key>UIImgBtnTabBottomOutUUID</key>
+      <real>2</real>
+    </map>    
+    <key>UIAvatariconctrlSymbolVPad</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Avatar Icon Control Symbol Vertical Pad</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>bf0a8779-689b-48c3-bb9a-6af546366ef4</string>
-    </map>
-    <key>UIImgBtnTabBottomPartialInUUID</key>
+      <real>2</real>
+    </map>    
+    <key>UIAvatariconctrlSymbolSize</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Avatar Icon Control Symbol Size</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>eb0b0904-8c91-4f24-b500-1180b91140de</string>
-    </map>
-    <key>UIImgBtnTabBottomPartialOutUUID</key>
+      <real>5</real>
+    </map>    
+    <key>UIAvatariconctrlSymbolPosition</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Avatar Icon Control Symbol Position (TopLeft|TopRight|BottomLeft|BottomRight)</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>8dca716c-b29c-403a-9886-91c028357d6e</string>
+      <string>BottomRight</string>
     </map>
-    <key>UIImgBtnTabTopInUUID</key>
+    <key>UIButtonOrigHPad</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Button Original Horizontal Pad</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>16d032e8-817b-4368-8a4e-b7b947ae3889</string>
+      <real>6</real>
     </map>
-    <key>UIImgBtnTabTopOutUUID</key>
+    <key>UICheckboxctrlBtnSize</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Checkbox Control Button Size</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>1ed83f57-41cf-4052-a3b4-2e8bb78d8191</string>
+      <real>13</real>
     </map>
-    <key>UIImgBtnTabTopPartialInUUID</key>
+    <key>UICheckboxctrlHeight</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Checkbox Control Height</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>7c6c6c26-0e25-4438-89bd-30d8b8e9d704</string>
+      <real>16</real>
     </map>
-    <key>UIImgBtnTabTopPartialOutUUID</key>
+    <key>UICheckboxctrlHPad</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Checkbox Control Horizontal Pad</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>932ad585-0e45-4a57-aa23-4cf81beeb7b0</string>
+      <real>2</real>
     </map>
-    <key>UIImgBtnTearOffActiveUUID</key>
+    <key>UICheckboxctrlSpacing</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Checkbox Control Spacing</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>74e1a96f-4833-a24d-a1bb-1bce1468b0e7</string>
+      <real>5</real>
     </map>
-    <key>UIImgBtnTearOffInactiveUUID</key>
+    <key>UICheckboxctrlVPad</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Checkbox Control Vertical Pad</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>74e1a96f-4833-a24d-a1bb-1bce1468b0e7</string>
+      <real>2</real>
     </map>
-    <key>UIImgBtnTearOffPressedUUID</key>
+    <key>UICloseBoxFromTop</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Size of UI floater close box from top</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>d2524c13-4ba6-af7c-e305-8ac6cc18d86a</string>
+      <real>1</real>
     </map>
-    <key>UIImgCheckboxActiveSelectedUUID</key>
+    <key>UIExtraTriangleHeight</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI extra triangle height</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>cf4a2ed7-1533-4686-9dde-df9a37ddca55</string>
+      <real>-2</real>
     </map>
-    <key>UIImgCheckboxActiveUUID</key>
+    <key>UIExtraTriangleWidth</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI extra triangle width</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>05bb64ee-96fd-4243-b74e-f40a41bc53ba</string>
+      <real>2</real>
     </map>
-    <key>UIImgCheckboxInactiveSelectedUUID</key>
+    <key>UIFloaterCloseBoxSize</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Size of UI floater close box size</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>c817c642-9abd-4236-9287-ae0513fe7d2b</string>
+      <real>16</real>
     </map>
-    <key>UIImgCheckboxInactiveUUID</key>
+    <key>UIFloaterHeaderSize</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Size of UI floater header size</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>7d94cb59-32a2-49bf-a516-9e5a2045f9d9</string>
+      <real>18</real>
     </map>
-    <key>UIImgCreateSelectedUUID</key>
+    <key>UIFloaterHPad</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Size of UI floater horizontal pad</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>0098b015-3daf-4cfe-a72f-915369ea97c2</string>
+      <real>6</real>
     </map>
-    <key>UIImgCreateUUID</key>
+    <key>UIFloaterTestBool</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Example saved setting for the test floater</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b</string>
+      <integer>0</integer>
     </map>
-    <key>UIImgCrosshairsUUID</key>
+    <key>UIFloaterVPad</key>
     <map>
       <key>Comment</key>
-      <string>Image to use for crosshair display (UUID texture reference)</string>
+      <string>Size of UI floater vertical pad</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>6e1a3980-bf2d-4274-8970-91e60d85fb52</string>
+      <real>6</real>
     </map>
     <key>UIImgDefaultEyesUUID</key>
     <map>
@@ -10222,7 +7872,7 @@
       <key>Value</key>
       <string>5748decc-f629-461c-9a36-a35a221fe21f</string>
     </map>
-    <key>UIImgDirectionArrowUUID</key>
+    <key>UIImgWhiteUUID</key>
     <map>
       <key>Comment</key>
       <string />
@@ -10231,216 +7881,238 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>586383e8-4d9b-4fba-9196-2b5938e79c2c</string>
+      <string>5748decc-f629-461c-9a36-a35a221fe21f</string>
     </map>
-    <key>UIImgFaceSelectedUUID</key>
+    <key>UILineEditorCursorThickness</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Line Editor Cursor Thickness</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>b4870163-6208-42a9-9801-93133bf9a6cd</string>
+      <integer>2</integer>
     </map>
-    <key>UIImgFaceUUID</key>
+    <key>UILineEditorHPad</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Line Editor Horizontal Pad</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>ce15fd63-b0b6-463c-a37d-ea6393208b3e</string>
+      <integer>2</integer>
     </map>
-    <key>UIImgFocusSelectedUUID</key>
+    <key>UILineEditorVPad</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Line Editor Vertical Pad</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>ab6a730e-ddfd-4982-9a32-c6de3de6d31d</string>
+      <integer>1</integer>
     </map>
-    <key>UIImgFocusUUID</key>
+    <key>UIMaxComboWidth</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Maximum width of combo box</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>57bc39d1-288c-4519-aea6-6d1786a5c274</string>
+      <real>500</real>
     </map>
-    <key>UIImgGrabSelectedUUID</key>
+    <key>UIMinimizedWidth</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Size of UI floater minimized width</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>c1e21504-f136-451d-b8e9-929037812f1d</string>
+      <real>160</real>
     </map>
-    <key>UIImgGrabUUID</key>
+    <key>UIMultiSliderctrlSpacing</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI multi slider ctrl spacing</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>c63f124c-6340-4fbf-b59e-0869a44adb64</string>
+      <real>4</real>
     </map>
-    <key>UIImgMoveSelectedUUID</key>
+    <key>UIMultiTrackHeight</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI multi track height</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>46f17c7b-8381-48c3-b628-6a406e060dd6</string>
+      <real>6</real>
     </map>
-    <key>UIImgMoveUUID</key>
+    <key>UIPreeditMarkerBrightness</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Preedit Marker Brightness</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>2fa5dc06-bcdd-4e09-a426-f9f262d4fa65</string>
+      <real>0.4</real>
     </map>
-    <key>UIImgRadioActiveSelectedUUID</key>
+    <key>UIPreeditMarkerGap</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Preedit Marker Gap</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>52f09e07-5816-4052-953c-94c6c10479b7</string>
+      <real>1</real>
     </map>
-    <key>UIImgRadioActiveUUID</key>
+    <key>UIPreeditMarkerPosition</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Preedit Marker Position</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>7a1ba9b8-1047-4d1e-9cfc-bc478c80b63f</string>
+      <real>1</real>
     </map>
-    <key>UIImgRadioInactiveSelectedUUID</key>
+    <key>UIPreeditMarkerThickness</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Preedit Marker Thickness</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>1975db39-aa29-4251-aea0-409ac09d414d</string>
+      <real>1</real>
     </map>
-    <key>UIImgRadioInactiveUUID</key>
+    <key>UIPreeditStandoutBrightness</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Preedit Standout Brightness</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>F32</string>
       <key>Value</key>
-      <string>90688481-67ff-4af0-be69-4aa084bcad1e</string>
+      <real>0.6</real>
     </map>
-    <key>UIImgResizeBottomRightUUID</key>
+    <key>UIPreeditStandoutGap</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Preedit Standout Gap</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>e3690e25-9690-4f6c-a745-e7dcd885285a</string>
+      <real>1</real>
     </map>
-    <key>UIImgRotateSelectedUUID</key>
+    <key>UIPreeditStandoutPosition</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Preedit Standout Position</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>cdfb7fde-0d13-418a-9d89-2bd91019fc95</string>
+      <real>2</real>
     </map>
-    <key>UIImgRotateUUID</key>
+    <key>UIPreeditStandoutThickness</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI Preedit Standout Thickness</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>c34b1eaa-aae3-4351-b082-e26c0b636779</string>
+      <real>2</real>
     </map>
-    <key>UIImgScaleSelectedUUID</key>
+    <key>UIResizeBarHeight</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Size of UI resize bar height</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>55aa57ef-508a-47f7-8867-85d21c5a810d</string>
+      <real>3</real>
     </map>
-    <key>UIImgScaleUUID</key>
+    <key>UIResizeBarOverlap</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>Size of UI resize bar overlap</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
+      <key>Value</key>
+      <real>1</real>
+    </map>
+    <key>UIScaleFactor</key>
+    <map>
+      <key>Comment</key>
+      <string>Size of UI relative to default layout on 1024x768 screen</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>F32</string>
+      <key>Value</key>
+      <real>1.0</real>
+    </map>
+    <key>UIScrollbarSize</key>
+    <map>
+      <key>Comment</key>
+      <string>UI scrollbar size</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>S32</string>
       <key>Value</key>
-      <string>88a90fef-b448-4883-9344-ecf378a60433</string>
+      <real>16</real>
     </map>
-    <key>UIImgWhiteUUID</key>
+    <key>UISliderctrlHeight</key>
     <map>
       <key>Comment</key>
-      <string />
+      <string>UI slider ctrl height</string>
       <key>Persist</key>
-      <integer>0</integer>
+      <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>5748decc-f629-461c-9a36-a35a221fe21f</string>
+      <real>16</real>
     </map>
-    <key>UIScaleFactor</key>
+    <key>UISliderctrlSpacing</key>
     <map>
       <key>Comment</key>
-      <string>Size of UI relative to default layout on 1024x768 screen</string>
+      <string>UI slider ctrl spacing</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>F32</string>
+      <string>S32</string>
       <key>Value</key>
-      <real>1.0</real>
+      <real>4</real>
     </map>
     <key>UISndAlert</key>
     <map>
@@ -10805,286 +8477,197 @@
       <key>Value</key>
       <string>c80260ba-41fd-8a46-768a-6bf236360e3a</string>
     </map>
-	<key>UploadBakedTexOld</key>
-    <map>
-      <key>Comment</key>
-      <string>Forces the baked texture pipeline to upload using the old method.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>UseAltKeyForMenus</key>
-    <map>
-      <key>Comment</key>
-      <string>Access menus via keyboard by tapping Alt</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>UseChatBubbles</key>
-    <map>
-      <key>Comment</key>
-      <string>Show chat above avatars head in chat bubbles</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>UseDebugLogin</key>
-    <map>
-      <key>Comment</key>
-      <string>Provides extra control over which grid to connect to</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>UseDebugMenus</key>
-    <map>
-      <key>Comment</key>
-      <string>Turns on "Debug" menu</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>UseDefaultColorPicker</key>
+    <key>UISpinctrlBtnHeight</key>
     <map>
       <key>Comment</key>
-      <string>Use color picker supplied by operating system</string>
+      <string>UI spin control button height</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>UseEnergy</key>
-    <map>
-      <key>Comment</key>
-      <string />
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>8</integer>
     </map>
-    <key>UseExternalBrowser</key>
+    <key>UISpinctrlBtnWidth</key>
     <map>
       <key>Comment</key>
-      <string>Use default browser when opening web pages instead of in-world browser.</string>
+      <string>UI spin control button width</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>16</integer>
     </map>
-    <key>UseFreezeFrame</key>
+    <key>UISpinctrlDefaultLabelWidth</key>
     <map>
       <key>Comment</key>
-      <string>Freeze time when taking snapshots.</string>
+      <string>UI spin control default label width</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>10</integer>
     </map>
-    <key>UseOcclusion</key>
+    <key>UISpinctrlSpacing</key>
     <map>
       <key>Comment</key>
-      <string>Enable object culling based on occlusion (coverage) by other objects</string>
+      <string>UI spin control spacing</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>2</integer>
     </map>
-    <key>RenderDelayVBUpdate</key>
+    <key>UITabCntrArrowBtnSize</key>
     <map>
       <key>Comment</key>
-      <string>Delay vertex buffer updates until just before rendering</string>
+      <string>UI Tab Container Arrow Button Size</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>16</integer>
     </map>
-    <key>UseStartScreen</key>
+    <key>UITabCntrvArrowBtnSize</key>
     <map>
       <key>Comment</key>
-      <string>Whether to load a start screen image or not.</string>
+      <string>UI Tab Container V Arrow Button Size</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>16</integer>
     </map>
-    <key>UseWebPagesOnPrims</key>
+    <key>UITabCntrvPad</key>
     <map>
       <key>Comment</key>
-      <string>[NOT USED]</string>
+      <string>UI Tab Container V Pad</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>UserConnectionPort</key>
+    <key>UITabCntrButtonPanelOverlap</key>
     <map>
       <key>Comment</key>
-      <string>Port that this client transmits on.</string>
+      <string>UI Tab Container Button Panel Overlap</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>U32</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
-    </map>
-    <key>UserLogFile</key>
-    <map>
-      <key>Comment</key>
-      <string>User specified log file name.</string>
-      <key>Persist</key>
       <integer>1</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string />
     </map>
-    <key>UserLoginInfo</key>
+    <key>UITabCntrCloseBtnSize</key>
     <map>
       <key>Comment</key>
-      <string>Users loging data.</string>
+      <string>UI Tab Container Close Button Size</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>LLSD</string>
+      <string>S32</string>
       <key>Value</key>
-      <map>
-      </map>
+      <integer>16</integer>
     </map>
-    <key>VFSOldSize</key>
+    <key>UITabCntrTabHeight</key>
     <map>
       <key>Comment</key>
-      <string>[DO NOT MODIFY] Controls resizing of local file cache</string>
+      <string>UI Tab Container Tab Height</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>U32</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>16</integer>
     </map>
-    <key>VFSSalt</key>
+    <key>UITabCntrTabHPad</key>
     <map>
       <key>Comment</key>
-      <string>[DO NOT MODIFY] Controls local file caching behavior</string>
+      <string>UI Tab Container Tab Horizontal Pad</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>U32</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>4</integer>
     </map>
-    <key>VectorizeEnable</key>
+    <key>UITabCntrTabPartialWidth</key>
     <map>
       <key>Comment</key>
-      <string>Enable general vector operations and data alignment.</string>
+      <string>UI Tab Container Tab Partial Width</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>12</integer>
     </map>
-    <key>VectorizePerfTest</key>
+    <key>UITabCntrVertTabMinWidth</key>
     <map>
       <key>Comment</key>
-      <string>Test SSE/vectorization performance and choose fastest version.</string>
+      <string>UI Tab Container Vertical Tab Minimum Width</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>VectorizeProcessor</key>
-    <map>
-      <key>Comment</key>
-      <string>0=Compiler Default, 1=SSE, 2=SSE2, autodetected</string>
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>U32</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>100</integer>
     </map>
-    <key>VectorizeSkin</key>
+    <key>UITabPadding</key>
     <map>
       <key>Comment</key>
-      <string>Enable vector operations for avatar skinning.</string>
+      <string>UI Tab Padding</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>15</integer>
     </map>
-    <key>VelocityInterpolate</key>
+    <key>UITextEditorBorder</key>
     <map>
       <key>Comment</key>
-      <string>Extrapolate object motion from last packet based on received velocity</string>
+      <string>UI Text Editor Border</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>VerboseLogs</key>
+    <key>UITextEditorHPad</key>
     <map>
       <key>Comment</key>
-      <string>Display source file and line number for each log item for debugging purposes</string>
+      <string>UI Text Horizontal Pad</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>0</integer>
+      <integer>4</integer>
     </map>
-    <key>VersionChannelName</key>
+    <key>UITextEditorVPadTop</key>
     <map>
       <key>Comment</key>
-      <string>Versioning Channel Name.</string>
+      <string>UI Text Vertical Pad Top</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>S32</string>
       <key>Value</key>
-      <string>Second Life Release</string>
+      <integer>4</integer>
     </map>
-    <key>VertexShaderEnable</key>
+	<key>UploadBakedTexOld</key>
     <map>
       <key>Comment</key>
-      <string>Enable/disable all GLSL shaders (debug)</string>
+      <string>Forces the baked texture pipeline to upload using the old method.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -11092,10 +8675,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>VivoxAutoPostCrashDumps</key>
+    <key>UseAltKeyForMenus</key>
     <map>
       <key>Comment</key>
-      <string>If true, SLVoice will automatically send crash dumps directly to Vivox.</string>
+      <string>Access menus via keyboard by tapping Alt</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -11103,43 +8686,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>VivoxDebugLevel</key>
-    <map>
-      <key>Comment</key>
-      <string>Logging level to use when launching the vivox daemon</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string>-1</string>
-    </map>
-    <key>VivoxDebugSIPURIHostName</key>
-    <map>
-      <key>Comment</key>
-      <string>Hostname portion of vivox SIP URIs (empty string for the default).</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string></string>
-    </map>
-    <key>VivoxDebugVoiceAccountServerURI</key>
-    <map>
-      <key>Comment</key>
-      <string>URI to the vivox account management server (empty string for the default).</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string></string>
-    </map>
-    <key>VoiceCallsFriendsOnly</key>
+    <key>UseChatBubbles</key>
     <map>
       <key>Comment</key>
-      <string>Only accept voice calls from residents on your friends list</string>
+      <string>Show chat above avatars head in chat bubbles</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -11147,197 +8697,187 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>AutoDisengageMic</key>
+    <key>UseDebugLogin</key>
     <map>
       <key>Comment</key>
-      <string>Automatically turn off the microphone when ending IM calls.</string>
+      <string>Provides extra control over which grid to connect to</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
-    </map>
-    <key>VoiceEarLocation</key>
-    <map>
-      <key>Comment</key>
-      <string>Location of the virtual ear for voice</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>VoiceHost</key>
+    <key>UseDebugMenus</key>
     <map>
       <key>Comment</key>
-      <string>Client SLVoice host to connect to</string>
+      <string>Turns on "Debug" menu</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>127.0.0.1</string>
+      <integer>0</integer>
     </map>
-    <key>VoiceImageLevel0</key>
+    <key>UseDefaultColorPicker</key>
     <map>
       <key>Comment</key>
-      <string>Texture UUID for voice image level 0</string>
+      <string>Use color picker supplied by operating system</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>041ee5a0-cb6a-9ac5-6e49-41e9320507d5</string>
+      <integer>0</integer>
     </map>
-    <key>VoiceImageLevel1</key>
+    <key>UseEnergy</key>
     <map>
       <key>Comment</key>
-      <string>Texture UUID for voice image level 1</string>
+      <string />
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
+      <integer>1</integer>
     </map>
-    <key>VoiceImageLevel2</key>
+    <key>UseExternalBrowser</key>
     <map>
       <key>Comment</key>
-      <string>Texture UUID for voice image level 2</string>
+      <string>Use default browser when opening web pages instead of in-world browser.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
+      <integer>0</integer>
     </map>
-    <key>VoiceImageLevel3</key>
+    <key>UseFreezeFrame</key>
     <map>
       <key>Comment</key>
-      <string>Texture UUID for voice image level 3</string>
+      <string>Freeze time when taking snapshots.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
+      <integer>0</integer>
     </map>
-    <key>VoiceImageLevel4</key>
+    <key>UseOcclusion</key>
     <map>
       <key>Comment</key>
-      <string>Texture UUID for voice image level 4</string>
+      <string>Enable object culling based on occlusion (coverage) by other objects</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
+      <integer>1</integer>
     </map>
-    <key>VoiceImageLevel5</key>
+    <key>RenderDelayVBUpdate</key>
     <map>
       <key>Comment</key>
-      <string>Texture UUID for voice image level 5</string>
+      <string>Delay vertex buffer updates until just before rendering</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
+      <integer>1</integer>
     </map>
-    <key>VoiceImageLevel6</key>
+    <key>UseStartScreen</key>
     <map>
       <key>Comment</key>
-      <string>Texture UUID for voice image level 6</string>
+      <string>Whether to load a start screen image or not.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
+      <integer>1</integer>
     </map>
-    <key>VoiceInputAudioDevice</key>
+    <key>UseWebPagesOnPrims</key>
     <map>
       <key>Comment</key>
-      <string>Audio input device to use for voice</string>
+      <string>[NOT USED]</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>Boolean</string>
       <key>Value</key>
-      <string>Default</string>
+      <integer>0</integer>
     </map>
-    <key>VoiceOutputAudioDevice</key>
+    <key>UserConnectionPort</key>
     <map>
       <key>Comment</key>
-      <string>Audio output device to use for voice</string>
+      <string>Port that this client transmits on.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>String</string>
+      <string>U32</string>
       <key>Value</key>
-      <string>Default</string>
+      <integer>0</integer>
     </map>
-    <key>VoicePort</key>
+    <key>UserLogFile</key>
     <map>
       <key>Comment</key>
-      <string>Client SLVoice port to connect to</string>
+      <string>User specified log file name.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>U32</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>44125</integer>
+      <string />
     </map>
-    <key>WLSkyDetail</key>
+    <key>UserLoginInfo</key>
     <map>
       <key>Comment</key>
-      <string>Controls vertex detail on the WindLight sky.  Lower numbers will give better performance and uglier skies.</string>
+      <string>Users loging data.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>U32</string>
+      <string>LLSD</string>
       <key>Value</key>
-      <integer>64</integer>
+      <map>
+      </map>
     </map>
-    <key>WarnAboutBadPCI</key>
+    <key>VFSOldSize</key>
     <map>
       <key>Comment</key>
-      <string>Enables AboutBadPCI warning dialog</string>
+      <string>[DO NOT MODIFY] Controls resizing of local file cache</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>U32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>WarnAboutDirectX9</key>
+    <key>VFSSalt</key>
     <map>
       <key>Comment</key>
-      <string>Enables AboutDirectX9 warning dialog</string>
+      <string>[DO NOT MODIFY] Controls local file caching behavior</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>U32</string>
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>WarnAboutOldGraphicsDriver</key>
+    <key>VectorizeEnable</key>
     <map>
       <key>Comment</key>
-      <string>Enables AboutOldGraphicsDriver warning dialog</string>
+      <string>Enable general vector operations and data alignment.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>WarnAboutPCIGraphics</key>
+    <key>VectorizePerfTest</key>
     <map>
       <key>Comment</key>
-      <string>Enables AboutPCIGraphics warning dialog</string>
+      <string>Test SSE/vectorization performance and choose fastest version.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -11345,21 +8885,21 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>WarnBrowserLaunch</key>
+    <key>VectorizeProcessor</key>
     <map>
       <key>Comment</key>
-      <string>Enables BrowserLaunch warning dialog</string>
+      <string>0=Compiler Default, 1=SSE, 2=SSE2, autodetected</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>U32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>WarnDeedObject</key>
+    <key>VectorizeSkin</key>
     <map>
       <key>Comment</key>
-      <string>Enables DeedObject warning dialog</string>
+      <string>Enable vector operations for avatar skinning.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -11367,10 +8907,10 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>WarnFirstAppearance</key>
+    <key>VelocityInterpolate</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstAppearance warning dialog</string>
+      <string>Extrapolate object motion from last packet based on received velocity</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -11378,98 +8918,98 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>WarnFirstAttach</key>
+    <key>VerboseLogs</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstAttach warning dialog</string>
+      <string>Display source file and line number for each log item for debugging purposes</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>WarnFirstBalanceDecrease</key>
+    <key>VersionChannelName</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstBalanceDecrease warning dialog</string>
+      <string>Versioning Channel Name.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>Second Life Release</string>
     </map>
-    <key>WarnFirstBalanceIncrease</key>
+    <key>VertexShaderEnable</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstBalanceIncrease warning dialog</string>
+      <string>Enable/disable all GLSL shaders (debug)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>WarnFirstBuild</key>
+    <key>VivoxAutoPostCrashDumps</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstBuild warning dialog</string>
+      <string>If true, SLVoice will automatically send crash dumps directly to Vivox.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>WarnFirstDebugMenus</key>
+    <key>VivoxDebugLevel</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstDebugMenus warning dialog</string>
+      <string>Logging level to use when launching the vivox daemon</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>-1</string>
     </map>
-    <key>WarnFirstFlexible</key>
+    <key>VivoxDebugSIPURIHostName</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstFlexible warning dialog</string>
+      <string>Hostname portion of vivox SIP URIs (empty string for the default).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string></string>
     </map>
-    <key>WarnFirstGoTo</key>
+    <key>VivoxDebugVoiceAccountServerURI</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstGoTo warning dialog</string>
+      <string>URI to the vivox account management server (empty string for the default).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string></string>
     </map>
-    <key>WarnFirstInventory</key>
+    <key>VoiceCallsFriendsOnly</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstInventory warning dialog</string>
+      <string>Only accept voice calls from residents on your friends list</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>WarnFirstLeftClickNoHit</key>
+    <key>AutoDisengageMic</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstLeftClickNoHit warning dialog</string>
+      <string>Automatically turn off the microphone when ending IM calls.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -11477,148 +9017,148 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>WarnFirstMap</key>
+    <key>VoiceEarLocation</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstMap warning dialog</string>
+      <string>Location of the virtual ear for voice</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
-    <key>WarnFirstMedia</key>
+    <key>VoiceHost</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstMedia warning dialog</string>
+      <string>Client SLVoice host to connect to</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>127.0.0.1</string>
     </map>
-    <key>WarnFirstOverrideKeys</key>
+    <key>VoiceImageLevel0</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstOverrideKeys warning dialog</string>
+      <string>Texture UUID for voice image level 0</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>041ee5a0-cb6a-9ac5-6e49-41e9320507d5</string>
     </map>
-    <key>WarnFirstSandbox</key>
+    <key>VoiceImageLevel1</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstSandbox warning dialog</string>
+      <string>Texture UUID for voice image level 1</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
     </map>
-    <key>WarnFirstSculptedPrim</key>
+    <key>VoiceImageLevel2</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstSculptedPrim warning dialog</string>
+      <string>Texture UUID for voice image level 2</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
     </map>
-    <key>WarnFirstSit</key>
+    <key>VoiceImageLevel3</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstSit warning dialog</string>
+      <string>Texture UUID for voice image level 3</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
     </map>
-    <key>WarnFirstStreamingMusic</key>
+    <key>VoiceImageLevel4</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstStreamingMusic warning dialog</string>
+      <string>Texture UUID for voice image level 4</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
     </map>
-    <key>WarnFirstStreamingVideo</key>
+    <key>VoiceImageLevel5</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstStreamingVideo warning dialog</string>
+      <string>Texture UUID for voice image level 5</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
     </map>
-    <key>WarnFirstTeleport</key>
+    <key>VoiceImageLevel6</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstTeleport warning dialog</string>
+      <string>Texture UUID for voice image level 6</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>29de489d-0491-fb00-7dab-f9e686d31e83</string>
     </map>
-    <key>WarnFirstVoice</key>
+    <key>VoiceInputAudioDevice</key>
     <map>
       <key>Comment</key>
-      <string>Enables FirstVoice warning dialog</string>
+      <string>Audio input device to use for voice</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>Default</string>
     </map>
-    <key>WarnNewClassified</key>
+    <key>VoiceOutputAudioDevice</key>
     <map>
       <key>Comment</key>
-      <string>Enables NewClassified warning dialog</string>
+      <string>Audio output device to use for voice</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>String</string>
       <key>Value</key>
-      <integer>1</integer>
+      <string>Default</string>
     </map>
-    <key>WarnQuickTimeInstalled</key>
+    <key>VoicePort</key>
     <map>
       <key>Comment</key>
-      <string>Enables QuickTimeInstalled warning dialog</string>
+      <string>Client SLVoice port to connect to</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>U32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>44125</integer>
     </map>
-    <key>WarnReturnToOwner</key>
+    <key>WLSkyDetail</key>
     <map>
       <key>Comment</key>
-      <string>Enables ReturnToOwner warning dialog</string>
+      <string>Controls vertex detail on the WindLight sky.  Lower numbers will give better performance and uglier skies.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>Boolean</string>
+      <string>U32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>64</integer>
     </map>
     <key>WatchdogEnabled</key>
     <map>
@@ -11796,22 +9336,6 @@
       <key>Value</key>
       <real>0.40000000596</real>
     </map>
-    <key>llOwnerSayChatColor</key>
-    <map>
-      <key>Comment</key>
-      <string>Color of chat messages from objects only visible to the owner</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Color4</string>
-      <key>Value</key>
-      <array>
-        <real>0.990000009537</real>
-        <real>0.990000009537</real>
-        <real>0.689999997616</real>
-        <real>1.0</real>
-      </array>
-    </map>
     <key>particlesbeacon</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/app_settings/settings_files.xml b/indra/newview/app_settings/settings_files.xml
index ec55745358..aa5b301959 100644
--- a/indra/newview/app_settings/settings_files.xml
+++ b/indra/newview/app_settings/settings_files.xml
@@ -4,10 +4,10 @@
     <map>
       <!--
       The Locations LLSD block specifies the usage pattern of 
-      the settings file types listed above. 
+      the settings file types
       Each location is represented by a LLSD containing the following values:
       PathIndex = hard coded path indicies.
-      Files = map of files to load, from above 'Files' section. 
+      Files = map of files to load
         Each file can have:
         Requirement = level of necessity for loading. 
           0 ( or Req. no key) = do not load
@@ -50,6 +50,13 @@
               <key>Requirement</key>
               <integer>1</integer>
             </map>
+            <key>Warnings</key>
+            <map>
+              <key>Name</key>
+              <string>ignorable_dialogs.xml</string>
+              <key>Requirement</key>
+              <integer>1</integer>
+            </map>
           </map>
         </map>
         <key>User</key>
@@ -70,6 +77,13 @@
               <key>Name</key>
               <string>settings_crash_behavior.xml</string>
             </map>
+            <key>Warnings</key>
+            <map>
+              <key>Name</key>
+              <string>ignorable_dialogs.xml</string>
+              <key>NameFromSetting</key>
+              <string>WarningSettingsFile</string>
+            </map>
           </map>
         </map>
         <key>Account</key>
@@ -82,6 +96,49 @@
             <map>
               <key>Name</key>
               <string>settings_per_account.xml</string>
+              <key>NameFromSetting</key>
+              <string>PerAccountSettingsFile</string>
+            </map>
+          </map>
+        </map>
+        <key>DefaultSkin</key>
+        <map>
+          <key>PathIndex</key>
+          <integer>17</integer>
+          <key>Files</key>
+          <map>
+            <key>Skinning</key>
+            <map>
+              <key>Name</key>
+              <string>colors.xml</string>
+            </map>
+          </map>
+        </map>
+        <key>CurrentSkin</key>
+        <map>
+          <key>PathIndex</key>
+          <integer>10</integer>
+          <key>Files</key>
+          <map>
+            <key>Skinning</key>
+            <map>
+              <key>Name</key>
+              <string>colors.xml</string>
+            </map>
+          </map>
+        </map>
+        <key>UserSkin</key>
+        <map>
+          <key>PathIndex</key>
+          <integer>14</integer>
+          <key>Files</key>
+          <map>
+            <key>Skinning</key>
+            <map>
+              <key>Name</key>
+              <string>colors.xml</string>
+              <key>NameFromSetting</key>
+              <string>SkinningSettingsFile</string>
             </map>
           </map>
         </map>
diff --git a/indra/newview/app_settings/std_bump.ini b/indra/newview/app_settings/std_bump.ini
index f34e21ce32..561e04c33c 100644
--- a/indra/newview/app_settings/std_bump.ini
+++ b/indra/newview/app_settings/std_bump.ini
@@ -1,18 +1,18 @@
 LLStandardBumpmap version 1
 
 
-woodgrain		058c75c0-a0d5-f2f8-43f3-e9699a89c2fc.j2c		
-bark			6c9fa78a-1c69-2168-325b-3e03ffa348ce.j2c		
-bricks			b8eed5f0-64b7-6e12-b67f-43fa8e773440.j2c		
-checker			9deab416-9c63-78d6-d558-9a156f12044c.j2c	
-concrete		db9d39ec-a896-c287-1ced-64566217021e.j2c	
-crustytile		f2d7b6f6-4200-1e9a-fd5b-96459e950f94.j2c
-cutstone		d9258671-868f-7511-c321-7baef9e948a4.j2c	
-discs			d21e44ca-ff1c-a96e-b2ef-c0753426b7d9.j2c		
-gravel			4726f13e-bd07-f2fb-feb0-bfa2ac58ab61.j2c		
-petridish		e569711a-27c2-aad4-9246-0c910239a179.j2c	
-siding			073c9723-540c-5449-cdd4-0e87fdc159e3.j2c		
-stonetile		ae874d1a-93ef-54fb-5fd3-eb0cb156afc0.j2c	
-stucco			92e66e00-f56f-598a-7997-048aa64cde18.j2c		
-suction			83b77fc6-10b4-63ec-4de7-f40629f238c5.j2c
-weave			735198cf-6ea0-2550-e222-21d3c6a341ae.j2c
+woodgrain		058c75c0-a0d5-f2f8-43f3-e9699a89c2fc		
+bark			6c9fa78a-1c69-2168-325b-3e03ffa348ce		
+bricks			b8eed5f0-64b7-6e12-b67f-43fa8e773440		
+checker			9deab416-9c63-78d6-d558-9a156f12044c	
+concrete		db9d39ec-a896-c287-1ced-64566217021e	
+crustytile		f2d7b6f6-4200-1e9a-fd5b-96459e950f94
+cutstone		d9258671-868f-7511-c321-7baef9e948a4	
+discs			d21e44ca-ff1c-a96e-b2ef-c0753426b7d9		
+gravel			4726f13e-bd07-f2fb-feb0-bfa2ac58ab61		
+petridish		e569711a-27c2-aad4-9246-0c910239a179	
+siding			073c9723-540c-5449-cdd4-0e87fdc159e3		
+stonetile		ae874d1a-93ef-54fb-5fd3-eb0cb156afc0	
+stucco			92e66e00-f56f-598a-7997-048aa64cde18		
+suction			83b77fc6-10b4-63ec-4de7-f40629f238c5
+weave			735198cf-6ea0-2550-e222-21d3c6a341ae
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 9785940ff6..263c2b52bf 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -44,6 +44,7 @@
 #include "llcriticaldamp.h"
 #include "llfocusmgr.h"
 #include "llglheaders.h"
+#include "llmenugl.h"
 #include "llparcel.h"
 #include "llpermissions.h"
 #include "llregionhandle.h"
@@ -67,6 +68,7 @@
 #include "llface.h"
 #include "llfirstuse.h"
 #include "llfloater.h"
+#include "llfloaterreg.h"
 #include "llfloateractivespeakers.h"
 #include "llfloateravatarinfo.h"
 #include "llfloaterbuildoptions.h"
@@ -77,7 +79,6 @@
 #include "llfloatergroupinfo.h"
 #include "llfloatergroups.h"
 #include "llfloaterland.h"
-#include "llfloatermap.h"
 #include "llfloatermute.h"
 #include "llfloatersnapshot.h"
 #include "llfloatertools.h"
@@ -92,11 +93,13 @@
 #include "llmenugl.h"
 #include "llmorphview.h"
 #include "llmoveview.h"
+#include "llteleporthistory.h"
 #include "llnotify.h"
 #include "llquantize.h"
 #include "llsdutil.h"
 #include "llselectmgr.h"
 #include "llsky.h"
+#include "llslurl.h"
 #include "llrendersphere.h"
 #include "llstatusbar.h"
 #include "llstartup.h"
@@ -107,9 +110,7 @@
 #include "lltoolgrab.h"
 #include "lltoolmgr.h"
 #include "lltoolpie.h"
-#include "lltoolview.h"
 #include "llui.h"			// for make_ui_sound
-#include "llurldispatcher.h"
 #include "llviewercamera.h"
 #include "llviewerinventory.h"
 #include "llviewermenu.h"
@@ -134,6 +135,9 @@
 #include "llappviewer.h"
 #include "llviewerjoystick.h"
 #include "llfollowcam.h"
+#include "lltrans.h"
+
+#include "llnavigationbar.h" //to show/hide navigation bar when changing mouse look state
 
 using namespace LLVOAvatarDefines;
 
@@ -240,6 +244,20 @@ void LLAgentFriendObserver::changed(U32 mask)
 	}
 }
 
+bool handleSlowMotionAnimation(const LLSD& newvalue)
+{
+	if (newvalue.asBoolean())
+	{
+		gAgent.getAvatarObject()->setAnimTimeFactor(0.2f);
+	}
+	else
+	{
+		gAgent.getAvatarObject()->setAnimTimeFactor(1.0f);
+	}
+	return true;
+}
+
+
 // ************************************************************
 // Enabled this definition to compile a 'hacked' viewer that
 // locally believes the end user has godlike powers.
@@ -398,15 +416,14 @@ LLAgent::LLAgent() :
 	mTextureCacheQueryID(0),
 	mAppearanceSerialNum(0)
 {
-	U32 i;
-	for (i = 0; i < TOTAL_CONTROLS; i++)
+	for (U32 i = 0; i < TOTAL_CONTROLS; i++)
 	{
 		mControlsTakenCount[i] = 0;
 		mControlsTakenPassedOnCount[i] = 0;
 	}
 
 	mActiveCacheQueries = new S32[BAKED_NUM_INDICES];
-	for (i = 0; i < (U32)BAKED_NUM_INDICES; i++)
+	for (U32 i = 0; i < (U32)BAKED_NUM_INDICES; i++)
 	{
 		mActiveCacheQueries[i] = 0;
 	}
@@ -420,6 +437,9 @@ LLAgent::LLAgent() :
 //-----------------------------------------------------------------------------
 void LLAgent::init()
 {
+	gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", FALSE);
+	gSavedSettings.getControl("SlowMotionAnimation")->getSignal()->connect(boost::bind(&handleSlowMotionAnimation, _2));
+	
 	mDrawDistance = gSavedSettings.getF32("RenderFarClip");
 
 	// *Note: this is where LLViewerCamera::getInstance() used to be constructed.
@@ -441,9 +461,10 @@ void LLAgent::init()
 	mCameraZoomFraction = 1.f;
 	mTrackFocusObject = gSavedSettings.getBOOL("TrackFocusObject");
 
-//	LLDebugVarMessageBox::show("Camera Lag", &CAMERA_FOCUS_HALF_LIFE, 0.5f, 0.01f);
-
-	mEffectColor = gSavedSettings.getColor4("EffectColor");
+	mEffectColor = gSavedSkinSettings.getColor4("EffectColor");
+	
+	gSavedSettings.getControl("PreferredMaturity")->getValidateSignal()->connect(boost::bind(&LLAgent::validateMaturity, this, _2));
+	gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLAgent::handleMaturity, this, _2));
 	
 	mInitialized = TRUE;
 }
@@ -526,8 +547,8 @@ void LLAgent::resetView(BOOL reset_camera, BOOL change_camera)
 		{
 			LLViewerJoystick::getInstance()->moveAvatar(true);
 		}
-
-		gFloaterTools->close();
+		
+		LLFloaterReg::hideInstance("build");
 		
 		gViewerWindow->showCursor();
 
@@ -820,12 +841,24 @@ void LLAgent::setFlying(BOOL fly)
 //-----------------------------------------------------------------------------
 // toggleFlying()
 //-----------------------------------------------------------------------------
+// static
 void LLAgent::toggleFlying()
 {
-	BOOL fly = !(mControlFlags & AGENT_CONTROL_FLY);
+	BOOL fly = !(gAgent.mControlFlags & AGENT_CONTROL_FLY);
 
-	setFlying( fly );
-	resetView();
+	gAgent.setFlying( fly );
+	gAgent.resetView();
+}
+
+// static
+bool LLAgent::enableFlying()
+{
+	BOOL sitting = FALSE;
+	if (gAgent.getAvatarObject())
+	{
+		sitting = gAgent.getAvatarObject()->mIsSitting;
+	}
+	return !sitting;
 }
 
 
@@ -940,7 +973,7 @@ std::string LLAgent::getSLURL() const
 		S32 x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) );
 		S32 y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) );
 		S32 z = llround( (F32)agentPos.mdV[VZ] );
-		slurl = LLURLDispatcher::buildSLURL(regionp->getName(), x, y, z);
+		slurl = LLSLURL::buildSLURL(regionp->getName(), x, y, z);
 	}
 	return slurl;
 }
@@ -2118,8 +2151,7 @@ void LLAgent::setAFK()
 		gAwayTimer.start();
 		if (gAFKMenu)
 		{
-			//*TODO:Translate
-			gAFKMenu->setLabel(std::string("Set Not Away"));
+			gAFKMenu->setLabel(LLTrans::getString("AvatarSetNotAway"));
 		}
 	}
 }
@@ -2142,8 +2174,7 @@ void LLAgent::clearAFK()
 		clearControlFlags(AGENT_CONTROL_AWAY);
 		if (gAFKMenu)
 		{
-			//*TODO:Translate
-			gAFKMenu->setLabel(std::string("Set Away"));
+			gAFKMenu->setLabel(LLTrans::getString("AvatarSetAway"));
 		}
 	}
 }
@@ -2165,8 +2196,7 @@ void LLAgent::setBusy()
 	mIsBusy = TRUE;
 	if (gBusyMenu)
 	{
-		//*TODO:Translate
-		gBusyMenu->setLabel(std::string("Set Not Busy"));
+		gBusyMenu->setLabel(LLTrans::getString("AvatarSetNotBusy"));
 	}
 	LLFloaterMute::getInstance()->updateButtons();
 }
@@ -2180,8 +2210,7 @@ void LLAgent::clearBusy()
 	sendAnimationRequest(ANIM_AGENT_BUSY, ANIM_REQUEST_STOP);
 	if (gBusyMenu)
 	{
-		//*TODO:Translate
-		gBusyMenu->setLabel(std::string("Set Busy"));
+		gBusyMenu->setLabel(LLTrans::getString("AvatarSetBusy"));
 	}
 	LLFloaterMute::getInstance()->updateButtons();
 }
@@ -2808,13 +2837,6 @@ U8 LLAgent::getRenderState()
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
-static const LLFloaterView::skip_list_t& get_skip_list()
-{
-	static LLFloaterView::skip_list_t skip_list;
-	skip_list.insert(LLFloaterMap::getInstance());
-	return skip_list;
-}
-
 //-----------------------------------------------------------------------------
 // endAnimationUpdateUI()
 //-----------------------------------------------------------------------------
@@ -2833,6 +2855,7 @@ void LLAgent::endAnimationUpdateUI()
 		gViewerWindow->showCursor();
 		// show menus
 		gMenuBarView->setVisible(TRUE);
+		LLNavigationBar::getInstance()->setVisible(TRUE);
 		gStatusBar->setVisibleForMouselook(true);
 
 		LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
@@ -2840,10 +2863,17 @@ void LLAgent::endAnimationUpdateUI()
 		// Only pop if we have pushed...
 		if (TRUE == mViewsPushed)
 		{
+#if 0 // Use this once all floaters are registered
+			LLFloaterReg::restoreVisibleInstances();
+#else // Use this for now
+			LLFloaterView::skip_list_t skip_list;
+			skip_list.insert(LLFloaterReg::findInstance("mini_map"));
+			gFloaterView->popVisibleAll(skip_list);
+#endif
 			mViewsPushed = FALSE;
-			gFloaterView->popVisibleAll(get_skip_list());
 		}
-
+		
+		
 		gAgent.setLookAt(LOOKAT_TARGET_CLEAR);
 		if( gMorphView )
 		{
@@ -2885,13 +2915,6 @@ void LLAgent::endAnimationUpdateUI()
 
 		LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
 
-		// HACK: If we're quitting, and we were in customize avatar, don't
-		// let the mini-map go visible again. JC
-        if (!LLAppViewer::instance()->quitRequested())
-		{
-			LLFloaterMap::getInstance()->popVisible();
-		}
-
 		if( gMorphView )
 		{
 			gMorphView->setVisible( FALSE );
@@ -2918,6 +2941,7 @@ void LLAgent::endAnimationUpdateUI()
 	{
 		// hide menus
 		gMenuBarView->setVisible(FALSE);
+		LLNavigationBar::getInstance()->setVisible(FALSE);
 		gStatusBar->setVisibleForMouselook(false);
 
 		// clear out camera lag effect
@@ -2929,15 +2953,24 @@ void LLAgent::endAnimationUpdateUI()
 		LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset);
 
 		mViewsPushed = TRUE;
-
-		gFloaterView->pushVisibleAll(FALSE, get_skip_list());
+		
+		// hide all floaters except the mini map
+
+#if 0 // Use this once all floaters are registered
+		std::set<std::string> exceptions;
+		exceptions.insert("mini_map");
+		LLFloaterReg::hideVisibleInstances(exceptions);
+#else // Use this for now
+		LLFloaterView::skip_list_t skip_list;
+		skip_list.insert(LLFloaterReg::findInstance("mini_map"));
+		gFloaterView->pushVisibleAll(FALSE, skip_list);
+#endif
 
 		if( gMorphView )
 		{
 			gMorphView->setVisible(FALSE);
 		}
 
-		gIMMgr->setFloaterOpen( FALSE );
 		gConsole->setVisible( TRUE );
 
 		if (mAvatarObject.notNull())
@@ -2986,15 +3019,6 @@ void LLAgent::endAnimationUpdateUI()
 	{
 		LLToolMgr::getInstance()->setCurrentToolset(gFaceEditToolset);
 
-		LLFloaterMap::getInstance()->pushVisible(FALSE);
-		/*
-		LLView *view;
-		for (view = gFloaterView->getFirstChild(); view; view = gFloaterView->getNextChild())
-		{
-			view->pushVisible(FALSE);
-		}
-		*/
-
 		if( gMorphView )
 		{
 			gMorphView->setVisible( TRUE );
@@ -4915,6 +4939,9 @@ int LLAgent::convertTextToMaturity(char text)
 
 bool LLAgent::sendMaturityPreferenceToServer(int preferredMaturity)
 {
+	if (!getRegion())
+		return false;
+	
 	// Update agent access preference on the server
 	std::string url = getRegion()->getCapability("UpdateAgentInformation");
 	if (!url.empty())
@@ -4974,6 +5001,17 @@ const LLAgentAccess& LLAgent::getAgentAccess()
 	return mAgentAccess;
 }
 
+bool LLAgent::validateMaturity(const LLSD& newvalue)
+{
+	return mAgentAccess.canSetMaturity(newvalue.asInteger());
+}
+
+void LLAgent::handleMaturity(const LLSD& newvalue)
+{
+	sendMaturityPreferenceToServer(newvalue.asInteger());
+}
+
+//----------------------------------------------------------------------------
 
 void LLAgent::buildFullname(std::string& name) const
 {
@@ -5137,8 +5175,14 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
 }
 
 // utility to build a location string
-void LLAgent::buildLocationString(std::string& str)
+BOOL LLAgent::buildLocationString(std::string& str, ELocationFormat fmt)
 {
+	LLViewerRegion* region = getRegion();
+	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+
+	if (!region || !parcel)
+		return FALSE;
+
 	const LLVector3& agent_pos_region = getPositionAgent();
 	S32 pos_x = S32(agent_pos_region.mV[VX]);
 	S32 pos_y = S32(agent_pos_region.mV[VY]);
@@ -5165,23 +5209,57 @@ void LLAgent::buildLocationString(std::string& str)
 	}
 
 	// create a defult name and description for the landmark
+	std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName();
+	std::string region_name = region->getName();
 	std::string buffer;
 	if( LLViewerParcelMgr::getInstance()->getAgentParcelName().empty() )
 	{
 		// the parcel doesn't have a name
-		buffer = llformat("%.32s (%d, %d, %d)",
-						  getRegion()->getName().c_str(),
-						  pos_x, pos_y, pos_z);
+		switch (fmt)
+		{
+		case LOCATION_FORMAT_LANDMARK:
+			buffer = llformat("%.32s (%d, %d, %d)",
+							  region_name.c_str(),
+							  pos_x, pos_y, pos_z);
+			break;
+		case LOCATION_FORMAT_NORMAL:
+		case LOCATION_FORMAT_FULL:
+			buffer = llformat("%s (%d, %d, %d)",
+							  region_name.c_str(),
+							  pos_x, pos_y, pos_z);
+			break;
+		}
 	}
 	else
 	{
 		// the parcel has a name, so include it in the landmark name
-		buffer = llformat("%.32s, %.32s (%d, %d, %d)",
-						  LLViewerParcelMgr::getInstance()->getAgentParcelName().c_str(),
-						  getRegion()->getName().c_str(),
-						  pos_x, pos_y, pos_z);
+		switch (fmt)
+		{
+		case LOCATION_FORMAT_LANDMARK:
+			buffer = llformat("%.32s, %.32s (%d, %d, %d)",
+							  parcel_name.c_str(),
+							  region_name.c_str(),
+							  pos_x, pos_y, pos_z);
+			break;
+		case LOCATION_FORMAT_NORMAL:
+			buffer = llformat("%s/%s (%d, %d, %d)",
+							  region_name.c_str(),
+							  parcel_name.c_str(),
+							  pos_x, pos_y, pos_z);
+			break;
+		case LOCATION_FORMAT_FULL:
+			std::string sim_access_string = region->getSimAccessString();
+			buffer = llformat("%s/%s (%d, %d, %d)%s%s",
+							  region_name.c_str(),
+							  parcel_name.c_str(),
+							  pos_x, pos_y, pos_z,
+							  sim_access_string.empty() ? "" : " - ",
+							  sim_access_string.c_str());
+			break;
+		}
 	}
 	str = buffer;
+	return TRUE;
 }
 
 LLQuaternion LLAgent::getHeadRotation()
@@ -5389,7 +5467,7 @@ void update_group_floaters(const LLUUID& group_id)
 	LLFloaterGroupInfo::refreshGroup(group_id);
 
 	// update avatar info
-	LLFloaterAvatarInfo* fa = LLFloaterAvatarInfo::getInstance(gAgent.getID());
+	LLFloaterAvatarInfo* fa = LLFloaterReg::findTypedInstance<LLFloaterAvatarInfo>("preview_avatar", LLSD(gAgent.getID()));
 	if(fa)
 	{
 		fa->resetGroupList();
@@ -5978,8 +6056,8 @@ bool LLAgent::teleportCore(bool is_local)
 	// process_teleport_location_reply
 
 	// close the map and find panels so we can see our destination
-	LLFloaterWorldMap::hide(NULL);
-	LLFloaterDirectory::hide(NULL);
+	LLFloaterReg::hideInstance("world_map");
+	LLFloaterReg::hideInstance("search");
 
 	// hide land floater too - it'll be out of date
 	LLFloaterLand::hideInstance();
@@ -6144,13 +6222,18 @@ void LLAgent::setTeleportState(ETeleportState state)
 	mTeleportState = state;
 	if (mTeleportState > TELEPORT_NONE && gSavedSettings.getBOOL("FreezeTime"))
 	{
-		LLFloaterSnapshot::hide(0);
+		LLFloaterReg::hideInstance("snapshot");
 	}
 	if (mTeleportState == TELEPORT_MOVING)
 	{
 		// We're outa here. Save "back" slurl.
 		mTeleportSourceSLURL = getSLURL();
 	}
+	else if(mTeleportState == TELEPORT_ARRIVING)
+	{
+		// Let the interested parties know we've teleported.
+		LLViewerParcelMgr::getInstance()->onTeleportFinished();
+	}
 }
 
 void LLAgent::stopCurrentAnimations()
@@ -7272,10 +7355,23 @@ void LLAgent::sendAgentSetAppearance()
 
 void LLAgent::sendAgentDataUpdateRequest()
 {
+	if(getID().isNull())
+		return; // not logged in
 	gMessageSystem->newMessageFast(_PREHASH_AgentDataUpdateRequest);
 	gMessageSystem->nextBlockFast(_PREHASH_AgentData);
-	gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
-	gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+	gMessageSystem->addUUIDFast(_PREHASH_AgentID, getID());
+	gMessageSystem->addUUIDFast(_PREHASH_SessionID, getSessionID());
+	sendReliableMessage();
+}
+
+void LLAgent::sendAgentUserInfoRequest()
+{
+	if(getID().isNull())
+		return; // not logged in
+	gMessageSystem->newMessageFast(_PREHASH_UserInfoRequest);
+	gMessageSystem->nextBlockFast(_PREHASH_AgentData);
+	gMessageSystem->addUUIDFast(_PREHASH_AgentID, getID());
+	gMessageSystem->addUUIDFast(_PREHASH_SessionID, getSessionID());
 	sendReliableMessage();
 }
 
@@ -7673,15 +7769,15 @@ void LLAgent::userRemoveAllClothes( void* userdata )
 	// We have to do this up front to avoid having to deal with the case of multiple wearables being dirty.
 	if( gFloaterCustomize )
 	{
-		gFloaterCustomize->askToSaveIfDirty( LLAgent::userRemoveAllClothesStep2, NULL );
+		gFloaterCustomize->askToSaveIfDirty( LLAgent::userRemoveAllClothesStep2 );
 	}
 	else
 	{
-		LLAgent::userRemoveAllClothesStep2( TRUE, NULL );
+		LLAgent::userRemoveAllClothesStep2( TRUE );
 	}
 }
 
-void LLAgent::userRemoveAllClothesStep2( BOOL proceed, void* userdata )
+void LLAgent::userRemoveAllClothesStep2( BOOL proceed )
 {
 	if( proceed )
 	{
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 226c78e631..3174357a1a 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -46,7 +46,7 @@
 #include "lldbstrings.h"
 #include "llhudeffectlookat.h"
 #include "llhudeffectpointat.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llstring.h"
 #include "lluuid.h"
 #include "m3math.h"
@@ -271,6 +271,10 @@ public:
 	static int convertTextToMaturity(char text);
 	bool sendMaturityPreferenceToServer(int preferredMaturity);
 	
+	// maturity callbacks for PreferredMaturity control variable
+	void handleMaturity(const LLSD& newvalue);
+	bool validateMaturity(const LLSD& newvalue);
+	
 	const LLAgentAccess&  getAgentAccess();
 	
 	// This function can go away after the AO transition (see llstartup.cpp)
@@ -318,8 +322,15 @@ public:
 	// in a dialog.  We don't render the avatar until they choose.
 	BOOL isGenderChosen() const { return mGenderChosen; }
 
+	typedef enum e_location_format
+	{
+		LOCATION_FORMAT_NORMAL,
+		LOCATION_FORMAT_LANDMARK,
+		LOCATION_FORMAT_FULL,
+	} ELocationFormat;
+
 	// utility to build a location string
-	void buildLocationString(std::string& str);
+	BOOL buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK);
 
 	LLQuaternion	getHeadRotation();
  	LLVOAvatar	   *getAvatarObject() const			{ return mAvatarObject; }
@@ -391,7 +402,8 @@ public:
 	// Flight management
 	BOOL			getFlying() const				{ return mControlFlags & AGENT_CONTROL_FLY; }
 	void			setFlying(BOOL fly);
-	void			toggleFlying();
+	static void		toggleFlying();
+	static bool		enableFlying();
 
 	// Does this parcel allow you to fly?
 	BOOL canFly();
@@ -607,9 +619,10 @@ public:
 	void			requestLeaveGodMode();
 
 	void			sendAgentSetAppearance();
-
 	void 			sendAgentDataUpdateRequest();
-
+	void 			sendAgentUserInfoRequest();
+	
+	
 	// Ventrella
 	LLFollowCam mFollowCam;
 	// end Ventrella 
@@ -692,7 +705,7 @@ public:
 	static void		processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data);
 	static void		userRemoveWearable( void* userdata );	// userdata is EWearableType
 	static void		userRemoveAllClothes( void* userdata );	// userdata is NULL
-	static void		userRemoveAllClothesStep2(BOOL proceed, void* userdata ); // userdata is NULL
+	static void		userRemoveAllClothesStep2(BOOL proceed );
 	static void		userRemoveAllAttachments( void* userdata);	// userdata is NULL
 	static BOOL		selfHasWearable( void* userdata );			// userdata is EWearableType
 
diff --git a/indra/newview/llagentaccess.cpp b/indra/newview/llagentaccess.cpp
index a4fbc04855..eb978eb6c1 100644
--- a/indra/newview/llagentaccess.cpp
+++ b/indra/newview/llagentaccess.cpp
@@ -3,16 +3,39 @@
  * @brief LLAgentAccess class implementation - manages maturity and godmode info
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
  * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
 #include "llviewerprecompiledheaders.h"
 
 #include "llagentaccess.h"
 #include "indra_constants.h"
-#include "llcontrolgroupreader.h"
+#include "llcontrol.h"
 
-LLAgentAccess::LLAgentAccess(LLControlGroupReader& savedSettings) :
+LLAgentAccess::LLAgentAccess(LLControlGroup& savedSettings) :
 	mSavedSettings(savedSettings),
 	mAccess(SIM_ACCESS_PG),
 	mAdminOverride(false),
@@ -140,6 +163,20 @@ int LLAgentAccess::convertTextToMaturity(char text)
 void LLAgentAccess::setMaturity(char text)
 {
 	mAccess = LLAgentAccess::convertTextToMaturity(text);
+	U32 preferred_access = mSavedSettings.getU32("PreferredMaturity");
+	while (!canSetMaturity(preferred_access))
+	{
+		if (preferred_access == SIM_ACCESS_ADULT)
+		{
+			preferred_access = SIM_ACCESS_MATURE;
+		}
+		else
+		{
+			// Mature or invalid access gets set to PG
+			preferred_access = SIM_ACCESS_PG;
+		}
+	}
+	mSavedSettings.setU32("PreferredMaturity", preferred_access);
 }
 
 void LLAgentAccess::setTransition()
@@ -152,3 +189,14 @@ bool LLAgentAccess::isInTransition() const
 	return mAOTransition;
 }
 
+bool LLAgentAccess::canSetMaturity(S32 maturity)
+{
+	if (isGodlike()) // Gods can always set their Maturity level
+		return true;
+	if (isAdult()) // Adults can always set their Maturity level
+		return true;
+	if (maturity == SIM_ACCESS_PG || (maturity == SIM_ACCESS_MATURE && isMature()))
+		return true;
+	else
+		return false;
+}
diff --git a/indra/newview/llagentaccess.h b/indra/newview/llagentaccess.h
index dec0d76cc9..93d2f0a371 100644
--- a/indra/newview/llagentaccess.h
+++ b/indra/newview/llagentaccess.h
@@ -3,7 +3,30 @@
  * @brief LLAgentAccess class implementation - manages maturity and godmode info
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
  * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
 
@@ -13,12 +36,12 @@
 #include "stdtypes.h"
 
 // forward declaration so that we don't have to include the whole class
-class LLControlGroupReader;
+class LLControlGroup;
 
 class LLAgentAccess
 {
 public:
-	LLAgentAccess(LLControlGroupReader& savedSettings);
+	LLAgentAccess(LLControlGroup& savedSettings);
 	
 	bool getAdminOverride() const;
 	void setAdminOverride(bool b);
@@ -48,6 +71,7 @@ public:
 	
 	void setTransition();	// sets the transition bit, which defaults to false
 	bool isInTransition() const;
+	bool canSetMaturity(S32 maturity);
 	
 private:
 	U8 mAccess;	// SIM_ACCESS_MATURE etc
@@ -61,9 +85,7 @@ private:
 	// all of the code that depends on it.
 	bool mAOTransition;
 	
-	// we want this to be const but the getters for it aren't, so we're 
-	// overriding it for now
-	/* const */ LLControlGroupReader& mSavedSettings;
+	LLControlGroup& mSavedSettings;
 };
 
 #endif // LL_LLAGENTACCESS_H
diff --git a/indra/newview/llagentlanguage.h b/indra/newview/llagentlanguage.h
index 6bc7250c6e..e313837883 100644
--- a/indra/newview/llagentlanguage.h
+++ b/indra/newview/llagentlanguage.h
@@ -33,7 +33,7 @@
 #ifndef LL_LLAGENTLANGUAGE_H
 #define LL_LLAGENTLANGUAGE_H
 
-#include "llmemory.h"	// LLSingleton<>
+#include "llsingleton.h"	// LLSingleton<>
 #include "llevent.h"
 
 class LLAgentLanguage: public LLSingleton<LLAgentLanguage>, public LLSimpleListener
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp
index 035c9426a1..95595c87ab 100644
--- a/indra/newview/llagentpilot.cpp
+++ b/indra/newview/llagentpilot.cpp
@@ -38,7 +38,6 @@
 
 #include "llagentpilot.h"
 #include "llagent.h"
-#include "llframestats.h"
 #include "llappviewer.h"
 #include "llviewercontrol.h"
 
@@ -198,7 +197,6 @@ void LLAgentPilot::updateTarget()
 					{
 						llinfos << "At start, beginning playback" << llendl;
 						mTimer.reset();
-						LLFrameStats::startLogging(NULL);
 						mStarted = TRUE;
 					}
 				}
@@ -215,7 +213,6 @@ void LLAgentPilot::updateTarget()
 				else
 				{
 					stopPlayback();
-					LLFrameStats::stopLogging(NULL);
 					mNumRuns--;
 					if (sLoop)
 					{
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f2154a05dc..a613e6a14b 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -30,9 +30,10 @@
  * $/LicenseInfo$
  */
 
-
 #include "llviewerprecompiledheaders.h"
+
 #include "llappviewer.h"
+
 #include "llprimitive.h"
 
 #include "llversionviewer.h"
@@ -50,13 +51,12 @@
 #include "llpumpio.h"
 #include "llimpanel.h"
 #include "llmimetypes.h"
+#include "llslurl.h"
 #include "llstartup.h"
 #include "llfocusmgr.h"
 #include "llviewerjoystick.h"
-#include "llfloaterjoystick.h"
 #include "llares.h" 
 #include "llcurl.h"
-#include "llfloatersnapshot.h"
 #include "llviewerwindow.h"
 #include "llviewerdisplay.h"
 #include "llviewermedia.h"
@@ -68,10 +68,15 @@
 #include "llurlhistory.h"
 #include "llfirstuse.h"
 #include "llrender.h"
-
+#include "llteleporthistory.h"
+#include "lllocationhistory.h"
 #include "llweb.h"
 #include "llsecondlifeurls.h"
 
+// Linden library includes
+#include "llmemory.h"
+
+// Third party library includes
 #include <boost/bind.hpp>
 
 #if LL_WINDOWS
@@ -104,7 +109,6 @@
 #include "llviewermenu.h"
 #include "llselectmgr.h"
 #include "lltrans.h"
-#include "lluitrans.h"
 #include "lltracker.h"
 #include "llviewerparcelmgr.h"
 #include "llworldmapview.h"
@@ -115,9 +119,7 @@
 #include "lldebugview.h"
 #include "llconsole.h"
 #include "llcontainerview.h"
-#include "llfloaterstats.h"
 #include "llhoverview.h"
-#include "llfloatermemleak.h"
 
 #include "llsdserialize.h"
 
@@ -138,12 +140,16 @@
 #include "llvoavatar.h"
 #include "llfolderview.h"
 #include "lltoolbar.h"
-#include "llframestats.h"
 #include "llagentpilot.h"
 #include "llsrv.h"
 #include "llvovolume.h"
 #include "llflexibleobject.h" 
 #include "llvosurfacepatch.h"
+#include "llviewerfloaterreg.h"
+#include "llcommandlineparser.h"
+#include "llfloatermemleak.h"
+#include "llfloatersnapshot.h"
+#include "llinventoryview.h"
 
 // includes for idle() idleShutdown()
 #include "llviewercontrol.h"
@@ -160,11 +166,6 @@
 #include "llviewerthrottle.h"
 #include "llparcel.h"
 
-
-#include "llinventoryview.h"
-
-#include "llcommandlineparser.h"
-
 // *FIX: These extern globals should be cleaned up.
 // The globals either represent state/config/resource-storage of either 
 // this app, or another 'component' of the viewer. App globals should be 
@@ -180,10 +181,6 @@
 
 ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor
 //
-#if LL_WINDOWS && LL_LCD_COMPILE
-	#include "lllcd.h"
-#endif
-
 //----------------------------------------------------------------------------
 // viewer.cpp - these are only used in viewer, should be easily moved.
 
@@ -283,12 +280,23 @@ static std::string gLaunchFileOnQuit;
 // Used on Win32 for other apps to identify our window (eg, win_setup)
 const char* const VIEWER_WINDOW_CLASSNAME = "Second Life";
 
+//----------------------------------------------------------------------------
+
+// List of entries from strings.xml to always replace
+static std::set<std::string> default_trans_args;
+void init_default_trans_args()
+{
+	default_trans_args.insert("SECOND_LIFE"); // World
+	default_trans_args.insert("SECOND_LIFE_VIEWER");
+	default_trans_args.insert("SECOND_LIFE_GRID");
+	default_trans_args.insert("SECOND_LIFE_SUPPORT");
+}
+
 //----------------------------------------------------------------------------
 // File scope definitons
 const char *VFS_DATA_FILE_BASE = "data.db2.x.";
 const char *VFS_INDEX_FILE_BASE = "index.db2.x.";
 
-static std::string gSecondLife;
 static std::string gWindowTitle;
 
 std::string gLoginPage;
@@ -387,7 +395,6 @@ static void settings_to_globals()
 	LLSelectMgr::sRenderHiddenSelections = gSavedSettings.getBOOL("RenderHiddenSelections");
 	LLSelectMgr::sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius");
 
-	gFrameStats.setTrackStats(gSavedSettings.getBOOL("StatsSessionTrackFrameStats"));
 	gAgentPilot.mNumRuns		= gSavedSettings.getS32("StatsNumRuns");
 	gAgentPilot.mQuitAfterRuns	= gSavedSettings.getBOOL("StatsQuitAfterRuns");
 	gAgent.mHideGroupTitle		= gSavedSettings.getBOOL("RenderHideGroupTitle");
@@ -496,8 +503,6 @@ bool LLAppViewer::sendURLToOtherInstance(const std::string& url)
 LLAppViewer* LLAppViewer::sInstance = NULL;
 
 const std::string LLAppViewer::sGlobalSettingsName = "Global"; 
-const std::string LLAppViewer::sPerAccountSettingsName = "PerAccount"; 
-const std::string LLAppViewer::sCrashSettingsName = "CrashSettings"; 
 
 LLTextureCache* LLAppViewer::sTextureCache = NULL; 
 LLWorkerThread* LLAppViewer::sImageDecodeThread = NULL; 
@@ -516,7 +521,9 @@ LLAppViewer::LLAppViewer() :
 	mLogoutRequestSent(false),
 	mYieldTime(-1),
 	mMainloopTimeout(NULL),
-	mAgentRegionLastAlive(false)
+	mAgentRegionLastAlive(false),
+	mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", FALSE)),
+	mPeriodicSlowFrame(LLCachedControl<bool>(gSavedSettings,"Periodic Slow Frame", FALSE))
 {
 	if(NULL != sInstance)
 	{
@@ -556,9 +563,12 @@ bool LLAppViewer::init()
 	//
 	// OK to write stuff to logs now, we've now crash reported if necessary
 	//
-    if (!initConfiguration())
+	
+	init_default_trans_args();
+	
+	if (!initConfiguration())
 		return false;
-
+	
     // *NOTE:Mani - LLCurl::initClass is not thread safe. 
     // Called before threads are created.
     LLCurl::initClass();
@@ -610,34 +620,35 @@ bool LLAppViewer::init()
 		LLError::setPrintLocation(true);
 	}
 	
-	// Load art UUID information, don't require these strings to be declared in code.
-	std::string colors_base_filename = gDirUtilp->findSkinnedFilename("colors_base.xml");
-	LL_DEBUGS("InitInfo") << "Loading base colors from " << colors_base_filename << LL_ENDL;
-	gColors.loadFromFileLegacy(colors_base_filename, FALSE, TYPE_COL4U);
-
-	// Load overrides from user colors file
-	std::string user_colors_filename = gDirUtilp->findSkinnedFilename("colors.xml");
-	LL_DEBUGS("InitInfo") << "Loading user colors from " << user_colors_filename << LL_ENDL;
-	if (gColors.loadFromFileLegacy(user_colors_filename, FALSE, TYPE_COL4U) == 0)
-	{
-		LL_DEBUGS("InitInfo") << "Cannot load user colors from " << user_colors_filename << LL_ENDL;
-	}
-
 	// Widget construction depends on LLUI being initialized
-	LLUI::initClass(&gSavedSettings, 
-					&gSavedSettings, 
-					&gColors, 
+	LLUI::settings_map_t settings_map;
+	settings_map["config"] = &gSavedSettings;
+	settings_map["color"] = &gSavedSkinSettings;
+	settings_map["ignores"] = &gWarningSettings;
+	settings_map["floater"] = &gSavedSettings; // *TODO: New settings file
+
+	LLUI::initClass(settings_map,
 					LLUIImageList::getInstance(),
 					ui_audio_callback,
 					&LLUI::sGLScaleFactor);
+	
+	// Setup paths and LLTrans after LLUI::initClass has been called
+	LLUI::setupPaths();
+	LLTrans::parseStrings("strings.xml", default_trans_args);		
+
 	LLWeb::initClass();			  // do this after LLUI
 
 	LLTextEditor::setURLCallbacks(&LLWeb::loadURL,
 				&LLURLDispatcher::dispatchFromTextEditor,
 				&LLURLDispatcher::dispatchFromTextEditor);
 	
-	LLUICtrlFactory::getInstance()->setupPaths(); // update paths with correct language set
 
+	/////////////////////////////////////////////////
+	
+	LLToolMgr::getInstance(); // Initialize tool manager if not already instantiated
+	
+	LLViewerFloaterReg::registerFloaters();
+	
 	/////////////////////////////////////////////////
 	//
 	// Load settings files
@@ -690,18 +701,8 @@ bool LLAppViewer::init()
 	if (!initCache())
 	{
 		std::ostringstream msg;
-		msg <<
-			gSecondLife << " is unable to access a file that it needs.\n"
-			"\n"
-			"This can be because you somehow have multiple copies running, "
-			"or your system incorrectly thinks a file is open. "
-			"If this message persists, restart your computer and try again. "
-			"If it continues to persist, you may need to completely uninstall " <<
-			gSecondLife << " and reinstall it.";
-		OSMessageBox(
-			msg.str(),
-			LLStringUtil::null,
-			OSMB_OK);
+		msg << LLTrans::getString("MBUnableToAccessFile");
+		OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK);
 		return 1;
 	}
 	
@@ -849,7 +850,8 @@ bool LLAppViewer::mainLoop()
 		{
 			LLFastTimer t(LLFastTimer::FTM_FRAME);
 			pingMainloopTimeout("Main:MiscNativeWindowEvents");
-			
+
+			if (gViewerWindow)
 			{
 				LLFastTimer t2(LLFastTimer::FTM_MESSAGES);
 				gViewerWindow->mWindow->processMiscNativeEvents();
@@ -857,6 +859,7 @@ bool LLAppViewer::mainLoop()
 			
 			pingMainloopTimeout("Main:GatherInput");
 			
+			if (gViewerWindow)
 			{
 				LLFastTimer t2(LLFastTimer::FTM_MESSAGES);
 				if (!restoreErrorTrap())
@@ -935,12 +938,6 @@ bool LLAppViewer::mainLoop()
 
 					pingMainloopTimeout("Main:Snapshot");
 					LLFloaterSnapshot::update(); // take snapshots
-					
-#if LL_LCD_COMPILE
-					// update LCD Screen
-					pingMainloopTimeout("Main:LCD");
-					gLcdScreen->UpdateDisplay();
-#endif
 				}
 
 			}
@@ -962,7 +959,7 @@ bool LLAppViewer::mainLoop()
 
 				// yield cooperatively when not running as foreground window
 				if (   gNoRender
-						|| !gViewerWindow->mWindow->getVisible()
+					   || (gViewerWindow && !gViewerWindow->mWindow->getVisible())
 						|| !gFocusMgr.getAppHasFocus())
 				{
 					// Sleep if we're not rendering, or the window is minimized.
@@ -978,12 +975,12 @@ bool LLAppViewer::mainLoop()
 					}
 				}
 				
-				if (gRandomizeFramerate)
+				if (mRandomizeFramerate)
 				{
 					ms_sleep(rand() % 200);
 				}
 
-				if (gPeriodicSlowFrame
+				if (mPeriodicSlowFrame
 					&& (gFrameCount % 10 == 0))
 				{
 					llinfos << "Periodic slow frame - sleeping 500 ms" << llendl;
@@ -1209,22 +1206,26 @@ bool LLAppViewer::cleanup()
 	llinfos << "Shutting down." << llendflush;
 
 	// Destroy the UI
-	gViewerWindow->shutdownViews();
+	if( gViewerWindow)
+		gViewerWindow->shutdownViews();
 
 	// Clean up selection managers after UI is destroyed, as UI may be observing them.
 	// Clean up before GL is shut down because we might be holding on to objects with texture references
 	LLSelectMgr::cleanupGlobals();
 
 	// Shut down OpenGL
-	gViewerWindow->shutdownGL();
+	if( gViewerWindow)
+	{
+		gViewerWindow->shutdownGL();
+	
+		// Destroy window, and make sure we're not fullscreen
+		// This may generate window reshape and activation events.
+		// Therefore must do this before destroying the message system.
+		delete gViewerWindow;
+		gViewerWindow = NULL;
+		llinfos << "ViewerWindow deleted" << llendflush;
+	}
 	
-	// Destroy window, and make sure we're not fullscreen
-	// This may generate window reshape and activation events.
-	// Therefore must do this before destroying the message system.
-	delete gViewerWindow;
-	gViewerWindow = NULL;
-	llinfos << "ViewerWindow deleted" << llendflush;
-
 	// viewer UI relies on keyboard so keep it aound until viewer UI isa gone
 	delete gKeyboard;
 	gKeyboard = NULL;
@@ -1244,12 +1245,6 @@ bool LLAppViewer::cleanup()
 	//	gDXHardware.cleanup();
 	//#endif // LL_WINDOWS
 
-#if LL_LCD_COMPILE
-	// shut down the LCD window on a logitech keyboard, if there is one
-	delete gLcdScreen;
-	gLcdScreen = NULL;
-#endif
-
 	LLVolumeMgr* volume_manager = LLPrimitive::getVolumeManager();
 	if (!volume_manager->cleanup())
 	{
@@ -1291,8 +1286,10 @@ bool LLAppViewer::cleanup()
 
 	// Must do this after all panels have been deleted because panels that have persistent rects
 	// save their rects on delete.
-	gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);	
-
+	gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
+	
+	//*FIX: don't overwrite user color tweaks with *all* colors
+	gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE);
 	// PerAccountSettingsFile should be empty if no use has been logged on.
 	// *FIX:Mani This should get really saved in a "logoff" mode. 
 	gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
@@ -1302,8 +1299,11 @@ bool LLAppViewer::cleanup()
 	// save all settings, even if equals defaults
 	gCrashSettings.saveToFile(crash_settings_filename, FALSE);
 
+	std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Warnings"));
+	gWarningSettings.saveToFile(warnings_settings_filename, TRUE);
+
 	gSavedSettings.cleanup();
-	gColors.cleanup();
+	gSavedSkinSettings.cleanup();
 	gCrashSettings.cleanup();
 
 	// Save URL history file
@@ -1464,7 +1464,7 @@ bool LLAppViewer::initThreads()
 void errorCallback(const std::string &error_string)
 {
 #ifndef LL_RELEASE_FOR_DOWNLOAD
-	OSMessageBox(error_string, "Fatal Error", OSMB_OK);
+	OSMessageBox(error_string, LLTrans::getString("MBFatalError"), OSMB_OK);
 #endif
 
 	//Set the ErrorActivated global so we know to create a marker file
@@ -1532,7 +1532,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
 		llinfos << "Attempting to load settings for the group " << settings_group 
 			    << " - from location " << location_key << llendl;
 
-		if(gSettings.find(settings_group) == gSettings.end())
+		if(!LLControlGroup::getInstance(settings_group))
 		{
 			llwarns << "No matching settings group for name " << settings_group << llendl;
 			continue;
@@ -1546,10 +1546,10 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
 			std::string custom_name_setting = file.get("NameFromSetting");
 			// *NOTE: Regardless of the group currently being lodaed,
 			// this setting is always read from the Global settings.
-			if(gSettings[sGlobalSettingsName]->controlExists(custom_name_setting))
+			if(LLControlGroup::getInstance(sGlobalSettingsName)->controlExists(custom_name_setting))
 			{
 				std::string file_name = 
-					gSettings[sGlobalSettingsName]->getString(custom_name_setting);
+					LLControlGroup::getInstance(sGlobalSettingsName)->getString(custom_name_setting);
 				full_settings_path = file_name;
 			}
 		}
@@ -1566,7 +1566,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
 			requirement = file.get("Requirement").asInteger();
 		}
 		
-		if(!gSettings[settings_group]->loadFromFile(full_settings_path, set_defaults))
+		if(!LLControlGroup::getInstance(settings_group)->loadFromFile(full_settings_path, set_defaults))
 		{
 			if(requirement == 1)
 			{
@@ -1606,17 +1606,22 @@ std::string LLAppViewer::getSettingsFilename(const std::string& location_key,
 	return std::string();
 }
 
+void LLAppViewer::loadColorSettings()
+{
+	gSavedSkinSettings.cleanup();
+
+	loadSettingsFromDirectory("DefaultSkin");
+	loadSettingsFromDirectory("CurrentSkin", true);
+	loadSettingsFromDirectory("UserSkin");
+
+}
+
 bool LLAppViewer::initConfiguration()
 {	
-	//Set up internal pointers	
-	gSettings[sGlobalSettingsName] = &gSavedSettings;
-	gSettings[sPerAccountSettingsName] = &gSavedPerAccountSettings;
-	gSettings[sCrashSettingsName] = &gCrashSettings;
-
 	//Load settings files list
 	std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml");
-	LLControlGroup settings_control;
-	llinfos << "Loading settings file list" << settings_file_list << llendl;
+	LLControlGroup settings_control("SettingsFiles");
+	llinfos << "Loading settings file list " << settings_file_list << llendl;
 	if (0 == settings_control.loadFromFile(settings_file_list))
 	{
         llerrs << "Cannot load default configuration file " << settings_file_list << llendl;
@@ -1639,21 +1644,22 @@ bool LLAppViewer::initConfiguration()
 	if(!loadSettingsFromDirectory("Default", set_defaults))
 	{
 		std::ostringstream msg;
-		msg << "Second Life could not load its default settings file. \n" 
-		    << "The installation may be corrupted. \n";
-
-		OSMessageBox(
-			msg.str(),
-			LLStringUtil::null,
-			OSMB_OK);
-
+		msg << "Unable to load default settings file. The installation may be corrupted.";
+		OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK);
 		return false;
 	}
-
-	// - set procedural settings 
+	
+	LLUI::setupPaths(); // setup paths for LLTrans based on settings files only
+	LLTrans::parseStrings("strings.xml", default_trans_args);
+	
+	// - set procedural settings
+	// Note: can't use LL_PATH_PER_SL_ACCOUNT for any of these since we haven't logged in yet
 	gSavedSettings.setString("ClientSettingsFile", 
         gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global")));
 
+	gSavedSettings.setString("SkinningSettingsFile",
+		gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("UserSkin", "Skinning")));
+
 	gSavedSettings.setString("VersionChannelName", LL_CHANNEL);
 
 #ifndef	LL_RELEASE_FOR_DOWNLOAD
@@ -1673,7 +1679,7 @@ bool LLAppViewer::initConfiguration()
 	gSavedSettings.setBOOL("WatchdogEnabled", FALSE);
 #endif
 
-	gCrashSettings.getControl(CRASH_BEHAVIOR_SETTING)->getSignal()->connect(boost::bind(&handleCrashSubmitBehaviorChanged, _1));	
+	gCrashSettings.getControl(CRASH_BEHAVIOR_SETTING)->getSignal()->connect(boost::bind(&handleCrashSubmitBehaviorChanged, _2));	
 
 	// These are warnings that appear on the first experience of that condition.
 	// They are already set in the settings_default.xml file, but still need to be added to LLFirstUse
@@ -1707,22 +1713,13 @@ bool LLAppViewer::initConfiguration()
 
 	if(!initParseCommandLine(clp))
 	{
-		llwarns	
-			<< "Error parsing command line options.	Command	Line options ignored." 
-			<< llendl;
-
+		llwarns	<< "Error parsing command line options.	Command	Line options ignored."  << llendl;
+		
 		llinfos	<< "Command	line usage:\n" << clp << llendl;
 
 		std::ostringstream msg;
-		msg << "Second Life found an error parsing the command line. \n" 
-			<< "Please see: http://wiki.secondlife.com/wiki/Client_parameters \n"
-			<< "Error: " << clp.getErrorMessage();
-
-		OSMessageBox(
-			msg.str(),
-			LLStringUtil::null,
-			OSMB_OK);
-
+		msg << LLTrans::getString("MBCmdLineError") << clp.getErrorMessage();
+		OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK);
 		return false;
 	}
 	
@@ -1742,7 +1739,6 @@ bool LLAppViewer::initConfiguration()
 
 	// - load overrides from user_settings 
 	loadSettingsFromDirectory("User");
-
 	// - apply command line settings 
 	clp.notify(); 
 
@@ -1756,7 +1752,7 @@ bool LLAppViewer::initConfiguration()
 	if(clp.hasOption("help"))
 	{
 		std::ostringstream msg;
-		msg << "Command	line usage:\n" << clp;
+		msg << LLTrans::getString("MBCmdLineUsg") << "\n" << clp;
 		llinfos	<< msg.str() << llendl;
 
 		OSMessageBox(
@@ -1767,36 +1763,6 @@ bool LLAppViewer::initConfiguration()
 		return false;
 	}
 
-    //////////////////////////
-    // Apply settings...
-    if(clp.hasOption("setdefault"))
-    {
-        //const LLCommandLineParser::token_vector_t& setdefault = clp.getOption("setdefault");
-        //if(0x1 & setdefault.size())
-        //{
-        //    llwarns << "Invalid '--setdefault' parameter count." << llendl;
-        //}
-        //else
-        //{
-        //    LLCommandLineParser::token_vector_t::const_iterator itr = setdefault.begin();
-        //    for(; itr != setdefault.end(); ++itr)
-        //    {
-        //        const std::string& name = *itr;
-        //        const std::string& value = *(++itr);
-        //        LLControlVariable* c = gSettings[sGlobalSettingsName]->getControl(name);
-        //        if(c)
-        //        {
-        //            c->setDefault(value);
-        //        }
-        //        else
-        //        {
-        //            llwarns << "'--setdefault' specified with unknown setting: '"
-        //                << name << "'." << llendl;
-        //        }
-        //    }
-        //}
-    }
-
     if(clp.hasOption("set"))
     {
         const LLCommandLineParser::token_vector_t& set_values = clp.getOption("set");
@@ -1811,7 +1777,7 @@ bool LLAppViewer::initConfiguration()
             {
                 const std::string& name = *itr;
                 const std::string& value = *(++itr);
-                LLControlVariable* c = gSettings[sGlobalSettingsName]->getControl(name);
+				LLControlVariable* c = LLControlGroup::getInstance(sGlobalSettingsName)->getControl(name);
                 if(c)
                 {
                     c->setValue(value, false);
@@ -1853,7 +1819,7 @@ bool LLAppViewer::initConfiguration()
     if(clp.hasOption("url"))
     {
         std::string slurl = clp.getOption("url")[0];
-        if (LLURLDispatcher::isSLURLCommand(slurl))
+        if (LLSLURL::isSLURLCommand(slurl))
         {
 	        LLStartUp::sSLURLCommand = slurl;
         }
@@ -1865,9 +1831,9 @@ bool LLAppViewer::initConfiguration()
     else if(clp.hasOption("slurl"))
     {
         std::string slurl = clp.getOption("slurl")[0];
-        if(LLURLDispatcher::isSLURL(slurl))
+        if(LLSLURL::isSLURL(slurl))
         {
-            if (LLURLDispatcher::isSLURLCommand(slurl))
+            if (LLSLURL::isSLURLCommand(slurl))
             {
 	            LLStartUp::sSLURLCommand = slurl;
             }
@@ -1882,12 +1848,12 @@ bool LLAppViewer::initConfiguration()
     if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
     {   
         gDirUtilp->setSkinFolder(skinfolder->getValue().asString());
+
+		gSavedSettings.setString("SkinningSettingsFile",
+			gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("UserSkin", "Skinning")));
     }
 
     mYieldTime = gSavedSettings.getS32("YieldTime");
-             
-	// XUI:translate
-	gSecondLife = "Second Life";
 
 	// Read skin/branding settings if specified.
 	//if (! gDirUtilp->getSkinDir().empty() )
@@ -1904,7 +1870,7 @@ bool LLAppViewer::initConfiguration()
 
 #if LL_DARWIN
 	// Initialize apple menubar and various callbacks
-	init_apple_menu(gSecondLife.c_str());
+	init_apple_menu(LLTrans::getString("SECOND_LIFE_VIEWER").c_str());
 
 #if __ppc__
 	// If the CPU doesn't have Altivec (i.e. it's not at least a G4), don't go any further.
@@ -1912,7 +1878,7 @@ bool LLAppViewer::initConfiguration()
 	if(!gSysCPU.hasAltivec())
 	{
 		std::ostringstream msg;
-		msg << gSecondLife << " requires a processor with AltiVec (G4 or later).";
+		msg << LLTrans::getString("MBRequiresAltiVec");
 		OSMessageBox(
 			msg.str(),
 			LLStringUtil::null,
@@ -1927,7 +1893,7 @@ bool LLAppViewer::initConfiguration()
 	// Display splash screen.  Must be after above check for previous
 	// crash as this dialog is always frontmost.
 	std::ostringstream splash_msg;
-	splash_msg << "Loading " << gSecondLife << "...";
+	splash_msg << "Loading " << LLTrans::getString("SECOND_LIFE") << "...";
 	LLSplashScreen::show();
 	LLSplashScreen::update(splash_msg.str());
 
@@ -1943,12 +1909,11 @@ bool LLAppViewer::initConfiguration()
 	//
 	// Set the name of the window
 	//
-#if LL_RELEASE_FOR_DOWNLOAD
-	gWindowTitle = gSecondLife;
-#elif LL_DEBUG
-	gWindowTitle = gSecondLife + std::string(" [DEBUG] ") + gArgs;
+	gWindowTitle = LLTrans::getString("SECOND_LIFE_VIEWER");
+#if LL_DEBUG
+	gWindowTitle += std::string(" [DEBUG] ") + gArgs;
 #else
-	gWindowTitle = gSecondLife + std::string(" ") + gArgs;
+	gWindowTitle += std::string(" ") + gArgs;
 #endif
 	LLStringUtil::truncate(gWindowTitle, 255);
 
@@ -1985,11 +1950,7 @@ bool LLAppViewer::initConfiguration()
 		if (mSecondInstance)
 		{
 			std::ostringstream msg;
-			msg << 
-				gSecondLife << " is already running.\n"
-				"\n"
-				"Check your task bar for a minimized copy of the program.\n"
-				"If this message persists, restart your computer.",
+			msg << LLTrans::getString("MBAlreadyRunning");
 			OSMessageBox(
 				msg.str(),
 				LLStringUtil::null,
@@ -2034,6 +1995,8 @@ bool LLAppViewer::initConfiguration()
 
 	gLastRunVersion = gSavedSettings.getString("LastRunVersion");
 
+	loadColorSettings();
+
 	return true; // Config was successful.
 }
 
@@ -2048,13 +2011,9 @@ void LLAppViewer::checkForCrash(void)
         //
         // Pop up a freeze or crash warning dialog
         //
-        std::ostringstream msg;
-        msg << gSecondLife
-        << " appears to have frozen or crashed on the previous run.\n"
-        << "Would you like to send a crash report?";
-        std::string alert;
-        alert = gSecondLife;
-        alert += " Alert";
+		std::ostringstream msg;
+		msg << LLTrans::getString("MBFrozenCrashed");
+		std::string alert = LLTrans::getString("SECOND_LIFE_VIEWER") + " " + LLTrans::getString("MBAlert");
         S32 choice = OSMessageBox(msg.str(),
                                   alert,
                                   OSMB_YESNO);
@@ -2130,9 +2089,6 @@ bool LLAppViewer::initWindow()
 
 	LLUI::sWindow = gViewerWindow->getWindow();
 
-	LLTrans::parseStrings("strings.xml");
-	LLUITrans::parseStrings("ui_strings.xml");
-
 	// Show watch cursor
 	gViewerWindow->setCursor(UI_CURSOR_WAIT);
 
@@ -2252,7 +2208,7 @@ void LLAppViewer::writeSystemInfo()
 	gDebugInfo["CrashNotHandled"] = (LLSD::Boolean)true;
 	
 	// Dump some debugging info
-	LL_INFOS("SystemInfo") << gSecondLife
+	LL_INFOS("SystemInfo") << LLTrans::getString("SECOND_LIFE_VIEWER")
 			<< " version " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH
 			<< LL_ENDL;
 
@@ -2330,7 +2286,7 @@ void LLAppViewer::handleViewerCrash()
 	gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath();
 	gDebugInfo["SessionLength"] = F32(LLFrameTimer::getElapsedSeconds());
 	gDebugInfo["StartupState"] = LLStartUp::getStartupStateString();
-	gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer) getCurrentRSS() >> 10;
+	gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer) LLMemory::getCurrentRSS() >> 10;
 
 	if(gLogoutInProgress)
 	{
@@ -2924,12 +2880,12 @@ void LLAppViewer::purgeCache()
 	gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""),mask);
 }
 
-const std::string& LLAppViewer::getSecondLifeTitle() const
+std::string LLAppViewer::getSecondLifeTitle() const
 {
-	return gSecondLife;
+	return LLTrans::getString("SECOND_LIFE_VIEWER");
 }
 
-const std::string& LLAppViewer::getWindowTitle() const 
+std::string LLAppViewer::getWindowTitle() const 
 {
 	return gWindowTitle;
 }
@@ -2963,7 +2919,7 @@ void LLAppViewer::forceDisconnect(const std::string& mesg)
 		return;
     }
 	
-	// Translate the message if possible
+	// *TODO: Translate the message if possible
 	std::string big_reason = LLAgent::sTeleportErrorMessages[mesg];
 	if ( big_reason.size() == 0 )
 	{
@@ -3235,7 +3191,6 @@ void LLAppViewer::idle()
 				gObjectList.mNumUnknownUpdates = 0;
 			}
 		}
-		gFrameStats.addFrameData();
 	}
 	
 	if (!gDisconnected)
@@ -3250,12 +3205,10 @@ void LLAppViewer::idle()
 	    // floating throughout the various object lists.
 	    //
     
-	    gFrameStats.start(LLFrameStats::IDLE_NETWORK);
 		stop_glerror();
 		idleNetwork();
 	    stop_glerror();
 	        
-	    gFrameStats.start(LLFrameStats::AGENT_MISC);
 
 		// Check for away from keyboard, kick idle agents.
 		idle_afk_check();
@@ -3284,7 +3237,7 @@ void LLAppViewer::idle()
 		return;
     }
 
-	gViewerWindow->handlePerFrameHover();
+	gViewerWindow->updateUI();
 
 	///////////////////////////////////////
 	// Agent and camera movement
@@ -3307,7 +3260,6 @@ void LLAppViewer::idle()
 
 	{
 		LLFastTimer t(LLFastTimer::FTM_OBJECTLIST_UPDATE); // Actually "object update"
-		gFrameStats.start(LLFrameStats::OBJECT_UPDATE);
 		
         if (!(logoutRequestSent() && hasSavedFinalSnapshot()))
 		{
@@ -3323,7 +3275,6 @@ void LLAppViewer::idle()
 
 	{
 		LLFastTimer t(LLFastTimer::FTM_CLEANUP);
-		gFrameStats.start(LLFrameStats::CLEAN_DEAD);
 		gObjectList.cleanDeadObjects();
 		LLDrawable::cleanupDeadDrawables();
 	}
@@ -3342,7 +3293,6 @@ void LLAppViewer::idle()
 	//
 
 	{
-		gFrameStats.start(LLFrameStats::UPDATE_EFFECTS);
 		LLSelectMgr::getInstance()->updateEffects();
 		LLHUDManager::getInstance()->cleanupEffects();
 		LLHUDManager::getInstance()->sendEffects();
@@ -3416,10 +3366,8 @@ void LLAppViewer::idle()
 	if (!gNoRender)
 	{
 		LLFastTimer t(LLFastTimer::FTM_WORLD_UPDATE);
-		gFrameStats.start(LLFrameStats::UPDATE_MOVE);
 		gPipeline.updateMove();
 
-		gFrameStats.start(LLFrameStats::UPDATE_PARTICLES);
 		LLWorld::getInstance()->updateParticles();
 	}
 	stop_glerror();
@@ -3445,7 +3393,6 @@ void LLAppViewer::idle()
 	}
 
 	{
-		gFrameStats.start(LLFrameStats::AUDIO);
 		LLFastTimer t(LLFastTimer::FTM_AUDIO_UPDATE);
 		
 		if (gAudiop)
@@ -3491,6 +3438,17 @@ void LLAppViewer::idleShutdown()
 	{
 		return;
 	}
+	
+	// ProductEngine: Try moving this code to where we shut down sTextureCache in cleanup()
+	// *TODO: ugly
+	static bool saved_teleport_history = false;
+	if (!saved_teleport_history)
+	{
+		saved_teleport_history = true;
+		LLTeleportHistory::getInstance()->save();
+		LLLocationHistory::getInstance()->save(); // *TODO: find a better place for doing this
+		return;
+	}
 
 	static bool saved_snapshot = false;
 	if (!saved_snapshot)
@@ -3674,7 +3632,7 @@ void LLAppViewer::idleNetwork()
 		}
 	}
 	llpushcallstacks ;
-	gObjectList.mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects);
+	LLViewerStats::getInstance()->mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects);
 
 	// Retransmit unacknowledged packets.
 	gXferManager->retransmitUnackedPackets();
@@ -3715,7 +3673,6 @@ void LLAppViewer::disconnectViewer()
 	llinfos << "Disconnecting viewer!" << llendl;
 
 	// Dump our frame statistics
-	gFrameStats.dump();
 
 	// Remember if we were flying
 	gSavedSettings.setBOOL("FlyingAtExit", gAgent.getFlying() );
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index a3b84759f5..536abfae58 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -33,12 +33,15 @@
 #ifndef LL_LLAPPVIEWER_H
 #define LL_LLAPPVIEWER_H
 
+#include "llcontrol.h"
+
 class LLTextureCache;
 class LLWorkerThread;
 class LLTextureFetch;
 class LLWatchdogTimeout;
 class LLCommandLineParser;
 
+
 class LLAppViewer : public LLApp
 {
 public:
@@ -96,8 +99,8 @@ public:
 	
 	bool getPurgeCache() const { return mPurgeCache; }
 	
-	const std::string& getSecondLifeTitle() const; // The Second Life title.
-	const std::string& getWindowTitle() const; // The window display name.
+	std::string getSecondLifeTitle() const; // The Second Life title.
+	std::string getWindowTitle() const; // The window display name.
 
     void forceDisconnect(const std::string& msg); // Force disconnection, with a message to the user.
     void badNetworkHandler(); // Cause a crash state due to bad network packet.
@@ -119,14 +122,13 @@ public:
     virtual void forceErrorSoftwareException();
     virtual void forceErrorDriverCrash();
 
-	// *NOTE: There are currently 3 settings files: 
-	// "Global", "PerAccount" and "CrashSettings"
 	// The list is found in app_settings/settings_files.xml
 	// but since they are used explicitly in code,
 	// the follow consts should also do the trick.
 	static const std::string sGlobalSettingsName; 
-	static const std::string sPerAccountSettingsName; 
-	static const std::string sCrashSettingsName; 
+
+	LLCachedControl<bool> mRandomizeFramerate; 
+	LLCachedControl<bool> mPeriodicSlowFrame; 
 
 	// Load settings from the location specified by loction_key.
 	// Key availale and rules for loading, are specified in 
@@ -136,6 +138,7 @@ public:
 
 	std::string getSettingsFilename(const std::string& location_key,
 					const std::string& file);
+	void loadColorSettings();
 
 	// For thread debugging. 
 	// llstartup needs to control init.
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 16928923bf..be5403e39a 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -64,6 +64,7 @@
 #include "llfindlocale.h"
 
 #include "llcommandlineparser.h"
+#include "lltrans.h"
 
 // *FIX:Mani - This hack is to fix a linker issue with libndofdev.lib
 // The lib was compiled under VS2005 - in VS2003 we need to remap assert
@@ -84,7 +85,7 @@ LONG WINAPI viewer_windows_exception_handler(struct _EXCEPTION_POINTERS *excepti
 {
     // *NOTE:Mani - this code is stolen from LLApp, where its never actually used.
 	//OSMessageBox("Attach Debugger Now", "Error", OSMB_OK);
-    // Translate the signals/exceptions into cross-platform stuff
+    // *TODO: Translate the signals/exceptions into cross-platform stuff
 	// Windows implementation
     _tprintf( _T("Entering Windows Exception Handler...\n") );
 	llinfos << "Entering Windows Exception Handler..." << llendl;
@@ -409,33 +410,24 @@ bool LLAppViewerWin32::initHardwareTest()
 		// but vram.
 		vram_only = TRUE;
 
-		LLSplashScreen::update("Detecting hardware...");
+		LLSplashScreen::update(LLTrans::getString("StartupDetectingHardware"));
 
 		LL_DEBUGS("AppInit") << "Attempting to poll DirectX for hardware info" << LL_ENDL;
 		gDXHardware.setWriteDebugFunc(write_debug_dx);
 		BOOL probe_ok = gDXHardware.getInfo(vram_only);
 
 		if (!probe_ok
-			&& gSavedSettings.getWarning("AboutDirectX9"))
+			&& gWarningSettings.getBOOL("AboutDirectX9"))
 		{
 			LL_WARNS("AppInit") << "DirectX probe failed, alerting user." << LL_ENDL;
 
 			// Warn them that runnin without DirectX 9 will
 			// not allow us to tell them about driver issues
 			std::ostringstream msg;
-			msg << 
-				LLAppViewer::instance()->getSecondLifeTitle() << " is unable to detect DirectX 9.0b or greater.\n"
-				"\n" <<
-				LLAppViewer::instance()->getSecondLifeTitle() << " uses DirectX to detect hardware and/or\n"
-				"outdated drivers that can cause stability problems,\n"
-				"poor performance and crashes.  While you can run\n" <<
-				LLAppViewer::instance()->getSecondLifeTitle() << " without it, we highly recommend running\n"
-				"with DirectX 9.0b\n"
-				"\n"
-				"Do you wish to continue?\n";
+			msg << LLTrans::getString ("MBNoDirectX");
 			S32 button = OSMessageBox(
 				msg.str(),
-				"Warning",
+				LLTrans::getString("MBWarning"),
 				OSMB_YESNO);
 			if (OSBTN_NO== button)
 			{
@@ -443,7 +435,7 @@ bool LLAppViewerWin32::initHardwareTest()
 				LLWeb::loadURLExternal(DIRECTX_9_URL);
 				return false;
 			}
-			gSavedSettings.setWarning("AboutDirectX9", FALSE);
+			gWarningSettings.setBOOL("AboutDirectX9", FALSE);
 		}
 		LL_DEBUGS("AppInit") << "Done polling DirectX for hardware info" << LL_ENDL;
 
@@ -452,7 +444,7 @@ bool LLAppViewerWin32::initHardwareTest()
 
 		// Disable so debugger can work
 		std::ostringstream splash_msg;
-		splash_msg << "Loading " << LLAppViewer::instance()->getSecondLifeTitle() << "...";
+		splash_msg << LLTrans::getString("StartupLoading") << " " << LLAppViewer::instance()->getSecondLifeTitle() << "...";
 
 		LLSplashScreen::update(splash_msg.str());
 	}
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 5b04e241a1..63d0518cfe 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -59,6 +59,7 @@
 
 // library includes
 #include "lleconomy.h"
+#include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "llscrolllistctrl.h"
 #include "llsdserialize.h"
@@ -416,72 +417,68 @@ void LLUpdateAgentInventoryResponder::uploadComplete(const LLSD& content)
 	LLInventoryType::EType inventory_type = new_item->getInventoryType();
 	switch(inventory_type)
 	{
-		case LLInventoryType::IT_NOTECARD:
-			{
-
-				// Update the UI with the new asset.
-				LLPreviewNotecard* nc;
-				nc = (LLPreviewNotecard*)LLPreview::find(new_item->getUUID());
-				if(nc)
-				{
-					// *HACK: we have to delete the asset in the VFS so
-					// that the viewer will redownload it. This is only
-					// really necessary if the asset had to be modified by
-					// the uploader, so this can be optimized away in some
-					// cases. A better design is to have a new uuid if the
-					// script actually changed the asset.
-					if(nc->hasEmbeddedInventory())
-					{
-						gVFS->removeFile(
-							content["new_asset"].asUUID(),
-							LLAssetType::AT_NOTECARD);
-					}
-					nc->refreshFromInventory();
-				}
-			}
-			break;
-		case LLInventoryType::IT_LSL:
-			{
-				// Find our window and close it if requested.
-				LLPreviewLSL* preview = (LLPreviewLSL*)LLPreview::find(item_id);
-				if (preview)
-				{
-					// Bytecode save completed
-					if (content["compiled"])
-					{
-						preview->callbackLSLCompileSucceeded();
-					}
-					else
-					{
-						preview->callbackLSLCompileFailed(content["errors"]);
-					}
-				}
-			}
-			break;
-
-		case LLInventoryType::IT_GESTURE:
-			{
-				// If this gesture is active, then we need to update the in-memory
-				// active map with the new pointer.				
-				if (gGestureManager.isGestureActive(item_id))
-				{
-					LLUUID asset_id = new_item->getAssetUUID();
-					gGestureManager.replaceGesture(item_id, asset_id);
-					gInventory.notifyObservers();
-				}				
-
-				//gesture will have a new asset_id
-				LLPreviewGesture* previewp = (LLPreviewGesture*)LLPreview::find(item_id);
-				if(previewp)
-				{
-					previewp->onUpdateSucceeded();	
-				}			
+	  case LLInventoryType::IT_NOTECARD:
+	  {
+		  // Update the UI with the new asset.
+		  LLPreviewNotecard* nc = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(item_id));
+		  if(nc)
+		  {
+			  // *HACK: we have to delete the asset in the VFS so
+			  // that the viewer will redownload it. This is only
+			  // really necessary if the asset had to be modified by
+			  // the uploader, so this can be optimized away in some
+			  // cases. A better design is to have a new uuid if the
+			  // script actually changed the asset.
+			  if(nc->hasEmbeddedInventory())
+			  {
+				  gVFS->removeFile(content["new_asset"].asUUID(), LLAssetType::AT_NOTECARD);
+			  }
+			  nc->refreshFromInventory(new_item->getUUID());
+		  }
+		  break;
+	  }
+	  case LLInventoryType::IT_LSL:
+	  {
+		  // Find our window and close it if requested.
+		  LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", LLSD(item_id));
+		  if (preview)
+		  {
+			  // Bytecode save completed
+			  if (content["compiled"])
+			  {
+				  preview->callbackLSLCompileSucceeded();
+			  }
+			  else
+			  {
+				  preview->callbackLSLCompileFailed(content["errors"]);
+			  }
+		  }
+		  break;
+	  }
+
+	  case LLInventoryType::IT_GESTURE:
+	  {
+		  // If this gesture is active, then we need to update the in-memory
+		  // active map with the new pointer.				
+		  if (gGestureManager.isGestureActive(item_id))
+		  {
+			  LLUUID asset_id = new_item->getAssetUUID();
+			  gGestureManager.replaceGesture(item_id, asset_id);
+			  gInventory.notifyObservers();
+		  }				
+
+		  //gesture will have a new asset_id
+		  LLPreviewGesture* previewp = LLFloaterReg::findTypedInstance<LLPreviewGesture>("preview_gesture", LLSD(item_id));
+		  if(previewp)
+		  {
+			  previewp->onUpdateSucceeded();	
+		  }			
 				
-			}
-			break;
-		case LLInventoryType::IT_WEARABLE:
-		default:
-			break;
+		  break;
+	  }
+	  case LLInventoryType::IT_WEARABLE:
+	  default:
+		break;
 	}
 }
 
@@ -519,64 +516,57 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
 	
 	switch(mAssetType)
 	{
-		case LLAssetType::AT_NOTECARD:
-			{
-
-				// Update the UI with the new asset.
-				LLPreviewNotecard* nc;
-				nc = (LLPreviewNotecard*)LLPreview::find(item_id);
-				if(nc)
-				{
-					// *HACK: we have to delete the asset in the VFS so
-					// that the viewer will redownload it. This is only
-					// really necessary if the asset had to be modified by
-					// the uploader, so this can be optimized away in some
-					// cases. A better design is to have a new uuid if the
-					// script actually changed the asset.
-					if(nc->hasEmbeddedInventory())
-					{
-						gVFS->removeFile(
-							content["new_asset"].asUUID(),
-							LLAssetType::AT_NOTECARD);
-					}
-
-					nc->refreshFromInventory();
-				}
-			}
-			break;
-		case LLAssetType::AT_LSL_TEXT:
-			{
-				if(mQueueId.notNull())
-				{
-					LLFloaterCompileQueue* queue = 
-						(LLFloaterCompileQueue*) LLFloaterScriptQueue::findInstance(mQueueId);
-					if(NULL != queue)
-					{
-						queue->removeItemByItemID(item_id);
-					}
-				}
-				else
-				{
-					LLLiveLSLEditor* preview = LLLiveLSLEditor::find(item_id, task_id);
-					if (preview)
-					{
-						// Bytecode save completed
-						if (content["compiled"])
-						{
-							preview->callbackLSLCompileSucceeded(
-								task_id,
-								item_id,
-								mPostData["is_script_running"]);
-						}
-						else
-						{
-							preview->callbackLSLCompileFailed(content["errors"]);
-						}
-					}
-				}
-			}
-			break;
-	default:
+	  case LLAssetType::AT_NOTECARD:
+	  {
+		  // Update the UI with the new asset.
+		  LLPreviewNotecard* nc = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(item_id));
+		  if(nc)
+		  {
+			  // *HACK: we have to delete the asset in the VFS so
+			  // that the viewer will redownload it. This is only
+			  // really necessary if the asset had to be modified by
+			  // the uploader, so this can be optimized away in some
+			  // cases. A better design is to have a new uuid if the
+			  // script actually changed the asset.
+			  if(nc->hasEmbeddedInventory())
+			  {
+				  gVFS->removeFile(content["new_asset"].asUUID(),
+								   LLAssetType::AT_NOTECARD);
+			  }
+
+			  nc->refreshFromInventory();
+		  }
+		  break;
+	  }
+	  case LLAssetType::AT_LSL_TEXT:
+	  {
+		  if(mQueueId.notNull())
+		  {
+			  LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance<LLFloaterCompileQueue>("compile_queue", mQueueId);
+			  if(NULL != queue)
+			  {
+				  queue->removeItemByItemID(item_id);
+			  }
+		  }
+		  else
+		  {
+			  LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(item_id));
+			  if (preview)
+			  {
+				  // Bytecode save completed
+				  if (content["compiled"])
+				  {
+					  preview->callbackLSLCompileSucceeded(task_id, item_id, mPostData["is_script_running"]);
+				  }
+				  else
+				  {
+					  preview->callbackLSLCompileFailed(content["errors"]);
+				  }
+			  }
+		  }
+		  break;
+	  }
+	  default:
 		break;
 	}
 }
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
new file mode 100644
index 0000000000..09aecd193f
--- /dev/null
+++ b/indra/newview/llavatariconctrl.cpp
@@ -0,0 +1,244 @@
+/** 
+ * @file llavatariconctrl.cpp
+ * @brief LLAvatarIconCtrl class implementation
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llagent.h"
+#include "llavatarconstants.h"
+#include "llavatariconctrl.h"
+#include "llfloateravatarinfo.h"
+#include "llfloaterfriends.h"
+#include "llimview.h"
+#include "llmenugl.h"
+#include "lluictrlfactory.h"
+
+#define MENU_ITEM_VIEW_PROFILE 0
+#define MENU_ITEM_SEND_IM 1
+
+static LLRegisterWidget<LLAvatarIconCtrl> r("avatar_icon");
+
+LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
+:	LLIconCtrl(p)
+{
+	LLRect rect = p.rect;
+
+	static LLUICachedControl<S32> llavatariconctrl_symbol_hpad("UIAvatariconctrlSymbolHPad", 2);
+	static LLUICachedControl<S32> llavatariconctrl_symbol_vpad("UIAvatariconctrlSymbolVPad", 2);
+	static LLUICachedControl<S32> llavatariconctrl_symbol_size("UIAvatariconctrlSymbolSize", 5);
+	static LLUICachedControl<std::string> llavatariconctrl_symbol_pos("UIAvatariconctrlSymbolPosition", "BottomRight");
+
+	// BottomRight is the default position
+	S32 left = rect.getWidth() - llavatariconctrl_symbol_size - llavatariconctrl_symbol_hpad;
+	S32 bottom = llavatariconctrl_symbol_vpad;
+
+	if ("BottomLeft" == (std::string)llavatariconctrl_symbol_pos)
+	{
+		left = llavatariconctrl_symbol_hpad;
+		bottom = llavatariconctrl_symbol_vpad;
+	}
+	else if ("TopLeft" == (std::string)llavatariconctrl_symbol_pos)
+	{
+		left = llavatariconctrl_symbol_hpad;
+		bottom = rect.getHeight() - llavatariconctrl_symbol_size - llavatariconctrl_symbol_vpad;
+	}
+	else if ("TopRight" == (std::string)llavatariconctrl_symbol_pos)
+	{
+		left = rect.getWidth() - llavatariconctrl_symbol_size - llavatariconctrl_symbol_hpad;
+		bottom = rect.getHeight() - llavatariconctrl_symbol_size - llavatariconctrl_symbol_vpad;
+	}
+
+	rect.setOriginAndSize(left, bottom, llavatariconctrl_symbol_size, llavatariconctrl_symbol_size);
+
+	LLIconCtrl::Params icparams;
+	icparams.name ("Status Symbol");
+	icparams.follows.flags (FOLLOWS_RIGHT | FOLLOWS_BOTTOM);
+	icparams.rect (rect);
+	mStatusSymbol = LLUICtrlFactory::create<LLIconCtrl> (icparams);
+	mStatusSymbol->setValue("circle.tga");
+	mStatusSymbol->setColor(LLColor4::grey);
+
+	addChild(mStatusSymbol);
+
+	if (p.avatar_id.isProvided())
+	{
+		LLSD value(p.avatar_id);
+		setValue(value);
+	}
+
+	LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+
+	registrar.add("AvatarIcon.Action", boost::bind(&LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked, this, _2));
+
+	LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", this);
+
+	mPopupMenuHandle = menu->getHandle();
+}
+
+LLAvatarIconCtrl::~LLAvatarIconCtrl()
+{
+	if (mAvatarId.notNull())
+	{
+		LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId, this);
+		// Name callbacks will be automatically disconnected since LLUICtrl is trackable
+	}
+
+	LLView::deleteViewByHandle(mPopupMenuHandle);
+}
+
+//virtual
+void LLAvatarIconCtrl::setValue(const LLSD& value)
+{
+	if (value.isUUID())
+	{
+		if (mAvatarId.notNull())
+		{
+			LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId, this);
+		}
+
+		if (mAvatarId != value.asUUID())
+		{
+			LLAvatarPropertiesProcessor::getInstance()->addObserver(value.asUUID(), this);
+			LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(value.asUUID());
+			mAvatarId = value.asUUID();
+		}
+	}
+	else
+	{
+		LLIconCtrl::setValue(value);
+	}
+
+	gCacheName->get(mAvatarId, FALSE, boost::bind(&LLAvatarIconCtrl::nameUpdatedCallback, this, _1, _2, _3, _4));
+}
+
+//virtual
+void LLAvatarIconCtrl::processAvatarProperties(const LLAvatarData& avatar_data)
+{
+	if (avatar_data.avatar_id != mAvatarId)
+	{
+		return;
+	}
+
+	// Update the avatar
+	LLIconCtrl::setValue(avatar_data.image_id);
+
+	// Update color of status symbol and tool tip
+	if (avatar_data.flags & AVATAR_ONLINE)
+	{
+		mStatusSymbol->setColor(LLColor4::green);
+		setToolTip((LLStringExplicit)"Online");
+	}
+	else
+	{
+		mStatusSymbol->setColor(LLColor4::grey);
+		setToolTip((LLStringExplicit)"Offline");
+	}
+	
+}
+
+BOOL LLAvatarIconCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+	LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
+
+	if(menu)
+	{
+		bool is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarId) != NULL;
+
+		menu->setItemEnabled("Add Friend", !is_friend);
+		menu->setItemEnabled("Remove Friend", is_friend);
+
+		menu->buildDrawLabels();
+		menu->updateParent(LLMenuGL::sMenuContainer);
+		LLMenuGL::showPopup(this, menu, x, y);
+	}
+
+	return TRUE;
+}
+
+void LLAvatarIconCtrl::nameUpdatedCallback(
+	const LLUUID& id,
+	const std::string& first,
+	const std::string& last,
+	BOOL is_group)
+{
+	if (id == mAvatarId)
+	{
+		mFirstName = first;
+		mLastName = last;
+	}
+}
+
+void LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked(const LLSD& userdata)
+{
+	std::string level = userdata.asString();
+	LLUUID id = getAvatarId();
+
+	if (level == "profile")
+	{
+		LLFloaterAvatarInfo::show(id);
+	}
+	else if (level == "im")
+	{
+		std::string name;
+		name.assign(getFirstName());
+		name.append(" ");
+		name.append(getLastName());
+
+		gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id);
+	}
+	else if (level == "add")
+	{
+		std::string name;
+		name.assign(getFirstName());
+		name.append(" ");
+		name.append(getLastName());
+
+		LLPanelFriends::requestFriendshipDialog(id, name);
+	}
+	else if (level == "remove")
+	{
+		LLSD args;
+
+		std::string msgType = "RemoveFromFriends";
+
+		args["FIRST_NAME"] = getFirstName();
+		args["LAST_NAME"] = getLastName();
+
+		LLSD payload;
+
+		payload["ids"].append(id);
+
+		LLNotifications::instance().add(msgType,
+			args,
+			payload,
+			&LLPanelFriends::handleRemove);
+	}
+}
diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h
new file mode 100644
index 0000000000..4cec1d2d75
--- /dev/null
+++ b/indra/newview/llavatariconctrl.h
@@ -0,0 +1,86 @@
+/** 
+ * @file llavatariconctrl.h
+ * @brief LLAvatarIconCtrl base class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLAVATARICONCTRL_H
+#define LL_LLAVATARICONCTRL_H
+
+#include "lliconctrl.h"
+#include "llavatarpropertiesprocessor.h"
+#include "llviewermenu.h"
+
+class LLAvatarIconCtrl
+: public LLIconCtrl, public LLAvatarPropertiesObserver
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLIconCtrl::Params>
+	{
+		Optional <LLUUID> avatar_id;
+		Params()
+		{
+			name = "avatar_icon";
+		}
+	};
+protected:
+	LLAvatarIconCtrl(const Params&);
+	friend class LLUICtrlFactory;
+
+	void onAvatarIconContextMenuItemClicked(const LLSD& userdata);
+
+public:
+	virtual ~LLAvatarIconCtrl();
+
+	virtual void setValue(const LLSD& value);
+
+	// LLAvatarPropertiesProcessor observer trigger
+	virtual void processAvatarProperties(const LLAvatarData& avatar_data);
+
+	BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+
+	void nameUpdatedCallback(
+		const LLUUID& id,
+		const std::string& first,
+		const std::string& last,
+		BOOL is_group);
+
+	const LLUUID&		getAvatarId() const	{ return mAvatarId; }
+	const std::string&	getFirstName() const { return mFirstName; }
+	const std::string&	getLastName() const { return mLastName; }
+
+protected:
+	LLIconCtrl*			mStatusSymbol;
+	LLUUID				mAvatarId;
+	std::string			mFirstName;
+	std::string			mLastName;
+	LLHandle<LLView>	mPopupMenuHandle;
+};
+
+#endif  // LL_LLAVATARICONCTRL_H
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
new file mode 100644
index 0000000000..6ff5c8f625
--- /dev/null
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -0,0 +1,138 @@
+/** 
+ * @file llavatarpropertiesprocessor.cpp
+ * @brief LLAvatarPropertiesProcessor class implementation
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"	    
+	    
+#include "llavatarpropertiesprocessor.h"
+#include "message.h"
+#include "llagent.h"
+
+void LLAvatarPropertiesProcessor::addObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer)
+{
+	// Check if that observer is alredy in mObservers for that avatar_id
+	observer_multimap_t::iterator it;
+
+	// IAN BUG this should update the observer's UUID if this is a dupe - sent to PE
+	it = mObservers.find(avatar_id);
+	while (it != mObservers.end())
+	{
+		if (it->second == observer)
+		{
+			return;
+		}
+		else
+		{
+			++it;
+		}
+	}
+
+	mObservers.insert(std::pair<LLUUID, LLAvatarPropertiesObserver*>(avatar_id, observer));
+}
+
+void LLAvatarPropertiesProcessor::removeObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer)
+{
+	if (!observer)
+	{
+		return;
+	}
+
+	observer_multimap_t::iterator it;
+	it = mObservers.find(avatar_id);
+	while (it != mObservers.end())
+	{
+		if (it->second == observer)
+		{
+			mObservers.erase(it);
+			break;
+		}
+		else
+		{
+			++it;
+		}
+	}
+}
+
+
+// IAN BUG - this is in no way linked to observers... problem?
+void LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest(const LLUUID& avatar_id)
+{
+	lldebugs << "LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest()" << llendl; 
+	LLMessageSystem *msg = gMessageSystem;
+
+	msg->newMessageFast(_PREHASH_AvatarPropertiesRequest);
+	msg->nextBlockFast( _PREHASH_AgentData);
+	msg->addUUIDFast(   _PREHASH_AgentID, gAgent.getID() );
+	msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+	msg->addUUIDFast(   _PREHASH_AvatarID, avatar_id);
+	gAgent.sendReliableMessage();
+
+}
+
+// static
+void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem *msg, void**)
+{
+	LLAvatarData avatar_data;
+
+	msg->getUUIDFast(	_PREHASH_AgentData,		_PREHASH_AgentID, 	avatar_data.agent_id);
+	msg->getUUIDFast(	_PREHASH_AgentData,		_PREHASH_AvatarID, 	avatar_data.avatar_id);
+	msg->getUUIDFast(  	_PREHASH_PropertiesData,	_PREHASH_ImageID,	avatar_data.image_id);
+	msg->getUUIDFast(  	_PREHASH_PropertiesData,	_PREHASH_FLImageID,	avatar_data.fl_image_id);
+	msg->getUUIDFast(	_PREHASH_PropertiesData,	_PREHASH_PartnerID,	avatar_data.partner_id);
+	msg->getStringFast(	_PREHASH_PropertiesData,	_PREHASH_AboutText,	avatar_data.about_text);
+	msg->getStringFast(	_PREHASH_PropertiesData,	_PREHASH_FLAboutText,	avatar_data.fl_about_text);
+	msg->getStringFast(	_PREHASH_PropertiesData,	_PREHASH_BornOn,	avatar_data.born_on);
+	msg->getString(		"PropertiesData",		"ProfileURL",		avatar_data.profile_url);
+	msg->getU32Fast(	_PREHASH_PropertiesData,	_PREHASH_Flags,		avatar_data.flags);
+
+	avatar_data.caption_index = 0;
+
+	S32 charter_member_size = 0;
+	charter_member_size = msg->getSize("PropertiesData", "CharterMember");
+	if(1 == charter_member_size)
+	{
+		msg->getBinaryData("PropertiesData", "CharterMember", &avatar_data.caption_index, 1);
+	}
+	else if(1 < charter_member_size)
+	{
+		msg->getString("PropertiesData", "CharterMember", avatar_data.caption_text);
+	}
+
+	LLAvatarPropertiesProcessor::observer_multimap_t observers = LLAvatarPropertiesProcessor::getInstance()->mObservers;
+
+	observer_multimap_t::iterator oi = observers.find(avatar_data.avatar_id);
+	observer_multimap_t::iterator end = observers.upper_bound(avatar_data.avatar_id);
+	for (; oi != end; ++oi)
+	{
+		oi->second->processAvatarProperties(avatar_data);
+	}
+}
+
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
new file mode 100644
index 0000000000..e8c0e253d7
--- /dev/null
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -0,0 +1,80 @@
+/** 
+ * @file llavatarpropertiesprocessor.h
+ * @brief LLAvatatIconCtrl base class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLAVATARPROPERTIESPROCESSOR_H
+#define LL_LLAVATARPROPERTIESPROCESSOR_H
+
+#include "lluuid.h"
+#include <map>
+
+class LLMessageSystem;
+
+struct LLAvatarData
+{
+	LLUUID 		agent_id;
+	LLUUID		avatar_id;
+	LLUUID		image_id;
+	LLUUID		fl_image_id;
+	LLUUID		partner_id;
+	std::string	about_text;
+	std::string	fl_about_text;
+	std::string	born_on;
+	std::string	profile_url;
+	U8		caption_index;
+	std::string	caption_text;
+	U32		flags;
+};
+
+class LLAvatarPropertiesObserver
+{
+public:
+	virtual ~LLAvatarPropertiesObserver() {}
+        virtual void processAvatarProperties(const LLAvatarData& avatar_data) = 0;
+};
+
+class LLAvatarPropertiesProcessor : public LLSingleton<LLAvatarPropertiesProcessor>
+{
+
+public:
+	virtual ~LLAvatarPropertiesProcessor() {}
+        void addObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer);
+        void removeObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer);
+
+	void sendAvatarPropertiesRequest(const LLUUID& avatar_id);
+        static void processAvatarPropertiesReply(LLMessageSystem *msg, void **);
+
+private:
+        typedef std::multimap<LLUUID, LLAvatarPropertiesObserver*> observer_multimap_t;
+        observer_multimap_t mObservers;
+};
+
+#endif  // LL_LLAVATARPROPERTIESPROCESSOR_H
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index db28c7ad38..1844934e6a 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -684,7 +684,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
 			{
 				std::string notifyMsg = notification->getMessage();
 				if (!notifyMsg.empty())
-					floater->addHistoryLine(notifyMsg,gSavedSettings.getColor4("SystemChatColor"));
+					floater->addHistoryLine(notifyMsg,gSavedSkinSettings.getColor4("SystemChatColor"));
 			}
 		}
 
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index 2395f3c5ae..4e2eebbab1 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -77,7 +77,6 @@ const F32 AGENT_TYPING_TIMEOUT = 5.f;	// seconds
 LLChatBar *gChatBar = NULL;
 
 // legacy calllback glue
-void toggleChatHistory(void* user_data);
 void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
 
 
@@ -97,7 +96,7 @@ private:
 //
 
 LLChatBar::LLChatBar() 
-:	LLPanel(LLStringUtil::null, LLRect(), BORDER_NO),
+:	LLPanel(),
 	mInputEditor(NULL),
 	mGestureLabelTimer(),
 	mLastSpecialChatChannel(0),
@@ -107,7 +106,7 @@ LLChatBar::LLChatBar()
 {
 	setIsChrome(TRUE);
 	
-	#if !LL_RELEASE_FOR_DOWNLOAD
+#if !LL_RELEASE_FOR_DOWNLOAD
 	childDisplayNotFound();
 #endif
 }
@@ -123,34 +122,23 @@ LLChatBar::~LLChatBar()
 
 BOOL LLChatBar::postBuild()
 {
-	childSetAction("History", toggleChatHistory, this);
-	childSetCommitCallback("Say", onClickSay, this);
+	getChild<LLUICtrl>("Say")->setCommitCallback(boost::bind(&LLChatBar::onClickSay, this, _1));
 
 	// attempt to bind to an existing combo box named gesture
-	setGestureCombo(getChild<LLComboBox>( "Gesture"));
-
-	LLButton * sayp = getChild<LLButton>("Say");
-	if(sayp)
-	{
-		setDefaultBtn(sayp);
-	}
+	setGestureCombo(getChild<LLComboBox>( "Gesture", TRUE, FALSE));
 
 	mInputEditor = getChild<LLLineEditor>("Chat Editor");
-	if (mInputEditor)
-	{
-		mInputEditor->setCallbackUserData(this);
-		mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke);
-		mInputEditor->setFocusLostCallback(&onInputEditorFocusLost, this);
-		mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus, this );
-		mInputEditor->setCommitOnFocusLost( FALSE );
-		mInputEditor->setRevertOnEsc( FALSE );
-		mInputEditor->setIgnoreTab(TRUE);
-		mInputEditor->setPassDelete(TRUE);
-		mInputEditor->setReplaceNewlinesWithSpaces(FALSE);
-
-		mInputEditor->setMaxTextLength(1023);
-		mInputEditor->setEnableLineHistory(TRUE);
-	}
+	mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke, this);
+	mInputEditor->setFocusLostCallback(&onInputEditorFocusLost, this);
+	mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus, this );
+	mInputEditor->setCommitOnFocusLost( FALSE );
+	mInputEditor->setRevertOnEsc( FALSE );
+	mInputEditor->setIgnoreTab(TRUE);
+	mInputEditor->setPassDelete(TRUE);
+	mInputEditor->setReplaceNewlinesWithSpaces(FALSE);
+
+	mInputEditor->setMaxTextLength(1023);
+	mInputEditor->setEnableLineHistory(TRUE);
 
 	mIsBuilt = TRUE;
 
@@ -209,10 +197,7 @@ void LLChatBar::refresh()
 		gAgent.stopTyping();
 	}
 
-	childSetValue("History", LLFloaterChat::instanceVisible(LLSD()));
-
 	childSetEnabled("Say", mInputEditor->getText().size() > 0);
-	childSetEnabled("Shout", mInputEditor->getText().size() > 0);
 
 }
 
@@ -311,8 +296,7 @@ void LLChatBar::setGestureCombo(LLComboBox* combo)
 	mGestureCombo = combo;
 	if (mGestureCombo)
 	{
-		mGestureCombo->setCommitCallback(onCommitGesture);
-		mGestureCombo->setCallbackUserData(this);
+		mGestureCombo->setCommitCallback(boost::bind(&LLChatBar::onCommitGesture, this, _1));
 
 		// now register observer since we have a place to put the results
 		mObserver = new LLChatBarGestureObserver(this);
@@ -553,20 +537,19 @@ void LLChatBar::onInputEditorGainFocus( LLFocusableElement* caller, void* userda
 	LLFloaterChat::setHistoryCursorAndScrollToEnd();
 }
 
-// static
-void LLChatBar::onClickSay( LLUICtrl* ctrl, void* userdata )
+void LLChatBar::onClickSay( LLUICtrl* ctrl )
 {
+	std::string cmd = ctrl->getValue().asString();
 	e_chat_type chat_type = CHAT_TYPE_NORMAL;
-	if (ctrl->getValue().asString() == "shout")
+	if (cmd == "shout")
 	{
 		chat_type = CHAT_TYPE_SHOUT;
 	}
-	else if (ctrl->getValue().asString() == "whisper")
+	else if (cmd == "whisper")
 	{
 		chat_type = CHAT_TYPE_WHISPER;
 	}
-	LLChatBar* self = (LLChatBar*) userdata;
-	self->sendChat(chat_type);
+	sendChat(chat_type);
 }
 
 void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate)
@@ -641,11 +624,9 @@ void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32
 }
 
 
-// static
-void LLChatBar::onCommitGesture(LLUICtrl* ctrl, void* data)
+void LLChatBar::onCommitGesture(LLUICtrl* ctrl)
 {
-	LLChatBar* self = (LLChatBar*)data;
-	LLCtrlListInterface* gestures = self->mGestureCombo ? self->mGestureCombo->getListInterface() : NULL;
+	LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL;
 	if (gestures)
 	{
 		S32 index = gestures->getFirstSelectedIndex();
@@ -665,23 +646,17 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl, void* data)
 		if (!revised_text.empty())
 		{
 			// Don't play nodding animation
-			self->sendChatFromViewer(revised_text, CHAT_TYPE_NORMAL, FALSE);
+			sendChatFromViewer(revised_text, CHAT_TYPE_NORMAL, FALSE);
 		}
 	}
-	self->mGestureLabelTimer.start();
-	if (self->mGestureCombo != NULL)
+	mGestureLabelTimer.start();
+	if (mGestureCombo != NULL)
 	{
 		// free focus back to chat bar
-		self->mGestureCombo->setFocus(FALSE);
+		mGestureCombo->setFocus(FALSE);
 	}
 }
 
-void toggleChatHistory(void* user_data)
-{
-	LLFloaterChat::toggleInstance(LLSD());
-}
-
-
 class LLChatHandler : public LLCommandHandler
 {
 public:
diff --git a/indra/newview/llchatbar.h b/indra/newview/llchatbar.h
index 56a98a78f9..93421da34f 100644
--- a/indra/newview/llchatbar.h
+++ b/indra/newview/llchatbar.h
@@ -82,14 +82,14 @@ public:
 	LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
 
 	// callbacks
-	static void	onClickSay( LLUICtrl*, void* userdata );
+	void onClickSay(LLUICtrl* ctrl);
 
 	static void	onTabClick( void* userdata );
 	static void	onInputEditorKeystroke(LLLineEditor* caller, void* userdata);
 	static void	onInputEditorFocusLost(LLFocusableElement* caller,void* userdata);
 	static void	onInputEditorGainFocus(LLFocusableElement* caller,void* userdata);
 
-	static void onCommitGesture(LLUICtrl* ctrl, void* data);
+	void onCommitGesture(LLUICtrl* ctrl);
 
 	static void startChat(const char* line);
 	static void stopChat();
diff --git a/indra/newview/llcloud.h b/indra/newview/llcloud.h
index f4ae03b689..155bf4eae9 100644
--- a/indra/newview/llcloud.h
+++ b/indra/newview/llcloud.h
@@ -72,7 +72,7 @@
 #include "v3dmath.h"
 #include "v4math.h"
 #include "v4color.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "lldarray.h"
 
 #include "llframetimer.h"
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp
index 5f8d9ed27b..096d4fb8ed 100644
--- a/indra/newview/llcolorswatch.cpp
+++ b/indra/newview/llcolorswatch.cpp
@@ -37,12 +37,12 @@
 
 // Linden library includes
 #include "v4color.h"
+#include "llwindow.h"	// setCursor()
 
 // Project includes
 #include "llui.h"
 #include "llrender.h"
 #include "lluiconstants.h"
-#include "llviewerwindow.h"
 #include "llviewercontrol.h"
 #include "llbutton.h"
 #include "lltextbox.h"
@@ -53,58 +53,53 @@
 
 static LLRegisterWidget<LLColorSwatchCtrl> r("color_swatch");
 
-LLColorSwatchCtrl::LLColorSwatchCtrl(const std::string& name, const LLRect& rect, const LLColor4& color,
-		void (*commit_callback)(LLUICtrl* ctrl, void* userdata),
-		void* userdata )
-:	LLUICtrl(name, rect, TRUE, commit_callback, userdata, FOLLOWS_LEFT | FOLLOWS_TOP),
-	mValid( TRUE ),
-	mColor( color ),
-	mBorderColor( gColors.getColor("DefaultHighlightLight") ),
-	mCanApplyImmediately(FALSE),
-	mOnCancelCallback(NULL),
-	mOnSelectCallback(NULL)
+LLColorSwatchCtrl::Params::Params()
+:	color("color", LLColor4::white),
+	can_apply_immediately("can_apply_immediately", false),
+	alpha_background_image("alpha_background_image"),
+	border_color("border_color"),
+    label_width("label_width", -1),
+	caption_text("caption_text"),
+	border("border")
 {
-	mCaption = new LLTextBox( name,
-		LLRect( 0, BTN_HEIGHT_SMALL, getRect().getWidth(), 0 ),
-		name,
-		LLFontGL::getFontSansSerifSmall() );
-	mCaption->setFollows( FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM );
-	addChild( mCaption );
-
-	// Scalable UI made this off-by-one, I don't know why. JC
-	LLRect border_rect(0, getRect().getHeight()-1, getRect().getWidth()-1, 0);
-	border_rect.mBottom += BTN_HEIGHT_SMALL;
-	mBorder = new LLViewBorder(std::string("border"), border_rect, LLViewBorder::BEVEL_IN);
-	addChild(mBorder);
-
-	mAlphaGradientImage = LLUI::getUIImage("color_swatch_alpha.tga");
+	name = "colorswatch";
 }
 
-LLColorSwatchCtrl::LLColorSwatchCtrl(const std::string& name, const LLRect& rect, const std::string& label, const LLColor4& color,
-		void (*commit_callback)(LLUICtrl* ctrl, void* userdata),
-		void* userdata )
-:	LLUICtrl(name, rect, TRUE, commit_callback, userdata, FOLLOWS_LEFT | FOLLOWS_TOP),
+LLColorSwatchCtrl::LLColorSwatchCtrl(const Params& p)
+:	LLUICtrl(p),
 	mValid( TRUE ),
-	mColor( color ),
-	mBorderColor( gColors.getColor("DefaultHighlightLight") ),
-	mCanApplyImmediately(FALSE),
-	mOnCancelCallback(NULL),
-	mOnSelectCallback(NULL)
-{
-	mCaption = new LLTextBox( label,
-		LLRect( 0, BTN_HEIGHT_SMALL, getRect().getWidth(), 0 ),
-		label,
-		LLFontGL::getFontSansSerifSmall() );
-	mCaption->setFollows( FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM );
+	mColor(p.color),
+	mCanApplyImmediately(p.can_apply_immediately),
+	mAlphaGradientImage(p.alpha_background_image),
+	mOnCancelCallback(p.cancel_callback()),
+	mOnSelectCallback(p.select_callback()),
+	mBorderColor(p.border_color()),
+	mLabelWidth(p.label_width)
+{	
+	LLTextBox::Params tp = p.caption_text;
+	// label_width is specified, not -1
+	if(mLabelWidth!= -1)
+	{
+		tp.rect(LLRect( 0, BTN_HEIGHT_SMALL, mLabelWidth, 0 ));
+	}
+	else
+	{
+		tp.rect(LLRect( 0, BTN_HEIGHT_SMALL, getRect().getWidth(), 0 ));
+	}
+	
+	tp.text(p.label);
+	mCaption = LLUICtrlFactory::create<LLTextBox>(tp);
 	addChild( mCaption );
 
-	// Scalable UI made this off-by-one, I don't know why. JC
-	LLRect border_rect(0, getRect().getHeight()-1, getRect().getWidth()-1, 0);
+	LLRect border_rect = getLocalRect();
+	border_rect.mTop -= 1;
+	border_rect.mRight -=1;
 	border_rect.mBottom += BTN_HEIGHT_SMALL;
-	mBorder = new LLViewBorder(std::string("border"), border_rect, LLViewBorder::BEVEL_IN);
-	addChild(mBorder);
 
-	mAlphaGradientImage = LLUI::getUIImage("color_swatch_alpha.tga");
+	LLViewBorder::Params params = p.border;
+	params.rect(border_rect);
+	mBorder = LLUICtrlFactory::create<LLViewBorder> (params);
+	addChild(mBorder);
 }
 
 LLColorSwatchCtrl::~LLColorSwatchCtrl ()
@@ -114,9 +109,8 @@ LLColorSwatchCtrl::~LLColorSwatchCtrl ()
 	if (pickerp)
 	{
 		pickerp->cancelSelection();
-		pickerp->close();
+		pickerp->closeFloater();
 	}
-	mAlphaGradientImage = NULL;
 }
 
 BOOL LLColorSwatchCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
@@ -206,7 +200,7 @@ void LLColorSwatchCtrl::draw()
 	mBorder->setKeyboardFocusHighlight(hasFocus());
 	// Draw border
 	LLRect border( 0, getRect().getHeight(), getRect().getWidth(), BTN_HEIGHT_SMALL );
-	gl_rect_2d( border, mBorderColor, FALSE );
+	gl_rect_2d( border, mBorderColor.get(), FALSE );
 
 	LLRect interior = border;
 	interior.stretch( -1 );
@@ -264,7 +258,7 @@ void LLColorSwatchCtrl::setEnabled( BOOL enabled )
 		if (pickerp)
 		{
 			pickerp->cancelSelection();
-			pickerp->close();
+			pickerp->closeFloater();
 		}
 	}
 }
@@ -295,11 +289,11 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op )
 
 			if (pick_op == COLOR_CANCEL && subject->mOnCancelCallback)
 			{
-				subject->mOnCancelCallback(subject, subject->mCallbackUserData);
+				subject->mOnCancelCallback( subject, LLSD());
 			}
 			else if (pick_op == COLOR_SELECT && subject->mOnSelectCallback)
 			{
-				subject->mOnSelectCallback(subject, subject->mCallbackUserData);
+				subject->mOnSelectCallback( subject, LLSD() );
 			}
 			else
 			{
@@ -343,59 +337,3 @@ void LLColorSwatchCtrl::showPicker(BOOL take_focus)
 	}
 }
 
-// virtual
-LLXMLNodePtr LLColorSwatchCtrl::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("color", TRUE)->setFloatValue(4, mColor.mV);
-
-	node->createChild("border_color", TRUE)->setFloatValue(4, mBorderColor.mV);
-
-	if (mCaption)
-	{
-		node->createChild("label", TRUE)->setStringValue(mCaption->getText());
-	}
-
-	node->createChild("can_apply_immediately", TRUE)->setBoolValue(mCanApplyImmediately);
-
-	return node;
-}
-
-LLView* LLColorSwatchCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("colorswatch");
-	node->getAttributeString("name", name);
-
-	std::string label;
-	node->getAttributeString("label", label);
-
-	LLColor4 color(1.f, 1.f, 1.f, 1.f);
-	node->getAttributeColor("initial_color", color);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	BOOL can_apply_immediately = FALSE;
-	node->getAttributeBOOL("can_apply_immediately", can_apply_immediately);
-
-	LLUICtrlCallback callback = NULL;
-
-	if (label.empty())
-	{
-		label.assign(node->getValue());
-	}
-
-	LLColorSwatchCtrl* color_swatch = new LLColorSwatchCtrl(
-		name, 
-		rect,
-		label,
-		color,
-		callback,
-		NULL );
-
-	color_swatch->setCanApplyImmediately(can_apply_immediately);
-	color_swatch->initFromXML(node, parent);
-
-	return color_swatch;
-}
diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h
index 0dd021f51f..a05926c2f5 100644
--- a/indra/newview/llcolorswatch.h
+++ b/indra/newview/llcolorswatch.h
@@ -37,6 +37,7 @@
 #include "v4color.h"
 #include "llfloater.h"
 #include "llviewerimage.h"
+#include "lltextbox.h"
 
 //
 // Classes
@@ -57,53 +58,65 @@ public:
 		COLOR_CANCEL
 	} EColorPickOp;
 
-	LLColorSwatchCtrl(const std::string& name, const LLRect& rect, const LLColor4& color,
-		void (*on_commit_callback)(LLUICtrl* ctrl, void* userdata),
-		void* callback_userdata);
-	LLColorSwatchCtrl(const std::string& name, const LLRect& rect, const std::string& label, const LLColor4& color,
-		void (*on_commit_callback)(LLUICtrl* ctrl, void* userdata),
-		void* callback_userdata);
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<LLColor4>			color;
+		Optional<bool>				can_apply_immediately;
+		Optional<LLUIImage*>		alpha_background_image;
+		Optional<commit_callback_t> cancel_callback;
+		Optional<commit_callback_t> select_callback;
+		Optional<LLUIColor>			border_color;
+		Optional<S32>				label_width;
+		
+		Optional<LLTextBox::Params>		caption_text;
+		Optional<LLViewBorder::Params>	border;
+		Params();
+	};
 
+protected:
+	LLColorSwatchCtrl(const Params& p);
+	friend class LLUICtrlFactory;
+public:
 	~LLColorSwatchCtrl ();
 
-	virtual void setValue(const LLSD& value);
+	/*virtual*/ void setValue(const LLSD& value);
 
-	virtual LLSD getValue() const { return mColor.getValue(); }
+	/*virtual*/ LLSD getValue() const { return mColor.getValue(); }
 	const LLColor4&	get()							{ return mColor; }
 	
 	void			set(const LLColor4& color, BOOL update_picker = FALSE, BOOL from_event = FALSE);
 	void			setOriginal(const LLColor4& color);
 	void			setValid(BOOL valid);
 	void			setLabel(const std::string& label);
+	void			setLabelWidth(S32 label_width) {mLabelWidth =label_width;}
 	void			setCanApplyImmediately(BOOL apply) { mCanApplyImmediately = apply; }
-	void			setOnCancelCallback(LLUICtrlCallback cb) { mOnCancelCallback = cb; }
-	void			setOnSelectCallback(LLUICtrlCallback cb) { mOnSelectCallback = cb; }
+	void			setOnCancelCallback(commit_callback_t cb) { mOnCancelCallback = cb; }
+	void			setOnSelectCallback(commit_callback_t cb) { mOnSelectCallback = cb; }
 	void			setFallbackImageName(const std::string& name) { mFallbackImageName = name; }
 
 	void			showPicker(BOOL take_focus);
 
-	virtual BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
-	virtual BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
-	virtual BOOL	handleDoubleClick(S32 x,S32 y,MASK mask);
-	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);
-	virtual BOOL	handleUnicodeCharHere(llwchar uni_char);
-	virtual void	draw();
-	virtual void	setEnabled( BOOL enabled );
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
+	/*virtual*/ BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
+	/*virtual*/ BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
+	/*virtual*/ BOOL	handleDoubleClick(S32 x,S32 y,MASK mask);
+	/*virtual*/ BOOL	handleHover(S32 x, S32 y, MASK mask);
+	/*virtual*/ BOOL	handleUnicodeCharHere(llwchar uni_char);
+	/*virtual*/ void	draw();
+	/*virtual*/ void	setEnabled( BOOL enabled );
 
 	static void		onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE );
 
 protected:
 	BOOL			mValid;
 	LLColor4		mColor;
-	LLColor4		mBorderColor;
+	LLUIColor		mBorderColor;
 	LLTextBox*		mCaption;
 	LLHandle<LLFloater> mPickerHandle;
 	LLViewBorder*	mBorder;
 	BOOL			mCanApplyImmediately;
-	LLUICtrlCallback mOnCancelCallback;
-	LLUICtrlCallback mOnSelectCallback;
+	commit_callback_t mOnCancelCallback;
+	commit_callback_t mOnSelectCallback;
+	S32             mLabelWidth;
 
 	LLPointer<LLUIImage> mAlphaGradientImage;
 	std::string		mFallbackImageName;
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index 689033a07b..096777ddd4 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -46,6 +46,7 @@
 #include "llassetuploadqueue.h"
 #include "llassetuploadresponders.h"
 #include "llchat.h"
+#include "llfloaterreg.h"
 #include "llviewerwindow.h"
 #include "llviewerobject.h"
 #include "llviewerobjectlist.h"
@@ -60,23 +61,17 @@
 #include "llfloaterchat.h"
 #include "llviewerstats.h"
 #include "lluictrlfactory.h"
+#include "lltrans.h"
 
 #include "llselectmgr.h"
 
+// *TODO: This should be separated into the script queue, and the floater views of that queue.
+// There should only be one floater class that can view any queue type
+
 ///----------------------------------------------------------------------------
 /// Local function declarations, constants, enums, and typedefs
 ///----------------------------------------------------------------------------
 
-// *TODO:Translate
-const std::string COMPILE_QUEUE_TITLE("Recompilation Progress");
-const std::string COMPILE_START_STRING("recompile");
-const std::string RESET_QUEUE_TITLE("Reset Progress");
-const std::string RESET_START_STRING("reset");
-const std::string RUN_QUEUE_TITLE("Set Running Progress");
-const std::string RUN_START_STRING("set running");
-const std::string NOT_RUN_QUEUE_TITLE("Set Not Running Progress");
-const std::string NOT_RUN_START_STRING("set not running");
-
 struct LLScriptQueueData
 {
 	LLUUID mQueueID;
@@ -92,54 +87,26 @@ struct LLScriptQueueData
 /// Class LLFloaterScriptQueue
 ///----------------------------------------------------------------------------
 
-// static
-LLMap<LLUUID, LLFloaterScriptQueue*> LLFloaterScriptQueue::sInstances;
-
-
 // Default constructor
-LLFloaterScriptQueue::LLFloaterScriptQueue(const std::string& name,
-										   const LLRect& rect,
-										   const std::string& title,
-										   const std::string& start_string) :
-	LLFloater(name, rect, title,
-			  RESIZE_YES, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT,
-			  DRAG_ON_TOP, MINIMIZE_YES, CLOSE_YES)
+LLFloaterScriptQueue::LLFloaterScriptQueue(const LLSD& key) :
+	LLFloater(key),
+	mDone(FALSE)
 {
-	mID.generate();
-	
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_queue.xml");
-
-	childSetAction("close",onCloseBtn,this);
-	childSetEnabled("close",FALSE);
-
-	setTitle(title);
-	
-	LLRect curRect = getRect();
-	translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
-	
-	mStartString = start_string;
-	mDone = FALSE;
-	sInstances.addData(mID, this);
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_queue.xml", FALSE);
 }
 
 // Destroys the object
 LLFloaterScriptQueue::~LLFloaterScriptQueue()
 {
-	sInstances.removeData(mID);
 }
 
-// find an instance by ID. Return NULL if it does not exist.
-// static
-LLFloaterScriptQueue* LLFloaterScriptQueue::findInstance(const LLUUID& id)
+BOOL LLFloaterScriptQueue::postBuild()
 {
-	if(sInstances.checkData(id))
-	{
-		return sInstances.getData(id);
-	}
-	return NULL;
+	childSetAction("close",onCloseBtn,this);
+	childSetEnabled("close",FALSE);
+	return TRUE;
 }
 
-
 // This is the callback method for the viewer object currently being
 // worked on.
 // NOT static, virtual!
@@ -185,7 +152,7 @@ void LLFloaterScriptQueue::inventoryChanged(LLViewerObject* viewer_object,
 void LLFloaterScriptQueue::onCloseBtn(void* user_data)
 {
 	LLFloaterScriptQueue* self = (LLFloaterScriptQueue*)user_data;
-	self->close();
+	self->closeFloater();
 }
 
 void LLFloaterScriptQueue::addObject(const LLUUID& id)
@@ -210,10 +177,12 @@ BOOL LLFloaterScriptQueue::start()
 		n_objects = selectHandle->getRootObjectCount();
 	}
 
-	buffer = llformat("Starting %s of %d items.", mStartString.c_str(), n_objects); // *TODO: Translate
+	LLStringUtil::format_map_t args;
+	args["[START]"] = mStartString;
+	args["[COUNT]"] = llformat ("%d", mObjectIDs.count());
+	buffer = getString ("Starting", args);
 	
-	LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
-	list->addCommentText(buffer);
+	getChild<LLScrollListCtrl>("queue output")->setCommentText(buffer);
 
 	return nextObject();
 }
@@ -245,12 +214,8 @@ BOOL LLFloaterScriptQueue::nextObject()
 	} while((mObjectIDs.count() > 0) && !successful_start);
 	if(isDone() && !mDone)
 	{
-		
-		LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
-
 		mDone = TRUE;
-		std::string buffer = "Done."; // *TODO: Translate
-		list->addCommentText(buffer);
+		getChild<LLScrollListCtrl>("queue output")->setCommentText(getString("Done"));
 		childSetEnabled("close",TRUE);
 	}
 	return successful_start;
@@ -275,7 +240,7 @@ BOOL LLFloaterScriptQueue::popNext()
 		{
 			llinfos << "LLFloaterScriptQueue::popNext() requesting inv for "
 					<< mCurrentObjectID << llendl;
-			LLUUID* id = new LLUUID(mID);
+			LLUUID* id = new LLUUID(getKey().asUUID());
 			registerVOInventoryListener(obj,id);
 			requestVOInventory();
 			rv = TRUE;
@@ -289,64 +254,48 @@ BOOL LLFloaterScriptQueue::popNext()
 /// Class LLFloaterCompileQueue
 ///----------------------------------------------------------------------------
 
-// static
-LLFloaterCompileQueue* LLFloaterCompileQueue::create(BOOL mono)
+class LLCompileFloaterUploadQueueSupplier : public LLAssetUploadQueueSupplier
 {
-	S32 left, top;
-	gFloaterView->getNewFloaterPosition(&left, &top);
-	LLRect rect = gSavedSettings.getRect("CompileOutputRect");
-	rect.translate(left - rect.mLeft, top - rect.mTop);
-	LLFloaterCompileQueue* new_queue = new LLFloaterCompileQueue("queue", rect);
+public:
 	
-	class LLCompileFloaterUploadQueueSupplier : public LLAssetUploadQueueSupplier
+	LLCompileFloaterUploadQueueSupplier(const LLUUID& queue_id) :
+		mQueueId(queue_id)
 	{
-	public:
-	
-		LLCompileFloaterUploadQueueSupplier(const LLUUID& queue_id) :
-			mQueueId(queue_id)
-		{
-		}
+	}
 		
-		virtual LLAssetUploadQueue* get() const 
+	virtual LLAssetUploadQueue* get() const 
+	{
+		LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance<LLFloaterCompileQueue>("compile_queue", LLSD(mQueueId));
+		if(NULL == queue)
 		{
-			LLFloaterCompileQueue* queue = 
-				(LLFloaterCompileQueue*) LLFloaterScriptQueue::findInstance(mQueueId);
-			
-			if(NULL == queue)
-			{
-				return NULL;
-			}
-			
-			return queue->mUploadQueue;
+			return NULL;
 		}
+		return queue->getUploadQueue();
+	}
 
-		virtual void log(std::string message) const
+	virtual void log(std::string message) const
+	{
+		LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance<LLFloaterCompileQueue>("compile_queue", LLSD(mQueueId));
+		if(NULL == queue)
 		{
-			LLFloaterCompileQueue* queue = 
-				(LLFloaterCompileQueue*) LLFloaterScriptQueue::findInstance(mQueueId);
-
-			if(NULL == queue)
-			{
-				return;
-			}
-
-			LLScrollListCtrl* list = queue->getChild<LLScrollListCtrl>("queue output");
-			list->addCommentText(message.c_str());
+			return;
 		}
+
+		queue->getChild<LLScrollListCtrl>("queue output")->setCommentText(message);
+	}
 		
-	private:
-		LLUUID mQueueId;
-	};
-																 															 
-	new_queue->mUploadQueue = new LLAssetUploadQueue(new LLCompileFloaterUploadQueueSupplier(new_queue->getID()));															 
-	new_queue->mMono = mono;
-	new_queue->open();
-	return new_queue;
-}
+private:
+	LLUUID mQueueId;
+};
 
-LLFloaterCompileQueue::LLFloaterCompileQueue(const std::string& name, const LLRect& rect)
-: LLFloaterScriptQueue(name, rect, COMPILE_QUEUE_TITLE, COMPILE_START_STRING)
-{ }
+LLFloaterCompileQueue::LLFloaterCompileQueue(const LLSD& key)
+  : LLFloaterScriptQueue(key)
+{
+	setTitle(LLTrans::getString("CompileQueueTitle"));
+	setStartString(LLTrans::getString("CompileQueueStart"));
+														 															 
+	mUploadQueue = new LLAssetUploadQueue(new LLCompileFloaterUploadQueueSupplier(key.asUUID()));
+}
 
 LLFloaterCompileQueue::~LLFloaterCompileQueue()
 { 
@@ -391,7 +340,7 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
 		for(iter = asset_item_map.begin(); iter != asset_item_map.end(); iter++)
 		{
 			LLInventoryItem *itemp = iter->second;
-			LLScriptQueueData* datap = new LLScriptQueueData(getID(),
+			LLScriptQueueData* datap = new LLScriptQueueData(getKey().asUUID(),
 												 itemp->getName(),
 												 viewer_object->getID(),
 												 itemp->getUUID());
@@ -419,9 +368,12 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
 {
 	llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl;
 	LLScriptQueueData* data = (LLScriptQueueData*)user_data;
-	if(!data) return;
-	LLFloaterCompileQueue* queue = static_cast<LLFloaterCompileQueue*> 
-				(LLFloaterScriptQueue::findInstance(data->mQueueID));
+	if(!data)
+	{
+		return;
+	}
+	LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance<LLFloaterCompileQueue>("compile_queue", data->mQueueID);
+	
 	std::string buffer;
 	if(queue && (0 == status))
 	{
@@ -447,13 +399,13 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
 				file.read(script_data, script_size);
 
 				queue->mUploadQueue->queue(filename, data->mTaskId, 
-				data->mItemId, is_running, queue->mMono, queue->getID(),
-				script_data, script_size, data->mScriptName);
+										   data->mItemId, is_running, queue->mMono, queue->getKey().asUUID(),
+										   script_data, script_size, data->mScriptName);
 			}
 			else
 			{
 				// It's now in the file, now compile it.
-				buffer = std::string("Downloaded, now compiling: ") + data->mScriptName; // *TODO: Translate
+				buffer = LLTrans::getString("CompileQueueDownloadedCompiling") + (": ") + data->mScriptName;
 
 				// Write script to local file for compilation.
 				LLFILE *fp = LLFile::fopen(filename, "wb");	 /*Flawfinder: ignore*/
@@ -492,19 +444,19 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
 
 		if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status )
 		{
-			LLChat chat(std::string("Script not found on server.")); // *TODO: Translate
+			LLChat chat(LLTrans::getString("CompileQueueScriptNotFound"));
 			LLFloaterChat::addChat(chat);
-			buffer = std::string("Problem downloading: ") + data->mScriptName; // *TODO: Translate
+			buffer = LLTrans::getString("CompileQueueProblemDownloading") + (": ") + data->mScriptName;
 		}
 		else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status)
 		{
-			LLChat chat(std::string("Insufficient permissions to download a script.")); // *TODO: Translate
+			LLChat chat(LLTrans::getString("CompileQueueInsufficientPermDownload"));
 			LLFloaterChat::addChat(chat);
-			buffer = std::string("Insufficient permissions for: ") + data->mScriptName; // *TODO: Translate
+			buffer = LLTrans::getString("CompileQueueInsufficientPermFor") + (": ") + data->mScriptName;
 		}
 		else
 		{
-			buffer = std::string("Unknown failure to download ") + data->mScriptName; // *TODO: Translate
+			buffer = LLTrans::getString("CompileQueueUnknownFailure") + (" ") + data->mScriptName;
 		}
 
 		llwarns << "Problem downloading script asset." << llendl;
@@ -512,8 +464,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
 	}
 	if(queue && (buffer.size() > 0)) 
 	{
-		LLScrollListCtrl* list = queue->getChild<LLScrollListCtrl>("queue output");
-		list->addCommentText(buffer);
+		queue->getChild<LLScrollListCtrl>("queue output")->setCommentText(buffer);
 	}
 	delete data;
 }
@@ -536,8 +487,7 @@ void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void*
 {
 	llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl;
 	LLCompileQueueData* data = (LLCompileQueueData*)user_data;
-	LLFloaterCompileQueue* queue = static_cast<LLFloaterCompileQueue*> 
-				(LLFloaterScriptQueue::findInstance(data->mQueueID));
+	LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance<LLFloaterCompileQueue>("compile_queue", data->mQueueID);
 	if(queue && (0 == status) && data)
 	{
 		queue->saveItemByItemID(data->mItemId);
@@ -587,7 +537,7 @@ void LLFloaterCompileQueue::compile(const std::string& filename,
 		llinfos << "compile successful." << llendl;
 		
 		// Save LSL bytecode
-		LLCompileQueueData* data = new LLCompileQueueData(mID, item_id);
+		LLCompileQueueData* data = new LLCompileQueueData(getKey().asUUID(), item_id);
 		gAssetStorage->storeAssetData(dst_filename, new_asset_id,
 									LLAssetType::AT_LSL_BYTECODE,
 									&LLFloaterCompileQueue::onSaveBytecodeComplete,
@@ -656,23 +606,13 @@ void LLFloaterCompileQueue::saveItemByItemID(const LLUUID& asset_id)
 /// Class LLFloaterResetQueue
 ///----------------------------------------------------------------------------
 
-// static
-LLFloaterResetQueue* LLFloaterResetQueue::create()
+LLFloaterResetQueue::LLFloaterResetQueue(const LLSD& key)
+  : LLFloaterScriptQueue(key)
 {
-	S32 left, top;
-	gFloaterView->getNewFloaterPosition(&left, &top);
-	LLRect rect = gSavedSettings.getRect("CompileOutputRect");
-	rect.translate(left - rect.mLeft, top - rect.mTop);
-	LLFloaterResetQueue* new_queue = new LLFloaterResetQueue("queue", rect);
-	gFloaterView->addChild(new_queue);
-	new_queue->open();
-	return new_queue;
+	setTitle(LLTrans::getString("ResetQueueTitle"));
+	setStartString(LLTrans::getString("ResetQueueStart"));
 }
 
-LLFloaterResetQueue::LLFloaterResetQueue(const std::string& name, const LLRect& rect)
-: LLFloaterScriptQueue(name, rect, RESET_QUEUE_TITLE, RESET_START_STRING)
-{ }
-
 LLFloaterResetQueue::~LLFloaterResetQueue()
 { 
 }
@@ -695,10 +635,9 @@ void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj,
 			if (object)
 			{
 				LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it));
-				LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
 				std::string buffer;
-				buffer = std::string("Resetting: ") + item->getName(); // *TODO: Translate
-				list->addCommentText(buffer);
+				buffer = getString("Resetting") + (": ") + item->getName();
+				getChild<LLScrollListCtrl>("queue output")->setCommentText(buffer);
 				LLMessageSystem* msg = gMessageSystem;
 				msg->newMessageFast(_PREHASH_ScriptReset);
 				msg->nextBlockFast(_PREHASH_AgentData);
@@ -719,22 +658,13 @@ void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj,
 /// Class LLFloaterRunQueue
 ///----------------------------------------------------------------------------
 
-// static
-LLFloaterRunQueue* LLFloaterRunQueue::create()
+LLFloaterRunQueue::LLFloaterRunQueue(const LLSD& key)
+  : LLFloaterScriptQueue(key)
 {
-	S32 left, top;
-	gFloaterView->getNewFloaterPosition(&left, &top);
-	LLRect rect = gSavedSettings.getRect("CompileOutputRect");
-	rect.translate(left - rect.mLeft, top - rect.mTop);
-	LLFloaterRunQueue* new_queue = new LLFloaterRunQueue("queue", rect);
-	new_queue->open();		 /*Flawfinder: ignore*/
-	return new_queue;
+	setTitle(LLTrans::getString("RunQueueTitle"));
+	setStartString(LLTrans::getString("RunQueueStart"));
 }
 
-LLFloaterRunQueue::LLFloaterRunQueue(const std::string& name, const LLRect& rect)
-: LLFloaterScriptQueue(name, rect, RUN_QUEUE_TITLE, RUN_START_STRING)
-{ }
-
 LLFloaterRunQueue::~LLFloaterRunQueue()
 { 
 }
@@ -759,8 +689,8 @@ void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj,
 				LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it));
 				LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
 				std::string buffer;
-				buffer = std::string("Running: ") + item->getName(); // *TODO: Translate
-				list->addCommentText(buffer);
+				buffer = getString("Running") + (": ") + item->getName();
+				list->setCommentText(buffer);
 
 				LLMessageSystem* msg = gMessageSystem;
 				msg->newMessageFast(_PREHASH_SetScriptRunning);
@@ -783,22 +713,13 @@ void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj,
 /// Class LLFloaterNotRunQueue
 ///----------------------------------------------------------------------------
 
-// static
-LLFloaterNotRunQueue* LLFloaterNotRunQueue::create()
+LLFloaterNotRunQueue::LLFloaterNotRunQueue(const LLSD& key)
+  : LLFloaterScriptQueue(key)
 {
-	S32 left, top;
-	gFloaterView->getNewFloaterPosition(&left, &top);
-	LLRect rect = gSavedSettings.getRect("CompileOutputRect");
-	rect.translate(left - rect.mLeft, top - rect.mTop);
-	LLFloaterNotRunQueue* new_queue = new LLFloaterNotRunQueue("queue", rect);
-	new_queue->open();	 /*Flawfinder: ignore*/
-	return new_queue;
+	setTitle(LLTrans::getString("NotRunQueueTitle"));
+	setStartString(LLTrans::getString("NotRunQueueStart"));
 }
 
-LLFloaterNotRunQueue::LLFloaterNotRunQueue(const std::string& name, const LLRect& rect)
-: LLFloaterScriptQueue(name, rect, NOT_RUN_QUEUE_TITLE, NOT_RUN_START_STRING)
-{ }
-
 LLFloaterNotRunQueue::~LLFloaterNotRunQueue()
 { 
 }
@@ -823,8 +744,8 @@ void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj,
 				LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it));
 				LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
 				std::string buffer;
-				buffer = std::string("Not running: ") +item->getName(); // *TODO: Translate
-				list->addCommentText(buffer);
+				buffer = getString("NotRunning") + (": ") +item->getName();
+				list->setCommentText(buffer);
 	
 				LLMessageSystem* msg = gMessageSystem;
 				msg->newMessageFast(_PREHASH_SetScriptRunning);
diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h
index 51240423ba..063d573239 100644
--- a/indra/newview/llcompilequeue.h
+++ b/indra/newview/llcompilequeue.h
@@ -59,20 +59,20 @@
 class LLFloaterScriptQueue : public LLFloater, public LLVOInventoryListener
 {
 public:
+	LLFloaterScriptQueue(const LLSD& key);
+	virtual ~LLFloaterScriptQueue();
+
+	/*virtual*/ BOOL postBuild();
+	
+	void setMono(bool mono) { mMono = mono; }
+	
 	// addObject() accepts an object id.
 	void addObject(const LLUUID& id);
 
 	// start() returns TRUE if the queue has started, otherwise FALSE.
 	BOOL start();
-
-	// find an instance by ID. Return NULL if it does not exist.
-	static LLFloaterScriptQueue* findInstance(const LLUUID& id);
-
+	
 protected:
-	LLFloaterScriptQueue(const std::string& name, const LLRect& rect,
-						 const std::string& title, const std::string& start_string);
-	virtual ~LLFloaterScriptQueue();
-
 	// This is the callback method for the viewer object currently
 	// being worked on.
 	/*virtual*/ void inventoryChanged(LLViewerObject* obj,
@@ -94,8 +94,7 @@ protected:
 	BOOL nextObject();
 	BOOL popNext();
 
-	// Get this instances ID.
-	const LLUUID& getID() const { return mID; } 
+	void setStartString(const std::string& s) { mStartString = s; }
 	
 protected:
 	// UI
@@ -107,10 +106,8 @@ protected:
 	LLUUID mCurrentObjectID;
 	BOOL mDone;
 
-	LLUUID mID;
-	static LLMap<LLUUID, LLFloaterScriptQueue*> sInstances;
-
 	std::string mStartString;
+	BOOL mMono;
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -131,20 +128,19 @@ class LLAssetUploadQueue;
 
 class LLFloaterCompileQueue : public LLFloaterScriptQueue
 {
+	friend class LLFloaterReg;
 public:
-	// Use this method to create a compile queue. Once created, it
-	// will be responsible for it's own destruction.
-	static LLFloaterCompileQueue* create(BOOL mono);
-
 	static void onSaveBytecodeComplete(const LLUUID& asset_id,
 									void* user_data,
 									S32 status);
 									
 	// remove any object in mScriptScripts with the matching uuid.
 	void removeItemByItemID(const LLUUID& item_id);
+	
+	LLAssetUploadQueue* getUploadQueue() { return mUploadQueue; }
 
 protected:
-	LLFloaterCompileQueue(const std::string& name, const LLRect& rect);
+	LLFloaterCompileQueue(const LLSD& key);
 	virtual ~LLFloaterCompileQueue();
 	
 	// This is called by inventoryChanged
@@ -173,12 +169,11 @@ protected:
 
 	// find InventoryItem given item id.
 	const LLInventoryItem* findItemByItemID(const LLUUID& item_id) const;
-
+	
 protected:
 	LLViewerInventoryItem::item_array_t mCurrentScripts;
 
 private:
-	BOOL mMono; // Compile to mono.
 	LLAssetUploadQueue* mUploadQueue;
 };
 
@@ -190,20 +185,14 @@ private:
 
 class LLFloaterResetQueue : public LLFloaterScriptQueue
 {
-public:
-	// Use this method to create a reset queue. Once created, it
-	// will be responsible for it's own destruction.
-	static LLFloaterResetQueue* create();
-
+	friend class LLFloaterReg;
 protected:
-	LLFloaterResetQueue(const std::string& name, const LLRect& rect);
+	LLFloaterResetQueue(const LLSD& key);
 	virtual ~LLFloaterResetQueue();
 	
 	// This is called by inventoryChanged
 	virtual void handleInventory(LLViewerObject* viewer_obj,
 								InventoryObjectList* inv);
-
-protected:
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -214,20 +203,14 @@ protected:
 
 class LLFloaterRunQueue : public LLFloaterScriptQueue
 {
-public:
-	// Use this method to create a run queue. Once created, it
-	// will be responsible for it's own destruction.
-	static LLFloaterRunQueue* create();
-
+	friend class LLFloaterReg;
 protected:
-	LLFloaterRunQueue(const std::string& name, const LLRect& rect);
+	LLFloaterRunQueue(const LLSD& key);
 	virtual ~LLFloaterRunQueue();
 	
 	// This is called by inventoryChanged
 	virtual void handleInventory(LLViewerObject* viewer_obj,
 								InventoryObjectList* inv);
-
-protected:
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -238,20 +221,14 @@ protected:
 
 class LLFloaterNotRunQueue : public LLFloaterScriptQueue
 {
-public:
-	// Use this method to create a not run queue. Once created, it
-	// will be responsible for it's own destruction.
-	static LLFloaterNotRunQueue* create();
-
+	friend class LLFloaterReg;
 protected:
-	LLFloaterNotRunQueue(const std::string& name, const LLRect& rect);
+	LLFloaterNotRunQueue(const LLSD& key);
 	virtual ~LLFloaterNotRunQueue();
 	
 	// This is called by inventoryChanged
 	virtual void handleInventory(LLViewerObject* viewer_obj,
 								InventoryObjectList* inv);
-
-protected:
 };
 
 #endif // LL_LLCOMPILEQUEUE_H
diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp
index 71ecca5d41..19a560abf2 100644
--- a/indra/newview/llcurrencyuimanager.cpp
+++ b/indra/newview/llcurrencyuimanager.cpp
@@ -46,6 +46,7 @@
 #include "llviewchildren.h"
 #include "llxmlrpctransaction.h"
 #include "llviewernetwork.h"
+#include "llpanel.h"
 
 
 const F64 CURRENCY_ESTIMATE_FREQUENCY = 2.0;
@@ -355,8 +356,7 @@ void LLCurrencyUIManager::Impl::prepare()
 	if (lindenAmount)
 	{
 		lindenAmount->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32);
-		lindenAmount->setKeystrokeCallback(onCurrencyKey);
-		lindenAmount->setCallbackUserData(this);
+		lindenAmount->setKeystrokeCallback(onCurrencyKey, this);
 	}
 }
 
diff --git a/indra/newview/lldebugmessagebox.cpp b/indra/newview/lldebugmessagebox.cpp
index 4188ecc0e2..9eee3b239c 100644
--- a/indra/newview/lldebugmessagebox.cpp
+++ b/indra/newview/lldebugmessagebox.cpp
@@ -50,32 +50,69 @@
 std::map<std::string, LLDebugVarMessageBox*> LLDebugVarMessageBox::sInstances;
 
 LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarType var_type, void *var) : 
-	LLFloater(std::string("msg box"), LLRect(10,160,400,10), title),
+	LLFloater(),
 	mVarType(var_type), mVarData(var), mAnimate(FALSE)
 {
+	setRect(LLRect(10,160,400,10));
+	
+	LLSliderCtrl::Params slider_p;
+	slider_p.label(title);
+	slider_p.label_width(70);
+	slider_p.text_width(40);
+	slider_p.can_edit_text(true);
+	slider_p.show_text(true);
+
+	mSlider1 = NULL;
+	mSlider2 = NULL;
+	mSlider3 = NULL;
+
 	switch(var_type)
 	{
 	case VAR_TYPE_F32:
-	  mSlider1 = new LLSliderCtrl(std::string("slider 1"), LLRect(20,130,190,110), title, NULL, 70, 130, TRUE, TRUE, FALSE, NULL, NULL, *((F32*)var), -100.f, 100.f, 0.1f, LLStringUtil::null);
-		mSlider1->setPrecision(3);
+		slider_p.name("slider 1");
+		slider_p.rect(LLRect(20,130,190,110));
+		slider_p.initial_value(*((F32*)var));
+		slider_p.min_value(-100.f);
+		slider_p.max_value(100.f);
+		slider_p.increment(0.1f);
+		slider_p.decimal_digits(3);
+		mSlider1 = LLUICtrlFactory::create<LLSliderCtrl>(slider_p);
 		addChild(mSlider1);
-		mSlider2 = NULL;
-		mSlider3 = NULL;
 		break;
 	case VAR_TYPE_S32:
-		mSlider1 = new LLSliderCtrl(std::string("slider 1"), LLRect(20,100,190,80), title, NULL, 70, 130, TRUE, TRUE, FALSE, NULL, NULL, (F32)*((S32*)var), -255.f, 255.f, 1.f, LLStringUtil::null);
-		mSlider1->setPrecision(0);
+		slider_p.name("slider 1");
+		slider_p.rect(LLRect(20,100,190,80));
+		slider_p.initial_value((F32)*((S32*)var));
+		slider_p.min_value(-255.f);
+		slider_p.max_value(255.f);
+		slider_p.increment(1.f);
+		slider_p.decimal_digits(0);
+		mSlider1 = LLUICtrlFactory::create<LLSliderCtrl>(slider_p);
 		addChild(mSlider1);
-		mSlider2 = NULL;
-		mSlider3 = NULL;
 		break;
 	case VAR_TYPE_VEC3:
-		mSlider1 = new LLSliderCtrl(std::string("slider 1"), LLRect(20,130,190,110), std::string("x: "), NULL, 70, 130, TRUE, TRUE, FALSE, NULL, NULL, ((LLVector3*)var)->mV[VX], -100.f, 100.f, 0.1f, LLStringUtil::null);
-		mSlider1->setPrecision(3);
-		mSlider2 = new LLSliderCtrl(std::string("slider 2"), LLRect(20,100,190,80), std::string("y: "), NULL, 70, 130, TRUE, TRUE, FALSE, NULL, NULL, ((LLVector3*)var)->mV[VY], -100.f, 100.f, 0.1f, LLStringUtil::null);
-		mSlider2->setPrecision(3);
-		mSlider3 = new LLSliderCtrl(std::string("slider 3"), LLRect(20,70,190,50), std::string("z: "), NULL, 70, 130, TRUE, TRUE, FALSE, NULL, NULL, ((LLVector3*)var)->mV[VZ], -100.f, 100.f, 0.1f, LLStringUtil::null);
-		mSlider3->setPrecision(3);
+		slider_p.name("slider 1");
+		slider_p.label("x: ");
+		slider_p.rect(LLRect(20,130,190,110));
+		slider_p.initial_value(((LLVector3*)var)->mV[VX]);
+		slider_p.min_value(-100.f);
+		slider_p.max_value(100.f);
+		slider_p.increment(0.1f);
+		slider_p.decimal_digits(3);
+		mSlider1 = LLUICtrlFactory::create<LLSliderCtrl>(slider_p);
+
+		slider_p.name("slider 2");
+		slider_p.label("y: ");
+		slider_p.rect(LLRect(20,100,190,80));
+		slider_p.initial_value(((LLVector3*)var)->mV[VY]);
+		mSlider2 = LLUICtrlFactory::create<LLSliderCtrl>(slider_p);
+
+		slider_p.name("slider 3");
+		slider_p.label("z: ");
+		slider_p.rect(LLRect(20,70,190,50));
+		slider_p.initial_value(((LLVector3*)var)->mV[VZ]);
+		mSlider2 = LLUICtrlFactory::create<LLSliderCtrl>(slider_p);
+
 		addChild(mSlider1);
 		addChild(mSlider2);
 		addChild(mSlider3);
@@ -85,10 +122,18 @@ LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarTy
 		break;
 	}
 
-	mAnimateButton = new LLButton(std::string("Animate"), LLRect(20, 45, 180, 25), LLStringUtil::null, onAnimateClicked, this);
+	LLButton::Params p;
+	p.name(std::string("Animate"));
+	p.rect(LLRect(20, 45, 180, 25));
+	p.click_callback.function(boost::bind(&LLDebugVarMessageBox::onAnimateClicked, this, _2));
+	mAnimateButton = LLUICtrlFactory::create<LLButton>(p);
 	addChild(mAnimateButton);
 
-	mText = new LLTextBox(std::string("value"), LLRect(20,20,190,0));
+	LLTextBox::Params params;
+	params.name("value");
+	params.text(params.name);
+	params.rect(LLRect(20,20,190,0));
+	mText = LLUICtrlFactory::create<LLTextBox> (params);
 	addChild(mText);
 
 	//disable hitting enter closes dialog
@@ -112,8 +157,7 @@ void LLDebugVarMessageBox::show(const std::string& title, F32 *var, F32 max_valu
 	{
 		box->mSlider1->setValue(*var);
 	}
-	box->mSlider1->setCommitCallback(slider_changed);
-	box->mSlider1->setCallbackUserData(box);
+	box->mSlider1->setCommitCallback(boost::bind(&LLDebugVarMessageBox::sliderChanged, box, _2));
 #endif
 }
 
@@ -129,8 +173,7 @@ void LLDebugVarMessageBox::show(const std::string& title, S32 *var, S32 max_valu
 	{
 		box->mSlider1->setValue((F32)*var);
 	}
-	box->mSlider1->setCommitCallback(slider_changed);
-	box->mSlider1->setCallbackUserData(box);
+	box->mSlider1->setCommitCallback(boost::bind(&LLDebugVarMessageBox::sliderChanged, box, _2));
 #endif
 }
 
@@ -142,20 +185,17 @@ void LLDebugVarMessageBox::show(const std::string& title, LLVector3 *var, LLVect
 	box->mSlider1->setMaxValue(max_value.mV[VX]);
 	box->mSlider1->setMinValue(-max_value.mV[VX]);
 	box->mSlider1->setIncrement(increment.mV[VX]);
-	box->mSlider1->setCommitCallback(slider_changed);
-	box->mSlider1->setCallbackUserData(box);
+	box->mSlider1->setCommitCallback(boost::bind(&LLDebugVarMessageBox::sliderChanged, box, _2));
 
 	box->mSlider2->setMaxValue(max_value.mV[VX]);
 	box->mSlider2->setMinValue(-max_value.mV[VX]);
 	box->mSlider2->setIncrement(increment.mV[VX]);
-	box->mSlider2->setCommitCallback(slider_changed);
-	box->mSlider2->setCallbackUserData(box);
+	box->mSlider2->setCommitCallback(boost::bind(&LLDebugVarMessageBox::sliderChanged, box, _2));
 
 	box->mSlider3->setMaxValue(max_value.mV[VX]);
 	box->mSlider3->setMinValue(-max_value.mV[VX]);
 	box->mSlider3->setIncrement(increment.mV[VX]);
-	box->mSlider3->setCommitCallback(slider_changed);
-	box->mSlider3->setCallbackUserData(box);
+	box->mSlider3->setCommitCallback(boost::bind(&LLDebugVarMessageBox::sliderChanged, box, _2));
 #endif
 }
 
@@ -170,45 +210,44 @@ LLDebugVarMessageBox* LLDebugVarMessageBox::show(const std::string& title, EDebu
 		sInstances[title_string] = box;
 		gFloaterView->addChild(box);
 		box->reshape(200,150);
-		box->open();		 /*Flawfinder: ignore*/
+		box->openFloater();
 		box->mTitle = title_string;
 	}
 
 	return box;
 }
 
-void LLDebugVarMessageBox::slider_changed(LLUICtrl* ctrl, void* user_data)
+void LLDebugVarMessageBox::sliderChanged(const LLSD& data)
 {
-	LLDebugVarMessageBox *msg_box = (LLDebugVarMessageBox*)user_data;
-	if (!msg_box || !msg_box->mVarData) return;
+	if (!mVarData)
+		return;
 
-	switch(msg_box->mVarType)
+	switch(mVarType)
 	{
 	case VAR_TYPE_F32:
-		*((F32*)msg_box->mVarData) = (F32)msg_box->mSlider1->getValue().asReal();
+		*((F32*)mVarData) = (F32)mSlider1->getValue().asReal();
 		break;
 	case VAR_TYPE_S32:
-		*((S32*)msg_box->mVarData) = (S32)msg_box->mSlider1->getValue().asInteger();
+		*((S32*)mVarData) = (S32)mSlider1->getValue().asInteger();
 		break;
 	case VAR_TYPE_VEC3:
 	{
-		LLVector3* vec_p = (LLVector3*)msg_box->mVarData;
-		vec_p->setVec((F32)msg_box->mSlider1->getValue().asReal(), 
-			(F32)msg_box->mSlider2->getValue().asReal(), 
-			(F32)msg_box->mSlider3->getValue().asReal());
+		LLVector3* vec_p = (LLVector3*)mVarData;
+		vec_p->setVec((F32)mSlider1->getValue().asReal(), 
+			(F32)mSlider2->getValue().asReal(), 
+			(F32)mSlider3->getValue().asReal());
 		break;
 	}
 	default:
-		llwarns << "Unhandled var type " << msg_box->mVarType << llendl;
+		llwarns << "Unhandled var type " << mVarType << llendl;
 		break;
 	}
 }
 
-void LLDebugVarMessageBox::onAnimateClicked(void* user_data)
+void LLDebugVarMessageBox::onAnimateClicked(const LLSD& data)
 {
-	LLDebugVarMessageBox* msg_boxp = (LLDebugVarMessageBox*)user_data;
-	msg_boxp->mAnimate = !msg_boxp->mAnimate;
-	msg_boxp->mAnimateButton->setToggleState(msg_boxp->mAnimate);
+	mAnimate = !mAnimate;
+	mAnimateButton->setToggleState(mAnimate);
 }
 
 void LLDebugVarMessageBox::onClose(bool app_quitting)
@@ -245,16 +284,16 @@ void LLDebugVarMessageBox::draw()
 		{
 			F32 animated_val = clamp_rescale(fmodf((F32)LLFrameTimer::getElapsedSeconds() / 5.f, 1.f), 0.f, 1.f, 0.f, mSlider1->getMaxValue());
 			mSlider1->setValue(animated_val);
-			slider_changed(mSlider1, this);
+			sliderChanged(LLSD());
 			if (mSlider2)
 			{
 				mSlider2->setValue(animated_val);
-				slider_changed(mSlider2, this);
+				sliderChanged(LLSD());
 			}
 			if (mSlider3)
 			{
 				mSlider3->setValue(animated_val);
-				slider_changed(mSlider3, this);
+				sliderChanged(LLSD());
 			}
 		}
 	}
diff --git a/indra/newview/lldebugmessagebox.h b/indra/newview/lldebugmessagebox.h
index 07062218ac..76e128cfc1 100644
--- a/indra/newview/lldebugmessagebox.h
+++ b/indra/newview/lldebugmessagebox.h
@@ -66,8 +66,8 @@ protected:
 	~LLDebugVarMessageBox();
 
 	static LLDebugVarMessageBox* show(const std::string& title, EDebugVarType var_type, void *var);
-	static void slider_changed(LLUICtrl* ctrl, void* user_data);
-	static void onAnimateClicked(void* user_data);
+	void sliderChanged(const LLSD& data);
+	void onAnimateClicked(const LLSD& data);
 
 public:
 	static void show(const std::string& title, F32 *var, F32 max_value = 100.f, F32 increment = 0.1f);
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 40f5202067..2af29260f4 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -35,16 +35,14 @@
 #include "lldebugview.h"
 
 // library includes
-#include "llframestatview.h"
 #include "llfasttimerview.h"
 #include "llmemoryview.h"
 #include "llconsole.h"
 #include "lltextureview.h"
 #include "llresmgr.h"
 #include "imageids.h"
-#include "llvelocitybar.h"
+#include "llviewercontrol.h"
 #include "llviewerwindow.h"
-#include "llfloaterstats.h"
 
 //
 // Globals
@@ -56,57 +54,51 @@ LLDebugView* gDebugView = NULL;
 // Methods
 //
 
-LLDebugView::LLDebugView(const std::string& name, const LLRect &rect)
-:	LLView(name, rect, FALSE)
+LLDebugView::LLDebugView(const LLDebugView::Params& p)
+:	LLView(p)
 {
 	LLRect r;
+	LLRect rect(p.rect);
 
 	r.set(10, rect.getHeight() - 100, rect.getWidth()/2, 100);
-	mDebugConsolep = new LLConsole("debug console", 20, r, -1, 0.f );
-	mDebugConsolep->setFollowsBottom();
-	mDebugConsolep->setFollowsLeft();
-	mDebugConsolep->setVisible( FALSE );
+	LLConsole::Params cp;
+	cp.name("debug console");
+	cp.max_lines(20);
+	cp.rect(r);
+	cp.font(LLFontGL::getFontMonospace());
+	cp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_LEFT);
+	cp.visible(false);
+	mDebugConsolep = LLUICtrlFactory::create<LLConsole>(cp);
 	addChild(mDebugConsolep);
 
 	r.set(150 - 25, rect.getHeight() - 50, rect.getWidth()/2 - 25, rect.getHeight() - 450);
-	mFrameStatView = new LLFrameStatView("frame stat", r);
-	mFrameStatView->setFollowsTop();
-	mFrameStatView->setFollowsLeft();
-	mFrameStatView->setVisible(FALSE);			// start invisible
-	addChild(mFrameStatView);
 
 	r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.75f), 
   									 (S32) (gViewerWindow->getVirtualWindowRect().getHeight() * 0.75f));
-	mFastTimerView = new LLFastTimerView("fast timers", r);
+	mFastTimerView = new LLFastTimerView(r);
 	mFastTimerView->setFollowsTop();
 	mFastTimerView->setFollowsLeft();
 	mFastTimerView->setVisible(FALSE);			// start invisible
 	addChild(mFastTimerView);
 
 	r.set(25, rect.getHeight() - 50, rect.getWidth()/2, rect.getHeight() - 450);
-	mMemoryView = new LLMemoryView("memory", r);
-	mMemoryView->setFollowsTop();
-	mMemoryView->setFollowsLeft();
-	mMemoryView->setVisible(FALSE);			// start invisible
+	LLMemoryView::Params mp;
+	mp.name("memory");
+	mp.rect(r);
+	mp.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
+	mp.visible(false);
+	mMemoryView = LLUICtrlFactory::create<LLMemoryView>(mp);
 	addChild(mMemoryView);
 
 	r.set(150, rect.getHeight() - 50, 820, 100);
-	gTextureView = new LLTextureView("gTextureView", r);
-	gTextureView->setRect(r);
-	gTextureView->setFollowsBottom();
-	gTextureView->setFollowsLeft();
+	LLTextureView::Params tvp;
+	tvp.name("gTextureView");
+	tvp.rect(r);
+	tvp.follows.flags(FOLLOWS_BOTTOM|FOLLOWS_LEFT);
+	tvp.visible(false);
+	gTextureView = LLUICtrlFactory::create<LLTextureView>(tvp);
 	addChild(gTextureView);
 	//gTextureView->reshape(r.getWidth(), r.getHeight(), TRUE);
-
-	const S32 VELOCITY_LEFT = 10; // 370;
-	const S32 VELOCITY_WIDTH = 500;
-	const S32 VELOCITY_TOP = 140;
-	const S32 VELOCITY_HEIGHT = 45;
-	r.setLeftTopAndSize( VELOCITY_LEFT, VELOCITY_TOP, VELOCITY_WIDTH, VELOCITY_HEIGHT );
-	gVelocityBar = new LLVelocityBar("Velocity Bar", r);
-	gVelocityBar->setFollowsBottom();
-	gVelocityBar->setFollowsLeft();
-	addChild(gVelocityBar);
 }
 
 
diff --git a/indra/newview/lldebugview.h b/indra/newview/lldebugview.h
index 189efd3a3f..9cf2a59a0a 100644
--- a/indra/newview/lldebugview.h
+++ b/indra/newview/lldebugview.h
@@ -40,9 +40,7 @@
 
 // declarations
 class LLButton;
-class LLToolView;
 class LLStatusPanel;
-class LLFrameStatView;
 class LLFastTimerView;
 class LLMemoryView;
 class LLConsole;
@@ -52,10 +50,18 @@ class LLFloaterStats;
 class LLDebugView : public LLView
 {
 public:
-	LLDebugView(const std::string& name, const LLRect &rect);
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Params()
+		{
+			mouse_opaque = false;
+		}
+	};
+	LLDebugView(const Params&);
 	~LLDebugView();
 
-	LLFrameStatView* mFrameStatView;
+	void setStatsVisible(BOOL visible);
+	
 	LLFastTimerView* mFastTimerView;
 	LLMemoryView*	 mMemoryView;
 	LLConsole*		 mDebugConsolep;
diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp
index 8b0ed39eb0..a720dc46b5 100644
--- a/indra/newview/lldirpicker.cpp
+++ b/indra/newview/lldirpicker.cpp
@@ -40,6 +40,7 @@
 #include "lldir.h"
 #include "llframetimer.h"
 #include "lltrans.h"
+#include "llwindow.h"	// beforeDialog()
 
 #if LL_LINUX || LL_SOLARIS
 # include "llfilepicker.h"
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index f5a66a3a78..ba37694356 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -46,7 +46,6 @@
 #include "llmemtype.h"
 #include "llprimitive.h"
 #include "lldarray.h"
-#include "llstat.h"
 #include "llviewerobject.h"
 #include "llrect.h"
 #include "llappviewer.h" // for gFrameTimeSeconds
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 80c7d73e6a..51f4bbac5c 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -95,11 +95,9 @@ static BOOL sRenderingSkinned = FALSE;
 S32 normal_channel = -1;
 S32 specular_channel = -1;
 
-LLDrawPoolAvatar::LLDrawPoolAvatar() :
-LLFacePool(POOL_AVATAR)
+LLDrawPoolAvatar::LLDrawPoolAvatar() : 
+	LLFacePool(POOL_AVATAR)	
 {
-	//LLDebugVarMessageBox::show("acceleration", &CLOTHING_ACCEL_FORCE_FACTOR, 10.f, 0.1f);
-	//LLDebugVarMessageBox::show("gravity", &CLOTHING_GRAVITY_EFFECT, 10.f, 0.1f);	
 }
 
 //-----------------------------------------------------------------------------
@@ -110,7 +108,6 @@ LLDrawPool *LLDrawPoolAvatar::instancePool()
 	return new LLDrawPoolAvatar();
 }
 
-BOOL gRenderAvatar = TRUE;
 
 S32 LLDrawPoolAvatar::getVertexShaderLevel() const
 {
@@ -288,10 +285,6 @@ void LLDrawPoolAvatar::endShadowPass(S32 pass)
 void LLDrawPoolAvatar::renderShadow(S32 pass)
 {
 	LLFastTimer t(LLFastTimer::FTM_SHADOW_AVATAR);
-	if (!gRenderAvatar)
-	{
-		return;
-	}
 
 	if (mDrawFace.empty())
 	{
@@ -609,13 +602,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
 		return;
 	}
 
-	
-
-	if (!gRenderAvatar)
-	{
-		return;
-	}
-
 	if (mDrawFace.empty() && !single_avatar)
 	{
 		return;
@@ -761,10 +747,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
 //-----------------------------------------------------------------------------
 void LLDrawPoolAvatar::renderForSelect()
 {
-	if (!gRenderAvatar)
-	{
-		return;
-	}
+
 
 	if (mDrawFace.empty())
 	{
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index b11dcc1608..ed6e55b7bc 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -127,9 +127,9 @@ void LLStandardBumpmap::restoreGL()
 	{
 		// *NOTE: This buffer size is hard coded into scanf() below.
 		char label[2048] = "";	/* Flawfinder: ignore */
-		char bump_file[2048] = "";	/* Flawfinder: ignore */
+		char bump_image_id[2048] = "";	/* Flawfinder: ignore */
 		fields_read = fscanf(	/* Flawfinder: ignore */
-			file, "\n%2047s %2047s", label, bump_file);
+			file, "\n%2047s %2047s", label, bump_image_id);
 		if( EOF == fields_read )
 		{
 			break;
@@ -140,10 +140,10 @@ void LLStandardBumpmap::restoreGL()
 			return;
 		}
 
-// 		llinfos << "Loading bumpmap: " << bump_file << " from viewerart" << llendl;
+// 		llinfos << "Loading bumpmap: " << bump_image_id << " from viewerart" << llendl;
 		gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mLabel = label;
 		gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage = 
-			gImageList.getImageFromFile(bump_file,
+			gImageList.getImage(LLUUID(bump_image_id),
 										TRUE, 
 										FALSE, 
 										0, 
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index 7f21adcc94..060af75736 100644
--- a/indra/newview/lldrawpoolsky.cpp
+++ b/indra/newview/lldrawpoolsky.cpp
@@ -43,7 +43,6 @@
 #include "llviewercamera.h"
 #include "llviewerimagelist.h"
 #include "llviewerregion.h"
-#include "llviewerwindow.h"
 #include "llvosky.h"
 #include "llworld.h" // To get water height
 #include "pipeline.h"
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index 2f2b07232a..22634d96b0 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -37,7 +37,6 @@
 #include "lldrawable.h"
 #include "llface.h"
 #include "llsky.h"
-#include "llviewerwindow.h"
 #include "llvotree.h"
 #include "pipeline.h"
 #include "llviewercamera.h"
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index ce3425dd9e..4a593ac4f8 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -45,7 +45,6 @@
 #include "lldrawable.h"
 #include "llface.h"
 #include "llsky.h"
-#include "llviewercamera.h" // to get OGL_TO_CFR_ROTATION
 #include "llviewerimagelist.h"
 #include "llviewerregion.h"
 #include "llvosky.h"
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 62fcf60e7f..203c086c56 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -33,7 +33,12 @@
 #include "llviewerprecompiledheaders.h"
 
 #include "lldynamictexture.h"
+
+// Linden library includes
 #include "llglheaders.h"
+#include "llwindow.h"			// getPosition()
+
+// Viewer includes
 #include "llviewerwindow.h"
 #include "llviewercamera.h"
 #include "llviewercontrol.h"
diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp
index e7403c2903..c0fe327815 100644
--- a/indra/newview/lleventnotifier.cpp
+++ b/indra/newview/lleventnotifier.cpp
@@ -38,6 +38,7 @@
 
 #include "llnotify.h"
 #include "lleventinfo.h"
+#include "llfloaterreg.h"
 #include "llfloaterdirectory.h"
 #include "llfloaterworldmap.h"
 #include "llagent.h"
@@ -192,11 +193,11 @@ bool LLEventNotification::handleResponse(const LLSD& notification, const LLSD& r
 	{
 	case 0:
 		gAgent.teleportViaLocation(getEventPosGlobal());
-		gFloaterWorldMap->trackLocation(getEventPosGlobal());
+		LLFloaterWorldMap::getInstance()->trackLocation(getEventPosGlobal());
 		break;
 	case 1:
 		gDisplayEventHack = TRUE;
-		LLFloaterDirectory::showEvents(getEventID());
+		LLFloaterReg::showInstance("search", LLSD().insert("panel", "event").insert("id", S32(getEventID())));
 		break;
 	case 2:
 		break;
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 4a551ff261..8332eec19c 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -46,7 +46,6 @@
 #include "lldarrayptr.h"
 #include "llvertexbuffer.h"
 #include "llviewerimage.h"
-#include "llstat.h"
 #include "lldrawable.h"
 
 class LLFacePool;
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index c9037d0fbb..7a79b7ef3e 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -196,16 +196,18 @@ static struct ft_display_info ft_display_table[] =
 	{ LLFastTimer::FTM_RENDER_FONTS,		"   Fonts",			&LLColor4::pink1, 0 },
 	{ LLFastTimer::FTM_SWAP,				"  Swap",			&LLColor4::pink2, 0 },
 	{ LLFastTimer::FTM_CLIENT_COPY,			"  Client Copy",	&LLColor4::red1, 1},
+	{ LLFastTimer::FTM_SWAP,					"  Swap",			&LLColor4::pink2, 0 },
+	{ LLFastTimer::FTM_CLIENT_COPY,				"  Client Copy",	&LLColor4::red1, 1},
 
 #if 0 || !LL_RELEASE_FOR_DOWNLOAD
-	{ LLFastTimer::FTM_TEMP1,				" Temp1",			&LLColor4::red1, 0 },
-	{ LLFastTimer::FTM_TEMP2,				" Temp2",			&LLColor4::magenta1, 0 },
-	{ LLFastTimer::FTM_TEMP3,				" Temp3",			&LLColor4::red2, 0 },
-	{ LLFastTimer::FTM_TEMP4,				" Temp4",			&LLColor4::magenta2, 0 },
-	{ LLFastTimer::FTM_TEMP5,				" Temp5",			&LLColor4::red3, 0 },
-	{ LLFastTimer::FTM_TEMP6,				" Temp6",			&LLColor4::magenta3, 0 },
-	{ LLFastTimer::FTM_TEMP7,				" Temp7",			&LLColor4::red4, 0 },
-	{ LLFastTimer::FTM_TEMP8,				" Temp8",			&LLColor4::magenta4, 0 },
+	{ LLFastTimer::FTM_TEMP1,					" Temp1",			&LLColor4::red1, 0 },
+	{ LLFastTimer::FTM_TEMP2,					" Temp2",			&LLColor4::magenta1, 0 },
+	{ LLFastTimer::FTM_TEMP3,					" Temp3",			&LLColor4::red2, 0 },
+	{ LLFastTimer::FTM_TEMP4,					" Temp4",			&LLColor4::magenta2, 0 },
+	{ LLFastTimer::FTM_TEMP5,					" Temp5",			&LLColor4::red3, 0 },
+	{ LLFastTimer::FTM_TEMP6,					" Temp6",			&LLColor4::magenta3, 0 },
+	{ LLFastTimer::FTM_TEMP7,					" Temp7",			&LLColor4::red4, 0 },
+	{ LLFastTimer::FTM_TEMP8,					" Temp8",			&LLColor4::magenta4, 0 },
 #endif
 	
 	{ LLFastTimer::FTM_OTHER,				" Other",			&red0 }
@@ -215,9 +217,10 @@ static const int FTV_DISPLAY_NUM  = LL_ARRAY_SIZE(ft_display_table);
 
 S32 ft_display_idx[FTV_DISPLAY_NUM]; // line of table entry for display purposes (for collapse)
 
-LLFastTimerView::LLFastTimerView(const std::string& name, const LLRect& rect)
-	:	LLFloater(name, rect, std::string("Fast Timers"))
+LLFastTimerView::LLFastTimerView(const LLRect& rect)
+:	LLFloater()
 {
+	setRect(rect);
 	setVisible(FALSE);
 	mDisplayMode = 0;
 	mAvgCountTotal = 0;
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index 86fc194610..611bca6494 100644
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -39,7 +39,7 @@
 class LLFastTimerView : public LLFloater
 {
 public:
-	LLFastTimerView(const std::string& name, const LLRect& rect);
+	LLFastTimerView(const LLRect& rect);
 	virtual ~LLFastTimerView();
 
 	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
new file mode 100644
index 0000000000..45bbea7e2a
--- /dev/null
+++ b/indra/newview/llfavoritesbar.cpp
@@ -0,0 +1,328 @@
+/** 
+ * @file llfavoritesbar.cpp
+ * @brief LLFavoritesBarCtrl class implementation
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfavoritesbar.h"
+#include "lluictrlfactory.h"
+
+#include "llagent.h"
+#include "llviewerinventory.h"
+#include "llinventory.h"
+#include "llinventorymodel.h"
+#include "llbutton.h"
+#include "llinventorybridge.h"
+
+static LLRegisterWidget<LLFavoritesBarCtrl> r("favorites_bar");
+
+// updateButtons's helper
+struct LLFavoritesSort
+{
+	// Sorting by creation date and name
+	// TODO - made it customizible using gSavedSettings
+	bool operator()(const LLViewerInventoryItem* const& a, const LLViewerInventoryItem* const& b)
+	{
+		time_t first_create = a->getCreationDate();
+		time_t second_create = b->getCreationDate();
+		if (first_create == second_create)
+		{
+			return (LLStringUtil::compareDict(a->getName(), b->getName()) < 0);
+		}
+		else
+		{
+			return (first_create > second_create);
+		}
+	}
+};
+
+LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
+:	LLUICtrl(p),
+	mFont(p.font.isProvided() ? p.font() : LLFontGL::getFontSansSerifSmall())
+{
+	gInventory.addObserver(this);
+}
+
+LLFavoritesBarCtrl::~LLFavoritesBarCtrl()
+{
+	gInventory.removeObserver(this);
+}
+
+BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+								   EDragAndDropType cargo_type,
+								   void* cargo_data,
+								   EAcceptance* accept,
+								   std::string& tooltip_msg)
+{
+	*accept = ACCEPT_NO;
+
+	switch (cargo_type)
+	{
+
+		// IAN BUG: did the spec ask for calling cards here?
+	case DAD_LANDMARK:
+	case DAD_CALLINGCARD:
+		{
+			// Copy the item into the favorites folder (if it's not already there).
+			LLInventoryItem *item = (LLInventoryItem *)cargo_data;			
+			LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE);
+			if (item->getParentUUID() == favorites_id)
+			{
+				llwarns << "Attemt to copy a favorite item into the same folder." << llendl;
+				break;
+			}
+
+			*accept = ACCEPT_YES_COPY_SINGLE;
+
+			if (drop)
+			{
+				copy_inventory_item(
+						gAgent.getID(),
+						item->getPermissions().getOwner(),
+						item->getUUID(),
+						favorites_id,
+						std::string(),
+						LLPointer<LLInventoryCallback>(NULL));
+
+				llinfos << "Copied inventory item #" << item->getUUID() << " to favorites." << llendl;
+			}
+			
+		}
+		break;
+	default:
+		break;
+	}
+
+	return TRUE;
+}
+
+//virtual
+void LLFavoritesBarCtrl::changed(U32 mask)
+{
+	LLInventoryModel::item_array_t items;
+
+	if (!collectFavoriteItems(items))
+	{
+		return;
+	}
+
+	S32 count = items.count();
+	if (getChildCount() == count)
+	{
+		// Check whether buttons are reflecting state of favorite inventory folder
+		const LLView::child_list_t *buttons_list = getChildList();
+		S32 i = 0;
+		for(LLView::child_list_const_iter_t iter = buttons_list->begin(); iter != buttons_list->end(); iter++)
+		{
+			LLButton *button = (LLButton *)*iter;
+			LLInventoryItem* item = items.get(i);
+			// tooltip contains full name of item, label can be cutted
+			if (button->getToolTip() != item->getName())
+			{
+				break;
+			}
+
+
+			i++;
+		}
+
+		// Check passed, nothing is changed
+		if (i < items.count())
+		{
+			return;
+		}
+	}
+
+	//FIXME: optimize this
+	deleteAllChildren();
+
+	LLButton::Params bparams;
+
+	const S32 buttonWidth = LLUI::sSettingGroups["config"]->getS32("ButtonHPad") * 2;
+	LLRect rect;
+
+	for(S32 i = 0; i < count; ++i)
+	{
+		rect.setOriginAndSize(0, 0, buttonWidth, llround(mFont->getLineHeight()));
+
+		bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_BOTTOM);
+		bparams.rect (rect);
+		bparams.tab_stop(false);
+		bparams.font(mFont);
+		bparams.click_callback.function(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, 0));
+
+		LLButton *button = LLUICtrlFactory::create<LLButton> (bparams);
+
+		addChildInBack(button);
+	}
+
+	updateButtons(getRect().getWidth(), items);
+}
+
+//virtual
+void LLFavoritesBarCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+	LLInventoryModel::item_array_t items;
+	if (collectFavoriteItems(items))
+	{
+		updateButtons(width, items);
+	}
+
+	LLUICtrl::reshape(width, height, called_from_parent);
+}
+
+void LLFavoritesBarCtrl::updateButtons(U32 barWidth, LLInventoryModel::item_array_t items)
+{
+	std::sort(items.begin(), items.end(), LLFavoritesSort());
+
+	const S32 buttonHPad = LLUI::sSettingGroups["config"]->getS32("ButtonHPad");
+	const S32 buttonHGap = 2;
+
+	S32 curr_x = buttonHGap;
+
+	S32 count = items.count();
+	S32 labelsWidth = 0;
+
+	for (S32 i = 0; i < count; ++i)
+	{
+		labelsWidth += mFont->getWidth(items.get(i)->getName());
+	}
+
+	const S32 ellipsisWIdth = mFont->getWidth("...");
+
+	F32 shrinkFactor = 1.0f;
+
+	S32 labelsSpace = barWidth - buttonHGap * (count + 1) - buttonHPad * 2 * count; // There is leading buttonHGap in front of first button,
+												    // one buttonHGap at the end of each button and 2 buttonHPad's
+	if (labelsWidth >= labelsSpace)
+	{
+		shrinkFactor = (float)labelsSpace / labelsWidth;
+	}
+
+	const LLView::child_list_t *buttons_list = getChildList();
+
+	S32 i = 0;
+	for(LLView::child_list_const_iter_t iter = buttons_list->begin(); iter != buttons_list->end(); iter++)
+	{
+		LLButton *button = (LLButton *)*iter;
+
+		LLInventoryItem* item = items.get(i);
+
+		LLRect rect;
+
+		S32 labelWidth = mFont->getWidth(item->getName());
+
+		if (shrinkFactor < 1.0f)
+		{
+			labelWidth = (S32) ((float)labelWidth * shrinkFactor);
+
+			if (labelWidth > ellipsisWIdth)
+			{
+				labelWidth -= ellipsisWIdth;
+
+				S32 charsTotal = item->getName().length();
+				S32 charsFitted = 1;
+				while (charsFitted < charsTotal && mFont->getWidth(item->getName(), 0, charsFitted) < labelWidth)
+				{
+					charsFitted++;
+				}
+
+				charsFitted--;
+				labelWidth += ellipsisWIdth;
+
+				button->setLabel(item->getName().substr(0, charsFitted) + "...");
+			}
+			else
+			{
+				button->setLabel((LLStringExplicit)"");
+				labelWidth = 0;
+			}
+		}
+		else
+		{
+			button->setLabel(item->getName());
+		}
+
+		S32 buttonWidth = labelWidth + buttonHPad * 2;
+		rect.setOriginAndSize(curr_x, 2, buttonWidth, llround(mFont->getLineHeight()));
+		button->setRect(rect);
+
+		button->setToolTip(item->getName());
+
+		curr_x += buttonWidth + buttonHGap;
+
+		i++;
+	}
+}
+
+BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &items)
+{
+	LLUUID favorite_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE);
+
+	if (!favorite_folder_id.notNull())
+		return FALSE;
+	
+	LLInventoryModel::cat_array_t cats;
+
+	gInventory.collectDescendents(favorite_folder_id, cats, items, LLInventoryModel::EXCLUDE_TRASH);
+
+	return TRUE;
+}
+
+void LLFavoritesBarCtrl::onButtonClick(int idx)
+{
+	LLInventoryModel::item_array_t items;
+
+	if (!collectFavoriteItems(items))
+	{
+		return;
+	}
+
+	S32 count = items.count();
+
+	if (idx < 0 || idx >= count)
+	{
+		llwarns << "Invalid favorites bar index" << llendl;
+		return;
+	}
+
+	LLInventoryItem* item = items.get(idx);
+	if(item)
+	{
+		LLUUID item_id = item->getUUID();
+		LLAssetType::EType item_type = item->getType();
+
+		//TODO - donno but may be we must use InventoryModel from InventoryView
+		//think for now there is only one model...but still
+		LLInvFVBridgeAction::doAction(item_type,item_id,&gInventory);
+	}
+}
+
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
new file mode 100644
index 0000000000..c92f1d5caf
--- /dev/null
+++ b/indra/newview/llfavoritesbar.h
@@ -0,0 +1,70 @@
+/** 
+ * @file llfavoritesbar.h
+ * @brief LLFavoritesBarCtrl base class
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFAVORITESBARCTRL_H
+#define LL_LLFAVORITESBARCTRL_H
+
+#include "lluictrl.h"
+#include "lliconctrl.h"
+#include "llinventorymodel.h"
+
+class LLFavoritesBarCtrl : public LLUICtrl, public LLInventoryObserver
+{
+public:
+	struct Params : public LLUICtrl::Params{};
+protected:
+	LLFavoritesBarCtrl(const Params&);
+	friend class LLUICtrlFactory;
+public:
+	virtual ~LLFavoritesBarCtrl();
+
+	/*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+								   EDragAndDropType cargo_type,
+								   void* cargo_data,
+								   EAcceptance* accept,
+								   std::string& tooltip_msg);
+
+	virtual void changed(U32 mask);
+
+	virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+protected:
+	void updateButtons(U32 barWidth, LLInventoryModel::item_array_t items);
+	BOOL collectFavoriteItems(LLInventoryModel::item_array_t &items);
+
+	void onButtonClick(int idx);
+
+	const LLFontGL *mFont;
+};
+
+
+#endif // LL_LLFAVORITESBARCTRL_H
+
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index 8f5882615f..028e1cc098 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -39,6 +39,7 @@
 #include "lldir.h"
 #include "llframetimer.h"
 #include "lltrans.h"
+#include "llwindow.h"	// beforeDialog()
 
 #if LL_SDL
 #include "llwindowsdl.h" // for some X/GTK utils to help with filepickers
@@ -818,6 +819,13 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter)
 	reset();
 	
 	mNavOptions.optionFlags &= ~kNavAllowMultipleFiles;
+
+	if(filter == FFLOAD_ALL)	// allow application bundles etc. to be traversed; important for DEV-16869, but generally useful
+	{
+		// mNavOptions.optionFlags |= kNavAllowOpenPackages;
+		mNavOptions.optionFlags |= kNavSupportPackages;
+	}
+	
 	// Modal, so pause agent
 	send_agent_pause();
 	{
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index 9ee24d6d83..352ca3c863 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -51,8 +51,6 @@ std::set<std::string> LLFirstUse::sConfigVariables;
 // static
 void LLFirstUse::addConfigVariable(const std::string& var)
 {
-	//Don't add the warning, now that we're storing the default in the settings_default.xml file
-	//gSavedSettings.addWarning(var);
 	sConfigVariables.insert(var);
 }
 
@@ -63,7 +61,7 @@ void LLFirstUse::disableFirstUse()
 	for (std::set<std::string>::iterator iter = sConfigVariables.begin();
 		 iter != sConfigVariables.end(); ++iter)
 	{
-		gSavedSettings.setWarning(*iter, FALSE);
+		gWarningSettings.setBOOL(*iter, FALSE);
 	}
 }
 
@@ -74,7 +72,7 @@ void LLFirstUse::resetFirstUse()
 	for (std::set<std::string>::iterator iter = sConfigVariables.begin();
 		 iter != sConfigVariables.end(); ++iter)
 	{
-		gSavedSettings.setWarning(*iter, TRUE);
+		gWarningSettings.setBOOL(*iter, TRUE);
 	}
 }
 
@@ -82,9 +80,9 @@ void LLFirstUse::resetFirstUse()
 // Called whenever the viewer detects that your balance went up
 void LLFirstUse::useBalanceIncrease(S32 delta)
 {
-	if (gSavedSettings.getWarning("FirstBalanceIncrease"))
+	if (gWarningSettings.getBOOL("FirstBalanceIncrease"))
 	{
-		gSavedSettings.setWarning("FirstBalanceIncrease", FALSE);
+		gWarningSettings.setBOOL("FirstBalanceIncrease", FALSE);
 
 		LLSD args;
 		args["AMOUNT"] = llformat("%d",delta);
@@ -96,9 +94,9 @@ void LLFirstUse::useBalanceIncrease(S32 delta)
 // Called whenever the viewer detects your balance went down
 void LLFirstUse::useBalanceDecrease(S32 delta)
 {
-	if (gSavedSettings.getWarning("FirstBalanceDecrease"))
+	if (gWarningSettings.getBOOL("FirstBalanceDecrease"))
 	{
-		gSavedSettings.setWarning("FirstBalanceDecrease", FALSE);
+		gWarningSettings.setBOOL("FirstBalanceDecrease", FALSE);
 
 		LLSD args;
 		args["AMOUNT"] = llformat("%d",-delta);
@@ -112,9 +110,9 @@ void LLFirstUse::useSit()
 {
 	// Our orientation island uses sitting to teach vehicle driving
 	// so just never show this message. JC
-	//if (gSavedSettings.getWarning("FirstSit"))
+	//if (gWarningSettings.getBOOL("FirstSit"))
 	//{
-	//	gSavedSettings.setWarning("FirstSit", FALSE);
+	//	gWarningSettings.setBOOL("FirstSit", FALSE);
         //
 	//	LLNotifications::instance().add("FirstSit");
 	//}
@@ -123,9 +121,9 @@ void LLFirstUse::useSit()
 // static
 void LLFirstUse::useMap()
 {
-	if (gSavedSettings.getWarning("FirstMap"))
+	if (gWarningSettings.getBOOL("FirstMap"))
 	{
-		gSavedSettings.setWarning("FirstMap", FALSE);
+		gWarningSettings.setBOOL("FirstMap", FALSE);
 
 		LLNotifications::instance().add("FirstMap");
 	}
@@ -140,9 +138,9 @@ void LLFirstUse::useGoTo()
 // static
 void LLFirstUse::useBuild()
 {
-	if (gSavedSettings.getWarning("FirstBuild"))
+	if (gWarningSettings.getBOOL("FirstBuild"))
 	{
-		gSavedSettings.setWarning("FirstBuild", FALSE);
+		gWarningSettings.setBOOL("FirstBuild", FALSE);
 
 		LLNotifications::instance().add("FirstBuild");
 	}
@@ -151,9 +149,9 @@ void LLFirstUse::useBuild()
 // static
 void LLFirstUse::useLeftClickNoHit()
 { 
-	if (gSavedSettings.getWarning("FirstLeftClickNoHit"))
+	if (gWarningSettings.getBOOL("FirstLeftClickNoHit"))
 	{
-		gSavedSettings.setWarning("FirstLeftClickNoHit", FALSE);
+		gWarningSettings.setBOOL("FirstLeftClickNoHit", FALSE);
 
 		LLNotifications::instance().add("FirstLeftClickNoHit");
 	}
@@ -162,12 +160,12 @@ void LLFirstUse::useLeftClickNoHit()
 // static
 void LLFirstUse::useTeleport()
 {
-	if (gSavedSettings.getWarning("FirstTeleport"))
+	if (gWarningSettings.getBOOL("FirstTeleport"))
 	{
 		LLVector3d teleportDestination = LLTracker::getTrackedPositionGlobal();
 		if(teleportDestination != LLVector3d::zero)
 		{
-			gSavedSettings.setWarning("FirstTeleport", FALSE);
+			gWarningSettings.setBOOL("FirstTeleport", FALSE);
 
 		        LLNotifications::instance().add("FirstTeleport");
 		}
@@ -181,9 +179,9 @@ void LLFirstUse::useOverrideKeys()
 	// so don't show this message until you get off OI. JC
 	if (!gAgent.inPrelude())
 	{
-		if (gSavedSettings.getWarning("FirstOverrideKeys"))
+		if (gWarningSettings.getBOOL("FirstOverrideKeys"))
 		{
-			gSavedSettings.setWarning("FirstOverrideKeys", FALSE);
+			gWarningSettings.setBOOL("FirstOverrideKeys", FALSE);
 
 			LLNotifications::instance().add("FirstOverrideKeys");
 		}
@@ -199,9 +197,9 @@ void LLFirstUse::useAttach()
 // static
 void LLFirstUse::useAppearance()
 {
-	if (gSavedSettings.getWarning("FirstAppearance"))
+	if (gWarningSettings.getBOOL("FirstAppearance"))
 	{
-		gSavedSettings.setWarning("FirstAppearance", FALSE);
+		gWarningSettings.setBOOL("FirstAppearance", FALSE);
 
 		LLNotifications::instance().add("FirstAppearance");
 	}
@@ -210,9 +208,9 @@ void LLFirstUse::useAppearance()
 // static
 void LLFirstUse::useInventory()
 {
-	if (gSavedSettings.getWarning("FirstInventory"))
+	if (gWarningSettings.getBOOL("FirstInventory"))
 	{
-		gSavedSettings.setWarning("FirstInventory", FALSE);
+		gWarningSettings.setBOOL("FirstInventory", FALSE);
 
 		LLNotifications::instance().add("FirstInventory");
 	}
@@ -222,9 +220,9 @@ void LLFirstUse::useInventory()
 // static
 void LLFirstUse::useSandbox()
 {
-	if (gSavedSettings.getWarning("FirstSandbox"))
+	if (gWarningSettings.getBOOL("FirstSandbox"))
 	{
-		gSavedSettings.setWarning("FirstSandbox", FALSE);
+		gWarningSettings.setBOOL("FirstSandbox", FALSE);
 
 		LLSD args;
 		args["HOURS"] = llformat("%d",SANDBOX_CLEAN_FREQ);
@@ -236,9 +234,9 @@ void LLFirstUse::useSandbox()
 // static
 void LLFirstUse::useFlexible()
 {
-	if (gSavedSettings.getWarning("FirstFlexible"))
+	if (gWarningSettings.getBOOL("FirstFlexible"))
 	{
-		gSavedSettings.setWarning("FirstFlexible", FALSE);
+		gWarningSettings.setBOOL("FirstFlexible", FALSE);
 
 		LLNotifications::instance().add("FirstFlexible");
 	}
@@ -247,9 +245,9 @@ void LLFirstUse::useFlexible()
 // static
 void LLFirstUse::useDebugMenus()
 {
-	if (gSavedSettings.getWarning("FirstDebugMenus"))
+	if (gWarningSettings.getBOOL("FirstDebugMenus"))
 	{
-		gSavedSettings.setWarning("FirstDebugMenus", FALSE);
+		gWarningSettings.setBOOL("FirstDebugMenus", FALSE);
 
 		LLNotifications::instance().add("FirstDebugMenus");
 	}
@@ -258,9 +256,9 @@ void LLFirstUse::useDebugMenus()
 // static
 void LLFirstUse::useSculptedPrim()
 {
-	if (gSavedSettings.getWarning("FirstSculptedPrim"))
+	if (gWarningSettings.getBOOL("FirstSculptedPrim"))
 	{
-		gSavedSettings.setWarning("FirstSculptedPrim", FALSE);
+		gWarningSettings.setBOOL("FirstSculptedPrim", FALSE);
 
 		LLNotifications::instance().add("FirstSculptedPrim");
 		
@@ -270,9 +268,9 @@ void LLFirstUse::useSculptedPrim()
 // static 
 void LLFirstUse::useMedia()
 {
-	if (gSavedSettings.getWarning("FirstMedia"))
+	if (gWarningSettings.getBOOL("FirstMedia"))
 	{
-		gSavedSettings.setWarning("FirstMedia", FALSE);
+		gWarningSettings.setBOOL("FirstMedia", FALSE);
 
 		LLNotifications::instance().add("FirstMedia");
 	}
diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h
index 895701da3a..811ae24df2 100644
--- a/indra/newview/llflexibleobject.h
+++ b/indra/newview/llflexibleobject.h
@@ -43,7 +43,6 @@
 #ifndef LL_LLFLEXIBLEOBJECT_H
 #define LL_LLFLEXIBLEOBJECT_H
 
-#include "llmemory.h"
 #include "llprimitive.h"
 #include "llvovolume.h"
 #include "llwind.h"
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 2652387bfe..9b5d322ba6 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -65,41 +65,34 @@ extern LLCPUInfo gSysCPU;
 extern LLMemoryInfo gSysMemory;
 extern U32 gPacketsIn;
 
-///----------------------------------------------------------------------------
-/// Local function declarations, constants, enums, and typedefs
-///----------------------------------------------------------------------------
-
-LLFloaterAbout* LLFloaterAbout::sInstance = NULL;
-
 static std::string get_viewer_release_notes_url();
 
+
 ///----------------------------------------------------------------------------
 /// Class LLFloaterAbout
 ///----------------------------------------------------------------------------
 
 // Default constructor
-LLFloaterAbout::LLFloaterAbout() 
-:	LLFloater(std::string("floater_about"), std::string("FloaterAboutRect"), LLStringUtil::null)
+LLFloaterAbout::LLFloaterAbout(const LLSD& key) 
+:	LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about.xml");
+	center();
+}
 
-	// Support for changing product name.
-	std::string title("About ");
-	title += LLAppViewer::instance()->getSecondLifeTitle();
-	setTitle(title);
+// Destroys the object
+LLFloaterAbout::~LLFloaterAbout()
+{
+}
 
+BOOL LLFloaterAbout::postBuild()
+{
 	LLViewerTextEditor *support_widget = 
 		getChild<LLViewerTextEditor>("support_editor", true);
 
 	LLViewerTextEditor *credits_widget = 
 		getChild<LLViewerTextEditor>("credits_editor", true);
 
-
-	if (!support_widget || !credits_widget)
-	{
-		return;
-	}
-
 	// For some reason, adding style doesn't work unless this is true.
 	support_widget->setParseHTML(TRUE);
 
@@ -108,15 +101,15 @@ LLFloaterAbout::LLFloaterAbout()
 	viewer_link_style->setVisible(true);
 	viewer_link_style->setFontName(LLStringUtil::null);
 	viewer_link_style->setLinkHREF(get_viewer_release_notes_url());
-	viewer_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
+	viewer_link_style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
 
 	// Version string
-	std::string version = LLAppViewer::instance()->getSecondLifeTitle()
+	std::string version = LLTrans::getString("SECOND_LIFE_VIEWER")
 		+ llformat(" %d.%d.%d (%d) %s %s (%s)\n",
 				   LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD,
 				   __DATE__, __TIME__,
 				   gSavedSettings.getString("VersionChannelName").c_str());
-	support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor"));
+	support_widget->appendColoredText(version, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
 	support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style);
 
 	std::string support;
@@ -138,7 +131,7 @@ LLFloaterAbout::LLFloaterAbout()
 		server_link_style->setVisible(true);
 		server_link_style->setFontName(LLStringUtil::null);
 		server_link_style->setLinkHREF(region->getCapability("ServerReleaseNotes"));
-		server_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
+		server_link_style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
 
 		const LLVector3d &pos = gAgent.getPositionGlobal();
 		LLUIString pos_text = getString("you_are_at");
@@ -146,8 +139,8 @@ LLFloaterAbout::LLFloaterAbout()
 						llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ]));
 		support.append(pos_text);
 
-		std::string region_text = llformat("in %s located at ",
-										gAgent.getRegion()->getName().c_str());
+		LLUIString region_text = getString ("in_region") + " ";
+		region_text.setArg("[REGION]", llformat ("%s", gAgent.getRegion()->getName().c_str()));
 		support.append(region_text);
 
 		std::string buffer;
@@ -160,7 +153,7 @@ LLFloaterAbout::LLFloaterAbout()
 		support.append(gLastVersionChannel);
 		support.append("\n");
 
-		support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor"));
+		support_widget->appendColoredText(support, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
 		support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style);
 
 		support = "\n\n";
@@ -171,45 +164,46 @@ LLFloaterAbout::LLFloaterAbout()
 	//  and this info sometimes gets sent to support
 	
 	// CPU
-	support.append("CPU: ");
+	support.append(getString("CPU") + " ");
 	support.append( gSysCPU.getCPUString() );
 	support.append("\n");
 
 	U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
 	// Moved hack adjustment to Windows memory size into llsys.cpp
 
-	std::string mem_text = llformat("Memory: %u MB\n", memory );
-	support.append(mem_text);
+	LLStringUtil::format_map_t args;
+	args["[MEM]"] = llformat ("%u", memory);
+	support.append(getString("Memory", args) + "\n");
 
-	support.append("OS Version: ");
+	support.append(getString("OSVersion") + " ");
 	support.append( LLAppViewer::instance()->getOSInfo().getOSString() );
 	support.append("\n");
 
-	support.append("Graphics Card Vendor: ");
+	support.append(getString("GraphicsCardVendor") + " ");
 	support.append( (const char*) glGetString(GL_VENDOR) );
 	support.append("\n");
 
-	support.append("Graphics Card: ");
+	support.append(getString("GraphicsCard") + " ");
 	support.append( (const char*) glGetString(GL_RENDERER) );
 	support.append("\n");
 
-	support.append("OpenGL Version: ");
+	support.append(getString("OpenGLVersion") + " ");
 	support.append( (const char*) glGetString(GL_VERSION) );
 	support.append("\n");
 
 	support.append("\n");
 
-	support.append("libcurl Version: ");
+	support.append(getString("LibCurlVersion") + " ");
 	support.append( LLCurl::getVersionString() );
 	support.append("\n");
 
-	support.append("J2C Decoder Version: ");
+	support.append(getString("J2CDecoderVersion") + " ");
 	support.append( LLImageJ2C::getEngineInfo() );
 	support.append("\n");
 
-	support.append("Audio Driver Version: ");
+	support.append(getString("AudioDriverVersion") + " ");
 	bool want_fullname = true;
-	support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : "(none)" );
+	support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : getString("none") );
 	support.append("\n");
 
 	LLMediaManager *mgr = LLMediaManager::getInstance();
@@ -218,7 +212,7 @@ LLFloaterAbout::LLFloaterAbout()
 		LLMediaBase *media_source = mgr->createSourceFromMimeType("http", "text/html");
 		if (media_source)
 		{
-			support.append("LLMozLib Version: ");
+			support.append(getString("LLMozLibVersion") + " ");
 			support.append(media_source->getVersion());
 			support.append("\n");
 			mgr->destroySource(media_source);
@@ -227,15 +221,13 @@ LLFloaterAbout::LLFloaterAbout()
 
 	if (gPacketsIn > 0)
 	{
-		std::string packet_loss = llformat("Packets Lost: %.0f/%.0f (%.1f%%)", 
-			LLViewerStats::getInstance()->mPacketsLostStat.getCurrent(),
-			F32(gPacketsIn),
-			100.f*LLViewerStats::getInstance()->mPacketsLostStat.getCurrent() / F32(gPacketsIn) );
-		support.append(packet_loss);
-		support.append("\n");
+		args["[LOST]"] = llformat ("%.0f", LLViewerStats::getInstance()->mPacketsLostStat.getCurrent());
+		args["[IN]"] = llformat ("%.0f", F32(gPacketsIn));
+		args["[PCT]"] = llformat ("%.1f", 100.f*LLViewerStats::getInstance()->mPacketsLostStat.getCurrent() / F32(gPacketsIn) );
+		support.append(getString ("PacketsLost", args) + "\n");
 	}
 
-	support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor"));
+	support_widget->appendColoredText(support, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
 
 	// Fix views
 	support_widget->setCursorPos(0);
@@ -248,43 +240,24 @@ LLFloaterAbout::LLFloaterAbout()
 	credits_widget->setTakesFocus(TRUE);
 	credits_widget->setHandleEditKeysDirectly(TRUE);
 
-	center();
-
-	sInstance = this;
-}
-
-// Destroys the object
-LLFloaterAbout::~LLFloaterAbout()
-{
-	sInstance = NULL;
-}
-
-// static
-void LLFloaterAbout::show(void*)
-{
-	if (!sInstance)
-	{
-		sInstance = new LLFloaterAbout();
-	}
-
-	sInstance->open();	 /*Flawfinder: ignore*/
+	return TRUE;
 }
 
 
-static std::string get_viewer_release_notes_url()
-{
-	std::ostringstream version;
-	version << LL_VERSION_MAJOR << "."
-		<< LL_VERSION_MINOR << "."
-		<< LL_VERSION_PATCH << "."
-		<< LL_VERSION_BUILD;
+ static std::string get_viewer_release_notes_url()
+ {
+ 	std::ostringstream version;
+ 	version << LL_VERSION_MAJOR << "."
+ 		<< LL_VERSION_MINOR << "."
+ 		<< LL_VERSION_PATCH << "."
+ 		<< LL_VERSION_BUILD;
 
-	LLSD query;
-	query["channel"] = gSavedSettings.getString("VersionChannelName");
-	query["version"] = version.str();
+ 	LLSD query;
+ 	query["channel"] = gSavedSettings.getString("VersionChannelName");
+ 	query["version"] = version.str();
 
-	std::ostringstream url;
-	url << RELEASE_NOTES_BASE_URL << LLURI::mapToQueryString(query);
+ 	std::ostringstream url;
+	 url << LLFloaterAbout::getInstance()->getString("RELEASE_NOTES_BASE_URL") << LLURI::mapToQueryString(query);
 
-	return url.str();
-}
+ 	return url.str();
+ }
diff --git a/indra/newview/llfloaterabout.h b/indra/newview/llfloaterabout.h
index 7564b8e41c..537c8f29c0 100644
--- a/indra/newview/llfloaterabout.h
+++ b/indra/newview/llfloaterabout.h
@@ -36,16 +36,15 @@
 #include "llfloater.h"
 
 class LLFloaterAbout 
-: public LLFloater
+	: public LLFloater, public LLFloaterSingleton<LLFloaterAbout>
 {
-public:
-	LLFloaterAbout();
+	friend class LLUISingleton<LLFloaterAbout, VisibilityPolicy<LLFloater> >;
+protected:
+	LLFloaterAbout(const LLSD& key);
 	virtual ~LLFloaterAbout();
 
-	static void show(void*);
-
-private:
-	static LLFloaterAbout* sInstance;
+public:
+	/*virtual*/ BOOL postBuild();
 };
 
 
diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp
index 162456b8ce..34bd5211f2 100644
--- a/indra/newview/llfloateranimpreview.cpp
+++ b/indra/newview/llfloateranimpreview.cpp
@@ -66,6 +66,7 @@
 #include "llvoavatar.h"
 #include "pipeline.h"
 #include "lluictrlfactory.h"
+#include "lltrans.h"
 
 S32 LLFloaterAnimPreview::sUploadAmount = 10;
 
@@ -82,6 +83,40 @@ const F32 MAX_CAMERA_ZOOM = 10.f;
 
 const F32 BASE_ANIM_TIME_OFFSET = 5.f;
 
+std::string STATUS[] =
+{
+  "E_ST_OK",
+  "E_ST_EOF",
+  "E_ST_NO_CONSTRAINT",
+  "E_ST_NO_FILE",
+"E_ST_NO_HIER",
+"E_ST_NO_JOINT",
+"E_ST_NO_NAME",
+"E_ST_NO_OFFSET",
+"E_ST_NO_CHANNELS",
+"E_ST_NO_ROTATION",
+"E_ST_NO_AXIS",
+"E_ST_NO_MOTION",
+"E_ST_NO_FRAMES",
+"E_ST_NO_FRAME_TIME",
+"E_ST_NO_POS",
+"E_ST_NO_ROT",
+"E_ST_NO_XLT_FILE",
+"E_ST_NO_XLT_HEADER",
+"E_ST_NO_XLT_NAME",
+"E_ST_NO_XLT_IGNORE",
+"E_ST_NO_XLT_RELATIVE",
+"E_ST_NO_XLT_OUTNAME",
+"E_ST_NO_XLT_MATRIX",
+"E_ST_NO_XLT_MERGECHILD",
+"E_ST_NO_XLT_MERGEPARENT",
+"E_ST_NO_XLT_PRIORITY",
+"E_ST_NO_XLT_LOOP",
+"E_ST_NO_XLT_EASEIN",
+"E_ST_NO_XLT_EASEOUT",
+"E_ST_NO_XLT_HAND",
+"E_ST_NO_XLT_EMOTE",
+};
 //-----------------------------------------------------------------------------
 // LLFloaterAnimPreview()
 //-----------------------------------------------------------------------------
@@ -131,9 +166,9 @@ void LLFloaterAnimPreview::setAnimCallbacks()
 	childSetCommitCallback("priority", onCommitPriority, this);
 	childSetCommitCallback("loop_check", onCommitLoop, this);
 	childSetCommitCallback("loop_in_point", onCommitLoopIn, this);
-	childSetValidate("loop_in_point", validateLoopIn);
+	childSetValidate("loop_in_point", boost::bind(&LLFloaterAnimPreview::validateLoopIn, this, _1));
 	childSetCommitCallback("loop_out_point", onCommitLoopOut, this);
-	childSetValidate("loop_out_point", validateLoopOut);
+	childSetValidate("loop_out_point", boost::bind(&LLFloaterAnimPreview::validateLoopOut, this, _1));
 
 	childSetCommitCallback("hand_pose_combo", onCommitHandPose, this);
 	
@@ -141,9 +176,9 @@ void LLFloaterAnimPreview::setAnimCallbacks()
 	childSetValue("emote_combo", "[None]");
 
 	childSetCommitCallback("ease_in_time", onCommitEaseIn, this);
-	childSetValidate("ease_in_time", validateEaseIn);
+	childSetValidate("ease_in_time", boost::bind(&LLFloaterAnimPreview::validateEaseIn, this, _1));
 	childSetCommitCallback("ease_out_time", onCommitEaseOut, this);
-	childSetValidate("ease_out_time", validateEaseOut);
+	childSetValidate("ease_out_time", boost::bind(&LLFloaterAnimPreview::validateEaseOut, this, _1));
 }
 
 //-----------------------------------------------------------------------------
@@ -151,7 +186,6 @@ void LLFloaterAnimPreview::setAnimCallbacks()
 //-----------------------------------------------------------------------------
 BOOL LLFloaterAnimPreview::postBuild()
 {
-	LLRect r;
 	LLKeyframeMotion* motionp = NULL;
 	LLBVHLoader* loaderp = NULL;
 
@@ -172,63 +206,14 @@ BOOL LLFloaterAnimPreview::postBuild()
 		PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
 	mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
 
-	S32 y = mPreviewRect.mTop + BTN_HEIGHT;
-	S32 btn_left = PREVIEW_HPAD;
-
-	r.set( btn_left, y, btn_left + 32, y - BTN_HEIGHT );
 	mPlayButton = getChild<LLButton>( "play_btn");
-	if (!mPlayButton)
-	{
-		mPlayButton = new LLButton(std::string("play_btn"), LLRect(0,0,0,0));
-	}
-	mPlayButton->setClickedCallback(onBtnPlay);
-	mPlayButton->setCallbackUserData(this);
-
-	mPlayButton->setImages(std::string("button_anim_play.tga"),
-						   std::string("button_anim_play_selected.tga"));
-	mPlayButton->setDisabledImages(LLStringUtil::null,LLStringUtil::null);
-
-	mPlayButton->setScaleImage(TRUE);
+	mPlayButton->setClickedCallback(onBtnPlay, this);
 
 	mStopButton = getChild<LLButton>( "stop_btn");
-	if (!mStopButton)
-	{
-		mStopButton = new LLButton(std::string("stop_btn"), LLRect(0,0,0,0));
-	}
-	mStopButton->setClickedCallback(onBtnStop);
-	mStopButton->setCallbackUserData(this);
-
-	mStopButton->setImages(std::string("button_anim_stop.tga"),
-						   std::string("button_anim_stop_selected.tga"));
-	mStopButton->setDisabledImages(LLStringUtil::null,LLStringUtil::null);
-
-	mStopButton->setScaleImage(TRUE);
-
-	r.set(r.mRight + PREVIEW_HPAD, y, getRect().getWidth() - PREVIEW_HPAD, y - BTN_HEIGHT);
-	//childSetCommitCallback("playback_slider", onSliderMove, this);
+	mStopButton->setClickedCallback(onBtnStop, this);
 
 	childHide("bad_animation_text");
 
-	//childSetCommitCallback("preview_base_anim", onCommitBaseAnim, this);
-	//childSetValue("preview_base_anim", "Standing");
-
-	//childSetCommitCallback("priority", onCommitPriority, this);
-	//childSetCommitCallback("loop_check", onCommitLoop, this);
-	//childSetCommitCallback("loop_in_point", onCommitLoopIn, this);
-	//childSetValidate("loop_in_point", validateLoopIn);
-	//childSetCommitCallback("loop_out_point", onCommitLoopOut, this);
-	//childSetValidate("loop_out_point", validateLoopOut);
-
-	//childSetCommitCallback("hand_pose_combo", onCommitHandPose, this);
-	
-	//childSetCommitCallback("emote_combo", onCommitEmote, this);
-	//childSetValue("emote_combo", "[None]");
-
-	//childSetCommitCallback("ease_in_time", onCommitEaseIn, this);
-	//childSetValidate("ease_in_time", validateEaseIn);
-	//childSetCommitCallback("ease_out_time", onCommitEaseOut, this);
-	//childSetValidate("ease_out_time", validateEaseOut);
-
 	std::string exten = gDirUtilp->getExtension(mFilename);
 	if (exten == "bvh")
 	{
@@ -254,7 +239,19 @@ BOOL LLFloaterAnimPreview::postBuild()
 			{
 				file_buffer[file_size] = '\0';
 				llinfos << "Loading BVH file " << mFilename << llendl;
-				loaderp = new LLBVHLoader(file_buffer);
+				ELoadStatus load_status = E_ST_OK;
+				S32 line_number = 0; 
+				loaderp = new LLBVHLoader(file_buffer, load_status, line_number);
+				std::string status = getString(STATUS[load_status]);
+				
+				if(load_status == E_ST_NO_XLT_FILE)
+				{
+					llwarns << "NOTE: No translation table found." << llendl;
+				}
+				else
+				{
+					llwarns << "ERROR: [line: " << line_number << "] " << status << llendl;
+				}
 			}
 
 			infile.close() ;
@@ -347,7 +344,7 @@ BOOL LLFloaterAnimPreview::postBuild()
 			else
 			{
 				LLUIString out_str = getString("failed_file_read");
-				out_str.setArg("[STATUS]", loaderp->getStatus()); // *TODO:Translate
+				out_str.setArg("[STATUS]", getString(STATUS[loaderp->getStatus()])); 
 				childSetValue("bad_animation_text", out_str.getString());
 			}
 		}
@@ -813,57 +810,53 @@ void LLFloaterAnimPreview::onCommitEaseOut(LLUICtrl* ctrl, void* data)
 //-----------------------------------------------------------------------------
 // validateEaseIn()
 //-----------------------------------------------------------------------------
-BOOL LLFloaterAnimPreview::validateEaseIn(LLUICtrl* spin, void* data)
+bool LLFloaterAnimPreview::validateEaseIn(const LLSD& data)
 {
-	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;	
-	if (!previewp->getEnabled())
-		return FALSE;
+	if (!getEnabled())
+		return false;
 
-	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
-	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
+	LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
+	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID);
 	
 	if (!motionp->getLoop())
 	{
-		F32 new_ease_in = llclamp((F32)previewp->childGetValue("ease_in_time").asReal(), 0.f, motionp->getDuration() - motionp->getEaseOutDuration());
-		previewp->childSetValue("ease_in_time", LLSD(new_ease_in));
+		F32 new_ease_in = llclamp((F32)childGetValue("ease_in_time").asReal(), 0.f, motionp->getDuration() - motionp->getEaseOutDuration());
+		childSetValue("ease_in_time", LLSD(new_ease_in));
 	}
 	
-	return TRUE;
+	return true;
 }
 
 //-----------------------------------------------------------------------------
 // validateEaseOut()
 //-----------------------------------------------------------------------------
-BOOL LLFloaterAnimPreview::validateEaseOut(LLUICtrl* spin, void* data)
+bool LLFloaterAnimPreview::validateEaseOut(const LLSD& data)
 {
-	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
+	if (!getEnabled())
+		return false;
 
-	if (!previewp->getEnabled())
-		return FALSE;
-
-	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
-	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
+	LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
+	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID);
 	
 	if (!motionp->getLoop())
 	{
-		F32 new_ease_out = llclamp((F32)previewp->childGetValue("ease_out_time").asReal(), 0.f, motionp->getDuration() - motionp->getEaseInDuration());
-		previewp->childSetValue("ease_out_time", LLSD(new_ease_out));
+		F32 new_ease_out = llclamp((F32)childGetValue("ease_out_time").asReal(), 0.f, motionp->getDuration() - motionp->getEaseInDuration());
+		childSetValue("ease_out_time", LLSD(new_ease_out));
 	}
 
-	return TRUE;
+	return true;
 }
 
 //-----------------------------------------------------------------------------
 // validateLoopIn()
 //-----------------------------------------------------------------------------
-BOOL LLFloaterAnimPreview::validateLoopIn(LLUICtrl* ctrl, void* data)
+bool LLFloaterAnimPreview::validateLoopIn(const LLSD& data)
 {
-	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
-	if (!previewp->getEnabled())
-		return FALSE;
+	if (!getEnabled())
+		return false;
 
-	F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal();
-	F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal();
+	F32 loop_in_value = (F32)childGetValue("loop_in_point").asReal();
+	F32 loop_out_value = (F32)childGetValue("loop_out_point").asReal();
 
 	if (loop_in_value < 0.f)
 	{
@@ -878,21 +871,20 @@ BOOL LLFloaterAnimPreview::validateLoopIn(LLUICtrl* ctrl, void* data)
 		loop_in_value = loop_out_value;
 	}
 
-	previewp->childSetValue("loop_in_point", LLSD(loop_in_value));
-	return TRUE;
+	childSetValue("loop_in_point", LLSD(loop_in_value));
+	return true;
 }
 
 //-----------------------------------------------------------------------------
 // validateLoopOut()
 //-----------------------------------------------------------------------------
-BOOL LLFloaterAnimPreview::validateLoopOut(LLUICtrl* spin, void* data)
+bool LLFloaterAnimPreview::validateLoopOut(const LLSD& data)
 {
-	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
-	if (!previewp->getEnabled())
-		return FALSE;
+	if (!getEnabled())
+		return false;
 
-	F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal();
-	F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal();
+	F32 loop_out_value = (F32)childGetValue("loop_out_point").asReal();
+	F32 loop_in_value = (F32)childGetValue("loop_in_point").asReal();
 
 	if (loop_out_value < 0.f)
 	{
@@ -907,8 +899,8 @@ BOOL LLFloaterAnimPreview::validateLoopOut(LLUICtrl* spin, void* data)
 		loop_out_value = loop_in_value;
 	}
 
-	previewp->childSetValue("loop_out_point", LLSD(loop_out_value));
-	return TRUE;
+	childSetValue("loop_out_point", LLSD(loop_out_value));
+	return true;
 }
 
 
@@ -1018,7 +1010,7 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata)
 		LLKeyframeDataCache::removeKeyframeData(floaterp->mMotionID);
 	}
 
-	floaterp->close(false);
+	floaterp->closeFloater(false);
 }
 
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h
index 639c9277cd..2f228c3ecd 100644
--- a/indra/newview/llfloateranimpreview.h
+++ b/indra/newview/llfloateranimpreview.h
@@ -92,16 +92,16 @@ public:
 	static void onCommitLoop(LLUICtrl*, void*);
 	static void onCommitLoopIn(LLUICtrl*, void*);
 	static void onCommitLoopOut(LLUICtrl*, void*);
-	static BOOL validateLoopIn(LLUICtrl*, void*);
-	static BOOL validateLoopOut(LLUICtrl*, void*);
+	bool validateLoopIn(const LLSD& data);
+	bool validateLoopOut(const LLSD& data);
 	static void onCommitName(LLUICtrl*, void*);
 	static void onCommitHandPose(LLUICtrl*, void*);
 	static void onCommitEmote(LLUICtrl*, void*);
 	static void onCommitPriority(LLUICtrl*, void*);
 	static void onCommitEaseIn(LLUICtrl*, void*);
 	static void onCommitEaseOut(LLUICtrl*, void*);
-	static BOOL validateEaseIn(LLUICtrl*, void*);
-	static BOOL validateEaseOut(LLUICtrl*, void*);
+	bool validateEaseIn(const LLSD& data);
+	bool validateEaseOut(const LLSD& data);
 	static void	onBtnOK(void*);
 	static void onSaveComplete(const LLUUID& asset_uuid,
 									   LLAssetType::EType type,
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index 747431fb19..e1974bba84 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -41,6 +41,7 @@
 #include "llparcel.h"
 #include "llvfile.h"
 #include "llvfs.h"
+#include "llwindow.h"
 
 #include "llagent.h"
 #include "llcombobox.h"
@@ -69,41 +70,32 @@ void auction_tga_upload_done(const LLUUID& asset_id,
 /// Class llfloaterauction
 ///----------------------------------------------------------------------------
 
-LLFloaterAuction* LLFloaterAuction::sInstance = NULL;
-
 // Default constructor
-LLFloaterAuction::LLFloaterAuction() :
-	LLFloater(std::string("floater_auction")),
+LLFloaterAuction::LLFloaterAuction(const LLSD& key)
+  : LLFloater(),
 	mParcelID(-1)
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml");
-
-	childSetValue("fence_check",
-		LLSD( gSavedSettings.getBOOL("AuctionShowFence") ) );
-	childSetCommitCallback("fence_check",
-		LLSavedSettingsGlue::setBOOL, (void*)"AuctionShowFence");
-
-	childSetAction("snapshot_btn", onClickSnapshot, this);
-	childSetAction("ok_btn", onClickOK, this);
 }
 
 // Destroys the object
 LLFloaterAuction::~LLFloaterAuction()
 {
-	sInstance = NULL;
 }
 
-// static
-void LLFloaterAuction::show()
+BOOL LLFloaterAuction::postBuild()
 {
-	if(!sInstance)
-	{
-		sInstance = new LLFloaterAuction();
-		sInstance->center();
-		sInstance->setFocus(TRUE);
-	}
-	sInstance->initialize();
-	sInstance->open();	/*Flawfinder: ignore*/
+	childSetValue("fence_check", LLSD( gSavedSettings.getBOOL("AuctionShowFence") ) );
+	getChild<LLUICtrl>("fence_check")->setCommitCallback(boost::bind(LLSavedSettingsGlue::setBOOL, _1, "AuctionShowFence"));
+
+	childSetAction("snapshot_btn", onClickSnapshot, this);
+	childSetAction("ok_btn", onClickOK, this);
+	return TRUE;
+}
+
+void LLFloaterAuction::onOpen(const LLSD& key)
+{
+	initialize();
 }
 
 void LLFloaterAuction::initialize()
@@ -259,7 +251,7 @@ void LLFloaterAuction::onClickOK(void* data)
 	self->mImage = NULL;
 	self->mParcelID = -1;
 	self->mParcelHost.invalidate();
-	self->close();
+	self->closeFloater();
 }
 
 
diff --git a/indra/newview/llfloaterauction.h b/indra/newview/llfloaterauction.h
index e13bce01e1..d71fd3c653 100644
--- a/indra/newview/llfloaterauction.h
+++ b/indra/newview/llfloaterauction.h
@@ -36,7 +36,7 @@
 
 #include "llfloater.h"
 #include "lluuid.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llviewerimage.h"
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -46,26 +46,24 @@
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class LLParcelSelection;
 
-class LLFloaterAuction : public LLFloater
+class LLFloaterAuction : public LLFloater, public LLFloaterSingleton<LLFloaterAuction>
 {
+	friend class LLUISingleton<LLFloaterAuction, VisibilityPolicy<LLFloater> >;
 public:
 	// LLFloater interface
 	/*virtual*/ void onClose(bool app_quitting) { setVisible(FALSE); }
+	/*virtual*/ void onOpen(const LLSD& key);
 	/*virtual*/ void draw();
-
-	// LLFloaterAuction interface
-	static void show();
 	
 private:
-	LLFloaterAuction();
+	LLFloaterAuction(const LLSD& key);
 	~LLFloaterAuction();
 	void initialize();
 
 	static void onClickSnapshot(void* data);
 	static void onClickOK(void* data);
 
-	static LLFloaterAuction* sInstance;
-
+	/*virtual*/ BOOL postBuild();
 private:
 	LLTransactionID mTransactionID;
 	LLAssetID mImageID;
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index e382fefece..2c2dcda633 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -42,15 +42,13 @@
 #include "llinventorymodel.h"
 #include "lllineeditor.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
 #include "lltextbox.h"
 #include "lluictrlfactory.h"
 #include "llviewercontrol.h"
 #include "llworld.h"
-
-const S32 MIN_WIDTH = 200;
-const S32 MIN_HEIGHT = 340;
-const LLRect FLOATER_RECT(0, 380, 240, 0);
-const std::string FLOATER_TITLE = "Choose Resident";
+#include "lltabcontainer.h"
 
 // static
 LLFloaterAvatarPicker* LLFloaterAvatarPicker::sInstance = NULL;
@@ -70,13 +68,13 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(callback_t callback,
 		sInstance->mCallbackUserdata = userdata;
 		sInstance->mCloseOnSelect = FALSE;
 
-		sInstance->open();	/* Flawfinder: ignore */
+		sInstance->openFloater();
 		sInstance->center();
 		sInstance->setAllowMultiple(allow_multiple);
 	}
 	else
 	{
-		sInstance->open();	/*Flawfinder: ignore*/
+		sInstance->openFloater();
 		sInstance->mCallback = callback;
 		sInstance->mCallbackUserdata = userdata;
 		sInstance->setAllowMultiple(allow_multiple);
@@ -88,30 +86,33 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(callback_t callback,
 }
 
 // Default constructor
-LLFloaterAvatarPicker::LLFloaterAvatarPicker() :
-	LLFloater(std::string("avatarpicker"), FLOATER_RECT, FLOATER_TITLE, TRUE, MIN_WIDTH, MIN_HEIGHT),
+LLFloaterAvatarPicker::LLFloaterAvatarPicker()
+  : LLFloater(),
 	mResultsReturned(FALSE),
 	mCallback(NULL),
 	mCallbackUserdata(NULL)
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_avatar_picker.xml", NULL);
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_avatar_picker.xml");
 }
 
 BOOL LLFloaterAvatarPicker::postBuild()
 {
-	childSetKeystrokeCallback("Edit", editKeystroke, this);
+	getChild<LLLineEditor>("Edit")->setKeystrokeCallback(editKeystroke, this);
 
 	childSetAction("Find", onBtnFind, this);
 	childDisable("Find");
 	childSetAction("Refresh", onBtnRefresh, this);
 	childSetCommitCallback("near_me_range", onRangeAdjust, this);
-
-	childSetDoubleClickCallback("SearchResults", onBtnSelect);
-	childSetDoubleClickCallback("NearMe", onBtnSelect);
+	
+	LLScrollListCtrl* searchresults = getChild<LLScrollListCtrl>("SearchResults");
+	searchresults->setDoubleClickCallback(onBtnSelect, this);
 	childSetCommitCallback("SearchResults", onList, this);
-	childSetCommitCallback("NearMe", onList, this);
 	childDisable("SearchResults");
-
+	
+	LLScrollListCtrl* nearme = getChild<LLScrollListCtrl>("NearMe");
+	nearme->setDoubleClickCallback(onBtnSelect, this);
+	childSetCommitCallback("NearMe", onList, this);
+	
 	childSetAction("Select", onBtnSelect, this);
 	childDisable("Select");
 
@@ -126,33 +127,26 @@ BOOL LLFloaterAvatarPicker::postBuild()
 		search_panel->setDefaultBtn("Find");
 	}
 
-	getChild<LLScrollListCtrl>("SearchResults")->addCommentText(getString("no_results"));
+	getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("no_results"));
 
 	LLInventoryPanel* inventory_panel = getChild<LLInventoryPanel>("InventoryPanel");
 	inventory_panel->setFilterTypes(0x1 << LLInventoryType::IT_CALLINGCARD);
 	inventory_panel->setFollowsAll();
 	inventory_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
 	inventory_panel->openDefaultFolderForType(LLAssetType::AT_CALLINGCARD);
-	inventory_panel->setSelectCallback(LLFloaterAvatarPicker::onCallingCardSelectionChange, this);
-
-	childSetTabChangeCallback("ResidentChooserTabs", "SearchPanel",			onTabChanged, this);
-	childSetTabChangeCallback("ResidentChooserTabs", "CallingCardsPanel",	onTabChanged, this);
-	childSetTabChangeCallback("ResidentChooserTabs", "NearMePanel",			onTabChanged, this);
+	inventory_panel->setSelectCallback(boost::bind(&LLFloaterAvatarPicker::doCallingCardSelectionChange, this, _1, _2));
+	
+	getChild<LLTabContainer>("ResidentChooserTabs")->setCommitCallback(
+		boost::bind(&LLFloaterAvatarPicker::onTabChanged, this));
 	
 	setAllowMultiple(FALSE);
 
 	return TRUE;
 }
 
-void LLFloaterAvatarPicker::onTabChanged(void* userdata, bool from_click)
+void LLFloaterAvatarPicker::onTabChanged()
 {
-	LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
-	if (!self)
-	{
-		return;
-	}
-	
-	self->childSetEnabled("Select", self->visibleItemsSelected());
+	childSetEnabled("Select", visibleItemsSelected());
 }
 
 // Destroys the object
@@ -216,7 +210,7 @@ void LLFloaterAvatarPicker::onBtnSelect(void* userdata)
 	if(self->mCloseOnSelect)
 	{
 		self->mCloseOnSelect = FALSE;
-		self->close();		
+		self->closeFloater();		
 	}
 }
 
@@ -229,14 +223,14 @@ void LLFloaterAvatarPicker::onBtnRefresh(void* userdata)
 	}
 	
 	self->getChild<LLScrollListCtrl>("NearMe")->deleteAllItems();
-	self->getChild<LLScrollListCtrl>("NearMe")->addCommentText(self->getString("searching"));
+	self->getChild<LLScrollListCtrl>("NearMe")->setCommentText(self->getString("searching"));
 	self->mNearMeListComplete = FALSE;
 }
 
 void LLFloaterAvatarPicker::onBtnClose(void* userdata)
 {
 	LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
-	if(self) self->close();
+	if(self) self->closeFloater();
 }
 
 void LLFloaterAvatarPicker::onRangeAdjust(LLUICtrl* source, void* data)
@@ -253,18 +247,8 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata)
 	}
 }
 
-// static callback for inventory picker (select from calling cards)
-void LLFloaterAvatarPicker::onCallingCardSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
-{
-	LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)data;
-	if (self)
-	{
-		self->doCallingCardSelectionChange( items, user_action, data );
-	}
-}
-
 // Callback for inventory picker (select from calling cards)
-void LLFloaterAvatarPicker::doCallingCardSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
+void LLFloaterAvatarPicker::doCallingCardSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
 {
 	bool panel_active = (childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("CallingCardsPanel"));
 	
@@ -330,7 +314,7 @@ void LLFloaterAvatarPicker::populateNearMe()
 	{
 		childDisable("NearMe");
 		childDisable("Select");
-		near_me_scroller->addCommentText(getString("no_one_near"));
+		near_me_scroller->setCommentText(getString("no_one_near"));
 	}
 	else 
 	{
@@ -394,7 +378,7 @@ void LLFloaterAvatarPicker::find()
 	gAgent.sendReliableMessage();
 
 	getChild<LLScrollListCtrl>("SearchResults")->deleteAllItems();
-	getChild<LLScrollListCtrl>("SearchResults")->addCommentText(getString("searching"));
+	getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("searching"));
 	
 	childSetEnabled("Select", FALSE);
 	mResultsReturned = FALSE;
@@ -501,7 +485,7 @@ BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask)
 	}
 	else if (key == KEY_ESCAPE && mask == MASK_NONE)
 	{
-		close();
+		closeFloater();
 		return TRUE;
 	}
 
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index 56bc387bce..0f47401f23 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -62,10 +62,9 @@ private:
 	static void onRangeAdjust(LLUICtrl* source, void* data);
 	static void onBtnClose(void* userdata);
 	static void onList(class LLUICtrl* ctrl, void* userdata);
-	static void onTabChanged(void* userdata, bool from_click);
+		   void onTabChanged();
 	
-		   void doCallingCardSelectionChange(const std::deque<class LLFolderViewItem*> &items, BOOL user_action, void* data);
-	static void onCallingCardSelectionChange(const std::deque<class LLFolderViewItem*> &items, BOOL user_action, void* data);
+		   void doCallingCardSelectionChange(const std::deque<class LLFolderViewItem*> &items, BOOL user_action);
 
 	void populateNearMe();
 	BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected.
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index e81b5d7fce..e2f13088eb 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -42,30 +42,29 @@
 
 using namespace LLVOAvatarDefines;
 
-LLFloaterAvatarTextures::LLFloaterAvatarTextures(const LLUUID& id) : 
-	LLFloater(std::string("avatar_texture_debug")),
+LLFloaterAvatarTextures* LLFloaterAvatarTextures::sInstance = NULL;
+LLFloaterAvatarTextures::LLFloaterAvatarTextures(const LLUUID& id)
+  : LLFloater(),
 	mID(id)
 {
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_avatar_textures.xml");
 }
 
 LLFloaterAvatarTextures::~LLFloaterAvatarTextures()
 {
+	sInstance = NULL;
 }
 
 LLFloaterAvatarTextures* LLFloaterAvatarTextures::show(const LLUUID &id)
 {
-
-	LLFloaterAvatarTextures* floaterp = new LLFloaterAvatarTextures(id);
-
-	// Builds and adds to gFloaterView
-	LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_avatar_textures.xml");
-
-	gFloaterView->addChild(floaterp);
-	floaterp->open();	/*Flawfinder: ignore*/
-
-	gFloaterView->adjustToFitScreen(floaterp, FALSE);
-
-	return floaterp;
+	if (!sInstance)
+	{
+		sInstance = new LLFloaterAvatarTextures(id);
+		gFloaterView->addChild(sInstance);
+		gFloaterView->adjustToFitScreen(sInstance, FALSE);
+	}
+	sInstance->openFloater();
+	return sInstance;
 }
 
 BOOL LLFloaterAvatarTextures::postBuild()
@@ -142,7 +141,7 @@ void LLFloaterAvatarTextures::refresh()
 	}
 	else
 	{
-		setTitle(mTitle + ": INVALID AVATAR (" + mID.asString() + ")");
+		setTitle(mTitle + ": " + getString("InvalidAvatar") + " (" + mID.asString() + ")");
 	}
 }
 
diff --git a/indra/newview/llfloateravatartextures.h b/indra/newview/llfloateravatartextures.h
index 4138edeb4d..3ec0e7cb03 100644
--- a/indra/newview/llfloateravatartextures.h
+++ b/indra/newview/llfloateravatartextures.h
@@ -60,6 +60,7 @@ private:
 	LLUUID	mID;
 	std::string mTitle;
 	LLTextureCtrl* mTextures[LLVOAvatarDefines::TEX_NUM_INDICES];
+	static LLFloaterAvatarTextures* sInstance;
 };
 
 #endif
diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp
index 5476b35dc8..052f334285 100644
--- a/indra/newview/llfloaterbeacons.cpp
+++ b/indra/newview/llfloaterbeacons.cpp
@@ -40,6 +40,7 @@
 
 
 LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed)
+:	LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_beacons.xml");
 
@@ -71,14 +72,13 @@ BOOL LLFloaterBeacons::postBuild()
 
 // Needed to make the floater visibility toggle the beacons.
 // Too bad we can't just add control_name="BeaconAlwaysOn" to the XML.
-void LLFloaterBeacons::open()
+void LLFloaterBeacons::onOpen(const LLSD& key)
 {
-	LLFloater::open();
 	gSavedSettings.setBOOL( "BeaconAlwaysOn", TRUE);
 }
-void LLFloaterBeacons::close(bool app_quitting)
+void LLFloaterBeacons::onClose(bool app_quitting)
 {
-	LLFloater::close(app_quitting);
+	destroy();
 	if(!app_quitting)
 	{
 		gSavedSettings.setBOOL( "BeaconAlwaysOn", FALSE);
diff --git a/indra/newview/llfloaterbeacons.h b/indra/newview/llfloaterbeacons.h
index c12bdd7261..8156e82ac3 100644
--- a/indra/newview/llfloaterbeacons.h
+++ b/indra/newview/llfloaterbeacons.h
@@ -45,8 +45,8 @@ public:
 	
 	// Needed to make the floater visibility toggle the beacons.
 	// Too bad we can't just add control_name="BeaconAlwaysOn" to the XML.
-	/*virtual*/ void open();
-	/*virtual*/ void close(bool app_quitting);
+	/*virtual*/ void onOpen(const LLSD& key);
+	/*virtual*/ void onClose(bool app_quitting);
 
 private:
 	LLFloaterBeacons(const LLSD& seed);
diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp
index 3cd35db19c..2507a72caa 100644
--- a/indra/newview/llfloaterbuildoptions.cpp
+++ b/indra/newview/llfloaterbuildoptions.cpp
@@ -40,58 +40,16 @@
 #include "llfloaterbuildoptions.h"
 #include "lluictrlfactory.h"
 
-// library includes
-#include "llfontgl.h"
-#include "llcheckboxctrl.h"
-#include "llspinctrl.h"
-#include "llsliderctrl.h"
-
-// newview includes
-#include "llresmgr.h"
-#include "llviewercontrol.h"
-
-//
-// Globals
-//
-LLFloaterBuildOptions	*LLFloaterBuildOptions::sInstance = NULL;
-
 //
 // Methods
 //
-LLFloaterBuildOptions::LLFloaterBuildOptions( )
-: LLFloater(std::string("build options floater"))
+LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key)
+  : LLFloater()
 {
-	sInstance = this;
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_build_options.xml");
 }
 
 LLFloaterBuildOptions::~LLFloaterBuildOptions()
 {
-	sInstance = NULL;
-}
-
-// static
-void LLFloaterBuildOptions::show(void*)
-{
-	if (sInstance)
-	{
-		sInstance->open();	/*Flawfinder: ignore*/
-	}
-	else
-	{
-		LLFloaterBuildOptions* floater = new LLFloaterBuildOptions();
-
-		LLUICtrlFactory::getInstance()->buildFloater(floater, "floater_build_options.xml");
-		floater->open();	/*Flawfinder: ignore*/
-	}
 }
 
-LLFloaterBuildOptions* LLFloaterBuildOptions::getInstance()
-{
-	return sInstance;
-}
-
-// static
-BOOL LLFloaterBuildOptions::visible(void*)
-{
-	return (sInstance != NULL);
-}
diff --git a/indra/newview/llfloaterbuildoptions.h b/indra/newview/llfloaterbuildoptions.h
index e030b063d9..da72520486 100644
--- a/indra/newview/llfloaterbuildoptions.h
+++ b/indra/newview/llfloaterbuildoptions.h
@@ -42,19 +42,12 @@
 
 
 class LLFloaterBuildOptions
-:	public LLFloater
+	:	public LLFloater, public LLFloaterSingleton<LLFloaterBuildOptions>
 {
+	friend class LLUISingleton<LLFloaterBuildOptions, VisibilityPolicy<LLFloater> >;
 protected:
-	LLFloaterBuildOptions();
+	LLFloaterBuildOptions(const LLSD& key);
 	~LLFloaterBuildOptions();
-
-public:
-	static void		show(void*);
-	static LLFloaterBuildOptions* getInstance();
-	static BOOL		visible(void*);
-
-protected:
-	static LLFloaterBuildOptions*	sInstance;
 };
 
 #endif
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index 4697296e16..6157d19541 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -52,20 +52,28 @@
 #include "llviewerstats.h"
 #include "lluictrlfactory.h"
 #include "llselectmgr.h"
+#include "llcheckboxctrl.h"
 
 #include "roles_constants.h" // for GP_OBJECT_MANIPULATE
 
 
-LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) : mDone(FALSE)
+LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) 
+:	LLFloater(),
+	mDone(FALSE)
 {
 	mID.generate();
 	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_bulk_perms.xml");
+}
+
+BOOL LLFloaterBulkPermission::postBuild()
+{
 	childSetEnabled("next_owner_transfer", gSavedSettings.getBOOL("BulkChangeNextOwnerCopy"));
 	childSetAction("apply", onApplyBtn, this);
 	childSetAction("close", onCloseBtn, this);
 	childSetAction("check_all", onCheckAll, this);
 	childSetAction("check_none", onUncheckAll, this);
 	childSetCommitCallback("next_owner_copy", &onCommitCopy, this);
+	return TRUE;
 }
 
 void LLFloaterBulkPermission::doApply()
@@ -92,7 +100,7 @@ void LLFloaterBulkPermission::doApply()
 	LLSelectMgr::getInstance()->getSelection()->applyToNodes(&gatherer);
 	if(mObjectIDs.empty())
 	{
-		list->addCommentText(getString("nothing_to_modify_text"));
+		list->setCommentText(getString("nothing_to_modify_text"));
 	}
 	else
 	{
@@ -172,7 +180,7 @@ void LLFloaterBulkPermission::onCommitCopy(LLUICtrl* ctrl, void* data)
 BOOL LLFloaterBulkPermission::start()
 {
 	// note: number of top-level objects to modify is mObjectIDs.count().
-	getChild<LLScrollListCtrl>("queue output")->addCommentText(getString("start_text"));
+	getChild<LLScrollListCtrl>("queue output")->setCommentText(getString("start_text"));
 	return nextObject();
 }
 
@@ -195,7 +203,7 @@ BOOL LLFloaterBulkPermission::nextObject()
 
 	if(isDone() && !mDone)
 	{
-		getChild<LLScrollListCtrl>("queue output")->addCommentText(getString("done_text"));
+		getChild<LLScrollListCtrl>("queue output")->setCommentText(getString("done_text"));
 		mDone = TRUE;
 	}
 	return successful_start;
@@ -262,6 +270,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, Invent
 			( asstype == LLAssetType::AT_CLOTHING  && gSavedSettings.getBOOL("BulkChangeIncludeClothing"  )) ||
 			( asstype == LLAssetType::AT_GESTURE   && gSavedSettings.getBOOL("BulkChangeIncludeGestures"  )) ||
 			( asstype == LLAssetType::AT_LANDMARK  && gSavedSettings.getBOOL("BulkChangeIncludeLandmarks" )) ||
+			( asstype == LLAssetType::AT_FAVORITE  && gSavedSettings.getBOOL("BulkChangeIncludeFavourite" )) ||
 			( asstype == LLAssetType::AT_NOTECARD  && gSavedSettings.getBOOL("BulkChangeIncludeNotecards" )) ||
 			( asstype == LLAssetType::AT_OBJECT    && gSavedSettings.getBOOL("BulkChangeIncludeObjects"   )) ||
 			( asstype == LLAssetType::AT_LSL_TEXT  && gSavedSettings.getBOOL("BulkChangeIncludeScripts"   )) ||
@@ -311,7 +320,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, Invent
 					status_text.setArg("[STATUS]", "");
 				}
 				
-				list->addCommentText(status_text.getString());
+				list->setCommentText(status_text.getString());
 
 				//TODO if we are an object inside an object we should check a recuse flag and if set
 				//open the inventory of the object and recurse - Michelle2 Zenovka
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index 09af27045a..d4578f9f30 100644
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -51,6 +51,7 @@ class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener,
 public:
 
 	LLFloaterBulkPermission(const LLSD& seed);
+	BOOL postBuild();
 
 private:
 	virtual ~LLFloaterBulkPermission() {}
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index 96e51c2fa2..5cf4d90ece 100644
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -37,25 +37,19 @@
 
 #include "llscrolllistctrl.h"
 
+#include "llsd.h"
 #include "lluictrlfactory.h"
 #include "llviewermessage.h"
 #include "llappviewer.h"		// gPacificDaylightTime
 
-///----------------------------------------------------------------------------
-/// Local function declarations, constants, enums, and typedefs
-///----------------------------------------------------------------------------
-LLFloaterBump* LLFloaterBump::sInstance = NULL;
-
 ///----------------------------------------------------------------------------
 /// Class LLFloaterBump
 ///----------------------------------------------------------------------------
 
 // Default constructor
-LLFloaterBump::LLFloaterBump() 
+LLFloaterBump::LLFloaterBump(const LLSD& key) 
 :	LLFloater()
 {
-	sInstance = this;
-
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_bumps.xml");
 }
 
@@ -63,29 +57,19 @@ LLFloaterBump::LLFloaterBump()
 // Destroys the object
 LLFloaterBump::~LLFloaterBump()
 {
-	sInstance = NULL;
 }
 
-// static
-void LLFloaterBump::show(void *contents)
+// virtual
+void LLFloaterBump::onOpen(const LLSD& key)
 {
-	if (gNoRender)
-	{
+	LLScrollListCtrl* list = getChild<LLScrollListCtrl>("bump_list");
+	if (!list)
 		return;
-	}
-
-	if (!sInstance)
-	{
-		sInstance = new LLFloaterBump();
-	}
-	
-	LLScrollListCtrl* list = sInstance->getChild<LLScrollListCtrl>("bump_list");
-	if (!list) return;
 	list->deleteAllItems();
 
 	if (gMeanCollisionList.empty())
 	{
-		std::string none_detected = sInstance->getString("none_detected");
+		std::string none_detected = getString("none_detected");
 		LLSD row;
 		row["columns"][0]["value"] = none_detected;
 		row["columns"][0]["font"] = "SansSerifBold";
@@ -97,33 +81,23 @@ void LLFloaterBump::show(void *contents)
 			 iter != gMeanCollisionList.end(); ++iter)
 		{
 			LLMeanCollisionData *mcd = *iter;
-			LLFloaterBump::add(list, mcd);
+			add(list, mcd);
 		}
 	}
-	
-	sInstance->open();	/*Flawfinder: ignore*/
 }
 
 void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd)
 {
-	if (!sInstance)
-	{
-		new LLFloaterBump();
-	}
-	
 	if (mcd->mFirstName.empty() || list->getItemCount() >= 20)
 	{
 		return;
 	}
 
-	// There's only one internal tm buffer.
-	struct tm* timep;
-	
-	// Convert to Pacific, based on server's opinion of whether
-	// it's daylight savings time there.
-	timep = utc_to_pacific_time(mcd->mTime, gPacificDaylightTime);
-	
-	std::string time = llformat("[%d:%02d]", timep->tm_hour, timep->tm_min);
+	std::string timeStr = getString ("timeStr");
+	LLSD substitution;
+
+	substitution["datetime"] = (S32) mcd->mTime;
+	LLStringUtil::format (timeStr, substitution);
 
 	std::string action;
 	switch(mcd->mType)
@@ -150,8 +124,8 @@ void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd)
 	}
 
 	// All above action strings are in XML file
-	LLUIString text = sInstance->getString(action);
-	text.setArg("[TIME]", time);
+	LLUIString text = getString(action);
+	text.setArg("[TIME]", timeStr);
 	text.setArg("[FIRST]", mcd->mFirstName);
 	text.setArg("[LAST]", mcd->mLastName);
 
diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h
index eb15671d41..f55a9e6bc5 100644
--- a/indra/newview/llfloaterbump.h
+++ b/indra/newview/llfloaterbump.h
@@ -40,18 +40,17 @@ class LLMeanCollisionData;
 class LLScrollListCtrl;
 
 class LLFloaterBump 
-: public LLFloater
+: public LLFloater, public LLFloaterSingleton<LLFloaterBump>
 {
-public:
-	static void show(void *);
-
-private:
-	LLFloaterBump();
+	friend class LLUISingleton<LLFloaterBump, VisibilityPolicy<LLFloater> >;
+protected:
+	LLFloaterBump(const LLSD& key);
 	virtual ~LLFloaterBump();
-	static void add(LLScrollListCtrl* list, LLMeanCollisionData *mcd);
 	
-private:
-	static LLFloaterBump* sInstance;
+	void add(LLScrollListCtrl* list, LLMeanCollisionData *mcd);
+
+public:
+	/*virtual*/ void onOpen(const LLSD& key);
 };
 
 #endif
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index a33cabc749..9c523522fd 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -49,14 +49,19 @@
 #include "llviewerobject.h"
 #include "lluictrlfactory.h"
 #include "llviewerwindow.h"
+#include "lltrans.h"
 
 LLFloaterBuy* LLFloaterBuy::sInstance = NULL;
 
 LLFloaterBuy::LLFloaterBuy()
-:	LLFloater(std::string("floater_buy_object"), std::string("FloaterBuyRect"), LLStringUtil::null)
+:	LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_object.xml");
 
+}
+
+BOOL LLFloaterBuy::postBuild()
+{
 	childDisable("object_list");
 	childDisable("item_list");
 
@@ -64,6 +69,7 @@ LLFloaterBuy::LLFloaterBuy()
 	childSetAction("buy_btn", onClickBuy, this);
 
 	setDefaultBtn("cancel_btn"); // to avoid accidental buy (SL-43130)
+	return TRUE;
 }
 
 LLFloaterBuy::~LLFloaterBuy()
@@ -102,7 +108,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
 		sInstance = new LLFloaterBuy();
 	}
 	
-	sInstance->open(); /*Flawfinder: ignore*/
+	sInstance->openFloater();
 	sInstance->setFocus(TRUE);
 	sInstance->mSaleInfo = sale_info;
 	sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
@@ -270,15 +276,15 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
 		std::string text = obj->getName();
 		if (!(next_owner_mask & PERM_COPY))
 		{
-			text.append(" (no copy)");
+			text.append(getString("no_copy"));
 		}
 		if (!(next_owner_mask & PERM_MODIFY))
 		{
-			text.append(" (no modify)");
+			text.append(LLTrans::getString("no_modify"));
 		}
 		if (!(next_owner_mask & PERM_TRANSFER))
 		{
-			text.append(" (no transfer)");
+			text.append(LLTrans::getString("no_transfer"));
 		}
 
 		row["columns"][1]["column"] = "text";
@@ -290,7 +296,6 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
 	removeVOInventoryListener();
 }
 
-
 // static
 void LLFloaterBuy::onClickBuy(void*)
 {
@@ -309,7 +314,7 @@ void LLFloaterBuy::onClickBuy(void*)
 	// it doesn't match region info then sale is canceled.
 	LLSelectMgr::getInstance()->sendBuy(gAgent.getID(), category_id, sInstance->mSaleInfo );
 
-	sInstance->close();
+	sInstance->closeFloater();
 }
 
 
@@ -318,7 +323,7 @@ void LLFloaterBuy::onClickCancel(void*)
 {
 	if (sInstance)
 	{
-		sInstance->close();
+		sInstance->closeFloater();
 	}
 }
 
@@ -326,5 +331,5 @@ void LLFloaterBuy::onClose(bool app_quitting)
 {
 	// drop reference to current selection so selection goes away
 	mObjectSelection = NULL;
-	LLFloater::onClose(app_quitting);
+	destroy();
 }
diff --git a/indra/newview/llfloaterbuy.h b/indra/newview/llfloaterbuy.h
index 7473e6c855..ffd3fa30c8 100644
--- a/indra/newview/llfloaterbuy.h
+++ b/indra/newview/llfloaterbuy.h
@@ -57,7 +57,7 @@ public:
 protected:
 	LLFloaterBuy();
 	~LLFloaterBuy();
-
+	/*virtual*/	BOOL	postBuild();
 	/*virtual*/ void onClose(bool app_quitting);
 	void reset();
 
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 95a8caac53..7a90275201 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -57,10 +57,14 @@
 LLFloaterBuyContents* LLFloaterBuyContents::sInstance = NULL;
 
 LLFloaterBuyContents::LLFloaterBuyContents()
-:	LLFloater(std::string("floater_buy_contents"), std::string("FloaterBuyContentsRect"), LLStringUtil::null)
+:	LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_contents.xml");
 
+}
+BOOL LLFloaterBuyContents::postBuild()
+{
+
 	childSetAction("cancel_btn", onClickCancel, this);
 	childSetAction("buy_btn", onClickBuy, this);
 
@@ -69,6 +73,7 @@ LLFloaterBuyContents::LLFloaterBuyContents()
 	childDisable("wear_check");
 
 	setDefaultBtn("cancel_btn"); // to avoid accidental buy (SL-43130)
+	return TRUE;
 }
 
 LLFloaterBuyContents::~LLFloaterBuyContents()
@@ -99,7 +104,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
 		sInstance = new LLFloaterBuyContents();
 	}
 
-	sInstance->open(); /*Flawfinder: ignore*/
+	sInstance->openFloater();
 	sInstance->setFocus(TRUE);
 	sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
 
@@ -275,7 +280,7 @@ void LLFloaterBuyContents::onClickBuy(void*)
 	if(!sInstance->childIsEnabled("buy_btn"))
 	{
 		// We shouldn't be enabled.  Just close.
-		sInstance->close();
+		sInstance->closeFloater();
 		return;
 	}
 
@@ -294,12 +299,12 @@ void LLFloaterBuyContents::onClickBuy(void*)
 	// it doesn't match region info then sale is canceled.
 	LLSelectMgr::getInstance()->sendBuy(gAgent.getID(), category_id, sInstance->mSaleInfo);
 
-	sInstance->close();
+	sInstance->closeFloater();
 }
 
 
 // static
 void LLFloaterBuyContents::onClickCancel(void*)
 {
-	sInstance->close();
+	sInstance->closeFloater();
 }
diff --git a/indra/newview/llfloaterbuycontents.h b/indra/newview/llfloaterbuycontents.h
index 908ff134e6..52114811bf 100644
--- a/indra/newview/llfloaterbuycontents.h
+++ b/indra/newview/llfloaterbuycontents.h
@@ -55,7 +55,7 @@ public:
 protected:
 	LLFloaterBuyContents();
 	~LLFloaterBuyContents();
-
+	/*virtual*/	BOOL	postBuild();
 	void requestObjectInventories();
 	/*virtual*/ void inventoryChanged(LLViewerObject* obj,
 								 InventoryObjectList* inv,
diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp
index 37cac9e271..c943eaeacf 100644
--- a/indra/newview/llfloaterbuycurrency.cpp
+++ b/indra/newview/llfloaterbuycurrency.cpp
@@ -80,7 +80,6 @@ public:
 
 	virtual void draw();
 	virtual BOOL canClose();
-	virtual void onClose(bool app_quitting);
 
 	static void onClickBuy(void* data);
 	static void onClickCancel(void* data);
@@ -114,7 +113,7 @@ LLFloaterBuyCurrencyUI* LLFloaterBuyCurrencyUI::soleInstance(bool createIfNeeded
 #pragma warning(disable : 4355)
 #endif 
 LLFloaterBuyCurrencyUI::LLFloaterBuyCurrencyUI()
-:	LLFloater(std::string("Buy Currency")),
+:	LLFloater(),
 	mChildren(*this),
 	mManager(*this)
 {
@@ -162,7 +161,6 @@ BOOL LLFloaterBuyCurrencyUI::postBuild()
 	childSetAction("error_web", onClickErrorWeb, this);
 
 	updateUI();
-	
 	return TRUE;
 }
 
@@ -172,7 +170,7 @@ void LLFloaterBuyCurrencyUI::draw()
 	{
 		if (mManager.bought())
 		{
-			close();
+			closeFloater();
 			return;
 		}
 		
@@ -187,12 +185,6 @@ BOOL LLFloaterBuyCurrencyUI::canClose()
 	return mManager.canCancel();
 }
 
-void LLFloaterBuyCurrencyUI::onClose(bool app_quitting)
-{
-	LLFloater::onClose(app_quitting);
-	destroy();
-}
-
 void LLFloaterBuyCurrencyUI::updateUI()
 {
 	bool hasError = mManager.hasError();
@@ -341,7 +333,7 @@ void LLFloaterBuyCurrencyUI::onClickCancel(void* data)
 	LLFloaterBuyCurrencyUI* self = LLFloaterBuyCurrencyUI::soleInstance(false);
 	if (self)
 	{
-		self->close();
+		self->closeFloater();
 	}
 }
 
@@ -352,7 +344,7 @@ void LLFloaterBuyCurrencyUI::onClickErrorWeb(void* data)
 	if (self)
 	{
 		LLWeb::loadURLExternal(self->mManager.errorURI());
-		self->close();
+		self->closeFloater();
 	}
 }
 
@@ -362,7 +354,7 @@ void LLFloaterBuyCurrency::buyCurrency()
 	LLFloaterBuyCurrencyUI* ui = LLFloaterBuyCurrencyUI::soleInstance(true);
 	ui->noTarget();
 	ui->updateUI();
-	ui->open();
+	ui->openFloater();
 }
 
 void LLFloaterBuyCurrency::buyCurrency(const std::string& name, S32 price)
@@ -370,7 +362,7 @@ void LLFloaterBuyCurrency::buyCurrency(const std::string& name, S32 price)
 	LLFloaterBuyCurrencyUI* ui = LLFloaterBuyCurrencyUI::soleInstance(true);
 	ui->target(name, price);
 	ui->updateUI();
-	ui->open();
+	ui->openFloater();
 }
 
 
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 29506e21d5..e981b07a82 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -187,7 +187,6 @@ public:
 	
 	virtual void draw();
 	virtual BOOL canClose();
-	virtual void onClose(bool app_quitting);
 	/*virtual*/ void setMinimized(BOOL b);
 	
 private:
@@ -199,7 +198,7 @@ private:
 };
 
 static void cacheNameUpdateRefreshesBuyLand(const LLUUID&,
-	const std::string&, const std::string&, BOOL, void* data)
+	const std::string&, const std::string&, BOOL)
 {
 	LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(false);
 	if (ui)
@@ -221,7 +220,7 @@ void LLFloaterBuyLand::buyLand(
 	LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(true);
 	ui->setForGroup(is_for_group);
 	ui->setParcel(region, parcel);
-	ui->open();	/*Flawfinder: ignore*/
+	ui->openFloater();
 }
 
 // static
@@ -298,7 +297,7 @@ LLFloaterBuyLandUI* LLFloaterBuyLandUI::soleInstance(bool createIfNeeded)
 		static bool observingCacheName = false;
 		if (!observingCacheName)
 		{
-			gCacheName->addObserver(cacheNameUpdateRefreshesBuyLand);
+			gCacheName->addObserver(&cacheNameUpdateRefreshesBuyLand);
 			observingCacheName = true;
 		}
 
@@ -322,7 +321,7 @@ LLFloaterBuyLandUI* LLFloaterBuyLandUI::soleInstance(bool createIfNeeded)
 #pragma warning(disable : 4355)
 #endif 
 LLFloaterBuyLandUI::LLFloaterBuyLandUI()
-:	LLFloater(std::string("Buy Land")),
+:	LLFloater(),
 	mParcel(0),
 	mBought(false),
 	mParcelValid(false), mSiteValid(false),
@@ -350,7 +349,7 @@ void LLFloaterBuyLandUI::SelectionObserver::changed()
 	{
 		if (LLViewerParcelMgr::getInstance()->selectionEmpty())
 		{
-			ui->close();
+			ui->closeFloater();
 		}
 		else {
 			ui->setParcel(
@@ -566,8 +565,7 @@ void LLFloaterBuyLandUI::updateCovenantInfo()
 	{
 		check->set(false);
 		check->setEnabled(true);
-		check->setCallbackUserData(this);
-		check->setCommitCallback(onChangeAgreeCovenant);
+		check->setCommitCallback(onChangeAgreeCovenant, this);
 	}
 
 	LLTextBox* box = getChild<LLTextBox>("covenant_text");
@@ -963,7 +961,7 @@ void LLFloaterBuyLandUI::draw()
 	
 	if (mBought)
 	{
-		close();
+		closeFloater();
 	}
 	else if (needsUpdate)
 	{
@@ -999,13 +997,6 @@ void LLFloaterBuyLandUI::setMinimized(BOOL minimize)
 	}
 }
 
-void LLFloaterBuyLandUI::onClose(bool app_quitting)
-{
-	LLFloater::onClose(app_quitting);
-	destroy();
-}
-
-
 void LLFloaterBuyLandUI::refreshUI()
 {
 	// section zero: title area
@@ -1169,7 +1160,7 @@ void LLFloaterBuyLandUI::refreshUI()
 		
 		if (!mParcelValid)
 		{
-			message += "(no parcel selected)";
+			message += getString("no_parcel_selected");
 		}
 		else if (mParcelBillableArea == mParcelActualArea)
 		{
@@ -1225,12 +1216,10 @@ void LLFloaterBuyLandUI::refreshUI()
 					? LLViewChildren::BADGE_NOTE
 					: LLViewChildren::BADGE_OK);
 			
-		childSetText("purchase_action",
-			llformat(
-				"Pay L$ %d to %s for this land",
-				mParcelPrice,
-				mParcelSellerName.c_str()
-				));
+		LLStringUtil::format_map_t string_args;
+		string_args["[AMOUNT]"] = llformat("%d", mParcelPrice);
+		string_args["[SELLER]"] = mParcelSellerName;
+		childSetText("purchase_action", getString("pay_to_for_land", string_args));
 		childSetVisible("purchase_action", mParcelValid);
 		
 		std::string reasonString;
@@ -1368,7 +1357,7 @@ void LLFloaterBuyLandUI::onClickBuy(void* data)
 void LLFloaterBuyLandUI::onClickCancel(void* data)
 {
 	LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)data;
-	self->close();
+	self->closeFloater();
 }
 
 // static
@@ -1376,7 +1365,7 @@ void LLFloaterBuyLandUI::onClickErrorWeb(void* data)
 {
 	LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)data;
 	LLWeb::loadURLExternal(self->mCannotBuyURI);
-	self->close();
+	self->closeFloater();
 }
 
 
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 7a4e5147fe..6ca8944a19 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -48,71 +48,31 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f;
 // Member functions
 //
 
+
 LLFloaterCamera::LLFloaterCamera(const LLSD& val)
-:	LLFloater("camera floater") // uses "FloaterCameraRect3"
+:	LLFloater()
 {
 	setIsChrome(TRUE);
 	
 	// For now, only used for size and tooltip strings
 	const BOOL DONT_OPEN = FALSE;
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", NULL, DONT_OPEN);
-	
-	S32 top = getRect().getHeight();
-	S32 bottom = 0;
-	S32 left = 16;
-	
-	const S32 ROTATE_WIDTH = 64;
-	mRotate = new LLJoystickCameraRotate(std::string("cam rotate stick"), 
-										 LLRect( left, top, left + ROTATE_WIDTH, bottom ),
-										 std::string("cam_rotate_out.tga"),
-										 std::string("cam_rotate_in.tga") );
-	mRotate->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
-	mRotate->setHeldDownDelay(CAMERA_BUTTON_DELAY);
-	mRotate->setToolTip( getString("rotate_tooltip") );
-	mRotate->setSoundFlags(MOUSE_DOWN | MOUSE_UP);
-	addChild(mRotate);
-	
-	left += ROTATE_WIDTH;
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", DONT_OPEN);
 	
-	const S32 ZOOM_WIDTH = 16;
-	mZoom = new LLJoystickCameraZoom( 
-									 std::string("zoom"),
-									 LLRect( left, top, left + ZOOM_WIDTH, bottom ),
-									 std::string("cam_zoom_out.tga"),
-									 std::string("cam_zoom_plus_in.tga"),
-									 std::string("cam_zoom_minus_in.tga"));
-	mZoom->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
-	mZoom->setHeldDownDelay(CAMERA_BUTTON_DELAY);
-	mZoom->setToolTip( getString("zoom_tooltip") );
-	mZoom->setSoundFlags(MOUSE_DOWN | MOUSE_UP);
-	addChild(mZoom);
-	
-	left += ZOOM_WIDTH;
-	
-	const S32 TRACK_WIDTH = 64;
-	mTrack = new LLJoystickCameraTrack(std::string("cam track stick"), 
-									   LLRect( left, top, left + TRACK_WIDTH, bottom ),
-									   std::string("cam_tracking_out.tga"),
-									   std::string("cam_tracking_in.tga"));
-	mTrack->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
-	mTrack->setHeldDownDelay(CAMERA_BUTTON_DELAY);
-	mTrack->setToolTip( getString("move_tooltip") );
-	mTrack->setSoundFlags(MOUSE_DOWN | MOUSE_UP);
-	addChild(mTrack);
+	mRotate = getChild<LLJoystickCameraRotate>("cam_rotate_stick");
+	mZoom = getChild<LLJoystickCameraZoom>("zoom");
+	mTrack = getChild<LLJoystickCameraTrack>("cam_track_stick");
 }
 
 // virtual
-void LLFloaterCamera::onOpen()
+void LLFloaterCamera::onOpen(const LLSD& key)
 {
-	LLFloater::onOpen();
-	
 	gSavedSettings.setBOOL("ShowCameraControls", TRUE);
 }
 
 // virtual
 void LLFloaterCamera::onClose(bool app_quitting)
 {
-	LLFloater::onClose(app_quitting);
+	destroy();
 	
 	if (!app_quitting)
 	{
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index 6862db7068..871e5c8ed1 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -49,7 +49,7 @@ private:
 	LLFloaterCamera(const LLSD& val);
 	~LLFloaterCamera() {};
 	
-	/*virtual*/ void onOpen();
+	/*virtual*/ void onOpen(const LLSD& key);
 	/*virtual*/ void onClose(bool app_quitting);
 	
 public:
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 682ed8e26b..4e2d952488 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -38,15 +38,6 @@
 #include "llviewerprecompiledheaders.h"
 
 #include "llfloaterchat.h"
-#include "llfloateractivespeakers.h"
-#include "llfloaterscriptdebug.h"
-
-#include "llchat.h"
-#include "llfontgl.h"
-#include "llrect.h"
-#include "llerror.h"
-#include "llstring.h"
-#include "message.h"
 
 // project include
 #include "llagent.h"
@@ -54,8 +45,11 @@
 #include "llcheckboxctrl.h"
 #include "llcombobox.h"
 #include "llconsole.h"
+#include "llfloateractivespeakers.h"
 #include "llfloaterchatterbox.h"
 #include "llfloatermute.h"
+#include "llfloaterreg.h"
+#include "llfloaterscriptdebug.h"
 #include "llkeyboard.h"
 //#include "lllineeditor.h"
 #include "llmutelist.h"
@@ -76,16 +70,21 @@
 #include "llweb.h"
 #include "llstylemap.h"
 
-// Used for LCD display
-extern void AddNewIMToLCD(const std::string &newLine);
-extern void AddNewChatToLCD(const std::string &newLine);
+// linden library includes
+#include "audioengine.h"
+#include "llchat.h"
+#include "llfontgl.h"
+#include "llrect.h"
+#include "llerror.h"
+#include "llstring.h"
+#include "llwindow.h"
+#include "message.h"
+
 //
 // Constants
 //
 const F32 INSTANT_MSG_SIZE = 8.0f;
 const F32 CHAT_MSG_SIZE = 8.0f;
-const LLColor4 MUTED_MSG_COLOR(0.5f, 0.5f, 0.5f, 1.f);
-const S32 MAX_CHATTER_COUNT = 16;
 
 //
 // Global statics
@@ -96,20 +95,13 @@ LLColor4 get_text_color(const LLChat& chat);
 // Member Functions
 //
 LLFloaterChat::LLFloaterChat(const LLSD& seed)
-:	LLFloater(std::string("chat floater"), std::string("FloaterChatRect"), LLStringUtil::null, 
-			  RESIZE_YES, 440, 100, DRAG_ON_TOP, MINIMIZE_NO, CLOSE_YES),
-	mPanel(NULL)
+	: LLFloater(),
+	  mPanel(NULL)
 {
 	mFactoryMap["chat_panel"] = LLCallbackMap(createChatPanel, NULL);
 	mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL);
-	// do not automatically open singleton floaters (as result of getInstance())
-	BOOL no_open = FALSE;
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml",&getFactoryMap(),no_open);
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml");
 
-	childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes
-	childSetVisible("Chat History Editor with mute",FALSE);
-	childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
-	setDefaultBtn("Chat");
 }
 
 LLFloaterChat::~LLFloaterChat()
@@ -120,8 +112,6 @@ LLFloaterChat::~LLFloaterChat()
 void LLFloaterChat::setVisible(BOOL visible)
 {
 	LLFloater::setVisible( visible );
-
-	gSavedSettings.setBOOL("ShowChatHistory", visible);
 }
 
 void LLFloaterChat::draw()
@@ -130,7 +120,7 @@ void LLFloaterChat::draw()
 		
 	childSetValue("toggle_active_speakers_btn", childIsVisible("active_speakers_panel"));
 
-	LLChatBar* chat_barp = getChild<LLChatBar>("chat_panel", TRUE);
+	LLChatBar* chat_barp = findChild<LLChatBar>("chat_panel", TRUE);
 	if (chat_barp)
 	{
 		chat_barp->refresh();
@@ -144,22 +134,30 @@ BOOL LLFloaterChat::postBuild()
 {
 	mPanel = (LLPanelActiveSpeakers*)getChild<LLPanel>("active_speakers_panel");
 
-	LLChatBar* chat_barp = getChild<LLChatBar>("chat_panel", TRUE);
+	LLChatBar* chat_barp = findChild<LLChatBar>("chat_panel", TRUE);
 	if (chat_barp)
 	{
 		chat_barp->setGestureCombo(getChild<LLComboBox>( "Gesture"));
 	}
+
+	childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes
+	childSetVisible("Chat History Editor with mute",FALSE);
+	childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
+
 	return TRUE;
 }
 
 // public virtual
 void LLFloaterChat::onClose(bool app_quitting)
 {
-	if (!app_quitting)
+	if (getHost())
 	{
-		gSavedSettings.setBOOL("ShowChatHistory", FALSE);
+		getHost()->setVisible(FALSE);
+	}
+	else
+	{
+		setVisible(FALSE);
 	}
-	setVisible(FALSE);
 }
 
 void LLFloaterChat::onVisibilityChange(BOOL new_visibility)
@@ -167,12 +165,6 @@ void LLFloaterChat::onVisibilityChange(BOOL new_visibility)
 	// Hide the chat overlay when our history is visible.
 	updateConsoleVisibility();
 
-	// stop chat history tab from flashing when it appears
-	if (new_visibility)
-	{
-		LLFloaterChatterBox::getInstance()->setFloaterFlashing(this, FALSE);
-	}
-
 	LLFloater::onVisibilityChange(new_visibility);
 }
 
@@ -257,7 +249,7 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
 	}
 	
 	// could flash the chat button in the status bar here. JC
-	LLFloaterChat* chat_floater = LLFloaterChat::getInstance(LLSD());
+	LLFloaterChat* chat_floater = LLFloaterChat::getInstance();
 	LLViewerTextEditor*	history_editor = chat_floater->getChild<LLViewerTextEditor>("Chat History Editor");
 	LLViewerTextEditor*	history_editor_with_mute = chat_floater->getChild<LLViewerTextEditor>("Chat History Editor with mute");
 
@@ -295,8 +287,8 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
 // static
 void LLFloaterChat::setHistoryCursorAndScrollToEnd()
 {
-	LLViewerTextEditor*	history_editor = LLFloaterChat::getInstance(LLSD())->getChild<LLViewerTextEditor>("Chat History Editor");
-	LLViewerTextEditor*	history_editor_with_mute = LLFloaterChat::getInstance(LLSD())->getChild<LLViewerTextEditor>("Chat History Editor with mute");
+	LLViewerTextEditor*	history_editor = LLFloaterChat::getInstance()->getChild<LLViewerTextEditor>("Chat History Editor");
+	LLViewerTextEditor*	history_editor_with_mute = LLFloaterChat::getInstance()->getChild<LLViewerTextEditor>("Chat History Editor with mute");
 	
 	if (history_editor) 
 	{
@@ -368,20 +360,6 @@ void LLFloaterChat::addChat(const LLChat& chat,
 			chat.mChatType == CHAT_TYPE_DEBUG_MSG
 			&& !gSavedSettings.getBOOL("ScriptErrorsAsChat");
 
-#if LL_LCD_COMPILE
-	// add into LCD displays
-	if (!invisible_script_debug_chat)
-	{
-		if (!from_instant_message)
-		{
-			AddNewChatToLCD(chat.mText);
-		}
-		else
-		{
-			AddNewIMToLCD(chat.mText);
-		}
-	}
-#endif
 	if (!invisible_script_debug_chat 
 		&& !chat.mMuted 
 		&& gConsole 
@@ -390,11 +368,11 @@ void LLFloaterChat::addChat(const LLChat& chat,
 		F32 size = CHAT_MSG_SIZE;
 		if (chat.mSourceType == CHAT_SOURCE_SYSTEM)
 		{
-			text_color = gSavedSettings.getColor("SystemChatColor");
+			text_color = gSavedSkinSettings.getColor("SystemChatColor");
 		}
 		else if(from_instant_message)
 		{
-			text_color = gSavedSettings.getColor("IMChatColor");
+			text_color = gSavedSkinSettings.getColor("IMChatColor");
 			size = INSTANT_MSG_SIZE;
 		}
 		// We display anything if it's not an IM. If it's an IM, check pref...
@@ -410,13 +388,54 @@ void LLFloaterChat::addChat(const LLChat& chat,
 	if(from_instant_message && gSavedSettings.getBOOL("IMInChatHistory"))
 		addChatHistory(chat,false);
 
-	LLTextParser* highlight = LLTextParser::getInstance();
-	highlight->triggerAlerts(gAgent.getID(), gAgent.getPositionGlobal(), chat.mText, gViewerWindow->getWindow());
+	triggerAlerts(chat.mText);
 
 	if(!from_instant_message)
 		addChatHistory(chat);
 }
 
+// Moved from lltextparser.cpp to break llui/llaudio library dependency.
+//static
+void LLFloaterChat::triggerAlerts(const std::string& text)
+{
+	LLTextParser* parser = LLTextParser::getInstance();
+//    bool spoken=FALSE;
+	for (S32 i=0;i<parser->mHighlights.size();i++)
+	{
+		LLSD& highlight = parser->mHighlights[i];
+		if (parser->findPattern(text,highlight) >= 0 )
+		{
+			if(gAudiop)
+			{
+				if ((std::string)highlight["sound_lluuid"] != LLUUID::null.asString())
+				{
+					gAudiop->triggerSound(highlight["sound_lluuid"].asUUID(), 
+						gAgent.getID(),
+						1.f,
+						LLAudioEngine::AUDIO_TYPE_UI,
+						gAgent.getPositionGlobal() );
+				}
+/*				
+				if (!spoken) 
+				{
+					LLTextToSpeech* text_to_speech = NULL;
+					text_to_speech = LLTextToSpeech::getInstance();
+					spoken = text_to_speech->speak((LLString)highlight["voice"],text); 
+				}
+ */
+			}
+			if (highlight["flash"])
+			{
+				LLWindow* viewer_window = gViewerWindow->getWindow();
+				if (viewer_window && viewer_window->getMinimized())
+				{
+					viewer_window->flashIcon(5.f);
+				}
+			}
+		}
+	}
+}
+
 LLColor4 get_text_color(const LLChat& chat)
 {
 	LLColor4 text_color;
@@ -430,37 +449,37 @@ LLColor4 get_text_color(const LLChat& chat)
 		switch(chat.mSourceType)
 		{
 		case CHAT_SOURCE_SYSTEM:
-			text_color = gSavedSettings.getColor4("SystemChatColor");
+			text_color = gSavedSkinSettings.getColor4("SystemChatColor");
 			break;
 		case CHAT_SOURCE_AGENT:
 		    if (chat.mFromID.isNull())
 			{
-				text_color = gSavedSettings.getColor4("SystemChatColor");
+				text_color = gSavedSkinSettings.getColor4("SystemChatColor");
 			}
 			else
 			{
 				if(gAgent.getID() == chat.mFromID)
 				{
-					text_color = gSavedSettings.getColor4("UserChatColor");
+					text_color = gSavedSkinSettings.getColor4("UserChatColor");
 				}
 				else
 				{
-					text_color = gSavedSettings.getColor4("AgentChatColor");
+					text_color = gSavedSkinSettings.getColor4("AgentChatColor");
 				}
 			}
 			break;
 		case CHAT_SOURCE_OBJECT:
 			if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
 			{
-				text_color = gSavedSettings.getColor4("ScriptErrorColor");
+				text_color = gSavedSkinSettings.getColor4("ScriptErrorColor");
 			}
 			else if ( chat.mChatType == CHAT_TYPE_OWNER )
 			{
-				text_color = gSavedSettings.getColor4("llOwnerSayChatColor");
+				text_color = gSavedSkinSettings.getColor4("llOwnerSayChatColor");
 			}
 			else
 			{
-				text_color = gSavedSettings.getColor4("ObjectChatColor");
+				text_color = gSavedSkinSettings.getColor4("ObjectChatColor");
 			}
 			break;
 		default:
@@ -485,7 +504,7 @@ LLColor4 get_text_color(const LLChat& chat)
 //static
 void LLFloaterChat::loadHistory()
 {
-	LLLogChat::loadHistory(std::string("chat"), &chatFromLogFile, (void *)LLFloaterChat::getInstance(LLSD())); 
+	LLLogChat::loadHistory(std::string("chat"), &chatFromLogFile, (void *)LLFloaterChat::getInstance()); 
 }
 
 //static
@@ -501,6 +520,7 @@ void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , std::string l
 		{
 			LLChat chat;					
 			chat.mText = line;
+			get_text_color(chat);
 			addChatHistory(chat,  FALSE);
 		}
 		break;
@@ -531,27 +551,9 @@ void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata)
 	self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel"));
 }
 
-//static 
-bool LLFloaterChat::visible(LLFloater* instance, const LLSD& key)
-{
-	return VisibilityPolicy<LLFloater>::visible(instance, key);
-}
-
-//static 
-void LLFloaterChat::show(LLFloater* instance, const LLSD& key)
-{
-	VisibilityPolicy<LLFloater>::show(instance, key);
-}
-
-//static 
-void LLFloaterChat::hide(LLFloater* instance, const LLSD& key)
-{
-	if(instance->getHost())
-	{
-		LLFloaterChatterBox::hideInstance();
-	}
-	else
-	{
-		VisibilityPolicy<LLFloater>::hide(instance, key);
-	}
-}
+//static
+ LLFloaterChat* LLFloaterChat::getInstance()
+ {
+	 LLFloater* inst = LLFloaterReg::getInstance("chat", LLSD()) ;
+	 return dynamic_cast<LLFloaterChat*>(inst);
+ }
diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h
index b5393866b8..2bae4ea0c2 100644
--- a/indra/newview/llfloaterchat.h
+++ b/indra/newview/llfloaterchat.h
@@ -40,19 +40,18 @@
 
 #include "llfloater.h"
 #include "lllogchat.h"
-class LLButton;
+
 class LLChat;
-class LLComboBox;
-class LLLineEditor;
 class LLViewerTextEditor;
 class LLMessageSystem;
 class LLUUID;
 class LLCheckBoxCtrl;
 class LLPanelActiveSpeakers;
 class LLLogChat;
+class LLVector3d;
+class LLWindow;
 
-class LLFloaterChat
-	:	public LLFloater, public LLUISingleton<LLFloaterChat, LLFloaterChat>
+class LLFloaterChat : public LLFloater
 {
 public:
 	LLFloaterChat(const LLSD& seed);
@@ -67,14 +66,16 @@ public:
 	void updateConsoleVisibility();
 
 	static void setHistoryCursorAndScrollToEnd();
-	
+
+	//  *TODO:Skinning - move these to LLChat (or LLViewerChat?)
 	// Add chat to console and history list.
 	// Color based on source, type, distance.
 	static void addChat(const LLChat& chat, BOOL from_im = FALSE, BOOL local_agent = FALSE);
-	
 	// Add chat to history alone.
 	static void addChatHistory(const LLChat& chat, bool log_to_file = true);
 	
+	static void triggerAlerts(const std::string& text);
+
 	static void onClickMute(void *data);
 	static void onClickToggleShowMute(LLUICtrl* caller, void *data);
 	static void onClickToggleActiveSpeakers(void* userdata);
@@ -82,12 +83,9 @@ public:
 	static void loadHistory();
 	static void* createSpeakersPanel(void* data);
 	static void* createChatPanel(void* data);
-
-	// visibility policy for LLUISingleton
-	static bool visible(LLFloater* instance, const LLSD& key);
-	static void show(LLFloater* instance, const LLSD& key);
-	static void hide(LLFloater* instance, const LLSD& key);
-
+	
+	static LLFloaterChat* getInstance(); // *TODO:Skinning Deprecate
+	
 	LLPanelActiveSpeakers* mPanel;
 	BOOL mScrolledToEnd;
 };
diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp
index 0fa1aa15e6..a283b445f5 100644
--- a/indra/newview/llfloaterchatterbox.cpp
+++ b/indra/newview/llfloaterchatterbox.cpp
@@ -35,6 +35,7 @@
 
 #include "llviewerprecompiledheaders.h"
 
+#include "llfloaterreg.h"
 #include "llfloaterchatterbox.h"
 #include "lluictrlfactory.h"
 #include "llfloaterchat.h"
@@ -49,12 +50,11 @@
 //
 
 LLFloaterMyFriends::LLFloaterMyFriends(const LLSD& seed)
+	: LLFloater()
 {
 	mFactoryMap["friends_panel"] = LLCallbackMap(LLFloaterMyFriends::createFriendsPanel, NULL);
 	mFactoryMap["groups_panel"] = LLCallbackMap(LLFloaterMyFriends::createGroupsPanel, NULL);
-	// do not automatically open singleton floaters (as result of getInstance())
-	BOOL no_open = FALSE;
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_my_friends.xml", &getFactoryMap(), no_open);
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_my_friends.xml");
 }
 
 LLFloaterMyFriends::~LLFloaterMyFriends()
@@ -63,11 +63,20 @@ LLFloaterMyFriends::~LLFloaterMyFriends()
 
 BOOL LLFloaterMyFriends::postBuild()
 {
-	mTabs = getChild<LLTabContainer>("friends_and_groups");
-
 	return TRUE;
 }
 
+void LLFloaterMyFriends::onOpen(const LLSD& key)
+{
+	if (key.asString() == "friends")
+	{
+		childShowTab("friends_and_groups", "friends_panel");
+	}
+	else if (key.asString() == "groups")
+	{
+		childShowTab("friends_and_groups", "groups_panel");
+	}
+}
 
 void LLFloaterMyFriends::onClose(bool app_quitting)
 {
@@ -86,18 +95,34 @@ void* LLFloaterMyFriends::createGroupsPanel(void* data)
 	return new LLPanelGroups();
 }
 
+//static
+LLFloaterMyFriends* LLFloaterMyFriends::getInstance()
+{
+	LLFloater* inst = LLFloaterReg::getInstance("contacts", "friends") ;
+	return dynamic_cast<LLFloaterMyFriends*>(inst);
+}
+
 //
 // LLFloaterChatterBox
 //
-LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) :
-	mActiveVoiceFloater(NULL)
+LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed)
+	:	LLMultiFloater(),
+		mActiveVoiceFloater(NULL)
 {
 	mAutoResize = FALSE;
 
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chatterbox.xml", NULL, FALSE);
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chatterbox.xml", FALSE);
+}
+
+LLFloaterChatterBox::~LLFloaterChatterBox()
+{
+}
+
+BOOL LLFloaterChatterBox::postBuild()
+{
 	if (gSavedSettings.getBOOL("ContactsTornOff"))
 	{
-		LLFloaterMyFriends* floater_contacts = LLFloaterMyFriends::getInstance(0);
+		LLFloaterMyFriends* floater_contacts = LLFloaterMyFriends::getInstance();
 		// add then remove to set up relationship for re-attach
 		addFloater(floater_contacts, FALSE);
 		removeFloater(floater_contacts);
@@ -106,7 +131,7 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) :
 	}
 	else
 	{
-		addFloater(LLFloaterMyFriends::getInstance(0), TRUE);
+		addFloater(LLFloaterMyFriends::getInstance(), TRUE);
 	}
 
 	if (gSavedSettings.getBOOL("ChatHistoryTornOff"))
@@ -120,13 +145,10 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) :
 	}
 	else
 	{
-		addFloater(LLFloaterChat::getInstance(LLSD()), FALSE);
+		addFloater(LLFloaterChat::getInstance(), FALSE);
 	}
 	mTabContainer->lockTabs();
-}
-
-LLFloaterChatterBox::~LLFloaterChatterBox()
-{
+	return TRUE;
 }
 
 BOOL LLFloaterChatterBox::handleKeyHere(KEY key, MASK mask)
@@ -139,13 +161,13 @@ BOOL LLFloaterChatterBox::handleKeyHere(KEY key, MASK mask)
 		{
 			if (floater->isCloseable())
 			{
-				floater->close();
+				floater->closeFloater();
 			}
 			else
 			{
 				// close chatterbox window if frontmost tab is reserved, non-closeable tab
 				// such as contacts or near me
-				close();
+				closeFloater();
 			}
 		}
 		return TRUE;
@@ -200,15 +222,27 @@ void LLFloaterChatterBox::draw()
 	LLMultiFloater::draw();
 }
 
-void LLFloaterChatterBox::onOpen()
+void LLFloaterChatterBox::onOpen(const LLSD& key)
 {
-	gSavedSettings.setBOOL("ShowCommunicate", TRUE);
+	//*TODO:Skinning show the session id associated with key
+	if (key.asString() == "local")
+	{
+		LLFloaterChat* chat = LLFloaterReg::findTypedInstance<LLFloaterChat>("chat");
+		chat->openFloater();
+	}
+	else if (key.isDefined())
+	{
+		LLFloaterIMPanel* impanel = gIMMgr->findFloaterBySession(key.asUUID());
+		if (impanel)
+		{
+			impanel->openFloater();
+		}
+	}
 }
 
 void LLFloaterChatterBox::onClose(bool app_quitting)
 {
 	setVisible(FALSE);
-	gSavedSettings.setBOOL("ShowCommunicate", FALSE);
 }
 
 void LLFloaterChatterBox::setMinimized(BOOL minimized)
@@ -244,7 +278,11 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp,
 	S32 num_locked_tabs = mTabContainer->getNumLockedTabs();
 
 	// already here
-	if (floaterp->getHost() == this) return;
+	if (floaterp->getHost() == this)
+	{
+		openFloater(floaterp->getKey());
+		return;
+	}
 
 	// make sure my friends and chat history both locked when re-attaching chat history
 	if (floaterp->getName() == "chat floater")
@@ -281,6 +319,7 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp,
 	else
 	{
 		LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point);
+		openFloater(floaterp->getKey());
 	}
 
 	// make sure active voice icon shows up for new tab
@@ -290,6 +329,13 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp,
 	}
 }
 
+//static
+LLFloaterChatterBox* LLFloaterChatterBox::getInstance()
+{
+	LLFloater* inst = LLFloaterReg::getInstance("communicate", LLSD()) ;
+	return dynamic_cast<LLFloaterChatterBox*>(inst);
+}
+
 //static 
 LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater()
 {
@@ -300,11 +346,11 @@ LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater()
 	if (LLVoiceChannelProximal::getInstance() == LLVoiceChannel::getCurrentVoiceChannel())
 	{
 		// show near me tab if in proximal channel
-		return LLFloaterChat::getInstance(LLSD());
+		return LLFloaterChat::getInstance();
 	}
 	else
 	{
-		LLFloaterChatterBox* floater = LLFloaterChatterBox::getInstance(LLSD());
+		LLFloaterChatterBox* floater = LLFloaterChatterBox::getInstance();
 		// iterator over all IM tabs (skip friends and near me)
 		for (S32 i = 0; i < floater->getFloaterCount(); i++)
 		{
diff --git a/indra/newview/llfloaterchatterbox.h b/indra/newview/llfloaterchatterbox.h
index 3adbd14370..e6a2e30ba6 100644
--- a/indra/newview/llfloaterchatterbox.h
+++ b/indra/newview/llfloaterchatterbox.h
@@ -42,15 +42,16 @@
 
 class LLTabContainer;
 
-class LLFloaterChatterBox : public LLMultiFloater, public LLUISingleton<LLFloaterChatterBox, LLFloaterChatterBox>
+class LLFloaterChatterBox : public LLMultiFloater
 {
 public:
 	LLFloaterChatterBox(const LLSD& seed);
 	virtual ~LLFloaterChatterBox();
-
+	
+	/*virtual*/ BOOL postBuild();
 	/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
 	/*virtual*/ void draw();
-	/*virtual*/ void onOpen();
+	/*virtual*/ void onOpen(const LLSD& key);
 	/*virtual*/ void onClose(bool app_quitting);
 	/*virtual*/ void setMinimized(BOOL minimized);
 
@@ -59,108 +60,28 @@ public:
 								BOOL select_added_floater, 
 								LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
 
+	static LLFloaterChatterBox* getInstance(); // *TODO:Skinning Deprecate
 	static LLFloater* getCurrentVoiceFloater();
 	
-	// visibility policy for LLUISingleton
-	static bool visible(LLFloater* instance, const LLSD& key)
-	{
-		LLFloater* floater_to_check = ((LLFloaterChatterBox*)instance)->getFloater(key);
-
-		if (floater_to_check)
-		{
-			return floater_to_check->isInVisibleChain();
-		}
-
-		// otherwise use default visibility rule for chatterbox
-		return VisibilityPolicy<LLFloater>::visible(instance, key);
-	}
-
-	static void show(LLFloater* instance, const LLSD& key)
-	{
-		LLFloater* floater_to_show = ((LLFloaterChatterBox*)instance)->getFloater(key);
-		VisibilityPolicy<LLFloater>::show(instance, key);
-
-		if (floater_to_show)
-		{
-			floater_to_show->open();
-		}
-	}
-
-	static void hide(LLFloater* instance, const LLSD& key)
-	{
-		VisibilityPolicy<LLFloater>::hide(instance, key);
-	}
-
-private:
-	LLFloater* getFloater(const LLSD& key)
-	{
-		LLFloater* floater = NULL;
-
-		//try to show requested session
-		LLUUID session_id = key.asUUID();
-		if (session_id.notNull())
-		{
-			floater = LLIMMgr::getInstance()->findFloaterBySession(session_id);
-		}
-
-		// if TRUE, show tab for active voice channel, otherwise, just show last tab
-		if (key.asBoolean())
-		{
-			floater = getCurrentVoiceFloater();
-		}
-
-		return floater;
-	}
-
 protected:
 	LLFloater* mActiveVoiceFloater;
 };
 
 
-class LLFloaterMyFriends : public LLFloater, public LLUISingleton<LLFloaterMyFriends, LLFloaterMyFriends>
+class LLFloaterMyFriends : public LLFloater
 {
 public:
 	LLFloaterMyFriends(const LLSD& seed);
 	virtual ~LLFloaterMyFriends();
 
-	virtual BOOL postBuild();
-
-	void onClose(bool app_quitting);
+	/*virtual*/ BOOL postBuild();
+	/*virtual*/ void onOpen(const LLSD& key);
+	/*virtual*/ void onClose(bool app_quitting);
 
+	static LLFloaterMyFriends* getInstance(); // *TODO:Skinning Deprecate
+	
 	static void* createFriendsPanel(void* data);
 	static void* createGroupsPanel(void* data);
-
-	// visibility policy for LLUISingleton
-	static bool visible(LLFloater* instance, const LLSD& key)
-	{
-		LLFloaterMyFriends* floaterp = (LLFloaterMyFriends*)instance;
-		return floaterp->isInVisibleChain() && floaterp->mTabs->getCurrentPanelIndex() == key.asInteger();
-	}
-
-	static void show(LLFloater* instance, const LLSD& key)
-	{
-		VisibilityPolicy<LLFloater>::show(instance, key);
-		// garbage values in id will be interpreted as 0, or the friends tab
-		((LLFloaterMyFriends*)instance)->mTabs->selectTab(key);
-	}
-
-	static void hide(LLFloater* instance, const LLSD& key)
-	{
-		if (visible(instance, key))
-		{
-			if(instance->getHost())
-			{
-				LLFloaterChatterBox::hideInstance();
-			}
-			else
-			{
-				VisibilityPolicy<LLFloater>::hide(instance, key);
-			}
-		}
-	}
-
-protected:
-	LLTabContainer* mTabs;
 };
 
 #endif // LL_LLFLOATERCHATTERBOX_H
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index f82d692dd3..4964f04556 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -32,11 +32,15 @@
 
 #include "llviewerprecompiledheaders.h"
 
-#include <sstream>
-#include <iomanip>
-
 #include "llfloatercolorpicker.h"
 
+// Viewer project includes
+#include "lltoolmgr.h"
+#include "lltoolpipette.h"
+#include "llviewercontrol.h"
+#include "llworld.h"
+
+// Linden library includes
 #include "llfontgl.h"
 #include "llsys.h"
 #include "llgl.h"
@@ -47,23 +51,23 @@
 #include "lllineeditor.h"
 #include "v4coloru.h"
 #include "llbutton.h"
-#include "llviewercontrol.h"
 #include "lluictrlfactory.h"
-#include "llviewerwindow.h"
 #include "llgl.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llimage.h"
 #include "llmousehandler.h"
 #include "llimagegl.h"
 #include "llglheaders.h"
 #include "llcheckboxctrl.h"
-#include "llworld.h"
 #include "lltextbox.h"
 #include "lluiconstants.h"
 #include "llfocusmgr.h"
-#include "lltoolmgr.h"
-#include "lltoolpipette.h"
 #include "lldraghandle.h"
+#include "llwindow.h"
+
+// System includes
+#include <sstream>
+#include <iomanip>
 
 const F32 CONTEXT_CONE_IN_ALPHA = 0.0f;
 const F32 CONTEXT_CONE_OUT_ALPHA = 1.f;
@@ -75,11 +79,8 @@ const F32 CONTEXT_FADE_TIME = 0.08f;
 //
 //////////////////////////////////////////////////////////////////////////////
 
-//////////////////////////////////////////////////////////////////////////////
-// default ctor
-LLFloaterColorPicker::
-LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate )
-	: LLFloater (std::string("Color Picker Floater")),
+LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate )
+	: LLFloater(),
 	  mComponents			( 3 ),
 	  mMouseDownInLumRegion	( FALSE ),
 	  mMouseDownInHueRegion	( FALSE ),
@@ -123,10 +124,7 @@ LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate )
 	}
 }
 
-//////////////////////////////////////////////////////////////////////////////
-// dtor
-LLFloaterColorPicker::
-~LLFloaterColorPicker()
+LLFloaterColorPicker::~LLFloaterColorPicker()
 {
 	// destroy the UI we created
 	destroyUI ();
@@ -134,9 +132,7 @@ LLFloaterColorPicker::
 
 //////////////////////////////////////////////////////////////////////////////
 //
-void
-LLFloaterColorPicker::
-createUI ()
+void LLFloaterColorPicker::createUI ()
 {
 	// build the majority of the gui using the factory builder
 	LLUICtrlFactory::getInstance()->buildFloater ( this, "floater_color_picker.xml" );
@@ -177,19 +173,17 @@ createUI ()
 
 		// argh!
 		const std::string s ( codec.str () );
-		mPalette.push_back ( new LLColor4 ( gSavedSettings.getColor4 ( s )  ) );
+		mPalette.push_back ( new LLColor4 ( gSavedSkinSettings.getColor4 ( s )  ) );
 	}
 }
 
 //////////////////////////////////////////////////////////////////////////////
 //
-void
-LLFloaterColorPicker::
-showUI ()
+void LLFloaterColorPicker::showUI ()
 {
 	setVisible ( TRUE );
 	setFocus ( TRUE );
-	open();		/*Flawfinder: ignore*/
+	openFloater(getKey());
 
 	// HACK: if system color picker is required - close the SL one we made and use default system dialog
 	if ( gSavedSettings.getBOOL ( "UseDefaultColorPicker" ) )
@@ -203,7 +197,7 @@ showUI ()
 		{
 			LLColor4 curCol = swatch->get ();
 			send_agent_pause();
-			gViewerWindow->getWindow ()->dialog_color_picker ( &curCol [ 0 ], &curCol [ 1 ], &curCol [ 2 ] );
+			getWindow()->dialogColorPicker( &curCol [ 0 ], &curCol [ 1 ], &curCol [ 2 ] );
 			send_agent_resume();
 
 			setOrigRgb ( curCol [ 0 ], curCol [ 1 ], curCol [ 2 ] );
@@ -212,36 +206,30 @@ showUI ()
 			LLColorSwatchCtrl::onColorChanged ( swatch, LLColorSwatchCtrl::COLOR_CHANGE );
 		}
 
-		close();
+		closeFloater();
 	}
 }
 
 //////////////////////////////////////////////////////////////////////////////
 // called after the dialog is rendered
-BOOL
-LLFloaterColorPicker::
-postBuild()
+BOOL LLFloaterColorPicker::postBuild()
 {
 	mCancelBtn = getChild<LLButton>( "cancel_btn" );
-    mCancelBtn->setClickedCallback ( onClickCancel );
-    mCancelBtn->setCallbackUserData ( this );
+    mCancelBtn->setClickedCallback ( onClickCancel, this );
 
 	mSelectBtn = getChild<LLButton>( "select_btn");
-    mSelectBtn->setClickedCallback ( onClickSelect );
-    mSelectBtn->setCallbackUserData ( this );
+    mSelectBtn->setClickedCallback ( onClickSelect, this );
 	mSelectBtn->setFocus ( TRUE );
 
 	mPipetteBtn = getChild<LLButton>("color_pipette" );
 
 	mPipetteBtn->setImages(std::string("eye_button_inactive.tga"), std::string("eye_button_active.tga"));
 
-	mPipetteBtn->setClickedCallback( onClickPipette );
-	mPipetteBtn->setCallbackUserData ( this );
+	mPipetteBtn->setCommitCallback( boost::bind(&LLFloaterColorPicker::onClickPipette, this ));
 
 	mApplyImmediateCheck = getChild<LLCheckBoxCtrl>("apply_immediate");
 	mApplyImmediateCheck->set(gSavedSettings.getBOOL("ApplyColorImmediately"));
-	mApplyImmediateCheck->setCommitCallback(onImmediateCheck);
-	mApplyImmediateCheck->setCallbackUserData(this);
+	mApplyImmediateCheck->setCommitCallback(onImmediateCheck, this);
 
 	childSetCommitCallback("rspin", onTextCommit, (void*)this );
 	childSetCommitCallback("gspin", onTextCommit, (void*)this );
@@ -250,18 +238,15 @@ postBuild()
 	childSetCommitCallback("sspin", onTextCommit, (void*)this );
 	childSetCommitCallback("lspin", onTextCommit, (void*)this );
 
+	LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterColorPicker::onColorSelect, this, _1));
+
     return TRUE;
 }
 
 //////////////////////////////////////////////////////////////////////////////
 //
-void
-LLFloaterColorPicker::
-initUI ( F32 rValIn, F32 gValIn, F32 bValIn )
+void LLFloaterColorPicker::initUI ( F32 rValIn, F32 gValIn, F32 bValIn )
 {
-	// start catching lose-focus events from entry widgets
-	enableTextCallbacks ( TRUE );
-
 	// under some circumstances, we get rogue values that can be calmed by clamping...
 	rValIn = llclamp ( rValIn, 0.0f, 1.0f );
 	gValIn = llclamp ( gValIn, 0.0f, 1.0f );
@@ -279,9 +264,7 @@ initUI ( F32 rValIn, F32 gValIn, F32 bValIn )
 
 //////////////////////////////////////////////////////////////////////////////
 //
-void
-LLFloaterColorPicker::
-destroyUI ()
+void LLFloaterColorPicker::destroyUI ()
 {
 	// shut down pipette tool if active
 	stopUsingPipette();
@@ -305,9 +288,7 @@ destroyUI ()
 
 //////////////////////////////////////////////////////////////////////////////
 //
-F32
-LLFloaterColorPicker::
-hueToRgb ( F32 val1In, F32 val2In, F32 valHUeIn )
+F32 LLFloaterColorPicker::hueToRgb ( F32 val1In, F32 val2In, F32 valHUeIn )
 {
 	if ( valHUeIn < 0.0f ) valHUeIn += 1.0f;
 	if ( valHUeIn > 1.0f ) valHUeIn -= 1.0f;
@@ -319,9 +300,7 @@ hueToRgb ( F32 val1In, F32 val2In, F32 valHUeIn )
 
 //////////////////////////////////////////////////////////////////////////////
 //
-void
-LLFloaterColorPicker::
-hslToRgb ( F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F32& bValOut )
+void LLFloaterColorPicker::hslToRgb ( F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F32& bValOut )
 {
 	if ( sValIn < 0.00001f )
 	{
@@ -349,9 +328,7 @@ hslToRgb ( F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F32&
 
 //////////////////////////////////////////////////////////////////////////////
 // mutator for original RGB value
-void
-LLFloaterColorPicker::
-setOrigRgb ( F32 origRIn, F32 origGIn, F32 origBIn )
+void LLFloaterColorPicker::setOrigRgb ( F32 origRIn, F32 origGIn, F32 origBIn )
 {
 	origR = origRIn;
 	origG = origGIn;
@@ -360,9 +337,7 @@ setOrigRgb ( F32 origRIn, F32 origGIn, F32 origBIn )
 
 //////////////////////////////////////////////////////////////////////////////
 // accessor for original RGB value
-void
-LLFloaterColorPicker::
-getOrigRgb ( F32& origROut, F32& origGOut, F32& origBOut )
+void LLFloaterColorPicker::getOrigRgb ( F32& origROut, F32& origGOut, F32& origBOut )
 {
 	origROut = origR;
 	origGOut = origG;
@@ -371,9 +346,7 @@ getOrigRgb ( F32& origROut, F32& origGOut, F32& origBOut )
 
 //////////////////////////////////////////////////////////////////////////////
 // mutator for current RGB value
-void
-LLFloaterColorPicker::
-setCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn )
+void LLFloaterColorPicker::setCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn )
 {
 	// save current RGB
 	curR = curRIn;
@@ -383,19 +356,13 @@ setCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn )
 	// update corresponding HSL values and
 	LLColor3(curRIn, curGIn, curBIn).calcHSL(&curH, &curS, &curL);
 
-	// color changed so update text fields (fixes SL-16968)
-    // HACK: turn off the call back wilst we update the text or we recurse ourselves into oblivion
-    // CP: this was required when I first wrote the code but this may not be necessary anymore - leaving it there just in case
-    enableTextCallbacks( FALSE );
+	// color changed so update text fields
     updateTextEntry();
-    enableTextCallbacks( TRUE );
 }
 
 //////////////////////////////////////////////////////////////////////////////
 // accessor for current RGB value
-void
-LLFloaterColorPicker::
-getCurRgb ( F32& curROut, F32& curGOut, F32& curBOut )
+void LLFloaterColorPicker::getCurRgb ( F32& curROut, F32& curGOut, F32& curBOut )
 {
 	curROut = curR;
 	curGOut = curG;
@@ -404,9 +371,7 @@ getCurRgb ( F32& curROut, F32& curGOut, F32& curBOut )
 
 //////////////////////////////////////////////////////////////////////////////
 // mutator for current HSL value
-void
-LLFloaterColorPicker::
-setCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn )
+void LLFloaterColorPicker::setCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn )
 {
 	// save current HSL
 	curH = curHIn;
@@ -419,9 +384,7 @@ setCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn )
 
 //////////////////////////////////////////////////////////////////////////////
 // accessor for current HSL value
-void
-LLFloaterColorPicker::
-getCurHsl ( F32& curHOut, F32& curSOut, F32& curLOut )
+void LLFloaterColorPicker::getCurHsl ( F32& curHOut, F32& curSOut, F32& curLOut )
 {
 	curHOut = curH;
 	curSOut = curS;
@@ -430,9 +393,7 @@ getCurHsl ( F32& curHOut, F32& curSOut, F32& curLOut )
 
 //////////////////////////////////////////////////////////////////////////////
 // called when 'cancel' clicked
-void
-LLFloaterColorPicker::
-onClickCancel ( void* data )
+void LLFloaterColorPicker::onClickCancel ( void* data )
 {
 	if (data)
 	{
@@ -441,16 +402,14 @@ onClickCancel ( void* data )
 		if ( self )
 		{
 			self->cancelSelection ();
-			self->close();
+			self->closeFloater();
 		}
 	}
 }
 
 //////////////////////////////////////////////////////////////////////////////
 // called when 'select' clicked
-void
-LLFloaterColorPicker::
-onClickSelect ( void* data )
+void LLFloaterColorPicker::onClickSelect ( void* data )
 {
 	if (data)
 	{
@@ -460,36 +419,28 @@ onClickSelect ( void* data )
 		{
 			// apply to selection
 			LLColorSwatchCtrl::onColorChanged ( self->getSwatch (), LLColorSwatchCtrl::COLOR_SELECT );
-			self->close();
+			self->closeFloater();
 		}
 	}
 }
 
-void LLFloaterColorPicker::onClickPipette( void* data )
+void LLFloaterColorPicker::onClickPipette( )
 {
-	LLFloaterColorPicker* self = ( LLFloaterColorPicker* )data;
-
-	if ( self)
+	BOOL pipette_active = mPipetteBtn->getToggleState();
+	pipette_active = !pipette_active;
+	if (pipette_active)
 	{
-		BOOL pipette_active = self->mPipetteBtn->getToggleState();
-		pipette_active = !pipette_active;
-		if (pipette_active)
-		{
-			LLToolPipette::getInstance()->setSelectCallback(onColorSelect, self);
-			LLToolMgr::getInstance()->setTransientTool(LLToolPipette::getInstance());
-		}
-		else
-		{
-			LLToolMgr::getInstance()->clearTransientTool();
-		}
+		LLToolMgr::getInstance()->setTransientTool(LLToolPipette::getInstance());
+	}
+	else
+	{
+		LLToolMgr::getInstance()->clearTransientTool();
 	}
 }
 
 //////////////////////////////////////////////////////////////////////////////
 // called when 'text is committed' - i,e. focus moves from a text field
-void
-LLFloaterColorPicker::
-onTextCommit ( LLUICtrl* ctrl, void* data )
+void LLFloaterColorPicker::onTextCommit ( LLUICtrl* ctrl, void* data )
 {
 	if ( data )
 	{
@@ -515,16 +466,12 @@ void LLFloaterColorPicker::onImmediateCheck( LLUICtrl* ctrl, void* data)
 	}
 }
 
-void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te, void *data )
+void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te )
 {
-	LLFloaterColorPicker* self = (LLFloaterColorPicker*)data;
-	if (self)
+	setCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]);
+	if (mApplyImmediateCheck->get())
 	{
-		self->setCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]);
-		if (self->mApplyImmediateCheck->get())
-		{
-			LLColorSwatchCtrl::onColorChanged ( self->getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
-		}
+		LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
 	}
 }
 
@@ -673,9 +620,7 @@ void LLFloaterColorPicker::draw()
 
 //////////////////////////////////////////////////////////////////////////////
 // find a complimentary color to the one passed in that can be used to highlight
-const LLColor4&
-LLFloaterColorPicker::
-getComplimentaryColor ( const LLColor4& backgroundColor )
+const LLColor4& LLFloaterColorPicker::getComplimentaryColor ( const LLColor4& backgroundColor )
 {
 	// going to base calculation on luminance
 	F32 hVal, sVal, lVal;
@@ -695,9 +640,7 @@ getComplimentaryColor ( const LLColor4& backgroundColor )
 
 //////////////////////////////////////////////////////////////////////////////
 // draw color palette
-void
-LLFloaterColorPicker::
-drawPalette ()
+void LLFloaterColorPicker::drawPalette ()
 {
 	S32 curEntry = 0;
 
@@ -748,9 +691,7 @@ drawPalette ()
 
 //////////////////////////////////////////////////////////////////////////////
 // update text entry values for RGB/HSL (can't be done in ::draw () since this overwrites input
-void
-LLFloaterColorPicker::
-updateTextEntry ()
+void LLFloaterColorPicker::updateTextEntry ()
 {
 	// set values in spinners
 	childSetValue("rspin", ( getCurR () * 255.0f ) );
@@ -761,38 +702,9 @@ updateTextEntry ()
 	childSetValue("lspin", ( getCurL () * 100.0f ) );
 }
 
-//////////////////////////////////////////////////////////////////////////////
-// turns on or off text entry commit call backs
-void
-LLFloaterColorPicker::
-enableTextCallbacks ( BOOL stateIn )
-{
-	if ( stateIn )
-	{
-		childSetCommitCallback("rspin", onTextCommit, (void*)this );
-		childSetCommitCallback("gspin", onTextCommit, (void*)this );
-		childSetCommitCallback("bspin", onTextCommit, (void*)this );
-		childSetCommitCallback("hspin", onTextCommit, (void*)this );
-		childSetCommitCallback("sspin", onTextCommit, (void*)this );
-		childSetCommitCallback("lspin", onTextCommit, (void*)this );
-	}
-	else
-	{
-		childSetCommitCallback("rspin", 0, (void*)this );
-		childSetCommitCallback("gspin", 0, (void*)this );
-		childSetCommitCallback("bspin", 0, (void*)this );
-		childSetCommitCallback("hspin", 0, (void*)this );
-		childSetCommitCallback("sspin", 0, (void*)this );
-		childSetCommitCallback("lspin", 0, (void*)this );
-	}
-}
-
-
 //////////////////////////////////////////////////////////////////////////////
 //
-void
-LLFloaterColorPicker::
-onTextEntryChanged ( LLUICtrl* ctrl )
+void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
 {
 	// value in RGB boxes changed
 	std::string name = ctrl->getName();
@@ -821,10 +733,7 @@ onTextEntryChanged ( LLUICtrl* ctrl )
 		// update current RGB (and implicitly HSL)
 		setCurRgb ( rVal, gVal, bVal );
 
-		// HACK: turn off the call back wilst we update the text or we recurse ourselves into oblivion
-		enableTextCallbacks ( FALSE );
 		updateTextEntry ();
-		enableTextCallbacks ( TRUE );
 	}
 	else
 	// value in HSL boxes changed
@@ -847,10 +756,7 @@ onTextEntryChanged ( LLUICtrl* ctrl )
 		// update current HSL (and implicitly RGB)
 		setCurHsl ( hVal, sVal, lVal );
 
-		// HACK: turn off the call back wilst we update the text or we recurse ourselves into oblivion
-		enableTextCallbacks ( FALSE );
 		updateTextEntry ();
-		enableTextCallbacks ( TRUE );
 	}
 
 	if (mApplyImmediateCheck->get())
@@ -861,9 +767,7 @@ onTextEntryChanged ( LLUICtrl* ctrl )
 
 //////////////////////////////////////////////////////////////////////////////
 //
-BOOL
-LLFloaterColorPicker::
-updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
+BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
 {
 	if ( xPosIn >= mRGBViewerImageLeft &&
 		 xPosIn <= mRGBViewerImageLeft + mRGBViewerImageWidth &&
@@ -899,9 +803,7 @@ updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
 
 //////////////////////////////////////////////////////////////////////////////
 //
-BOOL
-LLFloaterColorPicker::
-handleMouseDown ( S32 x, S32 y, MASK mask )
+BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
 {
 	// make it the frontmost
 	gFloaterView->bringToFront(this);
@@ -987,10 +889,7 @@ handleMouseDown ( S32 x, S32 y, MASK mask )
 				LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
 			}
 
-			// HACK: turn off the call back wilst we update the text or we recurse ourselves into oblivion
-			enableTextCallbacks ( FALSE );
 			updateTextEntry ();
-			enableTextCallbacks ( TRUE );
 		}
 
 		return TRUE;
@@ -1003,9 +902,7 @@ handleMouseDown ( S32 x, S32 y, MASK mask )
 
 //////////////////////////////////////////////////////////////////////////////
 //
-BOOL
-LLFloaterColorPicker::
-handleHover ( S32 x, S32 y, MASK mask )
+BOOL LLFloaterColorPicker::handleHover ( S32 x, S32 y, MASK mask )
 {
 	// if we're the front most window
 	if ( isFrontmost () )
@@ -1071,19 +968,9 @@ handleHover ( S32 x, S32 y, MASK mask )
 	return LLFloater::handleHover ( x, y, mask );
 }
 
-void LLFloaterColorPicker::onClose(bool app_quitting)
-{
-	//RN: this is consistent with texture picker in that closing the window leaves the current selection
-	// to change this to "close to cancel", uncomment the following line
-	//cancelSelection();
-	LLFloater::onClose(app_quitting);
-}
-
 //////////////////////////////////////////////////////////////////////////////
 // reverts state once mouse button is released
-BOOL
-LLFloaterColorPicker::
-handleMouseUp ( S32 x, S32 y, MASK mask )
+BOOL LLFloaterColorPicker::handleMouseUp ( S32 x, S32 y, MASK mask )
 {
 	getWindow()->setCursor ( UI_CURSOR_ARROW );
 
@@ -1130,7 +1017,7 @@ handleMouseUp ( S32 x, S32 y, MASK mask )
 							std::ostringstream codec;
 							codec << "ColorPaletteEntry" << std::setfill ( '0' ) << std::setw ( 2 ) << curEntry + 1;
 							const std::string s ( codec.str () );
-							gSavedSettings.setColor4( s, *mPalette [ curEntry ] );
+							gSavedSkinSettings.setColor4( s, *mPalette [ curEntry ] );
 						}
 					}
 
@@ -1158,16 +1045,11 @@ handleMouseUp ( S32 x, S32 y, MASK mask )
 
 //////////////////////////////////////////////////////////////////////////////
 // cancel current color selection, revert to original and close picker
-void
-LLFloaterColorPicker::
-cancelSelection ()
+void LLFloaterColorPicker::cancelSelection ()
 {
 	// restore the previous color selection
 	setCurRgb ( getOrigR (), getOrigG (), getOrigB () );
 
-	// 	we're going away and when we do and the entry widgets lose focus, they do bad things so turn them off
-	enableTextCallbacks ( FALSE );
-
 	// update in world item with original color via current swatch
 	LLColorSwatchCtrl::onColorChanged( getSwatch(), LLColorSwatchCtrl::COLOR_CANCEL );
 
diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h
index 7c8d36a7c7..16f456b5bf 100644
--- a/indra/newview/llfloatercolorpicker.h
+++ b/indra/newview/llfloatercolorpicker.h
@@ -36,7 +36,7 @@
 #include <vector>
 
 #include "llfloater.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llcolorswatch.h"
 #include "llspinctrl.h"
 #include "lltextureentry.h"
@@ -61,7 +61,6 @@ class LLFloaterColorPicker
 		virtual BOOL handleMouseUp ( S32 x, S32 y, MASK mask );
 		virtual BOOL handleHover ( S32 x, S32 y, MASK mask );
 		virtual void onMouseCaptureLost();
-		virtual void onClose(bool app_quitting);
 
 		// implicit methods
 		void createUI ();
@@ -123,14 +122,11 @@ class LLFloaterColorPicker
 		// callbacks
 		static void onClickCancel ( void* data );
 		static void onClickSelect ( void* data );
-		static void onClickPipette ( void* data );
+			   void onClickPipette ( );
 		static void onTextCommit ( LLUICtrl* ctrl, void* data );
 		static void onImmediateCheck ( LLUICtrl* ctrl, void* data );
-		static void onColorSelect( const LLTextureEntry& te, void *data );
+			   void onColorSelect( const LLTextureEntry& te );
 	private:
-		// turns on or off text entry commit call backs
-		void enableTextCallbacks ( BOOL stateIn );
-
 		// draws color selection palette
 		void drawPalette ();
 
diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp
index 58876a8dec..a448df792e 100644
--- a/indra/newview/llfloaterdaycycle.cpp
+++ b/indra/newview/llfloaterdaycycle.cpp
@@ -63,15 +63,20 @@ LLFloaterDayCycle* LLFloaterDayCycle::sDayCycle = NULL;
 std::map<std::string, LLWLSkyKey> LLFloaterDayCycle::sSliderToKey;
 const F32 LLFloaterDayCycle::sHoursPerDay = 24.0f;
 
-LLFloaterDayCycle::LLFloaterDayCycle() : LLFloater(std::string("Day Cycle Floater"))
+LLFloaterDayCycle::LLFloaterDayCycle()	
+  : LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_day_cycle_options.xml");
-	
+}
+
+BOOL LLFloaterDayCycle::postBuild()
+{
 	// add the combo boxes
 	LLComboBox* keyCombo = getChild<LLComboBox>("WLKeyPresets");
 
 	if(keyCombo != NULL) 
 	{
+		keyCombo->removeall();
 		std::map<std::string, LLWLParamSet>::iterator mIt = 
 			LLWLParamManager::instance()->mParamList.begin();
 		for(; mIt != LLWLParamManager::instance()->mParamList.end(); mIt++) 
@@ -90,6 +95,7 @@ LLFloaterDayCycle::LLFloaterDayCycle() : LLFloater(std::string("Day Cycle Floate
 
 	// load it up
 	initCallbacks();
+	return TRUE;
 }
 
 LLFloaterDayCycle::~LLFloaterDayCycle()
@@ -231,7 +237,7 @@ LLFloaterDayCycle* LLFloaterDayCycle::instance()
 	if (!sDayCycle)
 	{
 		sDayCycle = new LLFloaterDayCycle();
-		sDayCycle->open();
+		sDayCycle->openFloater();
 		sDayCycle->setFocus(TRUE);
 	}
 	return sDayCycle;
@@ -256,7 +262,7 @@ void LLFloaterDayCycle::show()
 	//LLUICtrlFactory::getInstance()->buildFloater(dayCycle, "floater_day_cycle_options.xml");
 	//dayCycle->initCallbacks();
 
-	dayCycle->open();
+	dayCycle->openFloater();
 }
 
 // virtual
diff --git a/indra/newview/llfloaterdaycycle.h b/indra/newview/llfloaterdaycycle.h
index d230035545..a03a7f749a 100644
--- a/indra/newview/llfloaterdaycycle.h
+++ b/indra/newview/llfloaterdaycycle.h
@@ -58,7 +58,7 @@ public:
 
 	LLFloaterDayCycle();
 	virtual ~LLFloaterDayCycle();
-
+	/*virtual*/	BOOL	postBuild();
 	/// help button stuff
 	static void onClickHelp(void* data);
 	void initHelpBtn(const std::string& name, const std::string& xml_alert);
diff --git a/indra/newview/llfloaterenvsettings.cpp b/indra/newview/llfloaterenvsettings.cpp
index 661c3988c0..cfdf49373e 100644
--- a/indra/newview/llfloaterenvsettings.cpp
+++ b/indra/newview/llfloaterenvsettings.cpp
@@ -54,18 +54,22 @@
 
 LLFloaterEnvSettings* LLFloaterEnvSettings::sEnvSettings = NULL;
 
-LLFloaterEnvSettings::LLFloaterEnvSettings() : LLFloater(std::string("Environment Settings Floater"))
+LLFloaterEnvSettings::LLFloaterEnvSettings()
+  : LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_env_settings.xml");
-	
-	// load it up
-	initCallbacks();
 }
-
+// virtual
 LLFloaterEnvSettings::~LLFloaterEnvSettings()
 {
 }
-
+// virtual
+BOOL LLFloaterEnvSettings::postBuild()
+{	
+	// load it up
+	initCallbacks();
+	return TRUE;
+}
 void LLFloaterEnvSettings::onClickHelp(void* data)
 {
 	LLFloaterEnvSettings* self = (LLFloaterEnvSettings*)data;
@@ -174,7 +178,7 @@ LLFloaterEnvSettings* LLFloaterEnvSettings::instance()
 	if (!sEnvSettings)
 	{
 		sEnvSettings = new LLFloaterEnvSettings();
-		sEnvSettings->open();
+		sEnvSettings->openFloater();
 		sEnvSettings->setFocus(TRUE);
 	}
 	return sEnvSettings;
@@ -188,7 +192,7 @@ void LLFloaterEnvSettings::show()
 	//LLUICtrlFactory::getInstance()->buildFloater(envSettings, "floater_env_settings.xml");
 	//envSettings->initCallbacks();
 
-	envSettings->open();
+	envSettings->openFloater();
 }
 
 bool LLFloaterEnvSettings::isOpen()
@@ -303,7 +307,6 @@ std::string LLFloaterEnvSettings::timeToString(F32 curTime)
 {
 	S32 hours;
 	S32 min;
-	bool isPM = false;
 
 	// get hours and minutes
 	hours = (S32) (24.0 * curTime);
@@ -317,46 +320,19 @@ std::string LLFloaterEnvSettings::timeToString(F32 curTime)
 		min = 0;
 	}
 
-	// set for PM
-	if(hours >= 12 && hours < 24)
-	{
-		isPM = true;
-	}
+	std::string newTime = getString("timeStr");
+	struct tm * timeT;
+	time_t secT = time(0);
+	timeT = gmtime (&secT);
 
-	// convert to non-military notation
-	if(hours >= 24) 
-	{
-		hours = 12;
-	} 
-	else if(hours > 12) 
-	{
-		hours -= 12;
-	} 
-	else if(hours == 0) 
-	{
-		hours = 12;
-	}
+	timeT->tm_hour = hours;
+	timeT->tm_min = min;
+	secT = mktime (timeT);
+	secT -= LLStringOps::getLocalTimeOffset ();
 
-	// make the string
-	std::stringstream newTime;
-	newTime << hours << ":";
-	
-	// double 0
-	if(min < 10) 
-	{
-		newTime << 0;
-	}
-	
-	// finish it
-	newTime << min << " ";
-	if(isPM) 
-	{
-		newTime << "PM";
-	} 
-	else 
-	{
-		newTime << "AM";
-	}
+	LLSD substitution;
+	substitution["datetime"] = (S32) secT;
 
-	return newTime.str();
+	LLStringUtil::format (newTime, substitution);
+	return newTime;
 }
diff --git a/indra/newview/llfloaterenvsettings.h b/indra/newview/llfloaterenvsettings.h
index 4cdf6036c6..725fb9ed45 100644
--- a/indra/newview/llfloaterenvsettings.h
+++ b/indra/newview/llfloaterenvsettings.h
@@ -46,8 +46,8 @@ class LLFloaterEnvSettings : public LLFloater
 public:
 
 	LLFloaterEnvSettings();
-	virtual ~LLFloaterEnvSettings();
-	
+	/*virtual*/ ~LLFloaterEnvSettings();
+	/*virtual*/	BOOL	postBuild();	
 	/// initialize all the callbacks for the menu
 	void initCallbacks(void);
 
diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp
index 485c13c7b6..6f84807564 100644
--- a/indra/newview/llfloaterevent.cpp
+++ b/indra/newview/llfloaterevent.cpp
@@ -75,13 +75,13 @@ public:
 };
 LLEventHandler gEventHandler;
 
-LLFloaterEventInfo::LLFloaterEventInfo(const std::string& name, const U32 event_id)
-:	LLFloater(name),
+LLFloaterEventInfo::LLFloaterEventInfo(const U32 event_id)
+:	LLFloater(),
 	mEventID( event_id )
 {
 
 	mFactoryMap["event_details_panel"] = LLCallbackMap(LLFloaterEventInfo::createEventDetail, this);
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_event.xml", &getFactoryMap());
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_event.xml");
 	gEventInfoInstances.addData(event_id, this);
 }
 
@@ -115,14 +115,14 @@ LLFloaterEventInfo* LLFloaterEventInfo::show(const U32 event_id)
 	{
 		// ...bring that window to front
 		floater = gEventInfoInstances.getData(event_id);
-		floater->open();	/*Flawfinder: ignore*/
+		floater->openFloater();
 		floater->setFrontmost(true);
 	}
 	else
 	{
-		floater =  new LLFloaterEventInfo("eventinfo", event_id );
+		floater =  new LLFloaterEventInfo( event_id );
 		floater->center();
-		floater->open();	/*Flawfinder: ignore*/
+		floater->openFloater();
 		floater->displayEventInfo(event_id);
 		floater->setFrontmost(true);
 	}
diff --git a/indra/newview/llfloaterevent.h b/indra/newview/llfloaterevent.h
index 8f448b5fa2..563ecc49da 100644
--- a/indra/newview/llfloaterevent.h
+++ b/indra/newview/llfloaterevent.h
@@ -42,7 +42,7 @@ class LLPanelEvent;
 class LLFloaterEventInfo : public LLFloater
 {
 public:
-	LLFloaterEventInfo(const std::string& name, const U32 event_id );
+	LLFloaterEventInfo( const U32 event_id );
 	/*virtual*/ ~LLFloaterEventInfo();
 
 	void displayEventInfo(const U32 event_id);
diff --git a/indra/newview/llfloaterfonttest.cpp b/indra/newview/llfloaterfonttest.cpp
index 4bb1d9605d..02791b711e 100644
--- a/indra/newview/llfloaterfonttest.cpp
+++ b/indra/newview/llfloaterfonttest.cpp
@@ -5,7 +5,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008 Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -13,12 +13,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
@@ -44,7 +45,7 @@
 LLFloaterFontTest* LLFloaterFontTest::sInstance = NULL;
 
 LLFloaterFontTest::LLFloaterFontTest()
-	:	LLFloater(std::string("floater_font_test"), LLRect(0,500,700,0), std::string("Font Test"))
+	:	LLFloater("floater_font_test")
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_font_test.xml");
 }
@@ -60,6 +61,6 @@ void LLFloaterFontTest::show(void *unused)
 	if (!sInstance)
 		sInstance = new LLFloaterFontTest();
 
-	sInstance->open(); /*Flawfinder: ignore*/
+	sInstance->openFloater();
 	sInstance->setFocus(TRUE);
 }
diff --git a/indra/newview/llfloaterfonttest.h b/indra/newview/llfloaterfonttest.h
index 45ff890423..eb2d410387 100644
--- a/indra/newview/llfloaterfonttest.h
+++ b/indra/newview/llfloaterfonttest.h
@@ -5,7 +5,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -13,12 +13,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp
index 014a631a53..7fa9d07d0a 100644
--- a/indra/newview/llfloaterfriends.cpp
+++ b/indra/newview/llfloaterfriends.cpp
@@ -52,6 +52,9 @@
 #include "llnotify.h"
 #include "llresmgr.h"
 #include "llimview.h"
+#include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
 #include "lluictrlfactory.h"
 #include "llmenucommands.h"
 #include "llviewercontrol.h"
@@ -148,7 +151,7 @@ void LLPanelFriends::updateFriends(U32 changed_mask)
 	// if the maximum amount of friends are selected
 	mShowMaxSelectWarning = false;
 
-	LLDynamicArray<LLUUID> selected_friends = getSelectedIDs();
+	std::vector<LLUUID> selected_friends = getSelectedIDs();
 	if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
 	{
 		refreshNames(changed_mask);
@@ -173,7 +176,7 @@ void LLPanelFriends::updateFriends(U32 changed_mask)
 		// but we don't really care here, because refreshUI() will
 		// clean up the interface.
 		friends_list->setCurrentByID(selected_id);
-		for(LLDynamicArray<LLUUID>::iterator itr = selected_friends.begin(); itr != selected_friends.end(); ++itr)
+		for(std::vector<LLUUID>::iterator itr = selected_friends.begin(); itr != selected_friends.end(); ++itr)
 		{
 			friends_list->setSelectedByValue(*itr, true);
 		}
@@ -188,10 +191,10 @@ BOOL LLPanelFriends::postBuild()
 {
 	mFriendsList = getChild<LLScrollListCtrl>("friend_list");
 	mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT);
-	mFriendsList->setMaximumSelectCallback(onMaximumSelect);
+	mFriendsList->setMaximumSelectCallback(boost::bind(&LLPanelFriends::onMaximumSelect));
 	mFriendsList->setCommitOnSelectionChange(TRUE);
 	childSetCommitCallback("friend_list", onSelectName, this);
-	childSetDoubleClickCallback("friend_list", onClickIM);
+	getChild<LLScrollListCtrl>("friend_list")->setDoubleClickCallback(onClickIM, this);
 
 	U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE;
 	refreshNames(changed_mask);
@@ -233,7 +236,7 @@ BOOL LLPanelFriends::addFriend(const LLUUID& agent_id)
 	friend_column["column"] = "friend_name";
 	friend_column["value"] = fullname;
 	friend_column["font"] = "SANSSERIF";
-	friend_column["font-style"] = "NORMAL";	
+	friend_column["font"]["style"] = "NORMAL";	
 
 	LLSD& online_status_column = element["columns"][LIST_ONLINE_STATUS];
 	online_status_column["column"] = "icon_online_status";
@@ -241,12 +244,12 @@ BOOL LLPanelFriends::addFriend(const LLUUID& agent_id)
 	
 	if (isOnline)
 	{
-		friend_column["font-style"] = "BOLD";	
+		friend_column["font"]["style"] = "BOLD";	
 		online_status_column["value"] = "icon_avatar_online.tga";
 	}
 	else if(isOnlineSIP)
 	{
-		friend_column["font-style"] = "BOLD";	
+		friend_column["font"]["style"] = "BOLD";	
 		online_status_column["value"] = ONLINE_SIP_ICON_NAME;
 	}
 
@@ -325,31 +328,14 @@ BOOL LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationsh
 
 void LLPanelFriends::refreshRightsChangeList()
 {
-	LLDynamicArray<LLUUID> friends = getSelectedIDs();
+	std::vector<LLUUID> friends = getSelectedIDs();
 	S32 num_selected = friends.size();
 
 	bool can_offer_teleport = num_selected >= 1;
 	bool selected_friends_online = true;
 
-	LLTextBox* processing_label = getChild<LLTextBox>("process_rights_label");
-
-	if(!mAllowRightsChange)
-	{
-		if(processing_label)
-		{
-			processing_label->setVisible(true);
-			// ignore selection for now
-			friends.clear();
-			num_selected = 0;
-		}
-	}
-	else if(processing_label)
-	{
-		processing_label->setVisible(false);
-	}
-
 	const LLRelationship* friend_status = NULL;
-	for(LLDynamicArray<LLUUID>::iterator itr = friends.begin(); itr != friends.end(); ++itr)
+	for(std::vector<LLUUID>::iterator itr = friends.begin(); itr != friends.end(); ++itr)
 	{
 		friend_status = LLAvatarTracker::instance().getBuddyInfo(*itr);
 		if (friend_status)
@@ -391,7 +377,7 @@ struct SortFriendsByID
 
 void LLPanelFriends::refreshNames(U32 changed_mask)
 {
-	LLDynamicArray<LLUUID> selected_ids = getSelectedIDs();	
+	std::vector<LLUUID> selected_ids = getSelectedIDs();	
 	S32 pos = mFriendsList->getScrollPos();	
 	
 	// get all buddies we know about
@@ -499,17 +485,8 @@ void LLPanelFriends::refreshUI()
 		single_selected = TRUE;
 		if(num_selected > 1)
 		{
-			childSetText("friend_name_label", getString("Multiple"));
 			multiple_selected = TRUE;		
 		}
-		else
-		{			
-			childSetText("friend_name_label", mFriendsList->getFirstSelected()->getColumn(LIST_FRIEND_NAME)->getValue().asString() + "...");
-		}
-	}
-	else
-	{
-		childSetText("friend_name_label", LLStringUtil::null);
 	}
 
 
@@ -521,15 +498,15 @@ void LLPanelFriends::refreshUI()
 	//(single_selected will always be true in this situations)
 	childSetEnabled("remove_btn", single_selected);
 	childSetEnabled("im_btn", single_selected);
-	childSetEnabled("friend_rights", single_selected);
+//	childSetEnabled("friend_rights", single_selected);
 
 	refreshRightsChangeList();
 }
 
-LLDynamicArray<LLUUID> LLPanelFriends::getSelectedIDs()
+std::vector<LLUUID> LLPanelFriends::getSelectedIDs()
 {
 	LLUUID selected_id;
-	LLDynamicArray<LLUUID> friend_ids;
+	std::vector<LLUUID> friend_ids;
 	std::vector<LLScrollListItem*> selected = mFriendsList->getAllSelected();
 	for(std::vector<LLScrollListItem*>::iterator itr = selected.begin(); itr != selected.end(); ++itr)
 	{
@@ -552,7 +529,7 @@ void LLPanelFriends::onSelectName(LLUICtrl* ctrl, void* user_data)
 }
 
 //static
-void LLPanelFriends::onMaximumSelect(void* user_data)
+void LLPanelFriends::onMaximumSelect()
 {
 	LLSD args;
 	args["MAX_SELECT"] = llformat("%d", MAX_FRIEND_SELECT);
@@ -565,7 +542,7 @@ void LLPanelFriends::onClickProfile(void* user_data)
 	LLPanelFriends* panelp = (LLPanelFriends*)user_data;
 
 	//llinfos << "LLPanelFriends::onClickProfile()" << llendl;
-	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
+	std::vector<LLUUID> ids = panelp->getSelectedIDs();
 	if(ids.size() > 0)
 	{
 		LLUUID agent_id = ids[0];
@@ -581,7 +558,7 @@ void LLPanelFriends::onClickIM(void* user_data)
 	LLPanelFriends* panelp = (LLPanelFriends*)user_data;
 
 	//llinfos << "LLPanelFriends::onClickIM()" << llendl;
-	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
+	std::vector<LLUUID> ids = panelp->getSelectedIDs();
 	if(ids.size() > 0)
 	{
 		if(ids.size() == 1)
@@ -591,14 +568,18 @@ void LLPanelFriends::onClickIM(void* user_data)
 			std::string fullname;
 			if(info && gCacheName->getFullName(agent_id, fullname))
 			{
-				gIMMgr->setFloaterOpen(TRUE);
 				gIMMgr->addSession(fullname, IM_NOTHING_SPECIAL, agent_id);
 			}		
 		}
 		else
 		{
-			gIMMgr->setFloaterOpen(TRUE);
-			gIMMgr->addSession("Friends Conference", IM_SESSION_CONFERENCE_START, ids[0], ids);
+			// *HACK: Copy into dynamic array
+			LLDynamicArray<LLUUID> id_array;
+			for (std::vector<LLUUID>::iterator it = ids.begin(); it != ids.end(); ++it)
+			{
+				id_array.push_back(*it);
+			}
+			gIMMgr->addSession("Friends Conference", IM_SESSION_CONFERENCE_START, ids[0], id_array);
 		}
 		make_ui_sound("UISndStartIM");
 	}
@@ -702,7 +683,7 @@ void LLPanelFriends::onClickRemove(void* user_data)
 	LLPanelFriends* panelp = (LLPanelFriends*)user_data;
 
 	//llinfos << "LLPanelFriends::onClickRemove()" << llendl;
-	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
+	std::vector<LLUUID> ids = panelp->getSelectedIDs();
 	LLSD args;
 	if(ids.size() > 0)
 	{
@@ -742,7 +723,7 @@ void LLPanelFriends::onClickOfferTeleport(void* user_data)
 {
 	LLPanelFriends* panelp = (LLPanelFriends*)user_data;
 
-	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
+	std::vector<LLUUID> ids = panelp->getSelectedIDs();
 	if(ids.size() > 0)
 	{	
 		handle_lure(ids);
@@ -754,7 +735,7 @@ void LLPanelFriends::onClickPay(void* user_data)
 {
 	LLPanelFriends* panelp = (LLPanelFriends*)user_data;
 
-	LLDynamicArray<LLUUID> ids = panelp->getSelectedIDs();
+	std::vector<LLUUID> ids = panelp->getSelectedIDs();
 	if(ids.size() == 1)
 	{	
 		handle_pay_by_id(ids[0]);
diff --git a/indra/newview/llfloaterfriends.h b/indra/newview/llfloaterfriends.h
index a5c94ee485..51fe5f6d89 100644
--- a/indra/newview/llfloaterfriends.h
+++ b/indra/newview/llfloaterfriends.h
@@ -83,6 +83,9 @@ public:
 	static void requestFriendship(const LLUUID& target_id,
 								  const std::string& target_name, const std::string& message);
 
+	// *HACK Made public to remove friends from LLAvatarIconCtrl context menu
+	static bool handleRemove(const LLSD& notification, const LLSD& response);
+
 private:
 
 	enum FRIENDS_COLUMN_ORDER
@@ -115,15 +118,15 @@ private:
 	void confirmModifyRights(rights_map_t& ids, EGrantRevoke command);
 	void sendRightsGrant(rights_map_t& ids);
 
-	// return LLUUID::null if nothing is selected
-	LLDynamicArray<LLUUID> getSelectedIDs();
+	// return empty vector if nothing is selected
+	std::vector<LLUUID> getSelectedIDs();
 
 	// callback methods
 	static void onSelectName(LLUICtrl* ctrl, void* user_data);
 	static bool callbackAddFriend(const LLSD& notification, const LLSD& response);
 	static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response);
 	static void onPickAvatar(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* user_data);
-	static void onMaximumSelect(void* user_data);
+	static void onMaximumSelect();
 
 	static void onClickIM(void* user_data);
 	static void onClickProfile(void* user_data);
@@ -135,7 +138,6 @@ private:
 
 	static void onClickModifyStatus(LLUICtrl* ctrl, void* user_data);
 
-	static bool handleRemove(const LLSD& notification, const LLSD& response);
 	bool modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights);
 
 private:
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 6d39d75663..c3448d52c9 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -53,6 +53,7 @@
 #include "llscrollcontainer.h"
 #include "llscrolllistctrl.h"
 #include "lltextbox.h"
+#include "lltrans.h"
 #include "lluictrlfactory.h"
 #include "llviewergesture.h"
 #include "llviewerimagelist.h"
@@ -81,10 +82,8 @@ public:
 // LLFloaterGesture
 //---------------------------------------------------------------------------
 LLFloaterGesture::LLFloaterGesture()
-:	LLFloater(std::string("Gesture Floater"))
+:	LLFloater()
 {
-	sInstance = this;
-
 	sObserver = new LLFloaterGestureObserver;
 	gGestureManager.addObserver(sObserver);
 }
@@ -97,10 +96,6 @@ LLFloaterGesture::~LLFloaterGesture()
 	sObserver = NULL;
 
 	sInstance = NULL;
-
-	// Custom saving rectangle, since load must be done
-	// after postBuild.
-	gSavedSettings.setRect("FloaterGestureRect2", getRect());
 }
 
 // virtual
@@ -108,13 +103,12 @@ BOOL LLFloaterGesture::postBuild()
 {
 	std::string label;
 
-	// Translate title
 	label = getTitle();
 	
 	setTitle(label);
 
 	childSetCommitCallback("gesture_list", onCommitList, this);
-	childSetDoubleClickCallback("gesture_list", onClickPlay);
+	getChild<LLScrollListCtrl>("gesture_list")->setDoubleClickCallback(onClickPlay, this);
 
 	childSetAction("inventory_btn", onClickInventory, this);
 
@@ -138,25 +132,20 @@ void LLFloaterGesture::show()
 {
 	if (sInstance)
 	{
-		sInstance->open();		/*Flawfinder: ignore*/
+		sInstance->openFloater();
 		return;
 	}
 
-	LLFloaterGesture *self = new LLFloaterGesture();
+	sInstance = new LLFloaterGesture();
 
 	// Builds and adds to gFloaterView
-	LLUICtrlFactory::getInstance()->buildFloater(self, "floater_gesture.xml");
+	LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_gesture.xml");
 
-	// Fix up rectangle
-	LLRect rect = gSavedSettings.getRect("FloaterGestureRect2");
-	self->reshape(rect.getWidth(), rect.getHeight());
-	self->setRect(rect);
+	sInstance->buildGestureList();
 
-	self->buildGestureList();
+	sInstance->childSetFocus("gesture_list");
 
-	self->childSetFocus("gesture_list");
-
-	LLCtrlListInterface *list = self->childGetListInterface("gesture_list");
+	LLCtrlListInterface *list = sInstance->childGetListInterface("gesture_list");
 	if (list)
 	{
 		const BOOL ascending = TRUE;
@@ -164,11 +153,11 @@ void LLFloaterGesture::show()
 		list->selectFirstItem();
 	}
 	
-	self->mSelectedID = LLUUID::null;
+	sInstance->mSelectedID = LLUUID::null;
 
 	// Update button labels
-	onCommitList(NULL, self);
-	self->open();	/*Flawfinder: ignore*/
+	onCommitList(NULL, sInstance);
+	sInstance->openFloater();
 }
 
 // static
@@ -176,7 +165,7 @@ void LLFloaterGesture::toggleVisibility()
 {
 	if(sInstance && sInstance->getVisible())
 	{
-		sInstance->close();
+		sInstance->closeFloater();
 	}
 	else
 	{
@@ -231,7 +220,7 @@ void LLFloaterGesture::buildGestureList()
 		LLMultiGesture* gesture = (*it).second;
 
 		// Note: Can have NULL item if inventory hasn't arrived yet.
-		std::string item_name = "Loading...";
+		std::string item_name = getString("loading");
 		LLInventoryItem* item = gInventory.getItem(item_id);
 		if (item)
 		{
@@ -254,7 +243,7 @@ void LLFloaterGesture::buildGestureList()
 			element["columns"][0]["column"] = "trigger";
 			element["columns"][0]["value"] = gesture->mTrigger;
 			element["columns"][0]["font"] = "SANSSERIF";
-			element["columns"][0]["font-style"] = font_style;
+			element["columns"][0]["font"]["style"] = font_style;
 
 			std::string key_string = LLKeyboard::stringFromKey(gesture->mKey);
 			std::string buffer;
@@ -281,42 +270,42 @@ void LLFloaterGesture::buildGestureList()
 			element["columns"][1]["column"] = "shortcut";
 			element["columns"][1]["value"] = buffer;
 			element["columns"][1]["font"] = "SANSSERIF";
-			element["columns"][1]["font-style"] = font_style;
+			element["columns"][1]["font"]["style"] = font_style;
 
 			// hidden column for sorting
 			element["columns"][2]["column"] = "key";
 			element["columns"][2]["value"] = key_string;
 			element["columns"][2]["font"] = "SANSSERIF";
-			element["columns"][2]["font-style"] = font_style;
+			element["columns"][2]["font"]["style"] = font_style;
 
 			// Only add "playing" if we've got the name, less confusing. JC
 			if (item && gesture->mPlaying)
 			{
-				item_name += " (Playing)";
+				item_name += " " + getString("playing");
 			}
 			element["columns"][3]["column"] = "name";
 			element["columns"][3]["value"] = item_name;
 			element["columns"][3]["font"] = "SANSSERIF";
-			element["columns"][3]["font-style"] = font_style;
+			element["columns"][3]["font"]["style"] = font_style;
 		}
 		else
 		{
 			element["columns"][0]["column"] = "trigger";
 			element["columns"][0]["value"] = "";
 			element["columns"][0]["font"] = "SANSSERIF";
-			element["columns"][0]["font-style"] = font_style;
+			element["columns"][0]["font"]["style"] = font_style;
 			element["columns"][0]["column"] = "trigger";
 			element["columns"][0]["value"] = "---";
 			element["columns"][0]["font"] = "SANSSERIF";
-			element["columns"][0]["font-style"] = font_style;
+			element["columns"][0]["font"]["style"] = font_style;
 			element["columns"][2]["column"] = "key";
 			element["columns"][2]["value"] = "~~~";
 			element["columns"][2]["font"] = "SANSSERIF";
-			element["columns"][2]["font-style"] = font_style;
+			element["columns"][2]["font"]["style"] = font_style;
 			element["columns"][3]["column"] = "name";
 			element["columns"][3]["value"] = item_name;
 			element["columns"][3]["font"] = "SANSSERIF";
-			element["columns"][3]["font-style"] = font_style;
+			element["columns"][3]["font"]["style"] = font_style;
 		}
 		list->addElement(element, ADD_BOTTOM);
 	}
@@ -360,24 +349,16 @@ void LLFloaterGesture::onClickPlay(void* data)
 class GestureShowCallback : public LLInventoryCallback
 {
 public:
-	GestureShowCallback(std::string &title)
-	{
-		mTitle = title;
-	}
 	void fire(const LLUUID &inv_item)
 	{
-		LLPreviewGesture::show(mTitle, inv_item, LLUUID::null);
+		LLPreviewGesture::show(inv_item, LLUUID::null);
 	}
-private:
-	std::string mTitle;
 };
 
 // static
 void LLFloaterGesture::onClickNew(void* data)
 {
-	std::string title("Gesture: ");
-	title.append("New Gesture");
-	LLPointer<LLInventoryCallback> cb = new GestureShowCallback(title);
+	LLPointer<LLInventoryCallback> cb = new GestureShowCallback();
 	create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
 		LLUUID::null, LLTransactionID::tnull, "New Gesture", "", LLAssetType::AT_GESTURE,
 		LLInventoryType::IT_GESTURE, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, cb);
@@ -396,10 +377,7 @@ void LLFloaterGesture::onClickEdit(void* data)
 	LLInventoryItem* item = gInventory.getItem(item_id);
 	if (!item) return;
 
-	std::string title("Gesture: ");
-	title.append(item->getName());
-
-	LLPreviewGesture* previewp = LLPreviewGesture::show(title, item_id, LLUUID::null);
+	LLPreviewGesture* previewp = LLPreviewGesture::show(item_id, LLUUID::null);
 	if (!previewp->getHost())
 	{
 		previewp->setRect(gFloaterView->findNeighboringPosition(self, previewp));
diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h
index 4e11a10e61..f7c4e558ac 100644
--- a/indra/newview/llfloatergesture.h
+++ b/indra/newview/llfloatergesture.h
@@ -41,7 +41,7 @@
 
 #include "lldarray.h"
 
-class LLScrollableContainerView;
+class LLScrollContainer;
 class LLView;
 class LLButton;
 class LLLineEditor;
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 4959a2913e..58cbe02d6d 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -73,36 +73,39 @@
 #include "llsurface.h"
 #include "llviewercontrol.h"
 #include "lluictrlfactory.h"
+#include "lltrans.h"
 
 #include "lltransfertargetfile.h"
 #include "lltransfersourcefile.h"
 
 const F32 SECONDS_BETWEEN_UPDATE_REQUESTS = 5.0f;
 
-static LLFloaterGodTools* sGodTools = NULL;
-
 //*****************************************************************************
 // LLFloaterGodTools
 //*****************************************************************************
 
-// static
-LLFloaterGodTools* LLFloaterGodTools::instance()
+void LLFloaterGodTools::onOpen(const LLSD& key)
 {
-	if (!sGodTools)
+	center();
+	setFocus(TRUE);
+// 	LLPanel *panel = childGetVisibleTab("GodTools Tabs");
+// 	if (panel)
+// 		panel->setFocus(TRUE);
+	if (mPanelObjectTools)
+		mPanelObjectTools->setTargetAvatar(LLUUID::null);
+
+	if (gAgent.getRegionHost() != mCurrentHost)
 	{
-		sGodTools = new LLFloaterGodTools();
-		sGodTools->open();	/*Flawfinder: ignore*/
-		sGodTools->center();
-		sGodTools->setFocus(TRUE);
+		// we're in a new region
+		sendRegionInfoRequest();
 	}
-	return sGodTools;
 }
  
 
 // static
 void LLFloaterGodTools::refreshAll()
 {
-	LLFloaterGodTools* god_tools = instance();
+	LLFloaterGodTools* god_tools = getInstance();
 	if (god_tools)
 	{
 		if (gAgent.getRegionHost() != god_tools->mCurrentHost)
@@ -115,22 +118,16 @@ void LLFloaterGodTools::refreshAll()
 
 
 
-LLFloaterGodTools::LLFloaterGodTools()
-:	LLFloater(std::string("godtools floater")),
+LLFloaterGodTools::LLFloaterGodTools(const LLSD& key)
+:	LLFloater(),
 	mCurrentHost(LLHost::invalid),
 	mUpdateTimer()
 {
-	LLCallbackMap::map_t factory_map;
-	factory_map["grid"] = LLCallbackMap(createPanelGrid, this);
-	factory_map["region"] = LLCallbackMap(createPanelRegion, this);
-	factory_map["objects"] = LLCallbackMap(createPanelObjects, this);
-	factory_map["request"] = LLCallbackMap(createPanelRequest, this);
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_god_tools.xml", &factory_map);
-
-	childSetTabChangeCallback("GodTools Tabs", "grid", onTabChanged, this);
-	childSetTabChangeCallback("GodTools Tabs", "region", onTabChanged, this);
-	childSetTabChangeCallback("GodTools Tabs", "objects", onTabChanged, this);
-	childSetTabChangeCallback("GodTools Tabs", "request", onTabChanged, this);
+	mFactoryMap["grid"] = LLCallbackMap(createPanelGrid, this);
+	mFactoryMap["region"] = LLCallbackMap(createPanelRegion, this);
+	mFactoryMap["objects"] = LLCallbackMap(createPanelObjects, this);
+	mFactoryMap["request"] = LLCallbackMap(createPanelRequest, this);
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_god_tools.xml");
 
 	sendRegionInfoRequest();
 
@@ -140,14 +137,14 @@ LLFloaterGodTools::LLFloaterGodTools()
 // static
 void* LLFloaterGodTools::createPanelGrid(void *userdata)
 {
-	return new LLPanelGridTools("grid");
+	return new LLPanelGridTools();
 }
 
 // static
 void* LLFloaterGodTools::createPanelRegion(void *userdata)
 {
 	LLFloaterGodTools* self = (LLFloaterGodTools*)userdata;
-	self->mPanelRegionTools = new LLPanelRegionTools("region");
+	self->mPanelRegionTools = new LLPanelRegionTools();
 	return self->mPanelRegionTools;
 }
 
@@ -155,20 +152,24 @@ void* LLFloaterGodTools::createPanelRegion(void *userdata)
 void* LLFloaterGodTools::createPanelObjects(void *userdata)
 {
 	LLFloaterGodTools* self = (LLFloaterGodTools*)userdata;
-	self->mPanelObjectTools = new LLPanelObjectTools("objects");
+	self->mPanelObjectTools = new LLPanelObjectTools();
 	return self->mPanelObjectTools;
 }
 
 // static
 void* LLFloaterGodTools::createPanelRequest(void *userdata)
 {
-	return new LLPanelRequestTools("region");
+	return new LLPanelRequestTools();
 }
 
 LLFloaterGodTools::~LLFloaterGodTools()
 {
 	// children automatically deleted
 }
+BOOL LLFloaterGodTools::postBuild()
+{
+	return TRUE;
+}
 
 U32 LLFloaterGodTools::computeRegionFlags() const
 {
@@ -186,9 +187,9 @@ void LLFloaterGodTools::updatePopup(LLCoordGL center, MASK mask)
 // virtual
 void LLFloaterGodTools::onClose(bool app_quitting)
 {
-	if (sGodTools)
+	if (getInstance())
 	{
-		sGodTools->setVisible(FALSE);
+		getInstance()->setVisible(FALSE);
 	}
 }
 
@@ -209,42 +210,15 @@ void LLFloaterGodTools::draw()
 	LLFloater::draw();
 }
 
-// static
-void LLFloaterGodTools::show(void *)
-{
-	LLFloaterGodTools* god_tools = instance();
-	god_tools->open();
-	LLPanel *panel = god_tools->childGetVisibleTab("GodTools Tabs");
-	if (panel) panel->setFocus(TRUE);
-	if (god_tools->mPanelObjectTools) god_tools->mPanelObjectTools->setTargetAvatar(LLUUID::null);
-
-	if (gAgent.getRegionHost() != god_tools->mCurrentHost)
-	{
-		// we're in a new region
-		god_tools->sendRegionInfoRequest();
-	}
-}
-
 void LLFloaterGodTools::showPanel(const std::string& panel_name)
 {
 	childShowTab("GodTools Tabs", panel_name);
-	open();	/*Flawfinder: ignore*/
+	openFloater();
 	LLPanel *panel = childGetVisibleTab("GodTools Tabs");
-	if (panel) panel->setFocus(TRUE);
-}
-
-
-// static
-void LLFloaterGodTools::onTabChanged(void* data, bool from_click)
-{
-	LLPanel* panel = (LLPanel*)data;
 	if (panel)
-	{
 		panel->setFocus(TRUE);
-	}
 }
 
-
 // static
 void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
 {
@@ -299,14 +273,14 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
 	}
 
 	// push values to god tools, if available
-	if (sGodTools 
-		&& sGodTools->mPanelRegionTools
-		&& sGodTools->mPanelObjectTools
-		&& msg
-		&& gAgent.isGodlike())
+	if ( gAgent.isGodlike()
+		&& instanceVisible()
+		&& getInstance()->mPanelRegionTools
+		&& getInstance()->mPanelObjectTools
+		&& msg )
 	{
-		LLPanelRegionTools* rtool = sGodTools->mPanelRegionTools;
-		sGodTools->mCurrentHost = host;
+		LLPanelRegionTools* rtool = getInstance()->mPanelRegionTools;
+		getInstance()->mCurrentHost = host;
 
 		// store locally
 		rtool->setSimName(sim_name);
@@ -319,7 +293,7 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
 		rtool->setRedirectGridY(redirect_grid_y);
 		rtool->enableAllWidgets();
 
-		LLPanelObjectTools *otool = sGodTools->mPanelObjectTools;
+		LLPanelObjectTools *otool = getInstance()->mPanelObjectTools;
 		otool->setCheckFlags(region_flags);
 		otool->enableAllWidgets();
 
@@ -364,12 +338,12 @@ void LLFloaterGodTools::sendGodUpdateRegionInfo()
 {
 	LLViewerRegion *regionp = gAgent.getRegion();
 	if (gAgent.isGodlike()
-		&& sGodTools->mPanelRegionTools
+		&& getInstance()->mPanelRegionTools
 		&& regionp
 		&& gAgent.getRegionHost() == mCurrentHost)
 	{
 		LLMessageSystem *msg = gMessageSystem;
-		LLPanelRegionTools *rtool = sGodTools->mPanelRegionTools;
+		LLPanelRegionTools *rtool = getInstance()->mPanelRegionTools;
 
 		msg->newMessage("GodUpdateRegionInfo");
 		msg->nextBlockFast(_PREHASH_AgentData);
@@ -426,15 +400,15 @@ const F32 PRICE_PER_METER_MIN = 0.f;
 const F32 PRICE_PER_METER_MAX = 100.f;
 
 
-LLPanelRegionTools::LLPanelRegionTools(const std::string& title)
-: 	LLPanel(title)
+LLPanelRegionTools::LLPanelRegionTools()
+: 	LLPanel()
 {
 }
 
 BOOL LLPanelRegionTools::postBuild()
 {
 	childSetCommitCallback("region name", onChangeAnything, this);
-	childSetKeystrokeCallback("region name", onChangeSimName, this);
+	getChild<LLLineEditor>("region name")->setKeystrokeCallback(onChangeSimName, this);
 	childSetPrevalidate("region name", &LLLineEditor::prevalidatePrintableNotPipe);
 
 	childSetCommitCallback("check prelude", onChangePrelude, this);
@@ -768,9 +742,7 @@ void LLPanelRegionTools::setPricePerMeter(S32 price)
 // static
 void LLPanelRegionTools::onChangeAnything(LLUICtrl* ctrl, void* userdata)
 {
-	if (sGodTools 
-		&& userdata
-		&& gAgent.isGodlike())
+	if (userdata && gAgent.isGodlike())
 	{
 		LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
 		region_tools->childEnable("Apply");
@@ -794,9 +766,7 @@ void LLPanelRegionTools::onChangePrelude(LLUICtrl* ctrl, void* data)
 // static
 void LLPanelRegionTools::onChangeSimName(LLLineEditor* caller, void* userdata )
 {
-	if (sGodTools 
-		&& userdata
-		&& gAgent.isGodlike())
+	if (userdata && gAgent.isGodlike())
 	{
 		LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
 		region_tools->childEnable("Apply");
@@ -807,11 +777,9 @@ void LLPanelRegionTools::onChangeSimName(LLLineEditor* caller, void* userdata )
 void LLPanelRegionTools::onRefresh(void* userdata)
 {
 	LLViewerRegion *region = gAgent.getRegion();
-	if (region 
-		&& sGodTools 
-		&& gAgent.isGodlike())
+	if (region && gAgent.isGodlike())
 	{
-		sGodTools->sendRegionInfoRequest();
+		LLFloaterGodTools::getInstance()->sendRegionInfoRequest();
 	}
 }
 
@@ -819,15 +787,12 @@ void LLPanelRegionTools::onRefresh(void* userdata)
 void LLPanelRegionTools::onApplyChanges(void* userdata)
 {
 	LLViewerRegion *region = gAgent.getRegion();
-	if (region 
-		&& sGodTools 
-		&& userdata
-		&& gAgent.isGodlike())
+	if (region && userdata && gAgent.isGodlike())
 	{
 		LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
 
 		region_tools->childDisable("Apply");
-		sGodTools->sendGodUpdateRegionInfo();
+		LLFloaterGodTools::getInstance()->sendGodUpdateRegionInfo();
 	}
 }
 
@@ -890,11 +855,10 @@ void LLPanelRegionTools::onSelectRegion(void* userdata)
 //      LEFT                             R2       RIGHT
 
 const F32 HOURS_TO_RADIANS = (2.f*F_PI)/24.f;
-const char FLOATER_GRID_ADMIN_TITLE[] = "Grid Administration";
 
 
-LLPanelGridTools::LLPanelGridTools(const std::string& name) :
-	LLPanel(name)
+LLPanelGridTools::LLPanelGridTools() :
+	LLPanel()
 {
 }
 
@@ -919,10 +883,6 @@ void LLPanelGridTools::refresh()
 // static
 void LLPanelGridTools::onClickKickAll(void* userdata)
 {
-	S32 left, top;
-	gFloaterView->getNewFloaterPosition(&left, &top);
-	LLRect rect(left, top, left+400, top-300);
-
 	LLNotifications::instance().add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick);
 }
 
@@ -1017,8 +977,9 @@ bool LLPanelGridTools::flushMapVisibilityCachesConfirm(const LLSD& notification,
 //      LEFT                                      RIGHT
 
 // Default constructor
-LLPanelObjectTools::LLPanelObjectTools(const std::string& title) 
-: 	LLPanel(title), mTargetAvatar()
+LLPanelObjectTools::LLPanelObjectTools() 
+	: 	LLPanel(),
+		mTargetAvatar()
 {
 }
 
@@ -1054,7 +1015,7 @@ void LLPanelObjectTools::setTargetAvatar(const LLUUID &target_id)
 	mTargetAvatar = target_id;
 	if (target_id.isNull())
 	{
-		childSetValue("target_avatar_name", "(no target)");
+		childSetValue("target_avatar_name", getString("no_target"));
 	}
 } 
 
@@ -1137,8 +1098,7 @@ void LLPanelObjectTools::enableAllWidgets()
 // static
 void LLPanelObjectTools::onGetTopColliders(void* userdata)
 {
-	if (sGodTools 
-		&& gAgent.isGodlike())
+	if (gAgent.isGodlike())
 	{
 		LLFloaterTopObjects::show();
 		LLFloaterTopObjects::setMode(STAT_REPORT_TOP_COLLIDERS);
@@ -1149,8 +1109,7 @@ void LLPanelObjectTools::onGetTopColliders(void* userdata)
 // static
 void LLPanelObjectTools::onGetTopScripts(void* userdata)
 {
-	if (sGodTools 
-		&& gAgent.isGodlike()) 
+	if (gAgent.isGodlike()) 
 	{
 		LLFloaterTopObjects::show();
 		LLFloaterTopObjects::setMode(STAT_REPORT_TOP_SCRIPTS);
@@ -1161,8 +1120,7 @@ void LLPanelObjectTools::onGetTopScripts(void* userdata)
 // static
 void LLPanelObjectTools::onGetScriptDigest(void* userdata)
 {
-	if (sGodTools 
-		&& gAgent.isGodlike())
+	if (gAgent.isGodlike())
 	{
 		// get the list of scripts and number of occurences of each
 		// (useful for finding self-replicating objects)
@@ -1272,7 +1230,10 @@ void LLPanelObjectTools::onClickSetBySelection(void* data)
 	LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
 
 	panelp->mTargetAvatar = owner_id;
-	std::string name = "Object " + node->mName + " owned by " + owner_name;
+	LLStringUtil::format_map_t args;
+	args["[OBJECT]"] = node->mName;
+	args["[OWNER]"] = owner_name;
+	std::string name = LLTrans::getString("GodToolsObjectOwnedBy", args);
 	panelp->childSetValue("target_avatar_name", name);
 }
 
@@ -1290,9 +1251,7 @@ void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names,
 // static
 void LLPanelObjectTools::onChangeAnything(LLUICtrl* ctrl, void* userdata)
 {
-	if (sGodTools 
-		&& userdata
-		&& gAgent.isGodlike())
+	if (userdata && gAgent.isGodlike())
 	{
 		LLPanelObjectTools* object_tools = (LLPanelObjectTools*) userdata;
 		object_tools->childEnable("Apply");
@@ -1303,16 +1262,13 @@ void LLPanelObjectTools::onChangeAnything(LLUICtrl* ctrl, void* userdata)
 void LLPanelObjectTools::onApplyChanges(void* userdata)
 {
 	LLViewerRegion *region = gAgent.getRegion();
-	if (region 
-		&& sGodTools 
-		&& userdata
-		&& gAgent.isGodlike())
+	if (region && gAgent.isGodlike())
 	{
 		LLPanelObjectTools* object_tools = (LLPanelObjectTools*) userdata;
 		// TODO -- implement this
 
 		object_tools->childDisable("Apply");
-		sGodTools->sendGodUpdateRegionInfo();
+		LLFloaterGodTools::getInstance()->sendGodUpdateRegionInfo();
 	}
 }
 
@@ -1324,8 +1280,8 @@ void LLPanelObjectTools::onApplyChanges(void* userdata)
 const std::string SELECTION = "Selection";
 const std::string AGENT_REGION = "Agent Region";
 
-LLPanelRequestTools::LLPanelRequestTools(const std::string& name):
-	LLPanel(name)
+LLPanelRequestTools::LLPanelRequestTools():
+	LLPanel()
 {
 }
 
@@ -1348,9 +1304,13 @@ void LLPanelRequestTools::refresh()
 	LLCtrlListInterface *list = childGetListInterface("destination");
 	if (!list) return;
 
-	list->operateOnAll(LLCtrlListInterface::OP_DELETE);
-	list->addSimpleElement(SELECTION);
-	list->addSimpleElement(AGENT_REGION);
+	S32 last_item = list->getItemCount();
+
+	if (last_item >=3)
+	{
+	list->selectItemRange(2,last_item);
+	list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
+	}
 	for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
 		 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
 	{
@@ -1367,7 +1327,7 @@ void LLPanelRequestTools::refresh()
 	}
 	else
 	{
-		list->selectByValue(SELECTION);
+		list->operateOnSelection(LLCtrlListInterface::OP_DESELECT);
 	}
 }
 
diff --git a/indra/newview/llfloatergodtools.h b/indra/newview/llfloatergodtools.h
index 75813ca886..6c4b438808 100644
--- a/indra/newview/llfloatergodtools.h
+++ b/indra/newview/llfloatergodtools.h
@@ -57,12 +57,11 @@ class LLTextBox;
 class LLMessageSystem;
 
 class LLFloaterGodTools
-: public LLFloater
+	: public LLFloater, public LLFloaterSingleton<LLFloaterGodTools>
 {
+	friend class LLUISingleton<LLFloaterGodTools, VisibilityPolicy<LLFloater> >;
 public:
 
-	static LLFloaterGodTools* instance();
-
 	enum EGodPanel
 	{
 		PANEL_GRID,
@@ -72,9 +71,6 @@ public:
 		PANEL_COUNT
 	};
 
-	static void show(void *);
-	static void hide(void *);
-
 	static void* createPanelGrid(void *userdata);
 	static void* createPanelRegion(void *userdata);
 	static void* createPanelObjects(void *userdata);
@@ -84,6 +80,7 @@ public:
 
 	void showPanel(const std::string& panel_name);
 
+	virtual void onOpen(const LLSD& key);
 	virtual void onClose(bool app_quitting);
 
 	virtual void draw();
@@ -101,21 +98,17 @@ public:
 	// Send possibly changed values to simulator.
 	void sendGodUpdateRegionInfo();
 
-	static void onTabChanged(void *data, bool from_click);
-
 protected:
 	U32 computeRegionFlags() const;
 
 protected:
-	LLFloaterGodTools();
+	LLFloaterGodTools(const LLSD& key);
 	~LLFloaterGodTools();
-
+	/*virtual*/	BOOL	postBuild();
 	// When the floater is going away, reset any options that need to be 
 	// cleared.
 	void resetToolState();
 
-	static LLFloaterGodTools* sInstance;
-
 public:
 	LLPanelRegionTools 	*mPanelRegionTools;
 	LLPanelObjectTools	*mPanelObjectTools;
@@ -133,7 +126,7 @@ class LLPanelRegionTools
 : public LLPanel
 {
 public:
-	LLPanelRegionTools(const std::string& name);
+	LLPanelRegionTools();
 	/*virtual*/ ~LLPanelRegionTools();
 
 	BOOL postBuild();
@@ -194,7 +187,7 @@ class LLPanelGridTools
 : public LLPanel
 {
 public:
-	LLPanelGridTools(const std::string& name);
+	LLPanelGridTools();
 	virtual ~LLPanelGridTools();
 
 	BOOL postBuild();
@@ -221,7 +214,7 @@ class LLPanelObjectTools
 : public LLPanel
 {
 public:
-	LLPanelObjectTools(const std::string& name);
+	LLPanelObjectTools();
 	/*virtual*/ ~LLPanelObjectTools();
 
 	BOOL postBuild();
@@ -262,7 +255,7 @@ protected:
 class LLPanelRequestTools : public LLPanel
 {
 public:
-	LLPanelRequestTools(const std::string& name);
+	LLPanelRequestTools();
 	/*virtual*/ ~LLPanelRequestTools();
 
 	BOOL postBuild();
diff --git a/indra/newview/llfloatergroupinvite.cpp b/indra/newview/llfloatergroupinvite.cpp
index 08a6269a04..e8a0973ced 100644
--- a/indra/newview/llfloatergroupinvite.cpp
+++ b/indra/newview/llfloatergroupinvite.cpp
@@ -34,9 +34,8 @@
 
 #include "llfloatergroupinvite.h"
 #include "llpanelgroupinvite.h"
-
-const char FLOATER_TITLE[] = "Group Invitation";
-const LLRect FGI_RECT(0, 380, 210, 0);
+#include "lltrans.h"
+#include "lldraghandle.h"
 
 class LLFloaterGroupInvite::impl
 {
@@ -73,25 +72,26 @@ void LLFloaterGroupInvite::impl::closeFloater(void* data)
 {
 	LLFloaterGroupInvite* floaterp = (LLFloaterGroupInvite*) data;
 
-	if ( floaterp ) floaterp->close();
+	if ( floaterp ) floaterp->closeFloater();
 }
 
 //-----------------------------------------------------------------------------
 // Implementation
 //-----------------------------------------------------------------------------
-LLFloaterGroupInvite::LLFloaterGroupInvite(const std::string& name,
-										   const LLRect &rect,
-										   const std::string& title,
-										   const LLUUID& group_id)
-:	LLFloater(name, rect, title)
+LLFloaterGroupInvite::LLFloaterGroupInvite(const LLUUID& group_id)
+:	LLFloater()
 {
-	LLRect contents(getRect());
-	contents.mTop -= LLFLOATER_HEADER_SIZE;
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+	LLRect contents;
 
 	mImpl = new impl(group_id);
 
-	mImpl->mInvitePanelp = new LLPanelGroupInvite("Group Invite Panel",
-												  group_id);
+	mImpl->mInvitePanelp = new LLPanelGroupInvite(group_id);
+
+	contents = mImpl->mInvitePanelp->getRect();
+	contents.mTop -= floater_header_size;
+
+	setTitle (LLTrans::getString("GroupInvitation"));
 
 	mImpl->mInvitePanelp->setCloseCallback(impl::closeFloater, this);
 
@@ -114,6 +114,9 @@ LLFloaterGroupInvite::~LLFloaterGroupInvite()
 // static
 void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUUID> *agent_ids)
 {
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+	LLRect contents;
+
 	// Make sure group_id isn't null
 	if (group_id.isNull())
 	{
@@ -127,10 +130,12 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUU
 											 (LLFloaterGroupInvite*)NULL);
 	if (!fgi)
 	{
-		fgi = new LLFloaterGroupInvite("groupinfo",
-									   FGI_RECT,
-									   FLOATER_TITLE,
-									   group_id);
+		fgi = new LLFloaterGroupInvite(group_id);
+		contents = fgi->mImpl->mInvitePanelp->getRect();
+		contents.mTop += floater_header_size;
+		fgi->setRect(contents);
+		fgi->getDragHandle()->setRect(contents);
+		fgi->getDragHandle()->setTitle(LLTrans::getString("GroupInvitation"));
 
 		impl::sInstances[group_id] = fgi;
 
@@ -143,6 +148,6 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUU
 	}
 	
 	fgi->center();
-	fgi->open();	/*Flawfinder: ignore*/
+	fgi->openFloater();
 	fgi->mImpl->mInvitePanelp->update();
 }
diff --git a/indra/newview/llfloatergroupinvite.h b/indra/newview/llfloatergroupinvite.h
index d1485ead91..b3f5d75ac1 100644
--- a/indra/newview/llfloatergroupinvite.h
+++ b/indra/newview/llfloatergroupinvite.h
@@ -46,10 +46,7 @@ public:
 	static void showForGroup(const LLUUID &group_id, std::vector<LLUUID> *agent_ids = NULL);
 
 protected:
-	LLFloaterGroupInvite(const std::string& name,
-						 const LLRect &rect,
-						 const std::string& title,
-						 const LLUUID& group_id = LLUUID::null);
+	LLFloaterGroupInvite(const LLUUID& group_id = LLUUID::null);
 
 	class impl;
 	impl* mImpl;
diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp
index 8cd7297447..011774fa5e 100644
--- a/indra/newview/llfloatergroups.cpp
+++ b/indra/newview/llfloatergroups.cpp
@@ -46,6 +46,7 @@
 
 #include "llagent.h"
 #include "llbutton.h"
+#include "llfloaterreg.h"
 #include "llfloatergroupinfo.h"
 #include "llfloaterdirectory.h"
 #include "llfocusmgr.h"
@@ -56,6 +57,7 @@
 #include "lluictrlfactory.h"
 #include "llviewerwindow.h"
 #include "llimview.h"
+#include "lltrans.h"
 
 // static
 std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
@@ -82,17 +84,16 @@ LLFloaterGroupPicker* LLFloaterGroupPicker::findInstance(const LLSD& seed)
 LLFloaterGroupPicker* LLFloaterGroupPicker::createInstance(const LLSD &seed)
 {
 	LLFloaterGroupPicker* pickerp = new LLFloaterGroupPicker(seed);
-	LLUICtrlFactory::getInstance()->buildFloater(pickerp, "floater_choose_group.xml");
 	return pickerp;
 }
 
-LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) : 
-	mSelectCallback(NULL),
-	mCallbackUserdata(NULL),
+LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed)
+: 	LLFloater(),
 	mPowersMask(GP_ALL_POWERS)
 {
 	mID = seed.asUUID();
 	sInstances.insert(std::make_pair(mID, this));
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_choose_group.xml");
 }
 
 LLFloaterGroupPicker::~LLFloaterGroupPicker()
@@ -100,13 +101,6 @@ LLFloaterGroupPicker::~LLFloaterGroupPicker()
 	sInstances.erase(mID);
 }
 
-void LLFloaterGroupPicker::setSelectCallback(void (*callback)(LLUUID, void*), 
-									void* userdata)
-{
-	mSelectCallback = callback;
-	mCallbackUserdata = userdata;
-}
-
 void LLFloaterGroupPicker::setPowersMask(U64 powers_mask)
 {
 	mPowersMask = powers_mask;
@@ -124,8 +118,7 @@ BOOL LLFloaterGroupPicker::postBuild()
 
 	setDefaultBtn("OK");
 
-	childSetDoubleClickCallback("group list", onBtnOK);
-	childSetUserData("group list", this);
+	getChild<LLScrollListCtrl>("group list")->setDoubleClickCallback(onBtnOK, this);
 
 	childEnable("OK");
 
@@ -141,7 +134,7 @@ void LLFloaterGroupPicker::onBtnOK(void* userdata)
 void LLFloaterGroupPicker::onBtnCancel(void* userdata)
 {
 	LLFloaterGroupPicker* self = (LLFloaterGroupPicker*)userdata;
-	if(self) self->close();
+	if(self) self->closeFloater();
 }
 
 
@@ -153,12 +146,9 @@ void LLFloaterGroupPicker::ok()
 	{
 		group_id = group_list->getCurrentID();
 	}
-	if(mSelectCallback)
-	{
-		mSelectCallback(group_id, mCallbackUserdata);
-	}
+	mGroupSelectSignal(group_id);
 
-	close();
+	closeFloater();
 }
 
 ///----------------------------------------------------------------------------
@@ -227,8 +217,7 @@ BOOL LLPanelGroups::postBuild()
 
 	setDefaultBtn("IM");
 
-	childSetDoubleClickCallback("group list", onBtnIM);
-	childSetUserData("group list", this);
+	getChild<LLScrollListCtrl>("group list")->setDoubleClickCallback(onBtnIM, this);
 
 	reset();
 
@@ -357,7 +346,6 @@ void LLPanelGroups::startIM()
 		LLGroupData group_data;
 		if (gAgent.getGroupData(group_id, group_data))
 		{
-			gIMMgr->setFloaterOpen(TRUE);
 			gIMMgr->addSession(
 				group_data.mName,
 				IM_SESSION_GROUP_START,
@@ -400,7 +388,7 @@ void LLPanelGroups::leave()
 
 void LLPanelGroups::search()
 {
-	LLFloaterDirectory::showGroups();
+	LLFloaterReg::showInstance("search", LLSD().insert("panel", "group"));
 }
 
 // static
@@ -454,7 +442,7 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 pow
 			element["columns"][0]["column"] = "name";
 			element["columns"][0]["value"] = group_datap->mName;
 			element["columns"][0]["font"] = "SANSSERIF";
-			element["columns"][0]["font-style"] = style;
+			element["columns"][0]["font"]["style"] = style;
 
 			group_list->addElement(element, ADD_SORTED);
 		}
@@ -470,9 +458,9 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 pow
 		LLSD element;
 		element["id"] = LLUUID::null;
 		element["columns"][0]["column"] = "name";
-		element["columns"][0]["value"] = "none"; // *TODO: Translate
+		element["columns"][0]["value"] = LLTrans::getString("GroupsNone");
 		element["columns"][0]["font"] = "SANSSERIF";
-		element["columns"][0]["font-style"] = style;
+		element["columns"][0]["font"]["style"] = style;
 
 		group_list->addElement(element, ADD_TOP);
 	}
diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h
index da1c4e23dd..b30d40581f 100644
--- a/indra/newview/llfloatergroups.h
+++ b/indra/newview/llfloatergroups.h
@@ -47,6 +47,8 @@
 #include "lluuid.h"
 #include "llfloater.h"
 #include <map>
+#include <boost/function.hpp>
+#include <boost/signal.hpp>
 
 class LLUICtrl;
 class LLTextBox;
@@ -59,8 +61,10 @@ class LLFloaterGroupPicker : public LLFloater, public LLUIFactory<LLFloaterGroup
 	friend class LLUIFactory<LLFloaterGroupPicker>;
 public:
 	~LLFloaterGroupPicker();
-	void setSelectCallback( void (*callback)(LLUUID, void*), 
-							void* userdata);
+	
+	// Note: Don't return connection; use boost::bind + boost::signal::trackable to disconnect slots
+	typedef boost::signal<void (LLUUID id)> signal_t;	
+	void setSelectGroupCallback(const signal_t::slot_type& cb) { mGroupSelectSignal.connect(cb); }
 	void setPowersMask(U64 powers_mask);
 	BOOL postBuild();
 
@@ -77,8 +81,7 @@ protected:
 protected:
 	LLUUID mID;
 	U64 mPowersMask;
-	void (*mSelectCallback)(LLUUID id, void* userdata);
-	void* mCallbackUserdata;
+	signal_t mGroupSelectSignal;
 
 	typedef std::map<const LLUUID, LLFloaterGroupPicker*> instance_map_t;
 	static instance_map_t sInstances;
diff --git a/indra/newview/llfloaterhandler.cpp b/indra/newview/llfloaterhandler.cpp
index f4c7e43a7d..f229d30488 100644
--- a/indra/newview/llfloaterhandler.cpp
+++ b/indra/newview/llfloaterhandler.cpp
@@ -70,7 +70,7 @@ bool LLFloaterHandler::handle(const LLSD &params, const LLSD &query_map, LLWebBr
 	{
 		if (floater)
 		{
-			floater->close();
+			floater->closeFloater();
 			return true;
 		}
 	}
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index 7886e394a3..38915ebff9 100644
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -33,27 +33,28 @@
 #include "llviewerprecompiledheaders.h"
 
 #include "llfloaterhardwaresettings.h"
+
+// Viewer includes
 #include "llfloaterpreference.h"
 #include "llviewerwindow.h"
 #include "llviewercontrol.h"
 #include "llviewerimagelist.h"
 #include "llfeaturemanager.h"
 #include "llstartup.h"
+#include "pipeline.h"
 
+// Linden library includes
 #include "llradiogroup.h"
 #include "lluictrlfactory.h"
-
+#include "llwindow.h"
 #include "llimagegl.h"
-#include "pipeline.h"
 
 LLFloaterHardwareSettings* LLFloaterHardwareSettings::sHardwareSettings = NULL;
 
-LLFloaterHardwareSettings::LLFloaterHardwareSettings() : LLFloater(std::string("Hardware Settings Floater"))
+LLFloaterHardwareSettings::LLFloaterHardwareSettings()
+  : LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hardware_settings.xml");
-	
-	// load it up
-	initCallbacks();
 }
 
 LLFloaterHardwareSettings::~LLFloaterHardwareSettings()
@@ -114,7 +115,7 @@ LLFloaterHardwareSettings* LLFloaterHardwareSettings::instance()
 	if (!sHardwareSettings)
 	{
 		sHardwareSettings = new LLFloaterHardwareSettings();
-		sHardwareSettings->close();
+		sHardwareSettings->closeFloater();
 	}
 	return sHardwareSettings;
 }
@@ -128,7 +129,7 @@ void LLFloaterHardwareSettings::show()
 	//LLUICtrlFactory::getInstance()->buildFloater(hardSettings, "floater_hardware_settings.xml");
 	//hardSettings->initCallbacks();
 
-	hardSettings->open();
+	hardSettings->openFloater();
 }
 
 bool LLFloaterHardwareSettings::isOpen()
@@ -158,6 +159,8 @@ BOOL LLFloaterHardwareSettings::postBuild()
 
 	refresh();
 
+	// load it up
+	initCallbacks();
 	return TRUE;
 }
 
@@ -203,7 +206,7 @@ void LLFloaterHardwareSettings::cancel()
 	gSavedSettings.setF32("RenderFogRatio", mFogRatio);
 	gSavedSettings.setBOOL("ProbeHardwareOnStartup", mProbeHardwareOnStartup );
 
-	close();
+	closeFloater();
 }
 
 // static 
@@ -211,6 +214,6 @@ void LLFloaterHardwareSettings::onBtnOK( void* userdata )
 {
 	LLFloaterHardwareSettings *fp =(LLFloaterHardwareSettings *)userdata;
 	fp->apply();
-	fp->close(false);
+	fp->closeFloater(false);
 }
 
diff --git a/indra/newview/llfloaterhardwaresettings.h b/indra/newview/llfloaterhardwaresettings.h
index 04a33f69dc..70344c11d1 100644
--- a/indra/newview/llfloaterhardwaresettings.h
+++ b/indra/newview/llfloaterhardwaresettings.h
@@ -40,14 +40,14 @@ class LLSliderCtrl;
 /// Menuing system for all of windlight's functionality
 class LLFloaterHardwareSettings : public LLFloater
 {
-	friend class LLPreferenceCore;
+	friend class LLFloaterPreference;
 
 public:
 
 	LLFloaterHardwareSettings();
-	virtual ~LLFloaterHardwareSettings();
+	/*virtual*/ ~LLFloaterHardwareSettings();
 	
-	virtual BOOL postBuild();
+	/*virtual*/ BOOL postBuild();
 
 	/// initialize all the callbacks for the menu
 	void initCallbacks(void);
diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp
index 9810bf1009..4379d25a66 100644
--- a/indra/newview/llfloaterhud.cpp
+++ b/indra/newview/llfloaterhud.cpp
@@ -52,7 +52,7 @@ LLFloaterHUD* LLFloaterHUD::sInstance = 0;
 
 // Default constructor
 LLFloaterHUD::LLFloaterHUD()
-:	LLFloater(std::string("floater_hud")),
+:	LLFloater(),
 	mWebBrowser(0)
 {
 	// Create floater from its XML definition
@@ -69,11 +69,6 @@ LLFloaterHUD::LLFloaterHUD()
 	// Opaque background since we never get the focus
 	setBackgroundOpaque(TRUE);
 
-	// Position floater based on saved location
-	LLRect saved_position_rect = gSavedSettings.getRect("FloaterHUDRect2");
-	reshape(saved_position_rect.getWidth(), saved_position_rect.getHeight(), FALSE);
-	setRect(saved_position_rect);
-	
 	mWebBrowser = getChild<LLWebBrowserCtrl>("floater_hud_browser" );
 	if (mWebBrowser)
 	{
@@ -91,9 +86,6 @@ LLFloaterHUD::LLFloaterHUD()
 		std::string url = base_url + language + "/";
 		mWebBrowser->navigateTo(url);
 	}
-
-	// Remember the one instance
-	sInstance = this;
 }
 
 // Get the instance
@@ -101,7 +93,7 @@ LLFloaterHUD* LLFloaterHUD::getInstance()
 {
 	if (!sInstance)
 	{
-		new LLFloaterHUD();
+		sInstance = new LLFloaterHUD();
 	}
 	return sInstance;
 }
@@ -109,9 +101,6 @@ LLFloaterHUD* LLFloaterHUD::getInstance()
 // Destructor
 LLFloaterHUD::~LLFloaterHUD()
 {
-	// Save floater position
-	gSavedSettings.setRect("FloaterHUDRect2", getRect() );
-
 	// Clear out the one instance if it's ours
 	if (sInstance == this)
 	{
@@ -131,7 +120,7 @@ void LLFloaterHUD::showHUD()
 
 	// Create the instance if necessary
 	LLFloaterHUD* hud = getInstance();
-	hud->open();
+	hud->openFloater();
 	hud->setFrontmost(FALSE);
 }
 
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index de8a094fa9..14d664ff9d 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -31,11 +31,15 @@
  */
 
 #include "llviewerprecompiledheaders.h"
-#include "llfloateravatarinfo.h"
+
 #include "llfloaterinspect.h"
+
+#include "llfloaterreg.h"
+#include "llfloateravatarinfo.h"
 #include "llfloatertools.h"
 #include "llcachename.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
 #include "llselectmgr.h"
 #include "lltoolcomp.h"
 #include "lltoolmgr.h"
@@ -45,17 +49,16 @@
 
 LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
 
-LLFloaterInspect::LLFloaterInspect(void) :
-	LLFloater(std::string("Inspect Object")),
+LLFloaterInspect::LLFloaterInspect(void)
+  : LLFloater(),
 	mDirty(FALSE)
 {
-	sInstance = this;
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inspect.xml");
 }
 
 LLFloaterInspect::~LLFloaterInspect(void)
 {
-	if(!gFloaterTools->getVisible())
+	if(!LLFloaterReg::instanceVisible("build"))
 	{
 		if(LLToolMgr::getInstance()->getBaseTool() == LLToolCompInspect::getInstance())
 		{
@@ -66,7 +69,7 @@ LLFloaterInspect::~LLFloaterInspect(void)
 	}
 	else
 	{
-		gFloaterTools->setFocus(TRUE);
+		LLFloaterReg::showInstance("build", LLSD(), TRUE);
 	}
 	sInstance = NULL;
 }
@@ -88,7 +91,7 @@ void LLFloaterInspect::show(void* ignored)
 		sInstance = new LLFloaterInspect;
 	}
 
-	sInstance->open();
+	sInstance->openFloater();
 	LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance());
 	LLSelectMgr::getInstance()->setForceSelection(forcesel);	// restore previouis value
 
@@ -156,7 +159,7 @@ BOOL LLFloaterInspect::postBuild()
 	mObjectList = getChild<LLScrollListCtrl>("object_list");
 	childSetAction("button owner",onClickOwnerProfile, this);
 	childSetAction("button creator",onClickCreatorProfile, this);
-	childSetCommitCallback("object_list", onSelectObject);
+	childSetCommitCallback("object_list", onSelectObject, NULL);
 	return TRUE;
 }
 
@@ -212,7 +215,6 @@ void LLFloaterInspect::refresh()
 	{
 		LLSelectNode* obj = *iter;
 		LLSD row;
-		char time[MAX_STRING];
 		std::string owner_name, creator_name;
 
 		if (obj->mCreationDate == 0)
@@ -221,8 +223,11 @@ void LLFloaterInspect::refresh()
 		}
 
 		time_t timestamp = (time_t) (obj->mCreationDate/1000000);
-		LLStringUtil::copy(time, ctime(&timestamp), MAX_STRING);
-		time[24] = '\0';
+		std::string timeStr = getString("timeStamp");
+		LLSD substitution;
+		substitution["datetime"] = (S32) timestamp;
+		LLStringUtil::format (timeStr, substitution);
+
 		gCacheName->getFullName(obj->mPermissions->getOwner(), owner_name);
 		gCacheName->getFullName(obj->mPermissions->getCreator(), creator_name);
 		row["id"] = obj->getObject()->getID();
@@ -246,7 +251,7 @@ void LLFloaterInspect::refresh()
 		row["columns"][2]["value"] = creator_name;
 		row["columns"][3]["column"] = "creation_date";
 		row["columns"][3]["type"] = "text";
-		row["columns"][3]["value"] = time;
+		row["columns"][3]["value"] = timeStr;
 		mObjectList->addElement(row, ADD_TOP);
 	}
 	if(selected_index > -1 && mObjectList->getItemIndex(selected_uuid) == selected_index)
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index e5811671ed..c73218cd0f 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -48,10 +48,10 @@
 #include "llcheckboxctrl.h"
 
 LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
-	: LLFloater("floater_joystick")
+	: LLFloater()
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_joystick.xml");
-	center();
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_joystick.xml");
+
 }
 
 void LLFloaterJoystick::draw()
@@ -68,14 +68,15 @@ void LLFloaterJoystick::draw()
 	{
 		F32 value = joystick->getJoystickAxis(i);
 		mAxisStats[i]->addValue(value * gFrameIntervalSeconds);
-		
-		if (mAxisStatsBar[i]->mMinBar > value)
-		{
-			mAxisStatsBar[i]->mMinBar = value;
-		}
-		if (mAxisStatsBar[i]->mMaxBar < value)
+		if (mAxisStatsBar[i])
 		{
-			mAxisStatsBar[i]->mMaxBar = value;
+			F32 minbar, maxbar;
+			mAxisStatsBar[i]->getRange(minbar, maxbar);
+			if (llabs(value) > maxbar)
+			{
+				F32 range = llabs(value);
+				mAxisStatsBar[i]->setRange(-range, range, range * 0.25f, range * 0.5f);
+			}
 		}
 	}
 
@@ -84,37 +85,20 @@ void LLFloaterJoystick::draw()
 
 BOOL LLFloaterJoystick::postBuild()
 {		
-	F32 range = gSavedSettings.getBOOL("Cursor3D") ? 1024.f : 2.f;
-	LLUIString axis = getString("Axis");
-	LLUIString joystick = getString("JoystickMonitor");
-
-	// use this child to get relative positioning info; we'll place the
-	// joystick monitor on its right, vertically aligned to it.
-	LLView* child = getChild<LLView>("FlycamAxisScale1");
-	LLRect rect;
-
-	if (child)
-	{
-		LLRect r = child->getRect();
-		LLRect f = getRect();
-		rect = LLRect(350, r.mTop, r.mRight + 200, 0);
-	}
-
-	mAxisStatsView = new LLStatView("axis values", joystick, "", rect);
-	mAxisStatsView->setDisplayChildren(TRUE);
+	center();
+	F32 range = gSavedSettings.getBOOL("Cursor3D") ? 128.f : 2.f;
 
 	for (U32 i = 0; i < 6; i++)
 	{
-		axis.setArg("[NUM]", llformat("%d", i));
 		mAxisStats[i] = new LLStat(4);
-		mAxisStatsBar[i] = mAxisStatsView->addStat(axis, mAxisStats[i]);
-		mAxisStatsBar[i]->mMinBar = -range;
-		mAxisStatsBar[i]->mMaxBar = range;
-		mAxisStatsBar[i]->mLabelSpacing = range * 0.5f;
-		mAxisStatsBar[i]->mTickSpacing = range * 0.25f;			
+		std::string axisname = llformat("axis%d", i);
+		mAxisStatsBar[i] = getChild<LLStatBar>(axisname);
+		if (mAxisStatsBar[i])
+		{
+			mAxisStatsBar[i]->setStat(mAxisStats[i]);
+			mAxisStatsBar[i]->setRange(-range, range, range * 0.25f, range * 0.5f);
+		}
 	}
-
-	addChild(mAxisStatsView);
 	
 	mCheckJoystickEnabled = getChild<LLCheckBoxCtrl>("enable_joystick");
 	childSetCommitCallback("enable_joystick",onCommitJoystickEnabled,this);
@@ -310,7 +294,7 @@ void LLFloaterJoystick::onClickCancel(void *joy_panel)
 		if (self)
 		{
 			self->cancel();
-			self->close();
+			self->closeFloater();
 		}
 	}
 }
@@ -323,7 +307,7 @@ void LLFloaterJoystick::onClickOK(void *joy_panel)
 
 		if (self)
 		{
-			self->close();
+			self->closeFloater();
 		}
 	}
 }
diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h
index 3ce647e5bb..9c66b3a895 100644
--- a/indra/newview/llfloaterjoystick.h
+++ b/indra/newview/llfloaterjoystick.h
@@ -84,9 +84,8 @@ private:
 	LLCheckBoxCtrl	*mCheckFlycamEnabled;
 
 	// stats view 
-	LLStatView*		mAxisStatsView;
-	LLStat*			mAxisStats[6];
-	LLStatBar*		mAxisStatsBar[6];
+	LLStat* mAxisStats[6];
+	LLStatBar* mAxisStatsBar[6];
 };
 
 #endif
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index 91471ca2d0..5d6c06f1a6 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -51,7 +51,7 @@ const std::string LAG_WARNING_IMAGE_NAME  = "lag_status_warning.tga";
 const std::string LAG_GOOD_IMAGE_NAME     = "lag_status_good.tga";
 
 LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
-	:	LLFloater(std::string("floater_lagmeter"))
+	:	LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml");
 
@@ -59,6 +59,15 @@ LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
 	// lose arrow-key driving when testing lag.
 	setIsChrome(TRUE);
 
+	// were we shrunk last time?
+	if (gSavedSettings.getBOOL("LagMeterShrunk"))
+	{
+		onClickShrink(this);
+	}
+}
+
+BOOL LLFloaterLagMeter::postBuild()
+{
 	mClientButton = getChild<LLButton>("client_lagmeter");
 	mClientText = getChild<LLTextBox>("client_text");
 	mClientCause = getChild<LLTextBox>("client_lag_cause");
@@ -113,13 +122,8 @@ LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
 
 	childSetAction("minimize", onClickShrink, this);
 
-	// were we shrunk last time?
-	if (gSavedSettings.getBOOL("LagMeterShrunk"))
-	{
-		onClickShrink(this);
-	}
+	return TRUE;
 }
-
 LLFloaterLagMeter::~LLFloaterLagMeter()
 {
 	// save shrunk status for next time
diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h
index d9cea18305..e8af68ac7a 100644
--- a/indra/newview/llfloaterlagmeter.h
+++ b/indra/newview/llfloaterlagmeter.h
@@ -35,13 +35,15 @@
 
 #include "llfloater.h"
 
+class LLTextBox;
+
 class LLFloaterLagMeter : public LLFloater, public LLFloaterSingleton<LLFloaterLagMeter>
 {
 	friend class LLUISingleton<LLFloaterLagMeter, VisibilityPolicy<LLFloater> >;
 	
 public:
 	/*virtual*/ void draw();
-
+	/*virtual*/ BOOL postBuild();	
 private:
 	LLFloaterLagMeter(const LLSD& key);
 	/*virtual*/ ~LLFloaterLagMeter();
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 94a834502f..1de656144f 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -59,6 +59,8 @@
 #include "llpanellandmedia.h"
 #include "llradiogroup.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
 #include "llselectmgr.h"
 #include "llspinctrl.h"
 #include "lltabcontainer.h"
@@ -75,6 +77,7 @@
 #include "llviewerwindow.h"
 #include "llviewercontrol.h"
 #include "roles_constants.h"
+#include "lltrans.h"
 
 static std::string OWNER_ONLINE 	= "0";
 static std::string OWNER_OFFLINE	= "1";
@@ -161,7 +164,7 @@ void LLFloaterLand::refreshAll()
 	LLFloaterLand::getInstance()->refresh();
 }
 
-void LLFloaterLand::onOpen()
+void LLFloaterLand::onOpen(const LLSD& key)
 {
 	// Done automatically when the selected parcel's properties arrive
 	// (and hence we have the local id).
@@ -193,19 +196,16 @@ void LLFloaterLand::onClose(bool app_quitting)
 
 
 LLFloaterLand::LLFloaterLand(const LLSD& seed)
-:	LLFloater(std::string("floaterland"), std::string("FloaterLandRect5"), std::string("About Land"))
+:	LLFloater()
 {
-	LLCallbackMap::map_t factory_map;
-	factory_map["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this);
+	mFactoryMap["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this);
+	mFactoryMap["land_covenant_panel"] = LLCallbackMap(createPanelLandCovenant, this);
+	mFactoryMap["land_objects_panel"] = LLCallbackMap(createPanelLandObjects, this);
+	mFactoryMap["land_options_panel"] = LLCallbackMap(createPanelLandOptions, this);
+	mFactoryMap["land_media_panel"] =	LLCallbackMap(createPanelLandMedia, this);
+	mFactoryMap["land_access_panel"] =	LLCallbackMap(createPanelLandAccess, this);
 
-	
-	factory_map["land_covenant_panel"] = LLCallbackMap(createPanelLandCovenant, this);
-	factory_map["land_objects_panel"] = LLCallbackMap(createPanelLandObjects, this);
-	factory_map["land_options_panel"] = LLCallbackMap(createPanelLandOptions, this);
-	factory_map["land_media_panel"] =	LLCallbackMap(createPanelLandMedia, this);
-	factory_map["land_access_panel"] =	LLCallbackMap(createPanelLandAccess, this);
-
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", &factory_map, false);
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", false);
 
 	sObserver = new LLParcelSelectionObserver();
 	LLViewerParcelMgr::getInstance()->addObserver( sObserver );
@@ -297,7 +297,7 @@ void* LLFloaterLand::createPanelLandAccess(void* data)
 
 
 LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel)
-:	LLPanel(std::string("land_general_panel")),
+:	LLPanel(),
 	mUncheckedSell(FALSE),
 	mParcel(parcel)
 {
@@ -306,15 +306,13 @@ LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel)
 BOOL LLPanelLandGeneral::postBuild()
 {
 	mEditName = getChild<LLLineEditor>("Name");
-	mEditName->setCommitCallback(onCommitAny);	
+	mEditName->setCommitCallback(onCommitAny, this);	
 	childSetPrevalidate("Name", LLLineEditor::prevalidatePrintableNotPipe);
-	childSetUserData("Name", this);
 
 	mEditDesc = getChild<LLTextEditor>("Description");
 	mEditDesc->setCommitOnFocusLost(TRUE);
-	mEditDesc->setCommitCallback(onCommitAny);	
+	mEditDesc->setCommitCallback(onCommitAny, this);	
 	childSetPrevalidate("Description", LLLineEditor::prevalidatePrintableNotPipe);
-	childSetUserData("Description", this);
 
 	
 	mTextSalePending = getChild<LLTextBox>("SalePending");
@@ -333,7 +331,7 @@ BOOL LLPanelLandGeneral::postBuild()
 
 	
 	mBtnSetGroup = getChild<LLButton>("Set...");
-	mBtnSetGroup->setClickedCallback(onClickSetGroup, this);
+	mBtnSetGroup->setCommitCallback(boost::bind(&LLPanelLandGeneral::onClickSetGroup, this));
 
 	
 	mCheckDeedToGroup = getChild<LLCheckBoxCtrl>( "check deed");
@@ -396,7 +394,7 @@ BOOL LLPanelLandGeneral::postBuild()
 	mBtnReclaimLand->setClickedCallback(onClickReclaim, NULL);
 	
 	mBtnStartAuction = getChild<LLButton>("Linden Sale...");
-	mBtnStartAuction->setClickedCallback(onClickStartAuction, NULL);
+	mBtnStartAuction->setClickedCallback(onClickStartAuction, this);
 
 	return TRUE;
 }
@@ -754,16 +752,14 @@ void LLPanelLandGeneral::draw()
 	LLPanel::draw();
 }
 
-// static
-void LLPanelLandGeneral::onClickSetGroup(void* userdata)
+void LLPanelLandGeneral::onClickSetGroup()
 {
-	LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)userdata;
 	LLFloaterGroupPicker* fg;
 
-	LLFloater* parent_floater = gFloaterView->getParentFloater(panelp);
+	LLFloater* parent_floater = gFloaterView->getParentFloater(this);
 
 	fg = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
-	fg->setSelectCallback( cbGroupID, userdata );
+	fg->setSelectGroupCallback( boost::bind(&LLPanelLandGeneral::setGroup, this, _1 ));
 
 	if (parent_floater)
 	{
@@ -792,13 +788,6 @@ void LLPanelLandGeneral::onClickProfile(void* data)
 	}
 }
 
-// static
-void LLPanelLandGeneral::cbGroupID(LLUUID group_id, void* userdata)
-{
-	LLPanelLandGeneral* self = (LLPanelLandGeneral*)userdata;
-	self->setGroup(group_id);
-}
-
 // public
 void LLPanelLandGeneral::setGroup(const LLUUID& group_id)
 {
@@ -900,7 +889,7 @@ void LLPanelLandGeneral::onClickStartAuction(void* data)
 		}
 		else
 		{
-			LLFloaterAuction::show();
+			LLFloaterAuction::showInstance();
 		}
 	}
 }
@@ -974,7 +963,8 @@ void LLPanelLandGeneral::onClickStopSellLand(void* data)
 // LLPanelLandObjects
 //---------------------------------------------------------------------------
 LLPanelLandObjects::LLPanelLandObjects(LLParcelSelectionHandle& parcel)
-:	LLPanel(std::string("land_objects_panel")), mParcel(parcel)
+	:	LLPanel(),
+		mParcel(parcel)
 {
 }
 
@@ -1014,10 +1004,8 @@ BOOL LLPanelLandObjects::postBuild()
 	mCleanOtherObjectsTime = getChild<LLLineEditor>("clean other time");
 
 	mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus, this);
-	mCleanOtherObjectsTime->setCommitCallback(onCommitClean);
-
+	mCleanOtherObjectsTime->setCommitCallback(onCommitClean, this);
 	childSetPrevalidate("clean other time", LLLineEditor::prevalidateNonNegativeS32);
-	childSetUserData("clean other time", this);
 	
 	mBtnRefresh = getChild<LLButton>("Refresh List");
 	mBtnRefresh->setClickedCallback(onClickRefresh, this);
@@ -1032,7 +1020,7 @@ BOOL LLPanelLandObjects::postBuild()
 	mOwnerList = getChild<LLNameListCtrl>("owner list");
 	mOwnerList->sortByColumnIndex(3, FALSE);
 	childSetCommitCallback("owner list", onCommitList, this);
-	mOwnerList->setDoubleClickCallback(onDoubleClickOwner);
+	mOwnerList->setDoubleClickCallback(onDoubleClickOwner, this);
 
 	return TRUE;
 }
@@ -1406,7 +1394,7 @@ void LLPanelLandObjects::onClickRefresh(void* userdata)
 
 	// ready the list for results
 	self->mOwnerList->deleteAllItems();
-	self->mOwnerList->addCommentText(std::string("Searching...")); // *TODO: Translate
+	self->mOwnerList->setCommentText(LLTrans::getString("Searching"));
 	self->mOwnerList->setEnabled(FALSE);
 	self->mFirstReply = TRUE;
 
@@ -1468,39 +1456,34 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
 			continue;
 		}
 
-		LLScrollListItem *row = new LLScrollListItem( TRUE, NULL, owner_id);
+		LLNameListCtrl::NameItem item_params;
+		item_params.value = owner_id;
+		item_params.target = is_group_owned ? LLNameListCtrl::GROUP : LLNameListCtrl::INDIVIDUAL;
+
 		if (is_group_owned)
 		{
-			row->addColumn(self->mIconGroup);
-			row->addColumn(OWNER_GROUP, FONT);
+			item_params.cells.add().type("icon").value(self->mIconGroup->getName());
+			item_params.cells.add().value(OWNER_GROUP).font(FONT);
 		}
 		else if (is_online)
 		{
-			row->addColumn(self->mIconAvatarOnline);
-			row->addColumn(OWNER_ONLINE, FONT);
+			item_params.cells.add().type("icon").value(self->mIconAvatarOnline->getName());
+			item_params.cells.add().value(OWNER_ONLINE).font(FONT);
 		}
 		else  // offline
 		{
-			row->addColumn(self->mIconAvatarOffline);
-			row->addColumn(OWNER_OFFLINE, FONT);
+			item_params.cells.add().type("icon").value(self->mIconAvatarOffline->getName());
+			item_params.cells.add().value(OWNER_OFFLINE).font(FONT);
 		}
+
 		// Placeholder for name.
-		row->addColumn(LLStringUtil::null, FONT);
+		item_params.cells.add().font(FONT);
 
 		object_count_str = llformat("%d", object_count);
-		row->addColumn(object_count_str, FONT);
-		
-		row->addColumn(formatted_time((time_t)most_recent_time), FONT);
-
+		item_params.cells.add().value(object_count_str).font(FONT);
+		item_params.cells.add().value(formatted_time((time_t)most_recent_time)).font(FONT);
 
-		if (is_group_owned)
-		{
-			self->mOwnerList->addGroupNameItem(row, ADD_BOTTOM);
-		}
-		else
-		{
-			self->mOwnerList->addNameItem(row, ADD_BOTTOM);
-		}
+		self->mOwnerList->addRow(item_params);
 
 		lldebugs << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent")
 				<< ") owns " << object_count << " objects." << llendl;
@@ -1508,7 +1491,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
 	// check for no results
 	if (0 == self->mOwnerList->getItemCount())
 	{
-		self->mOwnerList->addCommentText(std::string("None found.")); // *TODO: Translate
+		self->mOwnerList->setCommentText(LLTrans::getString("NoneFound"));
 	}
 	else
 	{
@@ -1699,7 +1682,7 @@ void LLPanelLandObjects::onCommitClean(LLUICtrl *caller, void* user_data)
 //---------------------------------------------------------------------------
 
 LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel)
-:	LLPanel(std::string("land_options_panel")),
+:	LLPanel(),
 	mCheckEditObjects(NULL),
 	mCheckEditGroupObjects(NULL),
 	mCheckAllObjectEntry(NULL),
@@ -1808,8 +1791,7 @@ BOOL LLPanelLandOptions::postBuild()
 	mSnapshotCtrl = getChild<LLTextureCtrl>("snapshot_ctrl");
 	if (mSnapshotCtrl)
 	{
-		mSnapshotCtrl->setCommitCallback( onCommitAny );
-		mSnapshotCtrl->setCallbackUserData( this );
+		mSnapshotCtrl->setCommitCallback( onCommitAny, this );
 		mSnapshotCtrl->setAllowNoTexture ( TRUE );
 		mSnapshotCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
 		mSnapshotCtrl->setNonImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
@@ -2262,7 +2244,8 @@ void LLPanelLandOptions::onClickPublishHelp(void*)
 //---------------------------------------------------------------------------
 
 LLPanelLandAccess::LLPanelLandAccess(LLParcelSelectionHandle& parcel)
-:	LLPanel(std::string("land_access_panel")), mParcel(parcel)
+	: LLPanel(),
+	  mParcel(parcel)
 {
 }
 
@@ -2328,7 +2311,6 @@ void LLPanelLandAccess::refresh()
 			childSetToolTipArg("AccessList", "[LISTED]", llformat("%d",count));
 			childSetToolTipArg("AccessList", "[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
 
-			// *TODO: Translate
 			for (access_map_const_iterator cit = parcel->mAccessList.begin();
 				 cit != parcel->mAccessList.end(); ++cit)
 			{
@@ -2336,25 +2318,28 @@ void LLPanelLandAccess::refresh()
 				std::string suffix;
 				if (entry.mTime != 0)
 				{
+					LLStringUtil::format_map_t args;
 					S32 now = time(NULL);
 					S32 seconds = entry.mTime - now;
 					if (seconds < 0) seconds = 0;
 					suffix.assign(" (");
 					if (seconds >= 120)
 					{
-						std::string buf = llformat("%d minutes", (seconds/60));
+						args["[MINUTES]"] = llformat("%d", (seconds/60));
+						std::string buf = getString ("Minutes", args);
 						suffix.append(buf);
 					}
 					else if (seconds >= 60)
 					{
-						suffix.append("1 minute");
+						suffix.append("1 " + getString("Minute"));
 					}
 					else
 					{
-						std::string buf = llformat("%d seconds", seconds);
+						args["[SECONDS]"] = llformat("%d", seconds);
+						std::string buf = getString ("Seconds", args);
 						suffix.append(buf);
 					}
-					suffix.append(" remaining)");
+					suffix.append(" " + getString("Remaining") + ")");
 				}
 				if (mListAccess)
 					mListAccess->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix);
@@ -2375,25 +2360,28 @@ void LLPanelLandAccess::refresh()
 				std::string suffix;
 				if (entry.mTime != 0)
 				{
+					LLStringUtil::format_map_t args;
 					S32 now = time(NULL);
 					S32 seconds = entry.mTime - now;
 					if (seconds < 0) seconds = 0;
 					suffix.assign(" (");
 					if (seconds >= 120)
 					{
-						std::string buf = llformat("%d minutes", (seconds/60));
+						args["[MINUTES]"] = llformat("%d", (seconds/60));
+						std::string buf = getString ("Minutes", args);
 						suffix.append(buf);
 					}
 					else if (seconds >= 60)
 					{
-						suffix.append("1 minute");
+						suffix.append("1 " + getString("Minute"));
 					}
 					else
 					{
-						std::string buf = llformat("%d seconds", seconds);
+						args["[SECONDS]"] = llformat("%d", seconds);
+						std::string buf = getString ("Seconds", args);
 						suffix.append(buf);
 					}
-					suffix.append(" remaining)");
+					suffix.append(" " + getString("Remaining") + ")");
 				}
 				mListBanned->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix);
 			}
@@ -2758,7 +2746,8 @@ void LLPanelLandAccess::onClickRemoveBanned(void* data)
 // LLPanelLandCovenant
 //---------------------------------------------------------------------------
 LLPanelLandCovenant::LLPanelLandCovenant(LLParcelSelectionHandle& parcel)
-:	LLPanel(std::string("land_covenant_panel")), mParcel(parcel)
+	: LLPanel(),
+	  mParcel(parcel)
 {	
 }
 
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index 4c3de65d71..74c1205e1f 100644
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -38,8 +38,8 @@
 #include <vector>
 
 #include "llfloater.h"
-//#include "llviewerimagelist.h"
-#include "llmemory.h"	// LLPointer<>
+#include "llpointer.h"	// LLPointer<>
+#include "llsafehandle.h"
 
 typedef std::set<LLUUID, lluuid_less> uuid_list_t;
 const F32 CACHE_REFRESH_TIME	= 2.5f;
@@ -82,7 +82,7 @@ public:
 
 	// Destroys itself on close.
 	virtual void onClose(bool app_quitting);
-	virtual void onOpen();
+	virtual void onOpen(const LLSD& key);
 	virtual BOOL postBuild();
 
 protected:
@@ -138,8 +138,7 @@ public:
 
 	void setGroup(const LLUUID& group_id);
 	static void onClickProfile(void*);
-	static void onClickSetGroup(void*);
-	static void cbGroupID(LLUUID group_id, void* userdata);
+		   void onClickSetGroup();
 	static BOOL enableDeedToGroup(void*);
 	static void onClickDeed(void*);
 	static void onClickBuyLand(void* data);
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index bd1186b151..223cca50b2 100644
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -41,13 +41,16 @@
 #include "message.h"
 
 #include "llagent.h"
-#include "llbutton.h"
+#include "llfloaterreg.h"
 #include "llfloatergroupinfo.h"
 #include "llfloaterworldmap.h"
 #include "llproductinforequest.h"
 #include "llscrolllistctrl.h"
 #include "llstatusbar.h"
 #include "lltextbox.h"
+#include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
 #include "lltrans.h"
 #include "lluiconstants.h"
 #include "llviewermessage.h"
@@ -78,13 +81,13 @@ void LLFloaterLandHoldings::show(void*)
 					  "");
 
 	// TODO: request updated L$ balance?
-	floater->open();		/* Flawfinder: ignore */
+	floater->openFloater();
 }
 
 
 // protected
 LLFloaterLandHoldings::LLFloaterLandHoldings()
-:	LLFloater(std::string("land holdings floater")),
+:	LLFloater(),
 	mActualArea(0),
 	mBillableArea(0),
 	mFirstPacketReceived(FALSE),
@@ -101,8 +104,7 @@ BOOL LLFloaterLandHoldings::postBuild()
 	childSetAction("Show on Map", onClickMap, this);
 
 	// Grant list
-	childSetDoubleClickCallback("grant list", onGrantList);
-	childSetUserData("grant list", this);
+	getChild<LLScrollListCtrl>("grant list")->setDoubleClickCallback(onGrantList, this);
 
 	LLCtrlListInterface *list = childGetListInterface("grant list");
 	if (!list) return TRUE;
@@ -295,11 +297,11 @@ void LLFloaterLandHoldings::buttonCore(S32 which)
 	{
 	case 0:
 		gAgent.teleportViaLocation(pos_global);
-		gFloaterWorldMap->trackLocation(pos_global);
+		LLFloaterWorldMap::getInstance()->trackLocation(pos_global);
 		break;
 	case 1:
-		gFloaterWorldMap->trackLocation(pos_global);
-		LLFloaterWorldMap::show(NULL, TRUE);
+		LLFloaterWorldMap::getInstance()->trackLocation(pos_global);
+		LLFloaterReg::showInstance("world_map", "center");
 		break;
 	default:
 		break;
@@ -311,7 +313,7 @@ void LLFloaterLandHoldings::onClickTeleport(void* data)
 {
 	LLFloaterLandHoldings* self = (LLFloaterLandHoldings*)data;
 	self->buttonCore(0);
-	self->close();
+	self->closeFloater();
 }
 
 
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 3b1e4c7ac7..6920d45381 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -30,96 +30,188 @@
  * $/LicenseInfo$
  */
 
+#include <string>
 #include "llviewerprecompiledheaders.h"
 
+// self include
 #include "llfloatermap.h"
 
+// Library includes
+#include "llfloaterreg.h"
+#include "llfontgl.h"
+#include "llglheaders.h"
+#include "llmenugl.h"
+
+// Viewer includes
 #include "llagent.h"
-#include "llcolorscheme.h"
 #include "llviewercontrol.h"
-#include "lldraghandle.h"
 #include "llnetmap.h"
-#include "llregionhandle.h"
-#include "llresizebar.h"
-#include "lluictrlfactory.h"
-
-LLFloaterMap::LLFloaterMap(const LLSD& key)
-	:
-	LLFloater(std::string("minimap")),
-	mPanelMap(NULL)
+#include "lltracker.h"
+#include "llviewercamera.h"
+#include "lldraghandle.h"
+#include "lltextbox.h"
+
+//
+// Constants
+//
+const F32 MAP_SCALE_MIN = 64;
+const F32 MAP_SCALE_MID = 172;
+const F32 MAP_SCALE_MAX = 512;
+
+//
+// Member functions
+//
+
+LLFloaterMap::LLFloaterMap(const LLSD& key) 
+	: LLFloater(key)
 {
-	LLCallbackMap::map_t factory_map;
-	factory_map["mini_mapview"] = LLCallbackMap(createPanelMiniMap, this);
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE);
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_map.xml", FALSE);
 }
 
-
-// static
-void* LLFloaterMap::createPanelMiniMap(void* data)
+LLFloaterMap::~LLFloaterMap()
 {
-	LLFloaterMap* self = (LLFloaterMap*)data;
-	self->mPanelMap = new LLNetMap("Mapview");
-	return self->mPanelMap;
 }
 
 BOOL LLFloaterMap::postBuild()
 {
-	// Send the drag handle to the back, but make sure close stays on top
+	mMap = getChild<LLNetMap>("Net Map");
+	mMap->setScale(gSavedSettings.getF32("MiniMapScale"));
+	mMap->setRotateMap(gSavedSettings.getBOOL( "MiniMapRotate" ));
+	mMap->setToolTipMsg(getString("ToolTipMsg"));	
+	sendChildToBack(mMap);
+	
+	mTextBoxNorth = getChild<LLTextBox> ("floater_map_north");
+	mTextBoxEast = getChild<LLTextBox> ("floater_map_east");
+	mTextBoxWest = getChild<LLTextBox> ("floater_map_west");
+	mTextBoxSouth = getChild<LLTextBox> ("floater_map_south");
+	mTextBoxSouthEast = getChild<LLTextBox> ("floater_map_southeast");
+	mTextBoxNorthEast = getChild<LLTextBox> ("floater_map_northeast");
+	mTextBoxSouthWest = getChild<LLTextBox> ("floater_map_southwest");
+	mTextBoxNorthWest = getChild<LLTextBox> ("floater_map_northwest");
+
+	LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+	
+	registrar.add("Minimap.Zoom", boost::bind(&LLFloaterMap::handleZoom, this, _2));
+	registrar.add("Minimap.Tracker", boost::bind(&LLFloaterMap::handleStopTracking, this, _2));
+
+	mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_minimap.xml", this);
+	if (mPopupMenu && !LLTracker::isTracking(0))
+	{
+		mPopupMenu->setItemEnabled ("Stop Tracking", false);
+	}
+
+	// Get the drag handle all the way in back
 	sendChildToBack(getDragHandle());
-	sendChildToFront(getChild<LLButton>("llfloater_close_btn"));
+
 	setIsChrome(TRUE);
+	
+	// keep onscreen
+	gFloaterView->adjustToFitScreen(this, FALSE);
+
 	return TRUE;
 }
 
-
-LLFloaterMap::~LLFloaterMap()
+BOOL LLFloaterMap::handleDoubleClick( S32 x, S32 y, MASK mask )
 {
+	LLFloaterReg::showInstance("world_map");
+	return TRUE;
 }
 
+BOOL LLFloaterMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+	if (mPopupMenu)
+	{
+		mPopupMenu->buildDrawLabels();
+		mPopupMenu->updateParent(LLMenuGL::sMenuContainer);
+		LLMenuGL::showPopup(this, mPopupMenu, x, y);
+	}
+	return TRUE;
+}
 
-// virtual 
-void LLFloaterMap::onOpen()
+void LLFloaterMap::setDirectionPos( LLTextBox* text_box, F32 rotation )
 {
-	gFloaterView->adjustToFitScreen(this, FALSE);
+	// Rotation is in radians.
+	// Rotation of 0 means x = 1, y = 0 on the unit circle.
 
-	gSavedSettings.setBOOL("ShowMiniMap", TRUE);
-}
+	F32 map_half_height = (F32)(getRect().getHeight() / 2);
+	F32 map_half_width = (F32)(getRect().getWidth() / 2);
+	F32 text_half_height = (F32)(text_box->getRect().getHeight() / 2);
+	F32 text_half_width = (F32)(text_box->getRect().getWidth() / 2);
+	F32 radius = llmin( map_half_height - text_half_height, map_half_width - text_half_width );
+
+	// Inset by a little to account for position display.
+	radius -= 8.f;
 
+	text_box->setOrigin( 
+		llround(map_half_width - text_half_width + radius * cos( rotation )),
+		llround(map_half_height - text_half_height + radius * sin( rotation )) );
+}
 
 // virtual
-void LLFloaterMap::onClose(bool app_quitting)
+void LLFloaterMap::draw()
 {
-	LLFloater::setVisible(FALSE);
+	F32 rotation = 0;
 
-	if (!app_quitting)
+	if( mMap->getRotateMap() )
 	{
-		gSavedSettings.setBOOL("ShowMiniMap", FALSE);
+		// rotate subsequent draws to agent rotation
+		rotation = atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] );
 	}
-}
 
-BOOL LLFloaterMap::canClose()
-{
-	return !LLApp::isExiting();
-}
+	setDirectionPos( mTextBoxEast,  rotation );
+	setDirectionPos( mTextBoxNorth, rotation + F_PI_BY_TWO );
+	setDirectionPos( mTextBoxWest,  rotation + F_PI );
+	setDirectionPos( mTextBoxSouth, rotation + F_PI + F_PI_BY_TWO );
 
+	setDirectionPos( mTextBoxNorthEast, rotation +						F_PI_BY_TWO / 2);
+	setDirectionPos( mTextBoxNorthWest, rotation + F_PI_BY_TWO +		F_PI_BY_TWO / 2);
+	setDirectionPos( mTextBoxSouthWest, rotation + F_PI +				F_PI_BY_TWO / 2);
+	setDirectionPos( mTextBoxSouthEast, rotation + F_PI + F_PI_BY_TWO + F_PI_BY_TWO / 2);
 
-// virtual
-void LLFloaterMap::draw()
-{
 	// Note: we can't just gAgent.check cameraMouselook() because the transition states are wrong.
 	if( gAgent.cameraMouselook())
 	{
 		setMouseOpaque(FALSE);
 		getDragHandle()->setMouseOpaque(FALSE);
-
-		drawChild(mPanelMap);
 	}
 	else
 	{
 		setMouseOpaque(TRUE);
 		getDragHandle()->setMouseOpaque(TRUE);
+	}
+	
+	if (LLTracker::isTracking(0))
+	{
+		mPopupMenu->setItemEnabled ("Stop Tracking", true);
+	}
+	
+	LLFloater::draw();
+}
 
-		LLFloater::draw();
+void LLFloaterMap::handleZoom(const LLSD& userdata)
+{
+	std::string level = userdata.asString();
+	
+	F32 scale = 0.0f;
+	if (level == std::string("close"))
+		scale = MAP_SCALE_MAX;
+	else if (level == std::string("medium"))
+		scale = MAP_SCALE_MID;
+	else if (level == std::string("far"))
+		scale = MAP_SCALE_MIN;
+	if (scale != 0.0f)
+	{
+		gSavedSettings.setF32("MiniMapScale", scale );
+		mMap->setScale(scale);
+	}
+}
+
+void LLFloaterMap::handleStopTracking (const LLSD& userdata)
+{
+	if (mPopupMenu)
+	{
+		mPopupMenu->setItemEnabled ("Stop Tracking", false);
+		LLTracker::stopTracking ((void*)LLTracker::isTracking(NULL));
 	}
 }
 
diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h
index ec2db27f7a..501777ed07 100644
--- a/indra/newview/llfloatermap.h
+++ b/indra/newview/llfloatermap.h
@@ -35,28 +35,42 @@
 
 #include "llfloater.h"
 
+class LLMenuGL;
 class LLNetMap;
+class LLTextBox;
 
-class LLFloaterMap :
-	public LLFloater,
-	public LLFloaterSingleton<LLFloaterMap>
+//
+// Classes
+//
+class LLFloaterMap : public LLFloater
 {
-	friend class LLUISingleton<LLFloaterMap, VisibilityPolicy<LLFloater> >;
 public:
+	LLFloaterMap(const LLSD& key);
 	virtual ~LLFloaterMap();
-
-	static void* createPanelMiniMap(void* data);
-
-	BOOL postBuild();
-
+	
+	/*virtual*/ BOOL 	postBuild();
+	/*virtual*/ BOOL	handleDoubleClick( S32 x, S32 y, MASK mask );
+	/*virtual*/ BOOL	handleRightMouseDown( S32 x, S32 y, MASK mask );
 	/*virtual*/ void	draw();
-	/*virtual*/ void	onOpen();
-	/*virtual*/ void	onClose(bool app_quitting);
-	/*virtual*/ BOOL	canClose();
-
+	
 private:
-	LLFloaterMap(const LLSD& key = LLSD());
-	LLNetMap*		mPanelMap;
+	void handleZoom(const LLSD& userdata);
+	void handleStopTracking (const LLSD& userdata);
+	void setDirectionPos( LLTextBox* text_box, F32 rotation );
+	
+	LLMenuGL*		mPopupMenu;
+
+	LLTextBox*		mTextBoxEast;
+	LLTextBox*		mTextBoxNorth;
+	LLTextBox*		mTextBoxWest;
+	LLTextBox*		mTextBoxSouth;
+
+	LLTextBox*		mTextBoxSouthEast;
+	LLTextBox*		mTextBoxNorthEast;
+	LLTextBox*		mTextBoxNorthWest;
+	LLTextBox*		mTextBoxSouthWest;
+	
+	LLNetMap*		mMap;
 };
 
 #endif  // LL_LLFLOATERMAP_H
diff --git a/indra/newview/llfloatermemleak.cpp b/indra/newview/llfloatermemleak.cpp
index df51918e35..3f2fcc26db 100644
--- a/indra/newview/llfloatermemleak.cpp
+++ b/indra/newview/llfloatermemleak.cpp
@@ -49,8 +49,10 @@ U32 LLFloaterMemLeak::sTotalLeaked = 0 ;
 S32 LLFloaterMemLeak::sStatus = LLFloaterMemLeak::STOP ;
 BOOL LLFloaterMemLeak::sbAllocationFailed = FALSE ;
 
-LLFloaterMemLeak::LLFloaterMemLeak() : LLFloater("Memory Leaking Simulation Floater")
+LLFloaterMemLeak::LLFloaterMemLeak()
+	: LLFloater()
 {
+	setTitle("Memory Leaking Simulation Floater");
 }
 
 LLFloaterMemLeak::~LLFloaterMemLeak()
@@ -224,7 +226,7 @@ LLFloaterMemLeak* LLFloaterMemLeak::instance()
 	if (!sInstance)
 	{
 		sInstance = new LLFloaterMemLeak();
-		LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_mem_leaking.xml", NULL, FALSE);
+		LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_mem_leaking.xml", FALSE);
 
 		if(sInstance)
 		{
@@ -256,7 +258,7 @@ LLFloaterMemLeak* LLFloaterMemLeak::instance()
 
 void LLFloaterMemLeak::show(void*)
 {
-	instance()->open();
+	instance()->openFloater();
 }
 
 LLFloaterMemLeak* LLFloaterMemLeak::getInstance()
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index acfcfab445..ad0f9aacb1 100644
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -69,8 +69,9 @@ const S32 PREF_BUTTON_HEIGHT = 16;
 // LLFloaterNameDesc()
 //-----------------------------------------------------------------------------
 LLFloaterNameDesc::LLFloaterNameDesc(const std::string& filename )
-	: LLFloater(std::string("Name/Description Floater"))
+	: LLFloater()
 {
+	setTitle("Name/Description Floater");
 	mFilenameAndPath = filename;
 	mFilename = gDirUtilp->getBaseFileName(filename, false);
 	// SL-5521 Maintain capitalization of filename when making the inventory item. JC
@@ -190,7 +191,7 @@ void LLFloaterNameDesc::onBtnOK( void* userdata )
 			    0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE,
 			    LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(),
 			    display_name, callback, expected_upload_cost, nruserdata);
-	fp->close(false);
+	fp->closeFloater(false);
 }
 
 // static 
@@ -200,5 +201,5 @@ void LLFloaterNameDesc::onBtnOK( void* userdata )
 void LLFloaterNameDesc::onBtnCancel( void* userdata )
 {
 	LLFloaterNameDesc *fp =(LLFloaterNameDesc *)userdata;
-	fp->close(false);
+	fp->closeFloater(false);
 }
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index e6250063f7..11842b8b0e 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -36,6 +36,7 @@
 #include "lluictrlfactory.h"
 #include "llbutton.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
 #include "llpanel.h"
 #include "llcombobox.h"
 #include "llviewertexteditor.h"
@@ -59,11 +60,12 @@ private:
 };
 
 LLNotificationChannelPanel::LLNotificationChannelPanel(const std::string& channel_name) 
-	: LLPanel(channel_name)
+	: LLPanel()
 {
 	mChannelPtr = LLNotifications::instance().getChannel(channel_name);
 	mChannelRejectsPtr = LLNotificationChannelPtr(
-												  LLNotificationChannel::buildChannel(channel_name + "rejects", mChannelPtr->getParentChannelName(), !boost::bind(mChannelPtr->getFilter(), _1)));
+		LLNotificationChannel::buildChannel(channel_name + "rejects", mChannelPtr->getParentChannelName(),
+											!boost::bind(mChannelPtr->getFilter(), _1)));
 	LLUICtrlFactory::instance().buildPanel(this, "panel_notifications_channel.xml");
 }
 
@@ -77,13 +79,11 @@ BOOL LLNotificationChannelPanel::postBuild()
 	mChannelRejectsPtr->connectChanged(boost::bind(&LLNotificationChannelPanel::update, this, _1, false));
 
 	LLScrollListCtrl* scroll = getChild<LLScrollListCtrl>("notifications_list");
-	scroll->setDoubleClickCallback(onClickNotification);
-	scroll->setCallbackUserData(this);
-
+	scroll->setDoubleClickCallback(onClickNotification, this);
+	scroll->setRect(LLRect( getRect().mLeft, getRect().mTop, getRect().mRight, 0));
 	scroll = getChild<LLScrollListCtrl>("notification_rejects_list");
-	scroll->setDoubleClickCallback(onClickNotificationReject);
-	scroll->setCallbackUserData(this);
-
+	scroll->setDoubleClickCallback(onClickNotificationReject, this);
+	scroll->setRect(LLRect( getRect().mLeft, getRect().mTop, getRect().mRight, 0));
 	return TRUE;
 }
 
@@ -161,6 +161,7 @@ bool LLNotificationChannelPanel::update(const LLSD& payload, bool passed_filter)
 // LLFloaterNotificationConsole
 //
 LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key)
+: LLFloater()
 {
 	LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml");
 }
@@ -229,8 +230,10 @@ void LLFloaterNotificationConsole::removeChannel(const std::string& name)
 //static 
 void LLFloaterNotificationConsole::updateResizeLimits()
 {
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+
 	LLLayoutStack& stack = getChildRef<LLLayoutStack>("notification_channels");
-	setResizeLimits(getMinWidth(), LLFLOATER_HEADER_SIZE + HEADER_PADDING + ((NOTIFICATION_PANEL_HEADER_HEIGHT + 3) * stack.getNumPanels()));
+	setResizeLimits(getMinWidth(), floater_header_size + HEADER_PADDING + ((NOTIFICATION_PANEL_HEADER_HEIGHT + 3) * stack.getNumPanels()));
 }
 
 void LLFloaterNotificationConsole::onClickAdd(void* user_data)
@@ -247,7 +250,9 @@ void LLFloaterNotificationConsole::onClickAdd(void* user_data)
 
 //=============== LLFloaterNotification ================
 
-LLFloaterNotification::LLFloaterNotification(LLNotification* note) : mNote(note)
+LLFloaterNotification::LLFloaterNotification(LLNotification* note) 
+:	LLFloater(),
+	mNote(note)
 {
 	LLUICtrlFactory::instance().buildFloater(this, "floater_notification.xml");
 }
@@ -265,8 +270,7 @@ BOOL LLFloaterNotification::postBuild()
 		return TRUE;
 	}
 
-	responses_combo->setCommitCallback(onCommitResponse);
-	responses_combo->setCallbackUserData(this);
+	responses_combo->setCommitCallback(onCommitResponse, this);
 
 	LLSD form_sd = form->asLLSD();
 
diff --git a/indra/newview/llfloaternotificationsconsole.h b/indra/newview/llfloaternotificationsconsole.h
index 1a436b8bfe..0372553182 100644
--- a/indra/newview/llfloaternotificationsconsole.h
+++ b/indra/newview/llfloaternotificationsconsole.h
@@ -34,6 +34,7 @@
 #define LL_LLFLOATER_NOTIFICATIONS_CONSOLE_H
 
 #include "llfloater.h"
+#include "lllayoutstack.h"
 #include "llnotifications.h"
 
 class LLFloaterNotificationConsole : 
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index f4984df6d9..de6b8ad814 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -58,24 +58,26 @@
 LLFloaterOpenObject* LLFloaterOpenObject::sInstance = NULL;
 
 LLFloaterOpenObject::LLFloaterOpenObject()
-:	LLFloater(std::string("object_contents")),
+:	LLFloater(),
 	mPanelInventory(NULL),
 	mDirty(TRUE)
 {
-	LLCallbackMap::map_t factory_map;
-	factory_map["object_contents"] = LLCallbackMap(createPanelInventory, this);
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_openobject.xml",&factory_map);
-
-	childSetAction("copy_to_inventory_button", onClickMoveToInventory, this);
-	childSetAction("copy_and_wear_button", onClickMoveAndWear, this);
-	childSetTextArg("object_name", "[DESC]", std::string("Object") ); // *Note: probably do not want to translate this
+	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_openobject.xml");
 }
 
 LLFloaterOpenObject::~LLFloaterOpenObject()
 {
 	sInstance = NULL;
 }
-
+// virtual
+BOOL LLFloaterOpenObject::postBuild()
+{
+	childSetAction("copy_to_inventory_button", onClickMoveToInventory, this);
+	childSetAction("copy_and_wear_button", onClickMoveAndWear, this);
+	childSetTextArg("object_name", "[DESC]", std::string("Object") ); // *Note: probably do not want to translate this
+	mPanelInventory = getChild<LLPanelInventory>("object_contents");
+	return TRUE;
+}
 void LLFloaterOpenObject::refresh()
 {
 	mPanelInventory->refresh();
@@ -135,7 +137,7 @@ void LLFloaterOpenObject::show()
 		sInstance->center();
 	}
 
-	sInstance->open();		/* Flawfinder: ignore */
+	sInstance->openFloater();
 	sInstance->setFocus(TRUE);
 
 	sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
@@ -215,7 +217,7 @@ void LLFloaterOpenObject::onClickMoveToInventory(void* data)
 {
 	LLFloaterOpenObject* self = (LLFloaterOpenObject*)data;
 	self->moveToInventory(false);
-	self->close();
+	self->closeFloater();
 }
 
 // static
@@ -223,13 +225,6 @@ void LLFloaterOpenObject::onClickMoveAndWear(void* data)
 {
 	LLFloaterOpenObject* self = (LLFloaterOpenObject*)data;
 	self->moveToInventory(true);
-	self->close();
+	self->closeFloater();
 }
 
-//static
-void* LLFloaterOpenObject::createPanelInventory(void* data)
-{
-	LLFloaterOpenObject* floater = (LLFloaterOpenObject*)data;
-	floater->mPanelInventory = new LLPanelInventory(std::string("Object Contents"), LLRect());
-	return floater->mPanelInventory;
-}
diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h
index 27653a5c99..0097a85690 100644
--- a/indra/newview/llfloateropenobject.h
+++ b/indra/newview/llfloateropenobject.h
@@ -59,7 +59,7 @@ public:
 protected:
 	LLFloaterOpenObject();
 	~LLFloaterOpenObject();
-
+	/*virtual*/	BOOL	postBuild();
 	void refresh();
 	void draw();
 
@@ -68,7 +68,6 @@ protected:
 	static void onClickMoveToInventory(void* data);
 	static void onClickMoveAndWear(void* data);
 	static void callbackMoveInventory(S32 result, void* data);
-	static void* createPanelInventory(void* data);
 
 protected:
 	static LLFloaterOpenObject* sInstance;
diff --git a/indra/newview/llfloaterparcel.cpp b/indra/newview/llfloaterparcel.cpp
index 4213150553..fa7403874e 100644
--- a/indra/newview/llfloaterparcel.cpp
+++ b/indra/newview/llfloaterparcel.cpp
@@ -93,12 +93,12 @@ void*	LLFloaterParcelInfo::createPanelPlace(void*	data)
 //----------------------------------------------------------------------------
 
 
-LLFloaterParcelInfo::LLFloaterParcelInfo(const std::string& name, const LLUUID &parcel_id)
-:	LLFloater(name),
+LLFloaterParcelInfo::LLFloaterParcelInfo(const LLUUID &parcel_id)
+:	LLFloater(),
 	mParcelID( parcel_id )
 {
 	mFactoryMap["place_details_panel"] = LLCallbackMap(LLFloaterParcelInfo::createPanelPlace, this);
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_url.xml", &getFactoryMap());
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_url.xml");
 	gPlaceInfoInstances.addData(parcel_id, this);
 }
 
@@ -128,14 +128,14 @@ LLFloaterParcelInfo* LLFloaterParcelInfo::show(const LLUUID &parcel_id)
 	{
 		// ...bring that window to front
 		floater = gPlaceInfoInstances.getData(parcel_id);
-		floater->open();	/*Flawfinder: ignore*/
+		floater->openFloater();
 		floater->setFrontmost(true);
 	}
 	else
 	{
-		floater =  new LLFloaterParcelInfo("parcelinfo", parcel_id );
+		floater =  new LLFloaterParcelInfo( parcel_id );
 		floater->center();
-		floater->open();	/*Flawfinder: ignore*/
+		floater->openFloater();
 		floater->displayParcelInfo(parcel_id);
 		floater->setFrontmost(true);
 	}
diff --git a/indra/newview/llfloaterparcel.h b/indra/newview/llfloaterparcel.h
index 4d698d64ae..c2d5987d8e 100644
--- a/indra/newview/llfloaterparcel.h
+++ b/indra/newview/llfloaterparcel.h
@@ -43,7 +43,7 @@ class LLFloaterParcelInfo
 public:
 	static	void*	createPanelPlace(void*	data);
 
-	LLFloaterParcelInfo(const std::string& name, const LLUUID &parcel_id );
+	LLFloaterParcelInfo( const LLUUID &parcel_id );
 	/*virtual*/ ~LLFloaterParcelInfo();
 
 	void displayParcelInfo(const LLUUID& parcel_id);
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 52fba0aa20..1ef71a9d53 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -42,6 +42,7 @@
 
 
 LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
+: LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_perm_prefs.xml");
 }
@@ -64,7 +65,7 @@ void LLFloaterPerms::onClickOK(void* data)
 {
 	LLFloaterPerms* self = static_cast<LLFloaterPerms*>(data);
 	self->ok();
-	self->close();
+	self->closeFloater();
 }
 
 //static 
@@ -72,7 +73,7 @@ void LLFloaterPerms::onClickCancel(void* data)
 {
 	LLFloaterPerms* self = static_cast<LLFloaterPerms*>(data);
 	self->cancel();
-	self->close();
+	self->closeFloater();
 }
 
 //static 
@@ -117,7 +118,7 @@ void LLFloaterPerms::onClose(bool app_quitting)
 	// Cancel any unsaved changes before closing. 
 	// Note: when closed due to the OK button this amounts to a no-op.
 	cancel();
-	LLFloater::onClose(app_quitting);
+	destroy();
 }
 
 //static 
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index b0ab0f9625..4a68e3092e 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -78,30 +78,21 @@ LLFloaterPostcard::instance_list_t LLFloaterPostcard::sInstances;
 ///----------------------------------------------------------------------------
 
 LLFloaterPostcard::LLFloaterPostcard(LLImageJPEG* jpeg, LLImageGL *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global)
-:	LLFloater(std::string("Postcard Floater")),
+:	LLFloater(),
 	mJPEGImage(jpeg),
 	mViewerImage(img),
 	mImageScale(img_scale),
 	mPosTakenGlobal(pos_taken_global),
 	mHasFirstMsgFocus(false)
 {
-	init();
-}
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_postcard.xml");
 
-void LLFloaterPostcard::init()
-{
+	sInstances.insert(this);
+	
 	// pick up the user's up-to-date email address
-	if(!gAgent.getID().isNull())
-	{
-		// we're logged in, so we can get this info.
-		gMessageSystem->newMessageFast(_PREHASH_UserInfoRequest);
-		gMessageSystem->nextBlockFast(_PREHASH_AgentData);
-		gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
-		gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
-		gAgent.sendReliableMessage();
-	}
+	gAgent.sendAgentUserInfoRequest();
 
-	sInstances.insert(this);
+	openFloater();
 }
 
 // Destroys the object
@@ -145,14 +136,6 @@ LLFloaterPostcard* LLFloaterPostcard::showFromSnapshot(LLImageJPEG *jpeg, LLImag
 	// It's now our job to clean them up
 	LLFloaterPostcard *instance = new LLFloaterPostcard(jpeg, img, image_scale, pos_taken_global);
 
-	LLUICtrlFactory::getInstance()->buildFloater(instance, "floater_postcard.xml");
-
-	S32 left, top;
-	gFloaterView->getNewFloaterPosition(&left, &top);
-	instance->setOrigin(left, top - instance->getRect().getHeight());
-	
-	instance->open();		/*Flawfinder: ignore*/
-
 	return instance;
 }
 
@@ -215,7 +198,7 @@ void LLFloaterPostcard::onClickCancel(void* data)
 	{
 		LLFloaterPostcard *self = (LLFloaterPostcard *)data;
 
-		self->close(false);
+		self->closeFloater(false);
 	}
 }
 
@@ -313,7 +296,7 @@ void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data,
 		gAgent.sendReliableMessage();
 	}
 
-	self->close();
+	self->closeFloater();
 }
 
 // static
diff --git a/indra/newview/llfloaterpostcard.h b/indra/newview/llfloaterpostcard.h
index 087649f159..5abb97e15f 100644
--- a/indra/newview/llfloaterpostcard.h
+++ b/indra/newview/llfloaterpostcard.h
@@ -36,12 +36,13 @@
 #include "llfloater.h"
 #include "llcheckboxctrl.h"
 
-#include "llmemory.h"
-#include "llimagegl.h"
+#include "llpointer.h"
 
 class LLTextEditor;
 class LLLineEditor;
 class LLButton;
+class LLImageGL;
+class LLImageJPEG;
 
 class LLFloaterPostcard 
 : public LLFloater
@@ -50,7 +51,6 @@ public:
 	LLFloaterPostcard(LLImageJPEG* jpeg, LLImageGL *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global);
 	virtual ~LLFloaterPostcard();
 
-	virtual void init();
 	virtual BOOL postBuild();
 	virtual void draw();
 
diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp
index de9b598b1e..a1015918d4 100644
--- a/indra/newview/llfloaterpostprocess.cpp
+++ b/indra/newview/llfloaterpostprocess.cpp
@@ -47,10 +47,20 @@
 LLFloaterPostProcess* LLFloaterPostProcess::sPostProcess = NULL;
 
 
-LLFloaterPostProcess::LLFloaterPostProcess() : LLFloater(std::string("Post-Process Floater"))
+LLFloaterPostProcess::LLFloaterPostProcess()
+  : LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_post_process.xml");
 
+}
+
+LLFloaterPostProcess::~LLFloaterPostProcess()
+{
+
+
+}
+BOOL LLFloaterPostProcess::postBuild()
+{
 	/// Color Filter Callbacks
 	childSetCommitCallback("ColorFilterToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_color_filter");
 	//childSetCommitCallback("ColorFilterGamma", &LLFloaterPostProcess::onFloatControlMoved, &(gPostProcess->tweaks.gamma()));
@@ -78,19 +88,13 @@ LLFloaterPostProcess::LLFloaterPostProcess() : LLFloater(std::string("Post-Proce
 	// Effect loading and saving.
 	LLComboBox* comboBox = getChild<LLComboBox>("PPEffectsCombo");
 	childSetAction("PPLoadEffect", &LLFloaterPostProcess::onLoadEffect, comboBox);
-	comboBox->setCommitCallback(onChangeEffectName);
+	comboBox->setCommitCallback(boost::bind(&LLFloaterPostProcess::onChangeEffectName, this, _1));
 
 	LLLineEditor* editBox = getChild<LLLineEditor>("PPEffectNameEditor");
 	childSetAction("PPSaveEffect", &LLFloaterPostProcess::onSaveEffect, editBox);
 
 	syncMenu();
-	
-}
-
-LLFloaterPostProcess::~LLFloaterPostProcess()
-{
-
-
+	return TRUE;
 }
 
 LLFloaterPostProcess* LLFloaterPostProcess::instance()
@@ -99,7 +103,7 @@ LLFloaterPostProcess* LLFloaterPostProcess::instance()
 	if (!sPostProcess)
 	{
 		sPostProcess = new LLFloaterPostProcess();
-		sPostProcess->open();
+		sPostProcess->openFloater();
 		sPostProcess->setFocus(TRUE);
 	}
 	return sPostProcess;
@@ -185,14 +189,13 @@ void LLFloaterPostProcess::onSaveEffect(void* userData)
 	}
 }
 
-void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl, void * userData)
+void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl)
 {
 	// get the combo box and name
-	LLComboBox * comboBox = static_cast<LLComboBox*>(ctrl);
-	LLLineEditor* editBox = sPostProcess->getChild<LLLineEditor>("PPEffectNameEditor");
+	LLLineEditor* editBox = getChild<LLLineEditor>("PPEffectNameEditor");
 
 	// set the parameter's new name
-	editBox->setValue(comboBox->getSelectedValue());
+	editBox->setValue(ctrl->getValue());
 }
 
 bool LLFloaterPostProcess::saveAlertCallback(const LLSD& notification, const LLSD& response)
@@ -215,7 +218,7 @@ void LLFloaterPostProcess::show()
 	// and open the menu
 	LLFloaterPostProcess* postProcess = instance();
 	postProcess->syncMenu();
-	postProcess->open();
+	postProcess->openFloater();
 }
 
 // virtual
diff --git a/indra/newview/llfloaterpostprocess.h b/indra/newview/llfloaterpostprocess.h
index 08a3618c2b..68e6d1e244 100644
--- a/indra/newview/llfloaterpostprocess.h
+++ b/indra/newview/llfloaterpostprocess.h
@@ -53,7 +53,7 @@ public:
 
 	LLFloaterPostProcess();
 	virtual ~LLFloaterPostProcess();
-
+	/*virtual*/	BOOL	postBuild();
 	/// one and one instance only
 	static LLFloaterPostProcess* instance();
 
@@ -66,7 +66,7 @@ public:
 	static void onColorControlIMoved(LLUICtrl* ctrl, void* userData);
 	static void onLoadEffect(void* userData);
 	static void onSaveEffect(void* userData);
-	static void onChangeEffectName(LLUICtrl* ctrl, void * userData);
+	void onChangeEffectName(LLUICtrl* ctrl);
 
 	/// prompts a user when overwriting an effect
 	static bool saveAlertCallback(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 17a59ccb77..1dcf4a51d2 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -40,390 +40,163 @@
 
 #include "llfloaterpreference.h"
 
-#include "llbutton.h"
-#include "llcheckboxctrl.h"
-#include "lldir.h"
-#include "llfocusmgr.h"
-#include "llscrollbar.h"
-#include "llspinctrl.h"
 #include "message.h"
 
+#include "llfocusmgr.h"
+#include "lltabcontainer.h"
+#include "llfloaterreg.h"
+
+#include "llagent.h"
 #include "llcommandhandler.h"
 #include "llfloaterabout.h"
-#include "llfloaterpreference.h"
+#include "llfloaterhardwaresettings.h"
 #include "llpanelnetwork.h"
 #include "llpanelaudioprefs.h"
 #include "llpaneldisplay.h"
-#include "llpaneldebug.h"
 #include "llpanelgeneral.h"
 #include "llpanelinput.h"
 #include "llpanellogin.h"
-#include "llpanelLCD.h"
 #include "llpanelmsgs.h"
 #include "llpanelweb.h"
 #include "llpanelskins.h"
 #include "llprefschat.h"
 #include "llprefsvoice.h"
 #include "llprefsim.h"
-#include "llresizehandle.h"
-#include "llresmgr.h"
-#include "llassetstorage.h"
-#include "llagent.h"
 #include "llviewercontrol.h"
-#include "llviewernetwork.h"
-#include "lluictrlfactory.h"
-#include "llviewerwindow.h"
-#include "llkeyboard.h"
-#include "llscrollcontainer.h"
-#include "llfloaterhardwaresettings.h"
-
-const S32 PREF_BORDER = 4;
-const S32 PREF_PAD = 5;
-const S32 PREF_BUTTON_WIDTH = 70;
-const S32 PREF_CATEGORY_WIDTH = 150;
-
-const S32 PREF_FLOATER_MIN_HEIGHT = 2 * SCROLLBAR_SIZE + 2 * LLPANEL_BORDER_WIDTH + 96;
-
-LLFloaterPreference* LLFloaterPreference::sInstance = NULL;
-
-
-class LLPreferencesHandler : public LLCommandHandler
-{
-public:
-	// requires trusted browser
-	LLPreferencesHandler() : LLCommandHandler("preferences", true) { }
-	bool handle(const LLSD& tokens, const LLSD& query_map,
-				LLWebBrowserCtrl* web)
-	{
-		LLFloaterPreference::show(NULL);
-		return true;
-	}
-};
-
-LLPreferencesHandler gPreferencesHandler;
-
-
-// Must be done at run time, not compile time. JC
-S32 pref_min_width()
-{
-	return  
-	2 * PREF_BORDER + 
-	2 * PREF_BUTTON_WIDTH + 
-	PREF_PAD + RESIZE_HANDLE_WIDTH +
-	PREF_CATEGORY_WIDTH +
-	PREF_PAD;
-}
-
-S32 pref_min_height()
-{
-	return
-	2 * PREF_BORDER +
-	3*(BTN_HEIGHT + PREF_PAD) +
-	PREF_FLOATER_MIN_HEIGHT;
-}
-
-
-LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * default_btn) :
-	mTabContainer(tab_container),
-	mGeneralPanel(NULL),
-	mInputPanel(NULL),
-	mNetworkPanel(NULL),
-	mDisplayPanel(NULL),
-	mAudioPanel(NULL),
-	mMsgPanel(NULL),
-	mSkinsPanel(NULL),
-	mLCDPanel(NULL)
-{
-	mGeneralPanel = new LLPanelGeneral();
-	mTabContainer->addTabPanel(mGeneralPanel, mGeneralPanel->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mGeneralPanel->setDefaultBtn(default_btn);
-
-	mInputPanel = new LLPanelInput();
-	mTabContainer->addTabPanel(mInputPanel, mInputPanel->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mInputPanel->setDefaultBtn(default_btn);
-
-	mNetworkPanel = new LLPanelNetwork();
-	mTabContainer->addTabPanel(mNetworkPanel, mNetworkPanel->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mNetworkPanel->setDefaultBtn(default_btn);
-
-	mWebPanel = new LLPanelWeb();
-	mTabContainer->addTabPanel(mWebPanel, mWebPanel->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mWebPanel->setDefaultBtn(default_btn);
-
-	mDisplayPanel = new LLPanelDisplay();
-	mTabContainer->addTabPanel(mDisplayPanel, mDisplayPanel->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mDisplayPanel->setDefaultBtn(default_btn);
-
-	mAudioPanel = new LLPanelAudioPrefs();
-	mTabContainer->addTabPanel(mAudioPanel, mAudioPanel->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mAudioPanel->setDefaultBtn(default_btn);
-
-	mPrefsChat = new LLPrefsChat();
-	mTabContainer->addTabPanel(mPrefsChat->getPanel(), mPrefsChat->getPanel()->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mPrefsChat->getPanel()->setDefaultBtn(default_btn);
-
-	mPrefsVoice = new LLPrefsVoice();
-	mTabContainer->addTabPanel(mPrefsVoice, mPrefsVoice->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mPrefsVoice->setDefaultBtn(default_btn);
-
-	mPrefsIM = new LLPrefsIM();
-	mTabContainer->addTabPanel(mPrefsIM->getPanel(), mPrefsIM->getPanel()->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mPrefsIM->getPanel()->setDefaultBtn(default_btn);
-
-#if LL_LCD_COMPILE
-
-	// only add this option if we actually have a logitech keyboard / speaker set
-	if (gLcdScreen->Enabled())
-	{
-		mLCDPanel = new LLPanelLCD();
-		mTabContainer->addTabPanel(mLCDPanel, mLCDPanel->getLabel(), FALSE, onTabChanged, mTabContainer);
-		mLCDPanel->setDefaultBtn(default_btn);
-	}
-
-#else
-	mLCDPanel = NULL;
-#endif
-
-	mMsgPanel = new LLPanelMsgs();
-	mTabContainer->addTabPanel(mMsgPanel, mMsgPanel->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mMsgPanel->setDefaultBtn(default_btn);
-	
-	mSkinsPanel = new LLPanelSkins();
-	mTabContainer->addTabPanel(mSkinsPanel, mSkinsPanel->getLabel(), FALSE, onTabChanged, mTabContainer);
-	mSkinsPanel->setDefaultBtn(default_btn);
-
-	if (!mTabContainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
-	{
-		mTabContainer->selectFirstTab();
-	}
-}
-
-LLPreferenceCore::~LLPreferenceCore()
-{
-	if (mGeneralPanel)
-	{
-		delete mGeneralPanel;
-		mGeneralPanel = NULL;
-	}
-	if (mInputPanel)
-	{
-		delete mInputPanel;
-		mInputPanel = NULL;
-	}
-	if (mNetworkPanel)
-	{
-		delete mNetworkPanel;
-		mNetworkPanel = NULL;
-	}
-	if (mDisplayPanel)
-	{
-		delete mDisplayPanel;
-		mDisplayPanel = NULL;
-	}
-
-	if (mAudioPanel)
-	{
-		delete mAudioPanel;
-		mAudioPanel = NULL;
-	}
-	if (mPrefsChat)
-	{
-		delete mPrefsChat;
-		mPrefsChat = NULL;
-	}
-	if (mPrefsIM)
-	{
-		delete mPrefsIM;
-		mPrefsIM = NULL;
-	}
-	if (mMsgPanel)
-	{
-		delete mMsgPanel;
-		mMsgPanel = NULL;
-	}
-	if (mWebPanel)
-	{
-		delete mWebPanel;
-		mWebPanel = NULL;
-	}
-	if (mSkinsPanel)
-	{
-		delete mSkinsPanel;
-		mSkinsPanel = NULL;
-	}
-
-}
-
-
-void LLPreferenceCore::apply()
-{
-	mGeneralPanel->apply();
-	mInputPanel->apply();
-	mNetworkPanel->apply();
-	mDisplayPanel->apply();
-	mAudioPanel->apply();
-	mPrefsChat->apply();
-	mPrefsVoice->apply();
-	mPrefsIM->apply();
-	mMsgPanel->apply();
-	mSkinsPanel->apply();
-
-	// hardware menu apply
-	LLFloaterHardwareSettings::instance()->apply();
-
-	mWebPanel->apply();
-#if LL_LCD_COMPILE
-	// only add this option if we actually have a logitech keyboard / speaker set
-	if (gLcdScreen->Enabled())
-	{
-		mLCDPanel->apply();
-	}
-#endif
-//	mWebPanel->apply();
-}
-
-
-void LLPreferenceCore::cancel()
-{
-	mGeneralPanel->cancel();
-	mInputPanel->cancel();
-	mNetworkPanel->cancel();
-	mDisplayPanel->cancel();
-	mAudioPanel->cancel();
-	mPrefsChat->cancel();
-	mPrefsVoice->cancel();
-	mPrefsIM->cancel();
-	mMsgPanel->cancel();
-	mSkinsPanel->cancel();
-
-	// cancel hardware menu
-	LLFloaterHardwareSettings::instance()->cancel();
-
-	mWebPanel->cancel();
-#if LL_LCD_COMPILE
-	// only add this option if we actually have a logitech keyboard / speaker set
-	if (gLcdScreen->Enabled())
-	{
-		mLCDPanel->cancel();
-	}
-#endif
-//	mWebPanel->cancel();
-}
-
-// static
-void LLPreferenceCore::onTabChanged(void* user_data, bool from_click)
-{
-	LLTabContainer* self = (LLTabContainer*)user_data;
-
-	gSavedSettings.setS32("LastPrefTab", self->getCurrentPanelIndex());
-}
-
-
-void LLPreferenceCore::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email)
-{
-	mPrefsIM->setPersonalInfo(visibility, im_via_email, email);
-}
-
-void LLPreferenceCore::refreshEnabledGraphics()
-{
-	LLFloaterHardwareSettings::instance()->refreshEnabledState();
-	mDisplayPanel->refreshEnabledState();
-}
 
 //////////////////////////////////////////////
 // LLFloaterPreference
 
-LLFloaterPreference::LLFloaterPreference()
+LLFloaterPreference::LLFloaterPreference(const LLSD& key)
+	: LLFloater(key),
+	  mInputPanel(NULL),
+	  mNetworkPanel(NULL),
+	  mWebPanel(NULL),
+	  mDisplayPanel(NULL),
+	  mAudioPanel(NULL),
+	  mPrefsChat(NULL),
+	  mPrefsVoice(NULL),
+	  mPrefsIM(NULL),
+	  mMsgPanel(NULL),
+	  mSkinsPanel(NULL)
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preferences.xml");
+	mFactoryMap["general"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPanelGeneral>);
+	mFactoryMap["input"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPanelInput>);
+	mFactoryMap["network"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPanelNetwork>);
+	mFactoryMap["web"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPanelWeb>);
+	mFactoryMap["display"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPanelDisplay>);
+	mFactoryMap["audio"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPanelAudioPrefs>);
+	mFactoryMap["chat"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPrefsChat>);
+	mFactoryMap["voice"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPrefsVoice>);
+	mFactoryMap["im"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPrefsIM>);
+	mFactoryMap["msgs"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPanelMsgs>);
+	mFactoryMap["skins"] = LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPanelSkins>);
+	
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preferences.xml", FALSE);
 }
 
 BOOL LLFloaterPreference::postBuild()
 {
-	requires<LLButton>("About...");
-	requires<LLButton>("OK");
-	requires<LLButton>("Cancel");
-	requires<LLButton>("Apply");
-	requires<LLTabContainer>("pref core");
-
-	if (!checkRequirements())
-	{
-		return FALSE;
-	}
-
-	mAboutBtn = getChild<LLButton>("About...");
-	mAboutBtn->setClickedCallback(onClickAbout, this);
+	getChild<LLButton>("About...")->setClickedCallback(onClickAbout, this);
+	getChild<LLButton>("Apply")->setClickedCallback(onBtnApply, this);
+	getChild<LLButton>("Cancel")->setClickedCallback(onBtnCancel, this);
+	getChild<LLButton>("OK")->setClickedCallback(onBtnOK, this);
 	
-	mApplyBtn = getChild<LLButton>("Apply");
-	mApplyBtn->setClickedCallback(onBtnApply, this);
-		
-	mCancelBtn = getChild<LLButton>("Cancel");
-	mCancelBtn->setClickedCallback(onBtnCancel, this);
-
-	mOKBtn = getChild<LLButton>("OK");
-	mOKBtn->setClickedCallback(onBtnOK, this);
-			
-	mPreferenceCore = new LLPreferenceCore(
-		getChild<LLTabContainer>("pref core"),
-		getChild<LLButton>("OK")
-		);
+	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
+	if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
+		tabcontainer->selectFirstTab();
+
+	// Panels that don't yet derive from LLPanelPreferenc
+	// *TODO: Skinning - conver these to derive from LLPanelPreference
+	mWebPanel = dynamic_cast<LLPanelWeb*>(getChild<LLPanel>("web"));
+	mDisplayPanel = dynamic_cast<LLPanelDisplay*>(getChild<LLPanel>("display"));
+	mAudioPanel = dynamic_cast<LLPanelAudioPrefs*>(getChild<LLPanel>("audio"));
+	mPrefsChat = dynamic_cast<LLPrefsChat*>(getChild<LLPanel>("chat"));
+	mPrefsVoice = dynamic_cast<LLPrefsVoice*>(getChild<LLPanel>("voice"));
+	mPrefsIM = dynamic_cast<LLPrefsIM*>(getChild<LLPanel>("im"));
+	mMsgPanel = dynamic_cast<LLPanelMsgs*>(getChild<LLPanel>("msgs"));
+	mSkinsPanel = dynamic_cast<LLPanelSkins*>(getChild<LLPanel>("skins"));
 	
-	sInstance = this;
-
 	return TRUE;
 }
 
 
 LLFloaterPreference::~LLFloaterPreference()
 {
-	sInstance = NULL;
-	delete mPreferenceCore;
 }
 
 void LLFloaterPreference::apply()
 {
-	this->mPreferenceCore->apply();
-}
+	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
+	// Call apply() on all panels that derive from LLPanelPreference
+	for (child_list_t::const_iterator iter = tabcontainer->getChildList()->begin();
+		 iter != tabcontainer->getChildList()->end(); ++iter)
+	{
+		LLView* view = *iter;
+		LLPanelPreference* panel = dynamic_cast<LLPanelPreference*>(view);
+		if (panel)
+			panel->apply();
+	}
 
+	if (mWebPanel) mWebPanel->apply();
+	if (mDisplayPanel) mDisplayPanel->apply();
+	if (mAudioPanel) mAudioPanel->apply();
+	if (mPrefsChat) mPrefsChat->apply();
+	if (mPrefsVoice) mPrefsVoice->apply();
+	if (mPrefsIM) mPrefsIM->apply();
+	if (mMsgPanel) mMsgPanel->apply();
+	if (mSkinsPanel) mSkinsPanel->apply();
 
-void LLFloaterPreference::cancel()
-{
-	this->mPreferenceCore->cancel();
+	// hardware menu apply
+	LLFloaterHardwareSettings::instance()->apply();
 }
 
-
-// static
-void LLFloaterPreference::show(void*)
+void LLFloaterPreference::cancel()
 {
-	if (!sInstance)
+	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
+	// Call cancel() on all panels that derive from LLPanelPreference
+	for (child_list_t::const_iterator iter = tabcontainer->getChildList()->begin();
+		iter != tabcontainer->getChildList()->end(); ++iter)
 	{
-		new LLFloaterPreference();
-		sInstance->center();
+		LLView* view = *iter;
+		LLPanelPreference* panel = dynamic_cast<LLPanelPreference*>(view);
+		if (panel)
+			panel->cancel();
 	}
 
-	sInstance->open();		/* Flawfinder: ignore */
+	if (mWebPanel) mWebPanel->apply();
+	if (mDisplayPanel) mDisplayPanel->cancel();
+	if (mAudioPanel) mAudioPanel->cancel();
+	if (mPrefsChat) mPrefsChat->cancel();
+	if (mPrefsVoice) mPrefsVoice->cancel();
+	if (mPrefsIM) mPrefsIM->cancel();
+	if (mMsgPanel) mMsgPanel->cancel();
+	if (mSkinsPanel) mSkinsPanel->cancel();
 
-	if(!gAgent.getID().isNull())
-	{
-		// we're logged in, so we can get this info.
-		gMessageSystem->newMessageFast(_PREHASH_UserInfoRequest);
-		gMessageSystem->nextBlockFast(_PREHASH_AgentData);
-		gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
-		gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
-		gAgent.sendReliableMessage();
-	}
+	// cancel hardware menu
+	LLFloaterHardwareSettings::instance()->cancel();
+}
 
+void LLFloaterPreference::onOpen(const LLSD& key)
+{
+	gAgent.sendAgentUserInfoRequest();
 	LLPanelLogin::setAlwaysRefresh(true);
 }
 
+void LLFloaterPreference::onClose(bool app_quitting)
+{
+	gSavedSettings.setS32("LastPrefTab", getChild<LLTabContainer>("pref core")->getCurrentPanelIndex());
+	LLPanelLogin::setAlwaysRefresh(false);
+	cancel(); // will be a no-op if OK or apply was performed just prior.
+	destroy();
+}
 
 // static
 void LLFloaterPreference::onClickAbout(void*)
 {
-	LLFloaterAbout::show(NULL);
+	LLFloaterAbout::showInstance();
 }
 
-
 // static 
 void LLFloaterPreference::onBtnOK( void* userdata )
 {
@@ -441,10 +214,10 @@ void LLFloaterPreference::onBtnOK( void* userdata )
 	if (fp->canClose())
 	{
 		fp->apply();
-		fp->close(false);
+		fp->closeFloater(false);
 
 		gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
-		
+		gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile") , TRUE );
 		std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
 		// save all settings, even if equals defaults
 		gCrashSettings.saveToFile(crash_settings_filename, FALSE);
@@ -477,14 +250,6 @@ void LLFloaterPreference::onBtnApply( void* userdata )
 }
 
 
-void LLFloaterPreference::onClose(bool app_quitting)
-{
-	LLPanelLogin::setAlwaysRefresh(false);
-	cancel(); // will be a no-op if OK or apply was performed just prior.
-	LLFloater::onClose(app_quitting);
-}
-
-
 // static 
 void LLFloaterPreference::onBtnCancel( void* userdata )
 {
@@ -497,20 +262,80 @@ void LLFloaterPreference::onBtnCancel( void* userdata )
 			cur_focus->onCommit();
 		}
 	}
-	fp->close(); // side effect will also cancel any unsaved changes.
+
+	fp->closeFloater(); // side effect will also cancel any unsaved changes.
 }
 
 
 // static
 void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_via_email, const std::string& email)
 {
-	if(sInstance && sInstance->mPreferenceCore)
+	LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+	if(instance && instance->mPrefsIM)
 	{
-		sInstance->mPreferenceCore->setPersonalInfo(visibility, im_via_email, email);
+		instance->mPrefsIM->setPersonalInfo(visibility, im_via_email, email);
 	}
 }
 
+// static
 void LLFloaterPreference::refreshEnabledGraphics()
 {
-	sInstance->mPreferenceCore->refreshEnabledGraphics();
+	LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+	if(instance)
+	{
+		LLFloaterHardwareSettings::instance()->refreshEnabledState();
+		if (instance->mDisplayPanel)
+			instance->mDisplayPanel->refreshEnabledState();
+	}
+}
+
+//----------------------------------------------------------------------------
+
+//virtual
+BOOL LLPanelPreference::postBuild()
+{
+	apply();
+	return true;
+}
+
+void LLPanelPreference::apply()
+{
+	// Save the value of all controls in the hierarchy
+	mSavedValues.clear();
+	std::list<LLView*> view_stack;
+	view_stack.push_back(this);
+	while(!view_stack.empty())
+	{
+		// Process view on top of the stack
+		LLView* curview = view_stack.front();
+		view_stack.pop_front();
+		LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview);
+		if (ctrl)
+		{
+			LLControlVariable* control = ctrl->getControlVariable();
+			if (control)
+			{
+				mSavedValues[control] = control->getValue();
+			}
+		}
+		
+		// Push children onto the end of the work stack
+		for (child_list_t::const_iterator iter = curview->getChildList()->begin();
+			 iter != curview->getChildList()->end(); ++iter)
+		{
+			view_stack.push_back(*iter);
+		}
+	}
+		
+}
+
+void LLPanelPreference::cancel()
+{
+	for (control_values_map_t::iterator iter =  mSavedValues.begin();
+		 iter !=  mSavedValues.end(); ++iter)
+	{
+		LLControlVariable* control = iter->first;
+		LLSD ctrl_value = iter->second;
+		control->set(ctrl_value);
+	}
 }
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index f48696ffdb..8144b9b8f1 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -40,7 +40,6 @@
 #define LL_LLFLOATERPREFERENCE_H
 
 #include "llfloater.h"
-#include "lltabcontainervertical.h"
 
 class LLPanelGeneral;
 class LLPanelInput;
@@ -58,76 +57,57 @@ class LLPanelMsgs;
 class LLPanelSkins;
 class LLScrollListCtrl;
 
-class LLPreferenceCore
-{
-
-public:
-	LLPreferenceCore(LLTabContainer* tab_container, LLButton * default_btn);
-	~LLPreferenceCore();
-
-	void apply();
-	void cancel();
-
-	LLTabContainer* getTabContainer() { return mTabContainer; }
-
-	void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string&  email);
-
-	static void onTabChanged(void* user_data, bool from_click);
-	
-	// refresh all the graphics preferences menus
-	void refreshEnabledGraphics();
-
-private:
-	LLTabContainer	*mTabContainer;
-	LLPanelGeneral	        *mGeneralPanel;
-	LLPanelSkins			*mSkinsPanel;
-	LLPanelInput			*mInputPanel;
-	LLPanelNetwork	        *mNetworkPanel;
-	LLPanelDisplay	        *mDisplayPanel;
-	LLPanelAudioPrefs		*mAudioPanel;
-//	LLPanelDebug			*mDebugPanel;
-	LLPrefsChat				*mPrefsChat;
-	LLPrefsVoice			*mPrefsVoice;
-	LLPrefsIM				*mPrefsIM;
-	LLPanelWeb				*mWebPanel;
-	LLPanelMsgs				*mMsgPanel;
-	LLPanelLCD				*mLCDPanel;
-};
+class LLSD;
 
 // Floater to control preferences (display, audio, bandwidth, general.
 class LLFloaterPreference : public LLFloater
 {
 public: 
-	LLFloaterPreference();
+	LLFloaterPreference(const LLSD& key);
 	~LLFloaterPreference();
 
 	void apply();
 	void cancel();
 	virtual BOOL postBuild();
-	static void show(void*);
+	virtual void onOpen(const LLSD& key);
+	virtual void onClose(bool app_quitting);
 
 	// static data update, called from message handler
 	static void updateUserInfo(const std::string& visibility, bool im_via_email, const std::string& email);
 
 	// refresh all the graphics preferences menus
 	static void refreshEnabledGraphics();
-
+	
 protected:
-	LLPreferenceCore		*mPreferenceCore;
-
-	/*virtual*/ void		onClose(bool app_quitting);
-
-	LLButton*	mAboutBtn;
-	LLButton	*mOKBtn;
-	LLButton	*mCancelBtn;
-	LLButton	*mApplyBtn;
-
 	static void		onClickAbout(void*);
 	static void		onBtnOK(void*);
 	static void		onBtnCancel(void*);
 	static void		onBtnApply(void*);
+	
+private:
+	LLPanelSkins			*mSkinsPanel;
+	LLPanelInput			*mInputPanel;
+	LLPanelNetwork	        *mNetworkPanel;
+	LLPanelDisplay	        *mDisplayPanel;
+	LLPanelAudioPrefs		*mAudioPanel;
+	LLPrefsChat				*mPrefsChat;
+	LLPrefsVoice			*mPrefsVoice;
+	LLPrefsIM				*mPrefsIM;
+	LLPanelWeb				*mWebPanel;
+	LLPanelMsgs				*mMsgPanel;
+};
 
-	static LLFloaterPreference* sInstance;
+class LLPanelPreference : public LLPanel
+{
+public:
+	/*virtual*/ BOOL postBuild();
+	
+	virtual void apply();
+	virtual void cancel();
+	
+private:
+	typedef std::map<LLControlVariable*, LLSD> control_values_map_t;
+	control_values_map_t mSavedValues;
 };
 
 #endif  // LL_LLPREFERENCEFLOATER_H
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 406d940cf0..e94967eba8 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -37,6 +37,7 @@
 #include <functional>
 #include "llcachename.h"
 #include "lldbstrings.h"
+#include "llfloaterreg.h"
 #include "llinventory.h"
 
 #include "llagent.h"
@@ -51,11 +52,13 @@
 #include "roles_constants.h"
 #include "llselectmgr.h"
 #include "lltextbox.h"
+#include "lltrans.h"
 #include "lluiconstants.h"
 #include "llviewerinventory.h"
 #include "llviewerobjectlist.h"
 #include "llviewerregion.h"
 #include "llviewercontrol.h"
+#include "llviewerwindow.h"
 
 #include "lluictrlfactory.h"
 
@@ -135,7 +138,13 @@ LLFloaterProperties* LLFloaterProperties::show(const LLUUID& item_id,
 		}
 
 		instance->refresh();
-		instance->open();		/* Flawfinder: ignore */
+		instance->openFloater();
+	}
+	else
+	{
+		LLFloaterProperties* floater = new LLFloaterProperties(item_id, object_id);
+		// keep onscreen
+		gFloaterView->adjustToFitScreen(floater, FALSE);
 	}
 	return instance;
 }
@@ -151,14 +160,14 @@ void LLFloaterProperties::dirtyAll()
 }
 
 // Default constructor
-LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_id, const LLUUID& object_id) :
-	LLFloater(name, rect, title),
+LLFloaterProperties::LLFloaterProperties(const LLUUID& item_id, const LLUUID& object_id)
+  : LLFloater(),
 	mItemID(item_id),
 	mObjectID(object_id),
 	mDirty(TRUE)
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml");
-
+	
 	if (!sPropertiesObserver)
 	{
 		sPropertiesObserver = new LLPropertiesObserver;
@@ -168,6 +177,28 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect&
 	// add the object to the static structure
 	LLUUID key = mItemID ^ mObjectID;
 	sInstances.insert(instance_map::value_type(key, this));
+
+}
+
+// Destroys the object
+LLFloaterProperties::~LLFloaterProperties()
+{
+	// clean up the static data.
+	instance_map::iterator it = sInstances.find(mItemID ^ mObjectID);
+	if(it != sInstances.end())
+	{
+		sInstances.erase(it);
+	}
+	sPropertiesObserverCount--;
+	if (!sPropertiesObserverCount)
+	{
+		delete sPropertiesObserver;
+		sPropertiesObserver = NULL;
+	}
+}
+// virtual
+BOOL LLFloaterProperties::postBuild()
+{
 	// build the UI
 	// item name & description
 	childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidatePrintableNotPipe);
@@ -196,23 +227,8 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect&
 	childSetCommitCallback("EditPrice",&onCommitSaleInfo, this);
 	// The UI has been built, now fill in all the values
 	refresh();
-}
 
-// Destroys the object
-LLFloaterProperties::~LLFloaterProperties()
-{
-	// clean up the static data.
-	instance_map::iterator it = sInstances.find(mItemID ^ mObjectID);
-	if(it != sInstances.end())
-	{
-		sInstances.erase(it);
-	}
-	sPropertiesObserverCount--;
-	if (!sPropertiesObserverCount)
-	{
-		delete sPropertiesObserver;
-		sPropertiesObserver = NULL;
-	}
+	return TRUE;
 }
 
 void LLFloaterProperties::refresh()
@@ -372,8 +388,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
 	//////////////////
 	// ACQUIRE DATE //
 	//////////////////
-
-	// *TODO: Localize / translate this
+	
 	time_t time_utc = item->getCreationDate();
 	if (0 == time_utc)
 	{
@@ -381,7 +396,11 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
 	}
 	else
 	{
-		childSetText("LabelAcquiredDate", std::string(ctime(&time_utc)) );
+		std::string timeStr = getString("acquiredDate");
+		LLSD substitution;
+		substitution["datetime"] = (S32) time_utc;
+		LLStringUtil::format (timeStr, substitution);
+		childSetText ("LabelAcquiredDate", timeStr);
 	}
 
 	///////////////////////
@@ -938,7 +957,7 @@ void LLFloaterProperties::closeByID(const LLUUID& item_id, const LLUUID &object_
 
 	if (floaterp)
 	{
-		floaterp->close();
+		floaterp->closeFloater();
 	}
 }
 
@@ -946,8 +965,24 @@ void LLFloaterProperties::closeByID(const LLUUID& item_id, const LLUUID &object_
 /// LLMultiProperties
 ///----------------------------------------------------------------------------
 
-LLMultiProperties::LLMultiProperties(const LLRect &rect) : LLMultiFloater(std::string("Properties"), rect)
+LLMultiProperties::LLMultiProperties()
+	: LLMultiFloater()
 {
+	// *TODO: There should be a .xml file for this
+	const LLRect& nextrect = LLFloaterReg::getFloaterRect("properties"); // place where the next properties should show up
+	if (nextrect.getWidth() > 0)
+	{
+		setRect(nextrect);
+	}
+	else
+	{
+		// start with a small rect in the top-left corner ; will get resized
+		LLRect rect;
+		rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeight(), 20, 20);
+		setRect(rect);
+	}
+	setTitle(LLTrans::getString("MultiPropertiesTitle"));
+	buildTabContainer();
 }
 
 ///----------------------------------------------------------------------------
diff --git a/indra/newview/llfloaterproperties.h b/indra/newview/llfloaterproperties.h
index 2f5d97d384..d0e5abefb8 100644
--- a/indra/newview/llfloaterproperties.h
+++ b/indra/newview/llfloaterproperties.h
@@ -34,7 +34,7 @@
 #define LL_LLFLOATERPROPERTIES_H
 
 #include <map>
-#include "llfloater.h"
+#include "llmultifloater.h"
 #include "lliconctrl.h"
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -54,16 +54,16 @@ class LLFloaterProperties : public LLFloater
 {
 public:
 	static LLFloaterProperties* find(const LLUUID& item_id,
-									 const LLUUID& object_id);
+									 const LLUUID& object_id = LLUUID::null);
 	static LLFloaterProperties* show(const LLUUID& item_id,
-									 const LLUUID& object_id);
+									 const LLUUID& object_id = LLUUID::null);
 	static void dirtyAll();
 
 	static void closeByID(const LLUUID& item_id, const LLUUID& object_id);
 
-	LLFloaterProperties(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_id, const LLUUID& object_id);
+	LLFloaterProperties(const LLUUID& item_id, const LLUUID& object_id);
 	virtual ~LLFloaterProperties();
-
+	/*virtual*/ BOOL postBuild();
 	// do everything necessary
 	void dirty() { mDirty = TRUE; }
 	void refresh();
@@ -104,7 +104,7 @@ protected:
 class LLMultiProperties : public LLMultiFloater
 {
 public:
-	LLMultiProperties(const LLRect& rect);
+	LLMultiProperties();
 };
 
 #endif // LL_LLFLOATERPROPERTIES_H
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 06c1b2c12b..504760175b 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -64,6 +64,7 @@
 #include "lllineeditor.h"
 #include "llalertdialog.h"
 #include "llnamelistctrl.h"
+#include "llscrolllistitem.h"
 #include "llsliderctrl.h"
 #include "llspinctrl.h"
 #include "lltabcontainer.h"
@@ -80,6 +81,7 @@
 #include "llviewertexteditor.h"
 #include "llviewerwindow.h"
 #include "llvlcomposition.h"
+#include "lltrans.h"
 
 #define ELAR_ENABLED 0 // Enable when server support is implemented
 
@@ -161,8 +163,9 @@ bool estate_dispatch_initialized = false;
 LLUUID LLFloaterRegionInfo::sRequestInvoice;
 
 LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed)
+	: LLFloater()
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", NULL, FALSE);
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", FALSE);
 }
 
 BOOL LLFloaterRegionInfo::postBuild()
@@ -174,32 +177,32 @@ BOOL LLFloaterRegionInfo::postBuild()
 	panel = new LLPanelRegionGeneralInfo;
 	mInfoPanels.push_back(panel);
 	LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_general.xml");
-	mTab->addTabPanel(panel, panel->getLabel(), TRUE);
+	mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true));
 
 	panel = new LLPanelRegionDebugInfo;
 	mInfoPanels.push_back(panel);
 	LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_debug.xml");
-	mTab->addTabPanel(panel, panel->getLabel(), FALSE);
+	mTab->addTabPanel(panel);
 
 	panel = new LLPanelRegionTextureInfo;
 	mInfoPanels.push_back(panel);
 	LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_texture.xml");
-	mTab->addTabPanel(panel, panel->getLabel(), FALSE);
+	mTab->addTabPanel(panel);
 
 	panel = new LLPanelRegionTerrainInfo;
 	mInfoPanels.push_back(panel);
 	LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_terrain.xml");
-	mTab->addTabPanel(panel, panel->getLabel(), FALSE);
+	mTab->addTabPanel(panel);
 
 	panel = new LLPanelEstateInfo;
 	mInfoPanels.push_back(panel);
 	LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_estate.xml");
-	mTab->addTabPanel(panel, panel->getLabel(), FALSE);
+	mTab->addTabPanel(panel);
 
 	panel = new LLPanelEstateCovenant;
 	mInfoPanels.push_back(panel);
 	LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_covenant.xml");
-	mTab->addTabPanel(panel, panel->getLabel(), FALSE);
+	mTab->addTabPanel(panel);
 
 	gMessageSystem->setHandlerFunc(
 		"EstateOwnerMessage", 
@@ -212,22 +215,16 @@ LLFloaterRegionInfo::~LLFloaterRegionInfo()
 {
 }
 
-void LLFloaterRegionInfo::onOpen()
+void LLFloaterRegionInfo::onOpen(const LLSD& key)
 {
-	LLRect rect = gSavedSettings.getRect("FloaterRegionInfo");
-	S32 left, top;
-	gFloaterView->getNewFloaterPosition(&left, &top);
-	rect.translate(left,top);
-
 	refreshFromRegion(gAgent.getRegion());
 	requestRegionInfo();
-	LLFloater::onOpen();
 }
 
 // static
 void LLFloaterRegionInfo::requestRegionInfo()
 {
-	LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels");
+	LLTabContainer* tab = getChild<LLTabContainer>("region_panels");
 
 	tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE);
 	tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE);
@@ -436,6 +433,11 @@ void LLFloaterRegionInfo::refresh()
 // LLPanelRegionInfo
 //
 
+LLPanelRegionInfo::LLPanelRegionInfo()
+	: LLPanel()
+{
+}
+
 // static
 void LLPanelRegionInfo::onBtnSet(void* user_data)
 {
@@ -719,7 +721,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L
 // static
 void LLPanelRegionGeneralInfo::onClickManageTelehub(void* data)
 {
-	LLFloaterRegionInfo::getInstance()->close();
+	LLFloaterRegionInfo::getInstance()->closeFloater();
 
 	LLFloaterTelehub::show();
 }
@@ -1074,7 +1076,7 @@ BOOL LLPanelRegionTextureInfo::postBuild()
 		initCtrl(buffer);
 	}
 
-//	LLButton* btn = new LLButton("dump", LLRect(0, 20, 100, 0), "", onClickDump, this);
+//	LLButton* btn = ("dump", LLRect(0, 20, 100, 0), "", onClickDump, this);
 //	btn->setFollows(FOLLOWS_TOP|FOLLOWS_LEFT);
 //	addChild(btn);
 
@@ -1363,9 +1365,10 @@ void LLPanelRegionTerrainInfo::onClickUploadRaw(void* data)
 // static
 void LLPanelRegionTerrainInfo::onClickBakeTerrain(void* data)
 {
-	LLNotifications::instance().add(
-		LLNotification::Params("ConfirmBakeTerrain")
-		.functor(boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2)));
+	LLNotification::Params::Functor functor_params;
+	functor_params.function(boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2));
+
+	LLNotifications::instance().add(LLNotification::Params("ConfirmBakeTerrain").functor(functor_params));
 }
 
 bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, const LLSD& response)
@@ -1478,11 +1481,9 @@ void LLPanelEstateInfo::onClickRemoveAllowedAgent(void* user_data)
 	accessRemoveCore(ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, "EstateAllowedAgentRemove", "allowed_avatar_name_list");
 }
 
-// static
-void LLPanelEstateInfo::onClickAddAllowedGroup(void* user_data)
+void LLPanelEstateInfo::onClickAddAllowedGroup()
 {
-	LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data;
-	LLCtrlListInterface *list = self->childGetListInterface("allowed_group_name_list");
+	LLCtrlListInterface *list = childGetListInterface("allowed_group_name_list");
 	if (!list) return;
 	if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
 	{
@@ -1493,7 +1494,7 @@ void LLPanelEstateInfo::onClickAddAllowedGroup(void* user_data)
 	}
 
 	LLNotification::Params params("ChangeLindenAccess");
-	params.functor(boost::bind(&LLPanelEstateInfo::addAllowedGroup, self, _1, _2));
+	params.functor.function(boost::bind(&LLPanelEstateInfo::addAllowedGroup, this, _1, _2));
 	if (isLindenEstate())
 	{
 		LLNotifications::instance().add(params);
@@ -1515,7 +1516,7 @@ bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& re
 	widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
 	if (widget)
 	{
-		widget->setSelectCallback(addAllowedGroup2, NULL);
+		widget->setSelectGroupCallback(boost::bind(&LLPanelEstateInfo::addAllowedGroup2, this, _1));
 		if (parent_floater)
 		{
 			LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, widget);
@@ -1656,26 +1657,29 @@ bool LLPanelEstateInfo::kickUserConfirm(const LLSD& notification, const LLSD& re
 std::string all_estates_text()
 {
 	LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
-	if (!panel) return "(error)";
+	if (!panel) return "(" + LLTrans::getString("RegionInfoError") + ")";
 
+	LLStringUtil::format_map_t args;
 	std::string owner = panel->getOwnerName();
 
 	LLViewerRegion* region = gAgent.getRegion();
 	if (gAgent.isGodlike())
 	{
-		return llformat("all estates\nowned by %s", owner.c_str());
+		args["[OWNER]"] = owner.c_str();
+		return LLTrans::getString("RegionInfoAllEstatesOwnedBy", args);
 	}
 	else if (region && region->getOwner() == gAgent.getID())
 	{
-		return "all estates you own";
+		return LLTrans::getString("AllEstatesYouOwn");
 	}
 	else if (region && region->isEstateManager())
 	{
-		return llformat("all estates that\nyou manage for %s", owner.c_str());
+		args["[OWNER]"] = owner.c_str();
+		return LLTrans::getString("RegionInfoAllEstatesYouManage", args);
 	}
 	else
 	{
-		return "(error)";
+		return "(" + LLTrans::getString("RegionInfoError") + ")";
 	}
 }
 
@@ -1725,8 +1729,7 @@ struct LLEstateAccessChangeInfo
 };
 
 // Special case callback for groups, since it has different callback format than names
-// static
-void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void* user_data)
+void LLPanelEstateInfo::addAllowedGroup2(LLUUID id)
 {
 	LLSD payload;
 	payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD;
@@ -1739,7 +1742,7 @@ void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void* user_data)
 	LLNotification::Params params("EstateAllowedGroupAdd");
 	params.payload(payload)
 		.substitutions(args)
-		.functor(accessCoreConfirm);
+		.functor.function(accessCoreConfirm);
 	if (isLindenEstate())
 	{
 		LLNotifications::instance().forceResponse(params, 0);
@@ -1760,7 +1763,7 @@ void LLPanelEstateInfo::accessAddCore(U32 operation_flag, const std::string& dia
 
 	LLNotification::Params params("ChangeLindenAccess");
 	params.payload(payload)
-		.functor(accessAddCore2);
+		.functor.function(accessAddCore2);
 
 	if (isLindenEstate())
 	{
@@ -1848,7 +1851,7 @@ void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, co
 	LLNotification::Params params(change_info->mDialogName);
 	params.substitutions(args)
 		.payload(change_info->asLLSD())
-		.functor(accessCoreConfirm);
+		.functor.function(accessCoreConfirm);
 
 	if (isLindenEstate())
 	{
@@ -1888,7 +1891,7 @@ void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const std::string&
 	
 	LLNotification::Params params("ChangeLindenAccess");
 	params.payload(payload)
-		.functor(accessRemoveCore2);
+		.functor.function(accessRemoveCore2);
 
 	if (isLindenEstate())
 	{
@@ -2121,7 +2124,7 @@ BOOL LLPanelEstateInfo::postBuild()
 	initCtrl("limit_age_verified");
 	initCtrl("voice_chat_check");
 	childSetCommitCallback("abuse_email_address", onChangeAnything, this);
-	childSetKeystrokeCallback("abuse_email_address", onChangeText, this);
+	getChild<LLLineEditor>("abuse_email_address")->setKeystrokeCallback(onChangeText, this);
 
 	initHelpBtn("estate_manager_help",			"HelpEstateEstateManager");
 	initHelpBtn("use_global_time_help",			"HelpEstateUseGlobalTime");
@@ -2161,7 +2164,7 @@ BOOL LLPanelEstateInfo::postBuild()
 		group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
 	}
 
-	childSetAction("add_allowed_group_btn", onClickAddAllowedGroup, this);
+	getChild<LLUICtrl>("add_allowed_group_btn")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onClickAddAllowedGroup, this));
 	childSetAction("remove_allowed_group_btn", onClickRemoveAllowedGroup, this);
 
 	childSetCommitCallback("banned_avatar_name_list", onChangeChildCtrl, this);
@@ -2213,7 +2216,7 @@ BOOL LLPanelEstateInfo::sendUpdate()
 	llinfos << "LLPanelEsateInfo::sendUpdate()" << llendl;
 
 	LLNotification::Params params("ChangeLindenEstate");
-	params.functor(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2));
+	params.functor.function(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2));
 
 	if (getEstateID() <= ESTATE_LAST_LINDEN)
 	{
@@ -2556,8 +2559,7 @@ void LLPanelEstateInfo::callbackCacheName(
 	const LLUUID& id,
 	const std::string& first,
 	const std::string& last,
-	BOOL is_group,
-	void*)
+	BOOL is_group)
 {
 	LLPanelEstateInfo* self = LLFloaterRegionInfo::getPanelEstate();
 	if (!self) return;
@@ -2852,7 +2854,7 @@ void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp)
 	else
 	{
 		mAssetStatus = ASSET_LOADED;
-		setCovenantTextEditor("There is no Covenant provided for this Estate.");
+		setCovenantTextEditor(LLTrans::getString("RegionNoCovenant"));
 		sendChangeCovenantID(LLUUID::null);
 	}
 }
@@ -3063,7 +3065,7 @@ bool LLDispatchEstateUpdateInfo::operator()(
 	regionp->setOwner(owner_id);
 	// Update estate owner name in UI
 	const BOOL is_group = FALSE;
-	gCacheName->get(owner_id, is_group, LLPanelEstateInfo::callbackCacheName);
+	gCacheName->get(owner_id, is_group, &LLPanelEstateInfo::callbackCacheName);
 
 	U32 estate_id = strtoul(strings[2].c_str(), NULL, 10);
 	panel->setEstateID(estate_id);
@@ -3162,9 +3164,10 @@ bool LLDispatchSetEstateAccess::operator()(
 			totalAllowedAgents += allowed_agent_name_list->getItemCount();
 		}
 
-		std::string msg = llformat("Allowed residents: (%d, max %d)",
-									totalAllowedAgents,
-									ESTATE_MAX_ACCESS_IDS);
+		LLStringUtil::format_map_t args;
+		args["[ALLOWEDAGENTS]"] = llformat ("%d", totalAllowedAgents);
+		args["[MAXACCESS]"] = llformat ("%d", ESTATE_MAX_ACCESS_IDS);
+		std::string msg = LLTrans::getString("RegionInfoAllowedResidents", args);
 		panel->childSetValue("allow_resident_label", LLSD(msg));
 
 		if (allowed_agent_name_list)
@@ -3186,9 +3189,10 @@ bool LLDispatchSetEstateAccess::operator()(
 		LLNameListCtrl* allowed_group_name_list;
 		allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
 
-		std::string msg = llformat("Allowed groups: (%d, max %d)",
-									num_allowed_groups,
-									(S32) ESTATE_MAX_GROUP_IDS);
+		LLStringUtil::format_map_t args;
+		args["[ALLOWEDGROUPS]"] = llformat ("%d", num_allowed_groups);
+		args["[MAXACCESS]"] = llformat ("%d", ESTATE_MAX_GROUP_IDS);
+		std::string msg = LLTrans::getString("RegionInfoAllowedGroups", args);
 		panel->childSetValue("allow_group_label", LLSD(msg));
 
 		if (allowed_group_name_list)
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 806d1f57d6..b3a1fcb7ca 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -65,7 +65,7 @@ class LLFloaterRegionInfo : public LLFloater, public LLFloaterSingleton<LLFloate
 public:
 	~LLFloaterRegionInfo();
 
-	/*virtual*/ void onOpen();
+	/*virtual*/ void onOpen(const LLSD& key);
 	/*virtual*/ BOOL postBuild();
 
 	static void processEstateOwnerRequest(LLMessageSystem* msg, void**);
@@ -84,7 +84,7 @@ public:
 	// from LLPanel
 	virtual void refresh();
 	
-	static void requestRegionInfo();
+	void requestRegionInfo();
 
 protected:
 	LLFloaterRegionInfo(const LLSD& seed);
@@ -103,7 +103,8 @@ protected:
 class LLPanelRegionInfo : public LLPanel
 {
 public:
-	LLPanelRegionInfo() : LLPanel(std::string("Region Info Panel")) {}
+	LLPanelRegionInfo();
+	
 	static void onBtnSet(void* user_data);
 	static void onChangeChildCtrl(LLUICtrl* ctrl, void* user_data);
 	static void onChangeAnything(LLUICtrl* ctrl, void* user_data);
@@ -261,7 +262,7 @@ public:
 
 	static void onClickAddAllowedAgent(void* user_data);
 	static void onClickRemoveAllowedAgent(void* user_data);
-	static void onClickAddAllowedGroup(void* user_data);
+		   void onClickAddAllowedGroup();
 	static void onClickRemoveAllowedGroup(void* user_data);
 	static void onClickAddBannedAgent(void* user_data);
 	static void onClickRemoveBannedAgent(void* user_data);
@@ -271,7 +272,7 @@ public:
 
 	// Group picker callback is different, can't use core methods below
 	bool addAllowedGroup(const LLSD& notification, const LLSD& response);
-	static void addAllowedGroup2(LLUUID id, void* data);
+	void addAllowedGroup2(LLUUID id);
 
 	// Core methods for all above add/remove button clicks
 	static void accessAddCore(U32 operation_flag, const std::string& dialog_name);
@@ -339,8 +340,7 @@ public:
 		const LLUUID& id,
 		const std::string& first,
 		const std::string& last,
-		BOOL is_group,
-		void*);
+		BOOL is_group);
 
 protected:
 	virtual BOOL sendUpdate();
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 412494eeb3..8ddc929019 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -105,13 +105,9 @@ namespace {
 //-----------------------------------------------------------------------------
 // Member functions
 //-----------------------------------------------------------------------------
-LLFloaterReporter::LLFloaterReporter(
-	const std::string& name,
-	const LLRect& rect, 
-	const std::string& title, 
-	EReportType report_type)
-	:	
-	LLFloater(name, rect, title),
+								 
+LLFloaterReporter::LLFloaterReporter(EReportType report_type)
+:	LLFloater(),
 	mReportType(report_type),
 	mObjectID(),
 	mScreenID(),
@@ -122,37 +118,11 @@ LLFloaterReporter::LLFloaterReporter(
 	mCopyrightWarningSeen( FALSE ),
 	mResourceDatap(new LLResourceData())
 {
-	if (report_type == BUG_REPORT)
-	{
-		LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_bug.xml");
-	}
-	else
-	{
-		LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_abuse.xml");
-	}
-
-	childSetText("abuse_location_edit", gAgent.getSLURL() );
-
-	LLButton* pick_btn = getChild<LLButton>("pick_btn");
-	if (pick_btn)
-	{
-		// XUI: Why aren't these in viewerart.ini?
-		pick_btn->setImages( std::string("UIImgFaceUUID"),
-							std::string("UIImgFaceSelectedUUID") );
-		childSetAction("pick_btn", onClickObjPicker, this);
-	}
 
-	if (report_type != BUG_REPORT)
-	{
-		// abuser name is selected from a list
-		LLLineEditor* le = getChild<LLLineEditor>("abuser_name_edit");
-		le->setEnabled( FALSE );
-	}
-
-	childSetAction("select_abuser", onClickSelectAbuser, this);
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_abuse.xml");
+	
 
-	childSetAction("send_btn", onClickSend, this);
-	childSetAction("cancel_btn", onClickCancel, this);
+	childSetText("abuse_location_edit", gAgent.getSLURL() );
 
 	enableControls(TRUE);
 
@@ -182,18 +152,16 @@ LLFloaterReporter::LLFloaterReporter(
 
 	gDialogVisible = TRUE;
 
-	// only request details for abuse reports (not BUG reports)
-	if (report_type != BUG_REPORT)
-	{
-		// send a message and ask for information about this region - 
-		// result comes back in processRegionInfo(..)
-		LLMessageSystem* msg = gMessageSystem;
-		msg->newMessage("RequestRegionInfo");
-		msg->nextBlock("AgentData");
-		msg->addUUID("AgentID", gAgent.getID());
-		msg->addUUID("SessionID", gAgent.getSessionID());
-		gAgent.sendReliableMessage();
-	};
+
+	// send a message and ask for information about this region - 
+	// result comes back in processRegionInfo(..)
+	LLMessageSystem* msg = gMessageSystem;
+	msg->newMessage("RequestRegionInfo");
+	msg->nextBlock("AgentData");
+	msg->addUUID("AgentID", gAgent.getID());
+	msg->addUUID("SessionID", gAgent.getSessionID());
+	gAgent.sendReliableMessage();
+
 }
 
 // static
@@ -213,7 +181,25 @@ void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg)
 			LLNotifications::instance().add("HelpReportAbuseEmailLL");
 	};
 }
+// virtual
+BOOL LLFloaterReporter::postBuild()
+{
+	// abuser name is selected from a list
+	LLLineEditor* le = getChild<LLLineEditor>("abuser_name_edit");
+	le->setEnabled( FALSE );
 
+	setPosBox(mPosition.getValue());
+	LLButton* pick_btn = getChild<LLButton>("pick_btn");
+	pick_btn->setImages(std::string("tool_face.tga"),
+						std::string("tool_face_active.tga") );
+	childSetAction("pick_btn", onClickObjPicker, this);
+
+	childSetAction("select_abuser", onClickSelectAbuser, this);
+
+	childSetAction("send_btn", onClickSend, this);
+	childSetAction("cancel_btn", onClickCancel, this);
+	return TRUE;
+}
 // virtual
 LLFloaterReporter::~LLFloaterReporter()
 {
@@ -241,7 +227,7 @@ void LLFloaterReporter::draw()
 	// this is set by a static callback sometime after the dialog is created.
 	// Only disable screenshot for abuse reports to estate owners - bug reports always
 	// allow screenshots to be taken.
-	if ( gEmailToEstateOwner && ( mReportType != BUG_REPORT ) )
+	if ( gEmailToEstateOwner )
 	{
 		childSetValue("screen_check", FALSE );
 		childSetEnabled("screen_check", FALSE );
@@ -257,11 +243,7 @@ void LLFloaterReporter::draw()
 void LLFloaterReporter::enableControls(BOOL enable)
 {
 	childSetEnabled("category_combo", enable);
-	// bug reports never include the chat history
-	if (mReportType != BUG_REPORT)
-	{
-		childSetEnabled("chat_check", enable);
-	}
+	childSetEnabled("chat_check", enable);
 	childSetEnabled("screen_check",	enable);
 	childDisable("screenshot");
 	childSetEnabled("pick_btn",		enable);
@@ -332,7 +314,7 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
 				// we have to query the simulator for information 
 				// about this object
 				LLMessageSystem* msg = gMessageSystem;
-				U32 request_flags = (mReportType == BUG_REPORT) ? BUG_REPORT_REQUEST : COMPLAINT_REPORT_REQUEST;
+				U32 request_flags = COMPLAINT_REPORT_REQUEST;
 				msg->newMessageFast(_PREHASH_RequestObjectPropertiesFamily);
 				msg->nextBlockFast(_PREHASH_AgentData);
 				msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
@@ -363,15 +345,12 @@ void LLFloaterReporter::callbackAvatarID(const std::vector<std::string>& names,
 
 	if (ids.empty() || names.empty()) return;
 
-	// this should never be called in a bug report but here for safety.
-	if ( self->mReportType != BUG_REPORT )
-	{
-		self->childSetText("abuser_name_edit", names[0] );
-		
-		self->mAbuserID = ids[0];
+	self->childSetText("abuser_name_edit", names[0] );
+
+	self->mAbuserID = ids[0];
+
+	self->refresh();
 
-		self->refresh();
-	};
 }
 
 // static
@@ -386,9 +365,7 @@ void LLFloaterReporter::onClickSend(void *userdata)
 
 	if(self->validateReport())
 	{
-		// only show copyright alert for abuse reports
-		if ( self->mReportType != BUG_REPORT )
-		{
+
 			const int IP_CONTENT_REMOVAL = 66;
 			const int IP_PERMISSONS_EXPLOIT = 37;
 			LLComboBox* combo = self->getChild<LLComboBox>( "category_combo");
@@ -418,7 +395,7 @@ void LLFloaterReporter::onClickSend(void *userdata)
 				LLNotifications::instance().add("HelpReportAbuseContainsCopyright");
 				return;
 			}
-		}
+
 
 		LLUploadDialog::modalUploadDialog("Uploading...\n\nReport");
 		// *TODO don't upload image if checkbox isn't checked
@@ -427,7 +404,7 @@ void LLFloaterReporter::onClickSend(void *userdata)
 		if(!url.empty() || !sshot_url.empty())
 		{
 			self->sendReportViaCaps(url, sshot_url, self->gatherReport());
-			self->close();
+			self->closeFloater();
 		}
 		else
 		{
@@ -442,7 +419,7 @@ void LLFloaterReporter::onClickSend(void *userdata)
 			{
 				self->sendReportViaLegacy(self->gatherReport());
 				LLUploadDialog::modalUploadFinished();
-				self->close();
+				self->closeFloater();
 			}
 		}
 	}
@@ -461,7 +438,7 @@ void LLFloaterReporter::onClickCancel(void *userdata)
 	{
 		closePickTool(self);
 	}
-	self->close();
+	self->closeFloater();
 }
 
 
@@ -501,16 +478,13 @@ void LLFloaterReporter::showFromMenu(EReportType report_type)
 	{
 		// ...bring that window to front
 		LLFloaterReporter *f = gReporterInstances.getData(report_type);
-		f->open();		/* Flawfinder: ignore */
+		f->openFloater();
 	}
 	else
 	{
 		LLFloaterReporter *f;
-		if (BUG_REPORT == report_type)
-		{
-			f = LLFloaterReporter::createNewBugReporter();
-		}
-		else if (COMPLAINT_REPORT == report_type)
+
+		if (COMPLAINT_REPORT == report_type)
 		{
 			f = LLFloaterReporter::createNewAbuseReporter();
 		}
@@ -557,7 +531,7 @@ void LLFloaterReporter::showFromObject(const LLUUID& object_id)
 	// Need to deselect on close
 	f->mDeselectOnClose = TRUE;
 
-	f->open();		/* Flawfinder: ignore */
+	f->openFloater();
 }
 
 
@@ -575,21 +549,8 @@ LLFloaterReporter* LLFloaterReporter::getReporter(EReportType report_type)
 
 LLFloaterReporter* LLFloaterReporter::createNewAbuseReporter()
 {
-	return new LLFloaterReporter("complaint_reporter",
-						         LLRect(),
-								 "Report Abuse",
-								 COMPLAINT_REPORT);
-}
-
-//static
-LLFloaterReporter* LLFloaterReporter::createNewBugReporter()
-{
-	return new LLFloaterReporter("bug_reporter",
-				                 LLRect(),
- 					             "Report Bug",
-                     			 BUG_REPORT);
+	return new LLFloaterReporter(COMPLAINT_REPORT);
 }
-	
 
 
 void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id)
@@ -619,21 +580,26 @@ bool LLFloaterReporter::validateReport()
 		return false;
 	}
 
-	if ( mReportType != BUG_REPORT )
+
+	if ( childGetText("abuser_name_edit").empty() )
+	{
+		LLNotifications::instance().add("HelpReportAbuseAbuserNameEmpty");
+		return false;
+	};
+
+	if ( childGetText("abuse_location_edit").empty() )
+	{
+		LLNotifications::instance().add("HelpReportAbuseAbuserLocationEmpty");
+		return false;
+	};
+
+	if ( childGetText("abuse_location_edit").empty() )
 	{
-	  if ( childGetText("abuser_name_edit").empty() )
-	  {
-		  LLNotifications::instance().add("HelpReportAbuseAbuserNameEmpty");
-		  return false;
-	  };
-  
-	  if ( childGetText("abuse_location_edit").empty() )
-	  {
-		  LLNotifications::instance().add("HelpReportAbuseAbuserLocationEmpty");
-		  return false;
-	  };
+		LLNotifications::instance().add("HelpReportAbuseAbuserLocationEmpty");
+		return false;
 	};
 
+
 	if ( childGetText("summary_edit").empty() )
 	{
 		if ( mReportType != BUG_REPORT )
@@ -685,50 +651,34 @@ LLSD LLFloaterReporter::gatherReport()
 
 #if LL_WINDOWS
 	const char* platform = "Win";
-	const char* short_platform = "O:W";
 #elif LL_DARWIN
 	const char* platform = "Mac";
-	const char* short_platform = "O:M";
 #elif LL_LINUX
 	const char* platform = "Lnx";
-	const char* short_platform = "O:L";
 #elif LL_SOLARIS
 	const char* platform = "Sol";
 	const char* short_platform = "O:S";
 #else
 	const char* platform = "???";
-	const char* short_platform = "O:?";
 #endif
 
 
-	if ( mReportType == BUG_REPORT)
-	{
-		summary << short_platform << " V" << LL_VERSION_MAJOR << "."
-			<< LL_VERSION_MINOR << "."
-			<< LL_VERSION_PATCH << "."
-			<< LL_VIEWER_BUILD
-			<< " (" << regionp->getName() << ")"
-			<< "[" << category_name << "] "
-			<< "\"" << childGetValue("summary_edit").asString() << "\"";
-	}
-	else
-	{
-		summary << ""
-			<< " |" << regionp->getName() << "|"								// region reporter is currently in.
-			<< " (" << childGetText("abuse_location_edit") << ")"				// region abuse occured in (freeform text - no LLRegionPicker tool)
-			<< " [" << category_name << "] "									// updated category
-			<< " {" << childGetText("abuser_name_edit") << "} "					// name of abuse entered in report (chosen using LLAvatarPicker)
-			<< " \"" << childGetValue("summary_edit").asString() << "\"";		// summary as entered
-	};
+
+	summary << ""
+		<< " |" << regionp->getName() << "|"								// region reporter is currently in.
+		<< " (" << childGetText("abuse_location_edit") << ")"				// region abuse occured in (freeform text - no LLRegionPicker tool)
+		<< " [" << category_name << "] "									// updated category
+		<< " {" << childGetText("abuser_name_edit") << "} "					// name of abuse entered in report (chosen using LLAvatarPicker)
+		<< " \"" << childGetValue("summary_edit").asString() << "\"";		// summary as entered
+
 
 	std::ostringstream details;
-	if (mReportType != BUG_REPORT)
-	{
-		details << "V" << LL_VERSION_MAJOR << "."								// client version moved to body of email for abuse reports
-			<< LL_VERSION_MINOR << "."
-			<< LL_VERSION_PATCH << "."
-			<< LL_VIEWER_BUILD << std::endl << std::endl;
-	}
+
+	details << "V" << LL_VERSION_MAJOR << "."								// client version moved to body of email for abuse reports
+		<< LL_VERSION_MINOR << "."
+		<< LL_VERSION_PATCH << "."
+		<< LL_VIEWER_BUILD << std::endl << std::endl;
+
 	std::string object_name = childGetText("object_name");
 	std::string owner_name = childGetText("owner_name");
 	if (!object_name.empty() && !owner_name.empty())
@@ -737,11 +687,9 @@ LLSD LLFloaterReporter::gatherReport()
 		details << "Owner: " << owner_name << "\n";
 	}
 
-	if ( mReportType != BUG_REPORT )
-	{
-		details << "Abuser name: " << childGetText("abuser_name_edit") << " \n";
-		details << "Abuser location: " << childGetText("abuse_location_edit") << " \n";
-	};
+
+	details << "Abuser name: " << childGetText("abuser_name_edit") << " \n";
+	details << "Abuser location: " << childGetText("abuse_location_edit") << " \n";
 
 	details << childGetValue("details_edit").asString();
 
@@ -761,17 +709,11 @@ LLSD LLFloaterReporter::gatherReport()
 	LLUUID screenshot_id = LLUUID::null;
 	if (childGetValue("screen_check"))
 	{
-		if ( mReportType != BUG_REPORT )
-		{
-			if ( gEmailToEstateOwner == FALSE )
-			{
-				screenshot_id = childGetValue("screenshot");
-			}
-		}
-		else
+
+		if ( gEmailToEstateOwner == FALSE )
 		{
 			screenshot_id = childGetValue("screenshot");
-		};
+		}
 	};
 
 	LLSD report = LLSD::emptyMap();
@@ -891,12 +833,8 @@ void LLFloaterReporter::takeScreenshot()
 	mResourceDatap->mExpectedUploadCost = 0; // we expect that abuse screenshots are free
 	mResourceDatap->mAssetInfo.mTransactionID.generate();
 	mResourceDatap->mAssetInfo.mUuid = mResourceDatap->mAssetInfo.mTransactionID.makeAssetID(gAgent.getSecureSessionID());
-	if (BUG_REPORT == mReportType)
-	{
-		mResourceDatap->mAssetInfo.mType = LLAssetType::AT_TEXTURE;
-		mResourceDatap->mPreferredLocation = LLAssetType::EType(-1);
-	}
-	else if (COMPLAINT_REPORT == mReportType)
+
+	if (COMPLAINT_REPORT == mReportType)
 	{
 		mResourceDatap->mAssetInfo.mType = LLAssetType::AT_TEXTURE;
 		mResourceDatap->mPreferredLocation = LLAssetType::EType(-2);
@@ -927,7 +865,7 @@ void LLFloaterReporter::takeScreenshot()
 	{
 		texture->setImageAssetID(mResourceDatap->mAssetInfo.mUuid);
 		texture->setDefaultImageAssetID(mResourceDatap->mAssetInfo.mUuid);
-		texture->setCaption(std::string("Screenshot"));
+		texture->setCaption(getString("Screenshot"));
 	}
 
 }
@@ -967,11 +905,7 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data,
 	}
 
 	EReportType report_type = UNKNOWN_REPORT;
-	if (data->mPreferredLocation == -1)
-	{
-		report_type = BUG_REPORT;
-	}
-	else if (data->mPreferredLocation == -2)
+	if (data->mPreferredLocation == -2)
 	{
 		report_type = COMPLAINT_REPORT;
 	}
@@ -986,7 +920,7 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data,
 		self->mScreenID = uuid;
 		llinfos << "Got screen shot " << uuid << llendl;
 		self->sendReportViaLegacy(self->gatherReport());
-		self->close();
+		self->closeFloater();
 	}
 }
 
diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h
index 86bc60559e..da1dda9c78 100644
--- a/indra/newview/llfloaterreporter.h
+++ b/indra/newview/llfloaterreporter.h
@@ -82,12 +82,9 @@ class LLFloaterReporter
 :	public LLFloater
 {
 public:
-	LLFloaterReporter(const std::string& name, 
-					  const LLRect &rect, 
-					  const std::string& title, 
-					  EReportType = UNKNOWN_REPORT);
+	LLFloaterReporter(EReportType = UNKNOWN_REPORT);
 	/*virtual*/ ~LLFloaterReporter();
-
+	/*virtual*/ BOOL postBuild();
 	virtual void draw();
 
 	// Enables all buttons
@@ -107,7 +104,6 @@ public:
 	// returns a pointer to reporter of report_type
 	static LLFloaterReporter* getReporter(EReportType report_type);
 	static LLFloaterReporter* createNewAbuseReporter();
-	static LLFloaterReporter* createNewBugReporter();
 
 	// static
 	static void processRegionInfo(LLMessageSystem* msg);
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index bc774e77ac..b2bb343681 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -52,12 +52,17 @@
 //
 LLFloaterScriptDebug*	LLFloaterScriptDebug::sInstance = NULL;
 
+void* getOutputWindow(void* data);
+
 //
 // Member Functions
 //
-LLFloaterScriptDebug::LLFloaterScriptDebug() : 
-	LLMultiFloater()
+LLFloaterScriptDebug::LLFloaterScriptDebug(const std::string& filename)
+  : LLMultiFloater()
 {
+	mFactoryMap["all_scripts"] = LLCallbackMap(getOutputWindow, NULL);
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_debug.xml");
+
 	// avoid resizing of the window to match 
 	// the initial size of the tabbed-childs, whenever a tab is opened or closed
 	mAutoResize = FALSE;
@@ -73,8 +78,11 @@ void LLFloaterScriptDebug::show(const LLUUID& object_id)
 	LLFloater* floaterp = addOutputWindow(object_id);
 	if (sInstance)
 	{
-		sInstance->open();		/* Flawfinder: ignore */
-		sInstance->showFloater(floaterp);
+		sInstance->openFloater(object_id);
+		if (object_id.notNull())
+			sInstance->showFloater(floaterp, LLTabContainer::END);
+// 		else // Jump to [All scripts], but keep it on the left
+// 			sInstance->showFloater(floaterp, LLTabContainer::START);
 	}
 }
 
@@ -95,25 +103,19 @@ BOOL LLFloaterScriptDebug::postBuild()
 
 void* getOutputWindow(void* data)
 {
-	return new LLFloaterScriptDebugOutput();
+	return new LLFloaterScriptDebugOutput(LLUUID::null);
 }
 
 LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id)
 {
 	if (!sInstance)
 	{
-		sInstance = new LLFloaterScriptDebug();
-		LLCallbackMap::map_t factory_map;
-		factory_map["all_scripts"] = LLCallbackMap(getOutputWindow, NULL);
-		LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_script_debug.xml", &factory_map);
+		sInstance = new LLFloaterScriptDebug("floater_script_debug.xml");
 		sInstance->setVisible(FALSE);
 	}
 
-	LLFloater* floaterp = NULL;
 	LLFloater::setFloaterHost(sInstance);
-	{
-		floaterp = LLFloaterScriptDebugOutput::show(object_id);
-	}
+	LLFloater* floaterp = LLFloaterScriptDebugOutput::show(object_id);
 	LLFloater::setFloaterHost(NULL);
 
 	// Tabs sometimes overlap resize handle
@@ -155,54 +157,19 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
 
 std::map<LLUUID, LLFloaterScriptDebugOutput*> LLFloaterScriptDebugOutput::sInstanceMap;
 
-LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput()
-: mObjectID(LLUUID::null)
-{
-	sInstanceMap[mObjectID] = this;
-}
-
 LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLUUID& object_id)
-: LLFloater(std::string("script instance floater"), LLRect(0, 200, 200, 0), std::string("Script"), TRUE), mObjectID(object_id)
+  : LLFloater(),
+	mObjectID(object_id)
 {
-	S32 y = getRect().getHeight() - LLFLOATER_HEADER_SIZE - LLFLOATER_VPAD;
-	S32 x = LLFLOATER_HPAD;
-	// History editor
-	// Give it a border on the top
-	LLRect history_editor_rect(
-		x,
-		y,
-		getRect().getWidth() - LLFLOATER_HPAD,
-				LLFLOATER_VPAD );
-	mHistoryEditor = new LLViewerTextEditor( std::string("Chat History Editor"), 
-										history_editor_rect, S32_MAX, LLStringUtil::null, LLFontGL::getFontSansSerif());
-	mHistoryEditor->setWordWrap( TRUE );
-	mHistoryEditor->setFollowsAll();
-	mHistoryEditor->setEnabled( FALSE );
-	mHistoryEditor->setTabStop( TRUE );  // We want to be able to cut or copy from the history.
-	addChild(mHistoryEditor);
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_debug_panel.xml");
+	sInstanceMap[object_id] = this;
 }
 
-void LLFloaterScriptDebugOutput::initFloater(const std::string& title, BOOL resizable, 
-						S32 min_width, S32 min_height, BOOL drag_on_left,
-						BOOL minimizable, BOOL close_btn)
+BOOL LLFloaterScriptDebugOutput::postBuild()
 {
-	LLFloater::initFloater(title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
-	S32 y = getRect().getHeight() - LLFLOATER_HEADER_SIZE - LLFLOATER_VPAD;
-	S32 x = LLFLOATER_HPAD;
-	// History editor
-	// Give it a border on the top
-	LLRect history_editor_rect(
-		x,
-		y,
-		getRect().getWidth() - LLFLOATER_HPAD,
-				LLFLOATER_VPAD );
-	mHistoryEditor = new LLViewerTextEditor( std::string("Chat History Editor"), 
-										history_editor_rect, S32_MAX, LLStringUtil::null, LLFontGL::getFontSansSerif());
-	mHistoryEditor->setWordWrap( TRUE );
-	mHistoryEditor->setFollowsAll();
-	mHistoryEditor->setEnabled( FALSE );
-	mHistoryEditor->setTabStop( TRUE );  // We want to be able to cut or copy from the history.
-	addChild(mHistoryEditor);
+	LLFloater::postBuild();
+	mHistoryEditor = getChild<LLViewerTextEditor>("Chat History Editor");
+	return TRUE;
 }
 
 LLFloaterScriptDebugOutput::~LLFloaterScriptDebugOutput()
@@ -214,13 +181,13 @@ void LLFloaterScriptDebugOutput::addLine(const std::string &utf8mesg, const std:
 {
 	if (mObjectID.isNull())
 	{
-		//setTitle("[All scripts]");
 		setCanTearOff(FALSE);
 		setCanClose(FALSE);
 	}
 	else
 	{
 		setTitle(user_name);
+		setShortTitle(user_name);
 	}
 
 	mHistoryEditor->appendColoredText(utf8mesg, false, true, color);
@@ -234,8 +201,7 @@ LLFloaterScriptDebugOutput* LLFloaterScriptDebugOutput::show(const LLUUID& objec
 	if (found_it == sInstanceMap.end())
 	{
 		floaterp = new LLFloaterScriptDebugOutput(object_id);
-		sInstanceMap[object_id] = floaterp;
-		floaterp->open();		/* Flawfinder: ignore*/
+		floaterp->openFloater();
 	}
 	else
 	{
diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h
index 59c0ba1c8b..5f2cf48125 100644
--- a/indra/newview/llfloaterscriptdebug.h
+++ b/indra/newview/llfloaterscriptdebug.h
@@ -33,7 +33,7 @@
 #ifndef LL_LLFLOATERSCRIPTDEBUG_H
 #define LL_LLFLOATERSCRIPTDEBUG_H
 
-#include "llfloater.h"
+#include "llmultifloater.h"
 
 class LLTextEditor;
 class LLUUID;
@@ -48,7 +48,7 @@ public:
 	static void addScriptLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color, const LLUUID& source_id);
 
 protected:
-	LLFloaterScriptDebug();
+	LLFloaterScriptDebug(const std::string& filename);
 
 	static LLFloater* addOutputWindow(const LLUUID& object_id);
 
@@ -63,12 +63,10 @@ public:
 	LLFloaterScriptDebugOutput(const LLUUID& object_id);
 	~LLFloaterScriptDebugOutput();
 
-	virtual void		initFloater(const std::string& title, BOOL resizable, 
-						S32 min_width, S32 min_height, BOOL drag_on_left,
-						BOOL minimizable, BOOL close_btn);
-
 	void addLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color);
 
+	virtual BOOL postBuild();
+	
 	static LLFloaterScriptDebugOutput* show(const LLUUID& object_id);
 	static LLFloaterScriptDebugOutput* getFloaterByID(const LLUUID& id);
 
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index 92e070f766..6775e218cb 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -88,7 +88,6 @@ private:
 
 public:
 	virtual BOOL postBuild();
-	virtual void onClose(bool app_quitting);
 	
 	static LLFloaterSellLandUI* soleInstance(bool createIfNeeded);
 
@@ -109,7 +108,7 @@ void LLFloaterSellLand::sellLand(
 	LLFloaterSellLandUI* ui = LLFloaterSellLandUI::soleInstance(true);
 	if (ui->setParcel(region, parcel))
 	{
-		ui->open();		/* Flawfinder: ignore */
+		ui->openFloater();
 	}
 }
 
@@ -139,7 +138,7 @@ LLFloaterSellLandUI* LLFloaterSellLandUI::soleInstance(bool createIfNeeded)
 }
 
 LLFloaterSellLandUI::LLFloaterSellLandUI()
-:	LLFloater(std::string("Sell Land")),
+:	LLFloater(),
 	mRegion(0)
 {
 }
@@ -159,7 +158,7 @@ void LLFloaterSellLandUI::SelectionObserver::changed()
 	{
 		if (LLViewerParcelMgr::getInstance()->selectionEmpty())
 		{
-			ui->close();
+			ui->closeFloater();
 		}
 		else {
 			ui->setParcel(
@@ -169,12 +168,6 @@ void LLFloaterSellLandUI::SelectionObserver::changed()
 	}
 }
 
-void LLFloaterSellLandUI::onClose(bool app_quitting)
-{
-	LLFloater::onClose(app_quitting);
-	destroy();
-}
-
 BOOL LLFloaterSellLandUI::postBuild()
 {
 	childSetCommitCallback("sell_to", onChangeValue, this);
@@ -432,7 +425,7 @@ void LLFloaterSellLandUI::callbackAvatarPick(const std::vector<std::string>& nam
 void LLFloaterSellLandUI::doCancel(void *userdata)
 {
 	LLFloaterSellLandUI* self = (LLFloaterSellLandUI*)userdata;
-	self->close();
+	self->closeFloater();
 }
 
 // static
@@ -490,7 +483,7 @@ void LLFloaterSellLandUI::doSellLand(void *userdata)
 
 	LLNotification::Params params("ConfirmLandSaleChange");
 	params.substitutions(args)
-		.functor(boost::bind(&LLFloaterSellLandUI::onConfirmSale, self, _1, _2));
+		.functor.function(boost::bind(&LLFloaterSellLandUI::onConfirmSale, self, _1, _2));
 
 	if (sell_to_anyone)
 	{
@@ -556,6 +549,6 @@ bool LLFloaterSellLandUI::onConfirmSale(const LLSD& notification, const LLSD& re
 	// Send update to server
 	LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
 
-	close();
+	closeFloater();
 	return false;
 }
diff --git a/indra/newview/llfloatersellland.h b/indra/newview/llfloatersellland.h
index 1b3a33ebb8..12b0ecbcef 100644
--- a/indra/newview/llfloatersellland.h
+++ b/indra/newview/llfloatersellland.h
@@ -31,7 +31,8 @@
 
 #ifndef LL_LLFLOATERSELLLAND_H
 #define LL_LLFLOATERSELLLAND_H
-#include "llmemory.h"
+
+#include "llsafehandle.h"
 
 class LLParcel;
 class LLViewerRegion;
diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp
index 2677467611..9b591496f7 100644
--- a/indra/newview/llfloatersettingsdebug.cpp
+++ b/indra/newview/llfloatersettingsdebug.cpp
@@ -40,16 +40,15 @@
 #include "llcolorswatch.h"
 #include "llviewercontrol.h"
 
-LLFloaterSettingsDebug* LLFloaterSettingsDebug::sInstance = NULL;
 
-LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater(std::string("Configuration Editor"))
+LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) 
+:	LLFloater()
 {
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml");
 }
 
 LLFloaterSettingsDebug::~LLFloaterSettingsDebug()
-{
-	sInstance = NULL;
-}
+{}
 
 BOOL LLFloaterSettingsDebug::postBuild()
 {
@@ -70,27 +69,19 @@ BOOL LLFloaterSettingsDebug::postBuild()
 
 	gSavedSettings.applyToAll(&func);
 	gSavedPerAccountSettings.applyToAll(&func);
-	gColors.applyToAll(&func);
+	gSavedSkinSettings.applyToAll(&func);
 
 	settings_combo->sortByName();
-	settings_combo->setCommitCallback(onSettingSelect);
-	settings_combo->setCallbackUserData(this);
+	settings_combo->setCommitCallback(onSettingSelect, this);
 	settings_combo->updateSelection();
 
-	childSetCommitCallback("val_spinner_1", onCommitSettings);
-	childSetUserData("val_spinner_1", this);
-	childSetCommitCallback("val_spinner_2", onCommitSettings);
-	childSetUserData("val_spinner_2", this);
-	childSetCommitCallback("val_spinner_3", onCommitSettings);
-	childSetUserData("val_spinner_3", this);
-	childSetCommitCallback("val_spinner_4", onCommitSettings);
-	childSetUserData("val_spinner_4", this);
-	childSetCommitCallback("val_text", onCommitSettings);
-	childSetUserData("val_text", this);
-	childSetCommitCallback("boolean_combo", onCommitSettings);
-	childSetUserData("boolean_combo", this);
-	childSetCommitCallback("color_swatch", onCommitSettings);
-	childSetUserData("color_swatch", this);
+	childSetCommitCallback("val_spinner_1", onCommitSettings, this);
+	childSetCommitCallback("val_spinner_2", onCommitSettings, this);
+	childSetCommitCallback("val_spinner_3", onCommitSettings, this);
+	childSetCommitCallback("val_spinner_4", onCommitSettings, this);
+	childSetCommitCallback("val_text", onCommitSettings, this);
+	childSetCommitCallback("boolean_combo", onCommitSettings, this);
+	childSetCommitCallback("color_swatch", onCommitSettings, this);
 	childSetAction("default_btn", onClickDefault, this);
 	mComment = getChild<LLTextEditor>("comment_text");
 	return TRUE;
@@ -105,19 +96,6 @@ void LLFloaterSettingsDebug::draw()
 	LLFloater::draw();
 }
 
-//static
-void LLFloaterSettingsDebug::show(void*)
-{
-	if (sInstance == NULL)
-	{
-		sInstance = new LLFloaterSettingsDebug();
-
-		LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_settings_debug.xml");
-	}
-
-	sInstance->open();		/* Flawfinder: ignore */
-}
-
 //static 
 void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data)
 {
@@ -192,12 +170,6 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
 		//col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal();
 		//controlp->set(col3.getValue());
 		break;
-	  case TYPE_COL4U:
-		col3.setValue(floaterp->childGetValue("color_swatch"));
-		col4U.setVecScaleClamp(col3);
-		col4U.mV[VALPHA] = floaterp->childGetValue("val_spinner_4").asInteger();
-		controlp->set(col4U.getValue());
-		break;
 	  default:
 		break;
 	}
@@ -464,29 +436,6 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
 			color_swatch->setValue(sd);
 			break;
 		  }
-		  case TYPE_COL4U:
-		  {
-			LLColor4U clr;
-			clr.setValue(sd);
-			color_swatch->setVisible(TRUE);
-			if(LLColor4(clr) != LLColor4(color_swatch->getValue()))
-			{
-				color_swatch->set(LLColor4(clr), TRUE, FALSE);
-			}
-			spinner4->setVisible(TRUE);
-			spinner4->setLabel(std::string("Alpha"));
-			if(!spinner4->hasFocus())
-			{
-				spinner4->setPrecision(0);
-				spinner4->setValue(clr.mV[VALPHA]);
-			}
-
-			spinner4->setMinValue(0);
-			spinner4->setMaxValue(255);
-			spinner4->setIncrement(1.f);
-
-			break;
-		  }
 		  default:
 			mComment->setText(std::string("unknown"));
 			break;
diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h
index e08e6b5d74..1190e8038f 100644
--- a/indra/newview/llfloatersettingsdebug.h
+++ b/indra/newview/llfloatersettingsdebug.h
@@ -37,10 +37,12 @@
 #include "llfloater.h"
 #include "lltexteditor.h"
 
-class LLFloaterSettingsDebug : public LLFloater
+class LLFloaterSettingsDebug 
+:	public LLFloater, 
+	public LLFloaterSingleton<LLFloaterSettingsDebug>
 {
 public:
-	LLFloaterSettingsDebug();
+	LLFloaterSettingsDebug(const LLSD& key);
 	virtual ~LLFloaterSettingsDebug();
 
 	virtual BOOL postBuild();
@@ -48,13 +50,11 @@ public:
 
 	void updateControl(LLControlVariable* control);
 
-	static void show(void*);
 	static void onSettingSelect(LLUICtrl* ctrl, void* user_data);
 	static void onCommitSettings(LLUICtrl* ctrl, void* user_data);
 	static void onClickDefault(void* user_data);
 
 protected:
-	static LLFloaterSettingsDebug* sInstance;
 	LLTextEditor* mComment;
 };
 
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 34dbce67c2..74b7ee1106 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -34,15 +34,9 @@
 
 #include "llfloatersnapshot.h"
 
-#include "llfontgl.h"
-#include "llsys.h"
-#include "llgl.h"
-#include "llrender.h"
-#include "v3dmath.h"
-#include "llmath.h"
-#include "lldir.h"
-#include "llsdserialize.h"
+#include "llfloaterreg.h"
 
+// Viewer includes
 #include "llagent.h"
 #include "llcallbacklist.h"
 #include "llcriticaldamp.h"
@@ -67,14 +61,24 @@
 #include "lltoolmgr.h"
 #include "llworld.h"
 
+// Linden library includes
+#include "llfontgl.h"
+#include "llsys.h"
+#include "llrender.h"
+#include "v3dmath.h"
+#include "llmath.h"
+#include "lldir.h"
+#include "llsdserialize.h"
 #include "llgl.h"
 #include "llglheaders.h"
 #include "llimagejpeg.h"
 #include "llimagepng.h"
 #include "llimagebmp.h"
 #include "llimagej2c.h"
+#include "llresmgr.h"		// LLLocale
 #include "llvfile.h"
 #include "llvfs.h"
+#include "llwindow.h"
 
 ///----------------------------------------------------------------------------
 /// Local function declarations, constants, enums, and typedefs
@@ -85,8 +89,6 @@ S32 LLFloaterSnapshot::sUIWinWidth = 215 ;
 
 LLSnapshotFloaterView* gSnapshotFloaterView = NULL;
 
-LLFloaterSnapshot* LLFloaterSnapshot::sInstance = NULL;
-
 const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
 
 F32 SHINE_TIME = 0.5f;
@@ -112,7 +114,17 @@ public:
 	};
 
 
-	LLSnapshotLivePreview(const LLRect& rect);
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Params()
+		{
+			name = "snapshot_live_preview";
+			mouse_opaque = false;
+		}
+	};
+
+
+	LLSnapshotLivePreview(const LLSnapshotLivePreview::Params& p);
 	~LLSnapshotLivePreview();
 
 	/*virtual*/ void draw();
@@ -200,8 +212,9 @@ public:
 };
 
 std::set<LLSnapshotLivePreview*> LLSnapshotLivePreview::sList;
-LLSnapshotLivePreview::LLSnapshotLivePreview (const LLRect& rect) : 
-	LLView(std::string("snapshot_live_preview"), rect, FALSE), 
+
+LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Params& p) 
+:	LLView(p),
 	mColor(1.f, 0.f, 0.f, 0.5f), 
 	mCurImageIndex(0),
 	mPreviewImage(NULL),
@@ -472,10 +485,6 @@ void LLSnapshotLivePreview::draw()
 		}
 		else if (mShineAnimTimer.getStarted())
 		{
-			//LLDebugVarMessageBox::show("Shine time", &SHINE_TIME, 10.f, 0.1f);
-			//LLDebugVarMessageBox::show("Shine width", &SHINE_WIDTH, 2.f, 0.05f);
-			//LLDebugVarMessageBox::show("Shine opacity", &SHINE_OPACITY, 1.f, 0.05f);
-
 			F32 shine_interp = llmin(1.f, mShineAnimTimer.getElapsedTimeF32() / SHINE_TIME);
 			
 			// draw "shine" effect
@@ -1053,9 +1062,6 @@ public:
 	static void updateLayout(LLFloaterSnapshot* floater);
 	static void updateResolutionTextEntry(LLFloaterSnapshot* floater);
 
-	static LLHandle<LLView> sPreviewHandle;
-	static BOOL         sAspectRatioCheckOff ;
-	
 private:
 	static LLSnapshotLivePreview::ESnapshotType getTypeIndex(LLFloaterSnapshot* floater);
 	static ESnapshotFormat getFormatIndex(LLFloaterSnapshot* floater);
@@ -1068,18 +1074,14 @@ public:
 	std::vector<LLAnimPauseRequest> mAvatarPauseHandles;
 
 	LLToolset*	mLastToolset;
+	LLHandle<LLView> mPreviewHandle;
+	BOOL mAspectRatioCheckOff ;
 };
 
-// static
-LLHandle<LLView> LLFloaterSnapshot::Impl::sPreviewHandle;
-
-//static 
-BOOL LLFloaterSnapshot::Impl::sAspectRatioCheckOff = FALSE ;
-
 // static
 LLSnapshotLivePreview* LLFloaterSnapshot::Impl::getPreviewView(LLFloaterSnapshot *floater)
 {
-	LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)sPreviewHandle.get();
+	LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)floater->impl.mPreviewHandle.get();
 	return previewp;
 }
 
@@ -1186,7 +1188,7 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
 			iter != LLCharacter::sInstances.end(); ++iter)
 		{
 			avatarp = *iter;
-			sInstance->impl.mAvatarPauseHandles.push_back(avatarp->requestPause());
+			floaterp->impl.mAvatarPauseHandles.push_back(avatarp->requestPause());
 		}
 
 		// freeze everything else
@@ -1194,7 +1196,7 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
 
 		if (LLToolMgr::getInstance()->getCurrentToolset() != gCameraToolset)
 		{
-			sInstance->impl.mLastToolset = LLToolMgr::getInstance()->getCurrentToolset();
+			floaterp->impl.mLastToolset = LLToolMgr::getInstance()->getCurrentToolset();
 			LLToolMgr::getInstance()->setCurrentToolset(gCameraToolset);
 		}
 	}
@@ -1209,15 +1211,15 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
 		}
 
 		//RN: thaw all avatars
-		sInstance->impl.mAvatarPauseHandles.clear();
+		floaterp->impl.mAvatarPauseHandles.clear();
 
 		// thaw everything else
 		gSavedSettings.setBOOL("FreezeTime", FALSE);
 
 		// restore last tool (e.g. pie menu, etc)
-		if (sInstance->impl.mLastToolset)
+		if (floaterp->impl.mLastToolset)
 		{
-			LLToolMgr::getInstance()->setCurrentToolset(sInstance->impl.mLastToolset);
+			LLToolMgr::getInstance()->setCurrentToolset(floaterp->impl.mLastToolset);
 		}
 	}
 }
@@ -1248,7 +1250,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
 	floater->childSetVisible("upload_btn",			shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE);
 	floater->childSetVisible("send_btn",			shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD);
 	floater->childSetVisible("save_btn",			shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
-	floater->childSetEnabled("keep_aspect_check",	shot_type != LLSnapshotLivePreview::SNAPSHOT_TEXTURE && !sAspectRatioCheckOff);
+	floater->childSetEnabled("keep_aspect_check",	shot_type != LLSnapshotLivePreview::SNAPSHOT_TEXTURE && !floater->impl.mAspectRatioCheckOff);
 	floater->childSetEnabled("layer_types",			shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
 
 	BOOL is_advance = gSavedSettings.getBOOL("AdvanceSnapshot");
@@ -1295,7 +1297,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
 	floater->childSetColor("file_size_label", 
 		shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD 
 		&& got_bytes
-		&& previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLColor4::red : gColors.getColor( "LabelTextColor" ));
+		&& previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLColor4::red : LLUI::sSettingGroups["color"]->getColor( "LabelTextColor" ));
 
 	switch(shot_type)
 	{
@@ -1369,7 +1371,7 @@ void LLFloaterSnapshot::Impl::onClickDiscard(void* data)
 	LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
 	if (view)
 	{
-		view->close();
+		view->closeFloater();
 	}
 }
 
@@ -1415,7 +1417,7 @@ void LLFloaterSnapshot::Impl::onClickKeep(void* data)
 
 		if (gSavedSettings.getBOOL("CloseSnapshotOnKeep"))
 		{
-			view->close();
+			view->closeFloater();
 		}
 		else
 		{
@@ -1596,7 +1598,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
 	
 	if(0 == index) //current window size
 	{
-		sAspectRatioCheckOff = TRUE ;
+		view->impl.mAspectRatioCheckOff = TRUE ;
 		view->childSetEnabled("keep_aspect_check", FALSE) ;
 
 		if(previewp)
@@ -1606,7 +1608,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
 	}
 	else if(-1 == index) //custom
 	{
-		sAspectRatioCheckOff = FALSE ;
+		view->impl.mAspectRatioCheckOff = FALSE ;
 		//if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE != gSavedSettings.getS32("LastSnapshotType"))
 		{
 			view->childSetEnabled("keep_aspect_check", TRUE) ;
@@ -1619,7 +1621,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
 	}
 	else
 	{
-		sAspectRatioCheckOff = TRUE ;
+		view->impl.mAspectRatioCheckOff = TRUE ;
 		view->childSetEnabled("keep_aspect_check", FALSE) ;
 
 		if(previewp)
@@ -1955,21 +1957,17 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat
 ///----------------------------------------------------------------------------
 
 // Default constructor
-LLFloaterSnapshot::LLFloaterSnapshot()
-	: LLFloater(std::string("Snapshot Floater")),
+LLFloaterSnapshot::LLFloaterSnapshot(const LLSD& key)
+	: LLFloater(key),
 	  impl (*(new Impl))
 {
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_snapshot.xml", FALSE);
 }
 
 // Destroys the object
 LLFloaterSnapshot::~LLFloaterSnapshot()
 {
-	if (sInstance == this)
-	{
-		LLView::deleteViewByHandle(Impl::sPreviewHandle);
-		Impl::sPreviewHandle = LLHandle<LLView>();
-		sInstance = NULL;
-	}
+	LLView::deleteViewByHandle(impl.mPreviewHandle);
 
 	//unfreeze everything else
 	gSavedSettings.setBOOL("FreezeTime", FALSE);
@@ -2034,16 +2032,22 @@ BOOL LLFloaterSnapshot::postBuild()
 	childSetCommitCallback("local_size_combo", Impl::onCommitResolution, this);
 
 	// create preview window
-	LLRect full_screen_rect = sInstance->getRootView()->getRect();
-	LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(full_screen_rect);
-	sInstance->getRootView()->removeChild(gSnapshotFloaterView);
+	LLRect full_screen_rect = getRootView()->getRect();
+	LLSnapshotLivePreview::Params p;
+	p.rect(full_screen_rect);
+	LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p);
+	getRootView()->removeChild(gSnapshotFloaterView);
 	// make sure preview is below snapshot floater
-	sInstance->getRootView()->addChild(previewp);
-	sInstance->getRootView()->addChild(gSnapshotFloaterView);
-
-	Impl::sPreviewHandle = previewp->getHandle();
+	getRootView()->addChild(previewp);
+	getRootView()->addChild(gSnapshotFloaterView);
+	
+	//move snapshot floater to special purpose snapshotfloaterview
+	gFloaterView->removeChild(this);
+	gSnapshotFloaterView->addChild(this);
 
+	impl.mPreviewHandle = previewp->getHandle();
 	impl.updateControls(this);
+	impl.updateLayout(this);
 	
 	return TRUE;
 }
@@ -2077,54 +2081,34 @@ void LLFloaterSnapshot::draw()
 	}
 }
 
-void LLFloaterSnapshot::onClose(bool app_quitting)
-{
-	gSnapshotFloaterView->setEnabled(FALSE);
-	// Set invisible so it doesn't eat tooltips. JC
-	gSnapshotFloaterView->setVisible(FALSE);
-	destroy();
-}
-
-// static
-void LLFloaterSnapshot::show(void*)
+void LLFloaterSnapshot::onOpen(const LLSD& key)
 {
-	if (!sInstance)
-	{
-		sInstance = new LLFloaterSnapshot();
-		LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_snapshot.xml", NULL, FALSE);
-		//move snapshot floater to special purpose snapshotfloaterview
-		gFloaterView->removeChild(sInstance);
-		gSnapshotFloaterView->addChild(sInstance);
-
-		sInstance->impl.updateLayout(sInstance);
-	}
-	else // just refresh the snapshot in the existing floater instance (DEV-12255)
+	LLSnapshotLivePreview* preview = LLFloaterSnapshot::Impl::getPreviewView(this);
+	if(preview)
 	{
-		LLSnapshotLivePreview* preview = LLFloaterSnapshot::Impl::getPreviewView(sInstance);
-		if(preview)
-		{
-			preview->updateSnapshot(TRUE);
-		}
+		preview->updateSnapshot(TRUE);
 	}
-	
-	sInstance->open();		/* Flawfinder: ignore */
-	sInstance->focusFirstItem(FALSE);
+	focusFirstItem(FALSE);
 	gSnapshotFloaterView->setEnabled(TRUE);
 	gSnapshotFloaterView->setVisible(TRUE);
-	gSnapshotFloaterView->adjustToFitScreen(sInstance, FALSE);
+	gSnapshotFloaterView->adjustToFitScreen(this, FALSE);
 }
 
-void LLFloaterSnapshot::hide(void*)
+void LLFloaterSnapshot::onClose(bool app_quitting)
 {
-	if (sInstance && !sInstance->isDead())
-	{
-		sInstance->close();
-	}
+	gSnapshotFloaterView->setEnabled(FALSE);
+	// Set invisible so it doesn't eat tooltips. JC
+	gSnapshotFloaterView->setVisible(FALSE);
+	destroy();
 }
 
 //static 
 void LLFloaterSnapshot::update()
 {
+	LLFloaterSnapshot* inst = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+	if (!inst)
+		return;
+	
 	BOOL changed = FALSE;
 	for (std::set<LLSnapshotLivePreview*>::iterator iter = LLSnapshotLivePreview::sList.begin();
 		 iter != LLSnapshotLivePreview::sList.end(); ++iter)
@@ -2133,7 +2117,7 @@ void LLFloaterSnapshot::update()
 	}
 	if(changed)
 	{
-		sInstance->impl.updateControls(sInstance);
+		inst->impl.updateControls(inst);
 	}
 }
 
@@ -2142,10 +2126,8 @@ void LLFloaterSnapshot::update()
 /// Class LLSnapshotFloaterView
 ///----------------------------------------------------------------------------
 
-LLSnapshotFloaterView::LLSnapshotFloaterView( const std::string& name, const LLRect& rect ) : LLFloaterView(name, rect)
+LLSnapshotFloaterView::LLSnapshotFloaterView (const Params& p) : LLFloaterView (p)
 {
-	setMouseOpaque(TRUE);
-	setEnabled(FALSE);
 }
 
 LLSnapshotFloaterView::~LLSnapshotFloaterView()
diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h
index 14f1872cd1..1333497bd2 100644
--- a/indra/newview/llfloatersnapshot.h
+++ b/indra/newview/llfloatersnapshot.h
@@ -35,10 +35,6 @@
 
 #include "llfloater.h"
 
-#include "llmemory.h"
-#include "llimagegl.h"
-#include "llcharacter.h"
-
 
 class LLFloaterSnapshot : public LLFloater
 {
@@ -50,17 +46,16 @@ public:
 		SNAPSHOT_FORMAT_BMP
 	} ESnapshotFormat;
 
-	LLFloaterSnapshot();
+	LLFloaterSnapshot(const LLSD& key);
 	virtual ~LLFloaterSnapshot();
-
+    
 	/*virtual*/ BOOL postBuild();
 	/*virtual*/ void draw();
+	/*virtual*/ void onOpen(const LLSD& key);
 	/*virtual*/ void onClose(bool app_quitting);
-
-	static void show(void*);
-	static void hide(void*);
+	
 	static void update();
-
+	
 	static S32  getUIWinHeightLong()  {return sUIWinHeightLong ;}
 	static S32  getUIWinHeightShort() {return sUIWinHeightShort ;}
 	static S32  getUIWinWidth()       {return sUIWinWidth ;}
@@ -69,7 +64,6 @@ private:
 	class Impl;
 	Impl& impl;
 
-	static LLFloaterSnapshot* sInstance;
 	static S32    sUIWinHeightLong ;
 	static S32    sUIWinHeightShort ;
 	static S32    sUIWinWidth ;
@@ -78,7 +72,16 @@ private:
 class LLSnapshotFloaterView : public LLFloaterView
 {
 public:
-	LLSnapshotFloaterView( const std::string& name, const LLRect& rect );
+	struct Params 
+	:	public LLInitParam::Block<Params, LLFloaterView::Params>
+	{
+	};
+
+protected:
+	LLSnapshotFloaterView (const Params& p);
+	friend class LLUICtrlFactory;
+
+public:
 	virtual ~LLSnapshotFloaterView();
 
 	/*virtual*/	BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp
index 530bb87983..1d2d3b98f2 100644
--- a/indra/newview/llfloatertelehub.cpp
+++ b/indra/newview/llfloatertelehub.cpp
@@ -81,7 +81,7 @@ void LLFloaterTelehub::show()
 }
 
 LLFloaterTelehub::LLFloaterTelehub()
-:	LLFloater(std::string("telehub")),
+:	LLFloater(),
 	mTelehubObjectID(),
 	mTelehubObjectName(),
 	mTelehubPos(),
@@ -94,6 +94,11 @@ LLFloaterTelehub::LLFloaterTelehub()
 
 	LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_telehub.xml");
 
+	mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
+}
+BOOL LLFloaterTelehub::postBuild()
+{
+
 	childSetAction("connect_btn", onClickConnect, this);
 	childSetAction("disconnect_btn", onClickDisconnect, this);
 	childSetAction("add_spawn_point_btn", onClickAddSpawnPoint, this);
@@ -106,9 +111,8 @@ LLFloaterTelehub::LLFloaterTelehub()
 		list->setAllowKeyboardMovement(FALSE);
 	}
 
-	mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
+	return TRUE;
 }
-
 LLFloaterTelehub::~LLFloaterTelehub()
 {
 	sInstance = NULL;
diff --git a/indra/newview/llfloatertelehub.h b/indra/newview/llfloatertelehub.h
index 28c9d16573..b639338dfc 100644
--- a/indra/newview/llfloatertelehub.h
+++ b/indra/newview/llfloatertelehub.h
@@ -48,7 +48,7 @@ public:
 	static void show();
 
 	virtual void draw();
-
+	/*virtual*/	BOOL	postBuild();
 	static BOOL renderBeacons();
 	static void addBeacons();
 
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index a33b49563c..62a8c0d27e 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -54,6 +54,7 @@
 #include "llpanelobject.h"
 #include "llpanelvolume.h"
 #include "llpanelpermissions.h"
+#include "llradiogroup.h"
 #include "llresmgr.h"
 #include "llselectmgr.h"
 #include "llslider.h"
@@ -95,25 +96,21 @@ const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] =
 };
 
 // Local prototypes
-void commit_select_tool(LLUICtrl *ctrl, void *data);
 void commit_select_component(LLUICtrl *ctrl, void *data);
 void click_show_more(void*);
 void click_popup_info(void*);
 void click_popup_done(void*);
 void click_popup_minimize(void*);
-void click_popup_grab_drag(LLUICtrl *, void*);
-void click_popup_grab_lift(LLUICtrl *, void*);
-void click_popup_grab_spin(LLUICtrl *, void*);
 void click_popup_rotate_left(void*);
 void click_popup_rotate_reset(void*);
 void click_popup_rotate_right(void*);
-void click_popup_dozer_mode(LLUICtrl *, void *user);
 void commit_slider_dozer_size(LLUICtrl *, void*);
 void commit_slider_dozer_force(LLUICtrl *, void*);
 void click_apply_to_selection(void*);
-void commit_radio_zoom(LLUICtrl *, void*);
-void commit_radio_orbit(LLUICtrl *, void*);
-void commit_radio_pan(LLUICtrl *, void*);
+void commit_radio_group_focus(LLUICtrl* ctrl, void* data);
+void commit_radio_group_move(LLUICtrl* ctrl, void* data);
+void commit_radio_group_edit(LLUICtrl* ctrl, void* data);
+void commit_radio_group_land(LLUICtrl* ctrl, void* data);
 void commit_grid_mode(LLUICtrl *, void*);
 void commit_slider_zoom(LLUICtrl *, void*);
 
@@ -122,14 +119,14 @@ void commit_slider_zoom(LLUICtrl *, void*);
 void*	LLFloaterTools::createPanelPermissions(void* data)
 {
 	LLFloaterTools* floater = (LLFloaterTools*)data;
-	floater->mPanelPermissions = new LLPanelPermissions("General");
+	floater->mPanelPermissions = new LLPanelPermissions();
 	return floater->mPanelPermissions;
 }
 //static
 void*	LLFloaterTools::createPanelObject(void* data)
 {
 	LLFloaterTools* floater = (LLFloaterTools*)data;
-	floater->mPanelObject = new LLPanelObject("Object");
+	floater->mPanelObject = new LLPanelObject();
 	return floater->mPanelObject;
 }
 
@@ -137,7 +134,7 @@ void*	LLFloaterTools::createPanelObject(void* data)
 void*	LLFloaterTools::createPanelVolume(void* data)
 {
 	LLFloaterTools* floater = (LLFloaterTools*)data;
-	floater->mPanelVolume = new LLPanelVolume("Features");
+	floater->mPanelVolume = new LLPanelVolume();
 	return floater->mPanelVolume;
 }
 
@@ -145,7 +142,7 @@ void*	LLFloaterTools::createPanelVolume(void* data)
 void*	LLFloaterTools::createPanelFace(void* data)
 {
 	LLFloaterTools* floater = (LLFloaterTools*)data;
-	floater->mPanelFace = new LLPanelFace("Texture");
+	floater->mPanelFace = new LLPanelFace();
 	return floater->mPanelFace;
 }
 
@@ -153,26 +150,51 @@ void*	LLFloaterTools::createPanelFace(void* data)
 void*	LLFloaterTools::createPanelContents(void* data)
 {
 	LLFloaterTools* floater = (LLFloaterTools*)data;
-	floater->mPanelContents = new LLPanelContents("Contents");
+	floater->mPanelContents = new LLPanelContents();
 	return floater->mPanelContents;
 }
 
-//static
-void*	LLFloaterTools::createPanelContentsInventory(void* data)
-{
-	LLFloaterTools* floater = (LLFloaterTools*)data;
-	floater->mPanelContents->mPanelInventory = new LLPanelInventory(std::string("ContentsInventory"), LLRect());
-	return floater->mPanelContents->mPanelInventory;
-}
-
 //static
 void*	LLFloaterTools::createPanelLandInfo(void* data)
 {
 	LLFloaterTools* floater = (LLFloaterTools*)data;
-	floater->mPanelLandInfo = new LLPanelLandInfo(std::string("land info panel"));
+	floater->mPanelLandInfo = new LLPanelLandInfo();
 	return floater->mPanelLandInfo;
 }
 
+static	const std::string	toolNames[]={
+	"ToolCube",
+	"ToolPrism",
+	"ToolPyramid",
+	"ToolTetrahedron",
+	"ToolCylinder",
+	"ToolHemiCylinder",
+	"ToolCone",
+	"ToolHemiCone",
+	"ToolSphere",
+	"ToolHemiSphere",
+	"ToolTorus",
+	"ToolTube",
+	"ToolRing",
+	"ToolTree",
+	"ToolGrass"};
+LLPCode toolData[]={
+	LL_PCODE_CUBE,
+	LL_PCODE_PRISM,
+	LL_PCODE_PYRAMID,
+	LL_PCODE_TETRAHEDRON,
+	LL_PCODE_CYLINDER,
+	LL_PCODE_CYLINDER_HEMI,
+	LL_PCODE_CONE,
+	LL_PCODE_CONE_HEMI,
+	LL_PCODE_SPHERE,
+	LL_PCODE_SPHERE_HEMI,
+	LL_PCODE_TORUS,
+	LLViewerObject::LL_VO_SQUARE_TORUS,
+	LLViewerObject::LL_VO_TRIANGLE_TORUS,
+	LL_PCODE_LEGACY_TREE,
+	LL_PCODE_LEGACY_GRASS};
+
 BOOL	LLFloaterTools::postBuild()
 {
 	
@@ -200,27 +222,15 @@ BOOL	LLFloaterTools::postBuild()
 
 	childSetCommitCallback("slider zoom",commit_slider_zoom,this);
 
-	mRadioZoom = getChild<LLCheckBoxCtrl>("radio zoom");
-	childSetCommitCallback("radio zoom",commit_radio_zoom,this);
-	mRadioOrbit = getChild<LLCheckBoxCtrl>("radio orbit");
-	childSetCommitCallback("radio orbit",commit_radio_orbit,this);
-	mRadioPan = getChild<LLCheckBoxCtrl>("radio pan");
-	childSetCommitCallback("radio pan",commit_radio_pan,this);
-
-	mRadioMove = getChild<LLCheckBoxCtrl>("radio move");
-	childSetCommitCallback("radio move",click_popup_grab_drag,this);
-	mRadioLift = getChild<LLCheckBoxCtrl>("radio lift");
-	childSetCommitCallback("radio lift",click_popup_grab_lift,this);
-	mRadioSpin = getChild<LLCheckBoxCtrl>("radio spin");
-	childSetCommitCallback("radio spin",click_popup_grab_spin,NULL);
-	mRadioPosition = getChild<LLCheckBoxCtrl>("radio position");
-	childSetCommitCallback("radio position",commit_select_tool,LLToolCompTranslate::getInstance());
-	mRadioRotate = getChild<LLCheckBoxCtrl>("radio rotate");
-	childSetCommitCallback("radio rotate",commit_select_tool,LLToolCompRotate::getInstance());
-	mRadioStretch = getChild<LLCheckBoxCtrl>("radio stretch");
-	childSetCommitCallback("radio stretch",commit_select_tool,LLToolCompScale::getInstance());
-	mRadioSelectFace = getChild<LLCheckBoxCtrl>("radio select face");
-	childSetCommitCallback("radio select face",commit_select_tool,LLToolFace::getInstance());
+	mRadioGroupFocus = getChild<LLRadioGroup>("focus_radio_group");
+	childSetCommitCallback("focus_radio_group", commit_radio_group_focus, this);
+
+	mRadioGroupMove = getChild<LLRadioGroup>("move_radio_group");
+	childSetCommitCallback("move_radio_group", commit_radio_group_move, this);
+
+	mRadioGroupEdit = getChild<LLRadioGroup>("edit_radio_group");
+	childSetCommitCallback("edit_radio_group", commit_radio_group_edit, this);
+
 	mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts");
 	childSetValue("checkbox edit linked parts",(BOOL)gSavedSettings.getBOOL("EditLinkedParts"));
 	childSetCommitCallback("checkbox edit linked parts",commit_select_component,this);
@@ -239,44 +249,12 @@ BOOL	LLFloaterTools::postBuild()
 	// Create Buttons
 	//
 
-	static	const std::string	toolNames[]={
-			"ToolCube",
-			"ToolPrism",
-			"ToolPyramid",
-			"ToolTetrahedron",
-			"ToolCylinder",
-			"ToolHemiCylinder",
-			"ToolCone",
-			"ToolHemiCone",
-			"ToolSphere",
-			"ToolHemiSphere",
-			"ToolTorus",
-			"ToolTube",
-			"ToolRing",
-			"ToolTree",
-			"ToolGrass"};
-	void*	toolData[]={
-			&LLToolPlacerPanel::sCube,
-			&LLToolPlacerPanel::sPrism,
-			&LLToolPlacerPanel::sPyramid,
-			&LLToolPlacerPanel::sTetrahedron,
-			&LLToolPlacerPanel::sCylinder,
-			&LLToolPlacerPanel::sCylinderHemi,
-			&LLToolPlacerPanel::sCone,
-			&LLToolPlacerPanel::sConeHemi,
-			&LLToolPlacerPanel::sSphere,
-			&LLToolPlacerPanel::sSphereHemi,
-			&LLToolPlacerPanel::sTorus,
-			&LLToolPlacerPanel::sSquareTorus,
-			&LLToolPlacerPanel::sTriangleTorus,
-			&LLToolPlacerPanel::sTree,
-			&LLToolPlacerPanel::sGrass};
 	for(size_t t=0; t<LL_ARRAY_SIZE(toolNames); ++t)
 	{
 		LLButton *found = getChild<LLButton>(toolNames[t]);
 		if(found)
 		{
-			found->setClickedCallback(setObjectType,toolData[t]);
+			found->setClickedCallback(boost::bind(&LLFloaterTools::setObjectType, toolData[t]));
 			mButtons.push_back( found );
 		}else{
 			llwarns << "Tool button not found! DOA Pending." << llendl;
@@ -290,20 +268,10 @@ BOOL	LLFloaterTools::postBuild()
 	childSetValue("checkbox copy centers",(BOOL)gSavedSettings.getBOOL("CreateToolCopyCenters"));
 	mCheckCopyRotates = getChild<LLCheckBoxCtrl>("checkbox copy rotates");
 	childSetValue("checkbox copy rotates",(BOOL)gSavedSettings.getBOOL("CreateToolCopyRotates"));
-	mRadioSelectLand = getChild<LLCheckBoxCtrl>("radio select land");
-	childSetCommitCallback("radio select land",commit_select_tool, LLToolSelectLand::getInstance());
-	mRadioDozerFlatten = getChild<LLCheckBoxCtrl>("radio flatten");
-	childSetCommitCallback("radio flatten",click_popup_dozer_mode,  (void*)0);
-	mRadioDozerRaise = getChild<LLCheckBoxCtrl>("radio raise");
-	childSetCommitCallback("radio raise",click_popup_dozer_mode,  (void*)1);
-	mRadioDozerLower = getChild<LLCheckBoxCtrl>("radio lower");
-	childSetCommitCallback("radio lower",click_popup_dozer_mode,  (void*)2);
-	mRadioDozerSmooth = getChild<LLCheckBoxCtrl>("radio smooth");
-	childSetCommitCallback("radio smooth",click_popup_dozer_mode,  (void*)3);
-	mRadioDozerNoise = getChild<LLCheckBoxCtrl>("radio noise");
-	childSetCommitCallback("radio noise",click_popup_dozer_mode,  (void*)4);
-	mRadioDozerRevert = getChild<LLCheckBoxCtrl>("radio revert");
-	childSetCommitCallback("radio revert",click_popup_dozer_mode,  (void*)5);
+
+	mRadioGroupLand = getChild<LLRadioGroup>("land_radio_group");
+	childSetCommitCallback("land_radio_group", commit_radio_group_land, this);
+
 	mBtnApplyToSelection = getChild<LLButton>("button apply to selection");
 	childSetAction("button apply to selection",click_apply_to_selection,  (void*)0);
 
@@ -338,8 +306,8 @@ BOOL	LLFloaterTools::postBuild()
 
 // Create the popupview with a dummy center.  It will be moved into place
 // during LLViewerWindow's per-frame hover processing.
-LLFloaterTools::LLFloaterTools()
-:	LLFloater(std::string("toolbox floater")),
+LLFloaterTools::LLFloaterTools(const LLSD& key)
+:	LLFloater(key),
 	mBtnFocus(NULL),
 	mBtnMove(NULL),
 	mBtnEdit(NULL),
@@ -347,18 +315,10 @@ LLFloaterTools::LLFloaterTools()
 	mBtnLand(NULL),
 	mTextStatus(NULL),
 
-	mRadioOrbit(NULL),
-	mRadioZoom(NULL),
-	mRadioPan(NULL),
-
-	mRadioMove(NULL),
-	mRadioLift(NULL),
-	mRadioSpin(NULL),
+	mRadioGroupFocus(NULL),
+	mRadioGroupMove(NULL),
+	mRadioGroupEdit(NULL),
 
-	mRadioPosition(NULL),
-	mRadioRotate(NULL),
-	mRadioStretch(NULL),
-	mRadioSelectFace(NULL),
 	mCheckSelectIndividual(NULL),
 
 	mCheckSnapToGrid(NULL),
@@ -380,13 +340,7 @@ LLFloaterTools::LLFloaterTools()
 	mCheckCopySelection(NULL),
 	mCheckCopyCenters(NULL),
 	mCheckCopyRotates(NULL),
-	mRadioSelectLand(NULL),
-	mRadioDozerFlatten(NULL),
-	mRadioDozerRaise(NULL),
-	mRadioDozerLower(NULL),
-	mRadioDozerSmooth(NULL),
-	mRadioDozerNoise(NULL),
-	mRadioDozerRevert(NULL),
+	mRadioGroupLand(NULL),
 	mSliderDozerSize(NULL),
 	mSliderDozerForce(NULL),
 	mBtnApplyToSelection(NULL),
@@ -402,22 +356,23 @@ LLFloaterTools::LLFloaterTools()
 	mTabLand(NULL),
 	mDirty(TRUE)
 {
+	gFloaterTools = this;
+	
 	setAutoFocus(FALSE);
-	LLCallbackMap::map_t factory_map;
-	factory_map["General"] = LLCallbackMap(createPanelPermissions, this);//LLPanelPermissions
-	factory_map["Object"] = LLCallbackMap(createPanelObject, this);//LLPanelObject
-	factory_map["Features"] = LLCallbackMap(createPanelVolume, this);//LLPanelVolume
-	factory_map["Texture"] = LLCallbackMap(createPanelFace, this);//LLPanelFace
-	factory_map["Contents"] = LLCallbackMap(createPanelContents, this);//LLPanelContents
-	factory_map["ContentsInventory"] = LLCallbackMap(createPanelContentsInventory, this);//LLPanelContents
-	factory_map["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo
-
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",&factory_map,FALSE);
+	mFactoryMap["General"] = LLCallbackMap(createPanelPermissions, this);//LLPanelPermissions
+	mFactoryMap["Object"] = LLCallbackMap(createPanelObject, this);//LLPanelObject
+	mFactoryMap["Features"] = LLCallbackMap(createPanelVolume, this);//LLPanelVolume
+	mFactoryMap["Texture"] = LLCallbackMap(createPanelFace, this);//LLPanelFace
+	mFactoryMap["Contents"] = LLCallbackMap(createPanelContents, this);//LLPanelContents
+	mFactoryMap["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo
+	
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",FALSE);
 }
 
 LLFloaterTools::~LLFloaterTools()
 {
 	// children automatically deleted
+	gFloaterTools = NULL;
 }
 
 void LLFloaterTools::setStatusText(const std::string& text)
@@ -525,26 +480,31 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
 
 	mBtnFocus	->setToggleState( focus_visible );
 
-	mRadioZoom	->setVisible( focus_visible );
-	mRadioOrbit	->setVisible( focus_visible );
-	mRadioPan	->setVisible( focus_visible );
+	mRadioGroupFocus->setVisible( focus_visible );
 	childSetVisible("slider zoom", focus_visible);
 	childSetEnabled("slider zoom", gCameraBtnZoom);
 
-	mRadioZoom	->set(	!gCameraBtnOrbit &&
-						!gCameraBtnPan &&
-						!(mask == MASK_ORBIT) &&
-						!(mask == (MASK_ORBIT | MASK_ALT)) &&
-						!(mask == MASK_PAN) &&
-						!(mask == (MASK_PAN | MASK_ALT)) );
-
-	mRadioOrbit	->set(	gCameraBtnOrbit || 
-						(mask == MASK_ORBIT) ||
-						(mask == (MASK_ORBIT | MASK_ALT)) );
-
-	mRadioPan	->set(	gCameraBtnPan ||
-						(mask == MASK_PAN) ||
-						(mask == (MASK_PAN | MASK_ALT)) );
+	if (!gCameraBtnOrbit &&
+		!gCameraBtnPan &&
+		!(mask == MASK_ORBIT) &&
+		!(mask == (MASK_ORBIT | MASK_ALT)) &&
+		!(mask == MASK_PAN) &&
+		!(mask == (MASK_PAN | MASK_ALT)) )
+	{
+		mRadioGroupFocus->setValue("radio zoom");
+	}
+	else if (	gCameraBtnOrbit || 
+				(mask == MASK_ORBIT) ||
+				(mask == (MASK_ORBIT | MASK_ALT)) )
+	{
+		mRadioGroupFocus->setValue("radio orbit");
+	}
+	else if (	gCameraBtnPan ||
+				(mask == MASK_PAN) ||
+				(mask == (MASK_PAN | MASK_ALT)) )
+	{
+		mRadioGroupFocus->setValue("radio pan");
+	}
 
 	// multiply by correction factor because volume sliders go [0, 0.5]
 	childSetValue( "slider zoom", gAgent.getCameraZoomFraction() * 0.5f);
@@ -555,27 +515,23 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
 	if (mBtnMove) mBtnMove	->setToggleState( move_visible );
 
 	// HACK - highlight buttons for next click
-	if (mRadioMove)
+	mRadioGroupMove->setVisible(move_visible);
+	if (!gGrabBtnSpin && 
+		!gGrabBtnVertical &&
+		!(mask == MASK_VERTICAL) && 
+		!(mask == MASK_SPIN) )
 	{
-		mRadioMove	->setVisible( move_visible );
-		mRadioMove	->set(	!gGrabBtnSpin && 
-							!gGrabBtnVertical &&
-							!(mask == MASK_VERTICAL) && 
-							!(mask == MASK_SPIN) );
+		mRadioGroupMove->setValue("radio move");
 	}
-
-	if (mRadioLift)
+	else if (gGrabBtnVertical || 
+			 (mask == MASK_VERTICAL) )
 	{
-		mRadioLift	->setVisible( move_visible );
-		mRadioLift	->set(	gGrabBtnVertical || 
-							(mask == MASK_VERTICAL) );
+		mRadioGroupMove->setValue("radio lift");
 	}
-
-	if (mRadioSpin)
+	else if (gGrabBtnSpin || 
+			 (mask == MASK_SPIN) )
 	{
-		mRadioSpin	->setVisible( move_visible );
-		mRadioSpin	->set(	gGrabBtnSpin || 
-							(mask == MASK_SPIN) );
+		mRadioGroupMove->setValue("radio spin");
 	}
 
 	// Edit buttons
@@ -587,15 +543,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
 						tool == LLToolPipette::getInstance();
 
 	mBtnEdit	->setToggleState( edit_visible );
-
-	mRadioPosition	->setVisible( edit_visible );
-	mRadioRotate	->setVisible( edit_visible );
-	mRadioStretch	->setVisible( edit_visible );
-	if (mRadioSelectFace)
-	{
-		mRadioSelectFace->setVisible( edit_visible );
-		mRadioSelectFace->set( tool == LLToolFace::getInstance() );
-	}
+	mRadioGroupEdit->setVisible( edit_visible );
 
 	if (mCheckSelectIndividual)
 	{
@@ -603,9 +551,22 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
 		//mCheckSelectIndividual->set(gSavedSettings.getBOOL("EditLinkedParts"));
 	}
 
-	mRadioPosition	->set( tool == LLToolCompTranslate::getInstance() );
-	mRadioRotate	->set( tool == LLToolCompRotate::getInstance() );
-	mRadioStretch	->set( tool == LLToolCompScale::getInstance() );
+	if ( tool == LLToolCompTranslate::getInstance() )
+	{
+		mRadioGroupEdit->setValue("radio position");
+	}
+	else if ( tool == LLToolCompRotate::getInstance() )
+	{
+		mRadioGroupEdit->setValue("radio rotate");
+	}
+	else if ( tool == LLToolCompScale::getInstance() )
+	{
+		mRadioGroupEdit->setValue("radio stretch");
+	}
+	else if ( tool == LLToolFace::getInstance() )
+	{
+		mRadioGroupEdit->setValue("radio select face");
+	}
 
 	if (mComboGridMode) 
 	{
@@ -662,15 +623,13 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
 	else
 	{
 		// Highlight the correct placer button
-		for( std::vector<LLButton*>::size_type i = 0; i < mButtons.size(); i++ )
+		for( S32 t = 0; t < (S32)mButtons.size(); t++ )
 		{
 			LLPCode pcode = LLToolPlacer::getObjectType();
-			void *userdata = mButtons[i]->getCallbackUserData();
-			LLPCode *cur = (LLPCode*) userdata;
-
-			BOOL state = (pcode == *cur);
-			mButtons[i]->setToggleState( state );
-			mButtons[i]->setVisible( create_visible );
+			LLPCode button_pcode = toolData[t];
+			BOOL state = (pcode == button_pcode);
+			mButtons[t]->setToggleState( state );
+			mButtons[t]->setVisible( create_visible );
 		}
 	}
 
@@ -687,44 +646,39 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
 
 	if (mBtnLand)	mBtnLand	->setToggleState( land_visible );
 
-	//	mRadioEditLand	->set( tool == LLToolBrushLand::getInstance() );
-	if (mRadioSelectLand)	mRadioSelectLand->set( tool == LLToolSelectLand::getInstance() );
-
-	//	mRadioEditLand	->setVisible( land_visible );
-	if (mRadioSelectLand)	mRadioSelectLand->setVisible( land_visible );
-
-	S32 dozer_mode = gSavedSettings.getS32("RadioLandBrushAction");
-
-	if (mRadioDozerFlatten)
+	mRadioGroupLand->setVisible( land_visible );
+	if ( tool == LLToolSelectLand::getInstance() )
 	{
-		mRadioDozerFlatten	->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 0);
-		mRadioDozerFlatten	->setVisible( land_visible );
+		mRadioGroupLand->setValue("radio select land");
 	}
-	if (mRadioDozerRaise)
+	else if ( tool == LLToolBrushLand::getInstance() )
 	{
-		mRadioDozerRaise	->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 1);
-		mRadioDozerRaise	->setVisible( land_visible );
-	}
-	if (mRadioDozerLower)
-	{
-		mRadioDozerLower	->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 2);
-		mRadioDozerLower	->setVisible( land_visible );
-	}
-	if (mRadioDozerSmooth)
-	{
-		mRadioDozerSmooth	->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 3);
-		mRadioDozerSmooth	->setVisible( land_visible );
-	}
-	if (mRadioDozerNoise)
-	{
-		mRadioDozerNoise	->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 4);
-		mRadioDozerNoise	->setVisible( land_visible );
-	}
-	if (mRadioDozerRevert)
-	{
-		mRadioDozerRevert	->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 5);
-		mRadioDozerRevert	->setVisible( land_visible );
+		S32 dozer_mode = gSavedSettings.getS32("RadioLandBrushAction");
+		switch(dozer_mode)
+		{
+		case 0:
+			mRadioGroupLand->setValue("radio flatten");
+			break;
+		case 1:
+			mRadioGroupLand->setValue("radio raise");
+			break;
+		case 2:
+			mRadioGroupLand->setValue("radio lower");
+			break;
+		case 3:
+			mRadioGroupLand->setValue("radio smooth");
+			break;
+		case 4:
+			mRadioGroupLand->setValue("radio noise");
+			break;
+		case 5:
+			mRadioGroupLand->setValue("radio revert");
+			break;
+		default:
+			break;
+		}
 	}
+
 	if (mBtnApplyToSelection)
 	{
 		mBtnApplyToSelection->setVisible( land_visible );
@@ -757,13 +711,18 @@ BOOL LLFloaterTools::canClose()
 }
 
 // virtual
-void LLFloaterTools::onOpen()
+void LLFloaterTools::onOpen(const LLSD& key)
 {
 	mParcelSelection = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection();
 	mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
 	
-	// gMenuBarView->setItemVisible(std::string("Tools"), TRUE);
-	// gMenuBarView->arrange();
+	std::string panel = key.asString();
+	if (!panel.empty())
+	{
+		mTab->selectTabByName(panel);
+	}
+	
+	gMenuBarView->setItemVisible("BuildTools", TRUE);
 }
 
 // virtual
@@ -796,19 +755,11 @@ void LLFloaterTools::onClose(bool app_quitting)
 	// so manually reset tool to default (pie menu tool)
 	LLToolMgr::getInstance()->getCurrentToolset()->selectFirstTool();
 
-	// gMenuBarView->setItemVisible(std::string("Tools"), FALSE);
-	// gMenuBarView->arrange();
-}
-
-void LLFloaterTools::showPanel(EInfoPanel panel)
-{
-	llassert(panel >= 0 && panel < PANEL_COUNT);
-	mTab->selectTabByName(PANEL_NAMES[panel]);
+	gMenuBarView->setItemVisible("BuildTools", FALSE);
 }
 
 void click_popup_info(void*)
 {
-//	gBuildView->setPropertiesPanelOpen(TRUE);
 }
 
 void click_popup_done(void*)
@@ -816,43 +767,49 @@ void click_popup_done(void*)
 	handle_reset_view();
 }
 
-void click_popup_grab_drag(LLUICtrl*, void*)
+void commit_radio_group_move(LLUICtrl* ctrl, void* data)
 {
-	gGrabBtnVertical = FALSE;
-	gGrabBtnSpin = FALSE;
-}
-
-void click_popup_grab_lift(LLUICtrl*, void*)
-{
-	gGrabBtnVertical = TRUE;
-	gGrabBtnSpin = FALSE;
-}
-
-void click_popup_grab_spin(LLUICtrl*, void*)
-{
-	gGrabBtnVertical = FALSE;
-	gGrabBtnSpin = TRUE;
-}
-
-void commit_radio_zoom(LLUICtrl *, void*)
-{
-	gCameraBtnZoom = TRUE;
-	gCameraBtnOrbit = FALSE;
-	gCameraBtnPan = FALSE;
-}
-
-void commit_radio_orbit(LLUICtrl *, void*)
-{
-	gCameraBtnZoom = FALSE;
-	gCameraBtnOrbit = TRUE;
-	gCameraBtnPan = FALSE;
+	LLRadioGroup* group = (LLRadioGroup*)ctrl;
+	std::string selected = group->getValue().asString();
+	if (selected == "radio move")
+	{
+		gGrabBtnVertical = FALSE;
+		gGrabBtnSpin = FALSE;
+	}
+	else if (selected == "radio lift")
+	{
+		gGrabBtnVertical = TRUE;
+		gGrabBtnSpin = FALSE;
+	}
+	else if (selected == "radio spin")
+	{
+		gGrabBtnVertical = FALSE;
+		gGrabBtnSpin = TRUE;
+	}
 }
 
-void commit_radio_pan(LLUICtrl *, void*)
+void commit_radio_group_focus(LLUICtrl* ctrl, void* data)
 {
-	gCameraBtnZoom = FALSE;
-	gCameraBtnOrbit = FALSE;
-	gCameraBtnPan = TRUE;
+	LLRadioGroup* group = (LLRadioGroup*)ctrl;
+	std::string selected = group->getValue().asString();
+	if (selected == "radio zoom")
+	{
+		gCameraBtnZoom = TRUE;
+		gCameraBtnOrbit = FALSE;
+		gCameraBtnPan = FALSE;
+	}
+	else if (selected == "radio orbit")
+	{
+		gCameraBtnZoom = FALSE;
+		gCameraBtnOrbit = TRUE;
+		gCameraBtnPan = FALSE;
+	}
+	else if (selected == "radio pan")
+	{
+		gCameraBtnZoom = FALSE;
+		gCameraBtnOrbit = FALSE;
+		gCameraBtnPan = TRUE;
+	}
 }
 
 void commit_slider_zoom(LLUICtrl *ctrl, void*)
@@ -881,13 +838,6 @@ void click_popup_rotate_right(void*)
 }
 
 
-void click_popup_dozer_mode(LLUICtrl *, void *user)
-{
-	S32 mode = (S32)(intptr_t) user;
-	gFloaterTools->setEditTool( LLToolBrushLand::getInstance() );
-	gSavedSettings.setS32("RadioLandBrushAction", mode);
-}
-
 void commit_slider_dozer_size(LLUICtrl *ctrl, void*)
 {
 	F32 size = (F32)ctrl->getValue().asReal();
@@ -901,21 +851,64 @@ void commit_slider_dozer_force(LLUICtrl *ctrl, void*)
 	gSavedSettings.setF32("LandBrushForce", dozer_force);
 }
 
-
-
-
 void click_apply_to_selection(void* user)
 {
 	LLToolBrushLand::getInstance()->modifyLandInSelectionGlobal();
 }
 
-void commit_select_tool(LLUICtrl *ctrl, void *data)
+void commit_radio_group_edit(LLUICtrl *ctrl, void *data)
 {
 	S32 show_owners = gSavedSettings.getBOOL("ShowParcelOwners");
-	gFloaterTools->setEditTool(data);
+
+	LLRadioGroup* group = (LLRadioGroup*)ctrl;
+	std::string selected = group->getValue().asString();
+	if (selected == "radio position")
+	{
+		LLFloaterTools::setEditTool( LLToolCompTranslate::getInstance() );
+	}
+	else if (selected == "radio rotate")
+	{
+		LLFloaterTools::setEditTool( LLToolCompRotate::getInstance() );
+	}
+	else if (selected == "radio stretch")
+	{
+		LLFloaterTools::setEditTool( LLToolCompScale::getInstance() );
+	}
+	else if (selected == "radio select face")
+	{
+		LLFloaterTools::setEditTool( LLToolFace::getInstance() );
+	}
 	gSavedSettings.setBOOL("ShowParcelOwners", show_owners);
 }
 
+void commit_radio_group_land(LLUICtrl* ctrl, void* data)
+{
+	LLRadioGroup* group = (LLRadioGroup*)ctrl;
+	std::string selected = group->getValue().asString();
+	if (selected == "radio select land")
+	{
+		LLFloaterTools::setEditTool( LLToolSelectLand::getInstance() );
+	}
+	else
+	{
+		LLFloaterTools::setEditTool( LLToolBrushLand::getInstance() );
+		S32 dozer_mode = gSavedSettings.getS32("RadioLandBrushAction");
+		if (selected == "radio flatten")
+			dozer_mode = 0;
+		else if (selected == "radio raise")
+			dozer_mode = 1;
+		else if (selected == "radio lower")
+			dozer_mode = 2;
+		else if (selected == "radio smooth")
+			dozer_mode = 3;
+		else if (selected == "radio noise")
+			dozer_mode = 4;
+		else if (selected == "radio revert")
+			dozer_mode = 5;
+		gSavedSettings.setS32("RadioLandBrushAction", dozer_mode);
+	}
+}
+
 void commit_select_component(LLUICtrl *ctrl, void *data)
 {
 	LLFloaterTools* floaterp = (LLFloaterTools*)data;
@@ -948,9 +941,8 @@ void commit_grid_mode(LLUICtrl *ctrl, void *data)
 } 
 
 // static 
-void LLFloaterTools::setObjectType( void* data )
+void LLFloaterTools::setObjectType( LLPCode pcode )
 {
-	LLPCode pcode = *(LLPCode*) data;
 	LLToolPlacer::setObjectType( pcode );
 	gSavedSettings.setBOOL("CreateToolCopySelection", FALSE);
 	gFocusMgr.setMouseCapture(NULL);
@@ -960,14 +952,16 @@ void LLFloaterTools::setObjectType( void* data )
 void LLFloaterTools::onClickGridOptions(void* data)
 {
 	//LLFloaterTools* floaterp = (LLFloaterTools*)data;
-	LLFloaterBuildOptions::show(NULL);
+	LLFloaterBuildOptions::showInstance();
 	// RN: this makes grid options dependent on build tools window
 	//floaterp->addDependentFloater(LLFloaterBuildOptions::getInstance(), FALSE);
 }
 
+// static
 void LLFloaterTools::setEditTool(void* tool_pointer)
 {
-	select_tool(tool_pointer);
+	LLTool *tool = (LLTool *)tool_pointer;
+	LLToolMgr::getInstance()->getCurrentToolset()->selectTool( tool );
 }
 
 void LLFloaterTools::onFocusReceived()
diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h
index 833a8a7b73..7bb072232a 100644
--- a/indra/newview/llfloatertools.h
+++ b/indra/newview/llfloatertools.h
@@ -38,18 +38,20 @@
 #include "llparcelselection.h"
 
 class LLButton;
-class LLTextBox;
-class LLTool;
+class LLComboBox;
 class LLCheckBoxCtrl;
-class LLTabContainer;
 class LLPanelPermissions;
 class LLPanelObject;
 class LLPanelVolume;
 class LLPanelContents;
 class LLPanelFace;
 class LLPanelLandInfo;
-class LLComboBox;
+class LLRadioCtrl;
+class LLRadioGroup;
 class LLSlider;
+class LLTabContainer;
+class LLTextBox;
+class LLTool;
 class LLParcelSelection;
 class LLObjectSelection;
 
@@ -65,15 +67,16 @@ public:
 	static	void*	createPanelVolume(void*	vdata);
 	static	void*	createPanelFace(void*	vdata);
 	static	void*	createPanelContents(void*	vdata);
-	static	void*	createPanelContentsInventory(void*	vdata);
 	static	void*	createPanelLandInfo(void*	vdata);
 
-	LLFloaterTools();
+	LLFloaterTools(const LLSD& key);
 	virtual ~LLFloaterTools();
 
-	virtual void onOpen();
-	virtual void onClose(bool app_quitting);
-	virtual BOOL canClose();
+	/*virtual*/ void onOpen(const LLSD& key);
+	/*virtual*/ void onClose(bool app_quitting);
+	/*virtual*/ BOOL canClose();
+	/*virtual*/ void draw();
+	/*virtual*/ void onFocusReceived();
 
 	// call this once per frame to handle visibility, rect location,
 	// button highlights, etc.
@@ -93,24 +96,20 @@ public:
 		PANEL_COUNT
 	};
 
-	/*virtual*/  void draw();
-
 	void dirty();
 	void showPanel(EInfoPanel panel);
 
 	void setStatusText(const std::string& text);
-	virtual void onFocusReceived();
 	static void setEditTool(void* data);
 	void saveLastTool();
 private:
-	static void setObjectType( void* data );
+	static void setObjectType( LLPCode pcode );
 	
 	void refresh();
 
 	static void onClickGridOptions(void* data);
 
 public:
-
 	LLButton		*mBtnFocus;
 	LLButton		*mBtnMove;
 	LLButton		*mBtnEdit;
@@ -120,20 +119,13 @@ public:
 	LLTextBox		*mTextStatus;
 
 	// Focus buttons
-	LLCheckBoxCtrl	*mRadioOrbit;
-	LLCheckBoxCtrl	*mRadioZoom;
-	LLCheckBoxCtrl	*mRadioPan;
+	LLRadioGroup*	mRadioGroupFocus;
 
 	// Move buttons
-	LLCheckBoxCtrl	*mRadioMove;
-	LLCheckBoxCtrl	*mRadioLift;
-	LLCheckBoxCtrl	*mRadioSpin;
+	LLRadioGroup*	mRadioGroupMove;
 
 	// Edit buttons
-	LLCheckBoxCtrl	*mRadioPosition;
-	LLCheckBoxCtrl	*mRadioRotate;
-	LLCheckBoxCtrl	*mRadioStretch;
-	LLCheckBoxCtrl	*mRadioSelectFace;
+	LLRadioGroup*	mRadioGroupEdit;
 
 	LLCheckBoxCtrl	*mCheckSelectIndividual;
 
@@ -159,15 +151,7 @@ public:
 	LLCheckBoxCtrl	*mCheckCopyRotates;
 
 	// Land buttons
-//	LLCheckBoxCtrl	*mRadioEditLand;
-	LLCheckBoxCtrl	*mRadioSelectLand;
-
-	LLCheckBoxCtrl	*mRadioDozerFlatten;
-	LLCheckBoxCtrl	*mRadioDozerRaise;
-	LLCheckBoxCtrl	*mRadioDozerLower;
-	LLCheckBoxCtrl	*mRadioDozerSmooth;
-	LLCheckBoxCtrl	*mRadioDozerNoise;
-	LLCheckBoxCtrl	*mRadioDozerRevert;
+	LLRadioGroup*	mRadioGroupLand;
 	LLSlider		*mSliderDozerSize;
 	LLSlider		*mSliderDozerForce;
 
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index fa6ba162ec..29ac0c66f8 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -42,6 +42,8 @@
 #include "llfloatergodtools.h"
 #include "llparcel.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
 #include "lllineeditor.h"
 #include "lltextbox.h"
 #include "lltracker.h"
@@ -71,7 +73,7 @@ void LLFloaterTopObjects::show()
 }
 
 LLFloaterTopObjects::LLFloaterTopObjects()
-:	LLFloater(std::string("top_objects")),
+:	LLFloater(),
 	mInitialized(FALSE),
 	mtotalScore(0.f)
 {
@@ -86,14 +88,11 @@ LLFloaterTopObjects::~LLFloaterTopObjects()
 // virtual
 BOOL LLFloaterTopObjects::postBuild()
 {
-	childSetCommitCallback("objects_list", onCommitObjectsList, this);
-	childSetDoubleClickCallback("objects_list", onDoubleClickObjectsList);
-	childSetFocus("objects_list");
 	LLScrollListCtrl *objects_list = getChild<LLScrollListCtrl>("objects_list");
-	if (objects_list)
-	{
-		objects_list->setCommitOnSelectionChange(TRUE);
-	}
+	childSetFocus("objects_list");
+	childSetCommitCallback("objects_list", onCommitObjectsList, this);
+	objects_list->setDoubleClickCallback(onDoubleClickObjectsList, this);
+	objects_list->setCommitOnSelectionChange(TRUE);
 
 	childSetAction("show_beacon_btn", onClickShowBeacon, this);
 	setDefaultBtn("show_beacon_btn");
@@ -114,16 +113,14 @@ BOOL LLFloaterTopObjects::postBuild()
 	if (line_editor)
 	{
 		line_editor->setCommitOnFocusLost(FALSE);
-		line_editor->setCommitCallback(onGetByOwnerName);
-		line_editor->setCallbackUserData(this);
+		line_editor->setCommitCallback(onGetByOwnerName, this);
 	}
 
 	line_editor = getChild<LLLineEditor>("object_name_editor");
 	if (line_editor)
 	{
 		line_editor->setCommitOnFocusLost(FALSE);
-		line_editor->setCommitCallback(onGetByObjectName);
-		line_editor->setCallbackUserData(this);
+		line_editor->setCommitCallback(onGetByObjectName, this);
 	}*/
 
 	mCurrentMode = STAT_REPORT_TOP_SCRIPTS;
@@ -234,7 +231,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
 
 	if (total_count == 0 && list->getItemCount() == 0)
 	{
-		list->addCommentText(getString("none_descriptor"));
+		list->setCommentText(getString("none_descriptor"));
 	}
 	else
 	{
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 6a392e03fb..764a6a3498 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -254,7 +254,7 @@ void LLFloaterTOS::onContinue( void* userdata )
 	#endif
 
 	LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );			// Go back and finish authentication
-	self->close(); // destroys this object
+	self->closeFloater(); // destroys this object
 }
 
 // static
@@ -265,7 +265,7 @@ void LLFloaterTOS::onCancel( void* userdata )
 	LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done);
 	LLStartUp::setStartupState( STATE_LOGIN_SHOW );
 	self->mLoadCompleteCount = 0;  // reset counter for next time we come to TOS
-	self->close(); // destroys this object
+	self->closeFloater(); // destroys this object
 }
 
 //virtual 
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
new file mode 100644
index 0000000000..ec8eb2e2cf
--- /dev/null
+++ b/indra/newview/llfloateruipreview.cpp
@@ -0,0 +1,1507 @@
+/**
+ * @file llfloateruipreview.cpp
+ * @brief Tool for previewing and editing floaters, plus localization tool integration
+ *
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Tool for previewing floaters and panels for localization and UI design purposes.
+// See: https://wiki.lindenlab.com/wiki/GUI_Preview_And_Localization_Tools
+// See: https://jira.lindenlab.com/browse/DEV-16869
+
+// *TODO: Translate error messgaes using notifications/alerts.xml
+
+#include "llviewerprecompiledheaders.h"	// Precompiled headers
+
+#include "llfloateruipreview.h"			// Own header
+
+// Internal utility
+#include "llrender.h"
+#include "llsdutil.h"
+#include "llxmltree.h"
+#include "llviewerwindow.h"
+#include "lllivefile.h"
+
+// XUI
+#include "lluictrlfactory.h"
+#include "llcombobox.h"
+#include "llresizebar.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistctrl.h"
+#include "llfilepicker.h"
+#include "lldraghandle.h"
+#include "lllayoutstack.h"
+
+// Boost (for linux/unix command-line execv)
+#include <boost/tokenizer.hpp>
+#include <boost/shared_ptr.hpp>
+
+// External utility
+#include <string>
+
+#if LL_DARWIN
+#include <CoreFoundation/CFURL.h>
+#endif
+
+// Static initialization
+LLFloaterUIPreview* LLFloaterUIPreview::sInstance = NULL;			// initialization of static instance pointer to NULL
+std::string LLFloaterUIPreview::mSavedEditorPath = std::string("");
+std::string LLFloaterUIPreview::mSavedEditorArgs = std::string("");
+std::string LLFloaterUIPreview::mSavedDiffPath	  = std::string("");
+static const S32 PRIMARY_FLOATER = 1;
+static const S32 SECONDARY_FLOATER = 2;
+
+static std::string get_xui_dir()
+{
+	std::string delim = gDirUtilp->getDirDelimiter();
+	return gDirUtilp->getAppRODataDir() + delim + std::string("skins") + delim + "default" + delim + "xui" + delim;
+}
+
+// Localization reset forcer -- ensures that when localization is temporarily changed for previewed floater, it is reset
+// Changes are made here
+LLLocalizationResetForcer::LLLocalizationResetForcer(S32 ID)
+{
+	mSavedLocalization = LLUI::sSettingGroups["config"]->getString("Language");				// save current localization setting
+	LLUI::sSettingGroups["config"]->setString("Language", LLFloaterUIPreview::getLocStr(ID));// hack language to be the one we want to preview floaters in
+	LLUI::setupPaths();														// forcibly reset XUI paths with this new language
+}
+
+// Actually reset in destructor
+// Changes are reversed here
+LLLocalizationResetForcer::~LLLocalizationResetForcer()
+{
+	LLUI::sSettingGroups["config"]->setString("Language", mSavedLocalization);	// reset language to what it was before we changed it
+	LLUI::setupPaths();														// forcibly reset XUI paths with this new language
+}
+
+// Live file constructor
+// Needs full path for LLLiveFile but needs just file name for this code, hence the reduntant arguments; easier than separating later
+LLGUIPreviewLiveFile::LLGUIPreviewLiveFile(std::string path, std::string name, LLFloaterUIPreview* parent)
+        : mFileName(name),
+		mParent(parent),
+		mFirstFade(TRUE),
+		mFadeTimer(NULL),
+		LLLiveFile(path, 1.0)
+{}
+
+LLGUIPreviewLiveFile::~LLGUIPreviewLiveFile()
+{
+	mParent->mLiveFile = NULL;
+	if(mFadeTimer)
+	{
+		mFadeTimer->mParent = NULL;
+		// deletes itself; see lltimer.cpp
+	}
+}
+
+// Live file load
+void LLGUIPreviewLiveFile::loadFile()
+{
+	mParent->displayFloater(FALSE,1);	// redisplay the floater
+	if(mFirstFade)	// only fade if it wasn't just clicked on; can't use "clicked" BOOL below because of an oddity with setting LLLiveFile initial state
+	{
+		mFirstFade = FALSE;
+	}
+	else
+	{
+		if(mFadeTimer)
+		{
+			mFadeTimer->mParent = NULL;
+		}
+		mFadeTimer = new LLFadeEventTimer(0.05f,this);
+	}
+}
+
+// Initialize fade event timer
+LLFadeEventTimer::LLFadeEventTimer(F32 refresh, LLGUIPreviewLiveFile* parent)
+	: mParent(parent),
+	mFadingOut(TRUE),
+	LLEventTimer(refresh)
+{
+	mOriginalColor = mParent->mParent->mDisplayedFloater->getBackgroundColor();
+}
+
+// Single tick of fade event timer: increment the color
+BOOL LLFadeEventTimer::tick()
+{
+	float diff = 0.04f;
+	if(TRUE == mFadingOut)	// set fade for in/out color direction
+	{
+		diff = -diff;
+	}
+
+	if(NULL == mParent)	// no more need to tick, so suicide
+	{
+		delete this;
+		return FALSE;
+	}
+
+	// Set up colors
+	LLColor4 bg_color = mParent->mParent->mDisplayedFloater->getBackgroundColor();
+	LLSD colors = bg_color.getValue();
+	LLSD colors_old = colors;
+
+	// Tick colors
+	colors[0] = colors[0].asReal() - diff; if(colors[0].asReal() < mOriginalColor.getValue()[0].asReal()) { colors[0] = colors_old[0]; }
+	colors[1] = colors[1].asReal() - diff; if(colors[1].asReal() < mOriginalColor.getValue()[1].asReal()) { colors[1] = colors_old[1]; }
+	colors[2] = colors[2].asReal() + diff; if(colors[2].asReal() > mOriginalColor.getValue()[2].asReal()) { colors[2] = colors_old[2]; }
+
+	// Clamp and set colors
+	bg_color.setValue(colors);
+	bg_color.clamp();	// make sure we didn't exceed [0,1]
+	mParent->mParent->mDisplayedFloater->setBackgroundColor(bg_color);
+
+	if(bg_color[2] <= 0.0f)	// end of fade out, start fading in
+	{
+		mFadingOut = FALSE;
+	}
+
+	return FALSE;
+}
+
+void* create_overlap_panel(void* data)
+{
+	return new LLOverlapPanel();
+}
+
+// Constructor
+LLFloaterUIPreview::LLFloaterUIPreview(const LLSD& key)
+  : LLFloater(),
+	mDisplayedFloater(NULL),
+	mDisplayedFloater_2(NULL),
+	mLiveFile(NULL),
+	// sHighlightingDiffs(FALSE),
+	mHighlightingOverlaps(FALSE),
+	mLastDisplayedX(0),
+	mLastDisplayedY(0)
+
+{
+	sInstance = this;
+	mFactoryMap["overlap_panel"] = LLCallbackMap(create_overlap_panel, NULL);
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_ui_preview.xml");
+}
+
+// Destructor
+LLFloaterUIPreview::~LLFloaterUIPreview()
+{
+	// spawned floaters are deleted automatically, so we don't need to delete them here
+
+	// save contents of textfields so it can be restored later if the floater is created again this session
+	LLFloaterUIPreview::mSavedEditorPath = mEditorPathTextBox->getText();
+	LLFloaterUIPreview::mSavedEditorArgs = mEditorArgsTextBox->getText();
+	LLFloaterUIPreview::mSavedDiffPath   = mDiffPathTextBox->getText();
+
+	// delete live file if it exists
+	if(sInstance->mLiveFile)
+	{
+		delete sInstance->mLiveFile;
+		sInstance->mLiveFile = NULL;
+	}
+
+	sInstance = NULL;	// clear static pointer
+}
+
+// Perform post-build setup (defined in superclass)
+BOOL LLFloaterUIPreview::postBuild()
+{
+	LLPanel* main_panel_tmp = getChild<LLPanel>("main_panel");				// get a pointer to the main panel in order to...
+	mFileList = main_panel_tmp->getChild<LLScrollListCtrl>("name_list");	// save pointer to file list
+	// Double-click opens the floater, for convenience
+	mFileList->setDoubleClickCallback(onClickDisplayFloater, (void*)&PRIMARY_FLOATER);
+
+	// get pointers to buttons and link to callbacks
+	mLanguageSelection = main_panel_tmp->getChild<LLComboBox>("language_select_combo");
+	mLanguageSelection->setSelectionCallback(boost::bind(&LLFloaterUIPreview::onLanguageComboSelect, this, mLanguageSelection));
+	mLanguageSelection_2 = main_panel_tmp->getChild<LLComboBox>("language_select_combo_2");
+	mLanguageSelection_2->setSelectionCallback(boost::bind(&LLFloaterUIPreview::onLanguageComboSelect, this, mLanguageSelection));
+	LLPanel* editor_panel_tmp = main_panel_tmp->getChild<LLPanel>("editor_panel");
+	mDisplayFloaterBtn = main_panel_tmp->getChild<LLButton>("display_floater");
+	mDisplayFloaterBtn->setClickedCallback(onClickDisplayFloater,  (void*)&PRIMARY_FLOATER);
+	mDisplayFloaterBtn_2 = main_panel_tmp->getChild<LLButton>("display_floater_2");
+	mDisplayFloaterBtn_2->setClickedCallback(onClickDisplayFloater,  (void*)&SECONDARY_FLOATER);
+	mToggleOverlapButton = main_panel_tmp->getChild<LLButton>("toggle_overlap_panel");
+	mToggleOverlapButton->setClickedCallback(onClickToggleOverlapping, this);
+	mCloseOtherButton = main_panel_tmp->getChild<LLButton>("close_displayed_floater");
+	mCloseOtherButton->setClickedCallback(onClickCloseDisplayedFloater, (void*)&PRIMARY_FLOATER);
+	mCloseOtherButton_2 = main_panel_tmp->getChild<LLButton>("close_displayed_floater_2");
+	mCloseOtherButton_2->setClickedCallback(onClickCloseDisplayedFloater, (void*)&SECONDARY_FLOATER);
+	mEditFloaterBtn = main_panel_tmp->getChild<LLButton>("edit_floater");
+	mEditFloaterBtn->setClickedCallback(onClickEditFloater, this);
+	mExecutableBrowseButton = editor_panel_tmp->getChild<LLButton>("browse_for_executable");
+	LLPanel* vlt_panel_tmp = main_panel_tmp->getChild<LLPanel>("vlt_panel");
+	mExecutableBrowseButton->setClickedCallback(onClickBrowseForEditor, this);
+	mDiffBrowseButton = vlt_panel_tmp->getChild<LLButton>("browse_for_vlt_diffs");
+	mDiffBrowseButton->setClickedCallback(onClickBrowseForDiffs, NULL);
+	mToggleHighlightButton = vlt_panel_tmp->getChild<LLButton>("toggle_vlt_diff_highlight");
+	mToggleHighlightButton->setClickedCallback(onClickToggleDiffHighlighting, NULL);
+	main_panel_tmp->getChild<LLButton>("save_floater")->setClickedCallback(onClickSaveFloater, (void*)&PRIMARY_FLOATER);
+
+	// get pointers to text fields
+	mEditorPathTextBox = editor_panel_tmp->getChild<LLLineEditor>("executable_path_field");
+	mEditorArgsTextBox = editor_panel_tmp->getChild<LLLineEditor>("executable_args_field");
+	mDiffPathTextBox = vlt_panel_tmp->getChild<LLLineEditor>("vlt_diff_path_field");
+
+	// *HACK: restored saved editor path and args to textfields
+	mEditorPathTextBox->setText(LLFloaterUIPreview::mSavedEditorPath);
+	mEditorArgsTextBox->setText(LLFloaterUIPreview::mSavedEditorArgs);
+	mDiffPathTextBox->setText(LLFloaterUIPreview::mSavedDiffPath);
+
+	// Set up overlap panel
+	mOverlapPanel = getChild<LLOverlapPanel>("overlap_panel");
+
+	sInstance->childSetVisible("overlap_scroll", mHighlightingOverlaps);
+	
+	mDelim = gDirUtilp->getDirDelimiter();	// initialize delimiter to dir sep slash
+
+	// refresh list of available languages (EN-US will still be default)
+	BOOL found = TRUE;
+	BOOL found_en_us = FALSE;
+	std::string language_directory;
+	std::string xui_dir = get_xui_dir();	// directory containing localizations -- don't forget trailing delim
+	mLanguageSelection->removeall();																				// clear out anything temporarily in list from XML
+	while(found)																									// for every directory
+	{
+		if((found = gDirUtilp->getNextFileInDir(xui_dir, "*", language_directory, FALSE)))							// get next directory
+		{
+			std::string full_path = xui_dir + language_directory;
+			if(LLFile::isfile(full_path.c_str()))																	// if it's not a directory, skip it
+			{
+				continue;
+			}
+
+			if(strncmp("template",language_directory.c_str(),8) && -1 == language_directory.find("."))				// if it's not the template directory or a hidden directory
+			{
+				if(!strncmp("en-us",language_directory.c_str(),5))													// remember if we've seen en-us, so we can make it default
+				{
+					found_en_us = TRUE;
+				}
+				else
+				{
+					mLanguageSelection->add(std::string(language_directory));											// add it to the language selection dropdown menu
+					mLanguageSelection_2->add(std::string(language_directory));
+				}
+			}
+		}
+	}
+	if(found_en_us)
+	{
+		mLanguageSelection->add(std::string("en-us"),ADD_TOP);															// make en-us first item if we found it
+		mLanguageSelection_2->add(std::string("en-us"),ADD_TOP);	
+	}
+	else
+	{
+		std::string warning = std::string("No EN-US localization found; check your XUI directories!");
+		popupAndPrintWarning(warning);
+	}
+	mLanguageSelection->selectFirstItem();																			// select the first item
+	mLanguageSelection_2->selectFirstItem();
+
+	refreshList();																									// refresh the list of available floaters
+
+	return TRUE;
+}
+
+// Callback for language combo box selection: refresh current floater when you change languages
+void LLFloaterUIPreview::onLanguageComboSelect(LLUICtrl* ctrl)
+{
+	LLComboBox* caller = dynamic_cast<LLComboBox*>(ctrl);
+	if (!caller)
+		return;
+	if(caller->getName() == std::string("language_select_combo"))
+	{
+		if(mDisplayedFloater)
+		{
+			onClickCloseDisplayedFloater((void*)&PRIMARY_FLOATER);
+			displayFloater(TRUE,1);
+		}
+	}
+	else
+	{
+		if(mDisplayedFloater_2)
+		{
+			onClickCloseDisplayedFloater((void*)&PRIMARY_FLOATER);
+			displayFloater(TRUE,2);	// *TODO: make take an arg
+		}
+	}
+
+}
+
+// Close click handler -- delete my displayed floater if it exists
+void LLFloaterUIPreview::onClose(bool app_quitting)
+{
+	if(!app_quitting && sInstance && sInstance->mDisplayedFloater)
+	{
+		onClickCloseDisplayedFloater((void*)&PRIMARY_FLOATER);
+		onClickCloseDisplayedFloater((void*)&SECONDARY_FLOATER);
+		delete sInstance->mDisplayedFloater;
+		sInstance->mDisplayedFloater = NULL;
+	}
+	destroy();
+}
+
+// Error handling (to avoid code repetition)
+// *TODO: this is currently unlocalized.  Add to alerts/notifications.xml, someday, maybe.
+void LLFloaterUIPreview::popupAndPrintWarning(std::string& warning)
+{
+	llwarns << warning << llendl;
+	LLSD args;
+	args["MESSAGE"] = warning;
+	LLNotifications::instance().add("GenericAlert", args);
+}
+
+// Get localization string from drop-down menu
+std::string LLFloaterUIPreview::getLocStr(S32 ID)
+{
+	if(ID == 1)
+	{
+		return sInstance->mLanguageSelection->getSelectedItemLabel(0);
+	}
+	else
+	{
+		return sInstance->mLanguageSelection_2->getSelectedItemLabel(0);
+	}
+}
+
+// Get localized directory (build path from data directory to XUI files, substituting localization string in for language)
+std::string LLFloaterUIPreview::getLocalizedDirectory()
+{
+	return get_xui_dir() + (sInstance ? getLocStr(1) : "en-us") + mDelim; // e.g. "C:/Code/guipreview/indra/newview/skins/xui/en-us/";
+}
+
+// Refresh the list of floaters by doing a directory traverse for XML XUI floater files
+// Could be used to grab any specific language's list of compatible floaters, but currently it's just used to get all of them
+void LLFloaterUIPreview::refreshList()
+{
+	// Note: the mask doesn't seem to accept regular expressions, so there need to be two directory searches here
+	mFileList->clearRows();		// empty list
+	std::string name;
+	BOOL found = TRUE;
+	while(found)				// for every floater file that matches the pattern
+	{
+		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "floater_*.xml", name, FALSE)))	// get next file matching pattern
+		{
+			addFloaterEntry(name.c_str());	// and add it to the list (file name only; localization code takes care of rest of path)
+		}
+	}
+	found = TRUE;
+	while(found)				// for every panel file that matches the pattern
+	{
+		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "panel_*.xml", name, FALSE)))	// get next file matching pattern
+		{
+			addFloaterEntry(name.c_str());	// and add it to the list (file name only; localization code takes care of rest of path)
+		}
+	}
+
+	if(!mFileList->isEmpty())	// if there were any matching files, just select the first one (so we don't have to worry about disabling buttons when no entry is selected)
+	{
+		mFileList->selectFirstItem();
+	}
+}
+
+// Add a single entry to the list of available floaters
+// Note: no deduplification (shouldn't be necessary)
+void LLFloaterUIPreview::addFloaterEntry(const std::string& path)
+{
+	LLUUID* entry_id = new LLUUID();				// create a new UUID
+	entry_id->generate(path);
+	const LLUUID& entry_id_ref = *entry_id;			// get a reference to the UUID for the LLSD block
+
+	// fill LLSD column entry: initialize row/col structure
+	LLSD row;
+	row["id"] = entry_id_ref;
+	LLSD& columns = row["columns"];
+
+	// Get name of floater:
+	LLXmlTree xml_tree;
+	std::string full_path = getLocalizedDirectory() + path;			// get full path
+	BOOL success = xml_tree.parseFile(full_path.c_str(), TRUE);		// parse xml
+	std::string entry_name;
+	std::string entry_title;
+	if(success)
+	{
+		// get root (or error handle)
+		LLXmlTreeNode* root_floater = xml_tree.getRoot();
+		if (!root_floater)
+		{
+			std::string warning = std::string("No root node found in XUI file: ") + path;
+			popupAndPrintWarning(warning);
+			return;
+		}
+
+		// get name
+		root_floater->getAttributeString("name",entry_name);
+		if(std::string("") == entry_name)
+		{
+			entry_name = "Error: unable to load " + std::string(path);	// set to error state if load fails
+		}
+
+		// get title
+		root_floater->getAttributeString("title",entry_title); // some don't have a title, and some have title = "(unknown)", so just leave it blank if it fails
+	}
+	else
+	{
+		std::string warning = std::string("Unable to parse XUI file: ") + path;	// error handling
+		popupAndPrintWarning(warning);
+		if(mLiveFile)
+		{
+			delete mLiveFile;
+			mLiveFile = NULL;
+		}
+		return;
+	}
+
+	// Fill floater title column
+	columns[0]["column"] = "title_column";
+	columns[0]["type"] = "text";
+	columns[0]["value"] = entry_title;
+
+	// Fill floater path column
+	columns[1]["column"] = "file_column";
+	columns[1]["type"] = "text";
+	columns[1]["value"] = std::string(path);
+
+	// Fill floater name column
+	columns[2]["column"] = "top_level_node_column";
+	columns[2]["type"] = "text";
+	columns[2]["value"] = entry_name;
+
+	mFileList->addElement(row);		// actually add to list
+}
+
+// Respond to button click to display/refresh currently-selected floater
+void LLFloaterUIPreview::onClickDisplayFloater(void* data)
+{
+	S32 caller_id = *((S32*)data);
+	displayFloater(TRUE, caller_id);
+	if(caller_id == 1)
+	{
+		sInstance->mDisplayedFloater->center();	// move displayed floater to the center of the screen
+	}
+}
+
+// Respond to button click to display/refresh currently-selected floater
+void LLFloaterUIPreview::onClickSaveFloater(void* data)
+{
+	S32 caller_id = *((S32*)data);
+	displayFloater(TRUE, caller_id, true);
+	if(caller_id == 1)
+	{
+		sInstance->mDisplayedFloater->center();	// move displayed floater to the center of the screen
+	}
+}
+
+
+// Given path to floater or panel XML file "filename.xml",
+// returns "filename_new.xml"
+static std::string append_new_to_xml_filename(const std::string& path)
+{
+	std::string full_filename = gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), path);
+	std::string::size_type extension_pos = full_filename.rfind(".xml");
+	full_filename.resize(extension_pos);
+	full_filename += "_new.xml";
+	return full_filename;
+}
+
+// Actually display the floater
+// Only set up a new live file if this came from a click (at which point there should be no existing live file), rather than from the live file's update itself;
+// otherwise, we get an infinite loop as the live file keeps recreating itself.  That means this function is generally called twice.
+void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
+{
+	// Convince UI that we're in a different language (the one selected on the drop-down menu)
+	LLLocalizationResetForcer reset_forcer(ID);							// save old language in reset forcer object (to be reset upon destruction when it falls out of scope)
+
+	LLPreviewedFloater** floaterp = (ID == 1 ? &(sInstance->mDisplayedFloater) : &(sInstance->mDisplayedFloater_2));
+	if(ID == 1)
+	{
+		BOOL floater_already_open = sInstance->mDisplayedFloater != NULL;
+		if(floater_already_open)											// if we are already displaying a floater
+		{
+			sInstance->mLastDisplayedX = sInstance->mDisplayedFloater->calcScreenRect().mLeft;	// save floater's last known position to put the new one there
+			sInstance->mLastDisplayedY = sInstance->mDisplayedFloater->calcScreenRect().mBottom;
+			delete sInstance->mDisplayedFloater;							// delete it (this closes it too)
+			sInstance->mDisplayedFloater = NULL;							// and reset the pointer
+		}
+	}
+	else
+	{
+		if(sInstance->mDisplayedFloater_2 != NULL)
+		{
+			delete sInstance->mDisplayedFloater_2;
+			sInstance->mDisplayedFloater_2 = NULL;
+		}
+	}
+
+	std::string path = sInstance->mFileList->getSelectedItemLabel(1);		// get the path of the currently-selected floater
+	if(std::string("") == path)											// if no item is selected
+	{
+		return;															// ignore click (this can only happen with empty list; otherwise an item is always selected)
+	}
+
+	*floaterp = new LLPreviewedFloater();
+
+	if(strncmp(path.c_str(),"panel_",6))								// if it's not a panel
+	{
+		if (save)
+		{
+			LLXMLNodePtr floater_write = new LLXMLNode();			
+			LLUICtrlFactory::getInstance()->buildFloater(*floaterp, path, FALSE, floater_write);	// just build it
+			
+			std::string full_filename = append_new_to_xml_filename(path);
+			LLFILE* floater_temp = LLFile::fopen(full_filename.c_str(), "w");
+			LLXMLNode::writeHeaderToFile(floater_temp);
+			floater_write->writeToFile(floater_temp, "    ");
+			fclose(floater_temp);
+		}
+		else
+		{
+			LLUICtrlFactory::getInstance()->buildFloater(*floaterp, path, TRUE);	// just build it
+		}
+
+	}
+	else																// if it is a panel...
+	{
+		static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+
+		LLPanel::Params panel_params;
+		LLPanel* panel = LLUICtrlFactory::create<LLPanel>(panel_params);	// create a new panel
+
+		if (save)
+		{
+			LLXMLNodePtr panel_write = new LLXMLNode();
+			LLUICtrlFactory::getInstance()->buildPanel(panel, path, panel_write);		// build it
+	
+			std::string full_filename = append_new_to_xml_filename(path);
+			LLFILE* panel_temp = LLFile::fopen(full_filename.c_str(), "w");
+			LLXMLNode::writeHeaderToFile(panel_temp);
+			panel_write->writeToFile(panel_temp, "    ");
+			fclose(panel_temp);
+		}
+		else
+		{
+			LLUICtrlFactory::getInstance()->buildPanel(panel, path);		// build it
+
+		}
+
+		if (!save) 
+		{
+			LLRect new_size = panel->getRect();								// get its rectangle
+			panel->setOrigin(0,0);											// reset its origin point so it's not offset by -left or other XUI attributes
+			(*floaterp)->setTitle(path);									// use the file name as its title, since panels have no guaranteed meaningful name attribute
+			panel->setUseBoundingRect(TRUE);								// enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements)
+			panel->updateBoundingRect();									// update bounding rect
+			LLRect bounding_rect = panel->getBoundingRect();				// get the bounding rect
+			LLRect panel_rect = panel->getRect();							// get the panel's rect
+			LLRect new_rect = panel_rect.unionWith(bounding_rect);			// union them to make sure we get the biggest one possible
+			(*floaterp)->reshape(new_rect.getWidth(), new_rect.getHeight() + floater_header_size);	// reshape floater to match the union rect's dimensions
+			panel->reshape(new_rect.getWidth(), new_rect.getHeight());		// reshape panel to match the union rect's dimensions as well (both are needed)
+			(*floaterp)->addChild(panel);					// add panel as child
+			(*floaterp)->openFloater();						// open floater (needed?)
+		}
+	}
+
+	if(ID == 1)
+	{
+		(*floaterp)->setOrigin(sInstance->mLastDisplayedX, sInstance->mLastDisplayedY);
+	}
+
+	// *HACK: Remove ability to close it; if you close it, its destructor gets called, but we don't know it's null and try to delete it again,
+	// resulting in a double free
+	(*floaterp)->setCanClose(FALSE);
+	
+	if(ID == 1)
+	{
+		sInstance->mCloseOtherButton->setEnabled(TRUE);	// enable my floater's close button
+	}
+	else
+	{
+		sInstance->mCloseOtherButton_2->setEnabled(TRUE);
+	}
+
+	// *TODO: Make the secondary floater pop up next to the primary one.  Doesn't seem to always work if secondary was up first...
+	if((sInstance->mDisplayedFloater && ID == 2) || (sInstance->mDisplayedFloater_2 && ID == 1))
+	{
+		sInstance->mDisplayedFloater_2->setSnapTarget(sInstance->mDisplayedFloater->getHandle());
+		sInstance->mDisplayedFloater->addDependentFloater(sInstance->mDisplayedFloater_2);
+	}
+
+	// Add localization to title so user knows whether it's localized or defaulted to en-us
+	std::string full_path = sInstance->getLocalizedDirectory() + path;
+	std::string floater_lang = "EN-US";
+	llstat dummy;
+	if(!LLFile::stat(full_path.c_str(), &dummy))	// if the file does not exist
+	{
+		floater_lang = getLocStr(ID);
+	}
+	std::string new_title = (*floaterp)->getTitle() + std::string(" [") + floater_lang +
+						(ID == 1 ? " - Primary" : " - Secondary") + std::string("]");
+	(*floaterp)->setTitle(new_title);
+
+	if(click && ID == 1 && !save)
+	{
+		// set up live file to track it
+		if(sInstance->mLiveFile)
+		{
+			delete sInstance->mLiveFile;
+			sInstance->mLiveFile = NULL;
+		}
+		sInstance->mLiveFile = new LLGUIPreviewLiveFile(std::string(full_path.c_str()),std::string(path.c_str()),sInstance);
+		sInstance->mLiveFile->checkAndReload();
+		sInstance->mLiveFile->addToEventTimer();
+	}
+
+	if(ID == 1)
+	{
+		sInstance->mToggleOverlapButton->setEnabled(TRUE);
+	}
+
+	if(LLView::sHighlightingDiffs && click && ID == 1)
+	{
+		sInstance->highlightChangedElements();
+	}
+
+	if(ID == 1)
+	{
+		sInstance->mOverlapMap.clear();
+		LLView::sPreviewClickedElement = NULL;	// stop overlapping elements from drawing
+		sInstance->mOverlapPanel->mLastClickedElement = NULL;
+		sInstance->findOverlapsInChildren((LLView*)sInstance->mDisplayedFloater);
+
+		// highlight and enable them
+		if(sInstance->mHighlightingOverlaps)
+		{
+			for(OverlapMap::iterator iter = sInstance->mOverlapMap.begin(); iter != sInstance->mOverlapMap.end(); ++iter)
+			{
+				LLView* viewp = iter->first;
+				LLView::sPreviewHighlightedElements.insert(viewp);
+			}
+		}
+		else if(LLView::sHighlightingDiffs)
+		{
+			sInstance->highlightChangedElements();
+		}
+	}
+
+	// NOTE: language is reset here automatically when the reset forcer object falls out of scope (see header for details)
+}
+
+// Respond to button click to edit currently-selected floater
+void LLFloaterUIPreview::onClickEditFloater(void*)
+{
+	std::string file_name = sInstance->mFileList->getSelectedItemLabel(1);	// get the file name of the currently-selected floater
+	if(std::string("") == file_name)										// if no item is selected
+	{
+		return;															// ignore click
+	}
+	std::string path = sInstance->getLocalizedDirectory() + file_name;
+
+	// stat file to see if it exists (some localized versions may not have it there are no diffs, and then we try to open an nonexistent file)
+	llstat dummy;
+	if(LLFile::stat(path.c_str(), &dummy))								// if the file does not exist
+	{
+		std::string warning = "No file for this floater exists in the selected localization.  Opening the EN-US version instead.";
+		popupAndPrintWarning(warning);
+
+		path = get_xui_dir() + sInstance->mDelim + "en-us" + sInstance->mDelim + file_name; // open the en-us version instead, by default
+	}
+
+	// get executable path
+	const char* exe_path_char;
+	std::string path_in_textfield = sInstance->mEditorPathTextBox->getText();
+	if(std::string("") != path_in_textfield)	// if the text field is not emtpy, use its path
+	{
+		exe_path_char = path_in_textfield.c_str();
+	}
+	else									// otherwise use the path specified by the environment variable
+	{
+		exe_path_char = getenv("LL_XUI_EDITOR");
+	}
+
+	// error check executable path
+	if(NULL == exe_path_char)
+	{
+		std::string warning = "Select an editor by setting the environment variable LL_XUI_EDITOR or specifying its path in the \"Editor Path\" field.";
+		popupAndPrintWarning(warning);
+		return;
+	}
+	std::string exe_path = exe_path_char;	// do this after error check, otherwise internal strlen call fails on bad char*
+
+	// remove any quotes; they're added back in later where necessary
+	int found_at;
+	while((found_at = exe_path.find("\"")) != -1 || (found_at = exe_path.find("'")) != -1)
+	{
+		exe_path.erase(found_at,1);
+	}
+
+	llstat s;
+	if(!LLFile::stat(exe_path.c_str(), &s)) // If the executable exists
+	{
+		// build paths and arguments
+		std::string args;
+		std::string custom_args = sInstance->mEditorArgsTextBox->getText();
+		int position_of_file = custom_args.find(std::string("%FILE%"), 0);	// prepare to replace %FILE% with actual file path
+		std::string first_part_of_args = "";
+		std::string second_part_of_args = "";
+		if(-1 == position_of_file)	// default: Executable.exe File.xml
+		{
+			args = std::string("\"") + path + std::string("\"");			// execute the command Program.exe "File.xml"
+		}
+		else						// use advanced command-line arguments, e.g. "Program.exe -safe File.xml" -windowed for "-safe %FILE% -windowed"
+		{
+			first_part_of_args = custom_args.substr(0,position_of_file);											// get part of args before file name
+			second_part_of_args = custom_args.substr(position_of_file+6,custom_args.length());						// get part of args after file name
+			custom_args = first_part_of_args + std::string("\"") + path + std::string("\"") + second_part_of_args;	// replace %FILE% with "<file path>" and put back together
+			args = custom_args;																						// and save in the variable that is actually used
+		}
+
+		// find directory in which executable resides by taking everything after last slash
+		int last_slash_position = exe_path.find_last_of(sInstance->mDelim);
+		if(-1 == last_slash_position)
+		{
+			std::string warning = std::string("Unable to find a valid path to the specified executable for XUI XML editing: ") + exe_path;
+			popupAndPrintWarning(warning);
+			return;
+		}
+        std::string exe_dir = exe_path.substr(0,last_slash_position); // strip executable off, e.g. get "C:\Program Files\TextPad 5" (with or without trailing slash)
+
+#if LL_WINDOWS
+		PROCESS_INFORMATION pinfo;
+		STARTUPINFOA sinfo;
+		memset(&sinfo, 0, sizeof(sinfo));
+		memset(&pinfo, 0, sizeof(pinfo));
+
+		std::string exe_name = exe_path.substr(last_slash_position+1);
+		args = exe_name + std::string(" ") + args;				// and prepend the executable name, so we get 'Program.exe "Arg1"'
+
+		char *args2 = new char[args.size() + 1];	// Windows requires that the second parameter to CreateProcessA be a writable (non-const) string...
+		strcpy(args2, args.c_str());
+
+		if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo))
+		{
+			// DWORD dwErr = GetLastError();
+			std::string warning = "Creating editor process failed!";
+			popupAndPrintWarning(warning);
+		}
+		else
+		{
+			// foo = pinfo.dwProcessId; // get your pid here if you want to use it later on
+			// sGatewayHandle = pinfo.hProcess;
+			CloseHandle(pinfo.hThread); // stops leaks - nothing else
+		}
+
+		delete[] args2;
+#else	// if !LL_WINDOWS
+		// This code was copied from the code to run SLVoice, with some modification; should work in UNIX (Mac/Darwin or Linux)
+		{
+			std::vector<std::string> arglist;
+			arglist.push_back(exe_path.c_str());
+
+			// Split the argument string into separate strings for each argument
+			typedef boost::tokenizer< boost::char_separator<char> > tokenizer;
+			boost::char_separator<char> sep("","\" ", boost::drop_empty_tokens);
+
+			tokenizer tokens(args, sep);
+			tokenizer::iterator token_iter;
+			BOOL inside_quotes = FALSE;
+			BOOL last_was_space = FALSE;
+			for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
+			{
+				if(!strncmp("\"",(*token_iter).c_str(),2))
+				{
+					inside_quotes = !inside_quotes;
+				}
+				else if(!strncmp(" ",(*token_iter).c_str(),2))
+				{
+					if(inside_quotes)
+					{
+						arglist.back().append(std::string(" "));
+						last_was_space = TRUE;
+					}
+				}
+				else
+				{
+					std::string to_push = *token_iter;
+					if(last_was_space)
+					{
+						arglist.back().append(to_push);
+						last_was_space = FALSE;
+					}
+					else
+					{
+						arglist.push_back(to_push);
+					}
+				}
+			}
+			
+			// create an argv vector for the child process
+			char **fakeargv = new char*[arglist.size() + 1];
+			int i;
+			for(i=0; i < arglist.size(); i++)
+				fakeargv[i] = const_cast<char*>(arglist[i].c_str());
+
+			fakeargv[i] = NULL;
+
+			fflush(NULL); // flush all buffers before the child inherits them
+			pid_t id = vfork();
+			if(id == 0)
+			{
+				// child
+				execv(exe_path.c_str(), fakeargv);
+
+				// If we reach this point, the exec failed.
+				// Use _exit() instead of exit() per the vfork man page.
+				std::string warning = "Creating editor process failed (vfork/execv)!";
+				popupAndPrintWarning(warning);
+				_exit(0);
+			}
+
+			// parent
+			delete[] fakeargv;
+			// sGatewayPID = id;
+		}
+#endif	// LL_WINDOWS
+	}
+	else
+	{
+		std::string warning = "Unable to find path to external XML editor for XUI preview tool";
+		popupAndPrintWarning(warning);
+	}
+}
+
+// Respond to button click to browse for an executable with which to edit XML files
+void LLFloaterUIPreview::onClickBrowseForEditor(void*)
+{
+	// create load dialog box
+	LLFilePicker::ELoadFilter type = (LLFilePicker::ELoadFilter)((intptr_t)((void*)LLFilePicker::FFLOAD_ALL));	// nothing for *.exe so just use all
+	LLFilePicker& picker = LLFilePicker::instance();
+	if (!picker.getOpenFile(type))	// user cancelled -- do nothing
+	{
+		return;
+	}
+
+	// put the selected path into text field
+	const std::string chosen_path = picker.getFirstFile();
+	std::string executable_path = chosen_path;
+#if LL_DARWIN
+	// on Mac, if it's an application bundle, figure out the actual path from the Info.plist file
+	CFStringRef path_cfstr = CFStringCreateWithCString(kCFAllocatorDefault, chosen_path.c_str(), kCFStringEncodingMacRoman);		// get path as a CFStringRef
+	CFURLRef path_url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path_cfstr, kCFURLPOSIXPathStyle, TRUE);			// turn it into a CFURLRef
+	CFBundleRef chosen_bundle = CFBundleCreate(kCFAllocatorDefault, path_url);												// get a handle for the bundle
+	if(NULL != chosen_bundle)
+	{
+		CFDictionaryRef bundleInfoDict = CFBundleGetInfoDictionary(chosen_bundle);												// get the bundle's dictionary
+		if(NULL != bundleInfoDict)
+		{
+			CFStringRef executable_cfstr = (CFStringRef)CFDictionaryGetValue(bundleInfoDict, CFSTR("CFBundleExecutable"));	// get the name of the actual executable (e.g. TextEdit or firefox-bin)
+			int max_file_length = 256;																						// (max file name length is 255 in OSX)
+			char executable_buf[max_file_length];
+			if(CFStringGetCString(executable_cfstr, executable_buf, max_file_length, kCFStringEncodingMacRoman))			// convert CFStringRef to char*
+			{
+				executable_path += std::string("/Contents/MacOS/") + std::string(executable_buf);							// append path to executable directory and then executable name to exec path
+			}
+			else
+			{
+				std::string warning = "Unable to get CString from CFString for executable path";
+				popupAndPrintWarning(warning);
+			}
+		}
+		else
+		{
+			std::string warning = "Unable to get bundle info dictionary from application bundle";
+			popupAndPrintWarning(warning);
+		}
+	}
+	else
+	{
+		if(-1 != executable_path.find(".app"))	// only warn if this path actually had ".app" in it, i.e. it probably just wasn'nt an app bundle and that's okay
+		{
+			std::string warning = std::string("Unable to get bundle from path \"") + chosen_path + std::string("\"");
+			popupAndPrintWarning(warning);
+		}
+	}
+
+#endif
+	sInstance->mEditorPathTextBox->setText(std::string(executable_path));	// copy the path to the executable to the textfield for display and later fetching
+}
+
+// Respond to button click to browse for a VLT-generated diffs file
+void LLFloaterUIPreview::onClickBrowseForDiffs(void*)
+{
+	// create load dialog box
+	LLFilePicker::ELoadFilter type = (LLFilePicker::ELoadFilter)((intptr_t)((void*)LLFilePicker::FFLOAD_XML));	// nothing for *.exe so just use all
+	LLFilePicker& picker = LLFilePicker::instance();
+	if (!picker.getOpenFile(type))	// user cancelled -- do nothing
+	{
+		return;
+	}
+
+	// put the selected path into text field
+	const std::string chosen_path = picker.getFirstFile();
+	sInstance->mDiffPathTextBox->setText(std::string(chosen_path));	// copy the path to the executable to the textfield for display and later fetching
+	if(LLView::sHighlightingDiffs)								// if we're already highlighting, toggle off and then on so we get the data from the new file
+	{
+		onClickToggleDiffHighlighting(NULL);
+		onClickToggleDiffHighlighting(NULL);
+	}
+}
+
+void LLFloaterUIPreview::onClickToggleDiffHighlighting(void*)
+{
+	if(sInstance->mHighlightingOverlaps)
+	{
+		onClickToggleOverlapping(NULL);
+		sInstance->mToggleOverlapButton->toggleState();
+	}
+
+	LLView::sPreviewHighlightedElements.clear();	// clear lists first
+	sInstance->mDiffsMap.clear();
+	sInstance->mFileList->clearHighlightedItems();
+
+	if(LLView::sHighlightingDiffs)				// Turning highlighting off
+	{
+		LLView::sHighlightingDiffs = !sInstance->sHighlightingDiffs;
+		return;
+	}
+	else											// Turning highlighting on
+	{
+		// Get the file and make sure it exists
+		std::string path_in_textfield = sInstance->mDiffPathTextBox->getText();	// get file path
+		BOOL error = FALSE;
+
+		if(std::string("") == path_in_textfield)									// check for blank file
+		{
+			std::string warning = "Unable to highlight differences because no file was provided; fill in the relevant text field";
+			popupAndPrintWarning(warning);
+			error = TRUE;
+		}
+
+		llstat dummy;
+		if(LLFile::stat(path_in_textfield.c_str(), &dummy) && !error)			// check if the file exists (empty check is reduntant but useful for the informative error message)
+		{
+			std::string warning = std::string("Unable to highlight differences because an invalid path to a difference file was provided:\"") + path_in_textfield + "\"";
+			popupAndPrintWarning(warning);
+			error = TRUE;
+		}
+
+		// Build a list of changed elements as given by the XML
+		std::list<std::string> changed_element_names;
+		LLXmlTree xml_tree;
+		BOOL success = xml_tree.parseFile(path_in_textfield.c_str(), TRUE);
+
+		if(success && !error)
+		{
+			LLXmlTreeNode* root_floater = xml_tree.getRoot();
+			if(!strncmp("XuiDelta",root_floater->getName().c_str(),9))
+			{
+				for (LLXmlTreeNode* child = root_floater->getFirstChild();		// get the first child first, then below get the next one; otherwise the iterator is invalid (bug or feature in XML code?)
+					 child != NULL;
+ 					 child = root_floater->getNextChild())	// get child for next iteration
+				{
+					if(!strncmp("file",child->getName().c_str(),5))
+					{
+						sInstance->scanDiffFile(child);
+					}
+					else if(!strncmp("error",child->getName().c_str(),6))
+					{
+						std::string error_file, error_message;
+						child->getAttributeString("filename",error_file);
+						child->getAttributeString("message",error_message);
+						if(sInstance->mDiffsMap.find(error_file) != sInstance->mDiffsMap.end())
+						{
+							sInstance->mDiffsMap.insert(std::make_pair(error_file,std::make_pair(StringListPtr(new StringList), StringListPtr(new StringList))));
+						}
+						sInstance->mDiffsMap[error_file].second->push_back(error_message);
+					}
+					else
+					{
+						std::string warning = std::string("Child was neither a file or an error, but rather the following:\"") + std::string(child->getName()) + "\"";
+						popupAndPrintWarning(warning);
+						error = TRUE;
+						break;
+					}
+				}
+			}
+			else
+			{
+				std::string warning = std::string("Root node not named XuiDelta:\"") + path_in_textfield + "\"";
+				popupAndPrintWarning(warning);
+				error = TRUE;
+			}
+		}
+		else if(!error)
+		{
+			std::string warning = std::string("Unable to create tree from XML:\"") + path_in_textfield + "\"";
+			popupAndPrintWarning(warning);
+			error = TRUE;
+		}
+
+		if(error)	// if we encountered an error, reset the button to off
+		{
+			sInstance->mToggleHighlightButton->setToggleState(FALSE);		
+		}
+		else		// only toggle if we didn't encounter an error
+		{
+			LLView::sHighlightingDiffs = !sInstance->sHighlightingDiffs;
+			sInstance->highlightChangedElements();		// *TODO: this is extraneous, right?
+			sInstance->highlightChangedFiles();			// *TODO: this is extraneous, right?
+		}
+	}
+}
+
+void LLFloaterUIPreview::scanDiffFile(LLXmlTreeNode* file_node)
+{
+	// Get file name
+	std::string file_name;
+	file_node->getAttributeString("name",file_name);
+	if(std::string("") == file_name)
+	{
+		std::string warning = std::string("Empty file name encountered in differences:\"") + file_name + "\"";
+		popupAndPrintWarning(warning);
+		return;
+	}
+
+	// Get a list of changed elements
+	// Get the first child first, then below get the next one; otherwise the iterator is invalid (bug or feature in XML code?)
+	for (LLXmlTreeNode* child = file_node->getFirstChild(); child != NULL; child = file_node->getNextChild())
+	{
+		if(!strncmp("delta",child->getName().c_str(),6))
+		{
+			std::string id;
+			child->getAttributeString("id",id);
+			if(mDiffsMap.find(file_name) == mDiffsMap.end())
+			{
+				mDiffsMap.insert(std::make_pair(file_name,std::make_pair(StringListPtr(new StringList), StringListPtr(new StringList))));
+			}
+			mDiffsMap[file_name].first->push_back(std::string(id.c_str()));
+		}
+		else
+		{
+			std::string warning = std::string("Child of file was not a delta, but rather the following:\"") + std::string(child->getName()) + "\"";
+			popupAndPrintWarning(warning);
+			return;
+		}
+	}
+}
+
+void LLFloaterUIPreview::highlightChangedElements()
+{
+	if(NULL == mLiveFile)
+	{
+		return;
+	}
+
+	// Process differences first (we want their warnings to be shown underneath other warnings)
+	StringListPtr changed_element_paths;
+	DiffMap::iterator iterExists = mDiffsMap.find(mLiveFile->mFileName);
+	if(iterExists != mDiffsMap.end())
+	{
+		changed_element_paths = mDiffsMap[mLiveFile->mFileName].first;		// retrieve list of changed element paths from map
+	}
+
+	for(std::list<std::string>::iterator iter = changed_element_paths->begin(); iter != changed_element_paths->end(); ++iter)	// for every changed element path
+	{
+		LLView* element = sInstance->mDisplayedFloater;
+		if(!strncmp(iter->c_str(),".",1))	// if it's the root floater itself
+		{
+			continue;
+		}
+
+		// Split element hierarchy path on period (*HACK: it's possible that the element name will have a period in it, in which case this won't work.  See https://wiki.lindenlab.com/wiki/Viewer_Localization_Tool_Documentation.)
+		typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
+		boost::char_separator<char> sep(".");
+		tokenizer tokens(*iter, sep);
+		tokenizer::iterator token_iter;
+		BOOL failed = FALSE;
+		for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
+		{
+			element = element->getChild<LLView>(*token_iter,FALSE,FALSE);	// try to find element: don't recur, and don't create if missing
+
+			// if we still didn't find it...
+			if(NULL == element)												
+			{
+				llinfos << "Unable to find element in XuiDelta file named \"" << *iter << "\" in file \"" << mLiveFile->mFileName <<
+							"\". The element may no longer exist, the path may be incorrect, or it may not be a non-displayable element (not an LLView) such as a \"string\" type." << llendl;
+				failed = TRUE;
+				break;
+			}
+		}
+
+		if(!failed)
+		{
+			// Now that we have a pointer to the actual element, add it to the list of elements to be highlighted
+			std::set<LLView*>::iterator iter2 = std::find(LLView::sPreviewHighlightedElements.begin(), LLView::sPreviewHighlightedElements.end(), element);
+			if(iter2 == LLView::sPreviewHighlightedElements.end())
+			{
+				LLView::sPreviewHighlightedElements.insert(element);
+			}
+		}
+	}
+
+	// Process errors second, so their warnings show up on top of other warnings
+	StringListPtr error_list;
+	if(iterExists != mDiffsMap.end())
+	{
+		error_list = mDiffsMap[mLiveFile->mFileName].second;
+	}
+	for(std::list<std::string>::iterator iter = error_list->begin(); iter != error_list->end(); ++iter)	// for every changed element path
+	{
+		std::string warning = std::string("Error listed among differences.  Filename: \"") + mLiveFile->mFileName + "\".  Message: \"" + *iter + "\"";
+		popupAndPrintWarning(warning);
+	}
+}
+
+void LLFloaterUIPreview::highlightChangedFiles()
+{
+	for(DiffMap::iterator iter = mDiffsMap.begin(); iter != mDiffsMap.end(); ++iter)	// for every file listed in diffs
+	{
+		LLScrollListItem* item = mFileList->getItemByLabel(std::string(iter->first), FALSE, 1);
+		if(item)
+		{
+			item->setHighlighted(TRUE);
+		}
+	}
+}
+
+// Respond to button click to browse for an executable with which to edit XML files
+void LLFloaterUIPreview::onClickCloseDisplayedFloater(void* data)
+{
+	S32 caller_id = *((S32*)data);
+	if(caller_id == 1)
+	{
+		sInstance->mCloseOtherButton->setEnabled(FALSE);
+		sInstance->mToggleOverlapButton->setEnabled(FALSE);
+
+		if(sInstance->mDisplayedFloater)
+		{
+			sInstance->mLastDisplayedX = sInstance->mDisplayedFloater->calcScreenRect().mLeft;
+			sInstance->mLastDisplayedY = sInstance->mDisplayedFloater->calcScreenRect().mBottom;
+			delete sInstance->mDisplayedFloater;
+			sInstance->mDisplayedFloater = NULL;
+		}
+
+		if(sInstance->mLiveFile)
+		{
+			delete sInstance->mLiveFile;
+			sInstance->mLiveFile = NULL;
+		}
+
+		if(sInstance->mToggleOverlapButton->getToggleState())
+		{
+			sInstance->mToggleOverlapButton->toggleState();
+			onClickToggleOverlapping(NULL);
+		}
+
+		LLView::sPreviewClickedElement = NULL;	// stop overlapping elements panel from drawing
+		sInstance->mOverlapPanel->mLastClickedElement = NULL;
+	}
+	else
+	{
+		sInstance->mCloseOtherButton_2->setEnabled(FALSE);
+		delete sInstance->mDisplayedFloater_2;
+		sInstance->mDisplayedFloater_2 = NULL;
+	}
+
+}
+
+BOOL LLPreviewedFloater::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+	selectElement(this,x,y,0);
+	return TRUE;
+}
+
+// *NOTE: In order to hide all of the overlapping elements of the selected element so as to see it in context, here is what you would need to do:
+// -This selectElement call fills the overlap panel as normal.  The element which is "selected" here is actually just an intermediate selection step;
+// what you've really selected is a list of elements: the one you clicked on and everything that overlaps it.
+// -The user then selects one of the elements from this list the overlap panel (click handling to the overlap panel would have to be added).
+//  This becomes the final selection (as opposed to the intermediate selection that was just made).
+// -Everything else that is currently displayed on the overlap panel should be hidden from view in the previewed floater itself (setVisible(FALSE)).
+// -Subsequent clicks on other elements in the overlap panel (they should still be there) should make other elements the final selection.
+// -On close or on the click of a new button, everything should be shown again and all selection state should be cleared.
+//   ~Jacob, 8/08
+BOOL LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth)
+{
+	if(getVisible())
+	{
+		BOOL handled = FALSE;
+		if(LLFloaterUIPreview::containerType(parent))
+		{
+			for(child_list_const_iter_t child_it = parent->getChildList()->begin(); child_it != parent->getChildList()->end(); ++child_it)
+			{
+				LLView* child = *child_it;
+				S32 local_x = x - child->getRect().mLeft;
+				S32 local_y = y - child->getRect().mBottom;
+				if (child->pointInView(local_x, local_y) &&
+					child->getVisible() &&
+					selectElement(child, x, y, ++depth))
+				{
+					handled = TRUE;
+					break;
+				}
+			}
+		}
+
+		if(!handled)
+		{
+			LLView::sPreviewClickedElement = parent;
+		}
+		return TRUE;
+	}
+	else
+	{
+		return FALSE;
+	}
+}
+
+void LLPreviewedFloater::draw()
+{
+	if(NULL != LLFloaterUIPreview::sInstance)
+	{
+		// Set and unset sDrawPreviewHighlights flag so as to avoid using two flags
+		if(LLFloaterUIPreview::sInstance->mHighlightingOverlaps)
+		{
+			LLView::sDrawPreviewHighlights = TRUE;
+		}
+		LLFloater::draw();
+		if(LLFloaterUIPreview::sInstance->mHighlightingOverlaps)
+		{
+			LLView::sDrawPreviewHighlights = FALSE;
+		}
+	}
+}
+
+void LLFloaterUIPreview::onClickToggleOverlapping(void*)
+{
+	if(LLView::sHighlightingDiffs)
+	{
+		onClickToggleDiffHighlighting(NULL);
+		sInstance->mToggleHighlightButton->toggleState();
+	}
+	LLView::sPreviewHighlightedElements.clear();	// clear lists first
+
+	S32 width, height;
+	sInstance->getResizeLimits(&width, &height);	// illegal call of non-static member function
+	if(sInstance->mHighlightingOverlaps)
+	{
+		sInstance->mHighlightingOverlaps = !sInstance->mHighlightingOverlaps;
+		// reset list of preview highlighted elements
+		sInstance->setRect(LLRect(sInstance->getRect().mLeft,sInstance->getRect().mTop,sInstance->getRect().mRight - sInstance->mOverlapPanel->getRect().getWidth(),sInstance->getRect().mBottom));
+		sInstance->setResizeLimits(width - sInstance->mOverlapPanel->getRect().getWidth(), height);
+	}
+	else
+	{
+		sInstance->mHighlightingOverlaps = !sInstance->mHighlightingOverlaps;
+		displayFloater(FALSE,1);
+		sInstance->setRect(LLRect(sInstance->getRect().mLeft,sInstance->getRect().mTop,sInstance->getRect().mRight + sInstance->mOverlapPanel->getRect().getWidth(),sInstance->getRect().mBottom));
+		sInstance->setResizeLimits(width + sInstance->mOverlapPanel->getRect().getWidth(), height);
+	}
+	sInstance->childSetVisible("overlap_scroll", sInstance->mHighlightingOverlaps);
+}
+
+void LLFloaterUIPreview::findOverlapsInChildren(LLView* parent)
+{
+	if(parent->getChildCount() == 0 || !containerType(parent))	// if it has no children or isn't a container type, skip it
+	{
+		return;
+	}
+
+	// for every child of the parent
+	for(child_list_const_iter_t child_it = parent->getChildList()->begin(); child_it != parent->getChildList()->end(); ++child_it)
+	{
+		LLView* child = *child_it;
+		if(overlapIgnorable(child))
+		{
+			continue;
+		}
+
+		// for every sibling
+		for(child_list_const_iter_t sibling_it = parent->getChildList()->begin(); sibling_it != parent->getChildList()->end(); ++sibling_it)	// for each sibling
+		{
+			LLView* sibling = *sibling_it;
+			if(overlapIgnorable(sibling))
+			{
+				continue;
+			}
+
+			// if they overlap... (we don't care if they're visible or enabled -- we want to check those anyway, i.e. hidden tabs that can be later shown)
+			if(sibling != child && elementOverlap(child, sibling))
+			{
+				mOverlapMap[child].push_back(sibling);		// add to the map
+			}
+		}
+		findOverlapsInChildren(child);						// recur
+	}
+}
+
+// *HACK: don't overlap with the drag handle and various other elements
+// This is using dynamic casts because there is no object-oriented way to tell which elements contain localizable text.  These are a few that are ignorable.
+// *NOTE: If a list of elements which have localizable content were created, this function should return false if viewp's class is in that list.
+BOOL LLFloaterUIPreview::overlapIgnorable(LLView* viewp)
+{
+	return	NULL != dynamic_cast<LLDragHandle*>(viewp) ||
+			NULL != dynamic_cast<LLViewBorder*>(viewp) ||
+			NULL != dynamic_cast<LLResizeBar*>(viewp);
+}
+
+// *HACK: these are the only two container types as of 8/08, per Richard
+// This is using dynamic casts because there is no object-oriented way to tell which elements are containers.
+BOOL LLFloaterUIPreview::containerType(LLView* viewp)
+{
+	return NULL != dynamic_cast<LLPanel*>(viewp) || NULL != dynamic_cast<LLLayoutStack*>(viewp);
+}
+
+// Check if two llview's rectangles overlap, with some tolerance
+BOOL LLFloaterUIPreview::elementOverlap(LLView* view1, LLView* view2)
+{
+	LLSD rec1 = view1->getRect().getValue();
+	LLSD rec2 = view2->getRect().getValue();
+	int tolerance = 2;
+	return (int)rec1[0] <= (int)rec2[2] - tolerance && 
+		   (int)rec2[0] <= (int)rec1[2] - tolerance && 
+		   (int)rec1[3] <= (int)rec2[1] - tolerance && 
+		   (int)rec2[3] <= (int)rec1[1] - tolerance;
+}
+
+void LLOverlapPanel::draw()
+{
+	static const std::string current_selection_text("Current selection: ");
+	static const std::string overlapper_text("Overlapper: ");
+	LLColor4 text_color = LLColor4::grey;
+	gGL.color4fv(text_color.mV);
+
+	if(!LLView::sPreviewClickedElement)
+	{
+		LLUI::translate(5,getRect().getHeight()-20);	// translate to top-5,left-5
+		LLView::sDrawPreviewHighlights = FALSE;
+		LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection_text, 0, 0, 0, text_color,
+				LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE);
+	}
+	else
+	{
+		LLFloaterUIPreview::OverlapMap::iterator iterExists = LLFloaterUIPreview::sInstance->mOverlapMap.find(LLView::sPreviewClickedElement);
+		if(iterExists == LLFloaterUIPreview::sInstance->mOverlapMap.end())
+		{
+			return;
+		}
+
+		std::list<LLView*> overlappers = LLFloaterUIPreview::sInstance->mOverlapMap[LLView::sPreviewClickedElement];
+		if(overlappers.size() == 0)
+		{
+			LLUI::translate(5,getRect().getHeight()-20);	// translate to top-5,left-5
+			LLView::sDrawPreviewHighlights = FALSE;
+			std::string current_selection = std::string(current_selection_text + LLView::sPreviewClickedElement->getName() + " (no elements overlap)");
+			S32 text_width = LLFontGL::getFontSansSerifSmall()->getWidth(current_selection) + 10;
+			LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection, 0, 0, 0, text_color,
+					LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE);
+			// widen panel enough to fit this text
+			LLRect rect = getRect();
+			setRect(LLRect(rect.mLeft,rect.mTop,rect.getWidth() < text_width ? rect.mLeft + text_width : rect.mRight,rect.mTop));
+			return;
+		}
+
+		// recalculate required with and height; otherwise use cached
+		BOOL need_to_recalculate_bounds = FALSE;
+		if(mLastClickedElement == NULL)
+		{
+			need_to_recalculate_bounds = TRUE;
+		}
+
+		if(NULL == mLastClickedElement)
+		{
+			mLastClickedElement = LLView::sPreviewClickedElement;
+		}
+
+		// recalculate bounds for scroll panel
+		if(need_to_recalculate_bounds || LLView::sPreviewClickedElement->getName() != mLastClickedElement->getName())
+		{
+			// reset panel's rectangle to its default width and height (300x600)
+			LLRect panel_rect = LLFloaterUIPreview::sInstance->mOverlapPanel->getRect();
+			LLFloaterUIPreview::sInstance->mOverlapPanel->setRect(LLRect(panel_rect.mLeft,panel_rect.mTop,panel_rect.mLeft+LLFloaterUIPreview::sInstance->mOverlapPanel->getRect().getWidth(),panel_rect.mTop-LLFloaterUIPreview::sInstance->mOverlapPanel->getRect().getHeight()));
+
+			LLRect rect;
+
+			// change bounds for selected element
+			int height_sum = mLastClickedElement->getRect().getHeight() + mSpacing + 80;
+			rect = LLFloaterUIPreview::sInstance->mOverlapPanel->getRect();
+			LLFloaterUIPreview::sInstance->mOverlapPanel->setRect(LLRect(rect.mLeft,rect.mTop,rect.getWidth() > mLastClickedElement->getRect().getWidth() + 5 ? rect.mRight : rect.mLeft + mLastClickedElement->getRect().getWidth() + 5, rect.mBottom));
+
+			// and widen to accomodate text if that's wider
+			std::string display_text = current_selection_text + LLView::sPreviewClickedElement->getName();
+			S32 text_width = LLFontGL::getFontSansSerifSmall()->getWidth(display_text) + 10;
+			rect = getRect();
+			setRect(LLRect(rect.mLeft,rect.mTop,rect.getWidth() < text_width ? rect.mLeft + text_width : rect.mRight,rect.mTop));
+
+			std::list<LLView*> overlappers = LLFloaterUIPreview::sInstance->mOverlapMap[LLView::sPreviewClickedElement];
+			for(std::list<LLView*>::iterator overlap_it = overlappers.begin(); overlap_it != overlappers.end(); ++overlap_it)
+			{
+				LLView* viewp = *overlap_it;
+				height_sum += viewp->getRect().getHeight() + mSpacing*3;
+		
+				// widen panel's rectangle to accommodate widest overlapping element of this floater
+				rect = LLFloaterUIPreview::sInstance->mOverlapPanel->getRect();
+				LLFloaterUIPreview::sInstance->mOverlapPanel->setRect(LLRect(rect.mLeft,rect.mTop,rect.getWidth() > viewp->getRect().getWidth() + 5 ? rect.mRight : rect.mLeft + viewp->getRect().getWidth() + 5, rect.mBottom));
+				
+				// and widen to accomodate text if that's wider
+				std::string display_text = overlapper_text + viewp->getName();
+				S32 text_width = LLFontGL::getFontSansSerifSmall()->getWidth(display_text) + 10;
+				rect = getRect();
+				setRect(LLRect(rect.mLeft,rect.mTop,rect.getWidth() < text_width ? rect.mLeft + text_width : rect.mRight,rect.mTop));
+			}
+			// change panel's height to accommodate all element heights plus spacing between them
+			rect = LLFloaterUIPreview::sInstance->mOverlapPanel->getRect();
+			LLFloaterUIPreview::sInstance->mOverlapPanel->setRect(LLRect(rect.mLeft,rect.mTop,rect.mRight,rect.mTop-height_sum));
+		}
+
+		LLUI::translate(5,getRect().getHeight()-10);	// translate to top left
+		LLView::sDrawPreviewHighlights = FALSE;
+
+		// draw currently-selected element at top of overlappers
+		LLUI::translate(0,-mSpacing);
+		LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection_text + LLView::sPreviewClickedElement->getName(), 0, 0, 0, text_color,
+				LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE);
+		LLUI::translate(0,-mSpacing-LLView::sPreviewClickedElement->getRect().getHeight());	// skip spacing distance + height
+		LLView::sPreviewClickedElement->draw();
+
+		for(std::list<LLView*>::iterator overlap_it = overlappers.begin(); overlap_it != overlappers.end(); ++overlap_it)
+		{
+			LLView* viewp = *overlap_it;
+
+			// draw separating line
+			LLUI::translate(0,-mSpacing);
+			gl_line_2d(0,0,getRect().getWidth()-10,0,LLColor4(192.0f/255.0f,192.0f/255.0f,192.0f/255.0f));
+
+			// draw name
+			LLUI::translate(0,-mSpacing);
+			LLFontGL::getFontSansSerifSmall()->renderUTF8(overlapper_text + viewp->getName(), 0, 0, 0, text_color,
+					LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE);
+
+			// draw element
+			LLUI::translate(0,-mSpacing-viewp->getRect().getHeight());	// skip spacing distance + height
+			viewp->draw();
+		}
+		mLastClickedElement = LLView::sPreviewClickedElement;
+	}
+}
diff --git a/indra/newview/llfloateruipreview.h b/indra/newview/llfloateruipreview.h
new file mode 100644
index 0000000000..28fbb52013
--- /dev/null
+++ b/indra/newview/llfloateruipreview.h
@@ -0,0 +1,215 @@
+/**
+ * @file llfloateruipreview.h
+ * @brief Tool for previewing and editing floaters
+ *
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Tool for previewing floaters and panels for localization and UI design purposes.
+// See: https://wiki.lindenlab.com/wiki/GUI_Preview_And_Localization_Tools
+// See: https://jira.lindenlab.com/browse/DEV-16869
+
+#ifndef LL_LLUIPREVIEW_H
+#define LL_LLUIPREVIEW_H
+
+#include "llfloater.h"			// superclass
+#include "llscrollcontainer.h"	// scroll container for overlapping elements
+#include "lllivefile.h"					// live file poll/stat/reload
+#include <list>
+#include <map>
+
+// Forward declarations to avoid header dependencies
+class LLEventTimer;
+class LLColor;
+class LLScrollListCtrl;
+class LLComboBox;
+class LLButton;
+class LLXmlTreeNode;
+class LLFloaterUIPreview;
+class LLFadeEventTimer;
+
+// Reset object to ensure that when we change the current language setting for preview purposes,
+// it automatically is reset.  Constructed on the stack at the start of the method; the reset
+// occurs as it falls out of scope at the end of the method.  See llfloateruipreview.cpp for usage.
+class LLLocalizationResetForcer
+{
+public:
+	LLLocalizationResetForcer(S32 ID);
+	virtual ~LLLocalizationResetForcer();
+
+private:
+	std::string mSavedLocalization;	// the localization before we change it
+};
+
+// Implementation of live file
+// When a floater is being previewed, any saved changes to its corresponding
+// file cause the previewed floater to be reloaded
+class LLGUIPreviewLiveFile : public LLLiveFile
+{
+public:
+	LLGUIPreviewLiveFile(std::string path, std::string name, LLFloaterUIPreview* parent);
+	virtual ~LLGUIPreviewLiveFile();
+	LLFloaterUIPreview* mParent;
+	LLFadeEventTimer* mFadeTimer;	// timer for fade-to-yellow-and-back effect to warn that file has been reloaded
+	BOOL mFirstFade;				// setting this avoids showing the fade reload warning on first load
+	std::string mFileName;
+protected:
+	void loadFile();
+};
+
+// Implementation of graphical fade in/out (on timer) for when XUI files are updated
+class LLFadeEventTimer : public LLEventTimer
+{
+public:
+	LLFadeEventTimer(F32 refresh, LLGUIPreviewLiveFile* parent);
+	BOOL tick();
+	LLGUIPreviewLiveFile* mParent;
+private:
+	BOOL mFadingOut;			// fades in then out; this is toggled in between
+	LLColor4 mOriginalColor;	// original color; color is reset to this after fade is coimplete
+};
+
+// Implementation of previewed floater
+// Used to override draw and mouse handler
+class LLPreviewedFloater : public LLFloater
+{
+public:
+	LLPreviewedFloater() : LLFloater() {}
+	virtual void draw();
+	BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+	BOOL selectElement(LLView* parent, int x, int y, int depth);	// select element to display its overlappers
+};
+
+// Implementation of custom overlapping element display panel
+class LLOverlapPanel : public LLPanel
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLPanel::Params>
+	{
+		Params() {}
+	};
+	LLOverlapPanel(Params p = Params()) : LLPanel(p),
+		mSpacing(10),
+		// mClickedElement(NULL),
+		mLastClickedElement(NULL)
+	{
+		mOriginalWidth = getRect().getWidth();
+		mOriginalHeight = getRect().getHeight();
+	}
+	virtual void draw();
+	// LLView *mClickedElement;
+	LLView *mLastClickedElement;
+	int mOriginalWidth, mOriginalHeight, mSpacing;
+};
+
+class LLFloaterUIPreview : public LLFloater, public LLFloaterSingleton<LLFloaterUIPreview>
+{
+public:
+	// Setup
+	LLFloaterUIPreview(const LLSD& key);
+	virtual ~LLFloaterUIPreview();
+
+	static std::string getLocStr(S32 ID);						// fetches the localization string based on what is selected in the drop-down menu
+	static void displayFloater(BOOL click, S32 ID, bool save = false);			// needs to be public so live file can call it when it finds an update
+	static BOOL containerType(LLView* viewp);				// check if the element is a container type and tree traverses need to look at its children
+	static LLFloaterUIPreview*	sInstance;					// static instance of this (for references in handlers)
+
+	BOOL postBuild();										// post-build setup (called by superclass' constructor)
+	void refreshList();										// refresh list (empty it out and fill it up from scratch)
+	void addFloaterEntry(const std::string& path);			// add a single file's entry to the list of floaters
+
+	LLPreviewedFloater*			mDisplayedFloater;			// the floater which is currently being displayed
+	LLPreviewedFloater*			mDisplayedFloater_2;			// the floater which is currently being displayed
+	LLGUIPreviewLiveFile*		mLiveFile;					// live file for checking for updates to the currently-displayed XML file
+	LLOverlapPanel*				mOverlapPanel;				// custom overlapping elements panel
+	// BOOL						mHighlightingDiffs;			// bool for whether localization diffs are being highlighted or not
+	BOOL						mHighlightingOverlaps;		// bool for whether overlapping elements are being highlighted
+
+	typedef std::map<LLView*, std::list<LLView*> >	OverlapMap;
+	OverlapMap mOverlapMap;						// map, of XUI element to a list of XUI elements it overlaps
+	
+	// typedef std::map<std::string,std::pair<std::list<std::string>,std::list<std::string> > > DiffMap; // this version copies the lists etc., and thus is bad memory-wise
+	typedef std::list<std::string> StringList;
+	typedef boost::shared_ptr<StringList> StringListPtr;
+	typedef std::map<std::string, std::pair<StringListPtr,StringListPtr> > DiffMap;
+	DiffMap mDiffsMap;							// map, of filename to pair of list of changed element paths and list of errors
+
+protected:
+	virtual void onClose(bool app_quitting);
+
+private:
+	// XUI elements for this floater
+	LLScrollListCtrl*			mFileList;							// scroll list control for file list
+	LLLineEditor*				mEditorPathTextBox;					// text field for path to editor executable
+	LLLineEditor*				mEditorArgsTextBox;					// text field for arguments to editor executable
+	LLLineEditor*				mDiffPathTextBox;					// text field for path to diff file
+	LLButton*					mDisplayFloaterBtn;					// button to display primary floater
+	LLButton*					mDisplayFloaterBtn_2;				// button to display secondary floater
+	LLButton*					mEditFloaterBtn;					// button to edit floater
+	LLButton*					mExecutableBrowseButton;			// button to browse for executable
+	LLButton*					mCloseOtherButton;					// button to close primary displayed floater
+	LLButton*					mCloseOtherButton_2;					// button to close secondary displayed floater
+	LLButton*					mDiffBrowseButton;					// button to browse for diff file
+	LLButton*					mToggleHighlightButton;				// button to toggle highlight of files/elements with diffs
+	LLButton*					mToggleOverlapButton;				// button to togle overlap panel/highlighting
+	LLComboBox*					mLanguageSelection;					// combo box for primary language selection
+	LLComboBox*					mLanguageSelection_2;				// combo box for secondary language selection
+	LLScrollContainer*	mOverlapScrollView;					// overlapping elements scroll container
+	S32							mLastDisplayedX, mLastDisplayedY;	// stored position of last floater so the new one opens up in the same place
+	std::string mDelim;												// the OS-specific delimiter character (/ or \) (*TODO: this shouldn't be needed, right?)
+
+	static std::string				mSavedEditorPath;					// stored editor path so closing this floater doesn't reset it
+	static std::string				mSavedEditorArgs;					// stored editor args so closing this floater doesn't reset it
+	static std::string				mSavedDiffPath;						// stored diff file path so closing this floater doesn't reset it
+
+	// Internal functionality
+	static void popupAndPrintWarning(std::string& warning);			// pop up a warning
+	std::string getLocalizedDirectory();							// build and return the path to the XUI directory for the currently-selected localization
+	void scanDiffFile(LLXmlTreeNode* file_node);					// scan a given XML node for diff entries and highlight them in its associated file
+	void highlightChangedElements();								// look up the list of elements to highlight and highlight them in the current floater
+	void highlightChangedFiles();									// look up the list of changed files to highlight and highlight them in the scroll list
+	void findOverlapsInChildren(LLView* parent);					// fill the map below with element overlap information
+	static BOOL overlapIgnorable(LLView* viewp);					// check it the element can be ignored for overlap/localization purposes
+
+	// check if two elements overlap using their rectangles
+	// used instead of llrect functions because by adding a few pixels of leeway I can cut down drastically on the number of overlaps
+	BOOL elementOverlap(LLView* view1, LLView* view2);
+
+	// Button/drop-down action listeners (self explanatory)
+	static void onClickDisplayFloater(void*);
+	static void onClickSaveFloater(void*);
+	static void onClickEditFloater(void*);
+	static void onClickBrowseForEditor(void*);
+	static void onClickBrowseForDiffs(void*);
+	static void onClickToggleDiffHighlighting(void*);
+	static void onClickToggleOverlapping(void*);
+	static void onClickCloseDisplayedFloater(void*);
+	void onLanguageComboSelect(LLUICtrl* ctrl);
+};
+#endif // LL_LLUIPREVIEW_H
+
diff --git a/indra/newview/llfloaterurldisplay.cpp b/indra/newview/llfloaterurldisplay.cpp
index c265c6169a..7f7d05e1d2 100644
--- a/indra/newview/llfloaterurldisplay.cpp
+++ b/indra/newview/llfloaterurldisplay.cpp
@@ -45,9 +45,10 @@
 
 
 LLFloaterURLDisplay::LLFloaterURLDisplay(const LLSD& sd)
+	: LLFloater()
 {	
 	mFactoryMap["place_details_panel"] = LLCallbackMap(LLFloaterURLDisplay::createPlaceDetail, this);
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_url.xml", &getFactoryMap());
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_url.xml");
 	this->setVisible(false);
 
 	// If positioned at 0,0 the teleport button is behind the toolbar.
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index 9d91aa9868..1f59812029 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -86,12 +86,22 @@ public:
 // LLFloaterURLEntry()
 //-----------------------------------------------------------------------------
 LLFloaterURLEntry::LLFloaterURLEntry(LLHandle<LLPanel> parent)
-	:
-	LLFloater(),
-	mPanelLandMediaHandle(parent)
+	: LLFloater(),
+	  mPanelLandMediaHandle(parent)
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_url_entry.xml");
+}
+
+//-----------------------------------------------------------------------------
+// ~LLFloaterURLEntry()
+//-----------------------------------------------------------------------------
+LLFloaterURLEntry::~LLFloaterURLEntry()
+{
+	sInstance = NULL;
+}
 
+BOOL LLFloaterURLEntry::postBuild()
+{
 	mMediaURLEdit = getChild<LLComboBox>("media_entry");
 
 	// Cancel button
@@ -99,7 +109,6 @@ LLFloaterURLEntry::LLFloaterURLEntry(LLHandle<LLPanel> parent)
 
 	// Cancel button
 	childSetAction("clear_btn", onBtnClear, this);
-
 	// clear media list button
 	LLSD parcel_history = LLURLHistory::getURLHistory("parcel");
 	bool enable_clear_button = parcel_history.size() > 0 ? true : false;
@@ -111,17 +120,8 @@ LLFloaterURLEntry::LLFloaterURLEntry(LLHandle<LLPanel> parent)
 	setDefaultBtn("ok_btn");
 	buildURLHistory();
 
-	sInstance = this;
-}
-
-//-----------------------------------------------------------------------------
-// ~LLFloaterURLEntry()
-//-----------------------------------------------------------------------------
-LLFloaterURLEntry::~LLFloaterURLEntry()
-{
-	sInstance = NULL;
+	return TRUE;
 }
-
 void LLFloaterURLEntry::buildURLHistory()
 {
 	LLCtrlListInterface* url_list = childGetListInterface("media_entry");
@@ -155,7 +155,7 @@ void LLFloaterURLEntry::headerFetchComplete(U32 status, const std::string& mime_
 	// Decrement the cursor
 	getWindow()->decBusyCount();
 	childSetVisible("loading_label", false);
-	close();
+	closeFloater();
 }
 
 // static
@@ -163,7 +163,7 @@ LLHandle<LLFloater> LLFloaterURLEntry::show(LLHandle<LLPanel> parent)
 {
 	if (sInstance)
 	{
-		sInstance->open();
+		sInstance->openFloater();
 	}
 	else
 	{
@@ -254,7 +254,7 @@ void LLFloaterURLEntry::onBtnOK( void* userdata )
 void LLFloaterURLEntry::onBtnCancel( void* userdata )
 {
 	LLFloaterURLEntry *self =(LLFloaterURLEntry *)userdata;
-	self->close();
+	self->closeFloater();
 }
 
 // static
diff --git a/indra/newview/llfloaterurlentry.h b/indra/newview/llfloaterurlentry.h
index 6d04326cf8..6f83c18d07 100644
--- a/indra/newview/llfloaterurlentry.h
+++ b/indra/newview/llfloaterurlentry.h
@@ -45,7 +45,7 @@ public:
 	// Can only be shown by LLPanelLandMedia, and pushes data back into
 	// that panel via the handle.
 	static LLHandle<LLFloater> show(LLHandle<LLPanel> panel_land_media_handle);
-
+	/*virtual*/	BOOL	postBuild();
 	void updateFromLandMediaPanel();
 
 	void headerFetchComplete(U32 status, const std::string& mime_type);
diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp
index 2922628786..5e5ea2e2f1 100644
--- a/indra/newview/llfloatervoicedevicesettings.cpp
+++ b/indra/newview/llfloatervoicedevicesettings.cpp
@@ -52,6 +52,7 @@
 
 
 LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings()
+	: LLPanel()
 {
 	mCtrlInputDevices = NULL;
 	mCtrlOutputDevices = NULL;
@@ -113,7 +114,7 @@ void LLPanelVoiceDeviceSettings::draw()
 			{
 				if (power_bar_idx < discrete_power)
 				{
-					LLColor4 color = (power_bar_idx >= 3) ? gSavedSettings.getColor4("OverdrivenColor") : gSavedSettings.getColor4("SpeakingColor");
+					LLColor4 color = (power_bar_idx >= 3) ? gSavedSkinSettings.getColor4("OverdrivenColor") : gSavedSkinSettings.getColor4("SpeakingColor");
 					gl_rect_2d(bar_view->getRect(), color, TRUE);
 				}
 				gl_rect_2d(bar_view->getRect(), LLColor4::grey, FALSE);
@@ -240,7 +241,7 @@ void LLPanelVoiceDeviceSettings::refresh()
 	}	
 }
 
-void LLPanelVoiceDeviceSettings::onOpen()
+void LLPanelVoiceDeviceSettings::initialize()
 {
 	mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
 	mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
@@ -255,7 +256,7 @@ void LLPanelVoiceDeviceSettings::onOpen()
 	LLVoiceChannel::suspend();
 }
 
-void LLPanelVoiceDeviceSettings::onClose(bool app_quitting)
+void LLPanelVoiceDeviceSettings::cleanup()
 {
 	gVoiceClient->tuningStop();
 	LLVoiceChannel::resume();
@@ -284,31 +285,29 @@ void LLPanelVoiceDeviceSettings::onCommitOutputDevice(LLUICtrl* ctrl, void* user
 //
 
 LLFloaterVoiceDeviceSettings::LLFloaterVoiceDeviceSettings(const LLSD& seed)
-	: LLFloater(std::string("floater_device_settings")),
+	: LLFloater(),
 	  mDevicePanel(NULL)
 {
 	mFactoryMap["device_settings"] = LLCallbackMap(createPanelVoiceDeviceSettings, this);
 	// do not automatically open singleton floaters (as result of getInstance())
 	BOOL no_open = FALSE;
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_device_settings.xml", &mFactoryMap, no_open);
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_device_settings.xml", no_open);
 	center();
 }
 
-void LLFloaterVoiceDeviceSettings::onOpen()
+void LLFloaterVoiceDeviceSettings::onOpen(const LLSD& key)
 {
 	if(mDevicePanel)
 	{
-		mDevicePanel->onOpen();
+		mDevicePanel->initialize();
 	}
-
-	LLFloater::onOpen();
 }
 
 void LLFloaterVoiceDeviceSettings::onClose(bool app_quitting)
 {
 	if(mDevicePanel)
 	{
-		mDevicePanel->onClose(app_quitting);
+		mDevicePanel->cleanup();
 	}
 
 	setVisible(FALSE);
diff --git a/indra/newview/llfloatervoicedevicesettings.h b/indra/newview/llfloatervoicedevicesettings.h
index d30a57f161..addc674ae3 100644
--- a/indra/newview/llfloatervoicedevicesettings.h
+++ b/indra/newview/llfloatervoicedevicesettings.h
@@ -49,8 +49,8 @@ public:
 	void apply();
 	void cancel();
 	void refresh();
-	void onOpen();
-	void onClose(bool app_quitting);
+	void initialize();
+	void cleanup();
 
 protected:
 	static void onCommitInputDevice(LLUICtrl* ctrl, void* user_data);
@@ -68,7 +68,7 @@ class LLFloaterVoiceDeviceSettings : public LLFloater, public LLFloaterSingleton
 {
 public:
 	LLFloaterVoiceDeviceSettings(const LLSD& seed);
-	/*virtual*/ void onOpen();
+	/*virtual*/ void onOpen(const LLSD& key);
 	/*virtual*/ void onClose(bool app_quitting);
 	/*virtual*/ void draw();
 	void apply();
diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp
index 730c1393ca..5b551af836 100644
--- a/indra/newview/llfloaterwater.cpp
+++ b/indra/newview/llfloaterwater.cpp
@@ -66,25 +66,11 @@ LLFloaterWater* LLFloaterWater::sWaterMenu = NULL;
 
 std::set<std::string> LLFloaterWater::sDefaultPresets;
 
-LLFloaterWater::LLFloaterWater() : LLFloater(std::string("water floater"))
+LLFloaterWater::LLFloaterWater()
+  : LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_water.xml");
 	
-	// add the combo boxes
-	LLComboBox* comboBox = getChild<LLComboBox>("WaterPresetsCombo");
-
-	if(comboBox != NULL) {
-		
-		std::map<std::string, LLWaterParamSet>::iterator mIt = 
-			LLWaterParamManager::instance()->mParamList.begin();
-		for(; mIt != LLWaterParamManager::instance()->mParamList.end(); mIt++) 
-		{
-			comboBox->add(mIt->first);
-		}
-
-		// set defaults on combo boxes
-		comboBox->selectByValue(LLSD("Default"));
-	}
 
 	std::string def_water = getString("WLDefaultWaterNames");
 
@@ -97,14 +83,33 @@ LLFloaterWater::LLFloaterWater() : LLFloater(std::string("water floater"))
 		sDefaultPresets.insert(tok);
 	}
 
-	// load it up
-	initCallbacks();
+
 }
 
 LLFloaterWater::~LLFloaterWater()
 {
 }
+BOOL LLFloaterWater::postBuild()
+{
+	// add the combo boxes
+	LLComboBox* comboBox = getChild<LLComboBox>("WaterPresetsCombo");
+
+	if(comboBox != NULL) {
+
+		std::map<std::string, LLWaterParamSet>::iterator mIt = 
+			LLWaterParamManager::instance()->mParamList.begin();
+		for(; mIt != LLWaterParamManager::instance()->mParamList.end(); mIt++) 
+		{
+			comboBox->add(mIt->first);
+		}
 
+		// set defaults on combo boxes
+		comboBox->selectByValue(LLSD("Default"));
+	}
+	// load it up
+	initCallbacks();
+	return TRUE;
+}
 void LLFloaterWater::initCallbacks(void) {
 
 	// help buttons
@@ -165,7 +170,7 @@ void LLFloaterWater::initCallbacks(void) {
 	childSetCommitCallback("WaterWave2DirX", onVector2ControlXMoved, &param_mgr->mWave2Dir);
 	childSetCommitCallback("WaterWave2DirY", onVector2ControlYMoved, &param_mgr->mWave2Dir);
 
-	comboBox->setCommitCallback(onChangePresetName);
+	comboBox->setCommitCallback(boost::bind(&LLFloaterWater::onChangePresetName, this, _1));
 
 	LLTextureCtrl* textCtrl = getChild<LLTextureCtrl>("WaterNormalMap");
 	textCtrl->setDefaultImageAssetID(DEFAULT_WATER_NORMAL);
@@ -296,7 +301,7 @@ LLFloaterWater* LLFloaterWater::instance()
 	if (!sWaterMenu)
 	{
 		sWaterMenu = new LLFloaterWater();
-		sWaterMenu->open();
+		sWaterMenu->openFloater();
 		sWaterMenu->setFocus(TRUE);
 	}
 	return sWaterMenu;
@@ -310,7 +315,7 @@ void LLFloaterWater::show()
 	//LLUICtrlFactory::getInstance()->buildFloater(water, "floater_water.xml");
 	//water->initCallbacks();
 
-	water->open();
+	water->openFloater();
 }
 
 bool LLFloaterWater::isOpen()
@@ -712,17 +717,13 @@ bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& r
 }
 
 
-void LLFloaterWater::onChangePresetName(LLUICtrl* ctrl, void * userData)
+void LLFloaterWater::onChangePresetName(LLUICtrl* ctrl)
 {
-	LLComboBox * combo_box = static_cast<LLComboBox*>(ctrl);
-	
-	if(combo_box->getSimple() == "")
+	std::string data = ctrl->getValue().asString();
+	if(!data.empty())
 	{
-		return;
+		LLWaterParamManager::instance()->loadPreset(data);
+		sWaterMenu->syncMenu();
 	}
-	
-	LLWaterParamManager::instance()->loadPreset(
-		combo_box->getSelectedValue().asString());
-	sWaterMenu->syncMenu();
 }
 
diff --git a/indra/newview/llfloaterwater.h b/indra/newview/llfloaterwater.h
index 774d5c5a75..50fd7dd450 100644
--- a/indra/newview/llfloaterwater.h
+++ b/indra/newview/llfloaterwater.h
@@ -53,7 +53,7 @@ public:
 
 	LLFloaterWater();
 	virtual ~LLFloaterWater();
-	
+	/*virtual*/	BOOL	postBuild();
 	/// initialize all
 	void initCallbacks(void);
 
@@ -107,7 +107,7 @@ public:
 	static bool deleteAlertCallback(const LLSD& notification, const LLSD& response);
 
 	/// what to do when you change the preset name
-	static void onChangePresetName(LLUICtrl* ctrl, void* userData);
+	void onChangePresetName(LLUICtrl* ctrl);
 
 	//// menu management
 
diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp
index 98b315795a..2ba4002d94 100644
--- a/indra/newview/llfloaterwindlight.cpp
+++ b/indra/newview/llfloaterwindlight.cpp
@@ -67,15 +67,36 @@ std::set<std::string> LLFloaterWindLight::sDefaultPresets;
 
 static const F32 WL_SUN_AMBIENT_SLIDER_SCALE = 3.0f;
 
-LLFloaterWindLight::LLFloaterWindLight() : LLFloater(std::string("windlight floater"))
+LLFloaterWindLight::LLFloaterWindLight()
+  : LLFloater()
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_windlight_options.xml");
 	
+
+
+	// add the list of presets
+	std::string def_days = getString("WLDefaultSkyNames");
+
+	// no editing or deleting of the blank string
+	sDefaultPresets.insert("");
+	boost_tokenizer tokens(def_days, boost::char_separator<char>(":"));
+	for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
+	{
+		std::string tok(*token_iter);
+		sDefaultPresets.insert(tok);
+	}
+}
+
+LLFloaterWindLight::~LLFloaterWindLight()
+{
+}
+BOOL LLFloaterWindLight::postBuild()
+{
 	// add the combo boxes
 	LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
 
 	if(comboBox != NULL) {
-		
+
 		std::map<std::string, LLWLParamSet>::iterator mIt = 
 			LLWLParamManager::instance()->mParamList.begin();
 		for(; mIt != LLWLParamManager::instance()->mParamList.end(); mIt++) 
@@ -89,27 +110,10 @@ LLFloaterWindLight::LLFloaterWindLight() : LLFloater(std::string("windlight floa
 		// set defaults on combo boxes
 		comboBox->selectByValue(LLSD("Default"));
 	}
-
-	// add the list of presets
-	std::string def_days = getString("WLDefaultSkyNames");
-
-	// no editing or deleting of the blank string
-	sDefaultPresets.insert("");
-	boost_tokenizer tokens(def_days, boost::char_separator<char>(":"));
-	for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
-	{
-		std::string tok(*token_iter);
-		sDefaultPresets.insert(tok);
-	}
-
 	// load it up
 	initCallbacks();
+	return TRUE;
 }
-
-LLFloaterWindLight::~LLFloaterWindLight()
-{
-}
-
 void LLFloaterWindLight::initCallbacks(void) {
 
 	// help buttons
@@ -210,7 +214,7 @@ void LLFloaterWindLight::initCallbacks(void) {
 	childSetCommitCallback("WLCloudScrollX", onCloudScrollXMoved, NULL);
 	childSetCommitCallback("WLCloudScrollY", onCloudScrollYMoved, NULL);
 	childSetCommitCallback("WLDistanceMult", onFloatControlMoved, &param_mgr->mDistanceMult);
-	childSetCommitCallback("DrawClassicClouds", LLSavedSettingsGlue::setBOOL, (void*)"SkyUseClassicClouds");
+	getChild<LLUICtrl>("DrawClassicClouds")->setCommitCallback(boost::bind(LLSavedSettingsGlue::setBOOL, _1, "SkyUseClassicClouds"));
 
 	// WL Top
 	childSetAction("WLDayCycleMenuButton", onOpenDayCycle, NULL);
@@ -222,7 +226,7 @@ void LLFloaterWindLight::initCallbacks(void) {
 	childSetAction("WLSavePreset", onSavePreset, comboBox);
 	childSetAction("WLDeletePreset", onDeletePreset, comboBox);
 
-	comboBox->setCommitCallback(onChangePresetName);
+	comboBox->setCommitCallback(boost::bind(&LLFloaterWindLight::onChangePresetName, this, _1));
 
 
 	// Dome
@@ -444,7 +448,7 @@ LLFloaterWindLight* LLFloaterWindLight::instance()
 	if (!sWindLight)
 	{
 		sWindLight = new LLFloaterWindLight();
-		sWindLight->open();
+		sWindLight->openFloater();
 		sWindLight->setFocus(TRUE);
 	}
 	return sWindLight;
@@ -458,7 +462,7 @@ void LLFloaterWindLight::show()
 	//LLUICtrlFactory::getInstance()->buildFloater(windLight, "floater_windlight_options.xml");
 	//windLight->initCallbacks();
 
-	windLight->open();
+	windLight->openFloater();
 }
 
 bool LLFloaterWindLight::isOpen()
@@ -903,20 +907,16 @@ bool LLFloaterWindLight::deleteAlertCallback(const LLSD& notification, const LLS
 }
 
 
-void LLFloaterWindLight::onChangePresetName(LLUICtrl* ctrl, void * userData)
+void LLFloaterWindLight::onChangePresetName(LLUICtrl* ctrl)
 {
 	deactivateAnimator();
 
-	LLComboBox * combo_box = static_cast<LLComboBox*>(ctrl);
-	
-	if(combo_box->getSimple() == "")
+	std::string data = ctrl->getValue().asString();
+	if(!data.empty())
 	{
-		return;
+		LLWLParamManager::instance()->loadPreset( data);
+		sWindLight->syncMenu();
 	}
-	
-	LLWLParamManager::instance()->loadPreset(
-		combo_box->getSelectedValue().asString());
-	sWindLight->syncMenu();
 }
 
 void LLFloaterWindLight::onOpenDayCycle(void* userData)
diff --git a/indra/newview/llfloaterwindlight.h b/indra/newview/llfloaterwindlight.h
index 3447caa923..e527a5637c 100644
--- a/indra/newview/llfloaterwindlight.h
+++ b/indra/newview/llfloaterwindlight.h
@@ -53,7 +53,7 @@ public:
 
 	LLFloaterWindLight();
 	virtual ~LLFloaterWindLight();
-	
+	/*virtual*/	BOOL	postBuild();	
 	/// initialize all
 	void initCallbacks(void);
 
@@ -104,7 +104,7 @@ public:
 	bool deleteAlertCallback(const LLSD& notification, const LLSD& response);
 
 	/// what to do when you change the preset name
-	static void onChangePresetName(LLUICtrl* ctrl, void* userData);
+	void onChangePresetName(LLUICtrl* ctrl);
 
 	/// when user hits the save preset button
 	static void onOpenDayCycle(void* userData);
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 8326557cf8..251539088b 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -41,23 +41,22 @@
 #include "llfloaterworldmap.h"
 
 #include "llagent.h"
-#include "llviewerwindow.h"
 #include "llbutton.h"
 #include "llcallingcard.h"
-#include "llcolorscheme.h"
 #include "llcombobox.h"
 #include "llviewercontrol.h"
 #include "lldraghandle.h"
 #include "llfirstuse.h"
+#include "llfloaterreg.h"		// getTypedInstance()
 #include "llfocusmgr.h"
 #include "lllandmarklist.h"
 #include "lllineeditor.h"
 #include "llpreviewlandmark.h"
 #include "llregionhandle.h"
 #include "llscrolllistctrl.h"
+#include "llslurl.h"
 #include "lltextbox.h"
 #include "lltracker.h"
-#include "llurldispatcher.h"
 #include "llviewermenu.h"
 #include "llviewerregion.h"
 #include "llviewerstats.h"
@@ -69,6 +68,7 @@
 #include "llweb.h"
 
 #include "llglheaders.h"
+#include "llwindow.h"			// copyTextToClipboard()
 
 //---------------------------------------------------------------------------
 // Constants
@@ -84,17 +84,10 @@ enum EPanDirection
 };
 
 // Values in pixels per region
-static const F32 ZOOM_MIN = -8.f;	// initial value, updated by adjustZoomSlider
-static const F32 ZOOM_MAX = 0.f;
-static const F32 ZOOM_INC = 0.2f;
+static const F32 ZOOM_MAX = 128.f;
 
-static const F32 SIM_COORD_MIN	 = 0.f;
-static const F32 SIM_COORD_MAX	 = 255.f;
 static const F32 SIM_COORD_DEFAULT = 128.f;
 
-static const F64 MAX_FLY_DISTANCE = 363.f;  // Diagonal size of one sim.
-static const F64 MAX_FLY_DISTANCE_SQUARED = MAX_FLY_DISTANCE * MAX_FLY_DISTANCE;
-
 //---------------------------------------------------------------------------
 // Globals
 //---------------------------------------------------------------------------
@@ -148,8 +141,8 @@ const LLUUID LLFloaterWorldMap::sHomeID( "10000000-0000-0000-0000-000000000001"
 //---------------------------------------------------------------------------
 
 
-LLFloaterWorldMap::LLFloaterWorldMap()
-:	LLFloater(std::string("worldmap")),
+LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
+:	LLFloater(key),
 	mInventory(NULL),
 	mInventoryObserver(NULL),
 	mFriendObserver(NULL),
@@ -161,16 +154,18 @@ LLFloaterWorldMap::LLFloaterWorldMap()
 	mTrackedLocation(0,0,0),
 	mTrackedStatus(LLTracker::TRACKING_NOTHING)
 {
-	LLCallbackMap::map_t factory_map;
-	factory_map["objects_mapview"] = LLCallbackMap(createWorldMapView, NULL);
-	factory_map["terrain_mapview"] = LLCallbackMap(createWorldMapView, NULL);
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_world_map.xml", &factory_map);
+	gFloaterWorldMap = this;
+	
+	mFactoryMap["objects_mapview"] = LLCallbackMap(createWorldMapView, NULL);
+	mFactoryMap["terrain_mapview"] = LLCallbackMap(createWorldMapView, NULL);
+	
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_world_map.xml", FALSE);
 }
 
 // static
 void* LLFloaterWorldMap::createWorldMapView(void* data)
 {
-	return new LLWorldMapView(std::string("mapview"), LLRect(0,300,400,0));
+	return new LLWorldMapView();
 }
 
 BOOL LLFloaterWorldMap::postBuild()
@@ -178,27 +173,14 @@ BOOL LLFloaterWorldMap::postBuild()
 	mTabs = getChild<LLTabContainer>("maptab");
 	if (!mTabs) return FALSE;
 
-	LLPanel *panel;
-
-	panel = mTabs->getChild<LLPanel>("objects_mapview");
-	if (panel)
-	{
-		mTabs->setTabChangeCallback(panel, onCommitBackground);
-		mTabs->setTabUserData(panel, this);
-	}
-	panel = mTabs->getChild<LLPanel>("terrain_mapview");
-	if (panel)
-	{
-		mTabs->setTabChangeCallback(panel, onCommitBackground);
-		mTabs->setTabUserData(panel, this);
-	}
+	mTabs->setCommitCallback(boost::bind(&LLFloaterWorldMap::onCommitBackground, this));
 
 	// The following callback syncs the worlmap tabs with the images.
 	// Commented out since it was crashing when LLWorldMap became a singleton.
 	// We should be fine without it but override the onOpen method and put it 
 	// there if it turns out to be needed. -MG
 	//
-	//onCommitBackground((void*)this, false);
+	//onCommitBackground();
 
 	childSetCommitCallback("friend combo", onAvatarComboCommit, this);
 
@@ -206,22 +188,22 @@ BOOL LLFloaterWorldMap::postBuild()
 	if (avatar_combo)
 	{
 		avatar_combo->selectFirstItem();
-		avatar_combo->setPrearrangeCallback( onAvatarComboPrearrange );
-		avatar_combo->setTextEntryCallback( onComboTextEntry );
+		avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) );
+		avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
 	}
 
 	childSetAction("DoSearch", onLocationCommit, this);
 
-	childSetFocusChangedCallback("location", onLocationFocusChanged, this);
+	getChild<LLScrollListCtrl>("location")->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
 
 	LLLineEditor *location_editor = getChild<LLLineEditor>("location");
 	if (location_editor)
 	{
-		location_editor->setKeystrokeCallback( onSearchTextEntry );
+		location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this, _1), NULL );
 	}
 	
 	childSetCommitCallback("search_results", onCommitSearchResult, this);
-	childSetDoubleClickCallback("search_results", onClickTeleportBtn);
+	getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback(onClickTeleportBtn, this);
 	childSetCommitCallback("spin x", onCommitLocation, this);
 	childSetCommitCallback("spin y", onCommitLocation, this);
 	childSetCommitCallback("spin z", onCommitLocation, this);
@@ -232,8 +214,8 @@ BOOL LLFloaterWorldMap::postBuild()
 	if (landmark_combo)
 	{
 		landmark_combo->selectFirstItem();
-		landmark_combo->setPrearrangeCallback( onLandmarkComboPrearrange );
-		landmark_combo->setTextEntryCallback( onComboTextEntry );
+		landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) );
+		landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
 	}
 
 	childSetAction("Go Home", onGoHome, this);
@@ -267,28 +249,44 @@ LLFloaterWorldMap::~LLFloaterWorldMap()
 
 	// avatar tracker will delete this for us.
 	mFriendObserver = NULL;
+	
+	gFloaterWorldMap = NULL;
 }
 
+//static
+LLFloaterWorldMap* LLFloaterWorldMap::getInstance()
+{
+	return LLFloaterReg::getTypedInstance<LLFloaterWorldMap>("world_map");
+}
 
 // virtual
 void LLFloaterWorldMap::onClose(bool app_quitting)
 {
+	// While we're not visible, discard the overlay images we're using
+	LLWorldMap::getInstance()->clearImageRefs();
+	
+#if RELEASE_FOR_DOWNLOAD
 	setVisible(FALSE);
+#else
+	// Don't call destroy(), we need to delete this immediately
+	delete this; // sets gFloaterWorldMap = NULL;
+	// need to reconstruct gFloaterWorldMap so that code that assumes it exists doesn't crash
+	LLFloaterReg::getInstance("world_map"); // constructs a LLFloaterWorldMap and sets gFloaterWorldMap
+	gFloaterWorldMap->setVisible(FALSE); // hide it
+#endif
 }
 
-// static
-void LLFloaterWorldMap::show(void*, BOOL center_on_target)
+// virtual
+void LLFloaterWorldMap::onOpen(const LLSD& key)
 {
-	BOOL was_visible = gFloaterWorldMap->getVisible();
+	bool center_on_target = (key.asString() == "center");
 
-	gFloaterWorldMap->mIsClosing = FALSE;
-	gFloaterWorldMap->open();		/* Flawfinder: ignore */
+	mIsClosing = FALSE;
 
 	LLWorldMapView* map_panel;
-	map_panel = (LLWorldMapView*)gFloaterWorldMap->mTabs->getCurrentPanel();
+	map_panel = (LLWorldMapView*)mTabs->getCurrentPanel();
 	map_panel->clearLastClick();
 
-	if (!was_visible)
 	{
 		// reset pan on show, so it centers on you again
 		if (!center_on_target)
@@ -303,13 +301,13 @@ void LLFloaterWorldMap::show(void*, BOOL center_on_target)
 		// Reload any maps that may have changed
 		LLWorldMap::getInstance()->clearSimFlags();
 
-		const S32 panel_num = gFloaterWorldMap->mTabs->getCurrentPanelIndex();
+		const S32 panel_num = mTabs->getCurrentPanelIndex();
 		const bool request_from_sim = true;
 		LLWorldMap::getInstance()->setCurrentLayer(panel_num, request_from_sim);
 
 		// We may already have a bounding box for the regions of the world,
 		// so use that to adjust the view.
-		gFloaterWorldMap->adjustZoomSliderBounds();
+		adjustZoomSliderBounds();
 
 		// Could be first show
 		LLFirstUse::useMap();
@@ -318,19 +316,19 @@ void LLFloaterWorldMap::show(void*, BOOL center_on_target)
 		LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
 		gInventory.startBackgroundFetch(landmark_folder_id);
 
-		gFloaterWorldMap->childSetFocus("location", TRUE);
+		childSetFocus("location", TRUE);
 		gFocusMgr.triggerFocusFlash();
 
-		gFloaterWorldMap->buildAvatarIDList();
-		gFloaterWorldMap->buildLandmarkIDLists();
+		buildAvatarIDList();
+		buildLandmarkIDLists();
 
 		// If nothing is being tracked, set flag so the user position will be found
-		gFloaterWorldMap->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
+		mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
 	}
 	
 	if (center_on_target)
 	{
-		gFloaterWorldMap->centerOnTarget(FALSE);
+		centerOnTarget(FALSE);
 	}
 }
 
@@ -345,46 +343,6 @@ void LLFloaterWorldMap::reloadIcons(void*)
 }
 
 
-// static
-void LLFloaterWorldMap::toggle(void*)
-{
-	BOOL visible = gFloaterWorldMap->getVisible();
-
-	if (!visible)
-	{
-		show(NULL, FALSE);
-	}
-	else
-	{
-		gFloaterWorldMap->mIsClosing = TRUE;
-		gFloaterWorldMap->close();
-	}
-}
-
-
-// static
-void LLFloaterWorldMap::hide(void*)
-{
-	gFloaterWorldMap->mIsClosing = TRUE;
-	gFloaterWorldMap->close();
-}
-
-
-// virtual
-void LLFloaterWorldMap::setVisible( BOOL visible )
-{
-	LLFloater::setVisible( visible );
-
-	gSavedSettings.setBOOL( "ShowWorldMap", visible );
-
-	if( !visible )
-	{
-		// While we're not visible, discard the overlay images we're using
-		LLWorldMap::getInstance()->clearImageRefs();
-	}
-}
-
-
 // virtual
 BOOL LLFloaterWorldMap::handleHover(S32 x, S32 y, MASK mask)
 {
@@ -428,6 +386,9 @@ void LLFloaterWorldMap::reshape( S32 width, S32 height, BOOL called_from_parent
 // virtual
 void LLFloaterWorldMap::draw()
 {
+	static LLCachedControl<LLColor4> map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white);
+	static LLCachedControl<LLColor4> map_track_disabled_color(gSavedSkinSettings, "MapTrackDisabledColor", LLColor4::white);
+	
 	// Hide/Show Mature Events controls
 	childSetVisible("events_mature_icon", gAgent.canAccessMature());
 	childSetVisible("events_mature_label", gAgent.canAccessMature());
@@ -456,25 +417,25 @@ void LLFloaterWorldMap::draw()
 	LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus(); 
 	if (LLTracker::TRACKING_AVATAR == tracking_status)
 	{
-		childSetColor("avatar_icon", gTrackColor);
+		childSetColor("avatar_icon", map_track_color);
 	}
 	else
 	{
-		childSetColor("avatar_icon", gDisabledTrackColor);
+		childSetColor("avatar_icon", map_track_disabled_color);
 	}
 
 	if (LLTracker::TRACKING_LANDMARK == tracking_status)
 	{
-		childSetColor("landmark_icon", gTrackColor);
+		childSetColor("landmark_icon", map_track_color);
 	}
 	else
 	{
-		childSetColor("landmark_icon", gDisabledTrackColor);
+		childSetColor("landmark_icon", map_track_disabled_color);
 	}
 
 	if (LLTracker::TRACKING_LOCATION == tracking_status)
 	{
-		childSetColor("location_icon", gTrackColor);
+		childSetColor("location_icon", map_track_color);
 	}
 	else
 	{
@@ -488,7 +449,7 @@ void LLFloaterWorldMap::draw()
 		}
 		else
 		{
-			childSetColor("location_icon", gDisabledTrackColor);
+			childSetColor("location_icon", map_track_disabled_color);
 		}
 	}
 
@@ -703,7 +664,7 @@ void LLFloaterWorldMap::updateLocation()
 				childSetValue("spin z", LLSD(agent_z) );
 
 				// Set the current SLURL
-				mSLURL = LLURLDispatcher::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z);
+				mSLURL = LLSLURL::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z);
 			}
 		}
 
@@ -740,7 +701,7 @@ void LLFloaterWorldMap::updateLocation()
 		// simNameFromPosGlobal can fail, so don't give the user an invalid SLURL
 		if ( gotSimName )
 		{
-			mSLURL = LLURLDispatcher::buildSLURL(sim_name, llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ]));
+			mSLURL = LLSLURL::buildSLURL(sim_name, llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ]));
 		}
 		else
 		{	// Empty SLURL will disable the "Copy SLURL to clipboard" button
@@ -1024,7 +985,7 @@ void LLFloaterWorldMap::adjustZoomSliderBounds()
 
 	// Make sure the zoom slider can be moved at least a little bit.
 	// Likewise, less than the increment pixels per region is just silly.
-	pixels_per_region = llclamp(pixels_per_region, 1.f, (F32)(pow(2.f, ZOOM_MAX) * 128.f));
+	pixels_per_region = llclamp(pixels_per_region, 1.f, ZOOM_MAX);
 
 	F32 min_power = log(pixels_per_region/256.f)/log(2.f);
 	childSetMinValue("zoom slider", min_power);
@@ -1062,20 +1023,18 @@ void LLFloaterWorldMap::onPanBtn( void* userdata )
 void LLFloaterWorldMap::onGoHome(void*)
 {
 	gAgent.teleportHome();
-	gFloaterWorldMap->close();
+	gFloaterWorldMap->closeFloater();
 }
 
 
-// static 
-void LLFloaterWorldMap::onLandmarkComboPrearrange( LLUICtrl* ctrl, void* userdata )
+void LLFloaterWorldMap::onLandmarkComboPrearrange( )
 {
-	LLFloaterWorldMap* self = gFloaterWorldMap;
-	if( !self || self->mIsClosing )
+	if( mIsClosing )
 	{
 		return;
 	}
 
-	LLCtrlListInterface *list = self->childGetListInterface("landmark combo");
+	LLCtrlListInterface *list = childGetListInterface("landmark combo");
 	if (!list) return;
 
 	LLUUID current_choice = list->getCurrentID();
@@ -1089,7 +1048,7 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( LLUICtrl* ctrl, void* userdat
 
 }
 
-void LLFloaterWorldMap::onComboTextEntry( LLLineEditor* ctrl, void* userdata )
+void LLFloaterWorldMap::onComboTextEntry()
 {
 	// Reset the tracking whenever we start typing into any of the search fields,
 	// so that hitting <enter> does an auto-complete versus teleporting us to the
@@ -1097,11 +1056,10 @@ void LLFloaterWorldMap::onComboTextEntry( LLLineEditor* ctrl, void* userdata )
 	LLTracker::clearFocus();
 }
 
-// static
-void LLFloaterWorldMap::onSearchTextEntry( LLLineEditor* ctrl, void* userdata )
+void LLFloaterWorldMap::onSearchTextEntry( LLLineEditor* ctrl )
 {
-	onComboTextEntry(ctrl, userdata);
-	updateSearchEnabled(ctrl, userdata);
+	onComboTextEntry();
+	updateSearchEnabled();
 }
 
 // static 
@@ -1154,15 +1112,14 @@ void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata )
 }
 
 // static 
-void LLFloaterWorldMap::onAvatarComboPrearrange( LLUICtrl* ctrl, void* userdata )
+void LLFloaterWorldMap::onAvatarComboPrearrange( )
 {
-	LLFloaterWorldMap* self = gFloaterWorldMap;
-	if( !self || self->mIsClosing )
+	if( mIsClosing )
 	{
 		return;
 	}
 
-	LLCtrlListInterface *list = self->childGetListInterface("friend combo");
+	LLCtrlListInterface *list = childGetListInterface("friend combo");
 	if (!list) return;
 
 	LLUUID current_choice;
@@ -1172,7 +1129,7 @@ void LLFloaterWorldMap::onAvatarComboPrearrange( LLUICtrl* ctrl, void* userdata
 		current_choice = LLAvatarTracker::instance().getAvatarID();
 	}
 
-	self->buildAvatarIDList();
+	buildAvatarIDList();
 
 	if( !list->setCurrentByID( current_choice ) || current_choice.isNull() )
 	{
@@ -1208,24 +1165,21 @@ void LLFloaterWorldMap::onAvatarComboCommit( LLUICtrl* ctrl, void* userdata )
 	}
 }
 
-//static 
-void LLFloaterWorldMap::onLocationFocusChanged( LLFocusableElement* focus, void* userdata )
+void LLFloaterWorldMap::onLocationFocusChanged( LLFocusableElement* focus )
 {
-	updateSearchEnabled((LLUICtrl*)focus, userdata);
+	updateSearchEnabled();
 }
 
-// static 
-void LLFloaterWorldMap::updateSearchEnabled( LLUICtrl* ctrl, void* userdata )
+void LLFloaterWorldMap::updateSearchEnabled()
 {
-	LLFloaterWorldMap *self = gFloaterWorldMap;
-	if (self->childHasKeyboardFocus("location") && 
-		self->childGetValue("location").asString().length() > 0)
+	if (childHasKeyboardFocus("location") && 
+		childGetValue("location").asString().length() > 0)
 	{
-		self->setDefaultBtn("DoSearch");
+		setDefaultBtn("DoSearch");
 	}
 	else
 	{
-		self->setDefaultBtn(NULL);
+		setDefaultBtn(NULL);
 	}
 }
 
@@ -1312,7 +1266,7 @@ void LLFloaterWorldMap::onClickTeleportBtn(void* data)
 void LLFloaterWorldMap::onCopySLURL(void* data)
 {
 	LLFloaterWorldMap* self = (LLFloaterWorldMap*)data;
-	gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(self->mSLURL));
+	self->getWindow()->copyTextToClipboard(utf8str_to_wstring(self->mSLURL));
 	
 	LLSD args;
 	args["SLURL"] = self->mSLURL;
@@ -1375,7 +1329,7 @@ void LLFloaterWorldMap::fly()
 	if (!pos_global.isExactlyZero())
 	{
 		gAgent.startAutoPilotGlobal( pos_global );
-		close();
+		closeFloater();
 	}
 	else
 	{
@@ -1536,14 +1490,10 @@ void LLFloaterWorldMap::flyToAvatar()
 	}
 }
 
-// static
-void LLFloaterWorldMap::onCommitBackground(void* userdata, bool from_click)
+void LLFloaterWorldMap::onCommitBackground()
 {
-	LLFloaterWorldMap* self = (LLFloaterWorldMap*) userdata;
-
 	// Find my index
-	S32 index = self->mTabs->getCurrentPanelIndex();
-
+	S32 index = mTabs->getCurrentPanelIndex();
 	LLWorldMap::getInstance()->setCurrentLayer(index);
 }
 
@@ -1612,7 +1562,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
 	}
 	else if (num_results == 0)
 	{
-		list->addCommentText(std::string("None found."));
+		list->setCommentText(std::string("None found."));
 		list->operateOnAll(LLCtrlListInterface::OP_DESELECT);
 	}
 }
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index b0e72f298a..a7d7051b40 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -50,28 +50,27 @@ class LLInventoryModel;
 class LLInventoryObserver;
 class LLItemInfo;
 class LLTabContainer;
-class LLWorldMapView;
 
 class LLFloaterWorldMap : public LLFloater
 {
 public:
-	LLFloaterWorldMap();
+	LLFloaterWorldMap(const LLSD& key);
 	virtual ~LLFloaterWorldMap();
 
+	// Prefer this to gFloaterWorldMap
+	static LLFloaterWorldMap* getInstance();
+
 	static void *createWorldMapView(void* data);
 	BOOL postBuild();
 
+	/*virtual*/ void onOpen(const LLSD& key);
 	/*virtual*/ void onClose(bool app_quitting);
 
-	static void show(void*, BOOL center_on_target );
 	static void reloadIcons(void*);
-	static void toggle(void*);
-	static void hide(void*); 
 
 	/*virtual*/ void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE );
 	/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
 	/*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
-	/*virtual*/ void setVisible(BOOL visible);
 	/*virtual*/ void draw();
 
 	// methods for dealing with inventory. The observe() method is
@@ -117,16 +116,16 @@ protected:
 
 	static void		onGoHome(void* data);
 
-	static void		onLandmarkComboPrearrange( LLUICtrl* ctrl, void* data );
+	void			onLandmarkComboPrearrange( );
 	static void		onLandmarkComboCommit( LLUICtrl* ctrl, void* data );
 
-	static void		onAvatarComboPrearrange( LLUICtrl* ctrl, void* data );
+	void			onAvatarComboPrearrange( );
 	static void		onAvatarComboCommit( LLUICtrl* ctrl, void* data );
 
-	static void		onCommitBackground(void* data, bool from_click);
+	void			onCommitBackground();
 
-	static void		onComboTextEntry( LLLineEditor* ctrl, void* data );
-	static void		onSearchTextEntry( LLLineEditor* ctrl, void* data );
+	void			onComboTextEntry( );
+	void			onSearchTextEntry( LLLineEditor* ctrl );
 
 	static void		onClearBtn(void*);
 	static void		onFlyBtn(void*);
@@ -153,8 +152,8 @@ protected:
 	void			flyToAvatar();
 	void			teleportToAvatar();
 
-	static void		updateSearchEnabled( LLUICtrl* ctrl, void* userdata );
-	static void		onLocationFocusChanged( LLFocusableElement* ctrl, void* userdata );
+	void			updateSearchEnabled( );
+	void			onLocationFocusChanged( LLFocusableElement* ctrl );
 	static void		onLocationCommit( void* userdata );
 	static void		onCommitLocation( LLUICtrl* ctrl, void* userdata );
 	static void		onCommitSearchResult( LLUICtrl* ctrl, void* userdata );
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 97a3bd7c50..75c7467442 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -50,10 +50,10 @@
 #include "llkeyboard.h"
 #include "lllineeditor.h"
 #include "llmenugl.h"
-#include "llresmgr.h"
 #include "llpreview.h"
 #include "llscrollcontainer.h" // hack to allow scrolling
 #include "lltooldraganddrop.h"
+#include "lltrans.h"
 #include "llui.h"
 #include "llviewerimage.h"
 #include "llviewerimagelist.h"
@@ -110,28 +110,16 @@ void renamer_focus_lost( LLFocusableElement* handler, void* user_data );
 // statics 
 const LLFontGL* LLFolderViewItem::sFont = NULL;
 const LLFontGL* LLFolderViewItem::sSmallFont = NULL;
-LLColor4 LLFolderViewItem::sFgColor;
-LLColor4 LLFolderViewItem::sHighlightBgColor;
-LLColor4 LLFolderViewItem::sHighlightFgColor;
-LLColor4 LLFolderViewItem::sFilterBGColor;
-LLColor4 LLFolderViewItem::sFilterTextColor;
-LLColor4 LLFolderViewItem::sSuffixColor;
-LLColor4 LLFolderViewItem::sSearchStatusColor;
 LLUIImagePtr LLFolderViewItem::sArrowImage;
 LLUIImagePtr LLFolderViewItem::sBoxImage;
 
+const LLColor4U DEFAULT_WHITE(255, 255, 255);
+
 //static
 void LLFolderViewItem::initClass()
 {
-	sFont = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL );
-	sSmallFont = LLResMgr::getInstance()->getRes( LLFONT_SMALL );
-	sFgColor = gColors.getColor( "MenuItemEnabledColor" );
-	sHighlightBgColor = gColors.getColor( "MenuItemHighlightBgColor" );
-	sHighlightFgColor = gColors.getColor( "MenuItemHighlightFgColor" );
-	sFilterBGColor = gColors.getColor( "FilterBackgroundColor" );
-	sFilterTextColor = gColors.getColor( "FilterTextColor" );
-	sSuffixColor = gColors.getColor( "InventoryItemSuffixColor" );
-	sSearchStatusColor = gColors.getColor( "InventorySearchStatusColor" );
+	sFont = LLFontGL::getFontSansSerifSmall();
+	sSmallFont = LLFontGL::getFontMonospace();
 	sArrowImage = LLUI::getUIImage("folder_arrow.tga"); 
 	sBoxImage = LLUI::getUIImage("rounded_square.tga");
 }
@@ -143,23 +131,17 @@ void LLFolderViewItem::cleanupClass()
 	sBoxImage = NULL;
 }
 
-// Default constructor
 // NOTE: Optimize this, we call it a *lot* when opening a large inventory
-LLFolderViewItem::LLFolderViewItem( const std::string& name, LLUIImagePtr icon,
-				    time_t creation_date,
-				    LLFolderView* root,
-				    LLFolderViewEventListener* listener ) :
-	LLUICtrl( name, LLRect(0, 0, 0, 0), TRUE, NULL, NULL, FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_RIGHT),
-	mLabel( name ),
+
+// Default constructor
+LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p)
+:	LLUICtrl(p),
 	mLabelWidth(0),
-	mCreationDate(creation_date),
 	mParentFolder( NULL ),
-	mListener( listener ),
 	mIsSelected( FALSE ),
 	mIsCurSelection( FALSE ),
 	mSelectPending(FALSE),
 	mLabelStyle( LLFontGL::NORMAL ),
-	mIcon(icon),
 	mHasVisibleChildren(FALSE),
 	mIndentation(0),
 	mNumDescendantsSelected(0),
@@ -167,12 +149,16 @@ LLFolderViewItem::LLFolderViewItem( const std::string& name, LLUIImagePtr icon,
 	mLastFilterGeneration(-1),
 	mStringMatchOffset(std::string::npos),
 	mControlLabelRotation(0.f),
-	mRoot( root ),
 	mDragAndDropTarget(FALSE),
-	mIsLoading(FALSE)
+	mIsLoading(FALSE),
+	mLabel(p.name),
+	mRoot(p.root),
+	mCreationDate(p.creation_date),
+	mListener(p.listener),
+	mArrowImage(p.folder_arrow_image),
+	mBoxImage(p.selection_image)
 {
-	refresh(); // possible opt: only call refreshFromListener()
-	setTabStop(FALSE);
+	refresh();
 }
 
 // Destroys the object
@@ -258,7 +244,7 @@ BOOL LLFolderViewItem::potentiallyVisible()
 
 BOOL LLFolderViewItem::getFiltered() 
 { 
-	return mFiltered && mLastFilterGeneration >= mRoot->getFilter()->getMinRequiredGeneration(); 
+	return mFiltered && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration(); 
 }
 
 BOOL LLFolderViewItem::getFiltered(S32 filter_generation) 
@@ -283,6 +269,15 @@ void LLFolderViewItem::refreshFromListener()
 	if(mListener)
 	{
 		mLabel = mListener->getDisplayName();
+		LLAssetType::EType preferred_type = mListener->getPreferredType();
+
+		// *TODO: to be removed when database supports multi language. This is a
+		// temporary attempt to display the inventory folder in the user locale.
+		if (preferred_type != LLAssetType::AT_NONE)
+		{
+			mLabel = LLTrans::getString("InvFolder " + mLabel);
+		};
+
 		setIcon(mListener->getIcon());
 		time_t creation_date = mListener->getCreationDate();
 		if (mCreationDate != creation_date)
@@ -796,6 +791,14 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
 
 void LLFolderViewItem::draw()
 {
+	static LLCachedControl<LLColor4> sFgColor(gSavedSkinSettings, "MenuItemEnabledColor", DEFAULT_WHITE);
+	static LLCachedControl<LLColor4> sHighlightBgColor(gSavedSkinSettings, "MenuItemHighlightBgColor", DEFAULT_WHITE);
+	static LLCachedControl<LLColor4> sHighlightFgColor(gSavedSkinSettings, "MenuItemHighlightFgColor", DEFAULT_WHITE);
+	static LLCachedControl<LLColor4> sFilterBGColor(gSavedSkinSettings, "FilterBackgroundColor", DEFAULT_WHITE);
+	static LLCachedControl<LLColor4> sFilterTextColor(gSavedSkinSettings, "FilterTextColor", DEFAULT_WHITE);
+	static LLCachedControl<LLColor4> sSuffixColor(gSavedSkinSettings, "InventoryItemSuffixColor", DEFAULT_WHITE);
+	static LLCachedControl<LLColor4> sSearchStatusColor(gSavedSkinSettings, "InventorySearchStatusColor", DEFAULT_WHITE);
+
 	bool possibly_has_children = false;
 	bool up_to_date = mListener && mListener->isUpToDate();
 	if((up_to_date && hasVisibleChildren() ) || // we fetched our children and some of them have passed the filter...
@@ -920,7 +923,7 @@ void LLFolderViewItem::draw()
 			
 			LLColor4 filter_color = mLastFilterGeneration >= getRoot()->getFilter()->getCurrentGeneration() ? LLColor4(0.5f, 0.8f, 0.5f, 1.f) : LLColor4(0.8f, 0.5f, 0.5f, 1.f);
 			sSmallFont->renderUTF8(mStatusText, 0, text_left, y, filter_color,
-							LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL,
+					LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
 							S32_MAX, S32_MAX, &right_x, FALSE );
 			text_left = right_x;
 		}
@@ -928,26 +931,25 @@ void LLFolderViewItem::draw()
 
 		if ( mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime") )
 		{
-			// *TODO: Translate
-			sFont->renderUTF8( std::string("Loading... "), 0, text_left, y, sSearchStatusColor,
-						LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, S32_MAX, S32_MAX, &right_x, FALSE);
+			sFont->renderUTF8(LLTrans::getString("LoadingData"), 0, text_left, y, sSearchStatusColor,
+					LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE);
 			text_left = right_x;
 		}
 
 		sFont->renderUTF8( mLabel, 0, text_left, y, color,
-							LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle,
+							LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW,
 							S32_MAX, S32_MAX, &right_x, FALSE );
 		if (!mLabelSuffix.empty())
 		{
 			sFont->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor,
-								LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle,
+								LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW,
 								S32_MAX, S32_MAX, &right_x, FALSE );
 		}
 
 		if (sBoxImage.notNull() && mStringMatchOffset != std::string::npos)
 		{
 			// don't draw backgrounds for zero-length strings
-			S32 filter_string_length = mRoot->getFilterSubString().size();
+			S32 filter_string_length = getRoot()->getFilterSubString().size();
 			if (filter_string_length > 0)
 			{
 				std::string combined_string = mLabel + mLabelSuffix;
@@ -961,7 +963,7 @@ void LLFolderViewItem::draw()
 				F32 match_string_left = text_left + sFont->getWidthF32(combined_string, 0, mStringMatchOffset);
 				F32 y = (F32)getRect().getHeight() - sFont->getLineHeight() - (F32)TEXT_PAD;
 				sFont->renderUTF8( combined_string, mStringMatchOffset, match_string_left, y,
-								sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle,
+								sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW,
 								filter_string_length, S32_MAX, &right_x, FALSE );
 			}
 		}
@@ -971,6 +973,13 @@ void LLFolderViewItem::draw()
 	{
 		drawDebugRect();
 	}
+
+	//// *HACK: also draw debug rectangles around currently-being-edited LLView, and any elements that are being highlighted by GUI preview code (see LLFloaterUIPreview)
+	//std::set<LLView*>::iterator iter = std::find(sPreviewHighlightedElements.begin(), sPreviewHighlightedElements.end(), this);
+	//if ((sEditingUI && this == sEditingUIView) || (iter != sPreviewHighlightedElements.end() && sDrawPreviewHighlights))
+	//{
+	//	drawDebugRect();
+	//}
 }
 
 
@@ -978,11 +987,8 @@ void LLFolderViewItem::draw()
 /// Class LLFolderViewFolder
 ///----------------------------------------------------------------------------
 
-// Default constructor
-LLFolderViewFolder::LLFolderViewFolder( const std::string& name, LLUIImagePtr icon,
-										LLFolderView* root,
-										LLFolderViewEventListener* listener ): 
-	LLFolderViewItem( name, icon, 0, root, listener ),	// 0 = no create time
+LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ): 
+	LLFolderViewItem( p ),	// 0 = no create time
 	mIsOpen(FALSE),
 	mExpanderHighlighted(FALSE),
 	mCurHeight(0.f),
@@ -1042,7 +1048,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
 	{
 		// set last arrange generation first, in case children are animating
 		// and need to be arranged again
-		mLastArrangeGeneration = mRoot->getArrangeGeneration();
+		mLastArrangeGeneration = getRoot()->getArrangeGeneration();
 		if (mIsOpen)
 		{
 			// Add sizes of children
@@ -1163,7 +1169,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
 
 BOOL LLFolderViewFolder::needsArrange()
 {
-	return mLastArrangeGeneration < mRoot->getArrangeGeneration(); 
+	return mLastArrangeGeneration < getRoot()->getArrangeGeneration(); 
 }
 
 void LLFolderViewFolder::setCompletedFilterGeneration(S32 generation, BOOL recurse_up)
@@ -1256,7 +1262,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
 			if ((*fit)->getFiltered() || (*fit)->hasFilteredDescendants(filter.getMinRequiredGeneration()))
 			{
 				mMostFilteredDescendantGeneration = filter_generation;
-				if (mRoot->needsAutoSelect())
+				if (getRoot()->needsAutoSelect())
 				{
 					(*fit)->setOpenArrangeRecursively(TRUE);
 				}
@@ -1272,7 +1278,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
 		if ((*fit)->getFiltered() || (*fit)->hasFilteredDescendants(filter_generation))
 		{
 			mMostFilteredDescendantGeneration = filter_generation;
-			if (mRoot->needsAutoSelect())
+			if (getRoot()->needsAutoSelect())
 			{
 				(*fit)->setOpenArrangeRecursively(TRUE);
 			}
@@ -1346,7 +1352,7 @@ void LLFolderViewFolder::dirtyFilter()
 
 BOOL LLFolderViewFolder::hasFilteredDescendants()
 {
-	return mMostFilteredDescendantGeneration >= mRoot->getFilter()->getCurrentGeneration();
+	return mMostFilteredDescendantGeneration >= getRoot()->getFilter()->getCurrentGeneration();
 }
 
 // Passes selection information on to children and record selection
@@ -2209,7 +2215,7 @@ BOOL	LLFolderViewFolder::potentiallyVisible()
 	// folder should be visible by it's own filter status
 	return LLFolderViewItem::potentiallyVisible() 	
 		 // or one or more of its descendants have passed the minimum filter requirement
-		|| hasFilteredDescendants(mRoot->getFilter()->getMinRequiredGeneration())
+		|| hasFilteredDescendants(getRoot()->getFilter()->getMinRequiredGeneration())
 		// or not all of its descendants have been checked against minimum filter requirement
 		|| getCompletedFilterGeneration() < getRoot()->getFilter()->getMinRequiredGeneration(); 
 }
@@ -2494,21 +2500,13 @@ void LLCloseAllFoldersFunctor::doItem(LLFolderViewItem* item)
 ///----------------------------------------------------------------------------
 
 // Default constructor
-LLFolderView::LLFolderView( const std::string& name, LLUIImagePtr root_folder_icon, 
-						   const LLRect& rect, const LLUUID& source_id, LLView *parent_view ) :
-#if LL_WINDOWS
-#pragma warning( push )
-#pragma warning( disable : 4355 ) // warning C4355: 'this' : used in base member initializer list
-#endif
-	LLFolderViewFolder( name, root_folder_icon, this, NULL ),
-#if LL_WINDOWS
-#pragma warning( pop )
-#endif
+LLFolderView::LLFolderView(const Params& p)
+:	LLFolderViewFolder(p),
 	mScrollContainer( NULL ),
 	mPopupMenuHandle(),
 	mAllowMultiSelect(TRUE),
 	mShowFolderHierarchy(FALSE),
-	mSourceID(source_id),
+	mSourceID(p.task_id),
 	mRenameItem( NULL ),
 	mNeedsScroll( FALSE ),
 	mLastScrollItem( NULL ),
@@ -2517,16 +2515,16 @@ LLFolderView::LLFolderView( const std::string& name, LLUIImagePtr root_folder_ic
 	mNeedsAutoRename(FALSE),
 	mDebugFilters(FALSE),
 	mSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME),	// This gets overridden by a pref immediately
-	mFilter(name),
+	mFilter(p.name),
 	mShowSelectionContext(FALSE),
 	mShowSingleSelection(FALSE),
 	mArrangeGeneration(0),
-	mUserData(NULL),
-	mSelectCallback(NULL),
 	mSignalSelectCallback(0),
 	mMinWidth(0),
-	mDragAndDropThisFrame(FALSE)
+	mDragAndDropThisFrame(FALSE),
+	mCallbackRegistrar(NULL)
 {
+	LLRect rect = p.rect;
 	LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom);
 	setRect( rect );
 	reshape(rect.getWidth(), rect.getHeight());
@@ -2543,27 +2541,27 @@ LLFolderView::LLFolderView( const std::string& name, LLUIImagePtr root_folder_ic
 	// just make sure the label ("Inventory Folder") never shows up
 	mLabel = LLStringUtil::null;
 
-	mRenamer = new LLLineEditor(std::string("ren"), getRect(), LLStringUtil::null, sFont,
-								DB_INV_ITEM_NAME_STR_LEN,
-								&LLFolderView::commitRename,
-								NULL,
-								NULL,
-								this,
-								&LLLineEditor::prevalidatePrintableNotPipe);
 	//mRenamer->setWriteableBgColor(LLColor4::white);
 	// Escape is handled by reverting the rename, not commiting it (default behavior)
-	mRenamer->setCommitOnFocusLost(TRUE);
-	mRenamer->setVisible(FALSE);
+	LLLineEditor::Params params;
+	params.name("ren");
+	params.rect(getRect());
+	params.font(sFont);
+	params.max_length_bytes(DB_INV_ITEM_NAME_STR_LEN);
+	params.commit_callback.function(boost::bind(&LLFolderView::commitRename, this, _2));
+	params.prevalidate_callback(&LLLineEditor::prevalidatePrintableNotPipe);
+	params.commit_on_focus_lost(true);
+	params.visible(false);
+	mRenamer = LLUICtrlFactory::create<LLLineEditor> (params);
 	addChild(mRenamer);
 
 	// make the popup menu available
-	LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_inventory.xml", parent_view);
+	LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory.xml", p.parent_panel);
 	if (!menu)
 	{
-		menu = new LLMenuGL(LLStringUtil::null);
+		menu = LLUICtrlFactory::createDummyWidget<LLMenuGL>("inventory_menu");
 	}
-	menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
-	menu->setVisible(FALSE);
+	menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor"));
 	mPopupMenuHandle = menu->getHandle();
 
 	setTabStop(TRUE);
@@ -2674,7 +2672,7 @@ void LLFolderView::closeAllFolders()
 
 void LLFolderView::openFolder(const std::string& foldername)
 {
-	LLFolderViewFolder* inv = getChild<LLFolderViewFolder>(foldername);
+	LLFolderViewFolder* inv = findChild<LLFolderViewFolder>(foldername);
 	if (inv)
 	{
 		setSelection(inv, FALSE, FALSE);
@@ -2700,7 +2698,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
 
 	mHasVisibleChildren = hasFilteredDescendants(filter_generation);
 	// arrange always finishes, so optimistically set the arrange generation to the most current
-	mLastArrangeGeneration = mRoot->getArrangeGeneration();
+	mLastArrangeGeneration = getRoot()->getArrangeGeneration();
 
 	LLInventoryFilter::EFolderShow show_folder_state = getRoot()->getShowFolderState();
 
@@ -3113,24 +3111,21 @@ BOOL LLFolderView::startDrag(LLToolDragAndDrop::ESource source)
 	return can_drag;
 }
 
-void LLFolderView::commitRename( LLUICtrl* renamer, void* user_data )
+void LLFolderView::commitRename( const LLSD& data )
 {
-	LLFolderView* root = reinterpret_cast<LLFolderView*>(user_data);
-	if( root )
-	{
-		root->finishRenamingItem();
-	}
+	finishRenamingItem();
 }
 
 void LLFolderView::draw()
 {
+	static LLCachedControl<LLColor4> sSearchStatusColor(gSavedSkinSettings, "InventorySearchStatusColor", DEFAULT_WHITE);
 	if (mDebugFilters)
 	{
 		std::string current_filter_string = llformat("Current Filter: %d, Least Filter: %d, Auto-accept Filter: %d",
 										mFilter.getCurrentGeneration(), mFilter.getMinRequiredGeneration(), mFilter.getMustPassGeneration());
 		sSmallFont->renderUTF8(current_filter_string, 0, 2, 
 			getRect().getHeight() - sSmallFont->getLineHeight(), LLColor4(0.5f, 0.5f, 0.8f, 1.f), 
-			LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, S32_MAX, S32_MAX, NULL, FALSE );
+			LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE );
 	}
 
 	// if cursor has moved off of me during drag and drop
@@ -3176,13 +3171,13 @@ void LLFolderView::draw()
 	{
 		if (gInventory.backgroundFetchActive() || mCompletedFilterGeneration < mFilter.getMinRequiredGeneration())
 		{
-			mStatusText = std::string("Searching..."); // *TODO:translate
-			sFont->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, S32_MAX, S32_MAX, NULL, FALSE );
+			mStatusText = LLTrans::getString("Searching");
+			sFont->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL,  LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE );
 		}
 		else
 		{
-			mStatusText = std::string("No matching items found in inventory."); // *TODO:translate
-			sFont->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, S32_MAX, S32_MAX, NULL, FALSE );
+			mStatusText = LLTrans::getString("InventoryNoMatchingItems");
+			sFont->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL,  LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE );
 		}
 	}
 
@@ -3347,11 +3342,8 @@ void LLFolderView::openSelectedItems( void )
 		}
 		else
 		{
-			S32 left, top;
-			gFloaterView->getNewFloaterPosition(&left, &top);
-			LLMultiPreview* multi_previewp = new LLMultiPreview(LLRect(left, top, left + 300, top - 100));
-			gFloaterView->getNewFloaterPosition(&left, &top);
-			LLMultiProperties* multi_propertiesp = new LLMultiProperties(LLRect(left, top, left + 300, top - 100));
+			LLMultiPreview* multi_previewp = new LLMultiPreview();
+			LLMultiProperties* multi_propertiesp = new LLMultiProperties();
 
 			selected_items_t::iterator item_it;
 			for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it)
@@ -3371,8 +3363,8 @@ void LLFolderView::openSelectedItems( void )
 			LLFloater::setFloaterHost(NULL);
 			// *NOTE: LLMulti* will safely auto-delete when open'd
 			// without any children.
-			multi_previewp->open();
-			multi_propertiesp->open();
+			multi_previewp->openFloater(LLSD());
+			multi_propertiesp->openFloater(LLSD());
 		}
 	}
 }
@@ -3389,10 +3381,7 @@ void LLFolderView::propertiesSelectedItems( void )
 		}
 		else
 		{
-			S32 left, top;
-			gFloaterView->getNewFloaterPosition(&left, &top);
-
-			LLMultiProperties* multi_propertiesp = new LLMultiProperties(LLRect(left, top, left + 100, top - 100));
+			LLMultiProperties* multi_propertiesp = new LLMultiProperties();
 
 			LLFloater::setFloaterHost(multi_propertiesp);
 
@@ -3403,7 +3392,7 @@ void LLFolderView::propertiesSelectedItems( void )
 			}
 
 			LLFloater::setFloaterHost(NULL);
-			multi_propertiesp->open();		/* Flawfinder: ignore */
+			multi_propertiesp->openFloater(LLSD());
 		}
 	}
 }
@@ -3631,7 +3620,7 @@ void LLFolderView::startRenamingSelectedItem( void )
 		mRenamer->setVisible( TRUE );
 		// set focus will fail unless item is visible
 		mRenamer->setFocus( TRUE );
-		mRenamer->setLostTopCallback(onRenamerLost);
+		mRenamer->setTopLostCallback(onRenamerLost);
 		gFocusMgr.setTopCtrl( mRenamer );
 	}
 }
@@ -4037,6 +4026,8 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
 	LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
 	if(handled && (count > 0) && menu)
 	{
+		if (mCallbackRegistrar)
+			mCallbackRegistrar->pushScope();
 		//menu->empty();
 		const LLView::child_list_t *list = menu->getChildList();
 
@@ -4056,9 +4047,10 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
 			flags = 0x0;
 		}
 
-		menu->arrange();
 		menu->updateParent(LLMenuGL::sMenuContainer);
 		LLMenuGL::showPopup(this, menu, x, y);
+		if (mCallbackRegistrar)
+			mCallbackRegistrar->popScope();
 	}
 	else
 	{
@@ -4295,11 +4287,11 @@ void LLFolderView::doIdle()
 		}
 	}
 
-	if (mSignalSelectCallback && mSelectCallback)
+	if (mSignalSelectCallback)
 	{
 		//RN: we use keyboard focus as a proxy for user-explicit actions
 		BOOL take_keyboard_focus = (mSignalSelectCallback == SIGNAL_KEYBOARD_FOCUS);
-		mSelectCallback(mSelectedItems, take_keyboard_focus, mUserData);
+		mSelectSignal(mSelectedItems, take_keyboard_focus);
 	}
 	mSignalSelectCallback = FALSE;
 }
@@ -4400,9 +4392,13 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde
 }
 
 //static 
-void LLFolderView::onRenamerLost( LLUICtrl* renamer, void* user_data)
+void LLFolderView::onRenamerLost( LLFocusableElement* renamer, void* user_data)
 {
-	renamer->setVisible(FALSE);
+	LLUICtrl* uictrl = dynamic_cast<LLUICtrl*>(renamer);
+	if (uictrl)
+	{
+		uictrl->setVisible(FALSE);
+	}
 }
 
 void delete_selected_item(void* user_data)
@@ -4823,133 +4819,156 @@ std::string LLInventoryFilter::getFilterText()
 
 	if (isFilterWith(LLInventoryType::IT_ANIMATION))
 	{
-		filtered_types += " Animations,";
+		//filtered_types += " Animations,";
+		filtered_types += LLTrans::getString("Animations");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Animations,";
+		//not_filtered_types += " Animations,";
+		not_filtered_types += LLTrans::getString("Animations");
+
 		filtered_by_all_types = FALSE;
 	}
 
 	if (isFilterWith(LLInventoryType::IT_CALLINGCARD))
 	{
-		filtered_types += " Calling Cards,";
+		//filtered_types += " Calling Cards,";
+		filtered_types += LLTrans::getString("Calling Cards");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Calling Cards,";
+		//not_filtered_types += " Calling Cards,";
+		not_filtered_types += LLTrans::getString("Calling Cards");
 		filtered_by_all_types = FALSE;
 	}
 
 	if (isFilterWith(LLInventoryType::IT_WEARABLE))
 	{
-		filtered_types += " Clothing,";
+		//filtered_types += " Clothing,";
+		filtered_types +=  LLTrans::getString("Clothing");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Clothing,";
+		//not_filtered_types += " Clothing,";
+		not_filtered_types +=  LLTrans::getString("Clothing");
 		filtered_by_all_types = FALSE;
 	}
 
 	if (isFilterWith(LLInventoryType::IT_GESTURE))
 	{
-		filtered_types += " Gestures,";
+		//filtered_types += " Gestures,";
+		filtered_types +=  LLTrans::getString("Gestures");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Gestures,";
+		//not_filtered_types += " Gestures,";
+		not_filtered_types +=  LLTrans::getString("Gestures");
 		filtered_by_all_types = FALSE;
 	}
 
 	if (isFilterWith(LLInventoryType::IT_LANDMARK))
 	{
-		filtered_types += " Landmarks,";
+		//filtered_types += " Landmarks,";
+		filtered_types +=  LLTrans::getString("Landmarks");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Landmarks,";
+		//not_filtered_types += " Landmarks,";
+		not_filtered_types +=  LLTrans::getString("Landmarks");
 		filtered_by_all_types = FALSE;
 	}
 
 	if (isFilterWith(LLInventoryType::IT_NOTECARD))
 	{
-		filtered_types += " Notecards,";
+		//filtered_types += " Notecards,";
+		filtered_types +=  LLTrans::getString("Notecards");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Notecards,";
+		//not_filtered_types += " Notecards,";
+		not_filtered_types +=  LLTrans::getString("Notecards");
 		filtered_by_all_types = FALSE;
 	}
 	
 	if (isFilterWith(LLInventoryType::IT_OBJECT) && isFilterWith(LLInventoryType::IT_ATTACHMENT))
 	{
-		filtered_types += " Objects,";
+		//filtered_types += " Objects,";
+		filtered_types +=  LLTrans::getString("Objects");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Objects,";
+		//not_filtered_types += " Objects,";
+		not_filtered_types +=  LLTrans::getString("Objects");
 		filtered_by_all_types = FALSE;
 	}
 	
 	if (isFilterWith(LLInventoryType::IT_LSL))
 	{
-		filtered_types += " Scripts,";
+		//filtered_types += " Scripts,";
+		filtered_types +=  LLTrans::getString("Scripts");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Scripts,";
+		//not_filtered_types += " Scripts,";
+		not_filtered_types +=  LLTrans::getString("Scripts");
 		filtered_by_all_types = FALSE;
 	}
 	
 	if (isFilterWith(LLInventoryType::IT_SOUND))
 	{
-		filtered_types += " Sounds,";
+		//filtered_types += " Sounds,";
+		filtered_types +=  LLTrans::getString("Sounds");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Sounds,";
+		//not_filtered_types += " Sounds,";
+		not_filtered_types +=  LLTrans::getString("Sounds");
 		filtered_by_all_types = FALSE;
 	}
 
 	if (isFilterWith(LLInventoryType::IT_TEXTURE))
 	{
-		filtered_types += " Textures,";
+		//filtered_types += " Textures,";
+		filtered_types +=  LLTrans::getString("Textures");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Textures,";
+		//not_filtered_types += " Textures,";
+		not_filtered_types +=  LLTrans::getString("Textures");
 		filtered_by_all_types = FALSE;
 	}
 
 	if (isFilterWith(LLInventoryType::IT_SNAPSHOT))
 	{
-		filtered_types += " Snapshots,";
+		//filtered_types += " Snapshots,";
+		filtered_types +=  LLTrans::getString("Snapshots");
 		filtered_by_type = TRUE;
 		num_filter_types++;
 	}
 	else
 	{
-		not_filtered_types += " Snapshots,";
+		//not_filtered_types += " Snapshots,";
+		not_filtered_types +=  LLTrans::getString("Snapshots");
 		filtered_by_all_types = FALSE;
 	}
 
@@ -4962,7 +4981,8 @@ std::string LLInventoryFilter::getFilterText()
 		}
 		else
 		{
-			mFilterText += "No ";
+			//mFilterText += "No ";
+			mFilterText += LLTrans::getString("No Filters");
 			mFilterText += not_filtered_types;
 		}
 		// remove the ',' at the end
@@ -4971,7 +4991,8 @@ std::string LLInventoryFilter::getFilterText()
 
 	if (isSinceLogoff())
 	{
-		mFilterText += " - Since Logoff";
+		//mFilterText += " - Since Logoff";
+		mFilterText += LLTrans::getString("Since Logoff");
 	}
 	return mFilterText;
 }
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 3fe3095c58..1b128d84ee 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -70,7 +70,7 @@ class LLMenuGL;
 class LLFolderViewItem;
 class LLFolderView;
 class LLInventoryModel;
-class LLScrollableContainerView;
+class LLScrollContainer;
 
 class LLFolderViewEventListener
 {
@@ -81,6 +81,7 @@ public:
 	virtual const LLUUID& getUUID() const = 0;
 	virtual time_t getCreationDate() const = 0;	// UTC seconds
 	virtual PermissionMask getPermissionMask() const = 0;
+	virtual LLAssetType::EType getPreferredType() const {return LLAssetType::AT_NONE;};
 	virtual LLUIImagePtr getIcon() const = 0;
 	virtual LLFontGL::StyleFlags getLabelStyle() const = 0;
 	virtual std::string getLabelSuffix() const = 0;
@@ -316,21 +317,39 @@ class LLFolderView;
 
 class LLFolderViewItem : public LLUICtrl
 {
+public:
+	static void initClass();
+	static void cleanupClass();
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<LLUIImage*>					icon;
+		Optional<LLFolderView*>					root;
+		Optional<LLFolderViewEventListener*>	listener;
+
+		Optional<LLUIImage*>					folder_arrow_image;
+		Optional<LLUIImage*>					selection_image;
+
+		Optional<S32>							creation_date; //UTC seconds
+		Params()
+		:	folder_arrow_image("", LLUI::getUIImage("folder_arrow.tga")),
+			selection_image("", LLUI::getUIImage("rounded_square.tga"))
+		{
+			mouse_opaque(true);
+			follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_RIGHT);
+			tab_stop(false);
+		}
+	};
+
 protected:
+	friend class LLUICtrlFactory;
 	friend class LLFolderViewEventListener;
 
+	LLFolderViewItem(Params = LLFolderViewItem::Params());
+
 	static const LLFontGL*		sFont;
 	static const LLFontGL*		sSmallFont;
-	static LLColor4				sFgColor;
-	static LLColor4				sHighlightBgColor;
-	static LLColor4				sHighlightFgColor;
-	static LLColor4				sFilterBGColor;
-	static LLColor4				sFilterTextColor;
-	static LLColor4				sSuffixColor;
-	static LLColor4				sSearchStatusColor;
 	static LLUIImagePtr			sArrowImage;
 	static LLUIImagePtr			sBoxImage;
-
 	std::string					mLabel;
 	std::string					mSearchableLabel;
 	std::string					mType;
@@ -354,6 +373,8 @@ protected:
 	F32							mControlLabelRotation;
 	LLFolderView*				mRoot;
 	BOOL						mDragAndDropTarget;
+	LLUIImagePtr				mArrowImage;
+	LLUIImagePtr				mBoxImage;
 	BOOL                            mIsLoading;
 	LLTimer                         mTimeSinceRequestStart;
 	
@@ -376,17 +397,12 @@ protected:
 	virtual BOOL addFolder(LLFolderViewFolder*) { return FALSE; }
 
 public:
-	static void initClass();
-	static void cleanupClass();
-	
 	// This function is called when the folder view is dirty. It's
 	// implemented here but called by derived classes when folding the
 	// views.
 	void arrangeFromRoot();
 	void filterFromRoot( void );
 
-	// creation_date is in UTC seconds
-	LLFolderViewItem( const std::string& name, LLUIImagePtr icon, time_t creation_date, LLFolderView* root, LLFolderViewEventListener* listener );
 	virtual ~LLFolderViewItem( void );
 
 	// addToFolder() returns TRUE if it succeeds. FALSE otherwise
@@ -490,7 +506,7 @@ public:
 
 	virtual BOOL isOpen() { return FALSE; }
 
-	LLFolderView*	getRoot();
+	virtual LLFolderView*	getRoot();
 	BOOL			isDescendantOf( const LLFolderViewFolder* potential_ancestor );
 	S32				getIndentation() { return mIndentation; }
 
@@ -541,12 +557,16 @@ typedef bool (*sort_order_f)(LLFolderViewItem* a, LLFolderViewItem* b);
 
 class LLFolderViewFolder : public LLFolderViewItem
 {
+protected:
+	LLFolderViewFolder( const LLFolderViewItem::Params& );
+	friend class LLUICtrlFactory;
+
 public:
 	typedef enum e_trash
 	{
 		UNKNOWN, TRASH, NOT_TRASH
 	} ETrash;
-
+	
 protected:
 	typedef std::list<LLFolderViewItem*> items_t;
 	typedef std::list<LLFolderViewFolder*> folders_t;
@@ -574,9 +594,7 @@ public:
 		RECURSE_UP_DOWN
 	} ERecurseType;
 
-	LLFolderViewFolder( const std::string& name, LLUIImagePtr icon,
-						LLFolderView* root,
-						LLFolderViewEventListener* listener );
+
 	virtual ~LLFolderViewFolder( void );
 
 	virtual BOOL	potentiallyVisible();
@@ -724,24 +742,30 @@ class LLLineEditor;
 class LLFolderView : public LLFolderViewFolder, LLEditMenuHandler
 {
 public:
-	typedef void (*SelectCallback)(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
-
-	static F32 sAutoOpenTime;
-
+	struct Params : public LLInitParam::Block<Params, LLFolderViewFolder::Params>
+	{
+		Mandatory<LLPanel*> parent_panel;
+		Optional<LLUUID>	task_id;
+	};
 	LLFolderView( const std::string& name, LLUIImagePtr root_folder_icon, const LLRect& rect, 
-					const LLUUID& source_id, LLView *parent_view );
+					const LLUUID& source_id, LLPanel *parent_view );
+	LLFolderView(const Params&);
 	virtual ~LLFolderView( void );
 
 	virtual BOOL canFocusChildren() const;
 
+	virtual LLFolderView*	getRoot() { return this; }
+
 	// FolderViews default to sort by name.  This will change that,
 	// and resort the items if necessary.
 	void setSortOrder(U32 order);
 	void checkTreeResortForModelChanged();
 	void setFilterPermMask(PermissionMask filter_perm_mask) { mFilter.setFilterPermissions(filter_perm_mask); }
-	void setSelectCallback(SelectCallback callback, void* user_data) { mSelectCallback = callback, mUserData = user_data; }
 	void setAllowMultiSelect(BOOL allow) { mAllowMultiSelect = allow; }
-
+	
+	typedef boost::signal<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)> signal_t;	
+	void setSelectCallback(const signal_t::slot_type& cb) { mSelectSignal.connect(cb); }
+	
 	LLInventoryFilter* getFilter() { return &mFilter; }
 	const std::string getFilterSubString(BOOL trim = FALSE);
 	U32 getFilterTypes() const { return mFilter.getFilterTypes(); }
@@ -852,7 +876,7 @@ public:
 
 	void scrollToShowSelection();
 	void scrollToShowItem(LLFolderViewItem* item);
-	void setScrollContainer( LLScrollableContainerView* parent ) { mScrollContainer = parent; }
+	void setScrollContainer( LLScrollContainer* parent ) { mScrollContainer = parent; }
 	LLRect getVisibleRect();
 
 	BOOL search(LLFolderViewItem* first_item, const std::string &search_string, BOOL backward);
@@ -873,20 +897,22 @@ public:
 	BOOL needsAutoRename() { return mNeedsAutoRename; }
 	void setNeedsAutoRename(BOOL val) { mNeedsAutoRename = val; }
 
+	void setCallbackRegistrar(LLUICtrl::CommitCallbackRegistry::ScopedRegistrar* registrar) { mCallbackRegistrar = registrar; }
+
 	BOOL getDebugFilters() { return mDebugFilters; }
 
 	// DEBUG only
 	void dumpSelectionInformation();
 
 protected:
-	LLScrollableContainerView* mScrollContainer;  // NULL if this is not a child of a scroll container.
+	LLScrollContainer* mScrollContainer;  // NULL if this is not a child of a scroll container.
 
-	static void commitRename( LLUICtrl* renamer, void* user_data );
-	static void onRenamerLost( LLUICtrl* renamer, void* user_data);
+	void commitRename( const LLSD& data );
+	static void onRenamerLost( LLFocusableElement* renamer, void* user_data);
 
 	void finishRenamingItem( void );
 	void closeRenamer( void );
-
+	
 protected:
 	LLHandle<LLView>					mPopupMenuHandle;
 	
@@ -921,13 +947,16 @@ protected:
 	LLFrameTimer					mMultiSelectionFadeTimer;
 	S32								mArrangeGeneration;
 
-	void*							mUserData;
-	SelectCallback					mSelectCallback;
+	signal_t						mSelectSignal;
 	S32								mSignalSelectCallback;
 	S32								mMinWidth;
 	std::map<LLUUID, LLFolderViewItem*> mItemMap;
 	BOOL							mDragAndDropThisFrame;
 
+	LLUICtrl::CommitCallbackRegistry::ScopedRegistrar* mCallbackRegistrar;
+	
+public:
+	static F32 sAutoOpenTime;
 };
 
 bool sort_item_name(LLFolderViewItem* a, LLFolderViewItem* b);
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 91beb801ad..b0ccc0f141 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -58,7 +58,6 @@
 #include "llviewerobjectlist.h"
 #include "lltoolselectrect.h"
 #include "llviewerwindow.h"
-#include "llcompass.h"
 #include "llsurface.h"
 #include "llwind.h"
 #include "llworld.h"
@@ -338,127 +337,8 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
 	gViewerWindow->setup3DRender();
 }
 
-
-const F32 COMPASS_SIZE = 64;
-static const F32 COMPASS_RANGE = 0.33f;
-
-void LLCompass::draw()
-{
-	glMatrixMode(GL_MODELVIEW);
-	gGL.pushMatrix();
-
-	S32 width = 32;
-	S32 height = 32;
-
-	LLGLSUIDefault gls_ui;
-
-	gGL.translatef( COMPASS_SIZE/2.f, COMPASS_SIZE/2.f, 0.f);
-
-	if (mBkgndTexture)
-	{
-		gGL.getTexUnit(0)->bind(mBkgndTexture.get());
-
-		gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f);
-		
-		gGL.begin(LLRender::QUADS);
-		
-		gGL.texCoord2f(1.f, 1.f);
-		gGL.vertex2i(width, height);
-		
-		gGL.texCoord2f(0.f, 1.f);
-		gGL.vertex2i(-width, height);
-		
-		gGL.texCoord2f(0.f, 0.f);
-		gGL.vertex2i(-width, -height);
-		
-		gGL.texCoord2f(1.f, 0.f);
-		gGL.vertex2i(width, -height);
-		
-		gGL.end();
-	}
-
-	// rotate subsequent draws to agent rotation
-	F32 rotation = atan2( gAgent.getFrameAgent().getAtAxis().mV[VX], gAgent.getFrameAgent().getAtAxis().mV[VY] );
-	glRotatef( - rotation * RAD_TO_DEG, 0.f, 0.f, -1.f);
-	
-	if (mTexture)
-	{
-		gGL.getTexUnit(0)->bind(mTexture.get());
-		gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f);
-		
-		gGL.begin(LLRender::QUADS);
-		
-		gGL.texCoord2f(1.f, 1.f);
-		gGL.vertex2i(width, height);
-		
-		gGL.texCoord2f(0.f, 1.f);
-		gGL.vertex2i(-width, height);
-		
-		gGL.texCoord2f(0.f, 0.f);
-		gGL.vertex2i(-width, -height);
-		
-		gGL.texCoord2f(1.f, 0.f);
-		gGL.vertex2i(width, -height);
-		
-		gGL.end();
-	}
-
-	gGL.popMatrix();
-
-}
-
-
-
-void LLHorizontalCompass::draw()
-{
-	LLGLSUIDefault gls_ui;
-	
-	S32 width = getRect().getWidth();
-	S32 height = getRect().getHeight();
-	S32 half_width = width / 2;
-
-	if( mTexture )
-	{
-		const LLVector3& at_axis = LLViewerCamera::getInstance()->getAtAxis();
-		F32 center = atan2( at_axis.mV[VX], at_axis.mV[VY] );
-
-		center += F_PI;
-		center = llclamp( center, 0.0f, F_TWO_PI ); // probably not necessary...
-		center /= F_TWO_PI;
-		F32 left = center - COMPASS_RANGE;
-		F32 right = center + COMPASS_RANGE;
-
-		gGL.getTexUnit(0)->bind(mTexture.get());
-		gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f );
-		gGL.begin( LLRender::QUADS );
-
-		gGL.texCoord2f(right, 1.f);
-		gGL.vertex2i(width, height);
-
-		gGL.texCoord2f(left, 1.f);
-		gGL.vertex2i(0, height);
-
-		gGL.texCoord2f(left, 0.f);
-		gGL.vertex2i(0, 0);
-
-		gGL.texCoord2f(right, 0.f);
-		gGL.vertex2i(width, 0);
-
-		gGL.end();
-	}
-
-	// Draw the focus line
-	{
-		gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-		gGL.color4fv( mFocusColor.mV );
-		gl_line_2d( half_width, 0, half_width, height );
-	}
-}
-
-
 const F32 WIND_ALTITUDE			= 180.f;
 
-
 void LLWind::renderVectors()
 {
 	// Renders the wind as vectors (used for debug)
@@ -1008,8 +888,6 @@ void LLViewerObjectList::renderObjectBeacons()
 		return;
 	}
 
-	//const LLFontGL *font = LLResMgr::getInstance()->getRes(LLFONT_SANSSERIF);
-
 	LLGLSUIDefault gls_ui;
 
 	{
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 003a02c3cd..a8d97c6afb 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -1293,7 +1293,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
 	}
 	else
 	{
-		// *TODO:translate
+		// *TODO: Translate
 		LLSD args;
 		args["MESSAGE"] = message;
 		LLNotifications::instance().add("UnableToCreateGroup", args);
diff --git a/indra/newview/llhudeffect.h b/indra/newview/llhudeffect.h
index 954cda7c8d..781e57fa6a 100644
--- a/indra/newview/llhudeffect.h
+++ b/indra/newview/llhudeffect.h
@@ -37,9 +37,6 @@
 
 #include "lluuid.h"
 #include "v4coloru.h"
-#include "llinterp.h"
-#include "llframetimer.h"
-#include "llmemory.h"
 
 const F32 LL_HUD_DUR_SHORT = 1.f;
 
diff --git a/indra/newview/llhudicon.h b/indra/newview/llhudicon.h
index 154e6df518..2c1c549521 100644
--- a/indra/newview/llhudicon.h
+++ b/indra/newview/llhudicon.h
@@ -33,7 +33,7 @@
 #ifndef LL_LLHUDICON_H
 #define LL_LLHUDICON_H
 
-#include "llmemory.h"
+#include "llpointer.h"
 #include "lldarrayptr.h"
 
 #include "llhudobject.h"
diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp
index 955d786187..e1e9d9c51e 100644
--- a/indra/newview/llhudmanager.cpp
+++ b/indra/newview/llhudmanager.cpp
@@ -52,9 +52,9 @@ LLColor4 LLHUDManager::sChildColor;
 LLHUDManager::LLHUDManager()
 {
 
-	LLHUDManager::sParentColor = gColors.getColor("FocusColor");
+	LLHUDManager::sParentColor = gSavedSkinSettings.getColor("FocusColor");
 	// rdw commented out since it's not used.  Also removed from colors_base.xml
-	//LLHUDManager::sChildColor = gColors.getColor("FocusSecondaryColor");
+	//LLHUDManager::sChildColor =gSavedSkinSettings.getColor("FocusSecondaryColor");
 }
 
 LLHUDManager::~LLHUDManager()
diff --git a/indra/newview/llhudmanager.h b/indra/newview/llhudmanager.h
index 615eb93a27..b2b4ffb559 100644
--- a/indra/newview/llhudmanager.h
+++ b/indra/newview/llhudmanager.h
@@ -36,7 +36,7 @@
 // Responsible for managing all HUD elements.
 
 #include "llhudobject.h"
-#include "lldarray.h"
+#include "lldarrayptr.h"
 
 class LLViewerObject;
 class LLHUDEffect;
diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h
index 2cd8abf886..d304ac41af 100644
--- a/indra/newview/llhudobject.h
+++ b/indra/newview/llhudobject.h
@@ -37,7 +37,7 @@
  * Base class and manager for in-world 2.5D non-interactive objects
  */
 
-#include "llmemory.h"
+#include "llpointer.h"
 
 #include "v4color.h"
 #include "v3math.h"
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 95b8442ec7..c00edfaa5c 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -47,17 +47,19 @@
 void hud_render_utf8text(const std::string &str, const LLVector3 &pos_agent,
 					 const LLFontGL &font,
 					 const U8 style,
+					 const LLFontGL::ShadowType shadow,
 					 const F32 x_offset, const F32 y_offset,
 					 const LLColor4& color,
 					 const BOOL orthographic)
 {
 	LLWString wstr(utf8str_to_wstring(str));
-	hud_render_text(wstr, pos_agent, font, style, x_offset, y_offset, color, orthographic);
+	hud_render_text(wstr, pos_agent, font, style, shadow, x_offset, y_offset, color, orthographic);
 }
 
 void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
 					const LLFontGL &font,
 					const U8 style,
+					const LLFontGL::ShadowType shadow,
 					const F32 x_offset, const F32 y_offset,
 					const LLColor4& color,
 					const BOOL orthographic)
@@ -123,7 +125,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
 	//glScalef(right_scale, up_scale, 1.f);
 	F32 right_x;
 	
-	font.render(wstr, 0, 0, 0, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, wstr.length(), 1000, &right_x);
+	font.render(wstr, 0, 0, 0, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x);
 	LLUI::popMatrix();
 	
 	glMatrixMode(GL_PROJECTION);
diff --git a/indra/newview/llhudrender.h b/indra/newview/llhudrender.h
index 5ca865737f..93de89f7b0 100644
--- a/indra/newview/llhudrender.h
+++ b/indra/newview/llhudrender.h
@@ -43,6 +43,7 @@ void hud_render_text(const LLWString &wstr,
 					 const LLVector3 &pos_agent,
 					 const LLFontGL &font,
 					 const U8 style,
+					 const LLFontGL::ShadowType, 
 					 const F32 x_offset,
 					 const F32 y_offset,
 					 const LLColor4& color,
@@ -53,6 +54,7 @@ void hud_render_utf8text(const std::string &str,
 						 const LLVector3 &pos_agent,
 						 const LLFontGL &font,
 						 const U8 style,
+						const LLFontGL::ShadowType, 
 						 const F32 x_offset,
 						 const F32 y_offset,
 						 const LLColor4& color,
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 20140073f4..25f513e5c1 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -113,7 +113,6 @@ LLHUDText::LLHUDText(const U8 type) :
 	mRadius = 0.1f;
 	LLPointer<LLHUDText> ptr(this);
 	sTextObjects.insert(ptr);
-	//LLDebugVarMessageBox::show("max width", &HUD_TEXT_MAX_WIDTH, 500.f, 1.f);
 }
 
 LLHUDText::~LLHUDText()
@@ -293,7 +292,7 @@ void LLHUDText::renderText(BOOL for_select)
 	LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga");
 
 	// *TODO: make this a per-text setting
-	LLColor4 bg_color = gSavedSettings.getColor4("BackgroundChatColor");
+	LLColor4 bg_color = gSavedSkinSettings.getColor4("BackgroundChatColor");
 	bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor);
 
 	const S32 border_height = 16;
@@ -509,7 +508,7 @@ void LLHUDText::renderText(BOOL for_select)
 
 			LLColor4 label_color(0.f, 0.f, 0.f, 1.f);
 			label_color.mV[VALPHA] = alpha_factor;
-			hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, x_offset, y_offset, label_color, mOnHUDAttachment);
+			hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, mOnHUDAttachment);
 		}
 	}
 
@@ -535,9 +534,10 @@ void LLHUDText::renderText(BOOL for_select)
 			y_offset -= fontp->getLineHeight();
 
 			U8 style = segment_iter->mStyle;
+			LLFontGL::ShadowType shadow = LLFontGL::NO_SHADOW;
 			if (mDropShadow)
 			{
-				style |= LLFontGL::DROP_SHADOW;
+				shadow = LLFontGL::DROP_SHADOW;
 			}
 	
 			F32 x_offset;
@@ -553,7 +553,7 @@ void LLHUDText::renderText(BOOL for_select)
 			text_color = segment_iter->mColor;
 			text_color.mV[VALPHA] *= alpha_factor;
 
-			hud_render_text(segment_iter->getText(), render_position, *fontp, style, x_offset, y_offset, text_color, mOnHUDAttachment);
+			hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment);
 		}
 	}
 	/// Reset the default color to white.  The renderer expects this to be the default. 
diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h
index 645cbc2698..dc14a8c764 100644
--- a/indra/newview/llhudtext.h
+++ b/indra/newview/llhudtext.h
@@ -33,7 +33,7 @@
 #ifndef LL_LLHUDTEXT_H
 #define LL_LLHUDTEXT_H
 
-#include "llmemory.h"
+#include "llpointer.h"
 #include "lldarrayptr.h"
 
 #include "llhudobject.h"
diff --git a/indra/newview/llhudview.cpp b/indra/newview/llhudview.cpp
index 198514ce0c..6f22a68327 100644
--- a/indra/newview/llhudview.cpp
+++ b/indra/newview/llhudview.cpp
@@ -41,7 +41,6 @@
 // viewer includes
 #include "llagent.h"
 #include "llcallingcard.h"
-#include "llcolorscheme.h"
 #include "llviewercontrol.h"
 #include "llfloaterworldmap.h"
 #include "llworldmapview.h"
@@ -55,10 +54,12 @@ const S32 HUD_ARROW_SIZE = 32;
 
 LLHUDView::LLHUDView()
 :	LLPanel()
-{ }
+{
+}
 
 LLHUDView::~LLHUDView()
-{ }
+{
+}
 
 // virtual
 void LLHUDView::draw()
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 0586409283..15475be951 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -49,6 +49,7 @@
 #include "llchat.h"
 #include "llconsole.h"
 #include "llfloater.h"
+#include "llfloatercall.h"
 #include "llfloatergroupinfo.h"
 #include "llimview.h"
 #include "llinventory.h"
@@ -61,6 +62,7 @@
 #include "lllineeditor.h"
 #include "llnotify.h"
 #include "llresmgr.h"
+#include "lltrans.h"
 #include "lltabcontainer.h"
 #include "llviewertexteditor.h"
 #include "llviewermessage.h"
@@ -216,7 +218,7 @@ private:
 bool send_start_session_messages(
 	const LLUUID& temp_session_id,
 	const LLUUID& other_participant_id,
-	const LLDynamicArray<LLUUID>& ids,
+	const std::vector<LLUUID>& ids,
 	EInstantMessage dialog)
 {
 	if ( dialog == IM_SESSION_GROUP_START )
@@ -246,7 +248,7 @@ bool send_start_session_messages(
 		LLSD agents;
 		for (int i = 0; i < (S32) ids.size(); i++)
 		{
-			agents.append(ids.get(i));
+			agents.append(ids[i]);
 		}
 
 		//we have a new way of starting conference calls now
@@ -587,7 +589,6 @@ LLVoiceChannel* LLVoiceChannel::getChannelByURI(std::string uri)
 	}
 }
 
-
 void LLVoiceChannel::updateSessionID(const LLUUID& new_session_id)
 {
 	sVoiceChannelMap.erase(sVoiceChannelMap.find(mSessionID));
@@ -622,6 +623,17 @@ void LLVoiceChannel::setState(EState state)
 	mState = state;
 }
 
+void LLVoiceChannel::toggleCallWindowIfNeeded(EState state)
+{
+	if (state == STATE_CONNECTED)
+		LLFloaterCall::openInstance(mSessionID);
+	// By checking that current state is CONNECTED we make sure that the call window
+	// has been shown, hence there's something to hide. This helps when user presses
+	// the "End call" button right after initiating the call.
+	// *TODO: move this check to LLFloaterCall?
+	else if (state == STATE_HUNG_UP && mState == STATE_CONNECTED)
+		LLFloaterCall::closeInstance(mSessionID);
+}
 
 //static
 void LLVoiceChannel::initClass()
@@ -814,6 +826,9 @@ void LLVoiceChannelGroup::handleError(EStatusType status)
 
 void LLVoiceChannelGroup::setState(EState state)
 {
+	// HACK: Open/close the call window if needed.
+	toggleCallWindowIfNeeded(state);
+
 	switch(state)
 	{
 	case STATE_RINGING:
@@ -1056,6 +1071,9 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s
 
 void LLVoiceChannelP2P::setState(EState state)
 {
+	// HACK: Open/close the call window if needed.
+	toggleCallWindowIfNeeded(state);
+
 	// you only "answer" voice invites in p2p mode
 	// so provide a special purpose message here
 	if (mReceivedCall && state == STATE_RINGING)
@@ -1071,57 +1089,28 @@ void LLVoiceChannelP2P::setState(EState state)
 //
 // LLFloaterIMPanel
 //
-LLFloaterIMPanel::LLFloaterIMPanel(
-	const std::string& session_label,
-	const LLUUID& session_id,
-	const LLUUID& other_participant_id,
-	EInstantMessage dialog) :
-	LLFloater(session_label, LLRect(), session_label),
-	mInputEditor(NULL),
-	mHistoryEditor(NULL),
-	mSessionUUID(session_id),
-	mVoiceChannel(NULL),
-	mSessionInitialized(FALSE),
-	mSessionStartMsgPos(0),
-	mOtherParticipantUUID(other_participant_id),
-	mDialog(dialog),
-	mTyping(FALSE),
-	mOtherTyping(FALSE),
-	mTypingLineStartIndex(0),
-	mSentTypingState(TRUE),
-	mNumUnreadMessages(0),
-	mShowSpeakersOnConnect(TRUE),
-	mAutoConnect(FALSE),
-	mTextIMPossible(TRUE),
-	mProfileButtonEnabled(TRUE),
-	mCallBackEnabled(TRUE),
-	mSpeakers(NULL),
-	mSpeakerPanel(NULL),
-	mFirstKeystrokeTimer(),
-	mLastKeystrokeTimer()
-{
-	init(session_label);
-}
 
-LLFloaterIMPanel::LLFloaterIMPanel(
-	const std::string& session_label,
-	const LLUUID& session_id,
-	const LLUUID& other_participant_id,
-	const LLDynamicArray<LLUUID>& ids,
-	EInstantMessage dialog) :
-	LLFloater(session_label, LLRect(), session_label),
+LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,
+								   const LLUUID& session_id,
+								   const LLUUID& other_participant_id,
+								   const std::vector<LLUUID>& ids,
+								   EInstantMessage dialog)
+:	LLFloater(session_id),
 	mInputEditor(NULL),
 	mHistoryEditor(NULL),
 	mSessionUUID(session_id),
+	mSessionLabel(session_label),
 	mVoiceChannel(NULL),
 	mSessionInitialized(FALSE),
 	mSessionStartMsgPos(0),
 	mOtherParticipantUUID(other_participant_id),
 	mDialog(dialog),
+	mSessionInitialTargetIDs(ids),
 	mTyping(FALSE),
 	mOtherTyping(FALSE),
 	mTypingLineStartIndex(0),
 	mSentTypingState(TRUE),
+	mNumUnreadMessages(0),
 	mShowSpeakersOnConnect(TRUE),
 	mAutoConnect(FALSE),
 	mTextIMPossible(TRUE),
@@ -1132,15 +1121,6 @@ LLFloaterIMPanel::LLFloaterIMPanel(
 	mFirstKeystrokeTimer(),
 	mLastKeystrokeTimer()
 {
-	mSessionInitialTargetIDs = ids;
-	init(session_label);
-}
-
-
-void LLFloaterIMPanel::init(const std::string& session_label)
-{
-	mSessionLabel = session_label;
-
 	std::string xml_filename;
 	switch(mDialog)
 	{
@@ -1189,10 +1169,7 @@ void LLFloaterIMPanel::init(const std::string& session_label)
 
 	mSpeakers = new LLIMSpeakerMgr(mVoiceChannel);
 
-	LLUICtrlFactory::getInstance()->buildFloater(this,
-								xml_filename,
-								&getFactoryMap(),
-								FALSE);
+	LLUICtrlFactory::getInstance()->buildFloater(this, xml_filename, FALSE);
 
 	setTitle(mSessionLabel);
 	mInputEditor->setMaxTextLength(1023);
@@ -1230,7 +1207,7 @@ void LLFloaterIMPanel::init(const std::string& session_label)
 
 			addHistoryLine(
 				session_start,
-				gSavedSettings.getColor4("SystemChatColor"),
+				gSavedSkinSettings.getColor4("SystemChatColor"),
 				false);
 		}
 	}
@@ -1283,9 +1260,8 @@ BOOL LLFloaterIMPanel::postBuild()
 		mInputEditor = getChild<LLLineEditor>("chat_editor");
 		mInputEditor->setFocusReceivedCallback( onInputEditorFocusReceived, this );
 		mInputEditor->setFocusLostCallback( onInputEditorFocusLost, this );
-		mInputEditor->setKeystrokeCallback( onInputEditorKeystroke );
-		mInputEditor->setCommitCallback( onCommitChat );
-		mInputEditor->setCallbackUserData(this);
+		mInputEditor->setKeystrokeCallback( onInputEditorKeystroke, this );
+		mInputEditor->setCommitCallback( onCommitChat, this );
 		mInputEditor->setCommitOnFocusLost( FALSE );
 		mInputEditor->setRevertOnEsc( FALSE );
 		mInputEditor->setReplaceNewlinesWithSpaces( FALSE );
@@ -1479,7 +1455,7 @@ private:
 	LLUUID mSessionID;
 };
 
-BOOL LLFloaterIMPanel::inviteToSession(const LLDynamicArray<LLUUID>& ids)
+BOOL LLFloaterIMPanel::inviteToSession(const std::vector<LLUUID>& ids)
 {
 	LLViewerRegion* region = gAgent.getRegion();
 	if (!region)
@@ -1487,7 +1463,7 @@ BOOL LLFloaterIMPanel::inviteToSession(const LLDynamicArray<LLUUID>& ids)
 		return FALSE;
 	}
 	
-	S32 count = ids.count();
+	S32 count = ids.size();
 
 	if( isInviteAllowed() && (count > 0) )
 	{
@@ -1500,7 +1476,7 @@ BOOL LLFloaterIMPanel::inviteToSession(const LLDynamicArray<LLUUID>& ids)
 		data["params"] = LLSD::emptyArray();
 		for (int i = 0; i < count; i++)
 		{
-			data["params"].append(ids.get(i));
+			data["params"].append(ids[i]);
 		}
 
 		data["method"] = "invite";
@@ -1637,24 +1613,11 @@ BOOL LLFloaterIMPanel::handleKeyHere( KEY key, MASK mask )
 	{
 		sendMsg();
 		handled = TRUE;
-
-		// Close talk panels on hitting return
-		// but not shift-return or control-return
-		if ( !gSavedSettings.getBOOL("PinTalkViewOpen") && !(mask & MASK_CONTROL) && !(mask & MASK_SHIFT) )
-		{
-			gIMMgr->toggle(NULL);
-		}
 	}
 	else if ( KEY_ESCAPE == key )
 	{
 		handled = TRUE;
 		gFocusMgr.setKeyboardFocus(NULL);
-
-		// Close talk panel with escape
-		if( !gSavedSettings.getBOOL("PinTalkViewOpen") )
-		{
-			gIMMgr->toggle(NULL);
-		}
 	}
 
 	// May need to call base class LLPanel::handleKeyHere if not handled
@@ -1705,8 +1668,8 @@ BOOL LLFloaterIMPanel::dropCallingCard(LLInventoryItem* item, BOOL drop)
 	{
 		if(drop)
 		{
-			LLDynamicArray<LLUUID> ids;
-			ids.put(item->getCreatorUUID());
+			std::vector<LLUUID> ids;
+			ids.push_back(item->getCreatorUUID());
 			inviteToSession(ids);
 		}
 	}
@@ -1738,10 +1701,11 @@ BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop)
 		}
 		else if(drop)
 		{
-			LLDynamicArray<LLUUID> ids;
+			std::vector<LLUUID> ids;
+			ids.reserve(count);
 			for(S32 i = 0; i < count; ++i)
 			{
-				ids.put(items.get(i)->getCreatorUUID());
+				ids.push_back(items.get(i)->getCreatorUUID());
 			}
 			inviteToSession(ids);
 		}
@@ -1792,7 +1756,7 @@ void LLFloaterIMPanel::onClickClose( void* userdata )
 	LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
 	if(self)
 	{
-		self->close();
+		self->closeFloater();
 	}
 }
 
@@ -1887,6 +1851,9 @@ void LLFloaterIMPanel::onClose(bool app_quitting)
 	}
 	gIMMgr->removeSession(mSessionUUID);
 
+	// *HACK hide the voice floater
+	LLFloaterCall::toggleInstanceVisibility(FALSE, mSessionUUID);
+
 	destroy();
 }
 
@@ -1896,6 +1863,10 @@ void LLFloaterIMPanel::onVisibilityChange(BOOL new_visibility)
 	{
 		mNumUnreadMessages = 0;
 	}
+
+	LLFloaterCall::toggleInstanceVisibility(
+		new_visibility && mVoiceChannel->getState() == LLVoiceChannel::STATE_CONNECTED,
+		mSessionUUID);
 }
 
 void deliver_message(const std::string& utf8_text,
@@ -2015,7 +1986,7 @@ void LLFloaterIMPanel::sendMsg()
 
 					BOOL other_was_typing = mOtherTyping;
 
-					addHistoryLine(history_echo, gSavedSettings.getColor("IMChatColor"), true, gAgent.getID());
+					addHistoryLine(history_echo, gSavedSkinSettings.getColor("IMChatColor"), true, gAgent.getID());
 
 					if (other_was_typing) 
 					{
@@ -2186,7 +2157,7 @@ void LLFloaterIMPanel::addTypingIndicator(const std::string &name)
 		mTypingLineStartIndex = mHistoryEditor->getWText().length();
 		LLUIString typing_start = sTypingStartString;
 		typing_start.setArg("[NAME]", name);
-		addHistoryLine(typing_start, gSavedSettings.getColor4("SystemChatColor"), false);
+		addHistoryLine(typing_start, gSavedSkinSettings.getColor4("SystemChatColor"), false);
 		mOtherTypingName = name;
 		mOtherTyping = TRUE;
 	}
@@ -2224,14 +2195,14 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string
 		// add warning log enabled message
 		if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
 		{
-			message = LLFloaterChat::getInstance()->getString("IM_logging_string");
+			message = LLTrans::getString("IM_logging_string");
 		}
 		break;
 	case LLLogChat::LOG_END:
 		// add log end message
 		if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
 		{
-			message = LLFloaterChat::getInstance()->getString("IM_logging_string");
+			message = LLTrans::getString("IM_logging_string");
 		}
 		break;
 	case LLLogChat::LOG_LINE:
@@ -2243,7 +2214,7 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string
 	}
 
 	//self->addHistoryLine(line, LLColor4::grey, FALSE);
-	self->mHistoryEditor->appendColoredText(message, false, true, LLColor4::grey);
+	self->mHistoryEditor->appendColoredText(message, false, true, gSavedSkinSettings.getColor4("ChatHistoryTextColor"));
 }
 
 void LLFloaterIMPanel::showSessionStartError(
@@ -2325,7 +2296,7 @@ bool LLFloaterIMPanel::onConfirmForceCloseError(const LLSD& notification, const
 		LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(
 			session_id);
 
-		if ( floaterp ) floaterp->close(FALSE);
+		if ( floaterp ) floaterp->closeFloater(FALSE);
 	}
 	return false;
 }
diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h
index 8b3ca202c7..7cd19d4872 100644
--- a/indra/newview/llimpanel.h
+++ b/indra/newview/llimpanel.h
@@ -77,6 +77,7 @@ public:
 	virtual void getChannelInfo();
 	virtual BOOL isActive();
 	virtual BOOL callStarted();
+	const std::string& getSessionName() const { return mSessionName; }
 
 	const LLUUID getSessionID() { return mSessionID; }
 	EState getState() { return mState; }
@@ -94,6 +95,7 @@ public:
 
 protected:
 	virtual void setState(EState state);
+	void toggleCallWindowIfNeeded(EState state);
 	void setURI(std::string uri);
 
 	std::string	mURI;
@@ -185,11 +187,7 @@ public:
 	LLFloaterIMPanel(const std::string& session_label,
 					 const LLUUID& session_id,
 					 const LLUUID& target_id,
-					 EInstantMessage dialog);
-	LLFloaterIMPanel(const std::string& session_label,
-					 const LLUUID& session_id,
-					 const LLUUID& target_id,
-					 const LLDynamicArray<LLUUID>& ids,
+					 const std::vector<LLUUID>& ids,
 					 EInstantMessage dialog);
 	virtual ~LLFloaterIMPanel();
 
@@ -202,7 +200,7 @@ public:
 
 	// add target ids to the session. 
 	// Return TRUE if successful, otherwise FALSE.
-	BOOL inviteToSession(const LLDynamicArray<LLUUID>& agent_ids);
+	BOOL inviteToSession(const std::vector<LLUUID>& agent_ids);
 
 	void addHistoryLine(const std::string &utf8msg, 
 						const LLColor4& color = LLColor4::white, 
@@ -246,6 +244,7 @@ public:
 
 	const LLUUID& getSessionID() const { return mSessionUUID; }
 	const LLUUID& getOtherParticipantID() const { return mOtherParticipantUUID; }
+	LLIMSpeakerMgr* getSpeakerManager() const { return mSpeakers; }
 	void updateSpeakersList(const LLSD& speaker_updates);
 	void processSessionUpdate(const LLSD& update);
 	void setSpeakers(const LLSD& speaker_list);
@@ -270,9 +269,6 @@ public:
 	static bool onConfirmForceCloseError(const LLSD& notification, const LLSD& response);
 
 private:
-	// called by constructors
-	void init(const std::string& session_label);
-
 	// Called by UI methods.
 	void sendMsg();
 
@@ -318,7 +314,7 @@ private:
 	//   inventory folder ==> first target id in list
 	//   911 ==> sender
 	LLUUID mOtherParticipantUUID;
-	LLDynamicArray<LLUUID> mSessionInitialTargetIDs;
+	std::vector<LLUUID> mSessionInitialTargetIDs;
 
 	EInstantMessage mDialog;
 
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index a90ea39265..26ce5c5ac4 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -34,6 +34,7 @@
 
 #include "llimview.h"
 
+#include "llfloaterreg.h"
 #include "llfontgl.h"
 #include "llrect.h"
 #include "llerror.h"
@@ -44,12 +45,12 @@
 #include "lluictrlfactory.h"
 
 #include "llagent.h"
+#include "llavatariconctrl.h"
 #include "llcallingcard.h"
 #include "llchat.h"
 #include "llresmgr.h"
 #include "llfloaterchat.h"
 #include "llfloaterchatterbox.h"
-#include "llfloaternewim.h"
 #include "llhttpnode.h"
 #include "llimpanel.h"
 #include "llresizebar.h"
@@ -67,6 +68,8 @@
 #include "llviewerwindow.h"
 #include "llnotify.h"
 #include "llviewerregion.h"
+#include "llviewertexteditor.h"
+#include "lltrans.h"
 
 #include "llfirstuse.h"
 
@@ -145,11 +148,11 @@ public:
 					floaterp->requestAutoConnect();
 					LLFloaterIMPanel::onClickStartCall(floaterp);
 					// always open IM window when connecting to voice
-					LLFloaterChatterBox::showInstance(TRUE);
+					LLFloaterReg::showInstance("communicate", LLSD(), TRUE);
 				}
 				else if ( mInvitiationType == LLIMMgr::INVITATION_TYPE_IMMEDIATE )
 				{
-					LLFloaterChatterBox::showInstance(TRUE);
+					LLFloaterReg::showInstance("communicate", LLSD(), TRUE);
 				}
 			}
 
@@ -234,7 +237,8 @@ LLUUID LLIMMgr::computeSessionID(
 // LLFloaterIM
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-LLFloaterIM::LLFloaterIM() 
+LLFloaterIM::LLFloaterIM()
+	: LLMultiFloater()
 {
 	// autoresize=false is necessary to avoid resizing of the IM window whenever 
 	// a session is opened or closed (it would otherwise resize the window to match
@@ -324,6 +328,168 @@ BOOL LLFloaterIM::postBuild()
 	return TRUE;
 }
 
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLIncomingCallDialog
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) :
+	LLModalDialog(LLStringUtil::null, 240, 200),
+	mPayload(payload)
+{
+	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_incoming_call.xml");
+}
+
+BOOL LLIncomingCallDialog::postBuild()
+{
+	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() + " ";
+	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");
+	}
+
+	LLViewerTextEditor* text = getChild<LLViewerTextEditor>("caller name");
+	text->setEmbeddedText(caller_name + call_type);
+	LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon");
+	icon->setValue(caller_id);
+
+	childSetAction("Accept", onAccept, this);
+	childSetAction("Reject", onReject, this);
+	childSetAction("Start IM", onStartIM, this);
+	childSetFocus("Accept");
+
+	return TRUE;
+}
+
+//static
+void LLIncomingCallDialog::onAccept(void* user_data)
+{
+	LLIncomingCallDialog* self = (LLIncomingCallDialog*)user_data;
+	self->processCallResponse(0);
+	self->closeFloater();
+}
+
+//static
+void LLIncomingCallDialog::onReject(void* user_data)
+{
+	LLIncomingCallDialog* self = (LLIncomingCallDialog*)user_data;
+	self->processCallResponse(1);
+	self->closeFloater();
+}
+
+//static
+void LLIncomingCallDialog::onStartIM(void* user_data)
+{
+	LLIncomingCallDialog* self = (LLIncomingCallDialog*)user_data;
+	self->processCallResponse(2);
+	self->closeFloater();
+}
+
+void LLIncomingCallDialog::processCallResponse(S32 response)
+{
+	LLUUID session_id = mPayload["session_id"].asUUID();
+	EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger();
+	LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)mPayload["inv_type"].asInteger();
+	bool voice = true;
+	switch(response)
+	{
+	case 2: // start IM: just don't start the voice chat
+	{
+		voice = false;
+		/* FALLTHROUGH */
+	}
+	case 0: // accept
+	{
+		if (type == IM_SESSION_P2P_INVITE)
+		{
+			// create a normal IM session
+			session_id = gIMMgr->addP2PSession(
+				mPayload["session_name"].asString(),
+				mPayload["caller_id"].asUUID(),
+				mPayload["session_handle"].asString());
+
+			if (voice)
+			{
+				LLFloaterIMPanel* im_floater =
+					gIMMgr->findFloaterBySession(
+						session_id);
+
+				if (im_floater)
+				{
+					im_floater->requestAutoConnect();
+					LLFloaterIMPanel::onClickStartCall(im_floater);		
+				}
+			}
+
+			// always open IM window when connecting to voice
+			LLFloaterReg::showInstance("communicate", session_id);
+
+			gIMMgr->clearPendingAgentListUpdates(session_id);
+			gIMMgr->clearPendingInvitation(session_id);
+		}
+		else
+		{
+			gIMMgr->addSession(
+				mPayload["session_name"].asString(),
+				type,
+				session_id);
+
+			std::string url = gAgent.getRegion()->getCapability(
+				"ChatSessionRequest");
+
+			if (voice)
+			{
+				LLSD data;
+				data["method"] = "accept invitation";
+				data["session-id"] = session_id;
+				LLHTTPClient::post(
+					url,
+					data,
+					new LLViewerChatterBoxInvitationAcceptResponder(
+						session_id,
+						inv_type));
+			}
+		}
+		if (voice)
+		{
+			break;
+		}
+	}
+	case 1: // decline
+	{
+		if (type == IM_SESSION_P2P_INVITE)
+		{
+			if(gVoiceClient)
+			{
+				std::string s = mPayload["session_handle"].asString();
+				gVoiceClient->declineInvite(s);
+			}
+		}
+		else
+		{
+			std::string url = gAgent.getRegion()->getCapability(
+				"ChatSessionRequest");
+
+			LLSD data;
+			data["method"] = "decline invitation";
+			data["session-id"] = session_id;
+			LLHTTPClient::post(
+				url,
+				data,
+				NULL);
+		}
+	}
+
+	gIMMgr->clearPendingAgentListUpdates(session_id);
+	gIMMgr->clearPendingInvitation(session_id);
+	}
+}
+
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLIMViewFriendObserver
 //
@@ -375,7 +541,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)
 					im_floater->requestAutoConnect();
 					LLFloaterIMPanel::onClickStartCall(im_floater);
 					// always open IM window when connecting to voice
-					LLFloaterChatterBox::showInstance(session_id);
+					LLFloaterReg::showInstance("communicate", session_id, TRUE);
 				}
 
 				gIMMgr->clearPendingAgentListUpdates(session_id);
@@ -467,54 +633,6 @@ EInstantMessage LLIMMgr::defaultIMTypeForAgent(const LLUUID& agent_id)
 	return type;
 }
 
-// static
-//void LLIMMgr::onPinButton(void*)
-//{
-//	BOOL state = gSavedSettings.getBOOL( "PinTalkViewOpen" );
-//	gSavedSettings.setBOOL( "PinTalkViewOpen", !state );
-//}
-
-// static 
-void LLIMMgr::toggle(void*)
-{
-	static BOOL return_to_mouselook = FALSE;
-
-	// Hide the button and show the floater or vice versa.
-	llassert( gIMMgr );
-	BOOL old_state = gIMMgr->getFloaterOpen();
-	
-	// If we're in mouselook and we triggered the Talk View, we want to talk.
-	if( gAgent.cameraMouselook() && old_state )
-	{
-		return_to_mouselook = TRUE;
-		gAgent.changeCameraToDefault();
-		return;
-	}
-
-	BOOL new_state = !old_state;
-
-	if (new_state)
-	{
-		// ...making visible
-		if ( gAgent.cameraMouselook() )
-		{
-			return_to_mouselook = TRUE;
-			gAgent.changeCameraToDefault();
-		}
-	}
-	else
-	{
-		// ...hiding
-		if ( gAgent.cameraThirdPerson() && return_to_mouselook )
-		{
-			gAgent.changeCameraToMouselook();
-		}
-		return_to_mouselook = FALSE;
-	}
-
-	gIMMgr->setFloaterOpen( new_state );
-}
-
 //
 // Member Functions
 //
@@ -614,10 +732,10 @@ void LLIMMgr::addMessage(
 		{
 			// *TODO:translate (low priority, god ability)
 			std::ostringstream bonus_info;
-			bonus_info << "*** parent estate: "
+			bonus_info << LLTrans::getString("***")+ " "+ LLTrans::getString("IMParentEstate") + ":" + " "
 				<< parent_estate_id
-				<< ((parent_estate_id == 1) ? ", mainland" : "")
-				<< ((parent_estate_id == 5) ? ", teen" : "");
+			<< ((parent_estate_id == 1) ? "," + LLTrans::getString("IMMainland") : "")
+				<< ((parent_estate_id == 5) ? "," + LLTrans::getString ("IMTeen") : "");
 
 			// once we have web-services (or something) which returns
 			// information about a region id, we can print this out
@@ -625,7 +743,7 @@ void LLIMMgr::addMessage(
 			//<< "*** region_id: " << region_id << std::endl
 			//<< "*** position: " << position << std::endl;
 
-			floater->addHistoryLine(bonus_info.str(), gSavedSettings.getColor4("SystemChatColor"));
+			floater->addHistoryLine(bonus_info.str(), gSavedSkinSettings.getColor4("SystemChatColor"));
 		}
 
 		make_ui_sound("UISndNewIncomingIMSession");
@@ -634,8 +752,8 @@ void LLIMMgr::addMessage(
 	// now add message to floater
 	bool is_from_system = target_id.isNull() || (from == SYSTEM_FROM);
 	const LLColor4& color = ( is_from_system ? 
-							  gSavedSettings.getColor4("SystemChatColor") : 
-							  gSavedSettings.getColor("IMChatColor"));
+							  gSavedSkinSettings.getColor4("SystemChatColor") : 
+							  gSavedSkinSettings.getColor("IMChatColor"));
 	if ( !link_name )
 	{
 		floater->addHistoryLine(msg,color); // No name to prepend, so just add the message normally
@@ -645,10 +763,10 @@ void LLIMMgr::addMessage(
 		floater->addHistoryLine(msg, color, true, other_participant_id, from); // Insert linked name to front of message
 	}
 
-	LLFloaterChatterBox* chat_floater = LLFloaterChatterBox::getInstance(LLSD());
-
-	if( !chat_floater->getVisible() && !floater->getVisible())
+	if( !LLFloaterReg::instanceVisible("communicate") && !floater->getVisible())
 	{
+		LLFloaterChatterBox* chat_floater = LLFloaterChatterBox::getInstance();
+		
 		//if the IM window is not open and the floater is not visible (i.e. not torn off)
 		LLFloater* previouslyActiveFloater = chat_floater->getActiveFloater();
 
@@ -675,14 +793,12 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess
 	// null session id means near me (chat history)
 	if (session_id.isNull())
 	{
-		LLFloaterChat* floaterp = LLFloaterChat::getInstance();
-
-		message = floaterp->getString(message_name);
+		message = LLTrans::getString(message_name);
 		message.setArgs(args);
 
 		LLChat chat(message);
 		chat.mSourceType = CHAT_SOURCE_SYSTEM;
-		LLFloaterChat::getInstance()->addChatHistory(chat);
+		LLFloaterChat::addChatHistory(chat);
 	}
 	else // going to IM session
 	{
@@ -699,7 +815,7 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess
 
 void LLIMMgr::notifyNewIM()
 {
-	if(!gIMMgr->getFloaterOpen())
+	if(!LLFloaterReg::instanceVisible("communicate"))
 	{
 		mIMReceived = TRUE;
 	}
@@ -767,18 +883,17 @@ LLUUID LLIMMgr::addSession(
 			TRUE);
 
 		noteOfflineUsers(floater, ids);
-		LLFloaterChatterBox::showInstance(session_id);
+		LLFloaterReg::showInstance("communicate", session_id);
 
 		// Only warn for regular IMs - not group IMs
 		if( dialog == IM_NOTHING_SPECIAL )
 		{
 			noteMutedUsers(floater, ids);
 		}
-		LLFloaterChatterBox::getInstance(LLSD())->showFloater(floater);
 	}
 	else
 	{
-		floater->open();
+		floater->openFloater();
 	}
 	//mTabContainer->selectTabPanel(panel);
 	floater->setInputFocus(TRUE);
@@ -818,7 +933,7 @@ LLUUID LLIMMgr::addSession(
 		if ( !floater ) return LLUUID::null;
 
 		noteOfflineUsers(floater, ids);
-		LLFloaterChatterBox::showInstance(session_id);
+		LLFloaterReg::showInstance("communicate", session_id);
 
 		// Only warn for regular IMs - not group IMs
 		if( dialog == IM_NOTHING_SPECIAL )
@@ -828,7 +943,7 @@ LLUUID LLIMMgr::addSession(
 	}
 	else
 	{
-		floater->open();
+		floater->openFloater();
 	}
 	//mTabContainer->selectTabPanel(panel);
 	floater->setInputFocus(TRUE);
@@ -843,7 +958,7 @@ void LLIMMgr::removeSession(const LLUUID& session_id)
 	if(floater)
 	{
 		mFloaters.erase(floater->getHandle());
-		LLFloaterChatterBox::getInstance(LLSD())->removeFloater(floater);
+		LLFloaterChatterBox::getInstance()->removeFloater(floater);
 		//mTabContainer->removeTabPanel(floater);
 
 		clearPendingInvitation(session_id);
@@ -932,65 +1047,60 @@ void LLIMMgr::inviteToSession(
 	{
 		if (caller_name.empty())
 		{
-			gCacheName->getName(caller_id, onInviteNameLookup, new LLSD(payload));
+			gCacheName->get(caller_id, FALSE, boost::bind(&LLIMMgr::onInviteNameLookup, payload, _1, _2, _3, _4));
 		}
 		else
 		{
-			LLSD args;
-			args["NAME"] = caller_name;
-			args["GROUP"] = session_name;
-
-			LLNotifications::instance().add(notify_box_type, 
-					     args, 
-						 payload,
-						 &inviteUserResponse);
-
+			if (notify_box_type == "VoiceInviteP2P" || notify_box_type == "VoiceInviteAdHoc")
+			{
+				LLIncomingCallDialog *dialog = new LLIncomingCallDialog(payload);
+				dialog->startModal();
+			}
+			else
+			{
+				LLSD args;
+				args["NAME"] = caller_name;
+				args["GROUP"] = session_name;
+
+				LLNotifications::instance().add(notify_box_type, 
+						args, 
+							payload,
+							&inviteUserResponse);
+			}
 		}
 		mPendingInvitations[session_id.asString()] = LLSD();
 	}
 }
 
-//static 
-void LLIMMgr::onInviteNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* userdata)
+void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group)
 {
-	LLSD payload = *(LLSD*)userdata;
-	delete (LLSD*)userdata;
-
 	payload["caller_name"] = first + " " + last;
 	payload["session_name"] = payload["caller_name"].asString();
 
-	LLSD args;
-	args["NAME"] = payload["caller_name"].asString();
-
-	LLNotifications::instance().add(
-		payload["notify_box_type"].asString(),
-		args, 
-		payload,
-		&inviteUserResponse);
-}
-
-void LLIMMgr::refresh()
-{
-}
+	std::string notify_box_type = payload["notify_box_type"].asString();
 
-void LLIMMgr::setFloaterOpen(BOOL set_open)
-{
-	if (set_open)
+	if (notify_box_type == "VoiceInviteP2P" || notify_box_type == "VoiceInviteAdHoc")
 	{
-		LLFloaterChatterBox::showInstance();
+		LLIncomingCallDialog *dialog = new LLIncomingCallDialog(payload);
+		dialog->startModal();
 	}
 	else
 	{
-		LLFloaterChatterBox::hideInstance();
+		LLSD args;
+		args["NAME"] = payload["caller_name"].asString();
+	
+		LLNotifications::instance().add(
+			payload["notify_box_type"].asString(),
+			args, 
+			payload,
+			&inviteUserResponse);
 	}
 }
 
-
-BOOL LLIMMgr::getFloaterOpen()
+void LLIMMgr::refresh()
 {
-	return LLFloaterChatterBox::instanceVisible(LLSD());
 }
- 
+
 void LLIMMgr::disconnectAllSessions()
 {
 	LLFloaterIMPanel* floater = NULL;
@@ -1007,7 +1117,7 @@ void LLIMMgr::disconnectAllSessions()
 		if (floater)
 		{
 			floater->setEnabled(FALSE);
-			floater->close(TRUE);
+			floater->closeFloater(TRUE);
 		}
 	}
 }
@@ -1146,12 +1256,14 @@ LLFloaterIMPanel* LLIMMgr::createFloater(
 
 	llinfos << "LLIMMgr::createFloater: from " << other_participant_id 
 			<< " in session " << session_id << llendl;
+	std::vector<LLUUID> ids;
 	LLFloaterIMPanel* floater = new LLFloaterIMPanel(session_label,
 													 session_id,
 													 other_participant_id,
+													 ids,
 													 dialog);
 	LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END;
-	LLFloaterChatterBox::getInstance(LLSD())->addFloater(floater, FALSE, i_pt);
+	LLFloaterChatterBox::getInstance()->addFloater(floater, FALSE, i_pt);
 	mFloaters.insert(floater->getHandle());
 	return floater;
 }
@@ -1177,7 +1289,7 @@ LLFloaterIMPanel* LLIMMgr::createFloater(
 													 ids,
 													 dialog);
 	LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END;
-	LLFloaterChatterBox::getInstance(LLSD())->addFloater(floater, FALSE, i_pt);
+	LLFloaterChatterBox::getInstance()->addFloater(floater, FALSE, i_pt);
 	mFloaters.insert(floater->getHandle());
 	return floater;
 }
@@ -1189,7 +1301,7 @@ void LLIMMgr::noteOfflineUsers(
 	S32 count = ids.count();
 	if(count == 0)
 	{
-		floater->addHistoryLine(sOnlyUserMessage, gSavedSettings.getColor4("SystemChatColor"));
+		floater->addHistoryLine(sOnlyUserMessage, gSavedSkinSettings.getColor4("SystemChatColor"));
 	}
 	else
 	{
@@ -1205,7 +1317,7 @@ void LLIMMgr::noteOfflineUsers(
 				LLUIString offline = sOfflineMessage;
 				offline.setArg("[FIRST]", first);
 				offline.setArg("[LAST]", last);
-				floater->addHistoryLine(offline, gSavedSettings.getColor4("SystemChatColor"));
+				floater->addHistoryLine(offline, gSavedSkinSettings.getColor4("SystemChatColor"));
 			}
 		}
 	}
@@ -1267,11 +1379,6 @@ void LLIMMgr::updateFloaterSessionID(
 	}
 }
 
-LLFloaterChatterBox* LLIMMgr::getFloater()
-{ 
-	return LLFloaterChatterBox::getInstance(LLSD()); 
-}
-
 class LLViewerChatterBoxSessionStartReply : public LLHTTPNode
 {
 public:
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index a4e419694d..38a57a4025 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -33,9 +33,10 @@
 #ifndef LL_LLIMVIEW_H
 #define LL_LLIMVIEW_H
 
-#include "llfloater.h"
+#include "llmodaldialog.h"
 #include "llinstantmessage.h"
 #include "lluuid.h"
+#include "llmultifloater.h"
 
 class LLFloaterChatterBox;
 class LLUUID;
@@ -134,19 +135,12 @@ public:
 	// IM received that you haven't seen yet
 	BOOL getIMReceived() const;
 
-	void		setFloaterOpen(BOOL open);		/*Flawfinder: ignore*/
-	BOOL		getFloaterOpen();
-
-	LLFloaterChatterBox* getFloater();
-
 	// This method is used to go through all active sessions and
 	// disable all of them. This method is usally called when you are
 	// forced to log out or similar situations where you do not have a
 	// good connection.
 	void disconnectAllSessions();
 
-	static void	toggle(void*);
-
 	// This is a helper function to determine what kind of im session
 	// should be used for the given agent.
 	static EInstantMessage defaultIMTypeForAgent(const LLUUID& agent_id);
@@ -198,7 +192,7 @@ private:
 
 	void processIMTypingCore(const LLIMInfo* im_info, BOOL typing);
 
-	static void onInviteNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* userdata);
+	static void onInviteNameLookup(LLSD payload, const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group);
 
 private:
 	std::set<LLHandle<LLFloater> > mFloaters;
@@ -223,6 +217,23 @@ public:
 	static std::map<std::string,std::string> sForceCloseSessionMap;
 };
 
+class LLIncomingCallDialog : public LLModalDialog
+{
+public:
+	LLIncomingCallDialog(const LLSD& payload);
+
+	/*virtual*/ BOOL postBuild();
+
+	static void onAccept(void* user_data);
+	static void onReject(void* user_data);
+	static void onStartIM(void* user_data);
+
+private:
+	void processCallResponse(S32 response);
+
+	LLSD mPayload;
+};
+
 // Globals
 extern LLIMMgr *gIMMgr;
 
diff --git a/indra/newview/llinventoryactions.h b/indra/newview/llinventoryactions.h
new file mode 100644
index 0000000000..79247e3abb
--- /dev/null
+++ b/indra/newview/llinventoryactions.h
@@ -0,0 +1,47 @@
+/** 
+ * @file llinventoryactions.h
+ * @brief inventory callback functions
+ * class definition
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLINVENTORYACTIONS_H
+#define LL_LLINVENTORYACTIONS_H
+
+#include "lluictrl.h"
+
+class LLPanelInventory;
+class LLInventoryView;
+class LLInventoryPanel;
+
+void init_object_inventory_panel_actions(LLPanelInventory *panel, LLUICtrl::CommitCallbackRegistry::Registrar& registrar);
+void init_inventory_actions(LLInventoryView *floater, LLUICtrl::CommitCallbackRegistry::Registrar& registrar);
+void init_inventory_panel_actions(LLInventoryPanel *panel, LLUICtrl::CommitCallbackRegistry::Registrar& registrar);
+
+#endif // LL_LLINVENTORYACTIONS_H
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 2697ef25f9..fe8d1c4844 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -42,6 +42,7 @@
 #include "llagent.h"
 #include "llcallingcard.h"
 #include "llcheckboxctrl.h"		// for radio buttons
+#include "llfloaterreg.h"
 #include "llradiogroup.h"
 #include "llspinctrl.h"
 #include "lltextbox.h"
@@ -86,6 +87,7 @@
 #include "lluictrlfactory.h"
 #include "llselectmgr.h"
 #include "llfloateropenobject.h"
+#include "lltrans.h"
 
 // Helpers
 // bug in busy count inc/dec right now, logic is complex... do we really need it?
@@ -105,11 +107,11 @@ void dec_busy_count()
 // Function declarations
 struct LLWearableHoldingPattern;
 void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL append);
-void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata);
+void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOOL append);
 void wear_inventory_category_on_avatar_loop(LLWearable* wearable, void*);
 void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, BOOL append);
 void remove_inventory_category_from_avatar(LLInventoryCategory* category);
-void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata);
+void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id);
 bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*);
 bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& response);
 
@@ -147,12 +149,6 @@ std::string ICON_NAME[ICON_NAME_COUNT] =
 	"inv_item_gesture.tga",
 };
 
-struct LLWearInfo
-{
-	LLUUID	mCategoryID;
-	BOOL	mAppend;
-};
-
 BOOL gAddToOutfit = FALSE;
 
 // +=================================================+
@@ -190,7 +186,7 @@ time_t LLInvFVBridge::getCreationDate() const
 // Can be destoryed (or moved to trash)
 BOOL LLInvFVBridge::isItemRemovable()
 {
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return FALSE;
 	if(model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID()))
 	{
@@ -208,14 +204,14 @@ BOOL LLInvFVBridge::isItemMovable()
 // *TODO: make sure this does the right thing
 void LLInvFVBridge::showProperties()
 {
-	LLShowProps::showProperties(mUUID);
+	LLFloaterProperties::show(mUUID);
 }
 
 void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch)
 {
 	// Deactivate gestures when moving them into Trash
 	LLInvFVBridge* bridge;
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	LLViewerInventoryItem* item = NULL;
 	LLViewerInventoryCategory* cat = NULL;
 	LLInventoryModel::cat_array_t	descendent_categories;
@@ -263,7 +259,7 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
 	// we call LLInventoryModel::moveObject() to move everything
 	// around.
 	LLInvFVBridge* bridge;
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return;
 	LLMessageSystem* msg = gMessageSystem;
 	LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
@@ -367,7 +363,7 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
 
 BOOL LLInvFVBridge::isClipboardPasteable() const
 {
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return FALSE;
 	BOOL is_agent_inventory = model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID());
 
@@ -427,7 +423,6 @@ void hideContextEntries(LLMenuGL& menu,
 void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector<std::string> &items, 
 		std::vector<std::string> &disabled_items, U32 flags)
 {
-	// *TODO: Translate	
 	items.push_back(std::string("Rename"));
 	if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
 	{
@@ -469,18 +464,17 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector<std::str
 
 void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 {
-	// *TODO: Translate
 	lldebugs << "LLInvFVBridge::buildContextMenu()" << llendl;
 	std::vector<std::string> items;
 	std::vector<std::string> disabled_items;
 	if(isInTrash())
 	{
-		items.push_back(std::string("Purge Item"));
+		items.push_back(std::string("PurgeItem"));
 		if (!isItemRemovable())
 		{
-			disabled_items.push_back(std::string("Purge Item"));
+			disabled_items.push_back(std::string("PurgeItem"));
 		}
-		items.push_back(std::string("Restore Item"));
+		items.push_back(std::string("RestoreItem"));
 	}
 	else
 	{
@@ -524,7 +518,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
 LLInventoryObject* LLInvFVBridge::getInventoryObject() const
 {
 	LLInventoryObject* obj = NULL;
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(model)
 	{
 		obj = (LLInventoryObject*)model->getObject(mUUID);
@@ -532,9 +526,15 @@ LLInventoryObject* LLInvFVBridge::getInventoryObject() const
 	return obj;
 }
 
+LLInventoryModel* LLInvFVBridge::getInventoryModel() const
+{
+	LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+	return panel ? panel->getModel() : NULL;
+}
+
 BOOL LLInvFVBridge::isInTrash() const
 {
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return FALSE;
 	LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
 	return model->isObjectDescendentOf(mUUID, trash_id);
@@ -542,7 +542,7 @@ BOOL LLInvFVBridge::isInTrash() const
 
 BOOL LLInvFVBridge::isAgentInventory() const
 {
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return FALSE;
 	if(gAgent.getInventoryRootID() == mUUID) return TRUE;
 	return model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID());
@@ -713,6 +713,10 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
 	case LLAssetType::AT_ROOT_CATEGORY:
 		new_listener = new LLFolderBridge(inventory, uuid);
 		break;
+
+	case LLAssetType::AT_FAVORITE:
+		new_listener = new LLFolderBridge(inventory, uuid);
+		break;
 		
 	default:
 		llinfos << "Unhandled asset type (llassetstorage.h): "
@@ -809,7 +813,7 @@ void LLItemBridge::restoreItem()
 	LLViewerInventoryItem* item = (LLViewerInventoryItem*)getItem();
 	if(item)
 	{
-		LLInventoryModel* model = mInventoryPanel->getModel();
+		LLInventoryModel* model = getInventoryModel();
 		LLUUID new_parent = model->findCategoryUUIDForType(item->getType());
 		// do not restamp on restore.
 		LLInvFVBridge::changeItemParent(model, item, new_parent, FALSE);
@@ -916,11 +920,11 @@ std::string LLItemBridge::getLabelSuffix() const
 			BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
 			BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
 																gAgent.getID());
-			// *TODO: Translate
+
 			const char* EMPTY = "";
-			const char* NO_COPY = " (no copy)";
-			const char* NO_MOD = " (no modify)";
-			const char* NO_XFER = " (no transfer)";
+			const char* NO_COPY =LLTrans::getString("NO_COPY").c_str();
+			const char* NO_MOD = LLTrans::getString("NO_MOD").c_str();
+			const char* NO_XFER = LLTrans::getString("NO_XFER").c_str();
 			const char* scopy;
 			if(copy) scopy = EMPTY;
 			else scopy = NO_COPY;
@@ -959,10 +963,12 @@ BOOL LLItemBridge::isItemRenameable() const
 
 BOOL LLItemBridge::renameItem(const std::string& new_name)
 {
-	if(!isItemRenameable()) return FALSE;
-	LLPreview::rename(mUUID, getPrefix() + new_name);
-	LLInventoryModel* model = mInventoryPanel->getModel();
-	if(!model) return FALSE;
+	if(!isItemRenameable())
+		return FALSE;
+	LLPreview::dirty(mUUID);
+	LLInventoryModel* model = getInventoryModel();
+	if(!model)
+		return FALSE;
 	LLViewerInventoryItem* item = getItem();
 	if(item && (item->getName() != new_name))
 	{
@@ -987,7 +993,7 @@ BOOL LLItemBridge::removeItem()
 	}
 	// move it to the trash
 	LLPreview::hide(mUUID, TRUE);
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return FALSE;
 	LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
 	LLViewerInventoryItem* item = getItem();
@@ -1042,7 +1048,7 @@ BOOL LLItemBridge::copyToClipboard() const
 LLViewerInventoryItem* LLItemBridge::getItem() const
 {
 	LLViewerInventoryItem* item = NULL;
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(model)
 	{
 		item = (LLViewerInventoryItem*)model->getItem(mUUID);
@@ -1089,7 +1095,7 @@ void LLFolderBridge::selectItem()
 // Can be destroyed (or moved to trash)
 BOOL LLFolderBridge::isItemRemovable()
 {
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) 
 	{
 		return FALSE;
@@ -1157,7 +1163,7 @@ BOOL LLFolderBridge::isItemRemovable()
 
 BOOL LLFolderBridge::isUpToDate() const
 {
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return FALSE;
 	LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID);
 	if( !category )
@@ -1175,7 +1181,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
 	// the UI will get confused and pass in a NULL.
 	if(!inv_cat) return FALSE;
 
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return FALSE;
 
 	LLVOAvatar* avatar = gAgent.getAvatarObject();
@@ -1392,7 +1398,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
 		else
 		{
 			LLNotification::Params params("MoveInventoryFromObject");
-			params.functor(boost::bind(move_task_inventory_callback, _1, _2, move_inv));
+			params.functor.function(boost::bind(move_task_inventory_callback, _1, _2, move_inv));
 			LLNotifications::instance().forceResponse(params, 0);
 		}
 	}
@@ -1624,7 +1630,7 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
 	}
 	else if ("removefromoutfit" == action)
 	{
-		LLInventoryModel* model = mInventoryPanel->getModel();
+		LLInventoryModel* model = getInventoryModel();
 		if(!model) return;
 		LLViewerInventoryCategory* cat = getCategory();
 		if(!cat) return;
@@ -1655,7 +1661,7 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
 void LLFolderBridge::openItem()
 {
 	lldebugs << "LLFolderBridge::openItem()" << llendl;
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return;
 	model->fetchDescendentsOf(mUUID);
 }
@@ -1677,13 +1683,25 @@ void LLFolderBridge::restoreItem()
 	cat = (LLViewerInventoryCategory*)getCategory();
 	if(cat)
 	{
-		LLInventoryModel* model = mInventoryPanel->getModel();
+		LLInventoryModel* model = getInventoryModel();
 		LLUUID new_parent = model->findCategoryUUIDForType(cat->getType());
 		// do not restamp children on restore
 		LLInvFVBridge::changeCategoryParent(model, cat, new_parent, FALSE);
 	}
 }
 
+LLAssetType::EType LLFolderBridge::getPreferredType() const
+{
+	LLAssetType::EType preferred_type = LLAssetType::AT_NONE;
+	LLViewerInventoryCategory* cat = getCategory();
+	if(cat)
+	{
+		preferred_type = cat->getPreferredType();
+	}
+
+	return preferred_type;
+}
+
 // Icons for folders are based on the preferred type
 LLUIImagePtr LLFolderBridge::getIcon() const
 {
@@ -1742,6 +1760,10 @@ LLUIImagePtr LLFolderBridge::getIcon() const
 	case LLAssetType::AT_GESTURE:
 		control = "inv_folder_gesture.tga";
 		break;
+	case LLAssetType::AT_FAVORITE:
+		//TODO - need icon
+		control = "inv_folder_plain_closed.tga";
+		break;
 	default:
 		control = "inv_folder_plain_closed.tga";
 		break;
@@ -1751,9 +1773,11 @@ LLUIImagePtr LLFolderBridge::getIcon() const
 
 BOOL LLFolderBridge::renameItem(const std::string& new_name)
 {
-	if(!isItemRenameable()) return FALSE;
-	LLInventoryModel* model = mInventoryPanel->getModel();
-	if(!model) return FALSE;
+	if(!isItemRenameable())
+		return FALSE;
+	LLInventoryModel* model = getInventoryModel();
+	if(!model)
+		return FALSE;
 	LLViewerInventoryCategory* cat = getCategory();
 	if(cat && (cat->getName() != new_name))
 	{
@@ -1776,7 +1800,7 @@ BOOL LLFolderBridge::removeItem()
 	}
 	// move it to the trash
 	LLPreview::hide(mUUID);
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return FALSE;
 
 	LLUUID trash_id;
@@ -1820,7 +1844,7 @@ BOOL LLFolderBridge::isClipboardPasteable() const
 
 void LLFolderBridge::pasteFromClipboard()
 {
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(model && isClipboardPasteable())
 	{
 		LLInventoryItem* item = NULL;
@@ -1855,9 +1879,7 @@ void LLFolderBridge::folderOptionsMenu()
 {
 	std::vector<std::string> disabled_items;
 
-	// *TODO: Translate
-	
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return;
 
 	const LLInventoryCategory* category = model->getCategory(mUUID);
@@ -1917,10 +1939,9 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv
 // Flags unused
 void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 {
-	// *TODO: Translate
 	lldebugs << "LLFolderBridge::buildContextMenu()" << llendl;
 //	std::vector<std::string> disabled_items;
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return;
 	LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
 	LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND);
@@ -1950,31 +1971,6 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else if(isAgentInventory()) // do not allow creating in library
 	{
-			// only mature accounts can create undershirts/underwear
-			/*if (!gAgent.isTeen())
-			{
-				sub_menu->append(new LLMenuItemCallGL("New Undershirt",
-													&createNewUndershirt,
-													NULL,
-													(void*)this));
-				sub_menu->append(new LLMenuItemCallGL("New Underpants",
-													&createNewUnderpants,
-													NULL,
-													(void*)this));
-			}*/
-
-/*		BOOL contains_calling_cards = FALSE;
-		LLInventoryModel::cat_array_t cat_array;
-		LLInventoryModel::item_array_t item_array;
-
-		LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD);
-		model->collectDescendentsIf(mUUID,
-									cat_array,
-									item_array,
-									LLInventoryModel::EXCLUDE_TRASH,
-									is_callingcard);
-		if(item_array.count() > 0) contains_calling_cards = TRUE;
-*/
 		mItems.push_back(std::string("New Folder"));
 		mItems.push_back(std::string("New Script"));
 		mItems.push_back(std::string("New Note"));
@@ -2035,7 +2031,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 
 BOOL LLFolderBridge::hasChildren() const
 {
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return FALSE;
 	LLInventoryModel::EHasChildren has_children;
 	has_children = gInventory.categoryHasChildren(mUUID);
@@ -2077,7 +2073,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
 LLViewerInventoryCategory* LLFolderBridge::getCategory() const
 {
 	LLViewerInventoryCategory* cat = NULL;
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(model)
 	{
 		cat = (LLViewerInventoryCategory*)model->getCategory(mUUID);
@@ -2097,7 +2093,8 @@ void LLFolderBridge::createNewCategory(void* user_data)
 {
 	LLFolderBridge* bridge = (LLFolderBridge*)user_data;
 	if(!bridge) return;
-	LLInventoryPanel* panel = bridge->mInventoryPanel;
+	LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(bridge->mInventoryPanel.get());
+	if (!panel) return;
 	LLInventoryModel* model = panel->getModel();
 	if(!model) return;
 	LLUUID id;
@@ -2201,7 +2198,7 @@ void LLFolderBridge::createWearable(LLUUID parent_id, EWearableType type)
 
 void LLFolderBridge::modifyOutfit(BOOL append)
 {
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return;
 	LLViewerInventoryCategory* cat = getCategory();
 	if(!cat) return;
@@ -2252,7 +2249,7 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
 BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
 										BOOL drop)
 {
-	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(!model) return FALSE;
 
 	// cannot drag into library
@@ -2318,18 +2315,33 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
 			if (LLInventoryView::getActiveInventory())
 			{
 				LLInventoryPanel* active_panel = LLInventoryView::getActiveInventory()->getPanel();
-				if (active_panel && (mInventoryPanel != active_panel))
+				LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+				if (active_panel && (panel != active_panel))
 				{
 					active_panel->unSelectAll();
 				}
 			}
 
-			// restamp if the move is into the trash.
-			LLInvFVBridge::changeItemParent(
-				model,
-				(LLViewerInventoryItem*)inv_item,
-				mUUID,
-				move_is_into_trash);
+			LLUUID favorites_id = model->findCategoryUUIDForType(LLAssetType::AT_FAVORITE);
+			if (favorites_id == mUUID) // if target is the favorites folder we use copy
+			{
+				copy_inventory_item(
+					gAgent.getID(),
+					inv_item->getPermissions().getOwner(),
+					inv_item->getUUID(),
+					mUUID,
+					std::string(),
+					LLPointer<LLInventoryCallback>(NULL));
+			}
+			else
+			{
+				// restamp if the move is into the trash.
+				LLInvFVBridge::changeItemParent(
+					model,
+					(LLViewerInventoryItem*)inv_item,
+					mUUID,
+					move_is_into_trash);
+			}
 		}
 	}
 	else if(LLToolDragAndDrop::SOURCE_WORLD == source)
@@ -2378,7 +2390,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
 			else
 			{
 				LLNotification::Params params("MoveInventoryFromObject");
-				params.functor(boost::bind(move_task_inventory_callback, _1, _2, move_inv));
+				params.functor.function(boost::bind(move_task_inventory_callback, _1, _2, move_inv));
 				LLNotifications::instance().forceResponse(params, 0);
 			}
 		}
@@ -2431,49 +2443,18 @@ LLUIImagePtr LLScriptBridge::getIcon() const
 // |        LLTextureBridge                          |
 // +=================================================+
 
-std::string LLTextureBridge::sPrefix("Texture: ");
-
-
 LLUIImagePtr LLTextureBridge::getIcon() const
 {
 	return get_item_icon(LLAssetType::AT_TEXTURE, mInvType, 0, FALSE);
 }
 	
-void open_texture(const LLUUID& item_id, 
-				   const std::string& title,
-				   BOOL show_keep_discard,
-				   const LLUUID& source_id,
-				   BOOL take_focus)
-{
-	// See if we can bring an exiting preview to the front
-	if( !LLPreview::show( item_id, take_focus ) )
-	{
-		// There isn't one, so make a new preview
-		S32 left, top;
-		gFloaterView->getNewFloaterPosition(&left, &top);
-		LLRect rect = gSavedSettings.getRect("PreviewTextureRect");
-		rect.translate( left - rect.mLeft, top - rect.mTop );
-
-		LLPreviewTexture* preview;
-		preview = new LLPreviewTexture("preview texture",
-										  rect,
-										  title,
-										  item_id,
-										  LLUUID::null,
-										  show_keep_discard);
-		preview->setSourceID(source_id);
-		if(take_focus) preview->setFocus(TRUE);
-
-		gFloaterView->adjustToFitScreen(preview, FALSE);
-	}
-}
-
 void LLTextureBridge::openItem()
 {
 	LLViewerInventoryItem* item = getItem();
-	if(item)
+	
+	if (item)
 	{
-		open_texture(mUUID, getPrefix() + item->getName(), FALSE);
+		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
 	}
 }
 
@@ -2481,9 +2462,6 @@ void LLTextureBridge::openItem()
 // |        LLSoundBridge                            |
 // +=================================================+
 
-std::string LLSoundBridge::sPrefix("Sound: ");
-
-
 LLUIImagePtr LLSoundBridge::getIcon() const
 {
 	return get_item_icon(LLAssetType::AT_SOUND, LLInventoryType::IT_SOUND, 0, FALSE);
@@ -2491,6 +2469,13 @@ LLUIImagePtr LLSoundBridge::getIcon() const
 
 void LLSoundBridge::openItem()
 {
+	LLViewerInventoryItem* item = getItem();
+	
+	if (item)
+	{
+		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
+	}
+/*
 // Changed this back to the way it USED to work:
 // only open the preview dialog through the contextual right-click menu
 // double-click just plays the sound
@@ -2501,18 +2486,7 @@ void LLSoundBridge::openItem()
 		openSoundPreview((void*)this);
 		//send_uuid_sound_trigger(item->getAssetUUID(), 1.0);
 	}
-
-//	if(!LLPreview::show(mUUID))
-//	{
-//		S32 left, top;
-//		gFloaterView->getNewFloaterPosition(&left, &top);
-//		LLRect rect = gSavedSettings.getRect("PreviewSoundRect");
-//		rect.translate(left - rect.mLeft, top - rect.mTop);
-//			new LLPreviewSound("preview sound",
-//							   rect,
-//							   getPrefix() + getName(),
-//							   mUUID));
-//	}
+*/
 }
 
 void LLSoundBridge::previewItem()
@@ -2527,20 +2501,7 @@ void LLSoundBridge::previewItem()
 void LLSoundBridge::openSoundPreview(void* which)
 {
 	LLSoundBridge *me = (LLSoundBridge *)which;
-	if(!LLPreview::show(me->mUUID))
-	{
-		S32 left, top;
-		gFloaterView->getNewFloaterPosition(&left, &top);
-		LLRect rect = gSavedSettings.getRect("PreviewSoundRect");
-		rect.translate(left - rect.mLeft, top - rect.mTop);
-		LLPreviewSound* preview = new LLPreviewSound("preview sound",
-										   rect,
-										   me->getPrefix() + me->getName(),
-										   me->mUUID);
-		preview->setFocus(TRUE);
-		// Keep entirely onscreen.
-		gFloaterView->adjustToFitScreen(preview, FALSE);
-	}
+	LLFloaterReg::showInstance("preview_sound", LLSD(me->mUUID), TAKE_FOCUS_YES);
 }
 
 void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
@@ -2549,7 +2510,6 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	std::vector<std::string> items;
 	std::vector<std::string> disabled_items;
 
-	// *TODO: Translate
 	if(isInTrash())
 	{
 		items.push_back(std::string("Purge Item"));
@@ -2578,8 +2538,6 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 // |        LLLandmarkBridge                         |
 // +=================================================+
 
-std::string LLLandmarkBridge::sPrefix("Landmark:  ");
-
 LLUIImagePtr LLLandmarkBridge::getIcon() const
 {
 	return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE);
@@ -2590,7 +2548,6 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	std::vector<std::string> items;
 	std::vector<std::string> disabled_items;
 
-	// *TODO: Translate
 	lldebugs << "LLLandmarkBridge::buildContextMenu()" << llendl;
 	if(isInTrash())
 	{
@@ -2617,6 +2574,20 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 
 }
 
+// Convenience function for the two functions below.
+static void teleport_via_landmark(const LLUUID& asset_id)
+{
+	gAgent.teleportViaLandmark( asset_id );
+
+	// we now automatically track the landmark you're teleporting to
+	// because you'll probably arrive at a telehub instead
+	LLFloaterWorldMap* floater_world_map = LLFloaterWorldMap::getInstance();
+	if( floater_world_map )
+	{
+		floater_world_map->trackLandmark( asset_id );
+	}
+}
+
 // virtual
 void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
 {
@@ -2625,52 +2596,20 @@ void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
 		LLViewerInventoryItem* item = getItem();
 		if(item)
 		{
-			gAgent.teleportViaLandmark(item->getAssetUUID());
-
-			// we now automatically track the landmark you're teleporting to
-			// because you'll probably arrive at a telehub instead
-			if( gFloaterWorldMap )
-			{
-				gFloaterWorldMap->trackLandmark( item->getAssetUUID() );
-			}
+			teleport_via_landmark(item->getAssetUUID());
 		}
 	}
-	if ("about" == action)
+	else if ("about" == action)
 	{
 		LLViewerInventoryItem* item = getItem();
 		if(item)
 		{
-			open_landmark(item, std::string("  ") + getPrefix() + item->getName(), FALSE);
+			LLFloaterReg::showInstance("preview_landmark", LLSD(item->getUUID()), TAKE_FOCUS_YES);
 		}
 	}
-	else LLItemBridge::performAction(folder, model, action);
-}
-
-void open_landmark(LLViewerInventoryItem* inv_item,
-				   const std::string& title,
-				   BOOL show_keep_discard,
-				   const LLUUID& source_id,
-				   BOOL take_focus)
-{
-	// See if we can bring an exiting preview to the front
-	if( !LLPreview::show( inv_item->getUUID(), take_focus ) )
+	else 
 	{
-		// There isn't one, so make a new preview
-		S32 left, top;
-		gFloaterView->getNewFloaterPosition(&left, &top);
-		LLRect rect = gSavedSettings.getRect("PreviewLandmarkRect");
-		rect.translate( left - rect.mLeft, top - rect.mTop );
-
-		LLPreviewLandmark* preview = new LLPreviewLandmark(title,
-								  rect,
-								  title,
-								  inv_item->getUUID(),
-								  show_keep_discard,
-								  inv_item);
-		preview->setSourceID(source_id);
-		if(take_focus) preview->setFocus(TRUE);
-		// keep onscreen
-		gFloaterView->adjustToFitScreen(preview, FALSE);
+		LLItemBridge::performAction(folder, model, action);
 	}
 }
 
@@ -2681,15 +2620,7 @@ static bool open_landmark_callback(const LLSD& notification, const LLSD& respons
 	LLUUID asset_id = notification["payload"]["asset_id"].asUUID();
 	if (option == 0)
 	{
-		// HACK: This is to demonstrate teleport on double click for landmarks
-		gAgent.teleportViaLandmark( asset_id );
-
-		// we now automatically track the landmark you're teleporting to
-		// because you'll probably arrive at a telehub instead
-		if( gFloaterWorldMap )
-		{
-			gFloaterWorldMap->trackLandmark( asset_id );
-		}
+		teleport_via_landmark(asset_id);
 	}
 
 	return false;
@@ -2700,15 +2631,23 @@ static LLNotificationFunctorRegistration open_landmark_callback_reg("TeleportFro
 void LLLandmarkBridge::openItem()
 {
 	LLViewerInventoryItem* item = getItem();
+	
+	if (item)
+	{
+		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
+	}
+/*
+	LLViewerInventoryItem* item = getItem();
 	if( item )
 	{
 		// Opening (double-clicking) a landmark immediately teleports,
 		// but warns you the first time.
-		// open_landmark(item, std::string("  ") + getPrefix() + item->getName(), FALSE);
+		// open_landmark(item);
 		LLSD payload;
 		payload["asset_id"] = item->getAssetUUID();
 		LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
 	}
+*/
 }
 
 
@@ -2724,8 +2663,6 @@ void LLCallingCardObserver::changed(U32 mask)
 // |        LLCallingCardBridge                      |
 // +=================================================+
 
-std::string LLCallingCardBridge::sPrefix("Calling Card: ");
-
 LLCallingCardBridge::LLCallingCardBridge( LLInventoryPanel* inventory, const LLUUID& uuid ) :
 	LLItemBridge(inventory, uuid)
 {
@@ -2741,7 +2678,8 @@ LLCallingCardBridge::~LLCallingCardBridge()
 
 void LLCallingCardBridge::refreshFolderViewItem()
 {
-	LLFolderViewItem* itemp = mInventoryPanel->getRootFolder()->getItemByID(mUUID);
+	LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+	LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL;
 	if (itemp)
 	{
 		itemp->refresh();
@@ -2757,7 +2695,6 @@ void LLCallingCardBridge::performAction(LLFolderView* folder, LLInventoryModel*
 		if (item && (item->getCreatorUUID() != gAgent.getID()) &&
 			(!item->getCreatorUUID().isNull()))
 		{
-			gIMMgr->setFloaterOpen(TRUE);
 			gIMMgr->addSession(item->getName(), IM_NOTHING_SPECIAL, item->getCreatorUUID());
 		}
 	}
@@ -2800,17 +2737,24 @@ std::string LLCallingCardBridge::getLabelSuffix() const
 void LLCallingCardBridge::openItem()
 {
 	LLViewerInventoryItem* item = getItem();
+	
+	if (item)
+	{
+		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
+	}
+/*
+	LLViewerInventoryItem* item = getItem();
 	if(item && !item->getCreatorUUID().isNull())
 	{
 		BOOL online;
 		online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID());
 		LLFloaterAvatarInfo::showFromFriend(item->getCreatorUUID(), online);
 	}
+*/
 }
 
 void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 {
-	// *TODO: Translate
 	lldebugs << "LLCallingCardBridge::buildContextMenu()" << llendl;
 	std::vector<std::string> items;
 	std::vector<std::string> disabled_items;
@@ -2931,68 +2875,27 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop,
 // |        LLNotecardBridge                         |
 // +=================================================+
 
-std::string LLNotecardBridge::sPrefix("Note: ");
-
-
 LLUIImagePtr LLNotecardBridge::getIcon() const
 {
 	return get_item_icon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE);
 }
 
-void open_notecard(LLViewerInventoryItem* inv_item,
-				   const std::string& title,
-				   const LLUUID& object_id,
-				   BOOL show_keep_discard,
-				   const LLUUID& source_id,
-				   BOOL take_focus)
-{
-	// See if we can bring an existing preview to the front
-	if(!LLPreview::show(inv_item->getUUID(), take_focus))
-	{
-		// There isn't one, so make a new preview
-		S32 left, top;
-		gFloaterView->getNewFloaterPosition(&left, &top);
-		LLRect rect = gSavedSettings.getRect("NotecardEditorRect");
-		rect.translate(left - rect.mLeft, top - rect.mTop);
-		LLPreviewNotecard* preview;
-		preview = new LLPreviewNotecard("preview notecard", rect, title,
-						inv_item->getUUID(), object_id, inv_item->getAssetUUID(),
-						show_keep_discard, inv_item);
-		preview->setSourceID(source_id);
-		if(take_focus) preview->setFocus(TRUE);
-		// Force to be entirely onscreen.
-		gFloaterView->adjustToFitScreen(preview, FALSE);
-
-		//if (source_id.notNull())
-		//{
-		//	// look for existing tabbed view for content from same source
-		//	LLPreview* existing_preview = LLPreview::getPreviewForSource(source_id);
-		//	if (existing_preview)
-		//	{
-		//		// found existing preview from this source
-		//		// is it already hosted in a multi-preview window?
-		//		LLMultiPreview* preview_hostp = (LLMultiPreview*)existing_preview->getHost();
-		//		if (!preview_hostp)
-		//		{
-		//			// create new multipreview if it doesn't exist
-		//			LLMultiPreview* preview_hostp = new LLMultiPreview(existing_preview->getRect());
-		//			preview_hostp->addFloater(existing_preview);
-		//		}
-		//		// add this preview to existing host
-		//		preview_hostp->addFloater(preview);
-		//	}
-		//}
-	}
-}
-
-
 void LLNotecardBridge::openItem()
 {
 	LLViewerInventoryItem* item = getItem();
+	
+	if (item)
+	{
+		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
+	}
+
+/*
+	LLViewerInventoryItem* item = getItem();
 	if (item)
 	{
-		open_notecard(item, getPrefix() + item->getName(), LLUUID::null, FALSE);
+		LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES);
 	}
+*/
 }
 
 
@@ -3000,8 +2903,6 @@ void LLNotecardBridge::openItem()
 // |        LLGestureBridge                          |
 // +=================================================+
 
-std::string LLGestureBridge::sPrefix("Gesture: ");
-
 LLUIImagePtr LLGestureBridge::getIcon() const
 {
 	return get_item_icon(LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, 0, FALSE);
@@ -3064,22 +2965,19 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode
 void LLGestureBridge::openItem()
 {
 	LLViewerInventoryItem* item = getItem();
-	if (!item) return;
-
-	// See if we can bring an existing preview to the front
-	if(!LLPreview::show(mUUID))
+	
+	if (item)
 	{
-		LLUUID item_id = mUUID;
-		std::string title = getPrefix() + item->getName();
-		LLUUID object_id = LLUUID::null;
-
-		// TODO: save the rectangle
-		LLPreviewGesture* preview = LLPreviewGesture::show(title, item_id, object_id);
+		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
+	}
+/*
+	LLViewerInventoryItem* item = getItem();
+	if (item)
+	{
+		LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null);
 		preview->setFocus(TRUE);
-
-		// Force to be entirely onscreen.
-		gFloaterView->adjustToFitScreen(preview, FALSE);
 	}
+*/
 }
 
 BOOL LLGestureBridge::removeItem()
@@ -3091,7 +2989,6 @@ BOOL LLGestureBridge::removeItem()
 
 void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 {
-	// *TODO: Translate
 	lldebugs << "LLGestureBridge::buildContextMenu()" << llendl;
 	std::vector<std::string> items;
 	std::vector<std::string> disabled_items;
@@ -3115,15 +3012,6 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 		items.push_back(std::string("Gesture Separator"));
 		items.push_back(std::string("Activate"));
 		items.push_back(std::string("Deactivate"));
-
-		/*menu.append(new LLMenuItemCallGL("Activate",
-										 handleActivateGesture,
-										 enableActivateGesture,
-										 (void*)this));
-		menu.append(new LLMenuItemCallGL("Deactivate",
-										 handleDeactivateGesture,
-										 enableDeactivateGesture,
-										 (void*)this));*/
 	}
 	hideContextEntries(menu, items, disabled_items);
 }
@@ -3132,9 +3020,6 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 // |        LLAnimationBridge                        |
 // +=================================================+
 
-std::string LLAnimationBridge::sPrefix("Animation: ");
-
-
 LLUIImagePtr LLAnimationBridge::getIcon() const
 {
 	return get_item_icon(LLAssetType::AT_ANIMATION, LLInventoryType::IT_ANIMATION, 0, FALSE);
@@ -3142,7 +3027,6 @@ LLUIImagePtr LLAnimationBridge::getIcon() const
 
 void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 {
-	// *TODO: Translate
 	std::vector<std::string> items;
 	std::vector<std::string> disabled_items;
 
@@ -3176,32 +3060,18 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 // virtual
 void LLAnimationBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
 {
-	S32 activate = 0;
-
 	if ((action == "playworld") || (action == "playlocal"))
 	{
-	
-		if ("playworld" == action) activate = 1;
-		if ("playlocal" == action) activate = 2;
-
-		// See if we can bring an existing preview to the front
-		if( !LLPreview::show( mUUID ) )
+		if (getItem())
 		{
-			// There isn't one, so make a new preview
-			LLViewerInventoryItem* item = getItem();
-			if( item )
+			LLPreviewAnim::e_activation_type activate = LLPreviewAnim::NONE;
+			if ("playworld" == action) activate = LLPreviewAnim::PLAY;
+			if ("playlocal" == action) activate = LLPreviewAnim::AUDITION;
+			
+			LLPreviewAnim* preview = LLFloaterReg::showTypedInstance<LLPreviewAnim>("preview_anim", LLSD(mUUID));
+			if (preview)
 			{
-				S32 left, top;
-				gFloaterView->getNewFloaterPosition(&left, &top);
-				LLRect rect = gSavedSettings.getRect("PreviewAnimRect");
-				rect.translate( left - rect.mLeft, top - rect.mTop );
-				LLPreviewAnim* preview = new LLPreviewAnim("preview anim",
-										rect,
-										getPrefix() + item->getName(),
-										mUUID,
-										activate);
-				// Force to be entirely onscreen.
-				gFloaterView->adjustToFitScreen(preview, FALSE);
+				preview->activate(activate);
 			}
 		}
 	}
@@ -3213,36 +3083,25 @@ void LLAnimationBridge::performAction(LLFolderView* folder, LLInventoryModel* mo
 
 void LLAnimationBridge::openItem()
 {
-	// See if we can bring an existing preview to the front
-	if( !LLPreview::show( mUUID ) )
+	LLViewerInventoryItem* item = getItem();
+	
+	if (item)
 	{
-		// There isn't one, so make a new preview
-		LLViewerInventoryItem* item = getItem();
-		if( item )
-		{
-			S32 left, top;
-			gFloaterView->getNewFloaterPosition(&left, &top);
-			LLRect rect = gSavedSettings.getRect("PreviewAnimRect");
-			rect.translate( left - rect.mLeft, top - rect.mTop );
-			LLPreviewAnim* preview = new LLPreviewAnim("preview anim",
-									rect,
-									getPrefix() + item->getName(),
-									mUUID,
-									0);
-			preview->setFocus(TRUE);
-			// Force to be entirely onscreen.
-			gFloaterView->adjustToFitScreen(preview, FALSE);
-		}
+		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
 	}
+/*
+	LLViewerInventoryItem* item = getItem();
+	if (item)
+	{
+		LLFloaterReg::showInstance("preview_anim", LLSD(mUUID), TAKE_FOCUS_YES);
+	}
+*/
 }
 
 // +=================================================+
 // |        LLObjectBridge                           |
 // +=================================================+
 
-// static
-std::string LLObjectBridge::sPrefix("Object: ");
-
 // static
 LLUUID LLObjectBridge::sContextMenuItemID;
 
@@ -3316,10 +3175,16 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
 
 void LLObjectBridge::openItem()
 {
-	/* Disabled -- this preview isn't useful. JC */
-	// CP: actually, this code is required - made changes to match LLAnimationBridge::openItem() idiom
-	// The properties preview is useful, converting to show object properties. - DaveP
-	LLShowProps::showProperties(mUUID);
+	LLViewerInventoryItem* item = getItem();
+	
+	if (item)
+	{
+		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
+	}
+
+	/*
+	LLFloaterProperties::show(mUUID);
+	*/
 }
 
 LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const
@@ -3411,7 +3276,6 @@ static LLNotificationFunctorRegistration confirm_replace_attachment_rez_reg("Rep
 
 void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 {
-	// *TODO: Translate
 	std::vector<std::string> items;
 	std::vector<std::string> disabled_items;
 	if(isInTrash())
@@ -3457,35 +3321,36 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 				LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE);
 				LLMenuGL* attach_hud_menu = menu.getChildMenuByName("Attach To HUD", TRUE);
 				LLVOAvatar *avatarp = gAgent.getAvatarObject();
-				if (attach_menu && (attach_menu->getChildCount() == 0) &&
-					attach_hud_menu && (attach_hud_menu->getChildCount() == 0) &&
-					avatarp)
+				if (attach_menu 
+					&& (attach_menu->getChildCount() == 0) 
+					&& attach_hud_menu 
+					&& (attach_hud_menu->getChildCount() == 0) 
+					&& avatarp)
 				{
 					for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); 
 						 iter != avatarp->mAttachmentPoints.end(); )
 					{
 						LLVOAvatar::attachment_map_t::iterator curiter = iter++;
 						LLViewerJointAttachment* attachment = curiter->second;
-						LLMenuItemCallGL *new_item;
-						if (attachment->getIsHUDAttachment())
+						LLMenuItemCallGL::Params p;
+						std::string submenu_name = attachment->getName();
+						if (LLTrans::getString(submenu_name) != "")
 						{
-							attach_hud_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(), 
-								NULL, //&LLObjectBridge::attachToAvatar, 
-								NULL, &attach_label, (void*)attachment));
+						    p.name = (" ")+LLTrans::getString(submenu_name)+" ";
 						}
 						else
 						{
-							attach_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(), 
-								NULL, //&LLObjectBridge::attachToAvatar,
-								NULL, &attach_label, (void*)attachment));
-						}
-
-						LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachObject");
-
-						if (callback)
-						{
-							new_item->addListener(callback, "on_click", LLSD(attachment->getName()));
+							p.name = submenu_name;
 						}
+						LLSD cbparams;
+						cbparams["index"] = curiter->first;
+						cbparams["label"] = attachment->getName();
+						p.on_click.function_name = "Inventory.AttachObject";
+						p.on_click.parameter = LLSD(attachment->getName());
+						p.on_enable.function_name = "Attachment.Label";
+						p.on_enable.parameter = cbparams;
+						LLView* parent = attachment->getIsHUDAttachment() ? attach_hud_menu : attach_menu;
+						LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent);
 					}
 				}
 			}
@@ -3496,10 +3361,12 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 
 BOOL LLObjectBridge::renameItem(const std::string& new_name)
 {
-	if(!isItemRenameable()) return FALSE;
-	LLPreview::rename(mUUID, getPrefix() + new_name);
-	LLInventoryModel* model = mInventoryPanel->getModel();
-	if(!model) return FALSE;
+	if(!isItemRenameable())
+		return FALSE;
+	LLPreview::dirty(mUUID);
+	LLInventoryModel* model = getInventoryModel();
+	if(!model)
+		return FALSE;
 	LLViewerInventoryItem* item = getItem();
 	if(item && (item->getName() != new_name))
 	{
@@ -3532,8 +3399,6 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name)
 // |        LLLSLTextBridge                          |
 // +=================================================+
 
-std::string LLLSLTextBridge::sPrefix("Script: ");
-
 LLUIImagePtr LLLSLTextBridge::getIcon() const
 {
 	return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE);
@@ -3541,27 +3406,19 @@ LLUIImagePtr LLLSLTextBridge::getIcon() const
 
 void LLLSLTextBridge::openItem()
 {
-	// See if we can bring an exiting preview to the front
-	if(!LLPreview::show(mUUID))
+	LLViewerInventoryItem* item = getItem();
+	
+	if (item)
 	{
-		LLViewerInventoryItem* item = getItem();
-		if (item)
-		{
-			// There isn't one, so make a new preview
-			S32 left, top;
-			gFloaterView->getNewFloaterPosition(&left, &top);
-			LLRect rect = gSavedSettings.getRect("PreviewScriptRect");
-			rect.translate(left - rect.mLeft, top - rect.mTop);
-			
-			LLPreviewLSL* preview =	new LLPreviewLSL("preview lsl text",
-											 rect,
-											 getPrefix() + item->getName(),
-											 mUUID);
-			preview->setFocus(TRUE);
-			// keep onscreen
-			gFloaterView->adjustToFitScreen(preview, FALSE);
-		}
+		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
 	}
+	/*
+	LLViewerInventoryItem* item = getItem();
+	if (item)
+	{
+		LLFloaterReg::showInstance("preview_script", LLSD(mUUID), TAKE_FOCUS_YES);
+	}
+	*/
 }
 
 // +=================================================+
@@ -3897,30 +3754,18 @@ void wear_inventory_category_on_avatar( LLInventoryCategory* category, BOOL appe
 	lldebugs << "wear_inventory_category_on_avatar( " << category->getName()
 			 << " )" << llendl;
 			 	
-	LLWearInfo* userdata = new LLWearInfo;
-	userdata->mAppend = append;
-	userdata->mCategoryID = category->getUUID();
-
 	if( gFloaterCustomize )
 	{
-		gFloaterCustomize->askToSaveIfDirty(
-			wear_inventory_category_on_avatar_step2,
-			userdata);
+		gFloaterCustomize->askToSaveIfDirty(boost::bind(wear_inventory_category_on_avatar_step2, _1, category->getUUID(), append));
 	}
 	else
 	{
-		wear_inventory_category_on_avatar_step2(
-			TRUE,
-			userdata );
+		wear_inventory_category_on_avatar_step2(TRUE, category->getUUID(), append );
 	}
 }
 
-
-void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
+void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOOL append )
 {
-	LLWearInfo* wear_info = (LLWearInfo*)userdata;
-	if (!wear_info) return;
-
 	// Find all the wearables that are in the category's subtree.	
 	lldebugs << "wear_inventory_category_on_avatar_step2()" << llendl;
 	if(proceed)
@@ -3928,7 +3773,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
 		LLInventoryModel::cat_array_t cat_array;
 		LLInventoryModel::item_array_t item_array;
 		LLFindWearables is_wearable;
-		gInventory.collectDescendentsIf(wear_info->mCategoryID,
+		gInventory.collectDescendentsIf(category,
 										cat_array,
 										item_array,
 										LLInventoryModel::EXCLUDE_TRASH,
@@ -3939,7 +3784,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
 		LLInventoryModel::cat_array_t	obj_cat_array;
 		LLInventoryModel::item_array_t	obj_item_array;
 		LLIsType is_object( LLAssetType::AT_OBJECT );
-		gInventory.collectDescendentsIf(wear_info->mCategoryID,
+		gInventory.collectDescendentsIf(category,
 										obj_cat_array,
 										obj_item_array,
 										LLInventoryModel::EXCLUDE_TRASH,
@@ -3950,7 +3795,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
 		LLInventoryModel::cat_array_t	gest_cat_array;
 		LLInventoryModel::item_array_t	gest_item_array;
 		LLIsType is_gesture( LLAssetType::AT_GESTURE );
-		gInventory.collectDescendentsIf(wear_info->mCategoryID,
+		gInventory.collectDescendentsIf(category,
 										gest_cat_array,
 										gest_item_array,
 										LLInventoryModel::EXCLUDE_TRASH,
@@ -3960,7 +3805,6 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
 		if( !wearable_count && !obj_count && !gest_count)
 		{
 			LLNotifications::instance().add("CouldNotPutOnOutfit");
-			delete wear_info;
 			return;
 		}
 
@@ -3979,7 +3823,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
 
 			// Update the inventory item labels to reflect the fact
 			// they are active.
-			LLViewerInventoryCategory* catp = gInventory.getCategory(wear_info->mCategoryID);
+			LLViewerInventoryCategory* catp = gInventory.getCategory(category);
 			if (catp)
 			{
 				gInventory.updateCategory(catp);
@@ -4007,7 +3851,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
 			}
 			for(i = 0; i < wearable_count; ++i)
 			{
-				gAddToOutfit = wear_info->mAppend;
+				gAddToOutfit = append;
 
 				found = found_container.get(i);
 				gWearableList.getAsset(found->mAssetID,
@@ -4020,7 +3864,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
 
 
 		//If not appending and the folder doesn't contain only gestures, take off all attachments.
-		if (!wear_info->mAppend 
+		if (!append 
 			&& !(wearable_count == 0 && obj_count == 0 && gest_count > 0) )
 		{
 			LLAgent::userRemoveAllAttachments(NULL);
@@ -4061,7 +3905,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
 						msg->nextBlockFast(_PREHASH_HeaderData);
 						msg->addUUIDFast(_PREHASH_CompoundMsgID, compound_msg_id );
 						msg->addU8Fast(_PREHASH_TotalObjects, obj_count );
-						msg->addBOOLFast(_PREHASH_FirstDetachAll, !wear_info->mAppend );
+						msg->addBOOLFast(_PREHASH_FirstDetachAll, !append );
 					}
 
 					LLInventoryItem* item = obj_item_array.get(i);
@@ -4082,8 +3926,6 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
 			}
 		}
 	}
-	delete wear_info;
-	wear_info = NULL;
 }
 
 void wear_inventory_category_on_avatar_loop(LLWearable* wearable, void* data)
@@ -4170,36 +4012,29 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category )
 			 << " )" << llendl;
 			 
 	
-	LLUUID* uuid	= new LLUUID(category->getUUID());
-
 	if( gFloaterCustomize )
 	{
 		gFloaterCustomize->askToSaveIfDirty(
-			remove_inventory_category_from_avatar_step2,
-			uuid);
+			boost::bind(remove_inventory_category_from_avatar_step2, _1, category->getUUID()));
 	}
 	else
 	{
-		remove_inventory_category_from_avatar_step2(
-			TRUE,
-			uuid );
+		remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() );
 	}
 }
 
 
-void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata)
+void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id)
 {
 
 	// Find all the wearables that are in the category's subtree.
-	LLUUID* category_id = (LLUUID *)userdata;
-	
 	lldebugs << "remove_inventory_category_from_avatar_step2()" << llendl;
 	if(proceed)
 	{
 		LLInventoryModel::cat_array_t cat_array;
 		LLInventoryModel::item_array_t item_array;
 		LLFindWearables is_wearable;
-		gInventory.collectDescendentsIf(*category_id,
+		gInventory.collectDescendentsIf(category_id,
 										cat_array,
 										item_array,
 										LLInventoryModel::EXCLUDE_TRASH,
@@ -4210,7 +4045,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata)
 		LLInventoryModel::cat_array_t	obj_cat_array;
 		LLInventoryModel::item_array_t	obj_item_array;
 		LLIsType is_object( LLAssetType::AT_OBJECT );
-		gInventory.collectDescendentsIf(*category_id,
+		gInventory.collectDescendentsIf(category_id,
 										obj_cat_array,
 										obj_item_array,
 										LLInventoryModel::EXCLUDE_TRASH,
@@ -4221,7 +4056,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata)
 		LLInventoryModel::cat_array_t	gest_cat_array;
 		LLInventoryModel::item_array_t	gest_item_array;
 		LLIsType is_gesture( LLAssetType::AT_GESTURE );
-		gInventory.collectDescendentsIf(*category_id,
+		gInventory.collectDescendentsIf(category_id,
 										gest_cat_array,
 										gest_item_array,
 										LLInventoryModel::EXCLUDE_TRASH,
@@ -4283,8 +4118,6 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata)
 			}
 		}
 	}
-	delete category_id;
-	category_id = NULL;
 }
 
 BOOL LLWearableBridge::renameItem(const std::string& new_name)
@@ -4364,6 +4197,13 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
 
 void LLWearableBridge::openItem()
 {
+	LLViewerInventoryItem* item = getItem();
+	
+	if (item)
+	{
+		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
+	}
+	/*
 	if( isInTrash() )
 	{
 		LLNotifications::instance().add("CannotWearTrash");
@@ -4398,11 +4238,11 @@ void LLWearableBridge::openItem()
 			LLNotifications::instance().add("CannotWearInfoNotComplete");
 		}
 	}
+	*/
 }
 
 void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 {
-	// *TODO: Translate
 	lldebugs << "LLWearableBridge::buildContextMenu()" << llendl;
 	std::vector<std::string> items;
 	std::vector<std::string> disabled_items;
@@ -4445,23 +4285,10 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 		{
 			disabled_items.push_back(std::string("Wearable Edit"));
 		}
-		//menu.appendSeparator();
-		//menu.append(new LLMenuItemCallGL("Wear",
-		//								 LLWearableBridge::onWearOnAvatar,
-		//								 LLWearableBridge::canWearOnAvatar,
-		//								 (void*)this));
-		//menu.append(new LLMenuItemCallGL("Edit",
-		//								 LLWearableBridge::onEditOnAvatar,
-		//								 LLWearableBridge::canEditOnAvatar,
-		//								 (void*)this));
 
 		if( item && (item->getType() == LLAssetType::AT_CLOTHING) )
 		{
 			items.push_back(std::string("Take Off"));
-			/*menu.append(new LLMenuItemCallGL("Take Off",
-											 LLWearableBridge::onRemoveFromAvatar,
-											 LLWearableBridge::canRemoveFromAvatar,
-											 (void*)this));*/
 		}
 	}
 	hideContextEntries(menu, items, disabled_items);
@@ -4586,7 +4413,8 @@ void LLWearableBridge::editOnAvatar()
 	if( wearable )
 	{
 		// Set the tab to the right wearable.
-		LLFloaterCustomize::setCurrentWearableType( wearable->getType() );
+		if (gFloaterCustomize)
+			gFloaterCustomize->setCurrentWearableType( wearable->getType() );
 
 		if( CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() )
 		{
@@ -4646,3 +4474,279 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
 	}
 	delete item_id;
 }
+
+
+LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type,
+									   const LLUUID& uuid,LLInventoryModel* model)
+{
+	LLInvFVBridgeAction* action = NULL;
+	switch(asset_type)
+	{
+	case LLAssetType::AT_TEXTURE:
+		action = new LLTextureBridgeAction(uuid,model);
+		break;
+
+	case LLAssetType::AT_SOUND:
+		action = new LLSoundBridgeAction(uuid,model);
+		break;
+
+	case LLAssetType::AT_LANDMARK:
+		action = new LLLandmarkBridgeAction(uuid,model);
+		break;
+		
+	case LLAssetType::AT_CALLINGCARD:
+		action = new LLCallingCardBridgeAction(uuid,model);
+		break;
+
+	case LLAssetType::AT_OBJECT:
+		action = new LLObjectBridgeAction(uuid,model);
+		break;
+
+	case LLAssetType::AT_NOTECARD:
+		action = new LLNotecardBridgeAction(uuid,model);
+		break;
+
+	case LLAssetType::AT_ANIMATION:
+		action = new LLAnimationBridgeAction(uuid,model);
+		break;
+
+	case LLAssetType::AT_GESTURE:
+		action = new LLGestureBridgeAction(uuid,model);
+		break;
+
+	case LLAssetType::AT_LSL_TEXT:
+		action = new LLLSLTextBridgeAction(uuid,model);
+		break;
+
+	case LLAssetType::AT_CLOTHING:
+	case LLAssetType::AT_BODYPART:
+		action = new LLWearableBridgeAction(uuid,model);
+
+		break;
+
+	default:
+		break;
+	}
+	return action;
+}
+
+//static 
+void		LLInvFVBridgeAction::doAction(LLAssetType::EType asset_type,
+									   const LLUUID& uuid,LLInventoryModel* model)
+{
+	LLInvFVBridgeAction* action = createAction(asset_type,uuid,model);
+	if(action)
+	{
+		action->doIt();
+		delete action;
+	}
+}
+
+LLViewerInventoryItem* LLInvFVBridgeAction::getItem() const
+{
+	if(mModel)
+		return (LLViewerInventoryItem*)mModel->getItem(mUUID);
+	return NULL;
+}
+
+//virtual 
+void	LLTextureBridgeAction::doIt() 
+{
+	if (getItem())
+	{
+		LLFloaterReg::showInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES);
+	}
+
+	LLInvFVBridgeAction::doIt();
+}
+
+//virtual
+void	LLSoundBridgeAction::doIt() 
+{
+	LLViewerInventoryItem* item = getItem();
+	if(item)
+	{
+		LLFloaterReg::showInstance("preview_sound", LLSD(mUUID), TAKE_FOCUS_YES);
+	}
+	
+	LLInvFVBridgeAction::doIt();
+}
+
+
+//virtual 
+void	LLLandmarkBridgeAction::doIt() 
+{
+	LLViewerInventoryItem* item = getItem();
+	if( item )
+	{
+		// Opening (double-clicking) a landmark immediately teleports,
+		// but warns you the first time.
+		LLSD payload;
+		payload["asset_id"] = item->getAssetUUID();
+		LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
+	}
+
+	LLInvFVBridgeAction::doIt();
+}
+
+
+//virtual 
+void	LLCallingCardBridgeAction::doIt() 
+{
+	LLViewerInventoryItem* item = getItem();
+	if(item && !item->getCreatorUUID().isNull())
+	{
+		BOOL online;
+		online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID());
+		LLFloaterAvatarInfo::showFromFriend(item->getCreatorUUID(), online);
+	}
+
+	LLInvFVBridgeAction::doIt();
+}
+
+//virtual 
+void	
+LLNotecardBridgeAction::doIt() 
+{
+	LLViewerInventoryItem* item = getItem();
+	if (item)
+	{
+		LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES);
+	}
+
+	LLInvFVBridgeAction::doIt();
+}
+
+//virtual 
+void	LLGestureBridgeAction::doIt() 
+{
+	LLViewerInventoryItem* item = getItem();
+	if (item)
+	{
+		LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null);
+		preview->setFocus(TRUE);
+	}
+
+	LLInvFVBridgeAction::doIt();
+}
+
+//virtual 
+void	LLAnimationBridgeAction::doIt() 
+{
+	LLViewerInventoryItem* item = getItem();
+	if (item)
+	{
+		LLFloaterReg::showInstance("preview_anim", LLSD(mUUID), TAKE_FOCUS_YES);
+	}
+
+	LLInvFVBridgeAction::doIt();
+}
+
+
+//virtual 
+void	LLObjectBridgeAction::doIt()
+{
+	LLFloaterProperties::show(mUUID);
+
+	LLInvFVBridgeAction::doIt();
+}
+
+
+//virtual 
+void	LLLSLTextBridgeAction::doIt() 
+{
+	LLViewerInventoryItem* item = getItem();
+	if (item)
+	{
+		LLFloaterReg::showInstance("preview_script", LLSD(mUUID), TAKE_FOCUS_YES);
+	}
+
+	LLInvFVBridgeAction::doIt();
+}
+
+
+BOOL LLWearableBridgeAction::isInTrash() const
+{
+	if(!mModel) return FALSE;
+	LLUUID trash_id = mModel->findCategoryUUIDForType(LLAssetType::AT_TRASH);
+	return mModel->isObjectDescendentOf(mUUID, trash_id);
+}
+
+BOOL LLWearableBridgeAction::isAgentInventory() const
+{
+	if(!mModel) return FALSE;
+	if(gAgent.getInventoryRootID() == mUUID) return TRUE;
+	return mModel->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID());
+}
+
+void LLWearableBridgeAction::wearOnAvatar()
+{
+	// Don't wear anything until initial wearables are loaded, can
+	// destroy clothing items.
+	if (!gAgent.areWearablesLoaded()) 
+	{
+		LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
+		return;
+	}
+
+	LLViewerInventoryItem* item = getItem();
+	if(item)
+	{
+		if(!isAgentInventory())
+		{
+			LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback();
+			copy_inventory_item(
+				gAgent.getID(),
+				item->getPermissions().getOwner(),
+				item->getUUID(),
+				LLUUID::null,
+				std::string(),
+				cb);
+		}
+		else
+		{
+			wear_inventory_item_on_avatar(item);
+		}
+	}
+}
+
+//virtual 
+void	LLWearableBridgeAction::doIt()
+{
+	if( isInTrash() )
+	{
+		LLNotifications::instance().add("CannotWearTrash");
+	}
+	else if(isAgentInventory())
+	{
+		if( !gAgent.isWearingItem( mUUID ) )
+		{
+			wearOnAvatar();
+		}
+	}
+	else
+	{
+		// must be in the inventory library. copy it to our inventory
+		// and put it on right away.
+		LLViewerInventoryItem* item = getItem();
+		if(item && item->isComplete())
+		{
+			LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback();
+			copy_inventory_item(
+				gAgent.getID(),
+				item->getPermissions().getOwner(),
+				item->getUUID(),
+				LLUUID::null,
+				std::string(),
+				cb);
+		}
+		else if(item)
+		{
+			// *TODO: We should fetch the item details, and then do
+			// the operation above.
+			LLNotifications::instance().add("CannotWearInfoNotComplete");
+		}
+	}
+
+	LLInvFVBridgeAction::doIt();
+}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 526b30f214..b66228c75a 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -34,6 +34,8 @@
 #include "llwearable.h"
 #include "llviewercontrol.h"
 #include "llcallingcard.h"
+#include "llinventorymodel.h"
+#include "llinventoryview.h"
 
 enum EInventoryIcon
 {
@@ -93,31 +95,6 @@ struct LLAttachmentRezAction
 };
 
 
-//helper functions
-class LLShowProps 
-{
-public:
-
-	static void showProperties(const LLUUID& uuid)
-	{
-		if(!LLFloaterProperties::show(uuid, LLUUID::null))
-		{
-			S32 left, top;
-			gFloaterView->getNewFloaterPosition(&left, &top);
-			LLRect rect = gSavedSettings.getRect("PropertiesRect");
-			rect.translate( left - rect.mLeft, top - rect.mTop );
-			LLFloaterProperties* floater;
-			floater = new LLFloaterProperties("item properties",
-											rect,
-											"Inventory Item Properties",
-											uuid,
-											LLUUID::null);
-			// keep onscreen
-			gFloaterView->adjustToFitScreen(floater, FALSE);
-		}
-	}
-};
-
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLInventoryPanelObserver
 //
@@ -158,7 +135,6 @@ public:
 
 	virtual const LLUUID& getUUID() const { return mUUID; }
 
-	virtual const std::string& getPrefix() { return LLStringUtil::null; }
 	virtual void restoreItem() {}
 	virtual void restoreToWorld() {}
 
@@ -201,9 +177,14 @@ public:
 
 protected:
 	LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid) :
-		mInventoryPanel(inventory), mUUID(uuid), mInvType(LLInventoryType::IT_NONE) {}
+		mUUID(uuid), mInvType(LLInventoryType::IT_NONE)
+	{
+		mInventoryPanel = inventory->getHandle();
+	}
 
 	LLInventoryObject* getInventoryObject() const;
+	LLInventoryModel* getInventoryModel() const;
+	
 	BOOL isInTrash() const;
 	// return true if the item is in agent inventory. if false, it
 	// must be lost or in the inventory library.
@@ -218,9 +199,9 @@ protected:
 									 const LLUUID& new_parent,
 									 BOOL restamp);
 	void removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*>& batch);
-
+	
 protected:
-	LLInventoryPanel* mInventoryPanel;
+	LLHandle<LLPanel> mInventoryPanel;
 	LLUUID mUUID;	// item id
 	LLInventoryType::EType mInvType;
 };
@@ -277,6 +258,7 @@ public:
 	virtual void selectItem();
 	virtual void restoreItem();
 
+	virtual LLAssetType::EType getPreferredType() const;
 	virtual LLUIImagePtr getIcon() const;
 	virtual BOOL renameItem(const std::string& new_name);
 	virtual BOOL removeItem();
@@ -351,15 +333,12 @@ class LLTextureBridge : public LLItemBridge
 {
 	friend class LLInvFVBridge;
 public:
-	virtual const std::string& getPrefix() { return sPrefix; }
-
 	virtual LLUIImagePtr getIcon() const;
 	virtual void openItem();
 
 protected:
 	LLTextureBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type) :
 		LLItemBridge(inventory, uuid), mInvType(type) {}
-	static std::string sPrefix;
 	LLInventoryType::EType mInvType;
 };
 
@@ -367,8 +346,6 @@ class LLSoundBridge : public LLItemBridge
 {
 	friend class LLInvFVBridge;
 public:
-	virtual const std::string& getPrefix() { return sPrefix; }
-
 	virtual LLUIImagePtr getIcon() const;
 	virtual void openItem();
 	virtual void previewItem();
@@ -378,15 +355,12 @@ public:
 protected:
 	LLSoundBridge(LLInventoryPanel* inventory, const LLUUID& uuid) :
 		LLItemBridge(inventory, uuid) {}
-	static std::string sPrefix;
 };
 
 class LLLandmarkBridge : public LLItemBridge
 {
 	friend class LLInvFVBridge;
 public:
-	static const std::string& prefix() { return sPrefix; }
-	virtual const std::string& getPrefix() { return sPrefix; }
 	virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action);
 	virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
 	virtual LLUIImagePtr getIcon() const;
@@ -404,7 +378,6 @@ protected:
 	}
 
 protected:
-	static std::string sPrefix;
 	BOOL mVisited;
 };
 
@@ -425,8 +398,6 @@ class LLCallingCardBridge : public LLItemBridge
 {
 	friend class LLInvFVBridge;
 public:
-	virtual const std::string& getPrefix() { return sPrefix; }
-
 	virtual std::string getLabelSuffix() const;
 	//virtual const std::string& getDisplayName() const;
 	virtual LLUIImagePtr getIcon() const;
@@ -445,7 +416,6 @@ protected:
 	~LLCallingCardBridge();
 	
 protected:
-	static std::string sPrefix;
 	LLCallingCardObserver* mObserver;
 };
 
@@ -454,25 +424,18 @@ class LLNotecardBridge : public LLItemBridge
 {
 	friend class LLInvFVBridge;
 public:
-	virtual const std::string& getPrefix() { return sPrefix; }
-
 	virtual LLUIImagePtr getIcon() const;
 	virtual void openItem();
 
 protected:
 	LLNotecardBridge(LLInventoryPanel* inventory, const LLUUID& uuid) :
 		LLItemBridge(inventory, uuid) {}
-
-protected:
-	static std::string sPrefix;
 };
 
 class LLGestureBridge : public LLItemBridge
 {
 	friend class LLInvFVBridge;
 public:
-	virtual const std::string& getPrefix() { return sPrefix; }
-
 	virtual LLUIImagePtr getIcon() const;
 
 	// Only suffix for gesture items, not task items, because only
@@ -489,9 +452,6 @@ public:
 protected:
 	LLGestureBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
 	:	LLItemBridge(inventory, uuid) {}
-
-protected:
-	static std::string sPrefix;
 };
 
 
@@ -499,7 +459,6 @@ class LLAnimationBridge : public LLItemBridge
 {
 	friend class LLInvFVBridge;
 public:
-	virtual const std::string& getPrefix() { return sPrefix; }
 	virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action);
 	virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
 
@@ -509,9 +468,6 @@ public:
 protected:
 	LLAnimationBridge(LLInventoryPanel* inventory, const LLUUID& uuid) :
 		LLItemBridge(inventory, uuid) {}
-
-protected:
-	static std::string sPrefix;
 };
 
 
@@ -519,8 +475,6 @@ class LLObjectBridge : public LLItemBridge
 {
 	friend class LLInvFVBridge;
 public:
-	virtual const std::string& getPrefix() { return sPrefix; }
-
 	virtual LLUIImagePtr	getIcon() const;
 	virtual void			performAction(LLFolderView* folder, LLInventoryModel* model, std::string action);
 	virtual void			openItem();
@@ -540,7 +494,6 @@ protected:
 	}
 
 protected:
-	static std::string sPrefix;
 	static LLUUID	sContextMenuItemID;  // Only valid while the context menu is open.
 	LLInventoryType::EType mInvType;
 	U32 mAttachPt;
@@ -552,17 +505,12 @@ class LLLSLTextBridge : public LLItemBridge
 {
 	friend class LLInvFVBridge;
 public:
-	virtual const std::string& getPrefix() { return sPrefix; }
-
 	virtual LLUIImagePtr getIcon() const;
 	virtual void openItem();
 
 protected:
 	LLLSLTextBridge( LLInventoryPanel* inventory, const LLUUID& uuid ) :
 		LLItemBridge(inventory, uuid) {}
-
-protected:
-	static std::string sPrefix;
 };
 
 
@@ -605,3 +553,162 @@ protected:
 	LLInventoryType::EType mInvType;
 	EWearableType  mWearableType;
 };
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLInvFVBridgeAction (& it's derived classes)
+//
+// This is an implementation class to be able to 
+// perform action to view inventory items.
+//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+class LLInvFVBridgeAction
+{
+public:
+	// This method is a convenience function which creates the correct
+	// type of bridge action based on some basic information
+	static LLInvFVBridgeAction* createAction(LLAssetType::EType asset_type,
+									   const LLUUID& uuid,LLInventoryModel* model);
+
+	static void		doAction(LLAssetType::EType asset_type,
+									   const LLUUID& uuid,LLInventoryModel* model);
+
+	virtual void	doIt() {  };
+	virtual ~LLInvFVBridgeAction(){}//need this because of warning on OSX
+protected:
+	LLInvFVBridgeAction(const LLUUID& id,LLInventoryModel* model):mUUID(id),mModel(model){}
+
+	LLViewerInventoryItem* getItem() const;
+protected:
+	const LLUUID& mUUID;	// item id
+	LLInventoryModel* mModel;
+
+};
+
+
+
+class LLTextureBridgeAction: public LLInvFVBridgeAction
+{
+	friend class LLInvFVBridgeAction;
+public:
+	virtual void	doIt() ;
+	virtual ~LLTextureBridgeAction(){}
+protected:
+	LLTextureBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
+
+};
+
+
+class LLSoundBridgeAction: public LLInvFVBridgeAction
+{
+	friend class LLInvFVBridgeAction;
+public:
+	virtual void	doIt() ;
+	virtual ~LLSoundBridgeAction(){}
+protected:
+	LLSoundBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
+
+};
+
+
+class LLLandmarkBridgeAction: public LLInvFVBridgeAction
+{
+	friend class LLInvFVBridgeAction;
+public:
+	virtual void	doIt() ;
+	virtual ~LLLandmarkBridgeAction(){}
+protected:
+	LLLandmarkBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
+
+};
+
+
+class LLCallingCardBridgeAction: public LLInvFVBridgeAction
+{
+	friend class LLInvFVBridgeAction;
+public:
+	virtual void	doIt() ;
+	virtual ~LLCallingCardBridgeAction(){}
+protected:
+	LLCallingCardBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
+
+};
+
+
+class LLNotecardBridgeAction: public LLInvFVBridgeAction
+{
+	friend class LLInvFVBridgeAction;
+public:
+	virtual void	doIt() ;
+	virtual ~LLNotecardBridgeAction(){}
+protected:
+	LLNotecardBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
+
+};
+
+
+class LLGestureBridgeAction: public LLInvFVBridgeAction
+{
+	friend class LLInvFVBridgeAction;
+public:
+	virtual void	doIt() ;
+	virtual ~LLGestureBridgeAction(){}
+protected:
+	LLGestureBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
+
+};
+
+
+class LLAnimationBridgeAction: public LLInvFVBridgeAction
+{
+	friend class LLInvFVBridgeAction;
+public:
+	virtual void	doIt() ;
+	virtual ~LLAnimationBridgeAction(){}
+protected:
+	LLAnimationBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
+
+};
+
+
+class LLObjectBridgeAction: public LLInvFVBridgeAction
+{
+	friend class LLInvFVBridgeAction;
+public:
+	virtual void	doIt() ;
+	virtual ~LLObjectBridgeAction(){}
+protected:
+	LLObjectBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
+
+};
+
+
+class LLLSLTextBridgeAction: public LLInvFVBridgeAction
+{
+	friend class LLInvFVBridgeAction;
+public:
+	virtual void	doIt() ;
+	virtual ~LLLSLTextBridgeAction(){}
+protected:
+	LLLSLTextBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
+
+};
+
+
+class LLWearableBridgeAction: public LLInvFVBridgeAction
+{
+	friend class LLInvFVBridgeAction;
+public:
+	virtual void	doIt();
+	virtual ~LLWearableBridgeAction(){}
+protected:
+	LLWearableBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
+
+
+	BOOL isInTrash() const;
+	// return true if the item is in agent inventory. if false, it
+	// must be lost or in the inventory library.
+	BOOL isAgentInventory() const;
+
+	void wearOnAvatar();
+
+};
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index f98a3f9ee5..1176bf8735 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -112,7 +112,8 @@ const char* NEW_CATEGORY_NAMES[LLAssetType::AT_COUNT] =
 	"Uncompressed Images",	// AT_IMAGE_JPEG
 	"Animations",		// AT_ANIMATION
 	"Gestures",			// AT_GESTURE
-	"New Folder"		// AT_SIMSTATE
+	"New Folder",		// AT_SIMSTATE
+	"My Favorites"		//AT_FAVORITE
 };
 
 struct InventoryIDPtrLess
@@ -389,7 +390,8 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id,
 		name.assign(pname);
 	}
 	else if((preferred_type >= LLAssetType::AT_TEXTURE) &&
-			(preferred_type < LLAssetType::AT_SIMSTATE))
+			//why < LLAssetType::AT_SIMSTATE??? if preferred_type == LLAssetType::AT_SIMSTATE that will be handled above
+			(preferred_type < LLAssetType::AT_COUNT))
 	{
 		name.assign(NEW_CATEGORY_NAMES[preferred_type]);
 	}
diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp
index 326c511fcf..539d889c51 100644
--- a/indra/newview/lljoystickbutton.cpp
+++ b/indra/newview/lljoystickbutton.cpp
@@ -51,6 +51,10 @@
 
 static LLRegisterWidget<LLJoystickAgentSlide> r1("joystick_slide");
 static LLRegisterWidget<LLJoystickAgentTurn> r2("joystick_turn");
+static LLRegisterWidget<LLJoystickCameraRotate> r3("joystick_rotate");
+static LLRegisterWidget<LLJoystickCameraZoom> r4("joystick_zoom");
+static LLRegisterWidget<LLJoystickCameraTrack> r5("joystick_track");
+
 
 
 const F32 NUDGE_TIME = 0.25f;		// in seconds
@@ -59,15 +63,18 @@ const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed
 //
 // Public Methods
 //
-LLJoystick::LLJoystick(
-	const std::string& name, 
-	LLRect rect,
-	const std::string &default_image,
-	const std::string &selected_image,
-	EJoystickQuadrant initial_quadrant )
-	:	
-	LLButton(name, rect, default_image, selected_image, LLStringUtil::null, NULL, NULL),
-	mInitialQuadrant(initial_quadrant),
+void QuadrantNames::declareValues()
+{
+	declare("origin", JQ_ORIGIN);
+	declare("up", JQ_UP);
+	declare("down", JQ_DOWN);
+	declare("left", JQ_LEFT);
+	declare("right", JQ_RIGHT);
+}
+
+
+LLJoystick::LLJoystick(const LLJoystick::Params& p)
+:	LLButton(p),
 	mInitialOffset(0, 0),
 	mLastMouse(0, 0),
 	mFirstMouse(0, 0),
@@ -76,10 +83,10 @@ LLJoystick::LLJoystick(
 	mHorizSlopNear(0),
 	mHorizSlopFar(0),
 	mHeldDown(FALSE),
-	mHeldDownTimer()
+	mHeldDownTimer(),
+	mInitialQuadrant(p.quadrant)
 {
-	setHeldDownCallback(&LLJoystick::onHeldDown);
-	setCallbackUserData(this);
+	setHeldDownCallback(&LLJoystick::onBtnHeldDown, this);
 }
 
 
@@ -178,16 +185,14 @@ F32 LLJoystick::getElapsedHeldDownTime()
 }
 
 // static
-void LLJoystick::onHeldDown(void *userdata)
+void LLJoystick::onBtnHeldDown(void *userdata)
 {
 	LLJoystick *self = (LLJoystick *)userdata;
-
-	// somebody removed this function without checking the
-	// build. Removed 2007-03-26.
-	//llassert( gViewerWindow->hasMouseCapture( self ) );
-
-	self->mHeldDown = TRUE;
-	self->onHeldDown();
+	if (self)
+	{
+		self->mHeldDown = TRUE;
+		self->onHeldDown();
+	}
 }
 
 EJoystickQuadrant LLJoystick::selectQuadrant(LLXMLNodePtr node)
@@ -246,23 +251,6 @@ EJoystickQuadrant LLJoystick::quadrantFromName(const std::string& sQuadrant)
 }
 
 
-LLXMLNodePtr LLJoystick::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("halign", TRUE)->setStringValue(LLFontGL::nameFromHAlign(getHAlign()));
-	node->createChild("quadrant", TRUE)->setStringValue(nameFromQuadrant(mInitialQuadrant));
-
-	addImageAttributeToXML(node,getImageUnselectedName(),getImageUnselectedID(),std::string("image_unselected"));
-	addImageAttributeToXML(node,getImageSelectedName(),getImageSelectedID(),std::string("image_selected"));
-	
-	node->createChild("scale_image", TRUE)->setBoolValue(getScaleImage());
-
-	return node;
-}
-
-
-
 //-------------------------------------------------------------------------------
 // LLJoystickAgentTurn
 //-------------------------------------------------------------------------------
@@ -327,46 +315,6 @@ void LLJoystickAgentTurn::onHeldDown()
 	}
 }
 
-LLView* LLJoystickAgentTurn::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("button");
-	node->getAttributeString("name", name);
-
-	std::string	image_unselected;
-	if (node->hasAttribute("image_unselected")) node->getAttributeString("image_unselected",image_unselected);
-	
-	std::string	image_selected;
-	if (node->hasAttribute("image_selected")) node->getAttributeString("image_selected",image_selected);
-
-	EJoystickQuadrant quad = JQ_ORIGIN;
-	if (node->hasAttribute("quadrant")) quad = selectQuadrant(node);
-	
-	LLJoystickAgentTurn *button = new LLJoystickAgentTurn(name, 
-		LLRect(),
-		image_unselected,
-		image_selected,
-		quad);
-
-	if (node->hasAttribute("halign"))
-	{
-		LLFontGL::HAlign halign = selectFontHAlign(node);
-		button->setHAlign(halign);
-	}
-
-	if (node->hasAttribute("scale_image"))
-	{
-		BOOL	needsScale = FALSE;
-		node->getAttributeBOOL("scale_image",needsScale);
-		button->setScaleImage( needsScale );
-	}
-
-	button->initFromXML(node, parent);
-	
-	return button;
-}
-
-
-
 //-------------------------------------------------------------------------------
 // LLJoystickAgentSlide
 //-------------------------------------------------------------------------------
@@ -435,54 +383,12 @@ void LLJoystickAgentSlide::onHeldDown()
 }
 
 
-// static
-LLView* LLJoystickAgentSlide::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("button");
-	node->getAttributeString("name", name);
-
-	std::string	image_unselected;
-	if (node->hasAttribute("image_unselected")) node->getAttributeString("image_unselected",image_unselected);
-	
-	std::string	image_selected;
-	if (node->hasAttribute("image_selected")) node->getAttributeString("image_selected",image_selected);
-	
-	
-	EJoystickQuadrant quad = JQ_ORIGIN;
-	if (node->hasAttribute("quadrant")) quad = selectQuadrant(node);
-	
-	LLJoystickAgentSlide *button = new LLJoystickAgentSlide(name, 
-		LLRect(),
-		image_unselected,
-		image_selected,
-		quad);
-
-	if (node->hasAttribute("halign"))
-	{
-		LLFontGL::HAlign halign = selectFontHAlign(node);
-		button->setHAlign(halign);
-	}
-
-	if (node->hasAttribute("scale_image"))
-	{
-		BOOL	needsScale = FALSE;
-		node->getAttributeBOOL("scale_image",needsScale);
-		button->setScaleImage( needsScale );
-	}
-	
-	button->initFromXML(node, parent);
-	
-	return button;
-}
-
-
 //-------------------------------------------------------------------------------
 // LLJoystickCameraRotate
 //-------------------------------------------------------------------------------
 
-LLJoystickCameraRotate::LLJoystickCameraRotate(const std::string& name, LLRect rect, const std::string &out_img, const std::string &in_img)
-	: 
-	LLJoystick(name, rect, out_img, in_img, JQ_ORIGIN),
+LLJoystickCameraRotate::LLJoystickCameraRotate(const LLJoystickCameraRotate::Params& p)
+:	LLJoystick(p), 
 	mInLeft( FALSE ),
 	mInTop( FALSE ),
 	mInRight( FALSE ),
@@ -636,6 +542,13 @@ void LLJoystickCameraRotate::draw()
 	{
 		drawDebugRect();
 	}
+
+	//// *HACK: also draw debug rectangles around currently-being-edited LLView, and any elements that are being highlighted by GUI preview code (see LLFloaterUIPreview)
+	//std::set<LLView*>::iterator iter = std::find(sPreviewHighlightedElements.begin(), sPreviewHighlightedElements.end(), this);
+	//if ((sEditingUI && this == sEditingUIView) || (iter != sPreviewHighlightedElements.end() && sDrawPreviewHighlights))
+	//{
+	//	drawDebugRect();
+	//}
 }
 
 // Draws image rotated by multiples of 90 degrees
@@ -679,6 +592,15 @@ void LLJoystickCameraRotate::drawRotatedImage( LLImageGL* image, S32 rotations )
 // LLJoystickCameraTrack
 //-------------------------------------------------------------------------------
 
+LLJoystickCameraTrack::Params::Params()
+{
+	held_down_delay.seconds(0.0);
+}
+
+LLJoystickCameraTrack::LLJoystickCameraTrack(const LLJoystickCameraTrack::Params& p)
+:	LLJoystickCameraRotate(p)
+{}
+
 
 void LLJoystickCameraTrack::onHeldDown()
 {
@@ -717,17 +639,15 @@ void LLJoystickCameraTrack::onHeldDown()
 // LLJoystickCameraZoom
 //-------------------------------------------------------------------------------
 
-LLJoystickCameraZoom::LLJoystickCameraZoom(const std::string& name, LLRect rect, const std::string &out_img, const std::string &plus_in_img, const std::string &minus_in_img)
-	: 
-	LLJoystick(name, rect, out_img, LLStringUtil::null, JQ_ORIGIN),
+LLJoystickCameraZoom::LLJoystickCameraZoom(const LLJoystickCameraZoom::Params& p)
+:	LLJoystick(p),
 	mInTop( FALSE ),
-	mInBottom( FALSE )
+	mInBottom( FALSE ),
+	mPlusInImage(p.plus_image),
+	mMinusInImage(p.minus_image)
 {
-	mPlusInImage = LLUIImageList::getInstance()->getUIImage(plus_in_img);
-	mMinusInImage = LLUIImageList::getInstance()->getUIImage(minus_in_img);
 }
 
-
 BOOL LLJoystickCameraZoom::handleMouseDown(S32 x, S32 y, MASK mask)
 {
 	BOOL handled = LLJoystick::handleMouseDown(x, y, mask);
@@ -808,6 +728,13 @@ void LLJoystickCameraZoom::draw()
 	{
 		drawDebugRect();
 	}
+
+	//// *HACK: also draw debug rectangles around currently-being-edited LLView, and any elements that are being highlighted by GUI preview code (see LLFloaterUIPreview)
+	//std::set<LLView*>::iterator iter = std::find(sPreviewHighlightedElements.begin(), sPreviewHighlightedElements.end(), this);
+	//if ((sEditingUI && this == sEditingUIView) || (iter != sPreviewHighlightedElements.end() && sDrawPreviewHighlights))
+	//{
+	//	drawDebugRect();
+	//}
 }
 
 void LLJoystickCameraZoom::updateSlop()
diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h
index 076a506f14..954a8c481d 100644
--- a/indra/newview/lljoystickbutton.h
+++ b/indra/newview/lljoystickbutton.h
@@ -46,11 +46,27 @@ typedef enum e_joystick_quadrant
 	JQ_RIGHT
 } EJoystickQuadrant;
 
+struct QuadrantNames : public LLInitParam::TypeValuesHelper<EJoystickQuadrant, QuadrantNames>
+{
+	static void declareValues();
+};
+
 class LLJoystick
 :	public LLButton
 {
 public:
-	LLJoystick(const std::string& name, LLRect rect,	const std::string &default_image,	const std::string &selected_image, EJoystickQuadrant initial);
+	struct Params 
+	:	public LLInitParam::Block<Params, LLButton::Params>
+	{
+		Optional<EJoystickQuadrant, QuadrantNames> quadrant;
+
+		Params()
+		:	quadrant("quadrant", JQ_ORIGIN)
+		{
+			label("");
+		}
+	};
+	LLJoystick(const Params&);
 
 	virtual BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
@@ -60,10 +76,9 @@ public:
 	virtual void	onHeldDown() = 0;
 	F32				getElapsedHeldDownTime();
 
-	static void		onHeldDown(void *userdata);		// called by llbutton callback handler
+	static void		onBtnHeldDown(void *userdata);		// called by llbutton callback handler
 	void            setInitialQuadrant(EJoystickQuadrant initial) { mInitialQuadrant = initial; };
 	
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
 	static std::string nameFromQuadrant(const EJoystickQuadrant quadrant);
 	static EJoystickQuadrant quadrantFromName(const std::string& name);
 	static EJoystickQuadrant selectQuadrant(LLXMLNodePtr node);
@@ -91,14 +106,9 @@ class LLJoystickAgentTurn
 :	public LLJoystick
 {
 public:
-	LLJoystickAgentTurn(const std::string& name, LLRect rect, const std::string &default_image, const std::string &selected_image, EJoystickQuadrant initial)
-		: LLJoystick(name, rect, default_image, selected_image, initial)
-	{ }
-
+	struct Params : public LLJoystick::Params {};
+	LLJoystickAgentTurn(const Params& p) : LLJoystick(p) {}
 	virtual void	onHeldDown();
-
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
 };
 
 
@@ -107,14 +117,11 @@ class LLJoystickAgentSlide
 :	public LLJoystick
 {
 public:
-	LLJoystickAgentSlide(const std::string& name, LLRect rect, const std::string &default_image, const std::string &selected_image, EJoystickQuadrant initial)
-		: LLJoystick(name, rect, default_image, selected_image, initial)
-	{ }
-	
+	struct Params : public LLJoystick::Params {};
+	LLJoystickAgentSlide(const Params& p) : LLJoystick(p) {}
+
 	virtual void	onHeldDown();
 	virtual void	onMouseUp();
-
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
 };
 
 
@@ -123,7 +130,16 @@ class LLJoystickCameraRotate
 :	public LLJoystick
 {
 public:
-	LLJoystickCameraRotate(const std::string& name, LLRect rect, const std::string &out_img, const std::string &in_img);
+	struct Params 
+	:	public LLInitParam::Block<Params, LLJoystick::Params>
+	{
+		Params()
+		{
+			held_down_delay.seconds(0.0);
+		}
+	};
+
+	LLJoystickCameraRotate(const LLJoystickCameraRotate::Params&);
 
 	virtual void	setToggleState( BOOL left, BOOL top, BOOL right, BOOL bottom );
 
@@ -149,10 +165,13 @@ class LLJoystickCameraTrack
 :	public LLJoystickCameraRotate
 {
 public:
-	LLJoystickCameraTrack(const std::string& name, LLRect rect, const std::string &out_img, const std::string &in_img)
-		: LLJoystickCameraRotate(name, rect, out_img, in_img)
-	{ }
+	struct Params 
+	:	public LLInitParam::Block<Params, LLJoystickCameraRotate::Params>
+	{
+		Params();
+	};
 
+	LLJoystickCameraTrack(const LLJoystickCameraTrack::Params&);
 	virtual void	onHeldDown();
 };
 
@@ -162,7 +181,20 @@ class LLJoystickCameraZoom
 :	public LLJoystick
 {
 public:
-	LLJoystickCameraZoom(const std::string& name, LLRect rect, const std::string &out_img, const std::string &plus_in_img, const std::string &minus_in_img);
+	struct Params 
+	:	public LLInitParam::Block<Params, LLJoystick::Params>
+	{
+		Optional<LLUIImage*>	plus_image;
+		Optional<LLUIImage*>	minus_image;
+
+		Params()
+		: plus_image ("plus_image", NULL),
+		  minus_image ("minus_image", NULL)
+		{
+			held_down_delay.seconds(0.0);
+		}
+	};
+	LLJoystickCameraZoom(const Params&);
 
 	virtual void	setToggleState( BOOL top, BOOL bottom );
 
diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp
new file mode 100644
index 0000000000..ab3256a186
--- /dev/null
+++ b/indra/newview/lllocationhistory.cpp
@@ -0,0 +1,130 @@
+/** 
+ * @file lllocationhistory.cpp
+ * @brief Typed locations history
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "lllocationhistory.h"
+
+#include <iomanip> // for std::setw()
+
+LLLocationHistory::LLLocationHistory() :
+	mFilename("typed_locations.txt"),
+	mLoadedCallback(NULL)
+{
+}
+
+void LLLocationHistory::addItem(std::string item)
+{
+	mItems.push_back(item);
+
+	// If the vector size exceeds the maximum, purge the oldest items.
+	if (mItems.size() > MAX_ITEMS)
+		mItems.erase(mItems.begin(), mItems.end()-MAX_ITEMS);
+}
+
+
+bool LLLocationHistory::getMatchingItems(std::string substring, location_list_t& result) const
+{
+	// *TODO: an STL algorithm would look nicer
+	result.clear();
+
+	std::string needle = substring;
+	LLStringUtil::toLower(needle);
+
+	for (location_list_t::const_iterator it = mItems.begin(); it != mItems.end(); ++it)
+	{
+		std::string haystack = *it;
+		LLStringUtil::toLower(haystack);
+
+		if (haystack.find(needle) != std::string::npos)
+			result.push_back(*it);
+	}
+	
+	return result.size();
+}
+
+void LLLocationHistory::dump() const
+{
+	llinfos << "Location history dump:" << llendl;
+	int i = 0;
+	for (location_list_t::const_iterator it = mItems.begin(); it != mItems.end(); ++it, ++i)
+	{
+	    llinfos << "#" << std::setw(2) << std::setfill('0') << i << ": " << *it << llendl;
+	}
+}
+
+void LLLocationHistory::save() const
+{
+	// build filename for each user
+	std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename);
+
+	// open a file for writing
+	llofstream file (resolved_filename);
+	if (!file.is_open())
+	{
+		llwarns << "can't open location history file \"" << mFilename << "\" for writing" << llendl;
+		return;
+	}
+
+	for (location_list_t::const_iterator it = mItems.begin(); it != mItems.end(); ++it)
+		file << (*it) << std::endl;
+
+	file.close();
+}
+
+void LLLocationHistory::load()
+{
+	llinfos << "Loading location history." << llendl;
+	
+	// build filename for each user
+	std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename);
+	llifstream file(resolved_filename);
+
+	if (!file.is_open())
+	{
+		llwarns << "can't load location history from file \"" << mFilename << "\"" << llendl;
+		return;
+	}
+	
+	// remove current entries before we load over them
+	mItems.clear();
+	
+	// add each line in the file to the list
+	std::string line;
+	while (std::getline(file, line))
+		addItem(line);
+
+	file.close();
+	
+	if (mLoadedCallback)
+		mLoadedCallback();
+}
diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h
new file mode 100644
index 0000000000..ea27d755fa
--- /dev/null
+++ b/indra/newview/lllocationhistory.h
@@ -0,0 +1,69 @@
+/** 
+ * @file llocationhistory.h
+ * @brief Typed locations history
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLLOCATIONHISTORY_H
+#define LL_LLLOCATIONHISTORY_H
+
+#include "llsingleton.h" // for LLSingleton
+
+#include <vector>
+#include <string>
+#include <boost/function.hpp>
+
+class LLLocationHistory: public LLSingleton<LLLocationHistory>
+{
+	LOG_CLASS(LLLocationHistory);
+
+public:
+	typedef std::vector<std::string>	location_list_t;
+	typedef boost::function<void()>		loaded_callback_t;
+	
+	LLLocationHistory();
+	
+	void					addItem(std::string item);
+	size_t					getItemCount() const	{ return mItems.size(); }
+	const location_list_t&	getItems() const		{ return mItems; }
+	bool					getMatchingItems(std::string substring, location_list_t& result) const;
+	void					setLoadedCallback(loaded_callback_t cb) { mLoadedCallback = cb; }
+	
+	void					save() const;
+	void					load();
+	void					dump() const;
+
+private:
+	static const size_t			MAX_ITEMS = 10;
+	std::vector<std::string>	mItems;
+	std::string					mFilename; /// File to store the history to.
+	loaded_callback_t			mLoadedCallback;
+};
+
+#endif
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
new file mode 100644
index 0000000000..67bf2d7265
--- /dev/null
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -0,0 +1,1126 @@
+/** 
+ * @file lllocationinputmonitorctrl.cpp
+ * @brief Combobox-like location input control
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+// file includes
+#include "lllocationinputctrl.h"
+
+// common includes
+#include <llstring.h>
+#include <llcombobox.h>
+
+// newview includes
+#include "llbutton.h"
+#include "llkeyboard.h"
+#include "llscrolllistctrl.h"
+#include "llwindow.h"
+#include "llfloater.h"
+#include "llscrollbar.h"
+#include "llscrolllistcell.h"
+#include "llscrolllistitem.h"
+#include "llcontrol.h"
+#include "llfocusmgr.h"
+#include "lllineeditor.h"
+#include "v2math.h"
+#include "lluictrlfactory.h"
+
+// Globals
+static S32 MAX_COMBO_WIDTH = 500;
+
+static LLRegisterWidget<LLLocationInputCtrl> r("location_input");
+
+LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
+:	LLUICtrl(p),
+	mTextEntry(NULL),
+	mTextEntryTentative(TRUE),
+	mListPosition(BELOW),
+	mAllowTextEntry(p.allow_text_entry),
+	mSelectOnFocus(p.select_on_focus),
+	mHasAutocompletedText(false),
+	mMaxChars(p.max_chars),
+	mPrearrangeCallback(p.prearrange_callback()),
+	mTextEntryCallback(p.text_entry_callback()),
+	mSelectionCallback(p.selection_callback()),
+	mArrowImage(p.arrow_image)
+{
+	// Text label button
+
+	LLButton::Params button_params;
+	button_params.name(p.label);
+	button_params.image_unselected.name("square_btn_32x128.tga");
+	button_params.image_selected.name("square_btn_selected_32x128.tga");
+	button_params.image_disabled.name("square_btn_32x128.tga");
+	button_params.image_disabled_selected.name("square_btn_selected_32x128.tga");
+	button_params.image_overlay.name("combobox_arrow.tga");
+	button_params.image_overlay_alignment("right");
+	button_params.scale_image(true);
+	button_params.mouse_down_callback.function(boost::bind(&LLLocationInputCtrl::onButtonDown, this));
+	button_params.font(LLFontGL::getFontSansSerifSmall());
+	button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT);
+	button_params.font_halign(LLFontGL::LEFT);
+	button_params.rect(p.rect);
+	button_params.pad_right(2);
+
+	mButton = LLUICtrlFactory::create<LLButton>(button_params);
+	mButton->setRightHPad(2);  //redo to compensate for button hack that leaves space for a character
+	addChild(mButton);
+
+	LLScrollListCtrl::Params params;
+	params.name ("LocationInput");
+	params.commit_callback.function(boost::bind(&LLLocationInputCtrl::onItemSelected, this, _2));
+	params.visible(false);
+	params.bg_writeable_color(LLColor4::white);
+	params.commit_on_keyboard_movement(false);
+
+	mList = LLUICtrlFactory::create<LLScrollListCtrl>(params);
+	addChild(mList);
+
+	for (LLInitParam::ParamIterator<LLScrollListItem::Params>::const_iterator it = p.items().begin();
+		it != p.items().end();
+		++it)
+	{
+		mList->addRow(*it);
+	}
+
+	setTopLostCallback(boost::bind(&LLLocationInputCtrl::hideList, this));
+}
+	
+LLLocationInputCtrl::~LLLocationInputCtrl()
+{
+	// children automatically deleted, including mMenu, mButton
+}
+
+void LLLocationInputCtrl::setEnabled(BOOL enabled)
+{
+	LLView::setEnabled(enabled);
+	mButton->setEnabled(enabled);
+}
+
+void LLLocationInputCtrl::clear()
+{ 
+	if (mTextEntry)
+	{
+		mTextEntry->setText(LLStringUtil::null);
+	}
+	mButton->setLabelSelected(LLStringUtil::null);
+	mButton->setLabelUnselected(LLStringUtil::null);
+	mButton->setDisabledLabel(LLStringUtil::null);
+	mButton->setDisabledSelectedLabel(LLStringUtil::null);
+	mList->deselectAllItems();
+}
+
+void LLLocationInputCtrl::onCommit()
+{
+	if (mAllowTextEntry && getCurrentIndex() != -1)
+	{
+		// we have selected an existing item, blitz the manual text entry with
+		// the properly capitalized item
+		mTextEntry->setValue(getSimple());
+		mTextEntry->setTentative(FALSE);
+	}
+	LLUICtrl::onCommit();
+}
+
+// virtual
+BOOL LLLocationInputCtrl::isDirty() const
+{
+	BOOL grubby = FALSE;
+	if ( mList )
+	{
+		grubby = mList->isDirty();
+	}
+	return grubby;
+}
+
+// virtual   Clear dirty state
+void	LLLocationInputCtrl::resetDirty()
+{
+	if ( mList )
+	{
+		mList->resetDirty();
+	}
+}
+
+
+// add item "name" to menu
+LLScrollListItem* LLLocationInputCtrl::add(const std::string& name, EAddPosition pos, BOOL enabled)
+{
+	LLScrollListItem* item = mList->addSimpleElement(name, pos);
+	item->setEnabled(enabled);
+	if (!mAllowTextEntry && mLabel.empty())
+	{
+		selectFirstItem();
+	}
+	return item;
+}
+
+// add item "name" with a unique id to menu
+LLScrollListItem* LLLocationInputCtrl::add(const std::string& name, const LLUUID& id, EAddPosition pos, BOOL enabled )
+{
+	LLScrollListItem* item = mList->addSimpleElement(name, pos, id);
+	item->setEnabled(enabled);
+	if (!mAllowTextEntry && mLabel.empty())
+	{
+		selectFirstItem();
+	}
+	return item;
+}
+
+// add item "name" with attached userdata
+LLScrollListItem* LLLocationInputCtrl::add(const std::string& name, void* userdata, EAddPosition pos, BOOL enabled )
+{
+	LLScrollListItem* item = mList->addSimpleElement(name, pos);
+	item->setEnabled(enabled);
+	item->setUserdata( userdata );
+	if (!mAllowTextEntry && mLabel.empty())
+	{
+		selectFirstItem();
+	}
+	return item;
+}
+
+// add item "name" with attached generic data
+LLScrollListItem* LLLocationInputCtrl::add(const std::string& name, LLSD value, EAddPosition pos, BOOL enabled )
+{
+	LLScrollListItem* item = mList->addSimpleElement(name, pos, value);
+	item->setEnabled(enabled);
+	if (!mAllowTextEntry && mLabel.empty())
+	{
+		selectFirstItem();
+	}
+	return item;
+}
+
+LLScrollListItem* LLLocationInputCtrl::addSeparator(EAddPosition pos)
+{
+	return mList->addSeparator(pos);
+}
+
+void LLLocationInputCtrl::sortByName(BOOL ascending)
+{
+	mList->sortOnce(0, ascending);
+}
+
+
+// Choose an item with a given name in the menu.
+// Returns TRUE if the item was found.
+BOOL LLLocationInputCtrl::setSimple(const LLStringExplicit& name)
+{
+	BOOL found = mList->selectItemByLabel(name, FALSE);
+
+	if (found)
+	{
+		setLabel(name);
+	}
+
+	return found;
+}
+
+// virtual
+void LLLocationInputCtrl::setValue(const LLSD& value)
+{
+	BOOL found = mList->selectByValue(value);
+	if (found)
+	{
+		LLScrollListItem* item = mList->getFirstSelected();
+		if (item)
+		{
+			setLabel( mList->getSelectedItemLabel() );
+		}
+	}
+}
+
+const std::string LLLocationInputCtrl::getSimple() const
+{
+	const std::string res = mList->getSelectedItemLabel();
+	if (res.empty() && mAllowTextEntry)
+	{
+		return mTextEntry->getText();
+	}
+	else
+	{
+		return res;
+	}
+}
+
+const std::string LLLocationInputCtrl::getSelectedItemLabel(S32 column) const
+{
+	return mList->getSelectedItemLabel(column);
+}
+
+// virtual
+LLSD LLLocationInputCtrl::getValue() const
+{
+	LLScrollListItem* item = mList->getFirstSelected();
+	if( item )
+	{
+		return item->getValue();
+	}
+	else if (mAllowTextEntry)
+	{
+		return mTextEntry->getValue();
+	}
+	else
+	{
+		return LLSD();
+	}
+}
+
+void LLLocationInputCtrl::setLabel(const LLStringExplicit& name)
+{
+	if ( mTextEntry )
+	{
+		mTextEntry->setText(name);
+		if (mList->selectItemByLabel(name, FALSE))
+		{
+			mTextEntry->setTentative(FALSE);
+		}
+		else
+		{
+			mTextEntry->setTentative(mTextEntryTentative);
+		}
+	}
+	
+	if (!mAllowTextEntry)
+	{
+		mButton->setLabelUnselected(name);
+		mButton->setLabelSelected(name);
+		mButton->setDisabledLabel(name);
+		mButton->setDisabledSelectedLabel(name);
+	}
+}
+
+
+BOOL LLLocationInputCtrl::remove(const std::string& name)
+{
+	BOOL found = mList->selectItemByLabel(name);
+
+	if (found)
+	{
+		LLScrollListItem* item = mList->getFirstSelected();
+		if (item)
+		{
+			mList->deleteSingleItem(mList->getItemIndex(item));
+		}
+	}
+
+	return found;
+}
+
+BOOL LLLocationInputCtrl::remove(S32 index)
+{
+	if (index < mList->getItemCount())
+	{
+		mList->deleteSingleItem(index);
+		return TRUE;
+	}
+	return FALSE;
+}
+
+// Keyboard focus lost.
+void LLLocationInputCtrl::onFocusLost()
+{
+	hideList();
+	// if valid selection
+	if (mAllowTextEntry && getCurrentIndex() != -1)
+	{
+		mTextEntry->selectAll();
+	}
+	LLUICtrl::onFocusLost();
+}
+
+void LLLocationInputCtrl::setButtonVisible(BOOL visible)
+{
+	static LLUICachedControl<S32> drop_shadow_button ("DropShadowButton", 0);
+
+	mButton->setVisible(visible);
+	if (mTextEntry)
+	{
+		LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
+		if (visible)
+		{
+			text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth()) + 2 * drop_shadow_button;
+		}
+		//mTextEntry->setRect(text_entry_rect);
+		mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE);
+	}
+}
+
+/*virtual*/
+BOOL LLLocationInputCtrl::postBuild()
+{
+	// If providing user text entry or descriptive label don't select an item under the hood
+	if (!acceptsTextInput() && mLabel.empty())
+	{
+		selectFirstItem();
+	}
+	updateLayout();
+	return TRUE;
+}
+
+void LLLocationInputCtrl::draw()
+{
+	mButton->setEnabled(getEnabled() /*&& !mList->isEmpty()*/);
+
+	// Draw children normally
+	LLUICtrl::draw();
+}
+
+BOOL LLLocationInputCtrl::setCurrentByIndex( S32 index )
+{
+	BOOL found = mList->selectNthItem( index );
+	if (found)
+	{
+		setLabel(mList->getSelectedItemLabel());
+	}
+	return found;
+}
+
+S32 LLLocationInputCtrl::getCurrentIndex() const
+{
+	LLScrollListItem* item = mList->getFirstSelected();
+	if( item )
+	{
+		return mList->getItemIndex( item );
+	}
+	return -1;
+}
+
+
+void LLLocationInputCtrl::updateLayout()
+{
+	static LLUICachedControl<S32> drop_shadow_button ("DropShadowButton", 0);
+	LLRect rect = getLocalRect();
+	if (mAllowTextEntry)
+	{
+		S32 shadow_size = drop_shadow_button;
+		mButton->setRect(LLRect( getRect().getWidth() - llmax(8,mArrowImage->getWidth()) - 2 * shadow_size,
+								rect.mTop, rect.mRight, rect.mBottom));
+		mButton->setTabStop(FALSE);
+		mButton->setHAlign(LLFontGL::HCENTER);
+
+		if (!mTextEntry)
+		{
+			LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
+			text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth()) + 2 * drop_shadow_button;
+			// clear label on button
+			std::string cur_label = mButton->getLabelSelected();
+			LLLineEditor::Params params;
+			params.name ("combo_text_entry");
+			params.rect (text_entry_rect);
+			params.default_text (LLStringUtil::null);
+			params.font (LLFontGL::getFontSansSerifSmall());
+			params.max_length_bytes (mMaxChars);
+			params.commit_callback.function(boost::bind(&LLLocationInputCtrl::onTextCommit, this, _2));
+			params.keystroke_callback (boost::bind(&LLLocationInputCtrl::onTextEntry, this, _1));
+			params.focus_lost_callback (NULL);
+			params.select_on_focus (mSelectOnFocus);
+			params.handle_edit_keys_directly (true);
+			params.commit_on_focus_lost (false);
+			params.follows.flags (FOLLOWS_ALL);
+			mTextEntry = LLUICtrlFactory::create<LLLineEditor> (params);
+			mTextEntry->setText(cur_label);
+			mTextEntry->setIgnoreTab(TRUE);
+			mTextEntry->setRevertOnEsc(FALSE);
+			//mTextEntry->setFocusReceivedCallback(boost::bind(&LLLocationInputCtrl::hideList, this));
+			addChild(mTextEntry);
+		}
+		else
+		{
+			mTextEntry->setVisible(TRUE);
+			mTextEntry->setMaxTextLength(mMaxChars);
+		}
+
+		// clear label on button
+		setLabel(LLStringUtil::null);
+
+		mButton->setFollows(FOLLOWS_BOTTOM | FOLLOWS_TOP | FOLLOWS_RIGHT);
+	}
+	else if (!mAllowTextEntry)
+	{
+		mButton->setRect(rect);
+		mButton->setTabStop(TRUE);
+		mButton->setHAlign(LLFontGL::LEFT);
+
+		if (mTextEntry)
+		{
+			mTextEntry->setVisible(FALSE);
+		}
+		mButton->setFollowsAll();
+	}
+}
+
+void* LLLocationInputCtrl::getCurrentUserdata()
+{
+	LLScrollListItem* item = mList->getFirstSelected();
+	if( item )
+	{
+		return item->getUserdata();
+	}
+	return NULL;
+}
+
+
+void LLLocationInputCtrl::showList()
+{
+	// Make sure we don't go off top of screen.
+	LLCoordWindow window_size;
+	getWindow()->getSize(&window_size);
+	//HACK: shouldn't have to know about scale here
+	mList->fitContents( 192, llfloor((F32)window_size.mY / LLUI::sGLScaleFactor.mV[VY]) - 50 );
+
+	// Make sure that we can see the whole list
+	LLRect root_view_local;
+	LLView* root_view = getRootView();
+	root_view->localRectToOtherView(root_view->getLocalRect(), &root_view_local, this);
+	
+	LLRect rect = mList->getRect();
+
+	S32 min_width = getRect().getWidth();
+	S32 max_width = llmax(min_width, MAX_COMBO_WIDTH);
+	// make sure we have up to date content width metrics
+	mList->calcColumnWidths();
+	S32 list_width = llclamp(mList->getMaxContentWidth(), min_width, max_width);
+
+	if (mListPosition == BELOW)
+	{
+		if (rect.getHeight() <= -root_view_local.mBottom)
+		{
+			// Move rect so it hangs off the bottom of this view
+			rect.setLeftTopAndSize(0, 0, list_width, rect.getHeight() );
+		}
+		else
+		{	
+			// stack on top or bottom, depending on which has more room
+			if (-root_view_local.mBottom > root_view_local.mTop - getRect().getHeight())
+			{
+				// Move rect so it hangs off the bottom of this view
+				rect.setLeftTopAndSize(0, 0, list_width, llmin(-root_view_local.mBottom, rect.getHeight()));
+			}
+			else
+			{
+				// move rect so it stacks on top of this view (clipped to size of screen)
+				rect.setOriginAndSize(0, getRect().getHeight(), list_width, llmin(root_view_local.mTop - getRect().getHeight(), rect.getHeight()));
+			}
+		}
+	}
+	else // ABOVE
+	{
+		if (rect.getHeight() <= root_view_local.mTop - getRect().getHeight())
+		{
+			// move rect so it stacks on top of this view (clipped to size of screen)
+			rect.setOriginAndSize(0, getRect().getHeight(), list_width, llmin(root_view_local.mTop - getRect().getHeight(), rect.getHeight()));
+		}
+		else
+		{
+			// stack on top or bottom, depending on which has more room
+			if (-root_view_local.mBottom > root_view_local.mTop - getRect().getHeight())
+			{
+				// Move rect so it hangs off the bottom of this view
+				rect.setLeftTopAndSize(0, 0, list_width, llmin(-root_view_local.mBottom, rect.getHeight()));
+			}
+			else
+			{
+				// move rect so it stacks on top of this view (clipped to size of screen)
+				rect.setOriginAndSize(0, getRect().getHeight(), list_width, llmin(root_view_local.mTop - getRect().getHeight(), rect.getHeight()));
+			}
+		}
+
+	}
+	mList->setOrigin(rect.mLeft, rect.mBottom);
+	mList->reshape(rect.getWidth(), rect.getHeight());
+	mList->translateIntoRect(root_view_local, FALSE);
+
+	// Make sure we didn't go off bottom of screen
+	S32 x, y;
+	mList->localPointToScreen(0, 0, &x, &y);
+
+	if (y < 0)
+	{
+		mList->translate(0, -y);
+	}
+
+	// NB: this call will trigger the focuslost callback which will hide the list, so do it first
+	// before finally showing the list
+
+	mList->setFocus(TRUE);
+
+	// register ourselves as a "top" control
+	// effectively putting us into a special draw layer
+	// and not affecting the bounding rectangle calculation
+	gFocusMgr.setTopCtrl(this);
+
+	// Show the list and push the button down
+	mButton->setToggleState(TRUE);
+	mList->setVisible(TRUE);
+	
+	setUseBoundingRect(TRUE);
+}
+
+void LLLocationInputCtrl::hideList()
+{
+	//*HACK: store the original value explicitly somewhere, not just in label
+	std::string orig_selection = mAllowTextEntry ? mTextEntry->getText() : mButton->getLabelSelected();
+
+	// assert selection in list
+	mList->selectItemByLabel(orig_selection, FALSE);
+
+	mButton->setToggleState(FALSE);
+	mList->setVisible(FALSE);
+	mList->mouseOverHighlightNthItem(-1);
+	
+	setUseBoundingRect(FALSE);
+
+	if( gFocusMgr.getTopCtrl() == this )
+	{
+		gFocusMgr.setTopCtrl(NULL);
+	}
+}
+
+void LLLocationInputCtrl::onButtonDown()
+{
+	if (!mList->getVisible())
+	{
+#if 0 // XXX VS		
+		LLScrollListItem* last_selected_item = mList->getLastSelectedItem();
+		if (last_selected_item)
+		{
+			// highlight the original selection before potentially selecting a new item
+			mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item));
+		}
+#endif
+		
+		prearrangeList();
+
+		if (mList->getItemCount() != 0)
+		{
+			showList();
+		}
+
+		setFocus( TRUE );
+
+		// pass mouse capture on to list if button is depressed
+		if (mButton->hasMouseCapture())
+		{
+			gFocusMgr.setMouseCapture(mList);
+		}
+	}
+	else
+	{
+		hideList();
+		// XXX VS
+		mTextEntry->setFocus(TRUE);
+	} 
+
+}
+
+
+//------------------------------------------------------------------
+// static functions
+//------------------------------------------------------------------
+
+void LLLocationInputCtrl::onItemSelected(const LLSD& data)
+{
+	const std::string name = mList->getSelectedItemLabel();
+
+	S32 cur_id = getCurrentIndex();
+	if (cur_id != -1)
+	{
+		setLabel(name);
+
+		if (mAllowTextEntry)
+		{
+			gFocusMgr.setKeyboardFocus(mTextEntry);
+			mTextEntry->selectAll();
+		}
+	}
+
+	// hiding the list reasserts the old value stored in the text editor/dropdown button
+	hideList();
+
+	// commit does the reverse, asserting the value in the list
+	onCommit();
+
+	// call the callback if it exists
+	if(mSelectionCallback)
+	{
+		mSelectionCallback(this, data);
+	}
+}
+
+BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen)
+{
+    std::string tool_tip;
+
+	if(LLUICtrl::handleToolTip(x, y, msg, sticky_rect_screen))
+	{
+		return TRUE;
+	}
+	
+	if (LLUI::sShowXUINames)
+	{
+		tool_tip = getShowNamesToolTip();
+	}
+	else
+	{
+		tool_tip = getToolTip();
+		if (tool_tip.empty())
+		{
+			tool_tip = getSelectedItemLabel();
+		}
+	}
+	
+	if( !tool_tip.empty() )
+	{
+		msg = tool_tip;
+
+		// Convert rect local to screen coordinates
+		localPointToScreen( 
+			0, 0, 
+			&(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) );
+		localPointToScreen(
+			getRect().getWidth(), getRect().getHeight(),
+			&(sticky_rect_screen->mRight), &(sticky_rect_screen->mTop) );
+	}
+	return TRUE;
+}
+
+BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask)
+{
+	BOOL result = FALSE;
+	if (hasFocus())
+	{
+		if (mList->getVisible() 
+			&& key == KEY_ESCAPE && mask == MASK_NONE)
+		{
+			hideList();
+			// XXX VS
+			mTextEntry->setFocus(TRUE);
+			return TRUE;
+		}
+		//give list a chance to pop up and handle key
+		LLScrollListItem* last_selected_item = mList->getLastSelectedItem();
+		if (last_selected_item)
+		{
+			// highlight the original selection before potentially selecting a new item
+			mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item));
+		}
+		result = mList->handleKeyHere(key, mask);
+
+		// will only see return key if it is originating from line editor
+		// since the dropdown button eats the key
+		if (key == KEY_RETURN)
+		{
+			// don't show list and don't eat key input when committing
+			// free-form text entry with RETURN since user already knows
+            // what they are trying to select
+			return FALSE;
+		}
+		// if selection has changed, pop open list
+		// XXX VS
+#if 1
+		else if(key == KEY_DOWN && mList->getItemCount() != 0)
+#else
+		else if (mList->getLastSelectedItem() != last_selected_item)
+#endif
+		{
+			showList();
+		}
+		
+	}
+	return result;
+}
+
+BOOL LLLocationInputCtrl::handleUnicodeCharHere(llwchar uni_char)
+{
+	BOOL result = FALSE;
+	if (gFocusMgr.childHasKeyboardFocus(this))
+	{
+		// space bar just shows the list
+		if (' ' != uni_char )
+		{
+			LLScrollListItem* last_selected_item = mList->getLastSelectedItem();
+			if (last_selected_item)
+			{
+				// highlight the original selection before potentially selecting a new item
+				mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item));
+			}
+			result = mList->handleUnicodeCharHere(uni_char);
+			if (mList->getLastSelectedItem() != last_selected_item)
+			{
+				showList();
+			}
+		}
+	}
+	return result;
+}
+
+void LLLocationInputCtrl::setTextEntry(const LLStringExplicit& text)
+{
+	if (mTextEntry)
+	{
+		setText(text);
+		updateSelection();
+	}
+}
+
+/**
+ * Useful if we want to just set the text entry value, no matter what the list contains.
+ * 
+ * This is faster than setTextEntry().
+ */
+void LLLocationInputCtrl::setText(const LLStringExplicit& text)
+{
+	if (mTextEntry)
+		mTextEntry->setText(text);
+}
+
+void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor)
+{
+	if (mTextEntryCallback != NULL)
+	{
+		(mTextEntryCallback)(line_editor, LLSD());
+	}
+	
+	KEY key = gKeyboard->currentKey();
+	
+	// XXX VS
+	{
+		if (line_editor->getText().empty())
+		{
+			prearrangeList(); // resets filter
+			hideList();
+		}
+		// Moving cursor should not affect showing the list.
+		else if (key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END)
+		{
+			prearrangeList(line_editor->getText());
+			if (mList->getItemCount() != 0)
+			{
+				showList();
+			}
+			else
+			{
+				// Hide the list if it's empty.
+				hideList();
+			}
+			
+			mTextEntry->setFocus(TRUE);
+		}
+	}
+	
+	if (key == KEY_BACKSPACE || 
+		key == KEY_DELETE)
+	{
+		if (mList->selectItemByLabel(line_editor->getText(), FALSE))
+		{
+			line_editor->setTentative(FALSE);
+		}
+		else
+		{
+			line_editor->setTentative(mTextEntryTentative);
+			mList->deselectAllItems();
+		}
+		return;
+	}
+
+	if (key == KEY_LEFT || 
+		key == KEY_RIGHT)
+	{
+		return;
+	}
+	
+	if (key == KEY_DOWN)
+	{
+		setCurrentByIndex(llmin(getItemCount() - 1, getCurrentIndex() + 1));
+		if (!mList->getVisible())
+		{
+			prearrangeList();
+
+			if (mList->getItemCount() != 0)
+			{
+				showList();
+			}
+		}
+		line_editor->selectAll();
+		line_editor->setTentative(FALSE);
+	}
+	else
+	{
+		// RN: presumably text entry
+		updateSelection();
+	}
+}
+
+void LLLocationInputCtrl::updateSelection()
+{
+	LLWString left_wstring = mTextEntry->getWText().substr(0, mTextEntry->getCursor());
+	// user-entered portion of string, based on assumption that any selected
+    // text was a result of auto-completion
+	LLWString user_wstring = mHasAutocompletedText ? left_wstring : mTextEntry->getWText();
+	std::string full_string = mTextEntry->getText();
+
+	// go ahead and arrange drop down list on first typed character, even
+	// though we aren't showing it... some code relies on prearrange
+	// callback to populate content
+	if( mTextEntry->getWText().size() == 1 )
+	{
+		prearrangeList(mTextEntry->getText());
+	}
+
+	if (mList->selectItemByLabel(full_string, FALSE))
+	{
+		mTextEntry->setTentative(FALSE);
+	}
+	else if (mList->selectItemByPrefix(left_wstring, FALSE))
+	{
+		LLWString selected_item = utf8str_to_wstring(mList->getSelectedItemLabel());
+		LLWString wtext = left_wstring + selected_item.substr(left_wstring.size(), selected_item.size());
+		mTextEntry->setText(wstring_to_utf8str(wtext));
+		mTextEntry->setSelection(left_wstring.size(), mTextEntry->getWText().size());
+		mTextEntry->endSelection();
+		mTextEntry->setTentative(FALSE);
+		mHasAutocompletedText = TRUE;
+	}
+	else // no matching items found
+	{
+		mList->deselectAllItems();
+		mTextEntry->setText(wstring_to_utf8str(user_wstring)); // removes text added by autocompletion
+		mTextEntry->setTentative(mTextEntryTentative);
+		mHasAutocompletedText = FALSE;
+	}
+}
+
+void LLLocationInputCtrl::onTextCommit(const LLSD& data)
+{
+	std::string text = mTextEntry->getText();
+	setSimple(text);
+	onCommit();
+	mTextEntry->selectAll();
+}
+
+void LLLocationInputCtrl::setFocus(BOOL b)
+{
+	LLUICtrl::setFocus(b);
+
+	if (b)
+	{
+		mList->clearSearchString();
+		if (mList->getVisible())
+		{
+			mList->setFocus(TRUE);
+		}
+		else
+		{
+			mTextEntry->setFocus(TRUE);
+		}
+	}
+}
+
+//============================================================================
+// LLCtrlListInterface functions
+
+S32 LLLocationInputCtrl::getItemCount() const
+{
+	return mList->getItemCount();
+}
+
+void LLLocationInputCtrl::addColumn(const LLSD& column, EAddPosition pos)
+{
+	mList->clearColumns();
+	mList->addColumn(column, pos);
+}
+
+void LLLocationInputCtrl::clearColumns()
+{
+	mList->clearColumns();
+}
+
+void LLLocationInputCtrl::setColumnLabel(const std::string& column, const std::string& label)
+{
+	mList->setColumnLabel(column, label);
+}
+
+LLScrollListItem* LLLocationInputCtrl::addElement(const LLSD& value, EAddPosition pos, void* userdata)
+{
+	return mList->addElement(value, pos, userdata);
+}
+
+LLScrollListItem* LLLocationInputCtrl::addSimpleElement(const std::string& value, EAddPosition pos, const LLSD& id)
+{
+	return mList->addSimpleElement(value, pos, id);
+}
+
+void LLLocationInputCtrl::clearRows()
+{
+	mList->clearRows();
+}
+
+void LLLocationInputCtrl::sortByColumn(const std::string& name, BOOL ascending)
+{
+	mList->sortByColumn(name, ascending);
+}
+
+//============================================================================
+//LLCtrlSelectionInterface functions
+
+BOOL LLLocationInputCtrl::setCurrentByID(const LLUUID& id)
+{
+	BOOL found = mList->selectByID( id );
+
+	if (found)
+	{
+		setLabel(mList->getSelectedItemLabel());
+	}
+
+	return found;
+}
+
+LLUUID LLLocationInputCtrl::getCurrentID() const
+{
+	return mList->getStringUUIDSelectedItem();
+}
+BOOL LLLocationInputCtrl::setSelectedByValue(const LLSD& value, BOOL selected)
+{
+	BOOL found = mList->setSelectedByValue(value, selected);
+	if (found)
+	{
+		setLabel(mList->getSelectedItemLabel());
+	}
+	return found;
+}
+
+LLSD LLLocationInputCtrl::getSelectedValue()
+{
+	return mList->getSelectedValue();
+}
+
+BOOL LLLocationInputCtrl::isSelected(const LLSD& value) const
+{
+	return mList->isSelected(value);
+}
+
+BOOL LLLocationInputCtrl::operateOnSelection(EOperation op)
+{
+	if (op == OP_DELETE)
+	{
+		mList->deleteSelectedItems();
+		return TRUE;
+	}
+	return FALSE;
+}
+
+BOOL LLLocationInputCtrl::operateOnAll(EOperation op)
+{
+	if (op == OP_DELETE)
+	{
+		clearRows();
+		return TRUE;
+	}
+	return FALSE;
+}
+
+BOOL LLLocationInputCtrl::selectItemRange( S32 first, S32 last )
+{
+	return mList->selectItemRange(first, last);
+}
+
+void LLLocationInputCtrl::prearrangeList(std::string filter)
+{
+	if (mPrearrangeCallback)
+	{
+		mPrearrangeCallback(this, LLSD(filter));
+	}
+}
+
+//===========================================================================
+
+BOOL LLLocationInputCtrl::childHasFocus() const
+{
+	return LLUICtrl::hasFocus() || mButton->hasFocus() || mList->hasFocus() || mTextEntry->hasFocus();
+}
+
+BOOL LLLocationInputCtrl::canCut() const
+{
+	return mTextEntry ? mTextEntry->canCut() : false;
+}
+
+BOOL LLLocationInputCtrl::canCopy() const
+{
+	return mTextEntry ? mTextEntry->canCopy() : false;
+}
+
+BOOL LLLocationInputCtrl::canPaste() const
+{
+	return mTextEntry ? mTextEntry->canPaste() : false;
+}
+
+BOOL LLLocationInputCtrl::canDeselect() const
+{
+	return mTextEntry ? mTextEntry->canDeselect() : false;
+}
+
+BOOL LLLocationInputCtrl::canSelectAll() const
+{
+	return mTextEntry ? mTextEntry->canSelectAll() : false;
+}
+
+void LLLocationInputCtrl::cut()
+{
+	if (mTextEntry)
+		mTextEntry->cut();
+}
+
+void LLLocationInputCtrl::copy()
+{
+	if (mTextEntry)
+		mTextEntry->copy();
+}
+
+void LLLocationInputCtrl::paste()
+{
+	if (mTextEntry)
+		mTextEntry->paste();
+}
+
+void LLLocationInputCtrl::deleteSelection()
+{
+	if (mTextEntry)
+		mTextEntry->deleteSelection();
+}
+
+void LLLocationInputCtrl::selectAll()
+{
+	if (mTextEntry)
+		mTextEntry->selectAll();
+}
diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h
new file mode 100644
index 0000000000..07aa30295c
--- /dev/null
+++ b/indra/newview/lllocationinputctrl.h
@@ -0,0 +1,248 @@
+/** 
+ * @file lllocationinputmonitorctrl.h
+ * @brief Combobox-like location input control
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLLOCATIONINPUTCTRL_H
+#define LL_LLLOCATIONINPUTCTRL_H
+
+#include "llbutton.h"
+#include "lluictrl.h"
+#include "llctrlselectioninterface.h"
+#include "llimagegl.h"
+#include "llrect.h"
+#include "llscrolllistitem.h"
+#include <boost/function.hpp>
+
+// Classes
+class LLButton;
+class LLFontGL;
+class LLLineEditor;
+class LLScrollListCtrl;
+class LLSquareButton;
+class LLUICtrlFactory;
+class LLViewBorder;
+
+/**
+ * Location input control.
+ * 
+ * This is currently just a copy of LLComboBox (which is not exactly what the nav bar needs).
+ * The only major difference so far is the way auto-completion works.
+ * 
+ * @see LLNavigationBar
+ */
+class LLLocationInputCtrl
+:	public LLUICtrl, public LLCtrlListInterface
+{
+	LOG_CLASS(LLLocationInputCtrl);
+	
+public:
+	struct Params 
+	:	public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<bool>	allow_text_entry, select_on_focus;
+		Optional<S32>	max_chars;
+		Optional<commit_callback_t> prearrange_callback;
+		Optional<commit_callback_t> text_entry_callback;
+		Optional<commit_callback_t > selection_callback;
+		Optional<LLUIImage*> arrow_image;
+Multiple<LLScrollListItem::Params> items;
+		
+		Params() 
+		:	allow_text_entry("allow_text_entry", false),
+			select_on_focus("select_on_focus", true),
+			max_chars("max_chars", 20),
+			arrow_image("arrow_image", LLUI::getUIImage("combobox_arrow.tga")),
+			items("item")
+		{
+			addSynonym(items, "combo_item");
+		}
+	};
+
+	typedef enum e_preferred_position
+	{
+		ABOVE,
+		BELOW
+	} EPreferredPosition;
+
+	virtual ~LLLocationInputCtrl(); 
+protected:
+	friend class LLUICtrlFactory;
+	LLLocationInputCtrl(const Params&);
+public:
+	// LLView interface
+
+	virtual BOOL	postBuild();
+	virtual void	draw();
+	virtual void	onFocusLost();
+
+	virtual void	setEnabled(BOOL enabled);
+
+	virtual BOOL	handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect);
+	virtual BOOL	handleKeyHere(KEY key, MASK mask);
+	virtual BOOL	handleUnicodeCharHere(llwchar uni_char);
+
+	// LLUICtrl interface
+	virtual void	clear();					// select nothing
+	virtual void	onCommit();
+	virtual BOOL	acceptsTextInput() const		{ return mAllowTextEntry; }
+	virtual BOOL	isDirty() const;			// Returns TRUE if the user has modified this control.
+	virtual void	resetDirty();				// Clear dirty state
+
+	virtual void	setFocus(BOOL b);
+
+	// Selects item by underlying LLSD value, using LLSD::asString() matching.  
+	// For simple items, this is just the name of the label.
+	virtual void	setValue(const LLSD& value );
+
+	// Gets underlying LLSD value for currently selected items.  For simple
+	// items, this is just the label.
+	virtual LLSD	getValue() const;
+
+	void			setTextEntry(const LLStringExplicit& text);
+	void			setText(const LLStringExplicit& text);
+
+	LLScrollListItem*	add(const std::string& name, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);	// add item "name" to menu
+	LLScrollListItem*	add(const std::string& name, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
+	LLScrollListItem*	add(const std::string& name, void* userdata, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
+	LLScrollListItem*	add(const std::string& name, LLSD value, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
+	LLScrollListItem*	addSeparator(EAddPosition pos = ADD_BOTTOM);
+	BOOL			remove( S32 index );	// remove item by index, return TRUE if found and removed
+	void			removeall() { clearRows(); }
+
+	void			sortByName(BOOL ascending = TRUE); // Sort the entries in the combobox by name
+
+	// Select current item by name using selectItemByLabel.  Returns FALSE if not found.
+	BOOL			setSimple(const LLStringExplicit& name);
+	// Get name of current item. Returns an empty string if not found.
+	const std::string	getSimple() const;
+	// Get contents of column x of selected row
+	const std::string getSelectedItemLabel(S32 column = 0) const;
+
+	// Sets the label, which doesn't have to exist in the label.
+	// This is probably a UI abuse.
+	void			setLabel(const LLStringExplicit& name);
+
+	BOOL			remove(const std::string& name);	// remove item "name", return TRUE if found and removed
+	
+	BOOL			setCurrentByIndex( S32 index );
+	S32				getCurrentIndex() const;
+
+	virtual void	updateLayout();
+
+	//========================================================================
+	LLCtrlSelectionInterface* getSelectionInterface()	{ return (LLCtrlSelectionInterface*)this; };
+	LLCtrlListInterface* getListInterface()				{ return (LLCtrlListInterface*)this; };
+
+	// LLCtrlListInterface functions
+	// See llscrolllistctrl.h
+	virtual S32		getItemCount() const;
+	// Overwrites the default column (See LLScrollListCtrl for format)
+	virtual void 	addColumn(const LLSD& column, EAddPosition pos = ADD_BOTTOM);
+	virtual void 	clearColumns();
+	virtual void	setColumnLabel(const std::string& column, const std::string& label);
+	virtual LLScrollListItem* addElement(const LLSD& value, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
+	virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD());
+	virtual void 	clearRows();
+	virtual void 	sortByColumn(const std::string& name, BOOL ascending);
+
+	// LLCtrlSelectionInterface functions
+	virtual BOOL	getCanSelect() const				{ return TRUE; }
+	virtual BOOL	selectFirstItem()					{ return setCurrentByIndex(0); }
+	virtual BOOL	selectNthItem( S32 index )			{ return setCurrentByIndex(index); }
+	virtual BOOL	selectItemRange( S32 first, S32 last );
+	virtual S32		getFirstSelectedIndex() const		{ return getCurrentIndex(); }
+	virtual BOOL	setCurrentByID( const LLUUID& id );
+	virtual LLUUID	getCurrentID() const;				// LLUUID::null if no items in menu
+	virtual BOOL	setSelectedByValue(const LLSD& value, BOOL selected);
+	virtual LLSD	getSelectedValue();
+	virtual BOOL	isSelected(const LLSD& value) const;
+	virtual BOOL	operateOnSelection(EOperation op);
+	virtual BOOL	operateOnAll(EOperation op);
+
+	//========================================================================
+	
+	void*			getCurrentUserdata();
+
+	void			setPrearrangeCallback( commit_callback_t cb ) { mPrearrangeCallback = cb; }
+	void			setTextEntryCallback( commit_callback_t cb ) { mTextEntryCallback = cb; }
+	void			setSelectionCallback( commit_callback_t cb ) { mSelectionCallback = cb; }
+
+	void			setButtonVisible(BOOL visible);
+
+	void			onButtonDown();
+	void			onItemSelected(const LLSD& data);
+	void			onTextCommit(const LLSD& data);
+
+	virtual void	updateSelection();
+	virtual void	showList();
+	virtual void	hideList();
+	
+	//========================================================================
+	BOOL childHasFocus() const; /// Is one of our children focused?
+	
+	BOOL	canCut()		const;
+	BOOL	canCopy()		const;
+	BOOL	canPaste()		const;
+	BOOL	canDeselect()	const;
+	BOOL	canSelectAll()	const;
+	
+	void	cut();
+	void	copy();
+	void	paste();
+	void	deleteSelection();
+	void	selectAll();
+	//========================================================================
+	
+	void	onTextEntry(LLLineEditor* line_editor);
+	
+protected:
+
+	void				prearrangeList(std::string filter = "");
+
+
+	LLButton*			mButton;
+	LLScrollListCtrl*	mList;
+	EPreferredPosition	mListPosition;
+	LLPointer<LLUIImage>	mArrowImage;
+	std::string			mLabel;
+	S32					mButtonPadding;
+	LLLineEditor*		mTextEntry;
+	BOOL				mAllowTextEntry;
+	BOOL				mSelectOnFocus;
+	BOOL				mHasAutocompletedText;
+	S32					mMaxChars;
+	BOOL				mTextEntryTentative;
+	commit_callback_t	mPrearrangeCallback;
+	commit_callback_t	mTextEntryCallback;
+	commit_callback_t	mSelectionCallback;
+};
+
+#endif
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 1709d6465d..29cf996f7c 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -35,6 +35,7 @@
 #include "lllogchat.h"
 #include "llappviewer.h"
 #include "llfloaterchat.h"
+#include "lltrans.h"
 
 const S32 LOG_RECALL_SIZE = 2048;
 
@@ -64,20 +65,21 @@ std::string LLLogChat::timestamp(bool withdate)
 	time_t utc_time;
 	utc_time = time_corrected();
 
-	// There's only one internal tm buffer.
-	struct tm* timep;
+	std::string timeStr;
+	LLSD substitution;
+	substitution["datetime"] = (S32) utc_time;
 
-	// Convert to Pacific, based on server's opinion of whether
-	// it's daylight savings time there.
-	timep = utc_to_pacific_time(utc_time, gPacificDaylightTime);
-
-	std::string text;
 	if (withdate)
-		text = llformat("[%d/%02d/%02d %d:%02d]  ", (timep->tm_year-100)+2000, timep->tm_mon+1, timep->tm_mday, timep->tm_hour, timep->tm_min);
+	{
+		timeStr = LLTrans::getString ("LogChatDateTime");
+	}
 	else
-		text = llformat("[%d:%02d]  ", timep->tm_hour, timep->tm_min);
+	{
+		timeStr = LLTrans::getString ("LogChatTime");
+	}
 
-	return text;
+	LLStringUtil::format (timeStr, substitution);
+	return timeStr;
 }
 
 
@@ -114,7 +116,7 @@ void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType
 	LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r");		/*Flawfinder: ignore*/
 	if (!fptr)
 	{
-		//LLUIString message = LLFloaterChat::getInstance()->getString("IM_logging_string");
+		//LLUIString message = LLTrans::getString("IM_logging_string");
 		//callback(LOG_EMPTY,"IM_logging_string",userdata);
 		callback(LOG_EMPTY,LLStringUtil::null,userdata);
 		return;			//No previous conversation with this name.
diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp
index 053f798882..554163c8e1 100644
--- a/indra/newview/llloginhandler.cpp
+++ b/indra/newview/llloginhandler.cpp
@@ -156,15 +156,9 @@ void LLLoginHandler::parse(const LLSD& queryMap)
 	{
 		LLURLSimString::setString(queryMap["region"].asString());
 	}
-	else if (startLocation == "home")
+	else if (!startLocation.empty()) // "last" or "home" or ??? (let LLURLSimString figure it out)
 	{
-		gSavedSettings.setBOOL("LoginLastLocation", FALSE);
-		LLURLSimString::setString(LLStringUtil::null);
-	}
-	else if (startLocation == "last")
-	{
-		gSavedSettings.setBOOL("LoginLastLocation", TRUE);
-		LLURLSimString::setString(LLStringUtil::null);
+		LLURLSimString::setString(startLocation);
 	}
 }
 
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 53c74aaec1..2d852dea40 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -452,35 +452,36 @@ void LLManip::renderXYZ(const LLVector3 &vec)
 	gViewerWindow->setup3DRender();
 
 	{
+		LLFontGL* font = LLFontGL::getFontSansSerif();
 		LLLocale locale(LLLocale::USER_LOCALE);
 		LLGLDepthTest gls_depth(GL_FALSE);
 		// render drop shadowed text
 		feedback_string = llformat("X: %.3f", vec.mV[VX]);
-		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF ), LLFontGL::NORMAL, -102.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
+		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -102.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
 
 		feedback_string = llformat("Y: %.3f", vec.mV[VY]);
-		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF ), LLFontGL::NORMAL, -27.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
+		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -27.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
 		
 		feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
-		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF ), LLFontGL::NORMAL, 48.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
+		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 48.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
 
 		// render text on top
 		feedback_string = llformat("X: %.3f", vec.mV[VX]);
-		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF ), LLFontGL::NORMAL, -102.f, (F32)vertical_offset, LLColor4(1.f, 0.5f, 0.5f, 1.f), FALSE);
+		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -102.f, (F32)vertical_offset, LLColor4(1.f, 0.5f, 0.5f, 1.f), FALSE);
 
 		glColor3f(0.5f, 1.f, 0.5f);
 		feedback_string = llformat("Y: %.3f", vec.mV[VY]);
-		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF ), LLFontGL::NORMAL, -27.f, (F32)vertical_offset, LLColor4(0.5f, 1.f, 0.5f, 1.f), FALSE);
+		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -27.f, (F32)vertical_offset, LLColor4(0.5f, 1.f, 0.5f, 1.f), FALSE);
 		
 		glColor3f(0.5f, 0.5f, 1.f);
 		feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
-		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF ), LLFontGL::NORMAL, 48.f, (F32)vertical_offset, LLColor4(0.5f, 0.5f, 1.f, 1.f), FALSE);
+		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 48.f, (F32)vertical_offset, LLColor4(0.5f, 0.5f, 1.f, 1.f), FALSE);
 	}
 }
 
 void LLManip::renderTickText(const LLVector3& pos, const std::string& text, const LLColor4 &color)
 {
-	const LLFontGL* big_fontp = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
+	const LLFontGL* big_fontp = LLFontGL::getFontSansSerif();
 
 	BOOL hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD;
 	glMatrixMode(GL_MODELVIEW);
@@ -499,9 +500,9 @@ void LLManip::renderTickText(const LLVector3& pos, const std::string& text, cons
 	LLColor4 shadow_color = LLColor4::black;
 	shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f;
 	gViewerWindow->setupViewport(1, -1);
-	hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(text), 3.f, shadow_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
+	hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,  -0.5f * big_fontp->getWidthF32(text), 3.f, shadow_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
 	gViewerWindow->setupViewport();
-	hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(text), 3.f, color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
+	hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(text), 3.f, color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
 
 	glPopMatrix();
 }
@@ -510,8 +511,8 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
 {
 	LLLocale locale(LLLocale::USER_LOCALE);
 
-	const LLFontGL* big_fontp = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
-	const LLFontGL* small_fontp = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL );
+	const LLFontGL* big_fontp = LLFontGL::getFontSansSerif();
+	const LLFontGL* small_fontp = LLFontGL::getFontSansSerifSmall();
 
 	std::string val_string;
 	std::string fraction_string;
@@ -561,28 +562,28 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
 		fraction_string = llformat("%c%02d%s", LLResMgr::getInstance()->getDecimalPoint(), fractional_portion, suffix.c_str());
 
 		gViewerWindow->setupViewport(1, -1);
-		hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, -1.f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection);
-		hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, 1.f, 3.f, shadow_color, hud_selection);
+		hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection);
+		hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 1.f, 3.f, shadow_color, hud_selection);
 
 		gViewerWindow->setupViewport();
-		hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
-		hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, 1.f, 3.f, color, hud_selection);
+		hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
+		hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 1.f, 3.f, color, hud_selection);
 	}
 	else
 	{
 		gViewerWindow->setupViewport(1, -1);
-		hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection);
+		hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection);
 		gViewerWindow->setupViewport();
-		hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
+		hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
 	}
 	glPopMatrix();
 }
 
 LLColor4 LLManip::setupSnapGuideRenderPass(S32 pass)
 {
-	static LLColor4 grid_color_fg = gColors.getColor("GridlineColor");
-	static LLColor4 grid_color_bg = gColors.getColor("GridlineBGColor");
-	static LLColor4 grid_color_shadow = gColors.getColor("GridlineShadowColor");
+	static LLColor4 grid_color_fg = gSavedSkinSettings.getColor("GridlineColor");
+	static LLColor4 grid_color_bg = gSavedSkinSettings.getColor("GridlineBGColor");
+	static LLColor4 grid_color_shadow = gSavedSkinSettings.getColor("GridlineShadowColor");
 
 	LLColor4 line_color;
 	F32 line_alpha = gSavedSettings.getF32("GridOpacity");
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 8b0484bba6..f228ea624b 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -63,6 +63,7 @@
 #include "pipeline.h"
 #include "lldrawable.h"
 #include "llglheaders.h"
+#include "lltrans.h"
 
 const F32 RADIUS_PIXELS = 100.f;		// size in screen space
 const F32 SQ_RADIUS = RADIUS_PIXELS * RADIUS_PIXELS;
@@ -897,7 +898,6 @@ void LLManipRotate::renderSnapGuides()
 				}
 				gGL.end();
 
-				// *TODO: Translate
 				//RN: text rendering does own shadow pass, so only render once
 				if (pass == 1 && render_text && i % 16 == 0)
 				{
@@ -905,32 +905,32 @@ void LLManipRotate::renderSnapGuides()
 					{
 						if (i == 0)
 						{
-							renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Forward") : std::string("East"), LLColor4::white);
+							renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Forward") : LLTrans::getString("East"), LLColor4::white);
 						}
 						else if (i == 16)
 						{
 							if (constraint_axis.mV[VZ] > 0.f)
 							{
-								renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Left") : std::string("North"), LLColor4::white);
+								renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Left") : LLTrans::getString("North"), LLColor4::white);
 							}
 							else
 							{
-								renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Right") : std::string("South"), LLColor4::white);
+								renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Right") : LLTrans::getString("South"), LLColor4::white);
 							}
 						}
 						else if (i == 32)
 						{
-							renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Back") : std::string("West"), LLColor4::white);
+							renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Back") : LLTrans::getString("West"), LLColor4::white);
 						}
 						else
 						{
 							if (constraint_axis.mV[VZ] > 0.f)
 							{
-								renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Right") : std::string("South"), LLColor4::white);
+								renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Right") : LLTrans::getString("South"), LLColor4::white);
 							}
 							else
 							{
-								renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Left") : std::string("North"), LLColor4::white);
+								renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Left") : LLTrans::getString("North"), LLColor4::white);
 							}
 						}
 					}
@@ -938,32 +938,32 @@ void LLManipRotate::renderSnapGuides()
 					{
 						if (i == 0)
 						{
-							renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Left") : std::string("North"), LLColor4::white);
+							renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Left") : LLTrans::getString("North"), LLColor4::white);
 						}
 						else if (i == 16)
 						{
 							if (constraint_axis.mV[VX] > 0.f)
 							{
-								renderTickText(text_point, std::string("Up"), LLColor4::white);
+								renderTickText(text_point, LLTrans::getString("Up"), LLColor4::white);
 							}
 							else
 							{
-								renderTickText(text_point, std::string("Down"), LLColor4::white);
+								renderTickText(text_point, LLTrans::getString("Down"), LLColor4::white);
 							}
 						}
 						else if (i == 32)
 						{
-							renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Right") : std::string("South"), LLColor4::white);
+							renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Right") : LLTrans::getString("South"), LLColor4::white);
 						}
 						else
 						{
 							if (constraint_axis.mV[VX] > 0.f)
 							{
-								renderTickText(text_point, std::string("Down"), LLColor4::white);
+								renderTickText(text_point, LLTrans::getString("Down"), LLColor4::white);
 							}
 							else
 							{
-								renderTickText(text_point, std::string("Up"), LLColor4::white);
+								renderTickText(text_point, LLTrans::getString("Up"), LLColor4::white);
 							}
 						}
 					}
@@ -971,32 +971,32 @@ void LLManipRotate::renderSnapGuides()
 					{
 						if (i == 0)
 						{
-							renderTickText(text_point, std::string("Up"), LLColor4::white);
+							renderTickText(text_point, LLTrans::getString("Up"), LLColor4::white);
 						}
 						else if (i == 16)
 						{
 							if (constraint_axis.mV[VY] > 0.f)
 							{
-								renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Forward") : std::string("East"), LLColor4::white);
+								renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Forward") : LLTrans::getString("East"), LLColor4::white);
 							}
 							else
 							{
-								renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Back") : std::string("West"), LLColor4::white);
+								renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Back") : LLTrans::getString("West"), LLColor4::white);
 							}
 						}
 						else if (i == 32)
 						{
-							renderTickText(text_point, std::string("Down"), LLColor4::white);
+							renderTickText(text_point, LLTrans::getString("Down"), LLColor4::white);
 						}
 						else
 						{
 							if (constraint_axis.mV[VY] > 0.f)
 							{
-								renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Back") : std::string("West"), LLColor4::white);
+								renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Back") : LLTrans::getString("West"), LLColor4::white);
 							}
 							else
 							{
-								renderTickText(text_point, mObjectSelection->isAttachment() ? std::string("Forward") : std::string("East"), LLColor4::white);
+								renderTickText(text_point, mObjectSelection->isAttachment() ? LLTrans::getString("Forward") : LLTrans::getString("East"), LLColor4::white);
 							}
 						}
 					}
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index b1cdfe3886..5261c130ea 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -415,7 +415,7 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask)
 	// Patch up textures, if possible.
 	LLSelectMgr::getInstance()->adjustTexturesByScale(FALSE, getStretchTextures());
 
-	gViewerWindow->getWindow()->setCursor(UI_CURSOR_TOOLSCALE);
+	gViewerWindow->setCursor(UI_CURSOR_TOOLSCALE);
 	return TRUE;
 }
 
@@ -1827,10 +1827,10 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
 				std::string help_text = "Move mouse cursor over ruler";
 				LLColor4 help_text_color = LLColor4::white;
 				help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, grid_alpha, 0.f);
-				hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
+				hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
 				help_text = "to snap to grid";
 				help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapRegimeOffset * 0.4f;
-				hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
+				hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
 			}
 		}
 	}
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index f2585c8543..8a12f75536 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1441,10 +1441,10 @@ void LLManipTranslate::renderSnapGuides()
 				std::string help_text = "Move mouse cursor over ruler to snap";
 				LLColor4 help_text_color = LLColor4::white;
 				help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f);
-				hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
+				hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
 				help_text = "to snap to grid";
 				help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapOffsetMeters * 0.2f;
-				hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
+				hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
 			}
 		}
 	}
@@ -1522,7 +1522,7 @@ void LLManipTranslate::renderSnapGuides()
 		
 		float a = line_alpha;
 
-		LLColor4 col = gColors.getColor("SilhouetteChildColor");
+		LLColor4 col = gSavedSkinSettings.getColor("SilhouetteChildColor");
 		{
 			//draw grid behind objects
 			LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp
index 215cc6940b..c763da34d5 100644
--- a/indra/newview/llmemoryview.cpp
+++ b/indra/newview/llmemoryview.cpp
@@ -51,11 +51,10 @@
 
 
 
-LLMemoryView::LLMemoryView(const std::string& name, const LLRect& rect)
-:	LLView(name, rect, TRUE),
-mDelay(120)
+LLMemoryView::LLMemoryView(const LLMemoryView::Params& p)
+:	LLView(p),
+	mDelay(120)
 {
-	setVisible(FALSE);
 	mDumpTimer.reset();
 
 #ifdef MEM_DUMP_DATA
diff --git a/indra/newview/llmemoryview.h b/indra/newview/llmemoryview.h
index 81466bd6b0..e5b019bb47 100644
--- a/indra/newview/llmemoryview.h
+++ b/indra/newview/llmemoryview.h
@@ -38,7 +38,15 @@
 class LLMemoryView : public LLView
 {
 public:
-	LLMemoryView(const std::string& name, const LLRect& rect);
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Params()
+		{
+			mouse_opaque = true;
+			visible = false;
+		}
+	};
+	LLMemoryView(const LLMemoryView::Params&);
 	virtual ~LLMemoryView();
 
 	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp
index ac77a920a5..502302868e 100644
--- a/indra/newview/llmenucommands.cpp
+++ b/indra/newview/llmenucommands.cpp
@@ -35,6 +35,7 @@
 #include "llmenucommands.h"
 
 #include "imageids.h"
+#include "llfloaterreg.h"
 #include "llfontgl.h"
 #include "llrect.h"
 #include "llerror.h"
@@ -48,7 +49,6 @@
 #include "llfirstuse.h"
 #include "llfloaterchat.h"
 #include "llfloaterdirectory.h"
-#include "llfloatermap.h"
 #include "llfloaterworldmap.h"
 #include "llgivemoney.h"
 #include "llinventoryview.h"
@@ -68,14 +68,6 @@
 #include "llworldmap.h"
 #include "llfocusmgr.h"
 
-void handle_track_avatar(const LLUUID& agent_id, const std::string& name)
-{	
-	LLAvatarTracker::instance().track(agent_id, name);
-
-	LLFloaterDirectory::hide(NULL);
-	LLFloaterWorldMap::show(NULL, TRUE);
-}
-
 void handle_pay_by_id(const LLUUID& agent_id)
 {
 	const BOOL is_group = FALSE;
@@ -88,39 +80,6 @@ void handle_mouselook(void*)
 }
 
 
-void handle_map(void*)
-{
-	LLFloaterWorldMap::toggle(NULL);
-}
-
-void handle_mini_map(void*)
-{
-	LLFloaterMap::toggleInstance();
-}
-
-
-void handle_find(void*)
-{
-	LLFloaterDirectory::toggleFind(NULL);
-}
-
-
-void handle_events(void*)
-{
-	LLFloaterDirectory::toggleEvents(NULL);
-}
-
-
-void handle_inventory(void*)
-{
-	// We're using the inventory, possibly for the
-	// first time.
-	LLFirstUse::useInventory();
-
-	LLInventoryView::toggleVisibility(NULL);
-}
-
-
 void handle_chat(void*)
 {
 	// give focus to chatbar if it's open but not focused
diff --git a/indra/newview/llmenucommands.h b/indra/newview/llmenucommands.h
index 03f7a2571c..368c6fe752 100644
--- a/indra/newview/llmenucommands.h
+++ b/indra/newview/llmenucommands.h
@@ -35,14 +35,8 @@
 
 class LLUUID;
 
-void handle_track_avatar(const LLUUID& agent_id, const std::string& name);
 void handle_pay_by_id(const LLUUID& agent_id);
 void handle_mouselook(void*);
-void handle_map(void*);
-void handle_mini_map(void*);
-void handle_find(void*);
-void handle_events(void*);
-void handle_inventory(void*);
 void handle_chat(void*);
 void handle_return_key(void*);
 void handle_slash_key(void*);
diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp
index 18fd20d12a..0e49ecd9b5 100644
--- a/indra/newview/llmorphview.cpp
+++ b/indra/newview/llmorphview.cpp
@@ -67,9 +67,8 @@ const F32 CAMERA_DIST_STEP = 1.5f;
 //-----------------------------------------------------------------------------
 // LLMorphView()
 //-----------------------------------------------------------------------------
-LLMorphView::LLMorphView(const std::string& name, const LLRect& rect)
-	: 
-	LLView(name, rect, FALSE, FOLLOWS_ALL),
+LLMorphView::LLMorphView(const LLMorphView::Params& p)
+: 	LLView(p),
 	mCameraTargetJoint( NULL ),
 	mCameraOffset(-0.5f, 0.05f, 0.07f ),
 	mCameraTargetOffset(0.f, 0.f, 0.05f ),
@@ -78,8 +77,7 @@ LLMorphView::LLMorphView(const std::string& name, const LLRect& rect)
 	mCameraYaw( 0.f ),
 	mCameraDist( -1.f ),
 	mCameraDrivenByKeys( FALSE )
-{
-}
+{}
 
 //-----------------------------------------------------------------------------
 // initialize()
@@ -137,7 +135,7 @@ void LLMorphView::setVisible(BOOL visible)
 			llassert( !gFloaterCustomize );
 			gFloaterCustomize = new LLFloaterCustomize();
 			gFloaterCustomize->fetchInventory();
-			gFloaterCustomize->open();	/*Flawfinder: ignore*/
+			gFloaterCustomize->openFloater();
 
 			// Must do this _after_ gFloaterView is initialized.
 			gFloaterCustomize->switchToDefaultSubpart();
diff --git a/indra/newview/llmorphview.h b/indra/newview/llmorphview.h
index 1dd8ef7a5f..493f906c6b 100644
--- a/indra/newview/llmorphview.h
+++ b/indra/newview/llmorphview.h
@@ -43,7 +43,15 @@ class LLFloaterCustomize;
 class LLMorphView : public LLView
 {
 public:
-	LLMorphView(const std::string& name, const LLRect& rect);
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Params()
+		{
+			mouse_opaque(false);
+			follows.flags(FOLLOWS_ALL);
+		}
+	};
+	LLMorphView(const LLMorphView::Params&);
 	
 	void		initialize();
 	void		shutdown();
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index a180047875..36ec2c779a 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -59,13 +59,28 @@ const F32 NUDGE_TIME = 0.25f;		// in seconds
 
 // protected
 LLFloaterMove::LLFloaterMove(const LLSD& key)
-:	LLFloater(std::string("move floater"))
+:	LLFloater()
 {
 	setIsChrome(TRUE);
 
 	const BOOL DONT_OPEN = FALSE;
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_moveview.xml", NULL, DONT_OPEN); 
+	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_moveview.xml", DONT_OPEN); 
 
+}
+
+// virtual
+void LLFloaterMove::onClose(bool app_quitting)
+{
+	destroy();
+	
+	if (!app_quitting)
+	{
+		gSavedSettings.setBOOL("ShowMovementControls", FALSE);
+	}
+}
+// virtual
+BOOL LLFloaterMove::postBuild()
+{
 	mForwardButton = getChild<LLJoystickAgentTurn>("forward btn"); 
 	mForwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
 
@@ -80,41 +95,29 @@ LLFloaterMove::LLFloaterMove(const LLSD& key)
 
 	mTurnLeftButton = getChild<LLButton>("turn left btn"); 
 	mTurnLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
-	mTurnLeftButton->setHeldDownCallback( turnLeft );
+	mTurnLeftButton->setHeldDownCallback( turnLeft, NULL );
 
 	mTurnRightButton = getChild<LLButton>("turn right btn"); 
 	mTurnRightButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
-	mTurnRightButton->setHeldDownCallback( turnRight );
+	mTurnRightButton->setHeldDownCallback( turnRight, NULL );
 
 	mMoveUpButton = getChild<LLButton>("move up btn"); 
 	childSetAction("move up btn",moveUp,NULL);
 	mMoveUpButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
-	mMoveUpButton->setHeldDownCallback( moveUp );
+	mMoveUpButton->setHeldDownCallback( moveUp, NULL );
 
 	mMoveDownButton = getChild<LLButton>("move down btn"); 
 	childSetAction("move down btn",moveDown,NULL);	
 	mMoveDownButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
-	mMoveDownButton->setHeldDownCallback( moveDown );
-}
-
-// virtual
-void LLFloaterMove::onClose(bool app_quitting)
-{
-	LLFloater::onClose(app_quitting);
-	
-	if (!app_quitting)
-	{
-		gSavedSettings.setBOOL("ShowMovementControls", FALSE);
-	}
+	mMoveDownButton->setHeldDownCallback( moveDown, NULL );
+	return TRUE;
 }
-
 //
 // Static member functions
 //
 
-void LLFloaterMove::onOpen()
+void LLFloaterMove::onOpen(const LLSD& key)
 {
-	LLFloater::onOpen();
 	gSavedSettings.setBOOL("ShowMovementControls", TRUE);
 }
 
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index e772551efe..8d7cdc881d 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -54,9 +54,9 @@ protected:
 	~LLFloaterMove() {}
 
 public:
-	/*virtual*/ void onOpen();
+	/*virtual*/ void onOpen(const LLSD& key);
 	/*virtual*/ void onClose(bool app_quitting);
-
+	/*virtual*/	BOOL	postBuild();
 	static F32	getYawRate(F32 time);
 
 protected:
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 841330483c..4ec2faf957 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -72,6 +72,7 @@
 #include "lluistring.h"
 #include "llviewerobject.h" 
 #include "llviewerobjectlist.h"
+#include "lltrans.h"
 
 namespace 
 {
@@ -112,11 +113,6 @@ static LLDispatchEmptyMuteList sDispatchEmptyMuteList;
 //-----------------------------------------------------------------------------
 // LLMute()
 //-----------------------------------------------------------------------------
-const char BY_NAME_SUFFIX[] = " (by name)";
-const char AGENT_SUFFIX[] = " (resident)";
-const char OBJECT_SUFFIX[] = " (object)";
-const char GROUP_SUFFIX[] = " (group)";
-
 
 LLMute::LLMute(const LLUUID& id, const std::string& name, EType type, U32 flags)
   : mID(id),
@@ -150,16 +146,16 @@ std::string LLMute::getDisplayName() const
 	{
 		case BY_NAME:
 		default:
-			name_with_suffix += BY_NAME_SUFFIX;
+			name_with_suffix += " " + LLTrans::getString("MuteByName");
 			break;
 		case AGENT:
-			name_with_suffix += AGENT_SUFFIX;
+			name_with_suffix += " " + LLTrans::getString("MuteAgent");
 			break;
 		case OBJECT:
-			name_with_suffix += OBJECT_SUFFIX;
+			name_with_suffix += " " + LLTrans::getString("MuteObject");
 			break;
 		case GROUP:
-			name_with_suffix += GROUP_SUFFIX;
+			name_with_suffix += " " + LLTrans::getString("MuteGroup");
 			break;
 	}
 	return name_with_suffix;
@@ -170,7 +166,7 @@ void LLMute::setFromDisplayName(const std::string& display_name)
 	size_t pos = 0;
 	mName = display_name;
 	
-	pos = mName.rfind(GROUP_SUFFIX);
+	pos = mName.rfind(" " + LLTrans::getString("MuteGroup"));
 	if (pos != std::string::npos)
 	{
 		mName.erase(pos);
@@ -178,7 +174,7 @@ void LLMute::setFromDisplayName(const std::string& display_name)
 		return;
 	}
 	
-	pos = mName.rfind(OBJECT_SUFFIX);
+	pos = mName.rfind(" " + LLTrans::getString("MuteObject"));
 	if (pos != std::string::npos)
 	{
 		mName.erase(pos);
@@ -186,7 +182,7 @@ void LLMute::setFromDisplayName(const std::string& display_name)
 		return;
 	}
 	
-	pos = mName.rfind(AGENT_SUFFIX);
+	pos = mName.rfind(" " + LLTrans::getString("MuteAgent"));
 	if (pos != std::string::npos)
 	{
 		mName.erase(pos);
@@ -194,7 +190,7 @@ void LLMute::setFromDisplayName(const std::string& display_name)
 		return;
 	}
 	
-	pos = mName.rfind(BY_NAME_SUFFIX);
+	pos = mName.rfind(" " + LLTrans::getString("MuteByName"));
 	if (pos != std::string::npos)
 	{
 		mName.erase(pos);
@@ -502,11 +498,8 @@ void LLMuteList::updateRemove(const LLMute& mute)
 	gAgent.sendReliableMessage();
 }
 
-void notify_automute_callback(const LLUUID& agent_id, const std::string& first_name, const std::string& last_name, BOOL is_group, void* user_data)
+void notify_automute_callback(const LLUUID& agent_id, const std::string& first_name, const std::string& last_name, BOOL is_group, LLMuteList::EAutoReason reason)
 {
-	U32 temp_data = (U32) (uintptr_t) user_data;
-	LLMuteList::EAutoReason reason = (LLMuteList::EAutoReason)temp_data;
-	
 	std::string auto_message;
 	switch (reason)
 	{
@@ -522,8 +515,8 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& first_n
 		break;
 	}
 
-	std::string message = LLNotification::format(auto_message, 
-							   LLSD().insert("FIRST", first_name).insert("LAST", last_name));
+	std::string message = auto_message;
+	LLStringUtil::format(message, LLSD().insert("FIRST", first_name).insert("LAST", last_name));
 
 	if (reason == LLMuteList::AR_IM)
 	{
@@ -555,18 +548,18 @@ BOOL LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason, co
 			if (gCacheName->getName(agent_id, cache_first, cache_last))
 			{
 				// name in cache, call callback directly
-				notify_automute_callback(agent_id, cache_first, cache_last, FALSE, (void *)reason);
+				notify_automute_callback(agent_id, cache_first, cache_last, FALSE, reason);
 			}
 			else
 			{
 				// not in cache, lookup name from cache
-				gCacheName->get(agent_id, FALSE, notify_automute_callback, (void *)reason);
+				gCacheName->get(agent_id, FALSE, boost::bind(&notify_automute_callback, _1, _2, _3, _4, reason));
 			}
 		}
 		else
 		{
 			// call callback directly
-			notify_automute_callback(agent_id, first_name, last_name, FALSE, (void *)reason);
+			notify_automute_callback(agent_id, first_name, last_name, FALSE, reason);
 		}
 	}
 
diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp
index 98c7a4b631..883ddc7b53 100644
--- a/indra/newview/llnamebox.cpp
+++ b/indra/newview/llnamebox.cpp
@@ -46,20 +46,15 @@
 // statics
 std::set<LLNameBox*> LLNameBox::sInstances;
 
+static LLRegisterWidget<LLNameBox> r("name_box");
 
-LLNameBox::LLNameBox(const std::string& name, const LLRect& rect, const LLUUID& name_id, BOOL is_group, const LLFontGL* font, BOOL mouse_opaque)
-:	LLTextBox(name, rect, std::string("(retrieving)"), font, mouse_opaque),
-	mNameID(name_id)
+
+LLNameBox::LLNameBox(const Params& p)
+:	LLTextBox(p)
 {
+	mNameID = LLUUID::null;
 	LLNameBox::sInstances.insert(this);
-	if(!name_id.isNull())
-	{
-		setNameID(name_id, is_group);
-	}
-	else
-	{
-		setText(LLStringUtil::null);
-	}
+	setText(LLStringUtil::null);
 }
 
 LLNameBox::~LLNameBox()
diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h
index f76850bd3c..3edb36883f 100644
--- a/indra/newview/llnamebox.h
+++ b/indra/newview/llnamebox.h
@@ -44,10 +44,15 @@ class LLNameBox
 :	public LLTextBox
 {
 public:
-	LLNameBox(const std::string& name, const LLRect& rect, const LLUUID& name_id = LLUUID::null, BOOL is_group = FALSE, const LLFontGL* font = NULL, BOOL mouse_opaque = TRUE );
-		// By default, follows top and left and is mouse-opaque.
-		// If no text, text = name.
-		// If no font, uses default system font.
+	struct Params : public LLInitParam::Block<Params, LLTextBox::Params>
+	{
+		Optional<bool>		is_group;
+
+		Params()
+		:	is_group("is_group", false)
+		{}
+	};
+
 	virtual ~LLNameBox();
 
 	void setNameID(const LLUUID& name_id, BOOL is_group);
@@ -57,6 +62,10 @@ public:
 	static void refreshAll(const LLUUID& id, const std::string& firstname,
 						   const std::string& lastname, BOOL is_group);
 
+protected:
+	LLNameBox (const Params&);
+
+	friend class LLUICtrlFactory;
 private:
 	static std::set<LLNameBox*> sInstances;
 
diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp
index e4a65734d8..d706daf044 100644
--- a/indra/newview/llnameeditor.cpp
+++ b/indra/newview/llnameeditor.cpp
@@ -48,35 +48,17 @@ static LLRegisterWidget<LLNameEditor> r("name_editor");
 // statics
 std::set<LLNameEditor*> LLNameEditor::sInstances;
 
-LLNameEditor::LLNameEditor(const std::string& name, const LLRect& rect,
-		const LLUUID& name_id, 
-		BOOL is_group,
-		const LLFontGL* glfont,
-		S32 max_text_length,
-		void (*commit_callback)(LLUICtrl* caller, void* user_data),
-		void (*keystroke_callback)(LLLineEditor* caller, void* user_data),
-		void (*focus_lost_callback)(LLFocusableElement* caller, void* user_data),
-		void* userdata,
-		LLLinePrevalidateFunc prevalidate_func)
-:	LLLineEditor(name, rect, 
-				 std::string("(retrieving)"), 
-				 glfont, 
-				 max_text_length, 
-				 commit_callback, 
-				 keystroke_callback,
-				 focus_lost_callback,
-				 userdata,
-				 prevalidate_func),
-	mNameID(name_id)
+LLNameEditor::LLNameEditor(const LLNameEditor::Params& p)
+:	LLLineEditor(p)
 {
 	LLNameEditor::sInstances.insert(this);
-	if(!name_id.isNull())
+
+	if(!p.name_id().isNull())
 	{
-		setNameID(name_id, is_group);
+		setNameID(p.name_id, p.is_group);
 	}
 }
 
-
 LLNameEditor::~LLNameEditor()
 {
 	LLNameEditor::sInstances.erase(this);
@@ -141,35 +123,3 @@ LLSD LLNameEditor::getValue() const
 	return LLSD(mNameID);
 }
 
-LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("name_editor");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	S32 max_text_length = 128;
-	node->getAttributeS32("max_length", max_text_length);
-
-	LLFontGL* font = LLView::selectFont(node);
-
-	LLUICtrlCallback commit_callback = NULL;
-
-	LLNameEditor* line_editor = new LLNameEditor(name,
-								rect, 
-								LLUUID::null, FALSE,
-								font,
-								max_text_length,
-								commit_callback);
-
-	std::string label;
-	if(node->getAttributeString("label", label))
-	{
-		line_editor->setLabel(label);
-	}
-	line_editor->setColorParameters(node);
-	line_editor->initFromXML(node, parent);
-	
-	return line_editor;
-}
diff --git a/indra/newview/llnameeditor.h b/indra/newview/llnameeditor.h
index bc5a67866c..f9cabb5831 100644
--- a/indra/newview/llnameeditor.h
+++ b/indra/newview/llnameeditor.h
@@ -46,24 +46,18 @@ class LLNameEditor
 :	public LLLineEditor
 {
 public:
-	LLNameEditor(const std::string& name, const LLRect& rect,
-		const LLUUID& name_id = LLUUID::null,
-		BOOL is_group = FALSE,
-		const LLFontGL* glfont = NULL,
-		S32 max_text_length = 254,
-		void (*commit_callback)(LLUICtrl* caller, void* user_data) = NULL,
-		void (*keystroke_callback)(LLLineEditor* caller, void* user_data) = NULL,
-		void (*focus_lost_callback)(LLFocusableElement* caller, void* user_data) = NULL,
-		void* userdata = NULL,
-		LLLinePrevalidateFunc prevalidate_func = NULL);
-		// By default, follows top and left and is mouse-opaque.
-		// If no text, text = name.
-		// If no font, uses default system font.
-
+	struct Params : public LLInitParam::Block<Params, LLLineEditor::Params>
+	{
+		Optional<bool>		is_group;
+		Optional<LLUUID>	name_id;
+	};
+
+protected:
+	LLNameEditor(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	virtual ~LLNameEditor();
 
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
 	void setNameID(const LLUUID& name_id, BOOL is_group);
 
 	void refresh(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group);
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index baf06567c1..eee64b5651 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -39,51 +39,46 @@
 #include "llcachename.h"
 #include "llagent.h"
 #include "llinventory.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
+#include "llscrolllistcolumn.h"
+#include "llsdparam.h"
 
 static LLRegisterWidget<LLNameListCtrl> r("name_list");
 
-// statics
-std::set<LLNameListCtrl*> LLNameListCtrl::sInstances;
-
-LLNameListCtrl::LLNameListCtrl(const std::string& name,
-							   const LLRect& rect,
-							   LLUICtrlCallback cb,
-							   void* userdata,
-							   BOOL allow_multiple_selection,
-							   BOOL draw_border,
-							   S32 name_column_index,
-							   const std::string& tooltip)
-:	LLScrollListCtrl(name, rect, cb, userdata, allow_multiple_selection,
-					 draw_border),
-	mNameColumnIndex(name_column_index),
-	mAllowCallingCardDrop(FALSE)
+void LLNameListCtrl::NameTypeNames::declareValues()
 {
-	setToolTip(tooltip);
-	LLNameListCtrl::sInstances.insert(this);
+	declare("INDIVIDUAL", LLNameListCtrl::INDIVIDUAL);
+	declare("GROUP", LLNameListCtrl::GROUP);
+	declare("SPECIAL", LLNameListCtrl::SPECIAL);
 }
 
-
-// virtual
-LLNameListCtrl::~LLNameListCtrl()
+LLNameListCtrl::Params::Params()
+:	name_column("name_column"),
+	allow_calling_card_drop("allow_calling_card_drop", false)
 {
-	LLNameListCtrl::sInstances.erase(this);
+	name = "name_list";
 }
 
+LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p)
+:	LLScrollListCtrl(p),
+	mAllowCallingCardDrop(p.allow_calling_card_drop),
+	mNameColumn(p.name_column),
+	mNameColumnIndex(0)
+{}
 
 // public
-BOOL LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,
+void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,
 								 BOOL enabled, std::string& suffix)
 {
 	//llinfos << "LLNameListCtrl::addNameItem " << agent_id << llendl;
 
 	std::string fullname;
-	BOOL result = gCacheName->getFullName(agent_id, fullname);
+	gCacheName->getFullName(agent_id, fullname);
 
 	fullname.append(suffix);
 
 	addStringUUIDItem(fullname, agent_id, pos, enabled);
-
-	return result;
 }
 
 // virtual, public
@@ -138,75 +133,70 @@ BOOL LLNameListCtrl::handleDragAndDrop(
 void LLNameListCtrl::addGroupNameItem(const LLUUID& group_id, EAddPosition pos,
 									  BOOL enabled)
 {
-	//llinfos << "LLNameListCtrl::addGroupNameItem " << group_id << llendl;
-	std::string group_name;
-	gCacheName->getGroupName(group_id, group_name);
-	addStringUUIDItem(group_name, group_id, pos, enabled);
+	NameItem item;
+	item.value = group_id;
+	item.enabled = enabled;
+	item.target = GROUP;
+
+	addRow(item, pos);
 }
 
 // public
-void LLNameListCtrl::addGroupNameItem(LLScrollListItem* item, EAddPosition pos)
-					
+void LLNameListCtrl::addGroupNameItem(LLNameListCtrl::NameItem& item, EAddPosition pos)
 {
-	//llinfos << "LLNameListCtrl::addGroupNameItem " << item->getUUID() << llendl;
-
-	std::string group_name;
-	gCacheName->getGroupName(item->getUUID(), group_name);
-
-	LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
-	((LLScrollListText*)cell)->setText( std::string(group_name) );
-
-	addItem(item, pos);
+	item.target = GROUP;
+	addRow(item, pos);
 }
 
-BOOL LLNameListCtrl::addNameItem(LLScrollListItem* item, EAddPosition pos)
+void LLNameListCtrl::addNameItem(LLNameListCtrl::NameItem& item, EAddPosition pos)
 {
-	//llinfos << "LLNameListCtrl::addNameItem " << item->getUUID() << llendl;
-
-	std::string fullname;
-	BOOL result = gCacheName->getFullName(item->getUUID(), fullname);
-
-	LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
-	((LLScrollListText*)cell)->setText( fullname );
-
-	addItem(item, pos);
-
-	// this column is resizable
-	LLScrollListColumn* columnp = getColumn(mNameColumnIndex);
-	if (columnp && columnp->mHeader)
-	{
-		columnp->mHeader->setHasResizableElement(TRUE);
-	}
+	item.target = INDIVIDUAL;
+	addRow(item, pos);
+}
 
-	return result;
+LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata)
+{
+	LLNameListCtrl::NameItem item_params;
+	LLParamSDParser::instance().readSD(element, item_params);
+	item_params.userdata = userdata;
+	return addRow(item_params, pos);
 }
 
-LLScrollListItem* LLNameListCtrl::addElement(const LLSD& value, EAddPosition pos, void* userdata)
+
+LLScrollListItem* LLNameListCtrl::addRow(const LLNameListCtrl::NameItem& name_item, EAddPosition pos)
 {
-	LLScrollListItem* item = LLScrollListCtrl::addElement(value, pos, userdata);
+	LLScrollListItem* item = LLScrollListCtrl::addRow(name_item, pos);
+	if (!item) return NULL;
 
 	// use supplied name by default
-	std::string fullname = value["name"].asString();
-	if (value["target"].asString() == "GROUP")
+	std::string fullname = name_item.display_name;
+	switch(name_item.target)
 	{
-		gCacheName->getGroupName(item->getUUID(), fullname);
+	case GROUP:
+		gCacheName->getGroupName(name_item.value().asUUID(), fullname);
 		// fullname will be "nobody" if group not found
-	}
-	else if (value["target"].asString() == "SPECIAL")
-	{
+		break;
+	case SPECIAL:
 		// just use supplied name
-	}
-	else // normal resident
-	{
-		std::string name;
-		if (gCacheName->getFullName(item->getUUID(), name))
+		break;
+	case INDIVIDUAL:
 		{
-			fullname = name;
+			std::string name;
+			if (gCacheName->getFullName(name_item.value().asUUID(), name))
+			{
+				fullname = name;
+			}
+			break;
 		}
+	default:
+		break;
 	}
 	
-	LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
-	((LLScrollListText*)cell)->setText( fullname );
+	LLScrollListCell* cell = item->getColumn(mNameColumnIndex);
+	if (cell)
+	{
+		cell->setValue(fullname);
+	}
 
 	dirtyColumns();
 
@@ -259,9 +249,11 @@ void LLNameListCtrl::refresh(const LLUUID& id, const std::string& first,
 		if (item->getUUID() == id)
 		{
 			LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(0);
-			cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
-
-			((LLScrollListText*)cell)->setText( fullname );
+			cell = item->getColumn(mNameColumnIndex);
+			if (cell)
+			{
+				cell->setValue(fullname);
+			}
 		}
 	}
 
@@ -273,186 +265,24 @@ void LLNameListCtrl::refresh(const LLUUID& id, const std::string& first,
 void LLNameListCtrl::refreshAll(const LLUUID& id, const std::string& first,
 								const std::string& last, BOOL is_group)
 {
-	std::set<LLNameListCtrl*>::iterator it;
-	for (it = LLNameListCtrl::sInstances.begin();
-		 it != LLNameListCtrl::sInstances.end();
-		 ++it)
+	LLInstanceTracker<LLNameListCtrl>::instance_iter it;
+	for (it = instancesBegin(); it != instancesEnd(); ++it)
 	{
 		LLNameListCtrl* ctrl = *it;
 		ctrl->refresh(id, first, last, is_group);
 	}
 }
 
-// virtual
-LLXMLNodePtr LLNameListCtrl::getXML(bool save_children) const
+void LLNameListCtrl::updateColumns()
 {
-	LLXMLNodePtr node = LLScrollListCtrl::getXML();
-
-	node->createChild("allow_calling_card_drop", TRUE)->setBoolValue(mAllowCallingCardDrop);
+	LLScrollListCtrl::updateColumns();
 
-	if (mNameColumnIndex != 0)
+	if (!mNameColumn.empty())
 	{
-		node->createChild("name_column_index", TRUE)->setIntValue(mNameColumnIndex);
-	}
-
-	// Don't save contents, probably filled by code
-
-	return node;
-}
-
-LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("name_list");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	BOOL multi_select = FALSE;
-	node->getAttributeBOOL("multi_select", multi_select);
-
-	BOOL draw_border = TRUE;
-	node->getAttributeBOOL("draw_border", draw_border);
-
-	BOOL draw_heading = FALSE;
-	node->getAttributeBOOL("draw_heading", draw_heading);
-
-	S32 name_column_index = 0;
-	node->getAttributeS32("name_column_index", name_column_index);
-
-	LLUICtrlCallback callback = NULL;
-
-	LLNameListCtrl* name_list = new LLNameListCtrl(name,
-				   rect,
-				   callback,
-				   NULL,
-				   multi_select,
-				   draw_border,
-				   name_column_index);
-
-	name_list->setDisplayHeading(draw_heading);
-	if (node->hasAttribute("heading_height"))
-	{
-		S32 heading_height;
-		node->getAttributeS32("heading_height", heading_height);
-		name_list->setHeadingHeight(heading_height);
-	}
-
-	BOOL allow_calling_card_drop = FALSE;
-	if (node->getAttributeBOOL("allow_calling_card_drop", allow_calling_card_drop))
-	{
-		name_list->setAllowCallingCardDrop(allow_calling_card_drop);
-	}
-
-	name_list->setScrollListParameters(node);
-
-	name_list->initFromXML(node, parent);
-
-	LLSD columns;
-	S32 index = 0;
-	//S32 total_static = 0;
-	LLXMLNodePtr child;
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-	{
-		if (child->hasName("column"))
+		LLScrollListColumn* name_column = getColumn(mNameColumn);
+		if (name_column)
 		{
-			std::string labelname("");
-			child->getAttributeString("label", labelname);
-
-			std::string columnname(labelname);
-			child->getAttributeString("name", columnname);
-
-			BOOL columndynamicwidth = FALSE;
-			child->getAttributeBOOL("dynamicwidth", columndynamicwidth);
-
-			std::string sortname(columnname);
-			child->getAttributeString("sort", sortname);
-		
-			S32 columnwidth = -1;
-			if (child->hasAttribute("relwidth"))
-			{
-				F32 columnrelwidth = 0.f;
-				child->getAttributeF32("relwidth", columnrelwidth);
-				columns[index]["relwidth"] = columnrelwidth;
-			}
-			else
-			{
-				child->getAttributeS32("width", columnwidth);
-				columns[index]["width"] = columnwidth;
-			}
-
-			LLFontGL::HAlign h_align = LLFontGL::LEFT;
-			h_align = LLView::selectFontHAlign(child);
-
-			//if(!columndynamicwidth) total_static += llmax(0, columnwidth);
-
-			columns[index]["name"] = columnname;
-			columns[index]["label"] = labelname;
-			columns[index]["halign"] = (S32)h_align;
-			columns[index]["dynamicwidth"] = columndynamicwidth;
-			columns[index]["sort"] = sortname;
-
-			index++;
+			mNameColumnIndex = name_column->mIndex;
 		}
 	}
-	name_list->setColumnHeadings(columns);
-
-
-	for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
-	{
-		if (child->hasName("row"))
-		{
-			LLUUID id;
-			child->getAttributeUUID("id", id);
-
-			LLSD row;
-
-			row["id"] = id;
-
-			S32 column_idx = 0;
-			LLXMLNodePtr row_child;
-			for (row_child = node->getFirstChild(); row_child.notNull(); row_child = row_child->getNextSibling())
-			{
-				if (row_child->hasName("column"))
-				{
-					std::string value = row_child->getTextContents();
-
-					std::string columnname("");
-					row_child->getAttributeString("name", columnname);
-
-					std::string font("");
-					row_child->getAttributeString("font", font);
-
-					std::string font_style("");
-					row_child->getAttributeString("font-style", font_style);
-
-					row["columns"][column_idx]["column"] = columnname;
-					row["columns"][column_idx]["value"] = value;
-					row["columns"][column_idx]["font"] = font;
-					row["columns"][column_idx]["font-style"] = font_style;
-					column_idx++;
-				}
-			}
-			name_list->addElement(row);
-		}
-	}
-
-	std::string contents = node->getTextContents();
-
-	typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
-	boost::char_separator<char> sep("\t\n");
-	tokenizer tokens(contents, sep);
-	tokenizer::iterator token_iter = tokens.begin();
-
-	while(token_iter != tokens.end())
-	{
-		const std::string& line = *token_iter;
-		name_list->addCommentText(line);
-		++token_iter;
-	}
-
-	return name_list;
 }
-
-
-
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index 1b7795ddff..759ea938f9 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -39,35 +39,58 @@
 
 
 class LLNameListCtrl
-:	public LLScrollListCtrl
+:	public LLScrollListCtrl, protected LLInstanceTracker<LLNameListCtrl>
 {
 public:
-	LLNameListCtrl(const std::string& name,
-				   const LLRect& rect,
-				   LLUICtrlCallback callback,
-				   void* userdata,
-				   BOOL allow_multiple_selection,
-				   BOOL draw_border = TRUE,
-				   S32 name_column_index = 0,
-				   const std::string& tooltip = LLStringUtil::null);
-	virtual ~LLNameListCtrl();
-
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
+	typedef enum e_name_type
+	{
+		INDIVIDUAL,
+		GROUP,
+		SPECIAL
+	} ENameType;
+
+	// provide names for enums
+	struct NameTypeNames : public LLInitParam::TypeValuesHelper<LLNameListCtrl::ENameType, NameTypeNames>
+	{
+		static void declareValues();
+	};
+
+	struct NameItem : public LLInitParam::Block<NameItem, LLScrollListItem::Params>
+	{
+		Optional<std::string>				display_name;
+		Optional<ENameType, NameTypeNames>	target;
+
+		NameItem()
+		:	display_name("name"),
+			target("target", INDIVIDUAL)
+		{}		
+	};
+
+	struct Params : public LLInitParam::Block<Params, LLScrollListCtrl::Params>
+	{
+		Optional<std::string>	name_column;
+		Optional<bool>	allow_calling_card_drop;
+		Params();
+	};
+
+protected:
+	LLNameListCtrl(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	// Add a user to the list by name.  It will be added, the name 
 	// requested from the cache, and updated as necessary.
-	BOOL addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM,
+	void addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM,
 					 BOOL enabled = TRUE, std::string& suffix = LLStringUtil::null);
-	BOOL addNameItem(LLScrollListItem* item, EAddPosition pos = ADD_BOTTOM);
+	void addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM);
 
-	virtual LLScrollListItem* addElement(const LLSD& value, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
+	/*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
+	LLScrollListItem* addRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM);
 
 	// Add a user to the list by name.  It will be added, the name 
 	// requested from the cache, and updated as necessary.
 	void addGroupNameItem(const LLUUID& group_id, EAddPosition pos = ADD_BOTTOM,
 						  BOOL enabled = TRUE);
-	void addGroupNameItem(LLScrollListItem* item, EAddPosition pos = ADD_BOTTOM);
+	void addGroupNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM);
 
 
 	void removeNameItem(const LLUUID& agent_id);
@@ -84,10 +107,11 @@ public:
 
 	void setAllowCallingCardDrop(BOOL b) { mAllowCallingCardDrop = b; }
 
+	/*virtual*/ void updateColumns();
 private:
-	static std::set<LLNameListCtrl*> sInstances;
-	S32    	 mNameColumnIndex;
-	BOOL	 mAllowCallingCardDrop;
+	S32    			mNameColumnIndex;
+	std::string		mNameColumn;
+	BOOL			mAllowCallingCardDrop;
 };
 
 #endif
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
new file mode 100644
index 0000000000..4a9dadfc7a
--- /dev/null
+++ b/indra/newview/llnavigationbar.cpp
@@ -0,0 +1,523 @@
+/** 
+ * @file llnavigationbar.cpp
+ * @brief Navigation bar implementation
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llnavigationbar.h"
+
+#include "llfocusmgr.h"
+#include "llmenugl.h"
+#include "llparcel.h"
+#include "llregistry.h"
+#include "llwindow.h"
+
+#include "llagent.h"
+#include "llfloaterhtmlhelp.h"
+#include "llfloaterreg.h"
+#include "lllocationhistory.h"
+#include "lllocationinputctrl.h"
+#include "llteleporthistory.h"
+#include "llslurl.h"
+#include "llurlsimstring.h"
+#include "llviewerparcelmgr.h"
+#include "llviewerregion.h"
+#include "llworldmap.h"
+
+
+/*
+TODO:
+- Load navbar height from saved settings (as it's done for status bar) or think of a better way.
+- Share location info formatting code with LLStatusBar.
+- Fix notifications appearing below navbar.
+- Navbar should not be visible in mouselook mode.
+*/
+
+S32 NAVIGATION_BAR_HEIGHT = 60; // *HACK
+LLNavigationBar* LLNavigationBar::sInstance = 0;
+
+LLNavigationBar* LLNavigationBar::getInstance()
+{
+	if (!sInstance)
+		sInstance = new LLNavigationBar();
+
+	return sInstance;
+}
+
+LLNavigationBar::LLNavigationBar()
+:	mTeleportHistoryMenu(NULL),
+	mLocationContextMenu(NULL),
+	mBtnBack(NULL),
+	mBtnForward(NULL),
+	mBtnHome(NULL),
+	mBtnInfo(NULL),
+	mBtnHelp(NULL),
+	mCmbLocation(NULL),
+	mLeSearch(NULL)
+{
+	setIsChrome(TRUE);
+
+	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_navigation_bar.xml");
+
+	// navigation bar can never get a tab
+	setFocusRoot(FALSE);
+
+}
+
+LLNavigationBar::~LLNavigationBar()
+{
+	sInstance = 0;
+}
+
+BOOL LLNavigationBar::postBuild()
+{
+	mBtnBack	= getChild<LLButton>("back_btn");
+	mBtnForward	= getChild<LLButton>("forward_btn");
+	mBtnHome	= getChild<LLButton>("home_btn");
+	mBtnInfo	= getChild<LLButton>("info_btn");
+	mBtnHelp	= getChild<LLButton>("help_btn");
+	
+	mCmbLocation= getChild<LLLocationInputCtrl>("location_combo"); 
+	mLeSearch	= getChild<LLLineEditor>("search_input");
+	
+	if (!mBtnBack || !mBtnForward || !mBtnHome || !mBtnInfo || !mBtnHelp ||
+		!mCmbLocation || !mLeSearch)
+	{
+		llwarns << "Malformed navigation bar" << llendl;
+		return FALSE;
+	}
+	
+	mBtnBack->setEnabled(FALSE);
+	mBtnBack->setClickedCallback(boost::bind(&LLNavigationBar::onBackButtonClicked, this));
+	mBtnBack->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this, _2));
+
+	mBtnForward->setEnabled(FALSE);
+	mBtnForward->setClickedCallback(boost::bind(&LLNavigationBar::onForwardButtonClicked, this));
+	mBtnForward->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this, _2));
+
+	mBtnHome->setClickedCallback(boost::bind(&LLNavigationBar::onHomeButtonClicked, this));
+	mBtnInfo->setClickedCallback(boost::bind(&LLNavigationBar::onInfoButtonClicked, this));
+	mBtnHelp->setClickedCallback(boost::bind(&LLNavigationBar::onHelpButtonClicked, this));
+
+	mCmbLocation->setFocusReceivedCallback(boost::bind(&LLNavigationBar::onLocationFocusReceived, this));
+	mCmbLocation->setFocusLostCallback(boost::bind(&LLNavigationBar::onLocationFocusLost, this));
+	mCmbLocation->setTextEntryCallback(boost::bind(&LLNavigationBar::onLocationTextEntry, this, _1));
+	mCmbLocation->setPrearrangeCallback(boost::bind(&LLNavigationBar::onLocationPrearrange, this, _2));
+	mCmbLocation->setSelectionCallback(boost::bind(&LLNavigationBar::onLocationSelection, this));
+	
+	mLeSearch->setCommitCallback(boost::bind(&LLNavigationBar::onSearchCommit, this));
+
+	// Register callbacks and load the location field context menu (NB: the order matters).
+	LLUICtrl::CommitCallbackRegistry::ScopedRegistrar commit_registrar;
+	LLMenuItemGL::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
+	commit_registrar.add("Navbar.Action", boost::bind(&LLNavigationBar::onLocationContextMenuItemClicked, this, _2));
+	enable_registrar.add("Navbar.EnableMenuItem", boost::bind(&LLNavigationBar::onLocationContextMenuItemEnabled, this, _2));
+	mLocationContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_navbar.xml", this);
+	if (!mLocationContextMenu)
+	{
+		llwarns << "Error loading navigation bar context menu" << llendl;
+		return FALSE;
+	}
+
+	// we'll be notified on teleport history changes
+	LLTeleportHistory::getInstance()->setHistoryChangedCallback(
+			boost::bind(&LLNavigationBar::onTeleportHistoryChanged, this));
+	
+	LLLocationHistory::getInstance()->setLoadedCallback(
+			boost::bind(&LLNavigationBar::onLocationHistoryLoaded, this));
+	
+	LLLocationHistory::getInstance()->load(); // *TODO: temporary, remove this after debugging
+	LLTeleportHistory::getInstance()->load(); // *TODO: temporary, remove this after debugging
+	
+	return TRUE;
+}
+
+void LLNavigationBar::draw()
+{
+	// *TODO: It doesn't look very optimal to refresh location every frame.
+	refreshLocation();
+	LLPanel::draw();
+}
+
+BOOL LLNavigationBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+	// If the location field is clicked then show its context menu.
+	if (mCmbLocation->getRect().pointInRect(x, y))
+	{
+
+		// Pass the focus to the line editor when it is righ-clicked
+		mCmbLocation->setFocus(TRUE);
+
+		// IAN BUG why do the individual items need to be enabled individually here?
+		// where are they disabled?
+
+		if (mLocationContextMenu)
+		{
+			mLocationContextMenu->setItemEnabled("Cut",			mCmbLocation->canCut());
+			mLocationContextMenu->setItemEnabled("Copy", 		mCmbLocation->canCopy());
+			mLocationContextMenu->setItemEnabled("Paste", 		mCmbLocation->canPaste());
+			mLocationContextMenu->setItemEnabled("Delete",		mCmbLocation->canDeselect());
+			mLocationContextMenu->setItemEnabled("Select All",	mCmbLocation->canSelectAll());
+
+			mLocationContextMenu->buildDrawLabels();
+			mLocationContextMenu->updateParent(LLMenuGL::sMenuContainer);
+			LLMenuGL::showPopup(this, mLocationContextMenu, x, y);
+		}
+	}
+	return TRUE;
+}
+
+void LLNavigationBar::onBackButtonClicked()
+{
+	LLTeleportHistory::getInstance()->goBack();
+}
+
+void LLNavigationBar::onBackOrForwardButtonHeldDown(const LLSD& param)
+{
+	if (param["count"].asInteger() == 0)
+		showTeleportHistoryMenu();
+}
+
+void LLNavigationBar::onForwardButtonClicked()
+{
+	LLTeleportHistory::getInstance()->goForward();
+}
+
+void LLNavigationBar::onHomeButtonClicked()
+{
+	gAgent.teleportHome();
+}
+
+void LLNavigationBar::onInfoButtonClicked()
+{
+	// XXX temporary
+	LLTeleportHistory::getInstance()->dump();
+	LLLocationHistory::getInstance()->dump();
+}
+
+void LLNavigationBar::onHelpButtonClicked()
+{
+	gViewerHtmlHelp.show();
+}
+
+void LLNavigationBar::onSearchCommit()
+{
+	std::string search_text = mLeSearch->getText();
+	LLFloaterReg::showInstance("search", LLSD().insert("panel", "all").insert("id", LLSD(search_text)));
+}
+
+void LLNavigationBar::onLocationFocusReceived()
+{
+	mCmbLocation->setTextEntry(gAgent.getSLURL());
+}
+
+void LLNavigationBar::onLocationFocusLost()
+{
+}
+
+void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata)
+{
+	int idx = userdata.asInteger();
+	LLTeleportHistory::getInstance()->goToItem(idx);
+}
+
+// This is called when user presses enter in the location input
+// or selects a location from the typed locations dropdown.
+void LLNavigationBar::onLocationSelection()
+{
+	std::string loc_str = mCmbLocation->getSimple();
+
+	// Will not teleport to empty location.
+	if (loc_str.empty())
+		return;
+	
+	// *TODO: validate location before adding it to the history.
+	S32 selected_item = mCmbLocation->getCurrentIndex();
+	if (selected_item == -1) // user has typed text
+	{
+		LLLocationHistory* lh = LLLocationHistory::getInstance();
+		mCmbLocation->add(loc_str);
+		lh->addItem(loc_str);
+		lh->save();
+	}
+
+	// If the input is not a SLURL treat it as a region name.
+	if (!LLSLURL::isSLURL(loc_str))
+	{
+		loc_str = LLSLURL::buildSLURL(loc_str, 128, 128, 0);
+	}
+	
+	teleport(loc_str);
+}
+
+void LLNavigationBar::onLocationTextEntry(LLUICtrl* ctrl)
+{
+	LLLineEditor* editor = dynamic_cast<LLLineEditor*>(ctrl);
+	if (!editor)
+		return;
+
+	// *TODO: decide whether to populate the list here on in LLLocationInputCtrl.
+	std::string text = editor->getText();
+	//rebuildLocationHistory(text);
+}
+
+void LLNavigationBar::onLocationPrearrange(const LLSD& data)
+{
+	std::string filter = data.asString();
+	rebuildLocationHistory(filter);
+}
+
+void LLNavigationBar::onLocationHistoryLoaded()
+{
+	rebuildLocationHistory();
+}
+
+void LLNavigationBar::onTeleportHistoryChanged()
+{
+	// Update navigation controls.
+	LLTeleportHistory* h = LLTeleportHistory::getInstance();
+	int cur_item = h->getCurrentItemIndex();
+	mBtnBack->setEnabled(cur_item > 0);
+	mBtnForward->setEnabled(cur_item < ((int)h->getItems().size() - 1));
+}
+
+void LLNavigationBar::refreshLocation()
+{
+	// Update location field.
+	if (mCmbLocation && !mCmbLocation->childHasFocus())
+	{
+		std::string location_name;
+
+		if (!gAgent.buildLocationString(location_name, LLAgent::LOCATION_FORMAT_FULL))
+			location_name = "Unknown";
+
+		mCmbLocation->setText(location_name);
+	}
+}
+
+void LLNavigationBar::rebuildLocationHistory(std::string filter)
+{
+	if (!mCmbLocation)
+	{
+		llwarns << "Cannot find location history control" << llendl;
+		return;
+	}
+	
+	LLLocationHistory::location_list_t filtered_items;
+	const LLLocationHistory::location_list_t* itemsp = NULL;
+	LLLocationHistory* lh = LLLocationHistory::getInstance();
+	
+	if (filter.empty())
+		itemsp = &lh->getItems();
+	else
+	{
+		lh->getMatchingItems(filter, filtered_items);
+		itemsp = &filtered_items;
+	}
+	
+	mCmbLocation->removeall();
+	for (LLLocationHistory::location_list_t::const_reverse_iterator it = itemsp->rbegin(); it != itemsp->rend(); it++)
+		mCmbLocation->add(*it);
+}
+
+void LLNavigationBar::rebuildTeleportHistoryMenu()
+{
+	// Has the pop-up menu been built?
+	if (mTeleportHistoryMenu)
+	{
+		// Clear it.
+		// *TODO: LLMenuGL should have a method for removing all items.
+		while (mTeleportHistoryMenu->getItemCount())
+		{
+			LLMenuItemGL* itemp = mTeleportHistoryMenu->getItem(0);
+			mTeleportHistoryMenu->removeChild(itemp);
+		}
+	}
+	else
+	{
+		// Create it.
+		LLMenuGL::Params menu_p;
+		menu_p.name("popup");
+		menu_p.can_tear_off(false);
+		menu_p.visible(false);
+		menu_p.bg_visible(true);
+		mTeleportHistoryMenu = LLUICtrlFactory::create<LLMenuGL>(menu_p);
+		
+		addChild(mTeleportHistoryMenu);
+	}
+	
+	// Populate the menu with teleport history items.
+	LLTeleportHistory* hist = LLTeleportHistory::getInstance();
+	const LLTeleportHistory::slurl_list_t& hist_items = hist->getItems();
+	int cur_item = hist->getCurrentItemIndex();
+	
+	// Items will be shown in the reverse order, just like in Firefox.
+	for (int i = (int)hist_items.size()-1; i >= 0; i--)
+	{
+		LLMenuItemCallGL::Params item_params;
+		std::string title = hist_items[i].mTitle;
+		
+		if (i == cur_item)
+			item_params.font.style("BOLD");
+		else
+			title = "   " + title;
+
+		item_params.name(title);
+		item_params.label(title);
+		item_params.on_click.function(boost::bind(&LLNavigationBar::onTeleportHistoryMenuItemClicked, this, i));
+		mTeleportHistoryMenu->addChild(LLUICtrlFactory::create<LLMenuItemCallGL>(item_params));
+	}
+}
+
+// static
+void LLNavigationBar::onRegionNameResponse(
+		LLVector3 local_coords,
+		U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)
+{
+	LLVector3d region_pos = from_region_handle(region_handle);
+	LLVector3d global_pos = region_pos + (LLVector3d) local_coords;
+	
+	llinfos << "Teleporting to: " << global_pos  << llendl;
+	gAgent.teleportViaLocation(global_pos);
+}
+
+// static
+void LLNavigationBar::teleport(std::string slurl)
+{
+	std::string sim_string = LLSLURL::stripProtocol(slurl);
+	std::string region_name;
+	S32 x = 128;
+	S32 y = 128;
+	S32 z = 0;
+
+	LLURLSimString::parse(sim_string, &region_name, &x, &y, &z);
+
+	// Resolve region name to global coords.
+	LLVector3 local_coords(x, y, z);
+	LLWorldMap::getInstance()->sendNamedRegionRequest(region_name,
+			boost::bind(&LLNavigationBar::onRegionNameResponse, local_coords, _1, _2, _3, _4),
+			slurl,
+			false); // don't teleport
+}
+
+void	LLNavigationBar::showTeleportHistoryMenu()
+{
+	// Don't show the popup if teleport history is empty.
+	if (LLTeleportHistory::getInstance()->isEmpty())
+	{
+		lldebugs << "Teleport history is empty, will not show the menu." << llendl;
+		return;
+	}
+	
+	rebuildTeleportHistoryMenu();
+
+	if (mTeleportHistoryMenu == NULL)
+		return;
+	
+	// *TODO: why to draw/update anything before showing the menu?
+	mTeleportHistoryMenu->buildDrawLabels();
+	mTeleportHistoryMenu->updateParent(LLMenuGL::sMenuContainer);
+	LLRect btnBackRect = mBtnBack->getRect();
+	LLMenuGL::showPopup(this, mTeleportHistoryMenu, btnBackRect.mLeft, btnBackRect.mBottom);
+
+	// *HACK pass the mouse capturing to the drop-down menu
+	gFocusMgr.setMouseCapture( mTeleportHistoryMenu );
+}
+
+void LLNavigationBar::onLocationContextMenuItemClicked(const LLSD& userdata)
+{
+	std::string level = userdata.asString();
+
+	if (level == std::string("copy_url"))
+	{
+		LLUIString url(gAgent.getSLURL());
+		LLView::getWindow()->copyTextToClipboard(url.getWString());
+		lldebugs << "Copy SLURL" << llendl;
+	}
+	else if (level == std::string("landmark"))
+	{
+		// *TODO To be implemented
+		lldebugs << "Add Landmark" << llendl;
+	}
+	else if (level == std::string("cut"))
+	{
+		mCmbLocation->cut();
+		lldebugs << "Cut" << llendl;
+	}
+	else if (level == std::string("copy"))
+	{
+		mCmbLocation->copy();
+		lldebugs << "Copy" << llendl;
+	}
+	else if (level == std::string("paste"))
+	{
+		mCmbLocation->paste();
+		lldebugs << "Paste" << llendl;
+	}
+	else if (level == std::string("delete"))
+	{
+		mCmbLocation->deleteSelection();
+		lldebugs << "Delete" << llendl;
+	}
+	else if (level == std::string("select_all"))
+	{
+		mCmbLocation->selectAll();
+		lldebugs << "Select All" << llendl;
+	}
+}
+
+bool LLNavigationBar::onLocationContextMenuItemEnabled(const LLSD& userdata)
+{
+	std::string level = userdata.asString();
+
+	if (level == std::string("can_cut"))
+	{
+		return mCmbLocation->canCut();
+	}
+	else if (level == std::string("can_copy"))
+	{
+		return mCmbLocation->canCopy();
+	}
+	else if (level == std::string("can_paste"))
+	{
+		return mCmbLocation->canPaste();
+	}
+	else if (level == std::string("can_delete"))
+	{
+		return mCmbLocation->canDeselect();
+	}
+	else if (level == std::string("can_select_all"))
+	{
+		return mCmbLocation->canSelectAll();
+	}
+
+	return false;
+}
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
new file mode 100644
index 0000000000..4ef3039eb7
--- /dev/null
+++ b/indra/newview/llnavigationbar.h
@@ -0,0 +1,106 @@
+/** 
+ * @file llnavigationbar.h
+ * @brief Navigation bar definition
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLNAVIGATIONBAR_H
+#define LL_LLNAVIGATIONBAR_H
+
+#include "llpanel.h"
+
+extern S32 NAVIGATION_BAR_HEIGHT;
+
+class LLButton;
+class LLLocationInputCtrl;
+class LLMenuGL;
+class LLLineEditor;
+
+/**
+ * Web browser-like navigation bar.
+ */ 
+class LLNavigationBar
+:	public LLPanel
+{
+	LOG_CLASS(LLNavigationBar);
+
+public:
+	static LLNavigationBar* getInstance();
+	virtual ~LLNavigationBar();
+	
+	/*virtual*/ void	draw();
+	/*virtual*/ BOOL	postBuild();
+	/*virtual*/ BOOL	handleRightMouseDown(S32 x, S32 y, MASK mask);
+
+private:
+	LLNavigationBar();
+
+	void refreshLocation();
+	void rebuildLocationHistory(std::string filter = "");
+	void rebuildTeleportHistoryMenu();
+	void showTeleportHistoryMenu();
+	
+	// callbacks
+	bool onLocationContextMenuItemEnabled(const LLSD& userdata);
+	void onLocationContextMenuItemClicked(const LLSD& userdata);
+	void onTeleportHistoryMenuItemClicked(const LLSD& userdata);
+	void onTeleportHistoryChanged();
+	void onBackButtonClicked();
+	void onBackOrForwardButtonHeldDown(const LLSD& param);
+	void onForwardButtonClicked();
+	void onHomeButtonClicked();
+	void onInfoButtonClicked();
+	void onHelpButtonClicked();
+	void onLocationFocusReceived();
+	void onLocationFocusLost();
+	void onLocationSelection();
+	void onLocationTextEntry(LLUICtrl* ctrl);
+	void onLocationPrearrange(const LLSD& data);
+	void onLocationHistoryLoaded();
+	void onSearchCommit();
+	static void onRegionNameResponse(
+			LLVector3 local_coords, U64 region_handle, const std::string& url,
+			const LLUUID& snapshot_id, bool teleport);
+
+	static void teleport(std::string slurl);
+
+	static LLNavigationBar *sInstance;
+	
+	LLMenuGL*				mLocationContextMenu;
+	LLMenuGL*				mTeleportHistoryMenu;
+	LLButton*				mBtnBack;
+	LLButton*				mBtnForward;
+	LLButton*				mBtnHome;
+	LLButton*				mBtnInfo;
+	LLButton*				mBtnHelp;
+	LLLineEditor*			mLeSearch;
+	LLLocationInputCtrl*	mCmbLocation;
+};
+
+#endif
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 2eee54df40..7d18616a13 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -1,7 +1,7 @@
 /** 
  * @file llnetmap.cpp
  * @author James Cook
- * @brief Display of surrounding regions, objects, and agents. View contained by LLFloaterMap.
+ * @brief Display of surrounding regions, objects, and agents. 
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
  * 
@@ -36,81 +36,43 @@
 #include "llnetmap.h"
 
 #include "indra_constants.h"
-#include "llui.h"
-#include "llmath.h"		// clampf()
+#include "llmath.h"
+#include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "llrender.h"
+#include "llui.h"
+
+#include "llglheaders.h"
 
 #include "llagent.h"
-#include "llcallingcard.h"
-#include "llcolorscheme.h"
-#include "llviewercontrol.h"
-#include "llfloateravatarinfo.h"
-#include "llfloaterworldmap.h"
-#include "llframetimer.h"
+#include "llappviewer.h" // for gDisconnected
+#include "llcallingcard.h" // LLAvatarTracker
 #include "lltracker.h"
-#include "llmenugl.h"
 #include "llsurface.h"
-#include "lltextbox.h"
-#include "lluictrlfactory.h"
-#include "lluuid.h"
 #include "llviewercamera.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
-#include "llviewermenu.h"
+#include "llviewercontrol.h"
 #include "llviewerobjectlist.h"
 #include "llviewerregion.h"
-#include "llviewerwindow.h"
-#include "llvoavatar.h"
 #include "llworld.h"
 #include "llworldmapview.h"		// shared draw code
-#include "llappviewer.h"				// Only for constants!
 
-#include "llglheaders.h"
+static LLRegisterWidget<LLNetMap> r1("net_map");
 
 const F32 MAP_SCALE_MIN = 64;
 const F32 MAP_SCALE_MID = 172;
 const F32 MAP_SCALE_MAX = 512;
 const F32 MAP_SCALE_INCREMENT = 16;
 const F32 MAP_MIN_PICK_DIST = 4;
-const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f;
-
-const S32 TRACKING_RADIUS = 3;
-
-LLNetMap::LLNetMap(const std::string& name) :
-	LLPanel(name),
-	mScale(128.f),
-	mObjectMapTPM(1.f),
-	mObjectMapPixels(255.f),
-	mTargetPanX( 0.f ),
-	mTargetPanY( 0.f ),
-	mCurPanX( 0.f ),
-	mCurPanY( 0.f ),
-	mUpdateNow( FALSE )
-{
-	mScale = gSavedSettings.getF32("MiniMapScale");
-	mPixelsPerMeter = mScale / LLWorld::getInstance()->getRegionWidthInMeters();
+const F32 MAX_PRIM_RADIUS = 256.0f; // Don't try to draw giant mega-prims on the mini map
 
+LLNetMap::LLNetMap (const Params & p) :
+	LLUICtrl (p),
+	mScale(128.0f),
+	mBackgroundColor (p.bg_color()),
+	mRotateMap(FALSE)
+{
 	mObjectImageCenterGlobal = gAgent.getCameraPositionGlobal();
-	
-	// Register event listeners for popup menu
-	(new LLScaleMap())->registerListener(this, "MiniMap.ZoomLevel");
-	(new LLStopTracking())->registerListener(this, "MiniMap.StopTracking");
-	(new LLEnableTracking())->registerListener(this, "MiniMap.EnableTracking");
-	(new LLShowAgentProfile())->registerListener(this, "MiniMap.ShowProfile");
-	(new LLEnableProfile())->registerListener(this, "MiniMap.EnableProfile");
-
-	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_mini_map.xml");
-
-	updateMinorDirections();
-
-	LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_mini_map.xml", this);
-	if (!menu)
-	{
-		menu = new LLMenuGL(LLStringUtil::null);
-	}
-	menu->setVisible(FALSE);
-	mPopupMenuHandle = menu->getHandle();
+	mPixelsPerMeter = mScale / REGION_WIDTH_METERS;
 }
 
 LLNetMap::~LLNetMap()
@@ -119,26 +81,21 @@ LLNetMap::~LLNetMap()
 
 void LLNetMap::setScale( F32 scale )
 {
-	mScale = scale;
-	if (mScale == 0.f)
-	{
-		mScale = 0.1f;
-	}
-	gSavedSettings.setF32("MiniMapScale", mScale);
-
+	mScale = llclamp(scale, 0.1f, 16.f*1024.f); // [reasonably small , unreasonably large]
+	
 	if (mObjectImagep.notNull())
 	{
-		F32 width = (F32)(getRect().getWidth());
-		F32 height = (F32)(getRect().getHeight());
-		F32 diameter = sqrt(width * width + height * height);
-		F32 region_widths = diameter / mScale;
+		F32 half_width = (F32)(getRect().getWidth() / 2);
+		F32 half_height = (F32)(getRect().getHeight() / 2);
+		F32 radius = sqrt( half_width * half_width + half_height * half_height );
+		F32 region_widths = (2.f*radius)/mScale;
 		F32 meters = region_widths * LLWorld::getInstance()->getRegionWidthInMeters();
 		F32 num_pixels = (F32)mObjectImagep->getWidth();
-		mObjectMapTPM = num_pixels / meters;
-		mObjectMapPixels = diameter;
+		mObjectMapTPM = num_pixels/meters;
+		mObjectMapPixels = 2.f*radius;
 	}
 
-	mPixelsPerMeter = mScale / LLWorld::getInstance()->getRegionWidthInMeters();
+	mPixelsPerMeter = mScale / REGION_WIDTH_METERS;
 
 	mUpdateNow = TRUE;
 }
@@ -155,21 +112,27 @@ void LLNetMap::translatePan( F32 delta_x, F32 delta_y )
 void LLNetMap::draw()
 {
  	static LLFrameTimer map_timer;
-
+	static LLCachedControl<LLColor4> map_avatar_color(gSavedSkinSettings, "MapAvatarColor", LLColor4::white);
+	static LLCachedControl<LLColor4> map_avatar_friend_color(gSavedSkinSettings, "MapAvatarFriendColor", LLColor4::white);
+	static LLCachedControl<LLColor4> map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white);
+	static LLCachedControl<LLColor4> map_track_disabled_color(gSavedSkinSettings, "MapTrackDisabledColor", LLColor4::white);
+	static LLCachedControl<LLColor4> map_frustum_color(gSavedSkinSettings, "MapFrustumColor", LLColor4::white);
+	static LLCachedControl<LLColor4> map_frustum_rotating_color(gSavedSkinSettings, "MapFrustumRotatingColor", LLColor4::white);
+	
 	if (mObjectImagep.isNull())
 	{
 		createObjectImage();
 	}
-
+	
 	mCurPanX = lerp(mCurPanX, mTargetPanX, LLCriticalDamp::getInterpolant(0.1f));
 	mCurPanY = lerp(mCurPanY, mTargetPanY, LLCriticalDamp::getInterpolant(0.1f));
 
+	// Prepare a scissor region
 	F32 rotation = 0;
 
-	// Prepare a scissor region
 	{
 		LLGLEnable scissor(GL_SCISSOR_TEST);
-
+		
 		{
 			gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
 			LLLocalClipRect clip(getLocalRect());
@@ -177,11 +140,9 @@ void LLNetMap::draw()
 			glMatrixMode(GL_MODELVIEW);
 
 			// Draw background rectangle
-			if(isBackgroundVisible())
-			{
-				gGL.color4fv(isBackgroundOpaque() ? getBackgroundColor().mV : getTransparentColor().mV);
-				gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0);
-			}
+			LLColor4 background_color = mBackgroundColor.get();
+			gGL.color4fv( background_color.mV );
+			gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0);
 		}
 
 		// region 0,0 is in the middle
@@ -192,8 +153,7 @@ void LLNetMap::draw()
 
 		gGL.translatef( (F32) center_sw_left, (F32) center_sw_bottom, 0.f);
 
-		BOOL rotate_map = gSavedSettings.getBOOL( "MiniMapRotate" );
-		if( rotate_map )
+		if( mRotateMap )
 		{
 			// rotate subsequent draws to agent rotation
 			rotation = atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] );
@@ -202,9 +162,6 @@ void LLNetMap::draw()
 
 		// figure out where agent is
 		S32 region_width = llround(LLWorld::getInstance()->getRegionWidthInMeters());
-		LLColor4 this_region_color = gColors.getColor( "NetMapThisRegion" );
-		LLColor4 live_region_color = gColors.getColor( "NetMapLiveRegion" );
-		LLColor4 dead_region_color = gColors.getColor( "NetMapDeadRegion" );
 
 		for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
 			 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
@@ -222,10 +179,18 @@ void LLNetMap::draw()
 			F32 top =		bottom + mScale ;
 			F32 right =		left + mScale ;
 
-			gGL.color4fv(regionp == gAgent.getRegion() ? this_region_color.mV : live_region_color.mV);
+			if (regionp == gAgent.getRegion())
+			{
+				gGL.color4f(1.f, 1.f, 1.f, 1.f);
+			}
+			else
+			{
+				gGL.color4f(0.8f, 0.8f, 0.8f, 1.f);
+			}
+
 			if (!regionp->isAlive())
 			{
-				gGL.color4fv(dead_region_color.mV);
+				gGL.color4f(1.f, 0.5f, 0.5f, 1.f);
 			}
 
 
@@ -317,57 +282,86 @@ void LLNetMap::draw()
 		// Mouse pointer in local coordinates
 		S32 local_mouse_x;
 		S32 local_mouse_y;
+		//localMouse(&local_mouse_x, &local_mouse_y);
 		LLUI::getCursorPositionLocal(this, &local_mouse_x, &local_mouse_y);
 		mClosestAgentToCursor.setNull();
 		F32 closest_dist = F32_MAX;
 
 		// Draw avatars
-		LLColor4 avatar_color = gColors.getColor( "MapAvatar" );
-		LLColor4 friend_color = gColors.getColor( "MapFriend" );
-		std::vector<LLUUID> avatar_ids;
-		std::vector<LLVector3d> positions;
-		LLWorld::getInstance()->getAvatars(&avatar_ids, &positions);
-		for(U32 i=0; i<avatar_ids.size(); i++)
+		for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
+			 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
 		{
+			LLViewerRegion* regionp = *iter;
+			const LLVector3d& origin_global = regionp->getOriginGlobal();
+
+			S32 count = regionp->mMapAvatars.count();
+			S32 i;
+			LLVector3 pos_local;
+			U32 compact_local;
+			U8 bits;
 			// TODO: it'd be very cool to draw these in sorted order from lowest Z to highest.
 			// just be careful to sort the avatar IDs along with the positions. -MG
-			pos_map = globalPosToView(positions[i], rotate_map);
+			for (i = 0; i < count; i++)
+			{
+				compact_local = regionp->mMapAvatars.get(i);
 
-			LLWorldMapView::drawAvatar(
-				pos_map.mV[VX], pos_map.mV[VY], 
-				is_agent_friend(avatar_ids[i]) ? friend_color : avatar_color, 
-				pos_map.mV[VZ]);
+				bits = compact_local & 0xFF;
+				pos_local.mV[VZ] = F32(bits) * 4.f;
+				compact_local >>= 8;
 
-			F32	dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y));
-			if(dist_to_cursor < MAP_MIN_PICK_DIST && dist_to_cursor < closest_dist)
-			{
-				closest_dist = dist_to_cursor;
-				mClosestAgentToCursor = avatar_ids[i];
+				bits = compact_local & 0xFF;
+				pos_local.mV[VY] = (F32)bits;
+				compact_local >>= 8;
+
+				bits = compact_local & 0xFF;
+				pos_local.mV[VX] = (F32)bits;
+
+				pos_global.setVec( pos_local );
+				pos_global += origin_global;
+
+				pos_map = globalPosToView(pos_global);
+
+				BOOL show_as_friend = FALSE;
+				if( i < regionp->mMapAvatarIDs.count())
+				{
+					show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(regionp->mMapAvatarIDs.get(i)) != NULL);
+				}
+				LLWorldMapView::drawAvatar(
+					pos_map.mV[VX], pos_map.mV[VY], 
+					show_as_friend ? map_avatar_friend_color : map_avatar_color, 
+					pos_map.mV[VZ]);
+
+				F32	dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y));
+				if(dist_to_cursor < MAP_MIN_PICK_DIST && dist_to_cursor < closest_dist)
+				{
+					closest_dist = dist_to_cursor;
+					mClosestAgentToCursor = regionp->mMapAvatarIDs.get(i);
+				}
 			}
 		}
 
 		// Draw dot for autopilot target
 		if (gAgent.getAutoPilot())
 		{
-			drawTracking( gAgent.getAutoPilotTargetGlobal(), rotate_map, gTrackColor );
+			drawTracking( gAgent.getAutoPilotTargetGlobal(), map_track_color );
 		}
 		else
 		{
 			LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
 			if (  LLTracker::TRACKING_AVATAR == tracking_status )
 			{
-				drawTracking( LLAvatarTracker::instance().getGlobalPos(), rotate_map, gTrackColor );
+				drawTracking( LLAvatarTracker::instance().getGlobalPos(), map_track_color );
 			} 
 			else if ( LLTracker::TRACKING_LANDMARK == tracking_status 
 					|| LLTracker::TRACKING_LOCATION == tracking_status )
 			{
-				drawTracking( LLTracker::getTrackedPositionGlobal(), rotate_map, gTrackColor );
+				drawTracking( LLTracker::getTrackedPositionGlobal(), map_track_color );
 			}
 		}
 
 		// Draw dot for self avatar position
 		pos_global = gAgent.getPositionGlobal();
-		pos_map = globalPosToView(pos_global, rotate_map);
+		pos_map = globalPosToView(pos_global);
 		LLUIImagePtr you = LLWorldMapView::sAvatarYouSmallImage;
 		you->draw(
 			llround(pos_map.mV[VX]) - you->getWidth()/2, 
@@ -389,9 +383,9 @@ void LLNetMap::draw()
 
 		gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
 
-		if( rotate_map )
+		if( mRotateMap )
 		{
-			gGL.color4fv(gColors.getColor("NetMapFrustum").mV);
+			gGL.color4fv((map_frustum_color()).mV);
 
 			gGL.begin( LLRender::TRIANGLES  );
 				gGL.vertex2f( ctr_x, ctr_y );
@@ -401,7 +395,7 @@ void LLNetMap::draw()
 		}
 		else
 		{
-			gGL.color4fv(gColors.getColor("NetMapFrustumRotating").mV);
+			gGL.color4fv((map_frustum_rotating_color()).mV);
 			
 			// If we don't rotate the map, we have to rotate the frustum.
 			gGL.pushMatrix();
@@ -416,27 +410,11 @@ void LLNetMap::draw()
 		}
 	}
 	
-	// Rotation of 0 means that North is up
-	setDirectionPos( getChild<LLTextBox>("e_label"), rotation);
-	setDirectionPos( getChild<LLTextBox>("n_label"), rotation + F_PI_BY_TWO);
-	setDirectionPos( getChild<LLTextBox>("w_label"), rotation + F_PI);
-	setDirectionPos( getChild<LLTextBox>("s_label"), rotation + F_PI + F_PI_BY_TWO);
-
-	setDirectionPos( getChild<LLTextBox>("ne_label"), rotation + F_PI_BY_TWO / 2);
-	setDirectionPos( getChild<LLTextBox>("nw_label"), rotation + F_PI_BY_TWO + F_PI_BY_TWO / 2);
-	setDirectionPos( getChild<LLTextBox>("sw_label"), rotation + F_PI + F_PI_BY_TWO / 2);
-	setDirectionPos( getChild<LLTextBox>("se_label"), rotation + F_PI + F_PI_BY_TWO + F_PI_BY_TWO / 2);
-
-	LLView::draw();
+	LLUICtrl::draw();
 }
 
-void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent)
+LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos )
 {
-	LLPanel::reshape(width, height, called_from_parent);
-	updateMinorDirections();
-}
-
-LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos, BOOL rotated ){
 	LLVector3d relative_pos_global = global_pos - gAgent.getCameraPositionGlobal();
 	LLVector3 pos_local;
 	pos_local.setVec(relative_pos_global);  // convert to floats from doubles
@@ -445,7 +423,7 @@ LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos, BOOL rotated
 	pos_local.mV[VY] *= mPixelsPerMeter;
 	// leave Z component in meters
 
-	if( rotated )
+	if( mRotateMap )
 	{
 		F32 radians = atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] );
 		LLQuaternion rot(radians, LLVector3(0.f, 0.f, 1.f));
@@ -458,10 +436,10 @@ LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos, BOOL rotated
 	return pos_local;
 }
 
-void LLNetMap::drawTracking(const LLVector3d& pos_global, BOOL rotated,
-							const LLColor4& color, BOOL draw_arrow )
+void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color, 
+							BOOL draw_arrow )
 {
-	LLVector3 pos_local = globalPosToView( pos_global, rotated );
+	LLVector3 pos_local = globalPosToView( pos_global );
 	if( (pos_local.mV[VX] < 0) ||
 		(pos_local.mV[VY] < 0) ||
 		(pos_local.mV[VX] >= getRect().getWidth()) ||
@@ -484,16 +462,16 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, BOOL rotated,
 	}
 }
 
-LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y, BOOL rotated )
+LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
 {
 	x -= llround(getRect().getWidth() / 2 + mCurPanX);
 	y -= llround(getRect().getHeight() / 2 + mCurPanY);
 
-	LLVector3 pos_local( (F32)x, (F32)y, 0.f );
+	LLVector3 pos_local( (F32)x, (F32)y, 0 );
 
 	F32 radians = - atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] );
 
-	if( rotated )
+	if( mRotateMap )
 	{
 		LLQuaternion rot(radians, LLVector3(0.f, 0.f, 1.f));
 		pos_local.rotVec( rot );
@@ -522,87 +500,55 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec
 	{
 		return FALSE;
 	}
-	LLViewerRegion*	region = LLWorld::getInstance()->getRegionFromPosGlobal( viewPosToGlobal( x, y , gSavedSettings.getBOOL( "MiniMapRotate" )) );
+	
+	// mToolTipMsg = "[AGENT][REGION](Double-click to open Map)"
+	
+	LLStringUtil::format_map_t args;
+	std::string fullname;
+	if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname))
+	{
+		args["[AGENT]"] = fullname + "\n";
+	}
+	else
+	{
+		args["[AGENT]"] = "";
+	}
+	
+	LLViewerRegion*	region = LLWorld::getInstance()->getRegionFromPosGlobal( viewPosToGlobal( x, y ) );
 	if( region )
 	{
-		msg.assign("");
-		std::string fullname;
-		if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname))
-		{
-			msg.append(fullname);
-			msg.append("\n");
-		}
-		msg.append( region->getName() );
-
-#ifndef LL_RELEASE_FOR_DOWNLOAD
-		std::string buffer;
-		msg.append("\n");
-		buffer = region->getHost().getHostName();
-		msg.append(buffer);
-		msg.append("\n");
-		buffer = region->getHost().getString();
-		msg.append(buffer);
-#endif
-		msg.append("\n");
-		msg.append(getToolTip());
-
+		args["[REGION]"] = region->getName() + "\n";
+	}
+	else
+	{
+		args["[REGION]"] = "";
+	}
+	
+	msg = mToolTipMsg;
+	LLStringUtil::format(msg, args);
+	
+	// set sticky_rect
+	if (region)
+	{
 		S32 SLOP = 4;
 		localPointToScreen( 
 			x - SLOP, y - SLOP, 
 			&(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) );
 		sticky_rect_screen->mRight = sticky_rect_screen->mLeft + 2 * SLOP;
 		sticky_rect_screen->mTop = sticky_rect_screen->mBottom + 2 * SLOP;
-		handled = TRUE;
-	}
-	if(!handled)
-	{
-		return LLPanel::handleToolTip(x, y, msg, sticky_rect_screen);
 	}
+	
+	handled = TRUE;
 	return handled;
 }
 
 
-void LLNetMap::setDirectionPos( LLTextBox* text_box, F32 rotation )
-{
-	// Rotation is in radians.
-	// Rotation of 0 means x = 1, y = 0 on the unit circle.
-
-	F32 half_height = (F32)( (getRect().getHeight() - text_box->getRect().getHeight()) / 2);
-	F32 half_width  = (F32)( (getRect().getWidth() - text_box->getRect().getWidth()) / 2);
-	F32 radius = llmin( half_height, half_width );
-
-	// Inset by a little to account for position display.
-	radius -= 8.f;
-
-	text_box->setOrigin(llround(half_width  + radius * cos( rotation )),
-						llround(half_height + radius * sin( rotation )));
-}
-
-void LLNetMap::updateMinorDirections()
-{
-	if (getChild<LLTextBox>("ne_label") == NULL)
-	{
-		return;
-	}
-
-	// Hide minor directions if they cover too much of the map
-	bool show_minors = getChild<LLTextBox>("ne_label")->getRect().getHeight() < MAP_MINOR_DIR_THRESHOLD *
-			llmin(getRect().getWidth(), getRect().getHeight());
-
-	getChild<LLTextBox>("ne_label")->setVisible(show_minors);
-	getChild<LLTextBox>("nw_label")->setVisible(show_minors);
-	getChild<LLTextBox>("sw_label")->setVisible(show_minors);
-	getChild<LLTextBox>("se_label")->setVisible(show_minors);
-}
-
 void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius_meters )
 {
 	LLVector3 local_pos;
 	local_pos.setVec( pos - mObjectImageCenterGlobal );
 
-	// DEV-17370 - megaprims of size > 4096 cause lag.  (go figger.)
-	const F32 MAX_RADIUS = 256.0f;
-	F32 radius_clamped = llmin(radius_meters, MAX_RADIUS);
+	F32 radius_clamped = llmin(radius_meters, MAX_PRIM_RADIUS);
 	
 	S32 diameter_pixels = llround(2 * radius_clamped * mObjectMapTPM);
 	renderPoint( local_pos, color, diameter_pixels );
@@ -697,10 +643,10 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color,
 void LLNetMap::createObjectImage()
 {
 	// Find the size of the side of a square that surrounds the circle that surrounds getRect().
-	// ... which is, the diagonal of the rect.
-	F32 width = getRect().getWidth();
-	F32 height = getRect().getHeight();
-	S32 square_size = llround( sqrt(width*width + height*height) );
+	F32 half_width = (F32)(getRect().getWidth() / 2);
+	F32 half_height = (F32)(getRect().getHeight() / 2);
+	F32 radius = sqrt( half_width * half_width + half_height * half_height );
+	S32 square_size = S32( 2 * radius );
 
 	// Find the least power of two >= the minimum size.
 	const S32 MIN_SIZE = 32;
@@ -723,75 +669,3 @@ void LLNetMap::createObjectImage()
 	}
 	mUpdateNow = TRUE;
 }
-
-BOOL LLNetMap::handleDoubleClick( S32 x, S32 y, MASK mask )
-{
-	LLFloaterWorldMap::show(NULL, FALSE);
-	return TRUE;
-}
-
-BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
-{
-	mClosestAgentAtLastRightClick = mClosestAgentToCursor;
-	LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
-	if (menu)
-	{
-		menu->buildDrawLabels();
-		menu->updateParent(LLMenuGL::sMenuContainer);
-		LLMenuGL::showPopup(this, menu, x, y);
-	}
-	return TRUE;
-}
-
-
-// static
-bool LLNetMap::LLScaleMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-{
-	LLNetMap *self = mPtr;
-
-	S32 level = userdata.asInteger();
-
-	switch(level)
-	{
-	case 0:
-		self->setScale(MAP_SCALE_MIN);
-		break;
-	case 1:
-		self->setScale(MAP_SCALE_MID);
-		break;
-	case 2:
-		self->setScale(MAP_SCALE_MAX);
-		break;
-	default:
-		break;
-	}
-
-	return true;
-}
-
-bool LLNetMap::LLStopTracking::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-{
-	LLTracker::stopTracking(NULL);
-	return true;
-}
-
-bool LLNetMap::LLEnableTracking::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-{
-	LLNetMap *self = mPtr;
-	self->findControl(userdata["control"].asString())->setValue(LLTracker::isTracking(NULL));
-	return true;
-}
-
-bool LLNetMap::LLShowAgentProfile::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-{
-	LLNetMap *self = mPtr;
-	LLFloaterAvatarInfo::show(self->mClosestAgentAtLastRightClick);
-	return true;
-}
-
-bool LLNetMap::LLEnableProfile::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-{
-	LLNetMap *self = mPtr;
-	self->findControl(userdata["control"].asString())->setValue(self->isAgentUnderCursor());
-	return true;
-}
diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h
index a5bf9f0fb5..cebc4af165 100644
--- a/indra/newview/llnetmap.h
+++ b/indra/newview/llnetmap.h
@@ -33,55 +33,67 @@
 #ifndef LL_LLNETMAP_H
 #define LL_LLNETMAP_H
 
-#include "llpanel.h"
-#include "llmemberlistener.h"
+#include "llmath.h"
+#include "lluictrl.h"
 #include "v3math.h"
 #include "v3dmath.h"
 #include "v4color.h"
 #include "llimage.h"
 #include "llimagegl.h"
 
-
+class LLColor4U;
+class LLCoordGL;
 class LLTextBox;
 
-class LLNetMap : public LLPanel
+class LLNetMap : public LLUICtrl
 {
 public:
-	LLNetMap(const std::string& name);
-	virtual ~LLNetMap();
+	struct Params 
+	:	public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<LLUIColor>	bg_color;
 
-	virtual void	draw();
-	virtual void	reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
-	virtual BOOL	handleDoubleClick( S32 x, S32 y, MASK mask );
-	virtual BOOL	handleRightMouseDown( S32 x, S32 y, MASK mask );
-	virtual BOOL	handleScrollWheel(S32 x, S32 y, S32 clicks);
-	virtual BOOL	handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen );
+		Params()
+		:	bg_color("bg_color") 
+		{}
+	};
 
-	void			renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius );
+protected:
+	LLNetMap (const Params & p);
+	friend class LLUICtrlFactory;
 
-private:
+public:
+	virtual ~LLNetMap();
 
+	/*virtual*/ void	draw();
+	/*virtual*/ BOOL	handleScrollWheel(S32 x, S32 y, S32 clicks);
+	/*virtual*/ BOOL	handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen );
+	
 	void			setScale( F32 scale );
-
-	// *TODO: Enable panning of the mini-map
+	void			setRotateMap( BOOL b ) { mRotateMap = b; }
+	void			setToolTipMsg(const std::string& msg) { mToolTipMsg = msg; }
+	BOOL			getRotateMap( ) { return mRotateMap; }
+	void			renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius );
+	
+private:
 	void			translatePan( F32 delta_x, F32 delta_y );
 	void			setPan( F32 x, F32 y )			{ mTargetPanX = x; mTargetPanY = y; }
 
-	void renderPoint(const LLVector3 &pos, const LLColor4U &color, 
-					 S32 diameter, S32 relative_height = 0);
-	LLVector3		globalPosToView(const LLVector3d& global_pos, BOOL rotated);
-	LLVector3d		viewPosToGlobal(S32 x,S32 y, BOOL rotated);
+	const LLVector3d& getObjectImageCenterGlobal()	{ return mObjectImageCenterGlobal; }
+	void 			renderPoint(const LLVector3 &pos, const LLColor4U &color, 
+								S32 diameter, S32 relative_height = 0);
 
-	void			drawTracking( const LLVector3d& pos_global,
-							BOOL rotated,
-							const LLColor4& color,
-							BOOL draw_arrow = TRUE);
+	LLVector3		globalPosToView(const LLVector3d& global_pos);
+	LLVector3d		viewPosToGlobal(S32 x,S32 y);
 
-	void			setDirectionPos( LLTextBox* text_box, F32 rotation );
-	void			updateMinorDirections();
-	void			createObjectImage();
+	void			drawTracking( const LLVector3d& pos_global, 
+								  const LLColor4& color,
+								  BOOL draw_arrow = TRUE);
 
-	LLHandle<LLView>	mPopupMenuHandle;
+	void			createObjectImage();
+	
+private:
+	LLUIColor		mBackgroundColor;
 
 	F32				mScale;					// Size of a region in pixels
 	F32				mPixelsPerMeter;		// world meters to map pixels
@@ -96,45 +108,11 @@ private:
 	LLPointer<LLImageRaw> mObjectRawImagep;
 	LLPointer<LLImageGL>	mObjectImagep;
 
-private:
 	LLUUID			mClosestAgentToCursor;
 	LLUUID			mClosestAgentAtLastRightClick;
 
-	static BOOL		sRotateMap;
-	static LLNetMap*	sInstance;
-	static BOOL isAgentUnderCursor(void*) { return sInstance && sInstance->mClosestAgentToCursor.notNull(); }
-	static void showAgentProfile(void*);
-	BOOL isAgentUnderCursor() { return mClosestAgentToCursor.notNull(); }
-
-	class LLScaleMap : public LLMemberListener<LLNetMap>
-	{
-	public:
-		/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
-	};
-
-	class LLStopTracking : public LLMemberListener<LLNetMap>
-	{
-	public:
-		/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
-	};
-
-	class LLEnableTracking : public LLMemberListener<LLNetMap>
-	{
-	public:
-		/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
-	};
-
-	class LLShowAgentProfile : public LLMemberListener<LLNetMap>
-	{
-	public:
-		/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
-	};
-
-	class LLEnableProfile : public LLMemberListener<LLNetMap>
-	{
-	public:
-		/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
-	};
+	BOOL			mRotateMap;
+	std::string		mToolTipMsg;
 };
 
 
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
new file mode 100644
index 0000000000..4ab4266221
--- /dev/null
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -0,0 +1,134 @@
+/** 
+ * @file lloutputmonitorctrl.cpp
+ * @brief LLOutputMonitorCtrl base class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "lloutputmonitorctrl.h"
+
+// library includes 
+#include "llui.h"
+
+// viewer includes
+#include "llvoiceclient.h"
+
+static LLRegisterWidget<LLOutputMonitorCtrl> r("output_monitor");
+
+// The defaults will be initialized in the constructor.
+LLColor4	LLOutputMonitorCtrl::sColorMuted;
+LLColor4	LLOutputMonitorCtrl::sColorOverdriven;
+LLColor4	LLOutputMonitorCtrl::sColorNormal;
+LLColor4	LLOutputMonitorCtrl::sColorBound;
+S32			LLOutputMonitorCtrl::sRectsNumber 		= 0;
+F32			LLOutputMonitorCtrl::sRectWidthRatio	= 0.f;
+F32			LLOutputMonitorCtrl::sRectHeightRatio	= 0.f;
+
+LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p)
+:	LLView(p),
+	mPower(0),
+	mIsMuted(true)
+{
+	static LLUICachedControl<LLColor4> output_monitor_muted_color("OutputMonitorMutedColor", LLColor4::orange);
+	static LLUICachedControl<LLColor4> output_monitor_overdriven_color("OutputMonitorOverdrivenColor", LLColor4::red);
+	static LLUICachedControl<LLColor4> output_monitor_normal_color("OutputMonitorNotmalColor", LLColor4::green);
+	static LLUICachedControl<LLColor4> output_monitor_bound_color("OutputMonitorBoundColor", LLColor4::white);
+	static LLUICachedControl<S32> output_monitor_rects_number("OutputMonitorRectanglesNumber", 20);
+	static LLUICachedControl<F32> output_monitor_rect_width_ratio("OutputMonitorRectangleWidthRatio", 0.5f);
+	static LLUICachedControl<F32> output_monitor_rect_height_ratio("OutputMonitorRectangleHeightRatio", 0.8f);
+
+	// IAN BUG compare to existing pattern where these are members - some will change per-widget and need to be anyway
+	// sent feedback to PE
+	
+	// *TODO: it looks suboptimal to load the defaults every time an output monitor is constructed.
+	sColorMuted			= output_monitor_muted_color;
+	sColorOverdriven	= output_monitor_overdriven_color;
+	sColorNormal		= output_monitor_normal_color;
+	sColorBound			= output_monitor_bound_color;
+	sRectsNumber		= output_monitor_rects_number;
+	sRectWidthRatio		= output_monitor_rect_width_ratio;
+	sRectHeightRatio	= output_monitor_rect_height_ratio;
+}
+
+LLOutputMonitorCtrl::~LLOutputMonitorCtrl()
+{
+}
+
+void LLOutputMonitorCtrl::setPower(F32 val)
+{
+	mPower = llmax(0.f, llmin(1.f, val));
+}
+
+void LLOutputMonitorCtrl::draw()
+{
+	//
+	// Fill the monitor with a bunch of small rectangles.
+	// The rectangles will be filled with gradient color,
+	// beginning with sColorNormal and ending with sColorOverdriven.
+	// 
+	// *TODO: would using a (partially drawn) pixmap instead be faster?
+	//
+	const int monh		= getRect().getHeight();
+	const int monw		= getRect().getWidth();
+	const int maxrects	= sRectsNumber;
+	const int period	= monw / maxrects;
+	const int rectw		= llfloor(period * sRectWidthRatio);
+	const int recth		= llfloor(monh * sRectHeightRatio);
+	const int nrects	= mIsMuted ? maxrects : llfloor(mPower * maxrects); // how many rects to draw?
+	const int rectbtm	= (monh - recth) / 2;
+	const int recttop	= rectbtm + recth;
+	
+	LLColor4 rect_color;
+	
+	for (int i=1, xpos = 0; i <= nrects; i++)
+	{
+		// Calculate color to use for the current rectangle.
+		if (mIsMuted)
+		{
+			rect_color = sColorMuted;
+		}
+		else
+		{
+			F32 frac = (mPower * i/nrects) / LLVoiceClient::OVERDRIVEN_POWER_LEVEL;
+			// Use overdriven color if the power exceeds overdriven level.
+			if (frac > 1.0f)
+				frac = 1.0f;
+			rect_color = lerp(sColorNormal, sColorOverdriven, frac);
+		}
+
+		// Draw rectangle filled with the color.
+		gl_rect_2d(xpos, recttop, xpos+rectw, rectbtm, rect_color, TRUE);
+		xpos += period;
+	}
+	
+	//
+	// Draw bounding box.
+	//
+	gl_rect_2d(0, monh, monw, 0, sColorBound, FALSE);
+}
diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h
new file mode 100644
index 0000000000..d5ab8e75ce
--- /dev/null
+++ b/indra/newview/lloutputmonitorctrl.h
@@ -0,0 +1,88 @@
+/** 
+ * @file lloutputmonitorctrl.h
+ * @brief LLOutputMonitorCtrl base class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLOUTPUTMONITORCTRL_H
+#define LL_LLOUTPUTMONITORCTRL_H
+
+#include "v4color.h"
+#include "llview.h"
+
+class LLTextBox;
+class LLUICtrlFactory;
+
+//
+// Classes
+//
+
+class LLOutputMonitorCtrl
+: public LLView
+{
+public:
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Params()
+		{
+			name = "output_monitor";
+			follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP);
+			mouse_opaque = false;
+		}
+	};
+protected:
+	LLOutputMonitorCtrl(const Params&);
+	friend class LLUICtrlFactory;
+
+public:
+	virtual ~LLOutputMonitorCtrl();
+
+	// llview overrides
+	virtual void	draw();
+
+	void			setPower(F32 val);
+	F32				getPower(F32 val) const { return mPower; }
+	
+	bool			getIsMuted() const { return mIsMuted; }
+	void			setIsMuted(bool val) { mIsMuted = val; }
+
+private:
+	static LLColor4	sColorMuted;
+	static LLColor4	sColorNormal;
+	static LLColor4	sColorOverdriven;
+	static LLColor4	sColorBound;
+	static S32		sRectsNumber;
+	static F32		sRectWidthRatio;
+	static F32		sRectHeightRatio;
+	
+	F32				mPower;
+	bool			mIsMuted;
+};
+
+#endif
diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp
index b16f56d0d8..e6ee91cdd3 100644
--- a/indra/newview/lloverlaybar.cpp
+++ b/indra/newview/lloverlaybar.cpp
@@ -89,7 +89,7 @@ void* LLOverlayBar::createMediaRemote(void* userdata)
 void* LLOverlayBar::createVoiceRemote(void* userdata)
 {
 	LLOverlayBar *self = (LLOverlayBar*)userdata;	
-	self->mVoiceRemote = new LLVoiceRemoteCtrl(std::string("voice_remote"));
+	self->mVoiceRemote = new LLVoiceRemoteCtrl();
 	return self->mVoiceRemote;
 }
 
@@ -110,23 +110,24 @@ LLOverlayBar::LLOverlayBar()
 
 	mBuilt = false;
 
-	LLCallbackMap::map_t factory_map;
-	factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this);
-	factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this);
-	factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this);
+	mFactoryMap["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this);
+	mFactoryMap["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this);
+	mFactoryMap["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this);
 	
-	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map);
+	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml");
 }
 
 BOOL LLOverlayBar::postBuild()
 {
-	childSetAction("IM Received",onClickIMReceived,this);
 	childSetAction("Set Not Busy",onClickSetNotBusy,this);
 	childSetAction("Mouselook",onClickMouselook,this);
 	childSetAction("Stand Up",onClickStandUp,this);
  	childSetAction("Flycam",onClickFlycam,this);
 	childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
 
+	mVoiceRemote->expandOrCollapse();
+	mMediaRemote->expandOrCollapse();
+
 	setFocusRoot(TRUE);
 	mBuilt = true;
 
@@ -282,13 +283,6 @@ void LLOverlayBar::refresh()
 // Static functions
 //-----------------------------------------------------------------------
 
-// static
-void LLOverlayBar::onClickIMReceived(void*)
-{
-	gIMMgr->setFloaterOpen(TRUE);
-}
-
-
 // static
 void LLOverlayBar::onClickSetNotBusy(void*)
 {
diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h
index 852d033a10..f0cf480458 100644
--- a/indra/newview/lloverlaybar.h
+++ b/indra/newview/lloverlaybar.h
@@ -67,7 +67,6 @@ public:
 	// helpers for returning desired state
 	BOOL musicPlaying() { return mMusicState == PLAYING; }
 	
-	static void onClickIMReceived(void* data);
 	static void onClickSetNotBusy(void* data);
 	static void onClickMouselook(void* data);
 	static void onClickStandUp(void* data);
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 9d5a4ad01c..d0816ad4d8 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -35,6 +35,7 @@
 #include "llpanelavatar.h"
 
 #include "llclassifiedflags.h"
+#include "llfloaterreg.h"
 #include "llfontgl.h"
 #include "llcachename.h"
 
@@ -63,9 +64,9 @@
 #include "llpanelclassified.h"
 #include "llpanelpick.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
 #include "llstatusbar.h"
 #include "lltabcontainer.h"
-#include "lltabcontainervertical.h"
 #include "llimview.h"
 #include "lltooldraganddrop.h"
 #include "lluiconstants.h"
@@ -78,6 +79,7 @@
 #include "llweb.h"
 #include "llinventorymodel.h"
 #include "roles_constants.h"
+#include "lltrans.h"
 #include "lluictrlfactory.h"
 
 // Statics
@@ -98,7 +100,17 @@ extern void handle_pay_by_id(const LLUUID& payee);
 class LLDropTarget : public LLView
 {
 public:
-	LLDropTarget(const std::string& name, const LLRect& rect, const LLUUID& agent_id);
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Optional<LLUUID> agent_id;
+		Params()
+		{
+			mouse_opaque(false);
+			follows.flags(FOLLOWS_ALL);
+		}
+	};
+
+	LLDropTarget(const Params&);
 	~LLDropTarget();
 
 	void doDrop(EDragAndDropType cargo_type, void* cargo_data);
@@ -115,17 +127,13 @@ protected:
 	LLUUID mAgentID;
 };
 
-
-LLDropTarget::LLDropTarget(const std::string& name, const LLRect& rect,
-						   const LLUUID& agent_id) :
-	LLView(name, rect, NOT_MOUSE_OPAQUE, FOLLOWS_ALL),
-	mAgentID(agent_id)
-{
-}
+LLDropTarget::LLDropTarget(const LLDropTarget::Params& p) 
+:	LLView(p),
+	mAgentID(p.agent_id)
+{}
 
 LLDropTarget::~LLDropTarget()
-{
-}
+{}
 
 void LLDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
 {
@@ -149,13 +157,14 @@ BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
 	return FALSE;
 }
 
+static LLRegisterWidget<LLDropTarget> r("drop_target");
+
 
 //-----------------------------------------------------------------------------
 // LLPanelAvatarTab()
 //-----------------------------------------------------------------------------
-LLPanelAvatarTab::LLPanelAvatarTab(const std::string& name, const LLRect &rect, 
-								   LLPanelAvatar* panel_avatar)
-:	LLPanel(name, rect),
+LLPanelAvatarTab::LLPanelAvatarTab(LLPanelAvatar* panel_avatar)
+:	LLPanel(),
 	mPanelAvatar(panel_avatar),
 	mDataRequested(false)
 { }
@@ -182,10 +191,8 @@ void LLPanelAvatarTab::sendAvatarProfileRequestIfNeeded(const std::string& metho
 //-----------------------------------------------------------------------------
 // LLPanelAvatarSecondLife()
 //-----------------------------------------------------------------------------
-LLPanelAvatarSecondLife::LLPanelAvatarSecondLife(const std::string& name, 
-												 const LLRect &rect, 
-												 LLPanelAvatar* panel_avatar ) 
-:	LLPanelAvatarTab(name, rect, panel_avatar),
+LLPanelAvatarSecondLife::LLPanelAvatarSecondLife(LLPanelAvatar* panel_avatar ) 
+:	LLPanelAvatarTab(panel_avatar),
 	mPartnerID()
 {
 }
@@ -313,17 +320,15 @@ void LLPanelAvatarSecondLife::onClickPartnerInfo(void *data)
 	if (self->mPartnerID.notNull())
 	{
 		LLFloaterAvatarInfo::showFromProfile(self->mPartnerID,
-											 self->getScreenRect());
+											 self->calcScreenRect());
 	}
 }
 
 //-----------------------------------------------------------------------------
 // LLPanelAvatarFirstLife()
 //-----------------------------------------------------------------------------
-LLPanelAvatarFirstLife::LLPanelAvatarFirstLife(const std::string& name, 
-											   const LLRect &rect, 
-											   LLPanelAvatar* panel_avatar ) 
-:	LLPanelAvatarTab(name, rect, panel_avatar)
+LLPanelAvatarFirstLife::LLPanelAvatarFirstLife(LLPanelAvatar* panel_avatar ) 
+:	LLPanelAvatarTab(panel_avatar)
 {
 }
 
@@ -373,7 +378,7 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
 	childSetAction("Offer Teleport...", LLPanelAvatar::onClickOfferTeleport, 
 		getPanelAvatar() );
 
-	childSetDoubleClickCallback("groups", onDoubleClickGroup, this );
+	getChild<LLScrollListCtrl>("groups")->setDoubleClickCallback(onDoubleClickGroup, this );
 
 	getChild<LLTextureCtrl>("img")->setFallbackImageName("default_profile_picture.j2c");
 
@@ -401,7 +406,7 @@ BOOL LLPanelAvatarNotes::postBuild(void)
 
 BOOL LLPanelAvatarWeb::postBuild(void)
 {
-	childSetKeystrokeCallback("url_edit", onURLKeystroke, this);
+	getChild<LLLineEditor>("url_edit")->setKeystrokeCallback(onURLKeystroke, this);
 	childSetCommitCallback("load", onCommitLoad, this);
 
 	childSetAction("web_profile_help",onClickWebProfileHelp,this);
@@ -423,15 +428,15 @@ BOOL LLPanelAvatarWeb::postBuild(void)
 
 BOOL LLPanelAvatarClassified::postBuild(void)
 {
-	childSetAction("New...",onClickNew,NULL);
-	childSetAction("Delete...",onClickDelete,NULL);
+	childSetAction("New...",onClickNew,this);
+	childSetAction("Delete...",onClickDelete,this);
 	return TRUE;
 }
 
 BOOL LLPanelAvatarPicks::postBuild(void)
 {
-	childSetAction("New...",onClickNew,NULL);
-	childSetAction("Delete...",onClickDelete,NULL);
+	childSetAction("New...",onClickNew,this);
+	childSetAction("Delete...",onClickDelete,this);
 	return TRUE;
 }
 
@@ -467,9 +472,8 @@ BOOL LLPanelAvatarAdvanced::postBuild()
 //-----------------------------------------------------------------------------
 // LLPanelAvatarWeb
 //-----------------------------------------------------------------------------
-LLPanelAvatarWeb::LLPanelAvatarWeb(const std::string& name, const LLRect& rect, 
-								   LLPanelAvatar* panel_avatar)
-:	LLPanelAvatarTab(name, rect, panel_avatar),
+LLPanelAvatarWeb::LLPanelAvatarWeb(LLPanelAvatar* panel_avatar)
+:	LLPanelAvatarTab(panel_avatar),
 	mWebBrowser(NULL)
 {
 }
@@ -608,10 +612,8 @@ void LLPanelAvatarWeb::onLocationChange( const EventType& eventIn )
 //-----------------------------------------------------------------------------
 // LLPanelAvatarAdvanced
 //-----------------------------------------------------------------------------
-LLPanelAvatarAdvanced::LLPanelAvatarAdvanced(const std::string& name, 
-											 const LLRect& rect, 
-											 LLPanelAvatar* panel_avatar)
-:	LLPanelAvatarTab(name, rect, panel_avatar),
+LLPanelAvatarAdvanced::LLPanelAvatarAdvanced(LLPanelAvatar* panel_avatar)
+:	LLPanelAvatarTab(panel_avatar),
 	mWantToCount(0),
 	mSkillsCount(0),
 	mWantToEdit( NULL ),
@@ -695,8 +697,8 @@ void LLPanelAvatarAdvanced::getWantSkills(U32* want_to_mask, std::string& want_t
 //-----------------------------------------------------------------------------
 // LLPanelAvatarNotes()
 //-----------------------------------------------------------------------------
-LLPanelAvatarNotes::LLPanelAvatarNotes(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar)
-:	LLPanelAvatarTab(name, rect, panel_avatar)
+LLPanelAvatarNotes::LLPanelAvatarNotes(LLPanelAvatar* panel_avatar)
+:	LLPanelAvatarTab(panel_avatar)
 {
 }
 
@@ -723,9 +725,8 @@ void LLPanelAvatarNotes::onCommitNotes(LLUICtrl*, void* userdata)
 //-----------------------------------------------------------------------------
 // LLPanelAvatarClassified()
 //-----------------------------------------------------------------------------
-LLPanelAvatarClassified::LLPanelAvatarClassified(const std::string& name, const LLRect& rect,
-									   LLPanelAvatar* panel_avatar)
-:	LLPanelAvatarTab(name, rect, panel_avatar)
+LLPanelAvatarClassified::LLPanelAvatarClassified(LLPanelAvatar* panel_avatar)
+:	LLPanelAvatarTab(panel_avatar)
 {
 }
 
@@ -850,18 +851,12 @@ void LLPanelAvatarClassified::processAvatarClassifiedReply(LLMessageSystem* msg,
 		panel_classified->markForServerRequest();
 
 		// The button should automatically truncate long names for us
-		if(tabs)
-		{
-			tabs->addTabPanel(panel_classified, classified_name);
-		}
+		tabs->addTabPanel(LLTabContainer::TabPanelParams().panel(panel_classified).label(classified_name));
 	}
 
 	// Make sure somebody is highlighted.  This works even if there
 	// are no tabs in the container.
-	if(tabs)
-	{
-		tabs->selectFirstTab();
-	}
+	tabs->selectFirstTab();
 
 	childSetVisible("New...", true);
 	childSetVisible("Delete...", true);
@@ -888,11 +883,8 @@ bool LLPanelAvatarClassified::callbackNew(const LLSD& notification, const LLSD&
 		LLPanelClassified* panel_classified = new LLPanelClassified(false, false);
 		panel_classified->initNewClassified();
 		LLTabContainer*	tabs = getChild<LLTabContainer>("classified tab");
-		if(tabs)
-		{
-			tabs->addTabPanel(panel_classified, panel_classified->getClassifiedName());
-			tabs->selectLastTab();
-		}
+		tabs->addTabPanel(LLTabContainer::TabPanelParams().panel(panel_classified).label(panel_classified->getClassifiedName()));
+		tabs->selectLastTab();
 	}
 	return false;
 }
@@ -956,10 +948,8 @@ bool  LLPanelAvatarClassified::callbackDelete(const LLSD& notification, const LL
 //-----------------------------------------------------------------------------
 // LLPanelAvatarPicks()
 //-----------------------------------------------------------------------------
-LLPanelAvatarPicks::LLPanelAvatarPicks(const std::string& name, 
-									   const LLRect& rect,
-									   LLPanelAvatar* panel_avatar)
-:	LLPanelAvatarTab(name, rect, panel_avatar)
+LLPanelAvatarPicks::LLPanelAvatarPicks(LLPanelAvatar* panel_avatar)
+:	LLPanelAvatarTab(panel_avatar)
 {
 }
 
@@ -1014,7 +1004,7 @@ void LLPanelAvatarPicks::processAvatarPicksReply(LLMessageSystem* msg, void**)
 		msg->getUUID("Data", "PickID", pick_id, block);
 		msg->getString("Data", "PickName", pick_name, block);
 
-		panel_pick = new LLPanelPick(FALSE);
+		panel_pick = new LLPanelPick();
 
 		panel_pick->setPickID(pick_id, avatar_id);
 
@@ -1023,18 +1013,12 @@ void LLPanelAvatarPicks::processAvatarPicksReply(LLMessageSystem* msg, void**)
 		panel_pick->markForServerRequest();
 
 		// The button should automatically truncate long names for us
-		if(tabs)
-		{
-			tabs->addTabPanel(panel_pick, pick_name);
-		}
+		tabs->addTabPanel(LLTabContainer::TabPanelParams().panel(panel_pick).label(pick_name));
 	}
 
 	// Make sure somebody is highlighted.  This works even if there
 	// are no tabs in the container.
-	if(tabs)
-	{
-		tabs->selectFirstTab();
-	}
+	tabs->selectFirstTab();
 
 	childSetVisible("New...", true);
 	childSetVisible("Delete...", true);
@@ -1048,15 +1032,12 @@ void LLPanelAvatarPicks::processAvatarPicksReply(LLMessageSystem* msg, void**)
 void LLPanelAvatarPicks::onClickNew(void* data)
 {
 	LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data;
-	LLPanelPick* panel_pick = new LLPanelPick(FALSE);
+	LLPanelPick* panel_pick = new LLPanelPick();
 	LLTabContainer* tabs =  self->getChild<LLTabContainer>("picks tab");
 
 	panel_pick->initNewPick();
-	if(tabs)
-	{
-		tabs->addTabPanel(panel_pick, panel_pick->getPickName());
-		tabs->selectLastTab();
-	}
+	tabs->addTabPanel(LLTabContainer::TabPanelParams().panel(panel_pick).label(panel_pick->getPickName()));
+	tabs->selectLastTab();
 }
 
 
@@ -1128,12 +1109,8 @@ bool LLPanelAvatarPicks::callbackDelete(const LLSD& notification, const LLSD& re
 //-----------------------------------------------------------------------------
 // LLPanelAvatar
 //-----------------------------------------------------------------------------
-LLPanelAvatar::LLPanelAvatar(
-	const std::string& name,
-	const LLRect &rect,
-	BOOL allow_edit)
-	:
-	LLPanel(name, rect, FALSE),
+LLPanelAvatar::LLPanelAvatar(BOOL allow_edit)
+: 	LLPanel(),
 	mPanelSecondLife(NULL),
 	mPanelAdvanced(NULL),
 	mPanelClassified(NULL),
@@ -1152,21 +1129,17 @@ LLPanelAvatar::LLPanelAvatar(
 
 	sAllPanels.push_back(this);
 
-	LLCallbackMap::map_t factory_map;
-
-	factory_map["2nd Life"] = LLCallbackMap(createPanelAvatarSecondLife, this);
-	factory_map["WebProfile"] = LLCallbackMap(createPanelAvatarWeb, this);
-	factory_map["Interests"] = LLCallbackMap(createPanelAvatarInterests, this);
-	factory_map["Picks"] = LLCallbackMap(createPanelAvatarPicks, this);
-	factory_map["Classified"] = LLCallbackMap(createPanelAvatarClassified, this);
-	factory_map["1st Life"] = LLCallbackMap(createPanelAvatarFirstLife, this);
-	factory_map["My Notes"] = LLCallbackMap(createPanelAvatarNotes, this);
+	mFactoryMap["2nd Life"] = LLCallbackMap(createPanelAvatarSecondLife, this);
+	mFactoryMap["WebProfile"] = LLCallbackMap(createPanelAvatarWeb, this);
+	mFactoryMap["Interests"] = LLCallbackMap(createPanelAvatarInterests, this);
+	mFactoryMap["Picks"] = LLCallbackMap(createPanelAvatarPicks, this);
+	mFactoryMap["Classified"] = LLCallbackMap(createPanelAvatarClassified, this);
+	mFactoryMap["1st Life"] = LLCallbackMap(createPanelAvatarFirstLife, this);
+	mFactoryMap["My Notes"] = LLCallbackMap(createPanelAvatarNotes, this);
 	
-	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar.xml", &factory_map);
+	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar.xml");
 
 	selectTab(0);
-	
-
 }
 
 BOOL LLPanelAvatar::postBuild(void)
@@ -1203,6 +1176,10 @@ BOOL LLPanelAvatar::postBuild(void)
 LLPanelAvatar::~LLPanelAvatar()
 {
 	sAllPanels.remove(this);
+	if (mAvatarID.notNull())
+	{
+		LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarID, this);
+	}
 }
 
 
@@ -1281,6 +1258,13 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
 	if (avatar_id != mAvatarID)
 	{
 		avatar_changed = TRUE;
+
+		if (mAvatarID.notNull())
+		{
+			LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarID, this);
+		}
+
+		LLAvatarPropertiesProcessor::getInstance()->addObserver(avatar_id, this);
 	}
 	mAvatarID = avatar_id;
 
@@ -1299,17 +1283,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
 	// Teens don't have this.
 	if (mPanelFirstLife) mPanelFirstLife->enableControls(own_avatar && mAllowEdit);
 
-	LLView *target_view = getChild<LLView>("drop_target_rect");
-	if(target_view)
-	{
-		if (mDropTarget)
-		{
-			delete mDropTarget;
-		}
-		mDropTarget = new LLDropTarget("drop target", target_view->getRect(), mAvatarID);
-		addChild(mDropTarget);
-		mDropTarget->setAgentID(mAvatarID);
-	}
+	mDropTarget = getChild<LLDropTarget> ("Drop Target");
+	mDropTarget->setAgentID(mAvatarID);
 
 	LLNameEditor* name_edit = getChild<LLNameEditor>("name");
 	if(name_edit)
@@ -1343,7 +1318,7 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
 		// Request just the first two pages of data.  The picks,
 		// classifieds, and notes will be requested when that panel
 		// is made visible. JC
-		sendAvatarPropertiesRequest();
+		LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(mAvatarID);
 
 		if (own_avatar)
 		{
@@ -1486,7 +1461,6 @@ void LLPanelAvatar::resetGroupList()
 void LLPanelAvatar::onClickIM(void* userdata)
 {
 	LLPanelAvatar* self = (LLPanelAvatar*) userdata;
-	gIMMgr->setFloaterOpen(TRUE);
 
 	std::string name;
 	LLNameEditor* nameedit = self->mPanelSecondLife->getChild<LLNameEditor>("name");
@@ -1503,14 +1477,11 @@ void LLPanelAvatar::onClickTrack(void* userdata)
 {
 	LLPanelAvatar* self = (LLPanelAvatar*) userdata;
 	
-	if( gFloaterWorldMap )
-	{
-		std::string name;
-		LLNameEditor* nameedit = self->mPanelSecondLife->getChild<LLNameEditor>("name");
-		if (nameedit) name = nameedit->getText();
-		gFloaterWorldMap->trackAvatar(self->mAvatarID, name);
-		LLFloaterWorldMap::show(NULL, TRUE);
-	}
+	std::string name;
+	LLNameEditor* nameedit = self->mPanelSecondLife->getChild<LLNameEditor>("name");
+	if (nameedit) name = nameedit->getText();
+	LLFloaterWorldMap::getInstance()->trackAvatar(self->mAvatarID, name);
+	LLFloaterReg::showInstance("world_map", "center");
 }
 
 
@@ -1588,24 +1559,15 @@ void LLPanelAvatar::onClickOK(void *userdata)
 		if ( tabs->getCurrentPanel() != self->mPanelClassified )
 		{
 			self->mPanelClassified->apply();
-
-			LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID);
-			if (infop)
-			{
-				infop->close();
-			}
+						
+			LLFloaterReg::hideInstance("preview_avatar", self->mAvatarID);
 		}
 		else
 		{
 			if ( self->mPanelClassified->titleIsValid() )
 			{
 				self->mPanelClassified->apply();
-
-				LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID);
-				if (infop)
-				{
-					infop->close();
-				}
+				LLFloaterReg::hideInstance("preview_avatar", self->mAvatarID);
 			}
 		}
 	}
@@ -1618,12 +1580,7 @@ void LLPanelAvatar::onClickCancel(void *userdata)
 
 	if (self)
 	{
-		LLFloaterAvatarInfo *infop;
-		if ((infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID)))
-		{
-			infop->close();
-		}
-		else
+		if (!LLFloaterReg::hideInstance("preview_avatar", self->mAvatarID))
 		{
 			// We're in the Search directory and are cancelling an edit
 			// to our own profile, so reset.
@@ -1635,15 +1592,7 @@ void LLPanelAvatar::onClickCancel(void *userdata)
 
 void LLPanelAvatar::sendAvatarPropertiesRequest()
 {
-	lldebugs << "LLPanelAvatar::sendAvatarPropertiesRequest()" << llendl; 
-	LLMessageSystem *msg = gMessageSystem;
-
-	msg->newMessageFast(_PREHASH_AvatarPropertiesRequest);
-	msg->nextBlockFast( _PREHASH_AgentData);
-	msg->addUUIDFast(   _PREHASH_AgentID, gAgent.getID() );
-	msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
-	msg->addUUIDFast(   _PREHASH_AvatarID, mAvatarID);
-	gAgent.sendReliableMessage();
+	LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(mAvatarID);
 }
 
 void LLPanelAvatar::sendAvatarNotesUpdate()
@@ -1675,154 +1624,110 @@ void LLPanelAvatar::sendAvatarNotesUpdate()
 	gAgent.sendReliableMessage();
 }
 
-
-// static
-void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**)
+void LLPanelAvatar::processAvatarProperties(const LLAvatarData& avatar_data)
 {
-	LLUUID	agent_id;	// your id
-	LLUUID	avatar_id;	// target of this panel
-	LLUUID	image_id;
-	LLUUID	fl_image_id;
-	LLUUID	partner_id;
-	std::string	about_text;
-	std::string	fl_about_text;
-	std::string	born_on;
-	S32		charter_member_size = 0;
 	BOOL	allow_publish = FALSE;
-	//BOOL	mature = FALSE;
 	BOOL	identified = FALSE;
 	BOOL	transacted = FALSE;
 	BOOL	age_verified = FALSE;
 	BOOL	online = FALSE;
 	std::string	profile_url;
-
-	U32		flags = 0x0;
+	std::string	caption_text;
 
 	//llinfos << "properties packet size " << msg->getReceiveSize() << llendl;
 
-	msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
-	msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AvatarID, avatar_id );
+	childSetEnabled("Instant Message...",TRUE);
+	childSetEnabled("Pay...",TRUE);
+	childSetEnabled("Mute",TRUE);
 
-	for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter)
+	childSetEnabled("drop target",TRUE);
+
+	mHaveProperties = TRUE;
+	enableOKIfReady();
+
+	identified = (avatar_data.flags & AVATAR_IDENTIFIED);
+	transacted = (avatar_data.flags & AVATAR_TRANSACTED);
+	age_verified = (avatar_data.flags & AVATAR_AGEVERIFIED); // Not currently getting set in dataserver/lldataavatar.cpp for privacy considerations
+	allow_publish = (avatar_data.flags & AVATAR_ALLOW_PUBLISH);
+	online = (avatar_data.flags & AVATAR_ONLINE);
+
+	caption_text = avatar_data.caption_text;
+
+	if(caption_text.empty())
 	{
-		LLPanelAvatar* self = *iter;
-		if (self->mAvatarID != avatar_id)
-		{
-			continue;
-		}
-		self->childSetEnabled("Instant Message...",TRUE);
-		self->childSetEnabled("Pay...",TRUE);
-		self->childSetEnabled("Mute",TRUE);
-
-		self->childSetEnabled("drop target",TRUE);
-
-		self->mHaveProperties = TRUE;
-		self->enableOKIfReady();
-
-		msg->getUUIDFast(  _PREHASH_PropertiesData,	_PREHASH_ImageID,		image_id );
-		msg->getUUIDFast(  _PREHASH_PropertiesData,	_PREHASH_FLImageID,	fl_image_id );
-		msg->getUUIDFast(_PREHASH_PropertiesData, _PREHASH_PartnerID, partner_id);
-		msg->getStringFast(_PREHASH_PropertiesData, _PREHASH_AboutText,	about_text );
-		msg->getStringFast(_PREHASH_PropertiesData, _PREHASH_FLAboutText, fl_about_text );
-		msg->getStringFast(_PREHASH_PropertiesData, _PREHASH_BornOn, born_on);
-		msg->getString("PropertiesData","ProfileURL", profile_url);
-		msg->getU32Fast(_PREHASH_PropertiesData, _PREHASH_Flags, flags);
-
-		identified = (flags & AVATAR_IDENTIFIED);
-		transacted = (flags & AVATAR_TRANSACTED);
-		age_verified = (flags & AVATAR_AGEVERIFIED); // Not currently getting set in dataserver/lldataavatar.cpp for privacy considerations
-		allow_publish = (flags & AVATAR_ALLOW_PUBLISH);
-		online = (flags & AVATAR_ONLINE);
-		
-		U8 caption_index = 0;
-		std::string caption_text;
-		charter_member_size = msg->getSize("PropertiesData", "CharterMember");
-		if(1 == charter_member_size)
-		{
-			msg->getBinaryData("PropertiesData", "CharterMember", &caption_index, 1);
-		}
-		else if(1 < charter_member_size)
-		{
-			msg->getString("PropertiesData", "CharterMember", caption_text);
-		}
-		
+		LLStringUtil::format_map_t args;
+		caption_text = mPanelSecondLife->getString("CaptionTextAcctInfo");
 
-		if(caption_text.empty())
-		{
-			LLStringUtil::format_map_t args;
-			caption_text = self->mPanelSecondLife->getString("CaptionTextAcctInfo");
-			
-			const char* ACCT_TYPE[] = {
-				"AcctTypeResident",
-				"AcctTypeTrial",
-				"AcctTypeCharterMember",
-				"AcctTypeEmployee"
-			};
-			caption_index = llclamp(caption_index, (U8)0, (U8)(LL_ARRAY_SIZE(ACCT_TYPE)-1));
-			args["[ACCTTYPE]"] = self->mPanelSecondLife->getString(ACCT_TYPE[caption_index]);
-
-			std::string payment_text = " ";
-			const S32 DEFAULT_CAPTION_LINDEN_INDEX = 3;
-			if(caption_index != DEFAULT_CAPTION_LINDEN_INDEX)
-			{			
-				if(transacted)
-				{
-					payment_text = "PaymentInfoUsed";
-				}
-				else if (identified)
-				{
-					payment_text = "PaymentInfoOnFile";
-				}
-				else
-				{
-					payment_text = "NoPaymentInfoOnFile";
-				}
-				args["[PAYMENTINFO]"] = self->mPanelSecondLife->getString(payment_text);
-				std::string age_text = age_verified ? "AgeVerified" : "NotAgeVerified";
-				// Do not display age verification status at this time
-				//args["[[AGEVERIFICATION]]"] = self->mPanelSecondLife->getString(age_text);
-				args["[AGEVERIFICATION]"] = " ";
+		const char* ACCT_TYPE[] = {
+			"AcctTypeResident",
+			"AcctTypeTrial",
+			"AcctTypeCharterMember",
+			"AcctTypeEmployee"
+		};
+		U8 caption_index = llclamp(avatar_data.caption_index, (U8)0, (U8)(LL_ARRAY_SIZE(ACCT_TYPE)-1));
+		args["[ACCTTYPE]"] = mPanelSecondLife->getString(ACCT_TYPE[caption_index]);
+
+		std::string payment_text = " ";
+		const S32 DEFAULT_CAPTION_LINDEN_INDEX = 3;
+		if(caption_index != DEFAULT_CAPTION_LINDEN_INDEX)
+		{			
+			if(transacted)
+			{
+				payment_text = "PaymentInfoUsed";
+			}
+			else if (identified)
+			{
+				payment_text = "PaymentInfoOnFile";
 			}
 			else
 			{
-				args["[PAYMENTINFO]"] = " ";
-				args["[AGEVERIFICATION]"] = " ";
+				payment_text = "NoPaymentInfoOnFile";
 			}
-			LLStringUtil::format(caption_text, args);
+			args["[PAYMENTINFO]"] = mPanelSecondLife->getString(payment_text);
+			std::string age_text = age_verified ? "AgeVerified" : "NotAgeVerified";
+			// Do not display age verification status at this time
+			//args["[[AGEVERIFICATION]]"] = mPanelSecondLife->getString(age_text);
+			args["[AGEVERIFICATION]"] = " ";
 		}
-		
-		self->mPanelSecondLife->childSetValue("acct", caption_text);
-		self->mPanelSecondLife->childSetValue("born", born_on);
+		else
+		{
+			args["[PAYMENTINFO]"] = " ";
+			args["[AGEVERIFICATION]"] = " ";
+		}
+		LLStringUtil::format(caption_text, args);
+	}
+	
+	mPanelSecondLife->childSetValue("acct", caption_text);
+	mPanelSecondLife->childSetValue("born", avatar_data.born_on);
 
-		EOnlineStatus online_status = (online) ? ONLINE_STATUS_YES : ONLINE_STATUS_NO;
+	EOnlineStatus online_status = (online) ? ONLINE_STATUS_YES : ONLINE_STATUS_NO;
 
-		self->setOnlineStatus(online_status);
+	setOnlineStatus(online_status);
 
-		self->mPanelWeb->setWebURL(profile_url);
+	mPanelWeb->setWebURL(profile_url);
 
-		LLTextureCtrl*	image_ctrl = self->mPanelSecondLife->getChild<LLTextureCtrl>("img");
-		if(image_ctrl)
-		{
-			image_ctrl->setImageAssetID(image_id);
-		}
-		self->childSetValue("about", about_text);
+	LLTextureCtrl*	image_ctrl = mPanelSecondLife->getChild<LLTextureCtrl>("img");
+	if(image_ctrl)
+	{
+		image_ctrl->setImageAssetID(avatar_data.image_id);
+	}
+	childSetValue("about", avatar_data.about_text);
 
-		self->mPanelSecondLife->setPartnerID(partner_id);
-		self->mPanelSecondLife->updatePartnerName();
+	mPanelSecondLife->setPartnerID(avatar_data.partner_id);
+	mPanelSecondLife->updatePartnerName();
 
-		if (self->mPanelFirstLife)
+	if (mPanelFirstLife)
+	{
+		// Teens don't get these
+		mPanelFirstLife->childSetValue("about", avatar_data.fl_about_text);
+		LLTextureCtrl*	image_ctrl = mPanelFirstLife->getChild<LLTextureCtrl>("img");
+		if(image_ctrl)
 		{
-			// Teens don't get these
-			self->mPanelFirstLife->childSetValue("about", fl_about_text);
-			LLTextureCtrl*	image_ctrl = self->mPanelFirstLife->getChild<LLTextureCtrl>("img");
-			if(image_ctrl)
-			{
-				image_ctrl->setImageAssetID(fl_image_id);
-			}
+			image_ctrl->setImageAssetID(avatar_data.fl_image_id);
+		}
 
-			self->mPanelSecondLife->childSetValue("allow_publish", allow_publish);
+		mPanelSecondLife->childSetValue("allow_publish", allow_publish);
 
-		}
 	}
 }
 
@@ -1896,7 +1801,7 @@ void LLPanelAvatar::processAvatarGroupsReply(LLMessageSystem *msg, void**)
 		S32 group_count = msg->getNumberOfBlocksFast(_PREHASH_GroupData);
 		if (0 == group_count)
 		{
-			if(group_list) group_list->addCommentText(std::string("None")); // *TODO: Translate
+			if(group_list) group_list->setCommentText(LLTrans::getString("None")); 
 		}
 		else
 		{
@@ -2128,10 +2033,6 @@ void LLPanelAvatar::onClickKick(void* userdata)
 {
 	LLPanelAvatar* self = (LLPanelAvatar*) userdata;
 
-	S32 left, top;
-	gFloaterView->getNewFloaterPosition(&left, &top);
-	LLRect rect(left, top, left+400, top-300);
-
 	LLSD payload;
 	payload["avatar_id"] = self->mAvatarID;
 	LLNotifications::instance().add("KickUser", LLSD(), payload, finishKick);
@@ -2256,21 +2157,21 @@ void LLPanelAvatar::onClickCSR(void* userdata)
 void*	LLPanelAvatar::createPanelAvatarSecondLife(void* data)
 {
 	LLPanelAvatar* self = (LLPanelAvatar*)data;
-	self->mPanelSecondLife = new LLPanelAvatarSecondLife(std::string("2nd Life"),LLRect(),self);
+	self->mPanelSecondLife = new LLPanelAvatarSecondLife(self);
 	return self->mPanelSecondLife;
 }
 
 void*	LLPanelAvatar::createPanelAvatarWeb(void*	data)
 {
 	LLPanelAvatar* self = (LLPanelAvatar*)data;
-	self->mPanelWeb = new LLPanelAvatarWeb(std::string("Web"),LLRect(),self);
+	self->mPanelWeb = new LLPanelAvatarWeb(self);
 	return self->mPanelWeb;
 }
 
 void*	LLPanelAvatar::createPanelAvatarInterests(void*	data)
 {
 	LLPanelAvatar* self = (LLPanelAvatar*)data;
-	self->mPanelAdvanced = new LLPanelAvatarAdvanced(std::string("Interests"),LLRect(),self);
+	self->mPanelAdvanced = new LLPanelAvatarAdvanced(self);
 	return self->mPanelAdvanced;
 }
 
@@ -2278,27 +2179,27 @@ void*	LLPanelAvatar::createPanelAvatarInterests(void*	data)
 void*	LLPanelAvatar::createPanelAvatarPicks(void*	data)
 {
 	LLPanelAvatar* self = (LLPanelAvatar*)data;
-	self->mPanelPicks = new LLPanelAvatarPicks(std::string("Picks"),LLRect(),self);
+	self->mPanelPicks = new LLPanelAvatarPicks(self);
 	return self->mPanelPicks;
 }
 
 void*	LLPanelAvatar::createPanelAvatarClassified(void* data)
 {
 	LLPanelAvatar* self = (LLPanelAvatar*)data;
-	self->mPanelClassified = new LLPanelAvatarClassified(std::string("Classified"),LLRect(),self);
+	self->mPanelClassified = new LLPanelAvatarClassified(self);
 	return self->mPanelClassified;
 }
 
 void*	LLPanelAvatar::createPanelAvatarFirstLife(void*	data)
 {
 	LLPanelAvatar* self = (LLPanelAvatar*)data;
-	self->mPanelFirstLife = new LLPanelAvatarFirstLife(std::string("1st Life"), LLRect(), self);
+	self->mPanelFirstLife = new LLPanelAvatarFirstLife(self);
 	return self->mPanelFirstLife;
 }
 
 void*	LLPanelAvatar::createPanelAvatarNotes(void*	data)
 {
 	LLPanelAvatar* self = (LLPanelAvatar*)data;
-	self->mPanelNotes = new LLPanelAvatarNotes(std::string("My Notes"),LLRect(),self);
+	self->mPanelNotes = new LLPanelAvatarNotes(self);
 	return self->mPanelNotes;
 }
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index 12e1b99360..8c7112197f 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -37,6 +37,7 @@
 #include "v3dmath.h"
 #include "lluuid.h"
 #include "llwebbrowserctrl.h"
+#include "llavatarpropertiesprocessor.h"
 
 class LLButton;
 class LLCheckBoxCtrl;
@@ -69,8 +70,7 @@ enum EOnlineStatus
 class LLPanelAvatarTab : public LLPanel
 {
 public:
-	LLPanelAvatarTab(const std::string& name, const LLRect &rect, 
-		LLPanelAvatar* panel_avatar);
+	LLPanelAvatarTab(LLPanelAvatar* panel_avatar);
 
 	// Calls refresh() once per frame when panel is visible
 	/*virtual*/ void draw();
@@ -96,7 +96,7 @@ private:
 class LLPanelAvatarFirstLife : public LLPanelAvatarTab
 {
 public:
-	LLPanelAvatarFirstLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar);
+	LLPanelAvatarFirstLife(LLPanelAvatar* panel_avatar);
 
 	/*virtual*/ BOOL postBuild(void);
 
@@ -108,7 +108,7 @@ class LLPanelAvatarSecondLife
 : public LLPanelAvatarTab
 {
 public:
-	LLPanelAvatarSecondLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar );
+	LLPanelAvatarSecondLife(LLPanelAvatar* panel_avatar );
 
 	/*virtual*/ BOOL postBuild(void);
 	/*virtual*/ void refresh();
@@ -140,7 +140,7 @@ class LLPanelAvatarWeb :
 	, public LLWebBrowserCtrlObserver
 {
 public:
-	LLPanelAvatarWeb(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
+	LLPanelAvatarWeb(LLPanelAvatar* panel_avatar);
 	/*virtual*/ ~LLPanelAvatarWeb();
 	/*virtual*/ BOOL	postBuild(void);
 
@@ -170,7 +170,7 @@ private:
 class LLPanelAvatarAdvanced : public LLPanelAvatarTab
 {
 public:
-	LLPanelAvatarAdvanced(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
+	LLPanelAvatarAdvanced(LLPanelAvatar* panel_avatar);
 
 	/*virtual*/ BOOL	postBuild(void);
 
@@ -195,7 +195,7 @@ private:
 class LLPanelAvatarNotes : public LLPanelAvatarTab
 {
 public:
-	LLPanelAvatarNotes(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
+	LLPanelAvatarNotes(LLPanelAvatar* panel_avatar);
 
 	/*virtual*/ BOOL	postBuild(void);
 
@@ -210,7 +210,7 @@ public:
 class LLPanelAvatarClassified : public LLPanelAvatarTab
 {
 public:
-	LLPanelAvatarClassified(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
+	LLPanelAvatarClassified(LLPanelAvatar* panel_avatar);
 
 	/*virtual*/ BOOL postBuild(void);
 
@@ -243,7 +243,7 @@ private:
 class LLPanelAvatarPicks : public LLPanelAvatarTab
 {
 public:
-	LLPanelAvatarPicks(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
+	LLPanelAvatarPicks(LLPanelAvatar* panel_avatar);
 
 	/*virtual*/ BOOL	postBuild(void);
 
@@ -265,10 +265,10 @@ private:
 };
 
 
-class LLPanelAvatar : public LLPanel
+class LLPanelAvatar : public LLPanel, public LLAvatarPropertiesObserver
 {
 public:
-	LLPanelAvatar(const std::string& name, const LLRect &rect, BOOL allow_edit);
+	LLPanelAvatar(BOOL allow_edit);
 	/*virtual*/ ~LLPanelAvatar();
 
 	/*virtual*/ BOOL	postBuild(void);
@@ -306,7 +306,9 @@ public:
 	BOOL haveData() { return mHaveProperties && mHaveStatistics; }
 	BOOL isEditable() const { return mAllowEdit; }
 
-	static void processAvatarPropertiesReply(LLMessageSystem *msg, void **);
+	// LLAvatarPropertiesProcessor observer trigger
+	virtual void processAvatarProperties(const LLAvatarData& avatar_data);
+
 	static void processAvatarInterestsReply(LLMessageSystem *msg, void **);
 	static void processAvatarGroupsReply(LLMessageSystem* msg, void**);
 	static void processAvatarNotesReply(LLMessageSystem *msg, void **);
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index afaaea28f0..b606aef06d 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -40,6 +40,7 @@
 
 #include "lldir.h"
 #include "lldispatcher.h"
+#include "llfloaterreg.h"
 #include "llparcel.h"
 #include "message.h"
 
@@ -54,7 +55,6 @@
 #include "lllineeditor.h"
 #include "llfloateravatarinfo.h"
 #include "llfloaterclassified.h"
-#include "lltabcontainervertical.h"
 #include "lltextbox.h"
 #include "llcombobox.h"
 #include "llviewertexteditor.h"
@@ -70,6 +70,7 @@
 #include "llviewerregion.h"
 #include "llviewerwindow.h"	// for window width, height
 #include "llappviewer.h"	// abortQuit()
+#include "lltrans.h"
 
 const S32 MINIMUM_PRICE_FOR_LISTING = 50;	// L$
 const S32 MATURE_UNDEFINED = -1;
@@ -151,7 +152,7 @@ LLClassifiedTeleportHandler gClassifiedTeleportHandler;
 */
 
 LLPanelClassified::LLPanelClassified(bool in_finder, bool from_search)
-:	LLPanel(std::string("Classified Panel")),
+:	LLPanel(),
 	mInFinder(in_finder),
 	mFromSearch(from_search),
 	mDirty(false),
@@ -231,44 +232,37 @@ void LLPanelClassified::reset()
 BOOL LLPanelClassified::postBuild()
 {
     mSnapshotCtrl = getChild<LLTextureCtrl>("snapshot_ctrl");
-	mSnapshotCtrl->setCommitCallback(onCommitAny);
-	mSnapshotCtrl->setCallbackUserData(this);
+	mSnapshotCtrl->setCommitCallback(onCommitAny, this);
 	mSnapshotSize = mSnapshotCtrl->getRect();
 
     mNameEditor = getChild<LLLineEditor>("given_name_editor");
 	mNameEditor->setMaxTextLength(DB_PARCEL_NAME_LEN);
 	mNameEditor->setCommitOnFocusLost(TRUE);
 	mNameEditor->setFocusReceivedCallback(focusReceived, this);
-	mNameEditor->setCommitCallback(onCommitAny);
-	mNameEditor->setCallbackUserData(this);
+	mNameEditor->setCommitCallback(onCommitAny, this);
 	mNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII );
 
     mDescEditor = getChild<LLTextEditor>("desc_editor");
 	mDescEditor->setCommitOnFocusLost(TRUE);
 	mDescEditor->setFocusReceivedCallback(focusReceived, this);
-	mDescEditor->setCommitCallback(onCommitAny);
-	mDescEditor->setCallbackUserData(this);
+	mDescEditor->setCommitCallback(onCommitAny, this);
 	mDescEditor->setTabsToNextField(TRUE);
 
     mLocationEditor = getChild<LLLineEditor>("location_editor");
 
     mSetBtn = getChild<LLButton>( "set_location_btn");
-    mSetBtn->setClickedCallback(onClickSet);
-    mSetBtn->setCallbackUserData(this);
+    mSetBtn->setClickedCallback(onClickSet, this);
 
     mTeleportBtn = getChild<LLButton>( "classified_teleport_btn");
-    mTeleportBtn->setClickedCallback(onClickTeleport);
-    mTeleportBtn->setCallbackUserData(this);
+    mTeleportBtn->setClickedCallback(onClickTeleport, this);
 
     mMapBtn = getChild<LLButton>( "classified_map_btn");
-    mMapBtn->setClickedCallback(onClickMap);
-    mMapBtn->setCallbackUserData(this);
+    mMapBtn->setClickedCallback(onClickMap, this);
 
 	if(mInFinder)
 	{
 		mProfileBtn  = getChild<LLButton>( "classified_profile_btn");
-		mProfileBtn->setClickedCallback(onClickProfile);
-		mProfileBtn->setCallbackUserData(this);
+		mProfileBtn->setClickedCallback(onClickProfile, this);
 	}
 
 	mCategoryCombo = getChild<LLComboBox>( "classified_category_combo");
@@ -277,16 +271,14 @@ BOOL LLPanelClassified::postBuild()
 		iter != LLClassifiedInfo::sCategories.end();
 		iter++)
 	{
-		mCategoryCombo->add(iter->second, (void *)((intptr_t)iter->first), ADD_BOTTOM);
+		mCategoryCombo->add(LLTrans::getString(iter->second), (void *)((intptr_t)iter->first), ADD_BOTTOM);
 	}
 	mCategoryCombo->setCurrentByIndex(0);
-	mCategoryCombo->setCommitCallback(onCommitAny);
-	mCategoryCombo->setCallbackUserData(this);
+	mCategoryCombo->setCommitCallback(onCommitAny, this);
 
 	mMatureCombo = getChild<LLComboBox>( "classified_mature_check");
 	mMatureCombo->setCurrentByIndex(0);
-	mMatureCombo->setCommitCallback(onCommitAny);
-	mMatureCombo->setCallbackUserData(this);
+	mMatureCombo->setCommitCallback(onCommitAny, this);
 	if (gAgent.wantsPGOnly())
 	{
 		// Teens don't get to set mature flag. JC
@@ -297,13 +289,11 @@ BOOL LLPanelClassified::postBuild()
 	if (!mInFinder)
 	{
 		mAutoRenewCheck = getChild<LLCheckBoxCtrl>( "auto_renew_check");
-		mAutoRenewCheck->setCommitCallback(onCommitAny);
-		mAutoRenewCheck->setCallbackUserData(this);
+		mAutoRenewCheck->setCommitCallback(onCommitAny, this);
 	}
 
 	mUpdateBtn = getChild<LLButton>("classified_update_btn");
-    mUpdateBtn->setClickedCallback(onClickUpdate);
-    mUpdateBtn->setCallbackUserData(this);
+    mUpdateBtn->setClickedCallback(onClickUpdate, this);
 
 	if (!mInFinder)
 	{
@@ -360,7 +350,7 @@ bool LLPanelClassified::saveCallback(const LLSD& notification, const LLSD& respo
 				LLFloater* parent_floater = gFloaterView->getParentFloater(this);
 				if (parent_floater)
 				{
-					parent_floater->close();
+					parent_floater->closeFloater();
 				}
 			}
 			break;
@@ -455,10 +445,11 @@ void LLPanelClassified::setClickThrough(const LLUUID& classified_id,
 
 		if (self->mClickThroughText)
 		{
-			std::string msg = llformat("Clicks: %d teleport, %d map, %d profile",
-									self->mTeleportClicksNew + self->mTeleportClicksOld,
-									self->mMapClicksNew + self->mMapClicksOld,
-									self->mProfileClicksNew + self->mProfileClicksOld);
+			LLStringUtil::format_map_t args;
+			args["[TELEPORT]"] = llformat ("%d", self->mTeleportClicksNew + self->mTeleportClicksOld);
+			args["[MAP]"] = llformat ("%d", self->mMapClicksNew + self->mMapClicksOld);
+			args["[PROFILE]"] = llformat ("%d", self->mProfileClicksNew + self->mProfileClicksOld);
+			std::string msg = LLTrans::getString ("ClassifiedClicksTxt", args);
 			self->mClickThroughText->setText(msg);
 		}
 	}
@@ -623,7 +614,6 @@ void LLPanelClassified::processClassifiedInfoReply(LLMessageSystem *msg, void **
 	U32 date = 0;
 	msg->getU32Fast(_PREHASH_Data, _PREHASH_CreationDate, date);
 	time_t tim = date;
-	tm *now=localtime(&tim);
 
 	// future use
 	U32 expiration_date = 0;
@@ -674,9 +664,13 @@ void LLPanelClassified::processClassifiedInfoReply(LLMessageSystem *msg, void **
 			self->mAutoRenewCheck->set(auto_renew);
 		}
 
-		std::string datestr = llformat("%02d/%02d/%d", now->tm_mon+1, now->tm_mday, now->tm_year+1900);
+		std::string dateStr = self->getString("dateStr");
+		LLSD substitution;
+		substitution["datetime"] = (S32) tim;
+		LLStringUtil::format (dateStr, substitution);
+
 		LLStringUtil::format_map_t string_args;
-		string_args["[DATE]"] = datestr;
+		string_args["[DATE]"] = dateStr;
 		string_args["[AMT]"] = llformat("%d", price_for_listing);
 		self->childSetText("classified_info_text", self->getString("ad_placed_paid", string_args));
 
@@ -850,7 +844,7 @@ void LLPanelClassified::gotMature()
 	if (mPaidFor)
 	{
 		LLNotification::Params params("PublishClassified");
-		params.functor(boost::bind(&LLPanelClassified::confirmPublish, this, _1, _2));
+		params.functor.function(boost::bind(&LLPanelClassified::confirmPublish, this, _1, _2));
 		LLNotifications::instance().forceResponse(params, 0);
 	}
 	else
@@ -945,7 +939,7 @@ void LLPanelClassified::onClickTeleport(void* data)
     if (!self->mPosGlobal.isExactlyZero())
     {
         gAgent.teleportViaLocation(self->mPosGlobal);
-        gFloaterWorldMap->trackLocation(self->mPosGlobal);
+        LLFloaterWorldMap::getInstance()->trackLocation(self->mPosGlobal);
 
 		self->sendClassifiedClickMessage("teleport");
     }
@@ -956,8 +950,8 @@ void LLPanelClassified::onClickTeleport(void* data)
 void LLPanelClassified::onClickMap(void* data)
 {
 	LLPanelClassified* self = (LLPanelClassified*)data;
-	gFloaterWorldMap->trackLocation(self->mPosGlobal);
-	LLFloaterWorldMap::show(NULL, TRUE);
+	LLFloaterWorldMap::getInstance()->trackLocation(self->mPosGlobal);
+	LLFloaterReg::showInstance("world_map", "center");
 
 	self->sendClassifiedClickMessage("map");
 }
@@ -988,7 +982,7 @@ void LLPanelClassified::onClickSet(void* data)
 	self->mPosGlobal = gAgent.getPositionGlobal();
 
 	std::string location_text;
-	std::string regionName = "(will update after publish)";
+	std::string regionName = LLTrans::getString("ClassifiedUpdateAfterPublish");
 	LLViewerRegion* pRegion = gAgent.getRegion();
 	if (pRegion)
 	{
@@ -1069,7 +1063,7 @@ void LLPanelClassified::sendClassifiedClickMessage(const std::string& type)
 ////////////////////////////////////////////////////////////////////////////////////////////
 
 LLFloaterPriceForListing::LLFloaterPriceForListing()
-:	LLFloater(std::string("PriceForListing")),
+:	LLFloater(),
 	mCallback(NULL),
 	mUserData(NULL)
 { }
@@ -1133,7 +1127,7 @@ void LLFloaterPriceForListing::buttonCore(S32 button, void* data)
 	{
 		std::string text = self->childGetText("price_edit");
 		self->mCallback(button, text, self->mUserData);
-		self->close();
+		self->closeFloater();
 	}
 }
 
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index a2f3d9e12c..b7ec485872 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -36,37 +36,33 @@
 #include "llpanelcontents.h"
 
 // linden library includes
+#include "lleconomy.h"
 #include "llerror.h"
+#include "llfloaterreg.h"
+#include "llfontgl.h"
+#include "llmaterialtable.h"
+#include "llpermissionsflags.h"
 #include "llrect.h"
 #include "llstring.h"
-#include "llmaterialtable.h"
-#include "llfontgl.h"
+#include "llui.h"
 #include "m3math.h"
-#include "llpermissionsflags.h"
-#include "lleconomy.h"
 #include "material_codes.h"
 
 // project includes
-#include "llui.h"
-#include "llspinctrl.h"
-#include "llcheckboxctrl.h"
-#include "lltextbox.h"
-#include "llbutton.h"
-#include "llcombobox.h"
-#include "llfloaterbulkpermission.h"
-
 #include "llagent.h"
-#include "llviewerwindow.h"
-#include "llworld.h"
-#include "llviewerobject.h"
-#include "llviewerregion.h"
+#include "llfloaterbulkpermission.h"
+#include "llpanelinventory.h"
+#include "llpreviewscript.h"
 #include "llresmgr.h"
 #include "llselectmgr.h"
-#include "llpreviewscript.h"
 #include "lltool.h"
-#include "lltoolmgr.h"
 #include "lltoolcomp.h"
-#include "llpanelinventory.h"
+#include "lltoolmgr.h"
+#include "lltrans.h"
+#include "llviewerobject.h"
+#include "llviewerregion.h"
+#include "llviewerwindow.h"
+#include "llworld.h"
 
 //
 // Imported globals
@@ -86,11 +82,13 @@ BOOL LLPanelContents::postBuild()
 	childSetAction("button new script",&LLPanelContents::onClickNewScript, this);
 	childSetAction("button permissions",&LLPanelContents::onClickPermissions, this);
 
+	mPanelInventory = getChild<LLPanelInventory>("contents_inventory");
+	
 	return TRUE;
 }
 
-LLPanelContents::LLPanelContents(const std::string& name)
-	:	LLPanel(name),
+LLPanelContents::LLPanelContents()
+	:	LLPanel(),
 		mPanelInventory(NULL)
 {
 }
@@ -171,7 +169,7 @@ void LLPanelContents::onClickNewScript(void *userdata)
 				LLUUID::null,
 				LLAssetType::AT_LSL_TEXT,
 				LLInventoryType::IT_LSL,
-				std::string("New Script"),
+				LLTrans::getString("PanelContentsNewScript"),
 				desc,
 				LLSaleInfo::DEFAULT,
 				LLViewerInventoryItem::II_FLAGS_NONE,
@@ -185,21 +183,7 @@ void LLPanelContents::onClickNewScript(void *userdata)
 		// viewer so the viewer can auto-open the script and start
 		// editing ASAP.
 #if 0
-		S32 left, top;
-		gFloaterView->getNewFloaterPosition(&left, &top);
-		LLRect rect = gSavedSettings.getRect("PreviewScriptRect");
-		rect.translate( left - rect.mLeft, top - rect.mTop );
-
-		LLLiveLSLEditor* editor;
-		editor = new LLLiveLSLEditor("script ed",
-									   rect,
-									   "Script: New Script",
-									   object->mID,
-									   LLUUID::null);
-		editor->open();	/*Flawfinder: ignore*/
-
-		// keep onscreen
-		gFloaterView->adjustToFitScreen(editor, FALSE);
+		LLFloaterReg::showInstance("preview_scriptedit", LLSD(inv_item->getUUID()), TAKE_FOCUS_YES);
 #endif
 	}
 }
diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h
index ea06707494..de1914bff9 100644
--- a/indra/newview/llpanelcontents.h
+++ b/indra/newview/llpanelcontents.h
@@ -46,7 +46,7 @@ class LLPanelContents : public LLPanel
 {
 public:
 	virtual	BOOL postBuild();
-	LLPanelContents(const std::string& name);
+	LLPanelContents();
 	virtual ~LLPanelContents();
 
 	void			refresh();
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index e93a5be8ed..2ff22416ec 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -87,11 +87,10 @@ BOOL	LLPanelFace::postBuild()
 	if(mTextureCtrl)
 	{
 		mTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectTexture" )));
-		mTextureCtrl->setCommitCallback( LLPanelFace::onCommitTexture );
-		mTextureCtrl->setOnCancelCallback( LLPanelFace::onCancelTexture );
-		mTextureCtrl->setOnSelectCallback( LLPanelFace::onSelectTexture );
-		mTextureCtrl->setDragCallback(LLPanelFace::onDragTexture);
-		mTextureCtrl->setCallbackUserData( this );
+		mTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitTexture, this, _2) );
+		mTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelTexture, this, _2) );
+		mTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectTexture, this, _2) );
+		mTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragTexture, _2));
 		mTextureCtrl->setFollowsTop();
 		mTextureCtrl->setFollowsLeft();
 		// Don't allow (no copy) or (no transfer) textures to be selected during immediate mode
@@ -118,10 +117,9 @@ BOOL	LLPanelFace::postBuild()
 	mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
 	if(mColorSwatch)
 	{
-		mColorSwatch->setCommitCallback(LLPanelFace::onCommitColor);
-		mColorSwatch->setOnCancelCallback(LLPanelFace::onCancelColor);
-		mColorSwatch->setOnSelectCallback(LLPanelFace::onSelectColor);
-		mColorSwatch->setCallbackUserData( this );
+		mColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitColor, this, _2));
+		mColorSwatch->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelColor, this, _2));
+		mColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectColor, this, _2));
 		mColorSwatch->setFollowsTop();
 		mColorSwatch->setFollowsLeft();
 		mColorSwatch->setCanApplyImmediately(TRUE);
@@ -137,8 +135,7 @@ BOOL	LLPanelFace::postBuild()
 	mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans");
 	if(mCtrlColorTransp)
 	{
-		mCtrlColorTransp->setCommitCallback(LLPanelFace::onCommitAlpha);
-		mCtrlColorTransp->setCallbackUserData(this);
+		mCtrlColorTransp->setCommitCallback(boost::bind(&LLPanelFace::onCommitAlpha, this, _2));
 		mCtrlColorTransp->setPrecision(0);
 		mCtrlColorTransp->setFollowsTop();
 		mCtrlColorTransp->setFollowsLeft();
@@ -147,23 +144,20 @@ BOOL	LLPanelFace::postBuild()
 	mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright");
 	if (mCheckFullbright)
 	{
-		mCheckFullbright->setCommitCallback(LLPanelFace::onCommitFullbright);
-		mCheckFullbright->setCallbackUserData( this );
+		mCheckFullbright->setCommitCallback(LLPanelFace::onCommitFullbright, this);
 	}
 
 	mComboTexGen = getChild<LLComboBox>("combobox texgen");
 	if(mComboTexGen)
 	{
-		mComboTexGen->setCommitCallback(LLPanelFace::onCommitTexGen);
+		mComboTexGen->setCommitCallback(LLPanelFace::onCommitTexGen, this);
 		mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);	
-		mComboTexGen->setCallbackUserData( this );
 	}
 
 	mCtrlGlow = getChild<LLSpinCtrl>("glow");
 	if(mCtrlGlow)
 	{
-		mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow);
-		mCtrlGlow->setCallbackUserData(this);
+		mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow, this);
 	}
 	
 	childSetCommitCallback("combobox shininess",&LLPanelFace::onCommitShiny,this);
@@ -183,8 +177,8 @@ BOOL	LLPanelFace::postBuild()
 	return TRUE;
 }
 
-LLPanelFace::LLPanelFace(const std::string& name)
-:	LLPanel(name)
+LLPanelFace::LLPanelFace()
+:	LLPanel()
 {
 }
 
@@ -807,32 +801,25 @@ F32 LLPanelFace::valueGlow(LLViewerObject* object, S32 face)
 }
 
 
-// static
-void LLPanelFace::onCommitColor(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitColor(const LLSD& data)
 {
-	LLPanelFace* self = (LLPanelFace*) userdata;
-	self->sendColor();
+	sendColor();
 }
 
-// static
-void LLPanelFace::onCommitAlpha(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitAlpha(const LLSD& data)
 {
-	LLPanelFace* self = (LLPanelFace*) userdata;
-	self->sendAlpha();
+	sendAlpha();
 }
 
-// static
-void LLPanelFace::onCancelColor(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCancelColor(const LLSD& data)
 {
 	LLSelectMgr::getInstance()->selectionRevertColors();
 }
 
-// static
-void LLPanelFace::onSelectColor(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onSelectColor(const LLSD& data)
 {
-	LLPanelFace* self = (LLPanelFace*) userdata;
 	LLSelectMgr::getInstance()->saveSelectedObjectColors();
-	self->sendColor();
+	sendColor();
 }
 
 // static
@@ -871,7 +858,7 @@ void LLPanelFace::onCommitGlow(LLUICtrl* ctrl, void* userdata)
 }
 
 // static
-BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item, void*)
+BOOL LLPanelFace::onDragTexture(LLInventoryItem* item)
 {
 	BOOL accept = TRUE;
 	for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
@@ -888,28 +875,21 @@ BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item, void*)
 	return accept;
 }
 
-// static
-void LLPanelFace::onCommitTexture( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTexture( const LLSD& data )
 {
-	LLPanelFace* self = (LLPanelFace*) userdata;
-
 	LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
-	
-	self->sendTexture();
+	sendTexture();
 }
 
-// static
-void LLPanelFace::onCancelTexture(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCancelTexture(const LLSD& data)
 {
 	LLSelectMgr::getInstance()->selectionRevertTextures();
 }
 
-// static
-void LLPanelFace::onSelectTexture(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onSelectTexture(const LLSD& data)
 {
-	LLPanelFace* self = (LLPanelFace*) userdata;
 	LLSelectMgr::getInstance()->saveSelectedObjectTextures();
-	self->sendTexture();
+	sendTexture();
 }
 
 
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index a2ead0c8a2..9600129696 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -52,7 +52,7 @@ class LLPanelFace : public LLPanel
 {
 public:
 	virtual BOOL	postBuild();
-	LLPanelFace(const std::string& name);
+	LLPanelFace();
 	virtual ~LLPanelFace();
 
 	void			refresh();
@@ -70,17 +70,18 @@ protected:
 	void			sendFullbright();		// applies and sends full bright
 	void            sendGlow();
 
-	// this function is to return TRUE if the dra should succeed.
-	static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
+	// this function is to return TRUE if the drag should succeed.
+	static BOOL onDragTexture(LLInventoryItem* item);
 
-	static void 	onCommitTexture(		LLUICtrl* ctrl, void* userdata);
-	static void 	onCancelTexture(		LLUICtrl* ctrl, void* userdata);
-	static void 	onSelectTexture(		LLUICtrl* ctrl, void* userdata);
-	static void 	onCommitTextureInfo(	LLUICtrl* ctrl, void* userdata);
-	static void 	onCommitColor(			LLUICtrl* ctrl, void* userdata);
-	static void 	onCommitAlpha(			LLUICtrl* ctrl, void* userdata);
-	static void 	onCancelColor(			LLUICtrl* ctrl, void* userdata);
-	static void 	onSelectColor(			LLUICtrl* ctrl, void* userdata);
+	void 	onCommitTexture(const LLSD& data);
+	void 	onCancelTexture(const LLSD& data);
+	void 	onSelectTexture(const LLSD& data);
+	void 	onCommitColor(const LLSD& data);
+	void 	onCommitAlpha(const LLSD& data);
+	void 	onCancelColor(const LLSD& data);
+	void 	onSelectColor(const LLSD& data);
+	
+	static 	void onCommitTextureInfo( 		LLUICtrl* ctrl, void* userdata);
 	static void		onCommitBump(			LLUICtrl* ctrl, void* userdata);
 	static void		onCommitTexGen(			LLUICtrl* ctrl, void* userdata);
 	static void		onCommitShiny(			LLUICtrl* ctrl, void* userdata);
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index d9d796fd9e..3acaa6b68e 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -46,12 +46,21 @@
 #include "llviewerwindow.h"
 #include "llappviewer.h"
 #include "llnotifications.h"
+#include "llfloater.h"
 
 // static
 void* LLPanelGroupTab::createTab(void* data)
 {
 	LLUUID* group_id = static_cast<LLUUID*>(data);
-	return new LLPanelGroupTab("panel group tab", *group_id);
+	return new LLPanelGroupTab(*group_id);
+}
+
+LLPanelGroupTab::LLPanelGroupTab(const LLUUID& group_id)
+	: LLPanel(),
+	  mGroupID(group_id),
+	  mAllowEdit(TRUE),
+	  mHasModal(FALSE)
+{
 }
 
 LLPanelGroupTab::~LLPanelGroupTab()
@@ -68,13 +77,11 @@ BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp)
 BOOL LLPanelGroupTab::postBuild()
 {
 	// Hook up the help button callback.
-	LLButton* button = getChild<LLButton>("help_button");
+	LLButton* button = findChild<LLButton>("help_button");
 	if (button)
 	{
-		button->setClickedCallback(onClickHelp);
-		button->setCallbackUserData(this);
+		button->setCommitCallback(boost::bind(&LLPanelGroupTab::handleClickHelp, this));
 	}
-
 	mHelpText = getString("help_text");
 	return TRUE;
 }
@@ -103,13 +110,6 @@ void LLPanelGroupTab::notifyObservers()
 	}
 }
 
-// static
-void LLPanelGroupTab::onClickHelp(void* user_data)
-{
-	LLPanelGroupTab* self = static_cast<LLPanelGroupTab*>(user_data);
-	self->handleClickHelp();
-}
-
 void LLPanelGroupTab::handleClickHelp()
 {
 	// Display the help text.
@@ -125,67 +125,48 @@ void LLPanelGroupTab::handleClickHelp()
 	}
 }
 
-LLPanelGroup::LLPanelGroup(const std::string& filename,
-						   const std::string& name,
-						   const LLUUID& group_id,
-						   const std::string& initial_tab_selected)
-:	LLPanel(name, LLRect(), FALSE),
+LLPanelGroup::LLPanelGroup(const LLUUID& group_id)
+:	LLPanel(),
 	LLGroupMgrObserver( group_id ),
 	mCurrentTab( NULL ),
 	mRequestedTab( NULL ),
 	mTabContainer( NULL ),
 	mIgnoreTransition( FALSE ),
+	mApplyBtn( NULL ),
 	mForceClose( FALSE ),
-	mInitialTab(initial_tab_selected),
 	mAllowEdit( TRUE ),
 	mShowingNotifyDialog( FALSE )
 {
 	// Set up the factory callbacks.
-	mFactoryMap["general_tab"]	= LLCallbackMap(LLPanelGroupGeneral::createTab,
-												&mID);
-	mFactoryMap["roles_tab"]	= LLCallbackMap(LLPanelGroupRoles::createTab,
-												&mID);
-	mFactoryMap["notices_tab"]	= LLCallbackMap(LLPanelGroupNotices::createTab,
-												&mID);
-	mFactoryMap["land_money_tab"]= LLCallbackMap(LLPanelGroupLandMoney::createTab,
-												 &mID);
+	mFactoryMap["general_tab"]	= LLCallbackMap(LLPanelGroupGeneral::createTab, &mID);
+	mFactoryMap["roles_tab"]	= LLCallbackMap(LLPanelGroupRoles::createTab, &mID);
+	mFactoryMap["notices_tab"]	= LLCallbackMap(LLPanelGroupNotices::createTab, &mID);
+	mFactoryMap["land_money_tab"]= LLCallbackMap(LLPanelGroupLandMoney::createTab, &mID);
 	// Roles sub tabs
 	mFactoryMap["members_sub_tab"] = LLCallbackMap(LLPanelGroupMembersSubTab::createTab, &mID);
 	mFactoryMap["roles_sub_tab"] = LLCallbackMap(LLPanelGroupRolesSubTab::createTab, &mID);
 	mFactoryMap["actions_sub_tab"] = LLCallbackMap(LLPanelGroupActionsSubTab::createTab, &mID);
 
 	LLGroupMgr::getInstance()->addObserver(this);
-
-	// Pass on construction of this panel to the control factory.
-	LLUICtrlFactory::getInstance()->buildPanel(this, filename, &getFactoryMap());
-	mFilename = filename;
 }
 
 LLPanelGroup::~LLPanelGroup()
 {
 	LLGroupMgr::getInstance()->removeObserver(this);
 
-	int i;
-	int tab_count = mTabContainer->getTabCount();
-
-	for (i = tab_count - 1; i >=0; --i)
+	for (S32 i=mTabContainer->getTabCount() - 1; i >=0; --i)
 	{
-		LLPanelGroupTab* panelp =
-			(LLPanelGroupTab*) mTabContainer->getPanelByIndex(i);
-
-		if ( panelp ) panelp->removeObserver(this);
+		LLPanelGroupTab* panelp = (LLPanelGroupTab*) mTabContainer->getPanelByIndex(i);
+		if ( panelp )
+			panelp->removeObserver(this);
 	}
 }
 
 void LLPanelGroup::updateTabVisibility()
 {
-	S32 i;
-	S32 tab_count = mTabContainer->getTabCount();
-
-	for (i = tab_count - 1; i >=0; --i)
+	for (S32 i = mTabContainer->getTabCount() - 1; i >=0; --i)
 	{
-		LLPanelGroupTab* panelp =
-			(LLPanelGroupTab*) mTabContainer->getPanelByIndex(i);
+		LLPanelGroupTab* panelp = (LLPanelGroupTab*) mTabContainer->getPanelByIndex(i);
 
 		BOOL visible = panelp->isVisibleByAgent(&gAgent) || gAgent.isGodlike();
 		mTabContainer->enableTabButton(i, visible);
@@ -195,8 +176,7 @@ void LLPanelGroup::updateTabVisibility()
 			//we are disabling the currently selected tab
 			//select the previous one
 			mTabContainer->selectPrevTab();
-			mCurrentTab = 
-				(LLPanelGroupTab*) mTabContainer->getCurrentPanel();
+			mCurrentTab = (LLPanelGroupTab*) mTabContainer->getCurrentPanel();
 		}
 	}
 }
@@ -209,49 +189,24 @@ BOOL LLPanelGroup::postBuild()
 
 	if (mTabContainer)
 	{
-		// Select the initial tab specified via constructor
-		const BOOL recurse = TRUE;
-		LLPanelGroupTab* tabp = 
-			getChild<LLPanelGroupTab>(mInitialTab, recurse);
-
-		if (!tabp)
+		mCurrentTab = dynamic_cast<LLPanelGroupTab*>(mTabContainer->getCurrentPanel());
+		llassert_always(mCurrentTab);
+		
+		// Add click callback.
+		mTabContainer->setCommitCallback(boost::bind(&LLPanelGroup::handleClickTab, this));
+		
+		// Setup pabels
+		for (S32 i = mTabContainer->getTabCount() - 1; i >=0; --i)
 		{
-			//our initial tab selection was invalid, just select the
-			//first tab then or default to selecting the initial
-			//selected tab specified in the layout file
-			tabp = (LLPanelGroupTab*) mTabContainer->getCurrentPanel();
-
-			//no tab was initially selected through constructor
-			//or the XML, select the first tab
-			if (!tabp)
+			LLPanel* tab_panel = mTabContainer->getPanelByIndex(i);
+			LLPanelGroupTab* panelp = dynamic_cast<LLPanelGroupTab*>(tab_panel);
+			if (panelp)
 			{
-				mTabContainer->selectFirstTab();
-				tabp = (LLPanelGroupTab*) mTabContainer->getCurrentPanel();
+				// Pass on whether or not to allow edit to tabs.
+				panelp->setAllowEdit(mAllowEdit);
+				panelp->addObserver(this);
 			}
 		}
-		else
-		{
-			mTabContainer->selectTabPanel(tabp);
-		}
-
-		mCurrentTab = tabp;
-
-		// Add click callbacks.
-		S32 i;
-		S32 tab_count = mTabContainer->getTabCount();
-
-		for (i = tab_count - 1; i >=0; --i)
-		{
-			LLPanel* tab_panel = mTabContainer->getPanelByIndex(i);
-			LLPanelGroupTab* panelp =(LLPanelGroupTab*)tab_panel; // bit of a hack
-
-			// Pass on whether or not to allow edit to tabs.
-			panelp->setAllowEdit(mAllowEdit);
-			panelp->addObserver(this);
-
-			mTabContainer->setTabChangeCallback(panelp, onClickTab);
-			mTabContainer->setTabUserData(panelp, this);
-		}
 		updateTabVisibility();
 
 		// Act as though this tab was just activated.
@@ -262,38 +217,22 @@ BOOL LLPanelGroup::postBuild()
 	mWantApplyMesg = getString("want_apply_text");
 
 	LLButton* button = getChild<LLButton>("btn_ok");
-	if (button)
-	{
-		button->setClickedCallback(onBtnOK);
-		button->setCallbackUserData(this);
-		button->setVisible(mAllowEdit);
-	}
+	button->setClickedCallback(onBtnOK, this);
+	button->setVisible(mAllowEdit);
 	
 	button = getChild<LLButton>("btn_cancel");
-	if (button)
-	{
-		button->setClickedCallback(onBtnCancel);
-	   	button->setCallbackUserData(this);
-		button->setVisible(mAllowEdit);
-	}
+	button->setClickedCallback(onBtnCancel, this);
+	button->setVisible(mAllowEdit);
 
 	button = getChild<LLButton>("btn_apply");
-	if (button)
-	{
-		button->setClickedCallback(onBtnApply);
-		button->setVisible(mAllowEdit);
-		button->setEnabled(FALSE);
-
-		mApplyBtn = button;
-	}
+	button->setClickedCallback(onBtnApply, this);
+	button->setVisible(mAllowEdit);
+	button->setEnabled(FALSE);
+	mApplyBtn = button;
 
 	button = getChild<LLButton>("btn_refresh");
-	if (button)
-	{
-		button->setClickedCallback(onBtnRefresh);
-		button->setCallbackUserData(this);
-		button->setVisible(mAllowEdit);
-	}
+	button->setClickedCallback(onBtnRefresh, this);
+	button->setVisible(mAllowEdit);
 
 	return TRUE;
 }
@@ -322,13 +261,6 @@ void LLPanelGroup::tabChanged()
 	}
 }
 
-// static
-void LLPanelGroup::onClickTab(void* user_data, bool from_click)
-{
-	LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
-	self->handleClickTab();
-}
-
 void LLPanelGroup::handleClickTab()
 {
 	// If we are already handling a transition,
@@ -357,7 +289,8 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
 	LLGroupMgr::getInstance()->removeObserver(this);
 	mID = group_id;
 	LLGroupMgr::getInstance()->addObserver(this);
-	//TODO:  this is really bad, we should add a method
+
+	//*TODO:  this is really bad, we should add a method
 	// where the panels can just update themselves
 	// on a group id change.  Similar to update() but with a group
 	// id change.
@@ -365,20 +298,19 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
 	// For now, rebuild panel
 	//delete children and rebuild panel
 	deleteAllChildren();
-	LLUICtrlFactory::getInstance()->buildPanel(this, mFilename, &getFactoryMap());
+	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group.xml");
 }
 
 void LLPanelGroup::selectTab(std::string tab_name)
 {
 	const BOOL recurse = TRUE;
 
-	LLPanelGroupTab* tabp = 
-		getChild<LLPanelGroupTab>(tab_name, recurse);
+	LLPanelGroupTab* tabp = findChild<LLPanelGroupTab>(tab_name, recurse);
 
 	if ( tabp && mTabContainer )
 	{
 		mTabContainer->selectTabPanel(tabp);
-		onClickTab(this, false);
+		handleClickTab();
 	}
 }
 
@@ -455,7 +387,7 @@ void LLPanelGroup::transitionToTab()
 	}
 	else // NULL requested indicates a close action.
 	{
-		close();
+		closePanel();
 	}
 }
 
@@ -507,7 +439,7 @@ void LLPanelGroup::onBtnOK(void* user_data)
 	// If we are able to apply changes, then close.
 	if(self->apply())
 	{
-		self->close();
+		self->closePanel();
 	}
 }
 
@@ -515,7 +447,7 @@ void LLPanelGroup::onBtnOK(void* user_data)
 void LLPanelGroup::onBtnCancel(void* user_data)
 {
 	LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
-	self->close();
+	self->closePanel();
 }
 
 // static
@@ -528,10 +460,12 @@ void LLPanelGroup::onBtnApply(void* user_data)
 bool LLPanelGroup::apply()
 {
 	// Pass this along to the currently visible tab.
-	if (!mTabContainer) return false;
+	if (!mTabContainer)
+		return false;
 
-	LLPanelGroupTab* panelp = (LLPanelGroupTab*) mTabContainer->getCurrentPanel();
-	if (!panelp) return false;
+	LLPanelGroupTab* panelp = dynamic_cast<LLPanelGroupTab*>(mTabContainer->getCurrentPanel());
+	if (!panelp)
+		return false;
 	
 	std::string mesg;
 	if ( !panelp->needsApply(mesg) )
@@ -598,7 +532,7 @@ void LLPanelGroup::refreshData()
 	mRefreshTimer.setTimerExpirySec(5);
 }
 
-void LLPanelGroup::close()
+void LLPanelGroup::closePanel()
 {
 	// Pass this to the parent, if it is a floater.
 	LLView* viewp = getParent();
@@ -609,7 +543,7 @@ void LLPanelGroup::close()
 		// will be asking us whether it can close.
 		mForceClose = TRUE;
 		// Tell the parent floater to close.
-		floaterp->close();
+		floaterp->closeFloater();
 	}
 }
 
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 445fb28502..55c7494a44 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -58,10 +58,7 @@ class LLPanelGroup : public LLPanel,
 					 public LLPanelGroupTabObserver
 {
 public:
-	LLPanelGroup(const std::string& filename,
-				 const std::string& name,
-				 const LLUUID& group_id,
-				 const std::string& initial_tab_selected = std::string());
+	LLPanelGroup(const LLUUID& group_id);
 	virtual ~LLPanelGroup();
 
 	virtual BOOL postBuild();
@@ -70,7 +67,6 @@ public:
 	static void onBtnCancel(void*);
 	static void onBtnApply(void*);
 	static void onBtnRefresh(void*);
-	static void onClickTab(void*,bool);
 	void handleClickTab();
 
 	void setGroupID(const LLUUID& group_id);
@@ -92,7 +88,7 @@ public:
 
 	bool apply();
 	void refreshData();
-	void close();
+	void closePanel();
 	void draw();
 
 	// Group manager observer trigger.
@@ -120,9 +116,6 @@ protected:
 
 	BOOL mForceClose;
 
-	std::string mInitialTab;
-	std::string mFilename;
-
 	std::string mDefaultNeedsApplyMesg;
 	std::string mWantApplyMesg;
 
@@ -133,8 +126,7 @@ protected:
 class LLPanelGroupTab : public LLPanel
 {
 public:
-	LLPanelGroupTab(const std::string& name, const LLUUID& group_id)
-	: LLPanel(name), mGroupID(group_id), mAllowEdit(TRUE), mHasModal(FALSE) { }
+	LLPanelGroupTab(const LLUUID& group_id);
 	virtual ~LLPanelGroupTab();
 
 	// Factory that returns a new LLPanelGroupFoo tab.
@@ -167,7 +159,6 @@ public:
 	virtual std::string getHelpText() const { return mHelpText; }
 
 	// Display anything returned by getHelpText
-	static void onClickHelp(void* data);
 	void handleClickHelp();
 
 	// This just connects the help button callback.
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 3dc5e032c5..da87b4d1a0 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -48,11 +48,13 @@
 #include "lllineeditor.h"
 #include "llnamebox.h"
 #include "llnamelistctrl.h"
+#include "llscrolllistitem.h"
 #include "llspinctrl.h"
 #include "llstatusbar.h"	// can_afford_transaction()
 #include "lltextbox.h"
 #include "lltexteditor.h"
 #include "lltexturectrl.h"
+#include "lltrans.h"
 #include "llviewerwindow.h"
 
 // consts
@@ -64,13 +66,12 @@ const S32 DECLINE_TO_STATE = 0;
 void* LLPanelGroupGeneral::createTab(void* data)
 {
 	LLUUID* group_id = static_cast<LLUUID*>(data);
-	return new LLPanelGroupGeneral("panel group general", *group_id);
+	return new LLPanelGroupGeneral(*group_id);
 }
 
 
-LLPanelGroupGeneral::LLPanelGroupGeneral(const std::string& name, 
-										 const LLUUID& group_id)
-:	LLPanelGroupTab(name, group_id),
+LLPanelGroupGeneral::LLPanelGroupGeneral(const LLUUID& group_id)
+:	LLPanelGroupTab(group_id),
 	mPendingMemberUpdate(FALSE),
 	mChanged(FALSE),
 	mFirstUse(TRUE),
@@ -100,8 +101,6 @@ LLPanelGroupGeneral::~LLPanelGroupGeneral()
 
 BOOL LLPanelGroupGeneral::postBuild()
 {
-	llinfos << "LLPanelGroupGeneral::postBuild()" << llendl;
-
 	bool recurse = true;
 
 	// General info
@@ -111,63 +110,50 @@ BOOL LLPanelGroupGeneral::postBuild()
 	mInsignia = getChild<LLTextureCtrl>("insignia", recurse);
 	if (mInsignia)
 	{
-		mInsignia->setCommitCallback(onCommitAny);
-		mInsignia->setCallbackUserData(this);
+		mInsignia->setCommitCallback(onCommitAny, this);
 		mDefaultIconID = mInsignia->getImageAssetID();
 	}
 	
 	mEditCharter = getChild<LLTextEditor>("charter", recurse);
 	if(mEditCharter)
 	{
-		mEditCharter->setCommitCallback(onCommitAny);
+		mEditCharter->setCommitCallback(onCommitAny, this);
 		mEditCharter->setFocusReceivedCallback(onFocusEdit, this);
 		mEditCharter->setFocusChangedCallback(onFocusEdit, this);
-		mEditCharter->setCallbackUserData(this);
 	}
 
 	mBtnJoinGroup = getChild<LLButton>("join_button", recurse);
 	if ( mBtnJoinGroup )
 	{
-		mBtnJoinGroup->setClickedCallback(onClickJoin);
-		mBtnJoinGroup->setCallbackUserData(this);
+		mBtnJoinGroup->setClickedCallback(onClickJoin, this);
 	}
 
 	mBtnInfo = getChild<LLButton>("info_button", recurse);
 	if ( mBtnInfo )
 	{
-		mBtnInfo->setClickedCallback(onClickInfo);
-		mBtnInfo->setCallbackUserData(this);
+		mBtnInfo->setClickedCallback(onClickInfo, this);
 	}
 
-	LLTextBox* founder = getChild<LLTextBox>("founder_name");
-	if (founder)
-	{
-		mFounderName = new LLNameBox(founder->getName(),founder->getRect(),LLUUID::null,FALSE,founder->getFont(),founder->getMouseOpaque());
-		removeChild(founder, TRUE);
-		addChild(mFounderName);
-	}
+	mFounderName = getChild<LLNameBox>("founder_name");
 
 	mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse);
 	if (mListVisibleMembers)
 	{
-		mListVisibleMembers->setDoubleClickCallback(openProfile);
-		mListVisibleMembers->setCallbackUserData(this);
+		mListVisibleMembers->setDoubleClickCallback(openProfile, this);
 	}
 
 	// Options
 	mCtrlShowInGroupList = getChild<LLCheckBoxCtrl>("show_in_group_list", recurse);
 	if (mCtrlShowInGroupList)
 	{
-		mCtrlShowInGroupList->setCommitCallback(onCommitAny);
-		mCtrlShowInGroupList->setCallbackUserData(this);
+		mCtrlShowInGroupList->setCommitCallback(onCommitAny, this);
 	}
 
 	mComboMature = getChild<LLComboBox>("group_mature_check", recurse);	
 	if(mComboMature)
 	{
 		mComboMature->setCurrentByIndex(0);
-		mComboMature->setCommitCallback(onCommitAny);
-		mComboMature->setCallbackUserData(this);
+		mComboMature->setCommitCallback(onCommitAny, this);
 		if (gAgent.isTeen())
 		{
 			// Teens don't get to set mature flag. JC
@@ -178,22 +164,19 @@ BOOL LLPanelGroupGeneral::postBuild()
 	mCtrlOpenEnrollment = getChild<LLCheckBoxCtrl>("open_enrollement", recurse);
 	if (mCtrlOpenEnrollment)
 	{
-		mCtrlOpenEnrollment->setCommitCallback(onCommitAny);
-		mCtrlOpenEnrollment->setCallbackUserData(this);
+		mCtrlOpenEnrollment->setCommitCallback(onCommitAny, this);
 	}
 
 	mCtrlEnrollmentFee = getChild<LLCheckBoxCtrl>("check_enrollment_fee", recurse);
 	if (mCtrlEnrollmentFee)
 	{
-		mCtrlEnrollmentFee->setCommitCallback(onCommitEnrollment);
-		mCtrlEnrollmentFee->setCallbackUserData(this);
+		mCtrlEnrollmentFee->setCommitCallback(onCommitEnrollment, this);
 	}
 
 	mSpinEnrollmentFee = getChild<LLSpinCtrl>("spin_enrollment_fee", recurse);
 	if (mSpinEnrollmentFee)
 	{
-		mSpinEnrollmentFee->setCommitCallback(onCommitAny);
-		mSpinEnrollmentFee->setCallbackUserData(this);
+		mSpinEnrollmentFee->setCommitCallback(onCommitAny, this);
 		mSpinEnrollmentFee->setPrecision(0);
 		mSpinEnrollmentFee->resetDirty();
 	}
@@ -209,8 +192,7 @@ BOOL LLPanelGroupGeneral::postBuild()
 	mCtrlReceiveNotices = getChild<LLCheckBoxCtrl>("receive_notices", recurse);
 	if (mCtrlReceiveNotices)
 	{
-		mCtrlReceiveNotices->setCommitCallback(onCommitUserOnly);
-		mCtrlReceiveNotices->setCallbackUserData(this);
+		mCtrlReceiveNotices->setCommitCallback(onCommitUserOnly, this);
 		mCtrlReceiveNotices->set(accept_notices);
 		mCtrlReceiveNotices->setEnabled(data.mID.notNull());
 	}
@@ -218,8 +200,7 @@ BOOL LLPanelGroupGeneral::postBuild()
 	mCtrlListGroup = getChild<LLCheckBoxCtrl>("list_groups_in_profile", recurse);
 	if (mCtrlListGroup)
 	{
-		mCtrlListGroup->setCommitCallback(onCommitUserOnly);
-		mCtrlListGroup->setCallbackUserData(this);
+		mCtrlListGroup->setCommitCallback(onCommitUserOnly, this);
 		mCtrlListGroup->set(list_in_profile);
 		mCtrlListGroup->setEnabled(data.mID.notNull());
 		mCtrlListGroup->resetDirty();
@@ -230,8 +211,7 @@ BOOL LLPanelGroupGeneral::postBuild()
 	mComboActiveTitle = getChild<LLComboBox>("active_title", recurse);
 	if (mComboActiveTitle)
 	{
-		mComboActiveTitle->setCommitCallback(onCommitTitle);
-		mComboActiveTitle->setCallbackUserData(this);
+		mComboActiveTitle->setCommitCallback(onCommitTitle, this);
 		mComboActiveTitle->resetDirty();
 	}
 
@@ -480,8 +460,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
 		LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
 		if (!gdatap)
 		{
-			// *TODO: Translate
-			mesg = std::string("No group data found for group ");
+			mesg = LLTrans::getString("NoGroupDataFound");
 			mesg.append(mGroupID.asString());
 			return false;
 		}
@@ -730,7 +709,9 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
 
 		if ( visible )
 		{
-			fee_buff = llformat( "Join (L$%d)", gdatap->mMembershipFee);
+			LLStringUtil::format_map_t string_args;
+			string_args["[AMOUNT]"] = llformat("%d", gdatap->mMembershipFee);
+			fee_buff = getString("group_join_btn", string_args);
 			mBtnJoinGroup->setLabelSelected(fee_buff);
 			mBtnJoinGroup->setLabelUnselected(fee_buff);
 		}
@@ -842,16 +823,16 @@ void LLPanelGroupGeneral::updateMembers()
 		row["id"] = member->getID();
 
 		row["columns"][0]["column"] = "name";
-		row["columns"][0]["font-style"] = style;
+		row["columns"][0]["font"]["style"] = style;
 		// value is filled in by name list control
 
 		row["columns"][1]["column"] = "title";
 		row["columns"][1]["value"] = member->getTitle();
-		row["columns"][1]["font-style"] = style;
+		row["columns"][1]["font"]["style"] = style;
 		
 		row["columns"][2]["column"] = "online";
 		row["columns"][2]["value"] = member->getOnlineStatus();
-		row["columns"][2]["font-style"] = style;
+		row["columns"][2]["font"]["style"] = style;
 
 		sSDTime += sd_timer.getElapsedTimeF32();
 
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index 71356677fc..5d673d5219 100644
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -49,7 +49,7 @@ class LLSpinCtrl;
 class LLPanelGroupGeneral : public LLPanelGroupTab
 {
 public:
-	LLPanelGroupGeneral(const std::string& name, const LLUUID& group_id);
+	LLPanelGroupGeneral(const LLUUID& group_id);
 	virtual ~LLPanelGroupGeneral();
 
 	// LLPanelGroupTab
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index eedec9c8eb..1e6eb8ed44 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -39,6 +39,7 @@
 #include "llcombobox.h"
 #include "llgroupmgr.h"
 #include "llnamelistctrl.h"
+#include "llscrolllistitem.h"
 #include "llspinctrl.h"
 #include "lltextbox.h"
 #include "llviewerobject.h"
@@ -351,18 +352,13 @@ void LLPanelGroupInvite::impl::callbackAddUsers(const std::vector<std::string>&
 	if ( selfp) selfp->addUsers(names, ids);
 }
 
-LLPanelGroupInvite::LLPanelGroupInvite(const std::string& name,
-									   const LLUUID& group_id)
-	: LLPanel(name)
+LLPanelGroupInvite::LLPanelGroupInvite(const LLUUID& group_id)
+	: LLPanel(),
+	  mImplementation(new impl(group_id)),
+	  mPendingUpdate(FALSE)
 {
-	mImplementation = new impl(group_id);
-	mPendingUpdate = FALSE;
-	mStoreSelected = LLUUID::null;
-
-	std::string panel_def_file;
-
 	// Pass on construction of this panel to the control factory.
-	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group_invite.xml", &getFactoryMap());
+	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group_invite.xml");
 }
 
 LLPanelGroupInvite::~LLPanelGroupInvite()
@@ -519,9 +515,8 @@ BOOL LLPanelGroupInvite::postBuild()
 		getChild<LLNameListCtrl>("invitee_list", recurse);
 	if ( mImplementation->mInvitees )
 	{
-		mImplementation->mInvitees->setCallbackUserData(mImplementation);
 		mImplementation->mInvitees->setCommitOnSelectionChange(TRUE);
-		mImplementation->mInvitees->setCommitCallback(impl::callbackSelect);
+		mImplementation->mInvitees->setCommitCallback(impl::callbackSelect, mImplementation);
 	}
 
 	LLButton* button = getChild<LLButton>("add_button", recurse);
@@ -529,17 +524,14 @@ BOOL LLPanelGroupInvite::postBuild()
 	{
 		// default to opening avatarpicker automatically
 		// (*impl::callbackClickAdd)((void*)this);
-		button->setClickedCallback(impl::callbackClickAdd);
-		button->setCallbackUserData(this);
+		button->setClickedCallback(impl::callbackClickAdd, this);
 	}
 
 	mImplementation->mRemoveButton = 
 			getChild<LLButton>("remove_button", recurse);
 	if ( mImplementation->mRemoveButton )
 	{
-		mImplementation->mRemoveButton->
-				setClickedCallback(impl::callbackClickRemove);
-		mImplementation->mRemoveButton->setCallbackUserData(mImplementation);
+		mImplementation->mRemoveButton->setClickedCallback(impl::callbackClickRemove, mImplementation);
 		mImplementation->mRemoveButton->setEnabled(FALSE);
 	}
 
@@ -547,17 +539,14 @@ BOOL LLPanelGroupInvite::postBuild()
 		getChild<LLButton>("ok_button", recurse);
 	if ( mImplementation->mOKButton )
  	{
-		mImplementation->mOKButton->
-				setClickedCallback(impl::callbackClickOK);
-		mImplementation->mOKButton->setCallbackUserData(mImplementation);
+		mImplementation->mOKButton->setClickedCallback(impl::callbackClickOK, mImplementation);
 		mImplementation->mOKButton->setEnabled(FALSE);
  	}
 
 	button = getChild<LLButton>("cancel_button", recurse);
 	if ( button )
 	{
-		button->setClickedCallback(impl::callbackClickCancel);
-		button->setCallbackUserData(mImplementation);
+		button->setClickedCallback(impl::callbackClickCancel, mImplementation);
 	}
 
 	mImplementation->mOwnerWarning = getString("confirm_invite_owner_str");
diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h
index 9117b83e7d..37135b488a 100644
--- a/indra/newview/llpanelgroupinvite.h
+++ b/indra/newview/llpanelgroupinvite.h
@@ -39,7 +39,7 @@ class LLPanelGroupInvite
 : public LLPanel
 {
 public:
-	LLPanelGroupInvite(const std::string& name, const LLUUID& group_id);
+	LLPanelGroupInvite(const LLUUID& group_id);
 	~LLPanelGroupInvite();
 	
 	void addUsers(std::vector<LLUUID>& agent_ids);
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index 73a9868962..afc5873415 100644
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -42,13 +42,17 @@
 
 #include "llagent.h"
 #include "lliconctrl.h"
+#include "llfloaterreg.h"
 #include "lllineeditor.h"
 #include "llproductinforequest.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
 #include "lltextbox.h"
 #include "lltabcontainer.h"
 #include "lltrans.h"
 #include "lltransactiontypes.h"
+#include "lltrans.h"
 #include "lluictrlfactory.h"
 
 #include "llstatusbar.h"
@@ -80,7 +84,6 @@ public:
 
 	static void clickEarlierCallback(void* data);
 	static void clickLaterCallback(void* data);
-	static void clickTabCallback(void* user_data, bool from_click);
 
 	static LLMap<LLUUID, LLGroupMoneyTabEventHandler*> sInstanceIDs;
 	static std::map<LLPanel*, LLGroupMoneyTabEventHandler*> sTabsToHandlers;
@@ -244,9 +247,9 @@ void LLPanelGroupLandMoney::impl::onMapButton()
 	F64 global_z = gAgent.getPositionGlobal().mdV[VZ];
 
 	LLVector3d pos_global(global_x, global_y, global_z);
-	gFloaterWorldMap->trackLocation(pos_global);
+	LLFloaterWorldMap::getInstance()->trackLocation(pos_global);
 
-	LLFloaterWorldMap::show(NULL, TRUE);
+	LLFloaterReg::showInstance("world_map", "center");
 }
 
 bool LLPanelGroupLandMoney::impl::applyContribution()
@@ -460,15 +463,15 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
 
 			row["columns"][0]["column"] = "name";
 			row["columns"][0]["value"] = name;
-			row["columns"][0]["font"] = "SANSSERIFSMALL";
+			row["columns"][0]["font"] = "SANSSERIF_SMALL";
 
 			row["columns"][1]["column"] = "location";
 			row["columns"][1]["value"] = location;
-			row["columns"][1]["font"] = "SANSSERIFSMALL";
+			row["columns"][1]["font"] = "SANSSERIF_SMALL";
 			
 			row["columns"][2]["column"] = "area";
 			row["columns"][2]["value"] = area;
-			row["columns"][2]["font"] = "SANSSERIFSMALL";
+			row["columns"][2]["font"] = "SANSSERIF_SMALL";
 			
 			row["columns"][3]["column"] = "type";
 			row["columns"][3]["value"] = land_type;
@@ -491,15 +494,14 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
 void* LLPanelGroupLandMoney::createTab(void* data)
 {
 	LLUUID* group_id = static_cast<LLUUID*>(data);
-	return new LLPanelGroupLandMoney("panel group land money", *group_id);
+	return new LLPanelGroupLandMoney(*group_id);
 }
 
 //static
 LLMap<LLUUID, LLPanelGroupLandMoney*> LLPanelGroupLandMoney::sGroupIDs;
 
-LLPanelGroupLandMoney::LLPanelGroupLandMoney(const std::string& name, 
-											 const LLUUID& group_id) :
-	LLPanelGroupTab(name, group_id) 
+LLPanelGroupLandMoney::LLPanelGroupLandMoney(const LLUUID& group_id) :
+	LLPanelGroupTab(group_id) 
 {
 	mImplementationp = new impl(*this, group_id);
 
@@ -634,9 +636,8 @@ BOOL LLPanelGroupLandMoney::postBuild()
 	{
 		LLLineEditor* editor = mImplementationp->mYourContributionEditorp;
 
-	    editor->setCommitCallback(mImplementationp->contributionCommitCallback);
-		editor->setKeystrokeCallback(mImplementationp->contributionKeystrokeCallback);
-		editor->setCallbackUserData(this);
+	    editor->setCommitCallback(mImplementationp->contributionCommitCallback, this);
+		editor->setKeystrokeCallback(mImplementationp->contributionKeystrokeCallback, this);
 	}
 
 	mImplementationp->mMapButtonp = getChild<LLButton>("map_button");
@@ -671,7 +672,7 @@ BOOL LLPanelGroupLandMoney::postBuild()
 	{
 		if ( mImplementationp->mGroupParcelsp )
 		{
-			mImplementationp->mGroupParcelsp->addCommentText(
+			mImplementationp->mGroupParcelsp->setCommentText(
 							mImplementationp->mCantViewParcelsText);
 			mImplementationp->mGroupParcelsp->setEnabled(FALSE);
 		}
@@ -917,8 +918,7 @@ LLGroupMoneyTabEventHandler::LLGroupMoneyTabEventHandler(LLButton* earlier_butto
 
 	if ( tab_containerp && panelp )
 	{
-		tab_containerp->setTabChangeCallback(panelp, clickTabCallback);
-		tab_containerp->setTabUserData(panelp, this);
+		tab_containerp->setCommitCallback(boost::bind(&LLGroupMoneyTabEventHandler::onClickTab, this));
 	}
 
 	sInstanceIDs.addData(mImplementationp->mPanelID, this);
@@ -990,13 +990,6 @@ void LLGroupMoneyTabEventHandler::clickLaterCallback(void* data)
 	if ( selfp ) selfp->onClickLater();
 }
 
-//static
-void LLGroupMoneyTabEventHandler::clickTabCallback(void* data, bool from_click)
-{
-	LLGroupMoneyTabEventHandler* selfp = (LLGroupMoneyTabEventHandler*) data;
-	if ( selfp && from_click ) selfp->onClickTab();
-}
-
 //**************************************************
 //** LLGroupMoneyDetailsTabEventHandler Functions **
 //**************************************************
@@ -1100,7 +1093,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg,
 
 	text.append(1, '\n');
 
-	text.append(llformat("%-24s %6d\n", "Total", total_amount));
+	text.append(llformat("%-24s %6d\n", LLTrans::getString("GroupMoneyTotal").c_str(), total_amount));
 
 	if ( mImplementationp->mTextEditorp )
 	{
@@ -1220,7 +1213,7 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg,
 	S32 transactions = msg->getNumberOfBlocksFast(_PREHASH_HistoryData);
 	if (transactions == 0)
 	{
-		text.append("(none)");
+		text.append(LLTrans::getString("none_text")); 
 	}
 	else
 	{
@@ -1245,22 +1238,22 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg,
 				switch(type)
 				{
 				case TRANS_OBJECT_SALE:
-					verb = "bought";
+					verb = LLTrans::getString("GroupMoneyBought").c_str();
 					break;
 				case TRANS_GIFT:
-					verb = "paid you";
+					verb = LLTrans::getString("GroupMoneyPaidYou").c_str();
 					break;
 				case TRANS_PAY_OBJECT:
-					verb = "paid into";
+					verb = LLTrans::getString("GroupMoneyPaidInto").c_str();
 					break;
 				case TRANS_LAND_PASS_SALE:
-					verb = "bought pass to";
+					verb = LLTrans::getString("GroupMoneyBoughtPassTo").c_str();
 					break;
 				case TRANS_EVENT_FEE:
-					verb = "paid fee for event";
+					verb = LLTrans::getString("GroupMoneyPaidFeeForEvent").c_str();
 					break;
 				case TRANS_EVENT_PRIZE:
-					verb = "paid prize for event";
+					verb = LLTrans::getString("GroupMoneyPaidPrizeForEvent").c_str();
 					break;
 				default:
 					verb = "";
@@ -1420,24 +1413,24 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
 		return;
 	}
 
-	text.append("Summary for this week, beginning on ");
+	text.append(LLTrans::getString("SummaryForTheWeek"));
 	text.append(start_date);
 
 	if (current_interval == 0)
 	{
-		text.append("The next stipend day is ");
+		text.append(LLTrans::getString("NextStipendDay"));
 		text.append(next_stipend_date);
 		text.append("\n\n");
-		text.append(llformat("%-24sL$%6d\n", "Balance", balance ));
+		text.append(llformat("%-24sL$%6d\n", LLTrans::getString("GroupMoneyBalance").c_str(), balance ));
 		text.append(1, '\n');
 	}
 
 	// [DEV-29503] Hide the individual info since
 	// non_exempt_member here is a wrong choice to calculate individual shares.
-	// text.append( "                      Group       Individual Share\n");
-	// text.append(llformat( "%-24s %6d      %6d \n", "Credits", total_credits, (S32)floor((F32)total_credits/(F32)non_exempt_members)));
-	// text.append(llformat( "%-24s %6d      %6d \n", "Debits", total_debits, (S32)floor((F32)total_debits/(F32)non_exempt_members)));
-	// text.append(llformat( "%-24s %6d      %6d \n", "Total", total_credits + total_debits,  (S32)floor((F32)(total_credits + total_debits)/(F32)non_exempt_members)));
+// 	text.append( LLTrans::getString("GroupIndividualShare"));
+// 	text.append(llformat( "%-24s %6d      %6d \n", LLTrans::getString("GroupMoneyCredits").c_str(), total_credits, (S32)floor((F32)total_credits/(F32)non_exempt_members)));
+// 	text.append(llformat( "%-24s %6d      %6d \n", LLTrans::getString("GroupMoneyDebits").c_str(), total_debits, (S32)floor((F32)total_debits/(F32)non_exempt_members)));
+// 	text.append(llformat( "%-24s %6d      %6d \n", LLTrans::getString("GroupMoneyTotal").c_str(), total_credits + total_debits,  (S32)floor((F32)(total_credits + total_debits)/(F32)non_exempt_members)));
 
 	text.append( "                      Group\n");
 	text.append(llformat( "%-24s %6d\n", "Credits", total_credits));
diff --git a/indra/newview/llpanelgrouplandmoney.h b/indra/newview/llpanelgrouplandmoney.h
index 591511a5fb..748485745b 100644
--- a/indra/newview/llpanelgrouplandmoney.h
+++ b/indra/newview/llpanelgrouplandmoney.h
@@ -44,7 +44,7 @@
 class LLPanelGroupLandMoney : public LLPanelGroupTab
 {
 public:
-	LLPanelGroupLandMoney(const std::string& name, const LLUUID& group_id);
+	LLPanelGroupLandMoney(const LLUUID& group_id);
 	virtual ~LLPanelGroupLandMoney();
 	virtual BOOL postBuild();
 	virtual BOOL isVisibleByAgent(LLAgent* agentp);
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 5824df46e2..acf6bc0dd0 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -49,7 +49,9 @@
 #include "lliconctrl.h"
 #include "llcheckboxctrl.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
 #include "lltextbox.h"
+#include "lltrans.h"
 
 #include "roles_constants.h"
 #include "llviewerwindow.h"
@@ -69,7 +71,19 @@
 class LLGroupDropTarget : public LLView
 {
 public:
-	LLGroupDropTarget(const std::string& name, const LLRect& rect, LLPanelGroupNotices* panel, const LLUUID& group_id);
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
+	{
+		Mandatory<LLPanelGroupNotices*> panel;
+		Mandatory<LLUUID>	group_id;
+		Params()
+		:	panel("panel"),
+			group_id("group_id")
+		{
+			mouse_opaque(false);
+			follows.flags(FOLLOWS_ALL);
+		}
+	};
+	LLGroupDropTarget(const Params&);
 	~LLGroupDropTarget() {};
 
 	void doDrop(EDragAndDropType cargo_type, void* cargo_data);
@@ -81,18 +95,21 @@ public:
 								   void* cargo_data,
 								   EAcceptance* accept,
 								   std::string& tooltip_msg);
+	void setPanel (LLPanelGroupNotices* panel) {mGroupNoticesPanel = panel;};
+	void setGroup (LLUUID group) {mGroupID = group;};
+
 protected:
 	LLPanelGroupNotices* mGroupNoticesPanel;
 	LLUUID	mGroupID;
 };
 
-LLGroupDropTarget::LLGroupDropTarget(const std::string& name, const LLRect& rect,
-						   LLPanelGroupNotices* panel, const LLUUID& group_id) :
-	LLView(name, rect, NOT_MOUSE_OPAQUE, FOLLOWS_ALL),
-	mGroupNoticesPanel(panel),
-	mGroupID(group_id)
-{
-}
+static LLRegisterWidget<LLGroupDropTarget> r("group_drop_target");
+
+LLGroupDropTarget::LLGroupDropTarget(const LLGroupDropTarget::Params& p) 
+:	LLView(p),
+	mGroupNoticesPanel(p.panel),
+	mGroupID(p.group_id)
+{}
 
 void LLGroupDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
 {
@@ -179,18 +196,16 @@ std::string build_notice_date(const U32& the_time)
 		time(&t);
 	}
 	
-	tm* lt = localtime(&t);
-	
-	//for some reason, the month is off by 1.  See other uses of
-	//"local" time in the code...
-	std::string buffer = llformat("%04i-%02i-%02i", lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday);
-	
-	return buffer;
+
+	std::string dateStr = LLTrans::getString("GroupNotifyDateStr");
+	LLSD substitution;
+	substitution["datetime"] = (S32) t;
+	LLStringUtil::format (dateStr, substitution);
+	return dateStr;
 }
 
-LLPanelGroupNotices::LLPanelGroupNotices(const std::string& name,
-									const LLUUID& group_id) :
-	LLPanelGroupTab(name,group_id),
+LLPanelGroupNotices::LLPanelGroupNotices(const LLUUID& group_id) :
+	LLPanelGroupTab(group_id),
 	mInventoryItem(NULL),
 	mInventoryOffer(NULL)
 {
@@ -214,7 +229,7 @@ LLPanelGroupNotices::~LLPanelGroupNotices()
 void* LLPanelGroupNotices::createTab(void* data)
 {
 	LLUUID* group_id = static_cast<LLUUID*>(data);
-	return new LLPanelGroupNotices("panel group notices", *group_id);
+	return new LLPanelGroupNotices(*group_id);
 }
 
 BOOL LLPanelGroupNotices::isVisibleByAgent(LLAgent* agentp)
@@ -229,17 +244,14 @@ BOOL LLPanelGroupNotices::postBuild()
 
 	mNoticesList = getChild<LLScrollListCtrl>("notice_list",recurse);
 	mNoticesList->setCommitOnSelectionChange(TRUE);
-	mNoticesList->setCommitCallback(onSelectNotice);
-	mNoticesList->setCallbackUserData(this);
+	mNoticesList->setCommitCallback(onSelectNotice, this);
 
 	mBtnNewMessage = getChild<LLButton>("create_new_notice",recurse);
-	mBtnNewMessage->setClickedCallback(onClickNewMessage);
-	mBtnNewMessage->setCallbackUserData(this);
+	mBtnNewMessage->setClickedCallback(onClickNewMessage, this);
 	mBtnNewMessage->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_NOTICES_SEND));
 
 	mBtnGetPastNotices = getChild<LLButton>("refresh_notices",recurse);
-	mBtnGetPastNotices->setClickedCallback(onClickRefreshNotices);
-	mBtnGetPastNotices->setCallbackUserData(this);
+	mBtnGetPastNotices->setClickedCallback(onClickRefreshNotices, this);
 
 	// Create
 	mCreateSubject = getChild<LLLineEditor>("create_subject",recurse);
@@ -253,12 +265,10 @@ BOOL LLPanelGroupNotices::postBuild()
 	mCreateInventoryIcon->setVisible(FALSE);
 
 	mBtnSendMessage = getChild<LLButton>("send_notice",recurse);
-	mBtnSendMessage->setClickedCallback(onClickSendMessage);
-	mBtnSendMessage->setCallbackUserData(this);
+	mBtnSendMessage->setClickedCallback(onClickSendMessage, this);
 
 	mBtnRemoveAttachment = getChild<LLButton>("remove_attachment",recurse);
-	mBtnRemoveAttachment->setClickedCallback(onClickRemoveAttachment);
-	mBtnRemoveAttachment->setCallbackUserData(this);
+	mBtnRemoveAttachment->setClickedCallback(onClickRemoveAttachment, this);
 	mBtnRemoveAttachment->setEnabled(FALSE);
 
 	// View
@@ -273,24 +283,16 @@ BOOL LLPanelGroupNotices::postBuild()
 	mViewInventoryIcon->setVisible(FALSE);
 
 	mBtnOpenAttachment = getChild<LLButton>("open_attachment",recurse);
-	mBtnOpenAttachment->setClickedCallback(onClickOpenAttachment);
-	mBtnOpenAttachment->setCallbackUserData(this);
+	mBtnOpenAttachment->setClickedCallback(onClickOpenAttachment, this);
 
 	mNoNoticesStr = getString("no_notices_text");
 
 	mPanelCreateNotice = getChild<LLPanel>("panel_create_new_notice",recurse);
 	mPanelViewNotice = getChild<LLPanel>("panel_view_past_notice",recurse);
 
-	// Must be in front of all other UI elements.
-	LLPanel* dtv = getChild<LLPanel>("drop_target",recurse);
-	LLGroupDropTarget* target = new LLGroupDropTarget("drop_target",
-											dtv->getRect(),
-											this, mGroupID);
-	target->setEnabled(TRUE);
-	target->setToolTip(dtv->getToolTip());
-
-	mPanelCreateNotice->addChild(target);
-	mPanelCreateNotice->removeChild(dtv, TRUE);
+	LLGroupDropTarget* target = getChild<LLGroupDropTarget> ("drop_target");
+	target->setPanel (this);
+	target->setGroup (mGroupID);
 
 	arrangeNoticeView(VIEW_PAST_NOTICE);
 
@@ -331,7 +333,7 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item)
 										inv_item->getFlags(),
 										item_is_multi );
 
-	mCreateInventoryIcon->setImage(icon_name);
+	mCreateInventoryIcon->setValue(icon_name);
 	mCreateInventoryIcon->setVisible(TRUE);
 
 	std::stringstream ss;
@@ -466,7 +468,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
 		if (1 == count && id.isNull())
 		{
 			// Only one entry, the dummy entry.
-			mNoticesList->addCommentText(mNoNoticesStr);
+			mNoticesList->setCommentText(mNoNoticesStr);
 			mNoticesList->setEnabled(FALSE);
 			return;
 		}
@@ -554,7 +556,7 @@ void LLPanelGroupNotices::showNotice(const std::string& subject,
 												LLInventoryType::IT_TEXTURE,
 												0, FALSE);
 
-		mViewInventoryIcon->setImage(icon_name);
+		mViewInventoryIcon->setValue(icon_name);
 		mViewInventoryIcon->setVisible(TRUE);
 
 		std::stringstream ss;
diff --git a/indra/newview/llpanelgroupnotices.h b/indra/newview/llpanelgroupnotices.h
index 916032c1b6..a0712f1770 100644
--- a/indra/newview/llpanelgroupnotices.h
+++ b/indra/newview/llpanelgroupnotices.h
@@ -34,7 +34,7 @@
 #define LL_LLPANELGROUPNOTICES_H
 
 #include "llpanelgroup.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llinventory.h"
 
 class LLLineEditor;
@@ -47,7 +47,7 @@ class LLScrollListCtrl;
 class LLPanelGroupNotices : public LLPanelGroupTab
 {
 public:
-	LLPanelGroupNotices(const std::string& name, const LLUUID& group_id);
+	LLPanelGroupNotices(const LLUUID& group_id);
 	virtual ~LLPanelGroupNotices();
 
 	// LLPanelGroupTab
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 6e65181f99..1f50d2ef04 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -44,6 +44,8 @@
 #include "llnotify.h"
 #include "llpanelgrouproles.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
 #include "lltabcontainer.h"
 #include "lltextbox.h"
 #include "lltexteditor.h"
@@ -109,11 +111,11 @@ bool agentCanAddToRole(const LLUUID& group_id,
 void* LLPanelGroupRoles::createTab(void* data)
 {
 	LLUUID* group_id = static_cast<LLUUID*>(data);
-	return new LLPanelGroupRoles("panel group roles", *group_id);
+	return new LLPanelGroupRoles(*group_id);
 }
 
-LLPanelGroupRoles::LLPanelGroupRoles(const std::string& name, const LLUUID& group_id)
-:	LLPanelGroupTab(name, group_id),
+LLPanelGroupRoles::LLPanelGroupRoles(const LLUUID& group_id)
+:	LLPanelGroupTab(group_id),
 	mCurrentTab(NULL),
 	mRequestedTab( NULL ),
 	mSubTabContainer( NULL ),
@@ -148,8 +150,7 @@ BOOL LLPanelGroupRoles::postBuild()
 		LLPanelGroupSubTab* subtabp = (LLPanelGroupSubTab*) mSubTabContainer->getPanelByIndex(i);
 
 		// Add click callbacks to all the tabs.
-		mSubTabContainer->setTabChangeCallback(subtabp, onClickSubTab);
-		mSubTabContainer->setTabUserData(subtabp, this);
+		mSubTabContainer->setCommitCallback(boost::bind(&LLPanelGroupRoles::handleClickSubTab, this));
 
 		// Hand the subtab a pointer to this LLPanelGroupRoles, so that it can
 		// look around for the widgets it is interested in.
@@ -198,13 +199,6 @@ BOOL LLPanelGroupRoles::isVisibleByAgent(LLAgent* agentp)
 								   
 }
 
-// static
-void LLPanelGroupRoles::onClickSubTab(void* user_data, bool from_click)
-{
-	LLPanelGroupRoles* self = static_cast<LLPanelGroupRoles*>(user_data);
-	self->handleClickSubTab();
-}
-
 void LLPanelGroupRoles::handleClickSubTab()
 {
 	// If we are already handling a transition,
@@ -474,8 +468,8 @@ void LLPanelGroupRoles::tabChanged()
 ////////////////////////////
 // LLPanelGroupSubTab
 ////////////////////////////
-LLPanelGroupSubTab::LLPanelGroupSubTab(const std::string& name, const LLUUID& group_id)
-:	LLPanelGroupTab(name, group_id),
+LLPanelGroupSubTab::LLPanelGroupSubTab(const LLUUID& group_id)
+:	LLPanelGroupTab(group_id),
 	mHeader(NULL),
 	mFooter(NULL),
 	mSearchLineEditor(NULL),
@@ -495,47 +489,36 @@ BOOL LLPanelGroupSubTab::postBuild()
 	mSearchLineEditor = getChild<LLLineEditor>("search_text", recurse);
 
 	if (!mSearchLineEditor) return FALSE;
-	mSearchLineEditor->setKeystrokeCallback(onSearchKeystroke);
-	mSearchLineEditor->setCallbackUserData(this);
+	mSearchLineEditor->setKeystrokeCallback(onSearchKeystroke, this);
 
 	mSearchButton = getChild<LLButton>("search_button", recurse);
 
 	if (!mSearchButton) return FALSE;
-	mSearchButton->setClickedCallback(onClickSearch);
-	mSearchButton->setCallbackUserData(this);
+	mSearchButton->setClickedCallback(onClickSearch, this);
 	mSearchButton->setEnabled(FALSE);
 
 	mShowAllButton = getChild<LLButton>("show_all_button", recurse);
 
 	if (!mShowAllButton) return FALSE;
-	mShowAllButton->setClickedCallback(onClickShowAll);
-	mShowAllButton->setCallbackUserData(this);
+	mShowAllButton->setClickedCallback(onClickShowAll, this);
 	mShowAllButton->setEnabled(FALSE);
 	
 	// Get icons for later use.
 	mActionIcons.clear();
 
-	bool no_recurse = false;
-
-	LLIconCtrl* icon = getChild<LLIconCtrl>("power_folder_icon",no_recurse);
-	if (icon && !icon->getImageName().empty())
+	if (hasString("power_folder_icon"))
 	{
-		mActionIcons["folder"] = icon->getImageName();
-		removeChild(icon, TRUE);
+		mActionIcons["folder"] = getString("power_folder_icon");
 	}
 
-	icon = getChild<LLIconCtrl>("power_all_have_icon",no_recurse);
-	if (icon && !icon->getImageName().empty())
+	if (hasString("power_all_have_icon"))
 	{
-		mActionIcons["full"] = icon->getImageName();
-		removeChild(icon, TRUE);
+		mActionIcons["full"] = getString("power_all_have_icon");
 	}
 
-	icon = getChild<LLIconCtrl>("power_partial_icon",no_recurse);
-	if (icon && !icon->getImageName().empty())
+	if (hasString("power_partial_icon"))
 	{
-		mActionIcons["partial"] = icon->getImageName();
-		removeChild(icon, TRUE);
+		mActionIcons["partial"] = getString("power_partial_icon");
 	}
 
 	return LLPanelGroupTab::postBuild();
@@ -663,7 +646,7 @@ void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,
 										  U64 allowed_by_some, 
 										  U64 allowed_by_all,
 										  icon_map_t& icons,
-										  void (*commit_callback)(LLUICtrl*,void*),
+										  LLUICtrl::commit_callback_t commit_callback,
 										  BOOL show_all,
 										  BOOL filter,
 										  BOOL is_owner_role)
@@ -696,7 +679,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
 											 U64 allowed_by_all,
 											 LLRoleActionSet* action_set,
 											 icon_map_t& icons,
-											 void (*commit_callback)(LLUICtrl*,void*),
+											 LLUICtrl::commit_callback_t commit_callback,
 											 BOOL show_all,
 											 BOOL filter,
 											 BOOL is_owner_role)
@@ -718,7 +701,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
 
 		row["columns"][1]["column"] = "action";
 		row["columns"][1]["value"] = action_set->mActionSetData->mName;
-		row["columns"][1]["font-style"] = "BOLD";
+		row["columns"][1]["font"]["style"] = "BOLD";
 
 		LLScrollListItem* title_row = ctrl->addElement(row, ADD_BOTTOM, action_set->mActionSetData);
 
@@ -799,7 +782,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
 
 			row["columns"][column_index]["column"] = "action";
 			row["columns"][column_index]["value"] = (*ra_it)->mDescription;
-			row["columns"][column_index]["font"] = "SANSSERIFSMALL";
+			row["columns"][column_index]["font"] = "SANSSERIF_SMALL";
 
 			LLScrollListItem* item = ctrl->addElement(row, ADD_BOTTOM, (*ra_it));
 
@@ -810,7 +793,6 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
 				LLCheckBoxCtrl* check = check_cell->getCheckBox();
 				check->setEnabled(can_change_actions);
 				check->setCommitCallback(commit_callback);
-				check->setCallbackUserData(ctrl->getCallbackUserData());
 				check->setToolTip( check->getLabel() );
 
 				if (show_all)
@@ -864,11 +846,11 @@ void LLPanelGroupSubTab::setFooterEnabled(BOOL enable)
 void* LLPanelGroupMembersSubTab::createTab(void* data)
 {
 	LLUUID* group_id = static_cast<LLUUID*>(data);
-	return new LLPanelGroupMembersSubTab("panel group members sub tab", *group_id);
+	return new LLPanelGroupMembersSubTab(*group_id);
 }
 
-LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab(const std::string& name, const LLUUID& group_id)
-: 	LLPanelGroupSubTab(name, group_id),
+LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab(const LLUUID& group_id)
+: 	LLPanelGroupSubTab(group_id),
 	mMembersList(NULL),
 	mAssignedRolesList(NULL),
 	mAllowedActionsList(NULL),
@@ -900,25 +882,22 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
 	if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList) return FALSE;
 
 	// We want to be notified whenever a member is selected.
-	mMembersList->setCallbackUserData(this);
 	mMembersList->setCommitOnSelectionChange(TRUE);
-	mMembersList->setCommitCallback(onMemberSelect);
+	mMembersList->setCommitCallback(onMemberSelect, this);
 	// Show the member's profile on double click.
-	mMembersList->setDoubleClickCallback(onMemberDoubleClick);
+	mMembersList->setDoubleClickCallback(onMemberDoubleClick, this);
 
 	LLButton* button = parent->getChild<LLButton>("member_invite", recurse);
 	if ( button )
 	{
-		button->setClickedCallback(onInviteMember);
-		button->setCallbackUserData(this);
+		button->setClickedCallback(onInviteMember, this);
 		button->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_INVITE));
 	}
 
 	mEjectBtn = parent->getChild<LLButton>("member_eject", recurse);
 	if ( mEjectBtn )
 	{
-		mEjectBtn->setClickedCallback(onEjectMembers);
-		mEjectBtn->setCallbackUserData(this);
+		mEjectBtn->setClickedCallback(onEjectMembers, this);
 		mEjectBtn->setEnabled(FALSE);
 	}
 
@@ -1097,8 +1076,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
 				// Extract the checkbox that was created.
 				LLScrollListCheck* check_cell = (LLScrollListCheck*) item->getColumn(0);
 				LLCheckBoxCtrl* check = check_cell->getCheckBox();
-				check->setCommitCallback(onRoleCheck);
-				check->setCallbackUserData(this);
+				check->setCommitCallback(onRoleCheck, this);
 				check->set( count > 0 );
 				check->setTentative(
 					(0 != count)
@@ -1628,7 +1606,7 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
 			retrieved << "Retrieving role member mappings...";
 		}
 		mMembersList->setEnabled(FALSE);
-		mMembersList->addCommentText(retrieved.str());
+		mMembersList->setCommentText(retrieved.str());
 	}
 }
 
@@ -1691,7 +1669,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
 
 			row["columns"][2]["column"] = "online";
 			row["columns"][2]["value"] = mMemberProgress->second->getOnlineStatus();
-			row["columns"][2]["font"] = "SANSSERIFSMALL";
+			row["columns"][2]["font"] = "SANSSERIF_SMALL";
 
 			mMembersList->addElement(row);//, ADD_SORTED);
 			mHasMatch = TRUE;
@@ -1707,7 +1685,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
 		else
 		{
 			mMembersList->setEnabled(FALSE);
-			mMembersList->addCommentText(std::string("No match."));
+			mMembersList->setCommentText(std::string("No match."));
 		}
 	}
 	else
@@ -1729,11 +1707,11 @@ void LLPanelGroupMembersSubTab::updateMembers()
 void* LLPanelGroupRolesSubTab::createTab(void* data)
 {
 	LLUUID* group_id = static_cast<LLUUID*>(data);
-	return new LLPanelGroupRolesSubTab("panel group roles sub tab", *group_id);
+	return new LLPanelGroupRolesSubTab(*group_id);
 }
 
-LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab(const std::string& name, const LLUUID& group_id)
-: LLPanelGroupSubTab(name, group_id), mHasRoleChange(FALSE)
+LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab(const LLUUID& group_id)
+: LLPanelGroupSubTab(group_id), mHasRoleChange(FALSE)
 {
 }
 
@@ -1775,8 +1753,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
 		parent->getChild<LLButton>("role_create", recurse);
 	if ( mCreateRoleButton )
 	{
-		mCreateRoleButton->setCallbackUserData(this);
-		mCreateRoleButton->setClickedCallback(onCreateRole);
+		mCreateRoleButton->setClickedCallback(onCreateRole, this);
 		mCreateRoleButton->setEnabled(FALSE);
 	}
 	
@@ -1784,32 +1761,25 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
 		parent->getChild<LLButton>("role_delete", recurse);
 	if ( mDeleteRoleButton )
 	{
-		mDeleteRoleButton->setCallbackUserData(this);
-		mDeleteRoleButton->setClickedCallback(onDeleteRole);
+		mDeleteRoleButton->setClickedCallback(onDeleteRole, this);
 		mDeleteRoleButton->setEnabled(FALSE);
 	}
 
 	mRolesList->setCommitOnSelectionChange(TRUE);
-	mRolesList->setCallbackUserData(this);
-	mRolesList->setCommitCallback(onRoleSelect);
+	mRolesList->setCommitCallback(onRoleSelect, this);
 
-	mMemberVisibleCheck->setCallbackUserData(this);
-	mMemberVisibleCheck->setCommitCallback(onMemberVisibilityChange);
+	mMemberVisibleCheck->setCommitCallback(onMemberVisibilityChange, this);
 
 	mAllowedActionsList->setCommitOnSelectionChange(TRUE);
-	mAllowedActionsList->setCallbackUserData(this);
 
 	mRoleName->setCommitOnFocusLost(TRUE);
-	mRoleName->setCallbackUserData(this);
-	mRoleName->setKeystrokeCallback(onPropertiesKey);
+	mRoleName->setKeystrokeCallback(onPropertiesKey, this);
 
 	mRoleTitle->setCommitOnFocusLost(TRUE);
-	mRoleTitle->setCallbackUserData(this);
-	mRoleTitle->setKeystrokeCallback(onPropertiesKey);
+	mRoleTitle->setKeystrokeCallback(onPropertiesKey, this);
 
 	mRoleDescription->setCommitOnFocusLost(TRUE);
-	mRoleDescription->setCallbackUserData(this);
-	mRoleDescription->setCommitCallback(onDescriptionCommit);
+	mRoleDescription->setCommitCallback(onDescriptionCommit, this);
 	mRoleDescription->setFocusReceivedCallback(onDescriptionFocus, this);
 
 	setFooterEnabled(FALSE);
@@ -2060,7 +2030,7 @@ void LLPanelGroupRolesSubTab::handleRoleSelect()
 						 rd.mRolePowers,
 						 0LL,
 						 mActionIcons,
-						 onActionCheck,
+						 boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false),
 						 TRUE,
 						 FALSE,
 						 is_owner_role);
@@ -2157,24 +2127,18 @@ void LLPanelGroupRolesSubTab::buildMembersList()
 	}
 }
 
-// static
-void LLPanelGroupRolesSubTab::onActionCheck(LLUICtrl* ctrl, void* user_data)
-{
-	LLPanelGroupRolesSubTab* self = static_cast<LLPanelGroupRolesSubTab*>(user_data);
-	LLCheckBoxCtrl* check = static_cast<LLCheckBoxCtrl*>(ctrl);
-	if (!check || !self) return;
-
-	self->handleActionCheck(check);
-}
-
 struct ActionCBData
 {
 	LLPanelGroupRolesSubTab*	mSelf;
 	LLCheckBoxCtrl* 			mCheck;
 };
 
-void LLPanelGroupRolesSubTab::handleActionCheck(LLCheckBoxCtrl* check, bool force)
+void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
 {
+	LLCheckBoxCtrl* check = dynamic_cast<LLCheckBoxCtrl*>(ctrl);
+	if (!check)
+		return;
+	
 	lldebugs << "LLPanelGroupRolesSubTab::handleActionSelect()" << llendl;
 
 	LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
@@ -2442,11 +2406,11 @@ void LLPanelGroupRolesSubTab::saveRoleChanges()
 void* LLPanelGroupActionsSubTab::createTab(void* data)
 {
 	LLUUID* group_id = static_cast<LLUUID*>(data);
-	return new LLPanelGroupActionsSubTab("panel group actions sub tab", *group_id);
+	return new LLPanelGroupActionsSubTab(*group_id);
 }
 
-LLPanelGroupActionsSubTab::LLPanelGroupActionsSubTab(const std::string& name, const LLUUID& group_id)
-: LLPanelGroupSubTab(name, group_id)
+LLPanelGroupActionsSubTab::LLPanelGroupActionsSubTab(const LLUUID& group_id)
+: LLPanelGroupSubTab(group_id)
 {
 }
 
@@ -2472,12 +2436,8 @@ BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root)
 
 	if (!mActionList || !mActionDescription || !mActionRoles || !mActionMembers) return FALSE;
 
-	mActionList->setCallbackUserData(this);
 	mActionList->setCommitOnSelectionChange(TRUE);
-	mActionList->setCommitCallback(onActionSelect);
-
-	mActionMembers->setCallbackUserData(this);
-	mActionRoles->setCallbackUserData(this);
+	mActionList->setCommitCallback(boost::bind(&LLPanelGroupActionsSubTab::handleActionSelect, this));
 
 	update(GC_ALL);
 
@@ -2537,13 +2497,6 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc)
 					 FALSE);
 }
 
-// static 
-void LLPanelGroupActionsSubTab::onActionSelect(LLUICtrl* scroll, void* data)
-{
-	LLPanelGroupActionsSubTab* self = static_cast<LLPanelGroupActionsSubTab*>(data);
-	self->handleActionSelect();
-}
-
 void LLPanelGroupActionsSubTab::handleActionSelect()
 {
 	mActionMembers->deleteAllItems();
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 95057bbfaf..8290a81ff4 100644
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -52,7 +52,7 @@ class LLPanelGroupRoles : public LLPanelGroupTab,
 						  public LLPanelGroupTabObserver
 {
 public:
-	LLPanelGroupRoles(const std::string& name, const LLUUID& group_id);
+	LLPanelGroupRoles(const LLUUID& group_id);
 	virtual ~LLPanelGroupRoles();
 
 	// Allow sub tabs to ask for sibling controls.
@@ -64,7 +64,6 @@ public:
 	virtual BOOL isVisibleByAgent(LLAgent* agentp);
 
 	static void* createTab(void* data);
-	static void onClickSubTab(void*,bool);
 	void handleClickSubTab();
 
 	// Checks if the current tab needs to be applied, and tries to switch to the requested tab.
@@ -104,7 +103,7 @@ protected:
 class LLPanelGroupSubTab : public LLPanelGroupTab
 {
 public:
-	LLPanelGroupSubTab(const std::string& name, const LLUUID& group_id);
+	LLPanelGroupSubTab(const LLUUID& group_id);
 	virtual ~LLPanelGroupSubTab();
 
 	virtual BOOL postBuild();
@@ -131,7 +130,7 @@ public:
 								 U64 allowed_by_some,
 								 U64 allowed_by_all,
 								 icon_map_t& icons,
-								 void (*commit_callback)(LLUICtrl*,void*),
+						  		 LLUICtrl::commit_callback_t commit_callback,
 								 BOOL show_all,
 								 BOOL filter,
 								 BOOL is_owner_role);
@@ -140,7 +139,7 @@ public:
 									U64 allowed_by_all,
 									LLRoleActionSet* action_set,
 									icon_map_t& icons,
-									void (*commit_callback)(LLUICtrl*,void*),
+									LLUICtrl::commit_callback_t commit_callback,
 									BOOL show_all,
 									BOOL filter,
 									BOOL is_owner_role);
@@ -164,7 +163,7 @@ protected:
 class LLPanelGroupMembersSubTab : public LLPanelGroupSubTab
 {
 public:
-	LLPanelGroupMembersSubTab(const std::string& name, const LLUUID& group_id);
+	LLPanelGroupMembersSubTab(const LLUUID& group_id);
 	virtual ~LLPanelGroupMembersSubTab();
 
 	virtual BOOL postBuildSubTab(LLView* root);
@@ -229,7 +228,7 @@ protected:
 class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab
 {
 public:
-	LLPanelGroupRolesSubTab(const std::string& name, const LLUUID& group_id);
+	LLPanelGroupRolesSubTab(const LLUUID& group_id);
 	virtual ~LLPanelGroupRolesSubTab();
 
 	virtual BOOL postBuildSubTab(LLView* root);
@@ -249,7 +248,6 @@ public:
 	void buildMembersList();
 
 	static void onActionCheck(LLUICtrl*, void*);
-	void handleActionCheck(LLCheckBoxCtrl*, bool force=false);
 	bool addActionCB(const LLSD& notification, const LLSD& response, LLCheckBoxCtrl* check);
 
 	static void onPropertiesKey(LLLineEditor*, void*);
@@ -268,10 +266,8 @@ public:
 
 	void saveRoleChanges();
 protected:
-	LLSD createRoleItem(const LLUUID& role_id, 
-								 std::string name, 
-								 std::string title, 
-								 S32 members);
+	void handleActionCheck(LLUICtrl* ctrl, bool force);
+	LLSD createRoleItem(const LLUUID& role_id, std::string name, std::string title, S32 members);
 
 	LLScrollListCtrl* mRolesList;
 	LLNameListCtrl* mAssignedMembersList;
@@ -293,7 +289,7 @@ protected:
 class LLPanelGroupActionsSubTab : public LLPanelGroupSubTab
 {
 public:
-	LLPanelGroupActionsSubTab(const std::string& name, const LLUUID& group_id);
+	LLPanelGroupActionsSubTab(const LLUUID& group_id);
 	virtual ~LLPanelGroupActionsSubTab();
 
 	virtual BOOL postBuildSubTab(LLView* root);
@@ -306,7 +302,6 @@ public:
 	virtual bool apply(std::string& mesg);
 	virtual void update(LLGroupChange gc);
 
-	static void onActionSelect(LLUICtrl*, void*);
 	void handleActionSelect();
 protected:
 	LLScrollListCtrl*	mActionList;
diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp
index 8bb100d335..92fe082ef2 100644
--- a/indra/newview/llpanelland.cpp
+++ b/indra/newview/llpanelland.cpp
@@ -79,8 +79,8 @@ BOOL	LLPanelLandInfo::postBuild()
 //
 // Methods
 //
-LLPanelLandInfo::LLPanelLandInfo(const std::string& name)
-:	LLPanel(name),
+LLPanelLandInfo::LLPanelLandInfo()
+:	LLPanel(),
 	mCheckShowOwners(NULL)
 {
 	if (!sInstance)
diff --git a/indra/newview/llpanelland.h b/indra/newview/llpanelland.h
index 9a7e977711..92fe313405 100644
--- a/indra/newview/llpanelland.h
+++ b/indra/newview/llpanelland.h
@@ -46,7 +46,7 @@ class LLPanelLandInfo
 :	public LLPanel
 {
 public:
-	LLPanelLandInfo(const std::string& name);
+	LLPanelLandInfo();
 	virtual ~LLPanelLandInfo();
 
 	void refresh();
diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp
index b8886c9493..d1ab3510cd 100644
--- a/indra/newview/llpanellandmedia.cpp
+++ b/indra/newview/llpanellandmedia.cpp
@@ -60,8 +60,7 @@
 //---------------------------------------------------------------------------
 
 LLPanelLandMedia::LLPanelLandMedia(LLParcelSelectionHandle& parcel)
-:	LLPanel(std::string("land_media_panel")),
-
+:	LLPanel(),
 	mParcel(parcel),
 	mCheckSoundLocal(NULL),
 	mSoundHelpButton(NULL),
@@ -118,8 +117,7 @@ BOOL LLPanelLandMedia::postBuild()
 	childSetCommitCallback("music_url", onCommitAny, this);
 
 	mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture");
-	mMediaTextureCtrl->setCommitCallback( onCommitAny );
-	mMediaTextureCtrl->setCallbackUserData( this );
+	mMediaTextureCtrl->setCommitCallback( onCommitAny, this );
 	mMediaTextureCtrl->setAllowNoTexture ( TRUE );
 	mMediaTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
 	mMediaTextureCtrl->setNonImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index bc5e8f2482..671d3264bb 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -50,7 +50,6 @@
 #include "llcurl.h"
 #include "llviewercontrol.h"
 #include "llfloaterabout.h"
-#include "llfloatertest.h"
 #include "llfloaterpreference.h"
 #include "llfocusmgr.h"
 #include "lllineeditor.h"
@@ -70,12 +69,12 @@
 #include "llhttpclient.h"
 #include "llweb.h"
 #include "llwebbrowserctrl.h"
-
+#include "llfloateruipreview.h"
 #include "llfloaterhtml.h"
 
 #include "llfloaterhtmlhelp.h"
 #include "llfloatertos.h"
-
+#include "lltrans.h"
 #include "llglheaders.h"
 
 #define USE_VIEWER_AUTH 0
@@ -166,7 +165,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
 						 BOOL show_server,
 						 void (*callback)(S32 option, void* user_data),
 						 void *cb_data)
-:	LLPanel(std::string("panel_login"), LLRect(0,600,800,0), FALSE),		// not bordered
+:	LLPanel(),
 	mLogoImage(),
 	mCallback(callback),
 	mCallbackData(cb_data),
@@ -190,7 +189,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
 	LLPanelLogin::sInstance = this;
 
 	// add to front so we are the bottom-most child
-	gViewerWindow->getRootView()->addChildAtEnd(this);
+	gViewerWindow->getRootView()->addChildInBack(this);
 
 	// Logo
 	mLogoImage = LLUI::getUIImage("startup_logo.j2c");
@@ -207,9 +206,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
 	childSetPrevalidate("first_name_edit", LLLineEditor::prevalidatePrintableNoSpace);
 	childSetPrevalidate("last_name_edit", LLLineEditor::prevalidatePrintableNoSpace);
 
-	childSetCommitCallback("password_edit", mungePassword);
-	childSetKeystrokeCallback("password_edit", onPassKey, this);
-	childSetUserData("password_edit", this);
+	childSetCommitCallback("password_edit", mungePassword, this);
+	getChild<LLLineEditor>("password_edit")->setKeystrokeCallback(onPassKey, this);
 
 	// change z sort of clickable text to be behind buttons
 	sendChildToBack(getChildView("channel_text"));
@@ -219,14 +217,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
 	if (edit) edit->setDrawAsterixes(TRUE);
 
 	LLComboBox* combo = getChild<LLComboBox>("start_location_combo");
-	combo->setAllowTextEntry(TRUE, 128, FALSE);
-
-	// The XML file loads the combo with the following labels:
-	// 0 - "My Home"
-	// 1 - "My Last Location"
-	// 2 - "<Type region name>"
 
-	BOOL login_last = gSavedSettings.getBOOL("LoginLastLocation");
 	std::string sim_string = LLURLSimString::sInstance.mSimString;
 	if (!sim_string.empty())
 	{
@@ -236,19 +227,11 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
 		combo->setTextEntry(sim_string);
 		combo->setCurrentByIndex( 2 );
 	}
-	else if (login_last)
-	{
-		combo->setCurrentByIndex( 1 );
-	}
-	else
-	{
-		combo->setCurrentByIndex( 0 );
-	}
 
-	combo->setCommitCallback( &set_start_location );
+	combo->setCommitCallback( &set_start_location, NULL );
 
 	LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo");
-	server_choice_combo->setCommitCallback(onSelectServer);
+	server_choice_combo->setCommitCallback(onSelectServer, NULL);
 	server_choice_combo->setFocusLostCallback(onServerComboLostFocus);
 
 	childSetAction("connect_btn", onClickConnect, this);
@@ -266,14 +249,13 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
 	LLTextBox* channel_text = getChild<LLTextBox>("channel_text");
 	channel_text->setTextArg("[CHANNEL]", channel); // though not displayed
 	channel_text->setTextArg("[VERSION]", version);
-	channel_text->setClickedCallback(onClickVersion);
-	channel_text->setCallbackUserData(this);
+	channel_text->setClickedCallback(onClickVersion, this);
 	
 	LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text");
-	forgot_password_text->setClickedCallback(onClickForgotPassword);
+	forgot_password_text->setClickedCallback(onClickForgotPassword, NULL);
 
 	LLTextBox* create_new_account_text = getChild<LLTextBox>("create_new_account_text");
-	create_new_account_text->setClickedCallback(onClickNewAccount);
+	create_new_account_text->setClickedCallback(onClickNewAccount, NULL);
 #endif    
 	
 	// get the web browser control
@@ -432,16 +414,13 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask)
 		return TRUE;
 	}
 
-	if (('P' == key) && (MASK_CONTROL == mask))
-	{
-		LLFloaterPreference::show(NULL);
-		return TRUE;
-	}
-
 	if (('T' == key) && (MASK_CONTROL == mask))
-	{
-		new LLFloaterSimple("floater_test.xml");
-		return TRUE;
+	{	// previously was "Test Floater"
+		if(gSavedSettings.getBOOL("QAMode"))
+		{
+			LLFloaterUIPreview::showInstance();
+			return TRUE;
+		}
 	}
 	
 	if ( KEY_F1 == key )
@@ -656,19 +635,6 @@ void LLPanelLogin::refreshLocation( bool force_visible )
 #if USE_VIEWER_AUTH
 	loadLoginPage();
 #else
-	LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo");
-
-	if (LLURLSimString::parse())
-	{
-		combo->setCurrentByIndex( 3 );		// BUG?  Maybe 2?
-		combo->setTextEntry(LLURLSimString::sInstance.mSimString);
-	}
-	else
-	{
-		BOOL login_last = gSavedSettings.getBOOL("LoginLastLocation");
-		combo->setCurrentByIndex( login_last ? 1 : 0 );
-	}
-
 	BOOL show_start = TRUE;
 
 	if ( ! force_visible )
@@ -688,7 +654,7 @@ void LLPanelLogin::refreshLocation( bool force_visible )
 }
 
 // static
-void LLPanelLogin::close()
+void LLPanelLogin::closePanel()
 {
 	if (sInstance)
 	{
@@ -787,14 +753,7 @@ void LLPanelLogin::loadLoginPage()
 	}
 	else
 	{
-		if (gSavedSettings.getBOOL("LoginLastLocation"))
-		{
-			location = "last";
-		}
-		else
-		{
-			location = "home";
-		}
+		location = gSavedSettings.getString("LoginLocation");
 	}
 	
 	std::string firstname, lastname;
@@ -899,13 +858,12 @@ void LLPanelLogin::onClickConnect(void *)
 		}
 		else
 		{
-			LLNotifications::instance().add("MustHaveAccountToLogIn", LLSD(), LLSD(),
-										LLPanelLogin::newAccountAlertCallback);
+			LLNotifications::instance().add("MustHaveAccountToLogIn");
 		}
 	}
 }
 
-
+/*
 // static
 bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& response)
 {
@@ -913,7 +871,7 @@ bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD&
 	if (0 == option)
 	{
 		llinfos << "Going to account creation URL" << llendl;
-		LLWeb::loadURLExternal( CREATE_ACCOUNT_URL );
+		LLWeb::loadURLExternal( LLNotifications::instance().getGlobalString("CREATE_ACCOUNT_URL")); 
 	}
 	else
 	{
@@ -921,12 +879,12 @@ bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD&
 	}
 	return false;
 }
-
+*/
 
 // static
 void LLPanelLogin::onClickNewAccount(void*)
 {
-	LLWeb::loadURLExternal( CREATE_ACCOUNT_URL );
+	LLWeb::loadURLExternal(sInstance->getString("create_account_url"));
 }
 
 
@@ -949,7 +907,7 @@ void LLPanelLogin::onClickQuit(void*)
 // static
 void LLPanelLogin::onClickVersion(void*)
 {
-	LLFloaterAbout::show(NULL);
+	LLFloaterAbout::showInstance();
 }
 
 //static
@@ -1023,6 +981,8 @@ void LLPanelLogin::onSelectServer(LLUICtrl*, void*)
 
 void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*)
 {
+	if (!sInstance) return;
+
 	LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");
 	if(fe == combo)
 	{
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 47d42da7f1..540f938053 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -34,7 +34,7 @@
 #define LL_LLPANELLOGIN_H
 
 #include "llpanel.h"
-#include "llmemory.h"			// LLPointer<>
+#include "llpointer.h"			// LLPointer<>
 #include "llwebbrowserctrl.h"	// LLWebBrowserCtrlObserver
 
 class LLUIImage;
@@ -72,7 +72,7 @@ public:
 	static BOOL isGridComboDirty();
 	static void getLocation(std::string &location);
 
-	static void close();
+	static void closePanel();
 
 	void setSiteIsAlive( bool alive );
 
@@ -84,7 +84,7 @@ public:
 private:
 	static void onClickConnect(void*);
 	static void onClickNewAccount(void*);
-	static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response);
+//	static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response);
 	static void onClickQuit(void*);
 	static void onClickVersion(void*);
 	virtual void onNavigateComplete( const EventType& eventIn );
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 75f479c16f..9ec9874384 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -52,7 +52,6 @@
 #include "llcombobox.h"
 #include "llfocusmgr.h"
 #include "llmanipscale.h"
-#include "llpanelinventory.h"
 #include "llpreviewscript.h"
 #include "llresmgr.h"
 #include "llselectmgr.h"
@@ -62,6 +61,7 @@
 #include "lltool.h"
 #include "lltoolcomp.h"
 #include "lltoolmgr.h"
+#include "lltrans.h"
 #include "llui.h"
 #include "llviewerobject.h"
 #include "llviewerregion.h"
@@ -99,13 +99,23 @@ enum {
 	MI_HOLE_COUNT
 };
 
-//*TODO:translate (depricated, so very low priority)
-static const std::string LEGACY_FULLBRIGHT_DESC("Fullbright (Legacy)");
+//static const std::string LEGACY_FULLBRIGHT_DESC =LLTrans::getString("Fullbright");
 
 BOOL	LLPanelObject::postBuild()
 {
 	setMouseOpaque(FALSE);
-
+	
+	std::map<std::string, std::string> material_name_map;
+	material_name_map["Stone"]= LLTrans::getString("Stone");
+	material_name_map["Metal"]= LLTrans::getString("Metal");	
+	material_name_map["Glass"]= LLTrans::getString("Glass");	
+	material_name_map["Wood"]= LLTrans::getString("Wood");	
+	material_name_map["Flesh"]= LLTrans::getString("Flesh");
+	material_name_map["Plastic"]= LLTrans::getString("Plastic");
+	material_name_map["Rubber"]= LLTrans::getString("Rubber");	
+	material_name_map["Light"]= LLTrans::getString("Light");		
+	
+	LLMaterialTable::basic.initTableTransNames(material_name_map);
 	//--------------------------------------------------------
 	// Top
 	//--------------------------------------------------------
@@ -164,14 +174,14 @@ BOOL	LLPanelObject::postBuild()
 	mComboMaterial = getChild<LLComboBox>("material");
 	childSetCommitCallback("material",onCommitMaterial,this);
 	mComboMaterial->removeall();
-	// *TODO:translate
+
 	for (LLMaterialTable::info_list_t::iterator iter = LLMaterialTable::basic.mMaterialInfoList.begin();
 		 iter != LLMaterialTable::basic.mMaterialInfoList.end(); ++iter)
 	{
 		LLMaterialInfo* minfop = *iter;
 		if (minfop->mMCode != LL_MCODE_LIGHT)
 		{
-			mComboMaterial->add(minfop->mName);
+			mComboMaterial->add(minfop->mName);  
 		}
 	}
 	mComboMaterialItemCount = mComboMaterial->getItemCount();
@@ -263,11 +273,10 @@ BOOL	LLPanelObject::postBuild()
 	if (mCtrlSculptTexture)
 	{
 		mCtrlSculptTexture->setDefaultImageAssetID(LLUUID(SCULPT_DEFAULT_TEXTURE));
-		mCtrlSculptTexture->setCommitCallback( LLPanelObject::onCommitSculpt );
-		mCtrlSculptTexture->setOnCancelCallback( LLPanelObject::onCancelSculpt );
-		mCtrlSculptTexture->setOnSelectCallback( LLPanelObject::onSelectSculpt );
-		mCtrlSculptTexture->setDropCallback(LLPanelObject::onDropSculpt);
-		mCtrlSculptTexture->setCallbackUserData( this );
+		mCtrlSculptTexture->setCommitCallback( boost::bind(&LLPanelObject::onCommitSculpt, this, _2 ));
+		mCtrlSculptTexture->setOnCancelCallback( boost::bind(&LLPanelObject::onCancelSculpt, this, _2 ));
+		mCtrlSculptTexture->setOnSelectCallback( boost::bind(&LLPanelObject::onSelectSculpt, this, _2 ));
+		mCtrlSculptTexture->setDropCallback( boost::bind(&LLPanelObject::onDropSculpt, this, _2 ));
 		// Don't allow (no copy) or (no transfer) textures to be selected during immediate mode
 		mCtrlSculptTexture->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
 		// Allow any texture to be used during non-immediate mode.
@@ -303,8 +312,8 @@ BOOL	LLPanelObject::postBuild()
 	return TRUE;
 }
 
-LLPanelObject::LLPanelObject(const std::string& name)
-:	LLPanel(name),
+LLPanelObject::LLPanelObject()
+:	LLPanel(),
 	mIsPhysical(FALSE),
 	mIsTemporary(FALSE),
 	mIsPhantom(FALSE),
@@ -530,7 +539,7 @@ void LLPanelObject::getState( )
 		}
 	} func;
 	bool material_same = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, material_code );
-	
+	std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright");
 	if (editable && single_volume && material_same)
 	{
 		mComboMaterial->setEnabled( TRUE );
@@ -549,7 +558,7 @@ void LLPanelObject::getState( )
 			{
 				mComboMaterial->remove(LEGACY_FULLBRIGHT_DESC);
 			}
-			// *TODO:Translate
+			
 			mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code)));
 		}
 	}
@@ -1163,7 +1172,7 @@ void LLPanelObject::getState( )
 }
 
 // static
-BOOL LLPanelObject::precommitValidate( LLUICtrl* ctrl, void* userdata )
+bool LLPanelObject::precommitValidate( const LLSD& data )
 {
 	// TODO: Richard will fill this in later.  
 	return TRUE; // FALSE means that validation failed and new value should not be commited.
@@ -1244,6 +1253,7 @@ void LLPanelObject::onCommitMaterial( LLUICtrl* ctrl, void* userdata )
 	{
 		// apply the currently selected material to the object
 		const std::string& material_name = box->getSimple();
+		std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright");
 		if (material_name != LEGACY_FULLBRIGHT_DESC)
 		{
 			U8 material_code = LLMaterialTable::basic.getMCode(material_name);
@@ -1992,60 +2002,49 @@ void LLPanelObject::onCommitCastShadows( LLUICtrl* ctrl, void* userdata )
 }
 
 
-// static
-void LLPanelObject::onSelectSculpt(LLUICtrl* ctrl, void* userdata)
+void LLPanelObject::onSelectSculpt(const LLSD& data)
 {
-	LLPanelObject* self = (LLPanelObject*) userdata;
-
-    LLTextureCtrl* mTextureCtrl = self->getChild<LLTextureCtrl>("sculpt texture control");
+    LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("sculpt texture control");
 
 	if (mTextureCtrl)
 	{
-		self->mSculptTextureRevert = mTextureCtrl->getImageAssetID();
+		mSculptTextureRevert = mTextureCtrl->getImageAssetID();
 	}
 	
-	self->sendSculpt();
+	sendSculpt();
 }
 
 
-void LLPanelObject::onCommitSculpt( LLUICtrl* ctrl, void* userdata )
+void LLPanelObject::onCommitSculpt( const LLSD& data )
 {
-	LLPanelObject* self = (LLPanelObject*) userdata;
-
-	self->sendSculpt();
+	sendSculpt();
 }
 
-// static
-BOOL LLPanelObject::onDropSculpt(LLUICtrl*, LLInventoryItem* item, void* userdata)
+BOOL LLPanelObject::onDropSculpt(LLInventoryItem* item)
 {
-	LLPanelObject* self = (LLPanelObject*) userdata;
-
-    LLTextureCtrl* mTextureCtrl = self->getChild<LLTextureCtrl>("sculpt texture control");
+    LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("sculpt texture control");
 
 	if (mTextureCtrl)
 	{
 		LLUUID asset = item->getAssetUUID();
 
 		mTextureCtrl->setImageAssetID(asset);
-		self->mSculptTextureRevert = asset;
+		mSculptTextureRevert = asset;
 	}
 
 	return TRUE;
 }
 
 
-// static
-void LLPanelObject::onCancelSculpt(LLUICtrl* ctrl, void* userdata)
+void LLPanelObject::onCancelSculpt(const LLSD& data)
 {
-	LLPanelObject* self = (LLPanelObject*) userdata;
-
-	LLTextureCtrl* mTextureCtrl = self->getChild<LLTextureCtrl>("sculpt texture control");
+	LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("sculpt texture control");
 	if(!mTextureCtrl)
 		return;
 	
-	mTextureCtrl->setImageAssetID(self->mSculptTextureRevert);
+	mTextureCtrl->setImageAssetID(mSculptTextureRevert);
 	
-	self->sendSculpt();
+	sendSculpt();
 }
 
 // static
diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h
index 9ed091ed5f..1ab4ff581e 100644
--- a/indra/newview/llpanelobject.h
+++ b/indra/newview/llpanelobject.h
@@ -35,7 +35,7 @@
 
 #include "v3math.h"
 #include "llpanel.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llvolume.h"
 
 class LLSpinCtrl;
@@ -54,7 +54,7 @@ class LLUUID;
 class LLPanelObject : public LLPanel
 {
 public:
-	LLPanelObject(const std::string& name);
+	LLPanelObject();
 	virtual ~LLPanelObject();
 
 	virtual BOOL	postBuild();
@@ -63,7 +63,7 @@ public:
 
 	void			refresh();
 
-	static BOOL		precommitValidate(LLUICtrl* ctrl,void* userdata);
+	static bool		precommitValidate(const LLSD& data);
 	
 	static void		onCommitLock(LLUICtrl *ctrl, void *data);
 	static void 	onCommitPosition(		LLUICtrl* ctrl, void* userdata);
@@ -78,10 +78,10 @@ public:
 
 	static void 	onCommitMaterial(		LLUICtrl* ctrl, void* userdata);
 
-	static void     onCommitSculpt(        LLUICtrl* ctrl, void* userdata);
-	static void     onCancelSculpt(        LLUICtrl* ctrl, void* userdata);
-	static void     onSelectSculpt(        LLUICtrl* ctrl, void* userdata);
-	static BOOL     onDropSculpt(          LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
+	void     		onCommitSculpt(const LLSD& data);
+	void     		onCancelSculpt(const LLSD& data);
+	void     		onSelectSculpt(const LLSD& data);
+	BOOL     		onDropSculpt(LLInventoryItem* item);
 	static void     onCommitSculptType(    LLUICtrl *ctrl, void* userdata);
 		
 	
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 389f06f355..b4e33fec76 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -70,56 +70,44 @@
 ///----------------------------------------------------------------------------
 
 // Default constructor
-LLPanelPermissions::LLPanelPermissions(const std::string& title) :
-	LLPanel(title)
+LLPanelPermissions::LLPanelPermissions() :
+	LLPanel()
 {
 	setMouseOpaque(FALSE);
 }
 
 BOOL LLPanelPermissions::postBuild()
 {
-	this->childSetCommitCallback("Object Name",LLPanelPermissions::onCommitName,this);
-	this->childSetPrevalidate("Object Name",LLLineEditor::prevalidatePrintableNotPipe);
-	this->childSetCommitCallback("Object Description",LLPanelPermissions::onCommitDesc,this);
-	this->childSetPrevalidate("Object Description",LLLineEditor::prevalidatePrintableNotPipe);
+	childSetCommitCallback("Object Name",LLPanelPermissions::onCommitName,this);
+	childSetPrevalidate("Object Name",LLLineEditor::prevalidatePrintableNotPipe);
+	childSetCommitCallback("Object Description",LLPanelPermissions::onCommitDesc,this);
+	childSetPrevalidate("Object Description",LLLineEditor::prevalidatePrintableNotPipe);
 
 	
-	this->childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this);
-	this->childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this);
+	childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this);
+	childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this);
 
-	this->childSetAction("button set group",LLPanelPermissions::onClickGroup,this);
+	getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLPanelPermissions::onClickGroup,this));
 
-	this->childSetCommitCallback("checkbox share with group",LLPanelPermissions::onCommitGroupShare,this);
+	childSetCommitCallback("checkbox share with group",LLPanelPermissions::onCommitGroupShare,this);
 
-	this->childSetAction("button deed",LLPanelPermissions::onClickDeedToGroup,this);
+	childSetAction("button deed",LLPanelPermissions::onClickDeedToGroup,this);
 
-	this->childSetCommitCallback("checkbox allow everyone move",LLPanelPermissions::onCommitEveryoneMove,this);
+	childSetCommitCallback("checkbox allow everyone move",LLPanelPermissions::onCommitEveryoneMove,this);
 
-	this->childSetCommitCallback("checkbox allow everyone copy",LLPanelPermissions::onCommitEveryoneCopy,this);
+	childSetCommitCallback("checkbox allow everyone copy",LLPanelPermissions::onCommitEveryoneCopy,this);
 	
-	this->childSetCommitCallback("checkbox for sale",LLPanelPermissions::onCommitSaleInfo,this);
+	childSetCommitCallback("checkbox for sale",LLPanelPermissions::onCommitSaleInfo,this);
 
-	this->childSetCommitCallback("Edit Cost",LLPanelPermissions::onCommitSaleInfo,this);
-	this->childSetPrevalidate("Edit Cost",LLLineEditor::prevalidateNonNegativeS32);
-
-	this->childSetCommitCallback("sale type",LLPanelPermissions::onCommitSaleType,this);
+	childSetCommitCallback("sale type",LLPanelPermissions::onCommitSaleType,this);
 	
-	this->childSetCommitCallback("checkbox next owner can modify",LLPanelPermissions::onCommitNextOwnerModify,this);
-	this->childSetCommitCallback("checkbox next owner can copy",LLPanelPermissions::onCommitNextOwnerCopy,this);
-	this->childSetCommitCallback("checkbox next owner can transfer",LLPanelPermissions::onCommitNextOwnerTransfer,this);
-	this->childSetCommitCallback("clickaction",LLPanelPermissions::onCommitClickAction,this);
-	this->childSetCommitCallback("search_check",LLPanelPermissions::onCommitIncludeInSearch,this);
+	childSetCommitCallback("checkbox next owner can modify",LLPanelPermissions::onCommitNextOwnerModify,this);
+	childSetCommitCallback("checkbox next owner can copy",LLPanelPermissions::onCommitNextOwnerCopy,this);
+	childSetCommitCallback("checkbox next owner can transfer",LLPanelPermissions::onCommitNextOwnerTransfer,this);
+	childSetCommitCallback("clickaction",LLPanelPermissions::onCommitClickAction,this);
+	childSetCommitCallback("search_check",LLPanelPermissions::onCommitIncludeInSearch,this);
 	
-	LLTextBox* group_rect_proxy = getChild<LLTextBox>("Group Name Proxy");
-	if(group_rect_proxy )
-	{
-		mLabelGroupName = new LLNameBox("Group Name", group_rect_proxy->getRect());
-		addChild(mLabelGroupName);
-	}
-	else
-	{
-		mLabelGroupName = NULL;
-	}
+	mLabelGroupName = getChild<LLNameBox>("Group Name Proxy");
 
 	return TRUE;
 }
@@ -137,7 +125,7 @@ void LLPanelPermissions::refresh()
 	if(BtnDeedToGroup)
 	{	
 		std::string deedText;
-		if (gSavedSettings.getWarning("DeedObject"))
+		if (gWarningSettings.getBOOL("DeedObject"))
 		{
 			deedText = getString("text deed continued");
 		}
@@ -843,19 +831,18 @@ void LLPanelPermissions::onClickOwner(void *data)
 	}
 }
 
-void LLPanelPermissions::onClickGroup(void* data)
+void LLPanelPermissions::onClickGroup()
 {
-	LLPanelPermissions* panelp = (LLPanelPermissions*)data;
 	LLUUID owner_id;
 	std::string name;
 	BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name);
-	LLFloater* parent_floater = gFloaterView->getParentFloater(panelp);
+	LLFloater* parent_floater = gFloaterView->getParentFloater(this);
 
 	if(owners_identical && (owner_id == gAgent.getID()))
 	{
 		LLFloaterGroupPicker* fg;
 		fg = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
-		fg->setSelectCallback( cbGroupID, data );
+		fg->setSelectGroupCallback( boost::bind(&LLPanelPermissions::cbGroupID, this, _1) );
 
 		if (parent_floater)
 		{
@@ -866,13 +853,11 @@ void LLPanelPermissions::onClickGroup(void* data)
 	}
 }
 
-// static
-void LLPanelPermissions::cbGroupID(LLUUID group_id, void* userdata)
+void LLPanelPermissions::cbGroupID(LLUUID group_id)
 {
-	LLPanelPermissions* self = (LLPanelPermissions*)userdata;
-	if(self->mLabelGroupName)
+	if(mLabelGroupName)
 	{
-		self->mLabelGroupName->setNameID(group_id, TRUE);
+		mLabelGroupName->setNameID(group_id, TRUE);
 	}
 	LLSelectMgr::getInstance()->sendGroup(group_id);
 }
diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h
index bb816acd07..481efe178e 100644
--- a/indra/newview/llpanelpermissions.h
+++ b/indra/newview/llpanelpermissions.h
@@ -53,24 +53,22 @@ class LLNameBox;
 class LLPanelPermissions : public LLPanel
 {
 public:
-	LLPanelPermissions(const std::string& title);
+	LLPanelPermissions();
 	virtual ~LLPanelPermissions();
 
 	virtual	BOOL	postBuild();
 
 	// MANIPULATORS
 	void refresh();							// refresh all labels as needed
-//	void setPermCheckboxes(U32 mask_on, U32 mask_off, 
-//						   LLCheckBoxCtrl* move, LLCheckboxCtrl* edit,
-//						   LLCheckBoxCtrl* copy);
+
 protected:
 	// statics
 	static void onClickClaim(void*);
 	static void onClickRelease(void*);
 	static void onClickCreator(void*);
 	static void onClickOwner(void*);
-	static void onClickGroup(void*);
-	static void cbGroupID(LLUUID group_id, void* userdata);
+		   void onClickGroup();
+		   void cbGroupID(LLUUID group_id);
 	static void onClickDeedToGroup(void*);
 
 	static void onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm);
@@ -101,10 +99,6 @@ protected:
 protected:
 	LLNameBox*		mLabelGroupName;		// group name
 
-	//LLTextBox*		mBuyerLabel;
-	//LLCheckBoxCtrl*	mCheckBuyerModify;
-	//LLCheckBoxCtrl*	mCheckBuyerCopy;
-
 	LLUUID			mCreatorID;
 	LLUUID			mOwnerID;
 	LLUUID			mLastOwnerID;
diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp
index 43ecd273c2..905c42861a 100644
--- a/indra/newview/llpanelpick.cpp
+++ b/indra/newview/llpanelpick.cpp
@@ -39,6 +39,7 @@
 #include "llpanelpick.h"
 
 #include "lldir.h"
+#include "llfloaterreg.h"
 #include "llparcel.h"
 #include "message.h"
 
@@ -47,7 +48,7 @@
 #include "llcheckboxctrl.h"
 #include "llviewercontrol.h"
 #include "lllineeditor.h"
-#include "lltabcontainervertical.h"
+#include "lltabcontainer.h"
 #include "lltextbox.h"
 #include "llviewertexteditor.h"
 #include "lltexturectrl.h"
@@ -63,9 +64,8 @@
 //static
 std::list<LLPanelPick*> LLPanelPick::sAllPanels;
 
-LLPanelPick::LLPanelPick(BOOL top_pick)
-:	LLPanel(std::string("Top Picks Panel")),
-	mTopPick(top_pick),
+LLPanelPick::LLPanelPick()
+:	LLPanel(),
 	mPickID(),
 	mCreatorID(),
 	mParcelID(),
@@ -87,14 +87,8 @@ LLPanelPick::LLPanelPick(BOOL top_pick)
     sAllPanels.push_back(this);
 
 	std::string pick_def_file;
-	if (top_pick)
-	{
-		LLUICtrlFactory::getInstance()->buildPanel(this, "panel_top_pick.xml");
-	}
-	else
-	{
-		LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_pick.xml");
-	}	
+	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_pick.xml");
+		
 }
 
 
@@ -123,45 +117,37 @@ void LLPanelPick::reset()
 BOOL LLPanelPick::postBuild()
 {
     mSnapshotCtrl = getChild<LLTextureCtrl>("snapshot_ctrl");
-	mSnapshotCtrl->setCommitCallback(onCommitAny);
-	mSnapshotCtrl->setCallbackUserData(this);
+	mSnapshotCtrl->setCommitCallback(onCommitAny, this);
 
     mNameEditor = getChild<LLLineEditor>("given_name_editor");
 	mNameEditor->setCommitOnFocusLost(TRUE);
-	mNameEditor->setCommitCallback(onCommitAny);
-	mNameEditor->setCallbackUserData(this);
+	mNameEditor->setCommitCallback(onCommitAny, this);
 
     mDescEditor = getChild<LLTextEditor>("desc_editor");
 	mDescEditor->setCommitOnFocusLost(TRUE);
-	mDescEditor->setCommitCallback(onCommitAny);
-	mDescEditor->setCallbackUserData(this);
+	mDescEditor->setCommitCallback(onCommitAny, this);
 	mDescEditor->setTabsToNextField(TRUE);
 
     mLocationEditor = getChild<LLLineEditor>("location_editor");
 
     mSetBtn = getChild<LLButton>( "set_location_btn");
-    mSetBtn->setClickedCallback(onClickSet);
-    mSetBtn->setCallbackUserData(this);
+    mSetBtn->setClickedCallback(onClickSet, this);
 
     mTeleportBtn = getChild<LLButton>( "pick_teleport_btn");
-    mTeleportBtn->setClickedCallback(onClickTeleport);
-    mTeleportBtn->setCallbackUserData(this);
+    mTeleportBtn->setClickedCallback(onClickTeleport, this);
 
     mMapBtn = getChild<LLButton>( "pick_map_btn");
-    mMapBtn->setClickedCallback(onClickMap);
-    mMapBtn->setCallbackUserData(this);
+    mMapBtn->setClickedCallback(onClickMap, this);
 
 	mSortOrderText = getChild<LLTextBox>("sort_order_text");
 
 	mSortOrderEditor = getChild<LLLineEditor>("sort_order_editor");
 	mSortOrderEditor->setPrevalidate(LLLineEditor::prevalidateInt);
 	mSortOrderEditor->setCommitOnFocusLost(TRUE);
-	mSortOrderEditor->setCommitCallback(onCommitAny);
-	mSortOrderEditor->setCallbackUserData(this);
+	mSortOrderEditor->setCommitCallback(onCommitAny, this);
 
 	mEnabledCheck = getChild<LLCheckBoxCtrl>( "enabled_check");
-	mEnabledCheck->setCommitCallback(onCommitAny);
-	mEnabledCheck->setCallbackUserData(this);
+	mEnabledCheck->setCommitCallback(onCommitAny, this);
 
     return TRUE;
 }
@@ -243,7 +229,7 @@ void LLPanelPick::sendPickInfoUpdate()
 	msg->nextBlock("Data");
 	msg->addUUID("PickID", mPickID);
 	msg->addUUID("CreatorID", mCreatorID);
-	msg->addBOOL("TopPick", mTopPick);
+	msg->addBOOL("TopPick", FALSE);	//legacy var  need to be deleted -angela
 	// fills in on simulator if null
 	msg->addUUID("ParcelID", mParcelID);
 	msg->addString("Name", mNameEditor->getText());
@@ -253,14 +239,8 @@ void LLPanelPick::sendPickInfoUpdate()
 	
 	// Only top picks have a sort order
 	S32 sort_order;
-	if (mTopPick)
-	{
-		sort_order = atoi(mSortOrderEditor->getText().c_str());
-	}
-	else
-	{
-		sort_order = 0;
-	}
+	sort_order = 0;
+	
 	msg->addS32("SortOrder", sort_order);
 	msg->addBOOL("Enabled", mEnabledCheck->get());
 	gAgent.sendReliableMessage();
@@ -287,6 +267,7 @@ void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **)
     LLUUID creator_id;
     msg->getUUID("Data", "CreatorID", creator_id);
 
+	// ** top_pick should be deleted, not being used anymore - angela
 	BOOL top_pick;
 	msg->getBOOL("Data", "TopPick", top_pick);
 
@@ -382,44 +363,26 @@ void LLPanelPick::refresh()
 	}
 
     // Check for god mode
-    BOOL godlike = gAgent.isGodlike();
+	//BOOL godlike = gAgent.isGodlike();
 	BOOL is_self = (gAgent.getID() == mCreatorID);
 
-    // Set button visibility/enablement appropriately
-	if (mTopPick)
-	{
-		mSnapshotCtrl->setEnabled(godlike);
-		mNameEditor->setEnabled(godlike);
-		mDescEditor->setEnabled(godlike);
+	// Set button visibility/enablement appropriately
 
-		mSortOrderText->setVisible(godlike);
+	mSnapshotCtrl->setEnabled(is_self);
+	mNameEditor->setEnabled(is_self);
+	mDescEditor->setEnabled(is_self);
 
-		mSortOrderEditor->setVisible(godlike);
-		mSortOrderEditor->setEnabled(godlike);
+	mSortOrderText->setVisible(FALSE);
 
-		mEnabledCheck->setVisible(godlike);
-		mEnabledCheck->setEnabled(godlike);
+	mSortOrderEditor->setVisible(FALSE);
+	mSortOrderEditor->setEnabled(FALSE);
 
-		mSetBtn->setVisible(godlike);
-		mSetBtn->setEnabled(godlike);
-	}
-	else
-	{
-		mSnapshotCtrl->setEnabled(is_self);
-		mNameEditor->setEnabled(is_self);
-		mDescEditor->setEnabled(is_self);
+	mEnabledCheck->setVisible(FALSE);
+	mEnabledCheck->setEnabled(FALSE);
 
-		mSortOrderText->setVisible(FALSE);
+	mSetBtn->setVisible(is_self);
+	mSetBtn->setEnabled(is_self);
 
-		mSortOrderEditor->setVisible(FALSE);
-		mSortOrderEditor->setEnabled(FALSE);
-
-		mEnabledCheck->setVisible(FALSE);
-		mEnabledCheck->setEnabled(FALSE);
-
-		mSetBtn->setVisible(is_self);
-		mSetBtn->setEnabled(is_self);
-	}
 }
 
 
@@ -431,7 +394,7 @@ void LLPanelPick::onClickTeleport(void* data)
     if (!self->mPosGlobal.isExactlyZero())
     {
         gAgent.teleportViaLocation(self->mPosGlobal);
-        gFloaterWorldMap->trackLocation(self->mPosGlobal);
+        LLFloaterWorldMap::getInstance()->trackLocation(self->mPosGlobal);
     }
 }
 
@@ -440,8 +403,8 @@ void LLPanelPick::onClickTeleport(void* data)
 void LLPanelPick::onClickMap(void* data)
 {
 	LLPanelPick* self = (LLPanelPick*)data;
-	gFloaterWorldMap->trackLocation(self->mPosGlobal);
-	LLFloaterWorldMap::show(NULL, TRUE);
+	LLFloaterWorldMap::getInstance()->trackLocation(self->mPosGlobal);
+	LLFloaterReg::showInstance("world_map", "center");
 }
 
 // static
diff --git a/indra/newview/llpanelpick.h b/indra/newview/llpanelpick.h
index 450fa78801..641e1bdf64 100644
--- a/indra/newview/llpanelpick.h
+++ b/indra/newview/llpanelpick.h
@@ -54,7 +54,7 @@ class LLMessageSystem;
 class LLPanelPick : public LLPanel
 {
 public:
-    LLPanelPick(BOOL top_pick);
+    LLPanelPick();
     /*virtual*/ ~LLPanelPick();
 
 	void reset();
@@ -95,7 +95,6 @@ protected:
 	static void onCommitAny(LLUICtrl* ctrl, void* data);
 
 protected:
-	BOOL mTopPick;
     LLUUID mPickID;
 	LLUUID mCreatorID;
 	LLUUID mParcelID;
diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp
index 815152c69f..227faaa584 100644
--- a/indra/newview/llpanelplace.cpp
+++ b/indra/newview/llpanelplace.cpp
@@ -41,6 +41,7 @@
 #include "llsecondlifeurls.h"
 #include "llremoteparcelrequest.h"
 #include "llfloater.h"
+#include "llfloaterreg.h"
 
 #include "llagent.h"
 #include "llviewerwindow.h"
@@ -51,6 +52,7 @@
 #include "lltextbox.h"
 #include "llviewertexteditor.h"
 #include "lltexturectrl.h"
+#include "lltrans.h"
 #include "llworldmap.h"
 #include "llviewerregion.h"
 #include "lluictrlfactory.h"
@@ -62,7 +64,7 @@
 std::list<LLPanelPlace*> LLPanelPlace::sAllPanels;
 
 LLPanelPlace::LLPanelPlace()
-:	LLPanel(std::string("Places Panel")),
+:	LLPanel(),
 	mParcelID(),
 	mRequestedID(),
 	mRegionID(),
@@ -102,20 +104,16 @@ BOOL LLPanelPlace::postBuild()
     mLocationDisplay = getChild<LLTextBox>("location_editor");
 
 	mTeleportBtn = getChild<LLButton>( "teleport_btn");
-	mTeleportBtn->setClickedCallback(onClickTeleport);
-	mTeleportBtn->setCallbackUserData(this);
+	mTeleportBtn->setClickedCallback(onClickTeleport, this);
 
 	mMapBtn = getChild<LLButton>( "map_btn");
-	mMapBtn->setClickedCallback(onClickMap);
-	mMapBtn->setCallbackUserData(this);
+	mMapBtn->setClickedCallback(onClickMap, this);
 
 	//mLandmarkBtn = getChild<LLButton>( "landmark_btn");
-	//mLandmarkBtn->setClickedCallback(onClickLandmark);
-	//mLandmarkBtn->setCallbackUserData(this);
+	//mLandmarkBtn->setClickedCallback(onClickLandmark, this);
 
 	mAuctionBtn = getChild<LLButton>( "auction_btn");
-	mAuctionBtn->setClickedCallback(onClickAuction);
-	mAuctionBtn->setCallbackUserData(this);
+	mAuctionBtn->setClickedCallback(onClickAuction, this);
 
 	// Default to no auction button.  We'll show it if we get an auction id
 	mAuctionBtn->setVisible(FALSE);
@@ -128,8 +126,11 @@ BOOL LLPanelPlace::postBuild()
 
 void LLPanelPlace::displayItemInfo(const LLInventoryItem* pItem)
 {
-	mNameEditor->setText(pItem->getName());
-	mDescEditor->setText(pItem->getDescription());
+	if (pItem)
+	{
+		mNameEditor->setText(pItem->getName());
+		mDescEditor->setText(pItem->getDescription());
+	}
 }
 
 // Use this for search directory clicks, because we are totally
@@ -410,20 +411,20 @@ void LLPanelPlace::onClickTeleport(void* data)
 	LLFloater* parent_floaterp = dynamic_cast<LLFloater*>(parent_viewp);
 	if (parent_floaterp)
 	{
-		parent_floaterp->close();
+		parent_floaterp->closeFloater();
 	}
 	// LLFloater* parent_floaterp = (LLFloater*)self->getParent();
 	parent_viewp->setVisible(false);
 	if(self->mLandmarkAssetID.notNull())
 	{
 		gAgent.teleportViaLandmark(self->mLandmarkAssetID);
-		gFloaterWorldMap->trackLandmark(self->mLandmarkAssetID);
+		LLFloaterWorldMap::getInstance()->trackLandmark(self->mLandmarkAssetID);
 
 	}
 	else if (!self->mPosGlobal.isExactlyZero())
 	{
 		gAgent.teleportViaLocation(self->mPosGlobal);
-		gFloaterWorldMap->trackLocation(self->mPosGlobal);
+		LLFloaterWorldMap::getInstance()->trackLocation(self->mPosGlobal);
 	}
 }
 
@@ -433,8 +434,8 @@ void LLPanelPlace::onClickMap(void* data)
 	LLPanelPlace* self = (LLPanelPlace*)data;
 	if (!self->mPosGlobal.isExactlyZero())
 	{
-		gFloaterWorldMap->trackLocation(self->mPosGlobal);
-		LLFloaterWorldMap::show(NULL, TRUE);
+		LLFloaterWorldMap::getInstance()->trackLocation(self->mPosGlobal);
+		LLFloaterReg::showInstance("world_map", "center");
 	}
 }
 
@@ -453,12 +454,12 @@ void LLPanelPlace::onClickLandmark(void* data)
 void LLPanelPlace::onClickAuction(void* data)
 {
 	LLPanelPlace* self = (LLPanelPlace*)data;
-	LLSD payload;
-	payload["auction_id"] = self->mAuctionID;
+	LLSD args;
+	args["AUCTION_ID"] = self->mAuctionID;
 
-	LLNotifications::instance().add("GoToAuctionPage", LLSD(), payload, callbackAuctionWebPage);
+	LLNotifications::instance().add("GoToAuctionPage", args);
 }
-
+/*
 // static
 bool LLPanelPlace::callbackAuctionWebPage(const LLSD& notification, const LLSD& response)
 {
@@ -466,7 +467,7 @@ bool LLPanelPlace::callbackAuctionWebPage(const LLSD& notification, const LLSD&
 	if (0 == option)
 	{
 		std::string url;
-		url = AUCTION_URL + llformat("%010d", response["auction_id"].asInteger());
+		url = LLNotifications::instance().getGlobalString("AUCTION_URL")  + llformat("%010d", response["auction_id"].asInteger());
 
 		llinfos << "Loading auction page " << url << llendl;
 
@@ -474,3 +475,5 @@ bool LLPanelPlace::callbackAuctionWebPage(const LLSD& notification, const LLSD&
 	}
 	return false;
 }
+*/
+
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 6d014a23de..1e44a294b0 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -107,8 +107,8 @@ BOOL	LLPanelVolume::postBuild()
 		childSetCommitCallback("Light Checkbox Ctrl",onCommitIsLight,this);
 		LLColorSwatchCtrl*	LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
 		if(LightColorSwatch){
-			LightColorSwatch->setOnCancelCallback(onLightCancelColor);
-			LightColorSwatch->setOnSelectCallback(onLightSelectColor);
+			LightColorSwatch->setOnCancelCallback(boost::bind(&LLPanelVolume::onLightCancelColor, this, _2));
+			LightColorSwatch->setOnSelectCallback(boost::bind(&LLPanelVolume::onLightSelectColor, this, _2));
 			childSetCommitCallback("colorswatch",onCommitLight,this);
 		}
 		childSetCommitCallback("Light Intensity",onCommitLight,this);
@@ -125,8 +125,8 @@ BOOL	LLPanelVolume::postBuild()
 	return TRUE;
 }
 
-LLPanelVolume::LLPanelVolume(const std::string& name)
-	:	LLPanel(name)
+LLPanelVolume::LLPanelVolume()
+	: LLPanel()
 {
 	setMouseOpaque(FALSE);
 
@@ -317,7 +317,7 @@ void LLPanelVolume::getState( )
 }
 
 // static
-BOOL LLPanelVolume::precommitValidate( LLUICtrl* ctrl, void* userdata )
+bool LLPanelVolume::precommitValidate( const LLSD& data )
 {
 	// TODO: Richard will fill this in later.  
 	return TRUE; // FALSE means that validation failed and new value should not be commited.
@@ -427,21 +427,19 @@ void LLPanelVolume::sendIsFlexible()
 	llinfos << "update flexible sent" << llendl;
 }
 
-void LLPanelVolume::onLightCancelColor(LLUICtrl* ctrl, void* userdata)
+void LLPanelVolume::onLightCancelColor(const LLSD& data)
 {
-	LLPanelVolume* self = (LLPanelVolume*) userdata;
-	LLColorSwatchCtrl*	LightColorSwatch = self->getChild<LLColorSwatchCtrl>("colorswatch");
+	LLColorSwatchCtrl*	LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
 	if(LightColorSwatch)
 	{
-		LightColorSwatch->setColor(self->mLightSavedColor);
+		LightColorSwatch->setColor(mLightSavedColor);
 	}
-	onLightSelectColor(NULL, userdata);
+	onLightSelectColor(data);
 }
 
-void LLPanelVolume::onLightSelectColor(LLUICtrl* ctrl, void* userdata)
+void LLPanelVolume::onLightSelectColor(const LLSD& data)
 {
-	LLPanelVolume* self = (LLPanelVolume*) userdata;
-	LLViewerObject* objectp = self->mObject;
+	LLViewerObject* objectp = mObject;
 	if (!objectp || (objectp->getPCode() != LL_PCODE_VOLUME))
 	{
 		return;
@@ -449,13 +447,13 @@ void LLPanelVolume::onLightSelectColor(LLUICtrl* ctrl, void* userdata)
 	LLVOVolume *volobjp = (LLVOVolume *)objectp;
 
 
-	LLColorSwatchCtrl*	LightColorSwatch = self->getChild<LLColorSwatchCtrl>("colorswatch");
+	LLColorSwatchCtrl*	LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
 	if(LightColorSwatch)
 	{
 		LLColor4	clr = LightColorSwatch->get();
 		LLColor3	clr3( clr );
 		volobjp->setLightColor(clr3);
-		self->mLightSavedColor = clr;
+		mLightSavedColor = clr;
 	}
 }
 
diff --git a/indra/newview/llpanelvolume.h b/indra/newview/llpanelvolume.h
index 841880b147..f285141bbe 100644
--- a/indra/newview/llpanelvolume.h
+++ b/indra/newview/llpanelvolume.h
@@ -35,7 +35,7 @@
 
 #include "v3math.h"
 #include "llpanel.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llvolume.h"
 
 class LLSpinCtrl;
@@ -51,7 +51,7 @@ class LLColorSwatchCtrl;
 class LLPanelVolume : public LLPanel
 {
 public:
-	LLPanelVolume(const std::string& name);
+	LLPanelVolume();
 	virtual ~LLPanelVolume();
 
 	virtual void	draw();
@@ -64,15 +64,15 @@ public:
 	void			sendIsLight();
 	void			sendIsFlexible();
 
-	static BOOL		precommitValidate(LLUICtrl* ctrl,void* userdata);
+	static bool		precommitValidate(const LLSD& data);
 	
 	static void 	onCommitIsLight(		LLUICtrl* ctrl, void* userdata);
 	static void 	onCommitLight(			LLUICtrl* ctrl, void* userdata);
 	static void 	onCommitIsFlexible(		LLUICtrl* ctrl, void* userdata);
 	static void 	onCommitFlexible(		LLUICtrl* ctrl, void* userdata);
 
-	static void		onLightCancelColor(LLUICtrl* ctrl, void* userdata);
-	static void		onLightSelectColor(LLUICtrl* ctrl, void* userdata);
+	void		onLightCancelColor(const LLSD& data);
+	void		onLightSelectColor(const LLSD& data);
 
 protected:
 	void			getState();
diff --git a/indra/newview/llparcelselection.h b/indra/newview/llparcelselection.h
index 5f26fafc33..0481bea6f7 100644
--- a/indra/newview/llparcelselection.h
+++ b/indra/newview/llparcelselection.h
@@ -33,7 +33,8 @@
 #ifndef LLPARCELSELECTION_H
 #define LLPARCELSELECTION_H
 
-#include "llmemory.h"
+#include "llrefcount.h"
+#include "llsafehandle.h"
 
 class LLParcel;
 
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 6d7082bf9a..dfc8b783d5 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -34,11 +34,13 @@
 #include "stdenums.h"
 
 #include "llpreview.h"
+
 #include "lllineeditor.h"
 #include "llinventory.h"
 #include "llinventorymodel.h"
 #include "llresmgr.h"
 #include "lltextbox.h"
+#include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "lltooldraganddrop.h"
 #include "llradiogroup.h"
@@ -51,125 +53,68 @@
 #include "llselectmgr.h"
 #include "llinventoryview.h"
 #include "llviewerinventory.h"
+#include "llviewerwindow.h"
+#include "lltrans.h"
 
 // Constants
 
-// Globals and statics
-LLPreview::preview_multimap_t LLPreview::sPreviewsBySource;
-LLPreview::preview_map_t LLPreview::sInstances;
-std::map<LLUUID, LLHandle<LLFloater> > LLMultiPreview::sAutoOpenPreviewHandles;
-
-// Functions
-LLPreview::LLPreview(const std::string& name) :
-	LLFloater(name),
-	mCopyToInvBtn(NULL),
+LLPreview::LLPreview(const LLSD& key)
+:	LLFloater(key),
+	mItemUUID(key.asUUID()),
+	mCopyToInvBtn( NULL ),
 	mForceClose(FALSE),
 	mUserResized(FALSE),
 	mCloseAfterSave(FALSE),
 	mAssetStatus(PREVIEW_ASSET_UNLOADED),
-	mItem(NULL),
 	mDirty(TRUE)
 {
-	// don't add to instance list, since ItemID is null
-	mAuxItem = new LLInventoryItem; // (LLPointer is auto-deleted)
+	mAuxItem = new LLInventoryItem;
 	// don't necessarily steal focus on creation -- sometimes these guys pop up without user action
 	setAutoFocus(FALSE);
+
 	gInventory.addObserver(this);
+	
+	refreshFromItem();
 }
 
-LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const LLUUID& object_uuid, BOOL allow_resize, S32 min_width, S32 min_height, LLPointer<LLViewerInventoryItem> inv_item )
-:	LLFloater(name, rect, title, allow_resize, min_width, min_height ),
-	mItemUUID(item_uuid),
-	mSourceID(LLUUID::null),
-	mObjectUUID(object_uuid),
-	mCopyToInvBtn( NULL ),
-	mForceClose( FALSE ),
-	mUserResized(FALSE),
-	mCloseAfterSave(FALSE),
-	mAssetStatus(PREVIEW_ASSET_UNLOADED),
-	mItem(inv_item),
-	mDirty(TRUE)
+BOOL LLPreview::postBuild()
 {
-	mAuxItem = new LLInventoryItem;
-	// don't necessarily steal focus on creation -- sometimes these guys pop up without user action
-	setAutoFocus(FALSE);
-
-	if (mItemUUID.notNull())
-	{
-		sInstances[mItemUUID] = this;
-	}
-	gInventory.addObserver(this);
+	refreshFromItem();
+	return TRUE;
 }
 
 LLPreview::~LLPreview()
 {
 	gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit()
-
-	if (mItemUUID.notNull())
-	{
-		sInstances.erase( mItemUUID );
-	}
-
-	if (mSourceID.notNull())
-	{
-		preview_multimap_t::iterator found_it = sPreviewsBySource.find(mSourceID);
-		for (; found_it != sPreviewsBySource.end(); ++found_it)
-		{
-			if (found_it->second == getHandle())
-			{
-				sPreviewsBySource.erase(found_it);
-				break;
-			}
-		}
-	}
 	gInventory.removeObserver(this);
 }
 
-void LLPreview::setItemID(const LLUUID& item_id)
-{
-	if (mItemUUID.notNull())
-	{
-		sInstances.erase(mItemUUID);
-	}
-
-	mItemUUID = item_id;
-
-	if (mItemUUID.notNull())
-	{
-		sInstances[mItemUUID] = this;
-	}
-}
-
 void LLPreview::setObjectID(const LLUUID& object_id)
 {
 	mObjectUUID = object_id;
+	if (getAssetStatus() == PREVIEW_ASSET_UNLOADED)
+	{
+		loadAsset();
+	}
 }
 
-void LLPreview::setSourceID(const LLUUID& source_id)
+void LLPreview::setItem( LLInventoryItem* item )
 {
-	if (mSourceID.notNull())
+	mItem = item;
+	if (mItem && getAssetStatus() == PREVIEW_ASSET_UNLOADED)
 	{
-		// erase old one
-		preview_multimap_t::iterator found_it = sPreviewsBySource.find(mSourceID);
-		for (; found_it != sPreviewsBySource.end(); ++found_it)
-		{
-			if (found_it->second == getHandle())
-			{
-				sPreviewsBySource.erase(found_it);
-				break;
-			}
-		}
+		loadAsset();
 	}
-	mSourceID = source_id;
-	sPreviewsBySource.insert(preview_multimap_t::value_type(mSourceID, getHandle()));
 }
 
-const LLViewerInventoryItem *LLPreview::getItem() const
+const LLInventoryItem *LLPreview::getItem() const
 {
-	if(mItem)
-		return mItem;
-	const LLViewerInventoryItem *item = NULL;
-	if(mObjectUUID.isNull())
+	const LLInventoryItem *item = NULL;
+	if (mItem.notNull())
+	{
+		item = mItem;
+	}
+	else if (mObjectUUID.isNull())
 	{
 		// it's an inventory item, so get the item.
 		item = gInventory.getItem(mItemUUID);
@@ -180,7 +125,7 @@ const LLViewerInventoryItem *LLPreview::getItem() const
 		LLViewerObject* object = gObjectList.findObject(mObjectUUID);
 		if(object)
 		{
-			item = (LLViewerInventoryItem*)object->getInventoryObject(mItemUUID);
+			item = dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mItemUUID));
 		}
 	}
 	return item;
@@ -189,7 +134,7 @@ const LLViewerInventoryItem *LLPreview::getItem() const
 // Sub-classes should override this function if they allow editing
 void LLPreview::onCommit()
 {
-	const LLViewerInventoryItem *item = getItem();
+	const LLViewerInventoryItem *item = dynamic_cast<const LLViewerInventoryItem*>(getItem());
 	if(item)
 	{
 		if (!item->isComplete())
@@ -255,17 +200,24 @@ void LLPreview::draw()
 	if (mDirty)
 	{
 		mDirty = FALSE;
-		const LLViewerInventoryItem *item = getItem();
-		if (item)
-		{
-			refreshFromItem(item);
-		}
+		refreshFromItem();
 	}
 }
 
-void LLPreview::refreshFromItem(const LLInventoryItem* item)
+void LLPreview::refreshFromItem()
 {
-	setTitle(llformat("%s: %s",getTitleName(),item->getName().c_str()));
+	const LLInventoryItem* item = getItem();
+	if (!item)
+	{
+		return;
+	}
+	if (hasString("Title"))
+	{
+		LLStringUtil::format_map_t args;
+		args["[NAME]"] = item->getName();
+		LLUIString title = getString("Title", args);
+		setTitle(title.getString());
+	}
 	childSetText("desc",item->getDescription());
 
 	BOOL can_agent_manipulate = item->getPermissions().allowModifyBy(gAgent.getID());
@@ -286,81 +238,33 @@ void LLPreview::onRadio(LLUICtrl*, void* userdata)
 	self->onCommit();
 }
 
-// static
-LLPreview* LLPreview::find(const LLUUID& item_uuid)
-{
-	LLPreview* instance = NULL;
-	preview_map_t::iterator found_it = LLPreview::sInstances.find(item_uuid);
-	if(found_it != LLPreview::sInstances.end())
-	{
-		instance = found_it->second;
-	}
-	return instance;
-}
-
-// static
-LLPreview* LLPreview::show( const LLUUID& item_uuid, BOOL take_focus )
-{
-	LLPreview* instance = LLPreview::find(item_uuid);
-	if(instance)
-	{
-		if (LLFloater::getFloaterHost() && LLFloater::getFloaterHost() != instance->getHost())
-		{
-			// this preview window is being opened in a new context
-			// needs to be rehosted
-			LLFloater::getFloaterHost()->addFloater(instance, TRUE);
-		}
-		instance->open();  /*Flawfinder: ignore*/
-		if (take_focus)
-		{
-			instance->setFocus(TRUE);
-		}
-	}
-
-	return instance;
-}
-
-// static
-bool LLPreview::save( const LLUUID& item_uuid, LLPointer<LLInventoryItem>* itemptr )
-{
-	bool res = false;
-	LLPreview* instance = LLPreview::find(item_uuid);
-	if(instance)
-	{
-		res = instance->saveItem(itemptr);
-	}
-	if (!res)
-	{
-		delete itemptr;
-	}
-	return res;
-}
-
 // static
 void LLPreview::hide(const LLUUID& item_uuid, BOOL no_saving /* = FALSE */ )
 {
-	preview_map_t::iterator found_it = LLPreview::sInstances.find(item_uuid);
-	if(found_it != LLPreview::sInstances.end())
+	LLFloater* floater = LLFloaterReg::findInstance("preview", LLSD(item_uuid));
+	if (!floater) floater = LLFloaterReg::findInstance("preview_avatar", LLSD(item_uuid));
+	
+	LLPreview* preview = dynamic_cast<LLPreview*>(floater);
+	if (preview)
 	{
-		LLPreview* instance = found_it->second;
-
 		if ( no_saving )
 		{
-			instance->mForceClose = TRUE;
+			preview->mForceClose = TRUE;
 		}
-
-		instance->close();
+		preview->closeFloater();
 	}
 }
 
 // static
-void LLPreview::rename(const LLUUID& item_uuid, const std::string& new_name)
+void LLPreview::dirty(const LLUUID& item_uuid)
 {
-	preview_map_t::iterator found_it = LLPreview::sInstances.find(item_uuid);
-	if(found_it != LLPreview::sInstances.end())
+	LLFloater* floater = LLFloaterReg::findInstance("preview", LLSD(item_uuid));
+	if (!floater) floater = LLFloaterReg::findInstance("preview_avatar", LLSD(item_uuid));
+	
+	LLPreview* preview = dynamic_cast<LLPreview*>(floater);
+	if(preview)
 	{
-		LLPreview* instance = found_it->second;
-		instance->setTitle( new_name );
+		preview->mDirty = TRUE;
 	}
 }
 
@@ -397,7 +301,7 @@ BOOL LLPreview::handleHover(S32 x, S32 y, MASK mask)
 	{
 		S32 screen_x;
 		S32 screen_y;
-		const LLViewerInventoryItem *item = getItem();
+		const LLInventoryItem *item = getItem();
 
 		localPointToScreen(x, y, &screen_x, &screen_y );
 		if(item
@@ -426,22 +330,14 @@ BOOL LLPreview::handleHover(S32 x, S32 y, MASK mask)
 	return LLFloater::handleHover(x,y,mask);
 }
 
-void LLPreview::open()	/*Flawfinder: ignore*/
+void LLPreview::onOpen(const LLSD& key)
 {
 	if (!getFloaterHost() && !getHost() && getAssetStatus() == PREVIEW_ASSET_UNLOADED)
 	{
 		loadAsset();
 	}
-	LLFloater::open();		/*Flawfinder: ignore*/
-}
-
-// virtual
-bool LLPreview::saveItem(LLPointer<LLInventoryItem>* itemptr)
-{
-	return false;
 }
 
-
 // static
 void LLPreview::onBtnCopyToInv(void* userdata)
 {
@@ -468,14 +364,14 @@ void LLPreview::onBtnCopyToInv(void* userdata)
 				cb);
 		}
 	}
-	self->close();
+	self->closeFloater();
 }
 
 // static
 void LLPreview::onKeepBtn(void* data)
 {
 	LLPreview* self = (LLPreview*)data;
-	self->close();
+	self->closeFloater();
 }
 
 // static
@@ -483,11 +379,11 @@ void LLPreview::onDiscardBtn(void* data)
 {
 	LLPreview* self = (LLPreview*)data;
 
-	const LLViewerInventoryItem* item = self->getItem();
+	const LLInventoryItem* item = self->getItem();
 	if (!item) return;
 
 	self->mForceClose = TRUE;
-	self->close();
+	self->closeFloater();
 
 	// Delete the item entirely
 	/*
@@ -517,55 +413,60 @@ void LLPreview::onDiscardBtn(void* data)
 	}
 }
 
-//static
-LLPreview* LLPreview::getFirstPreviewForSource(const LLUUID& source_id)
+void LLPreview::handleReshape(const LLRect& new_rect, bool by_user)
 {
-	preview_multimap_t::iterator found_it = sPreviewsBySource.find(source_id);
-	if (found_it != sPreviewsBySource.end())
-	{
-		// just return first one
-		return (LLPreview*)found_it->second.get();
-	}
-	return NULL;
-}
-
-void LLPreview::userSetShape(const LLRect& new_rect)
-{
-	if(new_rect.getWidth() != getRect().getWidth() || new_rect.getHeight() != getRect().getHeight())
+	if(by_user 
+		&& (new_rect.getWidth() != getRect().getWidth() || new_rect.getHeight() != getRect().getHeight()))
 	{
 		userResized();
 	}
-	LLFloater::userSetShape(new_rect);
+	LLFloater::handleReshape(new_rect, by_user);
 }
 
 //
 // LLMultiPreview
 //
 
-LLMultiPreview::LLMultiPreview(const LLRect& rect) : LLMultiFloater(std::string("Preview"), rect)
+LLMultiPreview::LLMultiPreview()
+	: LLMultiFloater()
 {
+	// *TODO: There should be a .xml file for this
+	const LLRect& nextrect = LLFloaterReg::getFloaterRect("preview"); // place where the next preview should show up
+	if (nextrect.getWidth() > 0)
+	{
+		setRect(nextrect);
+	}
+	else
+	{
+		// start with a rect in the top-left corner ; will get resized
+		LLRect rect;
+		rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeight(), 200, 200);
+		setRect(rect);
+	}
+	setTitle(LLTrans::getString("MultiPreviewTitle"));
+	buildTabContainer();
 	setCanResize(TRUE);
 }
 
-void LLMultiPreview::open()		/*Flawfinder: ignore*/
+void LLMultiPreview::onOpen(const LLSD& key)
 {
-	LLMultiFloater::open();		/*Flawfinder: ignore*/
 	LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel();
 	if (frontmost_preview && frontmost_preview->getAssetStatus() == LLPreview::PREVIEW_ASSET_UNLOADED)
 	{
 		frontmost_preview->loadAsset();
 	}
+	LLMultiFloater::onOpen(key);
 }
 
 
-void LLMultiPreview::userSetShape(const LLRect& new_rect)
+void LLMultiPreview::handleReshape(const LLRect& new_rect, bool by_user)
 {
 	if(new_rect.getWidth() != getRect().getWidth() || new_rect.getHeight() != getRect().getHeight())
 	{
 		LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel();
 		if (frontmost_preview) frontmost_preview->userResized();
 	}
-	LLFloater::userSetShape(new_rect);
+	LLFloater::handleReshape(new_rect, by_user);
 }
 
 
@@ -578,22 +479,3 @@ void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click)
 	}
 }
 
-//static 
-LLMultiPreview* LLMultiPreview::getAutoOpenInstance(const LLUUID& id)
-{
-	handle_map_t::iterator found_it = sAutoOpenPreviewHandles.find(id);
-	if (found_it != sAutoOpenPreviewHandles.end())
-	{
-		return (LLMultiPreview*)found_it->second.get();	
-	}
-	return NULL;
-}
-
-//static
-void LLMultiPreview::setAutoOpenInstance(LLMultiPreview* previewp, const LLUUID& id)
-{
-	if (previewp)
-	{
-		sAutoOpenPreviewHandles[id] = previewp->getHandle();
-	}
-}
diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h
index ff084bea27..f6042f065b 100644
--- a/indra/newview/llpreview.h
+++ b/indra/newview/llpreview.h
@@ -33,7 +33,7 @@
 #ifndef LL_LLPREVIEW_H
 #define LL_LLPREVIEW_H
 
-#include "llfloater.h"
+#include "llmultifloater.h"
 #include "llresizehandle.h"
 #include "llmap.h"
 #include "lluuid.h"
@@ -49,18 +49,12 @@ class LLPreview;
 class LLMultiPreview : public LLMultiFloater
 {
 public:
-	LLMultiPreview(const LLRect& rect);
+	LLMultiPreview();
 
-	/*virtual*/void open();		/*Flawfinder: ignore*/
+	/*virtual*/void onOpen(const LLSD& key);
 	/*virtual*/void tabOpen(LLFloater* opened_floater, bool from_click);
-	/*virtual*/ void userSetShape(const LLRect& new_rect);
+	/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
 
-	static LLMultiPreview* getAutoOpenInstance(const LLUUID& id);
-	static void setAutoOpenInstance(LLMultiPreview* previewp, const LLUUID& id);
-
-protected:
-	typedef std::map<LLUUID, LLHandle<LLFloater> > handle_map_t;
-	static handle_map_t sAutoOpenPreviewHandles;
 };
 
 // https://wiki.lindenlab.com/mediawiki/index.php?title=LLPreview&oldid=81373
@@ -76,28 +70,24 @@ public:
 		PREVIEW_ASSET_LOADED
 	} EAssetStatus;
 public:
-	// Used for XML-based construction.
-	LLPreview(const std::string& name);
-	LLPreview(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const LLUUID& object_uuid, BOOL allow_resize = FALSE, S32 min_width = 0, S32 min_height = 0, LLPointer<LLViewerInventoryItem> inv_item = NULL );
+	LLPreview(const LLSD& key );
 	virtual ~LLPreview();
-
-	void setItemID(const LLUUID& item_id);
+		
+	/*virtual*/ BOOL postBuild();
+	
 	void setObjectID(const LLUUID& object_id);
-	void setSourceID(const LLUUID& source_id);
-	const LLViewerInventoryItem *getItem() const; // searches if not constructed with it
-
-	static LLPreview* find(const LLUUID& item_uuid);
-	static LLPreview*	show(const LLUUID& item_uuid, BOOL take_focus = TRUE );
-	static void			hide(const LLUUID& item_uuid, BOOL no_saving = FALSE );
-	static void			rename(const LLUUID& item_uuid, const std::string& new_name);
-	static bool			save(const LLUUID& item_uuid, LLPointer<LLInventoryItem>* itemptr);
+	void setItem( LLInventoryItem* item );
+	
+	const LLInventoryItem* getItem() const; // searches if not constructed with it
 
+	static void hide(const LLUUID& item_uuid, BOOL no_saving = FALSE );
+	static void	dirty(const LLUUID& item_uuid);
+	
 	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
 	virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
 	virtual BOOL handleHover(S32 x, S32 y, MASK mask);
-	virtual void open();		/*Flawfinder: ignore*/
-	virtual bool saveItem(LLPointer<LLInventoryItem>* itemptr);
- 
+	virtual void onOpen(const LLSD& key);
+	
 	void setAuxItem( const LLInventoryItem* item )
 	{
 		if ( mAuxItem ) 
@@ -109,7 +99,7 @@ public:
 	void				addKeepDiscardButtons();
 	static void			onKeepBtn(void* data);
 	static void			onDiscardBtn(void* data);
-	/*virtual*/ void	userSetShape(const LLRect& new_rect);
+	/*virtual*/ void	handleReshape(const LLRect& new_rect, bool by_user = false);
 
 	void userResized() { mUserResized = TRUE; };
 
@@ -122,7 +112,7 @@ public:
 
 	// llview
 	virtual void draw();
-	void refreshFromItem(const LLInventoryItem* item);
+	void refreshFromItem();
 	
 protected:
 	virtual void onCommit();
@@ -135,11 +125,9 @@ protected:
 	// for LLInventoryObserver 
 	virtual void changed(U32 mask);	
 	BOOL mDirty;
-	virtual const char *getTitleName() const { return "Preview"; }
 	
 protected:
 	LLUUID mItemUUID;
-	LLUUID	mSourceID;
 
 	// mObjectID will have a value if it is associated with a task in
 	// the world, and will be == LLUUID::null if it's in the agent
@@ -149,6 +137,7 @@ protected:
 	LLRect mClientRect;
 
 	LLPointer<LLInventoryItem> mAuxItem;  // HACK!
+	LLPointer<LLInventoryItem> mItem;  // For embedded items (Landmarks)
 	LLButton* mCopyToInvBtn;
 
 	// Close without saving changes
@@ -162,27 +151,18 @@ protected:
 
 	EAssetStatus mAssetStatus;
 
-	typedef std::map<LLUUID, LLPreview*> preview_map_t;
-	typedef std::multimap<LLUUID, LLHandle<LLFloater> > preview_multimap_t;
-
-	static preview_multimap_t sPreviewsBySource;
-	static preview_map_t sInstances;
 	LLUUID mNotecardInventoryID;
 	LLUUID mObjectID;
-	LLPointer<LLViewerInventoryItem> mItem;
 };
 
 
 const S32 PREVIEW_BORDER = 4;
 const S32 PREVIEW_PAD = 5;
-const S32 PREVIEW_BUTTON_WIDTH = 100;
 
 const S32 PREVIEW_LINE_HEIGHT = 19;
-const S32 PREVIEW_CLOSE_BOX_SIZE = 16;
 const S32 PREVIEW_BORDER_WIDTH = 2;
 const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
 const S32 PREVIEW_VPAD = 2;
-const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
 const S32 PREVIEW_HEADER_SIZE = 2*PREVIEW_LINE_HEIGHT + 2 * PREVIEW_VPAD;
 
 #endif  // LL_LLPREVIEW_H
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index 3212de0639..efe0d3b752 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -47,42 +47,54 @@
 
 extern LLAgent gAgent;
 
-LLPreviewAnim::LLPreviewAnim(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const S32& activate, const LLUUID& object_uuid )	:
-	LLPreview( name, rect, title, item_uuid, object_uuid)
+LLPreviewAnim::LLPreviewAnim(const LLSD& key)
+	: LLPreview( key )
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_animation.xml");
-
-	childSetAction("Anim play btn",playAnim,this);
-	childSetAction("Anim audition btn",auditionAnim,this);
-
-	const LLInventoryItem* item = getItem();
-	
-	childSetCommitCallback("desc", LLPreview::onText, this);
-	childSetText("desc", item->getDescription());
-	childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
-	
-	setTitle(title);
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_animation.xml", FALSE);
+}
 
-	if (!getHost())
+// static
+void LLPreviewAnim::endAnimCallback( void *userdata )
+{
+	LLHandle<LLFloater>* handlep = ((LLHandle<LLFloater>*)userdata);
+	LLFloater* self = handlep->get();
+	delete handlep; // done with the handle
+	if (self)
 	{
-		LLRect curRect = getRect();
-		translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
+		self->childSetValue("Anim play btn", FALSE);
+		self->childSetValue("Anim audition btn", FALSE);
 	}
+}
 
-	// preload the animation
+// virtual
+BOOL LLPreviewAnim::postBuild()
+{
+	const LLInventoryItem* item = getItem();
 	if(item)
 	{
-		gAgent.getAvatarObject()->createMotion(item->getAssetUUID());
+		gAgent.getAvatarObject()->createMotion(item->getAssetUUID()); // preload the animation
+		childSetText("desc", item->getDescription());
 	}
+
+	childSetAction("Anim play btn",playAnim, this);
+	childSetAction("Anim audition btn",auditionAnim, this);
+
+	childSetCommitCallback("desc", LLPreview::onText, this);
+	childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
 	
-	switch ( activate ) 
+	return LLPreview::postBuild();
+}
+
+void LLPreviewAnim::activate(e_activation_type type)
+{
+	switch ( type ) 
 	{
-		case 1:
+		case PLAY:
 		{
 			playAnim( (void *) this );
 			break;
 		}
-		case 2:
+		case AUDITION:
 		{
 			auditionAnim( (void *) this );
 			break;
@@ -94,19 +106,6 @@ LLPreviewAnim::LLPreviewAnim(const std::string& name, const LLRect& rect, const
 	}
 }
 
-// static
-void LLPreviewAnim::endAnimCallback( void *userdata )
-{
-	LLHandle<LLFloater>* handlep = ((LLHandle<LLFloater>*)userdata);
-	LLFloater* self = handlep->get();
-	delete handlep; // done with the handle
-	if (self)
-	{
-		self->childSetValue("Anim play btn", FALSE);
-		self->childSetValue("Anim audition btn", FALSE);
-	}
-}
-
 // static
 void LLPreviewAnim::playAnim( void *userdata )
 {
diff --git a/indra/newview/llpreviewanim.h b/indra/newview/llpreviewanim.h
index fe794d4283..ca42b7e731 100644
--- a/indra/newview/llpreviewanim.h
+++ b/indra/newview/llpreviewanim.h
@@ -39,18 +39,17 @@
 class LLPreviewAnim : public LLPreview
 {
 public:
-	LLPreviewAnim(const std::string& name, const LLRect& rect, const std::string& title,
-					const LLUUID& item_uuid,
-					const S32&    activate,
-					const LLUUID& object_uuid = LLUUID::null);
+	enum e_activation_type { NONE = 0, PLAY = 1, AUDITION = 2 };
+	LLPreviewAnim(const LLSD& key);
 
 	static void playAnim( void* userdata );
 	static void auditionAnim( void* userdata );
 	static void endAnimCallback( void *userdata );
-
+	/*virtual*/	BOOL postBuild();
+	void activate(e_activation_type type);
+	
 protected:
 	virtual void onClose(bool app_quitting);
-	virtual const char *getTitleName() const { return "Animation"; }
 	
 	LLAnimPauseRequest	mPauseRequest;
 	LLUUID		mItemID;
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 76a9b80645..f973667fbd 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -41,6 +41,7 @@
 #include "lldarray.h"
 #include "llstring.h"
 #include "lldir.h"
+#include "llfloaterreg.h"
 #include "llmultigesture.h"
 #include "llvfile.h"
 
@@ -59,6 +60,8 @@
 #include "llnotify.h"
 #include "llradiogroup.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
 #include "lltextbox.h"
 #include "lluictrlfactory.h"
 #include "llviewerinventory.h"
@@ -70,12 +73,12 @@
 #include "llappviewer.h"			// gVFS
 #include "llanimstatelabels.h"
 #include "llresmgr.h"
+#include "lltrans.h"
 
 
-// *TODO: Translate?
-const std::string NONE_LABEL = "---";
-const std::string SHIFT_LABEL = "Shift";
-const std::string CTRL_LABEL = "Ctrl";
+std::string NONE_LABEL;
+std::string SHIFT_LABEL;
+std::string CTRL_LABEL;
 
 void dialog_refresh_all();
 
@@ -92,12 +95,9 @@ protected:
 
 void LLInventoryGestureAvailable::done()
 {
-	LLPreview* preview = NULL;
-	item_ref_t::iterator it = mComplete.begin();
-	item_ref_t::iterator end = mComplete.end();
-	for(; it < end; ++it)
+	for(item_ref_t::iterator it = mComplete.begin(); it != mComplete.end(); ++it)
 	{
-		preview = LLPreview::find((*it));
+		LLPreviewGesture* preview = LLFloaterReg::findTypedInstance<LLPreviewGesture>("preview_gesture", *it);
 		if(preview)
 		{
 			preview->refresh();
@@ -117,43 +117,16 @@ struct SortItemPtrsByName
 };
 
 // static
-LLPreviewGesture* LLPreviewGesture::show(const std::string& title, const LLUUID& item_id, const LLUUID& object_id, BOOL take_focus)
+LLPreviewGesture* LLPreviewGesture::show(const LLUUID& item_id, const LLUUID& object_id)
 {
-	LLPreviewGesture* previewp = (LLPreviewGesture*)LLPreview::find(item_id);
-	if (previewp)
+	LLPreviewGesture* preview = LLFloaterReg::showTypedInstance<LLPreviewGesture>("preview_gesture", LLSD(item_id), TAKE_FOCUS_YES);
+	if (!preview)
 	{
-		previewp->open();   /*Flawfinder: ignore*/
-		if (take_focus)
-		{
-			previewp->setFocus(TRUE);
-		}
-		return previewp;
-	}
-
-	LLPreviewGesture* self = new LLPreviewGesture();
-
-	// Finish internal construction
-	self->init(item_id, object_id);
-
-	// Builds and adds to gFloaterView
-	LLUICtrlFactory::getInstance()->buildFloater(self, "floater_preview_gesture.xml");
-	self->setTitle(title);
-
-	// Move window to top-left of screen
-	LLMultiFloater* hostp = self->getHost();
-	if (hostp == NULL)
-	{
-		LLRect r = self->getRect();
-		LLRect screen = gFloaterView->getRect();
-		r.setLeftTopAndSize(0, screen.getHeight(), r.getWidth(), r.getHeight());
-		self->setRect(r);
-	}
-	else
-	{
-		// re-add to host to update title
-		hostp->addFloater(self, TRUE);
+		return NULL;
 	}
-
+	
+	preview->setObjectID(object_id);
+	
 	// Start speculative download of sounds and animations
 	LLUUID animation_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_ANIMATION);
 	gInventory.startBackgroundFetch(animation_folder_id);
@@ -162,8 +135,8 @@ LLPreviewGesture* LLPreviewGesture::show(const std::string& title, const LLUUID&
 	gInventory.startBackgroundFetch(sound_folder_id);
 
 	// this will call refresh when we have everything.
-	LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem();
-	if(item && !item->isComplete())
+	LLViewerInventoryItem* item = (LLViewerInventoryItem*)preview->getItem();
+	if (item && !item->isComplete())
 	{
 		LLInventoryGestureAvailable* observer;
 		observer = new LLInventoryGestureAvailable();
@@ -174,18 +147,12 @@ LLPreviewGesture* LLPreviewGesture::show(const std::string& title, const LLUUID&
 	else
 	{
 		// not sure this is necessary.
-		self->refresh();
-	}
-
-	if (take_focus)
-	{
-		self->setFocus(TRUE);
+		preview->refresh();
 	}
 
-	return self;
+	return preview;
 }
 
-
 // virtual
 BOOL LLPreviewGesture::handleKeyHere(KEY key, MASK mask)
 {
@@ -334,7 +301,7 @@ bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const L
 	case 1:  // "No"
 		gGestureManager.stopGesture(mPreviewGesture);
 		mDirty = FALSE; // Force the dirty flag because user has clicked NO on confirm save dialog...
-		close();
+		closeFloater();
 		break;
 
 	case 2: // "Cancel"
@@ -347,8 +314,8 @@ bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const L
 }
 
 
-LLPreviewGesture::LLPreviewGesture()
-:	LLPreview("Gesture Preview"),
+LLPreviewGesture::LLPreviewGesture(const LLSD& key)
+:	LLPreview(key),
 	mTriggerEditor(NULL),
 	mModifierCombo(NULL),
 	mKeyCombo(NULL),
@@ -368,6 +335,12 @@ LLPreviewGesture::LLPreviewGesture()
 	mPreviewGesture(NULL),
 	mDirty(FALSE)
 {
+	NONE_LABEL =  LLTrans::getString("---");
+	SHIFT_LABEL = LLTrans::getString("KBShift");
+	CTRL_LABEL = LLTrans::getString("KBCtrl");
+	
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_gesture.xml", FALSE);
+
 }
 
 
@@ -396,10 +369,9 @@ BOOL LLPreviewGesture::postBuild()
 	LLCheckBoxCtrl* check;
 
 	edit = getChild<LLLineEditor>("trigger_editor");
-	edit->setKeystrokeCallback(onKeystrokeCommit);
-	edit->setCommitCallback(onCommitSetDirty);
+	edit->setKeystrokeCallback(onKeystrokeCommit, this);
+	edit->setCommitCallback(onCommitSetDirty, this);
 	edit->setCommitOnFocusLost(TRUE);
-	edit->setCallbackUserData(this);
 	edit->setIgnoreTab(TRUE);
 	mTriggerEditor = edit;
 
@@ -409,56 +381,47 @@ BOOL LLPreviewGesture::postBuild()
 
 	edit = getChild<LLLineEditor>("replace_editor");
 	edit->setEnabled(FALSE);
-	edit->setKeystrokeCallback(onKeystrokeCommit);
-	edit->setCommitCallback(onCommitSetDirty);
+	edit->setKeystrokeCallback(onKeystrokeCommit, this);
+	edit->setCommitCallback(onCommitSetDirty, this);
 	edit->setCommitOnFocusLost(TRUE);
-	edit->setCallbackUserData(this);
 	edit->setIgnoreTab(TRUE);
 	mReplaceEditor = edit;
 
 	combo = getChild<LLComboBox>( "modifier_combo");
-	combo->setCommitCallback(onCommitSetDirty);
-	combo->setCallbackUserData(this);
+	combo->setCommitCallback(onCommitSetDirty, this);
 	mModifierCombo = combo;
 
 	combo = getChild<LLComboBox>( "key_combo");
-	combo->setCommitCallback(onCommitSetDirty);
-	combo->setCallbackUserData(this);
+	combo->setCommitCallback(onCommitSetDirty, this);
 	mKeyCombo = combo;
 
 	list = getChild<LLScrollListCtrl>("library_list");
-	list->setCommitCallback(onCommitLibrary);
-	list->setDoubleClickCallback(onClickAdd);
-	list->setCallbackUserData(this);
+	list->setCommitCallback(onCommitLibrary, this);
+	list->setDoubleClickCallback(onClickAdd, this);
 	mLibraryList = list;
 
 	btn = getChild<LLButton>( "add_btn");
-	btn->setClickedCallback(onClickAdd);
-	btn->setCallbackUserData(this);
+	btn->setClickedCallback(onClickAdd, this);
 	btn->setEnabled(FALSE);
 	mAddBtn = btn;
 
 	btn = getChild<LLButton>( "up_btn");
-	btn->setClickedCallback(onClickUp);
-	btn->setCallbackUserData(this);
+	btn->setClickedCallback(onClickUp, this);
 	btn->setEnabled(FALSE);
 	mUpBtn = btn;
 
 	btn = getChild<LLButton>( "down_btn");
-	btn->setClickedCallback(onClickDown);
-	btn->setCallbackUserData(this);
+	btn->setClickedCallback(onClickDown, this);
 	btn->setEnabled(FALSE);
 	mDownBtn = btn;
 
 	btn = getChild<LLButton>( "delete_btn");
-	btn->setClickedCallback(onClickDelete);
-	btn->setCallbackUserData(this);
+	btn->setClickedCallback(onClickDelete, this);
 	btn->setEnabled(FALSE);
 	mDeleteBtn = btn;
 
 	list = getChild<LLScrollListCtrl>("step_list");
-	list->setCommitCallback(onCommitStep);
-	list->setCallbackUserData(this);
+	list->setCommitCallback(onCommitStep, this);
 	mStepList = list;
 
 	// Options
@@ -468,69 +431,59 @@ BOOL LLPreviewGesture::postBuild()
 
 	combo = getChild<LLComboBox>( "animation_list");
 	combo->setVisible(FALSE);
-	combo->setCommitCallback(onCommitAnimation);
-	combo->setCallbackUserData(this);
+	combo->setCommitCallback(onCommitAnimation, this);
 	mAnimationCombo = combo;
 
 	LLRadioGroup* group;
 	group = getChild<LLRadioGroup>("animation_trigger_type");
 	group->setVisible(FALSE);
-	group->setCommitCallback(onCommitAnimationTrigger);
-	group->setCallbackUserData(this);
+	group->setCommitCallback(onCommitAnimationTrigger, this);
 	mAnimationRadio = group;
 
 	combo = getChild<LLComboBox>( "sound_list");
 	combo->setVisible(FALSE);
-	combo->setCommitCallback(onCommitSound);
-	combo->setCallbackUserData(this);
+	combo->setCommitCallback(onCommitSound, this);
 	mSoundCombo = combo;
 
 	edit = getChild<LLLineEditor>("chat_editor");
 	edit->setVisible(FALSE);
-	edit->setCommitCallback(onCommitChat);
-	//edit->setKeystrokeCallback(onKeystrokeCommit);
+	edit->setCommitCallback(onCommitChat, this);
+	//edit->setKeystrokeCallback(onKeystrokeCommit, this);
 	edit->setCommitOnFocusLost(TRUE);
-	edit->setCallbackUserData(this);
 	edit->setIgnoreTab(TRUE);
 	mChatEditor = edit;
 
 	check = getChild<LLCheckBoxCtrl>( "wait_anim_check");
 	check->setVisible(FALSE);
-	check->setCommitCallback(onCommitWait);
-	check->setCallbackUserData(this);
+	check->setCommitCallback(onCommitWait, this);
 	mWaitAnimCheck = check;
 
 	check = getChild<LLCheckBoxCtrl>( "wait_time_check");
 	check->setVisible(FALSE);
-	check->setCommitCallback(onCommitWait);
-	check->setCallbackUserData(this);
+	check->setCommitCallback(onCommitWait, this);
 	mWaitTimeCheck = check;
 
 	edit = getChild<LLLineEditor>("wait_time_editor");
 	edit->setEnabled(FALSE);
 	edit->setVisible(FALSE);
 	edit->setPrevalidate(LLLineEditor::prevalidateFloat);
-//	edit->setKeystrokeCallback(onKeystrokeCommit);
+//	edit->setKeystrokeCallback(onKeystrokeCommit, this);
 	edit->setCommitOnFocusLost(TRUE);
-	edit->setCommitCallback(onCommitWaitTime);
-	edit->setCallbackUserData(this);
+	edit->setCommitCallback(onCommitWaitTime, this);
 	edit->setIgnoreTab(TRUE);
 	mWaitTimeEditor = edit;
 
 	// Buttons at the bottom
 	check = getChild<LLCheckBoxCtrl>( "active_check");
-	check->setCommitCallback(onCommitActive);
-	check->setCallbackUserData(this);
+	check->setCommitCallback(onCommitActive, this);
 	mActiveCheck = check;
 
 	btn = getChild<LLButton>( "save_btn");
-	btn->setClickedCallback(onClickSave);
-	btn->setCallbackUserData(this);
+	btn->setClickedCallback(onClickSave, this);
 	mSaveBtn = btn;
 
 	btn = getChild<LLButton>( "preview_btn");
-	btn->setClickedCallback(onClickPreview);
-	btn->setCallbackUserData(this);
+	btn->setClickedCallback(onClickPreview, this);
 	mPreviewBtn = btn;
 
 
@@ -540,7 +493,6 @@ BOOL LLPreviewGesture::postBuild()
 	addAnimations();
 	addSounds();
 
-
 	const LLInventoryItem* item = getItem();
 
 	if (item) 
@@ -550,7 +502,7 @@ BOOL LLPreviewGesture::postBuild()
 		childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
 	}
 
-	return TRUE;
+	return LLPreview::postBuild();
 }
 
 
@@ -680,16 +632,9 @@ void LLPreviewGesture::addSounds()
 }
 
 
-void LLPreviewGesture::init(const LLUUID& item_id, const LLUUID& object_id)
-{
-	// Sets ID and adds to instance list
-	setItemID(item_id);
-	setObjectID(object_id);
-}
-
-
 void LLPreviewGesture::refresh()
 {
+	LLPreview::refresh();
 	// If previewing or item is incomplete, all controls are disabled
 	LLViewerInventoryItem* item = (LLViewerInventoryItem*)getItem();
 	bool is_complete = (item && item->isComplete()) ? true : false;
@@ -850,7 +795,7 @@ void LLPreviewGesture::initDefaultGesture()
 	item = addStep( STEP_ANIMATION );
 	LLGestureStepAnimation* anim = (LLGestureStepAnimation*)item->getUserdata();
 	anim->mAnimAssetID = ANIM_AGENT_HELLO;
-	anim->mAnimName = "Wave";
+	anim->mAnimName = LLTrans::getString("Wave");
 	updateLabel(item);
 
 	item = addStep( STEP_WAIT );
@@ -860,7 +805,7 @@ void LLPreviewGesture::initDefaultGesture()
 
 	item = addStep( STEP_CHAT );
 	LLGestureStepChat* chat_step = (LLGestureStepChat*)item->getUserdata();
-	chat_step->mChatText = "Hello, avatar!";
+	chat_step->mChatText =  LLTrans::getString("HelloAvatar");
 	updateLabel(item);
 
 	// Start with item list selected
@@ -874,7 +819,11 @@ void LLPreviewGesture::initDefaultGesture()
 void LLPreviewGesture::loadAsset()
 {
 	const LLInventoryItem* item = getItem();
-	if (!item) return;
+	if (!item) 
+	{
+		mAssetStatus = PREVIEW_ASSET_ERROR;
+		return;
+	}
 
 	LLUUID asset_id = item->getAssetUUID();
 	if (asset_id.isNull())
@@ -883,6 +832,7 @@ void LLPreviewGesture::loadAsset()
 		// Blank gesture will be fine.
 		initDefaultGesture();
 		refresh();
+		mAssetStatus = PREVIEW_ASSET_LOADED;
 		return;
 	}
 
@@ -910,11 +860,10 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
 									   void* user_data, S32 status, LLExtStat ext_status)
 {
 	LLUUID* item_idp = (LLUUID*)user_data;
-	LLPreview* preview = LLPreview::find(*item_idp);
-	if (preview)
-	{
-		LLPreviewGesture* self = (LLPreviewGesture*)preview;
 
+	LLPreviewGesture* self = LLFloaterReg::findTypedInstance<LLPreviewGesture>("preview_gesture", *item_idp);
+	if (self)
+	{
 		if (0 == status)
 		{
 			LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
@@ -1016,7 +965,7 @@ void LLPreviewGesture::loadUIFromGesture(LLMultiGesture* gesture)
 		LLGestureStep* step = gesture->mSteps[i];
 
 		LLGestureStep* new_step = NULL;
-
+		
 		switch(step->getType())
 		{
 		case STEP_ANIMATION:
@@ -1061,7 +1010,7 @@ void LLPreviewGesture::loadUIFromGesture(LLMultiGesture* gesture)
 
 		// Create an enabled item with this step
 		LLSD row;
-		row["columns"][0]["value"] = new_step->getLabel();
+		row["columns"][0]["value"] = getLabel( new_step->getLabel());
 		row["columns"][0]["font"] = "SANSSERIF_SMALL";
 		LLScrollListItem* item = mStepList->addElement(row);
 		item->setUserdata(new_step);
@@ -1262,10 +1211,10 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data,
 		}
 
 		// Find our window and close it if requested.
-		LLPreviewGesture* previewp = (LLPreviewGesture*)LLPreview::find(info->mItemUUID);
+		LLPreviewGesture* previewp = LLFloaterReg::findTypedInstance<LLPreviewGesture>("preview_gesture", info->mItemUUID);
 		if (previewp && previewp->mCloseAfterSave)
 		{
-			previewp->close();
+			previewp->closeFloater();
 		}
 	}
 	else
@@ -1374,7 +1323,7 @@ void LLPreviewGesture::updateLabel(LLScrollListItem* item)
 
 	LLScrollListCell* cell = item->getColumn(0);
 	LLScrollListText* text_cell = (LLScrollListText*)cell;
-	std::string label = step->getLabel();
+	std::string label = getLabel( step->getLabel());
 	text_cell->setText(label);
 }
 
@@ -1619,24 +1568,26 @@ LLScrollListItem* LLPreviewGesture::addStep( const EStepType step_type )
 	{
 		case STEP_ANIMATION:
 			step = new LLGestureStepAnimation();
+
 			break;
 		case STEP_SOUND:
 			step = new LLGestureStepSound();
 			break;
 		case STEP_CHAT:
-			step = new LLGestureStepChat();
+			step = new LLGestureStepChat();	
 			break;
 		case STEP_WAIT:
-			step = new LLGestureStepWait();
+			step = new LLGestureStepWait();			
 			break;
 		default:
 			llerrs << "Unknown step type: " << (S32)step_type << llendl;
 			return NULL;
 	}
 
+
 	// Create an enabled item with this step
 	LLSD row;
-	row["columns"][0]["value"] = step->getLabel();
+	row["columns"][0]["value"] = getLabel(step->getLabel());
 	row["columns"][0]["font"] = "SANSSERIF_SMALL";
 	LLScrollListItem* step_item = mStepList->addElement(row);
 	step_item->setUserdata(step);
@@ -1650,6 +1601,42 @@ LLScrollListItem* LLPreviewGesture::addStep( const EStepType step_type )
 	return step_item;
 }
 
+// static
+std::string LLPreviewGesture::getLabel(std::vector<std::string> labels)
+{
+	std::vector<std::string> v_labels = labels ;
+	std::string result("");
+	
+	if( v_labels.size() != 2)
+	{
+		return result;
+	}
+	
+	if(v_labels[0]=="Chat")
+	{
+		result=LLTrans::getString("Chat");
+	}
+    else if(v_labels[0]=="Sound")	
+	{
+		result=LLTrans::getString("Sound");
+	}
+	else if(v_labels[0]=="Wait")
+	{
+		result=LLTrans::getString("Wait");
+	}
+	else if(v_labels[0]=="AnimFlagStop")
+	{
+		result=LLTrans::getString("AnimFlagStop");
+	}
+	else if(v_labels[0]=="AnimFlagStart")
+	{
+		result=LLTrans::getString("AnimFlagStart");
+	}
+
+	result.append(v_labels[1]);
+	return result;
+	
+}
 // static
 void LLPreviewGesture::onClickUp(void* data)
 {
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index c245c0e8da..d3e9c77789 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -52,40 +52,38 @@ class LLPreviewGesture : public LLPreview
 public:
 	// Pass an object_id if this gesture is inside an object in the world,
 	// otherwise use LLUUID::null.
-	static LLPreviewGesture* show(const std::string& title, const LLUUID& item_id, const LLUUID& object_id, BOOL take_focus = TRUE);
+	static LLPreviewGesture* show(const LLUUID& item_id, const LLUUID& object_id);
+
+	LLPreviewGesture(const LLSD& key);
+	virtual ~LLPreviewGesture();
 
 	// LLView
-	virtual BOOL handleKeyHere(KEY key, MASK mask);
-	virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+	/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
+	/*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
 									 EDragAndDropType cargo_type,
 									 void* cargo_data,
 									 EAcceptance* accept,
 									 std::string& tooltip_msg);
 
 	// LLPanel
-	virtual BOOL postBuild();
+	/*virtual*/ BOOL postBuild();
 
 	// LLFloater
-	virtual BOOL canClose();
-	virtual void setMinimized(BOOL minimize);
-	virtual void onClose(bool app_quitting);
-	virtual void onUpdateSucceeded();
+	/*virtual*/ BOOL canClose();
+	/*virtual*/ void setMinimized(BOOL minimize);
+	/*virtual*/ void onClose(bool app_quitting);
+	/*virtual*/ void onUpdateSucceeded();
+	/*virtual*/ void refresh();
+
 	
 
 protected:
-	LLPreviewGesture();
-	virtual ~LLPreviewGesture();
-
-	void init(const LLUUID& item_id, const LLUUID& object_id);
-
 	// Populate various comboboxes
 	void addModifiers();
 	void addKeys();
 	void addAnimations();
 	void addSounds();
 
-	void refresh();
-
 	void initDefaultGesture();
 
 	void loadAsset();
@@ -112,6 +110,7 @@ protected:
 	// "Sound", "Chat", or "Wait"
 	LLScrollListItem* addStep(const enum EStepType step_type);
 
+	static std::string getLabel(std::vector<std::string> labels);
 	static void updateLabel(LLScrollListItem* item);
 
 	static void onCommitSetDirty(LLUICtrl* ctrl, void* data);
@@ -139,8 +138,6 @@ protected:
 
 	static void onDonePreview(LLMultiGesture* gesture, void* data);
 
-	virtual const char *getTitleName() const { return "Gesture"; }
-
 protected:
 	// LLPreview contains mDescEditor
 	LLLineEditor*	mTriggerEditor;
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 4abe390bc5..f3d0dc538d 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -40,6 +40,7 @@
 #include "llassetuploadresponders.h"
 #include "llviewerwindow.h"
 #include "llbutton.h"
+#include "llfloaterreg.h"
 #include "llinventorymodel.h"
 #include "lllineeditor.h"
 #include "llnotify.h"
@@ -61,122 +62,71 @@
 #include "lllineeditor.h"
 #include "lluictrlfactory.h"
 
-///----------------------------------------------------------------------------
-/// Local function declarations, constants, enums, and typedefs
-///----------------------------------------------------------------------------
-
-const S32 PREVIEW_MIN_WIDTH =
-	2 * PREVIEW_BORDER +
-	2 * PREVIEW_BUTTON_WIDTH + 
-	PREVIEW_PAD + RESIZE_HANDLE_WIDTH +
-	PREVIEW_PAD;
-const S32 PREVIEW_MIN_HEIGHT = 
-	2 * PREVIEW_BORDER +
-	3*(20 + PREVIEW_PAD) +
-	2 * SCROLLBAR_SIZE + 128;
-
 ///----------------------------------------------------------------------------
 /// Class LLPreviewNotecard
 ///----------------------------------------------------------------------------
 
 // Default constructor
-LLPreviewNotecard::LLPreviewNotecard(const std::string& name,
-									 const LLRect& rect,
-									 const std::string& title,
-									 const LLUUID& item_id, 
-									 const LLUUID& object_id,
-									 const LLUUID& asset_id,
-									 BOOL show_keep_discard,
-									 LLPointer<LLViewerInventoryItem> inv_item) :
-	LLPreview(name, rect, title, item_id, object_id, TRUE,
-			  PREVIEW_MIN_WIDTH,
-			  PREVIEW_MIN_HEIGHT,
-			  inv_item),
-	mAssetID( asset_id ),
-	mNotecardItemID(item_id),
-	mObjectID(object_id)
+LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id, 
+	: LLPreview( key )
+{
+	const LLInventoryItem *item = getItem();
+	if (item)
+	{
+		mShowKeepDiscard = item->getPermissions().getCreator() != gAgent.getID();
+		//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml", FALSE);
+		mAssetID = item->getAssetUUID();
+	}	
+}
+
+LLPreviewNotecard::~LLPreviewNotecard()
 {
-	LLRect curRect = rect;
+}
 
-	if (show_keep_discard)
+BOOL LLPreviewNotecard::postBuild()
+{
+	LLViewerTextEditor *ed = getChild<LLViewerTextEditor>("Notecard Editor");
+	if (ed)
+	{
+		ed->setNotecardInfo(mItemUUID, mObjectID, getKey());
+		ed->makePristine();
+	}
+	if (mShowKeepDiscard)
 	{
-		LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard_keep_discard.xml");
 		childSetAction("Keep",onKeepBtn,this);
 		childSetAction("Discard",onDiscardBtn,this);
 	}
 	else
 	{
-		LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml");
-		childSetAction("Save",onClickSave,this);
-		
-		if( mAssetID.isNull() )
-		{
-			const LLInventoryItem* item = getItem();
-			if( item )
-			{
-				mAssetID = item->getAssetUUID();
-			}
-		}
-	}	
-
-	// only assert shape if not hosted in a multifloater
-	if (!getHost())
-	{
-		reshape(curRect.getWidth(), curRect.getHeight(), TRUE);
-		setRect(curRect);
+		getChild<LLButton>("Keep")->setLabel(getString("Save"));
+		childSetAction("Keep",onClickSave,this);
+		childSetVisible("Discard", false);
 	}
-			
+
 	childSetVisible("lock", FALSE);	
-	
+
 	const LLInventoryItem* item = getItem();
-	
+
 	childSetCommitCallback("desc", LLPreview::onText, this);
 	if (item)
 		childSetText("desc", item->getDescription());
 	childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
 
-	setTitle(title);
-	
 	LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
 
 	if (editor)
 	{
 		editor->setWordWrap(TRUE);
-		editor->setSourceID(item_id);
 		editor->setHandleEditKeysDirectly(TRUE);
 	}
-
-	gAgent.changeCameraToDefault();
-}
-
-LLPreviewNotecard::~LLPreviewNotecard()
-{
-}
-
-BOOL LLPreviewNotecard::postBuild()
-{
-	LLViewerTextEditor *ed = getChild<LLViewerTextEditor>("Notecard Editor");
-	if (ed)
-	{
-		ed->setNotecardInfo(mNotecardItemID, mObjectID);
-		ed->makePristine();
-	}
-	return TRUE;
+	
+	return LLPreview::postBuild();
 }
 
-bool LLPreviewNotecard::saveItem(LLPointer<LLInventoryItem>* itemptr)
+bool LLPreviewNotecard::saveItem()
 {
-	LLInventoryItem* item = NULL;
-	if (itemptr && itemptr->notNull())
-	{
-		item = (LLInventoryItem*)(*itemptr);
-	}
-	bool res = saveIfNeeded(item);
-	if (res)
-	{
-		delete itemptr;
-	}
-	return res;
+	LLInventoryItem* item = gInventory.getItem(mItemUUID);
+	return saveIfNeeded(item);
 }
 
 void LLPreviewNotecard::setEnabled( BOOL enabled )
@@ -187,7 +137,7 @@ void LLPreviewNotecard::setEnabled( BOOL enabled )
 	childSetEnabled("Notecard Editor", enabled);
 	childSetVisible("lock", !enabled);
 	childSetEnabled("desc", enabled);
-	childSetEnabled("Save", enabled && editor && (!editor->isPristine()));
+	childSetEnabled("Keep", enabled && editor && (!editor->isPristine()));
 
 }
 
@@ -195,13 +145,10 @@ void LLPreviewNotecard::setEnabled( BOOL enabled )
 void LLPreviewNotecard::draw()
 {
 	
-
-	//childSetFocus("Save", FALSE);
-
 	LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
 	BOOL script_changed = !editor->isPristine();
 	
-	childSetEnabled("Save", script_changed && getEnabled());
+	childSetEnabled("Keep", script_changed && getEnabled());
 	
 	LLPreview::draw();
 }
@@ -255,8 +202,13 @@ bool LLPreviewNotecard::hasEmbeddedInventory()
 	return editor->hasEmbeddedInventory();
 }
 
-void LLPreviewNotecard::refreshFromInventory()
+void LLPreviewNotecard::refreshFromInventory(const LLUUID& new_item_id)
 {
+	if (new_item_id.notNull())
+	{
+		mItemUUID = new_item_id;
+		setKey(LLSD(new_item_id));
+	}
 	lldebugs << "LLPreviewNotecard::refreshFromInventory()" << llendl;
 	loadAsset();
 }
@@ -287,7 +239,6 @@ void LLPreviewNotecard::loadAsset()
 			}
 			else
 			{
-				LLUUID* new_uuid = new LLUUID(mItemUUID);
 				LLHost source_sim = LLHost::invalid;
 				if (mObjectUUID.notNull())
 				{
@@ -305,7 +256,6 @@ void LLPreviewNotecard::loadAsset()
 						editor->makePristine();
 						editor->setEnabled(FALSE);
 						mAssetStatus = PREVIEW_ASSET_LOADED;
-						delete new_uuid;
 						return;
 					}
 				}
@@ -318,7 +268,7 @@ void LLPreviewNotecard::loadAsset()
 												item->getAssetUUID(),
 												item->getType(),
 												&onLoadComplete,
-												(void*)new_uuid,
+												(void*)new LLUUID(mItemUUID),
 												TRUE);
 				mAssetStatus = PREVIEW_ASSET_LOADING;
 			}
@@ -355,7 +305,8 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
 {
 	llinfos << "LLPreviewNotecard::onLoadComplete()" << llendl;
 	LLUUID* item_id = (LLUUID*)user_data;
-	LLPreviewNotecard* preview = LLPreviewNotecard::getInstance(*item_id);
+	
+	LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(*item_id));
 	if( preview )
 	{
 		if(0 == status)
@@ -419,18 +370,6 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
 	delete item_id;
 }
 
-// static
-LLPreviewNotecard* LLPreviewNotecard::getInstance(const LLUUID& item_id)
-{
-	LLPreview* instance = NULL;
-	preview_map_t::iterator found_it = LLPreview::sInstances.find(item_id);
-	if(found_it != LLPreview::sInstances.end())
-	{
-		instance = found_it->second;
-	}
-	return (LLPreviewNotecard*)instance;
-}
-
 // static
 void LLPreviewNotecard::onClickSave(void* user_data)
 {
@@ -590,10 +529,11 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
 		}
 		
 		// Find our window and close it if requested.
-		LLPreviewNotecard* previewp = (LLPreviewNotecard*)LLPreview::find(info->mItemUUID);
+
+		LLPreviewNotecard* previewp = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", info->mItemUUID);
 		if (previewp && previewp->mCloseAfterSave)
 		{
-			previewp->close();
+			previewp->closeFloater();
 		}
 	}
 	else
@@ -624,7 +564,7 @@ bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const
 
 	case 1:  // "No"
 		mForceClose = TRUE;
-		close();
+		closeFloater();
 		break;
 
 	case 2: // "Cancel"
@@ -636,16 +576,4 @@ bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const
 	return false;
 }
 
-void LLPreviewNotecard::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
-	LLPreview::reshape( width, height, called_from_parent );
-
-	if( !isMinimized() )
-	{
-		// So that next time you open a script it will have the same height and width 
-		// (although not the same position).
-		gSavedSettings.setRect("NotecardEditorRect", getRect());
-	}
-}
-
 // EOF
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index f5cd2bb2a9..2a008be1e6 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -49,28 +49,21 @@ class LLButton;
 class LLPreviewNotecard : public LLPreview
 {
 public:
-	LLPreviewNotecard(const std::string& name, const LLRect& rect, const std::string& title,
-					  const LLUUID& item_id,
-					  const LLUUID& object_id = LLUUID::null,
-					  const LLUUID& asset_id = LLUUID::null,
-					  BOOL show_keep_discard = FALSE,
-					  LLPointer<LLViewerInventoryItem> inv_item = NULL);
+	LLPreviewNotecard(const LLSD& key);
 	virtual ~LLPreviewNotecard();
 	
-	// llpreview	
-	virtual bool saveItem(LLPointer<LLInventoryItem>* itemptr);
+	bool saveItem();
 
 	// llview
 	virtual void draw();
 	virtual BOOL handleKeyHere(KEY key, MASK mask);
 	virtual void setEnabled( BOOL enabled );
-	virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 
 	// llfloater
 	virtual BOOL canClose();
 
 	// llpanel
-	virtual BOOL	postBuild();
+	virtual BOOL postBuild();
 
 	// reach into the text editor, and grab the drag item
 	const LLInventoryItem* getDragItem();
@@ -82,15 +75,13 @@ public:
 	// After saving a notecard, the tcp based upload system will
 	// change the asset, therefore, we need to re-fetch it from the
 	// asset system. :(
-	void refreshFromInventory();
+	void refreshFromInventory(const LLUUID& item_id = LLUUID::null);
 
 protected:
 
 	virtual void loadAsset();
 	bool saveIfNeeded(LLInventoryItem* copyitem = NULL);
 
-	static LLPreviewNotecard* getInstance(const LLUUID& uuid);
-
 	static void onLoadComplete(LLVFS *vfs,
 							   const LLUUID& asset_uuid,
 							   LLAssetType::EType type,
@@ -104,16 +95,14 @@ protected:
 
 	bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response);
 
-	virtual const char *getTitleName() const { return "Note"; }
-
 protected:
 	LLViewerTextEditor* mEditor;
 	LLButton* mSaveBtn;
 
 	LLUUID mAssetID;
 
-	LLUUID mNotecardItemID;
 	LLUUID mObjectID;
+	BOOL mShowKeepDiscard;
 };
 
 
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 0bacb95d2d..025aa25170 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -40,6 +40,7 @@
 #include "llcheckboxctrl.h"
 #include "llcombobox.h"
 #include "lldir.h"
+#include "llfloaterreg.h"
 #include "llinventorymodel.h"
 #include "llkeyboard.h"
 #include "lllineeditor.h"
@@ -48,6 +49,8 @@
 #include "llscrollbar.h"
 #include "llscrollcontainer.h"
 #include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
 #include "llslider.h"
 #include "lscript_rt_interface.h"
 #include "lscript_export.h"
@@ -87,7 +90,7 @@
 #include "llappviewer.h"
 
 #include "llpanelinventory.h"
-
+#include "lltrans.h"
 
 const std::string HELLO_LSL =
 	"default\n"
@@ -109,34 +112,8 @@ const std::string DEFAULT_SCRIPT_DESC = "(No Description)"; // *TODO:Translate?
 
 // Description and header information
 
-const S32 SCRIPT_BORDER = 4;
-const S32 SCRIPT_PAD = 5;
-const S32 SCRIPT_BUTTON_WIDTH = 128;
-const S32 SCRIPT_BUTTON_HEIGHT = 24;	// HACK: Use BTN_HEIGHT where possible.
-const S32 LINE_COLUMN_HEIGHT = 14;
-const S32 BTN_PAD = 8;
-
-const S32 SCRIPT_EDITOR_MIN_HEIGHT = 2 * SCROLLBAR_SIZE + 2 * LLPANEL_BORDER_WIDTH + 128;
-
-const S32 SCRIPT_MIN_WIDTH = 
-	2 * SCRIPT_BORDER + 
-	2 * SCRIPT_BUTTON_WIDTH + 
-	SCRIPT_PAD + RESIZE_HANDLE_WIDTH +
-	SCRIPT_PAD;
-
-const S32 SCRIPT_MIN_HEIGHT = 
-	2 * SCRIPT_BORDER +
-	3*(SCRIPT_BUTTON_HEIGHT + SCRIPT_PAD) +
-	LINE_COLUMN_HEIGHT +
-	SCRIPT_EDITOR_MIN_HEIGHT;
-
 const S32 MAX_EXPORT_SIZE = 1000;
 
-const S32 SCRIPT_SEARCH_WIDTH = 300;
-const S32 SCRIPT_SEARCH_HEIGHT = 120;
-const S32 SCRIPT_SEARCH_LABEL_WIDTH = 50;
-const S32 SCRIPT_SEARCH_BUTTON_WIDTH = 80;
-const S32 TEXT_EDIT_COLUMN_HEIGHT = 16;
 const S32 MAX_HISTORY_COUNT = 10;
 const F32 LIVE_HELP_REFRESH_TIME = 1.f;
 
@@ -152,9 +129,10 @@ static bool have_script_upload_cap(LLUUID& object_id)
 class LLFloaterScriptSearch : public LLFloater
 {
 public:
-	LLFloaterScriptSearch(std::string title, LLRect rect, LLScriptEdCore* editor_core);
+	LLFloaterScriptSearch(LLScriptEdCore* editor_core);
 	~LLFloaterScriptSearch();
 
+	/*virtual*/	BOOL	postBuild();
 	static void show(LLScriptEdCore* editor_core);
 	static void onBtnSearch(void* userdata);
 	void handleBtnSearch();
@@ -168,8 +146,6 @@ public:
 	LLScriptEdCore* getEditorCore() { return mEditorCore; }
 	static LLFloaterScriptSearch* getInstance() { return sInstance; }
 
-	void open();		/*Flawfinder: ignore*/
-
 private:
 
 	LLScriptEdCore* mEditorCore;
@@ -179,28 +155,14 @@ private:
 
 LLFloaterScriptSearch* LLFloaterScriptSearch::sInstance = NULL;
 
-LLFloaterScriptSearch::LLFloaterScriptSearch(std::string title, LLRect rect, LLScriptEdCore* editor_core)
-	: LLFloater("script	search",rect,title), mEditorCore(editor_core)
+LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core)
+:	LLFloater(),
+	mEditorCore(editor_core)
 {
-	
 	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_search.xml");
 
-	childSetAction("search_btn", onBtnSearch,this);
-	childSetAction("replace_btn", onBtnReplace,this);
-	childSetAction("replace_all_btn", onBtnReplaceAll,this);
-	
-	setDefaultBtn("search_btn");
-
-	if (!getHost())
-	{
-		LLRect curRect = getRect();
-		translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
-	}
-	
 	sInstance = this;
-
-	childSetFocus("search_text", TRUE);
-
+	
 	// find floater in which script panel is embedded
 	LLView* viewp = (LLView*)editor_core;
 	while(viewp)
@@ -215,26 +177,33 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(std::string title, LLRect rect, LLS
 	}
 }
 
+BOOL LLFloaterScriptSearch::postBuild()
+{
+	childSetAction("search_btn", onBtnSearch,this);
+	childSetAction("replace_btn", onBtnReplace,this);
+	childSetAction("replace_all_btn", onBtnReplaceAll,this);
+
+	setDefaultBtn("search_btn");
+
+	return TRUE;
+}
+
 //static 
 void LLFloaterScriptSearch::show(LLScriptEdCore* editor_core)
 {
 	if (sInstance && sInstance->mEditorCore && sInstance->mEditorCore != editor_core)
 	{
-		sInstance->close();
+		sInstance->closeFloater();
 		delete sInstance;
 	}
 
 	if (!sInstance)
 	{
-		S32 left = 0;
-		S32 top = 0;
-		gFloaterView->getNewFloaterPosition(&left,&top);
-
 		// sInstance will be assigned in the constructor.
-		new LLFloaterScriptSearch("Script Search",LLRect(left,top,left + SCRIPT_SEARCH_WIDTH,top - SCRIPT_SEARCH_HEIGHT),editor_core);
+		new LLFloaterScriptSearch(editor_core);
 	}
 
-	sInstance->open();		/*Flawfinder: ignore*/
+	sInstance->openFloater();
 }
 
 LLFloaterScriptSearch::~LLFloaterScriptSearch()
@@ -281,19 +250,11 @@ void LLFloaterScriptSearch::handleBtnReplaceAll()
 	mEditorCore->mEditor->replaceTextAll(childGetText("search_text"), childGetText("replace_text"), caseChk->get());
 }
 
-void LLFloaterScriptSearch::open()		/*Flawfinder: ignore*/
-{
-	LLFloater::open();		/*Flawfinder: ignore*/
-	childSetFocus("search_text", TRUE); 
-}
-
 /// ---------------------------------------------------------------------------
 /// LLScriptEdCore
 /// ---------------------------------------------------------------------------
 
 LLScriptEdCore::LLScriptEdCore(
-	const std::string& name,
-	const LLRect& rect,
 	const std::string& sample,
 	const std::string& help_url,
 	const LLHandle<LLFloater>& floater_handle,
@@ -303,7 +264,7 @@ LLScriptEdCore::LLScriptEdCore(
 	void* userdata,
 	S32 bottom_pad)
 	:
-	LLPanel( std::string("name"), rect ),
+	LLPanel(),
 	mSampleText(sample),
 	mHelpURL(help_url),
 	mEditor( NULL ),
@@ -323,18 +284,6 @@ LLScriptEdCore::LLScriptEdCore(
 	
 	LLUICtrlFactory::getInstance()->buildPanel(this, "floater_script_ed_panel.xml");
 
-	mErrorList = getChild<LLScrollListCtrl>("lsl errors");
-
-	mFunctions = getChild<LLComboBox>( "Insert...");
-	
-	childSetCommitCallback("Insert...", &LLScriptEdCore::onBtnInsertFunction, this);
-
-	mEditor = getChild<LLViewerTextEditor>("Script Editor");
-	mEditor->setFollowsAll();
-	mEditor->setHandleEditKeysDirectly(TRUE);
-	mEditor->setEnabled(TRUE);
-	mEditor->setWordWrap(TRUE);
-
 	std::vector<std::string> funcs;
 	std::vector<std::string> tooltips;
 	for (S32 i = 0; i < gScriptLibrary.mNextNumber; i++)
@@ -366,20 +315,6 @@ LLScriptEdCore::LLScriptEdCore(
 		if (token->getColor() != color)
 			mFunctions->add(wstring_to_utf8str(token->getToken()));
 	}
-
-
-	childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this);
-	childSetAction("Save_btn", onBtnSave,this);
-
-	initMenu();
-		
-	// Do the work that addTabPanel() normally does.
-	//LLRect tab_panel_rect( 0, getRect().getHeight(), getRect().getWidth(), 0 );
-	//tab_panel_rect.stretch( -LLPANEL_BORDER_WIDTH );
-	//mCodePanel->setFollowsAll();
-	//mCodePanel->translate( tab_panel_rect.mLeft - mCodePanel->getRect().mLeft, tab_panel_rect.mBottom - mCodePanel->getRect().mBottom);
-	//mCodePanel->reshape( tab_panel_rect.getWidth(), tab_panel_rect.getHeight(), TRUE );
-	
 }
 
 LLScriptEdCore::~LLScriptEdCore()
@@ -390,57 +325,78 @@ LLScriptEdCore::~LLScriptEdCore()
 	LLFloaterScriptSearch* script_search = LLFloaterScriptSearch::getInstance();
 	if (script_search && script_search->getEditorCore() == this)
 	{
-		script_search->close();
+		script_search->closeFloater();
 		delete script_search;
 	}
 }
 
-void LLScriptEdCore::initMenu()
+BOOL LLScriptEdCore::postBuild()
 {
 
-	LLMenuItemCallGL* menuItem = getChild<LLMenuItemCallGL>("Save");
-	menuItem->setMenuCallback(onBtnSave, this);
-	menuItem->setEnabledCallback(hasChanged);
+	mErrorList = getChild<LLScrollListCtrl>("lsl errors");
+
+	mFunctions = getChild<LLComboBox>( "Insert...");
+
+	childSetCommitCallback("Insert...", &LLScriptEdCore::onBtnInsertFunction, this);
+
+	mEditor = getChild<LLViewerTextEditor>("Script Editor");
+	mEditor->setFollowsAll();
+	mEditor->setHandleEditKeysDirectly(TRUE);
+	mEditor->setEnabled(TRUE);
+	mEditor->setWordWrap(TRUE);
+
+	childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this);
+	childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,FALSE));
+
+	initMenu();
+	return TRUE;
+}
+
+void LLScriptEdCore::initMenu()
+{
+	// *TODO: Skinning - make these callbacks data driven
+	LLMenuItemCallGL* menuItem;
+	
+	menuItem = getChild<LLMenuItemCallGL>("Save");
+	menuItem->setClickCallback(boost::bind(&LLScriptEdCore::doSave, this, FALSE));
+	menuItem->setEnableCallback(boost::bind(&LLScriptEdCore::hasChanged, this));
 	
 	menuItem = getChild<LLMenuItemCallGL>("Revert All Changes");
-	menuItem->setMenuCallback(onBtnUndoChanges, this);
-	menuItem->setEnabledCallback(hasChanged);
+	menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnUndoChanges, this));
+	menuItem->setEnableCallback(boost::bind(&LLScriptEdCore::hasChanged, this));
 
 	menuItem = getChild<LLMenuItemCallGL>("Undo");
-	menuItem->setMenuCallback(onUndoMenu, this);
-	menuItem->setEnabledCallback(enableUndoMenu);
+	menuItem->setClickCallback(boost::bind(&LLTextEditor::undo, mEditor));
+	menuItem->setEnableCallback(boost::bind(&LLTextEditor::canUndo, mEditor));
 
 	menuItem = getChild<LLMenuItemCallGL>("Redo");
-	menuItem->setMenuCallback(onRedoMenu, this);
-	menuItem->setEnabledCallback(enableRedoMenu);
+	menuItem->setClickCallback(boost::bind(&LLTextEditor::redo, mEditor));
+	menuItem->setEnableCallback(boost::bind(&LLTextEditor::canRedo, mEditor));
 
 	menuItem = getChild<LLMenuItemCallGL>("Cut");
-	menuItem->setMenuCallback(onCutMenu, this);
-	menuItem->setEnabledCallback(enableCutMenu);
+	menuItem->setClickCallback(boost::bind(&LLTextEditor::cut, mEditor));
+	menuItem->setEnableCallback(boost::bind(&LLTextEditor::canCut, mEditor));
 
 	menuItem = getChild<LLMenuItemCallGL>("Copy");
-	menuItem->setMenuCallback(onCopyMenu, this);
-	menuItem->setEnabledCallback(enableCopyMenu);
+	menuItem->setClickCallback(boost::bind(&LLTextEditor::copy, mEditor));
+	menuItem->setEnableCallback(boost::bind(&LLTextEditor::canCopy, mEditor));
 
 	menuItem = getChild<LLMenuItemCallGL>("Paste");
-	menuItem->setMenuCallback(onPasteMenu, this);
-	menuItem->setEnabledCallback(enablePasteMenu);
+	menuItem->setClickCallback(boost::bind(&LLTextEditor::paste, mEditor));
+	menuItem->setEnableCallback(boost::bind(&LLTextEditor::canPaste, mEditor));
 
 	menuItem = getChild<LLMenuItemCallGL>("Select All");
-	menuItem->setMenuCallback(onSelectAllMenu, this);
-	menuItem->setEnabledCallback(enableSelectAllMenu);
+	menuItem->setClickCallback(boost::bind(&LLTextEditor::selectAll, mEditor));
+	menuItem->setEnableCallback(boost::bind(&LLTextEditor::canSelectAll, mEditor));
 
 	menuItem = getChild<LLMenuItemCallGL>("Search / Replace...");
-	menuItem->setMenuCallback(onSearchMenu, this);
-	menuItem->setEnabledCallback(NULL);
+	menuItem->setClickCallback(boost::bind(&LLFloaterScriptSearch::show, this));
 
 	menuItem = getChild<LLMenuItemCallGL>("Help...");
-	menuItem->setMenuCallback(onBtnHelp, this);
-	menuItem->setEnabledCallback(NULL);
+	menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnHelp, this));
 
 	menuItem = getChild<LLMenuItemCallGL>("LSL Wiki Help...");
-	menuItem->setMenuCallback(onBtnDynamicHelp, this);
-	menuItem->setEnabledCallback(NULL);
+	menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnDynamicHelp, this));
 }
 
 void LLScriptEdCore::setScriptText(const std::string& text, BOOL is_valid)
@@ -452,17 +408,16 @@ void LLScriptEdCore::setScriptText(const std::string& text, BOOL is_valid)
 	}
 }
 
-BOOL LLScriptEdCore::hasChanged(void* userdata)
+bool LLScriptEdCore::hasChanged()
 {
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return FALSE;
+	if (!mEditor) return false;
 
-	return ((!self->mEditor->isPristine() || self->mEnableSave) && self->mHasScriptData);
+	return !mEditor->isPristine();
 }
 
 void LLScriptEdCore::draw()
 {
-	BOOL script_changed	= hasChanged(this);
+	BOOL script_changed	= hasChanged();
 	childSetEnabled("Save_btn",	script_changed);
 
 	if( mEditor->hasFocus() )
@@ -470,8 +425,11 @@ void LLScriptEdCore::draw()
 		S32 line = 0;
 		S32 column = 0;
 		mEditor->getCurrentLineAndColumn( &line, &column, FALSE );  // don't include wordwrap
+		LLStringUtil::format_map_t args;
 		std::string cursor_pos;
-		cursor_pos = llformat("Line %d, Column %d", line, column );
+		args["[LINE]"] = llformat ("%d", line);
+		args["[COLUMN]"] = llformat ("%d", column);
+		cursor_pos = LLTrans::getString("CursorPos", args);
 		childSetText("line_col", cursor_pos);
 	}
 	else
@@ -580,9 +538,7 @@ void LLScriptEdCore::addHelpItemToHistory(const std::string& help_string)
 	// separate history items from full item list
 	if (mLiveHelpHistorySize == 0)
 	{
-		LLSD row;
-		row["columns"][0]["type"] = "separator";
-		history_combo->addElement(row, ADD_TOP);
+		history_combo->addSeparator(ADD_TOP);
 	}
 	// delete all history items over history limit
 	while(mLiveHelpHistorySize > MAX_HISTORY_COUNT - 1)
@@ -612,7 +568,7 @@ void LLScriptEdCore::addHelpItemToHistory(const std::string& help_string)
 
 BOOL LLScriptEdCore::canClose()
 {
-	if(mForceClose || !hasChanged(this))
+	if(mForceClose || !hasChanged())
 	{
 		return TRUE;
 	}
@@ -631,14 +587,14 @@ bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLS
 	{
 	case 0:  // "Yes"
 		// close after saving
-		LLScriptEdCore::doSave( this, TRUE );
+			doSave( TRUE );
 		break;
 
 	case 1:  // "No"
 		mForceClose = TRUE;
 		// This will close immediately because mForceClose is true, so we won't
 		// infinite loop with these dialogs. JC
-		((LLFloater*) getParent())->close();
+		((LLFloater*) getParent())->closeFloater();
 		break;
 
 	case 2: // "Cancel"
@@ -666,37 +622,33 @@ bool LLScriptEdCore::onHelpWebDialog(const LLSD& notification, const LLSD& respo
 	return false;
 }
 
-// static 
-void LLScriptEdCore::onBtnHelp(void* userdata)
+void LLScriptEdCore::onBtnHelp()
 {
-	LLScriptEdCore* corep = (LLScriptEdCore*)userdata;
 	LLSD payload;
-	payload["help_url"] = corep->mHelpURL;
+	payload["help_url"] = mHelpURL;
 	LLNotifications::instance().add("WebLaunchLSLGuide", LLSD(), payload, onHelpWebDialog);
 }
 
-// static 
-void LLScriptEdCore::onBtnDynamicHelp(void* userdata)
+void LLScriptEdCore::onBtnDynamicHelp()
 {
-	LLScriptEdCore* corep = (LLScriptEdCore*)userdata;
-
-	LLFloater* live_help_floater = corep->mLiveHelpHandle.get();
+	LLFloater* live_help_floater = mLiveHelpHandle.get();
 	if (live_help_floater)
 	{
 		live_help_floater->setFocus(TRUE);
-		corep->updateDynamicHelp(TRUE);
+		updateDynamicHelp(TRUE);
 
 		return;
 	}
 
-	live_help_floater = new LLFloater(std::string("lsl_help"));
+	live_help_floater = new LLFloater();
 	LLUICtrlFactory::getInstance()->buildFloater(live_help_floater, "floater_lsl_guide.xml");
-	((LLFloater*)corep->getParent())->addDependentFloater(live_help_floater, TRUE);
-	live_help_floater->childSetCommitCallback("lock_check", onCheckLock, userdata);
+	LLFloater* parent = dynamic_cast<LLFloater*>(getParent());
+	parent->addDependentFloater(live_help_floater, TRUE);
+	live_help_floater->childSetCommitCallback("lock_check", onCheckLock, this);
 	live_help_floater->childSetValue("lock_check", gSavedSettings.getBOOL("ScriptHelpFollowsCursor"));
-	live_help_floater->childSetCommitCallback("history_combo", onHelpComboCommit, userdata);
-	live_help_floater->childSetAction("back_btn", onClickBack, userdata);
-	live_help_floater->childSetAction("fwd_btn", onClickForward, userdata);
+	live_help_floater->childSetCommitCallback("history_combo", onHelpComboCommit, this);
+	live_help_floater->childSetAction("back_btn", onClickBack, this);
+	live_help_floater->childSetAction("fwd_btn", onClickForward, this);
 
 	LLWebBrowserCtrl* browser = live_help_floater->getChild<LLWebBrowserCtrl>("lsl_guide_html");
 	browser->setAlwaysRefresh(TRUE);
@@ -704,8 +656,8 @@ void LLScriptEdCore::onBtnDynamicHelp(void* userdata)
 	LLComboBox* help_combo = live_help_floater->getChild<LLComboBox>("history_combo");
 	LLKeywordToken *token;
 	LLKeywords::keyword_iterator_t token_it;
-	for (token_it = corep->mEditor->keywordsBegin(); 
-		token_it != corep->mEditor->keywordsEnd(); 
+	for (token_it = mEditor->keywordsBegin(); 
+		token_it != mEditor->keywordsEnd(); 
 		++token_it)
 	{
 		token = token_it->second;
@@ -714,10 +666,10 @@ void LLScriptEdCore::onBtnDynamicHelp(void* userdata)
 	help_combo->sortByName();
 
 	// re-initialize help variables
-	corep->mLastHelpToken = NULL;
-	corep->mLiveHelpHandle = live_help_floater->getHandle();
-	corep->mLiveHelpHistorySize = 0;
-	corep->updateDynamicHelp(TRUE);
+	mLastHelpToken = NULL;
+	mLiveHelpHandle = live_help_floater->getHandle();
+	mLiveHelpHistorySize = 0;
+	updateDynamicHelp(TRUE);
 }
 
 //static 
@@ -805,154 +757,25 @@ void LLScriptEdCore::onBtnInsertFunction(LLUICtrl *ui, void* userdata)
 	self->setHelpPage(self->mFunctions->getSimple());
 }
 
-// static 
-void LLScriptEdCore::doSave( void* userdata, BOOL close_after_save )
+void LLScriptEdCore::doSave( BOOL close_after_save )
 {
 	LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT );
 
-	LLScriptEdCore* self = (LLScriptEdCore*) userdata;
-
-	if( self->mSaveCallback )
+	if( mSaveCallback )
 	{
-		self->mSaveCallback( self->mUserdata, close_after_save );
+		mSaveCallback( mUserdata, close_after_save );
 	}
 }
 
-// static
-void LLScriptEdCore::onBtnSave(void* data)
-{
-	// do the save, but don't close afterwards
-	doSave(data, FALSE);
-}
 
-// static
-void LLScriptEdCore::onBtnUndoChanges( void* userdata )
+void LLScriptEdCore::onBtnUndoChanges()
 {
-	LLScriptEdCore* self = (LLScriptEdCore*) userdata;
-	if( !self->mEditor->tryToRevertToPristineState() )
+	if( !mEditor->tryToRevertToPristineState() )
 	{
-		LLNotifications::instance().add("ScriptCannotUndo", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleReloadFromServerDialog, self, _1, _2));
+		LLNotifications::instance().add("ScriptCannotUndo", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleReloadFromServerDialog, this, _1, _2));
 	}
 }
 
-void LLScriptEdCore::onSearchMenu(void* userdata)
-{
-	LLScriptEdCore* sec = (LLScriptEdCore*)userdata;
-	LLFloaterScriptSearch::show(sec);
-}
-
-// static 
-void LLScriptEdCore::onUndoMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return;
-	self->mEditor->undo();
-}
-
-// static 
-void LLScriptEdCore::onRedoMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return;
-	self->mEditor->redo();
-}
-
-// static 
-void LLScriptEdCore::onCutMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return;
-	self->mEditor->cut();
-}
-
-// static 
-void LLScriptEdCore::onCopyMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return;
-	self->mEditor->copy();
-}
-
-// static 
-void LLScriptEdCore::onPasteMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return;
-	self->mEditor->paste();
-}
-
-// static 
-void LLScriptEdCore::onSelectAllMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return;
-	self->mEditor->selectAll();
-}
-
-// static 
-void LLScriptEdCore::onDeselectMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return;
-	self->mEditor->deselect();
-}
-
-// static 
-BOOL LLScriptEdCore::enableUndoMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return FALSE;
-	return self->mEditor->canUndo();
-}
-
-// static 
-BOOL LLScriptEdCore::enableRedoMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return FALSE;
-	return self->mEditor->canRedo();
-}
-
-// static 
-BOOL LLScriptEdCore::enableCutMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return FALSE;
-	return self->mEditor->canCut();
-}
-
-// static 
-BOOL LLScriptEdCore::enableCopyMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return FALSE;
-	return self->mEditor->canCopy();
-}
-
-// static 
-BOOL LLScriptEdCore::enablePasteMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return FALSE;
-	return self->mEditor->canPaste();
-}
-
-// static 
-BOOL LLScriptEdCore::enableSelectAllMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return FALSE;
-	return self->mEditor->canSelectAll();
-}
-
-// static 
-BOOL LLScriptEdCore::enableDeselectMenu(void* userdata)
-{
-	LLScriptEdCore* self = (LLScriptEdCore*)userdata;
-	if (!self || !self->mEditor) return FALSE;
-	return self->mEditor->canDeselect();
-}
-
 // static
 void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data)
 {
@@ -960,8 +783,7 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data)
 	LLScrollListItem* item = self->mErrorList->getFirstSelected();
 	if(item)
 	{
-		// *FIX: This fucked up little hack is here because we don't
-		// have a grep library. This is very brittle code.
+		// *FIX: replace with boost grep
 		S32 row = 0;
 		S32 column = 0;
 		const LLScrollListCell* cell = item->getColumn(0);
@@ -1080,8 +902,7 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata)
 	
 	LLPreviewLSL *self = (LLPreviewLSL*)userdata;
 
-	self->mScriptEd =  new LLScriptEdCore("script panel",
-								   LLRect(),
+	self->mScriptEd =  new LLScriptEdCore(
 								   HELLO_LSL,
 								   HELP_LSL_URL,
 								   self->getHandle(),
@@ -1095,49 +916,32 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata)
 }
 
 
-LLPreviewLSL::LLPreviewLSL(const std::string& name, const LLRect& rect,
-						   const std::string& title, const LLUUID& item_id )
-:	LLPreview( name, rect, title, item_id, LLUUID::null, TRUE,
-			   SCRIPT_MIN_WIDTH, SCRIPT_MIN_HEIGHT ),
-   mPendingUploads(0)
+LLPreviewLSL::LLPreviewLSL(const LLSD& key )
+  : LLPreview( key ),
+	mPendingUploads(0)
 {
+	mFactoryMap["script panel"] = LLCallbackMap(LLPreviewLSL::createScriptEdPanel, this);
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_preview.xml", FALSE);
+}
 
-	LLRect curRect = rect;
-
-
-	LLCallbackMap::map_t factory_map;
-	factory_map["script panel"] = LLCallbackMap(LLPreviewLSL::createScriptEdPanel, this);
-
-
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_preview.xml", &factory_map);
-
+// virtual
+BOOL LLPreviewLSL::postBuild()
+{
 	const LLInventoryItem* item = getItem();	
 
 	childSetCommitCallback("desc", LLPreview::onText, this);
 	childSetText("desc", item->getDescription());
 	childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
 
-	if (!getFloaterHost() && !getHost() && getAssetStatus() == PREVIEW_ASSET_UNLOADED)
-	{
-		loadAsset();
-	}
-	
-	setTitle(title);
-	
-	if (!getHost())
-	{
-		reshape(curRect.getWidth(), curRect.getHeight(), TRUE);
-		setRect(curRect);
-	}
+	return LLPreview::postBuild();
 }
 
 // virtual
 void LLPreviewLSL::callbackLSLCompileSucceeded()
 {
 	llinfos << "LSL Bytecode saved" << llendl;
-	// *TODO: Translate
-	mScriptEd->mErrorList->addCommentText(std::string("Compile successful!"));
-	mScriptEd->mErrorList->addCommentText(std::string("Save complete."));
+	mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful"));
+	mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete"));
 	closeIfNeeded();
 }
 
@@ -1228,16 +1032,10 @@ void LLPreviewLSL::closeIfNeeded()
 	mPendingUploads--;
 	if (mPendingUploads <= 0 && mCloseAfterSave)
 	{
-		close();
+		closeFloater();
 	}
 }
 
-//override the llpreview open which attempts to load asset, load after xml ui made
-void LLPreviewLSL::open()		/*Flawfinder: ignore*/
-{
-	LLFloater::open();		/*Flawfinder: ignore*/
-}
-
 void LLPreviewLSL::onSearchReplace(void* userdata)
 {
 	LLPreviewLSL* self = (LLPreviewLSL*)userdata;
@@ -1267,7 +1065,7 @@ void LLPreviewLSL::onSave(void* userdata, BOOL close_after_save)
 void LLPreviewLSL::saveIfNeeded()
 {
 	// llinfos << "LLPreviewLSL::saveIfNeeded()" << llendl;
-	if(!LLScriptEdCore::hasChanged(mScriptEd))
+	if(!mScriptEd->hasChanged())
 	{
 		return;
 	}
@@ -1440,7 +1238,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32
 			}
 
 			// Find our window and close it if requested.
-			LLPreviewLSL* self = (LLPreviewLSL*)LLPreview::find(info->mItemUUID);
+			LLPreviewLSL* self = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", info->mItemUUID);
 			if (self)
 			{
 				getWindow()->decBusyCount();
@@ -1448,7 +1246,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32
 				if (self->mPendingUploads <= 0
 					&& self->mCloseAfterSave)
 				{
-					self->close();
+					self->closeFloater();
 				}
 			}
 		}
@@ -1470,7 +1268,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d
 	LLPreviewLSL* self = NULL;
 	if(instance_uuid)
 	{
-		self = LLPreviewLSL::getInstance(*instance_uuid);
+		self = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", *instance_uuid);
 	}
 	if (0 == status)
 	{
@@ -1487,7 +1285,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d
 			if (self->mPendingUploads <= 0
 				&& self->mCloseAfterSave)
 			{
-				self->close();
+				self->closeFloater();
 			}
 		}
 	}
@@ -1508,7 +1306,7 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset
 	lldebugs << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid
 		 << llendl;
 	LLUUID* item_uuid = (LLUUID*)user_data;
-	LLPreviewLSL* preview = LLPreviewLSL::getInstance(*item_uuid);
+	LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", *item_uuid);
 	if( preview )
 	{
 		if(0 == status)
@@ -1559,37 +1357,10 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset
 	delete item_uuid;
 }
 
-// static
-LLPreviewLSL* LLPreviewLSL::getInstance( const LLUUID& item_uuid )
-{
-	LLPreview* instance = NULL;
-	preview_map_t::iterator found_it = LLPreview::sInstances.find(item_uuid);
-	if(found_it != LLPreview::sInstances.end())
-	{
-		instance = found_it->second;
-	}
-	return (LLPreviewLSL*)instance;
-}
-
-void LLPreviewLSL::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
-	LLPreview::reshape( width, height, called_from_parent );
-
-	if( !isMinimized() )
-	{
-		// So that next time you open a script it will have the same height and width 
-		// (although not the same position).
-		gSavedSettings.setRect("PreviewScriptRect", getRect());
-	}
-}
-
 /// ---------------------------------------------------------------------------
 /// LLLiveLSLEditor
 /// ---------------------------------------------------------------------------
 
-LLMap<LLUUID, LLLiveLSLEditor*> LLLiveLSLEditor::sInstances;
-
-
 
 //static 
 void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)
@@ -1597,8 +1368,7 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)
 	
 	LLLiveLSLEditor *self = (LLLiveLSLEditor*)userdata;
 
-	self->mScriptEd =  new LLScriptEdCore("script ed panel",
-								   LLRect(),
+	self->mScriptEd =  new LLScriptEdCore(
 								   HELLO_LSL,
 								   HELP_LSL_URL,
 								   self->getHandle(),
@@ -1612,72 +1382,40 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)
 }
 
 
-LLLiveLSLEditor::LLLiveLSLEditor(const std::string& name,
-								 const LLRect& rect,
-								 const std::string& title,
-								 const LLUUID& object_id,
-								 const LLUUID& item_id) :
-	LLPreview(name, rect, title, item_id, object_id, TRUE, SCRIPT_MIN_WIDTH, SCRIPT_MIN_HEIGHT),
-	mObjectID(object_id),
-	mItemID(item_id),
+LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) :
+	LLPreview(key),
 	mScriptEd(NULL),
 	mAskedForRunningInfo(FALSE),
 	mHaveRunningInfo(FALSE),
 	mCloseAfterSave(FALSE),
 	mPendingUploads(0),
-	mIsModifiable(FALSE)
+	mIsModifiable(FALSE),
+	mIsNew(false)
 {
+	mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this);
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_live_lsleditor.xml", FALSE);
+}
 
-	
-	BOOL is_new = FALSE;
-	if(mItemID.isNull())
-	{
-		mItemID.generate();
-		is_new = TRUE;
-	}
-
-
-	LLLiveLSLEditor::sInstances.addData(mItemID ^ mObjectID, this);
-
-	LLCallbackMap::map_t factory_map;
-	factory_map["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this);
-
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_live_lsleditor.xml", &factory_map);
-	
-	mMonoCheckbox =	getChild<LLCheckBoxCtrl>("mono");
-	childSetCommitCallback("mono", &LLLiveLSLEditor::onMonoCheckboxClicked, this);
-	childSetEnabled("mono", FALSE);
-
+BOOL LLLiveLSLEditor::postBuild()
+{
 	childSetCommitCallback("running", LLLiveLSLEditor::onRunningCheckboxClicked, this);
 	childSetEnabled("running", FALSE);
 
 	childSetAction("Reset",&LLLiveLSLEditor::onReset,this);
 	childSetEnabled("Reset", TRUE);
 
+	mMonoCheckbox =	getChild<LLCheckBoxCtrl>("mono");
+	childSetCommitCallback("mono", &LLLiveLSLEditor::onMonoCheckboxClicked, this);
+	childSetEnabled("mono", FALSE);
 
 	mScriptEd->mEditor->makePristine();
-	loadAsset(is_new);
 	mScriptEd->mEditor->setFocus(TRUE);
-	
-	if (!getHost())
-	{
-		LLRect curRect = getRect();
-		translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
-	}
 
-	
-	setTitle(title);
+	return LLPreview::postBuild();
 }
 
 LLLiveLSLEditor::~LLLiveLSLEditor()
 {
-	LLLiveLSLEditor::sInstances.removeData(mItemID ^ mObjectID);
-}
-
-// this is called via LLPreview::loadAsset() virtual method
-void LLLiveLSLEditor::loadAsset()
-{
-	loadAsset(FALSE);
 }
 
 // virtual
@@ -1686,9 +1424,8 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id,
 												  bool is_script_running)
 {
 	lldebugs << "LSL Bytecode saved" << llendl;
-	// *TODO: Translate
-	mScriptEd->mErrorList->addCommentText(std::string("Compile successful!"));
-	mScriptEd->mErrorList->addCommentText(std::string("Save complete."));
+	mScriptEd->mErrorList->setCommentText(LLTrans::getString("Compilesuccessful"));
+	mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete"));
 	closeIfNeeded();
 }
 
@@ -1711,16 +1448,15 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors)
 	closeIfNeeded();
 }
 
-void LLLiveLSLEditor::loadAsset(BOOL is_new)
+void LLLiveLSLEditor::loadAsset()
 {
 	//llinfos << "LLLiveLSLEditor::loadAsset()" << llendl;
-	if(!is_new)
+	if(!mIsNew)
 	{
-		LLViewerObject* object = gObjectList.findObject(mObjectID);
+		LLViewerObject* object = gObjectList.findObject(mObjectUUID);
 		if(object)
 		{
-			// HACK! we "know" that mItemID refers to a LLViewerInventoryItem...
-			LLViewerInventoryItem* item = (LLViewerInventoryItem*)object->getInventoryObject(mItemID);
+			LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(object->getInventoryObject(mItemUUID));
 			if(item 
 				&& (gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE)
 				   || gAgent.isGodlike()))
@@ -1744,23 +1480,23 @@ void LLLiveLSLEditor::loadAsset(BOOL is_new)
 			else if(item && mItem.notNull())
 			{
 				// request the text from the object
-				LLUUID* user_data = new LLUUID(mItemID ^ mObjectID);
+				LLUUID* user_data = new LLUUID(mItemUUID); //  ^ mObjectUUID
 				gAssetStorage->getInvItemAsset(object->getRegion()->getHost(),
-											gAgent.getID(),
-											gAgent.getSessionID(),
-											item->getPermissions().getOwner(),
-											object->getID(),
-											item->getUUID(),
-											item->getAssetUUID(),
-											item->getType(),
-											&LLLiveLSLEditor::onLoadComplete,
-											(void*)user_data,
-											TRUE);
+											   gAgent.getID(),
+											   gAgent.getSessionID(),
+											   item->getPermissions().getOwner(),
+											   object->getID(),
+											   item->getUUID(),
+											   item->getAssetUUID(),
+											   item->getType(),
+											   &LLLiveLSLEditor::onLoadComplete,
+											   (void*)user_data,
+											   TRUE);
 				LLMessageSystem* msg = gMessageSystem;
 				msg->newMessageFast(_PREHASH_GetScriptRunning);
 				msg->nextBlockFast(_PREHASH_Script);
-				msg->addUUIDFast(_PREHASH_ObjectID, mObjectID);
-				msg->addUUIDFast(_PREHASH_ItemID, mItemID);
+				msg->addUUIDFast(_PREHASH_ObjectID, mObjectUUID);
+				msg->addUUIDFast(_PREHASH_ItemID, mItemUUID);
 				msg->sendReliable(object->getRegion()->getHost());
 				mAskedForRunningInfo = TRUE;
 				mAssetStatus = PREVIEW_ASSET_LOADING;
@@ -1789,26 +1525,12 @@ void LLLiveLSLEditor::loadAsset(BOOL is_new)
 			gMessageSystem->addUUID("AgentID", gAgent.getID());
 			U32 local_id = object->getLocalID();
 			gMessageSystem->addData("LocalID", &local_id);
-			gMessageSystem->addUUID("ItemID", mItemID);
+			gMessageSystem->addUUID("ItemID", mItemUUID);
 			LLHost host(object->getRegion()->getIP(),
 						object->getRegion()->getPort());
 			gMessageSystem->sendReliable(host);
 			*/
 		}
-
-		// Initialization of the asset failed. Probably the result 
-		// of a bug somewhere else. Set up this editor in a no-go mode.
-		if(mItem.isNull())
-		{
-			// Set the inventory item to an incomplete item.
-			// This may be better than having a accessible null pointer around,
-			// though this newly allocated object will most likely be replaced.
-			mItem = new LLViewerInventoryItem();
-			mScriptEd->setScriptText(LLStringUtil::null, FALSE);
-			mScriptEd->mEditor->makePristine();
-			mScriptEd->mEditor->setEnabled(FALSE);
-			mAssetStatus = PREVIEW_ASSET_LOADED;
-		}
 	}
 	else
 	{
@@ -1817,17 +1539,17 @@ void LLLiveLSLEditor::loadAsset(BOOL is_new)
 		LLPermissions perm;
 		perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, gAgent.getGroupID());
 		perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, PERM_MOVE | PERM_TRANSFER);
-		mItem = new LLViewerInventoryItem(mItemID,
-									mObjectID,
-									perm,
-									LLUUID::null,
-									LLAssetType::AT_LSL_TEXT,
-									LLInventoryType::IT_LSL,
-									DEFAULT_SCRIPT_NAME,
-									DEFAULT_SCRIPT_DESC,
-									LLSaleInfo::DEFAULT,
-									LLInventoryItem::II_FLAGS_NONE,
-									time_corrected());
+		mItem = new LLViewerInventoryItem(mItemUUID,
+										  mObjectUUID,
+										  perm,
+										  LLUUID::null,
+										  LLAssetType::AT_LSL_TEXT,
+										  LLInventoryType::IT_LSL,
+										  DEFAULT_SCRIPT_NAME,
+										  DEFAULT_SCRIPT_DESC,
+										  LLSaleInfo::DEFAULT,
+										  LLInventoryItem::II_FLAGS_NONE,
+										  time_corrected());
 		mAssetStatus = PREVIEW_ASSET_LOADED;
 	}
 }
@@ -1839,12 +1561,12 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
 {
 	lldebugs << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id
 		 << llendl;
-	LLLiveLSLEditor* instance = NULL;
 	LLUUID* xored_id = (LLUUID*)user_data;
-
-	if( LLLiveLSLEditor::sInstances.checkData(*xored_id) )
+	
+	LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", *xored_id);
+	
+	if(instance )
 	{
-		instance = LLLiveLSLEditor::sInstances[*xored_id];
 		if( LL_ERR_NOERR == status )
 		{
 			instance->loadScriptText(vfs, asset_id, type);
@@ -1930,7 +1652,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType
 void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata )
 {
 	LLLiveLSLEditor* self = (LLLiveLSLEditor*) userdata;
-	LLViewerObject* object = gObjectList.findObject( self->mObjectID );
+	LLViewerObject* object = gObjectList.findObject( self->mObjectUUID );
 	LLCheckBoxCtrl* runningCheckbox = self->getChild<LLCheckBoxCtrl>("running");
 	BOOL running =  runningCheckbox->get();
 	//self->mRunningCheckbox->get();
@@ -1942,8 +1664,8 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata )
 		msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
 		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
 		msg->nextBlockFast(_PREHASH_Script);
-		msg->addUUIDFast(_PREHASH_ObjectID, self->mObjectID);
-		msg->addUUIDFast(_PREHASH_ItemID, self->mItemID);
+		msg->addUUIDFast(_PREHASH_ObjectID, self->mObjectUUID);
+		msg->addUUIDFast(_PREHASH_ItemID, self->mItemUUID);
 		msg->addBOOLFast(_PREHASH_Running, running);
 		msg->sendReliable(object->getRegion()->getHost());
 	}
@@ -1958,7 +1680,7 @@ void LLLiveLSLEditor::onReset(void *userdata)
 {
 	LLLiveLSLEditor* self = (LLLiveLSLEditor*) userdata;
 
-	LLViewerObject* object = gObjectList.findObject( self->mObjectID );
+	LLViewerObject* object = gObjectList.findObject( self->mObjectUUID );
 	if(object)
 	{
 		LLMessageSystem* msg = gMessageSystem;
@@ -1967,8 +1689,8 @@ void LLLiveLSLEditor::onReset(void *userdata)
 		msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
 		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
 		msg->nextBlockFast(_PREHASH_Script);
-		msg->addUUIDFast(_PREHASH_ObjectID, self->mObjectID);
-		msg->addUUIDFast(_PREHASH_ItemID, self->mItemID);
+		msg->addUUIDFast(_PREHASH_ObjectID, self->mObjectUUID);
+		msg->addUUIDFast(_PREHASH_ItemID, self->mItemUUID);
 		msg->sendReliable(object->getRegion()->getHost());
 	}
 	else
@@ -1979,7 +1701,7 @@ void LLLiveLSLEditor::onReset(void *userdata)
 
 void LLLiveLSLEditor::draw()
 {
-	LLViewerObject* object = gObjectList.findObject(mObjectID);
+	LLViewerObject* object = gObjectList.findObject(mObjectUUID);
 	LLCheckBoxCtrl* runningCheckbox = getChild<LLCheckBoxCtrl>( "running");
 	if(object && mAskedForRunningInfo && mHaveRunningInfo)
 	{
@@ -2024,14 +1746,13 @@ void LLLiveLSLEditor::draw()
 	{
 		// HACK: Display this information in the title bar.
 		// Really ought to put in main window.
-		// *TODO: Translate
-		setTitle(std::string("Script (object out of range)"));
+		setTitle(LLTrans::getString("ObjectOutOfRange"));
 		runningCheckbox->setEnabled(FALSE);
 		// object may have fallen out of range.
 		mHaveRunningInfo = FALSE;
 	}
 
-	LLFloater::draw();
+	LLPreview::draw();
 }
 
 
@@ -2083,15 +1804,14 @@ void LLLiveLSLEditor::saveIfNeeded()
 	// name on save, because the viewer object version of the item,
 	// and the editor version would get out of synch. Here's a good
 	// place to synch them back up.
-	// HACK! we "know" that mItemID refers to a LLInventoryItem...
-	LLInventoryItem* inv_item = (LLInventoryItem*)object->getInventoryObject(mItemID);
+	LLInventoryItem* inv_item = dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mItemUUID));
 	if(inv_item)
 	{
 		mItem->copyItem(inv_item);
 	}
 
 	// Don't need to save if we're pristine
-	if(!LLScriptEdCore::hasChanged(mScriptEd))
+	if(!mScriptEd->hasChanged())
 	{
 		return;
 	}
@@ -2145,8 +1865,7 @@ void LLLiveLSLEditor::saveIfNeeded()
 	BOOL is_running = getChild<LLCheckBoxCtrl>( "running")->get();
 	if (!url.empty())
 	{
-		uploadAssetViaCaps(url, filename, mObjectID,
-						   mItemID, is_running);
+		uploadAssetViaCaps(url, filename, mObjectID, mItemUUID, is_running);
 	}
 	else if (gAssetStorage)
 	{
@@ -2238,8 +1957,7 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename,
 	else
 	{
 		llinfos << "Compile worked!" << llendl;
-		// *TODO: Translate
-		mScriptEd->mErrorList->addCommentText(std::string("Compile successful, saving..."));
+		mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessfulSaving"));
 		if(gAssetStorage)
 		{
 			llinfos << "LLLiveLSLEditor::saveAsset "
@@ -2283,7 +2001,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da
 	}
 	else
 	{
-		LLLiveLSLEditor* self = sInstances.getIfThere(data->mItem->getUUID() ^ data->mObjectID);
+		LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", data->mItem->getUUID()); //  ^ data->mObjectID
 		if (self)
 		{
 			self->getWindow()->decBusyCount();
@@ -2291,7 +2009,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da
 			if (self->mPendingUploads <= 0
 				&& self->mCloseAfterSave)
 			{
-				self->close();
+				self->closeFloater();
 			}
 		}
 	}
@@ -2308,20 +2026,18 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use
 	if(0 ==status)
 	{
 		llinfos << "LSL Bytecode saved" << llendl;
-		LLUUID xor_id = data->mItem->getUUID() ^ data->mObjectID;
-		LLLiveLSLEditor* self = sInstances.getIfThere(xor_id);
-		if(self)
+		LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", data->mItem->getUUID()); //  ^ data->mObjectID
+		if (self)
 		{
 			// Tell the user that the compile worked.
-			// *TODO: Translate
-			self->mScriptEd->mErrorList->addCommentText(std::string("Save complete."));
+			self->mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete"));
 			// close the window if this completes both uploads
 			self->getWindow()->decBusyCount();
 			self->mPendingUploads--;
 			if (self->mPendingUploads <= 0
 				&& self->mCloseAfterSave)
 			{
-				self->close();
+				self->closeFloater();
 			}
 		}
 		LLViewerObject* object = gObjectList.findObject(data->mObjectID);
@@ -2349,11 +2065,6 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use
 	delete data;
 }
 
-void LLLiveLSLEditor::open()
-{
-	LLFloater::open();		/*Flawfinder: ignore*/
-}
-
 BOOL LLLiveLSLEditor::canClose()
 {
 	return (mScriptEd->canClose());
@@ -2365,7 +2076,7 @@ void LLLiveLSLEditor::closeIfNeeded()
 	mPendingUploads--;
 	if (mPendingUploads <= 0 && mCloseAfterSave)
 	{
-		close();
+		closeFloater();
 	}
 }
 
@@ -2384,42 +2095,6 @@ void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save)
 	self->saveIfNeeded();
 }
 
-// static
-LLLiveLSLEditor* LLLiveLSLEditor::show(const LLUUID& script_id, const LLUUID& object_id)
-{
-	LLLiveLSLEditor* instance = NULL;
-	LLUUID xored_id = script_id ^ object_id;
-	if(LLLiveLSLEditor::sInstances.checkData(xored_id))
-	{
-		// Move the existing view to the front
-		instance = LLLiveLSLEditor::sInstances[xored_id];
-		instance->open();		/*Flawfinder: ignore*/
-	}
-	return instance;
-}
-
-// static
-void LLLiveLSLEditor::hide(const LLUUID& script_id, const LLUUID& object_id)
-{
-	LLUUID xored_id = script_id ^ object_id;
-	if( LLLiveLSLEditor::sInstances.checkData( xored_id ) )
-	{
-		LLLiveLSLEditor* instance = LLLiveLSLEditor::sInstances[xored_id];
-		if(instance->getParent())
-		{
-			instance->getParent()->removeChild(instance);
-		}
-		delete instance;
-	}
-}
-// static
-LLLiveLSLEditor* LLLiveLSLEditor::find(const LLUUID& script_id, const LLUUID& object_id)
-{
-	LLUUID xored_id = script_id ^ object_id;
-	return sInstances.getIfThere(xored_id);
-}
-
-
 // static
 void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
 {
@@ -2427,10 +2102,10 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
 	LLUUID object_id;
 	msg->getUUIDFast(_PREHASH_Script, _PREHASH_ObjectID, object_id);
 	msg->getUUIDFast(_PREHASH_Script, _PREHASH_ItemID, item_id);
-	LLUUID xored_id = item_id ^ object_id;
-	if(LLLiveLSLEditor::sInstances.checkData(xored_id))
+
+	LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", item_id); //  ^ object_id
+	if(instance)
 	{
-		LLLiveLSLEditor* instance = LLLiveLSLEditor::sInstances[xored_id];
 		instance->mHaveRunningInfo = TRUE;
 		BOOL running;
 		msg->getBOOLFast(_PREHASH_Script, _PREHASH_Running, running);
@@ -2444,18 +2119,6 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
 	}
 }
 
-void LLLiveLSLEditor::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
-	LLFloater::reshape( width, height, called_from_parent );
-
-	if( !isMinimized() )
-	{
-		// So that next time you open a script it will have the same height and width 
-		// (although not the same position).
-		gSavedSettings.setRect("PreviewScriptRect", getRect());
-	}
-}
-
 void LLLiveLSLEditor::onMonoCheckboxClicked(LLUICtrl*, void* userdata)
 {
 	LLLiveLSLEditor* self = static_cast<LLLiveLSLEditor*>(userdata);
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index eb8b414709..623886101a 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -63,8 +63,6 @@ class LLScriptEdCore : public LLPanel
 
 public:
 	LLScriptEdCore(
-		const std::string& name,
-		const LLRect& rect,
 		const std::string& sample,
 		const std::string& help_url,
 		const LLHandle<LLFloater>& floater_handle,
@@ -78,45 +76,30 @@ public:
 	void			initMenu();
 
 	virtual void	draw();
-
+	/*virtual*/	BOOL	postBuild();
 	BOOL			canClose();
 
 	void            setScriptText(const std::string& text, BOOL is_valid);
+	
+	void			doSave( BOOL close_after_save );
 
 	bool			handleSaveChangesDialog(const LLSD& notification, const LLSD& response);
 	bool			handleReloadFromServerDialog(const LLSD& notification, const LLSD& response);
 
 	static bool		onHelpWebDialog(const LLSD& notification, const LLSD& response);
-	static void		onBtnHelp(void* userdata);
-	static void		onBtnDynamicHelp(void* userdata);
 	static void		onCheckLock(LLUICtrl*, void*);
 	static void		onHelpComboCommit(LLUICtrl* ctrl, void* userdata);
 	static void		onClickBack(void* userdata);
 	static void		onClickForward(void* userdata);
 	static void		onBtnInsertSample(void*);
 	static void		onBtnInsertFunction(LLUICtrl*, void*);
-	static void		doSave( void* userdata, BOOL close_after_save );
-	static void		onBtnSave(void*);
-	static void		onBtnUndoChanges(void*);
-	static void		onSearchMenu(void* userdata);
-
-	static void		onUndoMenu(void* userdata);
-	static void		onRedoMenu(void* userdata);
-	static void		onCutMenu(void* userdata);
-	static void		onCopyMenu(void* userdata);
-	static void		onPasteMenu(void* userdata);
-	static void		onSelectAllMenu(void* userdata);
-	static void		onDeselectMenu(void* userdata);
-
-	static BOOL		enableUndoMenu(void* userdata);
-	static BOOL		enableRedoMenu(void* userdata);
-	static BOOL		enableCutMenu(void* userdata);
-	static BOOL		enableCopyMenu(void* userdata);
-	static BOOL		enablePasteMenu(void* userdata);
-	static BOOL		enableSelectAllMenu(void* userdata);
-	static BOOL		enableDeselectMenu(void* userdata);
-
-	static BOOL		hasChanged(void* userdata);
+
+private:
+	void		onBtnHelp();
+	void		onBtnDynamicHelp();
+	void		onBtnUndoChanges();
+
+	bool		hasChanged();
 
 	void selectFirstError();
 
@@ -131,8 +114,6 @@ protected:
 	void addHelpItemToHistory(const std::string& help_string);
 	static void onErrorList(LLUICtrl*, void* user_data);
 
- 	virtual const char *getTitleName() const { return "Script"; }
-
 private:
 	std::string		mSampleText;
 	std::string		mHelpURL;
@@ -160,17 +141,15 @@ private:
 class LLPreviewLSL : public LLPreview
 {
 public:
-	LLPreviewLSL(const std::string& name, const LLRect& rect, const std::string& title,
-				 const LLUUID& item_uuid );
+	LLPreviewLSL(const LLSD& key );
 	virtual void callbackLSLCompileSucceeded();
 	virtual void callbackLSLCompileFailed(const LLSD& compile_errors);
 
-	/*virtual*/ void open();		/*Flawfinder: ignore*/
+	/*virtual*/ BOOL postBuild();
 
 protected:
 	virtual BOOL canClose();
 	void closeIfNeeded();
-	virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 
 	virtual void loadAsset();
 	void saveIfNeeded();
@@ -190,15 +169,13 @@ protected:
 							   void* user_data, S32 status, LLExtStat ext_status);
 	static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status, LLExtStat ext_status);
 	static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
-public:
-	static LLPreviewLSL* getInstance(const LLUUID& uuid);
+	
 protected:
 	static void* createScriptEdPanel(void* userdata);
 
 
 protected:
 
- 	virtual const char *getTitleName() const { return "Script"; }
 	LLScriptEdCore* mScriptEd;
 	// Can safely close only after both text and bytecode are uploaded
 	S32 mPendingUploads;
@@ -210,16 +187,10 @@ protected:
 class LLLiveLSLEditor : public LLPreview
 {
 public: 
-	LLLiveLSLEditor(const std::string& name, const LLRect& rect,
-					const std::string& title,
-					const LLUUID& object_id, const LLUUID& item_id);
+	LLLiveLSLEditor(const LLSD& key);
 	~LLLiveLSLEditor();
 
 
-	static LLLiveLSLEditor* show(const LLUUID& item_id, const LLUUID& object_id);
-	static void hide(const LLUUID& item_id, const LLUUID& object_id);
-	static LLLiveLSLEditor* find(const LLUUID& item_id, const LLUUID& object_id);
-
 	static void processScriptRunningReply(LLMessageSystem* msg, void**);
 
 	virtual void callbackLSLCompileSucceeded(const LLUUID& task_id,
@@ -227,14 +198,14 @@ public:
 											bool is_script_running);
 	virtual void callbackLSLCompileFailed(const LLSD& compile_errors);
 
-	// Overide LLPreview::open() to avoid calling loadAsset twice.
-	/*virtual*/ void open();		/*Flawfinder: ignore*/
-
-protected:
+	/*virtual*/ BOOL postBuild();
+	
+	void setIsNew() { mIsNew = TRUE; }
+	
+private:
 	virtual BOOL canClose();
 	void closeIfNeeded();
 	virtual void draw();
-	virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 
 	virtual void loadAsset();
 	void loadAsset(BOOL is_new);
@@ -248,6 +219,8 @@ protected:
 						   LLViewerObject* object,
 						   const LLTransactionID& tid,
 						   BOOL is_running);
+	BOOL monoChecked() const;
+
 
 	static void onSearchReplace(void* userdata);
 	static void onLoad(void* userdata);
@@ -268,30 +241,23 @@ protected:
 
 	static void* createScriptEdPanel(void* userdata);
 
+	static void	onMonoCheckboxClicked(LLUICtrl*, void* userdata);
 
-protected:
-	LLUUID mObjectID;
-	LLUUID mItemID; // The inventory item this script is associated with
-	BOOL mIsNew;
-	LLScriptEdCore* mScriptEd;
+private:
+	bool				mIsNew;
+	LLScriptEdCore*		mScriptEd;
 	//LLUUID mTransmitID;
-	LLCheckBoxCtrl	*mRunningCheckbox;
-	BOOL mAskedForRunningInfo;
-	BOOL mHaveRunningInfo;
-	LLButton		*mResetButton;
+	LLCheckBoxCtrl*		mRunningCheckbox;
+	BOOL				mAskedForRunningInfo;
+	BOOL				mHaveRunningInfo;
+	LLButton*			mResetButton;
 	LLPointer<LLViewerInventoryItem> mItem;
-	BOOL mCloseAfterSave;
+	BOOL				mCloseAfterSave;
 	// need to save both text and script, so need to decide when done
-	S32 mPendingUploads;
+	S32					mPendingUploads;
 
-	static LLMap<LLUUID, LLLiveLSLEditor*> sInstances;
 	BOOL getIsModifiable() const { return mIsModifiable; } // Evaluated on load assert
 	
-private:
-
-	static void	onMonoCheckboxClicked(LLUICtrl*, void* userdata);
-	BOOL monoChecked() const;
-
 	LLCheckBoxCtrl*	mMonoCheckbox;
 	BOOL mIsModifiable;
 };
diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp
index 26d8da5a6b..7e7be5b2c6 100644
--- a/indra/newview/llpreviewsound.cpp
+++ b/indra/newview/llpreviewsound.cpp
@@ -49,12 +49,23 @@ extern LLAgent gAgent;
 
 const F32 SOUND_GAIN = 1.0f;
 
-LLPreviewSound::LLPreviewSound(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const LLUUID& object_uuid)	:
-	LLPreview( name, rect, title, item_uuid, object_uuid)
+LLPreviewSound::LLPreviewSound(const LLSD& key)
+  : LLPreview( key )
 {
-	
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_sound.xml");
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_sound.xml", FALSE);
+}
 
+// virtual
+BOOL	LLPreviewSound::postBuild()
+{
+	const LLInventoryItem* item = getItem();
+	if (item)
+	{
+		childSetText("desc", item->getDescription());
+		if (gAudiop)
+			gAudiop->preloadSound(item->getAssetUUID()); // preload the sound
+	}
+	
 	childSetAction("Sound play btn",&LLPreviewSound::playSound,this);
 	childSetAction("Sound audition btn",&LLPreviewSound::auditionSound,this);
 
@@ -64,26 +75,10 @@ LLPreviewSound::LLPreviewSound(const std::string& name, const LLRect& rect, cons
 	button = getChild<LLButton>("Sound audition btn");
 	button->setSoundFlags(LLView::SILENT);
 
-	const LLInventoryItem* item = getItem();
-	
 	childSetCommitCallback("desc", LLPreview::onText, this);
-	childSetText("desc", item->getDescription());
 	childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);	
-	
-	// preload the sound
-	if(item && gAudiop)
-	{
-		gAudiop->preloadSound(item->getAssetUUID());
-	}
-	
-	setTitle(title);
-
-	if (!getHost())
-	{
-		LLRect curRect = getRect();
-		translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
-	}
 
+	return LLPreview::postBuild();
 }
 
 // static
diff --git a/indra/newview/llpreviewsound.h b/indra/newview/llpreviewsound.h
index 061fbdf685..c4bf8c9a30 100644
--- a/indra/newview/llpreviewsound.h
+++ b/indra/newview/llpreviewsound.h
@@ -38,16 +38,13 @@
 class LLPreviewSound : public LLPreview
 {
 public:
-	LLPreviewSound(const std::string& name, const LLRect& rect, const std::string& title,
-				   const LLUUID& item_uuid,
-				   const LLUUID& object_uuid = LLUUID::null);
+	LLPreviewSound(const LLSD& key);
 
 	static void playSound( void* userdata );
 	static void auditionSound( void* userdata );
 
 protected:
-	virtual const char *getTitleName() const { return "Sound"; }
-
+	/* virtual */ BOOL	postBuild();
 };
 
 #endif  // LL_LLPREVIEWSOUND_H
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 13e7cca464..3204006e43 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -37,10 +37,12 @@
 #include "llagent.h"
 #include "llbutton.h"
 #include "llfilepicker.h"
+#include "llfloaterreg.h"
 #include "llimagetga.h"
 #include "llinventoryview.h"
 #include "llinventory.h"
 #include "llresmgr.h"
+#include "lltrans.h"
 #include "lltextbox.h"
 #include "lltextureview.h"
 #include "llui.h"
@@ -50,30 +52,24 @@
 #include "llviewerwindow.h"
 #include "lllineeditor.h"
 
-const S32 PREVIEW_TEXTURE_MIN_WIDTH = 300;
-const S32 PREVIEW_TEXTURE_MIN_HEIGHT = 120;
-
 const S32 CLIENT_RECT_VPAD = 4;
 
 const F32 SECONDS_TO_SHOW_FILE_SAVED_MSG = 8.f;
 
-LLPreviewTexture::LLPreviewTexture(const std::string& name,
-								   const LLRect& rect,
-								   const std::string& title,
-								   const LLUUID& item_uuid,
-								   const LLUUID& object_id,
-								   BOOL show_keep_discard)
-:	LLPreview(name, rect, title, item_uuid, object_id, TRUE, PREVIEW_TEXTURE_MIN_WIDTH, PREVIEW_TEXTURE_MIN_HEIGHT ),
-	mLoadingFullImage( FALSE ),
-	mShowKeepDiscard(show_keep_discard),
-	mCopyToInv(FALSE),
-	mIsCopyable(FALSE),
-	mLastHeight(0),
-	mLastWidth(0)
+LLPreviewTexture::LLPreviewTexture(const LLSD& key)
+	: LLPreview( key ),
+	  mLoadingFullImage( FALSE ),
+	  mShowKeepDiscard(FALSE),
+	  mCopyToInv(FALSE),
+	  mIsCopyable(FALSE),
+	  mUpdateDimensions(TRUE),
+	  mLastHeight(0),
+	  mLastWidth(0)
 {
 	const LLInventoryItem *item = getItem();
 	if(item)
 	{
+		mShowKeepDiscard = item->getPermissions().getCreator() != gAgent.getID();
 		mImageID = item->getAssetUUID();
 		const LLPermissions& perm = item->getPermissions();
 		U32 mask = PERM_NONE;
@@ -94,52 +90,14 @@ LLPreviewTexture::LLPreviewTexture(const std::string& name,
 			mIsCopyable = TRUE;
 		}
 	}
-
-	init();
-
-	setTitle(title);
-
-	if (!getHost())
+	else // not an item, assume it's an asset id
 	{
-		LLRect curRect = getRect();
-		translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
+		mImageID = mItemUUID;
+		mCopyToInv = TRUE;
+		mIsCopyable = TRUE;
 	}
-}
-
-
-// Note: uses asset_id as a dummy item id.
-LLPreviewTexture::LLPreviewTexture(
-	const std::string& name,
-	const LLRect& rect,
-	const std::string& title,
-	const LLUUID& asset_id,
-	BOOL copy_to_inv)
-	:
-	LLPreview(
-		name,
-		rect,
-		title,
-		asset_id,
-		LLUUID::null,
-		TRUE,
-		PREVIEW_TEXTURE_MIN_WIDTH,
-		PREVIEW_TEXTURE_MIN_HEIGHT ),
-	mImageID(asset_id),
-	mLoadingFullImage( FALSE ),
-	mShowKeepDiscard(FALSE),
-	mCopyToInv(copy_to_inv),
-	mIsCopyable(TRUE),
-	mLastHeight(0),
-	mLastWidth(0)
-{
 
-	init();
-
-	setTitle(title);
-
-	LLRect curRect = getRect();
-	translate(curRect.mLeft - rect.mLeft, curRect.mTop - rect.mTop);
-	
+	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_texture.xml", FALSE);
 }
 
 
@@ -153,32 +111,26 @@ LLPreviewTexture::~LLPreviewTexture()
 	mImage = NULL;
 }
 
-
-void LLPreviewTexture::init()
+// virtual
+BOOL LLPreviewTexture::postBuild()
 {
-	
-	
 	if (mCopyToInv) 
 	{
-		LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_embedded_texture.xml");
-
-		childSetAction("Copy To Inventory",LLPreview::onBtnCopyToInv,this);
+		getChild<LLButton>("Keep")->setLabel(getString("Copy"));
+		childSetAction("Keep",LLPreview::onBtnCopyToInv,this);
+		childSetVisible("Discard", false);
 	}
-
 	else if (mShowKeepDiscard)
 	{
-		LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_texture_keep_discard.xml");
-
 		childSetAction("Keep",onKeepBtn,this);
 		childSetAction("Discard",onDiscardBtn,this);
 	}
-
-	else 
+	else
 	{
-		LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_texture.xml");
+		childSetVisible("Keep", false);
+		childSetVisible("Discard", false);
 	}
-
-
+	
 	if (!mCopyToInv) 
 	{
 		const LLInventoryItem* item = getItem();
@@ -190,12 +142,17 @@ void LLPreviewTexture::init()
 			childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
 		}
 	}
+	
+	return LLPreview::postBuild();
 }
 
 void LLPreviewTexture::draw()
 {
-	updateDimensions();
-
+	if (mUpdateDimensions)
+	{
+		updateDimensions();
+	}
+	
 	LLPreview::draw();
 
 	if (!isMinimized())
@@ -241,11 +198,11 @@ void LLPreviewTexture::draw()
 
 			if( mLoadingFullImage )
 			{
-				// *TODO: Translate
-				LLFontGL::getFontSansSerif()->renderUTF8(std::string("Receiving:"), 0,
+				LLFontGL::getFontSansSerif()->renderUTF8(LLTrans::getString("Receiving:"), 0,
 					interior.mLeft + 4, 
 					interior.mBottom + 4,
 					LLColor4::white, LLFontGL::LEFT, LLFontGL::BOTTOM,
+					LLFontGL::NORMAL,
 					LLFontGL::DROP_SHADOW);
 				
 				F32 data_progress = mImage->mDownloadProgress;
@@ -278,11 +235,11 @@ void LLPreviewTexture::draw()
 			else
 			if( !mSavedFileTimer.hasExpired() )
 			{
-				// *TODO: Translate
-				LLFontGL::getFontSansSerif()->renderUTF8(std::string("File Saved"), 0,
+				LLFontGL::getFontSansSerif()->renderUTF8(LLTrans::getString("FileSaved"), 0,
 					interior.mLeft + 4,
 					interior.mBottom + 4,
 					LLColor4::white, LLFontGL::LEFT, LLFontGL::BOTTOM,
+					LLFontGL::NORMAL,
 					LLFontGL::DROP_SHADOW);
 			}
 		}
@@ -300,10 +257,11 @@ BOOL LLPreviewTexture::canSaveAs() const
 // virtual
 void LLPreviewTexture::saveAs()
 {
-	if( mLoadingFullImage ) return;
+	if( mLoadingFullImage )
+		return;
 
 	LLFilePicker& file_picker = LLFilePicker::instance();
-	const LLViewerInventoryItem* item = getItem() ;
+	const LLInventoryItem* item = getItem() ;
 	if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_TGA, item ? LLDir::getScrubbedFileName(item->getName()) : LLStringUtil::null) )
 	{
 		// User canceled or we failed to acquire save file.
@@ -317,6 +275,23 @@ void LLPreviewTexture::saveAs()
 								0, TRUE, FALSE, new LLUUID( mItemUUID ) );
 }
 
+// virtual
+void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+//	mLastHeight = 0;
+//	mLastWidth = 0;
+	mUpdateDimensions = TRUE;
+	LLPreview::reshape(width, height, called_from_parent);
+}
+
+// virtual
+void LLPreviewTexture::onFocusReceived()
+{
+	mLastHeight = 0;
+	mLastWidth = 0;
+	mUpdateDimensions = TRUE;
+	LLPreview::onFocusReceived();
+}
 
 // static
 void LLPreviewTexture::onFileLoadedForSave(BOOL success, 
@@ -328,12 +303,8 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
 											void* userdata)
 {
 	LLUUID* item_uuid = (LLUUID*) userdata;
-	LLPreviewTexture* self = NULL;
-	preview_map_t::iterator found_it = LLPreview::sInstances.find(*item_uuid);
-	if(found_it != LLPreview::sInstances.end())
-	{
-		self = (LLPreviewTexture*) found_it->second;
-	}
+
+	LLPreviewTexture* self = LLFloaterReg::findTypedInstance<LLPreviewTexture>("preview_texture", *item_uuid);
 
 	if( final || !success )
 	{
@@ -381,8 +352,11 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
 // When we receive it, reshape the window accordingly.
 void LLPreviewTexture::updateDimensions()
 {
-	if (!mImage) return;
-
+	if (!mImage)
+		return;
+	
+	mUpdateDimensions = FALSE;
+	
 	S32 image_height = llmax(1, mImage->getHeight(0));
 	S32 image_width = llmax(1, mImage->getWidth(0));
 	// Attempt to make the image 1:1 on screen.
@@ -400,7 +374,7 @@ void LLPreviewTexture::updateDimensions()
 		client_width /= 2;
 		client_height /= 2;
 	}
-
+	
 	S32 view_width = client_width + horiz_pad;
 	S32 view_height = client_height + vert_pad;
 	
@@ -427,27 +401,36 @@ void LLPreviewTexture::updateDimensions()
 	view_width = llmax(view_width, getMinWidth());
 	view_height = llmax(view_height, getMinHeight());
 	
-	if (client_height != mLastHeight || client_width != mLastWidth)
+	if (view_height != mLastHeight || view_width != mLastWidth)
 	{
-		mLastWidth = client_width;
-		mLastHeight = client_height;
-
-		S32 old_top = getRect().mTop;
-		S32 old_left = getRect().mLeft;
 		if (getHost())
 		{
 			getHost()->growToFit(view_width, view_height);
+			reshape( view_width, view_height );
+			setOrigin( 0, getHost()->getRect().getHeight() - (view_height + PREVIEW_HEADER_SIZE) );
 		}
 		else
 		{
+			S32 old_top = getRect().mTop;
+			S32 old_left = getRect().mLeft;
 			reshape( view_width, view_height );
 			S32 new_bottom = old_top - getRect().getHeight();
 			setOrigin( old_left, new_bottom );
-			// Try to keep whole view onscreen, don't allow partial offscreen.
+		}
+		
+		// Try to keep whole view onscreen, don't allow partial offscreen.
+		if (getHost())
+			gFloaterView->adjustToFitScreen(getHost(), FALSE);
+		else
 			gFloaterView->adjustToFitScreen(this, FALSE);
+		
+		if (image_height > 1 && image_width > 1)
+		{
+			// Resize until we know the image's height
+			mLastWidth = view_width;
+			mLastHeight = view_height;
 		}
 	}
-
 	
 	if (!mUserResized)
 	{
@@ -484,6 +467,7 @@ void LLPreviewTexture::loadAsset()
 	mImage = gImageList.getImage(mImageID, MIPMAP_TRUE, FALSE);
 	mImage->setBoostLevel(LLViewerImage::BOOST_PREVIEW);
 	mAssetStatus = PREVIEW_ASSET_LOADING;
+	updateDimensions();
 }
 
 LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus()
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index 75fd39eab0..45b173e7bf 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -43,19 +43,7 @@ class LLImageRaw;
 class LLPreviewTexture : public LLPreview
 {
 public:
-	LLPreviewTexture(
-		const std::string& name,
-		const LLRect& rect,
-		const std::string& title,
-		const LLUUID& item_uuid,
-		const LLUUID& object_id,
-		BOOL show_keep_discard = FALSE);
-	LLPreviewTexture(
-		const std::string& name,
-		const LLRect& rect,
-		const std::string& title,
-		const LLUUID& asset_id,
-		BOOL copy_to_inv = FALSE);
+	LLPreviewTexture(const LLSD& key);
 	~LLPreviewTexture();
 
 	virtual void		draw();
@@ -65,7 +53,10 @@ public:
 
 	virtual void		loadAsset();
 	virtual EAssetStatus	getAssetStatus();
-
+	
+	virtual void		reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+	virtual void 		onFocusReceived();
+	
 	static void			saveToFile(void* userdata);
 	static void			onFileLoadedForSave( 
 							BOOL success,
@@ -79,9 +70,8 @@ public:
 
 protected:
 	void				init();
+	/* virtual */ BOOL	postBuild();
 
-	virtual const char *getTitleName() const { return "Texture"; }
-	
 private:
 	void				updateDimensions();
 	LLUUID						mImageID;
@@ -91,13 +81,14 @@ private:
 	LLFrameTimer		mSavedFileTimer;
 	BOOL                mShowKeepDiscard;
 	BOOL                mCopyToInv;
-
+	
 	// This is stored off in a member variable, because the save-as
 	// button and drag and drop functionality need to know.
 	BOOL mIsCopyable;
 
 	S32 mLastHeight;
 	S32 mLastWidth;
+	BOOL mUpdateDimensions;
 };
 
 
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index bfd14f709a..38d617e468 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -42,6 +42,7 @@
 #include "llfontgl.h"
 #include "llimagegl.h"
 #include "lltimer.h"
+#include "lltextbox.h"
 #include "llglheaders.h"
 
 #include "llagent.h"
@@ -68,9 +69,9 @@ const F32 TOTAL_LOGIN_TIME = 10.f;	// seconds, wild guess at time from GL contex
 S32 gLastStartAnimationFrame = 0;	// human-style indexing, first image = 1
 const S32 ANIMATION_FRAMES = 1; //13;
 
-// XUI:translate
-LLProgressView::LLProgressView(const std::string& name, const LLRect &rect) 
-:	LLPanel(name, rect, FALSE),
+// XUI: Translate
+LLProgressView::LLProgressView(const LLRect &rect) 
+:	LLPanel(),
 	mPercentDone( 0.f ),
 	mURLInMessage(false),
 	mMouseDownInActiveArea( false )
@@ -84,7 +85,7 @@ BOOL LLProgressView::postBuild()
 	mProgressBar = getChild<LLProgressBar>("login_progress_bar");
 
 	mCancelBtn = getChild<LLButton>("cancel_btn");
-	mCancelBtn->setClickedCallback(  LLProgressView::onCancelButtonClicked );
+	mCancelBtn->setClickedCallback(  LLProgressView::onCancelButtonClicked, NULL );
 	mFadeTimer.stop();
 
 	getChild<LLTextBox>("title_text")->setText(LLStringExplicit(LLAppViewer::instance()->getSecondLifeTitle()));
diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h
index 9517ee1321..83574ff52a 100644
--- a/indra/newview/llprogressview.h
+++ b/indra/newview/llprogressview.h
@@ -43,7 +43,7 @@ class LLProgressBar;
 class LLProgressView : public LLPanel
 {
 public:
-	LLProgressView(const std::string& name, const LLRect& rect);
+	LLProgressView(const LLRect& rect);
 	virtual ~LLProgressView();
 	
 	BOOL postBuild();
diff --git a/indra/newview/llsavedsettingsglue.cpp b/indra/newview/llsavedsettingsglue.cpp
index 073b51f80e..4736afa7ba 100644
--- a/indra/newview/llsavedsettingsglue.cpp
+++ b/indra/newview/llsavedsettingsglue.cpp
@@ -39,37 +39,27 @@
 
 #include "llviewercontrol.h"
 
-void LLSavedSettingsGlue::setBOOL(LLUICtrl* ctrl, void* data)
+void LLSavedSettingsGlue::setBOOL(LLUICtrl* ctrl, const std::string& name)
 {
-	const char* name = (const char*)data;
-	LLSD value = ctrl->getValue();
-	gSavedSettings.setBOOL(name, value.asBoolean());
+	gSavedSettings.setBOOL(name, ctrl->getValue().asBoolean());
 }
 
-void LLSavedSettingsGlue::setS32(LLUICtrl* ctrl, void* data)
+void LLSavedSettingsGlue::setS32(LLUICtrl* ctrl, const std::string& name)
 {
-	const char* name = (const char*)data;
-	LLSD value = ctrl->getValue();
-	gSavedSettings.setS32(name, value.asInteger());
+	gSavedSettings.setS32(name, ctrl->getValue().asInteger());
 }
 
-void LLSavedSettingsGlue::setF32(LLUICtrl* ctrl, void* data)
+void LLSavedSettingsGlue::setF32(LLUICtrl* ctrl, const std::string& name)
 {
-	const char* name = (const char*)data;
-	LLSD value = ctrl->getValue();
-	gSavedSettings.setF32(name, (F32)value.asReal());
+	gSavedSettings.setF32(name, (F32)ctrl->getValue().asReal());
 }
 
-void LLSavedSettingsGlue::setU32(LLUICtrl* ctrl, void* data)
+void LLSavedSettingsGlue::setU32(LLUICtrl* ctrl, const std::string& name)
 {
-	const char* name = (const char*)data;
-	LLSD value = ctrl->getValue();
-	gSavedSettings.setU32(name, (U32)value.asInteger());
+	gSavedSettings.setU32(name, (U32)ctrl->getValue().asInteger());
 }
 
-void LLSavedSettingsGlue::setString(LLUICtrl* ctrl, void* data)
+void LLSavedSettingsGlue::setString(LLUICtrl* ctrl, const std::string& name)
 {
-	const char* name = (const char*)data;
-	LLSD value = ctrl->getValue();
-	gSavedSettings.setString(name, value.asString());
+	gSavedSettings.setString(name, ctrl->getValue().asString());
 }
diff --git a/indra/newview/llsavedsettingsglue.h b/indra/newview/llsavedsettingsglue.h
index 8a0f36945c..6c8662dd58 100644
--- a/indra/newview/llsavedsettingsglue.h
+++ b/indra/newview/llsavedsettingsglue.h
@@ -42,11 +42,11 @@ class LLUICtrl;
 class LLSavedSettingsGlue
 {
 public:
-	static void setBOOL(LLUICtrl* ctrl, void* name);
-	static void setS32(LLUICtrl* ctrl, void* name);
-	static void setF32(LLUICtrl* ctrl, void* name);
-	static void setU32(LLUICtrl* ctrl, void* name);
-	static void setString(LLUICtrl* ctrl, void* name);
+	static void setBOOL(LLUICtrl* ctrl, const std::string& name);
+	static void setS32(LLUICtrl* ctrl, const std::string& name);
+	static void setF32(LLUICtrl* ctrl, const std::string& name);
+	static void setU32(LLUICtrl* ctrl, const std::string& name);
+	static void setString(LLUICtrl* ctrl, const std::string& name);
 };
 
 #endif
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 564313980d..0cca1ebe71 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -100,10 +100,10 @@ const S32 MAX_OBJECTS_PER_PACKET = 254;
 // Globals
 //
 
-BOOL gDebugSelectMgr = FALSE;
+//BOOL gDebugSelectMgr = FALSE;
 
-BOOL gHideSelectedObjects = FALSE;
-BOOL gAllowSelectAvatar = FALSE;
+//BOOL gHideSelectedObjects = FALSE;
+//BOOL gAllowSelectAvatar = FALSE;
 
 BOOL LLSelectMgr::sRectSelectInclusive = TRUE;
 BOOL LLSelectMgr::sRenderHiddenSelections = TRUE;
@@ -172,6 +172,9 @@ LLObjectSelection *get_null_object_selection()
 // LLSelectMgr()
 //-----------------------------------------------------------------------------
 LLSelectMgr::LLSelectMgr()
+ : mHideSelectedObjects(LLCachedControl<bool>(gSavedSettings, "HideSelectedObjects", FALSE)),
+   mAllowSelectAvatar( LLCachedControl<bool>(gSavedSettings, "AllowSelectAvatar", FALSE)),
+   mDebugSelectMgr(LLCachedControl<bool>(gSavedSettings, "DebugSelectMgr", FALSE))
 {
 	mTEMode = FALSE;
 	mLastCameraPos.clearVec();
@@ -184,12 +187,12 @@ LLSelectMgr::LLSelectMgr()
 	sHighlightUAnim		= gSavedSettings.getF32("SelectionHighlightUAnim");
 	sHighlightVAnim		= gSavedSettings.getF32("SelectionHighlightVAnim");
 
-	sSilhouetteParentColor = gColors.getColor("SilhouetteParentColor");
-	sSilhouetteChildColor = gColors.getColor("SilhouetteChildColor");
-	sHighlightParentColor = gColors.getColor("HighlightParentColor");
-	sHighlightChildColor = gColors.getColor("HighlightChildColor");
-	sHighlightInspectColor = gColors.getColor("HighlightInspectColor");
-	sContextSilhouetteColor = gColors.getColor("ContextSilhouetteColor")*0.5f;
+	sSilhouetteParentColor =gSavedSkinSettings.getColor("SilhouetteParentColor");
+	sSilhouetteChildColor = gSavedSkinSettings.getColor("SilhouetteChildColor");
+	sHighlightParentColor = gSavedSkinSettings.getColor("HighlightParentColor");
+	sHighlightChildColor = gSavedSkinSettings.getColor("HighlightChildColor");
+	sHighlightInspectColor = gSavedSkinSettings.getColor("HighlightInspectColor");
+	sContextSilhouetteColor = gSavedSkinSettings.getColor("ContextSilhouetteColor")*0.5f;
 
 	sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius");
 	
@@ -202,6 +205,8 @@ LLSelectMgr::LLSelectMgr()
 	mSelectedObjects = new LLObjectSelection();
 	mHoverObjects = new LLObjectSelection();
 	mHighlightedObjects = new LLObjectSelection();
+
+
 }
 
 
@@ -673,7 +678,7 @@ void LLSelectMgr::addAsFamily(std::vector<LLViewerObject*>& objects, BOOL add_to
 		
 		// Can't select yourself
 		if (objectp->mID == gAgentID
-			&& !gAllowSelectAvatar)
+			&& !LLSelectMgr::getInstance()->mAllowSelectAvatar)
 		{
 			continue;
 		}
@@ -2691,7 +2696,7 @@ void LLSelectMgr::selectDelete()
 	}
 
 	LLNotification::Params params("ConfirmObjectDeleteLock");
-	params.functor(boost::bind(&LLSelectMgr::confirmDelete, _1, _2, getSelection()));
+	params.functor.function(boost::bind(&LLSelectMgr::confirmDelete, _1, _2, getSelection()));
 
 	if(locked_but_deleteable_object ||
 	   no_copy_but_deleteable_object ||
@@ -3443,7 +3448,7 @@ void LLSelectMgr::deselectAllIfTooFar()
 
 		if (select_dist_sq > deselect_dist_sq)
 		{
-			if (gDebugSelectMgr)
+			if (mDebugSelectMgr)
 			{
 				llinfos << "Selection manager: auto-deselecting, select_dist = " << fsqrtf(select_dist_sq) << llendl;
 				llinfos << "agent pos global = " << gAgent.getPositionGlobal() << llendl;
@@ -4444,9 +4449,9 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use
 	msg->getStringFast(_PREHASH_ObjectData, _PREHASH_Description, desc);
 
 	// the reporter widget askes the server for info about picked objects
-	if (request_flags & (COMPLAINT_REPORT_REQUEST | BUG_REPORT_REQUEST))
+	if (request_flags & COMPLAINT_REPORT_REQUEST )
 	{
-		EReportType report_type = (COMPLAINT_REPORT_REQUEST & request_flags) ? COMPLAINT_REPORT : BUG_REPORT;
+		EReportType report_type =  COMPLAINT_REPORT ;
 		LLFloaterReporter *reporterp = LLFloaterReporter::getReporter(report_type);
 		if (reporterp)
 		{
@@ -5387,10 +5392,7 @@ void dialog_refresh_all()
 
 	gFloaterTools->dirty();
 
-	if( gPieObject->getVisible() )
-	{
-		gPieObject->arrange();
-	}
+	gPieObject->needsArrange();
 
 	LLFloaterProperties::dirtyAll();
 	LLFloaterInspect::dirty();
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index d6c4b5485d..992cc1e906 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -38,7 +38,8 @@
 #include "llstring.h"
 #include "llundo.h"
 #include "lluuid.h"
-#include "llmemory.h"
+#include "llpointer.h"
+#include "llsafehandle.h"
 #include "llsaleinfo.h"
 #include "llcategory.h"
 #include "v3dmath.h"
@@ -48,7 +49,7 @@
 #include "llbbox.h"
 #include "llpermissions.h"
 #include "llviewerobject.h"
-
+#include "llcontrol.h"
 #include <deque>
 #include "boost/iterator/filter_iterator.hpp"
 
@@ -338,6 +339,7 @@ public:
 	static BOOL					sRectSelectInclusive;	// do we need to surround an object to pick it?
 	static BOOL					sRenderHiddenSelections;	// do we show selection silhouettes that are occluded?
 	static BOOL					sRenderLightRadius;	// do we show the radius of selected lights?
+
 	static F32					sHighlightThickness;
 	static F32					sHighlightUScale;
 	static F32					sHighlightVScale;
@@ -352,6 +354,10 @@ public:
 	static LLColor4				sHighlightInspectColor;
 	static LLColor4				sContextSilhouetteColor;
 
+	LLCachedControl<bool>					mHideSelectedObjects;
+	LLCachedControl<bool>					mAllowSelectAvatar;
+	LLCachedControl<bool>					mDebugSelectMgr;
+
 public:
 	LLSelectMgr();
 	~LLSelectMgr();
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
new file mode 100644
index 0000000000..bd93f5dd28
--- /dev/null
+++ b/indra/newview/llslurl.cpp
@@ -0,0 +1,114 @@
+/** 
+ * @file llslurl.cpp
+ * @brief SLURL manipulation
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llslurl.h"
+
+#include "llweb.h"
+
+const std::string LLSLURL::PREFIX_SL_HELP		= "secondlife://app.";
+const std::string LLSLURL::PREFIX_SL			= "sl://";
+const std::string LLSLURL::PREFIX_SECONDLIFE	= "secondlife://";
+const std::string LLSLURL::PREFIX_SLURL			= "http://slurl.com/secondlife/";
+
+const std::string LLSLURL::APP_TOKEN = "app/";
+
+// static
+std::string LLSLURL::stripProtocol(const std::string& url)
+{
+	std::string stripped = url;
+	if (matchPrefix(stripped, PREFIX_SL_HELP))
+	{
+		stripped.erase(0, PREFIX_SL_HELP.length());
+	}
+	else if (matchPrefix(stripped, PREFIX_SL))
+	{
+		stripped.erase(0, PREFIX_SL.length());
+	}
+	else if (matchPrefix(stripped, PREFIX_SECONDLIFE))
+	{
+		stripped.erase(0, PREFIX_SECONDLIFE.length());
+	}
+	else if (matchPrefix(stripped, PREFIX_SLURL))
+	{
+		stripped.erase(0, PREFIX_SLURL.length());
+	}
+	
+	return stripped;
+}
+
+// static
+bool LLSLURL::isSLURL(const std::string& url)
+{
+	if (matchPrefix(url, PREFIX_SL_HELP))		return true;
+	if (matchPrefix(url, PREFIX_SL))			return true;
+	if (matchPrefix(url, PREFIX_SECONDLIFE))	return true;
+	if (matchPrefix(url, PREFIX_SLURL))			return true;
+	
+	return false;
+}
+
+// static
+bool LLSLURL::isSLURLCommand(const std::string& url)
+{ 
+	if (matchPrefix(url, PREFIX_SL + APP_TOKEN) ||
+		matchPrefix(url, PREFIX_SECONDLIFE + "/" + APP_TOKEN) ||
+		matchPrefix(url, PREFIX_SLURL + APP_TOKEN) )
+	{
+		return true;
+	}
+
+	return false;
+}
+
+// static
+bool LLSLURL::isSLURLHelp(const std::string& url)
+{
+	return matchPrefix(url, PREFIX_SL_HELP);
+}
+
+// static
+std::string LLSLURL::buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z)
+{
+	std::string slurl = PREFIX_SLURL + regionname + llformat("/%d/%d/%d",x,y,z); 
+	slurl = LLWeb::escapeURL( slurl );
+	return slurl;
+}
+
+// static
+bool LLSLURL::matchPrefix(const std::string& url, const std::string& prefix)
+{
+	std::string test_prefix = url.substr(0, prefix.length());
+	LLStringUtil::toLower(test_prefix);
+	return test_prefix == prefix;
+}
diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h
new file mode 100644
index 0000000000..05788623d9
--- /dev/null
+++ b/indra/newview/llslurl.h
@@ -0,0 +1,85 @@
+/** 
+ * @file llslurl.h
+ * @brief SLURL manipulation
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_SLURL_H
+#define LL_SLURL_H
+
+#include <string>
+
+// IAN BUG: where should this live?
+// IAN BUG: are static utility functions right?  See LLUUID.
+// question of whether to have a LLSLURL object or a 
+// some of this was moved from LLURLDispatcher
+
+/**
+ * SLURL manipulation
+ */
+class LLSLURL
+{
+public:
+	static const std::string PREFIX_SL_HELP;
+	static const std::string PREFIX_SL;
+	static const std::string PREFIX_SECONDLIFE;
+	static const std::string PREFIX_SLURL;
+
+	static const std::string APP_TOKEN;
+
+	/**
+	 * Is this any sort of secondlife:// or sl:// URL?
+	 */
+	static bool isSLURL(const std::string& url);
+
+	/**
+	 * Is this a special secondlife://app/ URL?
+	 */
+	static bool isSLURLCommand(const std::string& url);
+
+	/**
+	 * Not sure what it is.
+	 */
+	static bool isSLURLHelp(const std::string& url);
+
+	/**
+	 * builds: http://slurl.com/secondlife/RegionName/x/y/z/
+	 */
+	static std::string buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z);
+
+	/**
+	 * Strip protocol part from the URL.
+	 */
+	static std::string stripProtocol(const std::string& url);
+
+private:
+	static bool matchPrefix(const std::string& url, const std::string& prefix);
+};
+
+#endif
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 4d67b374c8..b6b801866c 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -35,9 +35,10 @@
 
 #define SG_MIN_DIST_RATIO 0.00001f
 
-#include "llmemory.h"
 #include "lldrawable.h"
 #include "lloctree.h"
+#include "llpointer.h"
+#include "llrefcount.h"
 #include "llvertexbuffer.h"
 #include "llgltypes.h"
 #include "llcubemap.h"
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 984646e959..4cf94b5bc4 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -56,15 +56,18 @@
 #include "lldir.h"
 #include "llerrorcontrol.h"
 #include "llfiltersd2xmlrpc.h"
+#include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "llhttpsender.h"
 #include "imageids.h"
 #include "lllandmark.h"
+#include "lllocationhistory.h"
 #include "llloginflags.h"
 #include "llmd5.h"
 #include "llmemorystream.h"
 #include "llmessageconfig.h"
 #include "llmoveview.h"
+#include "llteleporthistory.h"
 #include "llregionhandle.h"
 #include "llsd.h"
 #include "llsdserialize.h"
@@ -83,10 +86,8 @@
 #include "llfloateravatarpicker.h"
 #include "llcallbacklist.h"
 #include "llcallingcard.h"
-#include "llcolorscheme.h"
 #include "llconsole.h"
 #include "llcontainerview.h"
-#include "llfloaterstats.h"
 #include "lldebugview.h"
 #include "lldrawable.h"
 #include "lleventnotifier.h"
@@ -103,8 +104,6 @@
 #include "llfloatertopobjects.h"
 #include "llfloatertos.h"
 #include "llfloaterworldmap.h"
-#include "llframestats.h"
-#include "llframestatview.h"
 #include "llgesturemgr.h"
 #include "llgroupmgr.h"
 #include "llhudeffecttrail.h"
@@ -120,6 +119,7 @@
 #include "llmutelist.h"
 #include "llnotify.h"
 #include "llpanelavatar.h"
+#include "llavatarpropertiesprocessor.h"
 #include "llpaneldirbrowser.h"
 #include "llpaneldirland.h"
 #include "llpanelevent.h"
@@ -185,6 +185,8 @@
 #include "llwlparammanager.h"
 #include "llwaterparammanager.h"
 #include "llagentlanguage.h"
+#include "llwearable.h"
+#include "llinventorybridge.h"
 
 #if LL_LIBXUL_ENABLED
 #include "llmozlib.h"
@@ -245,7 +247,6 @@ bool update_dialog_callback(const LLSD& notification, const LLSD& response);
 void login_packet_failed(void**, S32 result);
 void use_circuit_callback(void**, S32 result);
 void register_viewer_callbacks(LLMessageSystem* msg);
-void init_stat_view();
 void asset_callback_nothing(LLVFS*, const LLUUID&, LLAssetType::EType, void*, S32);
 bool callback_choose_gender(const LLSD& notification, const LLSD& response);
 void init_start_screen(S32 location_id);
@@ -253,7 +254,7 @@ void release_start_screen();
 void reset_login();
 void apply_udp_blacklist(const std::string& csv);
 
-void callback_cache_name(const LLUUID& id, const std::string& firstname, const std::string& lastname, BOOL is_group, void* data)
+void callback_cache_name(const LLUUID& id, const std::string& firstname, const std::string& lastname, BOOL is_group)
 {
 	LLNameListCtrl::refreshAll(id, firstname, lastname, is_group);
 	LLNameBox::refreshAll(id, firstname, lastname, is_group);
@@ -355,15 +356,25 @@ bool idle_startup()
 
 	static bool stipend_since_login = false;
 
-	static bool samename = false;
-
 	// HACK: These are things from the main loop that usually aren't done
 	// until initialization is complete, but need to be done here for things
 	// to work.
 	gIdleCallbacks.callFunctions();
-	gViewerWindow->handlePerFrameHover();
+	gViewerWindow->updateUI();
 	LLMortician::updateClass();
 
+	const std::string delims (" ");
+	std::string system;
+	int begIdx, endIdx;
+	std::string osString = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
+
+	begIdx = osString.find_first_not_of (delims);
+	endIdx = osString.find_first_of (delims, begIdx);
+	system = osString.substr (begIdx, endIdx - begIdx);
+	system += "Locale";
+
+	LLStringUtil::setLocale (LLTrans::getString(system));
+
 	if (gNoRender)
 	{
 		// HACK, skip optional updates if you're running drones
@@ -431,8 +442,6 @@ bool idle_startup()
 
 		// Load autopilot and stats stuff
 		gAgentPilot.load(gSavedSettings.getString("StatsPilotFile"));
-		gFrameStats.setFilename(gSavedSettings.getString("StatsFile"));
-		gFrameStats.setSummaryFilename(gSavedSettings.getString("StatsSummaryFile"));
 
 		//gErrorStream.setTime(gSavedSettings.getBOOL("LogTimestamps"));
 
@@ -780,15 +789,11 @@ bool idle_startup()
 
 		// *NOTE: This is where gMuteList used to get allocated before becoming LLMuteList::getInstance().
 
-		// Initialize UI
-		if (!gNoRender)
+		// Login screen needs menus for preferences, but we can enter
+		// this startup phase more than once.
+		if (gLoginMenuBarView == NULL)
 		{
-			// Initialize all our tools.  Must be done after saved settings loaded.
-			// NOTE: This also is where gToolMgr used to be instantiated before being turned into a singleton.
-			LLToolMgr::getInstance()->initTools();
-
-			// Quickly get something onscreen to look at.
-			gViewerWindow->initWorldUI();
+			init_menus();
 		}
 		
 		gViewerWindow->setNormalControlsVisible( FALSE );	
@@ -857,10 +862,10 @@ bool idle_startup()
         // Set PerAccountSettingsFile to the default value.
 		gSavedSettings.setString("PerAccountSettingsFile",
 			gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, 
-				LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount")
-				)
-			);
+				LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount")));
 
+		// Note: can't store warnings files per account because some come up before login
+		
 		// Overwrite default user settings with user settings								 
 		LLAppViewer::instance()->loadSettingsFromDirectory("Account");
 
@@ -915,12 +920,12 @@ bool idle_startup()
 			LLURLSimString::setString( location );
 
 			// END TODO
-			LLPanelLogin::close();
+			LLPanelLogin::closePanel();
 		}
 
 		
 		//For HTML parsing in text boxes.
-		LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") );
+		LLTextEditor::setLinkColor( gSavedSkinSettings.getColor4("HTMLLinkColor") );
 
 		// Load URL History File
 		LLURLHistory::loadFile("url_history.xml");
@@ -943,7 +948,7 @@ bool idle_startup()
 			// UserLoginLocationReply arrives
 			location_which = START_LOCATION_ID_LAST;
 		}
-		else if (gSavedSettings.getBOOL("LoginLastLocation"))
+		else if (gSavedSettings.getString("LoginLocation") == "last" )
 		{
 			agent_location_id = START_LOCATION_ID_LAST;	// last location
 			location_which = START_LOCATION_ID_LAST;
@@ -963,7 +968,7 @@ bool idle_startup()
 
 		// Display the startup progress bar.
 		gViewerWindow->setShowProgress(TRUE);
-		gViewerWindow->setProgressCancelButtonVisible(TRUE, std::string("Quit")); // *TODO: Translate
+		gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Quit"));
 
 		// Poke the VFS, which could potentially block for a while if
 		// Windows XP is acting up
@@ -972,9 +977,6 @@ bool idle_startup()
 
 		gVFS->pokeFiles();
 
-		// color init must be after saved settings loaded
-		init_colors();
-
 		// skipping over STATE_UPDATE_CHECK because that just waits for input
 		LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
 
@@ -1037,9 +1039,7 @@ bool idle_startup()
 		sAuthUriNum = 0;
 		auth_method = "login_to_simulator";
 		
-		LLStringUtil::format_map_t args;
-		args["[APP_NAME]"] = LLAppViewer::instance()->getSecondLifeTitle();
-		auth_desc = LLTrans::getString("LoginInProgress", args);
+		auth_desc = LLTrans::getString("LoginInProgress");
 		LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
 	}
 
@@ -1063,13 +1063,9 @@ bool idle_startup()
 			start << xml_escape_string(unescaped_start.str());
 			
 		}
-		else if (gSavedSettings.getBOOL("LoginLastLocation"))
-		{
-			start << "last";
-		}
 		else
 		{
-			start << "home";
+			start << gSavedSettings.getString("LoginLocation");
 		}
 
 		char hashed_mac_string[MD5HEX_STR_SIZE];		/* Flawfinder: ignore */
@@ -1107,7 +1103,7 @@ bool idle_startup()
 		LL_DEBUGS("AppInit") << "STATE_LOGIN_NO_DATA_YET" << LL_ENDL;
 		// If we get here we have gotten past the potential stall
 		// in curl, so take "may appear frozen" out of progress bar. JC
-		auth_desc = "Logging in...";
+		auth_desc = LLTrans::getString("LoginInProgressNoFrozen");
 		set_startup_status(progress, auth_desc, auth_message);
 		// Process messages to keep from dropping circuit.
 		LLMessageSystem* msg = gMessageSystem;
@@ -1487,6 +1483,9 @@ bool idle_startup()
 					if((*it).second == "Y")  gPacificDaylightTime = TRUE;
 					else gPacificDaylightTime = FALSE;
 				}
+
+				//setup map of datetime strings to codes and slt & local time offset from utc
+				LLStringOps::setupDatetimeInfo (gPacificDaylightTime);
 			}
 			options.clear();
 			if (LLUserAuth::getInstance()->getOptions("initial-outfit", options)
@@ -1589,7 +1588,7 @@ bool idle_startup()
 	//---------------------------------------------------------------------
 	if (STATE_WORLD_INIT == LLStartUp::getStartupState())
 	{
-		set_startup_status(0.40f, LLTrans::getString("LoginInitializingWorld"), gAgent.mMOTD);
+		set_startup_status(0.30f, LLTrans::getString("LoginInitializingWorld"), gAgent.mMOTD);
 		display_startup();
 		// We should have an agent id by this point.
 		llassert(!(gAgentID == LLUUID::null));
@@ -1601,6 +1600,7 @@ bool idle_startup()
 		// Since we connected, save off the settings so the user doesn't have to
 		// type the name/password again if we crash.
 		gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
+		gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE);
 
 		//
 		// Initialize classes w/graphics stuff.
@@ -1617,8 +1617,16 @@ bool idle_startup()
 		LLWLParamManager::initClass();
 		LLWaterParamManager::initClass();
 
-		// RN: don't initialize VO classes in drone mode, they are too closely tied to rendering
 		LLViewerObject::initVOClasses();
+		LLWearable::initClass();
+
+		// Initialize all our tools.  Must be done after saved settings loaded.
+		// NOTE: This also is where gToolMgr used to be instantiated before being turned into a singleton.
+		LLToolMgr::getInstance()->initTools();
+
+		// Pre-load floaters, like the world map, that are slow to spawn
+		// due to XML complexity.
+		gViewerWindow->initWorldUI();
 
 		display_startup();
 
@@ -1662,6 +1670,14 @@ bool idle_startup()
 	if (STATE_MULTIMEDIA_INIT == LLStartUp::getStartupState())
 	{
 		LLStartUp::multimediaInit();
+		LLStartUp::setStartupState( STATE_FONT_INIT );
+		return FALSE;
+	}
+
+	// Loading fonts takes several seconds
+	if (STATE_FONT_INIT == LLStartUp::getStartupState())
+	{
+		LLStartUp::fontInit();
 		LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT );
 		return FALSE;
 	}
@@ -1689,14 +1705,12 @@ bool idle_startup()
 		}	
 		gLoginMenuBarView->setVisible( FALSE );
 		gLoginMenuBarView->setEnabled( FALSE );
-
-		LLRect window(0, gViewerWindow->getWindowHeight(), gViewerWindow->getWindowWidth(), 0);
-		gViewerWindow->adjustControlRectanglesForFirstUse(window);
-
-		if(gSavedSettings.getBOOL("ShowMiniMap"))
-		{
-			LLFloaterMap::showInstance();
-		}
+		
+		// ProductEngine: Should be able to move this code near where we call loadSettingsFromDirectory()
+		LLTeleportHistory::getInstance()->load(); // *TODO: find a better place for doing this
+		LLLocationHistory::getInstance()->load(); // *TODO: find a better place for doing this
+		
+		LLFloaterReg::showInitialVisibleInstances();
 
 		if (gSavedSettings.getBOOL("ShowCameraControls"))
 		{
@@ -1725,10 +1739,6 @@ bool idle_startup()
 			LLError::logToFixedBuffer(gDebugView->mDebugConsolep);
 			// set initial visibility of debug console
 			gDebugView->mDebugConsolep->setVisible(gSavedSettings.getBOOL("ShowDebugConsole"));
-			if (gSavedSettings.getBOOL("ShowDebugStats"))
-			{
-				LLFloaterStats::showInstance();
-			}
 		}
 
 		//
@@ -1752,8 +1762,10 @@ bool idle_startup()
 		if ( gCacheName == NULL )
 		{
 			gCacheName = new LLCacheName(gMessageSystem);
-			gCacheName->addObserver(callback_cache_name);
-	
+			gCacheName->addObserver(&callback_cache_name);
+			gCacheName->LocalizeCacheName("waiting", LLTrans::getString("CacheWaiting"));
+			gCacheName->LocalizeCacheName("nobody", LLTrans::getString("CacheNobody"));
+			gCacheName->LocalizeCacheName("none", LLTrans::getString("CacheNone"));
 			// Load stored cache if possible
             LLAppViewer::instance()->loadNameCache();
 		}
@@ -1767,14 +1779,6 @@ bool idle_startup()
 		//reset statistics
 		LLViewerStats::getInstance()->resetStats();
 
-		if (!gNoRender)
-		{
-			//
-			// Set up all of our statistics UI stuff.
-			//
-			init_stat_view();
-		}
-
 		display_startup();
 		//
 		// Set up region and surface defaults
@@ -2117,6 +2121,11 @@ bool idle_startup()
 		{
 			LLClassifiedInfo::loadCategories(options);
 		}
+
+
+		//all categories loaded. lets create "My Favourites" category
+		gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE,true);
+
 		gInventory.buildParentChildMap();
 
 		llinfos << "Setting Inventory changed mask and notifying observers" << llendl;
@@ -2145,17 +2154,9 @@ bool idle_startup()
 		llinfos << "Requesting Agent Data" << llendl;
 		gAgent.sendAgentDataUpdateRequest();
 
-		bool shown_at_exit = gSavedSettings.getBOOL("ShowInventory");
-
 		// Create the inventory views
 		llinfos << "Creating Inventory Views" << llendl;
-		LLInventoryView::showAgentInventory();
-
-		// Hide the inventory if it wasn't shown at exit
-		if(!shown_at_exit)
-		{
-			LLInventoryView::toggleVisibility(NULL);
-		}
+		LLFloaterReg::getInstance("inventory");
 
 		LLStartUp::setStartupState( STATE_MISC );
 		return FALSE;
@@ -2211,6 +2212,7 @@ bool idle_startup()
 
 			// and make sure it's saved
 			gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE );
+			gSavedSkinSettings.saveToFile( gSavedSettings.getString("SkinningSettingsFile") , TRUE );
 		};
 
 		if (!gNoRender)
@@ -2296,38 +2298,20 @@ bool idle_startup()
 		//{
 		//}
 
+		// The reason we show the alert is because we want to
+		// reduce confusion for when you log in and your provided
+		// location is not your expected location. So, if this is
+		// your first login, then you do not have an expectation,
+		// thus, do not show this alert.
 		if (!gAgent.isFirstLogin())
 		{
 			bool url_ok = LLURLSimString::sInstance.parse();
-			if (!((agent_start_location == "url" && url_ok) ||
-                  (!url_ok && ((agent_start_location == "last" && gSavedSettings.getBOOL("LoginLastLocation")) ||
-							   (agent_start_location == "home" && !gSavedSettings.getBOOL("LoginLastLocation"))))))
-			{
-				// The reason we show the alert is because we want to
-				// reduce confusion for when you log in and your provided
-				// location is not your expected location. So, if this is
-				// your first login, then you do not have an expectation,
-				// thus, do not show this alert.
-				LLSD args;
-				if (url_ok)
-				{
-					args["TYPE"] = "desired";
-					args["HELP"] = "";
-				}
-				else if (gSavedSettings.getBOOL("LoginLastLocation"))
-				{
-					args["TYPE"] = "last";
-					args["HELP"] = "";
-				}
-				else
-				{
-					args["TYPE"] = "home";
-					args["HELP"] = "You may want to set a new home location.";
-				}
-				LLNotifications::instance().add("AvatarMoved", args);
-			}
-			else
+			if ((url_ok && agent_start_location == "url") ||
+				(!url_ok && ((agent_start_location == gSavedSettings.getString("LoginLocation")))))
 			{
+				// Start location is OK
+				// Disabled code to restore camera location and focus if logging in to default location
+				static bool samename = false;
 				if (samename)
 				{
 					// restore old camera pos
@@ -2342,6 +2326,23 @@ bool idle_startup()
 					gAgent.stopCameraAnimation();
 				}
 			}
+			else
+			{
+				std::string msg;
+				if (url_ok)
+				{
+					msg = "AvatarMovedDesired";
+				}
+				else if (gSavedSettings.getString("LoginLocation") == "home")
+				{
+					msg = "AvatarMovedHome";
+				}
+				else
+				{
+					msg = "AvatarMovedLast";
+				}
+				LLNotifications::instance().add(msg);
+			}
 		}
 
         //DEV-17797.  get null folder.  Any items found here moved to Lost and Found
@@ -2477,11 +2478,9 @@ bool idle_startup()
 		set_startup_status(1.0, "", "");
 
 		// Let the map know about the inventory.
-		if(gFloaterWorldMap)
-		{
-			gFloaterWorldMap->observeInventory(&gInventory);
-			gFloaterWorldMap->observeFriends();
-		}
+		LLFloaterWorldMap* floater_world_map = LLFloaterWorldMap::getInstance();
+		floater_world_map->observeInventory(&gInventory);
+		floater_world_map->observeFriends();
 
 		gViewerWindow->showCursor();
 		gViewerWindow->getWindow()->resetBusyCount();
@@ -2509,6 +2508,8 @@ bool idle_startup()
 			gAgentPilot.startPlayback();
 		}
 
+		show_debug_menus(); // Debug menu visiblity and First Use trigger
+		
 		// If we've got a startup URL, dispatch it
 		LLStartUp::dispatchURL();
 
@@ -2597,6 +2598,7 @@ void login_callback(S32 option, void *userdata)
 		{
 			// turn off the setting and write out to disk
 			gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE );
+			gSavedSkinSettings.saveToFile( gSavedSettings.getString("SkinningSettingsFile") , TRUE );
 		}
 
 		// Next iteration through main loop should shut down the app cleanly.
@@ -2604,7 +2606,7 @@ void login_callback(S32 option, void *userdata)
 		
 		if (LLAppViewer::instance()->quitRequested())
 		{
-			LLPanelLogin::close();
+			LLPanelLogin::closePanel();
 		}
 		return;
 	}
@@ -2761,7 +2763,7 @@ bool first_run_dialog_callback(const LLSD& notification, const LLSD& response)
 	if (0 == option)
 	{
 		LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL;
-		LLWeb::loadURL( CREATE_ACCOUNT_URL );
+		LLWeb::loadURLExternal(LLTrans::getString("create_account_url") );
 	}
 
 	LLPanelLogin::giveFocus();
@@ -2786,12 +2788,12 @@ bool login_alert_status(const LLSD& notification, const LLSD& response)
     {
         case 0:     // OK
             break;
-        case 1:     // Help
-            LLWeb::loadURL( SUPPORT_URL );
-            break;
+      //  case 1:     // Help
+      //      LLWeb::loadURL(LLNotifications::instance().getGlobalString("SUPPORT_URL") );
+      //      break;
         case 2:     // Teleport
             // Restart the login process, starting at our home locaton
-            LLURLSimString::setString(LLURLSimString::sLocationStringHome);
+            LLURLSimString::setString("home");
             LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
             break;
         default:
@@ -2806,14 +2808,13 @@ void update_app(BOOL mandatory, const std::string& auth_msg)
 {
 	// store off config state, as we might quit soon
 	gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);	
-
+	gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE);
 	std::ostringstream message;
 
-	//*TODO:translate
 	std::string msg;
 	if (!auth_msg.empty())
 	{
-		msg = "(" + auth_msg + ") \n";
+		msg = "("+ auth_msg + ") \n";
 	}
 
 	LLSD args;
@@ -2986,9 +2987,7 @@ bool update_dialog_callback(const LLSD& notification, const LLSD& response)
 	system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
 
 #elif LL_LINUX || LL_SOLARIS
-	OSMessageBox("Automatic updating is not yet implemented for Linux.\n"
-		"Please download the latest version from www.secondlife.com.",
-		LLStringUtil::null, OSMB_OK);
+	OSMessageBox(LLTrans::getString("MBNoAutoUpdate"), LLStringUtil::null, OSMB_OK);
 #endif
 	LLAppViewer::instance()->forceQuit();
 	return false;
@@ -3093,7 +3092,7 @@ void register_viewer_callbacks(LLMessageSystem* msg)
 		LLViewerParcelMgr::processParcelDwellReply);
 
 	msg->setHandlerFunc("AvatarPropertiesReply",
-						LLPanelAvatar::processAvatarPropertiesReply);
+						LLAvatarPropertiesProcessor::processAvatarPropertiesReply);
 	msg->setHandlerFunc("AvatarInterestsReply",
 						LLPanelAvatar::processAvatarInterestsReply);
 	msg->setHandlerFunc("AvatarGroupsReply",
@@ -3202,14 +3201,6 @@ void register_viewer_callbacks(LLMessageSystem* msg)
 	msg->setHandlerFuncFast(_PREHASH_FeatureDisabled, process_feature_disabled_message);
 }
 
-
-void init_stat_view()
-{
-	LLFrameStatView *frameviewp = gDebugView->mFrameStatView;
-	frameviewp->setup(gFrameStats);
-	frameviewp->mShowPercent = FALSE;
-}
-
 void asset_callback_nothing(LLVFS*, const LLUUID&, LLAssetType::EType, void*, S32)
 {
 	// nothing
@@ -3287,8 +3278,6 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
 }
 
 // Loads a bitmap to display during load
-// location_id = 0 => last position
-// location_id = 1 => home position
 void init_start_screen(S32 location_id)
 {
 	if (gStartImageGL.notNull())
@@ -3406,7 +3395,7 @@ void reset_login()
 	}
 
 	// Hide any other stuff
-	LLFloaterMap::hideInstance();
+	LLFloaterReg::hideVisibleInstances();
 }
 
 //---------------------------------------------------------------------------
@@ -3424,13 +3413,23 @@ void LLStartUp::multimediaInit()
 {
 	LL_DEBUGS("AppInit") << "Initializing Multimedia...." << LL_ENDL;
 	std::string msg = LLTrans::getString("LoginInitializingMultimedia");
-	set_startup_status(0.50f, msg.c_str(), gAgent.mMOTD.c_str());
+	set_startup_status(0.40f, msg.c_str(), gAgent.mMOTD.c_str());
 	display_startup();
 
 	LLViewerMedia::initClass();
 	LLViewerParcelMedia::initClass();
 }
 
+void LLStartUp::fontInit()
+{
+	LL_DEBUGS("AppInit") << "Initializing fonts...." << LL_ENDL;
+	std::string msg = LLTrans::getString("LoginInitializingFonts");
+	set_startup_status(0.45f, msg.c_str(), gAgent.mMOTD.c_str());
+	display_startup();
+
+	LLFontGL::loadDefaultFonts();
+}
+
 bool LLStartUp::dispatchURL()
 {
 	// ok, if we've gotten this far and have a startup URL
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index fe347e9efe..93701800e9 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -58,6 +58,7 @@ typedef enum {
 	STATE_LOGIN_PROCESS_RESPONSE,	// Check authentication reply
 	STATE_WORLD_INIT,				// Start building the world
 	STATE_MULTIMEDIA_INIT,			// Init the rest of multimedia library
+	STATE_FONT_INIT,				// Load default fonts
 	STATE_SEED_GRANTED_WAIT,		// Wait for seed cap grant
 	STATE_SEED_CAP_GRANTED,			// Have seed cap grant 
 	STATE_WORLD_WAIT,				// Waiting for simulator
@@ -92,6 +93,9 @@ public:
 	static void multimediaInit();
 		// Initialize LLViewerMedia multimedia engine.
 
+	// Load default fonts not already loaded at start screen
+	static void fontInit();
+
 	// outfit_folder_name can be a folder anywhere in your inventory, 
 	// but the name must be a case-sensitive exact match.
 	// gender_name is either "male" or "female"
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index f36d12d638..364214b9e7 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -53,6 +53,7 @@
 #include "llmenugl.h"
 #include "llnotify.h"
 #include "llimview.h"
+#include "llsd.h"
 #include "lltextbox.h"
 #include "llui.h"
 #include "llviewerparceloverlay.h"
@@ -73,9 +74,10 @@
 #include "lltoolmgr.h"
 #include "llfocusmgr.h"
 #include "llappviewer.h"
-
+#include "lltrans.h"
 // library includes
 #include "imageids.h"
+#include "llfloaterreg.h"
 #include "llfontgl.h"
 #include "llrect.h"
 #include "llerror.h"
@@ -123,13 +125,15 @@ std::vector<std::string> LLStatusBar::sDays;
 std::vector<std::string> LLStatusBar::sMonths;
 const U32 LLStatusBar::MAX_DATE_STRING_LENGTH = 2000;
 
-LLStatusBar::LLStatusBar(const std::string& name, const LLRect& rect)
-:	LLPanel(name, LLRect(), FALSE),		// not mouse opaque
-mBalance(0),
-mHealth(100),
-mSquareMetersCredit(0),
-mSquareMetersCommitted(0)
+LLStatusBar::LLStatusBar(const LLRect& rect)
+:	LLPanel(),
+	mBalance(0),
+	mHealth(100),
+	mSquareMetersCredit(0),
+	mSquareMetersCommitted(0)
 {
+	setRect(rect);
+	
 	// status bar can possible overlay menus?
 	setMouseOpaque(FALSE);
 	setIsChrome(TRUE);
@@ -180,25 +184,28 @@ mSquareMetersCommitted(0)
 	S32 y = 0;
 	LLRect r;
 	r.set( x-SIM_STAT_WIDTH, y+MENU_BAR_HEIGHT-1, x, y+1);
-	mSGBandwidth = new LLStatGraph("BandwidthGraph", r);
-	mSGBandwidth->setFollows(FOLLOWS_BOTTOM | FOLLOWS_RIGHT);
+	LLStatGraph::Params sgp;
+	sgp.name("BandwidthGraph");
+	sgp.rect(r);
+	sgp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_RIGHT);
+	sgp.mouse_opaque(false);
+	mSGBandwidth = LLUICtrlFactory::create<LLStatGraph>(sgp);
 	mSGBandwidth->setStat(&LLViewerStats::getInstance()->mKBitStat);
-	std::string text = childGetText("bandwidth_tooltip") + " ";
-	LLUIString bandwidth_tooltip = text;	// get the text from XML until this widget is XML driven
-	mSGBandwidth->setLabel(bandwidth_tooltip.getString());
 	mSGBandwidth->setUnits("Kbps");
 	mSGBandwidth->setPrecision(0);
-	mSGBandwidth->setMouseOpaque(FALSE);
 	addChild(mSGBandwidth);
 	x -= SIM_STAT_WIDTH + 2;
 
 	r.set( x-SIM_STAT_WIDTH, y+MENU_BAR_HEIGHT-1, x, y+1);
-	mSGPacketLoss = new LLStatGraph("PacketLossPercent", r);
-	mSGPacketLoss->setFollows(FOLLOWS_BOTTOM | FOLLOWS_RIGHT);
+	//these don't seem to like being reused
+	LLStatGraph::Params pgp;
+	pgp.name("PacketLossPercent");
+	pgp.rect(r);
+	pgp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_RIGHT);
+	pgp.mouse_opaque(false);
+
+	mSGPacketLoss = LLUICtrlFactory::create<LLStatGraph>(pgp);
 	mSGPacketLoss->setStat(&LLViewerStats::getInstance()->mPacketsLostPercentStat);
-	text = childGetText("packet_loss_tooltip") + " ";
-	LLUIString packet_loss_tooltip = text;	// get the text from XML until this widget is XML driven
-	mSGPacketLoss->setLabel(packet_loss_tooltip.getString());
 	mSGPacketLoss->setUnits("%");
 	mSGPacketLoss->setMin(0.f);
 	mSGPacketLoss->setMax(5.f);
@@ -206,7 +213,6 @@ mSquareMetersCommitted(0)
 	mSGPacketLoss->setThreshold(1, 1.f);
 	mSGPacketLoss->setThreshold(2, 3.f);
 	mSGPacketLoss->setPrecision(1);
-	mSGPacketLoss->setMouseOpaque(FALSE);
 	mSGPacketLoss->mPerSec = FALSE;
 	addChild(mSGPacketLoss);
 
@@ -236,9 +242,10 @@ void LLStatusBar::draw()
 
 	if (isBackgroundVisible())
 	{
+		static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0);
+		static LLUICachedControl<LLColor4> color_drop_shadow ("ColorDropShadow");
 		gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, 
-			LLUI::sColorsGroup->getColor("ColorDropShadow"), 
-			LLUI::sConfigGroup->getS32("DropShadowFloater") );
+			color_drop_shadow, drop_shadow_floater );
 	}
 	LLPanel::draw();
 }
@@ -254,51 +261,22 @@ void LLStatusBar::refresh()
 	mSGBandwidth->setThreshold(0, bwtotal*0.75f);
 	mSGBandwidth->setThreshold(1, bwtotal);
 	mSGBandwidth->setThreshold(2, bwtotal);
-
-	// *TODO: Localize / translate time
-
+	
 	// Get current UTC time, adjusted for the user's clock
 	// being off.
 	time_t utc_time;
 	utc_time = time_corrected();
 
-	// There's only one internal tm buffer.
-	struct tm* internal_time;
-
-	// Convert to Pacific, based on server's opinion of whether
-	// it's daylight savings time there.
-	internal_time = utc_to_pacific_time(utc_time, gPacificDaylightTime);
-
-	S32 hour = internal_time->tm_hour;
-	S32 min  = internal_time->tm_min;
-
-	std::string am_pm = "AM";
-	if (hour > 11)
-	{
-		hour -= 12;
-		am_pm = "PM";
-	}
-
-	std::string tz = "PST";
-	if (gPacificDaylightTime)
-	{
-		tz = "PDT";
-	}
-	// Zero hour is 12 AM
-	if (hour == 0) hour = 12;
-	std::ostringstream t;
-	t << std::setfill(' ') << std::setw(2) << hour << ":" 
-		<< std::setfill('0') << std::setw(2) << min 
-		<< " " << am_pm << " " << tz;
-	mTextTime->setText(t.str());
+	std::string timeStr = getString("time");
+	LLSD substitution;
+	substitution["datetime"] = (S32) utc_time;
+	LLStringUtil::format (timeStr, substitution);
+	mTextTime->setText(timeStr);
 
-	// Year starts at 1900, set the tooltip to have the date
-	std::ostringstream date;
-	date	<< sDays[internal_time->tm_wday] << ", "
-		<< std::setfill('0') << std::setw(2) << internal_time->tm_mday << " "
-		<< sMonths[internal_time->tm_mon] << " "
-		<< internal_time->tm_year + 1900;
-	mTextTime->setToolTip(date.str());
+	// set the tooltip to have the date
+	std::string dtStr = getString("timeTooltip");
+	LLStringUtil::format (dtStr, substitution);
+	mTextTime->setToolTip (dtStr);
 
 	LLRect r;
 	const S32 MENU_RIGHT = gMenuBarView->getRightmostMenuEdge();
@@ -492,7 +470,6 @@ void LLStatusBar::refresh()
 		mRegionDetails.mTime = mTextTime->getText();
 		mRegionDetails.mBalance = mBalance;
 		mRegionDetails.mAccessString = region->getSimAccessString();
-		mRegionDetails.mPing = region->getNetDetailsForLCD();
 		if (parcel)
 		{
 			location_name = region->getName()
@@ -514,7 +491,7 @@ void LLStatusBar::refresh()
 			
 			if (parcel->isPublic())
 			{
-				mRegionDetails.mOwner = "Public";
+				mRegionDetails.mOwner = LLTrans::getString("Public");
 			}
 			else
 			{
@@ -526,7 +503,7 @@ void LLStatusBar::refresh()
 					}
 					else
 					{
-						mRegionDetails.mOwner = "Group Owned";
+						mRegionDetails.mOwner = LLTrans::getString("GroupOwned");
 					}
 				}
 				else
@@ -544,31 +521,31 @@ void LLStatusBar::refresh()
 						   region->getSimAccessString().c_str());
 			// keep these around for the LCD to use
 			mRegionDetails.mRegionName = region->getName();
-			mRegionDetails.mParcelName = "Unknown";
+			mRegionDetails.mParcelName = LLTrans::getString("Unknown");
 			
 			mRegionDetails.mX = pos_x;
 			mRegionDetails.mY = pos_y;
 			mRegionDetails.mZ = pos_z;
 			mRegionDetails.mArea = 0;
 			mRegionDetails.mForSale = FALSE;
-			mRegionDetails.mOwner = "Unknown";
+			mRegionDetails.mOwner = LLTrans::getString("Unknown");
 			mRegionDetails.mTraffic = 0.0f;
 		}
 	}
 	else
 	{
 		// no region
-		location_name = "(Unknown)";
+		location_name = LLTrans::getString("Unknown");
 		// keep these around for the LCD to use
-		mRegionDetails.mRegionName = "Unknown";
-		mRegionDetails.mParcelName = "Unknown";
-		mRegionDetails.mAccessString = "Unknown";
+		mRegionDetails.mRegionName = LLTrans::getString("Unknown");
+		mRegionDetails.mParcelName = LLTrans::getString("Unknown");
+		mRegionDetails.mAccessString = LLTrans::getString("Unknown");
 		mRegionDetails.mX = 0;
 		mRegionDetails.mY = 0;
 		mRegionDetails.mZ = 0;
 		mRegionDetails.mArea = 0;
 		mRegionDetails.mForSale = FALSE;
-		mRegionDetails.mOwner = "Unknown";
+		mRegionDetails.mOwner = LLTrans::getString("Unknown");
 		mRegionDetails.mTraffic = 0.0f;
 	}
 
@@ -920,7 +897,7 @@ void LLStatusBar::onClickSearch(void* data)
 {
 	LLStatusBar* self = (LLStatusBar*)data;
 	std::string search_text = self->childGetText("search_editor");
-	LLFloaterDirectory::showFindAll(search_text);
+	LLFloaterReg::showInstance("search", LLSD().insert("panel", "all").insert("id", LLSD(search_text)));
 }
 
 // static
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index c5b4be035a..7272441644 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -63,8 +63,7 @@ public:
 		mForSale(FALSE),
 		mOwner("Unknown"),
 		mTraffic(0),
-		mBalance(0),
-		mPing(0)
+		mBalance(0)
 	{
 	}
 	std::string mRegionName;
@@ -79,14 +78,13 @@ public:
 	F32		mTraffic;
 	S32		mBalance;
 	std::string mTime;
-	U32		mPing;
 };
 
 class LLStatusBar
 :	public LLPanel
 {
 public:
-	LLStatusBar(const std::string& name, const LLRect& rect );
+	LLStatusBar(const LLRect& rect );
 	/*virtual*/ ~LLStatusBar();
 	
 	/*virtual*/ void draw();
diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp
index a34b4b83f3..a1384c28ba 100644
--- a/indra/newview/llstylemap.cpp
+++ b/indra/newview/llstylemap.cpp
@@ -64,7 +64,7 @@ const LLStyleSP &LLStyleMap::lookupAgent(const LLUUID &source)
 		style->setFontName(LLStringUtil::null);
 		if (source != LLUUID::null && source != gAgent.getID() )
 		{
-			style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
+			style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
 			std::string link = llformat("secondlife:///app/agent/%s/about",source.asString().c_str());
 			style->setLinkHREF(link);
 		}
@@ -90,7 +90,7 @@ const LLStyleSP &LLStyleMap::lookup(const LLUUID& id, const std::string& link)
 		style->setFontName(LLStringUtil::null);
 		if (id != LLUUID::null && !link.empty())
 		{
-			style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
+			style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
 			style->setLinkHREF(link);
 		}
 		else
@@ -115,6 +115,6 @@ void LLStyleMap::update()
 	{
 		LLStyleSP &style = iter->second;
 		// Update the link color in case it has been changed.
-		style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
+		style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
 	}
 }
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index a27f0e2254..51b946b8c0 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -68,7 +68,6 @@ LLColor4U MAX_WATER_COLOR(0, 48, 96, 240);
 S32 LLSurface::sTextureSize = 256;
 S32 LLSurface::sTexelsUpdated = 0;
 F32 LLSurface::sTextureUpdateTime = 0.f;
-LLStat LLSurface::sTexelsUpdatedPerSecStat;
 
 // ---------------- LLSurface:: Public Members ---------------
 
diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h
index 003b2f2505..310ab5d2c3 100644
--- a/indra/newview/llsurface.h
+++ b/indra/newview/llsurface.h
@@ -173,7 +173,6 @@ public:
 
 	static F32 sTextureUpdateTime;
 	static S32 sTexelsUpdated;
-	static LLStat sTexelsUpdatedPerSecStat;
 
 protected:
 	void createSTexture();
diff --git a/indra/newview/llsurfacepatch.h b/indra/newview/llsurfacepatch.h
index 7e84f7f6c5..4cac977305 100644
--- a/indra/newview/llsurfacepatch.h
+++ b/indra/newview/llsurfacepatch.h
@@ -35,7 +35,7 @@
 
 #include "v3math.h"
 #include "v3dmath.h"
-#include "llmemory.h"
+#include "llpointer.h"
 
 class LLSurface;
 class LLVOSurfacePatch;
diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp
new file mode 100644
index 0000000000..8dd7d2456e
--- /dev/null
+++ b/indra/newview/llteleporthistory.cpp
@@ -0,0 +1,251 @@
+/** 
+ * @file llteleporthistory.cpp
+ * @brief Teleport history
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llteleporthistory.h"
+
+#include "llparcel.h"
+#include "llsdserialize.h"
+
+#include "llagent.h"
+#include "llslurl.h"
+#include "llurlsimstring.h"
+#include "llviewerparcelmgr.h"
+#include "llviewerregion.h"
+#include "llworldmap.h"
+
+//////////////////////////////////////////////////////////////////////////////
+// LLTeleportHistoryItem
+//////////////////////////////////////////////////////////////////////////////
+
+LLTeleportHistoryItem::LLTeleportHistoryItem(const LLSD& val)
+{
+	mTitle = val["title"].asString();
+	mGlobalPos.setValue(val["global_pos"]);
+}
+
+LLSD LLTeleportHistoryItem::toLLSD() const
+{
+	LLSD val;
+
+	val["title"]		= mTitle;
+	val["global_pos"]	= mGlobalPos.getValue();
+	
+	return val;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// LLTeleportHistory
+//////////////////////////////////////////////////////////////////////////////
+
+LLTeleportHistory::LLTeleportHistory():
+	mCurrentItem(-1),
+	mHistoryTeleportInProgress(false),
+	mGotInitialUpdate(false),
+	mFilename("teleports.txt"),
+	mHistoryChangedCallback(NULL)
+{
+	mTeleportFinishedConn = LLViewerParcelMgr::getInstance()->
+		setTeleportFinishedCallback(boost::bind(&LLTeleportHistory::updateCurrentLocation, this));
+}
+
+LLTeleportHistory::~LLTeleportHistory()
+{
+	mTeleportFinishedConn.disconnect();
+}
+
+void LLTeleportHistory::goToItem(int idx)
+
+{
+	// Validate specified index.
+	if (idx < 0 || idx >= (int)mItems.size())
+	{
+		llwarns << "Invalid teleport history index (" << idx << ") specified" << llendl;
+		dump();
+		return;
+	}
+	
+	if (idx == mCurrentItem)
+	{
+		llwarns << "Will not teleport to the same location." << llendl;
+		dump();
+		return;
+	}
+
+	// Make specified item current and teleport to it.
+	mCurrentItem = idx;
+	mHistoryTeleportInProgress = true;
+	onHistoryChanged();
+	gAgent.teleportViaLocation(mItems[mCurrentItem].mGlobalPos);
+}
+
+void LLTeleportHistory::updateCurrentLocation()
+{
+	if (mHistoryTeleportInProgress)
+	{
+		mHistoryTeleportInProgress = false;
+	}
+	else
+	{
+		// If we're getting the initial location update
+		// while we already have a (loaded) non-empty history,
+		// there's no need to purge forward items or add a new item.
+
+		if (mGotInitialUpdate || mItems.size() == 0)
+		{
+			// Purge forward items (if any).
+			if(mItems.size())
+				mItems.erase (mItems.begin() + mCurrentItem + 1, mItems.end());
+			
+			// Append an empty item to the history and make it current.
+			mItems.push_back(LLTeleportHistoryItem("", LLVector3d()));
+			mCurrentItem++;
+		}
+	}
+
+	// Update current history item.
+	if (mCurrentItem < 0 || mCurrentItem >= (int) mItems.size()) // sanity check
+	{
+		llwarns << "Invalid current item. (this should not happen)" << llendl;
+		return;
+	}
+	mItems[mCurrentItem].mTitle = getCurrentLocationTitle();
+	mItems[mCurrentItem].mGlobalPos	= gAgent.getPositionGlobal();
+	dump();
+	
+	if (!mGotInitialUpdate)
+		mGotInitialUpdate = true;
+
+	// Signal the interesting party that we've changed. 
+	onHistoryChanged();
+}
+
+void LLTeleportHistory::save() const
+{
+	// build filename for each user
+	std::string resolvedFilename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename);
+
+	// open the history file for writing
+	llofstream file (resolvedFilename);
+	if (!file.is_open())
+	{
+		llwarns << "can't open teleport history file \"" << mFilename << "\" for writing" << llendl;
+		return;
+	}
+
+	for (size_t i=0; i<mItems.size(); i++)
+	{
+		LLSD s_item = mItems[i].toLLSD();
+		s_item["is_current"] = (i == mCurrentItem);
+		file << LLSDOStreamer<LLSDNotationFormatter>(s_item) << std::endl;
+	}
+
+	file.close();
+}
+
+// *TODO: clean this up
+void LLTeleportHistory::load()
+{
+	// build filename for each user
+	std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename);
+
+	// open the history file for reading
+	llifstream file(resolved_filename);
+	if (!file.is_open())
+	{
+		llwarns << "can't load teleport history from file \"" << mFilename << "\"" << llendl;
+		return;
+	}
+	
+	// remove current entries before we load over them
+	mItems.clear();
+	mCurrentItem = -1;
+	
+	// the parser's destructor is protected so we cannot create in the stack.
+	LLPointer<LLSDParser> parser = new LLSDNotationParser();
+	std::string line;
+	for (int i = 0; std::getline(file, line); i++)
+	{
+		LLSD s_item;
+		std::istringstream iss(line);
+		if (parser->parse(iss, s_item, line.length()) == LLSDParser::PARSE_FAILURE)
+		{
+			llinfos << "Parsing saved teleport history failed" << llendl;
+			break;
+		}
+		
+		mItems.push_back(s_item);
+		if (s_item["is_current"].asBoolean() == true)
+			mCurrentItem = i; 
+	}
+
+	file.close();
+	onHistoryChanged();
+}
+
+void LLTeleportHistory::setHistoryChangedCallback(history_callback_t cb)
+{
+	mHistoryChangedCallback = cb;
+}
+
+void LLTeleportHistory::onHistoryChanged()
+{
+	if (mHistoryChangedCallback)
+	{
+		mHistoryChangedCallback();
+	}
+}
+
+// static
+std::string LLTeleportHistory::getCurrentLocationTitle()
+{
+	std::string location_name;
+
+	if (!gAgent.buildLocationString(location_name, LLAgent::LOCATION_FORMAT_NORMAL))
+		location_name = "Unknown";
+
+	return location_name;
+}
+
+void LLTeleportHistory::dump() const
+{
+	llinfos << "Teleport history dump (" << mItems.size() << " items):" << llendl;
+	
+	for (size_t i=0; i<mItems.size(); i++)
+	{
+		std::stringstream line;
+		line << ((i == mCurrentItem) ? " * " : "   ");
+		line << i << ": " << mItems[i].mTitle;
+		llinfos << line.str() << llendl;
+	}
+}
diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h
new file mode 100644
index 0000000000..631857d7c8
--- /dev/null
+++ b/indra/newview/llteleporthistory.h
@@ -0,0 +1,212 @@
+/** 
+ * @file llteleporthistory.h
+ * @brief Teleport history
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLTELEPORTHISTORY_H
+#define LL_LLTELEPORTHISTORY_H
+
+#include "llsingleton.h" // for LLSingleton
+
+#include <vector>
+#include <string>
+#include <boost/function.hpp>
+#include <boost/signals/connection.hpp>
+
+
+/**
+ * An item of the teleport history.
+ * 
+ * Contains the location's global coordinates and its title.
+ */
+class LLTeleportHistoryItem
+{
+public:
+	LLTeleportHistoryItem()
+	{}
+
+	LLTeleportHistoryItem(std::string title, LLVector3d global_pos)
+		: mTitle(title), mGlobalPos(global_pos)
+	{}
+	
+	LLTeleportHistoryItem(const LLSD& val);
+	LLSD toLLSD() const;
+
+	std::string	mTitle;		// human-readable location title
+	LLVector3d	mGlobalPos; // global position
+};
+
+/**
+ * Teleport history.
+ * 
+ * Along with the navigation bar "Back" and "Forward" buttons
+ * implements web browser-like navigation functionality.
+ * 
+ * @see LLNavigationBar
+ */
+class LLTeleportHistory: public LLSingleton<LLTeleportHistory>
+{
+	LOG_CLASS(LLTeleportHistory);
+
+public:
+	
+	typedef std::vector<LLTeleportHistoryItem>	slurl_list_t;
+	typedef boost::function<void()>				history_callback_t;
+	
+	LLTeleportHistory();
+	~LLTeleportHistory();
+
+	/**
+	 * Go back in the history.
+	 */
+	void					goBack() { goToItem(getCurrentItemIndex() - 1); }
+	
+	/**
+	 * Go forward in the history.
+	 */
+	void					goForward() { goToItem(getCurrentItemIndex() + 1); }
+	
+	/**
+	 * Go to specific item in the history.
+	 * 
+	 * The item is specified by its index (starting from 0).
+	 */ 
+	void					goToItem(int idx);
+	
+	/**
+	 * @return history items.
+	 */
+	const slurl_list_t&		getItems() const { return mItems; }
+	
+	/**
+	 * Is the history empty?
+	 * 
+	 * History containing single item is treated as empty
+	 * because the item points to the current location.
+	 */ 
+	bool					isEmpty() const { return mItems.size() <= 1; }
+	
+	/**
+	 * Get index of the current location in the history.
+	 */
+	int						getCurrentItemIndex() const { return mCurrentItem; }
+	
+	/**
+	 * Set a callback to be called upon history changes.
+	 */
+	void					setHistoryChangedCallback(history_callback_t cb);
+
+	/**
+	 * Save the history to a file, so that it can be restored upon next logon.
+	 */
+	void					save() const;
+	
+	/**
+	 * Load previously saved history from a file.
+	 */
+	void					load();
+	
+	/**
+	 * Save history to a file so that we can restore it on startup.
+	 * 
+	 * @see load()
+	 */
+	void					dump() const;
+
+private:
+	
+	/**
+	 * Update current location.
+	 * 
+	 * Called when a teleport finishes.
+	 *
+	 * Takes mHistoryTeleportInProgress into consideration: if it's false
+	 * (i.e. user is teleporting to an arbitrary location, not to a history item)
+	 * we purge forward items.
+	 * 
+	 * @see mHistoryTeleportInProgress
+	 * @see mGotInitialUpdate
+	 */
+	void					updateCurrentLocation();
+	
+	/**
+	 * Invokes mHistoryChangedCallback.
+	 */
+	void					onHistoryChanged();
+	
+	static std::string		getCurrentLocationTitle();
+	
+	/**
+	 * Actually, the teleport history.
+	 */
+	slurl_list_t			mItems;
+	
+	/**
+	 * Current position within the history.
+	 */
+	int						mCurrentItem;
+	
+	/**
+	 * Indicates whether teleport back/forward is currently in progress.
+	 * 
+	 * Helps to make sure we don't purge forward items
+	 * when a teleport within history finishes. 
+	 * 
+	 * @see updateCurrentLocation()
+	 */ 
+	bool					mHistoryTeleportInProgress;
+	
+	/**
+	 * Have we received the initial location update?
+	 * 
+	 * @see updateCurrentLocation()
+	 */
+	bool					mGotInitialUpdate;
+	
+	/**
+	 * File to store the history to.
+	 */
+	std::string				mFilename;
+	
+	/**
+	 * Callback to be called when the history gets changed.
+	 */
+	history_callback_t		mHistoryChangedCallback;
+	
+	/**
+	 * Teleport notification connection.
+	 * 
+	 * Using this connection we get notified when a teleport finishes
+	 * or initial location update occurs.
+	 */
+	boost::signals::connection	mTeleportFinishedConn;
+};
+
+#endif
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index a3966ed666..1b249d75d1 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -946,7 +946,7 @@ std::string LLTextureCache::getLocalFileName(const LLUUID& id)
 	// Does not include extension
 	std::string idstr = id.asString();
 	// TODO: should we be storing cached textures in skin directory?
-	std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "default", "textures", idstr);
+	std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_LOCAL_ASSETS, idstr);
 	return filename;
 }
 
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index dc34c5ad37..7a06f0df9e 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -59,6 +59,7 @@
 #include "llscrollcontainer.h"
 #include "lltoolmgr.h"
 #include "lltoolpipette.h"
+#include "llsearcheditor.h"
 
 #include "lltool.h"
 #include "llviewerwindow.h"
@@ -69,26 +70,9 @@
 #include "lltrans.h"
 
 
-static const S32 CLOSE_BTN_WIDTH = 100;
-const S32 PIPETTE_BTN_WIDTH = 32;
 static const S32 HPAD = 4;
 static const S32 VPAD = 4;
 static const S32 LINE = 16;
-static const S32 SMALL_BTN_WIDTH = 64;
-static const S32 TEX_PICKER_MIN_WIDTH = 
-	(HPAD +
-	CLOSE_BTN_WIDTH +
-	HPAD +
-	CLOSE_BTN_WIDTH +
-	HPAD + 
-	SMALL_BTN_WIDTH +
-	HPAD +
-	SMALL_BTN_WIDTH +
-	HPAD + 
-	30 +
-	RESIZE_HANDLE_WIDTH * 2);
-static const S32 CLEAR_BTN_WIDTH = 50;
-static const S32 TEX_PICKER_MIN_HEIGHT = 290;
 static const S32 FOOTER_HEIGHT = 100;
 static const S32 BORDER_PAD = HPAD;
 static const S32 TEXTURE_INVENTORY_PADDING = 30;
@@ -108,7 +92,6 @@ class LLFloaterTexturePicker : public LLFloater
 public:
 	LLFloaterTexturePicker(
 		LLTextureCtrl* owner,
-		const LLRect& rect,
 		const std::string& label,
 		PermissionMask immediate_filter_perm_mask,
 		PermissionMask non_immediate_filter_perm_mask,
@@ -136,8 +119,6 @@ public:
 	const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only);
 	void			setCanApplyImmediately(BOOL b);
 
-	void			setDirty( BOOL b ) { mIsDirty = b; }
-	BOOL			isDirty() const { return mIsDirty; }
 	void			setActive( BOOL active );
 
 	LLTextureCtrl*	getOwner() const { return mOwner; }
@@ -147,20 +128,21 @@ public:
 	PermissionMask 	getFilterPermMask();
 	void updateFilterPermMask();
 	void commitIfImmediateSet();
-
+	
+	void onSearchEdit(const std::string& search_string );
+	
 	static void		onBtnSetToDefault( void* userdata );
 	static void		onBtnSelect( void* userdata );
 	static void		onBtnCancel( void* userdata );
-	static void		onBtnPipette( void* userdata );
+		   void		onBtnPipette( );
 	//static void		onBtnRevert( void* userdata );
 	static void		onBtnWhite( void* userdata );
 	static void		onBtnNone( void* userdata );
 	static void		onBtnClear( void* userdata );
-	static void		onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
+		   void		onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
 	static void		onShowFolders(LLUICtrl* ctrl, void* userdata);
 	static void		onApplyImmediateCheck(LLUICtrl* ctrl, void* userdata);
-	static void		onSearchEdit(const std::string& search_string, void* user_data );
-	static void		onTextureSelect( const LLTextureEntry& te, void *data );
+		   void		onTextureSelect( const LLTextureEntry& te );
 
 protected:
 	LLPointer<LLViewerImage> mTexturep;
@@ -179,7 +161,6 @@ protected:
 	LLTextBox*			mResolutionLabel;
 
 	std::string			mPendingName;
-	BOOL				mIsDirty;
 	BOOL				mActive;
 
 	LLSearchEditor*		mSearchEdit;
@@ -194,18 +175,12 @@ protected:
 
 LLFloaterTexturePicker::LLFloaterTexturePicker(	
 	LLTextureCtrl* owner,
-	const LLRect& rect,
 	const std::string& label,
 	PermissionMask immediate_filter_perm_mask,
 	PermissionMask non_immediate_filter_perm_mask,
 	BOOL can_apply_immediately,
 	const std::string& fallback_image_name)
-	:
-	LLFloater( std::string("texture picker"),
-		rect,
-		std::string( "Pick: " ) + label,
-		TRUE,
-		TEX_PICKER_MIN_WIDTH, TEX_PICKER_MIN_HEIGHT ),
+:	LLFloater(),
 	mOwner( owner ),
 	mImageAssetID( owner->getImageAssetID() ),
 	mFallbackImageName( fallback_image_name ),
@@ -214,78 +189,15 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
 	mLabel(label),
 	mTentativeLabel(NULL),
 	mResolutionLabel(NULL),
-	mIsDirty( FALSE ),
 	mActive( TRUE ),
 	mSearchEdit(NULL),
 	mImmediateFilterPermMask(immediate_filter_perm_mask),
 	mNonImmediateFilterPermMask(non_immediate_filter_perm_mask),
 	mContextConeOpacity(0.f)
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_texture_ctrl.xml");
-
-	mTentativeLabel = getChild<LLTextBox>("Multiple");
-
-	mResolutionLabel = getChild<LLTextBox>("unknown");
-
-
-	childSetAction("Default",LLFloaterTexturePicker::onBtnSetToDefault,this);
-	childSetAction("None", LLFloaterTexturePicker::onBtnNone,this);
-	childSetAction("Blank", LLFloaterTexturePicker::onBtnWhite,this);
-
-		
-	childSetCommitCallback("show_folders_check", onShowFolders, this);
-	childSetVisible("show_folders_check", FALSE);
-	
-	mSearchEdit = getChild<LLSearchEditor>("inventory search editor");
-	mSearchEdit->setSearchCallback(onSearchEdit, this);
-		
-	mInventoryPanel = getChild<LLInventoryPanel>("inventory panel");
-
-	if(mInventoryPanel)
-	{
-		U32 filter_types = 0x0;
-		filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
-		filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
-
-		mInventoryPanel->setFilterTypes(filter_types);
-		//mInventoryPanel->setFilterPermMask(getFilterPermMask());  //Commented out due to no-copy texture loss.
-		mInventoryPanel->setFilterPermMask(immediate_filter_perm_mask);
-		mInventoryPanel->setSelectCallback(onSelectionChange, this);
-		mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
-		mInventoryPanel->setAllowMultiSelect(FALSE);
-
-		// store this filter as the default one
-		mInventoryPanel->getRootFolder()->getFilter()->markDefault();
-
-		// Commented out to stop opening all folders with textures
-		// mInventoryPanel->openDefaultFolderForType(LLAssetType::AT_TEXTURE);
-		
-		// don't put keyboard focus on selected item, because the selection callback
-		// will assume that this was user input
-		mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
-	}
-
 	mCanApplyImmediately = can_apply_immediately;
-	mNoCopyTextureSelected = FALSE;
-		
-	childSetValue("apply_immediate_check", gSavedSettings.getBOOL("ApplyTextureImmediately"));
-	childSetCommitCallback("apply_immediate_check", onApplyImmediateCheck, this);
-	
-	if (!can_apply_immediately)
-	{
-		childSetEnabled("show_folders_check", FALSE);
-	}
-
-	childSetAction("Pipette", LLFloaterTexturePicker::onBtnPipette,this);
-	childSetAction("Cancel", LLFloaterTexturePicker::onBtnCancel,this);
-	childSetAction("Select", LLFloaterTexturePicker::onBtnSelect,this);
-
-	// update permission filter once UI is fully initialized
-	updateFilterPermMask();
-
+	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_texture_ctrl.xml");
 	setCanMinimize(FALSE);
-
-	mSavedFolderState.setApply(FALSE);
 }
 
 LLFloaterTexturePicker::~LLFloaterTexturePicker()
@@ -297,7 +209,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id)
 	if( mImageAssetID != image_id && mActive)
 	{
 		mNoCopyTextureSelected = FALSE;
-		mIsDirty = TRUE;
+		mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
 		mImageAssetID = image_id; 
 		LLUUID item_id = findItemID(mImageAssetID, FALSE);
 		if (item_id.isNull())
@@ -360,6 +272,10 @@ void LLFloaterTexturePicker::updateImageStats()
 			mResolutionLabel->setTextArg("[DIMENSIONS]", std::string("[? x ?]"));
 		}
 	}
+	else
+	{
+		mResolutionLabel->setTextArg("[DIMENSIONS]", std::string(""));
+	}
 }
 
 // virtual
@@ -474,13 +390,76 @@ BOOL LLFloaterTexturePicker::postBuild()
 	
 		setTitle(pick + mLabel);
 	}
+	mTentativeLabel = getChild<LLTextBox>("Multiple");
+
+	mResolutionLabel = getChild<LLTextBox>("unknown");
+
+
+	childSetAction("Default",LLFloaterTexturePicker::onBtnSetToDefault,this);
+	childSetAction("None", LLFloaterTexturePicker::onBtnNone,this);
+	childSetAction("Blank", LLFloaterTexturePicker::onBtnWhite,this);
+
+
+	childSetCommitCallback("show_folders_check", onShowFolders, this);
+	childSetVisible("show_folders_check", FALSE);
+
+	mSearchEdit = getChild<LLSearchEditor>("inventory search editor");
+	mSearchEdit->setSearchCallback(boost::bind(&LLFloaterTexturePicker::onSearchEdit, this, _1));
+
+	mInventoryPanel = getChild<LLInventoryPanel>("inventory panel");
+
+	if(mInventoryPanel)
+	{
+		U32 filter_types = 0x0;
+		filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
+		filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
+
+		mInventoryPanel->setFilterTypes(filter_types);
+		//mInventoryPanel->setFilterPermMask(getFilterPermMask());  //Commented out due to no-copy texture loss.
+		mInventoryPanel->setFilterPermMask(mImmediateFilterPermMask);
+		mInventoryPanel->setSelectCallback(boost::bind(&LLFloaterTexturePicker::onSelectionChange, this, _1, _2));
+		mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+		mInventoryPanel->setAllowMultiSelect(FALSE);
+
+		// store this filter as the default one
+		mInventoryPanel->getRootFolder()->getFilter()->markDefault();
+
+		// Commented out to stop opening all folders with textures
+		// mInventoryPanel->openDefaultFolderForType(LLAssetType::AT_TEXTURE);
+
+		// don't put keyboard focus on selected item, because the selection callback
+		// will assume that this was user input
+		mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
+	}
+
+
+	mNoCopyTextureSelected = FALSE;
+
+	childSetValue("apply_immediate_check", gSavedSettings.getBOOL("ApplyTextureImmediately"));
+	childSetCommitCallback("apply_immediate_check", onApplyImmediateCheck, this);
+
+	if (!mCanApplyImmediately)
+	{
+		childSetEnabled("show_folders_check", FALSE);
+	}
+
+	getChild<LLUICtrl>("Pipette")->setCommitCallback( boost::bind(&LLFloaterTexturePicker::onBtnPipette, this));
+	childSetAction("Cancel", LLFloaterTexturePicker::onBtnCancel,this);
+	childSetAction("Select", LLFloaterTexturePicker::onBtnSelect,this);
 
+	// update permission filter once UI is fully initialized
+	updateFilterPermMask();
+	mSavedFolderState.setApply(FALSE);
+
+	LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1));
+	
 	return TRUE;
 }
 
 // virtual
 void LLFloaterTexturePicker::draw()
 {
+	static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
 	if (mOwner)
 	{
 		// draw cone of context pointing back to texture swatch	
@@ -579,9 +558,9 @@ void LLFloaterTexturePicker::draw()
 
 		// Border
 		LLRect border( BORDER_PAD, 
-				getRect().getHeight() - LLFLOATER_HEADER_SIZE - BORDER_PAD, 
-				((TEX_PICKER_MIN_WIDTH / 2) - TEXTURE_INVENTORY_PADDING - HPAD) - BORDER_PAD,
-				BORDER_PAD + FOOTER_HEIGHT + (getRect().getHeight() - TEX_PICKER_MIN_HEIGHT));
+					   getRect().getHeight() - floater_header_size - BORDER_PAD, 
+					   ((getMinWidth() / 2) - TEXTURE_INVENTORY_PADDING - HPAD) - BORDER_PAD,
+					   BORDER_PAD + FOOTER_HEIGHT + (getRect().getHeight() - getMinHeight()));
 		gl_rect_2d( border, LLColor4::black, FALSE );
 
 
@@ -602,7 +581,7 @@ void LLFloaterTexturePicker::draw()
 			mTexturep->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
 
 			// Draw Tentative Label over the image
-			if( mOwner->getTentative() && !mIsDirty )
+			if( mOwner->getTentative() && !mViewModel->isDirty() )
 			{
 				mTentativeLabel->setVisible( TRUE );
 				drawChild(mTentativeLabel);
@@ -719,7 +698,7 @@ void LLFloaterTexturePicker::onBtnRevert(void* userdata)
 	// TODO: Change this to tell the owner to cancel.  It needs to be
 	// smart enough to restore multi-texture selections.
 	self->mOwner->onFloaterCommit();
-	self->mIsDirty = FALSE;
+	self->mViewModel->resetDirty();
 }*/
 
 // static
@@ -731,8 +710,8 @@ void LLFloaterTexturePicker::onBtnCancel(void* userdata)
 	{
 		self->mOwner->onFloaterCommit(LLTextureCtrl::TEXTURE_CANCEL);
 	}
-	self->mIsDirty = FALSE;
-	self->close();
+	self->mViewModel->resetDirty();
+	self->closeFloater();
 }
 
 // static
@@ -743,52 +722,42 @@ void LLFloaterTexturePicker::onBtnSelect(void* userdata)
 	{
 		self->mOwner->onFloaterCommit(LLTextureCtrl::TEXTURE_SELECT);
 	}
-	self->close();
+	self->closeFloater();
 }
 
-// static
-void LLFloaterTexturePicker::onBtnPipette( void* userdata )
+void LLFloaterTexturePicker::onBtnPipette()
 {
-	LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata;
-
-	if ( self)
+	BOOL pipette_active = childGetValue("Pipette").asBoolean();
+	pipette_active = !pipette_active;
+	if (pipette_active)
 	{
-		BOOL pipette_active = self->childGetValue("Pipette").asBoolean();
-		pipette_active = !pipette_active;
-		if (pipette_active)
-		{
-			LLToolPipette::getInstance()->setSelectCallback(onTextureSelect, self);
-			LLToolMgr::getInstance()->setTransientTool(LLToolPipette::getInstance());
-		}
-		else
-		{
-			LLToolMgr::getInstance()->clearTransientTool();
-		}
+		LLToolMgr::getInstance()->setTransientTool(LLToolPipette::getInstance());
+	}
+	else
+	{
+		LLToolMgr::getInstance()->clearTransientTool();
 	}
-
 }
 
-// static 
-void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
+void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
 {
-	LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)data;
 	if (items.size())
 	{
 		LLFolderViewItem* first_item = items.front();
 		LLInventoryItem* itemp = gInventory.getItem(first_item->getListener()->getUUID());
-		self->mNoCopyTextureSelected = FALSE;
+		mNoCopyTextureSelected = FALSE;
 		if (itemp)
 		{
 			if (!itemp->getPermissions().allowCopyBy(gAgent.getID()))
 			{
-				self->mNoCopyTextureSelected = TRUE;
+				mNoCopyTextureSelected = TRUE;
 			}
-			self->mImageAssetID = itemp->getAssetUUID();
-			self->mIsDirty = TRUE;
+			mImageAssetID = itemp->getAssetUUID();
+			mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
 			if (user_action)
 			{
 				// only commit intentional selections, not implicit ones
-				self->commitIfImmediateSet();
+				commitIfImmediateSet();
 			}
 		}
 	}
@@ -827,67 +796,62 @@ void LLFloaterTexturePicker::updateFilterPermMask()
 	//mInventoryPanel->setFilterPermMask( getFilterPermMask() );  Commented out due to no-copy texture loss.
 }
 
-void LLFloaterTexturePicker::onSearchEdit(const std::string& search_string, void* user_data )
+void LLFloaterTexturePicker::onSearchEdit(const std::string& search_string )
 {
-	LLFloaterTexturePicker* picker = (LLFloaterTexturePicker*)user_data;
-
 	std::string upper_case_search_string = search_string;
 	LLStringUtil::toUpper(upper_case_search_string);
 
 	if (upper_case_search_string.empty())
 	{
-		if (picker->mInventoryPanel->getFilterSubString().empty())
+		if (mInventoryPanel->getFilterSubString().empty())
 		{
 			// current filter and new filter empty, do nothing
 			return;
 		}
 
-		picker->mSavedFolderState.setApply(TRUE);
-		picker->mInventoryPanel->getRootFolder()->applyFunctorRecursively(picker->mSavedFolderState);
+		mSavedFolderState.setApply(TRUE);
+		mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState);
 		// add folder with current item to list of previously opened folders
 		LLOpenFoldersWithSelection opener;
-		picker->mInventoryPanel->getRootFolder()->applyFunctorRecursively(opener);
-		picker->mInventoryPanel->getRootFolder()->scrollToShowSelection();
+		mInventoryPanel->getRootFolder()->applyFunctorRecursively(opener);
+		mInventoryPanel->getRootFolder()->scrollToShowSelection();
 
 	}
-	else if (picker->mInventoryPanel->getFilterSubString().empty())
+	else if (mInventoryPanel->getFilterSubString().empty())
 	{
 		// first letter in search term, save existing folder open state
-		if (!picker->mInventoryPanel->getRootFolder()->isFilterModified())
+		if (!mInventoryPanel->getRootFolder()->isFilterModified())
 		{
-			picker->mSavedFolderState.setApply(FALSE);
-			picker->mInventoryPanel->getRootFolder()->applyFunctorRecursively(picker->mSavedFolderState);
+			mSavedFolderState.setApply(FALSE);
+			mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState);
 		}
 	}
 
-	picker->mInventoryPanel->setFilterSubString(upper_case_search_string);
+	mInventoryPanel->setFilterSubString(upper_case_search_string);
 }
 
-//static 
-void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te, void *data )
+void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
 {
-	LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)data;
-
-	LLUUID inventory_item_id = self->findItemID(te.getID(), TRUE);
-	if (self && inventory_item_id.notNull())
+	LLUUID inventory_item_id = findItemID(te.getID(), TRUE);
+	if (inventory_item_id.notNull())
 	{
 		LLToolPipette::getInstance()->setResult(TRUE, "");
-		self->setImageID(te.getID());
+		setImageID(te.getID());
 
-		self->mNoCopyTextureSelected = FALSE;
+		mNoCopyTextureSelected = FALSE;
 		LLInventoryItem* itemp = gInventory.getItem(inventory_item_id);
 
 		if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
 		{
 			// no copy texture
-			self->mNoCopyTextureSelected = TRUE;
+			mNoCopyTextureSelected = TRUE;
 		}
 		
-		self->commitIfImmediateSet();
+		commitIfImmediateSet();
 	}
 	else
 	{
-		LLToolPipette::getInstance()->setResult(FALSE, "You do not have a copy this \nof texture in your inventory");
+		LLToolPipette::getInstance()->setResult(FALSE, LLTrans::getString("InventoryNoTexture"));
 	}
 }
 
@@ -896,38 +860,33 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te, void *da
 
 static LLRegisterWidget<LLTextureCtrl> r("texture_picker");
 
-LLTextureCtrl::LLTextureCtrl(
-	const std::string& name, 
-	const LLRect &rect, 
-	const std::string& label,
-	const LLUUID &image_id, 
-	const LLUUID &default_image_id, 
-	const std::string& default_image_name )
-	:	
-	LLUICtrl(name, rect, TRUE, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP),
+LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
+:	LLUICtrl(p),
 	mDragCallback(NULL),
 	mDropCallback(NULL),
 	mOnCancelCallback(NULL),
 	mOnSelectCallback(NULL),
-	mBorderColor( gColors.getColor("DefaultHighlightLight") ),
-	mImageAssetID( image_id ),
-	mDefaultImageAssetID( default_image_id ),
-	mDefaultImageName( default_image_name ),
-	mLabel( label ),
+	mBorderColor( p.border_color() ),
 	mAllowNoTexture( FALSE ),
 	mImmediateFilterPermMask( PERM_NONE ),
 	mNonImmediateFilterPermMask( PERM_NONE ),
 	mCanApplyImmediately( FALSE ),
 	mNeedsRawImageData( FALSE ),
 	mValid( TRUE ),
-	mDirty( FALSE ),
-	mShowLoadingPlaceholder( TRUE )
+	mShowLoadingPlaceholder( TRUE ),
+	mImageAssetID(p.image_id),
+	mDefaultImageAssetID(p.default_image_id),
+	mDefaultImageName(p.default_image_name)
 {
-	mCaption = new LLTextBox( label, 
-		LLRect( 0, BTN_HEIGHT_SMALL, getRect().getWidth(), 0 ),
-		label,
-		LLFontGL::getFontSansSerifSmall() );
-	mCaption->setFollows( FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM );
+	setAllowNoTexture(p.allow_no_texture);
+	setCanApplyImmediately(p.can_apply_immediately);
+
+	LLTextBox::Params params(p.caption_text);
+	params.name(p.label);
+	params.rect(LLRect( 0, BTN_HEIGHT_SMALL, getRect().getWidth(), 0 ));
+	params.text(p.label);
+	params.follows.flags(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM);
+	mCaption = LLUICtrlFactory::create<LLTextBox> (params);
 	addChild( mCaption );
 
 	S32 image_top = getRect().getHeight();
@@ -935,92 +894,27 @@ LLTextureCtrl::LLTextureCtrl(
 	S32 image_middle = (image_top + image_bottom) / 2;
 	S32 line_height = llround(LLFontGL::getFontSansSerifSmall()->getLineHeight());
 
-	mTentativeLabel = new LLTextBox( std::string("Multiple"), 
-		LLRect( 
-			0, image_middle + line_height / 2,
-			getRect().getWidth(), image_middle - line_height / 2 ),
-		std::string("Multiple"),
-		LLFontGL::getFontSansSerifSmall() );
-	mTentativeLabel->setHAlign( LLFontGL::HCENTER );
-	mTentativeLabel->setFollowsAll();
+	LLTextBox::Params tentative_label_p(p.multiselect_text);
+	tentative_label_p.name("Multiple");
+	tentative_label_p.rect(LLRect (0, image_middle + line_height / 2, getRect().getWidth(), image_middle - line_height / 2 ));
+	tentative_label_p.follows.flags(FOLLOWS_ALL);
+	mTentativeLabel = LLUICtrlFactory::create<LLTextBox> (tentative_label_p);
 	addChild( mTentativeLabel );
 
-	LLRect border_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
+	LLRect border_rect = getLocalRect();
 	border_rect.mBottom += BTN_HEIGHT_SMALL;
-	mBorder = new LLViewBorder(std::string("border"), border_rect, LLViewBorder::BEVEL_IN);
-	mBorder->setFollowsAll();
+	LLViewBorder::Params vbparams(p.border);
+	vbparams.name("border");
+	vbparams.rect(border_rect);
+	mBorder = LLUICtrlFactory::create<LLViewBorder> (vbparams);
 	addChild(mBorder);
 
-	setEnabled(TRUE); // for the tooltip
 	mLoadingPlaceholderString = LLTrans::getString("texture_loading");
 }
 
-
 LLTextureCtrl::~LLTextureCtrl()
 {
-	closeFloater();
-}
-
-// virtual
-LLXMLNodePtr LLTextureCtrl::getXML(bool save_children) const
-{
-	LLXMLNodePtr node = LLUICtrl::getXML();
-
-	node->createChild("label", TRUE)->setStringValue(getLabel());
-
-	node->createChild("default_image_name", TRUE)->setStringValue(getDefaultImageName());
-
-	node->createChild("allow_no_texture", TRUE)->setBoolValue(mAllowNoTexture);
-
-	node->createChild("can_apply_immediately", TRUE)->setBoolValue(mCanApplyImmediately );
-
-	return node;
-}
-
-LLView* LLTextureCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("texture_picker");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent);
-
-	std::string label;
-	node->getAttributeString("label", label);
-
-	std::string image_id("");
-	node->getAttributeString("image", image_id);
-
-	std::string default_image_id("");
-	node->getAttributeString("default_image", default_image_id);
-
-	std::string default_image_name("Default");
-	node->getAttributeString("default_image_name", default_image_name);
-
-	BOOL allow_no_texture = FALSE;
-	node->getAttributeBOOL("allow_no_texture", allow_no_texture);
-
-	BOOL can_apply_immediately = FALSE;
-	node->getAttributeBOOL("can_apply_immediately", can_apply_immediately);
-
-	if (label.empty())
-	{
-		label.assign(node->getValue());
-	}
-
-	LLTextureCtrl* texture_picker = new LLTextureCtrl(
-									name, 
-									rect,
-									label,
-									LLUUID(image_id),
-									LLUUID(default_image_id), 
-									default_image_name );
-	texture_picker->setAllowNoTexture(allow_no_texture);
-	texture_picker->setCanApplyImmediately(can_apply_immediately);
-
-	texture_picker->initFromXML(node, parent);
-
-	return texture_picker;
+	closeDependentFloater();
 }
 
 void LLTextureCtrl::setShowLoadingPlaceholder(BOOL showLoadingPlaceholder)
@@ -1047,7 +941,7 @@ void LLTextureCtrl::setVisible( BOOL visible )
 {
 	if( !visible )
 	{
-		closeFloater();
+		closeDependentFloater();
 	}
 	LLUICtrl::setVisible( visible );
 }
@@ -1066,7 +960,7 @@ void LLTextureCtrl::setEnabled( BOOL enabled )
 		setToolTip( std::string() );
 		// *TODO: would be better to keep floater open and show
 		// disabled state.
-		closeFloater();
+		closeDependentFloater();
 	}
 
 	if( floaterp )
@@ -1092,18 +986,6 @@ void LLTextureCtrl::setValid(BOOL valid )
 	}
 }
 
-// virtual 
-BOOL	LLTextureCtrl::isDirty() const		
-{ 
-	return mDirty;	
-}
-
-// virtual 
-void	LLTextureCtrl::resetDirty()
-{ 
-	mDirty = FALSE;	
-}
-
 
 // virtual
 void LLTextureCtrl::clear()
@@ -1124,20 +1006,12 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
 	// Show the dialog
 	if( floaterp )
 	{
-		floaterp->open( );		/* Flawfinder: ignore */
+		floaterp->openFloater();
 	}
 	else
 	{
-		if( !mLastFloaterLeftTop.mX && !mLastFloaterLeftTop.mY )
-		{
-			gFloaterView->getNewFloaterPosition(&mLastFloaterLeftTop.mX, &mLastFloaterLeftTop.mY);
-		}
-		LLRect rect = gSavedSettings.getRect("TexturePickerRect");
-		rect.translate( mLastFloaterLeftTop.mX - rect.mLeft, mLastFloaterLeftTop.mY - rect.mTop );
-
 		floaterp = new LLFloaterTexturePicker(
 			this,
-			rect,
 			mLabel,
 			mImmediateFilterPermMask,
 			mNonImmediateFilterPermMask,
@@ -1147,7 +1021,7 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
 		mFloaterHandle = floaterp->getHandle();
 
 		gFloaterView->getParentFloater(this)->addDependentFloater(floaterp);
-		floaterp->open();		/* Flawfinder: ignore */
+		floaterp->openFloater();
 	}
 
 	if (take_focus)
@@ -1157,13 +1031,13 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
 }
 
 
-void LLTextureCtrl::closeFloater()
+void LLTextureCtrl::closeDependentFloater()
 {
 	LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
 	if( floaterp )
 	{
 		floaterp->setOwner(NULL);
-		floaterp->close();
+		floaterp->closeFloater();
 	}
 }
 
@@ -1210,7 +1084,6 @@ void LLTextureCtrl::onFloaterClose()
 	if (floaterp)
 	{
 		floaterp->setOwner(NULL);
-		mLastFloaterLeftTop.set( floaterp->getRect().mLeft, floaterp->getRect().mTop );
 	}
 
 	mFloaterHandle.markDead();
@@ -1222,7 +1095,11 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op)
 
 	if( floaterp && getEnabled())
 	{
-		mDirty = (op != TEXTURE_CANCEL);
+		if (op == TEXTURE_CANCEL)
+			mViewModel->resetDirty();
+		else
+			mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
+			
 		if( floaterp->isDirty() )
 		{
 			setTentative( FALSE );
@@ -1232,11 +1109,11 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op)
 			lldebugs << "mImageAssetID: " << mImageAssetID << llendl;
 			if (op == TEXTURE_SELECT && mOnSelectCallback)
 			{
-				mOnSelectCallback(this, mCallbackUserData);
+				mOnSelectCallback( this, LLSD() );
 			}
 			else if (op == TEXTURE_CANCEL && mOnCancelCallback)
 			{
-				mOnCancelCallback(this, mCallbackUserData);
+				mOnCancelCallback( this, LLSD() );
 			}
 			else
 			{
@@ -1256,7 +1133,7 @@ void LLTextureCtrl::setImageAssetID( const LLUUID& asset_id )
 		if( floaterp && getEnabled() )
 		{
 			floaterp->setImageID( asset_id );
-			floaterp->setDirty( FALSE );
+			floaterp->resetDirty();
 		}
 	}
 }
@@ -1320,7 +1197,7 @@ void LLTextureCtrl::draw()
 	
 	// Border
 	LLRect border( 0, getRect().getHeight(), getRect().getWidth(), BTN_HEIGHT_SMALL );
-	gl_rect_2d( border, mBorderColor, FALSE );
+	gl_rect_2d( border, mBorderColor.get(), FALSE );
 
 	// Interior
 	LLRect interior = border;
@@ -1388,7 +1265,7 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item)
 	{
 		if(mDragCallback)
 		{
-			return mDragCallback(this, item, mCallbackUserData);
+			return mDragCallback(this, item);
 		}
 		else
 		{
@@ -1408,7 +1285,7 @@ BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
 	{
 		// if it returns TRUE, we return TRUE, and therefore the
 		// commit is called above.
-		return mDropCallback(this, item, mCallbackUserData);
+		return mDropCallback(this, item);
 	}
 
 	// no callback installed, so just set the image ids and carry on.
@@ -1438,66 +1315,6 @@ LLSD LLTextureCtrl::getValue() const
 }
 
 
-/////////////////////////////////////////////////////////////////////////////////
-// LLToolTexEyedropper
-
-class LLToolTexEyedropper : public LLTool 
-{
-public:
-	LLToolTexEyedropper( void (*callback)(const LLUUID& obj_id, const LLUUID& image_id, void* userdata ), void* userdata );
-	virtual ~LLToolTexEyedropper();
-	virtual BOOL		handleMouseDown(S32 x, S32 y, MASK mask);
-	virtual BOOL		handleHover(S32 x, S32 y, MASK mask);
-
-protected:
-	void				(*mCallback)(const LLUUID& obj_id, const LLUUID& image_id, void* userdata );
-	void*				mCallbackUserData;
-};
-
-
-LLToolTexEyedropper::LLToolTexEyedropper( 
-	void (*callback)(const LLUUID& obj_id, const LLUUID& image_id, void* userdata ),
-	void* userdata )
-	: LLTool(std::string("texeyedropper")),
-	  mCallback( callback ),
-	  mCallbackUserData( userdata )
-{
-}
-
-LLToolTexEyedropper::~LLToolTexEyedropper()
-{
-}
-
-
-BOOL LLToolTexEyedropper::handleMouseDown(S32 x, S32 y, MASK mask)
-{
-	// this will affect framerate on mouse down
-	const LLPickInfo& pick = gViewerWindow->pickImmediate(x, y, FALSE);
-	LLViewerObject* hit_obj	= pick.getObject();
-	if (hit_obj && 
-		!hit_obj->isAvatar())
-	{
-		if( (0 <= pick.mObjectFace) && (pick.mObjectFace < hit_obj->getNumTEs()) )
-		{
-			LLViewerImage* image = hit_obj->getTEImage( pick.mObjectFace );
-			if( image )
-			{
-				if( mCallback )
-				{
-					mCallback( hit_obj->getID(), image->getID(), mCallbackUserData );
-				}
-			}
-		}
-	}
-	return TRUE;
-}
-
-BOOL LLToolTexEyedropper::handleHover(S32 x, S32 y, MASK mask)
-{
-	lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolTexEyedropper" << llendl;
-	gViewerWindow->getWindow()->setCursor(UI_CURSOR_CROSS);  // TODO: better cursor
-	return TRUE;
-}
 
 
 
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 623f15eef5..ebe2cd2e5f 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -39,16 +39,17 @@
 #include "llstring.h"
 #include "lluictrl.h"
 #include "llpermissionsflags.h"
+#include "lltextbox.h" // for params
+#include "llviewborder.h" // for params
 
 class LLButton;
 class LLFloaterTexturePicker;
 class LLInventoryItem;
-class LLTextBox;
-class LLViewBorder;
 class LLViewerImage;
 
 // used for setting drag & drop callbacks.
-typedef BOOL (*drag_n_drop_callback)(LLUICtrl*, LLInventoryItem*, void*);
+typedef boost::function<BOOL (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback;
+
 
 //////////////////////////////////////////////////////////////////////////////////////////
 // LLTextureCtrl
@@ -66,17 +67,45 @@ public:
 	} ETexturePickOp;
 
 public:
-	LLTextureCtrl(
-		const std::string& name, const LLRect& rect,
-		const std::string& label,
-		const LLUUID& image_id,
-		const LLUUID& default_image_id, 
-		const std::string& default_image_name );
+	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+	{
+		Optional<LLUUID>		image_id;
+		Optional<LLUUID>		default_image_id;
+		Optional<std::string>	default_image_name;
+		Optional<bool>			allow_no_texture;
+		Optional<bool>			can_apply_immediately;
+		Optional<S32>			label_width;
+		Optional<LLUIColor>		border_color;
+		
+		Optional<LLTextBox::Params>	multiselect_text,
+									caption_text;
+
+		Optional<LLViewBorder::Params> border;
+
+		Params()
+		:	image_id("image"),
+			default_image_id("default_image"),
+			default_image_name("default_image_name"),
+			allow_no_texture("allow_no_texture"),
+			can_apply_immediately("can_apply_immediately"),
+		    label_width("label_width", -1),
+			border_color("border_color"),
+			multiselect_text("multiselect_text"),
+			caption_text("caption_text"),
+			border("border")
+		{
+			name = "texture picker";
+			mouse_opaque(true);
+			follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
+		}
+	};
+protected:
+	LLTextureCtrl(const Params&);
+	friend class LLUICtrlFactory;
+public:
 	virtual ~LLTextureCtrl();
 
 	// LLView interface
-	virtual LLXMLNodePtr getXML(bool save_children = true) const;
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
 
 	virtual BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleDragAndDrop(S32 x, S32 y, MASK mask,
@@ -90,9 +119,6 @@ public:
 	virtual void	setVisible( BOOL visible );
 	virtual void	setEnabled( BOOL enabled );
 
-	virtual BOOL	isDirty() const;
-	virtual void	resetDirty();
-
 	void			setValid(BOOL valid);
 
 	// LLUICtrl interface
@@ -105,6 +131,7 @@ public:
 	// LLTextureCtrl interface
 	void			showPicker(BOOL take_focus);
 	void			setLabel(const std::string& label);
+	void			setLabelWidth(S32 label_width) {mLabelWidth =label_width;}	
 	const std::string&	getLabel() const							{ return mLabel; }
 
 	void			setAllowNoTexture( BOOL b )					{ mAllowNoTexture = b; }
@@ -133,7 +160,7 @@ public:
 	PermissionMask	getImmediateFilterPermMask() { return mImmediateFilterPermMask; }
 	PermissionMask	getNonImmediateFilterPermMask() { return mNonImmediateFilterPermMask; }
 
-	void			closeFloater();
+	void			closeDependentFloater();
 
 	void			onFloaterClose();
 	void			onFloaterCommit(ETexturePickOp op);
@@ -146,10 +173,10 @@ public:
 	// the drop happened - resulting in an on commit callback, but not
 	// necessariliy any other change.
 	void setDropCallback(drag_n_drop_callback cb)	{ mDropCallback = cb; }
-
-	void setOnCancelCallback(LLUICtrlCallback cb)	{ mOnCancelCallback = cb; }
 	
-	void setOnSelectCallback(LLUICtrlCallback cb)	{ mOnSelectCallback = cb; }
+	void setOnCancelCallback(commit_callback_t cb)	{ mOnCancelCallback = cb; }
+	
+	void setOnSelectCallback(commit_callback_t cb)	{ mOnSelectCallback = cb; }
 
 	void setShowLoadingPlaceholder(BOOL showLoadingPlaceholder);
 
@@ -160,10 +187,10 @@ private:
 private:
 	drag_n_drop_callback	 mDragCallback;
 	drag_n_drop_callback	 mDropCallback;
-	LLUICtrlCallback		 mOnCancelCallback;
-	LLUICtrlCallback		 mOnSelectCallback;
+	commit_callback_t		 mOnCancelCallback;
+	commit_callback_t		 mOnSelectCallback;
 	LLPointer<LLViewerImage> mTexturep;
-	LLColor4				 mBorderColor;
+	LLUIColor				 mBorderColor;
 	LLUUID					 mImageItemID;
 	LLUUID					 mImageAssetID;
 	LLUUID					 mDefaultImageAssetID;
@@ -174,16 +201,15 @@ private:
 	LLTextBox*				 mCaption;
 	std::string				 mLabel;
 	BOOL					 mAllowNoTexture; // If true, the user can select "none" as an option
-	LLCoordGL				 mLastFloaterLeftTop;
 	PermissionMask			 mImmediateFilterPermMask;
 	PermissionMask			 mNonImmediateFilterPermMask;
 	BOOL					 mCanApplyImmediately;
 	BOOL					 mNeedsRawImageData;
 	LLViewBorder*			 mBorder;
 	BOOL					 mValid;
-	BOOL					 mDirty;
 	BOOL					 mShowLoadingPlaceholder;
 	std::string				 mLoadingPlaceholderString;
+	S32						 mLabelWidth;
 };
 
 // XUI HACK: When floaters converted, switch this file to lltexturepicker.h/cpp
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index f00d5e5b48..a4fb9c4efc 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -83,12 +83,20 @@ public:
 	S32 mHilite;
 
 public:
-	LLTextureBar(const std::string& name, const LLRect& r, LLTextureView* texview)
-		: LLView(name, r, FALSE),
-		  mHilite(0),
-		  mTextureView(texview)
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
 	{
-	}
+		Mandatory<LLTextureView*> texture_view;
+		Params()
+		:	texture_view("texture_view")
+		{
+			mouse_opaque(false);
+		}
+	};
+	LLTextureBar(const Params& p)
+	:	LLView(p),
+		mHilite(0),
+		mTextureView(p.texture_view)
+	{}
 
 	virtual void draw();
 	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
@@ -366,13 +374,21 @@ LLRect LLTextureBar::getRequiredRect()
 class LLGLTexMemBar : public LLView
 {
 public:
-	LLGLTexMemBar(const std::string& name, LLTextureView* texview)
-		: LLView(name, FALSE),
-		  mTextureView(texview)
+	struct Params : public LLInitParam::Block<Params, LLView::Params>
 	{
-		S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
-		setRect(LLRect(0,0,100,line_height * 4));
-	}
+		Mandatory<LLTextureView*>	texture_view;
+		Params()
+		:	texture_view("texture_view")
+		{
+			S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
+			rect(LLRect(0,0,100,line_height * 4));
+		}
+	};
+
+	LLGLTexMemBar(const Params& p)
+	:	LLView(p),
+		mTextureView(p.texture_view)
+	{}
 
 	virtual void draw();	
 	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
@@ -521,8 +537,8 @@ LLRect LLGLTexMemBar::getRequiredRect()
 
 ////////////////////////////////////////////////////////////////////////////
 
-LLTextureView::LLTextureView(const std::string& name, const LLRect& rect)
-	:	LLContainerView(name, rect),
+LLTextureView::LLTextureView(const LLTextureView::Params& p)
+	:	LLContainerView(p),
 		mFreezeView(FALSE),
 		mOrderFetch(FALSE),
 		mPrintList(FALSE),
@@ -709,7 +725,10 @@ void LLTextureView::draw()
 		else
 			sortChildren(LLTextureBar::sort());
 
-		mGLTexMemBar = new LLGLTexMemBar("gl texmem bar", this);
+		LLGLTexMemBar::Params tmbp;
+		tmbp.name("gl texmem bar");
+		tmbp.texture_view(this);
+		mGLTexMemBar = LLUICtrlFactory::create<LLGLTexMemBar>(tmbp);
 		addChild(mGLTexMemBar);
 	
 		reshape(getRect().getWidth(), getRect().getHeight(), TRUE);
@@ -746,7 +765,11 @@ BOOL LLTextureView::addBar(LLViewerImage *imagep, S32 hilite)
 
 	mNumTextureBars++;
 
-	barp = new LLTextureBar("texture bar", r, this);
+	LLTextureBar::Params tbp;
+	tbp.name("texture bar");
+	tbp.rect(r);
+	tbp.texture_view(this);
+	barp = LLUICtrlFactory::create<LLTextureBar>(tbp);
 	barp->mImagep = imagep;	
 	barp->mHilite = hilite;
 
diff --git a/indra/newview/lltextureview.h b/indra/newview/lltextureview.h
index f91a296b97..99b6db9662 100644
--- a/indra/newview/lltextureview.h
+++ b/indra/newview/lltextureview.h
@@ -43,8 +43,10 @@ class LLTextureView : public LLContainerView
 {
 	friend class LLTextureBar;
 	friend class LLGLTexMemBar;
+protected:
+	LLTextureView(const Params&);
+	friend class LLUICtrlFactory;
 public:
-	LLTextureView(const std::string& name, const LLRect& rect);
 	~LLTextureView();
 
 	/*virtual*/ void draw();
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp
index 6a3ada0474..7b058e9efa 100644
--- a/indra/newview/lltool.cpp
+++ b/indra/newview/lltool.cpp
@@ -91,7 +91,7 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
 
 BOOL LLTool::handleHover(S32 x, S32 y, MASK mask)
 {
-	gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
+	gViewerWindow->setCursor(UI_CURSOR_ARROW);
 	lldebugst(LLERR_USER_INPUT) << "hover handled by a tool" << llendl;		
 	// by default, do nothing, say we handled it
 	return TRUE;
diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp
index 33edb3ef27..67348b2a05 100644
--- a/indra/newview/lltoolbar.cpp
+++ b/indra/newview/lltoolbar.cpp
@@ -36,7 +36,9 @@
 #include "lltoolbar.h"
 
 #include "imageids.h"
+#include "llfloaterreg.h"
 #include "llfontgl.h"
+#include "llflyoutbutton.h"
 #include "llrect.h"
 #include "llparcel.h"
 
@@ -57,6 +59,9 @@
 #include "llui.h"
 #include "llviewermenu.h"
 #include "llfirstuse.h"
+#include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llscrolllistcell.h"
 #include "llviewerparcelmgr.h"
 #include "lluictrlfactory.h"
 #include "llviewerwindow.h"
@@ -65,29 +70,12 @@
 #include "llfloaterchat.h"
 #include "llfloatermute.h"
 #include "llimpanel.h"
-#include "llscrolllistctrl.h"
+#include "lllayoutstack.h"
 
 #if LL_DARWIN
 
 	#include "llresizehandle.h"
 
-	// This class draws like an LLResizeHandle but has no interactivity.
-	// It's just there to provide a cue to the user that the lower right corner of the window functions as a resize handle.
-	class LLFakeResizeHandle : public LLResizeHandle
-	{
-	public:
-		LLFakeResizeHandle(const std::string& name, const LLRect& rect, S32 min_width, S32 min_height, ECorner corner = RIGHT_BOTTOM )
-		: LLResizeHandle(name, rect, min_width, min_height, corner )
-		{
-			
-		}
-
-		virtual BOOL	handleHover(S32 x, S32 y, MASK mask)   { return FALSE; };
-		virtual BOOL	handleMouseDown(S32 x, S32 y, MASK mask)  { return FALSE; };
-		virtual BOOL	handleMouseUp(S32 x, S32 y, MASK mask)   { return FALSE; };
-
-	};
-
 #endif // LL_DARWIN
 
 //
@@ -95,7 +83,6 @@
 //
 
 LLToolBar *gToolBar = NULL;
-S32 TOOL_BAR_HEIGHT = 20;
 
 //
 // Statics
@@ -107,51 +94,20 @@ F32	LLToolBar::sInventoryAutoOpenTime = 1.f;
 //
 
 LLToolBar::LLToolBar()
-:	LLPanel()
+	: LLPanel()
 #if LL_DARWIN
 	, mResizeHandle(NULL)
 #endif // LL_DARWIN
 {
 	setIsChrome(TRUE);
 	setFocusRoot(TRUE);
+	
+	mCommitCallbackRegistrar.add("HandleCommunicate", &LLToolBar::onClickCommunicate);
 }
 
 
 BOOL LLToolBar::postBuild()
 {
-	childSetCommitCallback("communicate_btn", onClickCommunicate, this);
-	childSetControlName("communicate_btn", "ShowCommunicate");
-
-	childSetAction("chat_btn", onClickChat, this);
-	childSetControlName("chat_btn", "ChatVisible");
-
-	childSetAction("appearance_btn", onClickAppearance, this);
-	childSetControlName("appearance_btn", "");
-
-	childSetAction("fly_btn", onClickFly, this);
-	childSetControlName("fly_btn", "FlyBtnState");
-
-	childSetAction("sit_btn", onClickSit, this);
-	childSetControlName("sit_btn", "SitBtnState");
-
-	childSetAction("snapshot_btn", onClickSnapshot, this);
-	childSetControlName("snapshot_btn", "");
-
-	childSetAction("directory_btn", onClickDirectory, this);
-	childSetControlName("directory_btn", "ShowDirectory");
-
-	childSetAction("build_btn", onClickBuild, this);
-	childSetControlName("build_btn", "BuildBtnState");
-
-	childSetAction("radar_btn", onClickRadar, this);
-	childSetControlName("radar_btn", "ShowMiniMap");
-
-	childSetAction("map_btn", onClickMap, this);
-	childSetControlName("map_btn", "ShowWorldMap");
-
-	childSetAction("inventory_btn", onClickInventory, this);
-	childSetControlName("inventory_btn", "ShowInventory");
-
 	for (child_list_const_iter_t child_iter = getChildList()->begin();
 		 child_iter != getChildList()->end(); ++child_iter)
 	{
@@ -167,8 +123,14 @@ BOOL LLToolBar::postBuild()
 	if(mResizeHandle == NULL)
 	{
 		LLRect rect(0, 0, RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT);
-		mResizeHandle = new LLFakeResizeHandle(std::string(""), rect, RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT);
-		this->addChildAtEnd(mResizeHandle);
+		LLResizeHandle::Params p;
+		p.name("");
+		p.rect(rect);
+		p.min_width(RESIZE_HANDLE_WIDTH);
+		p.min_height(RESIZE_HANDLE_HEIGHT);
+		p.enabled(false);
+		mResizeHandle = LLUICtrlFactory::create<LLResizeHandle>(p);
+		addChildInBack(mResizeHandle);
 		LLLayoutStack* toolbar_stack = getChild<LLLayoutStack>("toolbar_stack");
 		toolbar_stack->reshape(toolbar_stack->getRect().getWidth() - RESIZE_HANDLE_WIDTH, toolbar_stack->getRect().getHeight());
 	}
@@ -223,7 +185,7 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
 // static
 void LLToolBar::toggle(void*)
 {
-	BOOL show = gSavedSettings.getBOOL("ShowToolBar");                      
+	BOOL show = gSavedSettings.getBOOL("ShowToolBar");
 	gSavedSettings.setBOOL("ShowToolBar", !show);                           
 	gToolBar->setVisible(!show);
 }
@@ -290,19 +252,35 @@ void LLToolBar::refresh()
 		sitting = gAgent.getAvatarObject()->mIsSitting;
 	}
 
-	childSetEnabled("fly_btn", (gAgent.canFly() || gAgent.getFlying()) && !sitting );
-
-	childSetEnabled("build_btn", LLViewerParcelMgr::getInstance()->agentCanBuild() );
-
-	// Check to see if we're in build mode
-	BOOL build_mode = LLToolMgr::getInstance()->inEdit();
-	// And not just clicking on a scripted object
-	if (LLToolGrab::getInstance()->getHideBuildHighlight())
+	if (!gAgent.canFly())
 	{
-		build_mode = FALSE;
+		gSavedSettings.setBOOL("FlyBtnEnabled", gAgent.getFlying() ? true : false);
+		gSavedSettings.setBOOL("FlyBtnState", false);
 	}
-	gSavedSettings.setBOOL("BuildBtnState", build_mode);
-
+	else
+	{
+		gSavedSettings.setBOOL("FlyBtnEnabled", sitting ? false : true);
+	}
+	
+	// Check to see if we're in build mode	
+	bool build_enabled = LLToolMgr::getInstance()->canEdit();
+	if (build_enabled)
+	{
+		gSavedSettings.setBOOL("BuildBtnEnabled", true);
+		bool build_mode = LLToolMgr::getInstance()->inEdit();
+		// HACK: Not in mouselook and not just clicking on a scripted object
+		if (gAgent.cameraMouselook() || LLToolGrab::getInstance()->getHideBuildHighlight())
+		{
+			build_mode = FALSE;
+		}
+		gSavedSettings.setBOOL("BuildBtnState", build_mode);
+	}
+	else
+	{
+		gSavedSettings.setBOOL("BuildBtnEnabled", false);
+		gSavedSettings.setBOOL("BuildBtnState", false);
+	}
+	
 	if (isInVisibleChain())
 	{
 		updateCommunicateList();
@@ -319,25 +297,34 @@ void LLToolBar::updateCommunicateList()
 	LLFloater* frontmost_floater = LLFloaterChatterBox::getInstance()->getActiveFloater();
 	LLScrollListItem* itemp = NULL;
 
-	itemp = communicate_button->add(LLFloaterMyFriends::getInstance()->getShortTitle(), LLSD("contacts"), ADD_TOP);
+	LLSD contact_sd;
+	contact_sd["value"] = "contacts";
+	contact_sd["columns"][0]["value"] = LLFloaterMyFriends::getInstance()->getShortTitle(); 
 	if (LLFloaterMyFriends::getInstance() == frontmost_floater)
 	{
-		((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD);
+		contact_sd["columns"][0]["font"]["style"] = "BOLD"; 
 		// make sure current tab is selected in list
 		if (selected.isUndefined())
 		{
-			selected = itemp->getValue();
+			selected = "contacts";
 		}
 	}
-	itemp = communicate_button->add(LLFloaterChat::getInstance()->getShortTitle(), LLSD("local chat"), ADD_TOP);
+	itemp = communicate_button->addElement(contact_sd, ADD_TOP);
+
+	LLSD communicate_sd;
+	communicate_sd["value"] = "local chat";
+	communicate_sd["columns"][0]["value"] = LLFloaterChat::getInstance()->getShortTitle();
+
 	if (LLFloaterChat::getInstance() == frontmost_floater)
 	{
-		((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD);
+		communicate_sd["columns"][0]["font"]["style"] = "BOLD";
 		if (selected.isUndefined())
 		{
-			selected = itemp->getValue();
+			selected = "local chat";
 		}
 	}
+	itemp = communicate_button->addElement(communicate_sd, ADD_TOP);
+
 	communicate_button->addSeparator(ADD_TOP);
 	communicate_button->add(getString("Redock Windows"), LLSD("redock"), ADD_TOP);
 	communicate_button->addSeparator(ADD_TOP);
@@ -357,38 +344,40 @@ void LLToolBar::updateCommunicateList()
 		{
 			std::string floater_title = im_floaterp->getNumUnreadMessages() > 0 ? "*" : "";
 			floater_title.append(im_floaterp->getShortTitle());
-			itemp = communicate_button->add(floater_title, im_floaterp->getSessionID(), ADD_TOP);
+			LLSD im_sd;
+			im_sd["value"] = im_floaterp->getSessionID();
+			im_sd["columns"][0]["value"] = floater_title;
 			if (im_floaterp  == frontmost_floater)
 			{
-				((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD);
+				im_sd["columns"][0]["font"]["style"] = "BOLD";
 				if (selected.isUndefined())
 				{
-					selected = itemp->getValue();
+					selected = im_floaterp->getSessionID();
 				}
 			}
+			itemp = communicate_button->addElement(im_sd, ADD_TOP);
 		}
 	}
 
-	communicate_button->setToggleState(gSavedSettings.getBOOL("ShowCommunicate"));
 	communicate_button->setValue(selected);
 }
 
 
 // static
-void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, void* user_data)
+void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, const LLSD& user_data)
 {
-	LLToolBar* toolbar = (LLToolBar*)user_data;
-	LLFlyoutButton* communicate_button = toolbar->getChild<LLFlyoutButton>("communicate_btn");
+	LLFlyoutButton* communicate_button = dynamic_cast<LLFlyoutButton*>(ctrl);
+	llassert_always(communicate_button);
 	
 	LLSD selected_option = communicate_button->getValue();
     
 	if (selected_option.asString() == "contacts")
 	{
-		LLFloaterMyFriends::showInstance();
+		LLFloaterReg::showInstance("contacts", "friends");
 	}
 	else if (selected_option.asString() == "local chat")
 	{
-		LLFloaterChat::showInstance();
+		LLFloaterReg::showInstance("communicate", "local");
 	}
 	else if (selected_option.asString() == "redock")
 	{
@@ -410,7 +399,7 @@ void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, void* user_data)
 			}
 		}
 
-		LLFloaterChatterBox::showInstance(session_to_show);
+		LLFloaterReg::showInstance("communicate", session_to_show);
 	}
 	else if (selected_option.asString() == "mute list")
 	{
@@ -418,104 +407,12 @@ void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, void* user_data)
 	}
 	else if (selected_option.isUndefined()) // user just clicked the communicate button, treat as toggle
 	{
-		if (LLFloaterChatterBox::getInstance()->getFloaterCount() == 0)
-		{
-			LLFloaterMyFriends::toggleInstance();
-		}
-		else
-		{
-			LLFloaterChatterBox::toggleInstance();
-		}
-	}
-	else // otherwise selection_option is a specific IM session id
-	{
-		LLFloaterChatterBox::showInstance(selected_option);
-	}
-}
-
-
-// static
-void LLToolBar::onClickChat(void* user_data)
-{
-	handle_chat(NULL);
-}
-
-// static
-void LLToolBar::onClickAppearance(void*)
-{
-	if (gAgent.areWearablesLoaded())
-	{
-		gAgent.changeCameraToCustomizeAvatar();
+		LLFloaterReg::toggleInstance("communicate");
 	}
-}
-
-
-// static
-void LLToolBar::onClickFly(void*)
-{
-	gAgent.toggleFlying();
-}
-
-
-// static
-void LLToolBar::onClickSit(void*)
-{
-	if (!(gAgent.getControlFlags() & AGENT_CONTROL_SIT_ON_GROUND))
-	{
-		// sit down
-		gAgent.setFlying(FALSE);
-		gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
-
-		// Might be first sit
-		LLFirstUse::useSit();
-	}
-	else
+	else // otherwise selection_option is undifined or a specific IM session id
 	{
-		// stand up
-		gAgent.setFlying(FALSE);
-		gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
+		LLFloaterReg::showInstance("communicate", selected_option);
 	}
 }
 
 
-// static
-void LLToolBar::onClickSnapshot(void*)
-{
-	LLFloaterSnapshot::show (0);
-}
-
-
-// static
-void LLToolBar::onClickDirectory(void*)
-{
-	handle_find(NULL);
-}
-
-
-// static
-void LLToolBar::onClickBuild(void*)
-{
-	toggle_build_mode();
-}
-
-
-// static
-void LLToolBar::onClickRadar(void*)
-{
-	handle_mini_map(NULL);
-}
-
-
-// static
-void LLToolBar::onClickMap(void*)
-{
-	handle_map(NULL);
-}
-
-
-// static
-void LLToolBar::onClickInventory(void*)
-{
-	handle_inventory(NULL);
-}
-
diff --git a/indra/newview/lltoolbar.h b/indra/newview/lltoolbar.h
index 094d016e39..954c6270a6 100644
--- a/indra/newview/lltoolbar.h
+++ b/indra/newview/lltoolbar.h
@@ -37,12 +37,7 @@
 
 #include "llframetimer.h"
 
-// "Constants" loaded from settings.xml at start time
-extern S32 TOOL_BAR_HEIGHT;
-
-#if LL_DARWIN
-	class LLFakeResizeHandle;
-#endif // LL_DARWIN
+class LLResizeHandle;
 
 class LLToolBar
 :	public LLPanel
@@ -71,17 +66,7 @@ public:
 	void refresh();
 
 	// callbacks
-	static void onClickCommunicate(LLUICtrl*, void*);
-	static void onClickChat(void* data);
-	static void onClickAppearance(void* data);
-	static void onClickFly(void*);
-	static void onClickSit(void*);
-	static void onClickSnapshot(void* data);
-	static void onClickDirectory(void* data);
-	static void onClickBuild(void* data);
-	static void onClickRadar(void* data);
-	static void onClickMap(void* data);
-	static void onClickInventory(void* data);
+	static void onClickCommunicate(LLUICtrl*, const LLSD&);
 
 	static F32 sInventoryAutoOpenTime;
 
@@ -94,7 +79,7 @@ private:
 	LLFrameTimer mInventoryAutoOpenTimer;
 	S32			mNumUnreadIMs;
 #if LL_DARWIN
-	LLFakeResizeHandle *mResizeHandle;
+	LLResizeHandle *mResizeHandle;
 #endif // LL_DARWIN
 };
 
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index c42693d03f..0088a6a2a4 100644
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -412,7 +412,7 @@ BOOL LLToolBrushLand::handleHover( S32 x, S32 y, MASK mask )
 	mMouseX = x;
 	mMouseY = y;
 	mGotHover = TRUE;
-	gViewerWindow->getWindow()->setCursor(UI_CURSOR_TOOLLAND);
+	gViewerWindow->setCursor(UI_CURSOR_TOOLLAND);
 	return TRUE;
 }
 
diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp
index 0b6e01886a..b95b33439e 100644
--- a/indra/newview/lltoolcomp.cpp
+++ b/indra/newview/lltoolcomp.cpp
@@ -34,6 +34,7 @@
 
 #include "lltoolcomp.h"
 
+#include "llfloaterreg.h"
 #include "llgl.h"
 #include "indra_constants.h"
 
@@ -290,7 +291,7 @@ BOOL LLToolCompTranslate::handleDoubleClick(S32 x, S32 y, MASK mask)
 	{
 		// You should already have an object selected from the mousedown.
 		// If so, show its properties
-		gFloaterTools->showPanel(LLFloaterTools::PANEL_CONTENTS);
+		LLFloaterReg::showInstance("build", "Content");
 		return TRUE;
 	}
 	// Nothing selected means the first mouse click was probably
@@ -407,8 +408,7 @@ BOOL LLToolCompScale::handleDoubleClick(S32 x, S32 y, MASK mask)
 	{
 		// You should already have an object selected from the mousedown.
 		// If so, show its properties
-		gFloaterTools->showPanel(LLFloaterTools::PANEL_CONTENTS);
-		//gBuildView->setPropertiesPanelOpen(TRUE);
+		LLFloaterReg::showInstance("build", "Content");
 		return TRUE;
 	}
 	else
@@ -605,8 +605,7 @@ BOOL LLToolCompRotate::handleDoubleClick(S32 x, S32 y, MASK mask)
 	{
 		// You should already have an object selected from the mousedown.
 		// If so, show its properties
-		gFloaterTools->showPanel(LLFloaterTools::PANEL_CONTENTS);
-		//gBuildView->setPropertiesPanelOpen(TRUE);
+		LLFloaterReg::showInstance("build", "Content");
 		return TRUE;
 	}
 	else
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 156093a21a..741492a88a 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -35,6 +35,7 @@
 #include "message.h"
 #include "lltooldraganddrop.h"
 
+#include "llfloaterreg.h"
 #include "llinstantmessage.h"
 #include "lldir.h"
 
@@ -1461,10 +1462,10 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
 		}
 	}
 	hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
-	if (gFloaterTools->getVisible())
+	if (LLFloaterReg::instanceVisible("build"))
 	{
 		// *FIX: only show this if panel not expanded?
-		gFloaterTools->showPanel(LLFloaterTools::PANEL_CONTENTS);
+		LLFloaterReg::showInstance("build", "Content");
 	}
 
 	// VEFFECT: AddToInventory
@@ -2897,11 +2898,10 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory(
 	}
 	else if(mSource == SOURCE_NOTECARD)
 	{
-		LLPreviewNotecard* card;
-		card = (LLPreviewNotecard*)LLPreview::find(mSourceID);
-		if(card)
+		LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", mSourceID);
+		if(preview)
 		{
-			item = (LLViewerInventoryItem*)card->getDragItem();
+			item = (LLViewerInventoryItem*)preview->getDragItem();
 		}
 	}
 	if(item) return item;
diff --git a/indra/newview/lltoolface.cpp b/indra/newview/lltoolface.cpp
index d06e41c771..b335d7125a 100644
--- a/indra/newview/lltoolface.cpp
+++ b/indra/newview/lltoolface.cpp
@@ -36,14 +36,13 @@
 #include "lltoolface.h" 
 
 // Library includes
+#include "llfloaterreg.h"
 #include "v3math.h"
 
 // Viewer includes
 #include "llagent.h"
-//#include "llbuildview.h"
 #include "llviewercontrol.h"
 #include "llselectmgr.h"
-#include "lltoolview.h"
 #include "llviewerobject.h"
 #include "llviewerwindow.h"
 #include "llfloatertools.h"
@@ -67,9 +66,7 @@ BOOL LLToolFace::handleDoubleClick(S32 x, S32 y, MASK mask)
 	{
 		// You should already have an object selected from the mousedown.
 		// If so, show its properties
-		//gBuildView->showFacePanel();
-		gFloaterTools->showPanel( LLFloaterTools::PANEL_FACE );
-		//gBuildView->showMore(LLBuildView::PANEL_FACE);
+		LLFloaterReg::showInstance("build", "Texture");
 		return TRUE;
 	}
 	else
diff --git a/indra/newview/lltoolgrab.h b/indra/newview/lltoolgrab.h
index cf2405cafc..16ccb3f24f 100644
--- a/indra/newview/lltoolgrab.h
+++ b/indra/newview/lltoolgrab.h
@@ -36,7 +36,7 @@
 #include "lltool.h"
 #include "v3math.h"
 #include "llquaternion.h"
-#include "llmemory.h"
+#include "llsingleton.h"
 #include "lluuid.h"
 #include "llviewerwindow.h" // for LLPickInfo
 
diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp
index d21fd49647..72fd8b3bac 100644
--- a/indra/newview/lltoolgun.cpp
+++ b/indra/newview/lltoolgun.cpp
@@ -48,6 +48,9 @@
 #include "lltoolmgr.h"
 #include "lltoolgrab.h"
 
+// Linden library includes
+#include "llwindow.h"			// setMouseClipping()
+
 LLToolGun::LLToolGun( LLToolComposite* composite )
 :	LLTool( std::string("gun"), composite )
 {
@@ -132,7 +135,7 @@ void LLToolGun::draw()
 {
 	if( gSavedSettings.getBOOL("ShowCrosshairs") )
 	{
-		LLUIImagePtr crosshair = LLUI::getUIImage("UIImgCrosshairsUUID");
+		LLUIImagePtr crosshair = LLUI::getUIImage("crosshairs.tga");
 		crosshair->draw(
 			( gViewerWindow->getWindowWidth() - crosshair->getWidth() ) / 2,
 			( gViewerWindow->getWindowHeight() - crosshair->getHeight() ) / 2);
diff --git a/indra/newview/lltoolindividual.cpp b/indra/newview/lltoolindividual.cpp
index 8382e0d72d..163c7cbd9b 100644
--- a/indra/newview/lltoolindividual.cpp
+++ b/indra/newview/lltoolindividual.cpp
@@ -41,6 +41,7 @@
 #include "llviewerprecompiledheaders.h"
 #include "lltoolindividual.h"
 
+#include "llfloaterreg.h"
 #include "llselectmgr.h"
 #include "llviewerobject.h"
 #include "llviewerwindow.h"
@@ -93,9 +94,7 @@ BOOL LLToolIndividual::handleDoubleClick(S32 x, S32 y, MASK mask)
 	{
 		// You should already have an object selected from the mousedown.
 		// If so, show its inventory. 
-		//gBuildView->showInventoryPanel();
-		//gBuildView->showPanel(LLBuildView::PANEL_CONTENTS);
-		gFloaterTools->showPanel(LLFloaterTools::PANEL_CONTENTS);
+		LLFloaterReg::showInstance("build", "Content");
 		return TRUE;
 	}
 	else
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index 5ba7217c99..5a8dd62f8d 100644
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -34,8 +34,13 @@
 
 #include "lltoolmgr.h"
 
-#include "lltool.h"
+#include "lluictrl.h"
+#include "llmenugl.h"
+#include "llfloaterreg.h"
+
+#include "llfirstuse.h"
 // tools and manipulators
+#include "lltool.h"
 #include "llmanipscale.h"
 #include "llselectmgr.h"
 #include "lltoolbrush.h"
@@ -47,12 +52,14 @@
 #include "lltoolindividual.h"
 #include "lltoolmorph.h"
 #include "lltoolpie.h"
-#include "lltoolplacer.h"
 #include "lltoolselectland.h"
 #include "lltoolobjpicker.h"
 #include "lltoolpipette.h"
 #include "llagent.h"
 #include "llviewercontrol.h"
+#include "llviewerjoystick.h"
+#include "llviewermenu.h"
+#include "llviewerparcelmgr.h"
 
 
 // Used when app not active to avoid processing hover.
@@ -76,6 +83,10 @@ LLToolMgr::LLToolMgr()
 	mSelectedTool( NULL ),
 	mCurrentToolset( NULL )
 {
+	LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this));
+	LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this));
+	LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this));
+	
 	gToolNull = new LLTool(LLStringUtil::null);  // Does nothing
 	setCurrentTool(gToolNull);
 
@@ -172,7 +183,7 @@ void LLToolMgr::setCurrentTool( LLTool* tool )
 
 LLTool* LLToolMgr::getCurrentTool()
 {
-	MASK override_mask = gKeyboard->currentMask(TRUE);
+	MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0;
 
 	LLTool* cur_tool = NULL;
 	// always use transient tools if available
@@ -226,11 +237,77 @@ void LLToolMgr::updateToolStatus()
 	getCurrentTool();
 }
 
-BOOL LLToolMgr::inEdit()
+bool LLToolMgr::inEdit()
 {
 	return mBaseTool != LLToolPie::getInstance() && mBaseTool != gToolNull;
 }
 
+bool LLToolMgr::canEdit()
+{
+	return LLViewerParcelMgr::getInstance()->agentCanBuild();
+}
+
+void LLToolMgr::toggleBuildMode()
+{
+	if (inBuildMode())
+	{
+		if (gSavedSettings.getBOOL("EditCameraMovement"))
+		{
+			// just reset the view, will pull us out of edit mode
+			handle_reset_view();
+		}
+		else
+		{
+			// manually disable edit mode, but do not affect the camera
+			gAgent.resetView(false);
+			LLFloaterReg::hideInstance("build");
+			gViewerWindow->showCursor();			
+		}
+		// avoid spurious avatar movements pulling out of edit mode
+		LLViewerJoystick::getInstance()->setNeedsReset();
+	}
+	else
+	{
+		ECameraMode camMode = gAgent.getCameraMode();
+		if (CAMERA_MODE_MOUSELOOK == camMode ||	CAMERA_MODE_CUSTOMIZE_AVATAR == camMode)
+		{
+			// pull the user out of mouselook or appearance mode when entering build mode
+			handle_reset_view();
+		}
+
+		if (gSavedSettings.getBOOL("EditCameraMovement"))
+		{
+			// camera should be set
+			if (LLViewerJoystick::getInstance()->getOverrideCamera())
+			{
+				handle_toggle_flycam();
+			}
+
+			if (gAgent.getFocusOnAvatar())
+			{
+				// zoom in if we're looking at the avatar
+				gAgent.setFocusOnAvatar(FALSE, ANIMATE);
+				gAgent.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis()));
+				gAgent.cameraZoomIn(0.666f);
+				gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD );
+			}
+		}
+
+		
+		setCurrentToolset(gBasicToolset);
+		getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() );
+
+		// Could be first use
+		LLFirstUse::useBuild();
+
+		gAgent.resetView(false);
+
+		// avoid spurious avatar movements
+		LLViewerJoystick::getInstance()->setNeedsReset();
+
+	}
+}
+
 bool LLToolMgr::inBuildMode()
 {
 	// when entering mouselook inEdit() immediately returns true before 
@@ -396,8 +473,6 @@ void LLToolset::selectPrevTool()
 	}
 }
 
-void select_tool( void *tool_pointer )
-{
-	LLTool *tool = (LLTool *)tool_pointer;
-	LLToolMgr::getInstance()->getCurrentToolset()->selectTool( tool );
-}
+////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/indra/newview/lltoolmgr.h b/indra/newview/lltoolmgr.h
index 92647c99de..22aec97864 100644
--- a/indra/newview/lltoolmgr.h
+++ b/indra/newview/lltoolmgr.h
@@ -58,7 +58,9 @@ public:
 	LLTool*			getCurrentTool(); // returns active tool, taking into account keyboard state
 	LLTool*			getBaseTool(); // returns active tool when overrides are deactivated
 
-	BOOL			inEdit();
+	bool			inEdit();
+	bool			canEdit();
+	void			toggleBuildMode();
 	
 	/* Determines if we are in Build mode or not. */
 	bool			inBuildMode();
@@ -115,10 +117,6 @@ protected:
 	tool_list_t 	mToolList;
 };
 
-// Handy callbacks for switching tools
-void select_tool(void *tool);
-
-
 // Globals
 
 extern LLToolset* gBasicToolset;
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index 75e19645a6..4577fc7677 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -56,7 +56,6 @@
 #include "llsky.h"
 #include "lltexlayer.h"
 #include "lltoolmgr.h"
-#include "lltoolview.h"
 #include "llui.h"
 #include "llviewercamera.h"
 #include "llviewerimagelist.h"
diff --git a/indra/newview/lltoolobjpicker.cpp b/indra/newview/lltoolobjpicker.cpp
index d69688706f..8a66069584 100644
--- a/indra/newview/lltoolobjpicker.cpp
+++ b/indra/newview/lltoolobjpicker.cpp
@@ -131,7 +131,7 @@ BOOL LLToolObjPicker::handleHover(S32 x, S32 y, MASK mask)
 
 		cursor = UI_CURSOR_TOOLPICKOBJECT3;
 
-		gViewerWindow->getWindow()->setCursor(cursor);
+		gViewerWindow->setCursor(cursor);
 	}
 	return handled;
 }
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 986555db49..171b03bc5f 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -79,7 +79,6 @@ static ECursorType cursor_from_parcel_media(U8 click_action);
 
 LLToolPie::LLToolPie()
 :	LLTool(std::string("Select")),
-	mPieMouseButtonDown( FALSE ),
 	mGrabMouseButtonDown( FALSE ),
 	mMouseOutsideSlop( FALSE ),
 	mClickAction(0)
@@ -98,32 +97,35 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
 void LLToolPie::leftMouseCallback(const LLPickInfo& pick_info)
 {
 	LLToolPie::getInstance()->mPick = pick_info;
-	LLToolPie::getInstance()->pickAndShowMenu(FALSE);
+	LLToolPie::getInstance()->pickLeftMouseDownCallback();
 }
 
 BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)
 {
-	// don't pick transparent so users can't "pay" transparent objects
-	gViewerWindow->pickAsync(x, y, mask, rightMouseCallback, FALSE, TRUE);
-	mPieMouseButtonDown = TRUE; 
-	// don't steal focus from UI
 	return FALSE;
 }
 
+BOOL LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
+{
+	LLToolMgr::getInstance()->clearTransientTool();
+	gViewerWindow->pickAsync(x, y, mask, rightMouseCallback, FALSE, TRUE);
+	return LLTool::handleRightMouseUp(x, y, mask);
+}
+
 // static
 void LLToolPie::rightMouseCallback(const LLPickInfo& pick_info)
 {
 	LLToolPie::getInstance()->mPick = pick_info;
-	LLToolPie::getInstance()->pickAndShowMenu(TRUE);
+	LLToolPie::getInstance()->pickRightMouseUpCallback();
 }
 
 // True if you selected an object.
-BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
+BOOL LLToolPie::pickLeftMouseDownCallback()
 {
 	S32 x = mPick.mMousePt.mX;
 	S32 y = mPick.mMousePt.mY;
 	MASK mask = mPick.mKeyMask;
-	if (!always_show && mPick.mPickType == LLPickInfo::PICK_PARCEL_WALL)
+	if (mPick.mPickType == LLPickInfo::PICK_PARCEL_WALL)
 	{
 		LLParcel* parcel = LLViewerParcelMgr::getInstance()->getCollisionParcel();
 		if (parcel)
@@ -164,7 +166,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
 					 || (parent && parent->flagHandleTouch());
 
 	// If it's a left-click, and we have a special action, do it.
-	if (useClickAction(always_show, mask, object, parent))
+	if (useClickAction(mask, object, parent))
 	{
 		mClickAction = 0;
 		if (object && object->getClickAction()) 
@@ -240,8 +242,8 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
 	// Switch to grab tool if physical or triggerable
 	if (object && 
 		!object->isAvatar() && 
-		((object->usePhysics() || (parent && !parent->isAvatar() && parent->usePhysics())) || touchable) && 
-		!always_show)
+		((object->usePhysics() || (parent && !parent->isAvatar() && parent->usePhysics())) || touchable) 
+		)
 	{
 		gGrabTransientTool = this;
 		LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolGrab::getInstance() );
@@ -256,8 +258,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
 
 	// If left-click never selects or spawns a menu
 	// Eat the event.
-	if (!gSavedSettings.getBOOL("LeftClickShowMenu")
-		&& !always_show)
+	if (!gSavedSettings.getBOOL("LeftClickShowMenu"))
 	{
 		// mouse already released
 		if (!mGrabMouseButtonDown)
@@ -292,7 +293,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
 		return LLTool::handleMouseDown(x, y, mask);
 	}
 
-	if (!always_show && gAgent.leftButtonGrabbed())
+	if (gAgent.leftButtonGrabbed())
 	{
 		// if the left button is grabbed, don't put up the pie menu
 		return LLTool::handleMouseDown(x, y, mask);
@@ -302,116 +303,15 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
 	LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
 
 	// Spawn pie menu
-	if (mPick.mPickType == LLPickInfo::PICK_LAND)
-	{
-		LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstance()->selectParcelAt( mPick.mPosGlobal );
-		gMenuHolder->setParcelSelection(selection);
-		gPieLand->show(x, y, mPieMouseButtonDown);
-
-		// VEFFECT: ShowPie
-		LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE);
-		effectp->setPositionGlobal(mPick.mPosGlobal);
-		effectp->setColor(LLColor4U(gAgent.getEffectColor()));
-		effectp->setDuration(0.25f);
-	}
-	else if (mPick.mObjectID == gAgent.getID() )
-	{
-		if(!gPieSelf) 
-		{
-			//either at very early startup stage or at late quitting stage,
-			//this event is ignored.
-			return TRUE ;
-		}
-
-		gPieSelf->show(x, y, mPieMouseButtonDown);
-	}
-	else if (object)
-	{
-		gMenuHolder->setObjectSelection(LLSelectMgr::getInstance()->getSelection());
-
-		if (object->isAvatar() 
-			|| (object->isAttachment() && !object->isHUDAttachment() && !object->permYouOwner()))
-		{
-			// Find the attachment's avatar
-			while( object && object->isAttachment())
-			{
-				object = (LLViewerObject*)object->getParent();
-			}
-
-			// Object is an avatar, so check for mute by id.
-			LLVOAvatar* avatar = (LLVOAvatar*)object;
-			std::string name = avatar->getFullname();
-			if (LLMuteList::getInstance()->isMuted(avatar->getID(), name))
-			{
-				gMenuHolder->childSetText("Avatar Mute", std::string("Unmute")); // *TODO:Translate
-				//gMutePieMenu->setLabel("Unmute");
-			}
-			else
-			{
-				gMenuHolder->childSetText("Avatar Mute", std::string("Mute")); // *TODO:Translate
-				//gMutePieMenu->setLabel("Mute");
-			}
-
-			gPieAvatar->show(x, y, mPieMouseButtonDown);
-		}
-		else if (object->isAttachment())
-		{
-			gPieAttachment->show(x, y, mPieMouseButtonDown);
-		}
-		else
-		{
-			// BUG: What about chatting child objects?
-			std::string name;
-			LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
-			if (node)
-			{
-				name = node->mName;
-			}
-			if (LLMuteList::getInstance()->isMuted(object->getID(), name))
-			{
-				gMenuHolder->childSetText("Object Mute", std::string("Unmute")); // *TODO:Translate
-				//gMuteObjectPieMenu->setLabel("Unmute");
-			}
-			else
-			{
-				gMenuHolder->childSetText("Object Mute", std::string("Mute")); // *TODO:Translate
-				//gMuteObjectPieMenu->setLabel("Mute");
-			}
-			
-			gPieObject->show(x, y, mPieMouseButtonDown);
-
-			// VEFFECT: ShowPie object
-			// Don't show when you click on someone else, it freaks them
-			// out.
-			LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE);
-			effectp->setPositionGlobal(mPick.mPosGlobal);
-			effectp->setColor(LLColor4U(gAgent.getEffectColor()));
-			effectp->setDuration(0.25f);
-		}
-	}
-
-	if (always_show)
-	{
-		// ignore return value
-		LLTool::handleRightMouseDown(x, y, mask);
-	}
-	else
-	{
-		// ignore return value
-		LLTool::handleMouseDown(x, y, mask);
-	}
-
-	// We handled the event.
+	LLTool::handleRightMouseDown(x, y, mask);
 	return TRUE;
 }
 
-BOOL LLToolPie::useClickAction(BOOL always_show, 
-							   MASK mask, 
+BOOL LLToolPie::useClickAction(MASK mask, 
 							   LLViewerObject* object, 
 							   LLViewerObject* parent)
 {
-	return	!always_show
-			&& mask == MASK_NONE
+	return	mask == MASK_NONE
 			&& object
 			&& !object->isAttachment() 
 			&& LLPrimitive::isPrimitive(object->getPCode())
@@ -567,27 +467,27 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
 		parent = object->getRootEdit();
 	}
 
-	if (object && useClickAction(FALSE, mask, object, parent))
+	if (object && useClickAction(mask, object, parent))
 	{
 		ECursorType cursor = cursor_from_object(object);
-		gViewerWindow->getWindow()->setCursor(cursor);
+		gViewerWindow->setCursor(cursor);
 		lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
 	}
 	else if ((object && !object->isAvatar() && object->usePhysics()) 
 			 || (parent && !parent->isAvatar() && parent->usePhysics()))
 	{
-		gViewerWindow->getWindow()->setCursor(UI_CURSOR_TOOLGRAB);
+		gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
 		lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
 	}
 	else if ( (object && object->flagHandleTouch()) 
 			  || (parent && parent->flagHandleTouch()))
 	{
-		gViewerWindow->getWindow()->setCursor(UI_CURSOR_HAND);
+		gViewerWindow->setCursor(UI_CURSOR_HAND);
 		lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
 	}
 	else
 	{
-		gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
+		gViewerWindow->setCursor(UI_CURSOR_ARROW);
 		lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
 	}
 
@@ -610,7 +510,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
 			// the world.  Keep the cursor an arrow, assuming that 
 			// after the user moves off the UI, they won't be on the
 			// same object anymore.
-			gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
+			gViewerWindow->setCursor(UI_CURSOR_ARROW);
 			// Make sure the hover-picked object is ignored.
 			gHoverView->resetLastHoverObject();
 			break;
@@ -624,13 +524,6 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
 	return LLTool::handleMouseUp(x, y, mask);
 }
 
-BOOL LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
-{
-	mPieMouseButtonDown = FALSE; 
-	LLToolMgr::getInstance()->clearTransientTool();
-	return LLTool::handleRightMouseUp(x, y, mask);
-}
-
 
 BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
 {
@@ -832,3 +725,116 @@ static ECursorType cursor_from_parcel_media(U8 click_action)
 			return UI_CURSOR_TOOLPLAY;
 	}
 }
+
+
+// True if you selected an object.
+BOOL LLToolPie::pickRightMouseUpCallback()
+{
+	S32 x = mPick.mMousePt.mX;
+	S32 y = mPick.mMousePt.mY;
+	MASK mask = mPick.mKeyMask;
+
+	if (mPick.mPickType != LLPickInfo::PICK_LAND)
+	{
+		LLViewerParcelMgr::getInstance()->deselectLand();
+	}
+
+	// didn't click in any UI object, so must have clicked in the world
+	LLViewerObject *object = mPick.getObject();
+	LLViewerObject *parent = NULL;
+	if(object)
+		parent = object->getRootEdit();
+	
+	// Can't ignore children here.
+	LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
+
+	// Spawn pie menu
+	if (mPick.mPickType == LLPickInfo::PICK_LAND)
+	{
+		LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstance()->selectParcelAt( mPick.mPosGlobal );
+		gMenuHolder->setParcelSelection(selection);
+		gPieLand->show(x, y);
+
+		showVisualContextMenuEffect();
+
+	}
+	else if (mPick.mObjectID == gAgent.getID() )
+	{
+		if(!gPieSelf) 
+		{
+			//either at very early startup stage or at late quitting stage,
+			//this event is ignored.
+			return TRUE ;
+		}
+
+		gPieSelf->show(x, y);
+	}
+	else if (object)
+	{
+		gMenuHolder->setObjectSelection(LLSelectMgr::getInstance()->getSelection());
+
+		if (object->isAvatar() 
+			|| (object->isAttachment() && !object->isHUDAttachment() && !object->permYouOwner()))
+		{
+			// Find the attachment's avatar
+			while( object && object->isAttachment())
+			{
+				object = (LLViewerObject*)object->getParent();
+			}
+
+			// Object is an avatar, so check for mute by id.
+			LLVOAvatar* avatar = (LLVOAvatar*)object;
+			std::string name = avatar->getFullname();
+			if (LLMuteList::getInstance()->isMuted(avatar->getID(), avatar->getFullname()))
+			{
+				gMenuHolder->childSetText("Avatar Mute", std::string("Unmute")); // *TODO:Translate
+			}
+			else
+			{
+				gMenuHolder->childSetText("Avatar Mute", std::string("Mute")); // *TODO:Translate
+			}
+
+			gPieAvatar->show(x, y);
+		}
+		else if (object->isAttachment())
+		{
+			gPieAttachment->show(x, y);
+		}
+		else
+		{
+			// BUG: What about chatting child objects?
+			std::string name;
+			LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
+			if (node)
+			{
+				name = node->mName;
+			}
+			if (LLMuteList::getInstance()->isMuted(object->getID(), name))
+			{
+				gMenuHolder->childSetText("Object Mute", std::string("Unmute")); // *TODO:Translate
+			}
+			else
+			{
+				gMenuHolder->childSetText("Object Mute", std::string("Mute")); // *TODO:Translate
+			}
+			
+			gPieObject->show(x, y);
+
+			showVisualContextMenuEffect();
+		}
+	}
+
+	LLTool::handleRightMouseUp(x, y, mask);
+	// We handled the event.
+	return TRUE;
+}
+
+void LLToolPie::showVisualContextMenuEffect()
+{
+		// VEFFECT: ShowPie
+		LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE);
+		effectp->setPositionGlobal(mPick.mPosGlobal);
+		effectp->setColor(LLColor4U(gAgent.getEffectColor()));
+		effectp->setDuration(0.25f);
+
+}
diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h
index 83df03cda2..82de2b363e 100644
--- a/indra/newview/lltoolpie.h
+++ b/indra/newview/lltoolpie.h
@@ -73,13 +73,13 @@ public:
 
 
 private:
-	BOOL outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y);
-	BOOL pickAndShowMenu(BOOL edit_menu);
-	BOOL useClickAction(BOOL always_show, MASK mask, LLViewerObject* object,
-						LLViewerObject* parent);
+	BOOL outsideSlop		(S32 x, S32 y, S32 start_x, S32 start_y);
+	BOOL pickLeftMouseDownCallback();
+	BOOL pickRightMouseUpCallback();
+	BOOL useClickAction		(MASK mask, LLViewerObject* object,LLViewerObject* parent);
 
+	void showVisualContextMenuEffect();
 private:
-	BOOL				mPieMouseButtonDown;
 	BOOL				mGrabMouseButtonDown;
 	BOOL				mMouseOutsideSlop;				// for this drag, has mouse moved outside slop region
 	LLPickInfo			mPick;
diff --git a/indra/newview/lltoolpipette.cpp b/indra/newview/lltoolpipette.cpp
index 9d95ccc06f..878ed0f9a9 100644
--- a/indra/newview/lltoolpipette.cpp
+++ b/indra/newview/lltoolpipette.cpp
@@ -55,8 +55,6 @@ LLToolPipette::LLToolPipette()
 :	LLTool(std::string("Pipette")),
 	mSuccess(TRUE)
 { 
-	mSelectCallback = NULL;
-	mUserData = NULL;
 }
 
 
@@ -106,6 +104,15 @@ BOOL LLToolPipette::handleToolTip(S32 x, S32 y, std::string& msg, LLRect *sticky
 	return TRUE;
 }
 
+void LLToolPipette::setTextureEntry(const LLTextureEntry* entry)
+{
+	if (entry)
+	{
+		mTextureEntry = *entry;
+		mSignal(mTextureEntry);
+	}
+}
+
 void LLToolPipette::pickCallback(const LLPickInfo& pick_info)
 {
 	LLViewerObject* hit_obj	= pick_info.getObject();
@@ -118,20 +125,11 @@ void LLToolPipette::pickCallback(const LLPickInfo& pick_info)
 	{
 		//TODO: this should highlight the selected face only
 		LLSelectMgr::getInstance()->highlightObjectOnly(hit_obj);
-		LLToolPipette::getInstance()->mTextureEntry = *hit_obj->getTE(pick_info.mObjectFace);
-		if (LLToolPipette::getInstance()->mSelectCallback)
-		{
-			LLToolPipette::getInstance()->mSelectCallback(LLToolPipette::getInstance()->mTextureEntry, LLToolPipette::getInstance()->mUserData);
-		}
+		const LLTextureEntry* entry = hit_obj->getTE(pick_info.mObjectFace);
+		LLToolPipette::getInstance()->setTextureEntry(entry);
 	}
 }
 
-void LLToolPipette::setSelectCallback(select_callback callback, void* user_data)
-{
-	mSelectCallback = callback;
-	mUserData = user_data;
-}
-
 void LLToolPipette::setResult(BOOL success, const std::string& msg)
 {
 	mTooltipMsg = msg;
diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h
index 54c24e9467..fcccafe1a4 100644
--- a/indra/newview/lltoolpipette.h
+++ b/indra/newview/lltoolpipette.h
@@ -40,6 +40,8 @@
 
 #include "lltool.h"
 #include "lltextureentry.h"
+#include <boost/function.hpp>
+#include <boost/signal.hpp>
 
 class LLViewerObject;
 class LLPickInfo;
@@ -56,18 +58,19 @@ public:
 	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleToolTip(S32 x, S32 y, std::string& msg, LLRect *sticky_rect_screen);
 
-	typedef void (*select_callback)(const LLTextureEntry& te, void *data);
-	void setSelectCallback(select_callback callback, void* user_data);
+	// Note: Don't return connection; use boost::bind + boost::signal::trackable to disconnect slots
+	typedef boost::signal<void (const LLTextureEntry& te)> signal_t;
+	void setToolSelectCallback(const signal_t::slot_type& cb) { mSignal.connect(cb); }
 	void setResult(BOOL success, const std::string& msg);
-
+	
+	void setTextureEntry(const LLTextureEntry* entry);
 	static void pickCallback(const LLPickInfo& pick_info);
 
 protected:
 	LLTextureEntry	mTextureEntry;
-	select_callback mSelectCallback;
+	signal_t		mSignal;
 	BOOL			mSuccess;
 	std::string		mTooltipMsg;
-	void*			mUserData;
 };
 
 #endif //LL_LLTOOLPIPETTE_H
diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp
index 88fddd9336..607818305e 100644
--- a/indra/newview/lltoolplacer.cpp
+++ b/indra/newview/lltoolplacer.cpp
@@ -35,9 +35,6 @@
 // self header
 #include "lltoolplacer.h"
 
-// linden library headers
-#include "llprimitive.h"
-
 // viewer headers
 #include "llbutton.h"
 #include "llviewercontrol.h"
@@ -65,13 +62,17 @@
 #include "llviewercamera.h"
 #include "llviewerstats.h"
 
+// linden library headers
+#include "llprimitive.h"
+#include "llwindow.h"			// incBusyCount()
+
 const LLVector3 DEFAULT_OBJECT_SCALE(0.5f, 0.5f, 0.5f);
 
 //static 
 LLPCode	LLToolPlacer::sObjectType = LL_PCODE_CUBE;
 
 LLToolPlacer::LLToolPlacer()
-:	LLTool( std::string("Create") )
+:	LLTool( "Create" )
 {
 }
 
@@ -521,7 +522,7 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
 BOOL LLToolPlacer::handleHover(S32 x, S32 y, MASK mask)
 {
 	lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPlacer" << llendl;		
-	gViewerWindow->getWindow()->setCursor(UI_CURSOR_TOOLCREATE);
+	gViewerWindow->setCursor(UI_CURSOR_TOOLCREATE);
 	return TRUE;
 }
 
@@ -534,92 +535,3 @@ void LLToolPlacer::handleDeselect()
 {
 }
 
-//////////////////////////////////////////////////////
-// LLToolPlacerPanel
-
-// static
-LLPCode LLToolPlacerPanel::sCube		= LL_PCODE_CUBE;
-LLPCode LLToolPlacerPanel::sPrism		= LL_PCODE_PRISM;
-LLPCode LLToolPlacerPanel::sPyramid		= LL_PCODE_PYRAMID;
-LLPCode LLToolPlacerPanel::sTetrahedron	= LL_PCODE_TETRAHEDRON;
-LLPCode LLToolPlacerPanel::sCylinder	= LL_PCODE_CYLINDER;
-LLPCode LLToolPlacerPanel::sCylinderHemi= LL_PCODE_CYLINDER_HEMI;
-LLPCode LLToolPlacerPanel::sCone		= LL_PCODE_CONE;
-LLPCode LLToolPlacerPanel::sConeHemi	= LL_PCODE_CONE_HEMI;
-LLPCode LLToolPlacerPanel::sTorus		= LL_PCODE_TORUS;
-LLPCode LLToolPlacerPanel::sSquareTorus = LLViewerObject::LL_VO_SQUARE_TORUS;
-LLPCode LLToolPlacerPanel::sTriangleTorus = LLViewerObject::LL_VO_TRIANGLE_TORUS;
-LLPCode LLToolPlacerPanel::sSphere		= LL_PCODE_SPHERE;
-LLPCode LLToolPlacerPanel::sSphereHemi	= LL_PCODE_SPHERE_HEMI;
-LLPCode LLToolPlacerPanel::sTree		= LL_PCODE_LEGACY_TREE;
-LLPCode LLToolPlacerPanel::sGrass		= LL_PCODE_LEGACY_GRASS;
-
-S32			LLToolPlacerPanel::sButtonsAdded = 0;
-LLButton*	LLToolPlacerPanel::sButtons[ TOOL_PLACER_NUM_BUTTONS ];
-
-LLToolPlacerPanel::LLToolPlacerPanel(const std::string& name, const LLRect& rect)
-	:
-	LLPanel( name, rect )
-{
-	/* DEPRECATED - JC
-	addButton( "UIImgCubeUUID",			"UIImgCubeSelectedUUID",		&LLToolPlacerPanel::sCube );
-	addButton( "UIImgPrismUUID",		"UIImgPrismSelectedUUID",		&LLToolPlacerPanel::sPrism );
-	addButton( "UIImgPyramidUUID",		"UIImgPyramidSelectedUUID",		&LLToolPlacerPanel::sPyramid );
-	addButton( "UIImgTetrahedronUUID",	"UIImgTetrahedronSelectedUUID",	&LLToolPlacerPanel::sTetrahedron );
-	addButton( "UIImgCylinderUUID",		"UIImgCylinderSelectedUUID",	&LLToolPlacerPanel::sCylinder );
-	addButton( "UIImgHalfCylinderUUID",	"UIImgHalfCylinderSelectedUUID",&LLToolPlacerPanel::sCylinderHemi );
-	addButton( "UIImgConeUUID",			"UIImgConeSelectedUUID",		&LLToolPlacerPanel::sCone );
-	addButton( "UIImgHalfConeUUID",		"UIImgHalfConeSelectedUUID",	&LLToolPlacerPanel::sConeHemi );
-	addButton( "UIImgSphereUUID",		"UIImgSphereSelectedUUID",		&LLToolPlacerPanel::sSphere );
-	addButton( "UIImgHalfSphereUUID",	"UIImgHalfSphereSelectedUUID",	&LLToolPlacerPanel::sSphereHemi );
-	addButton( "UIImgTreeUUID",			"UIImgTreeSelectedUUID",		&LLToolPlacerPanel::sTree );
-	addButton( "UIImgGrassUUID",		"UIImgGrassSelectedUUID",		&LLToolPlacerPanel::sGrass );
-	addButton( "ObjectTorusImageID",	"ObjectTorusActiveImageID",		&LLToolPlacerPanel::sTorus );
-	addButton( "ObjectTubeImageID",		"ObjectTubeActiveImageID",		&LLToolPlacerPanel::sSquareTorus );
-	*/
-}
-
-void LLToolPlacerPanel::addButton( const std::string& up_state, const std::string& down_state, LLPCode* pcode )
-{
-	const S32 TOOL_SIZE = 32;
-	const S32 HORIZ_SPACING = TOOL_SIZE + 5;
-	const S32 VERT_SPACING = TOOL_SIZE + 5;
-	const S32 VPAD = 10;
-	const S32 HPAD = 7;
-
-	S32 row = sButtonsAdded / 4;
-	S32 column = sButtonsAdded % 4; 
-
-	LLRect help_rect = gSavedSettings.getRect("ToolHelpRect");
-
-	// Build the rectangle, recalling the origin is at lower left
-	// and we want the icons to build down from the top.
-	LLRect rect;
-	rect.setLeftTopAndSize(
-		HPAD + (column * HORIZ_SPACING),
-		help_rect.mBottom - VPAD - (row * VERT_SPACING),
-		TOOL_SIZE,
-		TOOL_SIZE );
-
-	LLButton* btn = new LLButton(
-		std::string("ToolPlacerOptBtn"),
-		rect,
-		up_state,
-		down_state,
-		LLStringUtil::null, &LLToolPlacerPanel::setObjectType,
-		pcode,
-		LLFontGL::getFontSansSerif());
-	btn->setFollowsBottom();
-	btn->setFollowsLeft();
-	addChild(btn);
-
-	sButtons[sButtonsAdded] = btn;
-	sButtonsAdded++;
-}
-
-// static 
-void	LLToolPlacerPanel::setObjectType( void* data )
-{
-	LLPCode pcode = *(LLPCode*) data;
-	LLToolPlacer::setObjectType( pcode );
-}
diff --git a/indra/newview/lltoolplacer.h b/indra/newview/lltoolplacer.h
index d478f7b1c2..b7422380d4 100644
--- a/indra/newview/lltoolplacer.h
+++ b/indra/newview/lltoolplacer.h
@@ -67,43 +67,4 @@ private:
 	BOOL addDuplicate(S32 x, S32 y);
 };
 
-////////////////////////////////////////////////////
-// LLToolPlacerPanel
-
-
-const S32 TOOL_PLACER_NUM_BUTTONS = 14;
-
-
-class LLToolPlacerPanel : public LLPanel
-{
-public:
-
-	LLToolPlacerPanel(const std::string& name, const LLRect& rect);
- 	
-	static void	setObjectType( void* data );
-
-	static LLPCode sCube;
-	static LLPCode sPrism;
-	static LLPCode sPyramid;
-	static LLPCode sTetrahedron;
-	static LLPCode sCylinder;
-	static LLPCode sCylinderHemi;
-	static LLPCode sCone; 
-	static LLPCode sConeHemi;
-	static LLPCode sTorus;
-	static LLPCode sSquareTorus;
-	static LLPCode sTriangleTorus;
-	static LLPCode sSphere; 
-	static LLPCode sSphereHemi;
-	static LLPCode sTree;
-	static LLPCode sGrass;
-
-private:
-	void		addButton( const std::string& up_state, const std::string& down_state, LLPCode* pcode );
-
-private:
-	static S32			sButtonsAdded;
-	static LLButton*	sButtons[ TOOL_PLACER_NUM_BUTTONS ];
-};
-
 #endif
diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp
index 80e99174c7..23bb5bdd8b 100644
--- a/indra/newview/lltoolselect.cpp
+++ b/indra/newview/lltoolselect.cpp
@@ -52,7 +52,7 @@
 #include "llworld.h"
 
 // Globals
-extern BOOL gAllowSelectAvatar;
+//extern BOOL gAllowSelectAvatar;
 
 const F32 SELECTION_ROTATION_TRESHOLD = 0.1f;
 
@@ -87,7 +87,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
 	BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly");
 	
 	// *NOTE: These settings must be cleaned up at bottom of function.
-	if (temp_select || gAllowSelectAvatar)
+	if (temp_select || LLSelectMgr::getInstance()->mAllowSelectAvatar)
 	{
 		gSavedSettings.setBOOL("SelectOwnedOnly", FALSE);
 		gSavedSettings.setBOOL("SelectMovableOnly", FALSE);
@@ -217,7 +217,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
 	} //if(!object)
 
 	// Cleanup temp select settings above.
-	if (temp_select || gAllowSelectAvatar)
+	if (temp_select ||LLSelectMgr::getInstance()->mAllowSelectAvatar)
 	{
 		gSavedSettings.setBOOL("SelectOwnedOnly", select_owned);
 		gSavedSettings.setBOOL("SelectMovableOnly", select_movable);
diff --git a/indra/newview/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp
index 91223904b7..07c996a84f 100644
--- a/indra/newview/lltoolselectland.cpp
+++ b/indra/newview/lltoolselectland.cpp
@@ -43,7 +43,6 @@
 #include "llfloatertools.h"
 #include "llselectmgr.h"
 #include "llstatusbar.h"
-#include "lltoolview.h"
 #include "llviewerparcelmgr.h"
 #include "llviewerwindow.h"
 
@@ -177,13 +176,13 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
 				roundXY(mEastNorthTop);
 
 				lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (active, land)" << llendl;
-				gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
+				gViewerWindow->setCursor(UI_CURSOR_ARROW);
 			}
 			else
 			{
 				mDragEndValid = FALSE;
 				lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (active, no land)" << llendl;
-				gViewerWindow->getWindow()->setCursor(UI_CURSOR_NO);
+				gViewerWindow->setCursor(UI_CURSOR_NO);
 			}
 
 			mDragEndX = x;
@@ -192,13 +191,13 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
 		else
 		{
 			lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (active, in slop)" << llendl;
-			gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
+			gViewerWindow->setCursor(UI_CURSOR_ARROW);
 		}
 	}
 	else
 	{
 		lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (inactive)" << llendl;		
-		gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
+		gViewerWindow->setCursor(UI_CURSOR_ARROW);
 	}
 
 	return TRUE;
diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp
index d544bff992..f87d1480d7 100644
--- a/indra/newview/lltoolselectrect.cpp
+++ b/indra/newview/lltoolselectrect.cpp
@@ -44,7 +44,6 @@
 #include "llviewercontrol.h"
 #include "llui.h"
 #include "llselectmgr.h"
-#include "lltoolview.h"
 #include "lltoolmgr.h"
 #include "llviewerobject.h"
 #include "llviewerobjectlist.h"
@@ -159,7 +158,7 @@ BOOL LLToolSelectRect::handleHover(S32 x, S32 y, MASK mask)
 		lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectRect (inactive)" << llendl;		
 	}
 
-	gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
+	gViewerWindow->setCursor(UI_CURSOR_ARROW);
 	return TRUE;
 }
 
diff --git a/indra/newview/lltoolview.cpp b/indra/newview/lltoolview.cpp
index 9f6a77d245..f8393ebc47 100644
--- a/indra/newview/lltoolview.cpp
+++ b/indra/newview/lltoolview.cpp
@@ -65,9 +65,9 @@ LLToolContainer::~LLToolContainer()
 
 
 LLToolView::LLToolView(const std::string& name, const LLRect& rect)
-:	LLView(name, rect, MOUSE_OPAQUE),
-	mButtonCount(0)
+:	mButtonCount(0)
 {
+	LLView::init(LLView::Params().name(name).rect(rect).mouse_opaque(true));
 }
 
 
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index d54cc798d2..8e4f637832 100644
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -39,7 +39,7 @@
 #include "llgl.h"
 #include "llrender.h"
 #include "llinventory.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llstring.h"
 #include "lluuid.h"
 #include "v3math.h"
@@ -51,7 +51,6 @@
 #include "lltracker.h"
 #include "llagent.h"
 #include "llcallingcard.h"
-#include "llcolorscheme.h"
 #include "llfloaterworldmap.h"
 #include "llhudtext.h"
 #include "llhudview.h"
@@ -113,12 +112,14 @@ void LLTracker::stopTracking(void* userdata)
 // static virtual
 void LLTracker::drawHUDArrow()
 {
+	static LLCachedControl<LLColor4> map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white);
+	
 	/* tracking autopilot destination has been disabled 
 	   -- 2004.01.09, Leviathan
 	// Draw dot for autopilot target
 	if (gAgent.getAutoPilot())
 	{
-		instance()->drawMarker( gAgent.getAutoPilotTargetGlobal(), gTrackColor );
+		instance()->drawMarker( gAgent.getAutoPilotTargetGlobal(), map_track_color );
 		return;
 	}
 	*/
@@ -128,12 +129,12 @@ void LLTracker::drawHUDArrow()
 		// Tracked avatar
 		if(LLAvatarTracker::instance().haveTrackingInfo())
 		{
-			instance()->drawMarker( LLAvatarTracker::instance().getGlobalPos(), gTrackColor );
+			instance()->drawMarker( LLAvatarTracker::instance().getGlobalPos(), map_track_color );
 		} 
 		break;
 
 	case TRACKING_LANDMARK:
-		instance()->drawMarker( getTrackedPositionGlobal(), gTrackColor );
+		instance()->drawMarker( getTrackedPositionGlobal(), map_track_color );
 		break;
 
 	case TRACKING_LOCATION:
@@ -145,7 +146,7 @@ void LLTracker::drawHUDArrow()
 				+ 0.1f * (LLWorld::getInstance()->resolveLandHeightGlobal(getTrackedPositionGlobal()) + 1.5f);
 #endif
 		instance()->mTrackedPositionGlobal.mdV[VZ] = llclamp((F32)instance()->mTrackedPositionGlobal.mdV[VZ], LLWorld::getInstance()->resolveLandHeightGlobal(getTrackedPositionGlobal()) + 1.5f, (F32)instance()->getTrackedPositionGlobal().mdV[VZ]);
-		instance()->drawMarker( getTrackedPositionGlobal(), gTrackColor );
+		instance()->drawMarker( getTrackedPositionGlobal(), map_track_color );
 		break;
 
 	default:
@@ -161,7 +162,9 @@ void LLTracker::render3D()
 	{
 		return;
 	}
-
+	
+	static LLCachedControl<LLColor4> map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white);
+	
 	// Arbitary location beacon
 	if( instance()->mIsTrackingLocation )
  	{
@@ -181,7 +184,7 @@ void LLTracker::render3D()
 		}
 		else
 		{
-			renderBeacon( instance()->mTrackedPositionGlobal, gTrackColor, 
+			renderBeacon( instance()->mTrackedPositionGlobal, map_track_color, 
 					  	instance()->mBeaconText, instance()->mTrackedLocationName );
 		}
 	}
@@ -223,7 +226,7 @@ void LLTracker::render3D()
 					// and back again
 					instance()->mHasReachedLandmark = FALSE;
 				}
-				renderBeacon( instance()->mTrackedPositionGlobal, gTrackColor, 
+				renderBeacon( instance()->mTrackedPositionGlobal, map_track_color, 
 							  instance()->mBeaconText, instance()->mTrackedLandmarkName );
 			}
 		}
@@ -252,7 +255,7 @@ void LLTracker::render3D()
 			}
 			else
 			{
-				renderBeacon( av_tracker.getGlobalPos(), gTrackColor, 
+				renderBeacon( av_tracker.getGlobalPos(), map_track_color, 
 						  	instance()->mBeaconText, av_tracker.getName() );
 			}
 		}
diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h
index 2850365272..bfe9d6c6b5 100644
--- a/indra/newview/lltracker.h
+++ b/indra/newview/lltracker.h
@@ -40,7 +40,7 @@
 #define LL_LLTRACKER_H
 
 #include "lldarray.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llstring.h"
 #include "lluuid.h"
 #include "v3dmath.h"
diff --git a/indra/newview/lluploaddialog.cpp b/indra/newview/lluploaddialog.cpp
index 7f63972c8d..2fddccfb36 100644
--- a/indra/newview/lluploaddialog.cpp
+++ b/indra/newview/lluploaddialog.cpp
@@ -64,8 +64,7 @@ void LLUploadDialog::modalUploadFinished()
 // Private methods
 
 LLUploadDialog::LLUploadDialog( const std::string& msg)
-	:
-	LLPanel( std::string("Uploading..."), LLRect(0,100,100,0) )  // dummy rect.  Will reshape below.
+  : LLPanel()
 {
 	setBackgroundVisible( TRUE );
 
@@ -75,11 +74,16 @@ LLUploadDialog::LLUploadDialog( const std::string& msg)
 	}
 	LLUploadDialog::sDialog = this;
 
-	const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
+	const LLFontGL* font = LLFontGL::getFontSansSerif();
 	LLRect msg_rect;
 	for (int line_num=0; line_num<16; ++line_num)
 	{
-		mLabelBox[line_num] = new LLTextBox( std::string("Filename"), msg_rect, std::string("Filename"), font );
+		LLTextBox::Params params;
+		params.name("Filename");
+		params.rect(msg_rect);
+		params.text("Filename");
+		params.font(font);
+		mLabelBox[line_num] = LLUICtrlFactory::create<LLTextBox> (params);
 		addChild(mLabelBox[line_num]);
 	}
 
@@ -91,7 +95,7 @@ LLUploadDialog::LLUploadDialog( const std::string& msg)
 
 void LLUploadDialog::setMessage( const std::string& msg)
 {
-	const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
+	const LLFontGL* font = LLFontGL::getFontSansSerif();
 
 	const S32 VPAD = 16;
 	const S32 HPAD = 25;
@@ -139,7 +143,7 @@ void LLUploadDialog::setMessage( const std::string& msg)
 		msg_rect.setOriginAndSize( msg_x, msg_y, max_msg_width, line_height );
 		mLabelBox[line_num]->setRect(msg_rect);
 		mLabelBox[line_num]->setText(cur_line);
-		mLabelBox[line_num]->setColor( gColors.getColor( "LabelTextColor" ) );
+		mLabelBox[line_num]->setColor( gSavedSkinSettings.getColor( "LabelTextColor" ) );
 		mLabelBox[line_num]->setVisible(TRUE);
 		msg_y -= line_height;
 		++line_num;
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index 85ab44bc13..6c8e7e1f69 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -42,6 +42,7 @@
 #include "llfloaterworldmap.h"
 #include "llfloaterhtmlhelp.h"
 #include "llpanellogin.h"
+#include "llslurl.h"
 #include "llstartup.h"			// gStartupState
 #include "llurlsimstring.h"
 #include "llweb.h"
@@ -50,20 +51,9 @@
 // library includes
 #include "llsd.h"
 
-const std::string SLURL_SL_HELP_PREFIX		= "secondlife://app.";
-const std::string SLURL_SL_PREFIX			= "sl://";
-const std::string SLURL_SECONDLIFE_PREFIX	= "secondlife://";
-const std::string SLURL_SLURL_PREFIX		= "http://slurl.com/secondlife/";
-
-const std::string SLURL_APP_TOKEN = "app/";
-
 class LLURLDispatcherImpl
 {
 public:
-	static bool isSLURL(const std::string& url);
-
-	static bool isSLURLCommand(const std::string& url);
-
 	static bool dispatch(const std::string& url,
 						 LLWebBrowserCtrl* web,
 						 bool trusted_browser);
@@ -104,35 +94,9 @@ private:
 		// Called by LLWorldMap when a region name has been resolved to a
 		// location in-world, used by places-panel display.
 
-	static bool matchPrefix(const std::string& url, const std::string& prefix);
-	
-	static std::string stripProtocol(const std::string& url);
-
 	friend class LLTeleportHandler;
 };
 
-// static
-bool LLURLDispatcherImpl::isSLURL(const std::string& url)
-{
-	if (matchPrefix(url, SLURL_SL_HELP_PREFIX)) return true;
-	if (matchPrefix(url, SLURL_SL_PREFIX)) return true;
-	if (matchPrefix(url, SLURL_SECONDLIFE_PREFIX)) return true;
-	if (matchPrefix(url, SLURL_SLURL_PREFIX)) return true;
-	return false;
-}
-
-// static
-bool LLURLDispatcherImpl::isSLURLCommand(const std::string& url)
-{ 
-	if (matchPrefix(url, SLURL_SL_PREFIX + SLURL_APP_TOKEN)
-		|| matchPrefix(url, SLURL_SECONDLIFE_PREFIX + "/" + SLURL_APP_TOKEN)
-		|| matchPrefix(url, SLURL_SLURL_PREFIX + SLURL_APP_TOKEN) )
-	{
-		return true;
-	}
-	return false;
-}
-
 // static
 bool LLURLDispatcherImpl::dispatchCore(const std::string& url,
 									   bool right_mouse,
@@ -178,7 +142,7 @@ bool LLURLDispatcherImpl::dispatchRightClick(const std::string& url)
 bool LLURLDispatcherImpl::dispatchHelp(const std::string& url, bool right_mouse)
 {
 #if LL_LIBXUL_ENABLED
-	if (matchPrefix(url, SLURL_SL_HELP_PREFIX))
+	if (LLSLURL::isURLHelp(url))
 	{
 		gViewerHtmlHelp.show();
 		return true;
@@ -193,7 +157,7 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url,
 									  LLWebBrowserCtrl* web,
 									  bool trusted_browser)
 {
-	if (!isSLURL(url))
+	if (!LLSLURL::isSLURL(url))
 	{
 		return false;
 	}
@@ -211,7 +175,7 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url,
 // static
 bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mouse)
 {
-	if (!isSLURL(url))
+	if (!LLSLURL::isSLURL(url))
 	{
 		return false;
 	}
@@ -230,7 +194,7 @@ bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mous
 		return true;
 	}
 
-	std::string sim_string = stripProtocol(url);
+	std::string sim_string = LLSLURL::stripProtocol(url);
 	std::string region_name;
 	S32 x = 128;
 	S32 y = 128;
@@ -251,7 +215,7 @@ bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mous
 /*static*/
 void LLURLDispatcherImpl::regionNameCallback(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)
 {
-	std::string sim_string = stripProtocol(url);
+	std::string sim_string = LLSLURL::stripProtocol(url);
 	std::string region_name;
 	S32 x = 128;
 	S32 y = 128;
@@ -289,7 +253,7 @@ void LLURLDispatcherImpl::regionNameCallback(U64 region_handle, const std::strin
 /* static */
 void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)
 {
-	std::string sim_string = stripProtocol(url);
+	std::string sim_string = LLSLURL::stripProtocol(url);
 	std::string region_name;
 	S32 x = 128;
 	S32 y = 128;
@@ -316,10 +280,7 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str
 		LLVector3d global_pos = from_region_handle(region_handle);
 		global_pos += LLVector3d(local_pos);
 		gAgent.teleportViaLocation(global_pos);
-		if(gFloaterWorldMap)
-		{
-			gFloaterWorldMap->trackLocation(global_pos);
-		}
+		LLFloaterWorldMap::getInstance()->trackLocation(global_pos);
 	}
 	else
 	{
@@ -337,37 +298,6 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str
 	}
 }
 
-// static
-bool LLURLDispatcherImpl::matchPrefix(const std::string& url, const std::string& prefix)
-{
-	std::string test_prefix = url.substr(0, prefix.length());
-	LLStringUtil::toLower(test_prefix);
-	return test_prefix == prefix;
-}
-
-// static
-std::string LLURLDispatcherImpl::stripProtocol(const std::string& url)
-{
-	std::string stripped = url;
-	if (matchPrefix(stripped, SLURL_SL_HELP_PREFIX))
-	{
-		stripped.erase(0, SLURL_SL_HELP_PREFIX.length());
-	}
-	else if (matchPrefix(stripped, SLURL_SL_PREFIX))
-	{
-		stripped.erase(0, SLURL_SL_PREFIX.length());
-	}
-	else if (matchPrefix(stripped, SLURL_SECONDLIFE_PREFIX))
-	{
-		stripped.erase(0, SLURL_SECONDLIFE_PREFIX.length());
-	}
-	else if (matchPrefix(stripped, SLURL_SLURL_PREFIX))
-	{
-		stripped.erase(0, SLURL_SLURL_PREFIX.length());
-	}
-	return stripped;
-}
-
 //---------------------------------------------------------------------------
 // Teleportation links are handled here because they are tightly coupled
 // to URL parsing and sim-fragment parsing
@@ -390,7 +320,7 @@ public:
 		std::string region_name = LLURLSimString::unescapeRegionName(tokens[0]);
 
 		// build secondlife://De%20Haro/123/45/67 for use in callback
-		std::string url = SLURL_SECONDLIFE_PREFIX;
+		std::string url = LLSLURL::PREFIX_SECONDLIFE;
 		for (int i = 0; i < tokens.size(); ++i)
 		{
 			url += tokens[i].asString() + "/";
@@ -406,18 +336,6 @@ LLTeleportHandler gTeleportHandler;
 
 //---------------------------------------------------------------------------
 
-// static
-bool LLURLDispatcher::isSLURL(const std::string& url)
-{
-	return LLURLDispatcherImpl::isSLURL(url);
-}
-
-// static
-bool LLURLDispatcher::isSLURLCommand(const std::string& url)
-{
-	return LLURLDispatcherImpl::isSLURLCommand(url);
-}
-
 // static
 bool LLURLDispatcher::dispatch(const std::string& url,
 							   LLWebBrowserCtrl* web,
@@ -445,12 +363,3 @@ bool LLURLDispatcher::dispatchFromTextEditor(const std::string& url)
 	LLWebBrowserCtrl* web = NULL;
 	return LLURLDispatcherImpl::dispatch(url, web, trusted_browser);
 }
-
-// static
-std::string LLURLDispatcher::buildSLURL(const std::string& regionname,
-										S32 x, S32 y, S32 z)
-{
-	std::string slurl = SLURL_SLURL_PREFIX + regionname + llformat("/%d/%d/%d",x,y,z); 
-	slurl = LLWeb::escapeURL( slurl );
-	return slurl;
-}
diff --git a/indra/newview/llurldispatcher.h b/indra/newview/llurldispatcher.h
index a4f6866a07..15e3ec73d8 100644
--- a/indra/newview/llurldispatcher.h
+++ b/indra/newview/llurldispatcher.h
@@ -38,12 +38,6 @@ class LLWebBrowserCtrl;
 class LLURLDispatcher
 {
 public:
-	static bool isSLURL(const std::string& url);
-		// Is this any sort of secondlife:// or sl:// URL?
-
-	static bool isSLURLCommand(const std::string& url);
-		// Is this a special secondlife://app/ URL?
-
 	static bool dispatch(const std::string& url,
 						 LLWebBrowserCtrl* web,
 						 bool trusted_browser);
@@ -63,9 +57,6 @@ public:
 	static bool dispatchRightClick(const std::string& url);
 
 	static bool dispatchFromTextEditor(const std::string& url);
-
-	static std::string buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z);
-		//   builds: http://slurl.com/secondlife/RegionName/x/y/z/
 };
 
 #endif
diff --git a/indra/newview/llviewchildren.cpp b/indra/newview/llviewchildren.cpp
index 1a66b24891..842ffc7f9a 100644
--- a/indra/newview/llviewchildren.cpp
+++ b/indra/newview/llviewchildren.cpp
@@ -94,10 +94,10 @@ void LLViewChildren::setBadge(const std::string& id, Badge badge, bool visible)
 		switch (badge)
 		{
 			default:
-			case BADGE_OK:		child->setImage(std::string("badge_ok.j2c"));	break;
-			case BADGE_NOTE:	child->setImage(std::string("badge_note.j2c"));	break;
-			case BADGE_WARN:	child->setImage(std::string("badge_warn.j2c"));	break;
-			case BADGE_ERROR:	child->setImage(std::string("badge_error.j2c"));	break;
+			case BADGE_OK:		child->setValue(std::string("badge_ok.j2c"));	break;
+			case BADGE_NOTE:	child->setValue(std::string("badge_note.j2c"));	break;
+			case BADGE_WARN:	child->setValue(std::string("badge_warn.j2c"));	break;
+			case BADGE_ERROR:	child->setValue(std::string("badge_error.j2c"));	break;
 		}
 	}
 }
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index f54830f39f..a6d4dc1345 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -31,18 +31,12 @@
  */
 
 #include "llviewerprecompiledheaders.h"
-#include "llviewercamera.h"
-
-#include <iomanip> // for setprecision
 
-#include "llquaternion.h"
+#include "llviewercamera.h"
 
+// Viewer includes
 #include "llagent.h"
 #include "llviewercontrol.h"
-#include "lldrawable.h"
-#include "llface.h"
-#include "llgl.h"
-#include "llglheaders.h"
 #include "llviewerobjectlist.h"
 #include "llviewerregion.h"
 #include "llviewerwindow.h"
@@ -51,6 +45,17 @@
 #include "lltoolmgr.h"
 #include "llviewerjoystick.h"
 
+// Linden library includes
+#include "lldrawable.h"
+#include "llface.h"
+#include "llgl.h"
+#include "llglheaders.h"
+#include "llquaternion.h"
+#include "llwindow.h"			// getPixelAspectRatio()
+
+// System includes
+#include <iomanip> // for setprecision
+
 //glu pick matrix implementation borrowed from Mesa3D
 glh::matrix4f gl_pick_matrix(GLfloat x, GLfloat y, GLfloat width, GLfloat height, GLint* viewport)
 {
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index eb8cdd82b3..ed280073ee 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -35,7 +35,8 @@
 
 #include "llviewercontrol.h"
 
-#include "indra_constants.h"
+// Library includes
+#include "llwindow.h"	// getGamma()
 
 // For Listeners
 #include "audioengine.h"
@@ -77,11 +78,11 @@ BOOL 				gHackGodmode = FALSE;
 #endif
 
 
-std::map<std::string, LLControlGroup*> gSettings;
-LLControlGroup gSavedSettings;	// saved at end of session
-LLControlGroup gSavedPerAccountSettings; // saved at end of session
-LLControlGroup gColors;			// read-only
-LLControlGroup gCrashSettings;	// saved at end of session
+LLControlGroup gSavedSettings("Global");	// saved at end of session
+LLControlGroup gSavedSkinSettings("Skinning");	// saved at end of session
+LLControlGroup gSavedPerAccountSettings("PerAccount"); // saved at end of session
+LLControlGroup gCrashSettings("CrashSettings");	// saved at end of session
+LLControlGroup gWarningSettings("Warnings"); // persists ignored dialogs/warnings
 
 std::string gLastRunVersion;
 std::string gCurrentVersion;
@@ -427,6 +428,16 @@ bool handleVectorizeChanged(const LLSD& newvalue)
 	return true;
 }
 
+bool handleHighResSnapshotChanged(const LLSD& newvalue)
+{
+	// High Res Snapshot active, must uncheck RenderUIInSnapshot
+	if (newvalue.asBoolean())
+	{
+		gSavedSettings.setBOOL( "RenderUIInSnapshot", FALSE );
+	}
+	return true;
+}
+
 bool handleVoiceClientPrefsChanged(const LLSD& newvalue)
 {
 	if(gVoiceClient)
@@ -436,214 +447,161 @@ bool handleVoiceClientPrefsChanged(const LLSD& newvalue)
 	return true;
 }
 
+bool handleVelocityInterpolate(const LLSD& newvalue)
+{
+	LLMessageSystem* msg = gMessageSystem;
+	if ( newvalue.asBoolean() )
+	{
+		msg->newMessageFast(_PREHASH_VelocityInterpolateOn);
+		msg->nextBlockFast(_PREHASH_AgentData);
+		msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+		gAgent.sendReliableMessage();
+		llinfos << "Velocity Interpolation On" << llendl;
+	}
+	else
+	{
+		msg->newMessageFast(_PREHASH_VelocityInterpolateOff);
+		msg->nextBlockFast(_PREHASH_AgentData);
+		msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+		gAgent.sendReliableMessage();
+		llinfos << "Velocity Interpolation Off" << llendl;
+	}
+	return true;
+}
+
 ////////////////////////////////////////////////////////////////////////////
 
 void settings_setup_listeners()
 {
-	gSavedSettings.getControl("FirstPersonAvatarVisible")->getSignal()->connect(boost::bind(&handleRenderAvatarMouselookChanged, _1));
-	gSavedSettings.getControl("RenderFarClip")->getSignal()->connect(boost::bind(&handleRenderFarClipChanged, _1));
-	gSavedSettings.getControl("RenderTerrainDetail")->getSignal()->connect(boost::bind(&handleTerrainDetailChanged, _1));
-	gSavedSettings.getControl("RenderAnimateTrees")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1));
-	gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
-	gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
-	gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _1));
-	gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
-	gSavedSettings.getControl("EnableRippleWater")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
-	gSavedSettings.getControl("RenderGlowResolutionPow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _1));
-	gSavedSettings.getControl("RenderAvatarCloth")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
-	gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
-	gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
-	gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _1));
-	gSavedSettings.getControl("RenderAvatarInvisible")->getSignal()->connect(boost::bind(&handleSetSelfInvisible, _1));
-	gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _1));
-	gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _1));
-	gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _1));
-	gSavedSettings.getControl("RenderTreeLODFactor")->getSignal()->connect(boost::bind(&handleTreeLODChanged, _1));
-	gSavedSettings.getControl("RenderFlexTimeFactor")->getSignal()->connect(boost::bind(&handleFlexLODChanged, _1));
-	gSavedSettings.getControl("ThrottleBandwidthKBPS")->getSignal()->connect(boost::bind(&handleBandwidthChanged, _1));
-	gSavedSettings.getControl("RenderGamma")->getSignal()->connect(boost::bind(&handleGammaChanged, _1));
-	gSavedSettings.getControl("RenderFogRatio")->getSignal()->connect(boost::bind(&handleFogRatioChanged, _1));
-	gSavedSettings.getControl("RenderMaxPartCount")->getSignal()->connect(boost::bind(&handleMaxPartCountChanged, _1));
-	gSavedSettings.getControl("RenderDynamicLOD")->getSignal()->connect(boost::bind(&handleRenderDynamicLODChanged, _1));
-	gSavedSettings.getControl("RenderDebugTextureBind")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1));
-	gSavedSettings.getControl("RenderFastAlpha")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1));
-	gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1));
-	gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1));
-	gSavedSettings.getControl("RenderUseFBO")->getSignal()->connect(boost::bind(&handleRenderUseFBOChanged, _1));
-	gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _1));
-	gSavedSettings.getControl("RenderUseImpostors")->getSignal()->connect(boost::bind(&handleRenderUseImpostorsChanged, _1));
-	gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _1));
-	gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _1));
-	gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _1));
-	gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
-	gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _1));
-	gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&handleChatFontSizeChanged, _1));
-	gSavedSettings.getControl("ChatPersistTime")->getSignal()->connect(boost::bind(&handleChatPersistTimeChanged, _1));
-	gSavedSettings.getControl("ConsoleMaxLines")->getSignal()->connect(boost::bind(&handleConsoleMaxLinesChanged, _1));
-	gSavedSettings.getControl("UploadBakedTexOld")->getSignal()->connect(boost::bind(&handleUploadBakedTexOldChanged, _1));
-	gSavedSettings.getControl("UseOcclusion")->getSignal()->connect(boost::bind(&handleUseOcclusionChanged, _1));
-	gSavedSettings.getControl("AudioLevelMaster")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("AudioLevelSFX")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("AudioLevelUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("AudioLevelAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("AudioLevelMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("AudioLevelMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("AudioLevelVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("AudioLevelDistance")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("AudioLevelDoppler")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("AudioLevelRolloff")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("AudioStreamingMusic")->getSignal()->connect(boost::bind(&handleAudioStreamMusicChanged, _1));
-	gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("MuteMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("MuteMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("MuteVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("MuteAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("MuteUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
-	gSavedSettings.getControl("RenderVBOEnable")->getSignal()->connect(boost::bind(&handleRenderUseVBOChanged, _1));
-	gSavedSettings.getControl("WLSkyDetail")->getSignal()->connect(boost::bind(&handleWLSkyDetailChanged, _1));
-	gSavedSettings.getControl("RenderLightingDetail")->getSignal()->connect(boost::bind(&handleRenderLightingDetailChanged, _1));
-	gSavedSettings.getControl("NumpadControl")->getSignal()->connect(boost::bind(&handleNumpadControlChanged, _1));
-	gSavedSettings.getControl("JoystickAxis0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("JoystickAxis1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("JoystickAxis2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("JoystickAxis3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("JoystickAxis4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("JoystickAxis5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("JoystickAxis6")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisScale0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisScale1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisScale2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisScale3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisScale4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisScale5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisScale6")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisDeadZone0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisDeadZone1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisDeadZone2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisDeadZone3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisDeadZone4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisDeadZone5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("FlycamAxisDeadZone6")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisScale0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisScale1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisScale2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisScale3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisScale4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisScale5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisDeadZone0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisDeadZone1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisDeadZone2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisDeadZone3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisDeadZone4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("AvatarAxisDeadZone5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisScale0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisScale1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisScale2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisScale3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisScale4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisScale5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisDeadZone0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisDeadZone1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisDeadZone2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisDeadZone3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisDeadZone4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("BuildAxisDeadZone5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1));
-	gSavedSettings.getControl("DebugViews")->getSignal()->connect(boost::bind(&handleDebugViewsChanged, _1));
-	gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _1));
-	gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _1));
-	gSavedSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _1));
-	gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1));
-	gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1));
-	gSavedSettings.getControl("VectorizeProcessor")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1));
-	gSavedSettings.getControl("VectorizeSkin")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1));
-	gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
-	gSavedSettings.getControl("PTTCurrentlyEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
-	gSavedSettings.getControl("PushToTalkButton")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
-	gSavedSettings.getControl("PushToTalkToggle")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
-	gSavedSettings.getControl("VoiceEarLocation")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
-	gSavedSettings.getControl("VoiceInputAudioDevice")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
-	gSavedSettings.getControl("VoiceOutputAudioDevice")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
-	gSavedSettings.getControl("AudioLevelMic")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
-	gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));	
-}
-
-template <> eControlType get_control_type<U32>(const U32& in, LLSD& out) 
-{ 
-	out = (LLSD::Integer)in; 
-	return TYPE_U32; 
-}
-
-template <> eControlType get_control_type<S32>(const S32& in, LLSD& out) 
-{ 
-	out = in; 
-	return TYPE_S32; 
-}
-
-template <> eControlType get_control_type<F32>(const F32& in, LLSD& out) 
-{ 
-	out = in; 
-	return TYPE_F32; 
-}
-
-template <> eControlType get_control_type<bool> (const bool& in, LLSD& out) 
-{ 
-	out = in; 
-	return TYPE_BOOLEAN; 
-}
-/*
-// Yay BOOL, its really an S32.
-template <> eControlType get_control_type<BOOL> (const BOOL& in, LLSD& out) 
-{ 
-	out = in; 
-	return TYPE_BOOLEAN; 
-}
-*/
-template <> eControlType get_control_type<std::string>(const std::string& in, LLSD& out) 
-{ 
-	out = in; 
-	return TYPE_STRING; 
-}
-
-template <> eControlType get_control_type<LLVector3>(const LLVector3& in, LLSD& out) 
-{ 
-	out = in.getValue(); 
-	return TYPE_VEC3; 
-}
-
-template <> eControlType get_control_type<LLVector3d>(const LLVector3d& in, LLSD& out) 
-{ 
-	out = in.getValue(); 
-	return TYPE_VEC3D; 
-}
-
-template <> eControlType get_control_type<LLRect>(const LLRect& in, LLSD& out) 
-{ 
-	out = in.getValue(); 
-	return TYPE_RECT; 
-}
-
-template <> eControlType get_control_type<LLColor4>(const LLColor4& in, LLSD& out) 
-{ 
-	out = in.getValue(); 
-	return TYPE_COL4; 
-}
-
-template <> eControlType get_control_type<LLColor3>(const LLColor3& in, LLSD& out) 
-{ 
-	out = in.getValue(); 
-	return TYPE_COL3; 
-}
-
-template <> eControlType get_control_type<LLColor4U>(const LLColor4U& in, LLSD& out) 
-{ 
-	out = in.getValue();
-	return TYPE_COL4U; 
-}
-
-template <> eControlType get_control_type<LLSD>(const LLSD& in, LLSD& out) 
-{ 
-	out = in;
-	return TYPE_LLSD; 
+	gSavedSettings.getControl("FirstPersonAvatarVisible")->getSignal()->connect(boost::bind(&handleRenderAvatarMouselookChanged, _2));
+	gSavedSettings.getControl("RenderFarClip")->getSignal()->connect(boost::bind(&handleRenderFarClipChanged, _2));
+	gSavedSettings.getControl("RenderTerrainDetail")->getSignal()->connect(boost::bind(&handleTerrainDetailChanged, _2));
+	gSavedSettings.getControl("RenderAnimateTrees")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
+	gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
+	gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
+	gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
+	gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
+	gSavedSettings.getControl("EnableRippleWater")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
+	gSavedSettings.getControl("RenderGlowResolutionPow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
+	gSavedSettings.getControl("RenderAvatarCloth")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
+	gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
+	gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
+	gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _2));
+	gSavedSettings.getControl("RenderAvatarInvisible")->getSignal()->connect(boost::bind(&handleSetSelfInvisible, _2));
+	gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _2));
+	gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _2));
+	gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _2));
+	gSavedSettings.getControl("RenderTreeLODFactor")->getSignal()->connect(boost::bind(&handleTreeLODChanged, _2));
+	gSavedSettings.getControl("RenderFlexTimeFactor")->getSignal()->connect(boost::bind(&handleFlexLODChanged, _2));
+	gSavedSettings.getControl("ThrottleBandwidthKBPS")->getSignal()->connect(boost::bind(&handleBandwidthChanged, _2));
+	gSavedSettings.getControl("RenderGamma")->getSignal()->connect(boost::bind(&handleGammaChanged, _2));
+	gSavedSettings.getControl("RenderFogRatio")->getSignal()->connect(boost::bind(&handleFogRatioChanged, _2));
+	gSavedSettings.getControl("RenderMaxPartCount")->getSignal()->connect(boost::bind(&handleMaxPartCountChanged, _2));
+	gSavedSettings.getControl("RenderDynamicLOD")->getSignal()->connect(boost::bind(&handleRenderDynamicLODChanged, _2));
+	gSavedSettings.getControl("RenderDebugTextureBind")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
+	gSavedSettings.getControl("RenderFastAlpha")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
+	gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
+	gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
+	gSavedSettings.getControl("RenderUseFBO")->getSignal()->connect(boost::bind(&handleRenderUseFBOChanged, _2));
+	gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
+	gSavedSettings.getControl("RenderUseImpostors")->getSignal()->connect(boost::bind(&handleRenderUseImpostorsChanged, _2));
+	gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _2));
+	gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _2));
+	gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _2));
+	gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
+	gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _2));
+	gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&handleChatFontSizeChanged, _2));
+	gSavedSettings.getControl("ChatPersistTime")->getSignal()->connect(boost::bind(&handleChatPersistTimeChanged, _2));
+	gSavedSettings.getControl("ConsoleMaxLines")->getSignal()->connect(boost::bind(&handleConsoleMaxLinesChanged, _2));
+	gSavedSettings.getControl("UploadBakedTexOld")->getSignal()->connect(boost::bind(&handleUploadBakedTexOldChanged, _2));
+	gSavedSettings.getControl("UseOcclusion")->getSignal()->connect(boost::bind(&handleUseOcclusionChanged, _2));
+	gSavedSettings.getControl("AudioLevelMaster")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("AudioLevelSFX")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("AudioLevelUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("AudioLevelAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("AudioLevelMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("AudioLevelMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("AudioLevelVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("AudioLevelDistance")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("AudioLevelDoppler")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("AudioLevelRolloff")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("AudioStreamingMusic")->getSignal()->connect(boost::bind(&handleAudioStreamMusicChanged, _2));
+	gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("MuteMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("MuteMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("MuteVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("MuteAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("MuteUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
+	gSavedSettings.getControl("RenderVBOEnable")->getSignal()->connect(boost::bind(&handleRenderUseVBOChanged, _2));
+	gSavedSettings.getControl("WLSkyDetail")->getSignal()->connect(boost::bind(&handleWLSkyDetailChanged, _2));
+	gSavedSettings.getControl("RenderLightingDetail")->getSignal()->connect(boost::bind(&handleRenderLightingDetailChanged, _2));
+	gSavedSettings.getControl("NumpadControl")->getSignal()->connect(boost::bind(&handleNumpadControlChanged, _2));
+	gSavedSettings.getControl("JoystickAxis0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("JoystickAxis1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("JoystickAxis2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("JoystickAxis3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("JoystickAxis4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("JoystickAxis5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("JoystickAxis6")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisScale0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisScale1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisScale2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisScale3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisScale4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisScale5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisScale6")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisDeadZone0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisDeadZone1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisDeadZone2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisDeadZone3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisDeadZone4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisDeadZone5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("FlycamAxisDeadZone6")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisScale0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisScale1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisScale2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisScale3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisScale4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisScale5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisDeadZone0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisDeadZone1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisDeadZone2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisDeadZone3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisDeadZone4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("AvatarAxisDeadZone5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisScale0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisScale1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisScale2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisScale3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisScale4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisScale5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisDeadZone0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisDeadZone1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisDeadZone2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisDeadZone3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisDeadZone4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("BuildAxisDeadZone5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _2));
+	gSavedSettings.getControl("DebugViews")->getSignal()->connect(boost::bind(&handleDebugViewsChanged, _2));
+	gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _2));
+	gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _2));
+	gSavedSkinSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _2));
+	gSavedSettings.getControl("HighResSnapshot")->getSignal()->connect(boost::bind(handleHighResSnapshotChanged, _2));
+	gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
+	gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
+	gSavedSettings.getControl("VectorizeProcessor")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
+	gSavedSettings.getControl("VectorizeSkin")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
+	gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
+	gSavedSettings.getControl("PTTCurrentlyEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
+	gSavedSettings.getControl("PushToTalkButton")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
+	gSavedSettings.getControl("PushToTalkToggle")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
+	gSavedSettings.getControl("VoiceEarLocation")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
+	gSavedSettings.getControl("VoiceInputAudioDevice")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
+	gSavedSettings.getControl("VoiceOutputAudioDevice")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
+	gSavedSettings.getControl("AudioLevelMic")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
+	gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));	
+	gSavedSettings.getControl("VelocityInterpolate")->getSignal()->connect(boost::bind(&handleVelocityInterpolate, _2));
 }
 
 
diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h
index d0dc80cb9a..3271e5fe9b 100644
--- a/indra/newview/llviewercontrol.h
+++ b/indra/newview/llviewercontrol.h
@@ -47,17 +47,14 @@ extern BOOL gHackGodmode;
 //setting variables are declared in this function
 void settings_setup_listeners();
 
-extern std::map<std::string, LLControlGroup*> gSettings;
-
 // for the graphics settings
 void create_graphics_group(LLControlGroup& group);
 
 // saved at end of session
 extern LLControlGroup gSavedSettings;
+extern LLControlGroup gSavedSkinSettings;
 extern LLControlGroup gSavedPerAccountSettings;
-
-// Read-only
-extern LLControlGroup gColors;
+extern LLControlGroup gWarningSettings;
 
 // Saved at end of session
 extern LLControlGroup gCrashSettings;
@@ -66,114 +63,5 @@ extern LLControlGroup gCrashSettings;
 extern std::string gLastRunVersion;
 extern std::string gCurrentVersion;
 
-//! Helper function for LLCachedControl
-template <class T> 
-eControlType get_control_type(const T& in, LLSD& out)
-{
-	llerrs << "Usupported control type: " << typeid(T).name() << "." << llendl;
-	return TYPE_COUNT;
-}
-
-//! Publish/Subscribe object to interact with LLControlGroups.
-
-//! An LLCachedControl instance to connect to a LLControlVariable
-//! without have to manually create and bind a listener to a local
-//! object.
-template <class T>
-class LLCachedControl
-{
-    T mCachedValue;
-    LLPointer<LLControlVariable> mControl;
-    boost::signals::connection mConnection;
-
-public:
-	LLCachedControl(const std::string& name, 
-					const T& default_value, 
-					const std::string& comment = "Declared In Code")
-	{
-		mControl = gSavedSettings.getControl(name);
-		if(mControl.isNull())
-		{
-			declareTypedControl(gSavedSettings, name, default_value, comment);
-			mControl = gSavedSettings.getControl(name);
-			if(mControl.isNull())
-			{
-				llerrs << "The control could not be created!!!" << llendl;
-			}
-
-			mCachedValue = default_value;
-		}
-		else
-		{
-			mCachedValue = (const T&)mControl->getValue();
-		}
-
-		// Add a listener to the controls signal...
-		mControl->getSignal()->connect(
-			boost::bind(&LLCachedControl<T>::handleValueChange, this, _1)
-			);
-	}
-
-	~LLCachedControl()
-	{
-		if(mConnection.connected())
-		{
-			mConnection.disconnect();
-		}
-	}
-
-	LLCachedControl& operator =(const T& newvalue)
-	{
-	   setTypeValue(*mControl, newvalue);
-	}
-
-	operator const T&() { return mCachedValue; }
-
-private:
-	void declareTypedControl(LLControlGroup& group, 
-							 const std::string& name, 
-							 const T& default_value,
-							 const std::string& comment)
-	{
-		LLSD init_value;
-		eControlType type = get_control_type<T>(default_value, init_value);
-		if(type < TYPE_COUNT)
-		{
-			group.declareControl(name, type, init_value, comment, FALSE);
-		}
-	}
-
-	bool handleValueChange(const LLSD& newvalue)
-	{
-		mCachedValue = (const T &)newvalue;
-		return true;
-	}
-
-	void setTypeValue(LLControlVariable& c, const T& v)
-	{
-		// Implicit conversion from T to LLSD...
-		c.set(v);
-	}
-};
-
-template <> eControlType get_control_type<U32>(const U32& in, LLSD& out);
-template <> eControlType get_control_type<S32>(const S32& in, LLSD& out);
-template <> eControlType get_control_type<F32>(const F32& in, LLSD& out);
-template <> eControlType get_control_type<bool> (const bool& in, LLSD& out); 
-// Yay BOOL, its really an S32.
-//template <> eControlType get_control_type<BOOL> (const BOOL& in, LLSD& out) 
-template <> eControlType get_control_type<std::string>(const std::string& in, LLSD& out);
-template <> eControlType get_control_type<LLVector3>(const LLVector3& in, LLSD& out);
-template <> eControlType get_control_type<LLVector3d>(const LLVector3d& in, LLSD& out); 
-template <> eControlType get_control_type<LLRect>(const LLRect& in, LLSD& out);
-template <> eControlType get_control_type<LLColor4>(const LLColor4& in, LLSD& out);
-template <> eControlType get_control_type<LLColor3>(const LLColor3& in, LLSD& out);
-template <> eControlType get_control_type<LLColor4U>(const LLColor4U& in, LLSD& out); 
-template <> eControlType get_control_type<LLSD>(const LLSD& in, LLSD& out);
-
-//#define TEST_CACHED_CONTROL 1
-#ifdef TEST_CACHED_CONTROL
-void test_cached_control();
-#endif // TEST_CACHED_CONTROL
 
 #endif // LL_LLVIEWERCONTROL_H
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 54c6f0a71f..e3f70db238 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -46,10 +46,10 @@
 #include "lldrawpoolalpha.h"
 #include "llfeaturemanager.h"
 #include "llfirstuse.h"
-#include "llframestats.h"
 #include "llhudmanager.h"
 #include "llimagebmp.h"
 #include "llimagegl.h"
+#include "llmemory.h"
 #include "llselectmgr.h"
 #include "llsky.h"
 #include "llstartup.h"
@@ -58,6 +58,7 @@
 #include "lltooldraganddrop.h"
 #include "lltoolpie.h"
 #include "lltracker.h"
+#include "lltrans.h"
 #include "llui.h"
 #include "llviewercamera.h"
 #include "llviewerobjectlist.h"
@@ -199,7 +200,7 @@ void display_stats()
 	F32 mem_log_freq = gSavedSettings.getF32("MemoryLogFrequency");
 	if (mem_log_freq > 0.f && gRecentMemoryTime.getElapsedTimeF32() >= mem_log_freq)
 	{
-		gMemoryAllocated = getCurrentRSS();
+		gMemoryAllocated = LLMemory::getCurrentRSS();
 		U32 memory = (U32)(gMemoryAllocated / (1024*1024));
 		llinfos << llformat("MEMORY: %d MB", memory) << llendl;
 		gRecentMemoryTime.reset();
@@ -238,7 +239,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 		// Clean up memory the pools may have allocated
 		if (rebuild)
 		{
-			gFrameStats.start(LLFrameStats::REBUILD);
 			gPipeline.rebuildPools();
 		}
 
@@ -299,7 +299,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 	//
 
 	LLAppViewer::instance()->pingMainloopTimeout("Display:TextureStats");
-	gFrameStats.start(LLFrameStats::UPDATE_TEX_STATS);
 	stop_glerror();
 
 	LLImageGL::updateStats(gFrameTimeSeconds);
@@ -369,7 +368,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 		case LLAgent::TELEPORT_START_ARRIVAL:
 			// Transition to ARRIVING.  Viewer has received avatar update, etc., from destination simulator
 			gTeleportArrivalTimer.reset();
-			gViewerWindow->setProgressCancelButtonVisible(FALSE, std::string("Cancel")); //TODO: Translate
+				gViewerWindow->setProgressCancelButtonVisible(FALSE, LLTrans::getString("Cancel"));
 			gViewerWindow->setProgressPercent(75.f);
 			gAgent.setTeleportState( LLAgent::TELEPORT_ARRIVING );
 			gAgent.setTeleportMessage(
@@ -388,7 +387,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 					LLFirstUse::useTeleport();
 					gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
 				}
-				gViewerWindow->setProgressCancelButtonVisible(FALSE, std::string("Cancel")); //TODO: Translate
+				gViewerWindow->setProgressCancelButtonVisible(FALSE, LLTrans::getString("Cancel"));
 				gViewerWindow->setProgressPercent(  arrival_fraction * 25.f + 75.f);
 				gViewerWindow->setProgressString(message);
 			}
@@ -527,13 +526,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 		LLHUDObject::updateAll();
 		stop_glerror();
 		
-		gFrameStats.start(LLFrameStats::UPDATE_GEOM);
 		const F32 max_geom_update_time = 0.005f*10.f*gFrameIntervalSeconds; // 50 ms/second update time
 		gPipeline.createObjects(max_geom_update_time);
 		gPipeline.updateGeom(max_geom_update_time);
 		stop_glerror();
 		
-		gFrameStats.start(LLFrameStats::UPDATE_CULL);
 		S32 water_clip = 0;
 		if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT) > 1) &&
 			 gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_WATER))
@@ -664,7 +661,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 		LLAppViewer::instance()->pingMainloopTimeout("Display:UpdateImages");
 		LLError::LLCallStacks::clear() ;
 		llpushcallstacks ;
-		gFrameStats.start(LLFrameStats::IMAGE_UPDATE);
 
 		{
 			LLFastTimer t(LLFastTimer::FTM_IMAGE_UPDATE);
@@ -689,7 +685,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 		//
 		LLAppViewer::instance()->pingMainloopTimeout("Display:StateSort");
 		{
-			gFrameStats.start(LLFrameStats::STATE_SORT);
 			gPipeline.stateSort(*LLViewerCamera::getInstance(), result);
 			stop_glerror();
 				
@@ -700,7 +695,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 				// rebuildPools
 				//
 				//
-				gFrameStats.start(LLFrameStats::REBUILD);
 				gPipeline.rebuildPools();
 				stop_glerror();
 			}
@@ -736,7 +730,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 		//		glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE);
 		//		glLoadIdentity();
 
-		//		LLRect floater_rect = frontmost_floaterp->getScreenRect();
+		//		LLRect floater_rect = frontmost_floaterp->calcScreenRect();
 		//		// deflate by one pixel so rounding errors don't occlude outside of floater extents
 		//		floater_rect.stretch(-1);
 		//		LLRectf floater_3d_rect((F32)floater_rect.mLeft / (F32)gViewerWindow->getWindowWidth(), 
@@ -839,16 +833,15 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 		LLAppViewer::instance()->pingMainloopTimeout("Display:RenderUI");
 		if (!for_snapshot)
 		{
-			gFrameStats.start(LLFrameStats::RENDER_UI);
+			LLFastTimer t(LLFastTimer::FTM_RENDER_UI);
 			render_ui();
 		}
 
 		LLSpatialGroup::sNoDelete = FALSE;
 	}
-	
+
 	LLAppViewer::instance()->pingMainloopTimeout("Display:FrameStats");
 	
-	gFrameStats.start(LLFrameStats::MISC_END);
 	stop_glerror();
 
 	if (LLPipeline::sRenderFrameTest)
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
new file mode 100644
index 0000000000..95fd896138
--- /dev/null
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -0,0 +1,95 @@
+/** 
+ * @file llviewerfloaterreg.cpp
+ * @brief LLViewerFloaterReg class registers floaters used in the viewer
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ * 
+ * Copyright (c) 2007-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterreg.h"
+
+#include "llviewerfloaterreg.h"
+
+#include "llcompilequeue.h"
+#include "llfloateravatarinfo.h"
+#include "llfloaterchat.h"
+#include "llfloaterchatterbox.h"
+#include "llfloaterdirectory.h"
+#include "llfloaterjoystick.h"
+#include "llfloatermap.h"
+#include "llfloatermemleak.h"
+#include "llfloaterpreference.h"
+#include "llfloatersnapshot.h"
+#include "llfloatertools.h"
+#include "llfloaterworldmap.h"
+#include "llinventoryview.h"
+
+#include "llpreviewanim.h"
+#include "llpreviewgesture.h"
+#include "llpreviewlandmark.h"
+#include "llpreviewnotecard.h"
+#include "llpreviewscript.h"
+#include "llpreviewsound.h"
+#include "llpreviewtexture.h"
+
+void LLViewerFloaterReg::registerFloaters()
+{
+	LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
+	LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>);
+	LLFloaterReg::add("search", "floater_directory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDirectory>);
+	LLFloaterReg::add("build", "floater_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTools>);
+	LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>);
+	LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMap>);
+	LLFloaterReg::add("inventory", "floater_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLInventoryView>);
+
+	LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterJoystick>);
+
+	LLFloaterReg::add("communicate", "floater_chatterbox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChatterBox>);
+	LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChat>);
+	LLFloaterReg::add("contacts", "floater_my_friends.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMyFriends>);
+	
+	LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
+	LLFloaterReg::add("reset_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterResetQueue>);
+	LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>);
+	LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
+	
+	LLFloaterReg::add("preview_avatar", "floater_profile.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarInfo>);
+	
+	LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewAnim>, "preview");
+	LLFloaterReg::add("preview_gesture", "floater_preview_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewGesture>, "preview");
+	LLFloaterReg::add("preview_landmark", "floater_preview_existing_landmark.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewLandmark>, "preview");
+	LLFloaterReg::add("preview_notecard", "floater_preview_notecard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewNotecard>, "preview");
+	LLFloaterReg::add("preview_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewLSL>, "preview");
+	LLFloaterReg::add("preview_scriptedit", "floater_live_lsleditor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLLiveLSLEditor>, "preview");
+	LLFloaterReg::add("preview_sound", "floater_preview_sound.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewSound>, "preview");
+	LLFloaterReg::add("preview_texture", "floater_preview_texture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewTexture>, "preview");
+	
+	LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
+}
diff --git a/indra/newview/llviewerfloaterreg.h b/indra/newview/llviewerfloaterreg.h
new file mode 100644
index 0000000000..08c9589ebb
--- /dev/null
+++ b/indra/newview/llviewerfloaterreg.h
@@ -0,0 +1,43 @@
+/** 
+ * @file llviewerfloaterreg.h
+ * @brief The LLViewerFloaterReg class declaration
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ * 
+ * Copyright (c) 2007-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLVIEWERFLOATERREG_H
+#define LL_LLVIEWERFLOATERREG_H
+
+class LLViewerFloaterReg
+{
+public:
+	static void registerFloaters();
+};
+
+
+#endif // LL_LLVIEWERFLOATERREG_H
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 7f1f0fe6d0..52c49dd05d 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -50,6 +50,7 @@
 #include "llviewerobjectlist.h"
 #include "llpreviewgesture.h"
 #include "llviewerwindow.h"
+#include "lltrans.h"
 
 ///----------------------------------------------------------------------------
 /// Local function declarations, constants, enums, and typedefs
@@ -684,12 +685,9 @@ void CreateGestureCallback::fire(const LLUUID& inv_item)
     gInventory.updateItem(item);
     gInventory.notifyObservers();
 
-	if(!LLPreview::show(inv_item,FALSE))
-	{
-		LLPreviewGesture* preview = LLPreviewGesture::show(std::string("Gesture: ") + item->getName(), inv_item,  LLUUID::null);
-		// Force to be entirely onscreen.
-		gFloaterView->adjustToFitScreen(preview, FALSE);
-	}
+	LLPreviewGesture* preview = LLPreviewGesture::show(inv_item,  LLUUID::null);
+	// Force to be entirely onscreen.
+	gFloaterView->adjustToFitScreen(preview, FALSE);
 }
 
 LLInventoryCallbackManager gInventoryCallbacks;
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index 15c814829c..bbcb6240b6 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -224,7 +224,7 @@ void agent_toggle_fly( EKeystate s )
 	// Only catch the edge
 	if (KEYSTATE_DOWN == s )
 	{
-		gAgent.toggleFlying();
+		LLAgent::toggleFlying();
 	}
 }
 
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 70fc78d277..c2724b7cdd 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -553,7 +553,7 @@ void LLViewerMedia::buildMediaManagerData( LLMediaManagerData* init_data )
 	// Users can change skins while client is running, so make sure
 	// we pick up on changes.
 	gSavedSettings.getControl("SkinCurrent")->getSignal()->connect( 
-		boost::bind( LLViewerMediaImpl::handleSkinCurrentChanged, _1 ) );
+		boost::bind( LLViewerMediaImpl::handleSkinCurrentChanged, _2 ) );
 
 }
 
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index a50ff1df9f..0abdaff4b6 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1,5 +1,4 @@
-
-/** 
+ /** 
  * @file llviewermenu.cpp
  * @brief Builds menus out of items.
  *
@@ -42,9 +41,11 @@
 
 // linden library includes
 #include "audioengine.h"
+#include "llfloaterreg.h"
 #include "indra_constants.h"
 #include "llassetstorage.h"
 #include "llchat.h"
+#include "llcombobox.h"
 #include "llfeaturemanager.h"
 #include "llfocusmgr.h"
 #include "llfontgl.h"
@@ -99,7 +100,6 @@
 #include "llfloatercustomize.h"
 #include "llfloaterdaycycle.h"
 #include "llfloaterdirectory.h"
-#include "llfloatereditui.h"
 #include "llfloaterchatterbox.h"
 #include "llfloaterfriends.h"
 #include "llfloaterfonttest.h"
@@ -120,7 +120,6 @@
 #include "llfloatermap.h"
 #include "llfloatermute.h"
 #include "llfloateropenobject.h"
-#include "llfloaterpermissionsmgr.h"
 #include "llfloaterperms.h"
 #include "llfloaterpostprocess.h"
 #include "llfloaterpreference.h"
@@ -129,15 +128,11 @@
 #include "llfloaterscriptdebug.h"
 #include "llfloatersettingsdebug.h"
 #include "llfloaterenvsettings.h"
-#include "llfloaterstats.h"
-#include "llfloatertest.h"
 #include "llfloatertools.h"
 #include "llfloaterwater.h"
 #include "llfloaterwindlight.h"
 #include "llfloaterworldmap.h"
 #include "llfloatermemleak.h"
-#include "llframestats.h"
-#include "llframestatview.h"
 #include "llfasttimerview.h"
 #include "llmemoryview.h"
 #include "llgivemoney.h"
@@ -178,19 +173,18 @@
 #include "lltoolgrab.h"
 #include "lltoolmgr.h"
 #include "lltoolpie.h"
-#include "lltoolplacer.h"
 #include "lltoolselectland.h"
+#include "lltrans.h"
 #include "lluictrlfactory.h"
 #include "lluploaddialog.h"
 #include "lluserauth.h"
 #include "lluuid.h"
-#include "llvelocitybar.h"
 #include "llviewercamera.h"
 #include "llviewergenericmessage.h"
 #include "llviewergesture.h"
 #include "llviewerimagelist.h"	// gImageList
 #include "llviewerinventory.h"
-#include "llviewermenufile.h"	// init_menu_file()
+#include "llviewermenufile.h"// init_menu_file()
 #include "llviewermessage.h"
 #include "llviewernetwork.h"
 #include "llviewerobjectlist.h"
@@ -216,15 +210,6 @@
 #include "lltexlayer.h"
 
 using namespace LLVOAvatarDefines;
-void init_client_menu(LLMenuGL* menu);
-void init_server_menu(LLMenuGL* menu);
-
-void init_debug_world_menu(LLMenuGL* menu);
-void init_debug_rendering_menu(LLMenuGL* menu);
-void init_debug_ui_menu(LLMenuGL* menu);
-void init_debug_xui_menu(LLMenuGL* menu);
-void init_debug_avatar_menu(LLMenuGL* menu);
-void init_debug_baked_texture_menu(LLMenuGL* menu);
 
 BOOL enable_land_build(void*);
 BOOL enable_object_build(void*);
@@ -236,13 +221,14 @@ void handle_test_load_url(void*);
 
 //
 // Evil hackish imported globals
-//
-extern BOOL	gRenderLightGlows;
-extern BOOL gRenderAvatar;
-extern BOOL	gHideSelectedObjects;
-extern BOOL gShowOverlayTitle;
-extern BOOL gOcclusionCull;
-extern BOOL gAllowSelectAvatar;
+
+//extern BOOL	gHideSelectedObjects;
+//extern BOOL gAllowSelectAvatar;
+//extern BOOL gDebugAvatarRotation;
+extern BOOL gDebugClicks;
+extern BOOL gDebugWindowProc;
+//extern BOOL gDebugTextEditorTips;
+//extern BOOL gDebugSelectMgr;
 
 //
 // Globals
@@ -254,15 +240,11 @@ LLMenuGL		*gPopupMenuView = NULL;
 LLMenuBarGL		*gLoginMenuBarView = NULL;
 
 // Pie menus
-LLPieMenu	*gPieSelf	= NULL;
-LLPieMenu	*gPieAvatar = NULL;
-LLPieMenu	*gPieObject = NULL;
-LLPieMenu	*gPieAttachment = NULL;
-LLPieMenu	*gPieLand	= NULL;
-
-// local constants
-const std::string CLIENT_MENU_NAME("Advanced");
-const std::string SERVER_MENU_NAME("Admin");
+LLContextMenu	*gPieSelf	= NULL;
+LLContextMenu	*gPieAvatar = NULL;
+LLContextMenu	*gPieObject = NULL;
+LLContextMenu	*gPieAttachment = NULL;
+LLContextMenu	*gPieLand	= NULL;
 
 const std::string SAVE_INTO_INVENTORY("Save Object Back to My Inventory");
 const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents");
@@ -270,27 +252,24 @@ const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"
 LLMenuGL* gAttachSubMenu = NULL;
 LLMenuGL* gDetachSubMenu = NULL;
 LLMenuGL* gTakeOffClothes = NULL;
-LLPieMenu* gPieRate = NULL;
-LLPieMenu* gAttachScreenPieMenu = NULL;
-LLPieMenu* gAttachPieMenu = NULL;
-LLPieMenu* gAttachBodyPartPieMenus[8];
-LLPieMenu* gDetachPieMenu = NULL;
-LLPieMenu* gDetachScreenPieMenu = NULL;
-LLPieMenu* gDetachBodyPartPieMenus[8];
+LLContextMenu* gPieRate = NULL;
+LLContextMenu* gAttachScreenPieMenu = NULL;
+LLContextMenu* gAttachPieMenu = NULL;
+LLContextMenu* gAttachBodyPartPieMenus[8];
+LLContextMenu* gDetachPieMenu = NULL;
+LLContextMenu* gDetachScreenPieMenu = NULL;
+LLContextMenu* gDetachBodyPartPieMenus[8];
 
 LLMenuItemCallGL* gAFKMenu = NULL;
 LLMenuItemCallGL* gBusyMenu = NULL;
 
-typedef LLMemberListener<LLView> view_listener_t;
-
 //
 // Local prototypes
-//
-void handle_leave_group(void *);
 
 // File Menu
+const char* upload_pick(void* data);
 void handle_compress_image(void*);
-BOOL enable_save_as(void *);
+
 
 // Edit menu
 void handle_dump_group_info(void *);
@@ -305,7 +284,7 @@ void handle_region_clear_temp_asset_data(void*);
 BOOL sitting_on_selection();
 
 void near_sit_object();
-void label_sit_or_stand(std::string& label, void*);
+//void label_sit_or_stand(std::string& label, void*);
 // buy and take alias into the same UI positions, so these
 // declarations handle this mess.
 BOOL is_selection_buy_not_take();
@@ -317,51 +296,31 @@ BOOL enable_buy(void*);
 void handle_buy(void *);
 void handle_buy_object(LLSaleInfo sale_info);
 void handle_buy_contents(LLSaleInfo sale_info);
-void label_touch(std::string& label, void*);
 
 // Land pie menu
 void near_sit_down_point(BOOL success, void *);
 
 // Avatar pie menu
-void handle_follow(void *userdata);
-void handle_talk_to(void *userdata);
 
 // Debug menu
-void show_permissions_control(void*);
-void toggle_build_options(void* user_data);
-void reload_ui(void*);
-void handle_agent_stop_moving(void*);
-void print_packets_lost(void*);
-void drop_packet(void*);
-void velocity_interpolate( void* data );
-void toggle_wind_audio(void);
-void toggle_water_audio(void);
+
+
+void velocity_interpolate( void* );
+
 void handle_rebake_textures(void*);
 BOOL check_admin_override(void*);
 void handle_admin_override_toggle(void*);
 #ifdef TOGGLE_HACKED_GODLIKE_VIEWER
 void handle_toggle_hacked_godmode(void*);
 BOOL check_toggle_hacked_godmode(void*);
+bool enable_toggle_hacked_godmode(void*);
 #endif
 
-void toggle_glow(void *);
-BOOL check_glow(void *);
-
-void toggle_vertex_shaders(void *);
-BOOL check_vertex_shaders(void *);
-
-void toggle_cull_small(void *);
-
 void toggle_show_xui_names(void *);
 BOOL check_show_xui_names(void *);
 
-void run_vectorize_perf_test(void *)
-{
-	gSavedSettings.setBOOL("VectorizePerfTest", TRUE);
-}
-
 // Debug UI
-void handle_web_search_demo(void*);
+
 void handle_web_browser_test(void*);
 void handle_buy_currency_test(void*);
 void handle_save_to_xml(void*);
@@ -372,16 +331,12 @@ void handle_god_mode(void*);
 // God menu
 void handle_leave_god_mode(void*);
 
-BOOL is_inventory_visible( void* user_data );
+
 void handle_reset_view();
 
-void disabled_duplicate(void*);
 void handle_duplicate_in_place(void*);
-void handle_repeat_duplicate(void*);
 
-void handle_export(void*);
-// void handle_deed_object_to_group(void*);
-// BOOL enable_deed_object_to_group(void*);
+
 void handle_object_owner_self(void*);
 void handle_object_owner_permissive(void*);
 void handle_object_lock(void*);
@@ -396,11 +351,8 @@ void handle_force_parcel_owner_to_me(void*);
 void handle_force_parcel_to_content(void*);
 void handle_claim_public_land(void*);
 
-void handle_god_request_havok(void *);
 void handle_god_request_avatar_geometry(void *);	// Hack for easy testing of new avatar geometry
-void reload_personal_settings_overrides(void *);
 void reload_vertex_shader(void *);
-void slow_mo_animations(void *);
 void handle_disconnect_viewer(void *);
 
 void force_error_breakpoint(void *);
@@ -410,25 +362,13 @@ void force_error_infinite_loop(void *);
 void force_error_software_exception(void *);
 void force_error_driver_crash(void *);
 
-void handle_stopall(void*);
-//void handle_hinge(void*);
-//void handle_ptop(void*);
-//void handle_lptop(void*);
-//void handle_wheel(void*);
-//void handle_dehinge(void*);
-BOOL enable_dehinge(void*);
 void handle_force_delete(void*);
 void print_object_info(void*);
 void print_agent_nvpairs(void*);
 void toggle_debug_menus(void*);
-void export_info_callback(LLAssetInfo *info, void **user_data, S32 result);
-void export_data_callback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void **user_data, S32 result);
 void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status);
-BOOL menu_check_build_tool( void* user_data );
-void handle_reload_settings(void*);
-void focus_here(void*);
 void dump_select_mgr(void*);
-void dump_volume_mgr(void*);
+
 void dump_inventory(void*);
 void edit_ui(void*);
 void toggle_visibility(void*);
@@ -438,52 +378,30 @@ BOOL get_visibility(void*);
 void request_friendship(const LLUUID& agent_id);
 
 // Tools menu
-void handle_force_unlock(void*);
 void handle_selected_texture_info(void*);
-void handle_dump_image_list(void*);
 
-void handle_crash(void*);
 void handle_dump_followcam(void*);
 void handle_viewer_enable_message_log(void*);
 void handle_viewer_disable_message_log(void*);
-void handle_send_postcard(void*);
-void handle_gestures_old(void*);
-void handle_focus(void *);
+
 BOOL enable_buy_land(void*);
-void handle_move(void*);
-void handle_show_inventory(void*);
-void handle_activate(void*);
-BOOL enable_activate(void*);
 
 // Help menu
-void handle_buy_currency(void*);
 
 void handle_test_male(void *);
 void handle_test_female(void *);
 void handle_toggle_pg(void*);
 void handle_dump_attachments(void *);
-void handle_show_overlay_title(void*);
 void handle_dump_avatar_local_textures(void*);
 void handle_debug_avatar_textures(void*);
 void handle_grab_texture(void*);
 BOOL enable_grab_texture(void*);
 void handle_dump_region_object_cache(void*);
 
-BOOL menu_ui_enabled(void *user_data);
-BOOL menu_check_control( void* user_data);
-void menu_toggle_variable( void* user_data );
-BOOL menu_check_variable( void* user_data);
-BOOL enable_land_selected( void* );
-BOOL enable_more_than_one_selected(void* );
-BOOL enable_selection_you_own_all(void*);
-BOOL enable_selection_you_own_one(void*);
 BOOL enable_save_into_inventory(void*);
 BOOL enable_save_into_task_inventory(void*);
-BOOL enable_not_thirdperson(void*);
-// BOOL enable_export_selected(void *);
-BOOL enable_have_card(void*);
-BOOL enable_detach(void*);
-BOOL enable_region_owner(void*);
+
+BOOL enable_detach(const LLSD& = LLSD());
 void menu_toggle_attached_lights(void* user_data);
 void menu_toggle_attached_particles(void* user_data);
 
@@ -517,27 +435,6 @@ void LLMenuParcelObserver::changed()
 }
 
 
-//-----------------------------------------------------------------------------
-// Menu Construction
-//-----------------------------------------------------------------------------
-
-// code required to calculate anything about the menus
-void pre_init_menus()
-{
-	// static information
-	LLColor4 color;
-	color = gColors.getColor( "MenuDefaultBgColor" );
-	LLMenuGL::setDefaultBackgroundColor( color );
-	color = gColors.getColor( "MenuItemEnabledColor" );
-	LLMenuItemGL::setEnabledColor( color );
-	color = gColors.getColor( "MenuItemDisabledColor" );
-	LLMenuItemGL::setDisabledColor( color );
-	color = gColors.getColor( "MenuItemHighlightBgColor" );
-	LLMenuItemGL::setHighlightBGColor( color );
-	color = gColors.getColor( "MenuItemHighlightFgColor" );
-	LLMenuItemGL::setHighlightFGColor( color );
-}
-
 void initialize_menus();
 
 //-----------------------------------------------------------------------------
@@ -589,62 +486,63 @@ void init_menus()
 	/// The popup menu is now populated by the show_context_menu()
 	/// method.
 	
-	gPopupMenuView = new LLMenuGL( "Popup" );
-	gPopupMenuView->setVisible( FALSE );
+	LLMenuGL::Params menu_params;
+	menu_params.name = "Popup";
+	menu_params.visible = false;
+	gPopupMenuView = LLUICtrlFactory::create<LLMenuGL>(menu_params);
 	gMenuHolder->addChild( gPopupMenuView );
 
 	///
 	/// Pie menus
 	///
-	gPieSelf = LLUICtrlFactory::getInstance()->buildPieMenu("menu_pie_self.xml", gMenuHolder);
+	gPieSelf = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_self.xml", gMenuHolder);
 
 	// TomY TODO: what shall we do about these?
-	gDetachScreenPieMenu = gMenuHolder->getChild<LLPieMenu>("Object Detach HUD", true);
-	gDetachPieMenu = gMenuHolder->getChild<LLPieMenu>("Object Detach", true);
+	gDetachScreenPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Detach HUD", true);
+	gDetachPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Detach", true);
 
-	gPieAvatar = LLUICtrlFactory::getInstance()->buildPieMenu("menu_pie_avatar.xml", gMenuHolder);
+	gPieAvatar = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_avatar.xml", gMenuHolder);
 
-	gPieObject = LLUICtrlFactory::getInstance()->buildPieMenu("menu_pie_object.xml", gMenuHolder);
+	gPieObject = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_object.xml", gMenuHolder);
 
-	gAttachScreenPieMenu = gMenuHolder->getChild<LLPieMenu>("Object Attach HUD");
-	gAttachPieMenu = gMenuHolder->getChild<LLPieMenu>("Object Attach");
-	gPieRate = gMenuHolder->getChild<LLPieMenu>("Rate Menu");
+	gAttachScreenPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Attach HUD");
+	gAttachPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Attach");
+	gPieRate = gMenuHolder->getChild<LLContextMenu>("Rate Menu");
 
-	gPieAttachment = LLUICtrlFactory::getInstance()->buildPieMenu("menu_pie_attachment.xml", gMenuHolder);
+	gPieAttachment = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_attachment.xml", gMenuHolder);
 
-	gPieLand = LLUICtrlFactory::getInstance()->buildPieMenu("menu_pie_land.xml", gMenuHolder);
+	gPieLand = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_land.xml", gMenuHolder);
 
 	///
 	/// set up the colors
 	///
 	LLColor4 color;
 
-	LLColor4 pie_color = gColors.getColor("PieMenuBgColor");
-	gPieSelf->setBackgroundColor( pie_color );
-	gPieAvatar->setBackgroundColor( pie_color );
-	gPieObject->setBackgroundColor( pie_color );
-	gPieAttachment->setBackgroundColor( pie_color );
-	gPieLand->setBackgroundColor( pie_color );
+	LLColor4 context_menu_color = gSavedSkinSettings.getColor("MenuPopupBgColor");
+	
+	gPieSelf->setBackgroundColor( context_menu_color );
+	gPieAvatar->setBackgroundColor( context_menu_color );
+	gPieObject->setBackgroundColor( context_menu_color );
+	gPieAttachment->setBackgroundColor( context_menu_color );
+	
+	gPieLand->setBackgroundColor( context_menu_color );
 
-	color = gColors.getColor( "MenuPopupBgColor" );
+	color = gSavedSkinSettings.getColor( "MenuPopupBgColor" );
 	gPopupMenuView->setBackgroundColor( color );
 
 	// If we are not in production, use a different color to make it apparent.
 	if (LLViewerLogin::getInstance()->isInProductionGrid())
 	{
-		color = gColors.getColor( "MenuBarBgColor" );
+		color = gSavedSkinSettings.getColor( "MenuBarBgColor" );
 	}
 	else
 	{
-		color = gColors.getColor( "MenuNonProductionBgColor" );
+		color = gSavedSkinSettings.getColor( "MenuNonProductionBgColor" );
 	}
-	gMenuBarView = (LLMenuBarGL*)LLUICtrlFactory::getInstance()->buildMenu("menu_viewer.xml", gMenuHolder);
+	gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_viewer.xml", gMenuHolder);
 	gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT));
 	gMenuBarView->setBackgroundColor( color );
 
-    // gMenuBarView->setItemVisible("Tools", FALSE);
-	gMenuBarView->arrange();
-	
 	gMenuHolder->addChild(gMenuBarView);
 	
 	// menu holder appears on top of menu bar so you can see the menu title
@@ -655,6 +553,7 @@ void init_menus()
         LLViewerLogin::getInstance()->isInProductionGrid());
 
 	// Assume L$10 for now, the server will tell us the real cost at login
+	// *TODO:Also fix cost in llfolderview.cpp for Inventory menus
 	const std::string upload_cost("10");
 	gMenuHolder->childSetLabelArg("Upload Image", "[COST]", upload_cost);
 	gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", upload_cost);
@@ -666,824 +565,1879 @@ void init_menus()
 	gAttachSubMenu = gMenuBarView->getChildMenuByName("Attach Object", TRUE);
 	gDetachSubMenu = gMenuBarView->getChildMenuByName("Detach Object", TRUE);
 
-	// TomY TODO convert these two
-	LLMenuGL*menu;
-
-	menu = new LLMenuGL(CLIENT_MENU_NAME);
-	init_client_menu(menu);
-	gMenuBarView->appendMenu( menu );
-	menu->updateParent(LLMenuGL::sMenuContainer);
-
-	menu = new LLMenuGL(SERVER_MENU_NAME);
-	init_server_menu(menu);
-	gMenuBarView->appendMenu( menu );
-	menu->updateParent(LLMenuGL::sMenuContainer);
-
 	gMenuBarView->createJumpKeys();
 
 	// Let land based option enable when parcel changes
 	gMenuParcelObserver = new LLMenuParcelObserver();
 
-	//
-	// Debug menu visiblity
-	//
-	show_debug_menus();
-
-	gLoginMenuBarView = (LLMenuBarGL*)LLUICtrlFactory::getInstance()->buildMenu("menu_login.xml", gMenuHolder);
+	gLoginMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_login.xml", gMenuHolder);
+	gLoginMenuBarView->arrangeAndClear();
 	LLRect menuBarRect = gLoginMenuBarView->getRect();
 	gLoginMenuBarView->setRect(LLRect(menuBarRect.mLeft, menuBarRect.mTop, gViewerWindow->getRootView()->getRect().getWidth() - menuBarRect.mLeft,  menuBarRect.mBottom));
-
 	gLoginMenuBarView->setBackgroundColor( color );
-
 	gMenuHolder->addChild(gLoginMenuBarView);
 	
 }
 
+///////////////////
+// SHOW CONSOLES //
+///////////////////
 
 
-void init_client_menu(LLMenuGL* menu)
+class LLAdvancedToggleConsole : public view_listener_t
 {
-	LLMenuGL* sub_menu = NULL;
-
-	//menu->append(new LLMenuItemCallGL("Permissions Control", &show_permissions_control));
-	// this is now in the view menu so we don't need it here!
-	
+	bool handleEvent(const LLSD& userdata)
 	{
-		// *TODO: Translate
-		LLMenuGL* sub = new LLMenuGL("Consoles");
-		menu->appendMenu(sub);
-		sub->append(new LLMenuItemCheckGL("Frame Console", 
-										&toggle_visibility,
-										NULL,
-										&get_visibility,
-										(void*)gDebugView->mFrameStatView,
-										'2', MASK_CONTROL|MASK_SHIFT ) );
-		sub->append(new LLMenuItemCheckGL("Texture Console", 
-										&toggle_visibility,
-										NULL,
-										&get_visibility,
-										(void*)gTextureView,
-									   	'3', MASK_CONTROL|MASK_SHIFT ) );
-		LLView* debugview = gDebugView->mDebugConsolep;
-		sub->append(new LLMenuItemCheckGL("Debug Console", 
-										&toggle_visibility,
-										NULL,
-										&get_visibility,
-										debugview,
-									   	'4', MASK_CONTROL|MASK_SHIFT ) );
-
-		sub->append(new LLMenuItemCheckGL("Fast Timers", 
-										&toggle_visibility,
-										NULL,
-										&get_visibility,
-										(void*)gDebugView->mFastTimerView,
-										  '9', MASK_CONTROL|MASK_SHIFT ) );
+		std::string console_type = userdata.asString();
+		if ("texture" == console_type)
+		{
+			toggle_visibility( (void*)gTextureView );
+		}
+		else if ("debug" == console_type)
+		{
+			toggle_visibility( (void*)((LLView*)gDebugView->mDebugConsolep) );
+		}
+		else if ("fast timers" == console_type)
+		{
+			toggle_visibility( (void*)gDebugView->mFastTimerView );
+		}
 #if MEM_TRACK_MEM
-		sub->append(new LLMenuItemCheckGL("Memory", 
-										&toggle_visibility,
-										NULL,
-										&get_visibility,
-										(void*)gDebugView->mMemoryView,
-										  '0', MASK_CONTROL|MASK_SHIFT ) );
+		else if ("memory view" == console_type)
+		{
+			toggle_visibility( (void*)gDebugView->mMemoryView );
+		}
 #endif
-		sub->appendSeparator();
-		sub->append(new LLMenuItemCallGL("Region Info to Debug Console", 
-			&handle_region_dump_settings, NULL));
-		sub->append(new LLMenuItemCallGL("Group Info to Debug Console",
-			&handle_dump_group_info, NULL, NULL));
-		sub->append(new LLMenuItemCallGL("Capabilities Info to Debug Console",
-			&handle_dump_capabilities_info, NULL, NULL));
-		sub->createJumpKeys();
+		return true;
 	}
-	
-	// neither of these works particularly well at the moment
-	/*menu->append(new LLMenuItemCallGL(  "Reload UI XML",	&reload_ui,	
-	  				NULL, NULL) );*/
-	/*menu->append(new LLMenuItemCallGL("Reload settings/colors", 
-					&handle_reload_settings, NULL, NULL));*/
-	menu->append(new LLMenuItemCallGL("Reload personal setting overrides", 
-		&reload_personal_settings_overrides, NULL, NULL, KEY_F12, MASK_CONTROL|MASK_SHIFT));
-
-	sub_menu = new LLMenuGL("HUD Info");
-	{
-		sub_menu->append(new LLMenuItemCheckGL("Velocity", 
-												&toggle_visibility,
-												NULL,
-												&get_visibility,
-												(void*)gVelocityBar));
-
-		sub_menu->append(new LLMenuItemToggleGL("Camera",	&gDisplayCameraPos ) );
-		sub_menu->append(new LLMenuItemToggleGL("Wind", 	&gDisplayWindInfo) );
-		sub_menu->append(new LLMenuItemToggleGL("FOV",  	&gDisplayFOV ) );
-		sub_menu->createJumpKeys();
-	}
-	menu->appendMenu(sub_menu);
-
-	menu->appendSeparator();
-
-	menu->append(new LLMenuItemCheckGL( "High-res Snapshot",
-										&menu_toggle_control,
-										NULL,
-										&menu_check_control,
-										(void*)"HighResSnapshot"));
-	
-	menu->append(new LLMenuItemCheckGL( "Quiet Snapshots to Disk",
-										&menu_toggle_control,
-										NULL,
-										&menu_check_control,
-										(void*)"QuietSnapshotsToDisk"));
-
-	menu->append(new LLMenuItemCheckGL("Show Mouselook Crosshairs",
-									   &menu_toggle_control,
-									   NULL,
-									   &menu_check_control,
-									   (void*)"ShowCrosshairs"));
-
-	menu->append(new LLMenuItemCheckGL("Debug Permissions",
-									   &menu_toggle_control,
-									   NULL,
-									   &menu_check_control,
-									   (void*)"DebugPermissions"));
-	
-
-
-#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-	if (!LLViewerLogin::getInstance()->isInProductionGrid())
+};
+class LLAdvancedCheckConsole : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
 	{
-		menu->append(new LLMenuItemCheckGL("Hacked Godmode",
-										   &handle_toggle_hacked_godmode,
-										   NULL,
-										   &check_toggle_hacked_godmode,
-										   (void*)"HackedGodmode"));
-	}
+		std::string console_type = userdata.asString();
+		bool new_value = false;
+		if ("texture" == console_type)
+		{
+			new_value = get_visibility( (void*)gTextureView );
+		}
+		else if ("debug" == console_type)
+		{
+			new_value = get_visibility( (void*)((LLView*)gDebugView->mDebugConsolep) );
+		}
+		else if ("fast timers" == console_type)
+		{
+			new_value = get_visibility( (void*)gDebugView->mFastTimerView );
+		}
+#if MEM_TRACK_MEM
+		else if ("memory view" == console_type)
+		{
+			new_value = get_visibility( (void*)gDebugView->mMemoryView );
+		}
 #endif
 
-	menu->append(new LLMenuItemCallGL("Clear Group Cache", 
-									  LLGroupMgr::debugClearAllGroups));
-	menu->appendSeparator();
-
-	sub_menu = new LLMenuGL("Rendering");
-	init_debug_rendering_menu(sub_menu);
-	menu->appendMenu(sub_menu);
-
-	sub_menu = new LLMenuGL("World");
-	init_debug_world_menu(sub_menu);
-	menu->appendMenu(sub_menu);
+		return new_value;
+	}
+};
 
-	sub_menu = new LLMenuGL("UI");
-	init_debug_ui_menu(sub_menu);
-	menu->appendMenu(sub_menu);
 
-	sub_menu = new LLMenuGL("XUI");
-	init_debug_xui_menu(sub_menu);
-	menu->appendMenu(sub_menu);
+//////////////////////////
+// DUMP INFO TO CONSOLE //
+//////////////////////////
 
-	sub_menu = new LLMenuGL("Character");
-	init_debug_avatar_menu(sub_menu);
-	menu->appendMenu(sub_menu);
 
+class LLAdvancedDumpInfoToConsole : public view_listener_t
 {
-		LLMenuGL* sub = NULL;
-		sub = new LLMenuGL("Network");
-
-		sub->append(new LLMenuItemCallGL("Enable Message Log",  
-			&handle_viewer_enable_message_log,  NULL));
-		sub->append(new LLMenuItemCallGL("Disable Message Log", 
-			&handle_viewer_disable_message_log, NULL));
-
-		sub->appendSeparator();
+	bool handleEvent(const LLSD& userdata)
+	{
+		std::string info_type = userdata.asString();
+		if ("region" == info_type)
+		{
+			handle_region_dump_settings(NULL);
+		}
+		else if ("group" == info_type)
+		{
+			handle_dump_group_info(NULL);
+		}
+		else if ("capabilities" == info_type)
+		{
+			handle_dump_capabilities_info(NULL);
+		}
+		return true;
+	}
+};
 
-		sub->append(new LLMenuItemCheckGL("Velocity Interpolate Objects", 
-										  &velocity_interpolate,
-										  NULL, 
-										  &menu_check_control,
-										  (void*)"VelocityInterpolate"));
-		sub->append(new LLMenuItemCheckGL("Ping Interpolate Object Positions", 
-										  &menu_toggle_control,
-										  NULL, 
-										  &menu_check_control,
-										  (void*)"PingInterpolate"));
 
-		sub->appendSeparator();
+//////////////
+// HUD INFO //
+//////////////
 
-		sub->append(new LLMenuItemCallGL("Drop a Packet", 
-			&drop_packet, NULL, NULL, 
-			'L', MASK_ALT | MASK_CONTROL));
 
-		menu->appendMenu( sub );
-		sub->createJumpKeys();
-	}
+class LLAdvancedToggleHUDInfo : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
 	{
-		LLMenuGL* sub = NULL;
-		sub = new LLMenuGL("Recorder");
-
-		sub->append(new LLMenuItemCheckGL("Full Session Logging", &menu_toggle_control, NULL, &menu_check_control, (void*)"StatsSessionTrackFrameStats"));
-
-		sub->append(new LLMenuItemCallGL("Start Logging",	&LLFrameStats::startLogging, NULL));
-		sub->append(new LLMenuItemCallGL("Stop Logging",	&LLFrameStats::stopLogging, NULL));
-		sub->append(new LLMenuItemCallGL("Log 10 Seconds", &LLFrameStats::timedLogging10, NULL));
-		sub->append(new LLMenuItemCallGL("Log 30 Seconds", &LLFrameStats::timedLogging30, NULL));
-		sub->append(new LLMenuItemCallGL("Log 60 Seconds", &LLFrameStats::timedLogging60, NULL));
-		sub->appendSeparator();
-		sub->append(new LLMenuItemCallGL("Start Playback", &LLAgentPilot::startPlayback, NULL));
-		sub->append(new LLMenuItemCallGL("Stop Playback",	&LLAgentPilot::stopPlayback, NULL));
-		sub->append(new LLMenuItemToggleGL("Loop Playback", &LLAgentPilot::sLoop) );
-		sub->append(new LLMenuItemCallGL("Start Record",	&LLAgentPilot::startRecord, NULL));
-		sub->append(new LLMenuItemCallGL("Stop Record",	&LLAgentPilot::saveRecord, NULL));
+		std::string info_type = userdata.asString();
 
-		menu->appendMenu( sub );
-		sub->createJumpKeys();
+		if ("camera" == info_type)
+		{
+			gDisplayCameraPos = !(gDisplayCameraPos);
+		}
+		else if ("wind" == info_type)
+		{
+			gDisplayWindInfo = !(gDisplayWindInfo);
+		}
+		else if ("fov" == info_type)
+		{
+			gDisplayFOV = !(gDisplayFOV);
+		}
+		return true;
 	}
+};
 
-	menu->appendSeparator();
-
-	menu->append(new LLMenuItemToggleGL("Show Updates", 
-		&gShowObjectUpdates));
-	
-	menu->appendSeparator(); 
-	
-	menu->append(new LLMenuItemCallGL("Compress Images...", 
-		&handle_compress_image, NULL, NULL));
-
-	menu->append(new LLMenuItemCheckGL("Limit Select Distance", 
-									   &menu_toggle_control,
-									   NULL, 
-									   &menu_check_control,
-									   (void*)"LimitSelectDistance"));
-
-	menu->append(new LLMenuItemCheckGL("Disable Camera Constraints", 
-									   &menu_toggle_control,
-									   NULL, 
-									   &menu_check_control,
-									   (void*)"DisableCameraConstraints"));
-
-	menu->append(new LLMenuItemCheckGL("Mouse Smoothing",
-										&menu_toggle_control,
-										NULL,
-										&menu_check_control,
-										(void*) "MouseSmooth"));
-	menu->appendSeparator();
-
-	menu->append(new LLMenuItemCheckGL( "Console Window", 
-										&menu_toggle_control,
-										NULL, 
-										&menu_check_control,
-										(void*)"ShowConsoleWindow"));
-
-	if(gSavedSettings.getBOOL("QAMode"))
-	{
-		LLMenuGL* sub = NULL;
-		sub = new LLMenuGL("Debugging");
-#if LL_WINDOWS
-        sub->append(new LLMenuItemCallGL("Force Breakpoint", &force_error_breakpoint, NULL, NULL, 'B', MASK_CONTROL | MASK_ALT));
-#endif
-		sub->append(new LLMenuItemCallGL("Force LLError And Crash", &force_error_llerror));
-        sub->append(new LLMenuItemCallGL("Force Bad Memory Access", &force_error_bad_memory_access));
-		sub->append(new LLMenuItemCallGL("Force Infinite Loop", &force_error_infinite_loop));
-		sub->append(new LLMenuItemCallGL("Force Driver Crash", &force_error_driver_crash));
-		sub->append(new LLMenuItemCallGL("Force Disconnect Viewer", &handle_disconnect_viewer));
-		// *NOTE:Mani this isn't handled yet... sub->append(new LLMenuItemCallGL("Force Software Exception", &force_error_unhandled_exception)); 
-		sub->createJumpKeys();
-		menu->appendMenu(sub);
+class LLAdvancedCheckHUDInfo : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		std::string info_type = userdata.asString();
+		bool new_value = false;
+		if ("camera" == info_type)
+		{
+			new_value = gDisplayCameraPos;
+		}
+		else if ("wind" == info_type)
+		{
+			new_value = gDisplayWindInfo;
+		}
+		else if ("fov" == info_type)
+		{
+			new_value = gDisplayFOV;
+		}
+		return new_value;
 	}
+};
 
-	menu->append(new LLMenuItemCheckGL( "Output Debug Minidump", 
-										&menu_toggle_control,
-										NULL, 
-										&menu_check_control,
-										(void*)"SaveMinidump"));
-
-	menu->append(new LLMenuItemCallGL("Debug Settings...", LLFloaterSettingsDebug::show, NULL, NULL));
-	menu->append(new LLMenuItemCheckGL("View Admin Options", &handle_admin_override_toggle, NULL, &check_admin_override, NULL, 'V', MASK_CONTROL | MASK_ALT));
-
-	menu->append(new LLMenuItemCallGL("Request Admin Status", 
-		&handle_god_mode, NULL, NULL, 'G', MASK_ALT | MASK_CONTROL));
+///////////////////////
+// CLEAR GROUP CACHE //
+///////////////////////
 
-	menu->append(new LLMenuItemCallGL("Leave Admin Status", 
-		&handle_leave_god_mode, NULL, NULL, 'G', MASK_ALT | MASK_SHIFT | MASK_CONTROL));
+class LLAdvancedClearGroupCache : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLGroupMgr::debugClearAllGroups(NULL);
+		return true;
+	}
+};
 
-	menu->createJumpKeys();
-}
 
-void init_debug_world_menu(LLMenuGL* menu)
-{
-/* REMOVE mouse move sun from menu options
-	menu->append(new LLMenuItemCheckGL("Mouse Moves Sun", 
-									   &menu_toggle_control,
-									   NULL, 
-									   &menu_check_control,
-									   (void*)"MouseSun", 
-									   'M', MASK_CONTROL|MASK_ALT));
-*/
-	menu->append(new LLMenuItemCheckGL("Sim Sun Override", 
-									   &menu_toggle_control,
-									   NULL, 
-									   &menu_check_control,
-									   (void*)"SkyOverrideSimSunPosition"));
-	menu->append(new LLMenuItemCallGL("Dump Scripted Camera",
-		&handle_dump_followcam, NULL, NULL));
-	menu->append(new LLMenuItemCheckGL("Fixed Weather", 
-									   &menu_toggle_control,
-									   NULL, 
-									   &menu_check_control,
-									   (void*)"FixedWeather"));
-	menu->append(new LLMenuItemCallGL("Dump Region Object Cache",
-		&handle_dump_region_object_cache, NULL, NULL));
-	menu->createJumpKeys();
-}
 
 
-void handle_export_menus_to_xml(void*)
+/////////////////
+// RENDER TYPE //
+/////////////////
+U32 render_type_from_string(std::string render_type)
 {
-
-	LLFilePicker& picker = LLFilePicker::instance();
-	if(!picker.getSaveFile(LLFilePicker::FFSAVE_XML))
+	if ("simple" == render_type)
 	{
-		llwarns << "No file" << llendl;
-		return;
+		return LLPipeline::RENDER_TYPE_SIMPLE;
+	}
+	else if ("alpha" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_ALPHA;
+	}
+	else if ("tree" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_TREE;
+	}
+	else if ("character" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_AVATAR;
+	}
+	else if ("surfacePath" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_TERRAIN;
+	}
+	else if ("sky" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_SKY;
+	}
+	else if ("water" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_WATER;
+	}
+	else if ("ground" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_GROUND;
+	}
+	else if ("volume" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_VOLUME;
+	}
+	else if ("grass" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_GRASS;
+	}
+	else if ("clouds" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_CLOUDS;
+	}
+	else if ("particles" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_PARTICLES;
+	}
+	else if ("bump" == render_type)
+	{
+		return LLPipeline::RENDER_TYPE_BUMP;
+	}
+	else
+	{
+		return 0;
 	}
-	std::string filename = picker.getFirstFile();
-
-	llofstream out(filename);
-	LLXMLNodePtr node = gMenuBarView->getXML();
-	node->writeToOstream(out);
-	out.close();
 }
 
-extern BOOL gDebugClicks;
-extern BOOL gDebugWindowProc;
-extern BOOL gDebugTextEditorTips;
-extern BOOL gDebugSelectMgr;
-
-void init_debug_ui_menu(LLMenuGL* menu)
-{
-	menu->append(new LLMenuItemCheckGL("Rotate Mini-Map", menu_toggle_control, NULL, menu_check_control, (void*)"MiniMapRotate"));
-	menu->append(new LLMenuItemCheckGL("Use default system color picker", menu_toggle_control, NULL, menu_check_control, (void*)"UseDefaultColorPicker"));
-	menu->append(new LLMenuItemCheckGL("Show search panel in overlay bar", menu_toggle_control, NULL, menu_check_control, (void*)"ShowSearchBar"));
-	menu->appendSeparator();
-
-	menu->append(new LLMenuItemCallGL("Web Browser Test", &handle_web_browser_test));
-	menu->append(new LLMenuItemCallGL("Buy Currency Test", &handle_buy_currency_test));
-	menu->append(new LLMenuItemCallGL("Editable UI", &edit_ui));
-	menu->append(new LLMenuItemCallGL( "Dump SelectMgr", &dump_select_mgr));
-	menu->append(new LLMenuItemCallGL( "Dump Inventory", &dump_inventory));
-	menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus, NULL, NULL, 'F', MASK_ALT | MASK_CONTROL));
-	menu->append(new LLMenuItemCallGL( "Print Selected Object Info",	&print_object_info, NULL, NULL, 'P', MASK_CONTROL|MASK_SHIFT ));
-	menu->append(new LLMenuItemCallGL( "Print Agent Info",			&print_agent_nvpairs, NULL, NULL, 'P', MASK_SHIFT ));
-	menu->append(new LLMenuItemCallGL( "Memory Stats",  &output_statistics, NULL, NULL, 'M', MASK_SHIFT | MASK_ALT | MASK_CONTROL));
-	menu->append(new LLMenuItemCheckGL("Double-Click Auto-Pilot", 
-		menu_toggle_control, NULL, menu_check_control, 
-		(void*)"DoubleClickAutoPilot"));
-	menu->appendSeparator();
-//	menu->append(new LLMenuItemCallGL( "Print Packets Lost",			&print_packets_lost, NULL, NULL, 'L', MASK_SHIFT ));
-	menu->append(new LLMenuItemToggleGL("Debug SelectMgr", &gDebugSelectMgr));
-	menu->append(new LLMenuItemToggleGL("Debug Clicks", &gDebugClicks));
-	menu->append(new LLMenuItemToggleGL("Debug Views", &LLView::sDebugRects));
-	menu->append(new LLMenuItemCheckGL("Show Name Tooltips", toggle_show_xui_names, NULL, check_show_xui_names, NULL));
-	menu->append(new LLMenuItemToggleGL("Debug Mouse Events", &LLView::sDebugMouseHandling));
-	menu->append(new LLMenuItemToggleGL("Debug Keys", &LLView::sDebugKeys));
-	menu->append(new LLMenuItemToggleGL("Debug WindowProc", &gDebugWindowProc));
-	menu->append(new LLMenuItemToggleGL("Debug Text Editor Tips", &gDebugTextEditorTips));
-	menu->appendSeparator();
-	menu->append(new LLMenuItemCheckGL("Show Time", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowTime"));
-	menu->append(new LLMenuItemCheckGL("Show Render Info", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowRenderInfo"));
-	menu->append(new LLMenuItemCheckGL("Show Matrices", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowRenderMatrices"));
-	menu->append(new LLMenuItemCheckGL("Show Color Under Cursor", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowColor"));
-	
-	menu->createJumpKeys();
-}
 
-void init_debug_xui_menu(LLMenuGL* menu)
+class LLAdvancedToggleRenderType : public view_listener_t
 {
-	menu->append(new LLMenuItemCallGL("Floater Test...", LLFloaterTest::show));
-	menu->append(new LLMenuItemCallGL("Font Test...", LLFloaterFontTest::show));
-	menu->append(new LLMenuItemCallGL("Export Menus to XML...", handle_export_menus_to_xml));
-	menu->append(new LLMenuItemCallGL("Edit UI...", LLFloaterEditUI::show));	
-	menu->append(new LLMenuItemCallGL("Load from XML...", handle_load_from_xml));
-	menu->append(new LLMenuItemCallGL("Save to XML...", handle_save_to_xml));
-	menu->append(new LLMenuItemCheckGL("Show XUI Names", toggle_show_xui_names, NULL, check_show_xui_names, NULL));
+	bool handleEvent(const LLSD& userdata)
+	{
+		U32 render_type = render_type_from_string( userdata.asString() );
+		if ( render_type != 0 )
+		{
+			LLPipeline::toggleRenderTypeControl( (void*)render_type );
+		}
+		return true;
+	}
+};
 
-	//menu->append(new LLMenuItemCallGL("Buy Currency...", handle_buy_currency));
-	menu->createJumpKeys();
-}
 
-void init_debug_rendering_menu(LLMenuGL* menu)
+class LLAdvancedCheckRenderType : public view_listener_t
 {
-	LLMenuGL* sub_menu = NULL;
-
-	///////////////////////////
-	//
-	// Debug menu for types/pools
-	//
-	sub_menu = new LLMenuGL("Types");
-	menu->appendMenu(sub_menu);
-	
-	sub_menu->append(new LLMenuItemCheckGL("Simple",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_SIMPLE,	'1', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Alpha",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_ALPHA, '2', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Tree",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_TREE, '3', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Character",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_AVATAR, '4', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("SurfacePatch",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_TERRAIN, '5', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Sky",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_SKY, '6', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Water",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_WATER, '7', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Ground",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_GROUND, '8', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Volume",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_VOLUME, '9', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Grass",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_GRASS, '0', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Clouds",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_CLOUDS, '-', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Particles",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_PARTICLES, '`', MASK_ALT|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Bump",
-											&LLPipeline::toggleRenderTypeControl, NULL,
-											&LLPipeline::hasRenderTypeControl,
-											(void*)LLPipeline::RENDER_TYPE_BUMP, '\\', MASK_ALT|MASK_SHIFT));
-
-	sub_menu->createJumpKeys();
-	sub_menu = new LLMenuGL("Features");
-	menu->appendMenu(sub_menu);
-	sub_menu->append(new LLMenuItemCheckGL("UI",
-											&LLPipeline::toggleRenderDebugFeature, NULL,
-											&LLPipeline::toggleRenderDebugFeatureControl,
-											(void*)LLPipeline::RENDER_DEBUG_FEATURE_UI, KEY_F1, MASK_CONTROL|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Selected",
-											&LLPipeline::toggleRenderDebugFeature, NULL,
-											&LLPipeline::toggleRenderDebugFeatureControl,
-											(void*)LLPipeline::RENDER_DEBUG_FEATURE_SELECTED, KEY_F2, MASK_CONTROL|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Highlighted",
-											&LLPipeline::toggleRenderDebugFeature, NULL,
-											&LLPipeline::toggleRenderDebugFeatureControl,
-											(void*)LLPipeline::RENDER_DEBUG_FEATURE_HIGHLIGHTED, KEY_F3, MASK_CONTROL|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Dynamic Textures",
-											&LLPipeline::toggleRenderDebugFeature, NULL,
-											&LLPipeline::toggleRenderDebugFeatureControl,
-											(void*)LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES, KEY_F4, MASK_CONTROL|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL( "Foot Shadows", 
-											&LLPipeline::toggleRenderDebugFeature, NULL,
-											&LLPipeline::toggleRenderDebugFeatureControl,
-											(void*)LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS, KEY_F5, MASK_CONTROL|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Fog",
-											&LLPipeline::toggleRenderDebugFeature, NULL,
-											&LLPipeline::toggleRenderDebugFeatureControl,
-											(void*)LLPipeline::RENDER_DEBUG_FEATURE_FOG, KEY_F6, MASK_CONTROL|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL("Test FRInfo",
-											&LLPipeline::toggleRenderDebugFeature, NULL,
-											&LLPipeline::toggleRenderDebugFeatureControl,
-											(void*)LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO, KEY_F8, MASK_CONTROL|MASK_SHIFT));
-	sub_menu->append(new LLMenuItemCheckGL( "Flexible Objects", 
-											&LLPipeline::toggleRenderDebugFeature, NULL,
-											&LLPipeline::toggleRenderDebugFeatureControl,
-											(void*)LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE, KEY_F9, MASK_CONTROL|MASK_SHIFT));
-	sub_menu->createJumpKeys();
-
-	/////////////////////////////
-	//
-	// Debug menu for info displays
-	//
-	sub_menu = new LLMenuGL("Info Displays");
-	menu->appendMenu(sub_menu);
-
-	sub_menu->append(new LLMenuItemCheckGL("Verify",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_VERIFY));
-	sub_menu->append(new LLMenuItemCheckGL("BBoxes",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_BBOXES));
-	sub_menu->append(new LLMenuItemCheckGL("Points",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_POINTS));
-	sub_menu->append(new LLMenuItemCheckGL("Octree",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_OCTREE));
-	sub_menu->append(new LLMenuItemCheckGL("Shadow Frusta",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA));
-	sub_menu->append(new LLMenuItemCheckGL("Occlusion",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_OCCLUSION));
-	sub_menu->append(new LLMenuItemCheckGL("Render Batches", &LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_BATCH_SIZE));
-	sub_menu->append(new LLMenuItemCheckGL("Animated Textures",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_TEXTURE_ANIM));
-	sub_menu->append(new LLMenuItemCheckGL("Texture Priority",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY));
-	sub_menu->append(new LLMenuItemCheckGL("Avatar Rendering Cost",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_SHAME));
-	sub_menu->append(new LLMenuItemCheckGL("Texture Area (sqrt(A))",&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_TEXTURE_AREA));
-	sub_menu->append(new LLMenuItemCheckGL("Face Area (sqrt(A))",&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_FACE_AREA));
-	sub_menu->append(new LLMenuItemCheckGL("Lights",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_LIGHTS));
-	sub_menu->append(new LLMenuItemCheckGL("Particles",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_PARTICLES));
-	sub_menu->append(new LLMenuItemCheckGL("Composition", &LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_COMPOSITION));
-	sub_menu->append(new LLMenuItemCheckGL("Glow",&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_GLOW));
-	sub_menu->append(new LLMenuItemCheckGL("Raycasting",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_RAYCAST));
-	sub_menu->append(new LLMenuItemCheckGL("Sculpt",	&LLPipeline::toggleRenderDebug, NULL,
-													&LLPipeline::toggleRenderDebugControl,
-													(void*)LLPipeline::RENDER_DEBUG_SCULPTED));
-		
-	sub_menu->append(new LLMenuItemCallGL("Vectorize Perf Test", &run_vectorize_perf_test));
-
-	sub_menu = new LLMenuGL("Render Tests");
-
-	sub_menu->append(new LLMenuItemCheckGL("Camera Offset", 
-										  &menu_toggle_control,
-										  NULL, 
-										  &menu_check_control,
-										  (void*)"CameraOffset"));
-
-	sub_menu->append(new LLMenuItemToggleGL("Randomize Framerate", &gRandomizeFramerate));
-
-	sub_menu->append(new LLMenuItemToggleGL("Periodic Slow Frame", &gPeriodicSlowFrame));
-
-	sub_menu->append(new LLMenuItemToggleGL("Frame Test", &LLPipeline::sRenderFrameTest));
-
-	sub_menu->createJumpKeys();
-
-	menu->appendMenu( sub_menu );
-
-	menu->appendSeparator();
-	menu->append(new LLMenuItemCheckGL("Axes", menu_toggle_control, NULL, menu_check_control, (void*)"ShowAxes"));
-//	menu->append(new LLMenuItemCheckGL("Cull Small Objects", toggle_cull_small, NULL, menu_check_control, (void*)"RenderCullBySize"));
-
-	menu->appendSeparator();
-	menu->append(new LLMenuItemToggleGL("Hide Selected", &gHideSelectedObjects));
-	menu->appendSeparator();
-	menu->append(new LLMenuItemCheckGL("Tangent Basis", menu_toggle_control, NULL, menu_check_control, (void*)"ShowTangentBasis"));
-	menu->append(new LLMenuItemCallGL("Selected Texture Info", handle_selected_texture_info, NULL, NULL, 'T', MASK_CONTROL|MASK_SHIFT|MASK_ALT));
-	//menu->append(new LLMenuItemCallGL("Dump Image List", handle_dump_image_list, NULL, NULL, 'I', MASK_CONTROL|MASK_SHIFT));
-	
-	menu->append(new LLMenuItemToggleGL("Wireframe", &gUseWireframe, 
-			'R', MASK_CONTROL|MASK_SHIFT));
+	bool handleEvent(const LLSD& userdata)
+	{
+		U32 render_type = render_type_from_string( userdata.asString() );
+		bool new_value = false;
 
-	LLMenuItemCheckGL* item;
-	item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT);
-	item->setEnabled(gGLManager.mHasOcclusionQuery && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion"));
-	menu->append(item);
+		if ( render_type != 0 )
+		{
+			new_value = LLPipeline::hasRenderTypeControl( (void*)render_type );
+		}
 
-	item = new LLMenuItemCheckGL("Debug GL", menu_toggle_control, NULL, menu_check_control, (void*)"RenderDebugGL");
-	menu->append(item);
-	
-	item = new LLMenuItemCheckGL("Debug Pipeline", menu_toggle_control, NULL, menu_check_control, (void*)"RenderDebugPipeline");
-	menu->append(item);
-	
-	item = new LLMenuItemCheckGL("Fast Alpha", menu_toggle_control, NULL, menu_check_control, (void*)"RenderFastAlpha");
-	menu->append(item);
-	
-	item = new LLMenuItemCheckGL("Animate Textures", menu_toggle_control, NULL, menu_check_control, (void*)"AnimateTextures");
-	menu->append(item);
-	
-	item = new LLMenuItemCheckGL("Disable Textures", menu_toggle_variable, NULL, menu_check_variable, (void*)&LLViewerImage::sDontLoadVolumeTextures);
-	menu->append(item);
-	
-#ifndef LL_RELEASE_FOR_DOWNLOAD
-	item = new LLMenuItemCheckGL("HTTP Get Textures", menu_toggle_control, NULL, menu_check_control, (void*)"ImagePipelineUseHTTP");
-	menu->append(item);
-#endif
-	
-	item = new LLMenuItemCheckGL("Run Multiple Threads", menu_toggle_control, NULL, menu_check_control, (void*)"RunMultipleThreads");
-	menu->append(item);
+		return new_value;
+	}
+};
 
-	item = new LLMenuItemCheckGL("Cheesy Beacon", menu_toggle_control, NULL, menu_check_control, (void*)"CheesyBeacon");
-	menu->append(item);
 
-	item = new LLMenuItemCheckGL("Attached Lights", menu_toggle_attached_lights, NULL, menu_check_control, (void*)"RenderAttachedLights");
-	menu->append(item);
+/////////////
+// FEATURE //
+/////////////
+U32 feature_from_string(std::string feature)
+{ 
+	if ("ui" == feature)
+	{ 
+		return LLPipeline::RENDER_DEBUG_FEATURE_UI;
+	}
+	else if ("selected" == feature)
+	{
+		return LLPipeline::RENDER_DEBUG_FEATURE_SELECTED;
+	}
+	else if ("highlighted" == feature)
+	{
+		return LLPipeline::RENDER_DEBUG_FEATURE_HIGHLIGHTED;
+	}
+	else if ("dynamic textures" == feature)
+	{
+		return LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES;
+	}
+	else if ("foot shadows" == feature)
+	{
+		return LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS;
+	}
+	else if ("fog" == feature)
+	{
+		return LLPipeline::RENDER_DEBUG_FEATURE_FOG;
+	}
+	else if ("fr info" == feature)
+	{
+		return LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO;
+	}
+	else if ("flexible" == feature)
+	{
+		return LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE;
+	}
+	else
+	{
+		return 0;
+	}
+};
 
-	item = new LLMenuItemCheckGL("Attached Particles", menu_toggle_attached_particles, NULL, menu_check_control, (void*)"RenderAttachedParticles");
-	menu->append(item);
 
-#ifndef LL_RELEASE_FOR_DOWNLOAD
-	menu->appendSeparator();
-	menu->append(new LLMenuItemCallGL("Memory Leaking Simulation", LLFloaterMemLeak::show, NULL, NULL));
-#else
-	if(gSavedSettings.getBOOL("QAMode"))
+class LLAdvancedToggleFeature : public view_listener_t{
+	bool handleEvent(const LLSD& userdata)
 	{
-		menu->appendSeparator();
-		menu->append(new LLMenuItemCallGL("Memory Leaking Simulation", LLFloaterMemLeak::show, NULL, NULL));
+		U32 feature = feature_from_string( userdata.asString() );
+		if ( feature != 0 )
+		{
+			LLPipeline::toggleRenderDebugFeature( (void*)feature );
+		}
+		return true;
 	}
-#endif
-	
-	menu->createJumpKeys();
-}
-
-void init_debug_avatar_menu(LLMenuGL* menu)
-{
-	LLMenuGL* sub_menu = new LLMenuGL("Grab Baked Texture");
-	init_debug_baked_texture_menu(sub_menu);
-	menu->appendMenu(sub_menu);
-
-	sub_menu = new LLMenuGL("Character Tests");
-	sub_menu->append(new LLMenuItemCheckGL("Go Away/AFK When Idle",
-										   menu_toggle_control,
-										   NULL,
-										   menu_check_control,
-										   (void*)"AllowIdleAFK"));
-
-	sub_menu->append(new LLMenuItemCallGL("Appearance To XML", 
-		&LLVOAvatar::dumpArchetypeXML));
-
-	// HACK for easy testing of avatar geometry
-	sub_menu->append(new LLMenuItemCallGL( "Toggle Character Geometry", 
-		&handle_god_request_avatar_geometry, &enable_god_customer_service, NULL));
-
-	sub_menu->append(new LLMenuItemCallGL("Test Male", 
-		handle_test_male));
-
-	sub_menu->append(new LLMenuItemCallGL("Test Female", 
-		handle_test_female));
-
-	sub_menu->append(new LLMenuItemCallGL("Toggle PG", handle_toggle_pg));
-
-	sub_menu->append(new LLMenuItemToggleGL("Allow Select Avatar", &gAllowSelectAvatar));
-	sub_menu->createJumpKeys();
-
-	menu->appendMenu(sub_menu);
-
-	menu->append(new LLMenuItemCheckGL("Enable Lip Sync (Beta)", menu_toggle_control, NULL, menu_check_control, (void*)"LipSyncEnabled"));
-	menu->append(new LLMenuItemToggleGL("Tap-Tap-Hold To Run", &gAllowTapTapHoldRun));
-	menu->append(new LLMenuItemCallGL("Force Params to Default", &LLAgent::clearVisualParams, NULL));
-	menu->append(new LLMenuItemCallGL("Reload Vertex Shader", &reload_vertex_shader, NULL));
-	menu->append(new LLMenuItemToggleGL("Animation Info", &LLVOAvatar::sShowAnimationDebug));
-	menu->append(new LLMenuItemCallGL("Slow Motion Animations", &slow_mo_animations, NULL));
-	menu->append(new LLMenuItemToggleGL("Show Look At", &LLHUDEffectLookAt::sDebugLookAt));
-	menu->append(new LLMenuItemToggleGL("Show Point At", &LLHUDEffectPointAt::sDebugPointAt));
-	menu->append(new LLMenuItemToggleGL("Debug Joint Updates", &LLVOAvatar::sJointDebug));
-	menu->append(new LLMenuItemToggleGL("Disable LOD", &LLViewerJoint::sDisableLOD));
-	menu->append(new LLMenuItemToggleGL("Debug Character Vis", &LLVOAvatar::sDebugInvisible));
-	//menu->append(new LLMenuItemToggleGL("Show Attachment Points", &LLVOAvatar::sShowAttachmentPoints));
-	//diabling collision plane due to DEV-14477 -brad
-	//menu->append(new LLMenuItemToggleGL("Show Collision Plane", &LLVOAvatar::sShowFootPlane));
-	menu->append(new LLMenuItemCheckGL("Show Collision Skeleton",
-									   &LLPipeline::toggleRenderDebug, NULL,
-									   &LLPipeline::toggleRenderDebugControl,
-									   (void*)LLPipeline::RENDER_DEBUG_AVATAR_VOLUME));
-	menu->append(new LLMenuItemCheckGL("Display Agent Target",
-									   &LLPipeline::toggleRenderDebug, NULL,
-									   &LLPipeline::toggleRenderDebugControl,
-									   (void*)LLPipeline::RENDER_DEBUG_AGENT_TARGET));
-	menu->append(new LLMenuItemToggleGL( "Debug Rotation", &LLVOAvatar::sDebugAvatarRotation));
-	menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments));
-	menu->append(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL ));
-#ifndef LL_RELEASE_FOR_DOWNLOAD
-	menu->append(new LLMenuItemCallGL("Debug Avatar Textures", handle_debug_avatar_textures, NULL, NULL, 'A', MASK_SHIFT|MASK_CONTROL|MASK_ALT));
-	menu->append(new LLMenuItemCallGL("Dump Local Textures", handle_dump_avatar_local_textures, NULL, NULL, 'M', MASK_SHIFT|MASK_ALT ));	
-#endif
-	menu->createJumpKeys();
-}
+};
 
-void init_debug_baked_texture_menu(LLMenuGL* menu)
+class LLAdvancedCheckFeature : public view_listener_t
+{bool handleEvent(const LLSD& userdata)
 {
-	menu->append(new LLMenuItemCallGL("Iris", handle_grab_texture, enable_grab_texture, (void*) TEX_EYES_BAKED));
-	menu->append(new LLMenuItemCallGL("Head", handle_grab_texture, enable_grab_texture, (void*) TEX_HEAD_BAKED));
-	menu->append(new LLMenuItemCallGL("Upper Body", handle_grab_texture, enable_grab_texture, (void*) TEX_UPPER_BAKED));
-	menu->append(new LLMenuItemCallGL("Lower Body", handle_grab_texture, enable_grab_texture, (void*) TEX_LOWER_BAKED));
-	menu->append(new LLMenuItemCallGL("Skirt", handle_grab_texture, enable_grab_texture, (void*) TEX_SKIRT_BAKED));
-	menu->append(new LLMenuItemCallGL("Hair", handle_grab_texture, enable_grab_texture, (void*) TEX_HAIR_BAKED));
-	menu->createJumpKeys();
-}
+	U32 feature = feature_from_string( userdata.asString() );
+	bool new_value = false;
 
-void init_server_menu(LLMenuGL* menu)
-{
+	if ( feature != 0 )
 	{
-		LLMenuGL* sub = new LLMenuGL("Object");
-		menu->appendMenu(sub);
+		new_value = LLPipeline::toggleRenderDebugFeatureControl( (void*)feature );
+	}
 
-		sub->append(new LLMenuItemCallGL( "Take Copy",
-										  &force_take_copy, &enable_god_customer_service, NULL,
-										  'O', MASK_SHIFT | MASK_ALT | MASK_CONTROL));
-#ifdef _CORY_TESTING
-		sub->append(new LLMenuItemCallGL( "Export Copy",
-										   &force_export_copy, NULL, NULL));
-		sub->append(new LLMenuItemCallGL( "Import Geometry",
-										   &force_import_geometry, NULL, NULL));
-#endif
-		//sub->append(new LLMenuItemCallGL( "Force Public", 
-		//			&handle_object_owner_none, NULL, NULL));
-		//sub->append(new LLMenuItemCallGL( "Force Ownership/Permissive", 
-		//			&handle_object_owner_self_and_permissive, NULL, NULL, 'K', MASK_SHIFT | MASK_ALT | MASK_CONTROL));
-		sub->append(new LLMenuItemCallGL( "Force Owner To Me", 
-					&handle_object_owner_self, &enable_god_customer_service));
-		sub->append(new LLMenuItemCallGL( "Force Owner Permissive", 
-					&handle_object_owner_permissive, &enable_god_customer_service));
-		//sub->append(new LLMenuItemCallGL( "Force Totally Permissive", 
-		//			&handle_object_permissive));
-		sub->append(new LLMenuItemCallGL( "Delete", 
-					&handle_force_delete, &enable_god_customer_service, NULL, KEY_DELETE, MASK_SHIFT | MASK_ALT | MASK_CONTROL));
-		sub->append(new LLMenuItemCallGL( "Lock", 
-					&handle_object_lock, &enable_god_customer_service, NULL, 'L', MASK_SHIFT | MASK_ALT | MASK_CONTROL));
-		sub->append(new LLMenuItemCallGL( "Get Asset IDs", 
-					&handle_object_asset_ids, &enable_god_customer_service, NULL, 'I', MASK_SHIFT | MASK_ALT | MASK_CONTROL));
-		sub->createJumpKeys();
-	}
-	{
-		LLMenuGL* sub = new LLMenuGL("Parcel");
-		menu->appendMenu(sub);
-
-		sub->append(new LLMenuItemCallGL("Owner To Me",
-										 &handle_force_parcel_owner_to_me,
-										 &enable_god_customer_service, NULL));
-		sub->append(new LLMenuItemCallGL("Set to Linden Content",
-										 &handle_force_parcel_to_content,
-										 &enable_god_customer_service, NULL,
-										 'C', MASK_SHIFT | MASK_ALT | MASK_CONTROL));
-		sub->appendSeparator();
-		sub->append(new LLMenuItemCallGL("Claim Public Land",
-										 &handle_claim_public_land, &enable_god_customer_service));
-
-		sub->createJumpKeys();
-	}
-	{
-		LLMenuGL* sub = new LLMenuGL("Region");
-		menu->appendMenu(sub);
-		sub->append(new LLMenuItemCallGL("Dump Temp Asset Data",
-			&handle_region_dump_temp_asset_data,
-			&enable_god_customer_service, NULL));
-		sub->createJumpKeys();
-	}	
-	menu->append(new LLMenuItemCallGL( "God Tools...", 
-		&LLFloaterGodTools::show, &enable_god_basic, NULL));
-
-	menu->appendSeparator();
-
-	menu->append(new LLMenuItemCallGL("Save Region State", 
-		&LLPanelRegionTools::onSaveState, &enable_god_customer_service, NULL));
-
-//	menu->append(new LLMenuItemCallGL("Force Join Group", handle_force_join_group));
-//
-//	menu->appendSeparator();
-//
-//	menu->append(new LLMenuItemCallGL( "OverlayTitle",
-//		&handle_show_overlay_title, &enable_god_customer_service, NULL));
-	menu->createJumpKeys();
+	return new_value;
 }
+};
 
-static std::vector<LLPointer<view_listener_t> > sMenus;
 
-//-----------------------------------------------------------------------------
-// cleanup_menus()
-//-----------------------------------------------------------------------------
-void cleanup_menus()
+//////////////////
+// INFO DISPLAY //
+//////////////////
+U32 info_display_from_string(std::string info_display)
 {
-	delete gMenuParcelObserver;
-	gMenuParcelObserver = NULL;
-
-	delete gPieSelf;
-	gPieSelf = NULL;
-
-	delete gPieAvatar;
-	gPieAvatar = NULL;
-
-	delete gPieObject;
-	gPieObject = NULL;
+	if ("verify" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_VERIFY;
+	}
+	else if ("bboxes" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_BBOXES;
+	}
+	else if ("points" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_POINTS;
+	}
+	else if ("octree" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_OCTREE;
+	}
+	else if ("shadow frusta" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA;
+	}
+	else if ("occlusion" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_OCCLUSION;
+	}
+	else if ("render batches" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_BATCH_SIZE;
+	}
+	else if ("texture anim" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_TEXTURE_ANIM;
+	}
+	else if ("texture priority" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY;
+	}
+	else if ("shame" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_SHAME;
+	}
+	else if ("texture area" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_TEXTURE_AREA;
+	}
+	else if ("face area" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_FACE_AREA;
+	}
+	else if ("lights" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_LIGHTS;
+	}
+	else if ("particles" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_PARTICLES;
+	}
+	else if ("composition" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_COMPOSITION;
+	}
+	else if ("glow" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_GLOW;
+	}
+	else if ("collision skeleton" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_AVATAR_VOLUME;
+	}
+	else if ("agent target" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_AGENT_TARGET;
+	}
+	else
+	{
+		return 0;
+	}
+};
+
+class LLAdvancedToggleInfoDisplay : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		U32 info_display = info_display_from_string( userdata.asString() );
+
+		if ( info_display != 0 )
+		{
+			LLPipeline::toggleRenderDebug( (void*)info_display );
+		}
+
+		return true;
+	}
+};
+
+
+class LLAdvancedCheckInfoDisplay : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		U32 info_display = info_display_from_string( userdata.asString() );
+		bool new_value = false;
+
+		if ( info_display != 0 )
+		{
+			new_value = LLPipeline::toggleRenderDebugControl( (void*)info_display );
+		}
+
+		return new_value;
+	}
+};
+
+
+///////////////////////////
+//// RANDOMIZE FRAMERATE //
+///////////////////////////
+
+
+class LLAdvancedToggleRandomizeFramerate : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		gRandomizeFramerate = !(gRandomizeFramerate);
+		return true;
+	}
+};
+
+class LLAdvancedCheckRandomizeFramerate : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = gRandomizeFramerate;
+		return new_value;
+	}
+};
+
+void run_vectorize_perf_test(void *)
+{
+	gSavedSettings.setBOOL("VectorizePerfTest", TRUE);
+}
+
+
+////////////////////////////////
+// RUN Vectorized Perform Test//
+////////////////////////////////
+
+
+class LLAdvancedVectorizePerfTest : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		run_vectorize_perf_test(NULL);
+		return true;
+	}
+};
+
+///////////////////////////
+//// PERIODIC SLOW FRAME //
+///////////////////////////
+
+
+class LLAdvancedTogglePeriodicSlowFrame : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		gPeriodicSlowFrame = !(gPeriodicSlowFrame);
+		return true;
+	}
+};
+
+class LLAdvancedCheckPeriodicSlowFrame : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = gPeriodicSlowFrame;
+		return new_value;
+	}
+};
+
+
+
+////////////////
+// FRAME TEST //
+////////////////
+
+
+class LLAdvancedToggleFrameTest : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLPipeline::sRenderFrameTest = !(LLPipeline::sRenderFrameTest);
+		return true;
+	}
+};
+
+class LLAdvancedCheckFrameTest : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLPipeline::sRenderFrameTest;
+		return new_value;
+	}
+};
+
+
+//
+/////////////////////////////
+//// HIDE SELECTED OBJECTS //
+/////////////////////////////
+//
+//
+//class LLAdvancedToggleHideSelectedObjects : public view_listener_t
+//{
+//	bool handleEvent(const LLSD& userdata)
+//	{
+//		LLSelectMgr::sHideSelectedObjects = !(LLSelectMgr::sHideSelectedObjects);
+//		return true;
+//	}
+//};
+//
+//class LLAdvancedCheckHideSelectedObjects : public view_listener_t
+//{
+//	bool handleEvent(const LLSD& userdata)
+//	{
+//		bool new_value = gHideSelectedObjects;
+//		return new_value;
+//	}
+//};
+
+///////////////////////////
+// SELECTED TEXTURE INFO //
+///////////////////////////
+
+
+class LLAdvancedSelectedTextureInfo : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_selected_texture_info(NULL);
+		return true;
+	}
+};
+
+//////////////////////
+// TOGGLE WIREFRAME //
+//////////////////////
+
+class LLAdvancedToggleWireframe : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		gUseWireframe = !(gUseWireframe);
+		return true;
+	}
+};
+
+class LLAdvancedCheckWireframe : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = gUseWireframe;
+		return new_value;
+	}
+};
+	
+//////////////////////
+// DISABLE TEXTURES //
+//////////////////////
+
+class LLAdvancedToggleDisableTextures : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLViewerImage::sDontLoadVolumeTextures = !LLViewerImage::sDontLoadVolumeTextures;
+		return true;
+	}
+};
+
+class LLAdvancedCheckDisableTextures : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLViewerImage::sDontLoadVolumeTextures; // <-- make this using LLCacheControl
+		return new_value;
+	}
+};
+
+//////////////////////////
+// DUMP SCRIPTED CAMERA //
+//////////////////////////
+
+class LLAdvancedDumpScriptedCamera : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_dump_followcam(NULL);
+		return true;
+	}
+};
+
+
+
+//////////////////////////////
+// DUMP REGION OBJECT CACHE //
+//////////////////////////////
+
+
+class LLAdvancedDumpRegionObjectCache : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_dump_region_object_cache(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedWebBrowserTest : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_web_browser_test(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedBuyCurrencyTest : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_buy_currency_test(NULL);
+		return true;
+	}
+};
+
+
+////////////////////////
+// TOGGLE EDITABLE UI //
+////////////////////////
+
+
+class LLAdvancedToggleEditableUI : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		edit_ui(NULL);
+		return true;
+	}
+};
+
+
+/////////////////////
+// DUMP SELECT MGR //
+/////////////////////
+
+
+class LLAdvancedDumpSelectMgr : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		dump_select_mgr(NULL);
+		return true;
+	}
+};
+
+
+
+////////////////////
+// DUMP INVENTORY //
+////////////////////
+
+
+class LLAdvancedDumpInventory : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		dump_inventory(NULL);
+		return true;
+	}
+};
+
+
+
+///////////////////////
+// DUMP FOCUS HOLDER //
+///////////////////////
+
+
+class LLAdvancedDumpFocusHolder : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_dump_focus(NULL);
+		return true;
+	}
+};
+
+
+
+////////////////////////////////
+// PRINT SELECTED OBJECT INFO //
+////////////////////////////////
+
+
+class LLAdvancedPrintSelectedObjectInfo : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		print_object_info(NULL);
+		return true;
+	}
+};
+
+
+
+//////////////////////
+// PRINT AGENT INFO //
+//////////////////////
+
+
+class LLAdvancedPrintAgentInfo : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		print_agent_nvpairs(NULL);
+		return true;
+	}
+};
+
+
+
+////////////////////////////////
+// PRINT TEXTURE MEMORY STATS //
+////////////////////////////////
+
+
+class LLAdvancedPrintTextureMemoryStats : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		output_statistics(NULL);
+		return true;
+	}
+};
+
+//////////////////
+// DEBUG CLICKS //
+//////////////////
+
+
+class LLAdvancedToggleDebugClicks : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		gDebugClicks = !(gDebugClicks);
+		return true;
+	}
+};
+
+class LLAdvancedCheckDebugClicks : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = gDebugClicks;
+		return new_value;
+	}
+};
+
+
+
+/////////////////
+// DEBUG VIEWS //
+/////////////////
+
+
+class LLAdvancedToggleDebugViews : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLView::sDebugRects = !(LLView::sDebugRects);
+		return true;
+	}
+};
+
+class LLAdvancedCheckDebugViews : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLView::sDebugRects;
+		return new_value;
+	}
+};
+
+
+
+///////////////////////
+// XUI NAME TOOLTIPS //
+///////////////////////
+
+
+class LLAdvancedToggleXUINameTooltips : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		toggle_show_xui_names(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedCheckXUINameTooltips : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = check_show_xui_names(NULL);
+		return new_value;
+	}
+};
+
+
+
+////////////////////////
+// DEBUG MOUSE EVENTS //
+////////////////////////
+
+
+class LLAdvancedToggleDebugMouseEvents : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLView::sDebugMouseHandling = !(LLView::sDebugMouseHandling);
+		return true;
+	}
+};
+
+class LLAdvancedCheckDebugMouseEvents : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLView::sDebugMouseHandling;
+		return new_value;
+	}
+};
+
+
+
+////////////////
+// DEBUG KEYS //
+////////////////
+
+
+class LLAdvancedToggleDebugKeys : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLView::sDebugKeys = !(LLView::sDebugKeys);
+		return true;
+	}
+};
+
+class LLAdvancedCheckDebugKeys : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLView::sDebugKeys;
+		return new_value;
+	}
+};
+
+
+
+///////////////////////
+// DEBUG WINDOW PROC //
+///////////////////////
+
+
+class LLAdvancedToggleDebugWindowProc : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		gDebugWindowProc = !(gDebugWindowProc);
+		return true;
+	}
+};
+
+class LLAdvancedCheckDebugWindowProc : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = gDebugWindowProc;
+		return new_value;
+	}
+};
+
+// ------------------------------XUI MENU ---------------------------
+
+
+class LLAdvancedShowFontTest : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLFloaterFontTest::show(NULL);
+		return true;
+	}
+};
+
+//////////////////////
+// LOAD UI FROM XML //
+//////////////////////
+
+
+class LLAdvancedLoadUIFromXML : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_load_from_xml(NULL);
+		return true;
+	}
+};
+
+
+
+////////////////////
+// SAVE UI TO XML //
+////////////////////
+
+
+class LLAdvancedSaveUIToXML : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_save_to_xml(NULL);
+		return true;
+	}
+};
+
+
+
+///////////////
+// XUI NAMES //
+///////////////
+
+
+class LLAdvancedToggleXUINames : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		toggle_show_xui_names(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedCheckXUINames : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = check_show_xui_names(NULL);
+		return new_value;
+	}
+};
+
+
+////////////////////////
+// GRAB BAKED TEXTURE //
+////////////////////////
+
+
+class LLAdvancedGrabBakedTexture : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		std::string texture_type = userdata.asString();
+		if ("iris" == texture_type)
+		{
+			handle_grab_texture( (void*)TEX_EYES_BAKED );
+		}
+		else if ("head" == texture_type)
+		{
+			handle_grab_texture( (void*)TEX_HEAD_BAKED );
+		}
+		else if ("upper" == texture_type)
+		{
+			handle_grab_texture( (void*)TEX_UPPER_BAKED );
+		}
+		else if ("lower" == texture_type)
+		{
+			handle_grab_texture( (void*)TEX_SKIRT_BAKED );
+		}
+		else if ("skirt" == texture_type)
+		{
+			handle_grab_texture( (void*)TEX_SKIRT_BAKED );
+		}
+		else if ("hair" == texture_type)
+		{
+			handle_grab_texture( (void*)TEX_HAIR_BAKED );
+		}
+
+		return true;
+	}
+};
+
+class LLAdvancedEnableGrabBakedTexture : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		std::string texture_type = userdata.asString();
+		bool new_value = false;
+
+		if ("iris" == texture_type)
+		{
+			new_value = enable_grab_texture( (void*)TEX_EYES_BAKED );
+		}
+		else if ("head" == texture_type)
+		{
+			new_value = enable_grab_texture( (void*)TEX_HEAD_BAKED );
+		}
+		else if ("upper" == texture_type)
+		{
+			new_value = enable_grab_texture( (void*)TEX_UPPER_BAKED );
+		}
+		else if ("lower" == texture_type)
+		{
+			new_value = enable_grab_texture( (void*)TEX_LOWER_BAKED );
+		}
+		else if ("skirt" == texture_type)
+		{
+			new_value = enable_grab_texture( (void*)TEX_SKIRT_BAKED );
+		}
+
+		return new_value;
+	}
+};
+
+///////////////////////
+// APPEARANCE TO XML //
+///////////////////////
+
+
+class LLAdvancedAppearanceToXML : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLVOAvatar::dumpArchetypeXML(NULL);
+		return true;
+	}
+};
+
+
+
+///////////////////////////////
+// TOGGLE CHARACTER GEOMETRY //
+///////////////////////////////
+
+
+class LLAdvancedToggleCharacterGeometry : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_god_request_avatar_geometry(NULL);
+		return true;
+	}
+};
+
+class LLEnableGodCustomerService : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = enable_god_customer_service(NULL);
+		return new_value;
+	}
+};
+
+
+
+/////////////////////////////
+// TEST MALE / TEST FEMALE //
+/////////////////////////////
+
+class LLAdvancedTestMale : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_test_male(NULL);
+		return true;
+	}
+};
+
+
+class LLAdvancedTestFemale : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_test_female(NULL);
+		return true;
+	}
+};
+
+
+
+///////////////
+// TOGGLE PG //
+///////////////
+
+
+class LLAdvancedTogglePG : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_toggle_pg(NULL);
+		return true;
+	}
+};
+
+
+
+////////////////////////////
+// ALLOW TAP-TAP-HOLD RUN //
+////////////////////////////
+
+
+class LLAdvancedToggleAllowTapTapHoldRun : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		gAllowTapTapHoldRun = !(gAllowTapTapHoldRun);
+		return true;
+	}
+};
+
+class LLAdvancedCheckAllowTapTapHoldRun : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = gAllowTapTapHoldRun;
+		return new_value;
+	}
+};
+
+
+
+
+
+class LLAdvancedForceParamsToDefault : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLAgent::clearVisualParams(NULL);
+		return true;
+	}
+};
+
+
+
+//////////////////////////
+// RELOAD VERTEX SHADER //
+//////////////////////////
+
+
+class LLAdvancedReloadVertexShader : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		reload_vertex_shader(NULL);
+		return true;
+	}
+};
+
+
+
+////////////////////
+// ANIMATION INFO //
+////////////////////
+
+
+class LLAdvancedToggleAnimationInfo : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLVOAvatar::sShowAnimationDebug = !(LLVOAvatar::sShowAnimationDebug);
+		return true;
+	}
+};
+
+class LLAdvancedCheckAnimationInfo : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLVOAvatar::sShowAnimationDebug;
+		return new_value;
+	}
+};
+
+
+//////////////////
+// SHOW LOOK AT //
+//////////////////
+
+
+class LLAdvancedToggleShowLookAt : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLHUDEffectLookAt::sDebugLookAt = !(LLHUDEffectLookAt::sDebugLookAt);
+		return true;
+	}
+};
+
+class LLAdvancedCheckShowLookAt : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLHUDEffectLookAt::sDebugLookAt;
+		return new_value;
+	}
+};
+
+
+
+///////////////////
+// SHOW POINT AT //
+///////////////////
+
+
+class LLAdvancedToggleShowPointAt : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLHUDEffectPointAt::sDebugPointAt = !(LLHUDEffectPointAt::sDebugPointAt);
+		return true;
+	}
+};
+
+class LLAdvancedCheckShowPointAt : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLHUDEffectPointAt::sDebugPointAt;
+		return new_value;
+	}
+};
+
+
+
+/////////////////////////
+// DEBUG JOINT UPDATES //
+/////////////////////////
+
+
+class LLAdvancedToggleDebugJointUpdates : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLVOAvatar::sJointDebug = !(LLVOAvatar::sJointDebug);
+		return true;
+	}
+};
+
+class LLAdvancedCheckDebugJointUpdates : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLVOAvatar::sJointDebug;
+		return new_value;
+	}
+};
+
+
+
+/////////////////
+// DISABLE LOD //
+/////////////////
+
+
+class LLAdvancedToggleDisableLOD : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLViewerJoint::sDisableLOD = !(LLViewerJoint::sDisableLOD);
+		return true;
+	}
+};
+
+class LLAdvancedCheckDisableLOD : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLViewerJoint::sDisableLOD;
+		return new_value;
+	}
+};
+
+
+
+/////////////////////////
+// DEBUG CHARACTER VIS //
+/////////////////////////
+
+
+class LLAdvancedToggleDebugCharacterVis : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLVOAvatar::sDebugInvisible = !(LLVOAvatar::sDebugInvisible);
+		return true;
+	}
+};
+
+class LLAdvancedCheckDebugCharacterVis : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLVOAvatar::sDebugInvisible;
+		return new_value;
+	}
+};
+
+
+//////////////////////
+// DUMP ATTACHMENTS //
+//////////////////////
+
+
+class LLAdvancedDumpAttachments : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_dump_attachments(NULL);
+		return true;
+	}
+};
+
+
+
+/////////////////////
+// REBAKE TEXTURES //
+/////////////////////
+
+
+class LLAdvancedRebakeTextures : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_rebake_textures(NULL);
+		return true;
+	}
+};
+
+
+#ifndef LL_RELEASE_FOR_DOWNLOAD
+///////////////////////////
+// DEBUG AVATAR TEXTURES //
+///////////////////////////
+
+
+class LLAdvancedDebugAvatarTextures : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_debug_avatar_textures(NULL);
+		return true;
+	}
+};
+
+////////////////////////////////
+// DUMP AVATAR LOCAL TEXTURES //
+////////////////////////////////
+
+
+class LLAdvancedDumpAvatarLocalTextures : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_dump_avatar_local_textures(NULL);
+		return true;
+	}
+};
+
+////////////////////////////////
+// Memory Leaking Simulation  //
+////////////////////////////////
+class LLAdvancedMemoryLeakingSimulation : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLFloaterMemLeak::show(NULL);
+		return true;
+	}
+};
+
+#endif
+
+/////////////////
+// MESSAGE LOG //
+/////////////////
+
+
+class LLAdvancedEnableMessageLog : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_viewer_enable_message_log(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedDisableMessageLog : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_viewer_disable_message_log(NULL);
+		return true;
+	}
+};
+
+/////////////////
+// DROP PACKET //
+/////////////////
+
+
+class LLAdvancedDropPacket : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		gMessageSystem->mPacketRing.dropPackets(1);
+		return true;
+	}
+};
+
+
+
+/////////////////
+// AGENT PILOT //
+/////////////////
+
+
+class LLAdvancedAgentPilot : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		std::string command = userdata.asString();
+		if ("start playback" == command)
+		{
+			LLAgentPilot::startPlayback(NULL);
+		}
+		else if ("stop playback" == command)
+		{
+			LLAgentPilot::stopPlayback(NULL);
+		}
+		else if ("start record" == command)
+		{
+			LLAgentPilot::startRecord(NULL);
+		}
+		else if ("stop record" == command)
+		{
+			LLAgentPilot::saveRecord(NULL);
+		}
+
+		return true;
+	}		
+};
+
+
+
+//////////////////////
+// AGENT PILOT LOOP //
+//////////////////////
+
+
+class LLAdvancedToggleAgentPilotLoop : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLAgentPilot::sLoop = !(LLAgentPilot::sLoop);
+		return true;
+	}
+};
+
+class LLAdvancedCheckAgentPilotLoop : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = LLAgentPilot::sLoop;
+		return new_value;
+	}
+};
+
+
+/////////////////////////
+// SHOW OBJECT UPDATES //
+/////////////////////////
+
+
+class LLAdvancedToggleShowObjectUpdates : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		gShowObjectUpdates = !(gShowObjectUpdates);
+		return true;
+	}
+};
+
+class LLAdvancedCheckShowObjectUpdates : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = gShowObjectUpdates;
+		return new_value;
+	}
+};
+
+
+
+////////////////////
+// COMPRESS IMAGE //
+////////////////////
+
+
+class LLAdvancedCompressImage : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_compress_image(NULL);
+		return true;
+	}
+};
+
+
+
+/////////////////////////
+// SHOW DEBUG SETTINGS //
+/////////////////////////
+
+
+class LLAdvancedShowDebugSettings : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLFloaterSettingsDebug::showInstance(userdata);
+		return true;
+	}
+};
+
+
+
+////////////////////////
+// VIEW ADMIN OPTIONS //
+////////////////////////
+
+
+class LLAdvancedToggleViewAdminOptions : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_admin_override_toggle(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedCheckViewAdminOptions : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = check_admin_override(NULL);
+		return new_value;
+	}
+};
+
+/////////////////////////////////////
+// Enable Object Object Occlusion ///
+/////////////////////////////////////
+class LLAdvancedEnableObjectObjectOcclusion: public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+
+		bool new_value = gGLManager.mHasOcclusionQuery && LLFeatureManager::getInstance()->isFeatureAvailable(userdata.asString());
+		return new_value;
+	}
+};
+
+
+
+//////////////////
+// ADMIN STATUS //
+//////////////////
+
+
+class LLAdvancedRequestAdminStatus : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_god_mode(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedLeaveAdminStatus : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_leave_god_mode(NULL);
+		return true;
+	}
+};
+
+//////////////////////////
+// Advanced > Debugging //
+//////////////////////////
+
+
+class LLAdvancedForceErrorBreakpoint : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		force_error_breakpoint(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedForceErrorLlerror : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		force_error_llerror(NULL);
+		return true;
+	}
+};
+class LLAdvancedForceErrorBadMemoryAccess : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		force_error_bad_memory_access(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedForceErrorInfiniteLoop : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		force_error_infinite_loop(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedForceErrorSoftwareException : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		force_error_software_exception(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedForceErrorDriverCrash : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		force_error_driver_crash(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedForceErrorDisconnectViewer : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_disconnect_viewer(NULL);
+		return true;
+	}
+};
+
+
+#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
+
+class LLAdvancedHandleToggleHackedGodmode : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_toggle_hacked_godmode(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedCheckToggleHackedGodmode : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		check_toggle_hacked_godmode(NULL);
+		return true;
+	}
+};
+
+class LLAdvancedEnableToggleHackedGodmode : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = enable_toggle_hacked_godmode(NULL);
+		return new_value;
+	}
+};
+#endif
+
+
+//
+////-------------------------------------------------------------------
+//// Advanced menu
+////-------------------------------------------------------------------
+
+//////////////////
+// ADMIN MENU   //
+//////////////////
+
+// Admin > Object
+class LLAdminForceTakeCopy : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		force_take_copy(NULL);
+		return true;
+	}
+};
+
+class LLAdminHandleObjectOwnerSelf : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_object_owner_self(NULL);
+		return true;
+	}
+};
+class LLAdminHandleObjectOwnerPermissive : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_object_owner_permissive(NULL);
+		return true;
+	}
+};
+
+class LLAdminHandleForceDelete : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_force_delete(NULL);
+		return true;
+	}
+};
+
+class LLAdminHandleObjectLock : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_object_lock(NULL);
+		return true;
+	}
+};
+
+class LLAdminHandleObjectAssetIDs: public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_object_asset_ids(NULL);
+		return true;
+	}
+};
+
+//Admin >Parcel
+class LLAdminHandleForceParcelOwnerToMe: public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_force_parcel_owner_to_me(NULL);
+		return true;
+	}
+};
+class LLAdminHandleForceParcelToContent: public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_force_parcel_to_content(NULL);
+		return true;
+	}
+};
+class LLAdminHandleClaimPublicLand: public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_claim_public_land(NULL);
+		return true;
+	}
+};
+
+// Admin > Region
+class LLAdminHandleRegionDumpTempAssetData: public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		handle_region_dump_temp_asset_data(NULL);
+		return true;
+	}
+};
+//Admin (Top Level)
+class LLAdminShowGodTools: public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLFloaterGodTools::showInstance(LLSD());
+		return true;
+	}
+};
+
+class LLAdminOnSaveState: public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLPanelRegionTools::onSaveState(NULL);
+		return true;
+	}
+};
+
+
+//-----------------------------------------------------------------------------
+// cleanup_menus()
+//-----------------------------------------------------------------------------
+void cleanup_menus()
+{
+	delete gMenuParcelObserver;
+	gMenuParcelObserver = NULL;
+
+	delete gPieSelf;
+	gPieSelf = NULL;
+
+	delete gPieAvatar;
+	gPieAvatar = NULL;
+
+	delete gPieObject;
+	gPieObject = NULL;
 
 	delete gPieAttachment;
 	gPieAttachment = NULL;
@@ -1499,8 +2453,6 @@ void cleanup_menus()
 
 	delete gMenuHolder;
 	gMenuHolder = NULL;
-
-	sMenus.clear();
 }
 
 //-----------------------------------------------------------------------------
@@ -1509,7 +2461,7 @@ void cleanup_menus()
 
 class LLObjectReportAbuse : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
 		if (objectp)
@@ -1523,17 +2475,16 @@ class LLObjectReportAbuse : public view_listener_t
 // Enabled it you clicked an object
 class LLObjectEnableReportAbuse : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 0;
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLObjectTouch : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
 		if (!object) return true;
@@ -1584,11 +2535,10 @@ class LLObjectTouch : public view_listener_t
 // One object must have touch sensor
 class LLObjectEnableTouch : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
 		bool new_value = obj && obj->flagHandleTouch();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
 
 		// Update label based on the node touch name if available.
 		LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
@@ -1598,25 +2548,25 @@ class LLObjectEnableTouch : public view_listener_t
 		}
 		else
 		{
-			gMenuHolder->childSetText("Object Touch", userdata["data"].asString());
+			gMenuHolder->childSetText("Object Touch", userdata.asString());
 		}
 
-		return true;
+		return new_value;
 	}
 };
 
-void label_touch(std::string& label, void*)
-{
-	LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
-	if (node && node->mValid && !node->mTouchName.empty())
-	{
-		label.assign(node->mTouchName);
-	}
-	else
-	{
-		label.assign("Touch");
-	}
-}
+//void label_touch(std::string& label, void*)
+//{
+//	LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
+//	if (node && node->mValid && !node->mTouchName.empty())
+//	{
+//		label.assign(node->mTouchName);
+//	}
+//	else
+//	{
+//		label.assign("Touch");
+//	}
+//}
 
 bool handle_object_open()
 {
@@ -1629,7 +2579,7 @@ bool handle_object_open()
 
 class LLObjectOpen : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		return handle_object_open();
 	}
@@ -1637,7 +2587,7 @@ class LLObjectOpen : public view_listener_t
 
 class LLObjectEnableOpen : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// Look for contents in root object, which is all the LLFloaterOpenObject
 		// understands.
@@ -1649,96 +2599,14 @@ class LLObjectEnableOpen : public view_listener_t
 			if (!root) new_value = false;
 			else new_value = root->allowOpen();
 		}
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
-	}
-};
-
-
-class LLViewCheckBuildMode : public view_listener_t
-{
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-	{
-		bool new_value = LLToolMgr::getInstance()->inEdit();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
-	}
-};
-
-bool toggle_build_mode()
-{
-	if (LLToolMgr::getInstance()->inBuildMode())
-	{
-		if (gSavedSettings.getBOOL("EditCameraMovement"))
-		{
-			// just reset the view, will pull us out of edit mode
-			handle_reset_view();
-		}
-		else
-		{
-			// manually disable edit mode, but do not affect the camera
-			gAgent.resetView(false);
-			gFloaterTools->close();
-			gViewerWindow->showCursor();			
-		}
-		// avoid spurious avatar movements pulling out of edit mode
-		LLViewerJoystick::getInstance()->setNeedsReset();
-	}
-	else
-	{
-		ECameraMode camMode = gAgent.getCameraMode();
-		if (CAMERA_MODE_MOUSELOOK == camMode ||	CAMERA_MODE_CUSTOMIZE_AVATAR == camMode)
-		{
-			// pull the user out of mouselook or appearance mode when entering build mode
-			handle_reset_view();
-		}
-
-		if (gSavedSettings.getBOOL("EditCameraMovement"))
-		{
-			// camera should be set
-			if (LLViewerJoystick::getInstance()->getOverrideCamera())
-			{
-				handle_toggle_flycam();
-			}
-				
-			if (gAgent.getFocusOnAvatar())
-			{
-				// zoom in if we're looking at the avatar
-				gAgent.setFocusOnAvatar(FALSE, ANIMATE);
-				gAgent.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis()));
-				gAgent.cameraZoomIn(0.666f);
-				gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD );
-			}
-		}
-
-		
-		LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
-		LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() );
-
-		// Could be first use
-		LLFirstUse::useBuild();
-
-		gAgent.resetView(false);
-
-		// avoid spurious avatar movements
-		LLViewerJoystick::getInstance()->setNeedsReset();
-
-	}
-	return true;
-}
-
-class LLViewBuildMode : public view_listener_t
-{
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-	{
-		return toggle_build_mode();
+		return new_value;
 	}
 };
 
 
 class LLViewJoystickFlycam : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		handle_toggle_flycam();
 		return true;
@@ -1747,31 +2615,13 @@ class LLViewJoystickFlycam : public view_listener_t
 
 class LLViewCheckJoystickFlycam : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-	{
-		bool new_val = LLViewerJoystick::getInstance()->getOverrideCamera();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_val);
-		return true;
-	}
-};
-
-class LLViewCommunicate : public view_listener_t
-{
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
-		if (LLFloaterChatterBox::getInstance()->getFloaterCount() == 0)
-		{
-			LLFloaterMyFriends::toggleInstance();
-		}
-		else
-		{
-			LLFloaterChatterBox::toggleInstance();
-		}
-		return true;
+		bool new_value = LLViewerJoystick::getInstance()->getOverrideCamera();
+		return new_value;
 	}
 };
 
-
 void handle_toggle_flycam()
 {
 	LLViewerJoystick::getInstance()->toggleFlycam();
@@ -1779,7 +2629,7 @@ void handle_toggle_flycam()
 
 class LLObjectBuild : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") )
 		{
@@ -1807,7 +2657,7 @@ class LLObjectBuild : public view_listener_t
 
 class LLObjectEdit : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLViewerParcelMgr::getInstance()->deselectLand();
 
@@ -1830,15 +2680,15 @@ class LLObjectEdit : public view_listener_t
 				{
 				// zoom in on object center instead of where we clicked, as we need to see the manipulator handles
 					gAgent.setFocusGlobal(selected_objectp->getPositionGlobal(), selected_objectp->getID());
-				gAgent.cameraZoomIn(0.666f);
-				gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD );
-				gViewerWindow->moveCursorToCenter();
+					gAgent.cameraZoomIn(0.666f);
+					gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD );
+					gViewerWindow->moveCursorToCenter();
+				}
 			}
 		}
-		}
 
-		gFloaterTools->open();		/* Flawfinder: ignore */
-	
+		LLFloaterReg::showInstance("build");
+
 		LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
 		gFloaterTools->setEditTool( LLToolCompTranslate::getInstance() );
 
@@ -1853,7 +2703,7 @@ class LLObjectEdit : public view_listener_t
 
 class LLObjectInspect : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLFloaterInspect::show();
 		return true;
@@ -1866,7 +2716,7 @@ class LLObjectInspect : public view_listener_t
 //---------------------------------------------------------------------------
 class LLLandBuild : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLViewerParcelMgr::getInstance()->deselectLand();
 
@@ -1898,7 +2748,7 @@ class LLLandBuild : public view_listener_t
 
 class LLLandBuyPass : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLPanelLandGeneral::onClickBuyPass((void *)FALSE);
 		return true;
@@ -1907,11 +2757,10 @@ class LLLandBuyPass : public view_listener_t
 
 class LLLandEnableBuyPass : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLPanelLandGeneral::enableBuyPass(NULL);
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
@@ -1947,7 +2796,7 @@ BOOL enable_object_build(void*)
 
 class LLEnableEdit : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// *HACK:  The new "prelude" Help Islands have a build sandbox area,
 		// so users need the Edit and Create pie menu options when they are
@@ -1960,14 +2809,13 @@ class LLEnableEdit : public view_listener_t
 			enable = LLViewerParcelMgr::getInstance()->agentCanBuild()
 				|| LLSelectMgr::getInstance()->getSelection()->isAttachment();
 		}
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(enable);
-		return true;
+		return enable;
 	}
 };
 
 class LLSelfRemoveAllAttachments : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLAgent::userRemoveAllAttachments(NULL);
 		return true;
@@ -1976,14 +2824,14 @@ class LLSelfRemoveAllAttachments : public view_listener_t
 
 class LLSelfEnableRemoveAllAttachments : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = false;
 		if (gAgent.getAvatarObject())
 		{
 			LLVOAvatar* avatarp = gAgent.getAvatarObject();
 			for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); 
-				 iter != avatarp->mAttachmentPoints.end(); )
+				iter != avatarp->mAttachmentPoints.end(); )
 			{
 				LLVOAvatar::attachment_map_t::iterator curiter = iter++;
 				LLViewerJointAttachment* attachment = curiter->second;
@@ -1994,8 +2842,7 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t
 				}
 			}
 		}
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
@@ -2008,19 +2855,19 @@ BOOL enable_has_attachments(void*)
 //---------------------------------------------------------------------------
 // Avatar pie menu
 //---------------------------------------------------------------------------
-void handle_follow(void *userdata)
-{
-	// follow a given avatar by ID
-	LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
-	if (objectp)
-	{
-		gAgent.startFollowPilot(objectp->getID());
-	}
-}
+//void handle_follow(void *userdata)
+//{
+//	// follow a given avatar by ID
+//	LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
+//	if (objectp)
+//	{
+//		gAgent.startFollowPilot(objectp->getID());
+//	}
+//}
 
 class LLObjectEnableMute : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
 		bool new_value = (object != NULL);
@@ -2036,18 +2883,17 @@ class LLObjectEnableMute : public view_listener_t
 				new_value = !is_linden && !is_self;
 			}
 		}
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLObjectMute : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
 		if (!object) return true;
-		
+
 		LLUUID id;
 		std::string name;
 		LLMute::EType type;
@@ -2064,7 +2910,7 @@ class LLObjectMute : public view_listener_t
 				name += " ";
 				name += lastname->getString();
 			}
-			
+
 			type = LLMute::AGENT;
 		}
 		else
@@ -2077,10 +2923,10 @@ class LLObjectMute : public view_listener_t
 			{
 				name = node->mName;
 			}
-			
+
 			type = LLMute::OBJECT;
 		}
-		
+
 		LLMute mute(id, name, type);
 		if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName))
 		{
@@ -2091,7 +2937,7 @@ class LLObjectMute : public view_listener_t
 			LLMuteList::getInstance()->add(mute);
 			LLFloaterMute::showInstance();
 		}
-		
+
 		return true;
 	}
 };
@@ -2129,12 +2975,26 @@ bool handle_go_to()
 
 class LLGoToObject : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		return handle_go_to();
 	}
 };
 
+class LLAvatarReportAbuse : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
+		if(avatar)
+		{
+			LLFloaterReporter::showFromObject(avatar->getID());
+		}
+		return true;
+	}
+};
+
+
 //---------------------------------------------------------------------------
 // Parcel freeze, eject, etc.
 //---------------------------------------------------------------------------
@@ -2173,7 +3033,7 @@ bool callback_freeze(const LLSD& notification, const LLSD& response)
 
 class LLAvatarFreeze : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
 		if( avatar )
@@ -2205,27 +3065,23 @@ class LLAvatarFreeze : public view_listener_t
 
 class LLAvatarVisibleDebug : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
-		bool new_value = gAgent.isGodlike();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return gAgent.isGodlike();
 	}
 };
 
 class LLAvatarEnableDebug : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
-		bool new_value = gAgent.isGodlike();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return gAgent.isGodlike();
 	}
 };
 
 class LLAvatarDebug : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
 		if( avatar )
@@ -2298,7 +3154,7 @@ bool callback_eject(const LLSD& notification, const LLSD& response)
 
 class LLAvatarEject : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
 		if( avatar )
@@ -2357,7 +3213,7 @@ class LLAvatarEject : public view_listener_t
 
 class LLAvatarEnableFreezeEject : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
 		bool new_value = (avatar != NULL);
@@ -2380,14 +3236,13 @@ class LLAvatarEnableFreezeEject : public view_listener_t
 			}
 		}
 
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLAvatarGiveCard : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		llinfos << "handle_give_card()" << llendl;
 		LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
@@ -2442,7 +3297,7 @@ void login_done(S32 which, void *user)
 {
 	llinfos << "Login done " << which << llendl;
 
-	LLPanelLogin::close();
+	LLPanelLogin::closePanel();
 }
 
 
@@ -2464,33 +3319,23 @@ bool callback_leave_group(const LLSD& notification, const LLSD& response)
 	return false;
 }
 
-void handle_leave_group(void *)
-{
-	if (gAgent.getGroupID() != LLUUID::null)
-	{
-		LLSD args;
-		args["GROUP"] = gAgent.mGroupName;
-		LLNotifications::instance().add("GroupLeaveConfirmMember", args, LLSD(), callback_leave_group);
-	}
-}
-
 void append_aggregate(std::string& string, const LLAggregatePermissions& ag_perm, PermissionBit bit, const char* txt)
 {
 	LLAggregatePermissions::EValue val = ag_perm.getValue(bit);
 	std::string buffer;
 	switch(val)
 	{
-	  case LLAggregatePermissions::AP_NONE:
+	case LLAggregatePermissions::AP_NONE:
 		buffer = llformat( "* %s None\n", txt);
 		break;
-	  case LLAggregatePermissions::AP_SOME:
+	case LLAggregatePermissions::AP_SOME:
 		buffer = llformat( "* %s Some\n", txt);
 		break;
-	  case LLAggregatePermissions::AP_ALL:
+	case LLAggregatePermissions::AP_ALL:
 		buffer = llformat( "* %s All\n", txt);
 		break;
-	  case LLAggregatePermissions::AP_EMPTY:
-	  default:
+	case LLAggregatePermissions::AP_EMPTY:
+	default:
 		break;
 	}
 	string.append(buffer);
@@ -2498,32 +3343,31 @@ void append_aggregate(std::string& string, const LLAggregatePermissions& ag_perm
 
 BOOL enable_buy(void*)
 {
-    // In order to buy, there must only be 1 purchaseable object in
-    // the selection manger.
+	// In order to buy, there must only be 1 purchaseable object in
+	// the selection manger.
 	if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != 1) return FALSE;
-    LLViewerObject* obj = NULL;
-    LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
+	LLViewerObject* obj = NULL;
+	LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
 	if(node)
-    {
-        obj = node->getObject();
-        if(!obj) return FALSE;
+	{
+		obj = node->getObject();
+		if(!obj) return FALSE;
 
 		if(node->mSaleInfo.isForSale() && node->mPermissions->getMaskOwner() & PERM_TRANSFER &&
 			(node->mPermissions->getMaskOwner() & PERM_COPY || node->mSaleInfo.getSaleType() != LLSaleInfo::FS_COPY))
 		{
 			if(obj->permAnyOwner()) return TRUE;
 		}
-    }
+	}
 	return FALSE;
 }
 
 class LLObjectEnableBuy : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = enable_buy(NULL);
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
@@ -2557,7 +3401,7 @@ void handle_buy_object(LLSaleInfo sale_info)
 	}
 
 	S32 price = sale_info.getSalePrice();
-	
+
 	if (price > 0 && price > gStatusBar->getBalance())
 	{
 		LLFloaterBuyCurrency::buyCurrency("This object costs", price);
@@ -2641,7 +3485,7 @@ void handle_dump_focus(void *)
 
 class LLSelfStandUp : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
 		return true;
@@ -2650,11 +3494,10 @@ class LLSelfStandUp : public view_listener_t
 
 class LLSelfEnableStandUp : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting;
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
@@ -2698,13 +3541,13 @@ void set_god_level(U8 god_level)
 	// inventory in items may change in god mode
 	gObjectList.dirtyAllObjectInventory();
 
-        if(gViewerWindow)
-        {
-            gViewerWindow->setMenuBackgroundColor(god_level > GOD_NOT,
-            LLViewerLogin::getInstance()->isInProductionGrid());
-        }
-    
-        LLSD args;
+    if(gViewerWindow)
+    {
+        gViewerWindow->setMenuBackgroundColor(god_level > GOD_NOT,
+        LLViewerLogin::getInstance()->isInProductionGrid());
+    }
+
+    LLSD args;
 	if(god_level > GOD_NOT)
 	{
 		args["LEVEL"] = llformat("%d",(S32)god_level);
@@ -2716,7 +3559,6 @@ void set_god_level(U8 god_level)
 		LLNotifications::instance().add("LeavingGodMode", args);
 	}
 
-
 	// changing god-level can affect which menus we see
 	show_debug_menus();
 }
@@ -2732,6 +3574,11 @@ BOOL check_toggle_hacked_godmode(void*)
 {
 	return gHackGodmode;
 }
+
+bool enable_toggle_hacked_godmode(void*)
+{
+  return !LLViewerLogin::getInstance()->isInProductionGrid();
+}
 #endif
 
 void process_grant_godlike_powers(LLMessageSystem* msg, void**)
@@ -2800,35 +3647,15 @@ BOOL is_agent_mappable(const LLUUID& agent_id)
 		);
 }
 
-// Enable a menu item when you have someone's card.
-/*
-BOOL enable_have_card(void *userdata)
-{
-	LLUUID* avatar_id = (LLUUID *)userdata;
-	if (gAgent.isGodlike())
-	{
-		return TRUE;
-	}
-	else if(avatar_id)
-	{
-		return is_agent_friend(*avatar_id);
-	}
-	else
-	{
-		return FALSE;
-	}
-}
-*/
 
 // Enable a menu item when you don't have someone's card.
 class LLAvatarEnableAddFriend : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
 		bool new_value = avatar && !is_agent_friend(avatar->getID());
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
@@ -2863,11 +3690,10 @@ void request_friendship(const LLUUID& dest_id)
 
 class LLEditEnableCustomizeAvatar : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = gAgent.areWearablesLoaded();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
@@ -2891,6 +3717,7 @@ bool handle_sit_or_stand()
 
 	if (object && object->getPCode() == LL_PCODE_VOLUME)
 	{
+
 		gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
 		gMessageSystem->nextBlockFast(_PREHASH_AgentData);
 		gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
@@ -2906,7 +3733,7 @@ bool handle_sit_or_stand()
 
 class LLObjectSitOrStand : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		return handle_sit_or_stand();
 	}
@@ -2926,13 +3753,13 @@ void near_sit_down_point(BOOL success, void *)
 
 class LLLandSit : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
 		LLViewerParcelMgr::getInstance()->deselectLand();
 
 		LLVector3d posGlobal = LLToolPie::getInstance()->getPick().mPosGlobal;
-		
+
 		LLQuaternion target_rot;
 		if (gAgent.getAvatarObject())
 		{
@@ -2947,136 +3774,50 @@ class LLLandSit : public view_listener_t
 	}
 };
 
-void show_permissions_control(void*)
-{
-	LLFloaterPermissionsMgr* floaterp = LLFloaterPermissionsMgr::show();
-	floaterp->mPermissions->addPermissionsData("foo1", LLUUID::null, 0);
-	floaterp->mPermissions->addPermissionsData("foo2", LLUUID::null, 0);
-	floaterp->mPermissions->addPermissionsData("foo3", LLUUID::null, 0);
-}
-
-
-class LLCreateLandmarkCallback : public LLInventoryCallback
-{
-public:
-	/*virtual*/ void fire(const LLUUID& inv_item)
-	{
-		llinfos << "Created landmark with inventory id " << inv_item
-			<< llendl;
-	}
-};
-
-void reload_ui(void *)
-{
-	LLUICtrlFactory::getInstance()->rebuild();
-}
-
-class LLWorldFly : public view_listener_t
-{
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-	{
-		gAgent.toggleFlying();
-		return true;
-	}
-};
-
-class LLWorldEnableFly : public view_listener_t
-{
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-	{
-		BOOL sitting = FALSE;
-		if (gAgent.getAvatarObject())
-		{
-			sitting = gAgent.getAvatarObject()->mIsSitting;
-		}
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(!sitting);
-		return true;
-	}
-};
-
-
-void handle_agent_stop_moving(void*)
-{
-	// stop agent
-	gAgent.setControlFlags(AGENT_CONTROL_STOP);
-
-	// cancel autopilot
-	gAgent.stopAutoPilot();
-}
-
-void print_packets_lost(void*)
-{
-	LLWorld::getInstance()->printPacketsLost();
-}
-
-
-void drop_packet(void*)
-{
-	gMessageSystem->mPacketRing.dropPackets(1);
-}
-
-
-void velocity_interpolate( void* data )
-{
-	BOOL toggle = gSavedSettings.getBOOL("VelocityInterpolate");
-	LLMessageSystem* msg = gMessageSystem;
-	if ( !toggle )
-	{
-		msg->newMessageFast(_PREHASH_VelocityInterpolateOn);
-		msg->nextBlockFast(_PREHASH_AgentData);
-		msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
-		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
-		gAgent.sendReliableMessage();
-		llinfos << "Velocity Interpolation On" << llendl;
-	}
-	else
-	{
-		msg->newMessageFast(_PREHASH_VelocityInterpolateOff);
-		msg->nextBlockFast(_PREHASH_AgentData);
-		msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
-		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
-		gAgent.sendReliableMessage();
-		llinfos << "Velocity Interpolation Off" << llendl;
-	}
-	// BUG this is a hack because of the change in menu behavior.  The
-	// old menu system would automatically change a control's value,
-	// but the new LLMenuGL system doesn't know what a control
-	// is. However, it's easy to distinguish between the two callers
-	// because LLMenuGL passes in the name of the user data (the
-	// control name) to the callback function, and the user data goes
-	// unused in the old menu code. Thus, if data is not null, then we
-	// need to swap the value of the control.
-	if( data )
-	{
-		gSavedSettings.setBOOL( static_cast<char*>(data), !toggle );
-	}
-}
-
-
-void toggle_wind_audio(void)
-{
-	if (gAudiop)
-	{
-		gAudiop->enableWind(!(gAudiop->isWindEnabled()));
-	}
-}
-
-
-// Callback for enablement
-BOOL is_inventory_visible( void* user_data )
-{
-	LLInventoryView* iv = reinterpret_cast<LLInventoryView*>(user_data);
-	if( iv )
-	{
-		return iv->getVisible();
-	}
-	return FALSE;
-}
+// ---legacy functions for landmark , not using anymore - angela  ---
+//void manage_landmarks(void*)
+//{
+//	LLFloaterLandmark::showInstance(1);
+//}
+//
+//void create_new_landmark(void*)
+//{
+//	// Note this is temporary cut and paste of legacy functionality.
+//	// TODO: Make this spawn a floater allowing user customize before creating the inventory object
+//
+//	LLViewerRegion* agent_region = gAgent.getRegion();
+//	if(!agent_region)
+//	{
+//		llwarns << "No agent region" << llendl;
+//		return;
+//	}
+//	LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+//	if (!agent_parcel)
+//	{
+//		llwarns << "No agent parcel" << llendl;
+//		return;
+//	}
+//	if (!agent_parcel->getAllowLandmark()
+//		&& !LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK))
+//	{
+//		gViewerWindow->alertXml("CannotCreateLandmarkNotOwner");
+//		return;
+//	}
+//
+//	LLUUID folder_id;
+//	folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
+//	std::string pos_string;
+//	gAgent.buildLocationString(pos_string);
+//
+//	create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
+//		folder_id, LLTransactionID::tnull,
+//		pos_string, pos_string, // name, desc
+//		LLAssetType::AT_LANDMARK,
+//		LLInventoryType::IT_LANDMARK,
+//		NOT_WEARABLE, PERM_ALL, 
+//		NULL);
+//}
 
-void handle_show_newest_map(void*)
-{
-	LLFloaterWorldMap::show(NULL, FALSE);
-}
 
 //-------------------------------------------------------------------
 // Help menu functions
@@ -3085,24 +3826,24 @@ void handle_show_newest_map(void*)
 //
 // Major mode switching
 //
-void reset_view_final( BOOL proceed, void* );
+void reset_view_final( BOOL proceed );
 
 void handle_reset_view()
 {
 	if( (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode()) && gFloaterCustomize )
 	{
 		// Show dialog box if needed.
-		gFloaterCustomize->askToSaveIfDirty( reset_view_final, NULL );
+		gFloaterCustomize->askToSaveIfDirty( reset_view_final );
 	}
 	else
 	{
-		reset_view_final( TRUE, NULL );
+		reset_view_final( TRUE );
 	}
 }
 
 class LLViewResetView : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		handle_reset_view();
 		return true;
@@ -3110,7 +3851,7 @@ class LLViewResetView : public view_listener_t
 };
 
 // Note: extra parameters allow this function to be called from dialog.
-void reset_view_final( BOOL proceed, void* ) 
+void reset_view_final( BOOL proceed ) 
 {
 	if( !proceed )
 	{
@@ -3122,7 +3863,7 @@ void reset_view_final( BOOL proceed, void* )
 
 class LLViewLookAtLastChatter : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		gAgent.lookAtLastChat();
 		return true;
@@ -3131,7 +3872,7 @@ class LLViewLookAtLastChatter : public view_listener_t
 
 class LLViewMouselook : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if (!gAgent.cameraMouselook())
 		{
@@ -3147,7 +3888,7 @@ class LLViewMouselook : public view_listener_t
 
 class LLViewFullscreen : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		gViewerWindow->toggleFullscreen(TRUE);
 		return true;
@@ -3156,7 +3897,7 @@ class LLViewFullscreen : public view_listener_t
 
 class LLViewDefaultUISize : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		gSavedSettings.setF32("UIScaleFactor", 1.0f);
 		gSavedSettings.setBOOL("UIAutoScale", FALSE);	
@@ -3167,7 +3908,7 @@ class LLViewDefaultUISize : public view_listener_t
 
 class LLEditDuplicate : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if(LLEditMenuHandler::gEditMenuHandler)
 		{
@@ -3179,23 +3920,13 @@ class LLEditDuplicate : public view_listener_t
 
 class LLEditEnableDuplicate : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
-
-void disabled_duplicate(void*)
-{
-	if (LLSelectMgr::getInstance()->getSelection()->getPrimaryObject())
-	{
-		LLNotifications::instance().add("CopyFailed");
-	}
-}
-
 void handle_duplicate_in_place(void*)
 {
 	llinfos << "handle_duplicate_in_place" << llendl;
@@ -3204,11 +3935,6 @@ void handle_duplicate_in_place(void*)
 	LLSelectMgr::getInstance()->selectDuplicate(offset, TRUE);
 }
 
-void handle_repeat_duplicate(void*)
-{
-	LLSelectMgr::getInstance()->repeatDuplicate();
-}
-
 /* dead code 30-apr-2008
 void handle_deed_object_to_group(void*)
 {
@@ -3356,41 +4082,10 @@ void handle_claim_public_land(void*)
 	msg->addString("Parameter", buffer);
 	buffer = llformat( "%f", east_north.mV[VY]);
 	msg->nextBlock("ParamList");
-	msg->addString("Parameter", buffer);
-	gAgent.sendReliableMessage();
-}
-
-void handle_god_request_havok(void *)
-{
-	if (gAgent.isGodlike())
-	{
-		LLSelectMgr::getInstance()->sendGodlikeRequest("havok", "infoverbose");
-	}
+	msg->addString("Parameter", buffer);
+	gAgent.sendReliableMessage();
 }
 
-//void handle_god_request_foo(void *)
-//{
-//	if (gAgent.isGodlike())
-//	{
-//		LLSelectMgr::getInstance()->sendGodlikeRequest(GOD_WANTS_FOO);
-//	}
-//}
-
-//void handle_god_request_terrain_save(void *)
-//{
-//	if (gAgent.isGodlike())
-//	{
-//		LLSelectMgr::getInstance()->sendGodlikeRequest("terrain", "save");
-//	}
-//}
-
-//void handle_god_request_terrain_load(void *)
-//{
-//	if (gAgent.isGodlike())
-//	{
-//		LLSelectMgr::getInstance()->sendGodlikeRequest("terrain", "load");
-//	}
-//}
 
 
 // HACK for easily testing new avatar geometry
@@ -3403,12 +4098,6 @@ void handle_god_request_avatar_geometry(void *)
 }
 
 
-void handle_show_overlay_title(void*)
-{
-	gShowOverlayTitle = !gShowOverlayTitle;
-	gSavedSettings.setBOOL("ShowOverlayTitle", gShowOverlayTitle);
-}
-
 void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
 {
 	if(gAgent.cameraMouselook())
@@ -3419,12 +4108,12 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
 
 	std::string error;
 	LLDynamicArray<LLViewerObject*> derez_objects;
-	
+
 	// Check conditions that we can't deal with, building a list of
 	// everything that we'll actually be derezzing.
 	LLViewerRegion* first_region = NULL;
 	for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin();
-		 iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++)
+		iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++)
 	{
 		LLSelectNode* node = *iter;
 		LLViewerObject* object = node->getObject();
@@ -3439,7 +4128,7 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
 			{
 				// Derez doesn't work at all if the some of the objects
 				// are in regions besides the first object selected.
-				
+
 				// ...crosses region boundaries
 				error = "AcquireErrorObjectSpan";
 				break;
@@ -3483,7 +4172,7 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
 		default:
 			if((node->mPermissions->allowTransferTo(gAgent.getID())
 				&& object->permCopy())
-			   || gAgent.isGodlike())
+				|| gAgent.isGodlike())
 			{
 				can_derez_current = TRUE;
 			}
@@ -3564,7 +4253,7 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
 
 class LLToolsTakeCopy : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true;
 
@@ -3579,10 +4268,10 @@ class LLToolsTakeCopy : public view_listener_t
 // You can return an object to its owner if it is on your land.
 class LLObjectReturn : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true;
-		
+
 		mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
 
 		LLNotifications::instance().add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&LLObjectReturn::onReturnToOwner, this, _1, _2));
@@ -3612,7 +4301,7 @@ protected:
 // over land you own.
 class LLObjectEnableReturn : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 #ifdef HACKED_GODLIKE_VIEWER
 		bool new_value = true;
@@ -3649,8 +4338,7 @@ class LLObjectEnableReturn : public view_listener_t
 			}
 		}
 #endif
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
@@ -3669,13 +4357,13 @@ void handle_take()
 	{
 		return;
 	}
-	
+
 	BOOL you_own_everything = TRUE;
 	BOOL locked_but_takeable_object = FALSE;
 	LLUUID category_id;
-	
+
 	for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
-		 iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
+		iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
 	{
 		LLSelectNode* node = *iter;
 		LLViewerObject* object = node->getObject();
@@ -3717,7 +4405,7 @@ void handle_take()
 		}
 		if(category_id.notNull())
 		{
-		        // check trash
+			// check trash
 			LLUUID trash;
 			trash = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
 			if(category_id == trash || gInventory.isObjectDescendentOf(category_id, trash))
@@ -3741,16 +4429,15 @@ void handle_take()
 	payload["folder_id"] = category_id;
 
 	LLNotification::Params params("ConfirmObjectTakeLock");
-	params.payload(payload)
-		.functor(confirm_take);
+	params.payload(payload);
+	params.functor.function(confirm_take);
 
 	if(locked_but_takeable_object ||
-	   !you_own_everything)
+		!you_own_everything)
 	{
 		if(locked_but_takeable_object && you_own_everything)
 		{
 			params.name("ConfirmObjectTakeLock");
-
 		}
 		else if(!locked_but_takeable_object && !you_own_everything)
 		{
@@ -3790,7 +4477,7 @@ BOOL enable_take()
 	}
 
 	for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin();
-		 iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++)
+		iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++)
 	{
 		LLSelectNode* node = *iter;
 		LLViewerObject* object = node->getObject();
@@ -3805,14 +4492,14 @@ BOOL enable_take()
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
 		if (!LLViewerLogin::getInstance()->isInProductionGrid() 
-            && gAgent.isGodlike())
+			&& gAgent.isGodlike())
 		{
 			return TRUE;
 		}
 # endif
 		if((node->mPermissions->allowTransferTo(gAgent.getID())
 			&& object->permModify())
-		   || (node->mPermissions->getOwner() == gAgent.getID()))
+			|| (node->mPermissions->getOwner() == gAgent.getID()))
 		{
 			return TRUE;
 		}
@@ -3823,7 +4510,7 @@ BOOL enable_take()
 
 class LLToolsBuyOrTake : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if (LLSelectMgr::getInstance()->getSelection()->isEmpty())
 		{
@@ -3854,17 +4541,16 @@ class LLToolsBuyOrTake : public view_listener_t
 
 class LLToolsEnableBuyOrTake : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool is_buy = is_selection_buy_not_take();
 		bool new_value = is_buy ? enable_buy(NULL) : enable_take();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
 
 		// Update label
 		std::string label;
 		std::string buy_text;
 		std::string take_text;
-		std::string param = userdata["data"].asString();
+		std::string param = userdata.asString();
 		std::string::size_type offset = param.find(",");
 		if (offset != param.npos)
 		{
@@ -3882,7 +4568,7 @@ class LLToolsEnableBuyOrTake : public view_listener_t
 		gMenuHolder->childSetText("Pie Object Take", label);
 		gMenuHolder->childSetText("Menu Object Take", label);
 
-		return true;
+		return new_value;
 	}
 };
 
@@ -3905,7 +4591,7 @@ class LLToolsEnableBuyOrTake : public view_listener_t
 BOOL is_selection_buy_not_take()
 {
 	for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
-		 iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
+		iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
 	{
 		LLSelectNode* node = *iter;
 		LLViewerObject* obj = node->getObject();
@@ -3923,7 +4609,7 @@ S32 selection_price()
 {
 	S32 total_price = 0;
 	for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
-		 iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
+		iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
 	{
 		LLSelectNode* node = *iter;
 		LLViewerObject* obj = node->getObject();
@@ -3937,42 +4623,36 @@ S32 selection_price()
 
 	return total_price;
 }
-
+/*
 bool callback_show_buy_currency(const LLSD& notification, const LLSD& response)
 {
 	S32 option = LLNotification::getSelectedOption(notification, response);
 	if (0 == option)
 	{
-		llinfos << "Loading page " << BUY_CURRENCY_URL << llendl;
-		LLWeb::loadURL(BUY_CURRENCY_URL);
+		llinfos << "Loading page " << LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL") << llendl;
+		LLWeb::loadURL(LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL"));
 	}
 	return false;
 }
-
+*/
 
 void show_buy_currency(const char* extra)
 {
 	// Don't show currency web page for branded clients.
-
+/*
 	std::ostringstream mesg;
 	if (extra != NULL)
 	{	
 		mesg << extra << "\n \n";
 	}
-	mesg << "Go to " << BUY_CURRENCY_URL << "\nfor information on purchasing currency?";
-
+	mesg << "Go to " << LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL")<< "\nfor information on purchasing currency?";
+*/
 	LLSD args;
 	if (extra != NULL)
 	{
 		args["EXTRA"] = extra;
 	}
-	args["URL"] = BUY_CURRENCY_URL;
-	LLNotifications::instance().add("PromptGoToCurrencyPage", args, LLSD(), callback_show_buy_currency);
-}
-
-void handle_buy_currency(void*)
-{
-//	LLFloaterBuyCurrency::buyCurrency();
+	LLNotifications::instance().add("PromptGoToCurrencyPage", args);//, LLSD(), callback_show_buy_currency);
 }
 
 void handle_buy(void*)
@@ -3995,7 +4675,7 @@ void handle_buy(void*)
 
 class LLObjectBuy : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		handle_buy(NULL);
 		return true;
@@ -4031,9 +4711,21 @@ BOOL sitting_on_selection()
 	return (avatar->mIsSitting && avatar->getRoot() == root_object);
 }
 
+class LLToolsSaveToInventory : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		if(enable_save_into_inventory(NULL))
+		{
+			derez_objects(DRD_SAVE_INTO_AGENT_INVENTORY, LLUUID::null);
+		}
+		return true;
+	}
+};
+
 class LLToolsSaveToObjectInventory : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
 		if(node && (node->mValid) && (!node->mFromTaskID.isNull()))
@@ -4048,12 +4740,12 @@ class LLToolsSaveToObjectInventory : public view_listener_t
 // Round the position of all root objects to the grid
 class LLToolsSnapObjectXY : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		F64 snap_size = (F64)gSavedSettings.getF32("GridResolution");
 
 		for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
-			 iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
+			iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
 		{
 			LLSelectNode* node = *iter;
 			LLViewerObject* obj = node->getObject();
@@ -4102,7 +4794,7 @@ class LLToolsSnapObjectXY : public view_listener_t
 // reasonable expectation for the link to work, but it will fail.
 class LLToolsEnableLink : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = false;
 		// check if there are at least 2 objects selected, and that the
@@ -4124,14 +4816,13 @@ class LLToolsEnableLink : public view_listener_t
 				new_value = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly);
 			}
 		}
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLToolsLink : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if(!LLSelectMgr::getInstance()->selectGetAllRootsValid())
 		{
@@ -4177,19 +4868,18 @@ class LLToolsLink : public view_listener_t
 
 class LLToolsEnableUnlink : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() &&
 			LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() &&
 			!LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLToolsUnlink : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLSelectMgr::getInstance()->sendDelink();
 		return true;
@@ -4199,7 +4889,7 @@ class LLToolsUnlink : public view_listener_t
 
 class LLToolsStopAllAnimations : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		gAgent.stopCurrentAnimations();
 		return true;
@@ -4208,7 +4898,7 @@ class LLToolsStopAllAnimations : public view_listener_t
 
 class LLToolsReleaseKeys : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		gAgent.forceReleaseControls();
 
@@ -4218,58 +4908,25 @@ class LLToolsReleaseKeys : public view_listener_t
 
 class LLToolsEnableReleaseKeys : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
-		gMenuHolder->findControl(userdata["control"].asString())->setValue( gAgent.anyControlGrabbed() );
-		return true;
+		return gAgent.anyControlGrabbed();
 	}
 };
 
-//void handle_hinge(void*)
-//{
-//	LLSelectMgr::getInstance()->sendHinge(1);
-//}
-
-//void handle_ptop(void*)
-//{
-//	LLSelectMgr::getInstance()->sendHinge(2);
-//}
-
-//void handle_lptop(void*)
-//{
-//	LLSelectMgr::getInstance()->sendHinge(3);
-//}
-
-//void handle_wheel(void*)
-//{
-//	LLSelectMgr::getInstance()->sendHinge(4);
-//}
-
-//void handle_dehinge(void*)
-//{
-//	LLSelectMgr::getInstance()->sendDehinge();
-//}
-
-//BOOL enable_dehinge(void*)
-//{
-//	LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject();
-//	return obj && !obj->isAttachment();
-//}
-
 
 class LLEditEnableCut : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canCut();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLEditCut : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if( LLEditMenuHandler::gEditMenuHandler )
 		{
@@ -4281,17 +4938,16 @@ class LLEditCut : public view_listener_t
 
 class LLEditEnableCopy : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canCopy();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLEditCopy : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if( LLEditMenuHandler::gEditMenuHandler )
 		{
@@ -4303,17 +4959,16 @@ class LLEditCopy : public view_listener_t
 
 class LLEditEnablePaste : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canPaste();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLEditPaste : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if( LLEditMenuHandler::gEditMenuHandler )
 		{
@@ -4325,17 +4980,16 @@ class LLEditPaste : public view_listener_t
 
 class LLEditEnableDelete : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLEditDelete : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// If a text field can do a deletion, it gets precedence over deleting
 		// an object in the world.
@@ -4349,14 +5003,14 @@ class LLEditDelete : public view_listener_t
 
 		// When deleting an object we may not actually be done
 		// Keep selection so we know what to delete when confirmation is needed about the delete
-		gPieObject->hide(TRUE);
+		gPieObject->hide();
 		return true;
 	}
 };
 
 class LLObjectEnableDelete : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = 
 #ifdef HACKED_GODLIKE_VIEWER
@@ -4364,27 +5018,17 @@ class LLObjectEnableDelete : public view_listener_t
 #else
 # ifdef TOGGLE_HACKED_GODLIKE_VIEWER
 			(!LLViewerLogin::getInstance()->isInProductionGrid()
-             && gAgent.isGodlike()) ||
+			&& gAgent.isGodlike()) ||
 # endif
 			LLSelectMgr::getInstance()->canDoDelete();
 #endif
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
-	}
-};
-
-class LLEditSearch : public view_listener_t
-{
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-	{
-		LLFloaterDirectory::toggleFind(NULL);
-		return true;
+		return new_value;
 	}
 };
 
 class LLObjectDelete : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if (LLSelectMgr::getInstance())
 		{
@@ -4396,7 +5040,7 @@ class LLObjectDelete : public view_listener_t
 
 		// When deleting an object we may not actually be done
 		// Keep selection so we know what to delete when confirmation is needed about the delete
-		gPieObject->hide(TRUE);
+		gPieObject->hide();
 		return true;
 	}
 };
@@ -4408,38 +5052,35 @@ void handle_force_delete(void*)
 
 class LLViewEnableJoystickFlycam : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = (gSavedSettings.getBOOL("JoystickEnabled") && gSavedSettings.getBOOL("JoystickFlycamEnabled"));
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLViewEnableLastChatter : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// *TODO: add check that last chatter is in range
 		bool new_value = (gAgent.cameraThirdPerson() && gAgent.getLastChatter().notNull());
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLEditEnableDeselect : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDeselect();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLEditDeselect : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if( LLEditMenuHandler::gEditMenuHandler )
 		{
@@ -4451,18 +5092,17 @@ class LLEditDeselect : public view_listener_t
 
 class LLEditEnableSelectAll : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canSelectAll();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 
 class LLEditSelectAll : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if( LLEditMenuHandler::gEditMenuHandler )
 		{
@@ -4475,17 +5115,16 @@ class LLEditSelectAll : public view_listener_t
 
 class LLEditEnableUndo : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canUndo();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLEditUndo : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canUndo() )
 		{
@@ -4497,17 +5136,16 @@ class LLEditUndo : public view_listener_t
 
 class LLEditEnableRedo : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canRedo();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLEditRedo : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canRedo() )
 		{
@@ -4549,25 +5187,26 @@ void show_debug_menus()
 	if ( gMenuBarView )
 	{
 		BOOL debug = gSavedSettings.getBOOL("UseDebugMenus");
-		
+
 		if(debug)
 		{
 			LLFirstUse::useDebugMenus();
 		}
 
-		gMenuBarView->setItemVisible(CLIENT_MENU_NAME, debug);
-		gMenuBarView->setItemEnabled(CLIENT_MENU_NAME, debug);
+		gMenuBarView->setItemVisible("Advanced", debug);
+		gMenuBarView->setItemEnabled("Advanced", debug);
+		
+		gMenuBarView->setItemVisible("Debug", debug);
+		gMenuBarView->setItemEnabled("Debug", debug);
 
+		gMenuBarView->setItemVisible("Develop", debug);
+		gMenuBarView->setItemEnabled("Develop", debug);
+		
 		// Server ('Admin') menu hidden when not in godmode.
 		const bool show_server_menu = debug && (gAgent.getGodLevel() > GOD_NOT);
-		gMenuBarView->setItemVisible(SERVER_MENU_NAME, show_server_menu);
-		gMenuBarView->setItemEnabled(SERVER_MENU_NAME, show_server_menu);
-
-		//gMenuBarView->setItemVisible("DebugOptions",	visible);
-		//gMenuBarView->setItemVisible(std::string(AVI_TOOLS),	visible);
-
-		gMenuBarView->arrange(); // clean-up positioning 
-	};
+		gMenuBarView->setItemVisible("Admin", show_server_menu);
+		gMenuBarView->setItemEnabled("Admin", show_server_menu);
+	}
 }
 
 void toggle_debug_menus(void*)
@@ -4615,27 +5254,12 @@ void toggle_debug_menus(void*)
 
 // 	gExportDialog = LLUploadDialog::modalUploadDialog("Exporting selected objects...");
 // }
+//
 
-BOOL menu_check_build_tool( void* user_data )
-{
-	S32 index = (intptr_t) user_data;
-	return LLToolMgr::getInstance()->getCurrentToolset()->isToolSelected( index );
-}
-
-void handle_reload_settings(void*)
-{
-	gSavedSettings.resetToDefaults();
-	gSavedSettings.loadFromFile(gSavedSettings.getString("ClientSettingsFile"));
-
-	llinfos << "Loading colors from colors.xml" << llendl;
-	std::string color_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"colors.xml");
-	gColors.resetToDefaults();
-	gColors.loadFromFileLegacy(color_file, FALSE, TYPE_COL4U);
-}
 
 class LLWorldSetHomeLocation : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// we just send the message and let the server check for failure cases
 		// server will echo back a "Home position set." alert if it succeeds
@@ -4647,7 +5271,7 @@ class LLWorldSetHomeLocation : public view_listener_t
 
 class LLWorldTeleportHome : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		gAgent.teleportHome();
 		return true;
@@ -4656,7 +5280,7 @@ class LLWorldTeleportHome : public view_listener_t
 
 class LLWorldAlwaysRun : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// as well as altering the default walk-vs-run state,
 		// we also change the *current* walk-vs-run state.
@@ -4680,17 +5304,16 @@ class LLWorldAlwaysRun : public view_listener_t
 
 class LLWorldCheckAlwaysRun : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = gAgent.getAlwaysRun();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLWorldSetAway : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if (gAgent.getAFK())
 		{
@@ -4706,7 +5329,7 @@ class LLWorldSetAway : public view_listener_t
 
 class LLWorldSetBusy : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if (gAgent.getBusy())
 		{
@@ -4741,7 +5364,7 @@ bool can_create_landmark()
 
 class LLWorldCreateLandmark : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if (!can_create_landmark())
 		{
@@ -4753,21 +5376,21 @@ class LLWorldCreateLandmark : public view_listener_t
 		folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
 		std::string pos_string;
 		gAgent.buildLocationString(pos_string);
-		
+
 		create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
 							  folder_id, LLTransactionID::tnull,
 							  pos_string, pos_string, // name, desc
 							  LLAssetType::AT_LANDMARK,
 							  LLInventoryType::IT_LANDMARK,
 							  NOT_WEARABLE, PERM_ALL, 
-							  new LLCreateLandmarkCallback);
+							  NULL);
 		return true;
 	}
 };
 
 class LLToolsLookAtSelection : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		const F32 PADDING_FACTOR = 2.f;
 		BOOL zoom = (userdata.asString() == "zoom");
@@ -4802,11 +5425,11 @@ class LLToolsLookAtSelection : public view_listener_t
 	}
 };
 
-void callback_invite_to_group(LLUUID group_id, void *user_data)
+void callback_invite_to_group(LLUUID group_id, LLUUID dest_id)
 {
 	std::vector<LLUUID> agent_ids;
-	agent_ids.push_back(*(LLUUID *)user_data);
-	
+	agent_ids.push_back(dest_id);
+
 	LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
 }
 
@@ -4821,14 +5444,14 @@ void invite_to_group(const LLUUID& dest_id)
 		{
 			widget->center();
 			widget->setPowersMask(GP_MEMBER_INVITE);
-			widget->setSelectCallback(callback_invite_to_group, (void *)&dest_id);
+			widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, dest_id));
 		}
 	}
 }
 
 class LLAvatarInviteToGroup : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
 		if(avatar)
@@ -4841,7 +5464,7 @@ class LLAvatarInviteToGroup : public view_listener_t
 
 class LLAvatarAddFriend : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
 		if(avatar && !is_agent_friend(avatar->getID()))
@@ -4891,7 +5514,7 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec
 bool handle_give_money_dialog()
 {
 	LLNotification::Params params("BusyModePay");
-	params.functor(boost::bind(complete_give_money, _1, _2, LLSelectMgr::getInstance()->getSelection()));
+	params.functor.function(boost::bind(complete_give_money, _1, _2, LLSelectMgr::getInstance()->getSelection()));
 
 	if (gAgent.getBusy())
 	{
@@ -4907,7 +5530,7 @@ bool handle_give_money_dialog()
 
 class LLPayObject : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		return handle_give_money_dialog();
 	}
@@ -4915,7 +5538,7 @@ class LLPayObject : public view_listener_t
 
 class LLEnablePayObject : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
 		bool new_value = (avatar != NULL);
@@ -4931,14 +5554,13 @@ class LLEnablePayObject : public view_listener_t
 				}
 			}
 		}
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLObjectEnableSitOrStand : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = false;
 		LLViewerObject* dest_object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
@@ -4950,13 +5572,11 @@ class LLObjectEnableSitOrStand : public view_listener_t
 				new_value = true;
 			}
 		}
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-
 		// Update label
 		std::string label;
 		std::string sit_text;
 		std::string stand_text;
-		std::string param = userdata["data"].asString();
+		std::string param = userdata.asString();
 		std::string::size_type offset = param.find(",");
 		if (offset != param.npos)
 		{
@@ -4981,7 +5601,7 @@ class LLObjectEnableSitOrStand : public view_listener_t
 		}
 		gMenuHolder->childSetText("Object Sit", label);
 
-		return true;
+		return new_value;
 	}
 };
 
@@ -5000,29 +5620,6 @@ void dump_inventory(void*)
 	gInventory.dumpInventory();
 }
 
-// forcibly unlock an object
-void handle_force_unlock(void*)
-{
-	// First, make it public.
-	LLSelectMgr::getInstance()->sendOwner(LLUUID::null, LLUUID::null, TRUE);
-
-	// Second, lie to the viewer and mark it editable and unowned
-
-	struct f : public LLSelectedObjectFunctor
-	{
-		virtual bool apply(LLViewerObject* object)
-		{
-			object->mFlags |= FLAGS_OBJECT_MOVE;
-			object->mFlags |= FLAGS_OBJECT_MODIFY;
-			object->mFlags |= FLAGS_OBJECT_COPY;
-
-			object->mFlags &= ~FLAGS_OBJECT_ANY_OWNER;
-			object->mFlags &= ~FLAGS_OBJECT_YOU_OWNER;
-			return true;
-		}
-	} func;
-	LLSelectMgr::getInstance()->getSelection()->applyToObjects(&func);
-}
 
 void handle_dump_followcam(void*)
 {
@@ -5039,10 +5636,9 @@ void handle_viewer_disable_message_log(void*)
 	gMessageSystem->stopLogging();
 }
 
-// TomY TODO: Move!
 class LLShowFloater : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string floater_name = userdata.asString();
 		if (floater_name == "gestures")
@@ -5056,30 +5652,10 @@ class LLShowFloater : public view_listener_t
 				gAgent.changeCameraToCustomizeAvatar();
 			}
 		}
-		else if (floater_name == "friends")
-		{
-			LLFloaterMyFriends::toggleInstance(0);
-		}
-		else if (floater_name == "preferences")
-		{
-			LLFloaterPreference::show(NULL);
-		}
 		else if (floater_name == "toolbar")
 		{
 			LLToolBar::toggle(NULL);
 		}
-		else if (floater_name == "chat history")
-		{
-			LLFloaterChat::toggleInstance(LLSD());
-		}
-		else if (floater_name == "im")
-		{
-			LLFloaterChatterBox::toggleInstance(LLSD());
-		}
-		else if (floater_name == "inventory")
-		{
-			LLInventoryView::toggleVisibility(NULL);
-		}
 		else if (floater_name == "mute list")
 		{
 			LLFloaterMute::toggleInstance();
@@ -5092,18 +5668,6 @@ class LLShowFloater : public view_listener_t
 		{
 			LLFloaterMove::toggleInstance();
 		}
-		else if (floater_name == "world map")
-		{
-			LLFloaterWorldMap::toggle(NULL);
-		}
-		else if (floater_name == "mini map")
-		{
-			LLFloaterMap::toggleInstance();
-		}
-		else if (floater_name == "stat bar")
-		{
-			LLFloaterStats::toggleInstance();
-		}
 		else if (floater_name == "my land")
 		{
 			LLFloaterLandHoldings::show(NULL);
@@ -5117,22 +5681,22 @@ class LLShowFloater : public view_listener_t
 
 			LLFloaterLand::showInstance();
 		}
+		else if (floater_name == "about region")
+		{
+			LLFloaterRegionInfo::showInstance();
+		}
 		else if (floater_name == "buy land")
 		{
 			if (LLViewerParcelMgr::getInstance()->selectionEmpty())
 			{
 				LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal());
 			}
-			
+
 			LLViewerParcelMgr::getInstance()->startBuyLand();
 		}
-		else if (floater_name == "about region")
-		{
-			LLFloaterRegionInfo::showInstance();
-		}
 		else if (floater_name == "grid options")
 		{
-			LLFloaterBuildOptions::show(NULL);
+			LLFloaterBuildOptions::showInstance();
 		}
 		else if (floater_name == "script errors")
 		{
@@ -5156,26 +5720,20 @@ class LLShowFloater : public view_listener_t
 		{
 			if (!gNoRender)
 			{
-				LLFloaterBump::show(NULL);
+				LLFloaterBump::showInstance();
 			}
 		}
 		else if (floater_name == "lag meter")
 		{
 			LLFloaterLagMeter::showInstance();
 		}
-		else if (floater_name == "bug reporter")
-		{
-			// Prevent menu from appearing in screen shot.
-			gMenuHolder->hideMenus();
-			LLFloaterReporter::showFromMenu(BUG_REPORT);
-		}
 		else if (floater_name == "buy currency")
 		{
 			LLFloaterBuyCurrency::buyCurrency();
 		}
 		else if (floater_name == "about")
 		{
-			LLFloaterAbout::show(NULL);
+			LLFloaterAbout::showInstance();
 		}
 		else if (floater_name == "active speakers")
 		{
@@ -5189,37 +5747,24 @@ class LLShowFloater : public view_listener_t
 		{
 			LLFloaterPerms::toggleInstance(LLSD());
 		}
+		else
+		{
+			LLFloaterReg::toggleInstance(floater_name);
+		}
 		return true;
 	}
 };
 
 class LLFloaterVisible : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
-		std::string control_name = userdata["control"].asString();
-		std::string floater_name = userdata["data"].asString();
+		std::string floater_name = userdata.asString();
 		bool new_value = false;
-		if (floater_name == "friends")
-		{
-			new_value = LLFloaterMyFriends::instanceVisible(0);
-		}
-		else if (floater_name == "communicate")
-		{
-			new_value = LLFloaterChatterBox::instanceVisible();
-		}
-		else if (floater_name == "toolbar")
+		if (floater_name == "toolbar")
 		{
 			new_value = LLToolBar::visible(NULL);
 		}
-		else if (floater_name == "chat history")
-		{
-			new_value = LLFloaterChat::instanceVisible();
-		}
-		else if (floater_name == "im")
-		{
-			new_value = LLFloaterMyFriends::instanceVisible(0);
-		}
 		else if (floater_name == "mute list")
 		{
 			new_value = LLFloaterMute::instanceVisible();
@@ -5234,7 +5779,7 @@ class LLFloaterVisible : public view_listener_t
 		}
 		else if (floater_name == "stat bar")
 		{
-			new_value = LLFloaterStats::instanceVisible();
+			new_value = gSavedSettings.getBOOL("ShowDebugStats");
 		}
 		else if (floater_name == "active speakers")
 		{
@@ -5244,13 +5789,11 @@ class LLFloaterVisible : public view_listener_t
 		{
 			new_value = LLFloaterBeacons::instanceVisible(LLSD());
 		}
-		else if (floater_name == "inventory")
+		else
 		{
-			LLInventoryView* iv = LLInventoryView::getActiveInventory(); 
-			new_value = (NULL != iv && TRUE == iv->getVisible());
+			new_value = LLFloaterReg::instanceVisible(floater_name);
 		}
-		gMenuHolder->findControl(control_name)->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
@@ -5266,7 +5809,7 @@ bool callback_show_url(const LLSD& notification, const LLSD& response)
 
 class LLPromptShowURL : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string param = userdata.asString();
 		std::string::size_type offset = param.find(",");
@@ -5306,7 +5849,7 @@ bool callback_show_file(const LLSD& notification, const LLSD& response)
 
 class LLPromptShowFile : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string param = userdata.asString();
 		std::string::size_type offset = param.find(",");
@@ -5329,7 +5872,7 @@ class LLPromptShowFile : public view_listener_t
 
 class LLShowAgentProfile : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLUUID agent_id;
 		if (userdata.asString() == "agent")
@@ -5358,44 +5901,9 @@ class LLShowAgentProfile : public view_listener_t
 	}
 };
 
-class LLShowAgentGroups : public view_listener_t
-{
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-	{
-		LLFloaterMyFriends::toggleInstance(1);
-		return true;
-	}
-};
-
-void handle_focus(void *)
-{
-	if (gDisconnected)
-	{
-		return;
-	}
-
-	if (gAgent.getFocusOnAvatar())
-	{
-		// zoom in if we're looking at the avatar
-		gAgent.setFocusOnAvatar(FALSE, ANIMATE);
-		gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick());
-		gAgent.cameraZoomIn(0.666f);
-	}
-	else
-	{
-		gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick());
-	}
-
-	gViewerWindow->moveCursorToCenter();
-
-	// Switch to camera toolset
-//	LLToolMgr::getInstance()->setCurrentToolset(gCameraToolset);
-	LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCamera::getInstance() );
-}
-
 class LLLandEdit : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if (gAgent.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") )
 		{
@@ -5415,7 +5923,7 @@ class LLLandEdit : public view_listener_t
 
 		LLViewerParcelMgr::getInstance()->selectParcelAt( LLToolPie::getInstance()->getPick().mPosGlobal );
 
-		gFloaterView->bringToFront( gFloaterTools );
+		LLFloaterReg::showInstance("build");
 
 		// Switch to land edit toolset
 		LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolSelectLand::getInstance() );
@@ -5425,15 +5933,14 @@ class LLLandEdit : public view_listener_t
 
 class LLWorldEnableBuyLand : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLViewerParcelMgr::getInstance()->canAgentBuyParcel(
 								LLViewerParcelMgr::getInstance()->selectionEmpty()
 									? LLViewerParcelMgr::getInstance()->getAgentParcel()
 									: LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(),
 								false);
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
@@ -5444,26 +5951,6 @@ BOOL enable_buy_land(void*)
 }
 
 
-void handle_move(void*)
-{
-	if (gAgent.getFocusOnAvatar())
-	{
-		// zoom in if we're looking at the avatar
-		gAgent.setFocusOnAvatar(FALSE, ANIMATE);
-		gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick());
-
-		gAgent.cameraZoomIn(0.666f);
-	}
-	else
-	{
-		gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick());
-	}
-
-	gViewerWindow->moveCursorToCenter();
-
-	LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
-	LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolGrab::getInstance() );
-}
 
 class LLObjectAttachToAvatar : public view_listener_t
 {
@@ -5471,7 +5958,7 @@ public:
 	static void setObjectSelection(LLObjectSelectionHandle selection) { sObjectSelection = selection; }
 
 private:
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		setObjectSelection(LLSelectMgr::getInstance()->getSelection());
 		LLViewerObject* selectedObject = sObjectSelection->getFirstRootObject();
@@ -5497,7 +5984,7 @@ void near_attach_object(BOOL success, void *user_data)
 	if (success)
 	{
 		LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data;
-		
+
 		U8 attachment_id = 0;
 		if (attachment)
 		{
@@ -5539,7 +6026,7 @@ void confirm_replace_attachment(S32 option, void* user_data)
 			}
 
 			LLVector3 walkToSpot = selectedObject->getPositionAgent();
-			
+
 			// make sure we stop in front of the object
 			LLVector3 delta = walkToSpot - gAgent.getPositionAgent();
 			delta.normVec();
@@ -5554,7 +6041,7 @@ void confirm_replace_attachment(S32 option, void* user_data)
 
 class LLAttachmentDrop : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// Called when the user clicked on an object attached to them
 		// and selected "Drop".
@@ -5598,63 +6085,57 @@ class LLAttachmentDrop : public view_listener_t
 };
 
 // called from avatar pie menu
-void handle_detach_from_avatar(void* user_data)
+class LLAttachmentDetachFromPoint : public view_listener_t
 {
-	LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data;
-	
-	LLViewerObject* attached_object = attachment->getObject();
-
-	if (attached_object)
+	bool handleEvent(const LLSD& user_data)
 	{
-		gMessageSystem->newMessage("ObjectDetach");
-		gMessageSystem->nextBlockFast(_PREHASH_AgentData);
-		gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
-		gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
-
-		gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
-		gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, attached_object->getLocalID());
-		gMessageSystem->sendReliable( gAgent.getRegionHost() );
-	}
-}
+		LLViewerJointAttachment *attachment = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, user_data.asInteger(), (LLViewerJointAttachment*)NULL);
+		
+		LLViewerObject* attached_object = attachment ? attachment->getObject() : NULL;
 
-void attach_label(std::string& label, void* user_data)
-{
-	LLViewerJointAttachment* attachmentp = (LLViewerJointAttachment*)user_data;
-	if (attachmentp)
-	{
-		label = attachmentp->getName();
-		if (attachmentp->getObject())
+		if (attached_object)
 		{
-			LLViewerInventoryItem* itemp = gInventory.getItem(attachmentp->getItemID());
-			if (itemp)
-			{
-				label += std::string(" (") + itemp->getName() + std::string(")");
-			}
+			gMessageSystem->newMessage("ObjectDetach");
+			gMessageSystem->nextBlockFast(_PREHASH_AgentData);
+			gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
+			gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+
+			gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
+			gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, attached_object->getLocalID());
+			gMessageSystem->sendReliable( gAgent.getRegionHost() );
 		}
+		return true;
 	}
-}
+};
 
-void detach_label(std::string& label, void* user_data)
+static bool onEnableAttachmentLabel(LLUICtrl* ctrl, const LLSD& data)
 {
-	LLViewerJointAttachment* attachmentp = (LLViewerJointAttachment*)user_data;
-	if (attachmentp)
+	std::string label;
+	LLMenuItemGL* menu = dynamic_cast<LLMenuItemGL*>(ctrl);
+	if (menu)
 	{
-		label = attachmentp->getName();
-		if (attachmentp->getObject())
+		LLViewerJointAttachment *attachmentp = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, data["index"].asInteger(), (LLViewerJointAttachment*)NULL);
+		if (attachmentp)
 		{
-			LLViewerInventoryItem* itemp = gInventory.getItem(attachmentp->getItemID());
-			if (itemp)
+			label = data["label"].asString();
+			if (attachmentp->getObject())
 			{
-				label += std::string(" (") + itemp->getName() + std::string(")");
+				LLViewerInventoryItem* itemp = gInventory.getItem(attachmentp->getItemID());
+				if (itemp)
+				{
+					label += std::string(" (") + itemp->getName() + std::string(")");
+				}
 			}
 		}
+		menu->setLabel(label);
 	}
+	return true;
 }
 
 
 class LLAttachmentDetach : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// Called when the user clicked on an object attached to them
 		// and selected "Detach".
@@ -5723,7 +6204,7 @@ protected:
 // You can only drop items on parcels where you can build.
 class LLAttachmentEnableDrop : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		BOOL can_build   = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->agentCanBuild());
 
@@ -5743,7 +6224,7 @@ class LLAttachmentEnableDrop : public view_listener_t
 
 		if ( object )
 		{
-    		S32 attachmentID  = ATTACHMENT_ID_FROM_STATE(object->getState());
+			S32 attachmentID  = ATTACHMENT_ID_FROM_STATE(object->getState());
 			attachment_pt = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL);
 
 			if ( attachment_pt )
@@ -5751,7 +6232,7 @@ class LLAttachmentEnableDrop : public view_listener_t
 				// make sure item is in your inventory (it could be a delayed attach message being sent from the sim)
 				// so check to see if the item is in the inventory already
 				item = gInventory.getItem(attachment_pt->getItemID());
-				
+
 				if ( !item )
 				{
 					// Item does not exist, make an observer to enable the pie menu 
@@ -5762,22 +6243,21 @@ class LLAttachmentEnableDrop : public view_listener_t
 					LLInventoryFetchObserver::item_ref_t items; //add item to the inventory item to be fetched
 
 					items.push_back(attachment_pt->getItemID());
-				
+
 					wornItemFetched->fetchItems(items);
 					gInventory.addObserver(wornItemFetched);
 				}
 			}
 		}
-		
+
 		//now check to make sure that the item is actually in the inventory before we enable dropping it
-		bool new_value = enable_detach(NULL) && can_build && item;
+		bool new_value = enable_detach() && can_build && item;
 
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
-BOOL enable_detach(void*)
+BOOL enable_detach(const LLSD&)
 {
 	LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
 	if (!object) return FALSE;
@@ -5801,21 +6281,19 @@ BOOL enable_detach(void*)
 
 class LLAttachmentEnableDetach : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
-		bool new_value = enable_detach(NULL);
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		bool new_value = enable_detach();
+		return new_value;
 	}
 };
 
 // Used to tell if the selected object can be attached to your avatar.
-BOOL object_selected_and_point_valid(void *user_data)
+BOOL object_selected_and_point_valid(const LLSD&)
 {
-	//LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data;
 	LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
 	for (LLObjectSelection::root_iterator iter = selection->root_begin();
-		 iter != selection->root_end(); iter++)
+		iter != selection->root_end(); iter++)
 	{
 		LLSelectNode* node = *iter;
 		LLViewerObject* object = node->getObject();
@@ -5841,7 +6319,7 @@ BOOL object_selected_and_point_valid(void *user_data)
 
 BOOL object_is_wearable()
 {
-	if (!object_selected_and_point_valid(NULL))
+	if (!object_selected_and_point_valid(LLSD()))
 	{
 		return FALSE;
 	}
@@ -5851,7 +6329,7 @@ BOOL object_is_wearable()
 	}
 	LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
 	for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin();
-		 iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++)
+		iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++)
 	{
 		LLSelectNode* node = *iter;		
 		if (node->mPermissions->getOwner() == gAgent.getID())
@@ -5866,25 +6344,29 @@ BOOL object_is_wearable()
 // Also for seeing if object can be attached.  See above.
 class LLObjectEnableWear : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
-		bool is_wearable = object_selected_and_point_valid(NULL);
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(is_wearable);
-		return TRUE;
+		return object_selected_and_point_valid(LLSD());
 	}
 };
 
-
-BOOL object_attached(void *user_data)
+class LLAttachmentPointFilled : public view_listener_t
 {
-	LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data;
-
-	return attachment->getObject() != NULL;
-}
+	bool handleEvent(const LLSD& user_data)
+	{
+		bool enable = false;
+		LLVOAvatar::attachment_map_t::iterator found_it = gAgent.getAvatarObject()->mAttachmentPoints.find(user_data.asInteger());
+		if (found_it != gAgent.getAvatarObject()->mAttachmentPoints.end())
+		{
+			enable = found_it->second->getObject() != NULL;
+		}
+		return enable;
+	}
+};
 
 class LLAvatarSendIM : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
 		if(avatar)
@@ -5899,26 +6381,15 @@ class LLAvatarSendIM : public view_listener_t
 				name.append( last->getString() );
 			}
 
-			gIMMgr->setFloaterOpen(TRUE);
 			//EInstantMessage type = have_agent_callingcard(gLastHitObjectID)
 			//	? IM_SESSION_ADD : IM_SESSION_CARDLESS_START;
 			gIMMgr->addSession(name,
 								IM_NOTHING_SPECIAL,
-								avatar->getID());
-		}
-		return true;
-	}
-};
-
-
-void handle_activate(void*)
-{
-}
-
-BOOL enable_activate(void*)
-{
-	return FALSE;
-}
+								avatar->getID());
+		}
+		return true;
+	}
+};
 
 namespace
 {
@@ -5946,7 +6417,7 @@ namespace
 	};
 }
 
-void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, const std::string& nomodmsg)
+void queue_actions(LLFloaterScriptQueue* q, const std::string& msg)
 {
 	QueueObjects func(q);
 	LLSelectMgr *mgr = LLSelectMgr::getInstance();
@@ -5956,10 +6427,12 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, cons
 	{
 		if ( !func.scripted )
 		{
+			std::string noscriptmsg = std::string("Cannot") + msg + "SelectObjectsNoScripts";
 			LLNotifications::instance().add(noscriptmsg);
 		}
 		else if ( !func.modifiable )
 		{
+			std::string nomodmsg = std::string("Cannot") + msg + "SelectObjectsNoPermission";
 			LLNotifications::instance().add(nomodmsg);
 		}
 		else
@@ -5976,62 +6449,51 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, cons
 	}
 }
 
-void handle_compile_queue(std::string to_lang)
-{
-	LLFloaterCompileQueue* queue;
-	if (to_lang == "mono")
-	{
-		queue = LLFloaterCompileQueue::create(TRUE);
-	}
-	else
-	{
-		queue = LLFloaterCompileQueue::create(FALSE);
-	}
-	queue_actions(queue, "CannotRecompileSelectObjectsNoScripts", "CannotRecompileSelectObjectsNoPermission");
-}
-
-void handle_reset_selection(void)
-{
-	LLFloaterResetQueue* queue = LLFloaterResetQueue::create();
-	queue_actions(queue, "CannotResetSelectObjectsNoScripts", "CannotResetSelectObjectsNoPermission");
-}
-
-void handle_set_run_selection(void)
-{
-	LLFloaterRunQueue* queue = LLFloaterRunQueue::create();
-	queue_actions(queue, "CannotSetRunningSelectObjectsNoScripts", "CannotSerRunningSelectObjectsNoPermission");
-}
-
-void handle_set_not_run_selection(void)
-{
-	LLFloaterNotRunQueue* queue = LLFloaterNotRunQueue::create();
-	queue_actions(queue, "CannotSetRunningNotSelectObjectsNoScripts", "CannotSerRunningNotSelectObjectsNoPermission");
-}
-
 class LLToolsSelectedScriptAction : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string action = userdata.asString();
+		bool mono = false;
+		std::string msg, name;
 		if (action == "compile mono")
 		{
-			handle_compile_queue("mono");
+			name = "compile_queue";
+			mono = true;
+			msg = "Recompile";
 		}
 		if (action == "compile lsl")
 		{
-			handle_compile_queue("lsl");
+			name = "compile_queue";
+			msg = "Recompile";
 		}
 		else if (action == "reset")
 		{
-			handle_reset_selection();
+			name = "reset_queue";
+			msg = "Reset";
 		}
 		else if (action == "start")
 		{
-			handle_set_run_selection();
+			name = "start_queue";
+			msg = "Running";
 		}
 		else if (action == "stop")
 		{
-			handle_set_not_run_selection();
+			name = "stop_queue";
+			msg = "RunningNot";
+		}
+		LLUUID id; id.generate();
+		LLFloater* floater = LLFloaterReg::getInstance(name, LLSD(id));
+		LLFloaterScriptQueue* queue = dynamic_cast<LLFloaterScriptQueue*>(floater);
+		if (queue)
+		{
+			queue->setMono(mono);
+			queue_actions(queue, msg);
+		}
+		else
+		{
+			llwarns << "Failed to generate LLFloaterScriptQueue with action: " << action << llendl;
+			delete floater;
 		}
 		return true;
 	}
@@ -6040,10 +6502,10 @@ class LLToolsSelectedScriptAction : public view_listener_t
 void handle_selected_texture_info(void*)
 {
 	for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin();
-		 iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++)
+		iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++)
 	{
 		LLSelectNode* node = *iter;
-		
+
 		std::string msg;
 		msg.assign("Texture info for: ");
 		msg.append(node->mName);
@@ -6086,11 +6548,6 @@ void handle_selected_texture_info(void*)
 	}
 }
 
-void handle_dump_image_list(void*)
-{
-	gImageList.dump();
-}
-
 void handle_test_male(void*)
 {
 	wear_outfit_by_name("Male Shape & Outfit");
@@ -6122,7 +6579,7 @@ void handle_dump_attachments(void*)
 	}
 
 	for (LLVOAvatar::attachment_map_t::iterator iter = avatar->mAttachmentPoints.begin(); 
-		 iter != avatar->mAttachmentPoints.end(); )
+		iter != avatar->mAttachmentPoints.end(); )
 	{
 		LLVOAvatar::attachment_map_t::iterator curiter = iter++;
 		LLViewerJointAttachment* attachment = curiter->second;
@@ -6141,107 +6598,76 @@ void handle_dump_attachments(void*)
 	}
 }
 
-//---------------------------------------------------------------------
-// Callbacks for enabling/disabling items
-//---------------------------------------------------------------------
-
-BOOL menu_ui_enabled(void *user_data)
-{
-	BOOL high_res = gSavedSettings.getBOOL( "HighResSnapshot" );
-	return !high_res;
-}
-
-// TomY TODO DEPRECATE & REMOVE
-void menu_toggle_control( void* user_data )
-{
-        BOOL checked = gSavedSettings.getBOOL( static_cast<char*>(user_data) );
-        if (std::string(static_cast<char*>(user_data)) == "HighResSnapshot" && !checked)
-        {
-                // High Res Snapshot active, must uncheck RenderUIInSnapshot
-                gSavedSettings.setBOOL( "RenderUIInSnapshot", FALSE );
-        }
-        gSavedSettings.setBOOL( static_cast<char*>(user_data), !checked );
-}
-
 
 // these are used in the gl menus to set control values.
 class LLToggleControl : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string control_name = userdata.asString();
 		BOOL checked = gSavedSettings.getBOOL( control_name );
-		if (control_name == "HighResSnapshot" && !checked)
-		{
-			// High Res Snapshot active, must uncheck RenderUIInSnapshot
-			gSavedSettings.setBOOL( "RenderUIInSnapshot", FALSE );
-		}
 		gSavedSettings.setBOOL( control_name, !checked );
 		return true;
 	}
 };
 
-BOOL menu_check_control( void* user_data)
-{
-	return gSavedSettings.getBOOL((char*)user_data);
-}
-
-// 
-void menu_toggle_variable( void* user_data )
+class LLCheckControl : public view_listener_t
 {
-	BOOL checked = *(BOOL*)user_data;
-	*(BOOL*)user_data = !checked;
-}
-
-BOOL menu_check_variable( void* user_data)
-{
-	return *(BOOL*)user_data;
-}
-
+	bool handleEvent( const LLSD& userdata)
+	{
+		std::string callback_data = userdata.asString();
+		bool new_value = gSavedSettings.getBOOL(callback_data);
+		return new_value;
+	}
 
-BOOL enable_land_selected( void* )
-{
-	return !(LLViewerParcelMgr::getInstance()->selectionEmpty());
-}
+};
 
 void menu_toggle_attached_lights(void* user_data)
 {
-	menu_toggle_control(user_data);
 	LLPipeline::sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");
 }
 
 void menu_toggle_attached_particles(void* user_data)
 {
-	menu_toggle_control(user_data);
 	LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
 }
 
+class LLAdvancedHandleAttchedLightParticles: public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		std::string control_name = userdata.asString();
+		if (control_name == "RenderAttachedLights")
+		{
+			menu_toggle_attached_lights(NULL);
+		}
+		else if (control_name == "RenderAttachedParticles")
+		{
+			menu_toggle_attached_particles(NULL);
+		}
+		return true;
+	}
+};
+
 class LLSomethingSelected : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = !(LLSelectMgr::getInstance()->getSelection()->isEmpty());
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLSomethingSelectedNoHUD : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
 		bool new_value = !(selection->isEmpty()) && !(selection->getSelectType() == SELECT_TYPE_HUD);
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
-BOOL enable_more_than_one_selected(void* )
-{
-	return (LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1);
-}
-
 static bool is_editable_selected()
 {
 	return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != NULL);
@@ -6249,32 +6675,30 @@ static bool is_editable_selected()
 
 class LLEditableSelected : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(is_editable_selected());
-		return true;
+		return is_editable_selected();
 	}
 };
 
 class LLEditableSelectedMono : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
+		bool new_value = false;
 		LLViewerRegion* region = gAgent.getRegion();
-		if(region && gMenuHolder && gMenuHolder->findControl(userdata["control"].asString()))
+		if(region && gMenuHolder)
 		{
 			bool have_cap = (! region->getCapability("UpdateScriptTask").empty());
-			bool selected = is_editable_selected() && have_cap;
-			gMenuHolder->findControl(userdata["control"].asString())->setValue(selected);
-			return true;
+			new_value = is_editable_selected() && have_cap;
 		}
-		return false;
+		return new_value;
 	}
 };
 
 class LLToolsEnableTakeCopy : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool all_valid = false;
 		if (LLSelectMgr::getInstance())
@@ -6303,52 +6727,10 @@ class LLToolsEnableTakeCopy : public view_listener_t
 			}
 		}
 
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(all_valid);
-		return true;
+		return all_valid;
 	}
 };
 
-BOOL enable_selection_you_own_all(void*)
-{
-	if (LLSelectMgr::getInstance())
-	{
-		struct f : public LLSelectedObjectFunctor
-		{
-			virtual bool apply(LLViewerObject* obj)
-			{
-				return (!obj->permYouOwner());
-			}
-		} func;
-		const bool firstonly = true;
-		bool no_perms = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly);
-		if (no_perms)
-		{
-			return FALSE;
-		}
-	}
-	return TRUE;
-}
-
-BOOL enable_selection_you_own_one(void*)
-{
-	if (LLSelectMgr::getInstance())
-	{
-		struct f : public LLSelectedObjectFunctor
-		{
-			virtual bool apply(LLViewerObject* obj)
-			{
-				return (obj->permYouOwner());
-			}
-		} func;
-		const bool firstonly = true;
-		bool any_perms = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly);
-		if (!any_perms)
-		{
-			return FALSE;
-		}
-	}
-	return TRUE;
-}
 
 class LLHasAsset : public LLInventoryCollectFunctor
 {
@@ -6410,6 +6792,15 @@ BOOL enable_save_into_inventory(void*)
 	return FALSE;
 }
 
+class LLToolsEnableSaveToInventory : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		bool new_value = enable_save_into_inventory(NULL);
+		return new_value;
+	}
+};
+
 BOOL enable_save_into_task_inventory(void*)
 {
 	LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
@@ -6427,101 +6818,65 @@ BOOL enable_save_into_task_inventory(void*)
 
 class LLToolsEnableSaveToObjectInventory : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = enable_save_into_task_inventory(NULL);
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
-BOOL enable_not_thirdperson(void*)
-{
-	return !gAgent.cameraThirdPerson();
-}
-
-
-// BOOL enable_export_selected(void *)
-// {
-// 	if (LLSelectMgr::getInstance()->getSelection()->isEmpty())
-// 	{
-// 		return FALSE;
-// 	}
-// 	if (!gExporterRequestID.isNull())
-// 	{
-// 		return FALSE;
-// 	}
-// 	if (!LLUploadDialog::modalUploadIsFinished())
-// 	{
-// 		return FALSE;
-// 	}
-// 	return TRUE;
-// }
 
 class LLViewEnableMouselook : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// You can't go directly from customize avatar to mouselook.
 		// TODO: write code with appropriate dialogs to handle this transition.
 		bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() && !gSavedSettings.getBOOL("FreezeTime"));
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLToolsEnableToolNotPie : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = ( LLToolMgr::getInstance()->getBaseTool() != LLToolPie::getInstance() );
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLWorldEnableCreateLandmark : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = can_create_landmark();
 		
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		
-		return true;
+		return new_value;
 	}
 };
 
 class LLWorldEnableSetHomeLocation : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = gAgent.isGodlike() || 
 			(gAgent.getRegion() && gAgent.getRegion()->getAllowSetHome());
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLWorldEnableTeleportHome : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLViewerRegion* regionp = gAgent.getRegion();
 		bool agent_on_prelude = (regionp && regionp->isPrelude());
 		bool enable_teleport_home = gAgent.isGodlike() || !agent_on_prelude;
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_teleport_home);
-		return true;
+		return enable_teleport_home;
 	}
 };
 
-BOOL enable_region_owner(void*)
-{
-	if(gAgent.getRegion() && gAgent.getRegion()->getOwner() == gAgent.getID())
-		return TRUE;
-	return enable_god_customer_service(NULL);
-}
-
 BOOL enable_god_full(void*)
 {
 	return gAgent.getGodLevel() >= GOD_FULL;
@@ -6542,23 +6897,11 @@ BOOL enable_god_basic(void*)
 	return gAgent.getGodLevel() > GOD_NOT;
 }
 
-#if 0 // 1.9.2
-void toggle_vertex_shaders(void *)
-{
-	BOOL use_shaders = gPipeline.getUseVertexShaders();
-	gPipeline.setUseVertexShaders(use_shaders);
-}
-
-BOOL check_vertex_shaders(void *)
-{
-	return gPipeline.getUseVertexShaders();
-}
-#endif
 
 void toggle_show_xui_names(void *)
 {
 	BOOL showXUINames = gSavedSettings.getBOOL("ShowXUINames");
-	
+
 	showXUINames = !showXUINames;
 	gSavedSettings.setBOOL("ShowXUINames", showXUINames);
 }
@@ -6568,18 +6911,9 @@ BOOL check_show_xui_names(void *)
 	return gSavedSettings.getBOOL("ShowXUINames");
 }
 
-
-
-void toggle_cull_small(void *)
-{
-//	gPipeline.mCullBySize = !gPipeline.mCullBySize;
-//
-//	gSavedSettings.setBOOL("RenderCullBySize", gPipeline.mCullBySize);
-}
-
 class LLToolsSelectOnlyMyObjects : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		BOOL cur_val = gSavedSettings.getBOOL("SelectOwnedOnly");
 
@@ -6591,7 +6925,7 @@ class LLToolsSelectOnlyMyObjects : public view_listener_t
 
 class LLToolsSelectOnlyMovableObjects : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		BOOL cur_val = gSavedSettings.getBOOL("SelectMovableOnly");
 
@@ -6603,7 +6937,7 @@ class LLToolsSelectOnlyMovableObjects : public view_listener_t
 
 class LLToolsSelectBySurrounding : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLSelectMgr::sRectSelectInclusive = !LLSelectMgr::sRectSelectInclusive;
 
@@ -6614,7 +6948,7 @@ class LLToolsSelectBySurrounding : public view_listener_t
 
 class LLToolsShowHiddenSelection : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// TomY TODO Merge these
 		LLSelectMgr::sRenderHiddenSelections = !LLSelectMgr::sRenderHiddenSelections;
@@ -6626,7 +6960,7 @@ class LLToolsShowHiddenSelection : public view_listener_t
 
 class LLToolsShowSelectionLightRadius : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// TomY TODO merge these
 		LLSelectMgr::sRenderLightRadius = !LLSelectMgr::sRenderLightRadius;
@@ -6638,7 +6972,7 @@ class LLToolsShowSelectionLightRadius : public view_listener_t
 
 class LLToolsEditLinkedParts : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		BOOL select_individuals = gSavedSettings.getBOOL("EditLinkedParts");
 		if (select_individuals)
@@ -6653,33 +6987,11 @@ class LLToolsEditLinkedParts : public view_listener_t
 	}
 };
 
-void reload_personal_settings_overrides(void *)
-{
-	llinfos << "Loading overrides from " << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,"overrides.xml") << llendl;
-	
-	gSavedSettings.loadFromFile(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,"overrides.xml"));
-}
-
 void reload_vertex_shader(void *)
 {
 	//THIS WOULD BE AN AWESOME PLACE TO RELOAD SHADERS... just a thought	- DaveP
 }
 
-void slow_mo_animations(void*)
-{
-	static BOOL slow_mo = FALSE;
-	if (slow_mo)
-	{
-		gAgent.getAvatarObject()->setAnimTimeFactor(1.f);
-		slow_mo = FALSE;
-	}
-	else
-	{
-		gAgent.getAvatarObject()->setAnimTimeFactor(0.2f);
-		slow_mo = TRUE;
-	}
-}
-
 void handle_dump_avatar_local_textures(void*)
 {
 	LLVOAvatar* avatar = gAgent.getAvatarObject();
@@ -6842,27 +7154,27 @@ void handle_disconnect_viewer(void *)
 
 void force_error_breakpoint(void *)
 {
-    LLAppViewer::instance()->forceErrorBreakpoint();
+	LLAppViewer::instance()->forceErrorBreakpoint();
 }
 
 void force_error_llerror(void *)
 {
-    LLAppViewer::instance()->forceErrorLLError();
+	LLAppViewer::instance()->forceErrorLLError();
 }
 
 void force_error_bad_memory_access(void *)
 {
-    LLAppViewer::instance()->forceErrorBadMemoryAccess();
+	LLAppViewer::instance()->forceErrorBadMemoryAccess();
 }
 
 void force_error_infinite_loop(void *)
 {
-    LLAppViewer::instance()->forceErrorInifiniteLoop();
+	LLAppViewer::instance()->forceErrorInifiniteLoop();
 }
 
 void force_error_software_exception(void *)
 {
-    LLAppViewer::instance()->forceErrorSoftwareException();
+	LLAppViewer::instance()->forceErrorSoftwareException();
 }
 
 void force_error_driver_crash(void *)
@@ -6872,7 +7184,7 @@ void force_error_driver_crash(void *)
 
 class LLToolsUseSelectionForGrid : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLSelectMgr::getInstance()->clearGridObjects();
 		struct f : public LLSelectedObjectFunctor
@@ -6905,10 +7217,6 @@ void handle_test_load_url(void*)
 // LLViewerMenuHolderGL
 //
 
-LLViewerMenuHolderGL::LLViewerMenuHolderGL() : LLMenuHolderGL()
-{
-}
-
 BOOL LLViewerMenuHolderGL::hideMenus()
 {
 	BOOL handled = LLMenuHolderGL::hideMenus();
@@ -6972,7 +7280,7 @@ void handle_load_from_xml(void*)
 	if (picker.getOpenFile(LLFilePicker::FFLOAD_XML))
 	{
 		std::string filename = picker.getFirstFile();
-		LLFloater* floater = new LLFloater("sample_floater");
+		LLFloater* floater = new LLFloater();
 		LLUICtrlFactory::getInstance()->buildFloater(floater, filename);
 	}
 }
@@ -7050,7 +7358,7 @@ BOOL get_visibility(void* user_data)
 // TomY TODO: Get rid of these?
 class LLViewShowHoverTips : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLHoverView::sShowHoverTips = !LLHoverView::sShowHoverTips;
 		return true;
@@ -7059,18 +7367,17 @@ class LLViewShowHoverTips : public view_listener_t
 
 class LLViewCheckShowHoverTips : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLHoverView::sShowHoverTips;
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 // TomY TODO: Get rid of these?
 class LLViewHighlightTransparent : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha;
 		return true;
@@ -7079,17 +7386,157 @@ class LLViewHighlightTransparent : public view_listener_t
 
 class LLViewCheckHighlightTransparent : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLDrawPoolAlpha::sShowDebugAlpha;
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
+		return new_value;
+	}
+};
+
+class LLViewBeaconWidth : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		std::string width = userdata.asString();
+		if(width == "1")
+		{
+			gSavedSettings.setS32("DebugBeaconLineWidth", 1);
+		}
+		else if(width == "4")
+		{
+			gSavedSettings.setS32("DebugBeaconLineWidth", 4);
+		}
+		else if(width == "16")
+		{
+			gSavedSettings.setS32("DebugBeaconLineWidth", 16);
+		}
+		else if(width == "32")
+		{
+			gSavedSettings.setS32("DebugBeaconLineWidth", 32);
+		}
+
+		return true;
+	}
+};
+
+
+class LLViewToggleBeacon : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		std::string beacon = userdata.asString();
+		if (beacon == "scriptsbeacon")
+		{
+			LLPipeline::toggleRenderScriptedBeacons(NULL);
+			gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) );
+			// toggle the other one off if it's on
+			if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL))
+			{
+				LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
+				gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) );
+			}
+		}
+		else if (beacon == "physicalbeacon")
+		{
+			LLPipeline::toggleRenderPhysicalBeacons(NULL);
+			gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons(NULL) );
+		}
+		else if (beacon == "soundsbeacon")
+		{
+			LLPipeline::toggleRenderSoundBeacons(NULL);
+			gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons(NULL) );
+		}
+		else if (beacon == "particlesbeacon")
+		{
+			LLPipeline::toggleRenderParticleBeacons(NULL);
+			gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons(NULL) );
+		}
+		else if (beacon == "scripttouchbeacon")
+		{
+			LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
+			gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) );
+			// toggle the other one off if it's on
+			if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL))
+			{
+				LLPipeline::toggleRenderScriptedBeacons(NULL);
+				gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) );
+			}
+		}
+		else if (beacon == "renderbeacons")
+		{
+			LLPipeline::toggleRenderBeacons(NULL);
+			gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) );
+			// toggle the other one on if it's not
+			if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL))
+			{
+				LLPipeline::toggleRenderHighlights(NULL);
+				gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) );
+			}
+		}
+		else if (beacon == "renderhighlights")
+		{
+			LLPipeline::toggleRenderHighlights(NULL);
+			gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) );
+			// toggle the other one on if it's not
+			if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL))
+			{
+				LLPipeline::toggleRenderBeacons(NULL);
+				gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) );
+			}
+		}
+
 		return true;
 	}
 };
 
+class LLViewCheckBeaconEnabled : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		std::string beacon = userdata.asString();
+		bool new_value = false;
+		if (beacon == "scriptsbeacon")
+		{
+			new_value = gSavedSettings.getBOOL( "scriptsbeacon");
+			LLPipeline::setRenderScriptedBeacons(new_value);
+		}
+		else if (beacon == "physicalbeacon")
+		{
+			new_value = gSavedSettings.getBOOL( "physicalbeacon");
+			LLPipeline::setRenderPhysicalBeacons(new_value);
+		}
+		else if (beacon == "soundsbeacon")
+		{
+			new_value = gSavedSettings.getBOOL( "soundsbeacon");
+			LLPipeline::setRenderSoundBeacons(new_value);
+		}
+		else if (beacon == "particlesbeacon")
+		{
+			new_value = gSavedSettings.getBOOL( "particlesbeacon");
+			LLPipeline::setRenderParticleBeacons(new_value);
+		}
+		else if (beacon == "scripttouchbeacon")
+		{
+			new_value = gSavedSettings.getBOOL( "scripttouchbeacon");
+			LLPipeline::setRenderScriptedTouchBeacons(new_value);
+		}
+		else if (beacon == "renderbeacons")
+		{
+			new_value = gSavedSettings.getBOOL( "renderbeacons");
+			LLPipeline::setRenderBeacons(new_value);
+		}
+		else if (beacon == "renderhighlights")
+		{
+			new_value = gSavedSettings.getBOOL( "renderhighlights");
+			LLPipeline::setRenderHighlights(new_value);
+		}
+		return new_value;
+	}
+};
+
 class LLViewToggleRenderType : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string type = userdata.asString();
 		if (type == "hideparticles")
@@ -7102,22 +7549,21 @@ class LLViewToggleRenderType : public view_listener_t
 
 class LLViewCheckRenderType : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
-		std::string type = userdata["data"].asString();
+		std::string type = userdata.asString();
 		bool new_value = false;
 		if (type == "hideparticles")
 		{
 			new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES);
 		}
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLViewShowHUDAttachments : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments;
 		return true;
@@ -7126,20 +7572,18 @@ class LLViewShowHUDAttachments : public view_listener_t
 
 class LLViewCheckHUDAttachments : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = LLPipeline::sShowHUDAttachments;
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLEditEnableTakeOff : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
-		std::string control_name = userdata["control"].asString();
-		std::string clothing = userdata["data"].asString();
+		std::string clothing = userdata.asString();
 		bool new_value = false;
 		if (clothing == "shirt")
 		{
@@ -7177,14 +7621,13 @@ class LLEditEnableTakeOff : public view_listener_t
 		{
 			new_value = LLAgent::selfHasWearable((void *)WT_SKIRT);
 		}
-		gMenuHolder->findControl(control_name)->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLEditTakeOff : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string clothing = userdata.asString();
 		if (clothing == "shirt")
@@ -7231,18 +7674,9 @@ class LLEditTakeOff : public view_listener_t
 	}
 };
 
-class LLWorldChat : public view_listener_t
-{
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-	{
-		handle_chat(NULL);
-		return true;
-	}
-};
-
 class LLToolsSelectTool : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string tool_name = userdata.asString();
 		if (tool_name == "focus")
@@ -7272,11 +7706,11 @@ class LLToolsSelectTool : public view_listener_t
 /// WINDLIGHT callbacks
 class LLWorldEnvSettings : public view_listener_t
 {	
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string tod = userdata.asString();
 		LLVector3 sun_direction;
-		
+
 		if (tod == "editor")
 		{
 			// if not there or is hidden, show it
@@ -7288,11 +7722,11 @@ class LLWorldEnvSettings : public view_listener_t
 			} 
 			else 
 			{
-				LLFloaterEnvSettings::instance()->close();
+				LLFloaterEnvSettings::instance()->closeFloater();
 			}
 			return true;
 		}
-		
+
 		if (tod == "sunrise")
 		{
 			// set the value, turn off animation
@@ -7349,7 +7783,7 @@ class LLWorldEnvSettings : public view_listener_t
 /// Water Menu callbacks
 class LLWorldWaterSettings : public view_listener_t
 {	
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		// if not there or is hidden, show it
 		if(	!LLFloaterWater::isOpen() || 
@@ -7360,7 +7794,7 @@ class LLWorldWaterSettings : public view_listener_t
 		} 
 		else 
 		{
-			LLFloaterWater::instance()->close();
+			LLFloaterWater::instance()->closeFloater();
 		}
 		return true;
 	}
@@ -7369,7 +7803,7 @@ class LLWorldWaterSettings : public view_listener_t
 /// Post-Process callbacks
 class LLWorldPostProcess : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLFloaterPostProcess::show();
 		return true;
@@ -7379,7 +7813,7 @@ class LLWorldPostProcess : public view_listener_t
 /// Day Cycle callbacks
 class LLWorldDayCycle : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLFloaterDayCycle::show();
 		return true;
@@ -7388,12 +7822,6 @@ class LLWorldDayCycle : public view_listener_t
 
 
 
-static void addMenu(view_listener_t *menu, const std::string& name)
-{
-	sMenus.push_back(menu);
-	menu->registerListener(gMenuHolder, name);
-}
-
 void initialize_menus()
 {
 	// A parameterized event handler used as ctrl-8/9/0 zoom controls below.
@@ -7402,7 +7830,7 @@ void initialize_menus()
 	public:
 		// The "mult" parameter says whether "val" is a multiplier or used to set the value.
 		LLZoomer(F32 val, bool mult=true) : mVal(val), mMult(mult) {}
-		bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+		bool handleEvent(const LLSD& userdata)
 		{
 			F32 new_fov_rad = mMult ? LLViewerCamera::getInstance()->getDefaultFOV() * mVal : mVal;
 			LLViewerCamera::getInstance()->setDefaultFOV(new_fov_rad);
@@ -7414,217 +7842,375 @@ void initialize_menus()
 		bool mMult;
 	};
 	
-	class LLAvatarReportAbuse : public view_listener_t
-	{
-		bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-		{
-			LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
-			if(avatar)
-			{
-				LLFloaterReporter::showFromObject(avatar->getID());
-			}
-			return true;
-		}
-	};
+	LLUICtrl::EnableCallbackRegistry::Registrar& enable = LLUICtrl::EnableCallbackRegistry::currentRegistrar();
+	LLUICtrl::CommitCallbackRegistry::Registrar& commit = LLUICtrl::CommitCallbackRegistry::currentRegistrar();
+	
+	// Enable God Mode
+	view_listener_t::addMenu(new LLEnableGodCustomerService(), "EnableGodCustomerService");
 
+	// Agent
+	commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying));
+	enable.add("Agent.emableFlying", boost::bind(&LLAgent::enableFlying));
+	
 	// File menu
 	init_menu_file();
 
 	// Edit menu
-	addMenu(new LLEditUndo(), "Edit.Undo");
-	addMenu(new LLEditRedo(), "Edit.Redo");
-	addMenu(new LLEditCut(), "Edit.Cut");
-	addMenu(new LLEditCopy(), "Edit.Copy");
-	addMenu(new LLEditPaste(), "Edit.Paste");
-	addMenu(new LLEditDelete(), "Edit.Delete");
-	addMenu(new LLEditSearch(), "Edit.Search");
-	addMenu(new LLEditSelectAll(), "Edit.SelectAll");
-	addMenu(new LLEditDeselect(), "Edit.Deselect");
-	addMenu(new LLEditDuplicate(), "Edit.Duplicate");
-	addMenu(new LLEditTakeOff(), "Edit.TakeOff");
-
-	addMenu(new LLEditEnableUndo(), "Edit.EnableUndo");
-	addMenu(new LLEditEnableRedo(), "Edit.EnableRedo");
-	addMenu(new LLEditEnableCut(), "Edit.EnableCut");
-	addMenu(new LLEditEnableCopy(), "Edit.EnableCopy");
-	addMenu(new LLEditEnablePaste(), "Edit.EnablePaste");
-	addMenu(new LLEditEnableDelete(), "Edit.EnableDelete");
-	addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll");
-	addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect");
-	addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate");
-	addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff");
-	addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar");
+	view_listener_t::addMenu(new LLEditUndo(), "Edit.Undo");
+	view_listener_t::addMenu(new LLEditRedo(), "Edit.Redo");
+	view_listener_t::addMenu(new LLEditCut(), "Edit.Cut");
+	view_listener_t::addMenu(new LLEditCopy(), "Edit.Copy");
+	view_listener_t::addMenu(new LLEditPaste(), "Edit.Paste");
+	view_listener_t::addMenu(new LLEditDelete(), "Edit.Delete");
+	view_listener_t::addMenu(new LLEditSelectAll(), "Edit.SelectAll");
+	view_listener_t::addMenu(new LLEditDeselect(), "Edit.Deselect");
+	view_listener_t::addMenu(new LLEditDuplicate(), "Edit.Duplicate");
+	view_listener_t::addMenu(new LLEditTakeOff(), "Edit.TakeOff");
+
+	view_listener_t::addMenu(new LLEditEnableUndo(), "Edit.EnableUndo");
+	view_listener_t::addMenu(new LLEditEnableRedo(), "Edit.EnableRedo");
+	view_listener_t::addMenu(new LLEditEnableCut(), "Edit.EnableCut");
+	view_listener_t::addMenu(new LLEditEnableCopy(), "Edit.EnableCopy");
+	view_listener_t::addMenu(new LLEditEnablePaste(), "Edit.EnablePaste");
+	view_listener_t::addMenu(new LLEditEnableDelete(), "Edit.EnableDelete");
+	view_listener_t::addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll");
+	view_listener_t::addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect");
+	view_listener_t::addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate");
+	view_listener_t::addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff");
+	view_listener_t::addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar");
 
 	// View menu
-	addMenu(new LLViewMouselook(), "View.Mouselook");
-	addMenu(new LLViewBuildMode(), "View.BuildMode");
-	addMenu(new LLViewJoystickFlycam(), "View.JoystickFlycam");
-	addMenu(new LLViewCommunicate(), "View.Communicate");
-	addMenu(new LLViewResetView(), "View.ResetView");
-	addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter");
-	addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips");
-	addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent");
-	addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType");
-	addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments");
-	addMenu(new LLZoomer(1.2f), "View.ZoomOut");
-	addMenu(new LLZoomer(1/1.2f), "View.ZoomIn");
-	addMenu(new LLZoomer(DEFAULT_FIELD_OF_VIEW, false), "View.ZoomDefault");
-	addMenu(new LLViewFullscreen(), "View.Fullscreen");
-	addMenu(new LLViewDefaultUISize(), "View.DefaultUISize");
-
-	addMenu(new LLViewEnableMouselook(), "View.EnableMouselook");
-	addMenu(new LLViewEnableJoystickFlycam(), "View.EnableJoystickFlycam");
-	addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter");
-
-	addMenu(new LLViewCheckBuildMode(), "View.CheckBuildMode");
-	addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam");
-	addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips");
-	addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent");
-	addMenu(new LLViewCheckRenderType(), "View.CheckRenderType");
-	addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
+	view_listener_t::addMenu(new LLViewMouselook(), "View.Mouselook");
+	view_listener_t::addMenu(new LLViewJoystickFlycam(), "View.JoystickFlycam");
+	view_listener_t::addMenu(new LLViewResetView(), "View.ResetView");
+	view_listener_t::addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter");
+	view_listener_t::addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips");
+	view_listener_t::addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent");
+	view_listener_t::addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType");
+	view_listener_t::addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments");
+	view_listener_t::addMenu(new LLZoomer(1.2f), "View.ZoomOut");
+	view_listener_t::addMenu(new LLZoomer(1/1.2f), "View.ZoomIn");
+	view_listener_t::addMenu(new LLZoomer(DEFAULT_FIELD_OF_VIEW, false), "View.ZoomDefault");
+	view_listener_t::addMenu(new LLViewFullscreen(), "View.Fullscreen");
+	view_listener_t::addMenu(new LLViewDefaultUISize(), "View.DefaultUISize");
+
+	view_listener_t::addMenu(new LLViewEnableMouselook(), "View.EnableMouselook");
+	view_listener_t::addMenu(new LLViewEnableJoystickFlycam(), "View.EnableJoystickFlycam");
+	view_listener_t::addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter");
+
+	view_listener_t::addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam");
+	view_listener_t::addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips");
+	view_listener_t::addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent");
+	view_listener_t::addMenu(new LLViewCheckRenderType(), "View.CheckRenderType");
+	view_listener_t::addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
 
 	// World menu
-	addMenu(new LLWorldChat(), "World.Chat");
-	addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun");
-	addMenu(new LLWorldFly(), "World.Fly");
-	addMenu(new LLWorldEnableFly(), "World.EnableFly");
-	addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark");
-	addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation");
-	addMenu(new LLWorldTeleportHome(), "World.TeleportHome");
-	addMenu(new LLWorldSetAway(), "World.SetAway");
-	addMenu(new LLWorldSetBusy(), "World.SetBusy");
-
-	addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark");
-	addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation");
-	addMenu(new LLWorldEnableTeleportHome(), "World.EnableTeleportHome");
-	addMenu(new LLWorldEnableBuyLand(), "World.EnableBuyLand");
-
-	addMenu(new LLWorldCheckAlwaysRun(), "World.CheckAlwaysRun");
-	
-	(new LLWorldEnvSettings())->registerListener(gMenuHolder, "World.EnvSettings");
-	(new LLWorldWaterSettings())->registerListener(gMenuHolder, "World.WaterSettings");
-	(new LLWorldPostProcess())->registerListener(gMenuHolder, "World.PostProcess");
-	(new LLWorldDayCycle())->registerListener(gMenuHolder, "World.DayCycle");
+	commit.add("World.Chat", boost::bind(&handle_chat, (void*)NULL));
+	view_listener_t::addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun");
+	view_listener_t::addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark");
+	view_listener_t::addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation");
+	view_listener_t::addMenu(new LLWorldTeleportHome(), "World.TeleportHome");
+	view_listener_t::addMenu(new LLWorldSetAway(), "World.SetAway");
+	view_listener_t::addMenu(new LLWorldSetBusy(), "World.SetBusy");
+
+	view_listener_t::addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark");
+	view_listener_t::addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation");
+	view_listener_t::addMenu(new LLWorldEnableTeleportHome(), "World.EnableTeleportHome");
+	view_listener_t::addMenu(new LLWorldEnableBuyLand(), "World.EnableBuyLand");
+
+	view_listener_t::addMenu(new LLWorldCheckAlwaysRun(), "World.CheckAlwaysRun");
+
+	view_listener_t::addMenu(new LLWorldEnvSettings(), "World.EnvSettings");
+	view_listener_t::addMenu(new LLWorldWaterSettings(), "World.WaterSettings");
+	view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess");
+	view_listener_t::addMenu(new LLWorldDayCycle(), "World.DayCycle");
 
 	// Tools menu
-	addMenu(new LLToolsSelectTool(), "Tools.SelectTool");
-	addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects");
-	addMenu(new LLToolsSelectOnlyMovableObjects(), "Tools.SelectOnlyMovableObjects");
-	addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding");
-	addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection");
-	addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius");
-	addMenu(new LLToolsEditLinkedParts(), "Tools.EditLinkedParts");
-	addMenu(new LLToolsSnapObjectXY(), "Tools.SnapObjectXY");
-	addMenu(new LLToolsUseSelectionForGrid(), "Tools.UseSelectionForGrid");
-	addMenu(new LLToolsLink(), "Tools.Link");
-	addMenu(new LLToolsUnlink(), "Tools.Unlink");
-	addMenu(new LLToolsStopAllAnimations(), "Tools.StopAllAnimations");
-	addMenu(new LLToolsReleaseKeys(), "Tools.ReleaseKeys");
-	addMenu(new LLToolsEnableReleaseKeys(), "Tools.EnableReleaseKeys");
-	addMenu(new LLToolsLookAtSelection(), "Tools.LookAtSelection");
-	addMenu(new LLToolsBuyOrTake(), "Tools.BuyOrTake");
-	addMenu(new LLToolsTakeCopy(), "Tools.TakeCopy");
-	addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory");
-	addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction");
-
-	addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie");
-	addMenu(new LLToolsEnableLink(), "Tools.EnableLink");
-	addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink");
-	addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake");
-	addMenu(new LLToolsEnableTakeCopy(), "Tools.EnableTakeCopy");
-	addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory");
-
-	/*addMenu(new LLToolsVisibleBuyObject(), "Tools.VisibleBuyObject");
-	addMenu(new LLToolsVisibleTakeObject(), "Tools.VisibleTakeObject");*/
+	view_listener_t::addMenu(new LLToolsSelectTool(), "Tools.SelectTool");
+	view_listener_t::addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects");
+	view_listener_t::addMenu(new LLToolsSelectOnlyMovableObjects(), "Tools.SelectOnlyMovableObjects");
+	view_listener_t::addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding");
+	view_listener_t::addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection");
+	view_listener_t::addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius");
+	view_listener_t::addMenu(new LLToolsEditLinkedParts(), "Tools.EditLinkedParts");
+	view_listener_t::addMenu(new LLToolsSnapObjectXY(), "Tools.SnapObjectXY");
+	view_listener_t::addMenu(new LLToolsUseSelectionForGrid(), "Tools.UseSelectionForGrid");
+	view_listener_t::addMenu(new LLToolsLink(), "Tools.Link");
+	view_listener_t::addMenu(new LLToolsUnlink(), "Tools.Unlink");
+	view_listener_t::addMenu(new LLToolsStopAllAnimations(), "Tools.StopAllAnimations");
+	view_listener_t::addMenu(new LLToolsReleaseKeys(), "Tools.ReleaseKeys");
+	view_listener_t::addMenu(new LLToolsEnableReleaseKeys(), "Tools.EnableReleaseKeys");
+	view_listener_t::addMenu(new LLToolsLookAtSelection(), "Tools.LookAtSelection");
+	view_listener_t::addMenu(new LLToolsBuyOrTake(), "Tools.BuyOrTake");
+	view_listener_t::addMenu(new LLToolsTakeCopy(), "Tools.TakeCopy");
+	view_listener_t::addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory");
+	view_listener_t::addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory");
+	view_listener_t::addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction");
+
+	view_listener_t::addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie");
+	view_listener_t::addMenu(new LLToolsEnableLink(), "Tools.EnableLink");
+	view_listener_t::addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink");
+	view_listener_t::addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake");
+	view_listener_t::addMenu(new LLToolsEnableTakeCopy(), "Tools.EnableTakeCopy");
+	view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory");
+	view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory");
+
+	/*view_listener_t::addMenu(new LLToolsVisibleBuyObject(), "Tools.VisibleBuyObject");
+	view_listener_t::addMenu(new LLToolsVisibleTakeObject(), "Tools.VisibleTakeObject");*/
 
 	// Help menu
 	// most items use the ShowFloater method
 
+	// Advance menu
+	view_listener_t::addMenu(new LLAdvancedToggleConsole(), "Advanced.ToggleConsole");
+	view_listener_t::addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole");
+	view_listener_t::addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole");
+	// Advanced > HUD Info
+	view_listener_t::addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo");
+	view_listener_t::addMenu(new LLAdvancedCheckHUDInfo(), "Advanced.CheckHUDInfo");
+
+	// Advanced Other Settings	
+	view_listener_t::addMenu(new LLAdvancedClearGroupCache(), "Advanced.ClearGroupCache");
+
+	// Advanced > Render > Types
+	view_listener_t::addMenu(new LLAdvancedToggleRenderType(), "Advanced.ToggleRenderType");
+	view_listener_t::addMenu(new LLAdvancedCheckRenderType(), "Advanced.CheckRenderType");
+
+	//// Advanced > Render > Features
+	view_listener_t::addMenu(new LLAdvancedToggleFeature(), "Advanced.ToggleFeature");
+	view_listener_t::addMenu(new LLAdvancedCheckFeature(), "Advanced.CheckFeature");
+	// Advanced > Render > Info Displays
+	view_listener_t::addMenu(new LLAdvancedToggleInfoDisplay(), "Advanced.ToggleInfoDisplay");
+	view_listener_t::addMenu(new LLAdvancedCheckInfoDisplay(), "Advanced.CheckInfoDisplay");
+	view_listener_t::addMenu(new LLAdvancedSelectedTextureInfo(), "Advanced.SelectedTextureInfo");
+	view_listener_t::addMenu(new LLAdvancedToggleWireframe(), "Advanced.ToggleWireframe");
+	view_listener_t::addMenu(new LLAdvancedCheckWireframe(), "Advanced.CheckWireframe");
+	view_listener_t::addMenu(new LLAdvancedToggleDisableTextures(), "Advanced.ToggleDisableTextures");
+	view_listener_t::addMenu(new LLAdvancedCheckDisableTextures(), "Advanced.CheckDisableTextures");
+	view_listener_t::addMenu(new LLAdvancedEnableObjectObjectOcclusion(), "Advanced.EnableObjectObjectOcclusion");
+	view_listener_t::addMenu(new LLAdvancedToggleRandomizeFramerate(), "Advanced.ToggleRandomizeFramerate");
+	view_listener_t::addMenu(new LLAdvancedCheckRandomizeFramerate(), "Advanced.CheckRandomizeFramerate");
+	view_listener_t::addMenu(new LLAdvancedTogglePeriodicSlowFrame(), "Advanced.TogglePeriodicSlowFrame");
+	view_listener_t::addMenu(new LLAdvancedCheckPeriodicSlowFrame(), "Advanced.CheckPeriodicSlowFrame");
+	view_listener_t::addMenu(new LLAdvancedVectorizePerfTest(), "Advanced.VectorizePerfTest");
+	view_listener_t::addMenu(new LLAdvancedToggleFrameTest(), "Advanced.ToggleFrameTest");
+	view_listener_t::addMenu(new LLAdvancedCheckFrameTest(), "Advanced.CheckFrameTest");
+	view_listener_t::addMenu(new LLAdvancedHandleAttchedLightParticles(), "Advanced.HandleAttchedLightParticles");
+	
+
+	#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
+	view_listener_t::addMenu(new LLAdvancedHandleToggleHackedGodmode(), "Advanced.HandleToggleHackedGodmode");
+	view_listener_t::addMenu(new LLAdvancedCheckToggleHackedGodmode(), "Advanced.CheckToggleHackedGodmode");
+	view_listener_t::addMenu(new LLAdvancedEnableToggleHackedGodmode(), "Advanced.EnableToggleHackedGodmode");
+	#endif
+
+	// Advanced > World
+	view_listener_t::addMenu(new LLAdvancedDumpScriptedCamera(), "Advanced.DumpScriptedCamera");
+	view_listener_t::addMenu(new LLAdvancedDumpRegionObjectCache(), "Advanced.DumpRegionObjectCache");
+
+	// Advanced > UI
+	view_listener_t::addMenu(new LLAdvancedWebBrowserTest(), "Advanced.WebBrowserTest");
+	view_listener_t::addMenu(new LLAdvancedBuyCurrencyTest(), "Advanced.BuyCurrencyTest");
+	view_listener_t::addMenu(new LLAdvancedToggleEditableUI(), "Advanced.ToggleEditableUI");
+	view_listener_t::addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr");
+	view_listener_t::addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory");
+	view_listener_t::addMenu(new LLAdvancedDumpFocusHolder(), "Advanced.DumpFocusHolder");
+	view_listener_t::addMenu(new LLAdvancedPrintSelectedObjectInfo(), "Advanced.PrintSelectedObjectInfo");
+	view_listener_t::addMenu(new LLAdvancedPrintAgentInfo(), "Advanced.PrintAgentInfo");
+	view_listener_t::addMenu(new LLAdvancedPrintTextureMemoryStats(), "Advanced.PrintTextureMemoryStats");
+	view_listener_t::addMenu(new LLAdvancedToggleDebugClicks(), "Advanced.ToggleDebugClicks");
+	view_listener_t::addMenu(new LLAdvancedCheckDebugClicks(), "Advanced.CheckDebugClicks");
+	view_listener_t::addMenu(new LLAdvancedCheckDebugViews(), "Advanced.CheckDebugViews");
+	view_listener_t::addMenu(new LLAdvancedToggleDebugViews(), "Advanced.ToggleDebugViews");
+	view_listener_t::addMenu(new LLAdvancedToggleXUINameTooltips(), "Advanced.ToggleXUINameTooltips");
+	view_listener_t::addMenu(new LLAdvancedCheckXUINameTooltips(), "Advanced.CheckXUINameTooltips");
+	view_listener_t::addMenu(new LLAdvancedToggleDebugMouseEvents(), "Advanced.ToggleDebugMouseEvents");
+	view_listener_t::addMenu(new LLAdvancedCheckDebugMouseEvents(), "Advanced.CheckDebugMouseEvents");
+	view_listener_t::addMenu(new LLAdvancedToggleDebugKeys(), "Advanced.ToggleDebugKeys");
+	view_listener_t::addMenu(new LLAdvancedCheckDebugKeys(), "Advanced.CheckDebugKeys");
+	view_listener_t::addMenu(new LLAdvancedToggleDebugWindowProc(), "Advanced.ToggleDebugWindowProc");
+	view_listener_t::addMenu(new LLAdvancedCheckDebugWindowProc(), "Advanced.CheckDebugWindowProc");
+
+
+	// Advanced > XUI
+	view_listener_t::addMenu(new LLAdvancedShowFontTest(), "Advanced.ShowFontTest");
+	view_listener_t::addMenu(new LLAdvancedLoadUIFromXML(), "Advanced.LoadUIFromXML");
+	view_listener_t::addMenu(new LLAdvancedSaveUIToXML(), "Advanced.SaveUIToXML");
+	view_listener_t::addMenu(new LLAdvancedToggleXUINames(), "Advanced.ToggleXUINames");
+	view_listener_t::addMenu(new LLAdvancedCheckXUINames(), "Advanced.CheckXUINames");
+
+	// Advanced > Character > Grab Baked Texture
+	view_listener_t::addMenu(new LLAdvancedGrabBakedTexture(), "Advanced.GrabBakedTexture");
+	view_listener_t::addMenu(new LLAdvancedEnableGrabBakedTexture(), "Advanced.EnableGrabBakedTexture");
+
+	// Advanced > Character > Character Tests
+	view_listener_t::addMenu(new LLAdvancedAppearanceToXML(), "Advanced.AppearanceToXML");
+	view_listener_t::addMenu(new LLAdvancedToggleCharacterGeometry(), "Advanced.ToggleCharacterGeometry");
+
+	view_listener_t::addMenu(new LLAdvancedTestMale(), "Advanced.TestMale");
+	view_listener_t::addMenu(new LLAdvancedTestFemale(), "Advanced.TestFemale");
+	view_listener_t::addMenu(new LLAdvancedTogglePG(), "Advanced.TogglePG");
+	
+	// Advanced > Character (toplevel)
+	view_listener_t::addMenu(new LLAdvancedToggleAllowTapTapHoldRun(), "Advanced.ToggleAllowTapTapHoldRun");
+	view_listener_t::addMenu(new LLAdvancedCheckAllowTapTapHoldRun(), "Advanced.CheckAllowTapTapHoldRun");
+	view_listener_t::addMenu(new LLAdvancedForceParamsToDefault(), "Advanced.ForceParamsToDefault");
+	view_listener_t::addMenu(new LLAdvancedReloadVertexShader(), "Advanced.ReloadVertexShader");
+	view_listener_t::addMenu(new LLAdvancedToggleAnimationInfo(), "Advanced.ToggleAnimationInfo");
+	view_listener_t::addMenu(new LLAdvancedCheckAnimationInfo(), "Advanced.CheckAnimationInfo");
+	view_listener_t::addMenu(new LLAdvancedToggleShowLookAt(), "Advanced.ToggleShowLookAt");
+	view_listener_t::addMenu(new LLAdvancedCheckShowLookAt(), "Advanced.CheckShowLookAt");
+	view_listener_t::addMenu(new LLAdvancedToggleShowPointAt(), "Advanced.ToggleShowPointAt");
+	view_listener_t::addMenu(new LLAdvancedCheckShowPointAt(), "Advanced.CheckShowPointAt");
+	view_listener_t::addMenu(new LLAdvancedToggleDebugJointUpdates(), "Advanced.ToggleDebugJointUpdates");
+	view_listener_t::addMenu(new LLAdvancedCheckDebugJointUpdates(), "Advanced.CheckDebugJointUpdates");
+	view_listener_t::addMenu(new LLAdvancedToggleDisableLOD(), "Advanced.ToggleDisableLOD");
+	view_listener_t::addMenu(new LLAdvancedCheckDisableLOD(), "Advanced.CheckDisableLOD");
+	view_listener_t::addMenu(new LLAdvancedToggleDebugCharacterVis(), "Advanced.ToggleDebugCharacterVis");
+	view_listener_t::addMenu(new LLAdvancedCheckDebugCharacterVis(), "Advanced.CheckDebugCharacterVis");
+	view_listener_t::addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments");
+	view_listener_t::addMenu(new LLAdvancedRebakeTextures(), "Advanced.RebakeTextures");
+	#ifndef LL_RELEASE_FOR_DOWNLOAD
+	view_listener_t::addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures");
+	view_listener_t::addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures");
+	view_listener_t::addMenu(new LLAdvancedMemoryLeakingSimulation(), "Advanced.MemoryLeakingSimulation");
+	#endif
+	// Advanced > Network
+	view_listener_t::addMenu(new LLAdvancedEnableMessageLog(), "Advanced.EnableMessageLog");
+	view_listener_t::addMenu(new LLAdvancedDisableMessageLog(), "Advanced.DisableMessageLog");
+	view_listener_t::addMenu(new LLAdvancedDropPacket(), "Advanced.DropPacket");
+
+	// Advanced > Recorder
+	view_listener_t::addMenu(new LLAdvancedAgentPilot(), "Advanced.AgentPilot");
+	view_listener_t::addMenu(new LLAdvancedToggleAgentPilotLoop(), "Advanced.ToggleAgentPilotLoop");
+	view_listener_t::addMenu(new LLAdvancedCheckAgentPilotLoop(), "Advanced.CheckAgentPilotLoop");
+
+	// Advanced > Debugging
+	view_listener_t::addMenu(new LLAdvancedForceErrorBreakpoint(), "Advanced.ForceErrorBreakpoint");
+	view_listener_t::addMenu(new LLAdvancedForceErrorLlerror(), "Advanced.ForceErrorLlerror");
+	view_listener_t::addMenu(new LLAdvancedForceErrorBadMemoryAccess(), "Advanced.ForceErrorBadMemoryAccess");
+	view_listener_t::addMenu(new LLAdvancedForceErrorInfiniteLoop(), "Advanced.ForceErrorInfiniteLoop");
+	view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareException(), "Advanced.ForceErrorSoftwareException");
+	view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDriverCrash");
+	view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDisconnectViewer");
+
+	// Advanced (toplevel)
+	view_listener_t::addMenu(new LLAdvancedToggleShowObjectUpdates(), "Advanced.ToggleShowObjectUpdates");
+	view_listener_t::addMenu(new LLAdvancedCheckShowObjectUpdates(), "Advanced.CheckShowObjectUpdates");
+	view_listener_t::addMenu(new LLAdvancedCompressImage(), "Advanced.CompressImage");
+	view_listener_t::addMenu(new LLAdvancedShowDebugSettings(), "Advanced.ShowDebugSettings");
+	view_listener_t::addMenu(new LLAdvancedToggleViewAdminOptions(), "Advanced.ToggleViewAdminOptions");
+	view_listener_t::addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions");
+	view_listener_t::addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus");
+	view_listener_t::addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus");
+
+
+	// Admin >Object
+	view_listener_t::addMenu(new LLAdminForceTakeCopy(), "Admin.ForceTakeCopy");
+	view_listener_t::addMenu(new LLAdminHandleObjectOwnerSelf(), "Admin.HandleObjectOwnerSelf");
+	view_listener_t::addMenu(new LLAdminHandleObjectOwnerPermissive(), "Admin.HandleObjectOwnerPermissive");
+	view_listener_t::addMenu(new LLAdminHandleForceDelete(), "Admin.HandleForceDelete");
+	view_listener_t::addMenu(new LLAdminHandleObjectLock(), "Admin.HandleObjectLock");
+	view_listener_t::addMenu(new LLAdminHandleObjectAssetIDs(), "Admin.HandleObjectAssetIDs");
+
+	// Admin >Parcel 
+	view_listener_t::addMenu(new LLAdminHandleForceParcelOwnerToMe(), "Admin.HandleForceParcelOwnerToMe");
+	view_listener_t::addMenu(new LLAdminHandleForceParcelToContent(), "Admin.HandleForceParcelToContent");
+	view_listener_t::addMenu(new LLAdminHandleClaimPublicLand(), "Admin.HandleClaimPublicLand");
+
+	// Admin >Region
+	view_listener_t::addMenu(new LLAdminHandleRegionDumpTempAssetData(), "Admin.HandleRegionDumpTempAssetData");
+	// Admin top level
+	view_listener_t::addMenu(new LLAdminShowGodTools(), "Admin.ShowGodTools");
+	view_listener_t::addMenu(new LLAdminOnSaveState(), "Admin.OnSaveState");
+
 	// Self pie menu
-	addMenu(new LLSelfStandUp(), "Self.StandUp");
-	addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments");
-
-	addMenu(new LLSelfEnableStandUp(), "Self.EnableStandUp");
-	addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
-
-	 // Avatar pie menu
-	addMenu(new LLObjectMute(), "Avatar.Mute");
-	addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend");
-	addMenu(new LLAvatarFreeze(), "Avatar.Freeze");
-	addMenu(new LLAvatarDebug(), "Avatar.Debug");
-	addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");
-	addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug");
-	addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup");
-	addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
-	addMenu(new LLAvatarEject(), "Avatar.Eject");
-	addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
-	addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
+	view_listener_t::addMenu(new LLSelfStandUp(), "Self.StandUp");
+	view_listener_t::addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments");
+
+	view_listener_t::addMenu(new LLSelfEnableStandUp(), "Self.EnableStandUp");
+	view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
+
+	// Avatar pie menu
+	view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");
+	view_listener_t::addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend");
+	view_listener_t::addMenu(new LLAvatarFreeze(), "Avatar.Freeze");
+	view_listener_t::addMenu(new LLAvatarDebug(), "Avatar.Debug");
+	view_listener_t::addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");
+	view_listener_t::addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug");
+	view_listener_t::addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup");
+	view_listener_t::addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
+	view_listener_t::addMenu(new LLAvatarEject(), "Avatar.Eject");
+	view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
+	view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
 	
-	addMenu(new LLObjectEnableMute(), "Avatar.EnableMute");
-	addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
-	addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject");
+	view_listener_t::addMenu(new LLObjectEnableMute(), "Avatar.EnableMute");
+	view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
+	view_listener_t::addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject");
 
 	// Object pie menu
-	addMenu(new LLObjectOpen(), "Object.Open");
-	addMenu(new LLObjectBuild(), "Object.Build");
-	addMenu(new LLObjectTouch(), "Object.Touch");
-	addMenu(new LLObjectSitOrStand(), "Object.SitOrStand");
-	addMenu(new LLObjectDelete(), "Object.Delete");
-	addMenu(new LLObjectAttachToAvatar(), "Object.AttachToAvatar");
-	addMenu(new LLObjectReturn(), "Object.Return");
-	addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse");
-	addMenu(new LLObjectMute(), "Object.Mute");
-	addMenu(new LLObjectBuy(), "Object.Buy");
-	addMenu(new LLObjectEdit(), "Object.Edit");
-	addMenu(new LLObjectInspect(), "Object.Inspect");
-
-	addMenu(new LLObjectEnableOpen(), "Object.EnableOpen");
-	addMenu(new LLObjectEnableTouch(), "Object.EnableTouch");
-	addMenu(new LLObjectEnableSitOrStand(), "Object.EnableSitOrStand");
-	addMenu(new LLObjectEnableDelete(), "Object.EnableDelete");
-	addMenu(new LLObjectEnableWear(), "Object.EnableWear");
-	addMenu(new LLObjectEnableReturn(), "Object.EnableReturn");
-	addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse");
-	addMenu(new LLObjectEnableMute(), "Object.EnableMute");
-	addMenu(new LLObjectEnableBuy(), "Object.EnableBuy");
-
-	/*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch");
-	addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch");
-	addMenu(new LLObjectVisibleStandUp(), "Object.VisibleStandUp");
-	addMenu(new LLObjectVisibleSitHere(), "Object.VisibleSitHere");
-	addMenu(new LLObjectVisibleCustomSit(), "Object.VisibleCustomSit");*/
+	view_listener_t::addMenu(new LLObjectOpen(), "Object.Open");
+	view_listener_t::addMenu(new LLObjectBuild(), "Object.Build");
+	view_listener_t::addMenu(new LLObjectTouch(), "Object.Touch");
+	view_listener_t::addMenu(new LLObjectSitOrStand(), "Object.SitOrStand");
+	view_listener_t::addMenu(new LLObjectDelete(), "Object.Delete");
+	view_listener_t::addMenu(new LLObjectAttachToAvatar(), "Object.AttachToAvatar");
+	view_listener_t::addMenu(new LLObjectReturn(), "Object.Return");
+	view_listener_t::addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse");
+	view_listener_t::addMenu(new LLObjectMute(), "Object.Mute");
+	view_listener_t::addMenu(new LLObjectBuy(), "Object.Buy");
+	view_listener_t::addMenu(new LLObjectEdit(), "Object.Edit");
+	view_listener_t::addMenu(new LLObjectInspect(), "Object.Inspect");
+
+	view_listener_t::addMenu(new LLObjectEnableOpen(), "Object.EnableOpen");
+	view_listener_t::addMenu(new LLObjectEnableTouch(), "Object.EnableTouch");
+	view_listener_t::addMenu(new LLObjectEnableSitOrStand(), "Object.EnableSitOrStand");
+	view_listener_t::addMenu(new LLObjectEnableDelete(), "Object.EnableDelete");
+	view_listener_t::addMenu(new LLObjectEnableWear(), "Object.EnableWear");
+	view_listener_t::addMenu(new LLObjectEnableReturn(), "Object.EnableReturn");
+	view_listener_t::addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse");
+	view_listener_t::addMenu(new LLObjectEnableMute(), "Object.EnableMute");
+	view_listener_t::addMenu(new LLObjectEnableBuy(), "Object.EnableBuy");
+
+	/*view_listener_t::addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch");
+	view_listener_t::addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch");
+	view_listener_t::addMenu(new LLObjectVisibleStandUp(), "Object.VisibleStandUp");
+	view_listener_t::addMenu(new LLObjectVisibleSitHere(), "Object.VisibleSitHere");
+	view_listener_t::addMenu(new LLObjectVisibleCustomSit(), "Object.VisibleCustomSit");*/
 
 	// Attachment pie menu
-	addMenu(new LLAttachmentDrop(), "Attachment.Drop");
-	addMenu(new LLAttachmentDetach(), "Attachment.Detach");
-
-	addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop");
-	addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach");
+	enable.add("Attachment.Label", boost::bind(&onEnableAttachmentLabel, _1, _2));
+	view_listener_t::addMenu(new LLAttachmentDrop(), "Attachment.Drop");
+	view_listener_t::addMenu(new LLAttachmentDetachFromPoint(), "Attachment.DetachFromPoint");
+	view_listener_t::addMenu(new LLAttachmentDetach(), "Attachment.Detach");
+	view_listener_t::addMenu(new LLAttachmentPointFilled(), "Attachment.PointFilled");
+	view_listener_t::addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop");
+	view_listener_t::addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach");
 
 	// Land pie menu
-	addMenu(new LLLandBuild(), "Land.Build");
-	addMenu(new LLLandSit(), "Land.Sit");
-	addMenu(new LLLandBuyPass(), "Land.BuyPass");
-	addMenu(new LLLandEdit(), "Land.Edit");
+	view_listener_t::addMenu(new LLLandBuild(), "Land.Build");
+	view_listener_t::addMenu(new LLLandSit(), "Land.Sit");
+	view_listener_t::addMenu(new LLLandBuyPass(), "Land.BuyPass");
+	view_listener_t::addMenu(new LLLandEdit(), "Land.Edit");
 
-	addMenu(new LLLandEnableBuyPass(), "Land.EnableBuyPass");
+	view_listener_t::addMenu(new LLLandEnableBuyPass(), "Land.EnableBuyPass");
 
 	// Generic actions
-	addMenu(new LLShowFloater(), "ShowFloater");
-	addMenu(new LLPromptShowURL(), "PromptShowURL");
-	addMenu(new LLShowAgentProfile(), "ShowAgentProfile");
-	addMenu(new LLShowAgentGroups(), "ShowAgentGroups");
-	addMenu(new LLToggleControl(), "ToggleControl");
-
-	addMenu(new LLGoToObject(), "GoToObject");
-	addMenu(new LLPayObject(), "PayObject");
-
-	addMenu(new LLEnablePayObject(), "EnablePayObject");
-	addMenu(new LLEnableEdit(), "EnableEdit");
-
-	addMenu(new LLFloaterVisible(), "FloaterVisible");
-	addMenu(new LLSomethingSelected(), "SomethingSelected");
-	addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD");
-	addMenu(new LLEditableSelected(), "EditableSelected");
-	addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
+	view_listener_t::addMenu(new LLShowFloater(), "ShowFloater");
+	view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL");
+	view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile");
+	view_listener_t::addMenu(new LLToggleControl(), "ToggleControl");
+	view_listener_t::addMenu(new LLCheckControl(), "CheckControl");
+	view_listener_t::addMenu(new LLGoToObject(), "GoToObject");
+	view_listener_t::addMenu(new LLPayObject(), "PayObject");
+
+	view_listener_t::addMenu(new LLEnablePayObject(), "EnablePayObject");
+	view_listener_t::addMenu(new LLEnableEdit(), "EnableEdit");
+
+	view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible");
+	view_listener_t::addMenu(new LLSomethingSelected(), "SomethingSelected");
+	view_listener_t::addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD");
+	view_listener_t::addMenu(new LLEditableSelected(), "EditableSelected");
+	view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
+
 }
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index e9fedf37d8..99994bdf5b 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -34,6 +34,7 @@
 #define LL_LLVIEWERMENU_H
 
 #include "llmenugl.h"
+#include "llsafehandle.h"
 
 //newview includes
 #include "llfilepicker.h"
@@ -44,7 +45,6 @@ class LLParcelSelection;
 class LLObjectSelection;
 
 
-void pre_init_menus();
 void init_menus();
 void cleanup_menus();
 
@@ -79,26 +79,22 @@ BOOL enable_redo(void*);
 BOOL is_agent_friend(const LLUUID& agent_id);
 BOOL is_agent_mappable(const LLUUID& agent_id);
 
-void menu_toggle_control( void* user_data );
 void confirm_replace_attachment(S32 option, void* user_data);
-void handle_detach_from_avatar(void* user_data);
-void attach_label(std::string& label, void* user_data);
-void detach_label(std::string& label, void* user_data);
-BOOL object_selected_and_point_valid(void* user_data);
-BOOL object_attached(void* user_data);
+void handle_detach_from_avatar(const LLSD& user_data);
+void attach_label(std::string& label, const LLSD&);
+void detach_label(std::string& label, const LLSD&);
+BOOL object_selected_and_point_valid(const LLSD&);
 void handle_detach(void*);
 BOOL enable_god_full(void* user_data);
 BOOL enable_god_liaison(void* user_data);
 BOOL enable_god_customer_service(void* user_data);
 BOOL enable_god_basic(void* user_data);
-void handle_show_newest_map(void*);
 void set_underclothes_menu_options();
 
 void exchange_callingcard(const LLUUID& dest_id);
 
 void handle_gestures(void*);
 void handle_sit_down(void*);
-bool toggle_build_mode();
 void handle_object_build(void*);
 void handle_save_snapshot(void *);
 void handle_toggle_flycam();
@@ -119,8 +115,6 @@ class LLPermissions;
 class LLViewerMenuHolderGL : public LLMenuHolderGL
 {
 public:
-	LLViewerMenuHolderGL();
-
 	virtual BOOL hideMenus();
 	
 	void setParcelSelection(LLSafeHandle<LLParcelSelection> selection);
@@ -142,30 +136,31 @@ extern LLViewerMenuHolderGL*	gMenuHolder;
 extern LLMenuBarGL*		gLoginMenuBarView;
 
 // Pie menus
-extern LLPieMenu	*gPieSelf;
-extern LLPieMenu	*gPieAvatar;
-extern LLPieMenu	*gPieObject;
-extern LLPieMenu	*gPieAttachment;
-extern LLPieMenu	*gPieLand;
-extern LLPieMenu*	gPieRate;
+extern LLContextMenu		*gPieSelf;
+extern LLContextMenu		*gPieAvatar;
+extern LLContextMenu		*gPieObject;
+extern LLContextMenu		*gPieAttachment;
+
+extern LLContextMenu		*gPieLand;
+extern LLContextMenu		*gPieRate;
 
 // Pie menus
-extern LLPieMenu	*gPieSelfSimple;
-extern LLPieMenu	*gPieAvatarSimple;
-extern LLPieMenu	*gPieObjectSimple;
-extern LLPieMenu	*gPieAttachmentSimple;
-extern LLPieMenu	*gPieLandSimple;
+extern LLContextMenu	*gPieSelfSimple;
+extern LLContextMenu	*gPieAvatarSimple;
+extern LLContextMenu	*gPieObjectSimple;
+extern LLContextMenu	*gPieAttachmentSimple;
+extern LLContextMenu	*gPieLandSimple;
 
 // Needed to build menus when attachment site list available
 extern LLMenuGL* gAttachSubMenu;
 extern LLMenuGL* gDetachSubMenu;
 extern LLMenuGL* gTakeOffClothes;
-extern LLPieMenu* gAttachScreenPieMenu;
-extern LLPieMenu* gDetachScreenPieMenu;
-extern LLPieMenu* gAttachPieMenu;
-extern LLPieMenu* gDetachPieMenu;
-extern LLPieMenu* gAttachBodyPartPieMenus[8];
-extern LLPieMenu* gDetachBodyPartPieMenus[8];
+extern LLContextMenu* gAttachScreenPieMenu;
+extern LLContextMenu* gDetachScreenPieMenu;
+extern LLContextMenu* gAttachPieMenu;
+extern LLContextMenu* gDetachPieMenu;
+extern LLContextMenu* gAttachBodyPartPieMenus[8];
+extern LLContextMenu* gDetachBodyPartPieMenus[8];
 
 extern LLMenuItemCallGL* gAFKMenu;
 extern LLMenuItemCallGL* gBusyMenu;
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 5240fd3211..97b121d71d 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -55,13 +55,13 @@
 #include "llviewerwindow.h"
 #include "llappviewer.h"
 #include "lluploaddialog.h"
+#include "lltrans.h"
 
 
 // linden libraries
 #include "llassetuploadresponders.h"
 #include "lleconomy.h"
 #include "llhttpclient.h"
-#include "llmemberlistener.h"
 #include "llsdserialize.h"
 #include "llstring.h"
 #include "lltransactiontypes.h"
@@ -71,26 +71,21 @@
 // system libraries
 #include <boost/tokenizer.hpp>
 
-typedef LLMemberListener<LLView> view_listener_t;
-
-
 class LLFileEnableSaveAs : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = gFloaterView->getFrontmost() && gFloaterView->getFrontmost()->canSaveAs();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLFileEnableUpload : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = gStatusBar && LLGlobalEconomy::Singleton::getInstance() && (gStatusBar->getBalance() >= LLGlobalEconomy::Singleton::getInstance()->getPriceUpload());
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
@@ -253,7 +248,7 @@ const std::string upload_pick(void* data)
 
 class LLFileUploadImage : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string filename = upload_pick((void *)LLFilePicker::FFLOAD_IMAGE);
 		if (!filename.empty())
@@ -267,7 +262,7 @@ class LLFileUploadImage : public view_listener_t
 
 class LLFileUploadSound : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		std::string filename = upload_pick((void*)LLFilePicker::FFLOAD_WAV);
 		if (!filename.empty())
@@ -282,7 +277,7 @@ class LLFileUploadSound : public view_listener_t
 
 class LLFileUploadAnim : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		const std::string filename = upload_pick((void*)LLFilePicker::FFLOAD_ANIM);
 		if (!filename.empty())
@@ -296,7 +291,7 @@ class LLFileUploadAnim : public view_listener_t
 
 class LLFileUploadBulk : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		if( gAgent.cameraMouselook() )
 		{
@@ -358,19 +353,16 @@ void upload_error(const std::string& error_message, const std::string& label, co
 
 class LLFileEnableCloseWindow : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool new_value = NULL != LLFloater::getClosableFloaterFromFocus();
-
-		// horrendously opaque, this code
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
-		return true;
+		return new_value;
 	}
 };
 
 class LLFileCloseWindow : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLFloater::closeFocusedFloater();
 
@@ -380,17 +372,16 @@ class LLFileCloseWindow : public view_listener_t
 
 class LLFileEnableCloseAllWindows : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool open_children = gFloaterView->allChildrenClosed();
-		gMenuHolder->findControl(userdata["control"].asString())->setValue(!open_children);
-		return true;
+		return !open_children;
 	}
 };
 
 class LLFileCloseAllWindows : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		bool app_quitting = false;
 		gFloaterView->closeAllChildren(app_quitting);
@@ -401,7 +392,7 @@ class LLFileCloseAllWindows : public view_listener_t
 
 class LLFileSaveTexture : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLFloater* top = gFloaterView->getFrontmost();
 		if (top)
@@ -412,18 +403,9 @@ class LLFileSaveTexture : public view_listener_t
 	}
 };
 
-class LLFileTakeSnapshot : public view_listener_t
-{
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-	{
-		LLFloaterSnapshot::show(NULL);
-		return true;
-	}
-};
-
 class LLFileTakeSnapshotToDisk : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLPointer<LLImageRaw> raw = new LLImageRaw;
 
@@ -475,23 +457,13 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
 
 class LLFileQuit : public view_listener_t
 {
-	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+	bool handleEvent(const LLSD& userdata)
 	{
 		LLAppViewer::instance()->userQuit();
 		return true;
 	}
 };
 
-void handle_upload(void* data)
-{
-	const std::string filename = upload_pick(data);
-	if (!filename.empty())
-	{
-		LLFloaterNameDesc* floaterp = new LLFloaterNameDesc(filename);
-		LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_name_description.xml");
-		floaterp->childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload() ));
-	}
-}
 
 void handle_compress_image(void*)
 {
@@ -775,8 +747,7 @@ void upload_new_resource(const std::string& src_filename, std::string name,
 	else
 	{
 		// Unknown extension
-		// *TODO: Translate?
-		error_message = llformat("Unknown file extension .%s\nExpected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh", exten.c_str());
+		error_message = llformat(LLTrans::getString("UnknownFileExtension").c_str(), exten.c_str());
 		error = TRUE;;
 	}
 
@@ -856,9 +827,9 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt
 			if(!(can_afford_transaction(expected_upload_cost)))
 			{
 				LLFloaterBuyCurrency::buyCurrency(
-					llformat("Uploading %s costs",
-							 data->mAssetInfo.getName().c_str()), // *TODO: Translate
-					expected_upload_cost);
+					llformat(LLTrans::getString("UploadingCosts").c_str(),
+							 data->mAssetInfo.getName().c_str()),
+					         expected_upload_cost);
 				is_balance_sufficient = FALSE;
 			}
 			else if(region)
@@ -1073,22 +1044,20 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty
 	}
 }
 
-
 void init_menu_file()
 {
-	(new LLFileUploadImage())->registerListener(gMenuHolder, "File.UploadImage");
-	(new LLFileUploadSound())->registerListener(gMenuHolder, "File.UploadSound");
-	(new LLFileUploadAnim())->registerListener(gMenuHolder, "File.UploadAnim");
-	(new LLFileUploadBulk())->registerListener(gMenuHolder, "File.UploadBulk");
-	(new LLFileCloseWindow())->registerListener(gMenuHolder, "File.CloseWindow");
-	(new LLFileCloseAllWindows())->registerListener(gMenuHolder, "File.CloseAllWindows");
-	(new LLFileEnableCloseWindow())->registerListener(gMenuHolder, "File.EnableCloseWindow");
-	(new LLFileEnableCloseAllWindows())->registerListener(gMenuHolder, "File.EnableCloseAllWindows");
-	(new LLFileSaveTexture())->registerListener(gMenuHolder, "File.SaveTexture");
-	(new LLFileTakeSnapshot())->registerListener(gMenuHolder, "File.TakeSnapshot");
-	(new LLFileTakeSnapshotToDisk())->registerListener(gMenuHolder, "File.TakeSnapshotToDisk");
-	(new LLFileQuit())->registerListener(gMenuHolder, "File.Quit");
-
-	(new LLFileEnableUpload())->registerListener(gMenuHolder, "File.EnableUpload");
-	(new LLFileEnableSaveAs())->registerListener(gMenuHolder, "File.EnableSaveAs");
+	view_listener_t::addCommit(new LLFileUploadImage(), "File.UploadImage");
+	view_listener_t::addCommit(new LLFileUploadSound(), "File.UploadSound");
+	view_listener_t::addCommit(new LLFileUploadAnim(), "File.UploadAnim");
+	view_listener_t::addCommit(new LLFileUploadBulk(), "File.UploadBulk");
+	view_listener_t::addCommit(new LLFileCloseWindow(), "File.CloseWindow");
+	view_listener_t::addCommit(new LLFileCloseAllWindows(), "File.CloseAllWindows");
+	view_listener_t::addEnable(new LLFileEnableCloseWindow(), "File.EnableCloseWindow");
+	view_listener_t::addEnable(new LLFileEnableCloseAllWindows(), "File.EnableCloseAllWindows");
+	view_listener_t::addCommit(new LLFileSaveTexture(), "File.SaveTexture");
+	view_listener_t::addCommit(new LLFileTakeSnapshotToDisk(), "File.TakeSnapshotToDisk");
+	view_listener_t::addCommit(new LLFileQuit(), "File.Quit");
+
+	view_listener_t::addEnable(new LLFileEnableUpload(), "File.EnableUpload");
+	view_listener_t::addEnable(new LLFileEnableSaveAs(), "File.EnableSaveAs");
 }
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 520de0e403..d02e667d19 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -48,6 +48,7 @@
 #include "lldbstrings.h"
 #include "lleconomy.h"
 #include "llfilepicker.h"
+#include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "llfollowcamparams.h"
 #include "llinstantmessage.h"
@@ -160,7 +161,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name);
 bool check_offer_throttle(const std::string& from_name, bool check_only);
 void callbackCacheEstateOwnerName(const LLUUID& id,
 								  const std::string& first, const std::string& last,
-								  BOOL is_group, void*);
+								  BOOL is_group);
 
 //inventory offer throttle globals
 LLFrameTimer gThrottleTimer;
@@ -867,13 +868,14 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
 	LLInventoryItem* item;
 	for(; it != end; ++it)
 	{
-		item = gInventory.getItem(*it);
+		const LLUUID& id = *it;
+		item = gInventory.getItem(id);
 		if(!item)
 		{
-			LL_WARNS("Messaging") << "Unable to show inventory item: " << *it << LL_ENDL;
+			LL_WARNS("Messaging") << "Unable to show inventory item: " << id << LL_ENDL;
 			continue;
 		}
-		if(gInventory.isObjectDescendentOf(*it, trash_id))
+		if(gInventory.isObjectDescendentOf(id, trash_id))
 		{
 			continue;
 		}
@@ -882,40 +884,43 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
 		//if we are throttled, don't display them
 		if (check_offer_throttle(from_name, false))
 		{
-			// I'm not sure this is a good idea.
-			bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID();
-			//bool show_keep_discard = true;
+			// If we opened this ourselves, focus it
+			BOOL take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO;
 			switch(asset_type)
 			{
-			case LLAssetType::AT_NOTECARD:
-				open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), LLUUID::null, show_keep_discard, LLUUID::null, FALSE);
+			  case LLAssetType::AT_NOTECARD:
+				LLFloaterReg::showInstance("preview_notecard", LLSD(id), take_focus);
 				break;
-			case LLAssetType::AT_LANDMARK:
-				open_landmark((LLViewerInventoryItem*)item, std::string("Landmark: ") + item->getName(), show_keep_discard, LLUUID::null, FALSE);
+			  case LLAssetType::AT_LANDMARK:
+				LLFloaterReg::showInstance("preview_landmark", LLSD(id), take_focus);
 				break;
-			case LLAssetType::AT_TEXTURE:
-				open_texture(*it, std::string("Texture: ") + item->getName(), show_keep_discard, LLUUID::null, FALSE);
+			  case LLAssetType::AT_TEXTURE:
+				LLFloaterReg::showInstance("preview_texture", LLSD(id), take_focus);
 				break;
-			default:
+			  default:
 				break;
 			}
 		}
 		//highlight item, if it's not in the trash or lost+found
 		
 		// Don't auto-open the inventory floater
-		LLInventoryView* view = LLInventoryView::getActiveInventory();
-		if(!view)
-		{
-			return;
-		}
-
+		LLInventoryView* view = NULL;
 		if(gSavedSettings.getBOOL("ShowInInventory") &&
 		   asset_type != LLAssetType::AT_CALLINGCARD &&
 		   item->getInventoryType() != LLInventoryType::IT_ATTACHMENT &&
 		   !from_name.empty())
 		{
-			LLInventoryView::showAgentInventory(TRUE);
+			view = LLInventoryView::showAgentInventory();
+		}
+		else
+		{
+			view = LLInventoryView::getActiveInventory();
 		}
+		if(!view)
+		{
+			return;
+		}
+
 		//Trash Check
 		LLUUID trash_id;
 		trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
@@ -941,17 +946,19 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
 		LL_DEBUGS("Messaging") << "Highlighting" << item->getUUID()  << LL_ENDL;
 		//highlight item
 
-		LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus();
-		view->getPanel()->setSelection(item->getUUID(), TAKE_FOCUS_NO);
-		gFocusMgr.setKeyboardFocus(focus_ctrl);
+		if (view->getPanel())
+		{
+			LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus();
+			view->getPanel()->setSelection(item->getUUID(), TAKE_FOCUS_NO);
+			gFocusMgr.setKeyboardFocus(focus_ctrl);
+		}
 	}
 }
 
 void inventory_offer_mute_callback(const LLUUID& blocked_id,
 								   const std::string& first_name,
 								   const std::string& last_name,
-								   BOOL is_group,
-								   void* user_data)
+								   BOOL is_group)
 {
 	std::string from_name;
 	LLMute::EType type;
@@ -1040,7 +1047,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, this);
+		gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback);
 	}
 
 	LLMessageSystem* msg = gMessageSystem;
@@ -1070,7 +1077,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 		itemp = (LLViewerInventoryItem*)gInventory.getItem(mObjectID);
 	}
 
-	// *TODO:translate
 	std::string from_string; // Used in the pop-up.
 	std::string chatHistory_string;  // Used in chat history.
 	if (mFromObject == TRUE)
@@ -1080,13 +1086,18 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 			std::string group_name;
 			if (gCacheName->getGroupName(mFromID, group_name))
 			{
-				from_string = std::string("An object named '") + mFromName + "' owned by the group '" + group_name + "'";
-				chatHistory_string = mFromName + " owned by the group '" + group_name + "'";
+				from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+"'" 
+							+ mFromName + LLTrans::getString("'") +" " + LLTrans::getString("InvOfferOwnedByGroup") 
+				            + " "+ "'" + group_name + "'";
+				
+				chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByGroup") 
+								   + " " + group_name + "'";
 			}
 			else
 			{
-				from_string = std::string("An object named '") + mFromName + "' owned by an unknown group";
-				chatHistory_string = mFromName + " owned by an unknown group";
+				from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+"'"
+				            + mFromName +"'"+ " " + LLTrans::getString("InvOfferOwnedByUnknownGroup");
+				chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByUnknownGroup");
 			}
 		}
 		else
@@ -1094,13 +1105,15 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 			std::string first_name, last_name;
 			if (gCacheName->getName(mFromID, first_name, last_name))
 			{
-				from_string = std::string("An object named '") + mFromName + "' owned by " + first_name + " " + last_name;
-				chatHistory_string = mFromName + " owned by " + first_name + " " + last_name;
+				from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+ LLTrans::getString("'") + mFromName 
+							+ LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + first_name + " " + last_name;
+				chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + first_name + " " + last_name;
 			}
 			else
 			{
-				from_string = std::string("An object named '") + mFromName + "' owned by an unknown user";
-				chatHistory_string = mFromName + " owned by an unknown user";
+				from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+LLTrans::getString("'") 
+				            + mFromName + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedByUnknownUser");
+				chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByUnknownUser");
 			}
 		}
 	}
@@ -1128,7 +1141,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 		//don't spam them if they are getting flooded
 		if (check_offer_throttle(mFromName, true))
 		{
-			log_message = chatHistory_string + " gave you " + mDesc + ".";
+			log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString(".");
  			chat.mText = log_message;
  			LLFloaterChat::addChatHistory(chat);
 		}
@@ -1191,7 +1204,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 		// send the message
 		msg->sendReliable(mHost);
 
-		log_message = "You decline " + mDesc + " from " + mFromName + ".";
+		log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +".";
 		chat.mText = log_message;
 		if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) )  // muting for SL-42269
 		{
@@ -1232,10 +1245,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 		gInventory.addObserver(opener);
 	}
 
-	// Allow these to stack up, but once you deal with one, reset the
-	// position.
-	gFloaterView->resetStartingFloaterPosition();
-
 	delete this;
 	return false;
 }
@@ -1329,7 +1338,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
 	args["NAME"] = info->mFromName;
 
 	LLNotification::Params p("ObjectGiveItem");
-	p.substitutions(args).payload(payload).functor(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2));
+	p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2));
 
 	if (from_task)
 	{
@@ -1415,7 +1424,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 	LLChat chat;
 	std::string buffer;
 	
-	// *TODO:translate - need to fix the full name to first/last (maybe)
+	// *TODO: Translate - need to fix the full name to first/last (maybe)
 	msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, from_id);
 	msg->getBOOLFast(_PREHASH_MessageBlock, _PREHASH_FromGroup, from_group);
 	msg->getUUIDFast(_PREHASH_MessageBlock, _PREHASH_ToAgentID, to_id);
@@ -1466,7 +1475,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 	case IM_CONSOLE_AND_CHAT_HISTORY:
 		// These are used for system messages, hence don't need the name,
 		// as it is always "Second Life".
-	  	// *TODO:translate
+	  	// *TODO: Translate
 		args["MESSAGE"] = message;
 
 		// Note: don't put the message in the IM history, even though was sent
@@ -1611,7 +1620,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 	case IM_MESSAGEBOX:
 		{
 			// This is a block, modeless dialog.
-			//*TODO:translate
+			//*TODO: Translate
 			args["MESSAGE"] = message;
 			LLNotifications::instance().add("SystemMessage", args);
 		}
@@ -1969,7 +1978,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 			else
 			{
 				LLSD args;
-				// *TODO:translate -> [FIRST] [LAST] (maybe)
+				// *TODO: Translate -> [FIRST] [LAST] (maybe)
 				args["NAME"] = name;
 				args["MESSAGE"] = message;
 				LLSD payload;
@@ -2430,7 +2439,7 @@ void process_teleport_start(LLMessageSystem *msg, void**)
 	}
 	else
 	{
-		gViewerWindow->setProgressCancelButtonVisible(TRUE, std::string("Cancel")); // *TODO: Translate
+		gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Cancel"));
 	}
 
 	// Freeze the UI and show progress bar
@@ -2465,7 +2474,7 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
 	}
 	else
 	{
-		gViewerWindow->setProgressCancelButtonVisible(TRUE, std::string("Cancel")); //TODO: Translate
+		gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Cancel"));
 	}
 	std::string buffer;
 	msg->getString("Info", "Message", buffer);
@@ -4094,7 +4103,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
 	{
 		// Make the user confirm the transaction, since they might
 		// have missed something during an event.
-		// *TODO:translate
+		// *TODO: Translate
 		LLSD args;
 		args["MESSAGE"] = desc;
 		LLNotifications::instance().add("SystemMessage", args);
@@ -4170,7 +4179,7 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
 bool attempt_standard_notification(LLMessageSystem* msgsystem)
 {
 	// if we have additional alert data
-	if (msgsystem->getNumberOfBlocksFast(_PREHASH_AlertInfo) > 0)
+	if (msgsystem->has(_PREHASH_AlertInfo) && msgsystem->getNumberOfBlocksFast(_PREHASH_AlertInfo) > 0)
 	{
 		// notification was specified using the new mechanism, so we can just handle it here
 		std::string notificationID;
@@ -4316,21 +4325,21 @@ void process_alert_core(const std::string& message, BOOL modal)
 		}
 		else
 		{
-			// *TODO:translate
+			// *TODO: Translate
 			args["MESSAGE"] = text;
 			LLNotifications::instance().add("SystemMessage", args);
 		}
 	}
 	else if (modal)
 	{
-		// *TODO:translate
+		// *TODO: Translate
 		LLSD args;
 		args["ERROR_MESSAGE"] = message;
 		LLNotifications::instance().add("ErrorMessage", args);
 	}
 	else
 	{
-		// *TODO:translate
+		// *TODO: Translate
 		LLSD args;
 		args["MESSAGE"] = message;
 		LLNotifications::instance().add("SystemMessageTip", args);
@@ -4347,10 +4356,10 @@ void handle_show_mean_events(void *)
 		return;
 	}
 
-	LLFloaterBump::show(NULL);
+	LLFloaterBump::showInstance();
 }
 
-void mean_name_callback(const LLUUID &id, const std::string& first, const std::string& last, BOOL always_false, void* data)
+void mean_name_callback(const LLUUID &id, const std::string& first, const std::string& last, BOOL always_false)
 {
 	if (gNoRender)
 	{
@@ -4428,7 +4437,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use
 			LLMeanCollisionData *mcd = new LLMeanCollisionData(gAgentID, perp, time, type, mag);
 			gMeanCollisionList.push_front(mcd);
 			const BOOL is_group = FALSE;
-			gCacheName->get(perp, is_group, mean_name_callback);
+			gCacheName->get(perp, is_group, &mean_name_callback);
 		}
 	}
 }
@@ -4480,7 +4489,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
 		// located in [REGIONNAME] at [REGIONPOS], 
 		// has been <granted|denied> permission to: [PERMISSIONS]."
 
-		LLUIString notice(LLFloaterChat::getInstance()->getString(granted ? "ScriptQuestionCautionChatGranted" : "ScriptQuestionCautionChatDenied"));
+		LLUIString notice(LLTrans::getString(granted ? "ScriptQuestionCautionChatGranted" : "ScriptQuestionCautionChatDenied"));
 
 		// always include the object name and owner name 
 		notice.setArg("[OBJECTNAME]", notification["payload"]["object_name"].asString());
@@ -4534,7 +4543,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
 					perms.append(", ");
 				}
 
-				perms.append(LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i]));
+				perms.append(LLTrans::getString(SCRIPT_QUESTIONS[i]));
 			}
 		}
 
@@ -4628,7 +4637,7 @@ static LLNotificationFunctorRegistration script_question_cb_reg_2("ScriptQuestio
 
 void process_script_question(LLMessageSystem *msg, void **user_data)
 {
-	// *TODO:translate owner name -> [FIRST] [LAST]
+	// *TODO: Translate owner name -> [FIRST] [LAST]
 
 	LLHost sender = msg->getSender();
 
@@ -4696,7 +4705,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
 			if (questions & LSCRIPTRunTimePermissionBits[i])
 			{
 				count++;
-				script_question += "    " + LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i]) + "\n";
+				script_question += "    " + LLTrans::getString(SCRIPT_QUESTIONS[i]) + "\n";
 
 				// check whether permission question should cause special caution dialog
 				caution |= (SCRIPT_QUESTION_IS_CAUTION[i]);
@@ -4752,7 +4761,7 @@ void container_inventory_arrived(LLViewerObject* object,
 		LLUUID cat_id;
 		cat_id = gInventory.createNewCategory(gAgent.getInventoryRootID(),
 											  LLAssetType::AT_NONE,
-											  std::string("Acquired Items")); //TODO: Translate
+											  LLTrans::getString("AcquiredItems"));
 
 		InventoryObjectList::const_iterator it = inventory->begin();
 		InventoryObjectList::const_iterator end = inventory->end();
@@ -4846,10 +4855,11 @@ void container_inventory_arrived(LLViewerObject* object,
 // method to format the time.
 std::string formatted_time(const time_t& the_time)
 {
-	char buffer[30]; /* Flawfinder: ignore */
-	LLStringUtil::copy(buffer, ctime(&the_time), 30);
-	buffer[24] = '\0';
-	return std::string(buffer);
+	std::string dateStr = LLTrans::getString("ViewerMsgGenericTime");
+	LLSD substitution;
+	substitution["datetime"] = (S32) the_time;
+	LLStringUtil::format (dateStr, substitution);
+	return dateStr;
 }
 
 
@@ -4860,7 +4870,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
 	LLSD args;
 
 	// if we have additional alert data
-	if (msg->getNumberOfBlocksFast(_PREHASH_AlertInfo) > 0)
+	if (msg->has(_PREHASH_AlertInfo) && msg->getSizeFast(_PREHASH_AlertInfo, _PREHASH_Message) > 0)
 	{
 		// Get the message ID
 		msg->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, reason);
@@ -5073,7 +5083,7 @@ void handle_lure(const LLUUID& invitee)
 }
 
 // Prompt for a message to the invited user.
-void handle_lure(LLDynamicArray<LLUUID>& ids) 
+void handle_lure(std::vector<LLUUID>& ids) 
 {
 	LLSD edit_args;
 	edit_args["REGION"] = gAgent.getRegion()->getName();
@@ -5297,7 +5307,7 @@ static LLNotificationFunctorRegistration callback_load_url_reg("LoadWebPage", ca
 
 // We've got the name of the person who owns the object hurling the url.
 // Display confirmation dialog.
-void callback_load_url_name(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data)
+void callback_load_url_name(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group)
 {
 	std::vector<LLSD>::iterator it;
 	for (it = gLoadUrlList.begin(); it != gLoadUrlList.end(); )
@@ -5310,7 +5320,7 @@ void callback_load_url_name(const LLUUID& id, const std::string& first, const st
 			std::string owner_name;
 			if (is_group)
 			{
-				owner_name = first + " (group)";
+				owner_name = first + LLTrans::getString("Group");
 			}
 			else
 			{
@@ -5374,7 +5384,7 @@ void process_load_url(LLMessageSystem* msg, void**)
 	// Add to list of pending name lookups
 	gLoadUrlList.push_back(payload);
 
-	gCacheName->get(owner_id, owner_is_group, callback_load_url_name);
+	gCacheName->get(owner_id, owner_is_group, &callback_load_url_name);
 }
 
 
@@ -5430,12 +5440,13 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)
 	msg->getVector3("Data", "SimPosition", pos);
 	msg->getVector3("Data", "LookAt", look_at);
 
-	gFloaterWorldMap->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);
-	LLFloaterWorldMap::show(NULL, TRUE);
+	LLFloaterWorldMap::getInstance()->trackURL(
+		sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);
+	LLFloaterReg::showInstance("world_map", "center");
 
 	// remove above two lines and replace with below line
 	// to re-enable parcel browser for llMapDestination()
-	// LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE);
+	// LLURLDispatcher::dispatch(LLSLURL::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE);
 	
 }
 
@@ -5454,13 +5465,16 @@ void process_covenant_reply(LLMessageSystem* msg, void**)
 	LLFloaterBuyLand::updateEstateName(estate_name);
 
 	// standard message, not from system
-	std::string last_modified = std::string("Last Modified ") + formatted_time((time_t)covenant_timestamp);
+	std::string last_modified = LLTrans::getString("last_modified");
+	LLSD substitution;
+	substitution["datetime"] = (S32) covenant_timestamp;
+	LLStringUtil::format (last_modified, substitution);
 
 	LLPanelEstateCovenant::updateLastModified(last_modified);
 	LLPanelLandCovenant::updateLastModified(last_modified);
 	LLFloaterBuyLand::updateLastModified(last_modified);
 
-	gCacheName->getName(estate_owner_id, callbackCacheEstateOwnerName);
+	gCacheName->get(estate_owner_id, false, &callbackCacheEstateOwnerName);
 	
 	// load the actual covenant asset data
 	const BOOL high_priority = TRUE;
@@ -5482,11 +5496,11 @@ void process_covenant_reply(LLMessageSystem* msg, void**)
 		if (estate_owner_id.isNull())
 		{
 			// mainland
-			covenant_text = "There is no Covenant provided for this Estate.";
+			covenant_text = LLTrans::getString("RegionNoCovenant");
 		}
 		else
 		{
-			covenant_text = "There is no Covenant provided for this Estate. The land on this estate is being sold by the Estate owner, not Linden Lab.  Please contact the Estate Owner for sales details.";
+			covenant_text = LLTrans::getString("RegionNoCovenantOtherOwner");
 		}
 		LLPanelEstateCovenant::updateCovenantText(covenant_text, covenant_id);
 		LLPanelLandCovenant::updateCovenantText(covenant_text);
@@ -5496,13 +5510,13 @@ void process_covenant_reply(LLMessageSystem* msg, void**)
 
 void callbackCacheEstateOwnerName(const LLUUID& id,
 								  const std::string& first, const std::string& last,
-								  BOOL is_group, void*)
+								  BOOL is_group)
 {
 	std::string name;
 	
 	if (id.isNull())
 	{
-		name = "(none)";
+		name = LLTrans::getString("none_text");
 	}
 	else
 	{
@@ -5533,10 +5547,10 @@ void onCovenantLoadComplete(LLVFS *vfs,
 		
 		if( (file_length > 19) && !strncmp( &buffer[0], "Linden text version", 19 ) )
 		{
-			LLViewerTextEditor* editor =
-				new LLViewerTextEditor(std::string("temp"),
-						       LLRect(0,0,0,0),
-						       file_length+1);
+			LLViewerTextEditor::Params params;
+			params.name("temp");
+			params.max_text_length(file_length+1);
+			LLViewerTextEditor * editor = LLUICtrlFactory::create<LLViewerTextEditor> (params);
 			if( !editor->importBuffer( &buffer[0], file_length+1 ) )
 			{
 				LL_WARNS("Messaging") << "Problem importing estate covenant." << LL_ENDL;
@@ -5611,6 +5625,6 @@ void invalid_message_callback(LLMessageSystem* msg,
 void LLOfferInfo::forceResponse(InventoryOfferResponse response)
 {
 	LLNotification::Params params("UserGiveItem");
-	params.functor(boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2));
+	params.functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2));
 	LLNotifications::instance().forceResponse(params, response);
 }
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index e7a4303a8e..40e64f1ebe 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -151,7 +151,7 @@ void send_group_notice(const LLUUID& group_id,
 					   const LLInventoryItem* item);
 
 void handle_lure(const LLUUID& invitee);
-void handle_lure(LLDynamicArray<LLUUID>& ids);
+void handle_lure(std::vector<LLUUID>& ids);
 
 // always from gAgent and 
 // routes through the gAgent's current simulator
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 8719557cbc..918b15ef09 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -218,7 +218,7 @@ void LLViewerLogin::setGridChoice(const std::string& grid_name)
 void LLViewerLogin::resetURIs()
 {
     // Clear URIs when picking a new server
-	gSavedSettings.setValue("CmdLineLoginURI", LLSD::emptyArray());
+	gSavedSettings.setLLSD("CmdLineLoginURI", LLSD::emptyArray());
 	gSavedSettings.setString("CmdLineHelperURI", "");
 }
 
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index d4e594656b..f0693c1b79 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -97,6 +97,7 @@
 #include "llviewernetwork.h"
 #include "llvowlsky.h"
 #include "llmanip.h"
+#include "lltrans.h"
 
 //#define DEBUG_UPDATE_TYPE
 
@@ -2461,7 +2462,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
 		LLPointer<LLInventoryObject> obj;
 		obj = new LLInventoryObject(object->mID, LLUUID::null,
 									LLAssetType::AT_CATEGORY,
-									std::string("Contents"));
+									LLTrans::getString("ViewerObjectContents").c_str());
 		object->mInventory->push_front(obj);
 		object->doInventoryCallback();
 		delete ft;
@@ -2528,6 +2529,7 @@ void LLViewerObject::loadTaskInvFile(const std::string& filename)
 			{
 				LLPointer<LLInventoryObject> inv = new LLInventoryObject;
 				inv->importLegacyStream(ifs);
+				inv->rename(LLTrans::getString("ViewerObjectContents").c_str());
 				mInventory->push_front(inv);
 			}
 			else
@@ -2587,11 +2589,6 @@ void LLViewerObject::removeInventory(const LLUUID& item_id)
 	msg->sendReliable(mRegionp->getHost());
 	deleteInventoryItem(item_id);
 	++mInventorySerialNum;
-
-	// The viewer object should not refresh UI since this is a utility
-	// function. The UI functionality that called this method should
-	// refresh the views if necessary.
-	//gBuildView->refresh();
 }
 
 void LLViewerObject::updateInventory(
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 16a3b98d12..5ef2b960d4 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -40,7 +40,7 @@
 #include "llhudtext.h"
 #include "llhudicon.h"
 #include "llinventory.h"
-#include "llmemory.h"
+#include "llrefcount.h"
 #include "llmemtype.h"
 #include "llprimitive.h"
 #include "lluuid.h"
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index e0741e7233..926c5040fc 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -38,6 +38,7 @@
 #include "timing.h"
 #include "llfasttimer.h"
 #include "llrender.h"
+#include "llwindow.h"		// decBusyCount()
 
 #include "llviewercontrol.h"
 #include "llface.h"
@@ -251,7 +252,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
 
 		objectp->mCreateSelected = false;
 		gViewerWindow->getWindow()->decBusyCount();
-		gViewerWindow->getWindow()->setCursor( UI_CURSOR_ARROW );
+		gViewerWindow->setCursor( UI_CURSOR_ARROW );
 	}
 }
 
@@ -768,10 +769,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
 	}
 	*/
 
-	mNumObjectsStat.addValue(mObjects.count());
-	mNumActiveObjectsStat.addValue(num_active_objects);
-	mNumSizeCulledStat.addValue(mNumSizeCulled);
-	mNumVisCulledStat.addValue(mNumVisCulled);
+	LLViewerStats::getInstance()->mNumObjectsStat.addValue(mObjects.count());
+	LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(num_active_objects);
+	LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled);
+	LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled);
 }
 
 void LLViewerObjectList::clearDebugText()
@@ -1016,16 +1017,16 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
 
 void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
 {
-	LLColor4 above_water_color = gColors.getColor( "NetMapOtherOwnAboveWater" );
-	LLColor4 below_water_color = gColors.getColor( "NetMapOtherOwnBelowWater" );
+	LLColor4 above_water_color = gSavedSkinSettings.getColor( "NetMapOtherOwnAboveWater" );
+	LLColor4 below_water_color = gSavedSkinSettings.getColor( "NetMapOtherOwnBelowWater" );
 	LLColor4 you_own_above_water_color = 
-						gColors.getColor( "NetMapYouOwnAboveWater" );
+						gSavedSkinSettings.getColor( "NetMapYouOwnAboveWater" );
 	LLColor4 you_own_below_water_color = 
-						gColors.getColor( "NetMapYouOwnBelowWater" );
+						gSavedSkinSettings.getColor( "NetMapYouOwnBelowWater" );
 	LLColor4 group_own_above_water_color = 
-						gColors.getColor( "NetMapGroupOwnAboveWater" );
+						gSavedSkinSettings.getColor( "NetMapGroupOwnAboveWater" );
 	LLColor4 group_own_below_water_color = 
-						gColors.getColor( "NetMapGroupOwnBelowWater" );
+						gSavedSkinSettings.getColor( "NetMapGroupOwnBelowWater" );
 
 
 	for (S32 i = 0; i < mMapObjects.count(); i++)
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index ba31f70c3d..0f906a4d7f 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -150,19 +150,8 @@ public:
 
 	U32	mCurBin; // Current bin we're working on...
 
-	//////////////////////
-	//
-	// Statistics data
-	//
-	//
-	LLStat mNumObjectsStat;
-	LLStat mNumActiveObjectsStat;
-	LLStat mNumNewObjectsStat;
-	LLStat mNumSizeCulledStat;
-	LLStat mNumVisCulledStat;
-
+	// Statistics data (see also LLViewerStats)
 	S32 mNumNewObjects;
-
 	S32 mNumSizeCulled;
 	S32 mNumVisCulled;
 
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index b98f418d49..08e03c97f2 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -166,7 +166,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
 				}
 
 				// First use warning
-				if(	gSavedSettings.getWarning("FirstStreamingVideo") )
+				if(	gWarningSettings.getBOOL("FirstStreamingVideo") )
 				{
 					LLNotifications::instance().add("ParcelCanPlayMedia", LLSD(), LLSD(),
 						boost::bind(callback_play_media, _1, _2, parcel));
@@ -189,9 +189,9 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
 			std::string mediaUrl = std::string ( parcel->getMediaURL () );
 			if (!mediaUrl.empty ())
 			{
-				if (gSavedSettings.getWarning("QuickTimeInstalled"))
+				if (gWarningSettings.getBOOL("QuickTimeInstalled"))
 				{
-					gSavedSettings.setWarning("QuickTimeInstalled", FALSE);
+					gWarningSettings.setBOOL("QuickTimeInstalled", FALSE);
 
 					LLNotifications::instance().add("NoQuickTime" );
 				};
@@ -395,7 +395,7 @@ bool callback_play_media(const LLSD& notification, const LLSD& response, LLParce
 	{
 		gSavedSettings.setBOOL("AudioStreamingVideo", FALSE);
 	}
-	gSavedSettings.setWarning("FirstStreamingVideo", FALSE);
+	gWarningSettings.setBOOL("FirstStreamingVideo", FALSE);
 	return false;
 }
 
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 193dfaae96..20723ec360 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -155,6 +155,8 @@ LLViewerParcelMgr::LLViewerParcelMgr()
 	{
 		mAgentParcelOverlay[i] = 0;
 	}
+
+	mTeleportInProgress = TRUE; // the initial parcel update is treated like teleport
 }
 
 
@@ -646,7 +648,7 @@ LLParcel *LLViewerParcelMgr::getAgentParcel() const
 }
 
 // Return whether the agent can build on the land they are on
-BOOL LLViewerParcelMgr::agentCanBuild() const
+bool LLViewerParcelMgr::agentCanBuild() const
 {
 	if (mAgentParcel)
 	{
@@ -938,7 +940,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id)
 	payload["parcel_local_id"] = mCurrentParcel->getLocalID();
 	payload["region_host"] = region->getHost().getIPandPort();
 	LLNotification::Params params("ForceOwnerAuctionWarning");
-	params.payload(payload).functor(callback_god_force_owner);
+	params.payload(payload).functor.function(callback_god_force_owner);
 
 	if(mCurrentParcel->getAuctionID())
 	{
@@ -1513,6 +1515,17 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
 
 			LLViewerParcelMgr::getInstance()->writeAgentParcelFromBitmap(bitmap);
 			delete[] bitmap;
+
+			// Let interesting parties know about agent parcel change.
+			LLViewerParcelMgr* instance = LLViewerParcelMgr::getInstance();
+
+			instance->mAgentParcelChangedSignal();
+
+			if (instance->mTeleportInProgress)
+			{
+				instance->mTeleportInProgress = FALSE;
+				instance->mTeleportFinishedSignal();
+			}
 		}
 	}
 
@@ -2378,3 +2391,24 @@ LLViewerImage* LLViewerParcelMgr::getPassImage() const
 {
 	return sPassImage;
 }
+
+boost::signals::connection LLViewerParcelMgr::setAgentParcelChangedCallback(parcel_changed_callback_t cb)
+{
+	return mAgentParcelChangedSignal.connect(cb);
+}
+
+boost::signals::connection LLViewerParcelMgr::setTeleportFinishedCallback(parcel_changed_callback_t cb)
+{
+	return mTeleportFinishedSignal.connect(cb);
+}
+
+/* Ok, we're notified that teleport has been finished.
+ * We should now propagate the notification via mTeleportFinishedSignal
+ * to all interested parties.
+ * However the agent parcel data has not been updated yet.
+ * Let's wait for the update and then emit the signal.
+ */
+void LLViewerParcelMgr::onTeleportFinished()
+{
+	mTeleportInProgress = TRUE;
+}
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 9f762a186c..2f3583e33b 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -36,10 +36,14 @@
 #include "v3dmath.h"
 #include "lldarray.h"
 #include "llframetimer.h"
-#include "llmemory.h"
+#include "llsingleton.h"
 #include "llparcelselection.h"
 #include "llui.h"
 
+#include <boost/function.hpp>
+#include <boost/signal.hpp>
+#include <boost/signals/connection.hpp>
+
 class LLUUID;
 class LLMessageSystem;
 class LLParcel;
@@ -79,6 +83,9 @@ class LLViewerParcelMgr : public LLSingleton<LLViewerParcelMgr>
 {
 
 public:
+	typedef boost::function<void()> parcel_changed_callback_t;
+	typedef boost::signal  <void()> parcel_changed_signal_t;
+
 	LLViewerParcelMgr();
 	~LLViewerParcelMgr();
 
@@ -163,7 +170,7 @@ public:
 	BOOL	agentCanTakeDamage() const;
 	BOOL	agentCanFly() const;
 	F32		agentDrawDistance() const;
-	BOOL	agentCanBuild() const;
+	bool	agentCanBuild() const;
 
 	F32		getHoverParcelWidth() const		
 				{ return F32(mHoverEastNorth.mdV[VX] - mHoverWestSouth.mdV[VX]); }
@@ -256,6 +263,10 @@ public:
 	// the agent is banned or not in the allowed group
 	BOOL isCollisionBanned();
 
+	boost::signals::connection setAgentParcelChangedCallback(parcel_changed_callback_t cb);
+	boost::signals::connection setTeleportFinishedCallback(parcel_changed_callback_t cb);
+	void onTeleportFinished();
+
 	static BOOL isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power);
 	static BOOL isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power);
 
@@ -303,6 +314,10 @@ private:
 
 	LLDynamicArray<LLParcelObserver*> mObservers;
 
+	BOOL						mTeleportInProgress;
+	parcel_changed_signal_t		mTeleportFinishedSignal;
+	parcel_changed_signal_t		mAgentParcelChangedSignal;
+
 	// Array of pieces of parcel edges to potentially draw
 	// Has (parcels_per_edge + 1) * (parcels_per_edge + 1) elements so
 	// we can represent edges of the grid.
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index 866c2a91eb..d76ec0dedb 100644
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -36,6 +36,7 @@
 
 // indra includes
 #include "llparcel.h"
+#include "llfloaterreg.h"
 #include "llgl.h"
 #include "llrender.h"
 #include "v4color.h"
@@ -205,13 +206,12 @@ void LLViewerParcelOverlay::updateOverlayTexture()
 	{
 		return;
 	}
-	// Can do this because gColors are actually stored as LLColor4U
-	const LLColor4U avail = gColors.getColor4U("PropertyColorAvail");
-	const LLColor4U owned = gColors.getColor4U("PropertyColorOther");
-	const LLColor4U group = gColors.getColor4U("PropertyColorGroup");
-	const LLColor4U self  = gColors.getColor4U("PropertyColorSelf");
-	const LLColor4U for_sale  = gColors.getColor4U("PropertyColorForSale");
-	const LLColor4U auction  = gColors.getColor4U("PropertyColorAuction");
+	const LLColor4U avail = gSavedSkinSettings.getColor4("PropertyColorAvail");
+	const LLColor4U owned = gSavedSkinSettings.getColor4("PropertyColorOther");
+	const LLColor4U group = gSavedSkinSettings.getColor4("PropertyColorGroup");
+	const LLColor4U self  = gSavedSkinSettings.getColor4("PropertyColorSelf");
+	const LLColor4U for_sale  = gSavedSkinSettings.getColor4("PropertyColorForSale");
+	const LLColor4U auction  = gSavedSkinSettings.getColor4("PropertyColorAuction");
 
 	// Create the base texture.
 	U8 *raw = mImageRaw->getData();
@@ -314,12 +314,11 @@ void LLViewerParcelOverlay::updatePropertyLines()
 	
 	S32 row, col;
 
-	// Can do this because gColors are actually stored as LLColor4U
-	const LLColor4U self_coloru  = gColors.getColor4U("PropertyColorSelf");
-	const LLColor4U other_coloru = gColors.getColor4U("PropertyColorOther");
-	const LLColor4U group_coloru = gColors.getColor4U("PropertyColorGroup");
-	const LLColor4U for_sale_coloru = gColors.getColor4U("PropertyColorForSale");
-	const LLColor4U auction_coloru = gColors.getColor4U("PropertyColorAuction");
+	const LLColor4U self_coloru  = gSavedSkinSettings.getColor4("PropertyColorSelf");
+	const LLColor4U other_coloru = gSavedSkinSettings.getColor4("PropertyColorOther");
+	const LLColor4U group_coloru = gSavedSkinSettings.getColor4("PropertyColorGroup");
+	const LLColor4U for_sale_coloru = gSavedSkinSettings.getColor4("PropertyColorForSale");
+	const LLColor4U auction_coloru = gSavedSkinSettings.getColor4("PropertyColorAuction");
 
 	// Build into dynamic arrays, then copy into static arrays.
 	LLDynamicArray<LLVector3, 256> new_vertex_array;
@@ -841,8 +840,8 @@ S32 LLViewerParcelOverlay::renderPropertyLines	()
 		drawn += vertex_per_edge;
 
 		gGL.end();
-
-		if (LLSelectMgr::sRenderHiddenSelections && gFloaterTools && gFloaterTools->getVisible())
+		
+		if (LLSelectMgr::sRenderHiddenSelections && LLFloaterReg::instanceVisible("build"))
 		{
 			LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER);
 			
diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h
index 21bc37f891..208675e7bf 100644
--- a/indra/newview/llviewerpartsim.h
+++ b/indra/newview/llviewerpartsim.h
@@ -35,7 +35,7 @@
 
 #include "lldarrayptr.h"
 #include "llframetimer.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "llpartdata.h"
 #include "llviewerpartsource.h"
 
diff --git a/indra/newview/llviewerpartsource.h b/indra/newview/llviewerpartsource.h
index 4258b9170f..31e671af3a 100644
--- a/indra/newview/llviewerpartsource.h
+++ b/indra/newview/llviewerpartsource.h
@@ -33,8 +33,9 @@
 #ifndef LL_LLVIEWERPARTSOURCE_H
 #define LL_LLVIEWERPARTSOURCE_H
 
-#include "llmemory.h"
+#include "llrefcount.h"
 #include "llpartdata.h"
+#include "llpointer.h"
 #include "llquaternion.h"
 #include "v3math.h"
 
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 49319b13b1..b85edc4f58 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -76,11 +76,11 @@
 #include "llapp.h"
 #include "llapr.h"
 #include "llcriticaldamp.h"
-#include "lldarray.h"
-#include "lldarrayptr.h"
+//#include "lldarray.h"
+//#include "lldarrayptr.h"
 #include "lldefs.h"
 #include "lldepthstack.h"
-#include "lldqueueptr.h"
+//#include "lldqueueptr.h"
 #include "llendianswizzle.h"
 #include "llerror.h"
 #include "llfasttimer.h"
@@ -89,11 +89,16 @@
 #include "llhash.h"
 #include "lllocalidhashmap.h"
 #include "llmap.h"
-#include "llmemory.h"
+//#include "llmemory.h"
 #include "llnametable.h"
+#include "llpointer.h"
 #include "llpriqueuemap.h"
 #include "llprocessor.h"
+#include "llrefcount.h"
+#include "llsafehandle.h"
 //#include "llsecondlifeurls.h"
+#include "llsd.h"
+#include "llsingleton.h"
 #include "llstack.h"
 #include "llstat.h"
 #include "llstl.h"
@@ -114,20 +119,13 @@
 #include "u64.h"
 
 // Library includes from llimage
-//#include "kdc_flow_control.h"
-//#include "kde_flow_control.h"
-//#include "kdu_image.h"
-//#include "kdu_image_local.h"
 //#include "llblockdata.h"
-//#include "llblockdecoder.h"
-//#include "llblockencoder.h"
 #include "llimage.h"
 #include "llimagebmp.h"
 #include "llimagepng.h"
 #include "llimagej2c.h"
 #include "llimagejpeg.h"
 #include "llimagetga.h"
-//#include "llkdumem.h"
 #include "llmapimagetype.h"
 
 // Library includes from llmath project
@@ -232,4 +230,8 @@
 #include "llvfile.h"
 #include "llvfs.h"
 
+// Library includes from llui
+// In skinning-7, llui.h dependencies are changing too often.
+//#include "llui.h"
+
 #endif
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 12d9c1a992..47619919b3 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -35,6 +35,7 @@
 #include "llviewerregion.h"
 
 #include "indra_constants.h"
+#include "llfloaterreg.h"
 #include "llmath.h"
 #include "llhttpclient.h"
 #include "llregionflags.h"
@@ -764,11 +765,6 @@ void LLViewerRegion::calculateCameraDistance()
 	mCameraDistanceSquared = (F32)(gAgent.getCameraPositionGlobal() - getCenterGlobal()).magVecSquared();
 }
 
-U32 LLViewerRegion::getNetDetailsForLCD()
-{
-	return mPingDelay;
-}
-
 std::ostream& operator<<(std::ostream &s, const LLViewerRegion &region)
 {
 	s << "{ ";
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index b0a98a99b8..f43167f93a 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -275,9 +275,6 @@ public:
 
 	friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion &region);
 
-	// used by LCD to get details for debug screen
-	U32 getNetDetailsForLCD();
-
 	LLSpatialPartition* getSpatialPartition(U32 type);
 public:
 	struct CompareDistance
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 648fbd4714..3382adaec5 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -36,6 +36,8 @@
 #include "llviewerthrottle.h"
 
 #include "message.h"
+#include "llfloaterreg.h"
+#include "llmemory.h"
 #include "lltimer.h"
 
 #include "llappviewer.h"
@@ -60,9 +62,6 @@
 #include "llworld.h"
 #include "llfeaturemanager.h"
 #include "llviewernetwork.h"
-#if LL_LCD_COMPILE
-#include "lllcd.h"
-#endif
 
 
 class StatAttributes
@@ -199,16 +198,76 @@ const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] =
 	// ST_TEX_BAKES
 	StatAttributes("Texture Bakes", FALSE, FALSE),
 	// ST_TEX_REBAKES
-	StatAttributes("Texture Rebakes", FALSE, FALSE),
-
-	// ST_LOGITECH_KEYBOARD
-	StatAttributes("Logitech LCD", FALSE, FALSE)
+	StatAttributes("Texture Rebakes", FALSE, FALSE)
 
 };
 
-LLViewerStats::LLViewerStats()
-	: mPacketsLostPercentStat(64),
-	  mLastTimeDiff(0.0)
+LLViewerStats::LLViewerStats() :
+	mKBitStat("kbitstat"),
+	mLayersKBitStat("layerskbitstat"),
+	mObjectKBitStat("objectkbitstat"),
+	mAssetKBitStat("assetkbitstat"),
+	mTextureKBitStat("texturekbitstat"),
+	mVFSPendingOperations("vfspendingoperations"),
+	mObjectsDrawnStat("objectsdrawnstat"),
+	mObjectsCulledStat("objectsculledstat"),
+	mObjectsTestedStat("objectstestedstat"),
+	mObjectsComparedStat("objectscomparedstat"),
+	mObjectsOccludedStat("objectsoccludedstat"),
+	mFPSStat("fpsstat"),
+	mPacketsInStat("packetsinstat"),
+	mPacketsLostStat("packetsloststat"),
+	mPacketsOutStat("packetsoutstat"),
+	mPacketsLostPercentStat("packetslostpercentstat", 64),
+	mTexturePacketsStat("texturepacketsstat"),
+	mActualInKBitStat("actualinkbitstat"),
+	mActualOutKBitStat("actualoutkbitstat"),
+	mTrianglesDrawnStat("trianglesdrawnstat"),
+	mSimTimeDilation("simtimedilation"),
+	mSimFPS("simfps"),
+	mSimPhysicsFPS("simphysicsfps"),
+	mSimAgentUPS("simagentups"),
+	mSimScriptEPS("simscripteps"),
+	mSimFrameMsec("simframemsec"),
+	mSimNetMsec("simnetmsec"),
+	mSimSimOtherMsec("simsimothermsec"),
+	mSimSimPhysicsMsec("simsimphysicsmsec"),
+	mSimSimPhysicsStepMsec("simsimphysicsstepmsec"),
+	mSimSimPhysicsShapeUpdateMsec("simsimphysicsshapeupdatemsec"),
+	mSimSimPhysicsOtherMsec("simsimphysicsothermsec"),
+	mSimAgentMsec("simagentmsec"),
+	mSimImagesMsec("simimagesmsec"),
+	mSimScriptMsec("simscriptmsec"),
+	mSimSpareMsec("simsparemsec"),
+	mSimSleepMsec("simsleepmsec"),
+	mSimPumpIOMsec("simpumpiomsec"),
+	mSimMainAgents("simmainagents"),
+	mSimChildAgents("simchildagents"),
+	mSimObjects("simobjects"),
+	mSimActiveObjects("simactiveobjects"),
+	mSimActiveScripts("simactivescripts"),
+	mSimInPPS("siminpps"),
+	mSimOutPPS("simoutpps"),
+	mSimPendingDownloads("simpendingdownloads"),
+	mSimPendingUploads("simpendinguploads"),
+	mSimPendingLocalUploads("simpendinglocaluploads"),
+	mSimTotalUnackedBytes("simtotalunackedbytes"),
+	mPhysicsPinnedTasks("physicspinnedtasks"),
+	mPhysicsLODTasks("physicslodtasks"),
+	mPhysicsMemoryAllocated("physicsmemoryallocated"),
+	mSimPingStat("simpingstat"),
+	mNumImagesStat("numimagesstat", 32, TRUE),
+	mNumRawImagesStat("numrawimagesstat", 32, TRUE),
+	mGLTexMemStat("gltexmemstat", 32, TRUE),
+	mGLBoundMemStat("glboundmemstat", 32, TRUE),
+	mRawMemStat("rawmemstat", 32, TRUE),
+	mFormattedMemStat("formattedmemstat", 32, TRUE),
+	mNumObjectsStat("numobjectsstat"),
+	mNumActiveObjectsStat("numactiveobjectsstat"),
+	mNumNewObjectsStat("numnewobjectsstat"),
+	mNumSizeCulledStat("numsizeculledstat"),
+	mNumVisCulledStat("numvisculledstat"),
+	mLastTimeDiff(0.0)
 {
 	for (S32 i = 0; i < ST_COUNT; i++)
 	{
@@ -353,7 +412,6 @@ void reset_statistics()
 {
 	if (LLSurface::sTextureUpdateTime)
 	{
-		LLSurface::sTexelsUpdatedPerSecStat.addValue(0.001f*(LLSurface::sTexelsUpdated / LLSurface::sTextureUpdateTime));
 		LLSurface::sTexelsUpdated = 0;
 		LLSurface::sTextureUpdateTime = 0.f;
 	}
@@ -507,7 +565,7 @@ void update_statistics(U32 frame_count)
 {
 	gTotalWorldBytes += gVLManager.getTotalBytes();
 	gTotalObjectBytes += gObjectBits / 8;
-	gTotalTextureBytes += LLViewerImageList::sTextureBits / 8;
+	gTotalTextureBytes += gImageList.mTextureBits / 8;
 
 	// make sure we have a valid time delta for this frame
 	if (gFrameIntervalSeconds > 0.f)
@@ -520,7 +578,7 @@ void update_statistics(U32 frame_count)
 		{
 			LLViewerStats::getInstance()->incStat(LLViewerStats::ST_AVATAR_EDIT_SECONDS, gFrameIntervalSeconds);
 		}
-		else if (gFloaterTools && gFloaterTools->getVisible())
+		else if (LLFloaterReg::instanceVisible("build"))
 		{
 			LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TOOLBOX_SECONDS, gFrameIntervalSeconds);
 		}
@@ -559,7 +617,7 @@ void update_statistics(U32 frame_count)
 	F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits());
 	LLViewerStats::getInstance()->mLayersKBitStat.addValue(layer_bits/1024.f);
 	LLViewerStats::getInstance()->mObjectKBitStat.addValue(gObjectBits/1024.f);
-	LLViewerStats::getInstance()->mTextureKBitStat.addValue(LLViewerImageList::sTextureBits/1024.f);
+	LLViewerStats::getInstance()->mTextureKBitStat.addValue(gImageList.mTextureBits/1024.f);
 	LLViewerStats::getInstance()->mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending());
 	LLViewerStats::getInstance()->mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f);
 	gTransferManager.resetTransferBitsIn(LLTCT_ASSET);
@@ -573,7 +631,7 @@ void update_statistics(U32 frame_count)
 		gDebugTimers[0].unpause();
 	}
 	
-	LLViewerStats::getInstance()->mTexturePacketsStat.addValue(LLViewerImageList::sTexturePackets);
+	LLViewerStats::getInstance()->mTexturePacketsStat.addValue(gImageList.mTexturePackets);
 
 	{
 		static F32 visible_avatar_frames = 0.f;
@@ -594,15 +652,9 @@ void update_statistics(U32 frame_count)
 	gObjectBits = 0;
 //	gDecodedBits = 0;
 
-	LLViewerImageList::sTextureBits = 0;
-	LLViewerImageList::sTexturePackets = 0;
+	gImageList.mTextureBits = 0;
+	gImageList.mTexturePackets = 0;
 
-#if LL_LCD_COMPILE
-	bool LCDenabled = gLcdScreen->Enabled();
-	LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LOGITECH_LCD, LCDenabled);
-#else
-	LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LOGITECH_LCD, false);
-#endif
 }
 
 class ViewerStatsResponder : public LLHTTPClient::Responder
@@ -692,7 +744,7 @@ void send_stats()
 	agent["ping"] = gAvgSimPing;
 	agent["meters_traveled"] = gAgent.getDistanceTraveled();
 	agent["regions_visited"] = gAgent.getRegionsVisited();
-	agent["mem_use"] = getCurrentRSS() / 1024.0;
+	agent["mem_use"] = LLMemory::getCurrentRSS() / 1024.0;
 
 	LLSD &system = body["system"];
 	
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index d3fd4f2466..ba89fbf02a 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -57,6 +57,7 @@ public:
 	LLStat mTexturePacketsStat;
 	LLStat mActualInKBitStat;	// From the packet ring (when faking a bad connection)
 	LLStat mActualOutKBitStat;	// From the packet ring (when faking a bad connection)
+	LLStat mTrianglesDrawnStat;
 
 	// Simulator stats
 	LLStat mSimTimeDilation;
@@ -98,15 +99,22 @@ public:
 	LLStat mPhysicsPinnedTasks;
 	LLStat mPhysicsLODTasks;
 	LLStat mPhysicsMemoryAllocated;
-	/*
-	LLStat mSimCPUUsageStat;
-	LLStat mSimMemTotalStat;
-	LLStat mSimMemRSSStat;
-	*/
-
 
 	LLStat mSimPingStat;
 
+	LLStat mNumImagesStat;
+	LLStat mNumRawImagesStat;
+	LLStat mGLTexMemStat;
+	LLStat mGLBoundMemStat;
+	LLStat mRawMemStat;
+	LLStat mFormattedMemStat;
+
+	LLStat mNumObjectsStat;
+	LLStat mNumActiveObjectsStat;
+	LLStat mNumNewObjectsStat;
+	LLStat mNumSizeCulledStat;
+	LLStat mNumVisCulledStat;
+
 	void resetStats();
 public:
 	// If you change this, please also add a corresponding text label
@@ -171,9 +179,8 @@ public:
 		ST_WINDOW_HEIGHT = 55,
 		ST_TEX_BAKES = 56,
 		ST_TEX_REBAKES = 57,
-		ST_LOGITECH_LCD = 58,
 		
-		ST_COUNT = 59
+		ST_COUNT = 58
 	};
 
 
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 728509e39c..290e6f50ff 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -32,13 +32,14 @@
 
 #include "llviewerprecompiledheaders.h"
 
+#include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "audioengine.h"
 #include "llagent.h"
 #include "llinventory.h"
+#include "llinventorybridge.h"
 #include "llinventorymodel.h"
 #include "llinventoryview.h"
-#include "llinventorybridge.h"	// for landmark prefix string
 
 #include "llviewertexteditor.h"
 
@@ -51,6 +52,7 @@
 #include "llpreviewlandmark.h"
 #include "llscrollbar.h"
 #include "lltooldraganddrop.h"
+#include "lltrans.h"
 #include "llviewercontrol.h"
 #include "llviewerimagelist.h"
 #include "llviewerwindow.h"
@@ -96,31 +98,9 @@ public:
 		}
 		else
 		{
-			// See if we can bring an existing preview to the front
-			if(!LLPreview::show(item->getUUID(), true))
+			if(!gSavedSettings.getBOOL("ShowNewInventory"))
 			{
-				if(!gSavedSettings.getBOOL("ShowNewInventory"))
-				{
-					// There isn't one, so make a new preview
-					S32 left, top;
-					gFloaterView->getNewFloaterPosition(&left, &top);
-					LLRect rect = gSavedSettings.getRect("NotecardEditorRect");
-					rect.translate(left - rect.mLeft, top - rect.mTop);
-					LLPreviewNotecard* preview;
-					preview = new LLPreviewNotecard("preview notecard", 
-													rect, 
-													std::string("Embedded Note: ") + item->getName(),
-													item->getUUID(), 
-													LLUUID::null, 
-													item->getAssetUUID(),
-													true, 
-													(LLViewerInventoryItem*)item);
-					preview->setSourceID(LLUUID::null);
-					preview->setFocus(TRUE);
-
-					// Force to be entirely onscreen.
-					gFloaterView->adjustToFitScreen(preview, FALSE);
-				}
+				LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES);
 			}
 		}
 	}
@@ -430,6 +410,8 @@ void LLEmbeddedItems::bindEmbeddedChars( const LLFontGL* font ) const
 		  case LLAssetType::AT_BODYPART:		img_name = "inv_item_skin.tga";	break;
 		  case LLAssetType::AT_ANIMATION:		img_name = "inv_item_animation.tga";break;
 		  case LLAssetType::AT_GESTURE:			img_name = "inv_item_gesture.tga";	break;
+		  //TODO need img_name
+		  case LLAssetType::AT_FAVORITE:		img_name = "inv_item_landmark.tga";	 break;
 		  default: llassert(0); continue;
 		}
 
@@ -561,32 +543,15 @@ struct LLNotecardCopyInfo
 //
 // Member functions
 //
-
-LLViewerTextEditor::LLViewerTextEditor(const std::string& name, 
-									   const LLRect& rect, 
-									   S32 max_length, 
-									   const std::string& default_text, 
-									   const LLFontGL* font,
-									   BOOL allow_embedded_items)
-	: LLTextEditor(name, rect, max_length, default_text, font, allow_embedded_items),
-	  mDragItemSaved(FALSE),
-	  mInventoryCallback(new LLEmbeddedNotecardOpener)
+LLViewerTextEditor::LLViewerTextEditor(const LLViewerTextEditor::Params& p)
+:	LLTextEditor(p),
+	mDragItemChar(0),
+	mDragItemSaved(FALSE),
+	mInventoryCallback(new LLEmbeddedNotecardOpener)
 {
+	mParseHTML = p.allow_html;
 	mEmbeddedItemList = new LLEmbeddedItems(this);
 	mInventoryCallback->setEditor(this);
-
-	// *TODO: Add right click menus for SLURLs
-	// Build the right click menu
-	// make the popup menu available
-
-	//LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_slurl.xml", this);
-	//if (!menu)
-	//{
-	//	menu = new LLMenuGL(LLStringUtil::null);
-	//}
-	//menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
-	//// menu->setVisible(FALSE);
-	//mPopupMenuHandle = menu->getHandle();
 }
 
 LLViewerTextEditor::~LLViewerTextEditor()
@@ -694,6 +659,7 @@ BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
 			if (item_at_pos)
 			{
 				mDragItem = item_at_pos;
+				mDragItemChar = wc;
 				mDragItemSaved = LLEmbeddedItems::getEmbeddedItemSaved(wc);
 				gFocusMgr.setMouseCapture( this );
 				mMouseDownX = x;
@@ -779,6 +745,7 @@ BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
 
 BOOL LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask)
 {
+	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
 	BOOL handled = FALSE;
 
 	if (!mDragItem)
@@ -823,7 +790,7 @@ BOOL LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask)
 					LLAssetType::lookupDragAndDropType( mDragItem->getType() ),
 					mDragItem->getUUID(),
 					LLToolDragAndDrop::SOURCE_NOTECARD,
-					getSourceID(), mObjectID);
+					mPreviewID, mObjectID);
 
 				return LLToolDragAndDrop::getInstance()->handleHover( x, y, mask );
 			}
@@ -876,7 +843,7 @@ BOOL LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask)
 		if( !handled )
 		{
 			lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;		
-			if (!mScrollbar->getVisible() || x < getRect().getWidth() - SCROLLBAR_SIZE)
+			if (!mScrollbar->getVisible() || x < getRect().getWidth() - scrollbar_size)
 			{
 				getWindow()->setCursor(UI_CURSOR_IBEAM);
 			}
@@ -907,8 +874,9 @@ BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
 			{
 				if(mDragItemSaved)
 				{
-					openEmbeddedItem(mDragItem);
-				}else
+					openEmbeddedItem(mDragItem, mDragItemChar);
+				}
+				else
 				{
 					showUnsavedAlertDialog(mDragItem);
 				}
@@ -1060,7 +1028,15 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
 					  std::string& tooltip_msg)
 {
 	BOOL handled = FALSE;
-
+	
+	LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
+	if (LLToolDragAndDrop::SOURCE_NOTECARD == source)
+	{
+		// We currently do not handle dragging items from one notecard to another
+		// since items in a notecard must be in Inventory to be verified. See DEV-2891.
+		return FALSE;
+	}
+	
 	if (mTakesNonScrollClicks)
 	{
 		if (getEnabled() && acceptsTextInput())
@@ -1096,7 +1072,7 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
 			case DAD_GESTURE:
 				{
 					LLInventoryItem *item = (LLInventoryItem *)cargo_data;
-					if( allowsEmbeddedItems() )
+					if( item && allowsEmbeddedItems() )
 					{
 						U32 mask_next = item->getPermissions().getMaskNextOwner();
 						if((mask_next & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)
@@ -1123,6 +1099,7 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
 							*accept = ACCEPT_NO;
 							if (tooltip_msg.empty())
 							{
+								// *TODO: Translate
 								tooltip_msg.assign("Only items with unrestricted\n"
 													"'next owner' permissions \n"
 													"can be attached to notecards.");
@@ -1236,17 +1213,14 @@ std::string LLViewerTextEditor::appendTime(bool prepend_newline)
 	time_t utc_time;
 	utc_time = time_corrected();
 
-	// There's only one internal tm buffer.
-	struct tm* timep;
-
-	// Convert to Pacific, based on server's opinion of whether
-	// it's daylight savings time there.
-	timep = utc_to_pacific_time(utc_time, gPacificDaylightTime);
+	std::string timeStr = LLTrans::getString("TextEditorTimeStr");
+	LLSD substitution;
 
-	std::string text = llformat("[%d:%02d]  ", timep->tm_hour, timep->tm_min);
-	appendColoredText(text, false, prepend_newline, LLColor4::grey);
+	substitution["datetime"] = (S32) utc_time;
+	LLStringUtil::format (timeStr, substitution);
+	appendColoredText(timeStr, false, prepend_newline, LLColor4::grey);
 
-	return text;
+	return timeStr;
 }
 
 //----------------------------------------------------------------------------
@@ -1302,13 +1276,14 @@ BOOL LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos)
 {
 	if( pos < getLength())
 	{
-		LLInventoryItem* item = LLEmbeddedItems::getEmbeddedItem( getWChar(pos) );
+		llwchar wc = getWChar(pos);
+		LLInventoryItem* item = LLEmbeddedItems::getEmbeddedItem( wc );
 		if( item )
 		{
-			BOOL saved = LLEmbeddedItems::getEmbeddedItemSaved( getWChar(pos) );
+			BOOL saved = LLEmbeddedItems::getEmbeddedItemSaved( wc );
 			if (saved)
 			{
-				return openEmbeddedItem(item); 
+				return openEmbeddedItem(item, wc); 
 			}
 			else
 			{
@@ -1320,25 +1295,25 @@ BOOL LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos)
 }
 
 
-BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item)
+BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, llwchar wc)
 {
 
 	switch( item->getType() )
 	{
 	case LLAssetType::AT_TEXTURE:
-		openEmbeddedTexture( item );
+	  	openEmbeddedTexture( item, wc );
 		return TRUE;
 
 	case LLAssetType::AT_SOUND:
-		openEmbeddedSound( item );
+		openEmbeddedSound( item, wc );
 		return TRUE;
 
 	case LLAssetType::AT_NOTECARD:
-		openEmbeddedNotecard( item );
+		openEmbeddedNotecard( item, wc );
 		return TRUE;
 
 	case LLAssetType::AT_LANDMARK:
-		openEmbeddedLandmark( item );
+		openEmbeddedLandmark( item, wc );
 		return TRUE;
 
 	case LLAssetType::AT_LSL_TEXT:
@@ -1347,7 +1322,7 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item)
 	case LLAssetType::AT_BODYPART:
 	case LLAssetType::AT_ANIMATION:
 	case LLAssetType::AT_GESTURE:
-		showCopyToInvDialog( item );
+		showCopyToInvDialog( item, wc );
 		return TRUE;
 	default:
 		return FALSE;
@@ -1356,35 +1331,22 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item)
 }
 
 
-void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item )
+void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item, llwchar wc )
 {
-	// See if we can bring an existing preview to the front
 	// *NOTE:  Just for embedded Texture , we should use getAssetUUID(), 
 	// not getUUID(), because LLPreviewTexture pass in AssetUUID into 
 	// LLPreview constructor ItemUUID parameter.
-
-	if( !LLPreview::show( item->getAssetUUID() ) )
+	if (!item)
+		return;
+	LLPreviewTexture* preview = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(item->getAssetUUID()), TAKE_FOCUS_YES);
+	if (preview)
 	{
-		// There isn't one, so make a new preview
-		if(item)
-		{
-			S32 left, top;
-			gFloaterView->getNewFloaterPosition(&left, &top);
-			LLRect rect = gSavedSettings.getRect("PreviewTextureRect");
-			rect.translate( left - rect.mLeft, top - rect.mTop );
-
-			LLPreviewTexture* preview = new LLPreviewTexture("preview texture",
-				rect,
-				item->getName(),
-				item->getAssetUUID(),
-				TRUE);
-			preview->setAuxItem( item );
-			preview->setNotecardInfo(mNotecardInventoryID, mObjectID);
-		}
+		preview->setAuxItem( item );
+		preview->setNotecardInfo(mNotecardInventoryID, mObjectID);
 	}
 }
 
-void LLViewerTextEditor::openEmbeddedSound( LLInventoryItem* item )
+void LLViewerTextEditor::openEmbeddedSound( LLInventoryItem* item, llwchar wc )
 {
 	// Play sound locally
 	LLVector3d lpos_global = gAgent.getPositionGlobal();
@@ -1393,18 +1355,22 @@ void LLViewerTextEditor::openEmbeddedSound( LLInventoryItem* item )
 	{
 		gAudiop->triggerSound(item->getAssetUUID(), gAgentID, SOUND_GAIN, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
 	}
-	showCopyToInvDialog( item );
+	showCopyToInvDialog( item, wc );
 }
 
 
-void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item )
+void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item, llwchar wc )
 {
-	std::string title =
-		std::string("  ") + LLLandmarkBridge::prefix()	+ item->getName();
-	open_landmark((LLViewerInventoryItem*)item, title, FALSE, item->getUUID(), TRUE);
+	if (!item)
+		return;
+	LLPreviewLandmark* preview = LLFloaterReg::showTypedInstance<LLPreviewLandmark>("preview_landmark", LLSD(item->getUUID()), TAKE_FOCUS_YES);
+	if (preview)
+	{
+		preview->setItem( item );
+	}
 }
 
-void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item )
+void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, llwchar wc )
 {
 	copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback));
 }
@@ -1423,20 +1389,23 @@ bool LLViewerTextEditor::onNotecardDialog(const LLSD& notification, const LLSD&
 	S32 option = LLNotification::getSelectedOption(notification, response);
 	if( option == 0 )
 	{
-		// itemptr is deleted by LLPreview::save
-		LLPointer<LLInventoryItem>* itemptr = new LLPointer<LLInventoryItem>(gInventory.getItem(notification["payload"]["item_id"].asUUID()));
-		LLPreview::save( notification["payload"]["notecard_id"].asUUID() , itemptr);
+		LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", notification["payload"]["notecard_id"]);;
+		if (preview)
+		{
+			preview->saveItem();
+		}
 	}
 	return false;
 }
 
 
 
-void LLViewerTextEditor::showCopyToInvDialog( LLInventoryItem* item )
+void LLViewerTextEditor::showCopyToInvDialog( LLInventoryItem* item, llwchar wc )
 {
 	LLSD payload;
-	payload["item_id"] = item->getUUID();
-	payload["notecard_id"] = mNotecardInventoryID;
+	LLUUID item_id = item->getUUID();
+	payload["item_id"] = item_id;
+	payload["item_wc"] = LLSD::Integer(wc);
 	LLNotifications::instance().add( "ConfirmItemCopy", LLSD(), payload,
 		boost::bind(&LLViewerTextEditor::onCopyToInvDialog, this, _1, _2));
 }
@@ -1446,8 +1415,11 @@ bool LLViewerTextEditor::onCopyToInvDialog(const LLSD& notification, const LLSD&
 	S32 option = LLNotification::getSelectedOption(notification, response);
 	if( 0 == option )
 	{
-		LLInventoryItem* itemp = gInventory.getItem(notification["payload"]["item_id"].asUUID());
-		copyInventory(itemp);
+		LLUUID item_id = notification["payload"]["item_id"].asUUID();
+		llwchar wc = llwchar(notification["payload"]["item_wc"].asInteger());
+		LLInventoryItem* itemp = LLEmbeddedItems::getEmbeddedItem(wc);
+		if (itemp)
+			copyInventory(itemp);
 	}
 	return false;
 }
@@ -1525,61 +1497,3 @@ BOOL LLViewerTextEditor::exportBuffer( std::string& buffer )
 	return TRUE;
 }
 
-LLView* LLViewerTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
-{
-	std::string name("text_editor");
-	node->getAttributeString("name", name);
-
-	LLRect rect;
-	createRect(node, rect, parent, LLRect());
-
-	U32 max_text_length = 255;
-	node->getAttributeU32("max_length", max_text_length);
-
-	BOOL allow_embedded_items = FALSE;
-	node->getAttributeBOOL("embedded_items", allow_embedded_items);
-
-	LLFontGL* font = LLView::selectFont(node);
-
-	// std::string text = node->getValue();
-	std::string text = node->getTextContents().substr(0, max_text_length - 1);
-
-	if (text.size() > max_text_length)
-	{
-		// Erase everything from max_text_length on.
-		text.erase(max_text_length);
-	}
-
-	LLViewerTextEditor* text_editor = new LLViewerTextEditor(name, 
-								rect,
-								max_text_length,
-								LLStringUtil::null,
-								font,
-								allow_embedded_items);
-
-	BOOL ignore_tabs = text_editor->tabsToNextField();
-	node->getAttributeBOOL("ignore_tab", ignore_tabs);
-	text_editor->setTabsToNextField(ignore_tabs);
-
-	text_editor->setTextEditorParameters(node);
-
-	BOOL hide_scrollbar = FALSE;
-	node->getAttributeBOOL("hide_scrollbar",hide_scrollbar);
-	text_editor->setHideScrollbarForShortDocs(hide_scrollbar);
-
-	BOOL hide_border = !text_editor->isBorderVisible();
-	node->getAttributeBOOL("hide_border", hide_border);
-	text_editor->setBorderVisible(!hide_border);
-
-	BOOL parse_html = text_editor->mParseHTML;
-	node->getAttributeBOOL("allow_html", parse_html);
-	text_editor->setParseHTML(parse_html);
-	text_editor->setParseHighlights(TRUE);
-
-	text_editor->initFromXML(node, parent);
-
-	// add text after all parameters have been set
-	text_editor->appendStyledText(text, FALSE, FALSE);
-
-	return text_editor;
-}
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index 1ed60a57fe..bc373c858a 100644
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -41,21 +41,27 @@
 //
 class LLViewerTextEditor : public LLTextEditor
 {
-	
 public:
-	LLViewerTextEditor(const std::string& name,
-					   const LLRect& rect,
-					   S32 max_length,
-					   const std::string& default_text = std::string(),
-					   const LLFontGL* glfont = NULL,
-					   BOOL allow_embedded_items = FALSE);
+	struct Params : public LLInitParam::Block<Params, LLTextEditor::Params>
+	{
+		Optional<bool>	allow_html;
+
+		Params()
+		:	allow_html("allow_html", false)
+		{
+			name = "text_editor";
+		}
+	};
 
+protected:
+	LLViewerTextEditor(const Params&);
+	friend class LLUICtrlFactory;
+
+public:
 	virtual ~LLViewerTextEditor();
 
 	virtual void makePristine();
 	
-	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
-
 	// mousehandler overrides
 	virtual BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
@@ -74,10 +80,11 @@ public:
 	virtual BOOL 	importBuffer(const char* buffer, S32 length);
 	virtual bool	importStream(std::istream& str);
 	virtual BOOL 	exportBuffer(std::string& buffer);
-	void setNotecardInfo(const LLUUID& notecard_item_id, const LLUUID& object_id)
+	void setNotecardInfo(const LLUUID& notecard_item_id, const LLUUID& object_id, const LLUUID& preview_id)
 	{
 		mNotecardInventoryID = notecard_item_id;
 		mObjectID = object_id;
+		mPreviewID = preview_id;
 	}
 	
 	void setASCIIEmbeddedText(const std::string& instr);
@@ -105,26 +112,28 @@ private:
 
 	BOOL			getEmbeddedItemToolTipAtPos(S32 pos, LLWString &wmsg) const;
 	BOOL			openEmbeddedItemAtPos( S32 pos );
-	BOOL			openEmbeddedItem(LLInventoryItem* item);
+	BOOL			openEmbeddedItem(LLInventoryItem* item, llwchar wc);
 
 	S32				insertEmbeddedItem(S32 pos, LLInventoryItem* item);
 
-	void			openEmbeddedTexture( LLInventoryItem* item );
-	void			openEmbeddedSound( LLInventoryItem* item );
-	void			openEmbeddedLandmark( LLInventoryItem* item );
-	void			openEmbeddedNotecard( LLInventoryItem* item);
-	void			showCopyToInvDialog( LLInventoryItem* item );
+	void			openEmbeddedTexture( LLInventoryItem* item, llwchar wc );
+	void			openEmbeddedSound( LLInventoryItem* item, llwchar wc );
+	void			openEmbeddedLandmark( LLInventoryItem* item, llwchar wc );
+	void			openEmbeddedNotecard( LLInventoryItem* item, llwchar wc);
+	void			showCopyToInvDialog( LLInventoryItem* item, llwchar wc );
 	void			showUnsavedAlertDialog( LLInventoryItem* item );
 
 	bool			onCopyToInvDialog(const LLSD& notification, const LLSD& response );
 	static bool		onNotecardDialog(const LLSD& notification, const LLSD& response );
 	
 	LLPointer<LLInventoryItem> mDragItem;
+	llwchar mDragItemChar;
 	BOOL mDragItemSaved;
 	class LLEmbeddedItems* mEmbeddedItemList;
 
 	LLUUID mObjectID;
 	LLUUID mNotecardInventoryID;
+	LLUUID mPreviewID;
 
 	LLPointer<class LLEmbeddedNotecardOpener> mInventoryCallback;
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index c827d3fcf4..4a58f7d955 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -36,7 +36,9 @@
 #include <stdio.h>
 #include <iostream>
 #include <fstream>
+#include <algorithm>
 
+#include "llfloaterreg.h"
 #include "llpanellogin.h"
 #include "llviewerkeyboard.h"
 #include "llviewerwindow.h"
@@ -48,7 +50,6 @@
 
 #include "llvoiceclient.h"	// for push-to-talk button handling
 
-
 //
 // TODO: Many of these includes are unnecessary.  Remove them.
 //
@@ -98,16 +99,15 @@
 #include "llfloaterchat.h"
 #include "llfloaterchatterbox.h"
 #include "llfloatercustomize.h"
-#include "llfloatereditui.h" // HACK JAMESDEBUG for ui editor
 #include "llfloaterland.h"
 #include "llfloaterinspect.h"
+#include "llfloatermap.h"
 #include "llfloaternamedesc.h"
 #include "llfloaterpreference.h"
 #include "llfloatersnapshot.h"
 #include "llfloatertools.h"
 #include "llfloaterworldmap.h"
 #include "llfocusmgr.h"
-#include "llframestatview.h"
 #include "llgesturemgr.h"
 #include "llglheaders.h"
 #include "llhoverview.h"
@@ -122,12 +122,12 @@
 #include "llmodaldialog.h"
 #include "llmorphview.h"
 #include "llmoveview.h"
+#include "llnavigationbar.h"
 #include "llnotify.h"
 #include "lloverlaybar.h"
 #include "llpreviewtexture.h"
 #include "llprogressview.h"
 #include "llresmgr.h"
-#include "llrootview.h"
 #include "llselectmgr.h"
 #include "llrendersphere.h"
 #include "llstartup.h"
@@ -151,9 +151,8 @@
 #include "lltoolmgr.h"
 #include "lltoolmorph.h"
 #include "lltoolpie.h"
-#include "lltoolplacer.h"
 #include "lltoolselectland.h"
-#include "lltoolview.h"
+#include "lltrans.h"
 #include "lluictrlfactory.h"
 #include "lluploaddialog.h"
 #include "llurldispatcher.h"		// SLURL from other app instance
@@ -183,7 +182,6 @@
 #include "llviewernetwork.h"
 #include "llpostprocess.h"
 
-#include "llfloatertest.h" // HACK!
 #include "llfloaternotificationsconsole.h"
 
 #if LL_WINDOWS
@@ -194,7 +192,6 @@
 // Globals
 //
 void render_ui(F32 zoom_factor = 1.f, int subfield = 0);
-LLBottomPanel* gBottomPanel = NULL;
 
 extern BOOL gDebugClicks;
 extern BOOL gDisplaySwapBuffers;
@@ -203,7 +200,6 @@ extern BOOL gResizeScreenTexture;
 extern S32 gJamesInt;
 
 LLViewerWindow	*gViewerWindow = NULL;
-LLVelocityBar	*gVelocityBar = NULL;
 
 
 BOOL			gDebugSelect = FALSE;
@@ -250,6 +246,22 @@ std::string	LLViewerWindow::sMovieBaseName;
 extern void toggle_debug_menus(void*);
 
 
+class LLBottomPanel : public LLPanel
+{
+public:
+	LLBottomPanel(const LLRect& rect);
+	void setFocusIndicator(LLView * indicator);
+	LLView * getFocusIndicator() { return mIndicator; }
+	/*virtual*/ void draw();
+
+	static void* createHUD(void* data);
+	static void* createOverlayBar(void* data);
+	static void* createToolBar(void* data);
+
+protected:
+	LLView * mIndicator;
+};
+LLBottomPanel* gBottomPanel = NULL;
 
 ////////////////////////////////////////////////////////////////////////////
 //
@@ -557,7 +569,7 @@ public:
 			const Line& line = *iter;
 			LLFontGL::getFontMonospace()->renderUTF8(line.text, 0, (F32)line.x, (F32)line.y, mTextColor,
 											 LLFontGL::LEFT, LLFontGL::TOP,
-											 LLFontGL::NORMAL, S32_MAX, S32_MAX, NULL, FALSE);
+											 LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE);
 		}
 		mLineList.clear();
 	}
@@ -1186,6 +1198,27 @@ void LLViewerWindow::handlePauseWatchdog(LLWindow *window)
 	LLAppViewer::instance()->pauseMainloopTimeout();
 }
 
+//virtual
+std::string LLViewerWindow::translateString(const char* tag)
+{
+	return LLTrans::getString( std::string(tag) );
+}
+
+//virtual
+std::string LLViewerWindow::translateString(const char* tag,
+		const std::map<std::string, std::string>& args)
+{
+	// LLTrans uses a special subclass of std::string for format maps,
+	// but we must use std::map<> in these callbacks, otherwise we create
+	// a dependency between LLWindow and LLFormatMapString.  So copy the data.
+	LLStringUtil::format_map_t args_copy;
+	std::map<std::string,std::string>::const_iterator it = args.begin();
+	for ( ; it != args.end(); ++it)
+	{
+		args_copy[it->first] = it->second;
+	}
+	return LLTrans::getString( std::string(tag), args_copy);
+}
 
 //
 // Classes
@@ -1196,6 +1229,7 @@ LLViewerWindow::LLViewerWindow(
 	S32 width, S32 height,
 	BOOL fullscreen, BOOL ignore_pixel_depth)
 	:
+	mWindow(NULL),
 	mActive(TRUE),
 	mWantFullscreen(fullscreen),
 	mShowFullscreenProgress(FALSE),
@@ -1231,7 +1265,7 @@ LLViewerWindow::LLViewerWindow(
 	resetSnapshotLoc();
 
 	// create window
-	mWindow = LLWindowManager::createWindow(
+	mWindow = LLWindowManager::createWindow(this,
 		title, name, x, y, width, height, 0,
 		fullscreen, 
 		gNoRender,
@@ -1309,23 +1343,29 @@ LLViewerWindow::LLViewerWindow(
 		
 	}
 		
-	// set callbacks
-	mWindow->setCallbacks(this);
-
 	// Init the image list.  Must happen after GL is initialized and before the images that
 	// LLViewerWindow needs are requested.
 	gImageList.init();
 	LLViewerImage::initClass();
 	gBumpImageList.init();
-
+	
+	// Init font system, but don't actually load the fonts yet
+	// because our window isn't onscreen and they take several
+	// seconds to parse.
+	LLFontGL::initClass( gSavedSettings.getF32("FontScreenDPI"),
+								mDisplayScale.mV[VX],
+								mDisplayScale.mV[VY],
+								gDirUtilp->getAppRODataDir(),
+								LLUI::getXUIPaths());
+	
 	// Create container for all sub-views
-	mRootView = new LLRootView("root", mVirtualWindowRect, FALSE);
-
-	if (!gNoRender)
-	{
-		// Init default fonts
-		initFonts();
-	}
+	LLView::Params rvp;
+	rvp.name("root");
+	rvp.rect(mVirtualWindowRect);
+	rvp.mouse_opaque(false);
+	rvp.follows.flags(FOLLOWS_NONE);
+	mRootView = LLUICtrlFactory::create<LLView>(rvp);
+	LLUI::setRootView(mRootView);
 
 	// Make avatar head look forward at start
 	mCurrentMousePoint.mX = getWindowWidth() / 2;
@@ -1381,8 +1421,6 @@ void LLViewerWindow::initBase()
 
 	LLRect full_window(0, height, width, 0);
 
-	adjustRectanglesForFirstUse(full_window);
-
 	////////////////////
 	//
 	// Set the gamma
@@ -1405,6 +1443,9 @@ void LLViewerWindow::initBase()
 	// make space for menu bar if we have one
 	floater_view_rect.mTop -= MENU_BAR_HEIGHT;
 
+	// make space for nav bar
+	floater_view_rect.mTop -= NAVIGATION_BAR_HEIGHT;
+
 	// TODO: Eliminate magic constants - please used named constants if changing this
 	floater_view_rect.mBottom += STATUS_BAR_HEIGHT + 12 + 16 + 2;
 
@@ -1414,10 +1455,20 @@ void LLViewerWindow::initBase()
 	{
 		floater_view_rect.mBottom = floater_view_bottom;
 	}
-	gFloaterView = new LLFloaterView("Floater View", floater_view_rect );
-	gFloaterView->setVisible(TRUE);
-
-	gSnapshotFloaterView = new LLSnapshotFloaterView("Snapshot Floater View", full_window);
+	LLFloaterView::Params fvparams;
+	fvparams.name("Floater View");
+	fvparams.rect(floater_view_rect);
+	fvparams.mouse_opaque(false);
+	fvparams.follows.flags(FOLLOWS_ALL);
+	fvparams.tab_stop(false);
+	gFloaterView = LLUICtrlFactory::create<LLFloaterView> (fvparams);
+
+	LLSnapshotFloaterView::Params snapParams;
+	snapParams.name("Snapshot Floater View");
+	snapParams.rect(full_window);
+	snapParams.enabled(false);
+	gSnapshotFloaterView = LLUICtrlFactory::create<LLSnapshotFloaterView> (snapParams);
+	
 	// Snapshot floater must start invisible otherwise it eats all
 	// the tooltips. JC
 	gSnapshotFloaterView->setVisible(FALSE);
@@ -1443,19 +1494,23 @@ void LLViewerWindow::initBase()
 		console_rect.mRight  = console_rect.mLeft + 2 * width / 3;
 	}
 
-	gConsole = new LLConsole(
-		"console",
-		gSavedSettings.getS32("ConsoleBufferSize"),
-		console_rect,
-		gSavedSettings.getS32("ChatFontSize"),
-		gSavedSettings.getF32("ChatPersistTime") );
-	gConsole->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM);
+	LLConsole::Params cp;
+	cp.name("console");
+	cp.max_lines(gSavedSettings.getS32("ConsoleBufferSize"));
+	cp.rect(console_rect);
+	cp.persist_time(gSavedSettings.getF32("ChatPersistTime"));
+	cp.font_size_index(gSavedSettings.getS32("ChatFontSize"));
+	cp.follows.flags(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM);
+	gConsole = LLUICtrlFactory::create<LLConsole>(cp);
 	mRootView->addChild(gConsole);
 
 	// Debug view over the console
-	gDebugView = new LLDebugView("gDebugView", full_window);
-	gDebugView->setFollowsAll();
-	gDebugView->setVisible(TRUE);
+	LLDebugView::Params debug_p;
+	debug_p.name("DebugView");
+	debug_p.rect(full_window);
+	debug_p.follows.flags(FOLLOWS_ALL);
+	debug_p.visible(true);
+	gDebugView = LLUICtrlFactory::create<LLDebugView>(debug_p);
 	mRootView->addChild(gDebugView);
 
 	// Add floater view at the end so it will be on top, and give it tab priority over others
@@ -1463,264 +1518,114 @@ void LLViewerWindow::initBase()
 	mRootView->addChild(gSnapshotFloaterView);
 
 	// notify above floaters!
-	LLRect notify_rect = full_window;
+	LLRect notify_rect = floater_view_rect;
 	//notify_rect.mTop -= 24;
 	notify_rect.mBottom += STATUS_BAR_HEIGHT;
-	gNotifyBoxView = new LLNotifyBoxView("notify_container", notify_rect, FALSE, FOLLOWS_ALL);
+	LLNotifyBoxView::Params p;
+	p.name("notify_container");
+	p.rect(notify_rect);
+	p.mouse_opaque(false);
+	p.follows.flags(FOLLOWS_ALL);
+	gNotifyBoxView = LLUICtrlFactory::create<LLNotifyBoxView> (p);
 	mRootView->addChild(gNotifyBoxView, -2);
 
 	// Tooltips go above floaters
-	mToolTip = new LLTextBox( std::string("tool tip"), LLRect(0, 1, 1, 0 ) );
-	mToolTip->setHPad( 4 );
-	mToolTip->setVPad( 2 );
-	mToolTip->setColor( gColors.getColor( "ToolTipTextColor" ) );
-	mToolTip->setBorderColor( gColors.getColor( "ToolTipBorderColor" ) );
-	mToolTip->setBorderVisible( FALSE );
-	mToolTip->setBackgroundColor( gColors.getColor( "ToolTipBgColor" ) );
-	mToolTip->setBackgroundVisible( TRUE );
-	mToolTip->setFontStyle(LLFontGL::NORMAL);
-	mToolTip->setBorderDropshadowVisible( TRUE );
-	mToolTip->setVisible( FALSE );
+	LLTextBox::Params params;
+	params.text("tool tip");
+	params.name(params.text);
+	params.rect(LLRect (0, 1, 1, 0));
+	params.h_pad(4);
+	params.v_pad(2);
+	params.text_color(gSavedSkinSettings.getColor( "ToolTipTextColor" ));
+	params.border_color(gSavedSkinSettings.getColor( "ToolTipBorderColor" ));
+	params.border_visible(false);
+	params.background_color(gSavedSkinSettings.getColor( "ToolTipBgColor" ));
+	params.bg_visible(true);
+	params.font.style("NORMAL");
+	params.border_drop_shadow_visible(true);
+	params.visible(false);
+	mToolTip = LLUICtrlFactory::create<LLTextBox> (params);
 
 	// Add the progress bar view (startup view), which overrides everything
-	mProgressView = new LLProgressView(std::string("ProgressView"), full_window);
+	mProgressView = new LLProgressView(full_window);
 	mRootView->addChild(mProgressView);
 	setShowProgress(FALSE);
 	setProgressCancelButtonVisible(FALSE);
 }
 
-
-void adjust_rect_top_left(const std::string& control, const LLRect& window)
-{
-	LLRect r = gSavedSettings.getRect(control);
-	if (r.mLeft == 0 && r.mBottom == 0)
-	{
-		r.setLeftTopAndSize(0, window.getHeight(), r.getWidth(), r.getHeight());
-		gSavedSettings.setRect(control, r);
-	}
-}
-
-void adjust_rect_top_center(const std::string& control, const LLRect& window)
-{
-	LLRect r = gSavedSettings.getRect(control);
-	if (r.mLeft == 0 && r.mBottom == 0)
-	{
-		r.setLeftTopAndSize( window.getWidth()/2 - r.getWidth()/2,
-			window.getHeight(),
-			r.getWidth(),
-			r.getHeight() );
-		gSavedSettings.setRect(control, r);
-	}
-}
-
-void adjust_rect_top_right(const std::string& control, const LLRect& window)
-{
-	LLRect r = gSavedSettings.getRect(control);
-	if (r.mLeft == 0 && r.mBottom == 0)
-	{
-		r.setLeftTopAndSize(window.getWidth() - r.getWidth(),
-			window.getHeight(),
-			r.getWidth(), 
-			r.getHeight());
-		gSavedSettings.setRect(control, r);
-	}
-}
-
-// *TODO: Adjust based on XUI XML
-const S32 TOOLBAR_HEIGHT = 64;
-
-void adjust_rect_bottom_left(const std::string& control, const LLRect& window)
-{
-	LLRect r = gSavedSettings.getRect(control);
-	if (r.mLeft == 0 && r.mBottom == 0)
-	{
-		r.setOriginAndSize(0, TOOLBAR_HEIGHT, r.getWidth(), r.getHeight());
-		gSavedSettings.setRect(control, r);
-	}
-}
-
-void adjust_rect_bottom_center(const std::string& control, const LLRect& window)
-{
-	LLRect r = gSavedSettings.getRect(control);
-	if (r.mLeft == 0 && r.mBottom == 0)
-	{
-		r.setOriginAndSize(
-			window.getWidth()/2 - r.getWidth()/2,
-			TOOLBAR_HEIGHT,
-			r.getWidth(),
-			r.getHeight());
-		gSavedSettings.setRect(control, r);
-	}
-}
-
-void adjust_rect_centered_partial_zoom(const std::string& control,
-									   const LLRect& window)
-{
-	LLRect rect = gSavedSettings.getRect(control);
-	// Only adjust on first use
-	if (rect.mLeft == 0 && rect.mBottom == 0)
-	{
-		S32 width = window.getWidth();
-		S32 height = window.getHeight();
-		rect.set(0, height-STATUS_BAR_HEIGHT, width, TOOL_BAR_HEIGHT);
-		// Make floater fill 80% of window, leaving 20% padding on
-		// the sides.
-		const F32 ZOOM_FRACTION = 0.8f;
-		S32 dx = (S32)(width * (1.f - ZOOM_FRACTION));
-		S32 dy = (S32)(height * (1.f - ZOOM_FRACTION));
-		rect.stretch(-dx/2, -dy/2);
-		gSavedSettings.setRect(control, rect);
-	}
-}
-
-
-// Many rectangles can't be placed until we know the screen size.
-// These rectangles have their bottom-left corner as 0,0
-void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window)
-{
-	LLRect r;
-
-	// *NOTE: The width and height of these floaters must be
-	// identical in settings.xml and their relevant floater.xml
-	// files, otherwise the window construction will get
-	// confused. JC
-	adjust_rect_bottom_center("FloaterMoveRect2", window);
-
-	adjust_rect_top_center("FloaterCameraRect3", window);
-
-	adjust_rect_top_left("FloaterCustomizeAppearanceRect", window);
-
-	adjust_rect_top_left("FloaterLandRect5", window);
-
-	adjust_rect_top_left("FloaterFindRect2", window);
-
-	adjust_rect_top_left("FloaterGestureRect2", window);
-
-	adjust_rect_top_right("FloaterMiniMapRect", window);
-	
-	adjust_rect_top_right("FloaterLagMeter", window);
-
-	adjust_rect_top_left("FloaterBuildOptionsRect", window);
-
-	adjust_rect_bottom_left("FloaterActiveSpeakersRect", window);
-
-	adjust_rect_bottom_left("FloaterBumpRect", window);
-
-	adjust_rect_bottom_left("FloaterRegionInfo", window);
-
-	adjust_rect_bottom_left("FloaterEnvRect", window);
-
-	adjust_rect_bottom_left("FloaterAdvancedSkyRect", window);
-
-	adjust_rect_bottom_left("FloaterAdvancedWaterRect", window);
-
-	adjust_rect_bottom_left("FloaterDayCycleRect", window);
-
-	adjust_rect_top_right("FloaterStatisticsRect", window);
-
-
-	// bottom-right
-	r = gSavedSettings.getRect("FloaterInventoryRect");
-	if (r.mLeft == 0 && r.mBottom == 0)
-	{
-		r.setOriginAndSize(
-			window.getWidth() - r.getWidth(),
-			0,
-			r.getWidth(),
-			r.getHeight());
-		gSavedSettings.setRect("FloaterInventoryRect", r);
-	}
-	
-// 	adjust_rect_top_left("FloaterHUDRect2", window);
-
-	// slightly off center to be left of the avatar.
-	r = gSavedSettings.getRect("FloaterHUDRect2");
-	if (r.mLeft == 0 && r.mBottom == 0)
-	{
-		r.setOriginAndSize(
-			window.getWidth()/4 - r.getWidth()/2,
-			2*window.getHeight()/3 - r.getHeight()/2,
-			r.getWidth(),
-			r.getHeight());
-		gSavedSettings.setRect("FloaterHUDRect2", r);
-	}
-}
-
-//Rectangles need to be adjusted after the window is constructed
-//in order for proper centering to take place
-void LLViewerWindow::adjustControlRectanglesForFirstUse(const LLRect& window)
-{
-	adjust_rect_bottom_center("FloaterMoveRect2", window);
-	adjust_rect_top_center("FloaterCameraRect3", window);
-}
-
 void LLViewerWindow::initWorldUI()
 {
-	pre_init_menus();
-
 	S32 height = mRootView->getRect().getHeight();
 	S32 width = mRootView->getRect().getWidth();
 	LLRect full_window(0, height, width, 0);
 
 	if ( gBottomPanel == NULL )			// Don't re-enter if objects are alreay created
-	{
+	{		
 		// panel containing chatbar, toolbar, and overlay, over floaters
 		gBottomPanel = new LLBottomPanel(mRootView->getRect());
 		mRootView->addChild(gBottomPanel);
 
 		// View for hover information
-		gHoverView = new LLHoverView(std::string("gHoverView"), full_window);
-		gHoverView->setVisible(TRUE);
+		LLHoverView::Params hvp;
+		hvp.name("gHoverview");
+		hvp.rect(full_window);
+		gHoverView = LLUICtrlFactory::create<LLHoverView>(hvp);
 		mRootView->addChild(gHoverView);
+
+		// Pre initialize instance communicate instance;
+		//  currently needs to happen before initializing chat or IM
+		LLFloaterReg::getInstance("communicate");
 		
 		gIMMgr = LLIMMgr::getInstance();
 
 		if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") )
 		{
-			LLFloaterChat::getInstance(LLSD())->loadHistory();
+			LLFloaterChat::loadHistory();
 		}
 
 		LLRect morph_view_rect = full_window;
 		morph_view_rect.stretch( -STATUS_BAR_HEIGHT );
 		morph_view_rect.mTop = full_window.mTop - 32;
-		gMorphView = new LLMorphView(std::string("gMorphView"), morph_view_rect );
+		LLMorphView::Params mvp;
+		mvp.name("MorphView");
+		mvp.rect(morph_view_rect);
+		mvp.visible(false);
+		gMorphView = LLUICtrlFactory::create<LLMorphView>(mvp);
 		mRootView->addChild(gMorphView);
-		gMorphView->setVisible(FALSE);
 
 		// *Note: this is where gFloaterMute used to be initialized.
 
 		LLWorldMapView::initClass();
+		
+		// Force gFloaterWorldMap to initialize
+		LLFloaterReg::getInstance("world_map");
+		LLFloaterReg::hideInstance("world_map");
 
-		adjust_rect_centered_partial_zoom("FloaterWorldMapRect2", full_window);
-
-		gFloaterWorldMap = new LLFloaterWorldMap();
-		gFloaterWorldMap->setVisible(FALSE);
-
-		//
-		// Tools for building
-		//
-
-		// Toolbox floater
-		init_menus();
-
-		gFloaterTools = new LLFloaterTools();
-		gFloaterTools->setVisible(FALSE);
+		// Force gFloaterTools to initialize
+		LLFloaterReg::getInstance("build");
+		LLFloaterReg::hideInstance("build");
 
 		// Status bar
 		S32 menu_bar_height = gMenuBarView->getRect().getHeight();
 		LLRect root_rect = getRootView()->getRect();
 		LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height);
-		gStatusBar = new LLStatusBar(std::string("status"), status_rect);
+		gStatusBar = new LLStatusBar(status_rect);
 		gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP);
 
 		gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE);
 		gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight());
 		// sync bg color with menu bar
-		gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() );
+		gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() );
 
-		LLFloaterChatterBox::createInstance(LLSD());
+		// Navigation bar
 
+		LLNavigationBar* navbar = LLNavigationBar::getInstance();
+		navbar->reshape(root_rect.getWidth(), navbar->getRect().getHeight(), TRUE); // *TODO: redundant?
+		navbar->translate(0, root_rect.getHeight() - menu_bar_height - navbar->getRect().getHeight()); // FIXME
+		navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+		
 		getRootView()->addChild(gStatusBar);
+		getRootView()->addChild(navbar);
 
 		// menu holder appears on top to get first pass at all mouse events
 		getRootView()->sendChildToFront(gMenuHolder);
@@ -1746,7 +1651,6 @@ void LLViewerWindow::shutdownViews()
 	mRootView = NULL;
 
 	// Automatically deleted as children of mRootView.  Fix the globals.
-	gFloaterTools = NULL;
 	gStatusBar = NULL;
 	gIMMgr = NULL;
 	gHoverView = NULL;
@@ -1965,6 +1869,12 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible )
 		gStatusBar->setVisible( visible );	
 		gStatusBar->setEnabled( visible );	
 	}
+	
+	LLNavigationBar* navbarp = LLUI::getRootView()->findChild<LLNavigationBar>("navigation_bar");
+	if (navbarp)
+	{
+		navbarp->setVisible( visible );
+	}
 }
 
 void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
@@ -1974,19 +1884,19 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
 
     if(god_mode && LLViewerLogin::getInstance()->isInProductionGrid())
     {
-        new_bg_color = gColors.getColor( "MenuBarGodBgColor" );
+        new_bg_color = gSavedSkinSettings.getColor( "MenuBarGodBgColor" );
     }
     else if(god_mode && !LLViewerLogin::getInstance()->isInProductionGrid())
     {
-        new_bg_color = gColors.getColor( "MenuNonProductionGodBgColor" );
+        new_bg_color = gSavedSkinSettings.getColor( "MenuNonProductionGodBgColor" );
     }
     else if(!god_mode && !LLViewerLogin::getInstance()->isInProductionGrid())
     {
-        new_bg_color = gColors.getColor( "MenuNonProductionBgColor" );
+        new_bg_color = gSavedSkinSettings.getColor( "MenuNonProductionBgColor" );
     }
     else 
     {
-        new_bg_color = gColors.getColor( "MenuBarBgColor" );
+        new_bg_color = gSavedSkinSettings.getColor( "MenuBarBgColor" );
     }
 
     if(gMenuBarView)
@@ -1997,6 +1907,8 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
     if(gStatusBar)
     {
         gStatusBar->setBackgroundColor( new_bg_color );
+		gStatusBar->getChild<LLTextBox>("HealthText")->setBackgroundColor(new_bg_color);
+		gStatusBar->getChild<LLTextBox>("ParcelNameText")->setBackgroundColor(new_bg_color);
     }
 }
 
@@ -2040,7 +1952,7 @@ void LLViewerWindow::draw()
 		glLoadIdentity();
 
 		microsecondsToTimecodeString(gFrameTime,text);
-		const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
+		const LLFontGL* font = LLFontGL::getFontSansSerif();
 		font->renderUTF8(text, 0,
 						llround((getWindowWidth()/2)-100.f),
 						llround((getWindowHeight()-60.f)),
@@ -2145,6 +2057,9 @@ 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
@@ -2163,14 +2078,14 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
 		}
 	}
 
-	// HACK look for UI editing keys
-	if (LLView::sEditingUI)
-	{
-		if (LLFloaterEditUI::processKeystroke(key, mask))
-		{
-			return TRUE;
-		}
-	}
+	//// HACK look for UI editing keys
+	//if (LLView::sEditingUI)
+	//{
+	//	if (LLFloaterEditUI::processKeystroke(key, mask))
+	//	{
+	//		return TRUE;
+	//	}
+	//}
 
 	// Hide tooltips on keypress
 	mToolTipBlocked = TRUE; // block until next time mouse is moved
@@ -2205,9 +2120,10 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
 		}
 	}
 
-	// Debugging view for unified notifications -- we need Ctrl+Shift+Alt to get it 
-	// since Ctrl+Shift maps to Nighttime under windlight.
-	if ((MASK_SHIFT & mask) 
+	// Debugging view for unified notifications:  Control-Alt-N because
+	// Ctrl-Shift-N maps to Nighttime under windlight.
+	// Ctrl-Alt-Shift-N is Show beacons
+	if (!(MASK_SHIFT & mask) 
 		&& (MASK_CONTROL & mask)
 		&& (MASK_ALT & mask)
 		&& ('N' == key || 'n' == key))
@@ -2471,7 +2387,7 @@ void LLViewerWindow::moveCursorToCenter()
 
 // Update UI based on stored mouse position from mouse-move
 // event processing.
-BOOL LLViewerWindow::handlePerFrameHover()
+void LLViewerWindow::updateUI()
 {
 	static std::string last_handle_msg;
 
@@ -2481,93 +2397,110 @@ BOOL LLViewerWindow::handlePerFrameHover()
 	S32 y = mCurrentMousePoint.mY;
 	MASK mask = gKeyboard->currentMask(TRUE);
 
-	//RN: fix for asynchronous notification of mouse leaving window not working
-	LLCoordWindow mouse_pos;
-	mWindow->getCursorPosition(&mouse_pos);
-	if (mouse_pos.mX < 0 || 
-		mouse_pos.mY < 0 ||
-		mouse_pos.mX > mWindowRect.getWidth() ||
-		mouse_pos.mY > mWindowRect.getHeight())
-	{
-		mMouseInWindow = FALSE;
-	}
-	else
+	if (gNoRender)
 	{
-		mMouseInWindow = TRUE;
+		return;
 	}
 
+	updateMouseDelta();
+	updateKeyboardFocus();
 
-	S32 dx = lltrunc((F32) (mCurrentMousePoint.mX - mLastMousePoint.mX) * LLUI::sGLScaleFactor.mV[VX]);
-	S32 dy = lltrunc((F32) (mCurrentMousePoint.mY - mLastMousePoint.mY) * LLUI::sGLScaleFactor.mV[VY]);
-
-	LLVector2 mouse_vel; 
+	BOOL handled = FALSE;
 
-	if (gSavedSettings.getBOOL("MouseSmooth"))
-	{
-		static F32 fdx = 0.f;
-		static F32 fdy = 0.f;
+	BOOL handled_by_top_ctrl = FALSE;
+	LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
+	LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
 
-		F32 amount = 16.f;
-		fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds*amount,1.f);
-		fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds*amount,1.f);
+	//build set of views containing mouse cursor by traversing UI hierarchy and testing 
+	//screen rect against mouse cursor
+	view_handle_set_t mouse_hover_set;
 
-		mCurrentMouseDelta.set(llround(fdx), llround(fdy));
-		mouse_vel.setVec(fdx,fdy);
-	}
-	else
+	// start at current mouse captor (if is a view) or UI root
+	LLView* root_view = NULL;
+	root_view = dynamic_cast<LLView*>(mouse_captor);
+	if (!root_view)
 	{
-		mCurrentMouseDelta.set(dx, dy);
-		mouse_vel.setVec((F32) dx, (F32) dy);
+		root_view = mRootView;
 	}
-    
-	mMouseVelocityStat.addValue(mouse_vel.magVec());
 
-	if (gNoRender)
+	for (LLView::tree_iterator_t it = root_view->beginTree();
+		it != root_view->endTree();
+		++it)
 	{
-		return TRUE;
+		LLView* viewp = *it;
+		// calculating the screen rect involves traversing the parent, so this is less than optimal
+		if (!viewp->getVisible()
+			|| !viewp->calcScreenBoundingRect().pointInRect(x, y))
+		{
+			// skip this view and all of its children
+			it.skipChildren();
+			continue;
+		}
+
+		// we have a view that contains the mouse, add it to the set
+		mouse_hover_set.insert(viewp->getHandle());
 	}
 
-	// clean up current focus
-	LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus();
-	if (cur_focus)
+	// now do the same aggregation for the "top" ctrl, whose parent does not necessarily contain the mouse
+	if (top_ctrl)
 	{
-		if (!cur_focus->isInVisibleChain() || !cur_focus->isInEnabledChain())
+		for (LLView::tree_iterator_t it = top_ctrl->beginTree();
+			it != root_view->endTree();
+			++it)
 		{
-			gFocusMgr.releaseFocusIfNeeded(cur_focus);
-
-			LLUICtrl* parent = cur_focus->getParentUICtrl();
-			const LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot();
-			while(parent)
+			LLView* viewp = *it;
+			if (!viewp->getVisible()
+				|| !viewp->calcScreenBoundingRect().pointInRect(x, y))
 			{
-				if (parent->isCtrl() && 
-					(parent->hasTabStop() || parent == focus_root) && 
-					!parent->getIsChrome() && 
-					parent->isInVisibleChain() && 
-					parent->isInEnabledChain())
-				{
-					if (!parent->focusFirstItem())
-					{
-						parent->setFocus(TRUE);
-					}
-					break;
-				}
-				parent = parent->getParentUICtrl();
+				// skip this view and all of its children
+				it.skipChildren();
+				continue;
 			}
+
+			// we have a view that contains the mouse, add it to the set
+			mouse_hover_set.insert(viewp->getHandle());
 		}
-		else if (cur_focus->isFocusRoot())
+	}
+
+	typedef std::vector<LLHandle<LLView> > view_handle_list_t;
+
+	// call onMouseEnter() on all views which contain the mouse cursor but did not before
+	view_handle_list_t mouse_enter_views;
+	std::set_difference(mouse_hover_set.begin(), mouse_hover_set.end(),
+						mMouseHoverViews.begin(), mMouseHoverViews.end(),
+						std::back_inserter(mouse_enter_views));
+	for (view_handle_list_t::iterator it = mouse_enter_views.begin();
+		it != mouse_enter_views.end();
+		++it)
+	{
+		LLView* viewp = it->get();
+		if (viewp)
 		{
-			// focus roots keep trying to delegate focus to their first valid descendant
-			// this assumes that focus roots are not valid focus holders on their own
-			cur_focus->focusFirstItem();
+			LLRect view_screen_rect = viewp->calcScreenRect();
+			viewp->onMouseEnter(x - view_screen_rect.mLeft, y - view_screen_rect.mBottom, mask);
 		}
 	}
 
-	BOOL handled = FALSE;
+	// call onMouseLeave() on all views which no longer contain the mouse cursor
+	view_handle_list_t mouse_leave_views;
+	std::set_difference(mMouseHoverViews.begin(), mMouseHoverViews.end(),
+						mouse_hover_set.begin(), mouse_hover_set.end(),
+						std::back_inserter(mouse_leave_views));
+	for (view_handle_list_t::iterator it = mouse_leave_views.begin();
+		it != mouse_leave_views.end();
+		++it)
+	{
+		LLView* viewp = it->get();
+		if (viewp)
+		{
+			LLRect view_screen_rect = viewp->calcScreenRect();
+			viewp->onMouseLeave(x - view_screen_rect.mLeft, y - view_screen_rect.mBottom, mask);
+		}
+	}
 
-	BOOL handled_by_top_ctrl = FALSE;
-	LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
+	// store resulting hover set for next frame
+	swap(mMouseHoverViews, mouse_hover_set);
 
-	LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
 	if( mouse_captor )
 	{
 		// Pass hover events to object capturing mouse events.
@@ -2710,39 +2643,114 @@ BOOL LLViewerWindow::handlePerFrameHover()
 		}
 	}		
 	
-	if (tool && tool != gToolNull  && tool != LLToolCompInspect::getInstance() && tool != LLToolDragAndDrop::getInstance() && !gSavedSettings.getBOOL("FreezeTime"))
+	updateLayout();
+
+	mLastMousePoint = mCurrentMousePoint;
+
+	// cleanup unused selections when no modal dialogs are open
+	if (LLModalDialog::activeCount() == 0)
+	{
+		LLViewerParcelMgr::getInstance()->deselectUnused();
+	}
+
+	if (LLModalDialog::activeCount() == 0)
+	{
+		LLSelectMgr::getInstance()->deselectUnused();
+	}
+
+	updatePicking(x, y, mask);
+}
+
+void LLViewerWindow::updatePicking(S32 x, S32 y, MASK mask)
+{
+	// per frame picking - for tooltips and changing cursor over interactive objects
+	static S32 previous_x = -1;
+	static S32 previous_y = -1;
+	static BOOL mouse_moved_since_pick = FALSE;
+
+	if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST))
+	{
+		gDebugRaycastFaceHit = -1;
+		gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE,
+											  &gDebugRaycastFaceHit,
+											  &gDebugRaycastIntersection,
+											  &gDebugRaycastTexCoord,
+											  &gDebugRaycastNormal,
+											  &gDebugRaycastBinormal);
+	}
+
+
+	if ((previous_x != x) || (previous_y != y))
+		mouse_moved_since_pick = TRUE;
+
+	BOOL do_pick = FALSE;
+
+	F32 picks_moving = gSavedSettings.getF32("PicksPerSecondMouseMoving");
+	if ((mouse_moved_since_pick) && (picks_moving > 0.0) && (mPickTimer.getElapsedTimeF32() > 1.0f / picks_moving))
+	{
+		do_pick = TRUE;
+	}
+
+	F32 picks_stationary = gSavedSettings.getF32("PicksPerSecondMouseStationary");
+	if ((!mouse_moved_since_pick) && (picks_stationary > 0.0) && (mPickTimer.getElapsedTimeF32() > 1.0f / picks_stationary))
+	{
+		do_pick = TRUE;
+	}
+
+	if (getCursorHidden())
+	{
+		do_pick = FALSE;
+	}
+
+	if (do_pick)
+	{
+		mouse_moved_since_pick = FALSE;
+		mPickTimer.reset();
+		pickAsync(getCurrentMouseX(), getCurrentMouseY(), mask, hoverPickCallback, TRUE);
+	}
+
+	previous_x = x;
+	previous_y = y;
+}
+
+void LLViewerWindow::updateLayout()
+{
+	LLTool* tool = LLToolMgr::getInstance()->getCurrentTool();
+	if (gFloaterTools != NULL
+		&& tool != NULL
+		&& tool != gToolNull  
+		&& tool != LLToolCompInspect::getInstance() 
+		&& tool != LLToolDragAndDrop::getInstance() 
+		&& !gSavedSettings.getBOOL("FreezeTime"))
 	{ 
 		LLMouseHandler *captor = gFocusMgr.getMouseCapture();
 		// With the null, inspect, or drag and drop tool, don't muck
 		// with visibility.
 
-		if (gFloaterTools->isMinimized() ||
-			(tool != LLToolPie::getInstance()						// not default tool
-			&& tool != LLToolCompGun::getInstance()					// not coming out of mouselook
-			&& !mSuppressToolbox									// not override in third person
-			&& LLToolMgr::getInstance()->getCurrentToolset() != gFaceEditToolset	// not special mode
-			&& LLToolMgr::getInstance()->getCurrentToolset() != gMouselookToolset
-			&& (!captor || captor->isView()))						// not dragging
-			)
+		if (gFloaterTools->isMinimized()
+			||	(tool != LLToolPie::getInstance()						// not default tool
+				&& tool != LLToolCompGun::getInstance()					// not coming out of mouselook
+				&& !mSuppressToolbox									// not override in third person
+				&& LLToolMgr::getInstance()->getCurrentToolset() != gFaceEditToolset	// not special mode
+				&& LLToolMgr::getInstance()->getCurrentToolset() != gMouselookToolset
+				&& (!captor || captor->isView())))						// not dragging
 		{
 			// Force floater tools to be visible (unless minimized)
 			if (!gFloaterTools->getVisible())
 			{
-				gFloaterTools->open();		/* Flawfinder: ignore */
+				gFloaterTools->openFloater();
 			}
 			// Update the location of the blue box tool popup
 			LLCoordGL select_center_screen;
-			gFloaterTools->updatePopup( select_center_screen, mask );
+			gFloaterTools->updatePopup( select_center_screen, gKeyboard->currentMask(TRUE) );
 		}
 		else
 		{
 			gFloaterTools->setVisible(FALSE);
 		}
-		// In the future we may wish to hide the tools menu unless you
-		// are building. JC
-		//gMenuBarView->setItemVisible("Tools", gFloaterTools->getVisible());
-		//gMenuBarView->arrange();
+		gMenuBarView->setItemVisible("BuildTools", gFloaterTools->getVisible());
 	}
+
 	if (gToolBar)
 	{
 		gToolBar->refresh();
@@ -2817,7 +2825,87 @@ BOOL LLViewerWindow::handlePerFrameHover()
 		gConsole->setRect(console_rect);
 	}
 
-	mLastMousePoint = mCurrentMousePoint;
+}
+
+void LLViewerWindow::updateMouseDelta()
+{
+	S32 dx = lltrunc((F32) (mCurrentMousePoint.mX - mLastMousePoint.mX) * LLUI::sGLScaleFactor.mV[VX]);
+	S32 dy = lltrunc((F32) (mCurrentMousePoint.mY - mLastMousePoint.mY) * LLUI::sGLScaleFactor.mV[VY]);
+
+	//RN: fix for asynchronous notification of mouse leaving window not working
+	LLCoordWindow mouse_pos;
+	mWindow->getCursorPosition(&mouse_pos);
+	if (mouse_pos.mX < 0 || 
+		mouse_pos.mY < 0 ||
+		mouse_pos.mX > mWindowRect.getWidth() ||
+		mouse_pos.mY > mWindowRect.getHeight())
+	{
+		mMouseInWindow = FALSE;
+	}
+	else
+	{
+		mMouseInWindow = TRUE;
+	}
+
+	LLVector2 mouse_vel; 
+
+	if (gSavedSettings.getBOOL("MouseSmooth"))
+	{
+		static F32 fdx = 0.f;
+		static F32 fdy = 0.f;
+
+		F32 amount = 16.f;
+		fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds*amount,1.f);
+		fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds*amount,1.f);
+
+		mCurrentMouseDelta.set(llround(fdx), llround(fdy));
+		mouse_vel.setVec(fdx,fdy);
+	}
+	else
+	{
+		mCurrentMouseDelta.set(dx, dy);
+		mouse_vel.setVec((F32) dx, (F32) dy);
+	}
+    
+	mMouseVelocityStat.addValue(mouse_vel.magVec());
+}
+
+void LLViewerWindow::updateKeyboardFocus()
+{
+	// clean up current focus
+	LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus();
+	if (cur_focus)
+	{
+		if (!cur_focus->isInVisibleChain() || !cur_focus->isInEnabledChain())
+		{
+			gFocusMgr.releaseFocusIfNeeded(cur_focus);
+
+			LLUICtrl* parent = cur_focus->getParentUICtrl();
+			const LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot();
+			while(parent)
+			{
+				if (parent->isCtrl() && 
+					(parent->hasTabStop() || parent == focus_root) && 
+					!parent->getIsChrome() && 
+					parent->isInVisibleChain() && 
+					parent->isInEnabledChain())
+				{
+					if (!parent->focusFirstItem())
+					{
+						parent->setFocus(TRUE);
+					}
+					break;
+				}
+				parent = parent->getParentUICtrl();
+			}
+		}
+		else if (cur_focus->isFocusRoot())
+		{
+			// focus roots keep trying to delegate focus to their first valid descendant
+			// this assumes that focus roots are not valid focus holders on their own
+			cur_focus->focusFirstItem();
+		}
+	}
 
 	// last ditch force of edit menu to selection manager
 	if (LLEditMenuHandler::gEditMenuHandler == NULL && LLSelectMgr::getInstance()->getSelection()->getObjectCount())
@@ -2859,67 +2947,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
 		gChatBar->startChat(NULL);
 	}
 
-	// cleanup unused selections when no modal dialogs are open
-	if (LLModalDialog::activeCount() == 0)
-	{
-		LLViewerParcelMgr::getInstance()->deselectUnused();
-	}
-
-	if (LLModalDialog::activeCount() == 0)
-	{
-		LLSelectMgr::getInstance()->deselectUnused();
-	}
-
-	if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST))
-	{
-		gDebugRaycastFaceHit = -1;
-		gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE,
-											  &gDebugRaycastFaceHit,
-											  &gDebugRaycastIntersection,
-											  &gDebugRaycastTexCoord,
-											  &gDebugRaycastNormal,
-											  &gDebugRaycastBinormal);
-	}
-
-
-	// per frame picking - for tooltips and changing cursor over interactive objects
-	static S32 previous_x = -1;
-	static S32 previous_y = -1;
-	static BOOL mouse_moved_since_pick = FALSE;
-
-	if ((previous_x != x) || (previous_y != y))
-		mouse_moved_since_pick = TRUE;
-
-	BOOL do_pick = FALSE;
 
-	F32 picks_moving = gSavedSettings.getF32("PicksPerSecondMouseMoving");
-	if ((mouse_moved_since_pick) && (picks_moving > 0.0) && (mPickTimer.getElapsedTimeF32() > 1.0f / picks_moving))
-	{
-		do_pick = TRUE;
-	}
-
-	F32 picks_stationary = gSavedSettings.getF32("PicksPerSecondMouseStationary");
-	if ((!mouse_moved_since_pick) && (picks_stationary > 0.0) && (mPickTimer.getElapsedTimeF32() > 1.0f / picks_stationary))
-	{
-		do_pick = TRUE;
-	}
-
-	if (getCursorHidden())
-	{
-		do_pick = FALSE;
-	}
-
-	if (do_pick)
-	{
-		mouse_moved_since_pick = FALSE;
-		mPickTimer.reset();
-		pickAsync(getCurrentMouseX(), getCurrentMouseY(), mask, hoverPickCallback, TRUE);
-	}
-
-	previous_x = x;
-	previous_y = y;
-	
-	return handled;
 }
 
 
@@ -3183,7 +3211,7 @@ void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback
 	}
 	
 	// push back pick info object
-	BOOL in_build_mode = gFloaterTools && gFloaterTools->getVisible();
+	BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
 	if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha)
 	{
 		// build mode allows interaction with all transparent objects
@@ -4234,8 +4262,8 @@ void LLViewerWindow::destroyWindow()
 void LLViewerWindow::drawMouselookInstructions()
 {
 	// Draw instructions for mouselook ("Press ESC to leave Mouselook" in a box at the top of the screen.)
-	const std::string instructions = "Press ESC to leave Mouselook.";
-	const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
+	const std::string instructions = LLTrans::getString("LeaveMouselook");
+	const LLFontGL* font = LLFontGL::getFontSansSerif();
 
 	const S32 INSTRUCTIONS_PAD = 5;
 	LLRect instructions_rect;
@@ -4270,6 +4298,21 @@ S32	LLViewerWindow::getWindowWidth() const
 	return mVirtualWindowRect.getWidth(); 
 }
 
+void* LLViewerWindow::getPlatformWindow() const
+{
+	return mWindow->getPlatformWindow();
+}
+
+void* LLViewerWindow::getMediaWindow() 	const
+{
+	return mWindow->getMediaWindow();
+}
+
+void LLViewerWindow::focusClient()		const
+{
+	return mWindow->focusClient();
+}
+
 S32	LLViewerWindow::getWindowDisplayHeight()	const 	
 { 
 	return mWindowRect.getHeight(); 
@@ -4482,12 +4525,16 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
 void LLViewerWindow::initFonts(F32 zoom_factor)
 {
 	LLFontGL::destroyAllGL();
-	LLFontGL::initDefaultFonts( gSavedSettings.getF32("FontScreenDPI"),
+	// Initialize with possibly different zoom factor
+	LLFontGL::initClass( gSavedSettings.getF32("FontScreenDPI"),
 								mDisplayScale.mV[VX] * zoom_factor,
 								mDisplayScale.mV[VY] * zoom_factor,
 								gDirUtilp->getAppRODataDir(),
-								LLUICtrlFactory::getXUIPaths());
+								LLUI::getXUIPaths());
+	// Force font reloads, which can be very slow
+	LLFontGL::loadDefaultFonts();
 }
+
 void LLViewerWindow::toggleFullscreen(BOOL show_progress)
 {
 	if (mWindow)
@@ -4520,6 +4567,11 @@ void LLViewerWindow::getTargetWindow(BOOL& fullscreen, S32& width, S32& height)
 	}
 }
 
+void LLViewerWindow::requestResolutionUpdate()
+{
+	mResDirty = true;
+}
+
 void LLViewerWindow::requestResolutionUpdate(bool fullscreen_checked)
 {
 	mResDirty = true;
@@ -4654,7 +4706,7 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size,
 	}
 
 	// Close floaters that don't handle settings change
-	LLFloaterSnapshot::hide(0);
+	LLFloaterReg::hideInstance("snapshot");
 	
 	BOOL result_first_try = FALSE;
 	BOOL result_second_try = FALSE;
@@ -4814,6 +4866,8 @@ void LLViewerWindow::calcDisplayScale()
 	}
 }
 
+S32 TOOL_BAR_HEIGHT = 20; // *TODO:Skinning Fix
+
 S32 LLViewerWindow::getChatConsoleBottomPad()
 {
 	S32 offset = 0;
@@ -4851,9 +4905,10 @@ bool LLViewerWindow::onAlert(const LLSD& notify)
 ////////////////////////////////////////////////////////////////////////////
 
 LLBottomPanel::LLBottomPanel(const LLRect &rect) : 
-	LLPanel(LLStringUtil::null, rect, FALSE),
+	LLPanel(),
 	mIndicator(NULL)
 {
+	setRect(rect);
 	// bottom panel is focus root, so Tab moves through the toolbar and button bar, and overlay
 	setFocusRoot(TRUE);
 	// flag this panel as chrome so buttons don't grab keyboard focus
@@ -4862,7 +4917,7 @@ LLBottomPanel::LLBottomPanel(const LLRect &rect) :
 	mFactoryMap["toolbar"] = LLCallbackMap(createToolBar, NULL);
 	mFactoryMap["overlay"] = LLCallbackMap(createOverlayBar, NULL);
 	mFactoryMap["hud"] = LLCallbackMap(createHUD, NULL);
-	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_bars.xml", &getFactoryMap());
+	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_bars.xml");
 	
 	setOrigin(rect.mLeft, rect.mBottom);
 	reshape(rect.getWidth(), rect.getHeight());
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index e0ddac6fa5..01ef91e7b2 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -44,12 +44,12 @@
 
 #include "v3dmath.h"
 #include "v2math.h"
-#include "llwindow.h"
+#include "llwindowcallbacks.h"
 #include "lltimer.h"
 #include "llstat.h"
-#include "llalertdialog.h"
 #include "llnotifications.h"
 #include "llmousehandler.h"
+#include "llcursortypes.h"
 
 class LLView;
 class LLViewerObject;
@@ -60,6 +60,7 @@ class LLVelocityBar;
 class LLTextBox;
 class LLImageRaw;
 class LLHUDIcon;
+class LLWindow;
 
 #define PICK_HALF_WIDTH 5
 #define PICK_DIAMETER (2 * PICK_HALF_WIDTH + 1)
@@ -181,7 +182,9 @@ public:
 	/*virtual*/ void handlePingWatchdog(LLWindow *window, const char * msg);
 	/*virtual*/ void handlePauseWatchdog(LLWindow *window);
 	/*virtual*/ void handleResumeWatchdog(LLWindow *window);
-
+	/*virtual*/ std::string translateString(const char* tag);
+	/*virtual*/ std::string translateString(const char* tag,
+					const std::map<std::string, std::string>& args);
 
 	//
 	// ACCESSORS
@@ -200,9 +203,9 @@ public:
 	S32				getWindowWidth()	const;
 
 	LLWindow*		getWindow()			const	{ return mWindow; }
-	void*			getPlatformWindow() const	{ return mWindow->getPlatformWindow(); }
-	void*			getMediaWindow() 	const	{ return mWindow->getMediaWindow(); }
-	void			focusClient()		const	{ return mWindow->focusClient(); };
+	void*			getPlatformWindow() const;
+	void*			getMediaWindow() 	const;
+	void			focusClient()		const;
 
 	LLCoordGL		getLastMouse()		const	{ return mLastMousePoint; }
 	S32				getLastMouseX()		const	{ return mLastMousePoint.mX; }
@@ -261,7 +264,11 @@ public:
 
 	void			updateObjectUnderCursor();
 
-	BOOL			handlePerFrameHover();							// Once per frame, update UI based on mouse position
+	void			updateUI();		// Once per frame, update UI based on mouse position, calls following update* functions
+	void				updateLayout();						
+	void				updateMouseDelta();		
+	void				updateKeyboardFocus();		
+	void				updatePicking(S32 x, S32 y, MASK mask);
 
 	BOOL			handleKey(KEY key, MASK mask);
 	void			handleScrollWheel	(S32 clicks);
@@ -349,6 +356,7 @@ public:
 
 	// handle shutting down GL and bringing it back up
 	void			requestResolutionUpdate(bool fullscreen_checked);
+	void			requestResolutionUpdate(); // doesn't affect fullscreen
 	BOOL			checkSettings();
 	void			restartDisplay(BOOL show_progress_bar);
 	BOOL			changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar);
@@ -400,6 +408,8 @@ protected:
 
 	BOOL			mMouseInWindow;				// True if the mouse is over our window or if we have captured the mouse.
 	BOOL			mFocusCycleMode;
+	typedef std::set<LLHandle<LLView> > view_handle_set_t;
+	view_handle_set_t mMouseHoverViews;
 
 	// Variables used for tool override switching based on modifier keys.  JC
 	MASK			mLastMask;			// used to detect changes in modifier mask
@@ -434,36 +444,16 @@ protected:
 	static std::string sMovieBaseName;
 };	
 
-class LLBottomPanel : public LLPanel
-{
-public:
-	LLBottomPanel(const LLRect& rect);
-	void setFocusIndicator(LLView * indicator);
-	LLView * getFocusIndicator() { return mIndicator; }
-	/*virtual*/ void draw();
-
-	static void* createHUD(void* data);
-	static void* createOverlayBar(void* data);
-	static void* createToolBar(void* data);
-
-protected:
-	LLView * mIndicator;
-};
-extern LLBottomPanel * gBottomPanel;
-
 void toggle_flying(void*);
 void toggle_first_person();
 void toggle_build(void*);
 void reset_viewer_state_on_sim(void);
 void update_saved_window_size(const std::string& control,S32 delta_width, S32 delta_height);
 
-
-
 //
 // Globals
 //
 
-extern LLVelocityBar*	gVelocityBar;
 extern LLViewerWindow*	gViewerWindow;
 
 extern LLFrameTimer		gMouseIdleTimer;		// how long has it been since the mouse last moved?
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index b06652a5dc..0612277b32 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -78,6 +78,8 @@
 #include "llviewershadermgr.h"
 #include "llsky.h"
 #include "llanimstatelabels.h"
+#include "lltrans.h"
+
 #include "llgesturemgr.h" //needed to trigger the voice gesticulations
 #include "llvoiceclient.h"
 #include "llvoicevisualizer.h" // Ventrella
@@ -651,7 +653,6 @@ private:
 //-----------------------------------------------------------------------------
 LLXmlTree LLVOAvatar::sXMLTree;
 LLXmlTree LLVOAvatar::sSkeletonXMLTree;
-BOOL LLVOAvatar::sDebugAvatarRotation = FALSE;
 LLVOAvatarSkeletonInfo* LLVOAvatar::sAvatarSkeletonInfo = NULL;
 LLVOAvatarXmlInfo* LLVOAvatar::sAvatarXmlInfo = NULL;
 LLVOAvatarDictionary *LLVOAvatar::sAvatarDictionary = NULL;
@@ -742,7 +743,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
 	mNeedsSkin(FALSE),
 	mUpdatePeriod(1),
 	mFullyLoadedInitialized(FALSE),
-	mHasBakedHair( FALSE )
+	mHasBakedHair( FALSE ),
+	mDebugAvatarRotation (LLCachedControl<bool>(gSavedSettings, "DebugAvatarRotation", FALSE))
+
 {
 	LLMemType mt(LLMemType::MTYPE_AVATAR);
 	//VTResume();  // VTune
@@ -976,6 +979,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
 	
 	mVoiceVisualizer->setVoiceEnabled( gVoiceClient->getVoiceEnabled( mID ) );
 	mCurrentGesticulationLevel = 0;		
+
 }
 
 //------------------------------------------------------------------------
@@ -1933,30 +1937,69 @@ void LLVOAvatar::buildCharacter()
 	//-------------------------------------------------------------------------
 	if (mIsSelf)
 	{
-		// *TODO: Translate
 		gAttachBodyPartPieMenus[0] = NULL;
-		gAttachBodyPartPieMenus[1] = new LLPieMenu(std::string("Right Arm >"));
-		gAttachBodyPartPieMenus[2] = new LLPieMenu(std::string("Head >"));
-		gAttachBodyPartPieMenus[3] = new LLPieMenu(std::string("Left Arm >"));
+
+		LLContextMenu::Params params;
+		params.label(LLTrans::getString("BodyPartsRightArm") + " >");
+		params.name(params.label);
+		params.visible(false);
+		gAttachBodyPartPieMenus[1] = LLUICtrlFactory::create<LLContextMenu> (params);
+
+		params.label(LLTrans::getString("BodyPartsHead") + " >");
+		params.name(params.label);
+		gAttachBodyPartPieMenus[2] = LLUICtrlFactory::create<LLContextMenu> (params);
+
+		params.label(LLTrans::getString("BodyPartsLeftArm") + " >");
+		params.name(params.label);
+		gAttachBodyPartPieMenus[3] = LLUICtrlFactory::create<LLContextMenu> (params);
+
 		gAttachBodyPartPieMenus[4] = NULL;
-		gAttachBodyPartPieMenus[5] = new LLPieMenu(std::string("Left Leg >"));
-		gAttachBodyPartPieMenus[6] = new LLPieMenu(std::string("Torso >"));
-		gAttachBodyPartPieMenus[7] = new LLPieMenu(std::string("Right Leg >"));
+
+		params.label(LLTrans::getString("BodyPartsLeftLeg") + " >");
+		params.name(params.label);
+		gAttachBodyPartPieMenus[5] = LLUICtrlFactory::create<LLContextMenu> (params);
+
+		params.label(LLTrans::getString("BodyPartsTorso") + " >");
+		params.name(params.label);
+		gAttachBodyPartPieMenus[6] = LLUICtrlFactory::create<LLContextMenu> (params);
+
+		params.label(LLTrans::getString("BodyPartsRightLeg") + " >");
+		params.name(params.label);
+		gAttachBodyPartPieMenus[7] = LLUICtrlFactory::create<LLContextMenu> (params);
 
 		gDetachBodyPartPieMenus[0] = NULL;
-		gDetachBodyPartPieMenus[1] = new LLPieMenu(std::string("Right Arm >"));
-		gDetachBodyPartPieMenus[2] = new LLPieMenu(std::string("Head >"));
-		gDetachBodyPartPieMenus[3] = new LLPieMenu(std::string("Left Arm >"));
+
+		params.label(LLTrans::getString("BodyPartsRightArm") + " >");
+		params.name(params.label);
+		gDetachBodyPartPieMenus[1] = LLUICtrlFactory::create<LLContextMenu> (params);
+
+		params.label(LLTrans::getString("BodyPartsHead") + " >");
+		params.name(params.label);
+		gDetachBodyPartPieMenus[2] = LLUICtrlFactory::create<LLContextMenu> (params);
+
+		params.label(LLTrans::getString("BodyPartsLeftArm") + " >");
+		params.name(params.label);
+		gDetachBodyPartPieMenus[3] = LLUICtrlFactory::create<LLContextMenu> (params);
+
 		gDetachBodyPartPieMenus[4] = NULL;
-		gDetachBodyPartPieMenus[5] = new LLPieMenu(std::string("Left Leg >"));
-		gDetachBodyPartPieMenus[6] = new LLPieMenu(std::string("Torso >"));
-		gDetachBodyPartPieMenus[7] = new LLPieMenu(std::string("Right Leg >"));
+
+		params.label(LLTrans::getString("BodyPartsLeftLeg") + " >");
+		params.name(params.label);
+		gDetachBodyPartPieMenus[5] = LLUICtrlFactory::create<LLContextMenu> (params);
+
+		params.label(LLTrans::getString("BodyPartsTorso") + " >");
+		params.name(params.label);
+		gDetachBodyPartPieMenus[6] = LLUICtrlFactory::create<LLContextMenu> (params);
+
+		params.label(LLTrans::getString("BodyPartsRightLeg") + " >");
+		params.name(params.label);
+		gDetachBodyPartPieMenus[7] = LLUICtrlFactory::create<LLContextMenu> (params);
 
 		for (S32 i = 0; i < 8; i++)
 		{
 			if (gAttachBodyPartPieMenus[i])
 			{
-				gAttachPieMenu->appendPieMenu( gAttachBodyPartPieMenus[i] );
+				gAttachPieMenu->appendContextSubMenu( gAttachBodyPartPieMenus[i] );
 			}
 			else
 			{
@@ -1968,13 +2011,25 @@ void LLVOAvatar::buildCharacter()
 					LLViewerJointAttachment* attachment = curiter->second;
 					if (attachment->getGroup() == i)
 					{
-						LLMenuItemCallGL* item;
-						item = new LLMenuItemCallGL(attachment->getName(), 
-													NULL, 
-													object_selected_and_point_valid);
-						item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", curiter->first);
+						LLMenuItemCallGL::Params item_params;
 						
-						gAttachPieMenu->append(item);
+						std::string sub_piemenu_name = attachment->getName();
+						if (LLTrans::getString(sub_piemenu_name) != "")
+						{
+						    item_params.label = LLTrans::getString(sub_piemenu_name);
+						}
+						else
+						{
+							 item_params.label = sub_piemenu_name;
+						}
+						item_params.name =(item_params.label );
+						item_params.on_click.function_name = "Object.AttachToAvatar";
+						item_params.on_click.parameter = curiter->first;
+						item_params.on_enable.function_name = "Object.EnableWear";
+						item_params.on_enable.parameter = curiter->first;
+						LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
+
+						gAttachPieMenu->addChild(item);
 
 						attachment_found = TRUE;
 						break;
@@ -1984,13 +2039,13 @@ void LLVOAvatar::buildCharacter()
 
 				if (!attachment_found)
 				{
-					gAttachPieMenu->appendSeparator();
+					gAttachPieMenu->addSeparator();
 				}
 			}
 
 			if (gDetachBodyPartPieMenus[i])
 			{
-				gDetachPieMenu->appendPieMenu( gDetachBodyPartPieMenus[i] );
+				gDetachPieMenu->appendContextSubMenu( gDetachBodyPartPieMenus[i] );
 			}
 			else
 			{
@@ -2002,9 +2057,25 @@ void LLVOAvatar::buildCharacter()
 					LLViewerJointAttachment* attachment = curiter->second;
 					if (attachment->getGroup() == i)
 					{
-						gDetachPieMenu->append(new LLMenuItemCallGL(attachment->getName(), 
-							&handle_detach_from_avatar, object_attached, attachment));
-
+						LLMenuItemCallGL::Params item_params;
+						std::string sub_piemenu_name = attachment->getName();
+						if (LLTrans::getString(sub_piemenu_name) != "")
+						{
+						    item_params.label = LLTrans::getString(sub_piemenu_name);
+						}
+						else
+						{
+							item_params.label = sub_piemenu_name;
+						}
+						item_params.name =(item_params.label );
+						item_params.on_click.function_name = "Attachment.Detach";
+						item_params.on_click.parameter = curiter->first;
+						item_params.on_enable.function_name = "Attachment.EnableDetach";
+						item_params.on_enable.parameter = curiter->first;
+						LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
+
+						gDetachPieMenu->addChild(item);
+						
 						attachment_found = TRUE;
 						break;
 					}
@@ -2012,7 +2083,7 @@ void LLVOAvatar::buildCharacter()
 
 				if (!attachment_found)
 				{
-					gDetachPieMenu->appendSeparator();
+					gDetachPieMenu->addSeparator();
 				}
 			}
 		}
@@ -2025,19 +2096,40 @@ void LLVOAvatar::buildCharacter()
 			LLViewerJointAttachment* attachment = curiter->second;
 			if (attachment->getGroup() == 8)
 			{
-				LLMenuItemCallGL* item;
-				item = new LLMenuItemCallGL(attachment->getName(), 
-											NULL, 
-											object_selected_and_point_valid);
-				item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", curiter->first);
-				gAttachScreenPieMenu->append(item);
-				gDetachScreenPieMenu->append(new LLMenuItemCallGL(attachment->getName(), 
-							&handle_detach_from_avatar, object_attached, attachment));
+				LLMenuItemCallGL::Params item_params;
+				std::string sub_piemenu_name = attachment->getName();
+				if (LLTrans::getString(sub_piemenu_name) != "")
+				{
+					item_params.label = LLTrans::getString(sub_piemenu_name);
+				}
+				else
+				{
+					item_params.label = sub_piemenu_name;
+				}
+				item_params.name =(item_params.label );
+				item_params.on_click.function_name = "Object.AttachToAvatar";
+				item_params.on_click.parameter = curiter->first;
+				item_params.on_enable.function_name = "Object.EnableWear";
+				item_params.on_enable.parameter = curiter->first;			
+				LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
+				gAttachScreenPieMenu->addChild(item);
+
+				item_params.on_click.function_name = "Attachment.DetachFromPoint";
+				item_params.on_click.parameter = curiter->first;
+				item_params.on_enable.function_name = "Attachment.PointFilled";
+				item_params.on_enable.parameter = curiter->first;
+				item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
+				gDetachScreenPieMenu->addChild(item);
 			}
 		}
 
 		for (S32 pass = 0; pass < 2; pass++)
 		{
+			// *TODO: Skinning - gAttachSubMenu is an awful, awful hack
+			if (!gAttachSubMenu)
+			{
+				break;
+			}
 			for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); 
 				 iter != mAttachmentPoints.end(); )
 			{
@@ -2047,21 +2139,44 @@ void LLVOAvatar::buildCharacter()
 				{
 					continue;
 				}
-				LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), 
-															  NULL, &object_selected_and_point_valid,
-															  &attach_label, attachment);
-				item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", curiter->first);
-				gAttachSubMenu->append(item);
-
-				gDetachSubMenu->append(new LLMenuItemCallGL(attachment->getName(), 
-					&handle_detach_from_avatar, object_attached, &detach_label, attachment));
+				LLMenuItemCallGL::Params item_params;
+				std::string sub_piemenu_name = attachment->getName();
+				if (LLTrans::getString(sub_piemenu_name) != "")
+				{
+					item_params.label = LLTrans::getString(sub_piemenu_name);
+				}
+				else
+				{
+					item_params.label = sub_piemenu_name;
+				}
+				item_params.name =(item_params.label );
+				item_params.on_click.function_name = "Object.AttachToAvatar";
+				item_params.on_click.parameter = curiter->first;
+				item_params.on_enable.function_name = "Object.EnableWear";
+				item_params.on_enable.parameter = curiter->first;
+				//* TODO: Skinning:
+				//LLSD params;
+				//params["index"] = curiter->first;
+				//params["label"] = attachment->getName();
+				//item->addEventHandler("on_enable", LLMenuItemCallGL::MenuCallback().function_name("Attachment.Label").parameter(params));
 				
+				LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
+				gAttachSubMenu->addChild(item);
+
+				item_params.on_click.function_name = "Attachment.DetachFromPoint";
+				item_params.on_click.parameter = curiter->first;
+				item_params.on_enable.function_name = "Attachment.PointFilled";
+				item_params.on_enable.parameter = curiter->first;
+				//* TODO: Skinning: item->addEventHandler("on_enable", LLMenuItemCallGL::MenuCallback().function_name("Attachment.Label").parameter(params));
+
+				item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
+				gDetachSubMenu->addChild(item);
 			}
 			if (pass == 0)
 			{
 				// put separator between non-hud and hud attachments
-				gAttachSubMenu->appendSeparator();
-				gDetachSubMenu->appendSeparator();
+				gAttachSubMenu->addSeparator();
+				gDetachSubMenu->addSeparator();
 			}
 		}
 
@@ -2098,21 +2213,31 @@ void LLVOAvatar::buildCharacter()
 				S32 attach_index = attach_it->second;
 				while (cur_pie_slice < requested_pie_slice)
 				{
-					gAttachBodyPartPieMenus[group]->appendSeparator();
-					gDetachBodyPartPieMenus[group]->appendSeparator();
+					gAttachBodyPartPieMenus[group]->addSeparator();
+					gDetachBodyPartPieMenus[group]->addSeparator();
 					cur_pie_slice++;
 				}
 
 				LLViewerJointAttachment* attachment = get_if_there(mAttachmentPoints, attach_index, (LLViewerJointAttachment*)NULL);
 				if (attachment)
 				{
-					LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), 
-																  NULL, object_selected_and_point_valid);
-					gAttachBodyPartPieMenus[group]->append(item);
-					item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", attach_index);
-					gDetachBodyPartPieMenus[group]->append(new LLMenuItemCallGL(attachment->getName(), 
-																				&handle_detach_from_avatar,
-																				object_attached, attachment));
+					LLMenuItemCallGL::Params item_params;
+					item_params.name = attachment->getName();
+					item_params.label = attachment->getName();
+					item_params.on_click.function_name = "Object.AttachToAvatar";
+					item_params.on_click.parameter = attach_index;
+					item_params.on_enable.function_name = "Object.EnableWear";
+					item_params.on_enable.parameter = attach_index;
+
+					LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
+					gAttachBodyPartPieMenus[group]->addChild(item);
+					
+					item_params.on_click.function_name = "Attachment.DetachFromPoint";
+					item_params.on_click.parameter = attach_index;
+					item_params.on_enable.function_name = "Attachment.PointFilled";
+					item_params.on_enable.parameter = attach_index;
+					item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
+					gDetachBodyPartPieMenus[group]->addChild(item);
 					cur_pie_slice++;
 				}
 			}
@@ -3001,7 +3126,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
 					new_name = TRUE;
 				}
 				
-				LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" );
+				LLColor4 avatar_name_color = gSavedSkinSettings.getColor( "AvatarNameColor" );
 				avatar_name_color.setAlpha(alpha);
 				mNameText->setColor(avatar_name_color);
 				
@@ -3089,7 +3214,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
 					line += " (";
 					if (is_away)
 					{
-						line += "Away";
+						line += LLTrans::getString("AvatarAway");
 						need_comma = TRUE;
 					}
 					if (is_busy)
@@ -3098,7 +3223,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
 						{
 							line += ", ";
 						}
-						line += "Busy";
+						line += LLTrans::getString("AvatarBusy");
 						need_comma = TRUE;
 					}
 					if (is_muted)
@@ -3107,7 +3232,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
 						{
 							line += ", ";
 						}
-						line += "Muted";
+						line += LLTrans::getString("AvatarMuted");
 						need_comma = TRUE;
 					}
 					line += ")";
@@ -3115,7 +3240,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
 				if (is_appearance)
 				{
 					line += "\n";
-					line += "(Editing Appearance)";
+					line += LLTrans::getString("AvatarEditingAppearance");
 				}
 				mNameAway = is_away;
 				mNameBusy = is_busy;
@@ -3143,7 +3268,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
 				std::deque<LLChat>::iterator chat_iter = mChats.begin();
 				mNameText->clearString();
 
-				LLColor4 new_chat = gColors.getColor( "AvatarNameColor" );
+				LLColor4 new_chat = gSavedSkinSettings.getColor( "AvatarNameColor" );
 				LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f);
 				LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f);
 				if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES) 
@@ -3607,7 +3732,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 			F32 root_roll, root_pitch, root_yaw;
 			root_rotation.getEulerAngles(&root_roll, &root_pitch, &root_yaw);
 
-			if (sDebugAvatarRotation)
+			if (mDebugAvatarRotation)
 			{
 				llinfos << "root_roll " << RAD_TO_DEG * root_roll 
 					<< " root_pitch " << RAD_TO_DEG * root_pitch
@@ -7491,6 +7616,7 @@ void LLVOAvatar::updateAttachmentVisibility(U32 camera_mode)
 }
 
 // Given a texture entry, determine which wearable type owns it.
+
 // static
 LLUUID LLVOAvatar::getDefaultTEImageID(ETextureIndex index )
 {
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 50eec80ba7..c48d509f26 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -48,6 +48,7 @@
 #include "llrendertarget.h"
 #include "llwearable.h"
 #include "llvoavatardefines.h"
+#include "llcontrol.h"
 
 extern const LLUUID ANIM_AGENT_BODY_NOISE;
 extern const LLUUID ANIM_AGENT_BREATHE_ROT;
@@ -361,6 +362,8 @@ private:
 	S32             mFullyLoadedFrameCounter;
 	LLFrameTimer    mFullyLoadedTimer;
 
+	LLCachedControl<bool>		mDebugAvatarRotation; // show animation debug info
+	
 	//--------------------------------------------------------------------
 	// Collision Volumes
 	//--------------------------------------------------------------------
@@ -520,7 +523,6 @@ public:
 	static BOOL		sShowAttachmentPoints;
 	static F32		sLODFactor; // user-settable LOD factor
 	static BOOL		sJointDebug; // output total number of joints being touched for each avatar
-	static BOOL     sDebugAvatarRotation;
 
 	static S32 sNumVisibleAvatars; // Number of instances of this class
 	
diff --git a/indra/newview/llvoavatardefines.cpp b/indra/newview/llvoavatardefines.cpp
index 19ad90a8e2..371ecbb7ab 100644
--- a/indra/newview/llvoavatardefines.cpp
+++ b/indra/newview/llvoavatardefines.cpp
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
  * 
- * Copyright (c) 2001-2007, Linden Research, Inc.
+ * Copyright (c) 2001-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/newview/llvoavatardefines.h b/indra/newview/llvoavatardefines.h
index bc1a1f1c1f..1da27b0fe0 100644
--- a/indra/newview/llvoavatardefines.h
+++ b/indra/newview/llvoavatardefines.h
@@ -5,7 +5,7 @@
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
  * 
- * Copyright (c) 2001-2007, Linden Research, Inc.
+ * Copyright (c) 2001-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -13,12 +13,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index fe4a2fdc76..a956ec8ab3 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -165,16 +165,6 @@ void LLVOGrass::initClass()
 		grass_def->getFastAttributeUUID(texture_id_string, id);
 		newGrass->mTextureID = id;
 
-		if (newGrass->mTextureID.isNull())
-		{
-			std::string textureName;
-
-			static LLStdStringHandle texture_name_string = LLXmlTree::addAttributeString("texture_name");
-			success &= grass_def->getFastAttributeString(texture_name_string, textureName);
-			LLViewerImage* grass_image = gImageList.getImageFromFile(textureName);
-			newGrass->mTextureID = grass_image->getID();
-		}
-
 		static LLStdStringHandle blade_sizex_string = LLXmlTree::addAttributeString("blade_size_x");
 		success &= grass_def->getFastAttributeF32(blade_sizex_string, F32_val);
 		newGrass->mBladeSizeX = F32_val;
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 94407ed08c..47487a6da2 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -1103,58 +1103,61 @@ static void killGateway()
 
 ///////////////////////////////////////////////////////////////////////////////////////////////
 
-LLVoiceClient::LLVoiceClient()
-{	
-	gVoiceClient = this;
-	mWriteInProgress = false;
-	mAreaVoiceDisabled = false;
-	mPTT = true;
-	mUserPTTState = false;
-	mMuteMic = false;
-	mSessionTerminateRequested = false;
-	mRelogRequested = false;
-	mCommandCookie = 0;
-	mCurrentParcelLocalID = 0;
-	mLoginRetryCount = 0;
-
-	mSpeakerVolume = 0;
-	mMicVolume = 0;
-
-	mAudioSession = NULL;
-	mAudioSessionChanged = false;
-
-	// Initial dirty state
-	mSpatialCoordsDirty = false;
-	mPTTDirty = true;
-	mFriendsListDirty = true;
-	mSpeakerVolumeDirty = true;
-	mMicVolumeDirty = true;
-	mBuddyListMapPopulated = false;
-	mBlockRulesListReceived = false;
-	mAutoAcceptRulesListReceived = false;
-	mCaptureDeviceDirty = false;
-	mRenderDeviceDirty = false;
-
-	// Use default values for everything then call updateSettings() after preferences are loaded
-	mVoiceEnabled = false;
-	mUsePTT = true;
-	mPTTIsToggle = false;
-	mEarLocation = 0;
-	mLipSyncEnabled = false;
+LLVoiceClient::LLVoiceClient() :
+	mState(stateDisabled),
+	mSessionTerminateRequested(false),
+	mRelogRequested(false),
+	mConnected(false),
+	mPump(NULL),
+	
+	mTuningMode(false),
+	mTuningEnergy(0.0f),
+	mTuningMicVolume(0),
+	mTuningMicVolumeDirty(true),
+	mTuningSpeakerVolume(0),
+	mTuningSpeakerVolumeDirty(true),
+	mTuningExitState(stateDisabled),
+	
+	mAreaVoiceDisabled(false),
+	mAudioSession(NULL),
+	mAudioSessionChanged(false),
+	mNextAudioSession(NULL),
+	
+	mCurrentParcelLocalID(0),
+	mNumberOfAliases(0),
+	mCommandCookie(0),
+	mLoginRetryCount(0),
+	
+	mBuddyListMapPopulated(false),
+	mBlockRulesListReceived(false),
+	mAutoAcceptRulesListReceived(false),
+	mCaptureDeviceDirty(false),
+	mRenderDeviceDirty(false),
+	mSpatialCoordsDirty(false),
+
+	mPTTDirty(true),
+	mPTT(true),
+	mUsePTT(true),
+	mPTTIsMiddleMouse(false),
+	mPTTKey(0),
+	mPTTIsToggle(false),
+	mUserPTTState(false),
+	mMuteMic(false),
+	mFriendsListDirty(true),
+	
+	mEarLocation(0),
+	mSpeakerVolumeDirty(true),
+	mSpeakerMuteDirty(true),
+	mSpeakerVolume(0),
+	mMicVolume(0),
+	mMicVolumeDirty(true),
 	
-	mTuningMode = false;
-	mTuningEnergy = 0.0f;
-	mTuningMicVolume = 0;
-	mTuningMicVolumeDirty = true;
-	mTuningSpeakerVolume = 0;
-	mTuningSpeakerVolumeDirty = true;
-					
-	//  gMuteListp isn't set up at this point, so we defer this until later.
-//	gMuteListp->addObserver(&mutelist_listener);
+	mVoiceEnabled(false),
+	mWriteInProgress(false),
 	
-	// stash the pump for later use
-	// This now happens when init() is called instead.
-	mPump = NULL;
+	mLipSyncEnabled(false)
+{	
+	gVoiceClient = this;
 	
 #if LL_DARWIN || LL_LINUX || LL_SOLARIS
 		// HACK: THIS DOES NOT BELONG HERE
@@ -5773,6 +5776,11 @@ void LLVoiceClient::setMuteMic(bool muted)
 	mMuteMic = muted;
 }
 
+bool LLVoiceClient::getMuteMic() const
+{
+	return mMuteMic;
+}
+
 void LLVoiceClient::setUserPTTState(bool ptt)
 {
 	mUserPTTState = ptt;
@@ -6901,11 +6909,11 @@ void LLVoiceClient::notifyFriendObservers()
 
 void LLVoiceClient::lookupName(const LLUUID &id)
 {
-	gCacheName->getName(id, onAvatarNameLookup);
+	gCacheName->get(id, FALSE, &LLVoiceClient::onAvatarNameLookup);
 }
 
 //static
-void LLVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* user_data)
+void LLVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group)
 {
 	if(gVoiceClient)
 	{
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index cfc336b27d..1066ac73f1 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -178,6 +178,7 @@ static	void updatePosition(void);
 
 		
 		void setMuteMic(bool muted);		// Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state.
+		bool getMuteMic() const;
 		void setUserPTTState(bool ptt);
 		bool getUserPTTState();
 		void toggleUserPTTState(void);
@@ -461,7 +462,7 @@ static	void updatePosition(void);
 		void removeObserver(LLFriendObserver* observer);
 		
 		void lookupName(const LLUUID &id);
-		static void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* user_data);
+		static void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group);
 		void avatarNameResolved(const LLUUID &id, const std::string &name);
 		
 		typedef std::vector<std::string> deviceList;
@@ -727,7 +728,6 @@ static	std::string nameFromsipURI(const std::string &uri);
 		bool		mVoiceEnabled;
 		bool		mWriteInProgress;
 		std::string mWriteString;
-		size_t		mWriteOffset;
 		
 		LLTimer		mUpdateTimer;
 		
diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index 5606398aaf..a361a1160c 100644
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -131,13 +131,13 @@ LLVoiceVisualizer::LLVoiceVisualizer( const U8 type )
 	
 	const char* sound_level_img[] = 
 	{
-		"041ee5a0-cb6a-9ac5-6e49-41e9320507d5.j2c",
-		"29de489d-0491-fb00-7dab-f9e686d31e83.j2c",
-		"29de489d-0491-fb00-7dab-f9e686d31e83.j2c",
-		"29de489d-0491-fb00-7dab-f9e686d31e83.j2c",
-		"29de489d-0491-fb00-7dab-f9e686d31e83.j2c",
-		"29de489d-0491-fb00-7dab-f9e686d31e83.j2c",
-		"29de489d-0491-fb00-7dab-f9e686d31e83.j2c"
+		"voice_meter_dot.j2c",
+		"voice_meter_rings.j2c",
+		"voice_meter_rings.j2c",
+		"voice_meter_rings.j2c",
+		"voice_meter_rings.j2c",
+		"voice_meter_rings.j2c",
+		"voice_meter_rings.j2c"
 	};
 
 	for (int i=0; i<NUM_VOICE_SYMBOL_WAVES; i++)
@@ -157,12 +157,12 @@ LLVoiceVisualizer::LLVoiceVisualizer( const U8 type )
 		setPreferences();
        
 		// Set up our listener to get updates on all prefs values we care about.
-		gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _1));
-		gSavedSettings.getControl("LipSyncOohAahRate")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _1));
-		gSavedSettings.getControl("LipSyncOoh")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _1));
-		gSavedSettings.getControl("LipSyncAah")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _1));
-		gSavedSettings.getControl("LipSyncOohPowerTransfer")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _1));
-		gSavedSettings.getControl("LipSyncAahPowerTransfer")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _1));
+		gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2));
+		gSavedSettings.getControl("LipSyncOohAahRate")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2));
+		gSavedSettings.getControl("LipSyncOoh")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2));
+		gSavedSettings.getControl("LipSyncAah")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2));
+		gSavedSettings.getControl("LipSyncOohPowerTransfer")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2));
+		gSavedSettings.getControl("LipSyncAahPowerTransfer")->getSignal()->connect(boost::bind(&handleVoiceVisualizerPrefsChanged, _2));
 		
 		sPrefsInitialized = true;
 	}
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index c3366cad90..e747ab585f 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -368,7 +368,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
 		initSunDirection(mSunDefaultPosition, LLVector3(0, 0, 0));
 	}
 	mAmbientScale = gSavedSettings.getF32("SkyAmbientScale");
-	mNightColorShift = gSavedSettings.getColor3("SkyNightColorShift");
+	mNightColorShift = gSavedSkinSettings.getColor3("SkyNightColorShift");
 	mFogColor.mV[VRED] = mFogColor.mV[VGREEN] = mFogColor.mV[VBLUE] = 0.5f;
 	mFogColor.mV[VALPHA] = 0.0f;
 	mFogRatio = 1.2f;
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 3b76127eb2..fecffd72ad 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -55,7 +55,7 @@
 #include "noise.h"
 #include "pipeline.h"
 #include "llspatialpartition.h"
-#include "llviewerwindow.h"
+#include "llnotifications.h"
 
 extern LLPipeline gPipeline;
 
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 8f11661b30..5f2c67efdf 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -72,7 +72,7 @@ const F32 FORCE_CULL_AREA = 8.f;
 const S32 MAX_SCULPT_REZ = 128;
 
 BOOL gAnimateTextures = TRUE;
-extern BOOL gHideSelectedObjects;
+//extern BOOL gHideSelectedObjects;
 
 F32 LLVOVolume::sLODFactor = 1.f;
 F32	LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop 
@@ -1941,10 +1941,9 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
 									  LLVector3* intersection,LLVector2* tex_coord, LLVector3* normal, LLVector3* bi_normal)
 	
 {
-	if (!mbCanSelect ||
-		(gHideSelectedObjects && isSelected()) ||
-			mDrawable->isDead() || 
-			!gPipeline.hasRenderType(mDrawable->getRenderType()))
+	if (!mbCanSelect 
+		|| mDrawable->isDead() 
+		|| !gPipeline.hasRenderType(mDrawable->getRenderType()))
 	{
 		return FALSE;
 	}
@@ -2084,7 +2083,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
 {
 	LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
 
-	if (facep->getViewerObject()->isSelected() && gHideSelectedObjects)
+	if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects)
 	{
 		return;
 	}
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index f705531723..af2ed1d1ab 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -48,11 +48,13 @@
 #include "llviewerregion.h"
 #include "llvoavatar.h"
 #include "llwearable.h"
+#include "lltrans.h"
 
 using namespace LLVOAvatarDefines;
 
 // static
 S32 LLWearable::sCurrentDefinitionVersion = 1;
+std::string LLWearable::sTypeLabel [WT_COUNT+1];
 
 // static
 const std::string LLWearable::sTypeName[ WT_COUNT+1 ] =
@@ -73,25 +75,13 @@ const std::string LLWearable::sTypeName[ WT_COUNT+1 ] =
 	"invalid"
 };
 
-// static
-const std::string LLWearable::sTypeLabel[ WT_COUNT+1 ] =
+void LLWearable::initClass ()
 {
-	"Shape",
-	"Skin",
-	"Hair",
-	"Eyes",
-	"Shirt",
-	"Pants",
-	"Shoes",
-	"Socks",
-	"Jacket",
-	"Gloves",
-	"Undershirt",
-	"Underpants",
-	"Skirt",
-	"invalid"
-};
-
+	for (int i = 0; i <= WT_COUNT; i++)
+	{
+		sTypeLabel[i] = LLTrans::getString(sTypeName[i]);
+	}
+}
 
 // static
 LLAssetType::EType LLWearable::typeToAssetType(EWearableType wearable_type)
@@ -685,7 +675,7 @@ void LLWearable::writeToAvatar( BOOL set_by_user )
 			}
 		}
 		gFloaterCustomize->setWearable(mType, this, perm_mask, is_complete);
-		LLFloaterCustomize::setCurrentWearableType( mType );
+		gFloaterCustomize->setCurrentWearableType( mType );
 	}
 
 	ESex new_sex = avatar->getSex();
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index 683a8fa928..8fa609c57b 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -80,6 +80,7 @@ public:
 	BOOL				exportFile(LLFILE* file);
 	BOOL				importFile(LLFILE* file);
 
+	static void			initClass ();
 	EWearableType		getType() const							{ return mType; }
 	void				setType( EWearableType type )			{ mType = type; }
 
@@ -140,7 +141,7 @@ private:
 	te_map_t mTEMap;				// maps TE to Image ID
 
 	static const std::string sTypeName[ WT_COUNT+1 ];
-	static const std::string sTypeLabel[ WT_COUNT+1 ];
+	static std::string sTypeLabel[ WT_COUNT+1 ];
 };
 
 #endif  // LL_LLWEARABLE_H
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index 512c03fa4d..480c8e42bf 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -42,7 +42,7 @@
 //#include "llfloaterchat.h"
 #include "llviewerstats.h"
 #include "llnotify.h"
-
+#include "lltrans.h"
 // Globals
 LLWearableList gWearableList; // Globally constructed; be careful that there's no dependency with gAgent.
 
@@ -187,8 +187,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
 	else
 	{
 		LLSD args;
-		// *TODO:translate
-		args["TYPE"] = LLAssetType::lookupHumanReadable(data->mAssetType);
+		args["TYPE"] =LLTrans::getString(LLAssetType::lookupHumanReadable(data->mAssetType));
 		if (isNewWearable)
 		{
 			LLNotifications::instance().add("InvalidWearable");
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index a5691d8a1c..781f8298f7 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -35,10 +35,30 @@
 
 #include "llweb.h"
 
-#include "llviewerwindow.h"
+// Library includes
+#include "llwindow.h"	// spawnWebBrowser()
 
+#include "llviewerwindow.h"
 #include "llviewercontrol.h"
 #include "llfloaterhtmlhelp.h"
+#include "llalertdialog.h"
+
+class URLLoader : public LLAlertDialog::URLLoader
+{
+	virtual void load(const std::string& url , bool force_open_externally)
+	{
+		if (force_open_externally)
+		{
+			LLWeb::loadURLExternal(url);
+		}
+		else
+		{
+			LLWeb::loadURL(url);
+		}
+	}
+};
+static URLLoader sAlertURLLoader;
+
 
 // static
 void LLWeb::initClass()
@@ -93,12 +113,3 @@ std::string LLWeb::escapeURL(const std::string& url)
 	}
 	return escaped_url;
 }
-
-// virtual
-void LLWeb::URLLoader::load(const std::string& url)
-{
-	loadURL(url);
-}
-
-// static
-LLWeb::URLLoader LLWeb::sAlertURLLoader;
diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h
index 278821bac5..71cc236621 100644
--- a/indra/newview/llweb.h
+++ b/indra/newview/llweb.h
@@ -35,7 +35,6 @@
 #define LL_LLWEB_H
 
 #include <string>
-#include "llalertdialog.h"
 
 class LLWeb
 {
@@ -54,12 +53,6 @@ public:
 	// Returns escaped (eg, " " to "%20") url
 	static std::string escapeURL(const std::string& url);
 
-	class URLLoader : public LLAlertDialog::URLLoader
-	{
-		virtual void load(const std::string& url);
-	};
-
-	static URLLoader sAlertURLLoader;
 };
 
 #endif
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp
index 1d17c6047f..10a9703d1a 100644
--- a/indra/newview/llwldaycycle.cpp
+++ b/indra/newview/llwldaycycle.cpp
@@ -35,8 +35,7 @@
 #include "llwldaycycle.h"
 #include "llsdserialize.h"
 #include "llwlparammanager.h"
-
-#include "llviewerwindow.h"
+#include "llnotifications.h"
 
 #include <map>
 
diff --git a/indra/newview/llwldaycycle.h b/indra/newview/llwldaycycle.h
index f045a6d1b0..eed6a78c18 100644
--- a/indra/newview/llwldaycycle.h
+++ b/indra/newview/llwldaycycle.h
@@ -35,8 +35,6 @@
 
 class LLWLDayCycle;
 
-#include "llfloater.h"
-
 #include <vector>
 #include <map>
 #include <string>
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index ce83cbd97c..b5380a6f6c 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -42,7 +42,7 @@
 
 #include "llmath.h"
 #include "v3math.h"
-#include "llmemory.h"
+#include "llsingleton.h"
 #include "llstring.h"
 #include "llviewerpartsim.h"
 #include "llviewerimage.h"
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index 572f31f566..915ff04344 100644
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -46,6 +46,7 @@
 #include "llviewerimagelist.h"
 #include "llviewerregion.h"
 #include "llregionflags.h"
+#include "lltrans.h"
 
 const F32 REQUEST_ITEMS_TIMER =  10.f * 60.f; // 10 minutes
 
@@ -757,18 +758,11 @@ void LLWorldMap::processMapItemReply(LLMessageSystem* msg, void**)
 			case MAP_ITEM_MATURE_EVENT:
 			case MAP_ITEM_ADULT_EVENT:
 			{
-				struct tm* timep;
-				// Convert to Pacific, based on server's opinion of whether
-				// it's daylight savings time there.
-				timep = utc_to_pacific_time(extra, gPacificDaylightTime);
-
-				S32 display_hour = timep->tm_hour % 12;
-				if (display_hour == 0) display_hour = 12;
-
-				new_item.mToolTip = llformat( "%d:%02d %s",
-											  display_hour,
-											  timep->tm_min,
-											  (timep->tm_hour < 12 ? "AM" : "PM") );
+				std::string timeStr = LLTrans::getString ("WorldMapTimeStr");
+				LLSD substitution;
+				substitution["datetime"] = (S32) extra;
+				LLStringUtil::format (timeStr, substitution);
+				new_item.mToolTip = timeStr;
 
 				// HACK: store Z in extra2
 				new_item.mPosGlobal.mdV[VZ] = (F64)extra2;
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index bb3c97cfd9..1db081c74a 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -36,13 +36,15 @@
 #include <map>
 #include <string>
 #include <vector>
+#include <boost/function.hpp>
 
 #include "v3math.h"
 #include "v3dmath.h"
 #include "llframetimer.h"
 #include "llmapimagetype.h"
 #include "lluuid.h"
-#include "llmemory.h"
+#include "llpointer.h"
+#include "llsingleton.h"
 #include "llviewerimage.h"
 #include "lleventinfo.h"
 #include "v3color.h"
@@ -114,7 +116,8 @@ struct LLWorldMapLayer
 class LLWorldMap : public LLSingleton<LLWorldMap>
 {
 public:
-	typedef void(*url_callback_t)(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport);
+	typedef boost::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)>
+		url_callback_t;
 
 	LLWorldMap();
 	~LLWorldMap();
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 99f559cc79..d80cd317c3 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -39,11 +39,11 @@
 #include "llmath.h"		// clampf()
 #include "llregionhandle.h"
 #include "lleventflags.h"
+#include "llfloaterreg.h"
 #include "llrender.h"
 
 #include "llagent.h"
 #include "llcallingcard.h"
-#include "llcolorscheme.h"
 #include "llviewercontrol.h"
 #include "llcylinder.h"
 #include "llfloaterdirectory.h"
@@ -164,8 +164,8 @@ void LLWorldMapView::cleanupClass()
 	sForSaleAdultImage = NULL;
 }
 
-LLWorldMapView::LLWorldMapView(const std::string& name, const LLRect& rect )
-:	LLPanel(name, rect, BORDER_NO), 
+LLWorldMapView::LLWorldMapView()
+:	LLPanel(),
 	mBackgroundColor( LLColor4( 4.f/255.f, 4.f/255.f, 75.f/255.f, 1.f ) ),
 	mItemPicked(FALSE),
 	mPanning( FALSE ),
@@ -178,46 +178,33 @@ LLWorldMapView::LLWorldMapView(const std::string& name, const LLRect& rect )
 	sPixelsPerMeter = gMapScale / REGION_WIDTH_METERS;
 	clearLastClick();
 
-	const S32 DIR_WIDTH = 10;
-	const S32 DIR_HEIGHT = 10;
-	LLRect major_dir_rect(  0, DIR_HEIGHT, DIR_WIDTH, 0 );
-	LLColor4 minor_color( 1.f, 1.f, 1.f, .7f );
-
-	mTextBoxNorth = new LLTextBox( std::string("N"), major_dir_rect );
-	mTextBoxNorth->setColor( minor_color );
-	addChild( mTextBoxNorth );
-	
-	mTextBoxEast =	new LLTextBox( std::string("E"), major_dir_rect );
-	mTextBoxEast->setColor( minor_color );
-	addChild( mTextBoxEast );
-	
-	major_dir_rect.mRight += 1 ;
-	mTextBoxWest =	new LLTextBox( std::string("W"), major_dir_rect );
-	mTextBoxWest->setColor( minor_color );
-	addChild( mTextBoxWest );
-	major_dir_rect.mRight -= 1 ;
-
-	mTextBoxSouth = new LLTextBox( std::string("S"), major_dir_rect );
-	mTextBoxSouth->setColor( minor_color );
-	addChild( mTextBoxSouth );
-
-	LLRect minor_dir_rect(  0, DIR_HEIGHT, DIR_WIDTH * 2, 0 );
-
-	mTextBoxSouthEast =	new LLTextBox( std::string("SE"), minor_dir_rect );
-	mTextBoxSouthEast->setColor( minor_color );
-	addChild( mTextBoxSouthEast );
+	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_worldmap.xml");
+	mTextBoxNorth = getChild<LLTextBox> ("floater_map_north");
+	mTextBoxEast = getChild<LLTextBox> ("floater_map_east");
+	mTextBoxWest = getChild<LLTextBox> ("floater_map_west");
+	mTextBoxSouth = getChild<LLTextBox> ("floater_map_south");
+	mTextBoxSouthEast = getChild<LLTextBox> ("floater_map_southeast");
+	mTextBoxNorthEast = getChild<LLTextBox> ("floater_map_northeast");
+	mTextBoxSouthWest = getChild<LLTextBox> ("floater_map_southwest");
+	mTextBoxNorthWest = getChild<LLTextBox> ("floater_map_northwest");
 	
-	mTextBoxNorthEast = new LLTextBox( std::string("NE"), minor_dir_rect );
-	mTextBoxNorthEast->setColor( minor_color );
-	addChild( mTextBoxNorthEast );
+	mTextBoxNorth->setText(getString("world_map_north"));
+	mTextBoxEast->setText(getString ("world_map_east"));
+	mTextBoxWest->setText(getString("world_map_west"));
+	mTextBoxSouth->setText(getString ("world_map_south"));
+	mTextBoxSouthEast ->setText(getString ("world_map_southeast"));
+	mTextBoxNorthEast ->setText(getString ("world_map_northeast"));
+	mTextBoxSouthWest->setText(getString ("world_map_southwest"));
+	mTextBoxNorthWest ->setText(getString("world_map_northwest"));
 	
-	mTextBoxSouthWest =	new LLTextBox( std::string("SW"), minor_dir_rect );
-	mTextBoxSouthWest->setColor( minor_color );
-	addChild( mTextBoxSouthWest );
-
-	mTextBoxNorthWest = new LLTextBox( std::string("NW"), minor_dir_rect );
-	mTextBoxNorthWest->setColor( minor_color );
-	addChild( mTextBoxNorthWest );
+	mTextBoxNorth->reshapeToFitText();
+	mTextBoxEast->reshapeToFitText();
+	mTextBoxWest->reshapeToFitText();
+	mTextBoxSouth->reshapeToFitText();
+	mTextBoxSouthEast ->reshapeToFitText();
+	mTextBoxNorthEast ->reshapeToFitText();
+	mTextBoxSouthWest->reshapeToFitText();
+	mTextBoxNorthWest ->reshapeToFitText();
 }
 
 
@@ -293,6 +280,8 @@ BOOL is_agent_in_region(LLViewerRegion* region, LLSimInfo* info)
 
 void LLWorldMapView::draw()
 {
+	static LLCachedControl<LLColor4> map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white);
+	
 	LLTextureView::clearDebugImages();
 
 	F64 current_time = LLTimer::getElapsedSeconds();
@@ -698,6 +687,7 @@ void LLWorldMapView::draw()
 				LLColor4::white,
 				LLFontGL::LEFT,
 				LLFontGL::BASELINE,
+				LLFontGL::NORMAL,
 				LLFontGL::DROP_SHADOW);
 			
 			// If map texture is still loading,
@@ -713,6 +703,7 @@ void LLWorldMapView::draw()
 					LLColor4::white,
 					LLFontGL::LEFT,
 					LLFontGL::BASELINE,
+					LLFontGL::NORMAL,
 					LLFontGL::DROP_SHADOW);			
 			}
 		}
@@ -801,7 +792,7 @@ void LLWorldMapView::draw()
 	LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
 	if ( LLTracker::TRACKING_AVATAR == tracking_status )
 	{
-		drawTracking( LLAvatarTracker::instance().getGlobalPos(), gTrackColor, TRUE, LLTracker::getLabel(), "" );
+		drawTracking( LLAvatarTracker::instance().getGlobalPos(), map_track_color, TRUE, LLTracker::getLabel(), "" );
 	} 
 	else if ( LLTracker::TRACKING_LANDMARK == tracking_status 
 			 || LLTracker::TRACKING_LOCATION == tracking_status )
@@ -811,7 +802,7 @@ void LLWorldMapView::draw()
 		LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();
 		if (!pos_global.isExactlyZero())
 		{
-			drawTracking( pos_global, gTrackColor, TRUE, LLTracker::getLabel(), LLTracker::getToolTip() );
+			drawTracking( pos_global, map_track_color, TRUE, LLTracker::getLabel(), LLTracker::getToolTip() );
 		}
 	}
 	else if (LLWorldMap::getInstance()->mIsTrackingUnknownLocation)
@@ -820,14 +811,14 @@ void LLWorldMapView::draw()
 		{
 			// We know this location to be invalid
 			LLColor4 loading_color(0.0, 0.5, 1.0, 1.0);
-			drawTracking( LLWorldMap::getInstance()->mUnknownLocation, loading_color, TRUE, "Invalid Location", "");
+			drawTracking( LLWorldMap::getInstance()->mUnknownLocation, loading_color, TRUE, getString("InvalidLocation"), "");
 		}
 		else
 		{
 			double value = fmod(current_time, 2);
 			value = 0.5 + 0.5*cos(value * 3.14159f);
 			LLColor4 loading_color(0.0, F32(value/2), F32(value), 1.0);
-			drawTracking( LLWorldMap::getInstance()->mUnknownLocation, loading_color, TRUE, "Loading...", "");
+			drawTracking( LLWorldMap::getInstance()->mUnknownLocation, loading_color, TRUE, getString("Loading"), "");
 		}
 	}
 	// #endif used to be here
@@ -913,10 +904,10 @@ void LLWorldMapView::drawImageStack(const LLVector3d& global_pos, LLUIImagePtr i
 
 void LLWorldMapView::drawAgents()
 {
-	F32 agents_scale = (gMapScale * 0.9f) / 256.f;
+	static LLCachedControl<LLColor4> map_avatar_color(gSavedSkinSettings, "MapAvatarColor", LLColor4::white);
+	static LLCachedControl<LLColor4> map_avatar_friend_color(gSavedSkinSettings, "MapAvatarFriendColor", LLColor4::white);
 	
-	LLColor4 avatar_color = gColors.getColor( "MapAvatar" );
-	//	LLColor4 friend_color = gColors.getColor( "MapFriend" );
+	F32 agents_scale = (gMapScale * 0.9f) / 256.f;
 
 	for (handle_list_t::iterator iter = mVisibleRegions.begin(); iter != mVisibleRegions.end(); ++iter)
 	{
@@ -939,8 +930,8 @@ void LLWorldMapView::drawAgents()
 				S32 agent_count = info.mExtra;
 				sim_agent_count += info.mExtra;
 				// Here's how we'd choose the color if info.mID were available but it's not being sent:
-				//LLColor4 color = (agent_count == 1 && is_agent_friend(info.mID)) ? friend_color : avatar_color;
-				drawImageStack(info.mPosGlobal, sAvatarSmallImage, agent_count, 3.f, avatar_color);
+				//LLColor4 color = (agent_count == 1 && is_agent_friend(info.mID)) ? map_avatar_friend_color : map_avatar_color;
+				drawImageStack(info.mPosGlobal, sAvatarSmallImage, agent_count, 3.f, map_avatar_color);
 			}
 			LLWorldMap::getInstance()->mNumAgents[handle] = sim_agent_count; // override mNumAgents for this sim
 		}
@@ -955,7 +946,7 @@ void LLWorldMapView::drawAgents()
 				region_center[VY] += REGION_WIDTH_METERS / 2;
 				// Reduce the stack size as you zoom out - always display at lease one agent where there is one or more
 				S32 agent_count = (S32)(((num_agents-1) * agents_scale + (num_agents-1) * 0.1f)+.1f) + 1;
-				drawImageStack(region_center, sAvatarSmallImage, agent_count, 3.f, avatar_color);
+				drawImageStack(region_center, sAvatarSmallImage, agent_count, 3.f, map_avatar_color);
 			}
 		}
 	}
@@ -1142,7 +1133,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
 			text_x, 
 			text_y,
 			LLColor4::white, LLFontGL::HCENTER,
-			LLFontGL::BASELINE, LLFontGL::DROP_SHADOW);
+			LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW);
 
 		if (tooltip != "")
 		{
@@ -1153,7 +1144,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
 				text_x, 
 				text_y,
 				LLColor4::white, LLFontGL::HCENTER,
-				LLFontGL::BASELINE, LLFontGL::DROP_SHADOW);
+				LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW);
 		}
 	}
 }
@@ -1338,6 +1329,7 @@ void LLWorldMapView::drawIconName(F32 x_pixels,
 		color,
 		LLFontGL::HCENTER,
 		LLFontGL::TOP,
+		LLFontGL::NORMAL, 
 		LLFontGL::DROP_SHADOW);
 
 	text_y -= llround(LLFontGL::getFontSansSerif()->getLineHeight());
@@ -1349,6 +1341,7 @@ void LLWorldMapView::drawIconName(F32 x_pixels,
 		color,
 		LLFontGL::HCENTER,
 		LLFontGL::TOP,
+		LLFontGL::NORMAL, 
 		LLFontGL::DROP_SHADOW);
 }
 
@@ -1886,27 +1879,27 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
 		case MAP_ITEM_MATURE_EVENT:
 		case MAP_ITEM_ADULT_EVENT:
 			{
-				gFloaterWorldMap->close();
+				LLFloaterReg::hideInstance("world_map");
 				// This is an ungainly hack
 				std::string uuid_str;
 				S32 event_id;
 				id.toString(uuid_str);
 				uuid_str = uuid_str.substr(28);
 				sscanf(uuid_str.c_str(), "%X", &event_id);
-				LLFloaterDirectory::showEvents(event_id);
+				LLFloaterReg::showInstance("search", LLSD().insert("panel", "event").insert("id", event_id));
 				break;
 			}
 		case MAP_ITEM_LAND_FOR_SALE:
 		case MAP_ITEM_LAND_FOR_SALE_ADULT:
 			{
-				gFloaterWorldMap->close();
-				LLFloaterDirectory::showLandForSale(id);
+				LLFloaterReg::hideInstance("world_map");
+				LLFloaterReg::showInstance("search", LLSD().insert("panel", "land").insert("id", id));
 				break;
 			}
 		case MAP_ITEM_CLASSIFIED:
 			{
-				gFloaterWorldMap->close();
-				LLFloaterDirectory::showClassified(id);
+				LLFloaterReg::hideInstance("world_map");
+				LLFloaterReg::showInstance("search", LLSD().insert("panel", "classified").insert("id", id));
 				break;
 			}
 		default:
diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h
index 1717b76beb..5b36e308dd 100644
--- a/indra/newview/llworldmapview.h
+++ b/indra/newview/llworldmapview.h
@@ -60,7 +60,7 @@ public:
 	static void initClass();
 	static void cleanupClass();
 
-	LLWorldMapView(const std::string& name, const LLRect& rect );
+	LLWorldMapView();
 	virtual ~LLWorldMapView();
 
 	virtual void	reshape(S32 width, S32 height, BOOL called_from_parent = TRUE );
diff --git a/indra/newview/macview_Prefix.h b/indra/newview/macview_Prefix.h
index 8cbabb5103..33cf7d8cb0 100644
--- a/indra/newview/macview_Prefix.h
+++ b/indra/newview/macview_Prefix.h
@@ -69,7 +69,6 @@
 #include "llfloatercustomize.h"
 #include "llfloaterdirectory.h"
 #include "llfloatergroups.h"
-#include "llfloatermap.h"
 #include "llfloaterworldmap.h"
 #include "llfloatermute.h"
 #include "llconversation.h"
@@ -92,7 +91,6 @@
 #include "lltoolgrab.h"
 #include "lltoolmgr.h"
 #include "lltoolpie.h"
-#include "lltoolview.h"
 #include "llui.h"			// for make_ui_sound
 #include "llviewercamera.h"
 #include "llviewermenu.h"
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 8dec9b9ba8..49083c5927 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -41,9 +41,9 @@
 #include "llviewercontrol.h"
 #include "llfasttimer.h"
 #include "llfontgl.h"
-#include "llmemory.h"
 #include "llmemtype.h"
 #include "llnamevalue.h"
+#include "llpointer.h"
 #include "llprimitive.h"
 #include "llvolume.h"
 #include "material_codes.h"
@@ -52,6 +52,7 @@
 #include "llui.h" 
 #include "llglheaders.h"
 #include "llrender.h"
+#include "llwindow.h"	// swapBuffers()
 
 // newview includes
 #include "llagent.h"
@@ -65,7 +66,6 @@
 #include "llface.h"
 #include "llfeaturemanager.h"
 #include "llfloatertelehub.h"
-#include "llframestats.h"
 #include "llgldbg.h"
 #include "llhudmanager.h"
 #include "lllightconstants.h"
@@ -93,8 +93,8 @@
 #include "llvopartgroup.h"
 #include "llworld.h"
 #include "llcubemap.h"
-#include "lldebugmessagebox.h"
 #include "llviewershadermgr.h"
+#include "llviewerstats.h"
 #include "llviewerjoystick.h"
 #include "llviewerdisplay.h"
 #include "llwlparammanager.h"
@@ -121,8 +121,7 @@ const U32 REFLECTION_MAP_RES = 128;
 const S32 MAX_OCCLUDER_COUNT = 2;
 
 extern S32 gBoxFrame;
-extern BOOL gRenderLightGlows;
-extern BOOL gHideSelectedObjects;
+//extern BOOL gHideSelectedObjects;
 extern BOOL gDisplaySwapBuffers;
 extern BOOL gDebugGL;
 
@@ -337,7 +336,7 @@ void LLPipeline::init()
 	getPool(LLDrawPool::POOL_BUMP);
 	getPool(LLDrawPool::POOL_GLOW);
 
-	mTrianglesDrawnStat.reset();
+	LLViewerStats::getInstance()->mTrianglesDrawnStat.reset();
 	resetFrameStats();
 
 	mRenderTypeMask = 0xffffffff;	// All render types start on
@@ -1093,7 +1092,7 @@ void LLPipeline::resetFrameStats()
 {
 	assertInitialized();
 
-	mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f);
+	LLViewerStats::getInstance()->mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f);
 
 	if (mBatchCount > 0)
 	{
@@ -1960,7 +1959,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
 		return;
 	}
 	
-	if (gHideSelectedObjects)
+	if (LLSelectMgr::getInstance()->mHideSelectedObjects)
 	{
 		if (drawablep->getVObj().notNull() &&
 			drawablep->getVObj()->isSelected())
@@ -2509,7 +2508,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
 	//
 
 	stop_glerror();
-	gFrameStats.start(LLFrameStats::RENDER_SYNC);
 
 	LLVertexBuffer::unbind();
 
@@ -2535,7 +2533,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
 	if(forceVBOUpdate)
 		gSky.mVOSkyp->updateDummyVertexBuffer() ;
 
-	gFrameStats.start(LLFrameStats::RENDER_GEOM);
 
 	// Initialize lots of GL state to "safe" values
 	glMatrixMode(GL_TEXTURE);
@@ -3295,7 +3292,7 @@ void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects, BOOL render
 		LLDrawable* drawable = vobj->mDrawable;
 		if (vobj->isDead() || 
 			vobj->isHUDAttachment() ||
-			(gHideSelectedObjects && vobj->isSelected()) ||
+			(LLSelectMgr::getInstance()->mHideSelectedObjects && vobj->isSelected()) ||
 			drawable->isDead() || 
 			!hasRenderType(drawable->getRenderType()))
 		{
@@ -5073,8 +5070,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
 		F32 minLum = llmax(gSavedSettings.getF32("RenderGlowMinLuminance"), 0.0f);
 		F32 maxAlpha = gSavedSettings.getF32("RenderGlowMaxExtractAlpha");		
 		F32 warmthAmount = gSavedSettings.getF32("RenderGlowWarmthAmount");	
-		LLVector3 lumWeights = gSavedSettings.getVector3("RenderGlowLumWeights");
-		LLVector3 warmthWeights = gSavedSettings.getVector3("RenderGlowWarmthWeights");
+		LLVector3 lumWeights = gSavedSkinSettings.getVector3("RenderGlowLumWeights");
+		LLVector3 warmthWeights = gSavedSkinSettings.getVector3("RenderGlowWarmthWeights");
 		gGlowExtractProgram.uniform1f("minLuminance", minLum);
 		gGlowExtractProgram.uniform1f("maxExtractAlpha", maxAlpha);
 		gGlowExtractProgram.uniform3f("lumWeights", lumWeights.mV[0], lumWeights.mV[1], lumWeights.mV[2]);
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 0ec4e43806..5e14260a6d 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -36,11 +36,10 @@
 #include "llerror.h"
 #include "lldarrayptr.h"
 #include "lldqueueptr.h"
-#include "llstat.h"
 #include "lldrawpool.h"
 #include "llspatialpartition.h"
 #include "m4math.h"
-#include "llmemory.h"
+#include "llpointer.h"
 #include "lldrawpool.h"
 #include "llgl.h"
 #include "lldrawable.h"
@@ -382,7 +381,6 @@ public:
 	S32						 mMeanBatchSize;
 	S32						 mTrianglesDrawn;
 	S32						 mNumVisibleNodes;
-	LLStat                   mTrianglesDrawnStat;
 	S32						 mVerticesRelit;
 
 	S32						 mLightingChanges;
diff --git a/indra/newview/res/bitmap2.bmp b/indra/newview/res/bitmap2.bmp
new file mode 100644
index 0000000000..770b07558c
Binary files /dev/null and b/indra/newview/res/bitmap2.bmp differ
diff --git a/indra/newview/res/install_icon.BMP b/indra/newview/res/install_icon.BMP
new file mode 100644
index 0000000000..09df573870
Binary files /dev/null and b/indra/newview/res/install_icon.BMP differ
diff --git a/indra/newview/res/loginbackground.bmp b/indra/newview/res/loginbackground.bmp
new file mode 100644
index 0000000000..288a0b0398
Binary files /dev/null and b/indra/newview/res/loginbackground.bmp differ
diff --git a/indra/newview/res/uninstall_icon.BMP b/indra/newview/res/uninstall_icon.BMP
new file mode 100644
index 0000000000..562b56676a
Binary files /dev/null and b/indra/newview/res/uninstall_icon.BMP differ
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index cf9466fad3..4c76c73e77 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -1,3 +1,3189 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<settings version = "101">
-</settings>
+<?xml version="1.0"?>
+<llsd>
+  <map>
+    <key>AgentChatColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from other residents</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>AlertBoxColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Alert Box Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>AlertCautionBoxColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Alert Caution Box Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>0.82</real>
+        <real>0.46</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>AlertCautionTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Alert Caution Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>AlertTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Alert Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.58</real>
+        <real>0.66</real>
+        <real>0.84</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>AvatarNameColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Avatar Name Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.98</real>
+        <real>0.69</real>
+        <real>0.36</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>BackgroundChatColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat bubble background</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>BalanceTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Balance Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>1</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ButtonBorderColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Border Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.94</real>
+        <real>0.61</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ButtonCautionImageColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Caution Image Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ButtonColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ButtonFlashBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>0.75</real>
+        <real>0.24</real>
+        <real>0.5</real>
+      </array>
+    </map>
+    <key>ButtonImageColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Image Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ButtonLabelColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Label Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.86</real>
+        <real>0.86</real>
+        <real>0.86</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ButtonLabelDisabledColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Label Disabled Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.58</real>
+        <real>0.66</real>
+        <real>0.84</real>
+        <real>0.78</real>
+      </array>
+    </map>
+    <key>ButtonLabelSelectedColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Label Selected Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.86</real>
+        <real>0.86</real>
+        <real>0.86</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ButtonLabelSelectedDisabledColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Label Selected Disabled Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.64</real>
+        <real>0.75</real>
+        <real>0.93</real>
+        <real>0.78</real>
+      </array>
+    </map>
+    <key>ButtonSelectedBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Selected Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ButtonSelectedColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Selected Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ButtonUnselectedBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Unselected Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ButtonUnselectedFgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Button Unselected Fg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ChatHistoryBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Chat History Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+      </array>
+    </map>
+    <key>ChatHistoryTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Chat History Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ColorDropShadow</key>
+    <map>
+      <key>Comment</key>
+      <string>Color Drop Shadow</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.78</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry01</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry02</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0.5</real>
+        <real>0.5</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry03</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry04</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0.5</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry05</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>0.5</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry06</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>0.5</real>
+        <real>0.5</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry07</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>0.5</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry08</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0.0</real>
+        <real>0.5</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry09</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0.5</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry10</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>0.25</real>
+        <real>0.25</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry11</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>0.5</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry12</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>0.25</real>
+        <real>0.5</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry13</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry14</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0.25</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry15</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry16</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry17</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry18</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.75</real>
+        <real>0.75</real>
+        <real>0.75</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry19</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry20</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry21</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry22</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry23</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry24</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry25</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>0.5</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry26</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>1.0</real>
+        <real>0.5</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry27</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry28</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0.5</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry29</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>0.5</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry30</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>0.5</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry31</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ColorPaletteEntry32</key>
+    <map>
+      <key>Comment</key>
+      <string>Color picker palette entry</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ConsoleBackground</key>
+    <map>
+      <key>Comment</key>
+      <string>Console Background</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ContextSilhouetteColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Context Silhouette Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.94</real>
+        <real>0.61</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>DefaultHighlightDark</key>
+    <map>
+      <key>Comment</key>
+      <string>Default Highlight Dark</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.1</real>
+        <real>0.1</real>
+        <real>0.1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>DefaultHighlightLight</key>
+    <map>
+      <key>Comment</key>
+      <string>Default Highlight Light</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.45</real>
+        <real>0.52</real>
+        <real>0.61</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>DefaultShadowDark</key>
+    <map>
+      <key>Comment</key>
+      <string>Default Shadow Dark</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.1</real>
+        <real>0.1</real>
+        <real>0.1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>DefaultShadowLight</key>
+    <map>
+      <key>Comment</key>
+      <string>Default Shadow Light</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>EffectColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Particle effects color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>FilterBackgroundColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Filter Background Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0.08</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>FilterTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Filter Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>0.78</real>
+        <real>0.27</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>FloaterButtonImageColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Floater Button Image Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.94</real>
+        <real>0.61</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>FloaterDefaultBackgroundColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Default Background Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.55</real>
+      </array>
+    </map>
+    <key>FloaterFocusBackgroundColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Focus Background Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>FloaterFocusBorderColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Floater Focus Border Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.31</real>
+      </array>
+    </map>
+    <key>FloaterUnfocusBorderColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Floater Unfocus Border Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.31</real>
+      </array>
+    </map>
+    <key>FocusColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Focus Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.94</real>
+        <real>0.61</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>FolderViewLoadingMessageTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Folder View Loading Message Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.94</real>
+        <real>0.65</real>
+        <real>0.35</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>GridFocusPointColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Grid Focus Point Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>0.5</real>
+      </array>
+    </map>
+    <key>GridlineBGColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Gridline BGColor</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.92</real>
+        <real>0.92</real>
+        <real>1</real>
+        <real>0.78</real>
+      </array>
+    </map>
+    <key>GridlineColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Gridline Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>GridlineShadowColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Gridline Shadow Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.31</real>
+      </array>
+    </map>
+    <key>GroupNotifyBoxColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Group Notify Box Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.27</real>
+        <real>0.67</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>GroupNotifyTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Group Notify Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0.12</real>
+        <real>0.24</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>GroupOverTierColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Group Over Tier Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.43</real>
+        <real>0.06</real>
+        <real>0.06</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>HTMLLinkColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of hyperlinks</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.60</real>
+        <real>0.60</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>HealthTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Health Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>HelpBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Help Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.78</real>
+        <real>0.82</real>
+        <real>0.8</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>HelpFgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Help Fg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>HelpScrollHighlightColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Help Scroll Highlight Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.45</real>
+        <real>0.52</real>
+        <real>0.61</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>HelpScrollShadowColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Help Scroll Shadow Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>HelpScrollThumbColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Help Scroll Thumb Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.31</real>
+        <real>0.38</real>
+        <real>0.49</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>HelpScrollTrackColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Help Scroll Track Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.72</real>
+        <real>0.72</real>
+        <real>0.74</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>HighlightChildColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Highlight Child Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.67</real>
+        <real>0.83</real>
+        <real>0.96</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>HighlightInspectColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Highlight Inspect Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>0</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>HighlightParentColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Highlight Parent Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.67</real>
+        <real>0.83</real>
+        <real>0.96</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>IMChatColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of instant messages from other residents</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>IMHistoryBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>IMHistory Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0.12</real>
+        <real>0.31</real>
+        <real>0.78</real>
+      </array>
+    </map>
+    <key>IMHistoryTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>IMHistory Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>IconDisabledColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Icon Disabled Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.58</real>
+        <real>0.66</real>
+        <real>0.84</real>
+        <real>0.78</real>
+      </array>
+    </map>
+    <key>IconEnabledColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Icon Enabled Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>InventoryBackgroundColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Inventory Background Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.31</real>
+      </array>
+    </map>
+    <key>InventoryItemSuffixColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Inventory Item Suffix Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.75</real>
+        <real>0.85</real>
+        <real>0.85</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>InventorySearchStatusColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Inventory Search Status Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>LabelDisabledColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Label Disabled Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.58</real>
+        <real>0.66</real>
+        <real>0.84</real>
+        <real>0.3</real>
+      </array>
+    </map>
+    <key>LabelSelectedColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Label Selected Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>LabelSelectedDisabledColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Label Selected Disabled Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.64</real>
+        <real>0.75</real>
+        <real>0.93</real>
+        <real>0.5</real>
+      </array>
+    </map>
+    <key>LabelTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Label Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.58</real>
+        <real>0.66</real>
+        <real>0.84</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>LoginProgressBarBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Login Progress Bar Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>LoginProgressBarFgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Login Progress Bar Fg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>LoginProgressBoxBorderColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Login Progress Box Border Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0.12</real>
+        <real>0.24</real>
+        <real>0</real>
+      </array>
+    </map>
+    <key>LoginProgressBoxCenterColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Login Progress Box Center Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.78</real>
+      </array>
+    </map>
+    <key>LoginProgressBoxShadowColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Login Progress Box Shadow Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.78</real>
+      </array>
+    </map>
+    <key>LoginProgressBoxTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Login Progress Box Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+
+    <key>MapAvatarColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from other residents</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>MapAvatarFriendColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from other residents</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>MapAvatarSelfColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from other residents</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>MapFrustumColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from other residents</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>0.1</real>
+      </array>
+    </map>
+    <key>MapFrustumRotatingColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from other residents</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>0.2</real>
+      </array>
+    </map>
+    <key>MapTrackColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from other residents</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>MapTrackDisabledColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from other residents</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+
+
+    <key>MenuBarBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Menu Bar Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MenuBarGodBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Menu Bar God Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.5</real>
+        <real>0.24</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MenuDefaultBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Menu Default Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MenuItemDisabledColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Menu Item Disabled Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.52</real>
+        <real>0.52</real>
+        <real>0.64</real>
+        <real>0.5</real>
+      </array>
+    </map>
+    <key>MenuItemEnabledColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Menu Item Enabled Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MenuItemHighlightBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Menu Item Highlight Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.72</real>
+        <real>0.72</real>
+        <real>0.74</real>
+        <real>0.39</real>
+      </array>
+    </map>
+    <key>MenuItemHighlightFgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Menu Item Highlight Fg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MenuNonProductionBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Menu Non Production Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MenuNonProductionGodBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Menu Non Production God Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0.5</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MenuPopupBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Menu Popup Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MultiSliderDisabledThumbColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Multi Slider Disabled Thumb Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MultiSliderThumbCenterColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Multi Slider Thumb Center Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.72</real>
+        <real>0.72</real>
+        <real>0.74</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MultiSliderThumbCenterSelectedColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Multi Slider Thumb Center Selected Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>0.2</real>
+        <real>0.2</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MultiSliderThumbOutlineColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Multi Slider Thumb Outline Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MultiSliderTrackColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Multi Slider Track Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.12</real>
+        <real>0.12</real>
+        <real>0.12</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>MultiSliderTriangleColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Multi Slider Triangle Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>0.2</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>NetMapBackgroundColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Net Map Background Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.3</real>
+      </array>
+    </map>
+    <key>NetMapGroupOwnAboveWater</key>
+    <map>
+      <key>Comment</key>
+      <string>Net Map Group Own Above Water</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>0</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>NetMapGroupOwnBelowWater</key>
+    <map>
+      <key>Comment</key>
+      <string>Net Map Group Own Below Water</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.78</real>
+        <real>0</real>
+        <real>0.78</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>NetMapOtherOwnAboveWater</key>
+    <map>
+      <key>Comment</key>
+      <string>Net Map Other Own Above Water</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>NetMapOtherOwnBelowWater</key>
+    <map>
+      <key>Comment</key>
+      <string>Net Map Other Own Below Water</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.12</real>
+        <real>0.12</real>
+        <real>0.12</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>NetMapYouOwnAboveWater</key>
+    <map>
+      <key>Comment</key>
+      <string>Net Map You Own Above Water</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>NetMapYouOwnBelowWater</key>
+    <map>
+      <key>Comment</key>
+      <string>Net Map You Own Below Water</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0.78</real>
+        <real>0.78</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>NotifyBoxColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Notify Box Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.27</real>
+        <real>0.67</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>NotifyCautionBoxColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Notify Caution Box Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>0.82</real>
+        <real>0.46</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>NotifyCautionWarnColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Notify Caution Warn Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>NotifyTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Notify Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ObjectChatColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from objects</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.7</real>
+        <real>0.9</real>
+        <real>0.7</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>OverdrivenColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of various indicators when resident is speaking too loud.</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>PanelDefaultBackgroundColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Default Background Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.55</real>
+      </array>
+    </map>
+    <key>PanelDefaultHighlightLight</key>
+    <map>
+      <key>Comment</key>
+      <string>Default Highlight Light</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.45</real>
+        <real>0.52</real>
+        <real>0.61</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>PanelFocusBackgroundColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Focus Background Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ParcelHoverColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Parcel Hover Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ParcelTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Parcel Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.56</real>
+        <real>0.65</real>
+        <real>0.82</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>PieMenuBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Pie Menu Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.59</real>
+      </array>
+    </map>
+    <key>PieMenuLineColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Pie Menu Line Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.5</real>
+      </array>
+    </map>
+    <key>PieMenuSelectedColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Pie Menu Selected Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.72</real>
+        <real>0.72</real>
+        <real>0.74</real>
+        <real>0.3</real>
+      </array>
+    </map>
+    <key>PropertyColorAuction</key>
+    <map>
+      <key>Comment</key>
+      <string>Property Color Auction</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.50</real>
+        <real>0</real>
+        <real>1</real>
+        <real>0.4</real>
+      </array>
+    </map>
+    <key>PropertyColorAvail</key>
+    <map>
+      <key>Comment</key>
+      <string>Property Color Avail</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+      </array>
+    </map>
+    <key>PropertyColorForSale</key>
+    <map>
+      <key>Comment</key>
+      <string>Property Color For Sale</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>0.50</real>
+        <real>0</real>
+        <real>0.4</real>
+      </array>
+    </map>
+    <key>PropertyColorGroup</key>
+    <map>
+      <key>Comment</key>
+      <string>Property Color Group</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0.72</real>
+        <real>0.72</real>
+        <real>0.4</real>
+      </array>
+    </map>
+    <key>PropertyColorOther</key>
+    <map>
+      <key>Comment</key>
+      <string>Property Color Other</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.4</real>
+      </array>
+    </map>
+    <key>PropertyColorSelf</key>
+    <map>
+      <key>Comment</key>
+      <string>Property Color Self</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>1</real>
+        <real>0</real>
+        <real>0.4</real>
+      </array>
+    </map>
+    <key>RenderGlowLumWeights</key>
+    <map>
+      <key>Comment</key>
+      <string>Weights for each color channel to be used in calculating luminance (should add up to 1.0)</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Vector3</string>
+      <key>Value</key>
+      <array>
+        <real>0.299</real>
+        <real>0.587</real>
+        <real>0.114</real>
+      </array>
+    </map>
+    <key>RenderGlowWarmthWeights</key>
+    <map>
+      <key>Comment</key>
+      <string>Weight of each color channel used before finding the max warmth</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Vector3</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>0.5</real>
+        <real>0.7</real>
+      </array>
+    </map>
+    <key>ScriptBgReadOnlyColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Script Bg Read Only Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.39</real>
+        <real>0.39</real>
+        <real>0.39</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ScriptErrorColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of script error messages</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.82</real>
+        <real>0.27</real>
+        <real>0.27</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>ScrollBGStripeColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scroll BGStripe Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.39</real>
+        <real>0.39</real>
+        <real>0.39</real>
+        <real>0.16</real>
+      </array>
+    </map>
+    <key>ScrollBgReadOnlyColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scroll Bg Read Only Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.78</real>
+        <real>0.82</real>
+        <real>0.8</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ScrollBgWriteableColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scroll Bg Writeable Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.78</real>
+        <real>0.82</real>
+        <real>0.8</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ScrollDisabledColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scroll Disabled Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.5</real>
+        <real>0.5</real>
+        <real>0.5</real>
+        <real>0.8</real>
+      </array>
+    </map>
+    <key>ScrollHighlightedColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scroll Highlighted Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.72</real>
+        <real>0.72</real>
+        <real>0.74</real>
+        <real>0.5</real>
+      </array>
+    </map>
+    <key>ScrollHoveredColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scroll Hovered Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.72</real>
+        <real>0.72</real>
+        <real>0.74</real>
+        <real>0.5</real>
+      </array>
+    </map>
+    <key>ScrollSelectedBGColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scroll Selected BGColor</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.39</real>
+        <real>0.39</real>
+        <real>0.74</real>
+        <real>0.59</real>
+      </array>
+    </map>
+    <key>ScrollSelectedFGColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scroll Selected FGColor</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.8</real>
+      </array>
+    </map>
+    <key>ScrollUnselectedColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scroll Unselected Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.8</real>
+      </array>
+    </map>
+    <key>ScrollbarThumbColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scrollbar Thumb Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.3</real>
+        <real>0.49</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ScrollbarTrackColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Scrollbar Track Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.6</real>
+        <real>0.6</real>
+        <real>0.62</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>SilhouetteChildColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Silhouette Child Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.13</real>
+        <real>0.42</real>
+        <real>0.77</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>SilhouetteParentColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Silhouette Parent Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>SkyNightColorShift</key>
+    <map>
+      <key>Comment</key>
+      <string>Controls moonlight color (base color applied to moon as light source)</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color3</string>
+      <key>Value</key>
+      <array>
+        <real>0.67</real>
+        <real>0.67</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>SliderDisabledThumbColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Slider Disabled Thumb Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>SliderThumbCenterColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Slider Thumb Center Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.78</real>
+        <real>0.78</real>
+        <real>0.78</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>SliderThumbOutlineColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Slider Thumb Outline Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>SliderTrackColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Slider Track Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>SpeakingColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of various indicators when resident is speaking on a voice channel.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>1.0</real>
+        <real>0.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>SystemChatColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from SL System</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.800000011921</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>TextBgFocusColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Text Bg Focus Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.78</real>
+        <real>0.82</real>
+        <real>0.8</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>TextBgReadOnlyColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Text Bg Read Only Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.24</real>
+        <real>0.63</real>
+      </array>
+    </map>
+    <key>TextBgWriteableColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Text Bg Writeable Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.78</real>
+        <real>0.82</real>
+        <real>0.8</real>
+        <real>0.9</real>
+      </array>
+    </map>
+    <key>TextCursorColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Text Cursor Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>TextDefaultColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Text Default Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0.08</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>TextEmbeddedItemColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Text Embedded Item Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0.5</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>TextEmbeddedItemReadOnlyColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Text Embedded Item Read Only Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.23</real>
+        <real>0.58</real>
+        <real>0.95</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>TextFgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Text Fg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>TextFgReadOnlyColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Text Fg Read Only Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>0.78</real>
+      </array>
+    </map>
+    <key>TextFgTentativeColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Text Fg Tentative Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>0.5</real>
+      </array>
+    </map>
+    <key>TimeTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Time Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>TitleBarFocusColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Title Bar Focus Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1</real>
+        <real>1</real>
+        <real>1</real>
+        <real>0.12</real>
+      </array>
+    </map>
+    <key>ToolTipBgColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Tool Tip Bg Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.72</real>
+        <real>0.72</real>
+        <real>0.74</real>
+        <real>0.78</real>
+      </array>
+    </map>
+    <key>ToolTipBorderColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Tool Tip Border Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.67</real>
+        <real>0.83</real>
+        <real>0.96</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>ToolTipTextColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Tool Tip Text Color</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0</real>
+        <real>0</real>
+        <real>0</real>
+        <real>1</real>
+      </array>
+    </map>
+    <key>UserChatColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of your chat messages</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+        <real>1.0</real>
+      </array>
+    </map>
+    <key>llOwnerSayChatColor</key>
+    <map>
+      <key>Comment</key>
+      <string>Color of chat messages from objects only visible to the owner</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Color4</string>
+      <key>Value</key>
+      <array>
+        <real>0.99</real>
+        <real>0.99</real>
+        <real>0.67</real>
+        <real>1.0</real>
+      </array>
+    </map>
+  </map>
+</llsd>
diff --git a/indra/newview/skins/default/textures/jump_left_in.tga b/indra/newview/skins/default/textures/jump_left_in.tga
new file mode 100644
index 0000000000..e0656c901d
Binary files /dev/null and b/indra/newview/skins/default/textures/jump_left_in.tga differ
diff --git a/indra/newview/skins/default/textures/jump_left_out.tga b/indra/newview/skins/default/textures/jump_left_out.tga
new file mode 100644
index 0000000000..fb6dac0c3d
Binary files /dev/null and b/indra/newview/skins/default/textures/jump_left_out.tga differ
diff --git a/indra/newview/skins/default/textures/jump_right_in.tga b/indra/newview/skins/default/textures/jump_right_in.tga
new file mode 100644
index 0000000000..010c748c2a
Binary files /dev/null and b/indra/newview/skins/default/textures/jump_right_in.tga differ
diff --git a/indra/newview/skins/default/textures/jump_right_out.tga b/indra/newview/skins/default/textures/jump_right_out.tga
new file mode 100644
index 0000000000..33355262d4
Binary files /dev/null and b/indra/newview/skins/default/textures/jump_right_out.tga differ
diff --git a/indra/newview/skins/default/textures/menu_separator.png b/indra/newview/skins/default/textures/menu_separator.png
new file mode 100644
index 0000000000..89dcdcdff5
Binary files /dev/null and b/indra/newview/skins/default/textures/menu_separator.png differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 34c9dea7e6..19f283e99d 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -1,21 +1,21 @@
 <textures version="101">
 
-  <texture name="icn_scrollbar_thumb.tga" preload="true" scale_top="7" scale_left="4" scale_bottom="8" scale_right="4" />
-  <texture name="icn_scrollbar_bg.tga" preload="true" scale_top="7" scale_left="4" scale_bottom="8" scale_right="4" />
-  <texture name="sm_rounded_corners_simple.tga" scale_left="4" scale_top="4" scale_bottom="4" scale_right="4"/>
-  <texture name="icn_textfield_enabled.tga" scale_left="5" scale_top="5" scale_bottom="5" scale_right="5"/>
+  <texture name="icn_scrollbar_thumb.tga" preload="true" scale.top="7" scale.left="4" scale.bottom="8" scale.right="4" />
+  <texture name="icn_scrollbar_bg.tga" preload="true" scale.top="7" scale.left="4" scale.bottom="8" scale.right="4" />
+  <texture name="sm_rounded_corners_simple.tga" scale.left="4" scale.top="4" scale.bottom="4" scale.right="4"/>
+  <texture name="icn_textfield_enabled.tga" scale.left="5" scale.top="5" scale.bottom="5" scale.right="5"/>
   
-  <texture name="button_disabled_32x128.tga" preload="true" scale_left="16" scale_top="16" scale_right="112" scale_bottom="16" />
+  <texture name="button_disabled_32x128.tga" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" />
   
-  <texture name="button_enabled_32x128.tga" preload="true" scale_left="16" scale_top="16" scale_right="112" scale_bottom="16" />
+  <texture name="button_enabled_32x128.tga" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" />
   
-  <texture name="toolbar_btn_enabled.tga" scale_left="7" scale_top="32" scale_right="121" scale_bottom="0" /> 
+  <texture name="toolbar_btn_enabled.tga" scale.left="7" scale.top="32" scale.right="121" scale.bottom="0" /> 
 
-  <texture name="toolbar_btn_disabled.tga" scale_left="7" scale_top="32" scale_right="121" scale_bottom="0" /> 
+  <texture name="toolbar_btn_disabled.tga" scale.left="7" scale.top="32" scale.right="121" scale.bottom="0" /> 
   
-  <texture name="toolbar_btn_selected.tga" scale_left="7" scale_top="32" scale_right="121" scale_bottom="0" /> 
+  <texture name="toolbar_btn_selected.tga" scale.left="7" scale.top="32" scale.right="121" scale.bottom="0" /> 
   
-  <texture name="button_enabled_selected_32x128.tga" preload="true" scale_left="16" scale_top="16" scale_right="112" scale_bottom="16" />
+  <texture name="button_enabled_selected_32x128.tga" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" />
   
   <texture name="checkbox_disabled_false.tga"	preload="true"/>
   <texture name="checkbox_disabled_true.tga"	preload="true"/>
@@ -23,7 +23,8 @@
   <texture name="checkbox_enabled_true.tga"	preload="true"/>
   
   <texture name="close_in_blue.tga"	preload="true"/>
- 
+
+  <texture name="minimize_inactive.tga" preload="true"/>
   <texture name="minimize.tga"	preload="true"/>
   <texture name="minimize_pressed.tga"	preload="true"/>
   
@@ -36,15 +37,15 @@
   
   <texture name="resize_handle_bottom_right_blue.tga" preload="true"/>
   
-  <texture name="rounded_square.tga"	file_name="rounded_square.j2c" preload="true" scale_left="16" scale_top="16" scale_right="112" scale_bottom="16"/>
+  <texture name="rounded_square.tga"	file_name="rounded_square.j2c" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16"/>
   
-  <texture name="rounded_square_soft.tga"	file_name="rounded_square_soft.j2c" preload="true" scale_left="16" scale_top="16" scale_right="112" scale_bottom="16"/>
+  <texture name="rounded_square_soft.tga"	file_name="rounded_square_soft.j2c" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16"/>
   
-  <texture name="toolbar_tab.tga"	preload="true" scale_left="6" scale_top="42" scale_right="104" scale_bottom="8"/>
-  <texture name="toolbar_bg.tga"	preload="true" scale_left="6" scale_top="42" scale_right="96" scale_bottom="16"/>
+  <texture name="toolbar_tab.tga"	preload="true" scale.left="6" scale.top="42" scale.right="104" scale.bottom="8"/>
+  <texture name="toolbar_bg.tga"	preload="true" scale.left="6" scale.top="42" scale.right="96" scale.bottom="16"/>
   
-  <texture name="progressbar_fill.tga"	preload="true" scale_left="10" scale_top="7" scale_right="65" scale_bottom="7"/>
-  <texture name="progressbar_track.tga"	preload="true" scale_left="10" scale_top="7" scale_right="80" scale_bottom="7"/>
+  <texture name="progressbar_fill.tga"	preload="true" scale.left="10" scale.top="7" scale.right="65" scale.bottom="7"/>
+  <texture name="progressbar_track.tga"	preload="true" scale.left="10" scale.top="7" scale.right="80" scale.bottom="7"/>
   
   <texture name="scrollbutton_down_in_blue.tga"	preload="true"/>
   <texture name="scrollbutton_down_out_blue.tga"	preload="true"/>
@@ -59,15 +60,15 @@
   <texture name="spin_up_in_blue.tga"	preload="true"/>
   <texture name="spin_up_out_blue.tga"	preload="true"/>
   
-  <texture name="square_btn_32x128.tga"	preload="true" scale_left="8" scale_top="10" scale_right="120" scale_bottom="10"/>
-  <texture name="square_btn_selected_32x128.tga"	preload="true" scale_left="2" scale_top="10" scale_right="126" scale_bottom="10"/>
+  <texture name="square_btn_32x128.tga"	preload="true" scale.left="8" scale.top="10" scale.right="120" scale.bottom="10"/>
+  <texture name="square_btn_selected_32x128.tga"	preload="true" scale.left="2" scale.top="10" scale.right="126" scale.bottom="10"/>
   
-  <texture name="tab_bottom_blue.tga"	preload="true" scale_left="8" scale_top="8" scale_right="120" scale_bottom="9"/>
-  <texture name="tab_bottom_selected_blue.tga"	preload="true" scale_left="8" scale_top="8" scale_right="96" scale_bottom="9"/>
-  <texture name="tab_left.tga"	preload="true" scale_left="8" scale_top="8" scale_right="120" scale_bottom="9"/>
-  <texture name="tab_left_selected.tga"	preload="true" scale_left="8" scale_top="8" scale_right="96" scale_bottom="9"/>
-  <texture name="tab_top_blue.tga"	preload="true" scale_left="8" scale_top="8" scale_right="120" scale_bottom="9"/>
-  <texture name="tab_top_selected_blue.tga" preload="true" scale_left="8" scale_top="8" scale_right="96" scale_bottom="9"/>
+  <texture name="tab_bottom_blue.tga"	preload="true" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9"/>
+  <texture name="tab_bottom_selected_blue.tga"	preload="true" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9"/>
+  <texture name="tab_left.tga"	preload="true" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9"/>
+  <texture name="tab_left_selected.tga"	preload="true" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9"/>
+  <texture name="tab_top_blue.tga"	preload="true" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9"/>
+  <texture name="tab_top_selected_blue.tga" preload="true" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9"/>
   
   <texture name="startup_logo.j2c" preload="true"/>
   <texture name="color_swatch_alpha.tga" preload="true"/>
@@ -236,9 +237,9 @@
   
   <texture name="mute_icon.tga"/>
   
-  <texture name="icn_slide-groove_dark.tga" scale_left="2" scale_top="5" scale_right="29" scale_bottom="4"/>
-  <texture name="icn_slide-highlight.tga" scale_left="2" scale_top="5" scale_right="29" scale_bottom="4"/>
-  <texture name="icn_slide-thumb_dark.tga" scale_left="2" scale_top="5" scale_right="29" scale_bottom="4"/>
+  <texture name="icn_slide-groove_dark.tga" scale.left="2" scale.top="5" scale.right="29" scale.bottom="4"/>
+  <texture name="icn_slide-highlight.tga" scale.left="2" scale.top="5" scale.right="29" scale.bottom="4"/>
+  <texture name="icn_slide-thumb_dark.tga" scale.left="2" scale.top="5" scale.right="29" scale.bottom="4"/>
   
   <texture name="icn_speaker-muted_dark.tga"/>
   <texture name="icn_speaker_dark.tga"/>
@@ -255,39 +256,32 @@
   <texture name="icn_media_movie.tga" preload="true"/>
   
   <texture name="icn_chatbar.tga"/>
-  <texture name="btn_chatbar.tga" scale_left="20" scale_top="24" scale_right="44" scale_bottom="0"/>
-  <texture name="btn_chatbar_selected.tga" scale_left="20" scale_top="24" scale_right="44" scale_bottom="0"/>
-  
-  <texture name="icn_rounded-text-field.tga"/>
-
-  <texture name="flyout_btn_right_selected.tga" scale_left="0" scale_top="30" scale_right="32" scale_bottom="0"/>
-  
-  <texture name="flyout_btn_right.tga" scale_left="0" scale_top="30" scale_right="32" scale_bottom="0"/>
+  <texture name="btn_chatbar.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0"/>
+  <texture name="btn_chatbar_selected.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0"/>
   
-  <texture name="flyout_btn_right_disabled.tga" scale_left="0" scale_top="30" scale_right="32" scale_bottom="0"/>
-  
-  <texture name="flyout_btn_left_selected.tga" scale_left="16" scale_top="15" scale_right="112" scale_bottom="15"/>
-  
-  <texture name="flyout_btn_left.tga" scale_left="16" scale_top="15" scale_right="112" scale_bottom="15"/>
-  
-  <texture name="flyout_btn_left_disabled.tga" scale_left="16" scale_top="15" scale_right="112" scale_bottom="15"/>
+  <texture name="icn_rounded-text-field.tga" scale.left="14" scale.bottom="16" scale.top="16" scale.right="114"/>
 
-  <texture name="UIImgResizeBottomRightUUID" file_name="resize_handle_bottom_right_blue.tga"/>
+  <texture name="flyout_btn_right_selected.tga" scale.left="0" scale.top="30" scale.right="32" scale.bottom="0"/>
+  <texture name="flyout_btn_right.tga" scale.left="0" scale.top="30" scale.right="32" scale.bottom="0"/>
+  <texture name="flyout_btn_right_disabled.tga" scale.left="0" scale.top="30" scale.right="32" scale.bottom="0"/>
+  <texture name="flyout_btn_left_selected.tga" scale.left="16" scale.top="15" scale.right="112" scale.bottom="15"/>
+  <texture name="flyout_btn_left.tga" scale.left="16" scale.top="15" scale.right="112" scale.bottom="15"/>
+  <texture name="flyout_btn_left_disabled.tga" scale.left="16" scale.top="15" scale.right="112" scale.bottom="15"/>
 
-  <texture name="UIImgBtnForwardOutUUID" file_name="move_forward_out.tga" preload="true"/>
-  <texture name="UIImgBtnForwardInUUID" file_name="move_forward_in.tga" preload="true"/>
-  <texture name="UIImgBtnSlideLeftOutUUID" file_name="move_left_out.tga" preload="true"/>
-  <texture name="UIImgBtnSlideLeftInUUID" file_name="move_left_in.tga" preload="true"/>
-  <texture name="UIImgBtnLeftOutUUID"	file_name="move_turn_left_out.tga" preload="true"/>
-  <texture name="UIImgBtnLeftInUUID"	file_name="move_turn_left_in.tga" preload="true"/>
-  <texture name="UIImgBtnRightOutUUID" file_name="move_turn_right_out.tga" preload="true"/>
-  <texture name="UIImgBtnRightInUUID"	file_name="move_turn_right_in.tga" preload="true"/>
-  <texture name="UIImgBtnSlideRightOutUUID" file_name="move_right_out.tga" preload="true"/>
-  <texture name="UIImgBtnSlideRightInUUID" file_name="move_right_in.tga" preload="true"/>
-  <texture name="UIImgBtnMoveUpInUUID" file_name="move_up_in.tga" preload="true"/>
-  <texture name="UIImgBtnMoveUpOutUUID" file_name="move_up_out.tga" preload="true"/>
-  <texture name="UIImgBtnMoveDownInUUID" file_name="move_down_in.tga" preload="true"/>
-  <texture name="UIImgBtnMoveDownOutUUID" file_name="move_down_out.tga" preload="true"/>
+  <texture name="move_forward_out.tga" preload="true"/>
+  <texture name="move_forward_in.tga" preload="true"/>
+  <texture name="move_left_out.tga" preload="true"/>
+  <texture name="move_left_in.tga" preload="true"/>
+  <texture name="move_turn_left_out.tga" preload="true"/>
+  <texture name="move_turn_left_in.tga" preload="true"/>
+  <texture name="move_turn_right_out.tga" preload="true"/>
+  <texture name="move_turn_right_in.tga" preload="true"/>
+  <texture name="move_right_out.tga" preload="true"/>
+  <texture name="move_right_in.tga" preload="true"/>
+  <texture name="move_up_in.tga" preload="true"/>
+  <texture name="move_up_out.tga" preload="true"/>
+  <texture name="move_down_in.tga" preload="true"/>
+  <texture name="move_down_out.tga" preload="true"/>
   
   <texture name="cam_rotate_out.tga" preload="true"/>
   <texture name="cam_rotate_in.tga" preload="true"/>
@@ -295,73 +289,34 @@
   <texture name="cam_zoom_plus_in.tga" preload="true"/>
   <texture name="cam_zoom_minus_in.tga" preload="true"/>
 
-  <texture name="UIImgBtnScrollUpOutUUID" file_name="scrollbutton_up_out_blue.tga"/>
-  <texture name="UIImgBtnScrollUpInUUID" file_name="scrollbutton_up_in_blue.tga"/>
-  <texture name="UIImgBtnScrollDownOutUUID" file_name="scrollbutton_down_out_blue.tga"/>
-  <texture name="UIImgBtnScrollDownInUUID" file_name="scrollbutton_down_in_blue.tga"/>
-  <texture name="UIImgBtnScrollLeftOutUUID" file_name="scrollbutton_left_out_blue.tga"/>
-  <texture name="UIImgBtnScrollLeftInUUID" file_name="scrollbutton_left_in_blue.tga"/>
-  <texture name="UIImgBtnScrollRightOutUUID" file_name="scrollbutton_right_out_blue.tga"/>
-  <texture name="UIImgBtnScrollRightInUUID" file_name="scrollbutton_right_in_blue.tga"/>
-
-  <texture name="UIImgBtnJumpLeftOutUUID" file_name="3c18c87e-5f50-14e2-e744-f44734aa365f.tga"/>
-  <texture name="UIImgBtnJumpLeftInUUID" file_name="9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga"/>
-  <texture name="UIImgBtnJumpRightOutUUID" file_name="ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga"/>
-  <texture name="UIImgBtnJumpRightInUUID" file_name="7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga"/>
+  <texture name="jump_left_out.tga"/>
+  <texture name="jump_left_in.tga"/>
+  <texture name="jump_right_out.tga"/>
+  <texture name="jump_right_in.tga"/>
 
-  <texture name="UIImgBtnSpinUpOutUUID"	file_name="spin_up_out_blue.tga"/>
-  <texture name="UIImgBtnSpinUpInUUID"	file_name="spin_up_in_blue.tga"/>
-  <texture name="UIImgBtnSpinDownOutUUID"	file_name="spin_down_out_blue.tga"/>
-  <texture name="UIImgBtnSpinDownInUUID"	file_name="spin_down_in_blue.tga"/>
+  <texture name="tool_grab.tga"/>
+  <texture name="tool_grab_active.tga"/>
 
-  <texture name="UIImgRadioActiveUUID"	file_name="radio_active_false.tga"/>
-  <texture name="UIImgRadioActiveSelectedUUID" file_name="radio_active_true.tga"/>
-  <texture name="UIImgRadioInactiveUUID"	file_name="radio_inactive_false.tga"/>
-  <texture name="UIImgRadioInactiveSelectedUUID" file_name="radio_inactive_true.tga"/>
+  <texture name="tool_face.tga"/>
+  <texture name="tool_face_active.tga"/>
 
-  <texture name="UIImgCheckboxActiveUUID"	file_name="checkbox_enabled_false.tga"/>
-  <texture name="UIImgCheckboxActiveSelectedUUID" file_name="checkbox_enabled_true.tga"/>
-  <texture name="UIImgCheckboxInactiveUUID" file_name="checkbox_disabled_false.tga"/>
-  <texture name="UIImgCheckboxInactiveSelectedUUID" file_name="checkbox_disabled_true.tga"/>
+  <texture name="tool_create.tga"/>
+  <texture name="tool_create_active.tga"/>
 
-  <texture name="UIImgBtnTabTopOutUUID"	file_name="tab_top_blue.tga"/>
-  <texture name="UIImgBtnTabTopInUUID"	file_name="tab_top_selected_blue.tga"/>
-  <texture name="UIImgBtnTabBottomOutUUID" file_name="tab_bottom_blue.tga"/>
-  <texture name="UIImgBtnTabBottomInUUID"	file_name="tab_bottom_selected_blue.tga"/>
-
-  <texture name="UIImgGrabUUID"	file_name="c63f124c-6340-4fbf-b59e-0869a44adb64.tga"/>
-  <texture name="UIImgGrabSelectedUUID"	file_name="c1e21504-f136-451d-b8e9-929037812f1d.tga"/>
-
-  <!--<texture name="UIImgScaleUUID" 			file_name="88a90fef-b448-4883-9344-ecf378a60433.tga"/>-->
-
-  <texture name="UIImgFaceUUID"	file_name="ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga"/>
-  <texture name="UIImgFaceSelectedUUID"	file_name="b4870163-6208-42a9-9801-93133bf9a6cd.tga"/>
-
-  <texture name="UIImgCreateUUID"	file_name="7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga"/>
-  <texture name="UIImgCreateSelectedUUID"	file_name="0098b015-3daf-4cfe-a72f-915369ea97c2.tga"/>
-
-  <texture name="UIImgBtnCloseInactiveUUID" file_name="close_inactive_blue.tga"/>
-  <texture name="UIImgBtnCloseActiveUUID"	file_name="closebox.tga"/>
-  <texture name="UIImgBtnClosePressedUUID" file_name="close_in_blue.tga"/>
+  <texture name="close_inactive_blue.tga"/>
+  <texture name="closebox.tga"/>
   <texture name="icn_clear_lineeditor.tga" />
   
   <texture name="up_arrow.tga" file_name="up_arrow.png"/>
   <texture name="down_arrow.tga" file_name="down_arrow.png"/>
 
+  <texture name="restore_inactive.tga"/>
+  <texture name="restore.tga"/>
+  <texture name="restore_pressed.tga"/>
 
-  <texture name="UIImgBtnMinimizeInactiveUUID" file_name="minimize_inactive.tga"/>
-  <texture name="UIImgBtnMinimizeActiveUUID" file_name="minimize.tga"/>
-  <texture name="UIImgBtnMinimizePressedUUID" file_name="minimize_pressed.tga"/>
-
-  <texture name="UIImgBtnRestoreInactiveUUID" file_name="restore_inactive.tga"/>
-  <texture name="UIImgBtnRestoreActiveUUID" file_name="restore.tga"/>
-  <texture name="UIImgBtnRestorePressedUUID" file_name="restore_pressed.tga"/>
-
-  <texture name="UIImgBtnTearOffInactiveUUID" file_name="tearoffbox.tga"/>
-  <texture name="UIImgBtnTearOffActiveUUID" file_name="tearoffbox.tga"/>
-  <texture name="UIImgBtnTearOffPressedUUID" file_name="tearoff_pressed.tga"/>
+  <texture name="tearoffbox.tga"/>
+  <texture name="tearoff_pressed.tga"/>
 
-  <texture name="UIImgCrosshairsUUID" file_name="crosshairs.tga"/>
   <texture name="icn_label_music.tga"/>
   <texture name="icn_label_media.tga"/>
   <texture name="arrow_down.tga"/>
@@ -373,4 +328,5 @@
   <texture name="default_land_picture.j2c"/>
   <texture name="default_profile_picture.j2c"/>
   <texture name="locked_image.j2c"/>
+  <texture name="menu_separator" file_name="menu_separator.png"/>
 </textures>
diff --git a/indra/newview/skins/default/textures/transparent.j2c b/indra/newview/skins/default/textures/transparent.j2c
new file mode 100644
index 0000000000..1068e940b9
Binary files /dev/null and b/indra/newview/skins/default/textures/transparent.j2c differ
diff --git a/indra/newview/skins/default/textures/voice_meter_dot.j2c b/indra/newview/skins/default/textures/voice_meter_dot.j2c
new file mode 100644
index 0000000000..e536c3338a
Binary files /dev/null and b/indra/newview/skins/default/textures/voice_meter_dot.j2c differ
diff --git a/indra/newview/skins/default/textures/voice_meter_rings.j2c b/indra/newview/skins/default/textures/voice_meter_rings.j2c
new file mode 100644
index 0000000000..17e7c6c6a1
Binary files /dev/null and b/indra/newview/skins/default/textures/voice_meter_rings.j2c differ
diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml
index b747bdaf53..5795053a14 100644
--- a/indra/newview/skins/default/xui/da/floater_about.xml
+++ b/indra/newview/skins/default/xui/da/floater_about.xml
@@ -1,36 +1,36 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_about" title="Om Second Life">
-	<text_editor name="credits_editor">
-		Second Life er gjort muligt for dig af Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les and many others.
-
-Tak til følgende beboerne for at bidrage til at sikre, at dette er den bedste version til dato: afon shepherd, Aimee Trescothick, Alexandrea Fride, Alissa Sabre, Amber DeCuir, Asuka Neely, Auron Forcella, Blue Revolution, Bocan Undercroft, Boroondas Gupte, Brandon Shinobu, Bri Gufler, Buckaroo Mu, Celierra Darling, Christos Atlantis, Coder Kas, Cummere Mayo, dakota schwade, Dirk Talamasca, Dizzy Banjo, Drew Dwi, Duckling Kwak, Ellla McMahon, Erikah Jameson, Erinyse Planer, Eyana Yohkoh, Ezian Ecksol, Faron Karu, Fenoe Lowey, Fox Hwasung, Francisca Biedermann, Gally Young, Gellan Glenelg, Geneko Nemeth, Glenn Rotaru, Hagar Qinan, Harleen Gretzky, Holger Gilruth, hotrodjohnny gears, IAm Zabelin, Inigo Catteneo, Iustinian Tomsen, Jacek Antonell, James Benedek, Jim Kupferberg, Joeseph Albanese, JPT62089 Agnon, Kardargo Adamczyk, Kirstenlee Cinquetti, Latif Khalifa, lea Parnall, Lex Neva, Lillith Anatine, Lilly Zenovka, Lim Catteneo, Lindal Kidd, Mark Rosenbaum, MasterJ Chaplin, McCabe Maxsted, Melvin Starbrook, Meni Kaiousei, Mero Collas, Minakothegothicgeisha Kamachi, Moon Metty, neofilo aabye, Neutron Chesnokov, Nomad Ingwer, norritt Xi, Opensource Obscure, Oracle Weatherwax, Ourasi Ferraris, Pabl0 Roffo, Peyton Aleixandre, Phli Foxchase, Psi Merlin, r2d2 Wunderlich, Regi Yifu, Saijanai Kuhn, Sandor Balczo, Sarkan Dreamscape, Scree Raymaker, Sedona Mills, Selena Beale, Sheet Spotter, Shibari Twine, Silver Key, Simon Kline, SLB Wirefly, Stacy Wombat, Sugarcult Dagger, Tayra Dagostino, Tetsuryu Vlodovic, ThaBiGGDoGG Richez, Timo Gufler, tx Oh, wayfinder wishbringer, Wizzytoe McCullough, Wundur Primbee, Yann Dufaux, Yuu Nakamichi, Aminom Marvin, Andred Qinan, arminasx saiman, caroline apollo, Iskar Ariantho, Jenika Connolly, Maghnus Balogh, Nefertiti Nefarious, RodneyLee Jessop
-
-  3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion
-  APR Copyright (C) 2000-2004 The Apache Software Foundation
-  cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
-  DBus/dbus-glib Copyright (C) 2002, 2003  CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
-  expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
-  FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
-  GL Copyright (C) 1999-2004 Brian Paul.
-  Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
-  jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
-  jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
-  ogg/vorbis Copyright (C) 2001, Xiphophorus
-  OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
-  SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
-  SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-  xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
-  zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
-  google-perftools Copyright (c) 2005, Google Inc.
-
-Alle rettigheder forbeholdes.  Se licenses.txt for detaljer.
-
-Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
-
-
-I get by with a little help from my friends. --Richard Starkey
-	</text_editor>
-	<string name="you_are_at">
-		Du er ved [POSITION]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_about" title="Om Second Life">
+	<text_editor name="credits_editor">
+		Second Life er gjort muligt for dig af Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les and many others.
+
+Tak til følgende beboerne for at bidrage til at sikre, at dette er den bedste version til dato: afon shepherd, Aimee Trescothick, Alexandrea Fride, Alissa Sabre, Amber DeCuir, Asuka Neely, Auron Forcella, Blue Revolution, Bocan Undercroft, Boroondas Gupte, Brandon Shinobu, Bri Gufler, Buckaroo Mu, Celierra Darling, Christos Atlantis, Coder Kas, Cummere Mayo, dakota schwade, Dirk Talamasca, Dizzy Banjo, Drew Dwi, Duckling Kwak, Ellla McMahon, Erikah Jameson, Erinyse Planer, Eyana Yohkoh, Ezian Ecksol, Faron Karu, Fenoe Lowey, Fox Hwasung, Francisca Biedermann, Gally Young, Gellan Glenelg, Geneko Nemeth, Glenn Rotaru, Hagar Qinan, Harleen Gretzky, Holger Gilruth, hotrodjohnny gears, IAm Zabelin, Inigo Catteneo, Iustinian Tomsen, Jacek Antonell, James Benedek, Jim Kupferberg, Joeseph Albanese, JPT62089 Agnon, Kardargo Adamczyk, Kirstenlee Cinquetti, Latif Khalifa, lea Parnall, Lex Neva, Lillith Anatine, Lilly Zenovka, Lim Catteneo, Lindal Kidd, Mark Rosenbaum, MasterJ Chaplin, McCabe Maxsted, Melvin Starbrook, Meni Kaiousei, Mero Collas, Minakothegothicgeisha Kamachi, Moon Metty, neofilo aabye, Neutron Chesnokov, Nomad Ingwer, norritt Xi, Opensource Obscure, Oracle Weatherwax, Ourasi Ferraris, Pabl0 Roffo, Peyton Aleixandre, Phli Foxchase, Psi Merlin, r2d2 Wunderlich, Regi Yifu, Saijanai Kuhn, Sandor Balczo, Sarkan Dreamscape, Scree Raymaker, Sedona Mills, Selena Beale, Sheet Spotter, Shibari Twine, Silver Key, Simon Kline, SLB Wirefly, Stacy Wombat, Sugarcult Dagger, Tayra Dagostino, Tetsuryu Vlodovic, ThaBiGGDoGG Richez, Timo Gufler, tx Oh, wayfinder wishbringer, Wizzytoe McCullough, Wundur Primbee, Yann Dufaux, Yuu Nakamichi, Aminom Marvin, Andred Qinan, arminasx saiman, caroline apollo, Iskar Ariantho, Jenika Connolly, Maghnus Balogh, Nefertiti Nefarious, RodneyLee Jessop
+
+  3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion
+  APR Copyright (C) 2000-2004 The Apache Software Foundation
+  cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
+  DBus/dbus-glib Copyright (C) 2002, 2003  CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
+  expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
+  FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
+  GL Copyright (C) 1999-2004 Brian Paul.
+  Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
+  jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
+  jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
+  ogg/vorbis Copyright (C) 2001, Xiphophorus
+  OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
+  SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
+  SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+  xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
+  zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
+  google-perftools Copyright (c) 2005, Google Inc.
+
+Alle rettigheder forbeholdes.  Se licenses.txt for detaljer.
+
+Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
+
+
+I get by with a little help from my friends. --Richard Starkey
+	</text_editor>
+	<string name="you_are_at">
+		Du er ved [POSITION]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_about_land.xml b/indra/newview/skins/default/xui/da/floater_about_land.xml
index 53be71fdd1..70f7690d42 100644
--- a/indra/newview/skins/default/xui/da/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/da/floater_about_land.xml
@@ -1,461 +1,458 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floaterland" title="Om land">
-	<tab_container name="landtab">
-		<panel label="Generelt" name="land_general_panel">
-			<text type="string" length="1" name="Name:">
-				Navn:
-			</text>
-			<text type="string" length="1" name="Description:">
-				Beskrivelse:
-			</text>
-			<text type="string" length="1" name="Owner:">
-				Ejer:
-			</text>
-			<text type="string" length="1" name="OwnerText">
-				Leyla Linden
-			</text>
-			<button label="Profil..." label_selected="Profil..." name="Profile..." />
-			<text type="string" length="1" name="Group:">
-				Gruppe:
-			</text>
-			<button label="Vælg..." label_selected="Vælg..." name="Set..." />
-			<check_box label="Tillad dedikering til gruppe" name="check deed"
-			     tool_tip="En gruppe administrator kan dedikere denne jord til gruppen, så det vil blive støttet af gruppen&apos;s jord tildeling." />
-			<button label="Dedikér..." label_selected="Dedikér..." name="Deed..."
-			     tool_tip="Du kan kun dedikere jord, hvis du er en administrator i den valgte gruppe." />
-			<check_box label="Ejer bidrager ved dedikering" name="check contrib"
-			     tool_tip="Når land dedikeres til gruppe, kan den tidligere bidrage med nok land til at dække krav." />
-			<text type="string" length="1" name="For Sale:">
-				Til salg:
-			</text>
-			<text type="string" length="1" name="Not for sale.">
-				Ikke til salg.
-			</text>
-			<text type="string" length="1" name="For Sale: Price L$[PRICE].">
-				Pris: L$[PRICE].
-			</text>
-			<button label="Sælg land..." label_selected="Sælg land..." name="Sell Land..." />
-			<text type="string" length="1" name="For sale to">
-				Til salg til: [BUYER]
-			</text>
-			<text type="string" length="1" name="Sell with landowners objects in parcel.">
-				Objekter er inkluderet i salg.
-			</text>
-			<text type="string" length="1" name="Selling with no objects in parcel.">
-				Objekter er ikke inkluderet i salg.
-			</text>
-			<button label="Annullér salg af land" label_selected="Annullér salg af land"
-			     name="Cancel Land Sale" />
-			<text type="string" length="1" name="Claimed:">
-				Købt:
-			</text>
-			<text type="string" length="1" name="DateClaimText">
-				Tue Aug 15 13:47:25 2006
-			</text>
-			<text type="string" length="1" name="PriceLabel">
-				Område:
-			</text>
-			<text type="string" length="1" name="PriceText">
-				4048 m²
-			</text>
-			<text type="string" length="1" name="Traffic:">
-				Trafik:
-			</text>
-			<text type="string" length="1" name="DwellText">
-				0
-			</text>
-			<button label="Køb land..." label_selected="Køb land..." name="Buy Land..." />
-			<button label="Køb til gruppe..." label_selected="Køb til gruppe..."
-			     name="Buy For Group..." />
-			<button label="Køb adgang..." label_selected="Køb adgang..." name="Buy Pass..."
-			     tool_tip="Giver adgang til midlertidig adgang til dette område." />
-			<button label="Efterlad land..." label_selected="Efterlad land..."
-			     name="Abandon Land..." />
-			<button label="Kræv tilbage..." label_selected="Kræv tilbage..."
-			     name="Reclaim Land..." />
-			<button label="Linden lalg..." label_selected="Linden lalg..." name="Linden salg..."
-			     tool_tip="Land skal være ejet og ikke allerede på auktion" />
-			<string name="new users only">
-				Kun nye brugere
-			</string>
-			<string name="anyone">
-				Alle
-			</string>
-			<string name="area_text">
-				Størrelse
-			</string>
-			<string name="area_size_text">
-				[AREA] m²
-			</string>
-			<string name="auction_id_text">
-				Auktion nr: [ID]
-			</string>
-			<string name="need_tier_to_modify">
-				Du skal godkende dit køb for at kunne æmdre på dette land.
-			</string>
-			<string name="group_owned_text">
-				(Gruppe ejet)
-			</string>
-			<string name="profile_text">
-				Profil...
-			</string>
-			<string name="info_text">
-				Info...
-			</string>
-			<string name="public_text">
-				(offentlig)
-			</string>
-			<string name="none_text">
-				(ingen)
-			</string>
-			<string name="sale_pending_text">
-				(Salg i gang)
-			</string>
-			<string name="no_selection_text">
-				Pacel ikke valgt.
-Gå til &apos;Verden&apos; &gt; &apos;Om land&apos; eller vælg en anden parcel for at se detaljer.
-			</string>
-		</panel>
-		<panel label="Regler" name="land_covenant_panel">
-			<text type="string" length="1" name="covenant_timestamp_text">
-				Sidst rettet Wed Dec 31 16:00:00 1969
-			</text>
-			<text type="string" length="1" name="region_name_lbl">
-				Region:
-			</text>
-			<text type="string" length="1" name="region_name_text">
-				leyla
-			</text>
-			<text type="string" length="1" name="estate_name_lbl">
-				Estate:
-			</text>
-			<text type="string" length="1" name="estate_name_text">
-				Hovedland
-			</text>
-			<text type="string" length="1" name="estate_owner_lbl">
-				Estate ejer:
-			</text>
-			<text type="string" length="1" name="estate_owner_text">
-				(ingen)
-			</text>
-			<text type="string" length="1" name="resellable_clause">
-				Købt jord i denne region må ikke videresælges.
-			</text>
-			<text type="string" length="1" name="changeable_clause">
-				Købt jord i denne region må gerne samles eller opdeles.
-			</text>
-			<text_editor type="string" length="1" name="covenant_editor">
-				Der er ikke angivet specielle regler for denne Estate
-			</text_editor>
-			<string name="can_resell">
-				Købt land i denne region må sælges videre
-			</string>
-			<string name="can_not_resell">
-				Købt land i denne region må ikke sælges videre
-			</string>
-			<string name="can_change">
-				Købt jord i denne region må gerne samles eller opdeles.
-			</string>
-			<string name="can_not_change">
-				Købt jord i denne region må íkke samles eller opdeles.
-			</string>
-		</panel>
-		<panel label="Objekter" name="land_objects_panel">
-			<text type="string" length="1" name="parcel_object_bonus">
-				Region objekt bonus faktor: [BONUS]
-			</text>
-			<text type="string" length="1" name="Simulator primitive usage:">
-				Prims brugt i denne Sim:
-			</text>
-			<text type="string" length="1" name="objects_available">
-				[COUNT] ud af [MAX] ([AVAILABLE] ledige)
-			</text>
-			<string name="objects_available_text">
-				[COUNT] ud af [MAX] ([AVAILABLE] ledige)
-			</string>
-			<string name="objects_deleted_text">
-				[COUNT] ud af [MAX] ([DELETED] bliver slettet)
-			</string>
-			<text type="string" length="1" name="Primitives parcel supports:">
-				Prims til rådighed:
-			</text>
-			<text type="string" length="1" name="object_contrib_text">
-				[COUNT]
-			</text>
-			<text type="string" length="1" name="Primitives on parcel:">
-				Prims brugt på parcel:
-			</text>
-			<text type="string" length="1" name="total_objects_text">
-				[COUNT]
-			</text>
-			<text type="string" length="1" name="Owned by parcel owner:">
-				Ejet af Parcel ejer:
-			</text>
-			<text type="string" length="1" name="owner_objects_text">
-				[COUNT]
-			</text>
-			<button label="Vis" label_selected="Vis" name="ShowOwner" />
-			<button label="Returnér..." label_selected="Returnér..." name="ReturnOwner..."
-			     tool_tip="Returnér objekter til deres ejere." />
-			<text type="string" length="1" name="Set to group:">
-				Sat til gruppe:
-			</text>
-			<text type="string" length="1" name="group_objects_text">
-				[COUNT]
-			</text>
-			<button label="Vis" label_selected="Vis" name="ShowGroup" />
-			<button label="Returnér..." label_selected="Returnér..." name="ReturnGroup..."
-			     tool_tip="Returnér objekter til deres ejere." />
-			<text type="string" length="1" name="Owned by others:">
-				Ejet af andre:
-			</text>
-			<text type="string" length="1" name="other_objects_text">
-				[COUNT]
-			</text>
-			<button label="Vis" label_selected="Vis" name="ShowOther" />
-			<button label="Returnér..." label_selected="Returnér..." name="ReturnOther..."
-			     tool_tip="Returnér objekter til deres ejere." />
-			<text type="string" length="1" name="Selected / sat upon:">
-				Valgt/siddet på:
-			</text>
-			<text type="string" length="1" name="selected_objects_text">
-				[COUNT]
-			</text>
-			<text type="string" length="1" name="Autoreturn">
-				Autoreturnér andres objekter efter (minutter, 0 = aldrig):
-			</text>
-			<text type="string" length="1" name="Object Owners:">
-				Objekt ejere:
-			</text>
-			<button label="Gentegn liste" label_selected="Gentegn liste" name="Refresh List" />
-			<button label="Returnér objekter..." label_selected="Returnér objekter..."
-			     name="Return objects..." />
-			<name_list name="owner list">
-				<column label="Type" name="type" />
-				<column label="Navn" name="name" />
-				<column label="Antal" name="count" />
-				<column label="Nyeste" name="mostrecent" />
-			</name_list>
-		</panel>
-		<panel label="Indstillinger" name="land_options_panel">
-			<text type="string" length="1" name="allow_label">
-				Tillad andre beboere at:
-			</text>
-			<check_box label="Redigere terræn" name="edit land check"
-			     tool_tip="Hvis dette er valg, kan enhver redigere dit land. Det er bedst ikke at vælge her, da det altid er muligt for dig som ejer at ændre terræn på dit eget land." />
-			<check_box label="Lave landemærker" name="check landmark" />
-			<check_box label="Flyve" name="check fly"
-			     tool_tip="Hvis valgt, kan beboere flyve på dit land. Hvis ikke valgt kan beboere kun flyve ind på dit land og over dit land." />
-			<text type="string" length="1" name="allow_label2">
-				Lave objekter:
-			</text>
-			<check_box label="Alle beboere" name="edit objects check" />
-			<check_box label="Gruppe" name="edit group objects check" />
-			<text type="string" length="1" name="allow_label3">
-				Anbringe objekter:
-			</text>
-			<check_box label="Alle beboere" name="all object entry check" />
-			<check_box label="Gruppe" name="group object entry check" />
-			<text type="string" length="1" name="allow_label4">
-				Køre scripts:
-			</text>
-			<check_box label="Alle beboere" name="check other scripts" />
-			<check_box label="Gruppe" name="check group scripts" />
-			<text type="string" length="1" name="land_options_label">
-				Land instillinger:
-			</text>
-			<check_box label="Sikker (ingen skade)" name="check safe"
-			     tool_tip="Hvis valgt, er det ikke muligt at forårsage skade på andre beboere. Hvis fravalgt er det muligt at få skader (f.eks. ved kamp)." />
-			<check_box label="Skub forbudt" name="PushRestrictCheck"
-			     tool_tip="Forhindrer scripts i at skubbe. Valg af denne mulighed, kan være nyttigt for at forhindre forstyrrende adfærd på dit land." />
-			<check_box label="Vis sted i søgning (L$30/uge) i kategorien:" name="ShowDirectoryCheck"
-			     tool_tip="Lad dit parcel blive vist i søge resultaterne" />
-			<combo_box name="land category">
-				<combo_item name="AnyCategory">
-					Alle kategorier
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Linden Location
-				</combo_item>
-
-
-				<combo_item name="Arts&amp;Culture">
-					Kunst &amp; kultur
-				</combo_item>
-				<combo_item name="Business">
-					Business
-				</combo_item>
-				<combo_item name="Educational">
-					Uddannelse
-				</combo_item>
-				<combo_item name="Gaming">
-					Spil
-				</combo_item>
-				<combo_item name="Hangout">
-					Afslapning
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Nybegynder venligt
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parker &amp; natur
-				</combo_item>
-				<combo_item name="Residential">
-					Beboelse
-				</combo_item>
-				<combo_item name="Shopping">
-					Indkøb
-				</combo_item>
-				<combo_item name="Other">
-					Andet
-				</combo_item>
-			</combo_box>
-			<button label="?" label_selected="?" name="?" />
-			<check_box name="MatureCheck" />
-			<text type="string" length="1" name="Snapshot:">
-				Foto:
-			</text>
-			<texture_picker label="" name="snapshot_ctrl" tool_tip="Klik for at vælge et billede" />
-			<text type="string" length="1" name="landing_point">
-				Landingspunkt: [LANDING]
-			</text>
-			<string name="landing_point_none">
-				(ingen)
-			</string>
-			<button label="Vælg" label_selected="Vælg" name="Set"
-			     tool_tip="Indstiller landingspunkt, hvor de besøgende ankommer. Sættes til din avatars aktuelle placering i denne parcel." />
-			<button label="Fjern" label_selected="Fjern" name="Clear"
-			     tool_tip="Fjerner oplysning om landingspunkt." />
-			<text type="string" length="1" name="Teleport Routing: ">
-				Teleport valg:
-			</text>
-			<combo_box name="landing type"
-			     tool_tip="Vælg hvordan du vil håndtere teleporteringer til dit land.">
-				<combo_item type="string" length="1" name="Blocked">
-					Blokeret
-				</combo_item>
-				<combo_item type="string" length="1" name="LandingPoint">
-					Landingspunkt
-				</combo_item>
-				<combo_item type="string" length="1" name="Anywhere">
-					Hvor som helst
-				</combo_item>
-			</combo_box>
-			<string name="push_restrict_text">
-				Skub forbudt
-			</string>
-			<string name="push_restrict_region_text">
-				Skub forbudt (Uanset region indstilling)
-			</string>
-		</panel>
-		<panel label="Medier" name="land_media_panel">
-			<text type="string" length="1" name="with media:">
-				Medie type:
-			</text>
-			<combo_box name="media type"
-			     tool_tip="Specificer om URL-adressen er til en film, hjemmeside eller et andet medie." />
-			<text type="string" length="1" name="at URL:">
-				Medie URL:
-			</text>
-			<button label="Vælg..." label_selected="Vælg..." name="set_media_url" />
-			<text type="string" length="1" name="Description:">
-				Beskrivelse:
-			</text>
-			<line_editor name="url_description" tool_tip="Tekst vist ved siden af Afspil/Hent knappen" />
-			<text type="string" length="1" name="Media texture:">
-				Erstat tekstur:
-			</text>
-			<texture_picker label="" name="media texture" tool_tip="Klik for at vælge billede" />
-			<text type="string" length="1" name="replace_texture_help">
-				(Objekter der har denne tekstur vil vise filmen eller 
-web-siden, efter du klikker på play knappen.)
-			</text>
-			<text type="string" length="1" name="Options:">
-				Medie valg:
-			</text>
-			<check_box label="Auto skalér" name="media_auto_scale"
-			     tool_tip="Vælg denne mulighed for at skalere indholdet for dette parcel automatisk. Det kan være lidt langsommere og have lavere kvalitet, men ingen anden tekstur skalering eller tilpasning vil være nødvendigt." />
-			<check_box label="Gentag afspil" name="media_loop"
-			     tool_tip="Gentager automatisk medie, når det er færdigt med at spille starter det automatisk forfra." />
-			<check_box label="Skjul medie URL" name="hide_media_url"
-			     tool_tip="Klik her for at skjule medie adressen så det kun er dig og evt. parcel gruppens ejer/administratorer der kan se den." />
-			<check_box label="Skjul musik URL" name="hide_music_url"
-			     tool_tip="Klik her for at skjule musik adressen så det kun er dig og evt. parcel gruppens ejer/administratorer der kan se den." />
-			<text type="string" length="1" name="media_size"
-			     tool_tip="Størrelse for rendering af Web medie, benyt 0 for standard." width="105">
-				Medie Størrelse:
-			</text>
-			<spinner name="media_size_width" left_delta="89"
-			     tool_tip="Størrelse for rendering af Web medie, benyt 0 for standard." />
-			<spinner name="media_size_height"
-			     tool_tip="Størrelse for rendering af Web medie, benyt 0 for standard." />
-			<text type="string" length="1" name="pixels">
-				pixels
-			</text>
-			<text type="string" length="1" name="MusicURL:">
-				Musik URL:
-			</text>
-			<text type="string" length="1" name="Sound:">
-				Lyd:
-			</text>
-			<check_box label="Isolér lyde til denne parcel" name="check sound local" />
-			<text type="string" length="1" name="Voice settings:">
-				Stemme:
-			</text>
-			<radio_group name="parcel_voice_channel">
-				<radio_item type="string" length="1" name="Estate">
-					Brug Estate kanalen
-				</radio_item>
-				<radio_item type="string" length="1" name="Private">
-					Brug en privat kanal
-				</radio_item>
-				<radio_item type="string" length="1" name="Disabled">
-					Slå stemme chat fra på denne parcel
-				</radio_item>
-			</radio_group>
-		</panel>
-		<panel label="Adgang" name="land_access_panel">
-			<text type="string" length="1" name="Limit access to this parcel to:">
-				Adgang til denne parcel
-			</text>
-			<check_box label="Tillad offentlig adgang" name="public_access" />
-			<text type="string" length="1" name="Only Allow">
-				Blokér adgang for:
-			</text>
-			<check_box label="Beboere der ikke har givet betalings oplysninger til Linden Lab"
-			     name="limit_payment"
-			     tool_tip="Blokér beboere der ikke har afgivet identifikationsoplysninger." />
-			<check_box label="Beboere der ikke er godkendt som voksne" name="limit_age_verified"
-			     tool_tip="Blokér beboere der ikke har verificeret deres alder. Se support.secondlife.com for mere information." />
-			<string name="estate_override">
-				En eller flere af disse valg er indstillet på estate niveau
-			</string>
-			<check_box label="Tillad adgang til gruppen: [GROUP]" name="GroupCheck"
-			     tool_tip="Vælg gruppe under fanen &apos;generelt&apos;." />
-			<check_box label="Sælg adgang til:" name="PassCheck"
-			     tool_tip="Tillader midlertidig adgang til denne parcel" />
-			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Alle
-				</combo_item>
-				<combo_item name="Group">
-					Gruppe
-				</combo_item>
-			</combo_box>
-			<spinner label="Pris i L$:" name="PriceSpin" />
-			<spinner label="Timers adgang:" name="HoursSpin" />
-			<text label="Tillad altid" name="AllowedText">
-				Altid godkendte beboere
-			</text>
-			<name_list name="AccessList" tool_tip="([LISTED] vist, [MAX] max)" />
-			<button label="Tilføj..." label_selected="Tilføj..." name="add_allowed" />
-			<button label="Fjern" label_selected="Fjern" name="remove_allowed" />
-			<text label="Blokér" name="BanCheck">
-				Blokerede beboere
-			</text>
-			<name_list name="BannedList" tool_tip="([LISTED] vist, [MAX] max)" />
-			<button label="Tilføj..." label_selected="Tilføj..." name="add_banned" />
-			<button label="Fjern" label_selected="Fjern" name="remove_banned" />
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floaterland" title="Om land">
+	<tab_container name="landtab">
+		<panel label="Generelt" name="land_general_panel">
+			<text type="string" length="1" name="Name:">
+				Navn:
+			</text>
+			<text type="string" length="1" name="Description:">
+				Beskrivelse:
+			</text>
+			<text type="string" length="1" name="Owner:">
+				Ejer:
+			</text>
+			<text type="string" length="1" name="OwnerText">
+				Leyla Linden
+			</text>
+			<button label="Profil..." label_selected="Profil..." name="Profile..." />
+			<text type="string" length="1" name="Group:">
+				Gruppe:
+			</text>
+			<button label="Vælg..." label_selected="Vælg..." name="Set..." />
+			<check_box label="Tillad dedikering til gruppe" name="check deed"
+			     tool_tip="En gruppe administrator kan dedikere denne jord til gruppen, så det vil blive støttet af gruppen&apos;s jord tildeling." />
+			<button label="Dedikér..." label_selected="Dedikér..." name="Deed..."
+			     tool_tip="Du kan kun dedikere jord, hvis du er en administrator i den valgte gruppe." />
+			<check_box label="Ejer bidrager ved dedikering" name="check contrib"
+			     tool_tip="Når land dedikeres til gruppe, kan den tidligere bidrage med nok land til at dække krav." />
+			<text type="string" length="1" name="For Sale:">
+				Til salg:
+			</text>
+			<text type="string" length="1" name="Not for sale.">
+				Ikke til salg.
+			</text>
+			<text type="string" length="1" name="For Sale: Price L$[PRICE].">
+				Pris: L$[PRICE].
+			</text>
+			<button label="Sælg land..." label_selected="Sælg land..." name="Sell Land..." />
+			<text type="string" length="1" name="For sale to">
+				Til salg til: [BUYER]
+			</text>
+			<text type="string" length="1" name="Sell with landowners objects in parcel.">
+				Objekter er inkluderet i salg.
+			</text>
+			<text type="string" length="1" name="Selling with no objects in parcel.">
+				Objekter er ikke inkluderet i salg.
+			</text>
+			<button label="Annullér salg af land" label_selected="Annullér salg af land"
+			     name="Cancel Land Sale" />
+			<text type="string" length="1" name="Claimed:">
+				Købt:
+			</text>
+			<text type="string" length="1" name="DateClaimText">
+				Tue Aug 15 13:47:25 2006
+			</text>
+			<text type="string" length="1" name="PriceLabel">
+				Område:
+			</text>
+			<text type="string" length="1" name="PriceText">
+				4048 m²
+			</text>
+			<text type="string" length="1" name="Traffic:">
+				Trafik:
+			</text>
+			<text type="string" length="1" name="DwellText">
+				0
+			</text>
+			<button label="Køb land..." label_selected="Køb land..." name="Buy Land..." />
+			<button label="Køb til gruppe..." label_selected="Køb til gruppe..."
+			     name="Buy For Group..." />
+			<button label="Køb adgang..." label_selected="Køb adgang..." name="Buy Pass..."
+			     tool_tip="Giver adgang til midlertidig adgang til dette område." />
+			<button label="Efterlad land..." label_selected="Efterlad land..."
+			     name="Abandon Land..." />
+			<button label="Kræv tilbage..." label_selected="Kræv tilbage..."
+			     name="Reclaim Land..." />
+			<button label="Linden lalg..." label_selected="Linden lalg..." name="Linden salg..."
+			     tool_tip="Land skal være ejet og ikke allerede på auktion" />
+			<string name="new users only">
+				Kun nye brugere
+			</string>
+			<string name="anyone">
+				Alle
+			</string>
+			<string name="area_text">
+				Størrelse
+			</string>
+			<string name="area_size_text">
+				[AREA] m²
+			</string>
+			<string name="auction_id_text">
+				Auktion nr: [ID]
+			</string>
+			<string name="need_tier_to_modify">
+				Du skal godkende dit køb for at kunne æmdre på dette land.
+			</string>
+			<string name="group_owned_text">
+				(Gruppe ejet)
+			</string>
+			<string name="profile_text">
+				Profil...
+			</string>
+			<string name="info_text">
+				Info...
+			</string>
+			<string name="public_text">
+				(offentlig)
+			</string>
+			<string name="none_text">
+				(ingen)
+			</string>
+			<string name="sale_pending_text">
+				(Salg i gang)
+			</string>
+			<string name="no_selection_text">
+				Pacel ikke valgt.
+Gå til &apos;Verden&apos; &gt; &apos;Om land&apos; eller vælg en anden parcel for at se detaljer.
+			</string>
+		</panel>
+		<panel label="Regler" name="land_covenant_panel">
+			<text type="string" length="1" name="covenant_timestamp_text">
+				Sidst rettet Wed Dec 31 16:00:00 1969
+			</text>
+			<text type="string" length="1" name="region_name_lbl">
+				Region:
+			</text>
+			<text type="string" length="1" name="region_name_text">
+				leyla
+			</text>
+			<text type="string" length="1" name="estate_name_lbl">
+				Estate:
+			</text>
+			<text type="string" length="1" name="estate_name_text">
+				Hovedland
+			</text>
+			<text type="string" length="1" name="estate_owner_lbl">
+				Estate ejer:
+			</text>
+			<text type="string" length="1" name="estate_owner_text">
+				(ingen)
+			</text>
+			<text type="string" length="1" name="resellable_clause">
+				Købt jord i denne region må ikke videresælges.
+			</text>
+			<text type="string" length="1" name="changeable_clause">
+				Købt jord i denne region må gerne samles eller opdeles.
+			</text>
+			<text_editor type="string" length="1" name="covenant_editor">
+				Der er ikke angivet specielle regler for denne Estate
+			</text_editor>
+			<string name="can_resell">
+				Købt land i denne region må sælges videre
+			</string>
+			<string name="can_not_resell">
+				Købt land i denne region må ikke sælges videre
+			</string>
+			<string name="can_change">
+				Købt jord i denne region må gerne samles eller opdeles.
+			</string>
+			<string name="can_not_change">
+				Købt jord i denne region må íkke samles eller opdeles.
+			</string>
+		</panel>
+		<panel label="Objekter" name="land_objects_panel">
+			<text type="string" length="1" name="parcel_object_bonus">
+				Region objekt bonus faktor: [BONUS]
+			</text>
+			<text type="string" length="1" name="Simulator primitive usage:">
+				Prims brugt i denne Sim:
+			</text>
+			<text type="string" length="1" name="objects_available">
+				[COUNT] ud af [MAX] ([AVAILABLE] ledige)
+			</text>
+			<string name="objects_available_text">
+				[COUNT] ud af [MAX] ([AVAILABLE] ledige)
+			</string>
+			<string name="objects_deleted_text">
+				[COUNT] ud af [MAX] ([DELETED] bliver slettet)
+			</string>
+			<text type="string" length="1" name="Primitives parcel supports:">
+				Prims til rådighed:
+			</text>
+			<text type="string" length="1" name="object_contrib_text">
+				[COUNT]
+			</text>
+			<text type="string" length="1" name="Primitives on parcel:">
+				Prims brugt på parcel:
+			</text>
+			<text type="string" length="1" name="total_objects_text">
+				[COUNT]
+			</text>
+			<text type="string" length="1" name="Owned by parcel owner:">
+				Ejet af Parcel ejer:
+			</text>
+			<text type="string" length="1" name="owner_objects_text">
+				[COUNT]
+			</text>
+			<button label="Vis" label_selected="Vis" name="ShowOwner" />
+			<button label="Returnér..." label_selected="Returnér..." name="ReturnOwner..."
+			     tool_tip="Returnér objekter til deres ejere." />
+			<text type="string" length="1" name="Set to group:">
+				Sat til gruppe:
+			</text>
+			<text type="string" length="1" name="group_objects_text">
+				[COUNT]
+			</text>
+			<button label="Vis" label_selected="Vis" name="ShowGroup" />
+			<button label="Returnér..." label_selected="Returnér..." name="ReturnGroup..."
+			     tool_tip="Returnér objekter til deres ejere." />
+			<text type="string" length="1" name="Owned by others:">
+				Ejet af andre:
+			</text>
+			<text type="string" length="1" name="other_objects_text">
+				[COUNT]
+			</text>
+			<button label="Vis" label_selected="Vis" name="ShowOther" />
+			<button label="Returnér..." label_selected="Returnér..." name="ReturnOther..."
+			     tool_tip="Returnér objekter til deres ejere." />
+			<text type="string" length="1" name="Selected / sat upon:">
+				Valgt/siddet på:
+			</text>
+			<text type="string" length="1" name="selected_objects_text">
+				[COUNT]
+			</text>
+			<text type="string" length="1" name="Autoreturn">
+				Autoreturnér andres objekter efter (minutter, 0 = aldrig):
+			</text>
+			<text type="string" length="1" name="Object Owners:">
+				Objekt ejere:
+			</text>
+			<button label="Gentegn liste" label_selected="Gentegn liste" name="Refresh List" />
+			<button label="Returnér objekter..." label_selected="Returnér objekter..."
+			     name="Return objects..." />
+			<name_list name="owner list">
+				<column label="Type" name="type" />
+				<column label="Navn" name="name" />
+				<column label="Antal" name="count" />
+				<column label="Nyeste" name="mostrecent" />
+			</name_list>
+		</panel>
+		<panel label="Indstillinger" name="land_options_panel">
+			<text type="string" length="1" name="allow_label">
+				Tillad andre beboere at:
+			</text>
+			<check_box label="Redigere terræn" name="edit land check"
+			     tool_tip="Hvis dette er valg, kan enhver redigere dit land. Det er bedst ikke at vælge her, da det altid er muligt for dig som ejer at ændre terræn på dit eget land." />
+			<check_box label="Lave landemærker" name="check landmark" />
+			<check_box label="Flyve" name="check fly"
+			     tool_tip="Hvis valgt, kan beboere flyve på dit land. Hvis ikke valgt kan beboere kun flyve ind på dit land og over dit land." />
+			<text type="string" length="1" name="allow_label2">
+				Lave objekter:
+			</text>
+			<check_box label="Alle beboere" name="edit objects check" />
+			<check_box label="Gruppe" name="edit group objects check" />
+			<text type="string" length="1" name="allow_label3">
+				Anbringe objekter:
+			</text>
+			<check_box label="Alle beboere" name="all object entry check" />
+			<check_box label="Gruppe" name="group object entry check" />
+			<text type="string" length="1" name="allow_label4">
+				Køre scripts:
+			</text>
+			<check_box label="Alle beboere" name="check other scripts" />
+			<check_box label="Gruppe" name="check group scripts" />
+			<text type="string" length="1" name="land_options_label">
+				Land instillinger:
+			</text>
+			<check_box label="Sikker (ingen skade)" name="check safe"
+			     tool_tip="Hvis valgt, er det ikke muligt at forårsage skade på andre beboere. Hvis fravalgt er det muligt at få skader (f.eks. ved kamp)." />
+			<check_box label="Skub forbudt" name="PushRestrictCheck"
+			     tool_tip="Forhindrer scripts i at skubbe. Valg af denne mulighed, kan være nyttigt for at forhindre forstyrrende adfærd på dit land." />
+			<check_box label="Vis sted i søgning (L$30/uge) i kategorien:" name="ShowDirectoryCheck"
+			     tool_tip="Lad dit parcel blive vist i søge resultaterne" />
+			<combo_box name="land category">
+				<combo_box.item name="AnyCategory">
+					Alle kategorier
+				</combo_box.item>
+				<combo_box.item name="LindenLocation">
+					Linden Location
+				</combo_box.item>
+				<combo_box.item name="Arts&amp;Culture">
+					Kunst &amp; kultur
+				</combo_box.item>
+				<combo_box.item name="Business">
+					Business
+				</combo_box.item>
+				<combo_box.item name="Educational">
+					Uddannelse
+				</combo_box.item>
+				<combo_box.item name="Gaming">
+					Spil
+				</combo_box.item>
+				<combo_box.item name="Hangout">
+					Afslapning
+				</combo_box.item>
+				<combo_box.item name="NewcomerFriendly">
+					Nybegynder venligt
+				</combo_box.item>
+				<combo_box.item name="Parks&amp;Nature">
+					Parker &amp; natur
+				</combo_box.item>
+				<combo_box.item name="Residential">
+					Beboelse
+				</combo_box.item>
+				<combo_box.item name="Shopping">
+					Indkøb
+				</combo_box.item>
+				<combo_box.item name="Other">
+					Andet
+				</combo_box.item>
+			</combo_box>
+			<button label="?" label_selected="?" name="?" />
+			<check_box name="MatureCheck" />
+			<text type="string" length="1" name="Snapshot:">
+				Foto:
+			</text>
+			<texture_picker label="" name="snapshot_ctrl" tool_tip="Klik for at vælge et billede" />
+			<text type="string" length="1" name="landing_point">
+				Landingspunkt: [LANDING]
+			</text>
+			<string name="landing_point_none">
+				(ingen)
+			</string>
+			<button label="Vælg" label_selected="Vælg" name="Set"
+			     tool_tip="Indstiller landingspunkt, hvor de besøgende ankommer. Sættes til din avatars aktuelle placering i denne parcel." />
+			<button label="Fjern" label_selected="Fjern" name="Clear"
+			     tool_tip="Fjerner oplysning om landingspunkt." />
+			<text type="string" length="1" name="Teleport Routing: ">
+				Teleport valg:
+			</text>
+			<combo_box name="landing type" tool_tip="Vælg hvordan du vil håndtere teleporteringer til dit land.">
+				<combo_box.item length="1" name="Blocked" type="string">
+					Blokeret
+				</combo_box.item>
+				<combo_box.item length="1" name="LandingPoint" type="string">
+					Landingspunkt
+				</combo_box.item>
+				<combo_box.item length="1" name="Anywhere" type="string">
+					Hvor som helst
+				</combo_box.item>
+			</combo_box>
+			<string name="push_restrict_text">
+				Skub forbudt
+			</string>
+			<string name="push_restrict_region_text">
+				Skub forbudt (Uanset region indstilling)
+			</string>
+		</panel>
+		<panel label="Medier" name="land_media_panel">
+			<text type="string" length="1" name="with media:">
+				Medie type:
+			</text>
+			<combo_box name="media type"
+			     tool_tip="Specificer om URL-adressen er til en film, hjemmeside eller et andet medie." />
+			<text type="string" length="1" name="at URL:">
+				Medie URL:
+			</text>
+			<button label="Vælg..." label_selected="Vælg..." name="set_media_url" />
+			<text type="string" length="1" name="Description:">
+				Beskrivelse:
+			</text>
+			<line_editor name="url_description" tool_tip="Tekst vist ved siden af Afspil/Hent knappen" />
+			<text type="string" length="1" name="Media texture:">
+				Erstat tekstur:
+			</text>
+			<texture_picker label="" name="media texture" tool_tip="Klik for at vælge billede" />
+			<text type="string" length="1" name="replace_texture_help">
+				(Objekter der har denne tekstur vil vise filmen eller 
+web-siden, efter du klikker på play knappen.)
+			</text>
+			<text type="string" length="1" name="Options:">
+				Medie valg:
+			</text>
+			<check_box label="Auto skalér" name="media_auto_scale"
+			     tool_tip="Vælg denne mulighed for at skalere indholdet for dette parcel automatisk. Det kan være lidt langsommere og have lavere kvalitet, men ingen anden tekstur skalering eller tilpasning vil være nødvendigt." />
+			<check_box label="Gentag afspil" name="media_loop"
+			     tool_tip="Gentager automatisk medie, når det er færdigt med at spille starter det automatisk forfra." />
+			<check_box label="Skjul medie URL" name="hide_media_url"
+			     tool_tip="Klik her for at skjule medie adressen så det kun er dig og evt. parcel gruppens ejer/administratorer der kan se den." />
+			<check_box label="Skjul musik URL" name="hide_music_url"
+			     tool_tip="Klik her for at skjule musik adressen så det kun er dig og evt. parcel gruppens ejer/administratorer der kan se den." />
+			<text type="string" length="1" name="media_size"
+			     tool_tip="Størrelse for rendering af Web medie, benyt 0 for standard." width="105">
+				Medie Størrelse:
+			</text>
+			<spinner name="media_size_width" left_delta="89"
+			     tool_tip="Størrelse for rendering af Web medie, benyt 0 for standard." />
+			<spinner name="media_size_height"
+			     tool_tip="Størrelse for rendering af Web medie, benyt 0 for standard." />
+			<text type="string" length="1" name="pixels">
+				pixels
+			</text>
+			<text type="string" length="1" name="MusicURL:">
+				Musik URL:
+			</text>
+			<text type="string" length="1" name="Sound:">
+				Lyd:
+			</text>
+			<check_box label="Isolér lyde til denne parcel" name="check sound local" />
+			<text type="string" length="1" name="Voice settings:">
+				Stemme:
+			</text>
+			<radio_group name="parcel_voice_channel">
+				<radio_item type="string" length="1" name="Estate">
+					Brug Estate kanalen
+				</radio_item>
+				<radio_item type="string" length="1" name="Private">
+					Brug en privat kanal
+				</radio_item>
+				<radio_item type="string" length="1" name="Disabled">
+					Slå stemme chat fra på denne parcel
+				</radio_item>
+			</radio_group>
+		</panel>
+		<panel label="Adgang" name="land_access_panel">
+			<text type="string" length="1" name="Limit access to this parcel to:">
+				Adgang til denne parcel
+			</text>
+			<check_box label="Tillad offentlig adgang" name="public_access" />
+			<text type="string" length="1" name="Only Allow">
+				Blokér adgang for:
+			</text>
+			<check_box label="Beboere der ikke har givet betalings oplysninger til Linden Lab"
+			     name="limit_payment"
+			     tool_tip="Blokér beboere der ikke har afgivet identifikationsoplysninger." />
+			<check_box label="Beboere der ikke er godkendt som voksne" name="limit_age_verified"
+			     tool_tip="Blokér beboere der ikke har verificeret deres alder. Se support.secondlife.com for mere information." />
+			<string name="estate_override">
+				En eller flere af disse valg er indstillet på estate niveau
+			</string>
+			<check_box label="Tillad adgang til gruppen: [GROUP]" name="GroupCheck"
+			     tool_tip="Vælg gruppe under fanen &apos;generelt&apos;." />
+			<check_box label="Sælg adgang til:" name="PassCheck"
+			     tool_tip="Tillader midlertidig adgang til denne parcel" />
+			<combo_box name="pass_combo">
+				<combo_box.item name="Anyone">
+					Alle
+				</combo_box.item>
+				<combo_box.item name="Group">
+					Gruppe
+				</combo_box.item>
+			</combo_box>
+			<spinner label="Pris i L$:" name="PriceSpin" />
+			<spinner label="Timers adgang:" name="HoursSpin" />
+			<text label="Tillad altid" name="AllowedText">
+				Altid godkendte beboere
+			</text>
+			<name_list name="AccessList" tool_tip="([LISTED] vist, [MAX] max)" />
+			<button label="Tilføj..." label_selected="Tilføj..." name="add_allowed" />
+			<button label="Fjern" label_selected="Fjern" name="remove_allowed" />
+			<text label="Blokér" name="BanCheck">
+				Blokerede beboere
+			</text>
+			<name_list name="BannedList" tool_tip="([LISTED] vist, [MAX] max)" />
+			<button label="Tilføj..." label_selected="Tilføj..." name="add_banned" />
+			<button label="Fjern" label_selected="Fjern" name="remove_banned" />
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_animation_preview.xml b/indra/newview/skins/default/xui/da/floater_animation_preview.xml
index eead286334..45fa6ca78f 100644
--- a/indra/newview/skins/default/xui/da/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/da/floater_animation_preview.xml
@@ -1,172 +1,172 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Animation Preview" title="">
-	<text name="name_label">
-		Navn:
-	</text>
-	<text name="description_label">
-		Beskrivelse:
-	</text>
-	<spinner label="Prioritet" name="priority"
-	     tool_tip="Vælg hvilke andre animationer der har lavere prioritet end denne." />
-	<check_box label="Gentag" name="loop_check" tool_tip="Gentager animationen konstant." />
-	<spinner label="Ind(%)" name="loop_in_point"
-	     tool_tip="Sætter punktet hvor gentagelsen genstarter fra." />
-	<spinner label="Ud (%)" name="loop_out_point"
-	     tool_tip="Sætter punktet i animationen der afslutter gentagelsen." />
-	<text name="hand_label">
-		Hånd posering
-	</text>
-	<combo_box label="" name="hand_pose_combo"
-	     tool_tip="Kontrollerer hvad hænderne går i løbet af animationen.">
-		<combo_item name="Spread">
-			Spredt
-		</combo_item>
-		<combo_item name="Relaxed">
-			Afslappet
-		</combo_item>
-		<combo_item name="PointBoth">
-			Peg begge
-		</combo_item>
-		<combo_item name="Fist">
-			Knytnæver
-		</combo_item>
-		<combo_item name="RelaxedLeft">
-			Afslappet venstre
-		</combo_item>
-		<combo_item name="PointLeft">
-			Peg venstre
-		</combo_item>
-		<combo_item name="FistLeft">
-			Knytnæve venstre
-		</combo_item>
-		<combo_item name="RelaxedRight">
-			Afslappet højre
-		</combo_item>
-		<combo_item name="PointRight">
-			Peg højre
-		</combo_item>
-		<combo_item name="FistRight">
-			Knytnæve højre
-		</combo_item>
-		<combo_item name="SaluteRight">
-			Honnør højre
-		</combo_item>
-		<combo_item name="Typing">
-			Skriver
-		</combo_item>
-		<combo_item name="PeaceRight">
-			Fredstegn højre
-		</combo_item>
-	</combo_box>
-	<text name="emote_label">
-		Ansigtsudtryk
-	</text>
-	<combo_box label="" name="emote_combo"
-	     tool_tip="Angiver hvad ansigtet gør under animationen">
-		<combo_item name="[None]">
-			[Intet]
-		</combo_item>
-		<combo_item name="Aaaaah">
-			Aaaaah
-		</combo_item>
-		<combo_item name="Afraid">
-			Bange
-		</combo_item>
-		<combo_item name="Angry">
-			Vred
-		</combo_item>
-		<combo_item name="BigSmile">
-			Stort smil
-		</combo_item>
-		<combo_item name="Bored">
-			Keder sig
-		</combo_item>
-		<combo_item name="Cry">
-			Græder
-		</combo_item>
-		<combo_item name="Disdain">
-			Forarget
-		</combo_item>
-		<combo_item name="Embarrassed">
-			Flov
-		</combo_item>
-		<combo_item name="Frown">
-			Skuler
-		</combo_item>
-		<combo_item name="Kiss">
-			Kysser
-		</combo_item>
-		<combo_item name="Laugh">
-			Griner
-		</combo_item>
-		<combo_item name="Plllppt">
-			Plllppt
-		</combo_item>
-		<combo_item name="Repulsed">
-			Frastødt
-		</combo_item>
-		<combo_item name="Sad">
-			Ked af det
-		</combo_item>
-		<combo_item name="Shrug">
-			Skuldertræk
-		</combo_item>
-		<combo_item name="Smile">
-			Smiler
-		</combo_item>
-		<combo_item name="Surprise">
-			Overrasket
-		</combo_item>
-		<combo_item name="Wink">
-			Blinker
-		</combo_item>
-		<combo_item name="Worry">
-			Bekymret
-		</combo_item>
-	</combo_box>
-	<text name="preview_label">
-		Vis mens
-	</text>
-	<combo_box label="" name="preview_base_anim"
-	     tool_tip="Se hvordan animation ser ud i forskellige typiske avatar-situationer.">
-		<combo_item name="Standing">
-			Står
-		</combo_item>
-		<combo_item name="Walking">
-			Går
-		</combo_item>
-		<combo_item name="Sitting">
-			Sidder
-		</combo_item>
-		<combo_item name="Flying">
-			Flyver
-		</combo_item>
-	</combo_box>
-	<spinner label="start (sec)" name="ease_in_time"
-	     tool_tip="Tid i sekunder animationen bruger på at komme i gang." />
-	<spinner label="Afslut (sec)" name="ease_out_time"
-	     tool_tip="Tid i sekunder animationen bruger på at afslutte." />
-	<button label="" name="play_btn" tool_tip="Start/pause din animation." />
-	<button label="" name="stop_btn" tool_tip="Stop afspilning af animation" />
-	<slider label="" name="playback_slider" />
-	<text name="bad_animation_text">
-		Kan ikke læse animations fil.
-	
-	Vi anbefaler BVH filer der er exporteret fra Poser 4.
-	</text>
-	<button label="Annullér" name="cancel_btn" />
-	<button label="Hent (L$[AMOUNT])" name="ok_btn" />
-	<string name="failed_to_initialize">
-		Fejlede at starte bevægelse
-	</string>
-	<string name="anim_too_long">
-		Animations filen er [LENGTH] sekunder lang.
-
-Maksimal animations længde er [MAX_LENGTH] sekunder.
-	</string>
-	<string name="failed_file_read">
-		Kan ikke læse animations fil.
-
-[STATUS]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Animation Preview" title="">
+	<text name="name_label">
+		Navn:
+	</text>
+	<text name="description_label">
+		Beskrivelse:
+	</text>
+	<spinner label="Prioritet" name="priority"
+	     tool_tip="Vælg hvilke andre animationer der har lavere prioritet end denne." />
+	<check_box label="Gentag" name="loop_check" tool_tip="Gentager animationen konstant." />
+	<spinner label="Ind(%)" name="loop_in_point"
+	     tool_tip="Sætter punktet hvor gentagelsen genstarter fra." />
+	<spinner label="Ud (%)" name="loop_out_point"
+	     tool_tip="Sætter punktet i animationen der afslutter gentagelsen." />
+	<text name="hand_label">
+		Hånd posering
+	</text>
+	<combo_box label="" name="hand_pose_combo"
+	     tool_tip="Kontrollerer hvad hænderne går i løbet af animationen.">
+		<combo_box.item name="Spread">
+			Spredt
+		</combo_box.item>
+		<combo_box.item name="Relaxed">
+			Afslappet
+		</combo_box.item>
+		<combo_box.item name="PointBoth">
+			Peg begge
+		</combo_box.item>
+		<combo_box.item name="Fist">
+			Knytnæver
+		</combo_box.item>
+		<combo_box.item name="RelaxedLeft">
+			Afslappet venstre
+		</combo_box.item>
+		<combo_box.item name="PointLeft">
+			Peg venstre
+		</combo_box.item>
+		<combo_box.item name="FistLeft">
+			Knytnæve venstre
+		</combo_box.item>
+		<combo_box.item name="RelaxedRight">
+			Afslappet højre
+		</combo_box.item>
+		<combo_box.item name="PointRight">
+			Peg højre
+		</combo_box.item>
+		<combo_box.item name="FistRight">
+			Knytnæve højre
+		</combo_box.item>
+		<combo_box.item name="SaluteRight">
+			Honnør højre
+		</combo_box.item>
+		<combo_box.item name="Typing">
+			Skriver
+		</combo_box.item>
+		<combo_box.item name="PeaceRight">
+			Fredstegn højre
+		</combo_box.item>
+	</combo_box>
+	<text name="emote_label">
+		Ansigtsudtryk
+	</text>
+	<combo_box label="" name="emote_combo"
+	     tool_tip="Angiver hvad ansigtet gør under animationen">
+		<combo_box.item name="[None]">
+			[Intet]
+		</combo_box.item>
+		<combo_box.item name="Aaaaah">
+			Aaaaah
+		</combo_box.item>
+		<combo_box.item name="Afraid">
+			Bange
+		</combo_box.item>
+		<combo_box.item name="Angry">
+			Vred
+		</combo_box.item>
+		<combo_box.item name="BigSmile">
+			Stort smil
+		</combo_box.item>
+		<combo_box.item name="Bored">
+			Keder sig
+		</combo_box.item>
+		<combo_box.item name="Cry">
+			Græder
+		</combo_box.item>
+		<combo_box.item name="Disdain">
+			Forarget
+		</combo_box.item>
+		<combo_box.item name="Embarrassed">
+			Flov
+		</combo_box.item>
+		<combo_box.item name="Frown">
+			Skuler
+		</combo_box.item>
+		<combo_box.item name="Kiss">
+			Kysser
+		</combo_box.item>
+		<combo_box.item name="Laugh">
+			Griner
+		</combo_box.item>
+		<combo_box.item name="Plllppt">
+			Plllppt
+		</combo_box.item>
+		<combo_box.item name="Repulsed">
+			Frastødt
+		</combo_box.item>
+		<combo_box.item name="Sad">
+			Ked af det
+		</combo_box.item>
+		<combo_box.item name="Shrug">
+			Skuldertræk
+		</combo_box.item>
+		<combo_box.item name="Smile">
+			Smiler
+		</combo_box.item>
+		<combo_box.item name="Surprise">
+			Overrasket
+		</combo_box.item>
+		<combo_box.item name="Wink">
+			Blinker
+		</combo_box.item>
+		<combo_box.item name="Worry">
+			Bekymret
+		</combo_box.item>
+	</combo_box>
+	<text name="preview_label">
+		Vis mens
+	</text>
+	<combo_box label="" name="preview_base_anim"
+	     tool_tip="Se hvordan animation ser ud i forskellige typiske avatar-situationer.">
+		<combo_box.item name="Standing">
+			Står
+		</combo_box.item>
+		<combo_box.item name="Walking">
+			Går
+		</combo_box.item>
+		<combo_box.item name="Sitting">
+			Sidder
+		</combo_box.item>
+		<combo_box.item name="Flying">
+			Flyver
+		</combo_box.item>
+	</combo_box>
+	<spinner label="start (sec)" name="ease_in_time"
+	     tool_tip="Tid i sekunder animationen bruger på at komme i gang." />
+	<spinner label="Afslut (sec)" name="ease_out_time"
+	     tool_tip="Tid i sekunder animationen bruger på at afslutte." />
+	<button label="" name="play_btn" tool_tip="Start/pause din animation." />
+	<button label="" name="stop_btn" tool_tip="Stop afspilning af animation" />
+	<slider label="" name="playback_slider" />
+	<text name="bad_animation_text">
+		Kan ikke læse animations fil.
+	
+	Vi anbefaler BVH filer der er exporteret fra Poser 4.
+	</text>
+	<button label="Annullér" name="cancel_btn" />
+	<button label="Hent (L$[AMOUNT])" name="ok_btn" />
+	<string name="failed_to_initialize">
+		Fejlede at starte bevægelse
+	</string>
+	<string name="anim_too_long">
+		Animations filen er [LENGTH] sekunder lang.
+
+Maksimal animations længde er [MAX_LENGTH] sekunder.
+	</string>
+	<string name="failed_file_read">
+		Kan ikke læse animations fil.
+
+[STATUS]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_auction.xml b/indra/newview/skins/default/xui/da/floater_auction.xml
index 8187905f54..f981242f8a 100644
--- a/indra/newview/skins/default/xui/da/floater_auction.xml
+++ b/indra/newview/skins/default/xui/da/floater_auction.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_auction" title="Start Linden land salg">
-	<check_box label="Vis også gul aftegning af område" name="fence_check" />
-	<button label="Foto" label_selected="Foto" name="snapshot_btn" />
-	<button label="OK" label_selected="OK" name="ok_btn" />
-	<string name="already for sale">
-		Du kan ikke sætte jord på auktion der allerede er sat til salg.
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_auction" title="Start Linden land salg">
+	<check_box label="Vis også gul aftegning af område" name="fence_check" />
+	<button label="Foto" label_selected="Foto" name="snapshot_btn" />
+	<button label="OK" label_selected="OK" name="ok_btn" />
+	<string name="already for sale">
+		Du kan ikke sætte jord på auktion der allerede er sat til salg.
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_avatar_picker.xml b/indra/newview/skins/default/xui/da/floater_avatar_picker.xml
index c67d544e2a..d2c8f3a003 100644
--- a/indra/newview/skins/default/xui/da/floater_avatar_picker.xml
+++ b/indra/newview/skins/default/xui/da/floater_avatar_picker.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="avatarpicker" title="Vælg beboer">
-	<text name="instruct_search_resident_name">
-		Skriv en del eller hele navnet på beboeren:
-	</text>
-	<button label="Find" label_selected="Find" name="Find" />
-	<text name="Or select their calling card:">
-		Eller vælg deres visitkort:
-	</text>
-	<button label="Luk" label_selected="Luk" name="Close" />
-	<button label="Vælg" label_selected="Vælg" name="Select" />
-	<string name="NotFound">
-		&apos;[TEXT]&apos; ikke fundet
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="avatarpicker" title="Vælg beboer">
+	<text name="instruct_search_resident_name">
+		Skriv en del eller hele navnet på beboeren:
+	</text>
+	<button label="Find" label_selected="Find" name="Find" />
+	<text name="Or select their calling card:">
+		Eller vælg deres visitkort:
+	</text>
+	<button label="Luk" label_selected="Luk" name="Close" />
+	<button label="Vælg" label_selected="Vælg" name="Select" />
+	<string name="NotFound">
+		&apos;[TEXT]&apos; ikke fundet
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_avatar_textures.xml b/indra/newview/skins/default/xui/da/floater_avatar_textures.xml
index e6a4016282..e3a736b200 100644
--- a/indra/newview/skins/default/xui/da/floater_avatar_textures.xml
+++ b/indra/newview/skins/default/xui/da/floater_avatar_textures.xml
@@ -1,30 +1,30 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="avatar_texture_debug" title="Avatar teksturer">
-	<text name="baked_label">
-		Faste teksturer
-	</text>
-	<text name="composite_label">
-		Blandede teksturer
-	</text>
-	<texture_picker label="Hoved" name="baked_head" />
-	<texture_picker label="Makeup" name="head_bodypaint" />
-	<texture_picker label="Hår" name="hair" />
-	<button label="Drop" label_selected="Dump" name="Dump" />
-	<texture_picker label="øjne" name="baked_eyes" />
-	<texture_picker label="øje" name="eye_texture" />
-	<texture_picker label="Overkrop" name="baked_upper_body" />
-	<texture_picker label="Tatovering overkrop" name="upper_bodypaint" />
-	<texture_picker label="Undertrøje" name="undershirt" />
-	<texture_picker label="Handsker" name="gloves" />
-	<texture_picker label="Trøje" name="shirt" />
-	<texture_picker label="øvre jakke" name="upper_jacket" />
-	<texture_picker label="Underkrop" name="baked_lower_body" />
-	<texture_picker label="Tatovering underkrop" name="lower_bodypaint" />
-	<texture_picker label="Underbukser" name="underpants" />
-	<texture_picker label="Strømper" name="socks" />
-	<texture_picker label="Sko" name="shoes" />
-	<texture_picker label="Bukser" name="pants" />
-	<texture_picker label="Jakke" name="jacket" />
-	<texture_picker label="Nederdel" name="baked_skirt" />
-	<texture_picker label="Nederdel" name="skirt_texture" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="avatar_texture_debug" title="Avatar teksturer">
+	<text name="baked_label">
+		Faste teksturer
+	</text>
+	<text name="composite_label">
+		Blandede teksturer
+	</text>
+	<texture_picker label="Hoved" name="baked_head" />
+	<texture_picker label="Makeup" name="head_bodypaint" />
+	<texture_picker label="Hår" name="hair" />
+	<button label="Drop" label_selected="Dump" name="Dump" />
+	<texture_picker label="øjne" name="baked_eyes" />
+	<texture_picker label="øje" name="eye_texture" />
+	<texture_picker label="Overkrop" name="baked_upper_body" />
+	<texture_picker label="Tatovering overkrop" name="upper_bodypaint" />
+	<texture_picker label="Undertrøje" name="undershirt" />
+	<texture_picker label="Handsker" name="gloves" />
+	<texture_picker label="Trøje" name="shirt" />
+	<texture_picker label="øvre jakke" name="upper_jacket" />
+	<texture_picker label="Underkrop" name="baked_lower_body" />
+	<texture_picker label="Tatovering underkrop" name="lower_bodypaint" />
+	<texture_picker label="Underbukser" name="underpants" />
+	<texture_picker label="Strømper" name="socks" />
+	<texture_picker label="Sko" name="shoes" />
+	<texture_picker label="Bukser" name="pants" />
+	<texture_picker label="Jakke" name="jacket" />
+	<texture_picker label="Nederdel" name="baked_skirt" />
+	<texture_picker label="Nederdel" name="skirt_texture" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_beacons.xml b/indra/newview/skins/default/xui/da/floater_beacons.xml
index a643a7face..27422761d9 100644
--- a/indra/newview/skins/default/xui/da/floater_beacons.xml
+++ b/indra/newview/skins/default/xui/da/floater_beacons.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="beacons" title="Pejlelys">
-	<panel name="beacons_panel">
-		<check_box label="Kun scriptede objekter med &quot;rør&quot;" name="touch_only" />
-		<check_box label="Scriptede objekter" name="scripted" />
-		<check_box label="Fysiske objekter" name="physical" />
-		<check_box label="Lyd kilder" name="sounds" />
-		<check_box label="Partikel kilder" name="particles" />
-		<check_box label="Rendér highlights" name="highlights" />
-		<check_box label="Rendér pejlelys" name="beacons" />
-		<text type="string" length="1" name="beacon_width_label">
-			Pejlelys bredde:
-		</text>
-	</panel>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="beacons" title="Pejlelys">
+	<panel name="beacons_panel">
+		<check_box label="Kun scriptede objekter med &quot;rør&quot;" name="touch_only" />
+		<check_box label="Scriptede objekter" name="scripted" />
+		<check_box label="Fysiske objekter" name="physical" />
+		<check_box label="Lyd kilder" name="sounds" />
+		<check_box label="Partikel kilder" name="particles" />
+		<check_box label="Rendér highlights" name="highlights" />
+		<check_box label="Rendér pejlelys" name="beacons" />
+		<text type="string" length="1" name="beacon_width_label">
+			Pejlelys bredde:
+		</text>
+	</panel>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_build_options.xml b/indra/newview/skins/default/xui/da/floater_build_options.xml
index 45255a9fb2..7e5b61bd84 100644
--- a/indra/newview/skins/default/xui/da/floater_build_options.xml
+++ b/indra/newview/skins/default/xui/da/floater_build_options.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="build options floater" title="Gitter indstillinger">
-	<spinner label="Gitter enhed (meter)" name="GridResolution" />
-	<spinner label="Gitter rækkevidde (meter)" name="GridDrawSize" />
-	<check_box label="Aktiver låsning til under-enheder" name="GridSubUnit" />
-	<check_box label="Vis &apos;cross sections&apos;" name="GridCrossSection" />
-	<slider label="Gitter synlighed" name="GridOpacity" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="build options floater" title="Gitter indstillinger">
+	<spinner label="Gitter enhed (meter)" name="GridResolution" />
+	<spinner label="Gitter rækkevidde (meter)" name="GridDrawSize" />
+	<check_box label="Aktiver låsning til under-enheder" name="GridSubUnit" />
+	<check_box label="Vis &apos;cross sections&apos;" name="GridCrossSection" />
+	<slider label="Gitter synlighed" name="GridOpacity" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_bumps.xml b/indra/newview/skins/default/xui/da/floater_bumps.xml
index f354e7129f..62a1cd9e5c 100644
--- a/indra/newview/skins/default/xui/da/floater_bumps.xml
+++ b/indra/newview/skins/default/xui/da/floater_bumps.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_bumps" title="Bump, skub &amp; slag">
-	<string name="none_detected">
-		Ingen registreret
-	</string>
-	<string name="bump">
-		[TIME]  [FIRST] [LAST] ramte dig
-	</string>
-	<string name="llpushobject">
-		[TIME]  [FIRST] [LAST] skubbede dig med et script
-	</string>
-	<string name="selected_object_collide">
-		[TIME]  [FIRST] [LAST] ramte dig med et objekt
-	</string>
-	<string name="scripted_object_collide">
-		[TIME]  [FIRST] [LAST] ramte dig med et scriptet objekt
-	</string>
-	<string name="physical_object_collide">
-		[TIME]  [FIRST] [LAST] ramte dig med et fysisk objekt
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_bumps" title="Bump, skub &amp; slag">
+	<string name="none_detected">
+		Ingen registreret
+	</string>
+	<string name="bump">
+		[TIME]  [FIRST] [LAST] ramte dig
+	</string>
+	<string name="llpushobject">
+		[TIME]  [FIRST] [LAST] skubbede dig med et script
+	</string>
+	<string name="selected_object_collide">
+		[TIME]  [FIRST] [LAST] ramte dig med et objekt
+	</string>
+	<string name="scripted_object_collide">
+		[TIME]  [FIRST] [LAST] ramte dig med et scriptet objekt
+	</string>
+	<string name="physical_object_collide">
+		[TIME]  [FIRST] [LAST] ramte dig med et fysisk objekt
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_buy_contents.xml b/indra/newview/skins/default/xui/da/floater_buy_contents.xml
index 9185dc0ea7..c9df548747 100644
--- a/indra/newview/skins/default/xui/da/floater_buy_contents.xml
+++ b/indra/newview/skins/default/xui/da/floater_buy_contents.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_buy_contents" title="Køb indhold">
-	<text name="contains_text">
-		[NAME] indeholder:
-	</text>
-	<text name="buy_text">
-		Køb for L$[AMOUNT] fra [NAME]?
-	</text>
-	<button label="Annullér" label_selected="Annullér" name="cancel_btn" />
-	<button label="Køb" label_selected="Køb" name="buy_btn" />
-	<check_box label="Tag tøj på nu" name="wear_check" />
-	<string name="no_copy_text">
-		(kopiér ej)
-	</string>
-	<string name="no_modify_text">
-		(ændre ej)
-	</string>
-	<string name="no_transfer_text">
-		(videregiv ej)
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_buy_contents" title="Køb indhold">
+	<text name="contains_text">
+		[NAME] indeholder:
+	</text>
+	<text name="buy_text">
+		Køb for L$[AMOUNT] fra [NAME]?
+	</text>
+	<button label="Annullér" label_selected="Annullér" name="cancel_btn" />
+	<button label="Køb" label_selected="Køb" name="buy_btn" />
+	<check_box label="Tag tøj på nu" name="wear_check" />
+	<string name="no_copy_text">
+		(kopiér ej)
+	</string>
+	<string name="no_modify_text">
+		(ændre ej)
+	</string>
+	<string name="no_transfer_text">
+		(videregiv ej)
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_buy_currency.xml b/indra/newview/skins/default/xui/da/floater_buy_currency.xml
index 856ca4ac4c..da2e7dbd66 100644
--- a/indra/newview/skins/default/xui/da/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/da/floater_buy_currency.xml
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="buy currency" title="Køb valuta">
-	<text name="info_buying">
-		Køber valuta:
-	</text>
-	<text name="info_cannot_buy">
-		Kan ikke købe nu:
-	</text>
-	<text name="info_need_more">
-		Du har ikke penge nok:
-	</text>
-	<text name="error_message">
-		Noget er gået galt.
-	</text>
-	<button label="Gå til hjemmeside" name="error_web" />
-	<text name="contacting">
-		Kontakter LindeX...
-	</text>
-	<text name="buy_action_unknown">
-		Køb L$ på LindeX valuta marked
-	</text>
-	<text name="buy_action">
-		[NAME] L$ [PRICE]
-	</text>
-	<text name="currency_action">
-		Køb L$
-	</text>
-	<line_editor name="currency_amt">
-		1234
-	</line_editor>
-	<text name="currency_est">
-		for ca. US$ [USD]
-	</text>
-	<text name="getting_data">
-		Henter data...
-	</text>
-	<text name="balance_label">
-		Du har i øjeblikket
-	</text>
-	<text name="balance_amount">
-		L$ [AMT]
-	</text>
-	<text name="buying_label">
-		Du køber
-	</text>
-	<text name="buying_amount">
-		L$ [AMT]
-	</text>
-	<text name="total_label">
-		Din balance bliver
-	</text>
-	<text name="total_amount">
-		L$ [AMT]
-	</text>
-	<text name="purchase_warning_repurchase">
-		Bekræfter at denne handel kun omfatter valuta.
-Gentag operationen venligst igen.
-	</text>
-	<text name="purchase_warning_notenough">
-		Du køber ikke nok valuta, tast et større beløb
-og prøv igen.
-	</text>
-	<button label="Annullér" name="cancel_btn" />
-	<button label="Køb" name="buy_btn" />
-	<string name="buy_currency">
-		Buy L$ [LINDENS] for approx. US$ [USD]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="buy currency" title="Køb valuta">
+	<text name="info_buying">
+		Køber valuta:
+	</text>
+	<text name="info_cannot_buy">
+		Kan ikke købe nu:
+	</text>
+	<text name="info_need_more">
+		Du har ikke penge nok:
+	</text>
+	<text name="error_message">
+		Noget er gået galt.
+	</text>
+	<button label="Gå til hjemmeside" name="error_web" />
+	<text name="contacting">
+		Kontakter LindeX...
+	</text>
+	<text name="buy_action_unknown">
+		Køb L$ på LindeX valuta marked
+	</text>
+	<text name="buy_action">
+		[NAME] L$ [PRICE]
+	</text>
+	<text name="currency_action">
+		Køb L$
+	</text>
+	<line_editor name="currency_amt">
+		1234
+	</line_editor>
+	<text name="currency_est">
+		for ca. US$ [USD]
+	</text>
+	<text name="getting_data">
+		Henter data...
+	</text>
+	<text name="balance_label">
+		Du har i øjeblikket
+	</text>
+	<text name="balance_amount">
+		L$ [AMT]
+	</text>
+	<text name="buying_label">
+		Du køber
+	</text>
+	<text name="buying_amount">
+		L$ [AMT]
+	</text>
+	<text name="total_label">
+		Din balance bliver
+	</text>
+	<text name="total_amount">
+		L$ [AMT]
+	</text>
+	<text name="purchase_warning_repurchase">
+		Bekræfter at denne handel kun omfatter valuta.
+Gentag operationen venligst igen.
+	</text>
+	<text name="purchase_warning_notenough">
+		Du køber ikke nok valuta, tast et større beløb
+og prøv igen.
+	</text>
+	<button label="Annullér" name="cancel_btn" />
+	<button label="Køb" name="buy_btn" />
+	<string name="buy_currency">
+		Buy L$ [LINDENS] for approx. US$ [USD]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_buy_land.xml b/indra/newview/skins/default/xui/da/floater_buy_land.xml
index 89bd77cd4a..6eef76023f 100644
--- a/indra/newview/skins/default/xui/da/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/da/floater_buy_land.xml
@@ -1,229 +1,229 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="buy land" title="Køb land">
-	<text name="region_name_label">
-		Region:
-	</text>
-	<text name="region_name_text">
-		(ukendt)
-	</text>
-	<text name="estate_name_label">
-		Estate:
-	</text>
-	<text name="estate_name_text">
-		(ukendt)
-	</text>
-	<text name="estate_owner_label">
-		Estate ejer:
-	</text>
-	<text name="estate_owner_text">
-		(ukendt)
-	</text>
-	<text name="resellable_changeable_label">
-		Købt land i denne region:
-	</text>
-	<text name="resellable_clause">
-		Købt land i denne region kan eller kan ikke videresælges.
-	</text>
-	<text name="changeable_clause">
-		kan eller kan ikke samles eller opdeles.
-	</text>
-	<text name="covenant_text">
-		Du skal acceptere Estate reglerne:
-	</text>
-	<text_editor name="covenant_editor">
-		Indlæser...
-	</text_editor>
-	<check_box label="Jeg acceptere betingelserne der er beskrevet." name="agree_covenant" />
-	<text name="info_parcel_label">
-		Parcel:
-	</text>
-	<text name="info_parcel" left_delta="62">
-		Scotopteryx 138,204
-	</text>
-	<text name="info_size_label" width="60">
-		Størrelse:
-	</text>
-	<text name="info_size" left_delta="62">
-		1024 m²
-	</text>
-	<text name="info_price_label">
-		Pris:
-	</text>
-	<text name="info_price" left_delta="62">
-		L$ 1500, objekter inkluderet
-	</text>
-	<text name="info_action">
-		Køb af dette land vil:
-	</text>
-	<text name="error_message">
-		Noget er ikke rigtigt.
-	</text>
-	<button label="Go to website" name="error_web" />
-	<text name="account_action">
-		Opgrader dig til premium medlemsskab.
-	</text>
-	<text name="account_reason">
-		Kun premium medlemmer kan eje land.
-	</text>
-	<combo_box name="account_level">
-		<combo_item name="US$9.95/month,billedmonthly">
-			US$9.95/md, månedlig afregning
-		</combo_item>
-		<combo_item name="US$7.50/month,billedquarterly">
-			US$7.50/md, kvartalsvis afregning
-		</combo_item>
-		<combo_item name="US$6.00/month,billedannually">
-			US$6.00/md, årlig afregning
-		</combo_item>
-	</combo_box>
-	<text name="land_use_action">
-		Forøg dine månedlige arealanvendelse gebyrer til US $ 40/måned.
-	</text>
-	<text name="land_use_reason">
-		Du har 1.309 kvadratmeter jord. 
-Dette parcel er på 512 kvadratmeter jord.
-	</text>
-	<text name="purchase_action">
-		Betal Joe Resident L$ 4000 dette areal
-	</text>
-	<text name="currency_reason">
-		Du har L$2,100.
-	</text>
-	<text name="currency_action">
-		Køb yderligere L$
-	</text>
-	<line_editor name="currency_amt">
-		1000
-	</line_editor>
-	<text name="currency_est">
-		for ca. US$ [AMOUNT2]
-	</text>
-	<text name="currency_balance">
-		Du har L$2,100.
-	</text>
-	<check_box label="Fjern [AMOUNT] kvadratmeter af bidrag fra gruppe."
-	     name="remove_contribution" />
-	<button label="K&#248;b" name="buy_btn" />
-	<button label="Annullér" name="cancel_btn" />
-	<string name="can_resell">
-		Kan videresælges.
-	</string>
-	<string name="can_not_resell">
-		Kan ikke videresælges.
-	</string>
-	<string name="can_change">
-		Kan samles eller opdeles.
-	</string>
-	<string name="can_not_change">
-		Kan ikke samles eller opdeles.
-	</string>
-	<string name="cant_buy_for_group">
-		Du har ikke tilladelse til at købe land for din aktive gruppe.
-	</string>
-	<string name="no_land_selected">
-		Intet land er valgt.
-	</string>
-	<string name="multiple_parcels_selected">
-		Flere forskellige parceller er valgt. 
-Prøv at vælge et mindre område.
-	</string>
-	<string name="no_permission">
-		Du har ikke tilladelse til at købe jord for din aktive gruppe.
-	</string>
-	<string name="parcel_not_for_sale">
-		Det udvalgte parcel er ikke til salg.
-	</string>
-	<string name="group_already_owns">
-		Gruppen ejer allerede parcellet.
-	</string>
-	<string name="you_already_own">
-		Du ejer allerede parcellet.
-	</string>
-	<string name="set_to_sell_to_other">
-		Det udvalgte parcel er sat til salg til en anden.
-	</string>
-	<string name="no_public_land">
-		Det valgte område har ingen offentlige arealer.
-	</string>
-	<string name="not_owned_by_you">
-		Jord, der ejes af en anden bruger er valgt. 
-Prøv at vælge et mindre område.
-	</string>
-	<string name="processing">
-		Forarbejder dit køb...
- 
-(Dette kan tage et minut eller to.)
-	</string>
-	<string name="fetching_error">
-		Der er sket en fejl under hentning af jord købs oplysninger.
-	</string>
-	<string name="buying_will">
-		Køb af dette areal vil:
-	</string>
-	<string name="buying_for_group">
-		Køb jord til gruppe:
-	</string>
-	<string name="cannot_buy_now">
-		Kan ikke købe nu:
-	</string>
-	<string name="not_for_sale">
-		Ikke til salg:
-	</string>
-	<string name="none_needed">
-		ikke nødvendigt
-	</string>
-	<string name="must_upgrade">
-		Din konto skal være opgraderet for at eje jord.
-	</string>
-	<string name="cant_own_land">
-		Din konto kan eje jord.
-	</string>
-	<string name="land_holdings">
-		Du har [BUYER] kvadratmeter jord.
-	</string>
-	<string name="pay_to_for_land">
-		Betal L$ [AMOUNT] til [SELLER] for dette stykke jord
-	</string>
-	<string name="buy_for_US">
-		Køb L$ [AMOUNT] for omkring US$ [AMOUNT2] ,
-	</string>
-	<string name="parcel_meters">
-		Dette parcel er [AMOUNT] kvadratmeter.
-	</string>
-	<string name="premium_land">
-		Dette stykke jord er premium, og vil tælle som [AMOUNT] kvadratmeter.
-	</string>
-	<string name="discounted_land">
-		Dette stykke jord er på tilbud, og vil tælle som [AMOUNT] kvadratmeter.
-	</string>
-	<string name="meters_supports_object">
-		[AMOUNT] m²
-indeholder [AMOUNT2] objekter
-	</string>
-	<string name="sold_with_objects">
-		solgt med objekter
-	</string>
-	<string name="insufficient_land_credits">
-		Gruppen [GROUP] skal bruge nok tildelt jord brugs 
-kredit for at dække dette parcel før købet vil blive 
-gennemført.
-	</string>
-	<string name="have_enough_lindens">
-		Du har L$ [AMOUNT], hvilket er nok til at købe denne jord.
-	</string>
-	<string name="not_enough_lindens">
-		Du har kun L$ [AMOUNT], og har brug for yderligere L$ [AMOUNT2].
-	</string>
-	<string name="balance_left">
-		Efter købet, vil du have L$ [AMOUNT] tilbage.
-	</string>
-	<string name="balance_needed">
-		Du skal købe mindst L$ [AMOUNT] for at have råd til denne jord.
-	</string>
-	<string name="no_parcel_selected">
-		(intet parcel er valgt)
-	</string>
-	<string name="buy_currency">
-		Køb L$ [LINDENS] for omkring US$ [USD]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="buy land" title="Køb land">
+	<text name="region_name_label">
+		Region:
+	</text>
+	<text name="region_name_text">
+		(ukendt)
+	</text>
+	<text name="estate_name_label">
+		Estate:
+	</text>
+	<text name="estate_name_text">
+		(ukendt)
+	</text>
+	<text name="estate_owner_label">
+		Estate ejer:
+	</text>
+	<text name="estate_owner_text">
+		(ukendt)
+	</text>
+	<text name="resellable_changeable_label">
+		Købt land i denne region:
+	</text>
+	<text name="resellable_clause">
+		Købt land i denne region kan eller kan ikke videresælges.
+	</text>
+	<text name="changeable_clause">
+		kan eller kan ikke samles eller opdeles.
+	</text>
+	<text name="covenant_text">
+		Du skal acceptere Estate reglerne:
+	</text>
+	<text_editor name="covenant_editor">
+		Indlæser...
+	</text_editor>
+	<check_box label="Jeg acceptere betingelserne der er beskrevet." name="agree_covenant" />
+	<text name="info_parcel_label">
+		Parcel:
+	</text>
+	<text name="info_parcel" left_delta="62">
+		Scotopteryx 138,204
+	</text>
+	<text name="info_size_label" width="60">
+		Størrelse:
+	</text>
+	<text name="info_size" left_delta="62">
+		1024 m²
+	</text>
+	<text name="info_price_label">
+		Pris:
+	</text>
+	<text name="info_price" left_delta="62">
+		L$ 1500, objekter inkluderet
+	</text>
+	<text name="info_action">
+		Køb af dette land vil:
+	</text>
+	<text name="error_message">
+		Noget er ikke rigtigt.
+	</text>
+	<button label="Go to website" name="error_web" />
+	<text name="account_action">
+		Opgrader dig til premium medlemsskab.
+	</text>
+	<text name="account_reason">
+		Kun premium medlemmer kan eje land.
+	</text>
+	<combo_box name="account_level">
+		<combo_box.item name="US$9.95/month,billedmonthly">
+			US$9.95/md, månedlig afregning
+		</combo_box.item>
+		<combo_box.item name="US$7.50/month,billedquarterly">
+			US$7.50/md, kvartalsvis afregning
+		</combo_box.item>
+		<combo_box.item name="US$6.00/month,billedannually">
+			US$6.00/md, årlig afregning
+		</combo_box.item>
+	</combo_box>
+	<text name="land_use_action">
+		Forøg dine månedlige arealanvendelse gebyrer til US $ 40/måned.
+	</text>
+	<text name="land_use_reason">
+		Du har 1.309 kvadratmeter jord. 
+Dette parcel er på 512 kvadratmeter jord.
+	</text>
+	<text name="purchase_action">
+		Betal Joe Resident L$ 4000 dette areal
+	</text>
+	<text name="currency_reason">
+		Du har L$2,100.
+	</text>
+	<text name="currency_action">
+		Køb yderligere L$
+	</text>
+	<line_editor name="currency_amt">
+		1000
+	</line_editor>
+	<text name="currency_est">
+		for ca. US$ [AMOUNT2]
+	</text>
+	<text name="currency_balance">
+		Du har L$2,100.
+	</text>
+	<check_box label="Fjern [AMOUNT] kvadratmeter af bidrag fra gruppe."
+	     name="remove_contribution" />
+	<button label="K&#248;b" name="buy_btn" />
+	<button label="Annullér" name="cancel_btn" />
+	<string name="can_resell">
+		Kan videresælges.
+	</string>
+	<string name="can_not_resell">
+		Kan ikke videresælges.
+	</string>
+	<string name="can_change">
+		Kan samles eller opdeles.
+	</string>
+	<string name="can_not_change">
+		Kan ikke samles eller opdeles.
+	</string>
+	<string name="cant_buy_for_group">
+		Du har ikke tilladelse til at købe land for din aktive gruppe.
+	</string>
+	<string name="no_land_selected">
+		Intet land er valgt.
+	</string>
+	<string name="multiple_parcels_selected">
+		Flere forskellige parceller er valgt. 
+Prøv at vælge et mindre område.
+	</string>
+	<string name="no_permission">
+		Du har ikke tilladelse til at købe jord for din aktive gruppe.
+	</string>
+	<string name="parcel_not_for_sale">
+		Det udvalgte parcel er ikke til salg.
+	</string>
+	<string name="group_already_owns">
+		Gruppen ejer allerede parcellet.
+	</string>
+	<string name="you_already_own">
+		Du ejer allerede parcellet.
+	</string>
+	<string name="set_to_sell_to_other">
+		Det udvalgte parcel er sat til salg til en anden.
+	</string>
+	<string name="no_public_land">
+		Det valgte område har ingen offentlige arealer.
+	</string>
+	<string name="not_owned_by_you">
+		Jord, der ejes af en anden bruger er valgt. 
+Prøv at vælge et mindre område.
+	</string>
+	<string name="processing">
+		Forarbejder dit køb...
+ 
+(Dette kan tage et minut eller to.)
+	</string>
+	<string name="fetching_error">
+		Der er sket en fejl under hentning af jord købs oplysninger.
+	</string>
+	<string name="buying_will">
+		Køb af dette areal vil:
+	</string>
+	<string name="buying_for_group">
+		Køb jord til gruppe:
+	</string>
+	<string name="cannot_buy_now">
+		Kan ikke købe nu:
+	</string>
+	<string name="not_for_sale">
+		Ikke til salg:
+	</string>
+	<string name="none_needed">
+		ikke nødvendigt
+	</string>
+	<string name="must_upgrade">
+		Din konto skal være opgraderet for at eje jord.
+	</string>
+	<string name="cant_own_land">
+		Din konto kan eje jord.
+	</string>
+	<string name="land_holdings">
+		Du har [BUYER] kvadratmeter jord.
+	</string>
+	<string name="pay_to_for_land">
+		Betal L$ [AMOUNT] til [SELLER] for dette stykke jord
+	</string>
+	<string name="buy_for_US">
+		Køb L$ [AMOUNT] for omkring US$ [AMOUNT2] ,
+	</string>
+	<string name="parcel_meters">
+		Dette parcel er [AMOUNT] kvadratmeter.
+	</string>
+	<string name="premium_land">
+		Dette stykke jord er premium, og vil tælle som [AMOUNT] kvadratmeter.
+	</string>
+	<string name="discounted_land">
+		Dette stykke jord er på tilbud, og vil tælle som [AMOUNT] kvadratmeter.
+	</string>
+	<string name="meters_supports_object">
+		[AMOUNT] m²
+indeholder [AMOUNT2] objekter
+	</string>
+	<string name="sold_with_objects">
+		solgt med objekter
+	</string>
+	<string name="insufficient_land_credits">
+		Gruppen [GROUP] skal bruge nok tildelt jord brugs 
+kredit for at dække dette parcel før købet vil blive 
+gennemført.
+	</string>
+	<string name="have_enough_lindens">
+		Du har L$ [AMOUNT], hvilket er nok til at købe denne jord.
+	</string>
+	<string name="not_enough_lindens">
+		Du har kun L$ [AMOUNT], og har brug for yderligere L$ [AMOUNT2].
+	</string>
+	<string name="balance_left">
+		Efter købet, vil du have L$ [AMOUNT] tilbage.
+	</string>
+	<string name="balance_needed">
+		Du skal købe mindst L$ [AMOUNT] for at have råd til denne jord.
+	</string>
+	<string name="no_parcel_selected">
+		(intet parcel er valgt)
+	</string>
+	<string name="buy_currency">
+		Køb L$ [LINDENS] for omkring US$ [USD]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_buy_object.xml b/indra/newview/skins/default/xui/da/floater_buy_object.xml
index 500423cd10..f0e22c8eee 100644
--- a/indra/newview/skins/default/xui/da/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/da/floater_buy_object.xml
@@ -1,26 +1,26 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="contents" title="Køb kopi af objekt">
-	<text name="contents_text">
-		og dets indhold:
-	</text>
-	<text name="buy_text">
-		Køb for L$[AMOUNT] fra [NAME]?
-	</text>
-	<button label="Annullér" label_selected="Annullér" name="cancel_btn" />
-	<button label="Køb" label_selected="Køb" name="buy_btn" />
-	<string name="title_buy_text">
-		Køb
-	</string>
-	<string name="title_buy_copy_text">
-		Køb en kopi af
-	</string>
-	<string name="no_copy_text">
-		(kopiér ej)
-	</string>
-	<string name="no_modify_text">
-		(ændre ej)
-	</string>
-	<string name="no_transfer_text">
-		(videregiv ej)
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="contents" title="Køb kopi af objekt">
+	<text name="contents_text">
+		og dets indhold:
+	</text>
+	<text name="buy_text">
+		Køb for L$[AMOUNT] fra [NAME]?
+	</text>
+	<button label="Annullér" label_selected="Annullér" name="cancel_btn" />
+	<button label="Køb" label_selected="Køb" name="buy_btn" />
+	<string name="title_buy_text">
+		Køb
+	</string>
+	<string name="title_buy_copy_text">
+		Køb en kopi af
+	</string>
+	<string name="no_copy_text">
+		(kopiér ej)
+	</string>
+	<string name="no_modify_text">
+		(ændre ej)
+	</string>
+	<string name="no_transfer_text">
+		(videregiv ej)
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_camera.xml b/indra/newview/skins/default/xui/da/floater_camera.xml
index 42be5319f5..0eb090d2e4 100644
--- a/indra/newview/skins/default/xui/da/floater_camera.xml
+++ b/indra/newview/skins/default/xui/da/floater_camera.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="move floater" title="">
-	<string name="rotate_tooltip">
-		Roter kamera omkring fokus
-	</string>
-	<string name="zoom_tooltip">
-		Zoom kamera mod fokus
-	</string>
-	<string name="move_tooltip">
-		Flyt kamera op og ned, til venstre og højre
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="move floater" title="">
+	<string name="rotate_tooltip">
+		Roter kamera omkring fokus
+	</string>
+	<string name="zoom_tooltip">
+		Zoom kamera mod fokus
+	</string>
+	<string name="move_tooltip">
+		Flyt kamera op og ned, til venstre og højre
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_choose_group.xml b/indra/newview/skins/default/xui/da/floater_choose_group.xml
index 346361f2f3..01c5bf3367 100644
--- a/indra/newview/skins/default/xui/da/floater_choose_group.xml
+++ b/indra/newview/skins/default/xui/da/floater_choose_group.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="groups" title="Grupper">
-	<text name="groupdesc">
-		Vælg en gruppe:
-	</text>
-	<button label="OK" label_selected="OK" name="OK" />
-	<button label="Annullér" label_selected="Annullér" name="Cancel" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="groups" title="Grupper">
+	<text name="groupdesc">
+		Vælg en gruppe:
+	</text>
+	<button label="OK" label_selected="OK" name="OK" />
+	<button label="Annullér" label_selected="Annullér" name="Cancel" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_color_picker.xml b/indra/newview/skins/default/xui/da/floater_color_picker.xml
index 54c958c17f..e6cc5774ed 100644
--- a/indra/newview/skins/default/xui/da/floater_color_picker.xml
+++ b/indra/newview/skins/default/xui/da/floater_color_picker.xml
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="ColorPicker" title="Farve vælger">
-	<text name="r_val_text">
-		Rød:
-	</text>
-	<text name="g_val_text">
-		Grøn:
-	</text>
-	<text name="b_val_text">
-		Blå:
-	</text>
-	<text name="h_val_text">
-		Nuance:
-	</text>
-	<text name="s_val_text">
-		Mætning:
-	</text>
-	<text name="l_val_text">
-		Lysstyrke:
-	</text>
-	<check_box label="Anvend straks" name="apply_immediate" />
-	<button label="" label_selected="" name="color_pipette" />
-	<button label="Annullér" label_selected="Annullér" name="cancel_btn" />
-	<button label="Vælg" label_selected="Vælg" name="select_btn" />
-	<text name="Current color:">
-		Nuværende Farve:
-	</text>
-	<text name="(Drag below to save.)">
-		(Træk ned og gem.)
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="ColorPicker" title="Farve vælger">
+	<text name="r_val_text">
+		Rød:
+	</text>
+	<text name="g_val_text">
+		Grøn:
+	</text>
+	<text name="b_val_text">
+		Blå:
+	</text>
+	<text name="h_val_text">
+		Nuance:
+	</text>
+	<text name="s_val_text">
+		Mætning:
+	</text>
+	<text name="l_val_text">
+		Lysstyrke:
+	</text>
+	<check_box label="Anvend straks" name="apply_immediate" />
+	<button label="" label_selected="" name="color_pipette" />
+	<button label="Annullér" label_selected="Annullér" name="cancel_btn" />
+	<button label="Vælg" label_selected="Vælg" name="select_btn" />
+	<text name="Current color:">
+		Nuværende Farve:
+	</text>
+	<text name="(Drag below to save.)">
+		(Træk ned og gem.)
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_critical.xml b/indra/newview/skins/default/xui/da/floater_critical.xml
index df8b5f978a..8c2672f39f 100644
--- a/indra/newview/skins/default/xui/da/floater_critical.xml
+++ b/indra/newview/skins/default/xui/da/floater_critical.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="modal container" title="">
-	<button label="Fortsæt" label_selected="Fortsæt" name="Continue" />
-	<button label="Annullér" label_selected="Annullér" name="Cancel" />
-	<text name="tos_heading">
-		Læs venligst den følgende besked grundigt.
-	</text>
-	<text_editor name="tos_text">
-		TOS_TEXT
-	</text_editor>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="modal container" title="">
+	<button label="Fortsæt" label_selected="Fortsæt" name="Continue" />
+	<button label="Annullér" label_selected="Annullér" name="Cancel" />
+	<text name="tos_heading">
+		Læs venligst den følgende besked grundigt.
+	</text>
+	<text_editor name="tos_text">
+		TOS_TEXT
+	</text_editor>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_customize.xml b/indra/newview/skins/default/xui/da/floater_customize.xml
index 11c5e51cc1..0f6a59eb4a 100644
--- a/indra/newview/skins/default/xui/da/floater_customize.xml
+++ b/indra/newview/skins/default/xui/da/floater_customize.xml
@@ -1,447 +1,447 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater customize" title="Appearance">
-	<tab_container name="customize tab container">
-		<panel label="Krops Dele" name="body_parts_placeholder" />
-		<panel label="Kropsbygning" name="Shape">
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-			<button label="Krop" label_selected="Krop" name="Body" />
-			<button label="Hoved" label_selected="Hoved" name="Head" />
-			<button label="Øjne" label_selected="Øjne" name="Eyes" />
-			<button label="Ører" label_selected="Ører" name="Ears" />
-			<button label="Næse" label_selected="Næse" name="Nose" />
-			<button label="Mund" label_selected="Mund" name="Mouth" />
-			<button label="Kinder" label_selected="Kinder" name="Chin" />
-			<button label="Overkrop" label_selected="Overkrop" name="Torso" />
-			<button label="Ben" label_selected="Ben" name="Legs" />
-			<radio_group name="sex radio">
-				<radio_item type="string" length="1" name="radio">
-					Kvinde
-				</radio_item>
-				<radio_item type="string" length="1" name="radio2">
-					Mand
-				</radio_item>
-			</radio_group>
-			<button label="Tilfældig" label_selected="Tilfældig" name="Randomize" />
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Vælg en ny krop ved at trække en sådan fra din beholdning
-over på din avatar. Du kan også oprette en fra bunden og bagefter &apos;tage den på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<button label="Lav ny krop" label_selected="Lav ny krop" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-		</panel>
-		<panel label="Hud" name="Skin">
-			<button label="Hudfarve" label_selected="Hudfarve" name="Skin Color" />
-			<button label="Detaljer" label_selected="Detaljer" name="Face Detail" />
-			<button label="Sminke" label_selected="Sminke" name="Makeup" />
-			<button label="Kropsdetaljer" label_selected="Kropsdetaljer" name="Body Detail" />
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag en ny hud på ved at trække en sådan fra din beholdning
-over på din avatar. Du kan også oprette en hud fra bunden og bagefter &apos;tage den på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<texture_picker label="Tatoveringer hoved" name="Head Tattoos" />
-			<texture_picker label="Tatoveringer overkrop" name="Upper Tattoos" />
-			<texture_picker label="Tatoveringer underkrop" name="Lower Tattoos" />
-			<button label="Tilfældig" label_selected="Tilfældig" name="Randomize" />
-			<button label="Lav ny hud" label_selected="Lav nyt hud" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-		</panel>
-		<panel label="Hår" name="Hair">
-			<button label="Farve" label_selected="Farve" name="Color" />
-			<button label="Stil" label_selected="Stil" name="Style" />
-			<button label="Øjenbryn" label_selected="Øjenbryn" name="Eyebrows" />
-			<button label="Skæg" label_selected="Skæg" name="Facial" />
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag et ny hår på ved at trække et fra din beholdning
-over på din avatar. Du kan også oprette et nyt hår fra bunden og bagefter &apos;tage det på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<texture_picker label="Tekstur" name="Texture" />
-			<button label="Tilfældig" label_selected="Tilfældig" name="Randomize" />
-			<button label="Lav nyt hår" label_selected="Lav nyt hår" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-		</panel>
-		<panel label="Øjne" name="Eyes">
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag et ny sæt øjne på ved at trække et sæt fra din beholdning
-over på din avatar. Du kan også oprette et nyt sæt øjne fra bunden og bagefter &apos;tage dem på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<texture_picker label="Iris" name="Iris" />
-			<button label="Tilfældig" label_selected="Tilfældig" name="Randomize" />
-			<button label="Lav nye øjne" label_selected="Lav nye øjne" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-		</panel>
-		<panel label="Tøje" name="clothes_placeholder" />
-		<panel label="Trøje" name="Shirt">
-			<texture_picker label="Stof" name="Fabric"  />
-			<color_swatch label="Farve" name="Color/Tint" />
-			<button label="Lav ny trøje" label_selected="Lav ny trøje" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag en ny Tøje på ved at trække en fra din beholdning 
-over på din avatar. 
-Du kan også oprette en ny Tøje fra bunden og bagefter &apos;tage den på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-		</panel>
-		<panel label="Bukser" name="Pants">
-			<texture_picker label="Stof" name="Fabric"  />
-			<color_swatch label="Farve" name="Color/Tint"  />
-			<button label="Lav nye bukser" label_selected="Lav nye bukser" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag nyr bukser på ved at trække dem fra din beholdning 
-over på din avatar. 
-Du kan også oprette ny bukser fra bunden og bagefter &apos;tage dem på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-		</panel>
-		<panel label="Sko" name="Shoes">
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag et ny par sko på ved at trække dem fra din beholdning
-over på din avatar. Du kan også oprette et nyt par sko fra bunden og bagefter &apos;tage dem på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<texture_picker label="Stof" name="Fabric"  />
-			<color_swatch label="Farve" name="Color/Tint"  />
-			<button label="Lav nye sko" label_selected="Lav nye sko" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-		</panel>
-		<panel label="Strømper" name="Socks">
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag et ny par Strømper på ved at trække dem fra din beholdning
-over på din avatar. Du kan også oprette et nyt par Strømper fra bunden og bagefter &apos;tage dem på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<texture_picker label="Stof" name="Fabric" />
-			<color_swatch label="Farve" name="Color/Tint"  />
-			<button label="Lav nye strømper" label_selected="Lav nye strømper" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-		</panel>
-		<panel label="Jakke" name="Jacket">
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag en ny jakke på ved at trække en fra din beholdning 
-over på din avatar. 
-Du kan også oprette en ny jakke fra bunden og bagefter &apos;tage den på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<texture_picker label="Stof øverst" name="Upper Fabric"  />
-			<texture_picker label="Stof nederst" name="Lower Fabric"  />
-			<color_swatch label="Farve" name="Color/Tint" />
-			<button label="Lav ny jakke" label_selected="Lav ny jakke" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-		</panel>
-		<panel label="Handsker" name="Gloves">
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag nye handsker på ved at trække et par fra din beholdning 
-over på din avatar. 
-Du kan også oprette nye handsker fra bunden og bagefter &apos;tage dem på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<texture_picker label="Stof" name="Fabric" />
-			<color_swatch label="Farve" name="Color/Tint"  />
-			<button label="Lav nye handsker" label_selected="Lav nye handsker" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-		</panel>
-		<panel label="Undertrøje" name="Undershirt">
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag en ny undertrøje på ved at trække en fra din beholdning 
-over på din avatar. 
-Du kan også oprette en ny undertrøje fra bunden og bagefter &apos;tage den på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<texture_picker label="Stof" name="Fabric"  />
-			<color_swatch label="Farve" name="Color/Tint"  />
-			<button label="Lav ny undertrøje" label_selected="Lav ny undertrøje" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-		</panel>
-		<panel label="Underbukser" name="Underpants">
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag nye underbukser på ved at trække dem fra din beholdning 
-over på din avatar. 
-Du kan også oprette en par nye underbukser fra bunden og bagefter &apos;tage dem på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<texture_picker label="Stof" name="Fabric" />
-			<color_swatch label="Farve" name="Color/Tint"  />
-			<button label="Lav nye underbukser" label_selected="Lav nye underbukser" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-		</panel>
-		<panel label="Nederdel" name="Skirt">
-			<text type="string" length="1" name="title">
-				[DESC]
-			</text>
-			<text type="string" length="1" name="title_no_modify">
-				[DESC]: Kan ikke redigeres
-			</text>
-			<text type="string" length="1" name="title_loading">
-				[DESC]: indlæser...
-			</text>
-			<text type="string" length="1" name="title_not_worn">
-				[DESC]: ikke båret
-			</text>
-			<text type="string" length="1" name="path">
-				Fundet i [PATH]
-			</text>
-			<text type="string" length="1" name="not worn instructions">
-				Tag en ny nederdel på ved at trække en fra din beholdning 
-over på din avatar. 
-Du kan også oprette en ny nederdel fra bunden og bagefter &apos;tage den på&apos;.
-			</text>
-			<text type="string" length="1" name="no modify instructions">
-				Du har ikke rettigheder til at redigere denne del.
-			</text>
-			<texture_picker label="Stof" name="Fabric"  />
-			<color_swatch label="Farve" name="Color/Tint"  />
-			<button label="Lav ny nederdel" label_selected="Lav ny nederdel" name="Create New" />
-			<button label="Tag af" label_selected="Tag af" name="Take Off" />
-			<button label="Gem" label_selected="Gem" name="Save" />
-			<button label="Gem som" label_selected="Gem som" name="Save As" />
-			<button label="Annullér" label_selected="Annullér" name="Revert" />
-		</panel>
-	</tab_container>
-	<button label="Luk" label_selected="Luk" name="Close" />
-	<button label="Gem alt" label_selected="Gem alt" name="Save All" />
-	<button label="Opret sæt" label_selected="Opret sæt" name="Make Outfit" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater customize" title="Appearance">
+	<tab_container name="customize tab container">
+		<panel label="Krops Dele" name="body_parts_placeholder" />
+		<panel label="Kropsbygning" name="Shape">
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+			<button label="Krop" label_selected="Krop" name="Body" />
+			<button label="Hoved" label_selected="Hoved" name="Head" />
+			<button label="Øjne" label_selected="Øjne" name="Eyes" />
+			<button label="Ører" label_selected="Ører" name="Ears" />
+			<button label="Næse" label_selected="Næse" name="Nose" />
+			<button label="Mund" label_selected="Mund" name="Mouth" />
+			<button label="Kinder" label_selected="Kinder" name="Chin" />
+			<button label="Overkrop" label_selected="Overkrop" name="Torso" />
+			<button label="Ben" label_selected="Ben" name="Legs" />
+			<radio_group name="sex radio">
+				<radio_item type="string" length="1" name="radio">
+					Kvinde
+				</radio_item>
+				<radio_item type="string" length="1" name="radio2">
+					Mand
+				</radio_item>
+			</radio_group>
+			<button label="Tilfældig" label_selected="Tilfældig" name="Randomize" />
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Vælg en ny krop ved at trække en sådan fra din beholdning
+over på din avatar. Du kan også oprette en fra bunden og bagefter &apos;tage den på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<button label="Lav ny krop" label_selected="Lav ny krop" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+		</panel>
+		<panel label="Hud" name="Skin">
+			<button label="Hudfarve" label_selected="Hudfarve" name="Skin Color" />
+			<button label="Detaljer" label_selected="Detaljer" name="Face Detail" />
+			<button label="Sminke" label_selected="Sminke" name="Makeup" />
+			<button label="Kropsdetaljer" label_selected="Kropsdetaljer" name="Body Detail" />
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag en ny hud på ved at trække en sådan fra din beholdning
+over på din avatar. Du kan også oprette en hud fra bunden og bagefter &apos;tage den på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<texture_picker label="Tatoveringer hoved" name="Head Tattoos" />
+			<texture_picker label="Tatoveringer overkrop" name="Upper Tattoos" />
+			<texture_picker label="Tatoveringer underkrop" name="Lower Tattoos" />
+			<button label="Tilfældig" label_selected="Tilfældig" name="Randomize" />
+			<button label="Lav ny hud" label_selected="Lav nyt hud" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+		</panel>
+		<panel label="Hår" name="Hair">
+			<button label="Farve" label_selected="Farve" name="Color" />
+			<button label="Stil" label_selected="Stil" name="Style" />
+			<button label="Øjenbryn" label_selected="Øjenbryn" name="Eyebrows" />
+			<button label="Skæg" label_selected="Skæg" name="Facial" />
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag et ny hår på ved at trække et fra din beholdning
+over på din avatar. Du kan også oprette et nyt hår fra bunden og bagefter &apos;tage det på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<texture_picker label="Tekstur" name="Texture" />
+			<button label="Tilfældig" label_selected="Tilfældig" name="Randomize" />
+			<button label="Lav nyt hår" label_selected="Lav nyt hår" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+		</panel>
+		<panel label="Øjne" name="Eyes">
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag et ny sæt øjne på ved at trække et sæt fra din beholdning
+over på din avatar. Du kan også oprette et nyt sæt øjne fra bunden og bagefter &apos;tage dem på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<texture_picker label="Iris" name="Iris" />
+			<button label="Tilfældig" label_selected="Tilfældig" name="Randomize" />
+			<button label="Lav nye øjne" label_selected="Lav nye øjne" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+		</panel>
+		<panel label="Tøje" name="clothes_placeholder" />
+		<panel label="Trøje" name="Shirt">
+			<texture_picker label="Stof" name="Fabric"  />
+			<color_swatch label="Farve" name="Color/Tint" />
+			<button label="Lav ny trøje" label_selected="Lav ny trøje" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag en ny Tøje på ved at trække en fra din beholdning 
+over på din avatar. 
+Du kan også oprette en ny Tøje fra bunden og bagefter &apos;tage den på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+		</panel>
+		<panel label="Bukser" name="Pants">
+			<texture_picker label="Stof" name="Fabric"  />
+			<color_swatch label="Farve" name="Color/Tint"  />
+			<button label="Lav nye bukser" label_selected="Lav nye bukser" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag nyr bukser på ved at trække dem fra din beholdning 
+over på din avatar. 
+Du kan også oprette ny bukser fra bunden og bagefter &apos;tage dem på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+		</panel>
+		<panel label="Sko" name="Shoes">
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag et ny par sko på ved at trække dem fra din beholdning
+over på din avatar. Du kan også oprette et nyt par sko fra bunden og bagefter &apos;tage dem på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<texture_picker label="Stof" name="Fabric"  />
+			<color_swatch label="Farve" name="Color/Tint"  />
+			<button label="Lav nye sko" label_selected="Lav nye sko" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+		</panel>
+		<panel label="Strømper" name="Socks">
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag et ny par Strømper på ved at trække dem fra din beholdning
+over på din avatar. Du kan også oprette et nyt par Strømper fra bunden og bagefter &apos;tage dem på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<texture_picker label="Stof" name="Fabric" />
+			<color_swatch label="Farve" name="Color/Tint"  />
+			<button label="Lav nye strømper" label_selected="Lav nye strømper" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+		</panel>
+		<panel label="Jakke" name="Jacket">
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag en ny jakke på ved at trække en fra din beholdning 
+over på din avatar. 
+Du kan også oprette en ny jakke fra bunden og bagefter &apos;tage den på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<texture_picker label="Stof øverst" name="Upper Fabric"  />
+			<texture_picker label="Stof nederst" name="Lower Fabric"  />
+			<color_swatch label="Farve" name="Color/Tint" />
+			<button label="Lav ny jakke" label_selected="Lav ny jakke" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+		</panel>
+		<panel label="Handsker" name="Gloves">
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag nye handsker på ved at trække et par fra din beholdning 
+over på din avatar. 
+Du kan også oprette nye handsker fra bunden og bagefter &apos;tage dem på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<texture_picker label="Stof" name="Fabric" />
+			<color_swatch label="Farve" name="Color/Tint"  />
+			<button label="Lav nye handsker" label_selected="Lav nye handsker" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+		</panel>
+		<panel label="Undertrøje" name="Undershirt">
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag en ny undertrøje på ved at trække en fra din beholdning 
+over på din avatar. 
+Du kan også oprette en ny undertrøje fra bunden og bagefter &apos;tage den på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<texture_picker label="Stof" name="Fabric"  />
+			<color_swatch label="Farve" name="Color/Tint"  />
+			<button label="Lav ny undertrøje" label_selected="Lav ny undertrøje" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+		</panel>
+		<panel label="Underbukser" name="Underpants">
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag nye underbukser på ved at trække dem fra din beholdning 
+over på din avatar. 
+Du kan også oprette en par nye underbukser fra bunden og bagefter &apos;tage dem på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<texture_picker label="Stof" name="Fabric" />
+			<color_swatch label="Farve" name="Color/Tint"  />
+			<button label="Lav nye underbukser" label_selected="Lav nye underbukser" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+		</panel>
+		<panel label="Nederdel" name="Skirt">
+			<text type="string" length="1" name="title">
+				[DESC]
+			</text>
+			<text type="string" length="1" name="title_no_modify">
+				[DESC]: Kan ikke redigeres
+			</text>
+			<text type="string" length="1" name="title_loading">
+				[DESC]: indlæser...
+			</text>
+			<text type="string" length="1" name="title_not_worn">
+				[DESC]: ikke båret
+			</text>
+			<text type="string" length="1" name="path">
+				Fundet i [PATH]
+			</text>
+			<text type="string" length="1" name="not worn instructions">
+				Tag en ny nederdel på ved at trække en fra din beholdning 
+over på din avatar. 
+Du kan også oprette en ny nederdel fra bunden og bagefter &apos;tage den på&apos;.
+			</text>
+			<text type="string" length="1" name="no modify instructions">
+				Du har ikke rettigheder til at redigere denne del.
+			</text>
+			<texture_picker label="Stof" name="Fabric"  />
+			<color_swatch label="Farve" name="Color/Tint"  />
+			<button label="Lav ny nederdel" label_selected="Lav ny nederdel" name="Create New" />
+			<button label="Tag af" label_selected="Tag af" name="Take Off" />
+			<button label="Gem" label_selected="Gem" name="Save" />
+			<button label="Gem som" label_selected="Gem som" name="Save As" />
+			<button label="Annullér" label_selected="Annullér" name="Revert" />
+		</panel>
+	</tab_container>
+	<button label="Luk" label_selected="Luk" name="Close" />
+	<button label="Gem alt" label_selected="Gem alt" name="Save All" />
+	<button label="Opret sæt" label_selected="Opret sæt" name="Make Outfit" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml
index 94aaa6c688..140b3d47d6 100644
--- a/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml
@@ -1,97 +1,97 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Day Cycle Floater" title="Dag cyklus opsætning">
-	<tab_container name="Day Cycle Tabs">
-		<panel label="Dag cyklus" name="Day Cycle">
-			<button label="?" name="WLDayCycleHelp" />
-			<multi_slider label="" name="WLTimeSlider" />
-			<multi_slider label="" name="WLDayCycleKeys" />
-			<text type="string" length="1" name="WL12am">
-				00:00
-			</text>
-			<text type="string" length="1" name="WL3am">
-				03:00
-			</text>
-			<text type="string" length="1" name="WL6am">
-				06:00
-			</text>
-			<text type="string" length="1" name="WL9amHash">
-				09:00
-			</text>
-			<text type="string" length="1" name="WL12pmHash">
-				12:00
-			</text>
-			<text type="string" length="1" name="WL3pm">
-				15:00
-			</text>
-			<text type="string" length="1" name="WL6pm">
-				18:00
-			</text>
-			<text type="string" length="1" name="WL9pm">
-				21:00
-			</text>
-			<text type="string" length="1" name="WL12am2">
-				00:00
-			</text>
-			<text type="string" length="1" name="WL12amHash">
-				|
-			</text>
-			<text type="string" length="1" name="WL3amHash">
-				I
-			</text>
-			<text type="string" length="1" name="WL6amHash">
-				|
-			</text>
-			<text type="string" length="1" name="WL9amHash2">
-				I
-			</text>
-			<text type="string" length="1" name="WL12pmHash2">
-				|
-			</text>
-			<text type="string" length="1" name="WL3pmHash">
-				I
-			</text>
-			<text type="string" length="1" name="WL6pmHash">
-				|
-			</text>
-			<text type="string" length="1" name="WL9pmHash">
-				I
-			</text>
-			<text type="string" length="1" name="WL12amHash2">
-				|
-			</text>
-			<button label="Tilføj key" label_selected="Tilføj key" name="WLAddKey" />
-			<button label="Slet key" label_selected="Slet key" name="WLDeleteKey" />
-			<text type="string" length="1" name="WLCurKeyFrameText">
-				Key-frame indstillinger:
-			</text>
-			<text type="string" length="1" name="WLCurKeyTimeText">
-				Key tid:
-			</text>
-			<spinner label="Timer" name="WLCurKeyHour" />
-			<spinner label="Min." name="WLCurKeyMin" />
-			<text type="string" length="1" name="WLCurKeyTimeText2">
-				Key fast indstilling:
-			</text>
-			<combo_box label="Faste" name="WLKeyPresets" />
-			<text type="string" length="1" name="DayCycleText">
-				Snap:
-			</text>
-			<combo_box label="5 min" name="WLSnapOptions" />
-			<text type="string" length="1" name="DayCycleText2">
-				Cycluslængde:
-			</text>
-			<spinner label="Timer" name="WLLengthOfDayHour" />
-			<spinner label="Min." name="WLLengthOfDayMin" />
-			<spinner label="Sek." name="WLLengthOfDaySec" />
-			<text type="string" length="1" name="DayCycleText3">
-				Vis:
-			</text>
-			<button label="Afspil" label_selected="Afspil" name="WLAnimSky" />
-			<button label="Stop!" label_selected="Stop" name="WLStopAnimSky" />
-			<button label="Benyt estate tid" label_selected="Gå til estate tid"
-			     name="WLUseLindenTime" />
-			<button label="Gem test-dag" label_selected="Gem test-dag" name="WLSaveDayCycle" />
-			<button label="Hent test-dag" label_selected="Hent test-dag" name="WLLoadDayCycle" />
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Day Cycle Floater" title="Dag cyklus opsætning">
+	<tab_container name="Day Cycle Tabs">
+		<panel label="Dag cyklus" name="Day Cycle">
+			<button label="?" name="WLDayCycleHelp" />
+			<multi_slider label="" name="WLTimeSlider" />
+			<multi_slider label="" name="WLDayCycleKeys" />
+			<text type="string" length="1" name="WL12am">
+				00:00
+			</text>
+			<text type="string" length="1" name="WL3am">
+				03:00
+			</text>
+			<text type="string" length="1" name="WL6am">
+				06:00
+			</text>
+			<text type="string" length="1" name="WL9amHash">
+				09:00
+			</text>
+			<text type="string" length="1" name="WL12pmHash">
+				12:00
+			</text>
+			<text type="string" length="1" name="WL3pm">
+				15:00
+			</text>
+			<text type="string" length="1" name="WL6pm">
+				18:00
+			</text>
+			<text type="string" length="1" name="WL9pm">
+				21:00
+			</text>
+			<text type="string" length="1" name="WL12am2">
+				00:00
+			</text>
+			<text type="string" length="1" name="WL12amHash">
+				|
+			</text>
+			<text type="string" length="1" name="WL3amHash">
+				I
+			</text>
+			<text type="string" length="1" name="WL6amHash">
+				|
+			</text>
+			<text type="string" length="1" name="WL9amHash2">
+				I
+			</text>
+			<text type="string" length="1" name="WL12pmHash2">
+				|
+			</text>
+			<text type="string" length="1" name="WL3pmHash">
+				I
+			</text>
+			<text type="string" length="1" name="WL6pmHash">
+				|
+			</text>
+			<text type="string" length="1" name="WL9pmHash">
+				I
+			</text>
+			<text type="string" length="1" name="WL12amHash2">
+				|
+			</text>
+			<button label="Tilføj key" label_selected="Tilføj key" name="WLAddKey" />
+			<button label="Slet key" label_selected="Slet key" name="WLDeleteKey" />
+			<text type="string" length="1" name="WLCurKeyFrameText">
+				Key-frame indstillinger:
+			</text>
+			<text type="string" length="1" name="WLCurKeyTimeText">
+				Key tid:
+			</text>
+			<spinner label="Timer" name="WLCurKeyHour" />
+			<spinner label="Min." name="WLCurKeyMin" />
+			<text type="string" length="1" name="WLCurKeyTimeText2">
+				Key fast indstilling:
+			</text>
+			<combo_box label="Faste" name="WLKeyPresets" />
+			<text type="string" length="1" name="DayCycleText">
+				Snap:
+			</text>
+			<combo_box label="5 min" name="WLSnapOptions" />
+			<text type="string" length="1" name="DayCycleText2">
+				Cycluslængde:
+			</text>
+			<spinner label="Timer" name="WLLengthOfDayHour" />
+			<spinner label="Min." name="WLLengthOfDayMin" />
+			<spinner label="Sek." name="WLLengthOfDaySec" />
+			<text type="string" length="1" name="DayCycleText3">
+				Vis:
+			</text>
+			<button label="Afspil" label_selected="Afspil" name="WLAnimSky" />
+			<button label="Stop!" label_selected="Stop" name="WLStopAnimSky" />
+			<button label="Benyt estate tid" label_selected="Gå til estate tid"
+			     name="WLUseLindenTime" />
+			<button label="Gem test-dag" label_selected="Gem test-dag" name="WLSaveDayCycle" />
+			<button label="Hent test-dag" label_selected="Hent test-dag" name="WLLoadDayCycle" />
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_device_settings.xml b/indra/newview/skins/default/xui/da/floater_device_settings.xml
index d683251030..28afd7c459 100644
--- a/indra/newview/skins/default/xui/da/floater_device_settings.xml
+++ b/indra/newview/skins/default/xui/da/floater_device_settings.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_device_settings" title="Stemme chat indstillinger" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_device_settings" title="Stemme chat indstillinger" />
diff --git a/indra/newview/skins/default/xui/da/floater_inventory.xml b/indra/newview/skins/default/xui/da/floater_inventory.xml
index 4015d51776..0b931bd7f4 100644
--- a/indra/newview/skins/default/xui/da/floater_inventory.xml
+++ b/indra/newview/skins/default/xui/da/floater_inventory.xml
@@ -1,47 +1,47 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Inventory" title="Beholdning">
-	<search_editor label="Skriv her for at søge" name="inventory search editor" />
-	<tab_container name="inventory filter tabs">
-		<inventory_panel label="Alle ting" name="All Items" />
-		<inventory_panel label="Nye ting" name="Recent Items" />
-	</tab_container>
-	<menu_bar name="Inventory Menu">
-		<menu label="Filer" name="File">
-			<menu_item_call label="Åben" name="Open" />
-			<menu_item_call label="Nyt vindue" name="New Window" />
-			<menu_item_call label="Vis filtre" name="Show Filters" />
-			<menu_item_call label="Nulstil filtre" name="Reset Current" />
-			<menu_item_call label="Luk alle mapper" name="Close All Folders" />
-			<menu_item_call label="Tøm papirkurv" name="Empty Trash" />
-		</menu>
-		<menu label="Opret" name="Create">
-			<menu_item_call label="Ny mappe" name="New Folder" />
-			<menu_item_call label="Nyt script" name="New Script" />
-			<menu_item_call label="Ny note" name="New Note" />
-			<menu_item_call label="Ny bevægelse" name="New Gesture" />
-			<menu name="New Clothes">
-				<menu_item_call label="Ny trøje" name="New Shirt" />
-				<menu_item_call label="Nye bukser" name="New Pants" />
-				<menu_item_call label="Nye sko" name="New Shoes" />
-				<menu_item_call label="Nye strømper" name="New Socks" />
-				<menu_item_call label="Ny jakke" name="New Jacket" />
-				<menu_item_call label="Ny nederdel" name="New Skirt" />
-				<menu_item_call label="Nye handsker" name="New Gloves" />
-				<menu_item_call label="Ny undertrøje" name="New Undershirt" />
-				<menu_item_call label="Nye underbukser" name="New Underpants" />
-			</menu>
-			<menu name="New Body Parts">
-				<menu_item_call label="Ny figur" name="New Shape" />
-				<menu_item_call label="Ny hud" name="New Skin" />
-				<menu_item_call label="Nyt hår" name="New Hair" />
-				<menu_item_call label="Nye øjne" name="New Eyes" />
-			</menu>
-		</menu>
-		<menu label="Sortér" name="Sort">
-			<menu_item_check label="Efter navn" name="By Name" />
-			<menu_item_check label="Efter dato" name="By Date" />
-			<menu_item_check label="Altid mapper efter navn" name="Folders Always By Name" />
-			<menu_item_check label="System-mapper i toppen" name="System Folders To Top" />
-		</menu>
-	</menu_bar>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Inventory" title="Beholdning">
+	<search_editor label="Skriv her for at søge" name="inventory search editor" />
+	<tab_container name="inventory filter tabs">
+		<inventory_panel label="Alle ting" name="All Items" />
+		<inventory_panel label="Nye ting" name="Recent Items" />
+	</tab_container>
+	<menu_bar name="Inventory Menu">
+		<menu label="Filer" name="File">
+			<menu_item_call label="Åben" name="Open" />
+			<menu_item_call label="Nyt vindue" name="New Window" />
+			<menu_item_call label="Vis filtre" name="Show Filters" />
+			<menu_item_call label="Nulstil filtre" name="Reset Current" />
+			<menu_item_call label="Luk alle mapper" name="Close All Folders" />
+			<menu_item_call label="Tøm papirkurv" name="Empty Trash" />
+		</menu>
+		<menu label="Opret" name="Create">
+			<menu_item_call label="Ny mappe" name="New Folder" />
+			<menu_item_call label="Nyt script" name="New Script" />
+			<menu_item_call label="Ny note" name="New Note" />
+			<menu_item_call label="Ny bevægelse" name="New Gesture" />
+			<menu name="New Clothes">
+				<menu_item_call label="Ny trøje" name="New Shirt" />
+				<menu_item_call label="Nye bukser" name="New Pants" />
+				<menu_item_call label="Nye sko" name="New Shoes" />
+				<menu_item_call label="Nye strømper" name="New Socks" />
+				<menu_item_call label="Ny jakke" name="New Jacket" />
+				<menu_item_call label="Ny nederdel" name="New Skirt" />
+				<menu_item_call label="Nye handsker" name="New Gloves" />
+				<menu_item_call label="Ny undertrøje" name="New Undershirt" />
+				<menu_item_call label="Nye underbukser" name="New Underpants" />
+			</menu>
+			<menu name="New Body Parts">
+				<menu_item_call label="Ny figur" name="New Shape" />
+				<menu_item_call label="Ny hud" name="New Skin" />
+				<menu_item_call label="Nyt hår" name="New Hair" />
+				<menu_item_call label="Nye øjne" name="New Eyes" />
+			</menu>
+		</menu>
+		<menu label="Sortér" name="Sort">
+			<menu_item_check label="Efter navn" name="By Name" />
+			<menu_item_check label="Efter dato" name="By Date" />
+			<menu_item_check label="Altid mapper efter navn" name="Folders Always By Name" />
+			<menu_item_check label="System-mapper i toppen" name="System Folders To Top" />
+		</menu>
+	</menu_bar>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml
index a17db85fea..96039c8444 100644
--- a/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml
@@ -1,85 +1,85 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="item properties" title="Egenskaber for Objekt i Beholdning">
-	<text name="LabelItemNameTitle">
-		Navn:
-	</text>
-	<text name="LabelItemDescTitle">
-		Beskrivelse:
-	</text>
-	<text name="LabelCreatorTitle">
-		Skaber:
-	</text>
-	<text name="LabelCreatorName">
-		Nicole Linden
-	</text>
-	<button label="Profil..." label_selected="" name="BtnCreator" />
-	<text name="LabelOwnerTitle">
-		Ejer:
-	</text>
-	<text name="LabelOwnerName">
-		Thrax Linden
-	</text>
-	<button label="Profil..." label_selected="" name="BtnOwner" />
-	<text name="LabelAcquiredTitle">
-		Erhvervet:
-	</text>
-	<text name="LabelAcquiredDate">
-		Wed May 24 12:50:46 2006
-	</text>
-	<text name="OwnerLabel">
-		Du kan:
-	</text>
-	<check_box label="Redigere" name="CheckOwnerModify" />
-	<check_box label="Kopiere" name="CheckOwnerCopy" />
-	<check_box label="Sælge/give væk" name="CheckOwnerTransfer" />
-	<text name="BaseMaskDebug">
-		S:
-	</text>
-	<text name="OwnerMaskDebug">
-		E:
-	</text>
-	<text name="GroupMaskDebug">
-		G:
-	</text>
-	<text name="EveryoneMaskDebug">
-		A:
-	</text>
-	<text name="NextMaskDebug">
-		N:
-	</text>
-	<check_box label="Del med gruppe" name="CheckShareWithGroup" />
-	<check_box label="Tillad alle at kopiere" name="CheckEveryoneCopy" />
-	<text name="NextOwnerLabel">
-		Næste ejer kan:
-	</text>
-	<check_box label="Redigere" name="CheckNextOwnerModify" />
-	<check_box label="Kopiere" name="CheckNextOwnerCopy" />
-	<check_box label="Sælge/Give væk" name="CheckNextOwnerTransfer" />
-	<text name="SaleLabel">
-		Markér ting:
-	</text>
-	<check_box label="Til salg" name="CheckPurchase" />
-	<radio_group name="RadioSaleType">
-		<radio_item name="radio">
-			Original
-		</radio_item>
-		<radio_item name="radio2">
-			Kopi
-		</radio_item>
-	</radio_group>
-	<text name="TextPrice">
-		Pris:  L$
-	</text>
-	<string name="unknown">
-		(ukendt)
-	</string>
-	<string name="public">
-		(offentlig)
-	</string>
-	<string name="you_can">
-		Du kan:
-	</string>
-	<string name="owner_can">
-		Ejer kan:
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="item properties" title="Egenskaber for Objekt i Beholdning">
+	<text name="LabelItemNameTitle">
+		Navn:
+	</text>
+	<text name="LabelItemDescTitle">
+		Beskrivelse:
+	</text>
+	<text name="LabelCreatorTitle">
+		Skaber:
+	</text>
+	<text name="LabelCreatorName">
+		Nicole Linden
+	</text>
+	<button label="Profil..." label_selected="" name="BtnCreator" />
+	<text name="LabelOwnerTitle">
+		Ejer:
+	</text>
+	<text name="LabelOwnerName">
+		Thrax Linden
+	</text>
+	<button label="Profil..." label_selected="" name="BtnOwner" />
+	<text name="LabelAcquiredTitle">
+		Erhvervet:
+	</text>
+	<text name="LabelAcquiredDate">
+		Wed May 24 12:50:46 2006
+	</text>
+	<text name="OwnerLabel">
+		Du kan:
+	</text>
+	<check_box label="Redigere" name="CheckOwnerModify" />
+	<check_box label="Kopiere" name="CheckOwnerCopy" />
+	<check_box label="Sælge/give væk" name="CheckOwnerTransfer" />
+	<text name="BaseMaskDebug">
+		S:
+	</text>
+	<text name="OwnerMaskDebug">
+		E:
+	</text>
+	<text name="GroupMaskDebug">
+		G:
+	</text>
+	<text name="EveryoneMaskDebug">
+		A:
+	</text>
+	<text name="NextMaskDebug">
+		N:
+	</text>
+	<check_box label="Del med gruppe" name="CheckShareWithGroup" />
+	<check_box label="Tillad alle at kopiere" name="CheckEveryoneCopy" />
+	<text name="NextOwnerLabel">
+		Næste ejer kan:
+	</text>
+	<check_box label="Redigere" name="CheckNextOwnerModify" />
+	<check_box label="Kopiere" name="CheckNextOwnerCopy" />
+	<check_box label="Sælge/Give væk" name="CheckNextOwnerTransfer" />
+	<text name="SaleLabel">
+		Markér ting:
+	</text>
+	<check_box label="Til salg" name="CheckPurchase" />
+	<radio_group name="RadioSaleType">
+		<radio_item name="radio">
+			Original
+		</radio_item>
+		<radio_item name="radio2">
+			Kopi
+		</radio_item>
+	</radio_group>
+	<text name="TextPrice">
+		Pris:  L$
+	</text>
+	<string name="unknown">
+		(ukendt)
+	</string>
+	<string name="public">
+		(offentlig)
+	</string>
+	<string name="you_can">
+		Du kan:
+	</string>
+	<string name="owner_can">
+		Ejer kan:
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_joystick.xml b/indra/newview/skins/default/xui/da/floater_joystick.xml
index 343c80f678..72439ac4e0 100644
--- a/indra/newview/skins/default/xui/da/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/da/floater_joystick.xml
@@ -1,88 +1,88 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Joystick" title="Joystick opsætning">
-	<check_box name="enable_joystick">
-		Aktiver Joystick:
-	</check_box>
-	<spinner label="X akse mapping" name="JoystickAxis1" />
-	<spinner label="Y akse mapping" name="JoystickAxis2" />
-	<spinner label="Z akse mapping" name="JoystickAxis0" />
-	<spinner label="Hældning mapping" name="JoystickAxis4" />
-	<spinner label="Drejning mapping" name="JoystickAxis5" />
-	<spinner label="Rulning mapping" name="JoystickAxis3" />
-	<spinner label="Zoom mapping" name="JoystickAxis6" />
-	<check_box label="Direkte zoom" name="ZoomDirect" />
-	<check_box label="3D Cursor" name="Cursor3D" />
-	<check_box label="Auto opret" name="AutoLeveling" />
-	<text type="string" length="1" name="Control Modes:">
-		Kontrollér:
-	</text>
-	<check_box name="JoystickAvatarEnabled">
-		Avatar
-	</check_box>
-	<check_box name="JoystickBuildEnabled">
-		Build
-	</check_box>
-	<check_box name="JoystickFlycamEnabled">
-		Flycam
-	</check_box>
-	<text name="XScale">
-		X følsomhed
-	</text>
-	<text name="YScale">
-		Y følsomhed
-	</text>
-	<text name="ZScale">
-		Z følsomhed
-	</text>
-	<text name="PitchScale">
-		Hæld følsomhed
-	</text>
-	<text name="YawScale">
-		Drej følsomhed
-	</text>
-	<text name="RollScale">
-		Rul følsomhed
-	</text>
-	<text name="XDeadZone">
-		X min. udslag
-	</text>
-	<text name="YDeadZone">
-		Y min. udslag
-	</text>
-	<text name="ZDeadZone">
-		Z min. udslag
-	</text>
-	<text name="PitchDeadZone">
-		Hæld min. udslag
-	</text>
-	<text name="YawDeadZone">
-		Drej min. udslag
-	</text>
-	<text name="RollDeadZone">
-		Rul min. udslag
-	</text>
-	<text name="Feathering">
-		Respons
-	</text>
-	<slider label="" name="AvatarFeathering" />
-	<slider label="" name="BuildFeathering" />
-	<slider label="" name="FlycamFeathering" />
-	<text name="ZoomScale2">
-		Zoom følsomhed
-	</text>
-	<spinner label="" name="FlycamAxisScale6" />
-	<text name="ZoomDeadZone">
-		Zoom min. udslag
-	</text>
-	<spinner label="" name="FlycamAxisDeadZone6" />
-	<button label="SpaceNavigator Defaults" name="SpaceNavigatorDefaults" />
-	<string name="JoystickMonitor">
-		Joystick Overvågning
-	</string>
-	<string name="Axis">
-		Akse [NUM]
-	</string>
-	<string name="NoDevice">
-		intet joystick fundet
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Joystick" title="Joystick opsætning">
+	<check_box name="enable_joystick">
+		Aktiver Joystick:
+	</check_box>
+	<spinner label="X akse mapping" name="JoystickAxis1" />
+	<spinner label="Y akse mapping" name="JoystickAxis2" />
+	<spinner label="Z akse mapping" name="JoystickAxis0" />
+	<spinner label="Hældning mapping" name="JoystickAxis4" />
+	<spinner label="Drejning mapping" name="JoystickAxis5" />
+	<spinner label="Rulning mapping" name="JoystickAxis3" />
+	<spinner label="Zoom mapping" name="JoystickAxis6" />
+	<check_box label="Direkte zoom" name="ZoomDirect" />
+	<check_box label="3D Cursor" name="Cursor3D" />
+	<check_box label="Auto opret" name="AutoLeveling" />
+	<text type="string" length="1" name="Control Modes:">
+		Kontrollér:
+	</text>
+	<check_box name="JoystickAvatarEnabled">
+		Avatar
+	</check_box>
+	<check_box name="JoystickBuildEnabled">
+		Build
+	</check_box>
+	<check_box name="JoystickFlycamEnabled">
+		Flycam
+	</check_box>
+	<text name="XScale">
+		X følsomhed
+	</text>
+	<text name="YScale">
+		Y følsomhed
+	</text>
+	<text name="ZScale">
+		Z følsomhed
+	</text>
+	<text name="PitchScale">
+		Hæld følsomhed
+	</text>
+	<text name="YawScale">
+		Drej følsomhed
+	</text>
+	<text name="RollScale">
+		Rul følsomhed
+	</text>
+	<text name="XDeadZone">
+		X min. udslag
+	</text>
+	<text name="YDeadZone">
+		Y min. udslag
+	</text>
+	<text name="ZDeadZone">
+		Z min. udslag
+	</text>
+	<text name="PitchDeadZone">
+		Hæld min. udslag
+	</text>
+	<text name="YawDeadZone">
+		Drej min. udslag
+	</text>
+	<text name="RollDeadZone">
+		Rul min. udslag
+	</text>
+	<text name="Feathering">
+		Respons
+	</text>
+	<slider label="" name="AvatarFeathering" />
+	<slider label="" name="BuildFeathering" />
+	<slider label="" name="FlycamFeathering" />
+	<text name="ZoomScale2">
+		Zoom følsomhed
+	</text>
+	<spinner label="" name="FlycamAxisScale6" />
+	<text name="ZoomDeadZone">
+		Zoom min. udslag
+	</text>
+	<spinner label="" name="FlycamAxisDeadZone6" />
+	<button label="SpaceNavigator Defaults" name="SpaceNavigatorDefaults" />
+	<string name="JoystickMonitor">
+		Joystick Overvågning
+	</string>
+	<string name="Axis">
+		Akse [NUM]
+	</string>
+	<string name="NoDevice">
+		intet joystick fundet
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_lagmeter.xml b/indra/newview/skins/default/xui/da/floater_lagmeter.xml
index decf0f69e5..b2cbebfe52 100644
--- a/indra/newview/skins/default/xui/da/floater_lagmeter.xml
+++ b/indra/newview/skins/default/xui/da/floater_lagmeter.xml
@@ -1,156 +1,156 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_lagmeter" title="Lag måler">
-	<button label="" label_selected="" name="client_lagmeter" />
-	<text name="client">
-		Klient:
-	</text>
-	<text name="client_text">
-		Normal
-	</text>
-	<button label="" label_selected="" name="network_lagmeter"
-	     tool_tip="Network lag status" />
-	<text name="network">
-		Netværk:
-	</text>
-	<text name="network_text">
-		Normal
-	</text>
-	<button label="" label_selected="" name="server_lagmeter" />
-	<text name="server">
-		Server:
-	</text>
-	<text name="server_text">
-		Normal
-	</text>
-	<button label="?" name="server_help" />
-	<button label="&gt;&gt;" name="minimize" />
-	<string name="max_title_msg">
-		Lag måler
-	</string>
-	<string name="max_width_px">
-		360
-	</string>
-	<string name="min_title_msg">
-		Lag
-	</string>
-	<string name="min_width_px">
-		90
-	</string>
-	<string name="client_text_msg">
-		Klient
-	</string>
-	<string name="client_frame_rate_critical_fps">
-		10
-	</string>
-	<string name="client_frame_rate_warning_fps">
-		15
-	</string>
-	<string name="client_frame_time_window_bg_msg">
-		Normal, vindue i baggrund
-	</string>
-	<string name="client_frame_time_critical_msg">
-		Klients billeder/sek under [CLIENT_FRAME_RATE_CRITICAL]
-	</string>
-	<string name="client_frame_time_warning_msg">
-		Klients billeder/sek mellem [CLIENT_FRAME_RATE_CRITICAL] og [CLIENT_FRAME_RATE_WARNING]
-	</string>
-	<string name="client_frame_time_normal_msg">
-		Normal
-	</string>
-	<string name="client_draw_distance_cause_msg">
-		Mulig årsag: &apos;Vis afstand&apos; sat for højt i grafik indstillinger
-	</string>
-	<string name="client_texture_loading_cause_msg">
-		Mulig årsag: Billeder hentes
-	</string>
-	<string name="client_texture_memory_cause_msg">
-		Mulig årsag: For mange billeder i hukommelse
-	</string>
-	<string name="client_complex_objects_cause_msg">
-		Mulig årsag: For mange komplekse objekter i scenariet
-	</string>
-	<string name="network_text_msg">
-		Netværk
-	</string>
-	<string name="network_packet_loss_critical_pct">
-		10
-	</string>
-	<string name="network_packet_loss_warning_pct">
-		5
-	</string>
-	<string name="network_packet_loss_critical_msg">
-		Forbindelsen mister over [NETWORK_PACKET_LOSS_CRITICAL]% pakker
-	</string>
-	<string name="network_packet_loss_warning_msg">
-		Forbindelsen mister [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% pakker
-	</string>
-	<string name="network_performance_normal_msg">
-		Normal
-	</string>
-	<string name="network_ping_critical_ms">
-		600
-	</string>
-	<string name="network_ping_warning_ms">
-		300
-	</string>
-	<string name="network_ping_critical_msg">
-		Forbindelsens ping tider er over [NETWORK_PING_CRITICAL] ms
-	</string>
-	<string name="network_ping_warning_msg">
-		Forbindelsens ping tider er [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
-	</string>
-	<string name="network_packet_loss_cause_msg">
-		Muligvis dårlig forbindelse eller &apos;båndbredde&apos; sat for højt i netværksopsætning.
-	</string>
-	<string name="network_ping_cause_msg">
-		Muligvis dårlig forbindelse eller fil delings program.
-	</string>
-	<string name="server_text_msg">
-		Server
-	</string>
-	<string name="server_frame_rate_critical_fps">
-		20
-	</string>
-	<string name="server_frame_rate_warning_fps">
-		30
-	</string>
-	<string name="server_single_process_max_time_ms">
-		20
-	</string>
-	<string name="server_frame_time_critical_msg">
-		Simulator framerate er under [SERVER_FRAME_RATE_CRITICAL]
-	</string>
-	<string name="server_frame_time_warning_msg">
-		Simulator framerate er mellem [SERVER_FRAME_RATE_CRITICAL] og [SERVER_FRAME_RATE_WARNING]
-	</string>
-	<string name="server_frame_time_normal_msg">
-		Normal
-	</string>
-	<string name="server_frame_time_normal_msg">
-		Normal
-	</string>
-	<string name="server_physics_cause_msg">
-		Mulig årsag: For mange fysiske objekter
-	</string>
-	<string name="server_scripts_cause_msg">
-		Mulig årsag: For mange objekter med script
-	</string>
-	<string name="server_net_cause_msg">
-		Mulig årsag: For meget netværks trafik
-	</string>
-	<string name="server_agent_cause_msg">
-		Mulig årsag: For mange avatarer i bevægelse i regionen
-	</string>
-	<string name="server_images_cause_msg">
-		Mulig årsag: For mange billed udregninger
-	</string>
-	<string name="server_generic_cause_msg">
-		Mulig årsag: Simulator belastning for stor
-	</string>
-	<string name="smaller_label">
-		&gt;&gt;
-	</string>
-	<string name="bigger_label">
-		&lt;&lt;
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_lagmeter" title="Lag måler">
+	<button label="" label_selected="" name="client_lagmeter" />
+	<text name="client">
+		Klient:
+	</text>
+	<text name="client_text">
+		Normal
+	</text>
+	<button label="" label_selected="" name="network_lagmeter"
+	     tool_tip="Network lag status" />
+	<text name="network">
+		Netværk:
+	</text>
+	<text name="network_text">
+		Normal
+	</text>
+	<button label="" label_selected="" name="server_lagmeter" />
+	<text name="server">
+		Server:
+	</text>
+	<text name="server_text">
+		Normal
+	</text>
+	<button label="?" name="server_help" />
+	<button label="&gt;&gt;" name="minimize" />
+	<string name="max_title_msg">
+		Lag måler
+	</string>
+	<string name="max_width_px">
+		360
+	</string>
+	<string name="min_title_msg">
+		Lag
+	</string>
+	<string name="min_width_px">
+		90
+	</string>
+	<string name="client_text_msg">
+		Klient
+	</string>
+	<string name="client_frame_rate_critical_fps">
+		10
+	</string>
+	<string name="client_frame_rate_warning_fps">
+		15
+	</string>
+	<string name="client_frame_time_window_bg_msg">
+		Normal, vindue i baggrund
+	</string>
+	<string name="client_frame_time_critical_msg">
+		Klients billeder/sek under [CLIENT_FRAME_RATE_CRITICAL]
+	</string>
+	<string name="client_frame_time_warning_msg">
+		Klients billeder/sek mellem [CLIENT_FRAME_RATE_CRITICAL] og [CLIENT_FRAME_RATE_WARNING]
+	</string>
+	<string name="client_frame_time_normal_msg">
+		Normal
+	</string>
+	<string name="client_draw_distance_cause_msg">
+		Mulig årsag: &apos;Vis afstand&apos; sat for højt i grafik indstillinger
+	</string>
+	<string name="client_texture_loading_cause_msg">
+		Mulig årsag: Billeder hentes
+	</string>
+	<string name="client_texture_memory_cause_msg">
+		Mulig årsag: For mange billeder i hukommelse
+	</string>
+	<string name="client_complex_objects_cause_msg">
+		Mulig årsag: For mange komplekse objekter i scenariet
+	</string>
+	<string name="network_text_msg">
+		Netværk
+	</string>
+	<string name="network_packet_loss_critical_pct">
+		10
+	</string>
+	<string name="network_packet_loss_warning_pct">
+		5
+	</string>
+	<string name="network_packet_loss_critical_msg">
+		Forbindelsen mister over [NETWORK_PACKET_LOSS_CRITICAL]% pakker
+	</string>
+	<string name="network_packet_loss_warning_msg">
+		Forbindelsen mister [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% pakker
+	</string>
+	<string name="network_performance_normal_msg">
+		Normal
+	</string>
+	<string name="network_ping_critical_ms">
+		600
+	</string>
+	<string name="network_ping_warning_ms">
+		300
+	</string>
+	<string name="network_ping_critical_msg">
+		Forbindelsens ping tider er over [NETWORK_PING_CRITICAL] ms
+	</string>
+	<string name="network_ping_warning_msg">
+		Forbindelsens ping tider er [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
+	</string>
+	<string name="network_packet_loss_cause_msg">
+		Muligvis dårlig forbindelse eller &apos;båndbredde&apos; sat for højt i netværksopsætning.
+	</string>
+	<string name="network_ping_cause_msg">
+		Muligvis dårlig forbindelse eller fil delings program.
+	</string>
+	<string name="server_text_msg">
+		Server
+	</string>
+	<string name="server_frame_rate_critical_fps">
+		20
+	</string>
+	<string name="server_frame_rate_warning_fps">
+		30
+	</string>
+	<string name="server_single_process_max_time_ms">
+		20
+	</string>
+	<string name="server_frame_time_critical_msg">
+		Simulator framerate er under [SERVER_FRAME_RATE_CRITICAL]
+	</string>
+	<string name="server_frame_time_warning_msg">
+		Simulator framerate er mellem [SERVER_FRAME_RATE_CRITICAL] og [SERVER_FRAME_RATE_WARNING]
+	</string>
+	<string name="server_frame_time_normal_msg">
+		Normal
+	</string>
+	<string name="server_frame_time_normal_msg">
+		Normal
+	</string>
+	<string name="server_physics_cause_msg">
+		Mulig årsag: For mange fysiske objekter
+	</string>
+	<string name="server_scripts_cause_msg">
+		Mulig årsag: For mange objekter med script
+	</string>
+	<string name="server_net_cause_msg">
+		Mulig årsag: For meget netværks trafik
+	</string>
+	<string name="server_agent_cause_msg">
+		Mulig årsag: For mange avatarer i bevægelse i regionen
+	</string>
+	<string name="server_images_cause_msg">
+		Mulig årsag: For mange billed udregninger
+	</string>
+	<string name="server_generic_cause_msg">
+		Mulig årsag: Simulator belastning for stor
+	</string>
+	<string name="smaller_label">
+		&gt;&gt;
+	</string>
+	<string name="bigger_label">
+		&lt;&lt;
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_land_holdings.xml b/indra/newview/skins/default/xui/da/floater_land_holdings.xml
index 14043cadab..fcb159664c 100644
--- a/indra/newview/skins/default/xui/da/floater_land_holdings.xml
+++ b/indra/newview/skins/default/xui/da/floater_land_holdings.xml
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="land holdings floater" title="Mit land">
-	<scroll_list name="parcel list">
-		<column label="Navn" name="name" />
-		<column label="Lokation" name="location" />
-		<column label="Område" name="area" />
-		<column label="" name="hidden" />
-	</scroll_list>
-	<button label="Teleport" label_selected="Teleport" name="Teleport"  />
-	<button label="Vis på kort" label_selected="Vis på kort" name="Show on Map"  />
-	<text name="contrib_label">
-		Bidrag til dine grupper:
-	</text>
-	<scroll_list name="grant list">
-		<column label="Gruppe" name="group" />
-		<column label="Område" name="area" />
-	</scroll_list>
-	<text name="allowed_label">
-		Tilladt land ifølge nuværende betalingsaftale:
-	</text>
-	<text name="allowed_text">
-		[AREA] m²
-	</text>
-	<text name="current_label">
-		Nuværende besiddelser:
-	</text>
-	<text name="current_text">
-		[AREA] m²
-	</text>
-	<text name="available_label">
-		Antal m² der kan købes:
-	</text>
-	<text name="available_text">
-		[AREA] m²
-	</text>
-	<string name="area_string">
-		[AREA] m²
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="land holdings floater" title="Mit land">
+	<scroll_list name="parcel list">
+		<column label="Navn" name="name" />
+		<column label="Lokation" name="location" />
+		<column label="Område" name="area" />
+		<column label="" name="hidden" />
+	</scroll_list>
+	<button label="Teleport" label_selected="Teleport" name="Teleport"  />
+	<button label="Vis på kort" label_selected="Vis på kort" name="Show on Map"  />
+	<text name="contrib_label">
+		Bidrag til dine grupper:
+	</text>
+	<scroll_list name="grant list">
+		<column label="Gruppe" name="group" />
+		<column label="Område" name="area" />
+	</scroll_list>
+	<text name="allowed_label">
+		Tilladt land ifølge nuværende betalingsaftale:
+	</text>
+	<text name="allowed_text">
+		[AREA] m²
+	</text>
+	<text name="current_label">
+		Nuværende besiddelser:
+	</text>
+	<text name="current_text">
+		[AREA] m²
+	</text>
+	<text name="available_label">
+		Antal m² der kan købes:
+	</text>
+	<text name="available_text">
+		[AREA] m²
+	</text>
+	<string name="area_string">
+		[AREA] m²
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/da/floater_live_lsleditor.xml
index 388e7d7ad3..112dc70e45 100644
--- a/indra/newview/skins/default/xui/da/floater_live_lsleditor.xml
+++ b/indra/newview/skins/default/xui/da/floater_live_lsleditor.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="script ed float" title="Script: Nyt script">
-	<button label="Nulstil" label_selected="Reset" name="Reset" />
-	<check_box label="Kører" name="running" />
-	<check_box label="Mono" name="mono" />
-	<string name="not_allowed">
-		Du har ikke rettigheder til at se dette script.
-	</string>
-	<string name="script_running">
-		Kører
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="script ed float" title="Script: Nyt script">
+	<button label="Nulstil" label_selected="Reset" name="Reset" />
+	<check_box label="Kører" name="running" />
+	<check_box label="Mono" name="mono" />
+	<string name="not_allowed">
+		Du har ikke rettigheder til at se dette script.
+	</string>
+	<string name="script_running">
+		Kører
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_lsl_guide.xml b/indra/newview/skins/default/xui/da/floater_lsl_guide.xml
index 4ba8787651..07ea6930ea 100644
--- a/indra/newview/skins/default/xui/da/floater_lsl_guide.xml
+++ b/indra/newview/skins/default/xui/da/floater_lsl_guide.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="script ed float" title="LSL Wiki">
-	<check_box label="Følg markøreren" name="lock_check" />
-	<combo_box label="Lås" name="history_combo" />
-	<button label="Tilbage" name="back_btn" />
-	<button label="Frem" name="fwd_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="script ed float" title="LSL Wiki">
+	<check_box label="Følg markøreren" name="lock_check" />
+	<combo_box label="Lås" name="history_combo" />
+	<button label="Tilbage" name="back_btn" />
+	<button label="Frem" name="fwd_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_media_browser.xml b/indra/newview/skins/default/xui/da/floater_media_browser.xml
index 84bb0a37a7..50004cfa0c 100644
--- a/indra/newview/skins/default/xui/da/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/da/floater_media_browser.xml
@@ -1,19 +1,19 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_about" title="Medie vælger">
-	<layout_stack name="stack1">
-		<layout_panel name="nav_controls">
-			<button label="Tilbage" name="back" />
-			<button label="Frem" name="forward" />
-			<button label="Opdater" name="reload" />
-			<button label="Gå til" name="go" />
-		</layout_panel>
-		<layout_panel name="parcel_owner_controls">
-			<button label="Send nuværende URL til parcel" name="assign" />
-		</layout_panel>
-		<layout_panel name="external_controls">
-			<button label="Åben i min browser" name="open_browser" />
-			<check_box label="Åben altid i min browser" name="open_always" />
-			<button label="Luk" name="close" />
-		</layout_panel>
-	</layout_stack>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_about" title="Medie vælger">
+	<layout_stack name="stack1">
+		<layout_panel name="nav_controls">
+			<button label="Tilbage" name="back" />
+			<button label="Frem" name="forward" />
+			<button label="Opdater" name="reload" />
+			<button label="Gå til" name="go" />
+		</layout_panel>
+		<layout_panel name="parcel_owner_controls">
+			<button label="Send nuværende URL til parcel" name="assign" />
+		</layout_panel>
+		<layout_panel name="external_controls">
+			<button label="Åben i min browser" name="open_browser" />
+			<check_box label="Åben altid i min browser" name="open_always" />
+			<button label="Luk" name="close" />
+		</layout_panel>
+	</layout_stack>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_moveview.xml b/indra/newview/skins/default/xui/da/floater_moveview.xml
index dd966efefd..70f3d9e3fd 100644
--- a/indra/newview/skins/default/xui/da/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/da/floater_moveview.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="move floater" title="">
-	<button label="" label_selected="" name="turn left btn" tool_tip="Drej til venstre" />
-	<button label="" label_selected="" name="turn right btn" tool_tip="Drej til højre" />
-	<button label="" label_selected="" name="move up btn" tool_tip="Hop eller flyv op" />
-	<button label="" label_selected="" name="move down btn" tool_tip="Duk eller flyv ned" />
-	<joystick_slide name="slide left btn" tool_tip="Gå til venstre" />
-	<joystick_slide name="slide right btn" tool_tip="Gå til højre" />
-	<joystick_turn name="forward btn" tool_tip="Gå fremad" />
-	<joystick_turn name="backward btn" tool_tip="Gå bagud" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="move floater" title="">
+	<button label="" label_selected="" name="turn left btn" tool_tip="Drej til venstre" />
+	<button label="" label_selected="" name="turn right btn" tool_tip="Drej til højre" />
+	<button label="" label_selected="" name="move up btn" tool_tip="Hop eller flyv op" />
+	<button label="" label_selected="" name="move down btn" tool_tip="Duk eller flyv ned" />
+	<joystick_slide name="slide left btn" tool_tip="Gå til venstre" />
+	<joystick_slide name="slide right btn" tool_tip="Gå til højre" />
+	<joystick_turn name="forward btn" tool_tip="Gå fremad" />
+	<joystick_turn name="backward btn" tool_tip="Gå bagud" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_mute_object.xml b/indra/newview/skins/default/xui/da/floater_mute_object.xml
index 09a9274cc9..e64557b177 100644
--- a/indra/newview/skins/default/xui/da/floater_mute_object.xml
+++ b/indra/newview/skins/default/xui/da/floater_mute_object.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="mute by name" title="Bloker objekt via navn">
-	<text name="message">
-		Blokering via navn har ikke betydning for lyde.
-Du skal skrive det præcise navn på objektet.
-	</text>
-	<line_editor name="object_name">
-		Objekt navn
-	</line_editor>
-	<button label="OK" name="OK" />
-	<button label="Annullér" name="Cancel" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="mute by name" title="Bloker objekt via navn">
+	<text name="message">
+		Blokering via navn har ikke betydning for lyde.
+Du skal skrive det præcise navn på objektet.
+	</text>
+	<line_editor name="object_name">
+		Objekt navn
+	</line_editor>
+	<button label="OK" name="OK" />
+	<button label="Annullér" name="Cancel" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_my_friends.xml b/indra/newview/skins/default/xui/da/floater_my_friends.xml
index 53aa90c976..687266a08a 100644
--- a/indra/newview/skins/default/xui/da/floater_my_friends.xml
+++ b/indra/newview/skins/default/xui/da/floater_my_friends.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_my_friends" title="Kontakter">
-	<tab_container name="friends_and_groups">
-		<panel label="Venner" name="friends_panel" />
-		<panel label="Grupper" name="groups_panel" />
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_my_friends" title="Kontakter">
+	<tab_container name="friends_and_groups">
+		<panel label="Venner" name="friends_panel" />
+		<panel label="Grupper" name="groups_panel" />
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_openobject.xml b/indra/newview/skins/default/xui/da/floater_openobject.xml
index 1f7c026f2c..12e4a95a5e 100644
--- a/indra/newview/skins/default/xui/da/floater_openobject.xml
+++ b/indra/newview/skins/default/xui/da/floater_openobject.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="objectcontents" title="Objekt indhold">
-	<text type="string" length="1" name="object_name">
-		[DESC]:
-	</text>
-	<button label="Kopiér til beholdning" label_selected="Kopiér til beholdning"
-	     name="copy_to_inventory_button" />
-	<button label="Kopiér og tag på" label_selected="Kopiér og tag på"
-	     name="copy_and_wear_button" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="objectcontents" title="Objekt indhold">
+	<text type="string" length="1" name="object_name">
+		[DESC]:
+	</text>
+	<button label="Kopiér til beholdning" label_selected="Kopiér til beholdning"
+	     name="copy_to_inventory_button" />
+	<button label="Kopiér og tag på" label_selected="Kopiér og tag på"
+	     name="copy_and_wear_button" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_pay.xml b/indra/newview/skins/default/xui/da/floater_pay.xml
index ef24a8f942..cca4240934 100644
--- a/indra/newview/skins/default/xui/da/floater_pay.xml
+++ b/indra/newview/skins/default/xui/da/floater_pay.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Give Money" title="">
-	<button label="L$1" label_selected="L$1" name="fastpay 1" />
-	<button label="L$5" label_selected="L$5" name="fastpay 5" />
-	<button label="L$10" label_selected="L$10" name="fastpay 10" />
-	<button label="L$20" label_selected="L$20" name="fastpay 20" />
-	<button label="Betal" label_selected="Betal" name="pay btn" />
-	<button label="Annullér" label_selected="Annullér" name="cancel btn" />
-	<text type="string" length="1" name="payee_label" left="5" width="81">
-		Betal beboer:
-	</text>
-	<text type="string" length="1" name="payee_name">
-		[FIRST] [LAST]
-	</text>
-	<text type="string" length="1" name="fastpay text">
-		Hurtig betal:
-	</text>
-	<text type="string" length="1" name="amount text" left="4" >
-		Beløb:
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Give Money" title="">
+	<button label="L$1" label_selected="L$1" name="fastpay 1" />
+	<button label="L$5" label_selected="L$5" name="fastpay 5" />
+	<button label="L$10" label_selected="L$10" name="fastpay 10" />
+	<button label="L$20" label_selected="L$20" name="fastpay 20" />
+	<button label="Betal" label_selected="Betal" name="pay btn" />
+	<button label="Annullér" label_selected="Annullér" name="cancel btn" />
+	<text type="string" length="1" name="payee_label" left="5" width="81">
+		Betal beboer:
+	</text>
+	<text type="string" length="1" name="payee_name">
+		[FIRST] [LAST]
+	</text>
+	<text type="string" length="1" name="fastpay text">
+		Hurtig betal:
+	</text>
+	<text type="string" length="1" name="amount text" left="4" >
+		Beløb:
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_pay_object.xml b/indra/newview/skins/default/xui/da/floater_pay_object.xml
index 6cd3f9676a..465f7e8e3e 100644
--- a/indra/newview/skins/default/xui/da/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/da/floater_pay_object.xml
@@ -1,30 +1,30 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Give Money" title="">
-	<text type="string" length="1" name="payee_group">
-		Betal gruppe:
-	</text>
-	<text type="string" length="1" name="payee_resident">
-		Betal beboer:
-	</text>
-	<text type="string" length="1" name="payee_name">
-		[FIRST] [LAST]
-	</text>
-	<text type="string" length="1" name="object_name_label">
-		Via objekt:
-	</text>
-	<text type="string" length="1" name="object_name_text">
-		...
-	</text>
-	<text type="string" length="1" name="fastpay text">
-		Hurtig betal:
-	</text>
-	<text type="string" length="1" name="amount text">
-		Beløb:
-	</text>
-	<button label="L$1" label_selected="L$1" name="fastpay 1" />
-	<button label="L$5" label_selected="L$5" name="fastpay 5" />
-	<button label="L$10" label_selected="L$10" name="fastpay 10" />
-	<button label="L$20" label_selected="L$20" name="fastpay 20" />
-	<button label="Betal" label_selected="Betal" name="pay btn" />
-	<button label="Annullér" label_selected="Annullér" name="cancel btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Give Money" title="">
+	<text type="string" length="1" name="payee_group">
+		Betal gruppe:
+	</text>
+	<text type="string" length="1" name="payee_resident">
+		Betal beboer:
+	</text>
+	<text type="string" length="1" name="payee_name">
+		[FIRST] [LAST]
+	</text>
+	<text type="string" length="1" name="object_name_label">
+		Via objekt:
+	</text>
+	<text type="string" length="1" name="object_name_text">
+		...
+	</text>
+	<text type="string" length="1" name="fastpay text">
+		Hurtig betal:
+	</text>
+	<text type="string" length="1" name="amount text">
+		Beløb:
+	</text>
+	<button label="L$1" label_selected="L$1" name="fastpay 1" />
+	<button label="L$5" label_selected="L$5" name="fastpay 5" />
+	<button label="L$10" label_selected="L$10" name="fastpay 10" />
+	<button label="L$20" label_selected="L$20" name="fastpay 20" />
+	<button label="Betal" label_selected="Betal" name="pay btn" />
+	<button label="Annullér" label_selected="Annullér" name="cancel btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_postcard.xml b/indra/newview/skins/default/xui/da/floater_postcard.xml
index bdc1f7d3ab..6b02f43633 100644
--- a/indra/newview/skins/default/xui/da/floater_postcard.xml
+++ b/indra/newview/skins/default/xui/da/floater_postcard.xml
@@ -1,36 +1,36 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Postcard" title="E-mail billede">
-	<text name="to_label">
-		Send til:
-	</text>
-	<text name="from_label">
-		Din e-mail:
-	</text>
-	<text name="name_label">
-		Dit navn:
-	</text>
-	<text name="subject_label">
-		Emne:
-	</text>
-	<line_editor label="Skriv dit emne her." name="subject_form" />
-	<text name="msg_label">
-		Besked:
-	</text>
-	<text_editor name="msg_form">
-		Skriv din besked her.
-	</text_editor>
-	<text name="fine_print">
-		Hvis din modtager opretter en konto i SL, vil du få en henvisnings bonus.
-	</text>
-	<button label="Annullér" name="cancel_btn" />
-	<button label="Send" name="send_btn" />
-	<string name="default_subject">
-		Postkort fra Second Life.
-	</string>
-	<string name="default_message">
-		Tjek det her ud!
-	</string>
-	<string name="upload_message">
-		Sender...
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Postcard" title="E-mail billede">
+	<text name="to_label">
+		Send til:
+	</text>
+	<text name="from_label">
+		Din e-mail:
+	</text>
+	<text name="name_label">
+		Dit navn:
+	</text>
+	<text name="subject_label">
+		Emne:
+	</text>
+	<line_editor label="Skriv dit emne her." name="subject_form" />
+	<text name="msg_label">
+		Besked:
+	</text>
+	<text_editor name="msg_form">
+		Skriv din besked her.
+	</text_editor>
+	<text name="fine_print">
+		Hvis din modtager opretter en konto i SL, vil du få en henvisnings bonus.
+	</text>
+	<button label="Annullér" name="cancel_btn" />
+	<button label="Send" name="send_btn" />
+	<string name="default_subject">
+		Postkort fra Second Life.
+	</string>
+	<string name="default_message">
+		Tjek det her ud!
+	</string>
+	<string name="upload_message">
+		Sender...
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_preferences.xml b/indra/newview/skins/default/xui/da/floater_preferences.xml
index 9c359a191a..26e932e3cc 100644
--- a/indra/newview/skins/default/xui/da/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/da/floater_preferences.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Preferences" title="Indstillinger">
-	<button label="OK" label_selected="OK" name="OK" />
-	<button label="Annullér" label_selected="Annullér" name="Cancel" />
-	<button label="Gem" label_selected="Gem" name="Apply" />
-	<button label="Om" label_selected="Om" name="About..." />
-	<button label="Hjælp" label_selected="Hjælp" name="Help" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Preferences" title="Indstillinger">
+	<button label="OK" label_selected="OK" name="OK" />
+	<button label="Annullér" label_selected="Annullér" name="Cancel" />
+	<button label="Gem" label_selected="Gem" name="Apply" />
+	<button label="Om" label_selected="Om" name="About..." />
+	<button label="Hjælp" label_selected="Hjælp" name="Help" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_preview_animation.xml b/indra/newview/skins/default/xui/da/floater_preview_animation.xml
index 455889281e..14cf13e317 100644
--- a/indra/newview/skins/default/xui/da/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/da/floater_preview_animation.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview_anim">
-	<text type="string" length="1" name="desc txt">
-		Beskrivelse:
-	</text>
-	<button label="Afspil i verden" label_selected="Stop" name="Anim play btn"
-	     tool_tip="Afspil denne animation så andre kan se den." />
-	<button label="Afspil lokalt" label_selected="Stop" name="Anim audition btn"
-	     tool_tip="Afspil denne animation så kun du kan se den." />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview_anim">
+	<text type="string" length="1" name="desc txt">
+		Beskrivelse:
+	</text>
+	<button label="Afspil i verden" label_selected="Stop" name="Anim play btn"
+	     tool_tip="Afspil denne animation så andre kan se den." />
+	<button label="Afspil lokalt" label_selected="Stop" name="Anim audition btn"
+	     tool_tip="Afspil denne animation så kun du kan se den." />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_preview_classified.xml b/indra/newview/skins/default/xui/da/floater_preview_classified.xml
index 25892d84e6..6cc4c139f1 100644
--- a/indra/newview/skins/default/xui/da/floater_preview_classified.xml
+++ b/indra/newview/skins/default/xui/da/floater_preview_classified.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="classified_preview" title="Annonce information" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="classified_preview" title="Annonce information" />
diff --git a/indra/newview/skins/default/xui/da/floater_preview_event.xml b/indra/newview/skins/default/xui/da/floater_preview_event.xml
index eb0f34e60b..f1be35e1c3 100644
--- a/indra/newview/skins/default/xui/da/floater_preview_event.xml
+++ b/indra/newview/skins/default/xui/da/floater_preview_event.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="event_preview" title="Event information" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="event_preview" title="Event information" />
diff --git a/indra/newview/skins/default/xui/da/floater_preview_gesture.xml b/indra/newview/skins/default/xui/da/floater_preview_gesture.xml
index 3686259398..cf3445e1a6 100644
--- a/indra/newview/skins/default/xui/da/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/da/floater_preview_gesture.xml
@@ -1,56 +1,56 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="gesture_preview">
-	<string name="stop_txt">
-		Stop
-	</string>
-	<string name="preview_txt">
-		Vis
-	</string>
-	<string name="none_text">
-		-- Intet --
-	</string>
-	<text name="desc_label">
-		Beskrivelse:
-	</text>
-	<text name="trigger_label">
-		Udløser:
-	</text>
-	<text name="replace_text"
-	     tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture!">
-		Erstat med:
-	</text>
-	<line_editor name="replace_editor"
-	     tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture" />
-	<text name="key_label">
-		Genvejstast:
-	</text>
-	<combo_box label="Ingen" name="modifier_combo" />
-	<combo_box label="Ingen" name="key_combo" />
-	<text name="library_label">
-		Type:
-	</text>
-	<text name="steps_label">
-		Trin:
-	</text>
-	<button label="Tilføj &gt;&gt;" name="add_btn" />
-	<button label="Flyt op" name="up_btn" />
-	<button label="Flyt ned" name="down_btn" />
-	<button label="Fjern" name="delete_btn" />
-	<text name="help_label">
-		Alle trin vil ske samtidigt,
-medmindre du tilføjer vente trin.
-	</text>
-	<radio_group name="animation_trigger_type">
-		<radio_item name="start">
-			Start
-		</radio_item>
-		<radio_item name="stop">
-			Stop
-		</radio_item>
-	</radio_group>
-	<check_box label="Indtil animation er færdig" name="wait_anim_check" />
-	<check_box label="tid i sekunder" name="wait_time_check" />
-	<check_box label="Aktiv" name="active_check" />
-	<button label="Vis" name="preview_btn" />
-	<button label="Gem" name="save_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="gesture_preview">
+	<string name="stop_txt">
+		Stop
+	</string>
+	<string name="preview_txt">
+		Vis
+	</string>
+	<string name="none_text">
+		-- Intet --
+	</string>
+	<text name="desc_label">
+		Beskrivelse:
+	</text>
+	<text name="trigger_label">
+		Udløser:
+	</text>
+	<text name="replace_text"
+	     tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture!">
+		Erstat med:
+	</text>
+	<line_editor name="replace_editor"
+	     tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture" />
+	<text name="key_label">
+		Genvejstast:
+	</text>
+	<combo_box label="Ingen" name="modifier_combo" />
+	<combo_box label="Ingen" name="key_combo" />
+	<text name="library_label">
+		Type:
+	</text>
+	<text name="steps_label">
+		Trin:
+	</text>
+	<button label="Tilføj &gt;&gt;" name="add_btn" />
+	<button label="Flyt op" name="up_btn" />
+	<button label="Flyt ned" name="down_btn" />
+	<button label="Fjern" name="delete_btn" />
+	<text name="help_label">
+		Alle trin vil ske samtidigt,
+medmindre du tilføjer vente trin.
+	</text>
+	<radio_group name="animation_trigger_type">
+		<radio_item name="start">
+			Start
+		</radio_item>
+		<radio_item name="stop">
+			Stop
+		</radio_item>
+	</radio_group>
+	<check_box label="Indtil animation er færdig" name="wait_anim_check" />
+	<check_box label="tid i sekunder" name="wait_time_check" />
+	<check_box label="Aktiv" name="active_check" />
+	<button label="Vis" name="preview_btn" />
+	<button label="Gem" name="save_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_preview_notecard.xml b/indra/newview/skins/default/xui/da/floater_preview_notecard.xml
index 3df1e428a5..c9bee41b6a 100644
--- a/indra/newview/skins/default/xui/da/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/da/floater_preview_notecard.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview notecard" title="Note:">
-	<button label="Gem" label_selected="Gem" name="Save" />
-	<text type="string" length="1" name="desc txt">
-		Beskrivelse:
-	</text>
-	<text_editor type="string" length="1" name="Notecard Editor">
-		Indlæser...
-	</text_editor>
-	<string name="not_allowed">
-		Du har ikke tilladelse til at læse denne note.
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview notecard" title="Note:">
+	<button label="Gem" label_selected="Gem" name="Save" />
+	<text type="string" length="1" name="desc txt">
+		Beskrivelse:
+	</text>
+	<text_editor type="string" length="1" name="Notecard Editor">
+		Indlæser...
+	</text_editor>
+	<string name="not_allowed">
+		Du har ikke tilladelse til at læse denne note.
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_preview_sound.xml b/indra/newview/skins/default/xui/da/floater_preview_sound.xml
index 9094520745..95a068ae65 100644
--- a/indra/newview/skins/default/xui/da/floater_preview_sound.xml
+++ b/indra/newview/skins/default/xui/da/floater_preview_sound.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview_sound">
-	<text type="string" length="1" name="desc txt">
-		Beskrivelse:
-	</text>
-	<button label="Afspil lokalt" label_selected="Afspil lokalt" name="Sound audition btn"
-	     tool_tip="Afspil denne lyd så kun du kan høre den." />
-	<button label="Afspil i verden" label_selected="Afspil i verden" name="Sound play btn"
-	     tool_tip="Afspil denne lyd så den kan høres af andre." />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview_sound">
+	<text type="string" length="1" name="desc txt">
+		Beskrivelse:
+	</text>
+	<button label="Afspil lokalt" label_selected="Afspil lokalt" name="Sound audition btn"
+	     tool_tip="Afspil denne lyd så kun du kan høre den." />
+	<button label="Afspil i verden" label_selected="Afspil i verden" name="Sound play btn"
+	     tool_tip="Afspil denne lyd så den kan høres af andre." />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_preview_texture.xml b/indra/newview/skins/default/xui/da/floater_preview_texture.xml
index dc9b9fbf9c..593e32e4bf 100644
--- a/indra/newview/skins/default/xui/da/floater_preview_texture.xml
+++ b/indra/newview/skins/default/xui/da/floater_preview_texture.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview_texture">
-	<text type="string" length="1" name="desc txt">
-		Beskrivelse:
-	</text>
-	<text type="string" length="1" name="dimensions">
-		Størrelse: [WIDTH] x [HEIGHT]
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview_texture">
+	<text type="string" length="1" name="desc txt">
+		Beskrivelse:
+	</text>
+	<text type="string" length="1" name="dimensions">
+		Størrelse: [WIDTH] x [HEIGHT]
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_report_abuse.xml b/indra/newview/skins/default/xui/da/floater_report_abuse.xml
index a8dee3c11f..64e39da8fe 100644
--- a/indra/newview/skins/default/xui/da/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/da/floater_report_abuse.xml
@@ -1,184 +1,184 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_report_abuse" title="Rapportér misbrug">
-	<texture_picker label="" name="screenshot" />
-	<check_box label="Inkludér billede" name="screen_check" />
-	<text name="reporter_title">
-		Anmelder:
-	</text>
-	<text name="reporter_field">
-		Loremipsum Dolorsitamut
-	</text>
-	<text name="sim_title">
-		Region:
-	</text>
-	<text name="sim_field">
-		Region navn
-	</text>
-	<text name="pos_title">
-		Position:
-	</text>
-	<text name="pos_field">
-		{128.1, 128.1, 15.4}
-	</text>
-	<text name="select_object_label">
-		Klik på knappen derefter objektet:
-	</text>
-	<button label="" label_selected="" name="pick_btn"
-	     tool_tip="Objekt vælger - Identificér et objekt denne rapport omhandler" />
-	<text name="object_name_label">
-		Navn:
-	</text>
-	<text name="object_name">
-		Consetetur Sadipscing
-	</text>
-	<text name="owner_name_label">
-		Ejer:
-	</text>
-	<text name="owner_name">
-		Hendrerit Vulputate
-	</text>
-	<combo_box name="category_combo"
-	     tool_tip="Kategori -- Vælg en kategori der passer bedst på denne rapport">
-		<combo_item name="Select_category">
-			Vælg kategori
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Alder &gt; Falsk alder
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Alder &gt; Voksen beboer på Teen Second Life
-		</combo_item>
-		
-		
-		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Overfald &gt; Kamp sandkasse / Usikkert område
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Overfald &gt; Sikkert område
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Overfald &gt; Sandkasse til våbentest
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Handel &gt; Vare eller ydelse ikke leveret
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Offentliggørelse &gt; Om oplysninger i den virkelige verden
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Offentliggørelse &gt; Fjernaflytning af chat
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Offentliggørelse &gt; Information/chat/IM fra Second Life
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Forstyrrelse af fred &gt; Unfair brug af region ressourcer
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Forstyrrelse af fred &gt; Overdreven brug af objekter med script
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Forstyrrelse af fred &gt; Object affald
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Forstyrring af fred &gt; Gentagen spam
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Forstyrrelse af fred &gt; Uønsket reklame spam
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Bedrageri &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Bedrageri &gt; Land
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Bedrageri &gt; Pyramide spil eller kædebreve
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Bedrageri &gt; US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Chikane &gt; reklame farm / billedeligt spam
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Chikane &gt; Injurier/bagvask enkeltpersoner eller grupper
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Chikane &gt; Hindre bevægelse
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Chikane &gt; Sex chikane
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Chikane &gt; Opfordrer/kræver at andre overtræder licensbetingelser
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Chikane &gt; Verbalt chikane
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Uanstændighed &gt; Meget stødende indhold eller adfærd
-		</combo_item>
-		
-		
-		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Uanstændighed &gt; Upassende avatar navn
-		</combo_item>
-		
-		
-		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Krænkelse af intellektuelle ejendomsrettigheder &gt; Indholds fjernelse
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Krænkelse af intellektuelle ejendomsrettigheder &gt; CopyBot eller omgåelse af rettighedsbeskyttelse
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intolerance
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Land &gt; Misbrug af sandkasse resourcer
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Land &gt; Overgreb &gt; Objekter/teksturer
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Land &gt; Overgreb &gt; Partikler
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Land &gt; Overgreb &gt; Træer/planter
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Væddemål/gambling
-		</combo_item>
-		<combo_item name="Other">
-			Andet
-		</combo_item>
-	</combo_box>
-	<text name="abuser_name_title">
-		Udøvers navn:
-	</text>
-	<button label="Vælg beboer" label_selected="" name="select_abuser"
-	     tool_tip="Vælg navnet på udøveren fra denne liste" />
-	<check_box label="Kender ikke udøvers navn" name="omit_abuser_name"
-	     tool_tip="Afkryds her, hvis du ikke kender navn på udøvers" />
-	<text name="abuser_name_title2">
-		Sted for misbrug/overgreb:
-	</text>
-	<text name="sum_title">
-		Opsummering:
-	</text>
-	<text name="dscr_title">
-		Detaljer:
-	</text>
-	<text name="bug_aviso">
-		Vær venligst præcis omkring dato, sted, overgrebets natur, relevant chat/IM og vælg objekt hvis muligt.
-	</text>
-	<text name="incomplete_title">
-		Note: Ufuldstændige rapporter vil ikke blive undersøgt.
-	</text>
-	<button label="Annullér" label_selected="Annullér" name="cancel_btn" />
-	<button label="Rapporter misbrug" label_selected="Rapporter misbrug" name="send_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_report_abuse" title="Rapportér misbrug">
+	<texture_picker label="" name="screenshot" />
+	<check_box label="Inkludér billede" name="screen_check" />
+	<text name="reporter_title">
+		Anmelder:
+	</text>
+	<text name="reporter_field">
+		Loremipsum Dolorsitamut
+	</text>
+	<text name="sim_title">
+		Region:
+	</text>
+	<text name="sim_field">
+		Region navn
+	</text>
+	<text name="pos_title">
+		Position:
+	</text>
+	<text name="pos_field">
+		{128.1, 128.1, 15.4}
+	</text>
+	<text name="select_object_label">
+		Klik på knappen derefter objektet:
+	</text>
+	<button label="" label_selected="" name="pick_btn"
+	     tool_tip="Objekt vælger - Identificér et objekt denne rapport omhandler" />
+	<text name="object_name_label">
+		Navn:
+	</text>
+	<text name="object_name">
+		Consetetur Sadipscing
+	</text>
+	<text name="owner_name_label">
+		Ejer:
+	</text>
+	<text name="owner_name">
+		Hendrerit Vulputate
+	</text>
+	<combo_box name="category_combo"
+	     tool_tip="Kategori -- Vælg en kategori der passer bedst på denne rapport">
+		<combo_item name="Select_category">
+			Vælg kategori
+		</combo_item>
+		<combo_item name="Age__Age_play">
+			Alder &gt; Falsk alder
+		</combo_item>
+		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
+			Alder &gt; Voksen beboer på Teen Second Life
+		</combo_item>
+		
+		
+		
+		<combo_item name="Assault__Combat_sandbox___unsafe_area">
+			Overfald &gt; Kamp sandkasse / Usikkert område
+		</combo_item>
+		<combo_item name="Assault__Safe_area">
+			Overfald &gt; Sikkert område
+		</combo_item>
+		<combo_item name="Assault__Weapons_testing_sandbox">
+			Overfald &gt; Sandkasse til våbentest
+		</combo_item>
+		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
+			Handel &gt; Vare eller ydelse ikke leveret
+		</combo_item>
+		<combo_item name="Disclosure__Real_world_information">
+			Offentliggørelse &gt; Om oplysninger i den virkelige verden
+		</combo_item>
+		<combo_item name="Disclosure__Remotely_monitoring chat">
+			Offentliggørelse &gt; Fjernaflytning af chat
+		</combo_item>
+		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
+			Offentliggørelse &gt; Information/chat/IM fra Second Life
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
+			Forstyrrelse af fred &gt; Unfair brug af region ressourcer
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
+			Forstyrrelse af fred &gt; Overdreven brug af objekter med script
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Object_littering">
+			Forstyrrelse af fred &gt; Object affald
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Repetitive_spam">
+			Forstyrring af fred &gt; Gentagen spam
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
+			Forstyrrelse af fred &gt; Uønsket reklame spam
+		</combo_item>
+		<combo_item name="Fraud__L$">
+			Bedrageri &gt; L$
+		</combo_item>
+		<combo_item name="Fraud__Land">
+			Bedrageri &gt; Land
+		</combo_item>
+		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
+			Bedrageri &gt; Pyramide spil eller kædebreve
+		</combo_item>
+		<combo_item name="Fraud__US$">
+			Bedrageri &gt; US$
+		</combo_item>
+		<combo_item name="Harassment__Advert_farms___visual_spam">
+			Chikane &gt; reklame farm / billedeligt spam
+		</combo_item>
+		<combo_item name="Harassment__Defaming_individuals_or_groups">
+			Chikane &gt; Injurier/bagvask enkeltpersoner eller grupper
+		</combo_item>
+		<combo_item name="Harassment__Impeding_movement">
+			Chikane &gt; Hindre bevægelse
+		</combo_item>
+		<combo_item name="Harassment__Sexual_harassment">
+			Chikane &gt; Sex chikane
+		</combo_item>
+		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
+			Chikane &gt; Opfordrer/kræver at andre overtræder licensbetingelser
+		</combo_item>
+		<combo_item name="Harassment__Verbal_abuse">
+			Chikane &gt; Verbalt chikane
+		</combo_item>
+		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
+			Uanstændighed &gt; Meget stødende indhold eller adfærd
+		</combo_item>
+		
+		
+		
+		<combo_item name="Indecency__Inappropriate_avatar_name">
+			Uanstændighed &gt; Upassende avatar navn
+		</combo_item>
+		
+		
+		
+		<combo_item name="Intellectual_property_infringement_Content_Removal">
+			Krænkelse af intellektuelle ejendomsrettigheder &gt; Indholds fjernelse
+		</combo_item>
+		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
+			Krænkelse af intellektuelle ejendomsrettigheder &gt; CopyBot eller omgåelse af rettighedsbeskyttelse
+		</combo_item>
+		<combo_item name="Intolerance">
+			Intolerance
+		</combo_item>
+		<combo_item name="Land__Abuse_of_sandbox_resources">
+			Land &gt; Misbrug af sandkasse resourcer
+		</combo_item>
+		<combo_item name="Land__Encroachment__Objects_textures">
+			Land &gt; Overgreb &gt; Objekter/teksturer
+		</combo_item>
+		<combo_item name="Land__Encroachment__Particles">
+			Land &gt; Overgreb &gt; Partikler
+		</combo_item>
+		<combo_item name="Land__Encroachment__Trees_plants">
+			Land &gt; Overgreb &gt; Træer/planter
+		</combo_item>
+		<combo_item name="Wagering_gambling">
+			Væddemål/gambling
+		</combo_item>
+		<combo_item name="Other">
+			Andet
+		</combo_item>
+	</combo_box>
+	<text name="abuser_name_title">
+		Udøvers navn:
+	</text>
+	<button label="Vælg beboer" label_selected="" name="select_abuser"
+	     tool_tip="Vælg navnet på udøveren fra denne liste" />
+	<check_box label="Kender ikke udøvers navn" name="omit_abuser_name"
+	     tool_tip="Afkryds her, hvis du ikke kender navn på udøvers" />
+	<text name="abuser_name_title2">
+		Sted for misbrug/overgreb:
+	</text>
+	<text name="sum_title">
+		Opsummering:
+	</text>
+	<text name="dscr_title">
+		Detaljer:
+	</text>
+	<text name="bug_aviso">
+		Vær venligst præcis omkring dato, sted, overgrebets natur, relevant chat/IM og vælg objekt hvis muligt.
+	</text>
+	<text name="incomplete_title">
+		Note: Ufuldstændige rapporter vil ikke blive undersøgt.
+	</text>
+	<button label="Annullér" label_selected="Annullér" name="cancel_btn" />
+	<button label="Rapporter misbrug" label_selected="Rapporter misbrug" name="send_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_script_debug.xml b/indra/newview/skins/default/xui/da/floater_script_debug.xml
index f19b9aeb69..17e14cd9b9 100644
--- a/indra/newview/skins/default/xui/da/floater_script_debug.xml
+++ b/indra/newview/skins/default/xui/da/floater_script_debug.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<multi_floater name="script debug floater" title="Script advarsel/fejl">
-	<tab_container name="Preview Tabs">
-		<floater label="Script" name="all_scripts" title="[All scripts]" />
-	</tab_container>
-</multi_floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<multi_floater name="script debug floater" title="Script advarsel/fejl">
+	<tab_container name="Preview Tabs">
+		<floater label="Script" name="all_scripts" title="[All scripts]" />
+	</tab_container>
+</multi_floater>
diff --git a/indra/newview/skins/default/xui/da/floater_script_preview.xml b/indra/newview/skins/default/xui/da/floater_script_preview.xml
index 28fc577505..26371d864f 100644
--- a/indra/newview/skins/default/xui/da/floater_script_preview.xml
+++ b/indra/newview/skins/default/xui/da/floater_script_preview.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview lsl text" title="Script: Rotation Script">
-	<text type="string" length="1" name="desc txt">
-		Beskrivelse:
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview lsl text" title="Script: Rotation Script">
+	<text type="string" length="1" name="desc txt">
+		Beskrivelse:
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_script_queue.xml b/indra/newview/skins/default/xui/da/floater_script_queue.xml
index 7f0d737fa5..47dbf534bd 100644
--- a/indra/newview/skins/default/xui/da/floater_script_queue.xml
+++ b/indra/newview/skins/default/xui/da/floater_script_queue.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="queue" title="Nulstil forløb">
-	<button label="Luk" label_selected="Luk" name="close" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="queue" title="Nulstil forløb">
+	<button label="Luk" label_selected="Luk" name="close" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_script_search.xml b/indra/newview/skins/default/xui/da/floater_script_search.xml
index cd230342a9..9f51d3bbfd 100644
--- a/indra/newview/skins/default/xui/da/floater_script_search.xml
+++ b/indra/newview/skins/default/xui/da/floater_script_search.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="script search" title="Script søgning">
-	<check_box label="Store/små bogstaver har ingen betydning" name="case_text" />
-	<button label="Søg" label_selected="Søg" name="search_btn" />
-	<button label="Erstat" label_selected="Erstat" name="replace_btn" />
-	<button label="Erstat alle" label_selected="Erstat alle" name="replace_all_btn" />
-	<text type="string" length="1" name="txt">
-		Søg
-	</text>
-	<text type="string" length="1" name="txt2">
-		Erstat
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="script search" title="Script søgning">
+	<check_box label="Store/små bogstaver har ingen betydning" name="case_text" />
+	<button label="Søg" label_selected="Søg" name="search_btn" />
+	<button label="Erstat" label_selected="Erstat" name="replace_btn" />
+	<button label="Erstat alle" label_selected="Erstat alle" name="replace_all_btn" />
+	<text type="string" length="1" name="txt">
+		Søg
+	</text>
+	<text type="string" length="1" name="txt2">
+		Erstat
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_select_key.xml b/indra/newview/skins/default/xui/da/floater_select_key.xml
index 11afeb2211..53bb7dd525 100644
--- a/indra/newview/skins/default/xui/da/floater_select_key.xml
+++ b/indra/newview/skins/default/xui/da/floater_select_key.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="modal container" title="">
-	<button label="Annullér" label_selected="Annullér" name="Cancel" />
-	<text type="string" length="1" name="Save item as:">
-		Tryk på en taste for at vælge
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="modal container" title="">
+	<button label="Annullér" label_selected="Annullér" name="Cancel" />
+	<text type="string" length="1" name="Save item as:">
+		Tryk på en taste for at vælge
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_sell_land.xml b/indra/newview/skins/default/xui/da/floater_sell_land.xml
index 32905594a4..cd3b36cf93 100644
--- a/indra/newview/skins/default/xui/da/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/da/floater_sell_land.xml
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="sell land" title="Sælg land">
-	<text name="info_parcel_label">
-		Parcel:
-	</text>
-	<text name="info_parcel">
-		PARCEL NAME
-	</text>
-	<text name="info_size_label">
-		Størrelse:
-	</text>
-	<text name="info_size">
-		[AREA] m²
-	</text>
-	<text name="info_action">
-		Sælg denne parcel:
-	</text>
-	<text name="price_label">
-		Sæt en pris:
-	</text>
-	<text name="price_text">
-		Vælg en passende pris for jorden.
-	</text>
-	<text name="price_ld">
-		L$
-	</text>
-	<text name="price_per_m">
-		(L$[PER_METER] pr. kvadratmeter)
-	</text>
-	<text name="sell_to_label">
-		Sælg denne jord til:
-	</text>
-	<text name="sell_to_text">
-		Vælg om du vil sælge til hvem som helst eller en specifik køber.
-	</text>
-	<combo_box name="sell_to">
-		<combo_item name="--selectone--">
-			-- Vælg --
-		</combo_item>
-		<combo_item name="Anyone">
-			Alle
-		</combo_item>
-		<combo_item name="Specificuser:">
-			Specifik bruger:
-		</combo_item>
-	</combo_box>
-	<button label="Vælg..." name="sell_to_select_agent" />
-	<text name="sell_objects_label">
-		Sælg objekter sammen med jorden?
-	</text>
-	<text name="sell_objects_text">
-		Dine objekter der kan videregives sælges med jorden.
-	</text>
-	<radio_group name="sell_objects">
-		<radio_item name="no">
-			Nej, behold ejerskab til objekterne
-		</radio_item>
-		<radio_item name="yes">
-			Ja, sælg objekter med jorden
-		</radio_item>
-	</radio_group>
-	<button label="Vis objekter" name="show_objects" />
-	<text name="nag_message_label">
-		HUSK: Alle salg er endegyldige.
-	</text>
-	<button label="Sæt land til salg" name="sell_btn" />
-	<button label="Annullér" name="cancel_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="sell land" title="Sælg land">
+	<text name="info_parcel_label">
+		Parcel:
+	</text>
+	<text name="info_parcel">
+		PARCEL NAME
+	</text>
+	<text name="info_size_label">
+		Størrelse:
+	</text>
+	<text name="info_size">
+		[AREA] m²
+	</text>
+	<text name="info_action">
+		Sælg denne parcel:
+	</text>
+	<text name="price_label">
+		Sæt en pris:
+	</text>
+	<text name="price_text">
+		Vælg en passende pris for jorden.
+	</text>
+	<text name="price_ld">
+		L$
+	</text>
+	<text name="price_per_m">
+		(L$[PER_METER] pr. kvadratmeter)
+	</text>
+	<text name="sell_to_label">
+		Sælg denne jord til:
+	</text>
+	<text name="sell_to_text">
+		Vælg om du vil sælge til hvem som helst eller en specifik køber.
+	</text>
+	<combo_box name="sell_to">
+		<combo_box.item name="--selectone--">
+			-- Vælg --
+		</combo_box.item>
+		<combo_box.item name="Anyone">
+			Alle
+		</combo_box.item>
+		<combo_box.item name="Specificuser:">
+			Specifik bruger:
+		</combo_box.item>
+	</combo_box>
+	<button label="Vælg..." name="sell_to_select_agent" />
+	<text name="sell_objects_label">
+		Sælg objekter sammen med jorden?
+	</text>
+	<text name="sell_objects_text">
+		Dine objekter der kan videregives sælges med jorden.
+	</text>
+	<radio_group name="sell_objects">
+		<radio_item name="no">
+			Nej, behold ejerskab til objekterne
+		</radio_item>
+		<radio_item name="yes">
+			Ja, sælg objekter med jorden
+		</radio_item>
+	</radio_group>
+	<button label="Vis objekter" name="show_objects" />
+	<text name="nag_message_label">
+		HUSK: Alle salg er endegyldige.
+	</text>
+	<button label="Sæt land til salg" name="sell_btn" />
+	<button label="Annullér" name="cancel_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_settings_debug.xml b/indra/newview/skins/default/xui/da/floater_settings_debug.xml
index efbb7f01c7..8fa351c108 100644
--- a/indra/newview/skins/default/xui/da/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/da/floater_settings_debug.xml
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="settings_debug" title="Tekniske indstillinger">
-	<combo_box name="boolean_combo">
-		<combo_item name="TRUE">
-			TRUE (Valgt)
-		</combo_item>
-		<combo_item name="FALSE">
-			FALSE (Fravalgt)
-		</combo_item>
-	</combo_box>
-	<color_swatch label="Farve" name="color_swatch" />
-	<spinner label="x" name="val_spinner_1" />
-	<spinner label="x" name="val_spinner_2" />
-	<spinner label="x" name="val_spinner_3" />
-	<spinner label="x" name="val_spinner_4" />
-	<button label="Sæt til standard" name="default_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="settings_debug" title="Tekniske indstillinger">
+	<combo_box name="boolean_combo">
+		<combo_box.item name="TRUE">
+			TRUE (Valgt)
+		</combo_box.item>
+		<combo_box.item name="FALSE">
+			FALSE (Fravalgt)
+		</combo_box.item>
+	</combo_box>
+	<color_swatch label="Farve" name="color_swatch" />
+	<spinner label="x" name="val_spinner_1" />
+	<spinner label="x" name="val_spinner_2" />
+	<spinner label="x" name="val_spinner_3" />
+	<spinner label="x" name="val_spinner_4" />
+	<button label="Sæt til standard" name="default_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_snapshot.xml b/indra/newview/skins/default/xui/da/floater_snapshot.xml
index 5db963cc6f..8fc98220db 100644
--- a/indra/newview/skins/default/xui/da/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/da/floater_snapshot.xml
@@ -1,127 +1,127 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Snapshot" title="Se foto">
-	<text name="type_label">
-		Hvor skal foto hen?
-	</text>
-	<radio_group label="Snapshot type" name="snapshot_type_radio">
-		<radio_item name="postcard">
-			Send via e-mail
-		</radio_item>
-		<radio_item name="texture">
-			Gem i din beholdning (L$[AMOUNT])
-		</radio_item>
-		<radio_item name="local">
-			Gem på din computer
-		</radio_item>
-	</radio_group>
-	<text name="file_size_label">
-		Fil størrelse: [SIZE] KB
-	</text>
-	<button label="Tag nyt foto" name="new_snapshot_btn" />
-	<button label="Send" name="send_btn" />
-	<button label="Gem (L$[AMOUNT])" name="upload_btn" />
-	<flyout_button label="Gem" name="save_btn"  />
-	<button label="Annullér" name="discard_btn" />
-	<button label="Mere &gt;&gt;" name="more_btn"  />
-	<button label="&lt;&lt; Mindre" name="less_btn"  />
-	<text name="type_label2">
-		Størrelse
-	</text>
-	<text name="format_label">
-		Format
-	</text>
-	<combo_box label="Opløsning" name="postcard_size_combo">
-		<combo_item name="CurrentWindow">
-			Aktuelle vindue
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="Custom">
-			Manuel
-		</combo_item>
-	</combo_box>
-	<combo_box label="Opløsning" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
-			Aktuelle vindue
-		</combo_item>
-		<combo_item name="Small(128x128)">
-			Lille (128x128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
-			Medium (256x256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
-			Stor (512x512)
-		</combo_item>
-		<combo_item name="Custom">
-			Manuel
-		</combo_item>
-	</combo_box>
-	<combo_box label="Opløsning" name="local_size_combo">
-		<combo_item name="CurrentWindow">
-			Aktuelle vindue
-		</combo_item>
-		<combo_item name="320x240">
-			320x240
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="1280x1024">
-			1280x1024
-		</combo_item>
-		<combo_item name="1600x1200">
-			1600x1200
-		</combo_item>
-		<combo_item name="Custom">
-			Manuelt
-		</combo_item>
-	</combo_box>
-	<combo_box label="Fil-format" name="local_format_combo">
-		<combo_item name="PNG">
-			PNG
-		</combo_item>
-		<combo_item name="JPEG">
-			JPEG
-		</combo_item>
-		<combo_item name="BMP">
-			BMP
-		</combo_item>
-	</combo_box>
-	<spinner label="Bredde" name="snapshot_width" />
-	<spinner label="Højde" name="snapshot_height" />
-	<check_box label="Fasthold proportioner" name="keep_aspect_check" />
-	<slider label="Billed-kvalitet" name="image_quality_slider" />
-	<text name="layer_type_label">
-		Benyt:
-	</text>
-	<combo_box label="Billedlag" name="layer_types">
-		<combo_item name="Colors">
-			Farver
-		</combo_item>
-		<combo_item name="Depth">
-			Dybde
-		</combo_item>
-		<combo_item name="ObjectMattes">
-			Materinger
-		</combo_item>
-	</combo_box>
-	<check_box label="Vis brugerflade på foto" name="ui_check" />
-	<check_box label="Vis HUD objekter på foto" name="hud_check" />
-	<check_box label="Luk ikke vindue ved gemning" name="keep_open_check" />
-	<check_box label="Frys billede og vis" name="freeze_frame_check" />
-	<check_box label="Auto-opdater" name="auto_snapshot_check" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Snapshot" title="Se foto">
+	<text name="type_label">
+		Hvor skal foto hen?
+	</text>
+	<radio_group label="Snapshot type" name="snapshot_type_radio">
+		<radio_item name="postcard">
+			Send via e-mail
+		</radio_item>
+		<radio_item name="texture">
+			Gem i din beholdning (L$[AMOUNT])
+		</radio_item>
+		<radio_item name="local">
+			Gem på din computer
+		</radio_item>
+	</radio_group>
+	<text name="file_size_label">
+		Fil størrelse: [SIZE] KB
+	</text>
+	<button label="Tag nyt foto" name="new_snapshot_btn" />
+	<button label="Send" name="send_btn" />
+	<button label="Gem (L$[AMOUNT])" name="upload_btn" />
+	<flyout_button label="Gem" name="save_btn"  />
+	<button label="Annullér" name="discard_btn" />
+	<button label="Mere &gt;&gt;" name="more_btn"  />
+	<button label="&lt;&lt; Mindre" name="less_btn"  />
+	<text name="type_label2">
+		Størrelse
+	</text>
+	<text name="format_label">
+		Format
+	</text>
+	<combo_box label="Opløsning" name="postcard_size_combo">
+		<combo_item name="CurrentWindow">
+			Aktuelle vindue
+		</combo_item>
+		<combo_item name="640x480">
+			640x480
+		</combo_item>
+		<combo_item name="800x600">
+			800x600
+		</combo_item>
+		<combo_item name="1024x768">
+			1024x768
+		</combo_item>
+		<combo_item name="Custom">
+			Manuel
+		</combo_item>
+	</combo_box>
+	<combo_box label="Opløsning" name="texture_size_combo">
+		<combo_item name="CurrentWindow">
+			Aktuelle vindue
+		</combo_item>
+		<combo_item name="Small(128x128)">
+			Lille (128x128)
+		</combo_item>
+		<combo_item name="Medium(256x256)">
+			Medium (256x256)
+		</combo_item>
+		<combo_item name="Large(512x512)">
+			Stor (512x512)
+		</combo_item>
+		<combo_item name="Custom">
+			Manuel
+		</combo_item>
+	</combo_box>
+	<combo_box label="Opløsning" name="local_size_combo">
+		<combo_item name="CurrentWindow">
+			Aktuelle vindue
+		</combo_item>
+		<combo_item name="320x240">
+			320x240
+		</combo_item>
+		<combo_item name="640x480">
+			640x480
+		</combo_item>
+		<combo_item name="800x600">
+			800x600
+		</combo_item>
+		<combo_item name="1024x768">
+			1024x768
+		</combo_item>
+		<combo_item name="1280x1024">
+			1280x1024
+		</combo_item>
+		<combo_item name="1600x1200">
+			1600x1200
+		</combo_item>
+		<combo_item name="Custom">
+			Manuelt
+		</combo_item>
+	</combo_box>
+	<combo_box label="Fil-format" name="local_format_combo">
+		<combo_item name="PNG">
+			PNG
+		</combo_item>
+		<combo_item name="JPEG">
+			JPEG
+		</combo_item>
+		<combo_item name="BMP">
+			BMP
+		</combo_item>
+	</combo_box>
+	<spinner label="Bredde" name="snapshot_width" />
+	<spinner label="Højde" name="snapshot_height" />
+	<check_box label="Fasthold proportioner" name="keep_aspect_check" />
+	<slider label="Billed-kvalitet" name="image_quality_slider" />
+	<text name="layer_type_label">
+		Benyt:
+	</text>
+	<combo_box label="Billedlag" name="layer_types">
+		<combo_item name="Colors">
+			Farver
+		</combo_item>
+		<combo_item name="Depth">
+			Dybde
+		</combo_item>
+		<combo_item name="ObjectMattes">
+			Materinger
+		</combo_item>
+	</combo_box>
+	<check_box label="Vis brugerflade på foto" name="ui_check" />
+	<check_box label="Vis HUD objekter på foto" name="hud_check" />
+	<check_box label="Luk ikke vindue ved gemning" name="keep_open_check" />
+	<check_box label="Frys billede og vis" name="freeze_frame_check" />
+	<check_box label="Auto-opdater" name="auto_snapshot_check" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_sound_preview.xml b/indra/newview/skins/default/xui/da/floater_sound_preview.xml
index e4590201c3..c0d2f76ea9 100644
--- a/indra/newview/skins/default/xui/da/floater_sound_preview.xml
+++ b/indra/newview/skins/default/xui/da/floater_sound_preview.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Name/Description" title="sound.wav">
-	<text name="name_label">
-		Navn:
-	</text>
-	<text name="description_label">
-		Beskrivelse:
-	</text>
-	<button label="Annullér" label_selected="Annullér" name="cancel_btn" />
-	<button label="Hent (L$[AMOUNT])" label_selected="Hent (L$[AMOUNT])" name="ok_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Name/Description" title="sound.wav">
+	<text name="name_label">
+		Navn:
+	</text>
+	<text name="description_label">
+		Beskrivelse:
+	</text>
+	<button label="Annullér" label_selected="Annullér" name="cancel_btn" />
+	<button label="Hent (L$[AMOUNT])" label_selected="Hent (L$[AMOUNT])" name="ok_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_telehub.xml b/indra/newview/skins/default/xui/da/floater_telehub.xml
index d045850573..32c5448508 100644
--- a/indra/newview/skins/default/xui/da/floater_telehub.xml
+++ b/indra/newview/skins/default/xui/da/floater_telehub.xml
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="telehub" title="Telehub">
-	<text name="status_text_connected">
-		Telehub forbundet til objekt [OBJECT]
-	</text>
-	<text name="status_text_not_connected">
-		Ingen telehub forbundet.
-	</text>
-	<text name="help_text_connected">
-		For at fjerne, tryk &apos;Afslut&apos;.
-	</text>
-	<text name="help_text_not_connected">
-		230;lg objekt og klik &apos;Forbind telehub&apos;.
-	</text>
-	<button label="Forbind telehub" name="connect_btn" />
-	<button label="Afslut" name="disconnect_btn" />
-	<text name="spawn_points_text">
-		Ankomst punkter (positioner, ikke objekter):
-	</text>
-	<button label="Tilføj punkt" name="add_spawn_point_btn" />
-	<button label="Fjern punkt" name="remove_spawn_point_btn" />
-	<text name="spawn_point_help">
-		Vælg objekt og klik på &apos;Tilføj punkt&apos;for at angive position.
-Du kan derefter flytte eller slette objektet.
-Positioner er i forhold til telehub center.
-Vælg emne i listen for at vise position i verden.
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="telehub" title="Telehub">
+	<text name="status_text_connected">
+		Telehub forbundet til objekt [OBJECT]
+	</text>
+	<text name="status_text_not_connected">
+		Ingen telehub forbundet.
+	</text>
+	<text name="help_text_connected">
+		For at fjerne, tryk &apos;Afslut&apos;.
+	</text>
+	<text name="help_text_not_connected">
+		230;lg objekt og klik &apos;Forbind telehub&apos;.
+	</text>
+	<button label="Forbind telehub" name="connect_btn" />
+	<button label="Afslut" name="disconnect_btn" />
+	<text name="spawn_points_text">
+		Ankomst punkter (positioner, ikke objekter):
+	</text>
+	<button label="Tilføj punkt" name="add_spawn_point_btn" />
+	<button label="Fjern punkt" name="remove_spawn_point_btn" />
+	<text name="spawn_point_help">
+		Vælg objekt og klik på &apos;Tilføj punkt&apos;for at angive position.
+Du kan derefter flytte eller slette objektet.
+Positioner er i forhold til telehub center.
+Vælg emne i listen for at vise position i verden.
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml
index 1fb5bc01a4..513a629bfa 100644
--- a/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml
@@ -1,24 +1,24 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="texture picker" title="Vælg: Tekstur">
-	<string name="choose_picture">
-		Klik for at vælge et billede
-	</string>
-	<text type="string" length="1" name="Multiple">
-		Flere
-	</text>
-	<text type="string" length="1" name="unknown">
-		Størrelse: [DIMENSIONS]
-	</text>
-	<button label="Standard" label_selected="Standard" name="Default" />
-	<button label="Ingen" label_selected="Ingen" name="None" />
-	<button label="Blank" label_selected="Blank" name="Blank" />
-	<check_box label="Vis mapper" name="show_folders_check" />
-	<search_editor label="Skriv her for at søge" name="inventory search editor" />
-	<check_box label="Benyt straks" name="apply_immediate_check" />
-	<button label="" label_selected="" name="Pipette" />
-	<button label="Annullér" label_selected="Annullér" name="Cancel" />
-	<button label="Vælg" label_selected="Vælg" name="Select" />
-	<string name="pick title">
-		Vælg:
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="texture picker" title="Vælg: Tekstur">
+	<string name="choose_picture">
+		Klik for at vælge et billede
+	</string>
+	<text type="string" length="1" name="Multiple">
+		Flere
+	</text>
+	<text type="string" length="1" name="unknown">
+		Størrelse: [DIMENSIONS]
+	</text>
+	<button label="Standard" label_selected="Standard" name="Default" />
+	<button label="Ingen" label_selected="Ingen" name="None" />
+	<button label="Blank" label_selected="Blank" name="Blank" />
+	<check_box label="Vis mapper" name="show_folders_check" />
+	<search_editor label="Skriv her for at søge" name="inventory search editor" />
+	<check_box label="Benyt straks" name="apply_immediate_check" />
+	<button label="" label_selected="" name="Pipette" />
+	<button label="Annullér" label_selected="Annullér" name="Cancel" />
+	<button label="Vælg" label_selected="Vælg" name="Select" />
+	<string name="pick title">
+		Vælg:
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_tools.xml b/indra/newview/skins/default/xui/da/floater_tools.xml
index 0f5c29b6d4..bc15db0e25 100644
--- a/indra/newview/skins/default/xui/da/floater_tools.xml
+++ b/indra/newview/skins/default/xui/da/floater_tools.xml
@@ -1,556 +1,556 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="toolbox floater" title="">
-	<button label="" label_selected="" name="button focus" tool_tip="Fokus" />
-	<button label="" label_selected="" name="button move" tool_tip="Flyt" />
-	<button label="" label_selected="" name="button edit" tool_tip="Redigér" />
-	<button label="" label_selected="" name="button create" tool_tip="Opret" />
-	<button label="" label_selected="" name="button land" tool_tip="Land" />
-	<check_box label="Zoom" name="radio zoom" />
-	<check_box label="Kredsløb (Ctrl)" name="radio orbit" />
-	<check_box label="Panorér (Ctrl-Shift)" name="radio pan" />
-	<check_box label="Flyt" name="radio move" />
-	<check_box label="Løft (Ctrl)" name="radio lift" />
-	<check_box label="Spin (Ctrl-Shift)" name="radio spin" />
-	<check_box label="Position" name="radio position" />
-	<check_box label="Rotér (Ctrl)" name="radio rotate" />
-	<check_box label="Stræk (Ctrl-Shift)" name="radio stretch" />
-	<check_box label="Vælg tekstur" name="radio select face" />
-	<check_box label="Redigér sammenlænkede dele" name="checkbox edit linked parts" />
-	<text name="text ruler mode">
-		Lineal:
-	</text>
-	<combo_box name="combobox grid mode">
-		<combo_item name="World">
-			Verden
-		</combo_item>
-		<combo_item name="Local">
-			Lokal
-		</combo_item>
-		<combo_item name="Reference">
-			Reference
-		</combo_item>
-	</combo_box>
-	<check_box label="Stræk begge sider" name="checkbox uniform" />
-	<check_box label="Stræk teksturer" name="checkbox stretch textures" />
-	<check_box label="Benyt gitter" name="checkbox snap to grid" />
-	<button label="Valg..." label_selected="Valg..." name="Options..." />
-	<text name="text status">
-		Træk for at flytte, shift+træk for at kopiere
-	</text>
-	<button label="" label_selected="" name="ToolCube" tool_tip="Terning" />
-	<button label="" label_selected="" name="ToolPrism" tool_tip="Prisme" />
-	<button label="" label_selected="" name="ToolPyramid" tool_tip="Pyramide" />
-	<button label="" label_selected="" name="ToolTetrahedron" tool_tip="Tetraed" />
-	<button label="" label_selected="" name="ToolCylinder" tool_tip="Cylinder" />
-	<button label="" label_selected="" name="ToolHemiCylinder" tool_tip="Hemicylinder" />
-	<button label="" label_selected="" name="ToolCone" tool_tip="Kegle" />
-	<button label="" label_selected="" name="ToolHemiCone" tool_tip="Hemikegle" />
-	<button label="" label_selected="" name="ToolSphere" tool_tip="Sfære" />
-	<button label="" label_selected="" name="ToolHemiSphere" tool_tip="Hemisfære" />
-	<button label="" label_selected="" name="ToolTorus" tool_tip="Kuglering" />
-	<button label="" label_selected="" name="ToolTube" tool_tip="Rør" />
-	<button label="" label_selected="" name="ToolRing" tool_tip="Ring" />
-	<button label="" label_selected="" name="ToolTree" tool_tip="Træ" />
-	<button label="" label_selected="" name="ToolGrass" tool_tip="Græs" />
-	<check_box label="Hold værktøjet valgt" name="checkbox sticky" />
-	<check_box label="Kopiér valgte" name="checkbox copy selection" />
-	<check_box label="Centréret kopi" name="checkbox copy centers" />
-	<check_box label="Rotér kopi" name="checkbox copy rotates" />
-	<check_box label="Vælg land" name="radio select land" />
-	<check_box label="Udflad land" name="radio flatten" />
-	<check_box label="Hæv land" name="radio raise" />
-	<check_box label="Sænk land" name="radio lower" />
-	<check_box label="Udjævn land" name="radio smooth" />
-	<check_box label="Gør land ujævnt" name="radio noise" />
-	<check_box label="Tilbagefør" name="radio revert" />
-	<combo_box name="combobox brush size">
-		<combo_item name="Small">
-			Lille
-		</combo_item>
-		<combo_item name="Medium">
-			Mellem
-		</combo_item>
-		<combo_item name="Large">
-			Stor
-		</combo_item>
-	</combo_box>
-	<text type="string" length="1" name="Strength:">
-		Styrke:
-	</text>
-	<button label="Anvend på valgte" label_selected="Anvend på valgte"
-	     name="button apply to selection" tool_tip="Redigér valgt land" />
-	<check_box label="Vis ejere" name="checkbox show owners" />
-	<button label="Mere &gt;&gt;" name="button more" tool_tip="Adancerede valgmuligheder" />
-	<button label="&lt;&lt; Mindre" name="button less" tool_tip="Adancerede valgmuligheder" />
-	<tab_container name="Object Info Tabs">
-		<panel label="Generelt" name="General">
-			<text name="Name:">
-				Navn:
-			</text>
-			<text name="Description:">
-				Beskrivelse:
-			</text>
-			<text name="Creator:">
-				Skaber:
-			</text>
-			<text name="Creator Name">
-				Thrax Linden
-			</text>
-			<button label="Profil..." label_selected="Profil..." name="button creator profile" />
-			<text name="Owner:">
-				Ejer:
-			</text>
-			<text name="Owner Name">
-				Thrax Linden
-			</text>
-			<button label="Profil..." label_selected="Profil..." name="button owner profile" />
-			<text name="Group:">
-				Gruppe:
-			</text>
-			<text name="Group Name Proxy">
-				The Lindens
-			</text>
-			<button label="Sæt..." label_selected="Sæt..." name="button set group" />
-			<text name="prim info">
-				1 Objekt, 1 Prim
-			</text>
-			<text name="Permissions:">
-				Tilladelser:
-			</text>
-			<text name="perm_modify">
-				Du kan redigére dette objekt.
-			</text>
-			<check_box label="Del med gruppe" name="checkbox share with group"
-			     tool_tip="Tillad gruppemedlemmer at flytte, ændre, kopiere og slette." />
-			<string name="text deed continued">
-				Deed...
-			</string>
-			<string name="text deed">
-				Deed
-			</string>
-			<button label="Dedikér..." label_selected="Dedikér..." name="button deed"
-			     tool_tip="Gruppedelte genstande kan dedikeres af en gruppeadministrator." />
-			<check_box label="Tillad enhver at flytte" name="checkbox allow everyone move" />
-			<check_box label="Tillad enhver at kopiére" name="checkbox allow everyone copy" />
-			<check_box label="Vis i søgning" name="search_check"
-			     tool_tip="Lad folk se dette objekt i søgeresultater" />
-			<check_box label="Til salg" name="checkbox for sale" />
-			<text name="Cost">
-				Pris:  L$
-			</text>
-			<radio_group name="sale type">
-				<radio_item name="Original">
-					Original
-				</radio_item>
-				<radio_item name="Copy">
-					Kopi
-				</radio_item>
-				<radio_item name="Contents">
-					Indhold
-				</radio_item>
-			</radio_group>
-			<text name="Next owner can:">
-				Næste ejer kan:
-			</text>
-			<check_box label="Redigére" name="checkbox next owner can modify" />
-			<check_box label="Kopiére" name="checkbox next owner can copy" />
-			<check_box label="Sælge/Give væk" name="checkbox next owner can transfer" />
-			<text name="label click action">
-				Når der venstreklikkes:
-			</text>
-			<combo_box name="clickaction">
-				<combo_item name="Touch/grab(default)">
-					Rør/tag (standard)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					Sid på objekt
-				</combo_item>
-				<combo_item name="Buyobject">
-					Køb objekt
-				</combo_item>
-				<combo_item name="Payobject">
-					Betal objekt
-				</combo_item>
-				<combo_item name="Open">
-					Åben
-				</combo_item>
-				<combo_item name="Play">
-					Afspil medie på parcel
-				</combo_item>
-				<combo_item name="Opemmedia">
-					Åben media på parcel
-				</combo_item>
-			</combo_box>
-			<text name="B:">
-				B:
-			</text>
-			<text name="O:">
-				O:
-			</text>
-			<text name="G:">
-				G:
-			</text>
-			<text name="E:">
-				E:
-			</text>
-			<text name="N:">
-				N:
-			</text>
-			<text name="F:">
-				F:
-			</text>
-		</panel>
-		<panel label="Objekt" name="Object">
-			<text name="select_single">
-				Vælg kun én prim for at ændre indstillinger.
-			</text>
-			<text name="edit_object">
-				Ret objektets indstillinger:
-			</text>
-			<check_box label="Låst" name="checkbox locked"
-			     tool_tip="Forhindrer objektet i at blive flyttet eller slettet. Ofte brugbar under byggeri for at forhindre utilsigtet ændring." />
-			<check_box label="Fysisk" name="Physical Checkbox Ctrl"
-			     tool_tip="Tillader objekter at blive skubbet og at være påvirkelig af tyngdekraften" />
-			<check_box label="Temporær" name="Temporary Checkbox Ctrl"
-			     tool_tip="Medfårer at objekter bliver slettet 1 minut efter de er skabt." />
-			<check_box label="Uden masse" name="Phantom Checkbox Ctrl"
-			     tool_tip="Får objektet til ikke at kollidere med andre objekter eller personer" />
-			<text name="label position">
-				Position (meter)
-			</text>
-			<spinner label="X" name="Pos X" />
-			<spinner label="Y" name="Pos Y" />
-			<spinner label="Z" name="Pos Z" />
-			<text name="label size">
-				Størrelse (meter)
-			</text>
-			<spinner label="X" name="Scale X" />
-			<spinner label="Y" name="Scale Y" />
-			<spinner label="Z" name="Scale Z" />
-			<text name="label rotation">
-				Rotation (grader)
-			</text>
-			<spinner label="X" name="Rot X" />
-			<spinner label="Y" name="Rot Y" />
-			<spinner label="Z" name="Rot Z" />
-			<text name="label material">
-				Materiale
-			</text>
-			<combo_box name="material">
-				<combo_item name="Stone">
-					Sten
-				</combo_item>
-				<combo_item name="Metal">
-					Metal
-				</combo_item>
-				<combo_item name="Glass">
-					Glas
-				</combo_item>
-				<combo_item name="Wood">
-					Træ
-				</combo_item>
-				<combo_item name="Flesh">
-					Kød
-				</combo_item>
-				<combo_item name="Plastic">
-					Plastik
-				</combo_item>
-				<combo_item name="Rubber">
-					Gummi
-				</combo_item>
-			</combo_box>
-			<text name="label basetype">
-				Byggegeometrisk figur
-			</text>
-			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					Terning
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cylinder
-				</combo_item>
-				<combo_item name="Prism">
-					Prisme
-				</combo_item>
-				<combo_item name="Sphere">
-					Spfære
-				</combo_item>
-				<combo_item name="Torus">
-					Kuglering
-				</combo_item>
-				<combo_item name="Tube">
-					Rør
-				</combo_item>
-				<combo_item name="Ring">
-					Ring
-				</combo_item>
-				<combo_item name="Sculpted">
-					Sculpted
-				</combo_item>
-			</combo_box>
-			<text name="text cut">
-				Snit begynd og slut
-			</text>
-			<spinner label="B" name="cut begin" />
-			<spinner label="E" name="cut end" />
-			<text name="text hollow">
-				Hul
-			</text>
-			<text name="text skew">
-				Skævhed
-			</text>
-			<text name="Hollow Shape">
-				Form på hul
-			</text>
-			<combo_box name="hole">
-				<combo_item name="Default">
-					Standard
-				</combo_item>
-				<combo_item name="Circle">
-					Cirkel
-				</combo_item>
-				<combo_item name="Square">
-					Firkant
-				</combo_item>
-				<combo_item name="Triangle">
-					Trekant
-				</combo_item>
-			</combo_box>
-			<text name="text twist">
-				Vrid - start og slut
-			</text>
-			<spinner label="B" name="Twist Begin" />
-			<spinner label="E" name="Twist End" />
-			<text name="scale_taper">
-				Konus
-			</text>
-			<text name="scale_hole">
-				Hulstørrelse
-			</text>
-			<spinner label="X" name="Taper Scale X" />
-			<spinner label="Y" name="Taper Scale Y" />
-			<text name="text topshear">
-				Topforskydning
-			</text>
-			<spinner label="X" name="Shear X" />
-			<spinner label="Y" name="Shear Y" />
-			<text name="advanced_cut">
-				Profilsnit - begynd og slut
-			</text>
-			<text name="advanced_dimple">
-				Fordybning - begynd og slut
-			</text>
-			<spinner label="B" name="Path Limit Begin" />
-			<spinner label="E" name="Path Limit End" />
-			<text name="text taper2">
-				Konus
-			</text>
-			<spinner label="X" name="Taper X" />
-			<spinner label="Y" name="Taper Y" />
-			<text name="text radius delta">
-				Radius
-			</text>
-			<text name="text revolutions">
-				Omdrejninger
-			</text>
-			<texture_picker label="Sculpt tekstur" name="sculpt texture control"
-			     tool_tip="Klik her for at vælge billede" />
-			<check_box label="Spejlet" name="sculpt mirror control"
-			     tool_tip="Spejler sculpted prim omkring X aksen." />
-			<check_box label="Vrangen ud" name="sculpt invert control"
-			     tool_tip="Vender &apos;vrangen&apos; ud på sculpted prim." />
-			<text name="label sculpt type">
-				Sting type
-			</text>
-			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(ingen)
-				</combo_item>
-				<combo_item name="Sphere">
-					Sfære
-				</combo_item>
-				<combo_item name="Torus">
-					Kuglering
-				</combo_item>
-				<combo_item name="Plane">
-					Plan
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cylinder
-				</combo_item>
-			</combo_box>
-		</panel>
-		<panel label="Features" name="Features">
-			<text name="select_single">
-				Vælg kun én prim for at ændre egenskaber.
-			</text>
-			<text name="edit_object">
-				Redigér objektets egenskaber:
-			</text>
-			<check_box label="Fleksibel/blød" name="Flexible1D Checkbox Ctrl"
-			     tool_tip="Tillader objektet at ændre form omkring Z-aksen. (Kun på klient-siden)" />
-			<spinner label="Blødhed" name="FlexNumSections" />
-			<spinner label="Tyngdekraft" name="FlexGravity" />
-			<spinner label="Træk" name="FlexFriction" />
-			<spinner label="Vind" name="FlexWind" />
-			<spinner label="Spændstighed" name="FlexTension" />
-			<spinner label="Kraft X" name="FlexForceX" />
-			<spinner label="Kraft Y" name="FlexForceY" />
-			<spinner label="Kraft Z" name="FlexForceZ" />
-			<check_box label="Lys" name="Light Checkbox Ctrl"
-			     tool_tip="Medfårer at objektet afgiver lys" />
-			<text name="label color">
-				Farve
-			</text>
-			<color_swatch label="" name="colorswatch" tool_tip="Klik for at åbne farvevælger" />
-			<spinner label="Intensitet" name="Light Intensity" />
-			<spinner label="Radius" name="Light Radius" />
-			<spinner label="Udfasning" name="Light Falloff" />
-		</panel>
-		<panel label="Tekstur" name="Texture">
-			<texture_picker label="Tekstur" name="texture control" tool_tip="Klik for at vælge billede" />
-			<color_swatch label="Farve" name="colorswatch" tool_tip="Klik for at åbne farvevælger" />
-			<text name="color trans">
-				Gennemsigtighed %
-			</text>
-			<text name="glow label">
-				Glød
-			</text>
-			<check_box label="Selvlysende" name="checkbox fullbright" />
-			<text name="tex gen">
-				Afbildning
-			</text>
-			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					Standard
-				</combo_item>
-				<combo_item name="Planar">
-					Plan
-				</combo_item>
-			</combo_box>
-			<text name="label shininess">
-				Blankhed
-			</text>
-			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					Ingen
-				</combo_item>
-				<combo_item name="Low">
-					Lav
-				</combo_item>
-				<combo_item name="Medium">
-					Mellem
-				</combo_item>
-				<combo_item name="High">
-					Høj
-				</combo_item>
-			</combo_box>
-			<text name="label bumpiness">
-				Struktur
-			</text>
-			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					Ingen
-				</combo_item>
-				<combo_item name="Brightness">
-					Lysintensitet
-				</combo_item>
-				<combo_item name="Darkness">
-					Mørke
-				</combo_item>
-				<combo_item name="woodgrain">
-					træårer
-				</combo_item>
-				<combo_item name="bark">
-					bark
-				</combo_item>
-				<combo_item name="bricks">
-					mursten
-				</combo_item>
-				<combo_item name="checker">
-					tern
-				</combo_item>
-				<combo_item name="concrete">
-					beton
-				</combo_item>
-				<combo_item name="crustytile">
-					rustik flise
-				</combo_item>
-				<combo_item name="cutstone">
-					Skåret sten
-				</combo_item>
-				<combo_item name="discs">
-					plader
-				</combo_item>
-				<combo_item name="gravel">
-					grus
-				</combo_item>
-				<combo_item name="petridish">
-					petriskål
-				</combo_item>
-				<combo_item name="siding">
-					udvendig beklædning
-				</combo_item>
-				<combo_item name="stonetile">
-					stenflise
-				</combo_item>
-				<combo_item name="stucco">
-					puds
-				</combo_item>
-				<combo_item name="suction">
-					rør
-				</combo_item>
-				<combo_item name="weave">
-					væv
-				</combo_item>
-			</combo_box>
-			<text name="tex scale">
-				Gentagelser pr. overflade
-			</text>
-			<spinner label="Vandret (U)" name="TexScaleU" />
-			<check_box label="Vend" name="checkbox flip s" />
-			<spinner label="Lodret (V)" name="TexScaleV" />
-			<check_box label="Vend" name="checkbox flip t" />
-			<text name="tex rotate">
-				Rotation (grader)
-			</text>
-			<string name="string repeats per meter">
-				Gentagelser pr. meter
-			</string>
-			<string name="string repeats per face">
-				Gentagelser pr. overflade
-			</string>
-			<text name="rpt">
-				Gentagelser pr. meter
-			</text>
-			<button label="Gem" label_selected="Gem" name="button apply" />
-			<text name="tex offset">
-				Offset
-			</text>
-			<spinner label="Vandret (U)" name="TexOffsetU" />
-			<spinner label="Lodret (V)" name="TexOffsetV" />
-			<text name="textbox autofix">
-				Rette medie tekstur ind
-(skal indlæses først)
-			</text>
-			<button label="Ret ind" label_selected="Ret ind" name="button align" />
-		</panel>
-		<panel label="Indhold" name="Contents">
-			<button label="Nyt script..." label_selected="Nyt script..." name="button new script" />
-		</panel>
-	</tab_container>
-	<panel name="land info panel">
-		<text name="label_area_price">
-			Pris: L$[PRICE] for [AREA] m².
-		</text>
-		<text name="label_area">
-			Område: [AREA] m².
-		</text>
-		<button label="Køb land..." label_selected="Køb land..." name="button buy land" />
-		<button label="Flyt fra land..." label_selected="Flyt fra land..."
-		     name="button abandon land" />
-		<button label="Opdel..." label_selected="Opdel..." name="button subdivide land" />
-		<button label="Saml..." label_selected="Saml..." name="button join land" />
-		<button label="Om land..." label_selected="Om land..." name="button about land" />
-	</panel>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="toolbox floater" title="">
+	<button label="" label_selected="" name="button focus" tool_tip="Fokus" />
+	<button label="" label_selected="" name="button move" tool_tip="Flyt" />
+	<button label="" label_selected="" name="button edit" tool_tip="Redigér" />
+	<button label="" label_selected="" name="button create" tool_tip="Opret" />
+	<button label="" label_selected="" name="button land" tool_tip="Land" />
+	<check_box label="Zoom" name="radio zoom" />
+	<check_box label="Kredsløb (Ctrl)" name="radio orbit" />
+	<check_box label="Panorér (Ctrl-Shift)" name="radio pan" />
+	<check_box label="Flyt" name="radio move" />
+	<check_box label="Løft (Ctrl)" name="radio lift" />
+	<check_box label="Spin (Ctrl-Shift)" name="radio spin" />
+	<check_box label="Position" name="radio position" />
+	<check_box label="Rotér (Ctrl)" name="radio rotate" />
+	<check_box label="Stræk (Ctrl-Shift)" name="radio stretch" />
+	<check_box label="Vælg tekstur" name="radio select face" />
+	<check_box label="Redigér sammenlænkede dele" name="checkbox edit linked parts" />
+	<text name="text ruler mode">
+		Lineal:
+	</text>
+	<combo_box name="combobox grid mode">
+		<combo_item name="World">
+			Verden
+		</combo_item>
+		<combo_item name="Local">
+			Lokal
+		</combo_item>
+		<combo_item name="Reference">
+			Reference
+		</combo_item>
+	</combo_box>
+	<check_box label="Stræk begge sider" name="checkbox uniform" />
+	<check_box label="Stræk teksturer" name="checkbox stretch textures" />
+	<check_box label="Benyt gitter" name="checkbox snap to grid" />
+	<button label="Valg..." label_selected="Valg..." name="Options..." />
+	<text name="text status">
+		Træk for at flytte, shift+træk for at kopiere
+	</text>
+	<button label="" label_selected="" name="ToolCube" tool_tip="Terning" />
+	<button label="" label_selected="" name="ToolPrism" tool_tip="Prisme" />
+	<button label="" label_selected="" name="ToolPyramid" tool_tip="Pyramide" />
+	<button label="" label_selected="" name="ToolTetrahedron" tool_tip="Tetraed" />
+	<button label="" label_selected="" name="ToolCylinder" tool_tip="Cylinder" />
+	<button label="" label_selected="" name="ToolHemiCylinder" tool_tip="Hemicylinder" />
+	<button label="" label_selected="" name="ToolCone" tool_tip="Kegle" />
+	<button label="" label_selected="" name="ToolHemiCone" tool_tip="Hemikegle" />
+	<button label="" label_selected="" name="ToolSphere" tool_tip="Sfære" />
+	<button label="" label_selected="" name="ToolHemiSphere" tool_tip="Hemisfære" />
+	<button label="" label_selected="" name="ToolTorus" tool_tip="Kuglering" />
+	<button label="" label_selected="" name="ToolTube" tool_tip="Rør" />
+	<button label="" label_selected="" name="ToolRing" tool_tip="Ring" />
+	<button label="" label_selected="" name="ToolTree" tool_tip="Træ" />
+	<button label="" label_selected="" name="ToolGrass" tool_tip="Græs" />
+	<check_box label="Hold værktøjet valgt" name="checkbox sticky" />
+	<check_box label="Kopiér valgte" name="checkbox copy selection" />
+	<check_box label="Centréret kopi" name="checkbox copy centers" />
+	<check_box label="Rotér kopi" name="checkbox copy rotates" />
+	<check_box label="Vælg land" name="radio select land" />
+	<check_box label="Udflad land" name="radio flatten" />
+	<check_box label="Hæv land" name="radio raise" />
+	<check_box label="Sænk land" name="radio lower" />
+	<check_box label="Udjævn land" name="radio smooth" />
+	<check_box label="Gør land ujævnt" name="radio noise" />
+	<check_box label="Tilbagefør" name="radio revert" />
+	<combo_box name="combobox brush size">
+		<combo_item name="Small">
+			Lille
+		</combo_item>
+		<combo_item name="Medium">
+			Mellem
+		</combo_item>
+		<combo_item name="Large">
+			Stor
+		</combo_item>
+	</combo_box>
+	<text type="string" length="1" name="Strength:">
+		Styrke:
+	</text>
+	<button label="Anvend på valgte" label_selected="Anvend på valgte"
+	     name="button apply to selection" tool_tip="Redigér valgt land" />
+	<check_box label="Vis ejere" name="checkbox show owners" />
+	<button label="Mere &gt;&gt;" name="button more" tool_tip="Adancerede valgmuligheder" />
+	<button label="&lt;&lt; Mindre" name="button less" tool_tip="Adancerede valgmuligheder" />
+	<tab_container name="Object Info Tabs">
+		<panel label="Generelt" name="General">
+			<text name="Name:">
+				Navn:
+			</text>
+			<text name="Description:">
+				Beskrivelse:
+			</text>
+			<text name="Creator:">
+				Skaber:
+			</text>
+			<text name="Creator Name">
+				Thrax Linden
+			</text>
+			<button label="Profil..." label_selected="Profil..." name="button creator profile" />
+			<text name="Owner:">
+				Ejer:
+			</text>
+			<text name="Owner Name">
+				Thrax Linden
+			</text>
+			<button label="Profil..." label_selected="Profil..." name="button owner profile" />
+			<text name="Group:">
+				Gruppe:
+			</text>
+			<text name="Group Name Proxy">
+				The Lindens
+			</text>
+			<button label="Sæt..." label_selected="Sæt..." name="button set group" />
+			<text name="prim info">
+				1 Objekt, 1 Prim
+			</text>
+			<text name="Permissions:">
+				Tilladelser:
+			</text>
+			<text name="perm_modify">
+				Du kan redigére dette objekt.
+			</text>
+			<check_box label="Del med gruppe" name="checkbox share with group"
+			     tool_tip="Tillad gruppemedlemmer at flytte, ændre, kopiere og slette." />
+			<string name="text deed continued">
+				Deed...
+			</string>
+			<string name="text deed">
+				Deed
+			</string>
+			<button label="Dedikér..." label_selected="Dedikér..." name="button deed"
+			     tool_tip="Gruppedelte genstande kan dedikeres af en gruppeadministrator." />
+			<check_box label="Tillad enhver at flytte" name="checkbox allow everyone move" />
+			<check_box label="Tillad enhver at kopiére" name="checkbox allow everyone copy" />
+			<check_box label="Vis i søgning" name="search_check"
+			     tool_tip="Lad folk se dette objekt i søgeresultater" />
+			<check_box label="Til salg" name="checkbox for sale" />
+			<text name="Cost">
+				Pris:  L$
+			</text>
+			<radio_group name="sale type">
+				<radio_item name="Original">
+					Original
+				</radio_item>
+				<radio_item name="Copy">
+					Kopi
+				</radio_item>
+				<radio_item name="Contents">
+					Indhold
+				</radio_item>
+			</radio_group>
+			<text name="Next owner can:">
+				Næste ejer kan:
+			</text>
+			<check_box label="Redigére" name="checkbox next owner can modify" />
+			<check_box label="Kopiére" name="checkbox next owner can copy" />
+			<check_box label="Sælge/Give væk" name="checkbox next owner can transfer" />
+			<text name="label click action">
+				Når der venstreklikkes:
+			</text>
+			<combo_box name="clickaction">
+				<combo_item name="Touch/grab(default)">
+					Rør/tag (standard)
+				</combo_item>
+				<combo_item name="Sitonobject">
+					Sid på objekt
+				</combo_item>
+				<combo_item name="Buyobject">
+					Køb objekt
+				</combo_item>
+				<combo_item name="Payobject">
+					Betal objekt
+				</combo_item>
+				<combo_item name="Open">
+					Åben
+				</combo_item>
+				<combo_item name="Play">
+					Afspil medie på parcel
+				</combo_item>
+				<combo_item name="Opemmedia">
+					Åben media på parcel
+				</combo_item>
+			</combo_box>
+			<text name="B:">
+				B:
+			</text>
+			<text name="O:">
+				O:
+			</text>
+			<text name="G:">
+				G:
+			</text>
+			<text name="E:">
+				E:
+			</text>
+			<text name="N:">
+				N:
+			</text>
+			<text name="F:">
+				F:
+			</text>
+		</panel>
+		<panel label="Objekt" name="Object">
+			<text name="select_single">
+				Vælg kun én prim for at ændre indstillinger.
+			</text>
+			<text name="edit_object">
+				Ret objektets indstillinger:
+			</text>
+			<check_box label="Låst" name="checkbox locked"
+			     tool_tip="Forhindrer objektet i at blive flyttet eller slettet. Ofte brugbar under byggeri for at forhindre utilsigtet ændring." />
+			<check_box label="Fysisk" name="Physical Checkbox Ctrl"
+			     tool_tip="Tillader objekter at blive skubbet og at være påvirkelig af tyngdekraften" />
+			<check_box label="Temporær" name="Temporary Checkbox Ctrl"
+			     tool_tip="Medfårer at objekter bliver slettet 1 minut efter de er skabt." />
+			<check_box label="Uden masse" name="Phantom Checkbox Ctrl"
+			     tool_tip="Får objektet til ikke at kollidere med andre objekter eller personer" />
+			<text name="label position">
+				Position (meter)
+			</text>
+			<spinner label="X" name="Pos X" />
+			<spinner label="Y" name="Pos Y" />
+			<spinner label="Z" name="Pos Z" />
+			<text name="label size">
+				Størrelse (meter)
+			</text>
+			<spinner label="X" name="Scale X" />
+			<spinner label="Y" name="Scale Y" />
+			<spinner label="Z" name="Scale Z" />
+			<text name="label rotation">
+				Rotation (grader)
+			</text>
+			<spinner label="X" name="Rot X" />
+			<spinner label="Y" name="Rot Y" />
+			<spinner label="Z" name="Rot Z" />
+			<text name="label material">
+				Materiale
+			</text>
+			<combo_box name="material">
+				<combo_item name="Stone">
+					Sten
+				</combo_item>
+				<combo_item name="Metal">
+					Metal
+				</combo_item>
+				<combo_item name="Glass">
+					Glas
+				</combo_item>
+				<combo_item name="Wood">
+					Træ
+				</combo_item>
+				<combo_item name="Flesh">
+					Kød
+				</combo_item>
+				<combo_item name="Plastic">
+					Plastik
+				</combo_item>
+				<combo_item name="Rubber">
+					Gummi
+				</combo_item>
+			</combo_box>
+			<text name="label basetype">
+				Byggegeometrisk figur
+			</text>
+			<combo_box name="comboBaseType">
+				<combo_item name="Box">
+					Terning
+				</combo_item>
+				<combo_item name="Cylinder">
+					Cylinder
+				</combo_item>
+				<combo_item name="Prism">
+					Prisme
+				</combo_item>
+				<combo_item name="Sphere">
+					Spfære
+				</combo_item>
+				<combo_item name="Torus">
+					Kuglering
+				</combo_item>
+				<combo_item name="Tube">
+					Rør
+				</combo_item>
+				<combo_item name="Ring">
+					Ring
+				</combo_item>
+				<combo_item name="Sculpted">
+					Sculpted
+				</combo_item>
+			</combo_box>
+			<text name="text cut">
+				Snit begynd og slut
+			</text>
+			<spinner label="B" name="cut begin" />
+			<spinner label="E" name="cut end" />
+			<text name="text hollow">
+				Hul
+			</text>
+			<text name="text skew">
+				Skævhed
+			</text>
+			<text name="Hollow Shape">
+				Form på hul
+			</text>
+			<combo_box name="hole">
+				<combo_item name="Default">
+					Standard
+				</combo_item>
+				<combo_item name="Circle">
+					Cirkel
+				</combo_item>
+				<combo_item name="Square">
+					Firkant
+				</combo_item>
+				<combo_item name="Triangle">
+					Trekant
+				</combo_item>
+			</combo_box>
+			<text name="text twist">
+				Vrid - start og slut
+			</text>
+			<spinner label="B" name="Twist Begin" />
+			<spinner label="E" name="Twist End" />
+			<text name="scale_taper">
+				Konus
+			</text>
+			<text name="scale_hole">
+				Hulstørrelse
+			</text>
+			<spinner label="X" name="Taper Scale X" />
+			<spinner label="Y" name="Taper Scale Y" />
+			<text name="text topshear">
+				Topforskydning
+			</text>
+			<spinner label="X" name="Shear X" />
+			<spinner label="Y" name="Shear Y" />
+			<text name="advanced_cut">
+				Profilsnit - begynd og slut
+			</text>
+			<text name="advanced_dimple">
+				Fordybning - begynd og slut
+			</text>
+			<spinner label="B" name="Path Limit Begin" />
+			<spinner label="E" name="Path Limit End" />
+			<text name="text taper2">
+				Konus
+			</text>
+			<spinner label="X" name="Taper X" />
+			<spinner label="Y" name="Taper Y" />
+			<text name="text radius delta">
+				Radius
+			</text>
+			<text name="text revolutions">
+				Omdrejninger
+			</text>
+			<texture_picker label="Sculpt tekstur" name="sculpt texture control"
+			     tool_tip="Klik her for at vælge billede" />
+			<check_box label="Spejlet" name="sculpt mirror control"
+			     tool_tip="Spejler sculpted prim omkring X aksen." />
+			<check_box label="Vrangen ud" name="sculpt invert control"
+			     tool_tip="Vender &apos;vrangen&apos; ud på sculpted prim." />
+			<text name="label sculpt type">
+				Sting type
+			</text>
+			<combo_box name="sculpt type control">
+				<combo_item name="None">
+					(ingen)
+				</combo_item>
+				<combo_item name="Sphere">
+					Sfære
+				</combo_item>
+				<combo_item name="Torus">
+					Kuglering
+				</combo_item>
+				<combo_item name="Plane">
+					Plan
+				</combo_item>
+				<combo_item name="Cylinder">
+					Cylinder
+				</combo_item>
+			</combo_box>
+		</panel>
+		<panel label="Features" name="Features">
+			<text name="select_single">
+				Vælg kun én prim for at ændre egenskaber.
+			</text>
+			<text name="edit_object">
+				Redigér objektets egenskaber:
+			</text>
+			<check_box label="Fleksibel/blød" name="Flexible1D Checkbox Ctrl"
+			     tool_tip="Tillader objektet at ændre form omkring Z-aksen. (Kun på klient-siden)" />
+			<spinner label="Blødhed" name="FlexNumSections" />
+			<spinner label="Tyngdekraft" name="FlexGravity" />
+			<spinner label="Træk" name="FlexFriction" />
+			<spinner label="Vind" name="FlexWind" />
+			<spinner label="Spændstighed" name="FlexTension" />
+			<spinner label="Kraft X" name="FlexForceX" />
+			<spinner label="Kraft Y" name="FlexForceY" />
+			<spinner label="Kraft Z" name="FlexForceZ" />
+			<check_box label="Lys" name="Light Checkbox Ctrl"
+			     tool_tip="Medfårer at objektet afgiver lys" />
+			<text name="label color">
+				Farve
+			</text>
+			<color_swatch label="" name="colorswatch" tool_tip="Klik for at åbne farvevælger" />
+			<spinner label="Intensitet" name="Light Intensity" />
+			<spinner label="Radius" name="Light Radius" />
+			<spinner label="Udfasning" name="Light Falloff" />
+		</panel>
+		<panel label="Tekstur" name="Texture">
+			<texture_picker label="Tekstur" name="texture control" tool_tip="Klik for at vælge billede" />
+			<color_swatch label="Farve" name="colorswatch" tool_tip="Klik for at åbne farvevælger" />
+			<text name="color trans">
+				Gennemsigtighed %
+			</text>
+			<text name="glow label">
+				Glød
+			</text>
+			<check_box label="Selvlysende" name="checkbox fullbright" />
+			<text name="tex gen">
+				Afbildning
+			</text>
+			<combo_box name="combobox texgen">
+				<combo_item name="Default">
+					Standard
+				</combo_item>
+				<combo_item name="Planar">
+					Plan
+				</combo_item>
+			</combo_box>
+			<text name="label shininess">
+				Blankhed
+			</text>
+			<combo_box name="combobox shininess">
+				<combo_item name="None">
+					Ingen
+				</combo_item>
+				<combo_item name="Low">
+					Lav
+				</combo_item>
+				<combo_item name="Medium">
+					Mellem
+				</combo_item>
+				<combo_item name="High">
+					Høj
+				</combo_item>
+			</combo_box>
+			<text name="label bumpiness">
+				Struktur
+			</text>
+			<combo_box name="combobox bumpiness">
+				<combo_item name="None">
+					Ingen
+				</combo_item>
+				<combo_item name="Brightness">
+					Lysintensitet
+				</combo_item>
+				<combo_item name="Darkness">
+					Mørke
+				</combo_item>
+				<combo_item name="woodgrain">
+					træårer
+				</combo_item>
+				<combo_item name="bark">
+					bark
+				</combo_item>
+				<combo_item name="bricks">
+					mursten
+				</combo_item>
+				<combo_item name="checker">
+					tern
+				</combo_item>
+				<combo_item name="concrete">
+					beton
+				</combo_item>
+				<combo_item name="crustytile">
+					rustik flise
+				</combo_item>
+				<combo_item name="cutstone">
+					Skåret sten
+				</combo_item>
+				<combo_item name="discs">
+					plader
+				</combo_item>
+				<combo_item name="gravel">
+					grus
+				</combo_item>
+				<combo_item name="petridish">
+					petriskål
+				</combo_item>
+				<combo_item name="siding">
+					udvendig beklædning
+				</combo_item>
+				<combo_item name="stonetile">
+					stenflise
+				</combo_item>
+				<combo_item name="stucco">
+					puds
+				</combo_item>
+				<combo_item name="suction">
+					rør
+				</combo_item>
+				<combo_item name="weave">
+					væv
+				</combo_item>
+			</combo_box>
+			<text name="tex scale">
+				Gentagelser pr. overflade
+			</text>
+			<spinner label="Vandret (U)" name="TexScaleU" />
+			<check_box label="Vend" name="checkbox flip s" />
+			<spinner label="Lodret (V)" name="TexScaleV" />
+			<check_box label="Vend" name="checkbox flip t" />
+			<text name="tex rotate">
+				Rotation (grader)
+			</text>
+			<string name="string repeats per meter">
+				Gentagelser pr. meter
+			</string>
+			<string name="string repeats per face">
+				Gentagelser pr. overflade
+			</string>
+			<text name="rpt">
+				Gentagelser pr. meter
+			</text>
+			<button label="Gem" label_selected="Gem" name="button apply" />
+			<text name="tex offset">
+				Offset
+			</text>
+			<spinner label="Vandret (U)" name="TexOffsetU" />
+			<spinner label="Lodret (V)" name="TexOffsetV" />
+			<text name="textbox autofix">
+				Rette medie tekstur ind
+(skal indlæses først)
+			</text>
+			<button label="Ret ind" label_selected="Ret ind" name="button align" />
+		</panel>
+		<panel label="Indhold" name="Contents">
+			<button label="Nyt script..." label_selected="Nyt script..." name="button new script" />
+		</panel>
+	</tab_container>
+	<panel name="land info panel">
+		<text name="label_area_price">
+			Pris: L$[PRICE] for [AREA] m².
+		</text>
+		<text name="label_area">
+			Område: [AREA] m².
+		</text>
+		<button label="Køb land..." label_selected="Køb land..." name="button buy land" />
+		<button label="Flyt fra land..." label_selected="Flyt fra land..."
+		     name="button abandon land" />
+		<button label="Opdel..." label_selected="Opdel..." name="button subdivide land" />
+		<button label="Saml..." label_selected="Saml..." name="button join land" />
+		<button label="Om land..." label_selected="Om land..." name="button about land" />
+	</panel>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_tos.xml b/indra/newview/skins/default/xui/da/floater_tos.xml
index c62b5ca1a7..8d341f6a12 100644
--- a/indra/newview/skins/default/xui/da/floater_tos.xml
+++ b/indra/newview/skins/default/xui/da/floater_tos.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="modal container" title="">
-	<button label="Fortsæt" label_selected="Fortsæt" name="Continue" />
-	<button label="Annullér" label_selected="Annullér" name="Cancel" />
-	<check_box label="Jeg accepterer vilkårene for brug af tjenesten" name="agree_chk" />
-	<text name="tos_heading">
-		Læs venligst de almindelige bestemmelser og vilkår igennem, for at fortsætte til Second Life skal du acceptere vilkårene.
-	</text>
-	<text_editor name="tos_text">
-		TOS_TEXT
-	</text_editor>
-	<string name="real_url">
-		http://secondlife.com/app/tos/
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="modal container" title="">
+	<button label="Fortsæt" label_selected="Fortsæt" name="Continue" />
+	<button label="Annullér" label_selected="Annullér" name="Cancel" />
+	<check_box label="Jeg accepterer vilkårene for brug af tjenesten" name="agree_chk" />
+	<text name="tos_heading">
+		Læs venligst de almindelige bestemmelser og vilkår igennem, for at fortsætte til Second Life skal du acceptere vilkårene.
+	</text>
+	<text_editor name="tos_text">
+		TOS_TEXT
+	</text_editor>
+	<string name="real_url">
+		http://secondlife.com/app/tos/
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_wearable_save_as.xml b/indra/newview/skins/default/xui/da/floater_wearable_save_as.xml
index 4c1dcd2e39..145768a7e3 100644
--- a/indra/newview/skins/default/xui/da/floater_wearable_save_as.xml
+++ b/indra/newview/skins/default/xui/da/floater_wearable_save_as.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="modal container" title="">
-	<button label="Gem" label_selected="Gem" name="Save" />
-	<button label="Annullér" label_selected="Annullér" name="Cancel" />
-	<text type="string" length="1" name="Save item as:">
-		Gem ting som::
-	</text>
-	<line_editor name="name ed">
-		Ny [DESC]
-	</line_editor>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="modal container" title="">
+	<button label="Gem" label_selected="Gem" name="Save" />
+	<button label="Annullér" label_selected="Annullér" name="Cancel" />
+	<text type="string" length="1" name="Save item as:">
+		Gem ting som::
+	</text>
+	<line_editor name="name ed">
+		Ny [DESC]
+	</line_editor>
+</floater>
diff --git a/indra/newview/skins/default/xui/da/floater_world_map.xml b/indra/newview/skins/default/xui/da/floater_world_map.xml
index 3fe985fbb6..9d1c799471 100644
--- a/indra/newview/skins/default/xui/da/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/da/floater_world_map.xml
@@ -1,81 +1,81 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="worldmap" title="Verdenskort">
-	<tab_container name="maptab">
-		<panel label="Objekter" name="objects_mapview" />
-		<panel label="Terræn" name="terrain_mapview" />
-	</tab_container>
-	<text name="land_for_sale_label">
-		Land til salg
-	</text>
-	<text name="auction_label">
-		Auktion
-	</text>
-	<text name="you_label">
-		Dig
-	</text>
-	<text name="home_label">
-		Hjem
-	</text>
-	<button label="Tag hjem" label_selected="Tag hjem" name="Go Home"
-	     tool_tip="Teleporter til dit hjem" />
-	<text name="person_label">
-		Person
-	</text>
-	<check_box label=" " name="people_chk" />
-	<text name="infohub_label">
-		Infohub
-	</text>
-	<check_box label="" name="infohub_chk" />
-	<text name="telehub_label">
-		Telehub
-	</text>
-	<check_box label="" name="telehubchk" />
-	<text name="land_for_sale_label2">
-		Land til salg
-	</text>
-	<check_box label="" name="land_for_sale_chk" />
-	<text name="events_label">
-		Events
-	</text>
-	<check_box label="" name="event_chk" />
-	<text name="events_mature_label" />
-	<check_box label="" name="event_mature_chk" />
-	<combo_box label="Venner online" name="friend combo"
-	     tool_tip="Ven der skal vises på kortet">
-		<combo_item name="none_selected">
-			Venner online
-		</combo_item>
-	</combo_box>
-	<combo_box label="Landemærker" name="landmark combo"
-	     tool_tip="Landemærke der skal vises på kortet">
-		<combo_item name="none_selected">
-			Landemærker
-		</combo_item>
-	</combo_box>
-	<line_editor label="Søg på region navn" name="location"
-	     tool_tip="Skriv navnet på en region" />
-	<button label="Søg" name="DoSearch" tool_tip="Søg efter en region" />
-	<text name="search_label">
-		Søgeresultater:
-	</text>
-	<scroll_list name="search_results">
-		<column label="" name="icon" />
-		<column label="" name="sim_name" />
-	</scroll_list>
-	<text name="location_label">
-		Lokation:
-	</text>
-	<spinner name="spin x" tool_tip="X koordinat for lokation der skal vises på kortet" />
-	<spinner name="spin y" tool_tip="Y koordinat for lokation der skal vises på kortet" />
-	<spinner name="spin z" tool_tip="Z koordinat for lokation der skal vises på kortet" />
-	<button label="Teleport" label_selected="Teleport" name="Teleport"
-	     tool_tip="Teleportér til den valgte lokation" />
-	<button label="Vis destination" label_selected="Vis destination"
-	     name="Show Destination" tool_tip="Centrér kortet på valgte lokation" />
-	<button label="Slet" label_selected="Slet" name="Clear" tool_tip="Stop søg" />
-	<button label="Vis min position" label_selected="Vis min position"
-	     name="Show My Location" tool_tip="Centrer kortet på din avatars lokation" />
-	<button label="Kopiér SLURL til udklipsholder" name="copy_slurl"
-	     tool_tip="Kopierer den nuværende lokation som et SLURL, så det kan bruges på nettet." />
-	<slider label="Zoom" name="zoom slider" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="worldmap" title="Verdenskort">
+	<tab_container name="maptab">
+		<panel label="Objekter" name="objects_mapview" />
+		<panel label="Terræn" name="terrain_mapview" />
+	</tab_container>
+	<text name="land_for_sale_label">
+		Land til salg
+	</text>
+	<text name="auction_label">
+		Auktion
+	</text>
+	<text name="you_label">
+		Dig
+	</text>
+	<text name="home_label">
+		Hjem
+	</text>
+	<button label="Tag hjem" label_selected="Tag hjem" name="Go Home"
+	     tool_tip="Teleporter til dit hjem" />
+	<text name="person_label">
+		Person
+	</text>
+	<check_box label=" " name="people_chk" />
+	<text name="infohub_label">
+		Infohub
+	</text>
+	<check_box label="" name="infohub_chk" />
+	<text name="telehub_label">
+		Telehub
+	</text>
+	<check_box label="" name="telehubchk" />
+	<text name="land_for_sale_label2">
+		Land til salg
+	</text>
+	<check_box label="" name="land_for_sale_chk" />
+	<text name="events_label">
+		Events
+	</text>
+	<check_box label="" name="event_chk" />
+	<text name="events_mature_label" />
+	<check_box label="" name="event_mature_chk" />
+	<combo_box label="Venner online" name="friend combo"
+	     tool_tip="Ven der skal vises på kortet">
+		<combo_box.item name="none_selected">
+			Venner online
+		</combo_box.item>
+	</combo_box>
+	<combo_box label="Landemærker" name="landmark combo"
+	     tool_tip="Landemærke der skal vises på kortet">
+		<combo_box.item name="none_selected">
+			Landemærker
+		</combo_box.item>
+	</combo_box>
+	<line_editor label="Søg på region navn" name="location"
+	     tool_tip="Skriv navnet på en region" />
+	<button label="Søg" name="DoSearch" tool_tip="Søg efter en region" />
+	<text name="search_label">
+		Søgeresultater:
+	</text>
+	<scroll_list name="search_results">
+		<column label="" name="icon" />
+		<column label="" name="sim_name" />
+	</scroll_list>
+	<text name="location_label">
+		Lokation:
+	</text>
+	<spinner name="spin x" tool_tip="X koordinat for lokation der skal vises på kortet" />
+	<spinner name="spin y" tool_tip="Y koordinat for lokation der skal vises på kortet" />
+	<spinner name="spin z" tool_tip="Z koordinat for lokation der skal vises på kortet" />
+	<button label="Teleport" label_selected="Teleport" name="Teleport"
+	     tool_tip="Teleportér til den valgte lokation" />
+	<button label="Vis destination" label_selected="Vis destination"
+	     name="Show Destination" tool_tip="Centrér kortet på valgte lokation" />
+	<button label="Slet" label_selected="Slet" name="Clear" tool_tip="Stop søg" />
+	<button label="Vis min position" label_selected="Vis min position"
+	     name="Show My Location" tool_tip="Centrer kortet på din avatars lokation" />
+	<button label="Kopiér SLURL til udklipsholder" name="copy_slurl"
+	     tool_tip="Kopierer den nuværende lokation som et SLURL, så det kan bruges på nettet." />
+	<slider label="Zoom" name="zoom slider" />
+</floater>
diff --git a/indra/newview/skins/default/xui/da/menu_inventory.xml b/indra/newview/skins/default/xui/da/menu_inventory.xml
index 7b1fae4273..2c47703ef2 100644
--- a/indra/newview/skins/default/xui/da/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/da/menu_inventory.xml
@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu name="Popup">
-	<menu_item_call label="Køb" name="Task Buy" />
-	<menu_item_call label="åben" name="Task Open" />
-	<menu_item_call label="Afspil" name="Task Play" />
-	<menu_item_call label="Egenskaber" name="Task Properties" />
-	<menu_item_call label="Omdøb" name="Task Rename" />
-	<menu_item_call label="Slet" name="Task Remove" />
-	<menu_item_call label="Tøm papirkurv" name="Empty Trash" />
-	<menu_item_call label="Tøm &apos;Lost and found&apos;" name="Empty Lost And Found" />
-	<menu_item_call label="Ny mappe" name="New Folder" />
-	<menu_item_call label="Nyt script" name="New Script" />
-	<menu_item_call label="Ny note" name="New Note" />
-	<menu_item_call label="Ny bevægelse" name="New Gesture" />
-	<menu name="New Clothes">
-		<menu_item_call label="Ny trøje" name="New Shirt" />
-		<menu_item_call label="Nye bukser" name="New Pants" />
-		<menu_item_call label="Nye sko" name="New Shoes" />
-		<menu_item_call label="Nye strømper" name="New Socks" />
-		<menu_item_call label="Ny jakke" name="New Jacket" />
-		<menu_item_call label="Ny nederdel" name="New Skirt" />
-		<menu_item_call label="Nye handsker" name="New Gloves" />
-		<menu_item_call label="Ny undertrøje" name="New Undershirt" />
-		<menu_item_call label="Nye underbukser" name="New Underpants" />
-	</menu>
-	<menu name="New Body Parts">
-		<menu_item_call label="Ny figur" name="New Shape" />
-		<menu_item_call label="Nyt hud" name="New Skin" />
-		<menu_item_call label="Nyt hår" name="New Hair" />
-		<menu_item_call label="Nye øjne" name="New Eyes" />
-	</menu>
-	<menu_item_call label="Teleport" name="Landmark Open" />
-	<menu_item_call label="åben" name="Animation Open" />
-	<menu_item_call label="åben" name="Sound Open" />
-	<menu_item_call label="Slet ting" name="Purge Item" />
-	<menu_item_call label="Genskab ting" name="Restore Item" />
-	<menu_item_call label="åben" name="Open" />
-	<menu_item_call label="Egenskaber" name="Properties" />
-	<menu_item_call label="Omdøb" name="Rename" />
-	<menu_item_call label="Kopiér asset UUID" name="Copy Asset UUID" />
-	<menu_item_call label="Kopiér" name="Copy" />
-	<menu_item_call label="Indsæt" name="Paste" />
-	<menu_item_call label="Slet" name="Delete" />
-	<menu_item_call label="Tag ting af" name="Take Off Items" />
-	<menu_item_call label="Tilføj til påklædning" name="Add To Outfit" />
-	<menu_item_call label="Erstat påklædning" name="Replace Outfit" />
-	<menu_item_call label="start konference chat" name="Conference Chat Folder" />
-	<menu_item_call label="Afspil" name="Sound Play" />
-	<menu_item_call label="Om landemærke" name="Teleport To Landmark" />
-	<menu_item_call label="Afspil offentligt" name="Animation Play" />
-	<menu_item_call label="Afspil lokalt" name="Animation Audition" />
-	<menu_item_call label="Send privat besked (IM)" name="Send Instant Message" />
-	<menu_item_call label="Tilbyd teleport..." name="Offer Teleport..." />
-	<menu_item_call label="start konference Chat" name="Conference Chat" />
-	<menu_item_call label="Aktivér" name="Activate" />
-	<menu_item_call label="Deaktivér" name="Deactivate" />
-	<menu_item_call label="Tag af dig selv" name="Detach From Yourself" />
-	<menu_item_call label="Tag på" name="Object Wear" />
-	<menu label="Vedhæft" name="Attach To" />
-	<menu label="Vedhæft til HUD" name="Attach To HUD" />
-	<menu_item_call label="Redigér" name="Wearable Edit" />
-	<menu_item_call label="Tag på" name="Wearable Wear" />
-	<menu_item_call label="Tag af" name="Take Off" />
-	<menu_item_call label="--ingen valg--" name="--no options--" />
-</menu>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu name="Popup">
+	<menu_item_call label="Køb" name="Task Buy" />
+	<menu_item_call label="åben" name="Task Open" />
+	<menu_item_call label="Afspil" name="Task Play" />
+	<menu_item_call label="Egenskaber" name="Task Properties" />
+	<menu_item_call label="Omdøb" name="Task Rename" />
+	<menu_item_call label="Slet" name="Task Remove" />
+	<menu_item_call label="Tøm papirkurv" name="Empty Trash" />
+	<menu_item_call label="Tøm &apos;Lost and found&apos;" name="Empty Lost And Found" />
+	<menu_item_call label="Ny mappe" name="New Folder" />
+	<menu_item_call label="Nyt script" name="New Script" />
+	<menu_item_call label="Ny note" name="New Note" />
+	<menu_item_call label="Ny bevægelse" name="New Gesture" />
+	<menu name="New Clothes">
+		<menu_item_call label="Ny trøje" name="New Shirt" />
+		<menu_item_call label="Nye bukser" name="New Pants" />
+		<menu_item_call label="Nye sko" name="New Shoes" />
+		<menu_item_call label="Nye strømper" name="New Socks" />
+		<menu_item_call label="Ny jakke" name="New Jacket" />
+		<menu_item_call label="Ny nederdel" name="New Skirt" />
+		<menu_item_call label="Nye handsker" name="New Gloves" />
+		<menu_item_call label="Ny undertrøje" name="New Undershirt" />
+		<menu_item_call label="Nye underbukser" name="New Underpants" />
+	</menu>
+	<menu name="New Body Parts">
+		<menu_item_call label="Ny figur" name="New Shape" />
+		<menu_item_call label="Nyt hud" name="New Skin" />
+		<menu_item_call label="Nyt hår" name="New Hair" />
+		<menu_item_call label="Nye øjne" name="New Eyes" />
+	</menu>
+	<menu_item_call label="Teleport" name="Landmark Open" />
+	<menu_item_call label="åben" name="Animation Open" />
+	<menu_item_call label="åben" name="Sound Open" />
+	<menu_item_call label="Slet ting" name="Purge Item" />
+	<menu_item_call label="Genskab ting" name="Restore Item" />
+	<menu_item_call label="åben" name="Open" />
+	<menu_item_call label="Egenskaber" name="Properties" />
+	<menu_item_call label="Omdøb" name="Rename" />
+	<menu_item_call label="Kopiér asset UUID" name="Copy Asset UUID" />
+	<menu_item_call label="Kopiér" name="Copy" />
+	<menu_item_call label="Indsæt" name="Paste" />
+	<menu_item_call label="Slet" name="Delete" />
+	<menu_item_call label="Tag ting af" name="Take Off Items" />
+	<menu_item_call label="Tilføj til påklædning" name="Add To Outfit" />
+	<menu_item_call label="Erstat påklædning" name="Replace Outfit" />
+	<menu_item_call label="start konference chat" name="Conference Chat Folder" />
+	<menu_item_call label="Afspil" name="Sound Play" />
+	<menu_item_call label="Om landemærke" name="Teleport To Landmark" />
+	<menu_item_call label="Afspil offentligt" name="Animation Play" />
+	<menu_item_call label="Afspil lokalt" name="Animation Audition" />
+	<menu_item_call label="Send privat besked (IM)" name="Send Instant Message" />
+	<menu_item_call label="Tilbyd teleport..." name="Offer Teleport..." />
+	<menu_item_call label="start konference Chat" name="Conference Chat" />
+	<menu_item_call label="Aktivér" name="Activate" />
+	<menu_item_call label="Deaktivér" name="Deactivate" />
+	<menu_item_call label="Tag af dig selv" name="Detach From Yourself" />
+	<menu_item_call label="Tag på" name="Object Wear" />
+	<menu label="Vedhæft" name="Attach To" />
+	<menu label="Vedhæft til HUD" name="Attach To HUD" />
+	<menu_item_call label="Redigér" name="Wearable Edit" />
+	<menu_item_call label="Tag på" name="Wearable Wear" />
+	<menu_item_call label="Tag af" name="Take Off" />
+	<menu_item_call label="--ingen valg--" name="--no options--" />
+</menu>
diff --git a/indra/newview/skins/default/xui/da/menu_login.xml b/indra/newview/skins/default/xui/da/menu_login.xml
index f0c827ae7d..26276ff3eb 100644
--- a/indra/newview/skins/default/xui/da/menu_login.xml
+++ b/indra/newview/skins/default/xui/da/menu_login.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu_bar name="Login Menu">
-	<menu label="Filer" name="File">
-		<menu_item_call label="Afslut" name="Quit" />
-	</menu>
-	<menu label="Rediger" name="Edit">
-		<menu_item_call label="Indstillinger..." name="Preferences..." />
-	</menu>
-	<menu label="Hjælp" name="Help">
-		<menu_item_call label="Second Life hjælp" name="Second Life Help" />
-		<menu_item_call label="Om Second Life..." name="About Second Life..." />
-	</menu>
-</menu_bar>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu_bar name="Login Menu">
+	<menu label="Filer" name="File">
+		<menu_item_call label="Afslut" name="Quit" />
+	</menu>
+	<menu label="Rediger" name="Edit">
+		<menu_item_call label="Indstillinger..." name="Preferences..." />
+	</menu>
+	<menu label="Hjælp" name="Help">
+		<menu_item_call label="Second Life hjælp" name="Second Life Help" />
+		<menu_item_call label="Om Second Life..." name="About Second Life..." />
+	</menu>
+</menu_bar>
diff --git a/indra/newview/skins/default/xui/da/menu_slurl.xml b/indra/newview/skins/default/xui/da/menu_slurl.xml
index 1c3bc692dc..ef5cfd7200 100644
--- a/indra/newview/skins/default/xui/da/menu_slurl.xml
+++ b/indra/newview/skins/default/xui/da/menu_slurl.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu name="Popup">
-	<menu_item_call label="Om URL" name="about_url" />
-	<menu_item_call label="Teleportér til URL" name="teleport_to_url" />
-	<menu_item_call label="Vis på kort" name="show_on_map" />
-</menu>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu name="Popup">
+	<menu_item_call label="Om URL" name="about_url" />
+	<menu_item_call label="Teleportér til URL" name="teleport_to_url" />
+	<menu_item_call label="Vis på kort" name="show_on_map" />
+</menu>
diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml
index f5bb98379f..8ac2718353 100644
--- a/indra/newview/skins/default/xui/da/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/da/menu_viewer.xml
@@ -1,211 +1,211 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu_bar name="Main Menu">
-	<menu label="Filer" name="File">
-		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~" />
-		<menu label="Hent" name="upload">
-		<menu_item_call label="Hent billede (L$[COST])..." name="Upload Image" />
-		<menu_item_call label="Hent lyd (L$[COST])..." name="Upload Sound" />
-		<menu_item_call label="Hent animation (L$[COST])..." name="Upload Animation" />
-		<menu_item_call label="Hent mange (L$[COST] per file)..." name="Bulk Upload" />
-		</menu>
-		<menu_item_separator label="-----------" name="separator" />
-		<menu_item_call label="Luk vindue" name="Close Window" />
-		<menu_item_call label="Luk alle vinduer" name="Close All Windows" />
-		<menu_item_separator label="-----------" name="separator2" />
-		<menu_item_call label="Gem tekstur som..." name="Save Texture As..." />
-		<menu_item_separator label="-----------" name="separator3" />
-		<menu_item_call label="Tag foto" name="Take Snapshot" />
-		<menu_item_call label="Tag foto til disk" name="Snapshot to Disk" />
-		<menu_item_separator label="-----------" name="separator4" />
-		<menu_item_call label="Afslut" name="Quit" />
-	</menu>
-	<menu label="Redigér" name="Edit">
-		<menu_item_call label="Annullér" name="Undo" />
-		<menu_item_call label="Gentag" name="Redo" />
-		<menu_item_separator label="-----------" name="separator" />
-		<menu_item_call label="Klip" name="Cut" />
-		<menu_item_call label="Kopier" name="Copy" />
-		<menu_item_call label="Sæt ind" name="Paste" />
-		<menu_item_call label="Slet" name="Delete" />
-		<menu_item_separator label="-----------" name="separator2" />
-		<menu_item_call label="Søg..." name="Search..." />
-		<menu_item_separator label="-----------" name="separator3" />
-		<menu_item_call label="Vælg alt" name="Select All" />
-		<menu_item_call label="Vælg intet" name="Deselect" />
-		<menu_item_separator label="-----------" name="separator4" />
-		<menu_item_call label="Duplikér" name="Duplicate" />
-		<menu_item_separator label="-----------" name="separator5" />
-		<menu label="Vedhæft objekt" name="Attach Object" />
-		<menu label="Tag objekt af" name="Detach Object" />
-		<menu label="Tag tøj af" name="Take Off Clothing">
-			<menu_item_call label="Trøje" name="Shirt" />
-			<menu_item_call label="Bukser" name="Pants" />
-			<menu_item_call label="Sko" name="Shoes" />
-			<menu_item_call label="Strømper" name="Socks" />
-			<menu_item_call label="Jakke" name="Jacket" />
-			<menu_item_call label="Handsker" name="Gloves" />
-			<menu_item_call label="Undertrøje" name="Menu Undershirt" />
-			<menu_item_call label="Underbukser" name="Menu Underpants" />
-			<menu_item_call label="Nederdel" name="Skirt" />
-			<menu_item_call label="Alt tøj" name="All Clothes" />
-		</menu>
-		<menu_item_separator label="-----------" name="separator6" />
-		<menu_item_call label="Bevægelser..." name="Gestures..." />
-		<menu_item_call label="Profil..." name="Profile..." />
-		<menu_item_call label="Udseende..." name="Appearance..." />
-		<menu_item_separator label="-----------" name="separator7" />
-		<menu_item_check label="Venner..." name="Friends..." />
-		<menu_item_call label="Grupper..." name="Groups..." />
-		<menu_item_separator label="-----------" name="separator8" />
-		<menu_item_call label="Indstillinger..." name="Preferences..." />
-	</menu>
-	<menu label="Vis" name="View">
-		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~" />
-		<menu_item_call label="Første person" name="Mouselook" />
-		<menu_item_check label="Byg" name="Build" />
-		<menu_item_check label="Flyv via joystick" name="Joystick Flycam" />
-		<menu_item_call label="Nulstil kamera" name="Reset View" />
-		<menu_item_call label="Se på sidste chatter" name="Look at Last Chatter" />
-		<menu_item_separator label="-----------" name="separator" />
-		<menu_item_check label="Værktøjslinie" name="Toolbar" />
-		<menu_item_check label="Local chat" name="Chat History" />
-		<menu_item_check label="Kommunikér" name="Instant Message" />
-		<menu_item_check label="Beholdning" name="Inventory" />
-		<menu_item_check label="Aktive talere" name="Active Speakers" />
-		<menu_item_check label="Vis blokerede avatarer" name="Mute List" />
-		<menu_item_separator label="-----------" name="separator2" />
-		<menu_item_check label="Kamera kontrol" name="Camera Controls" />
-		<menu_item_check label="Bevægelses kontrol" name="Movement Controls" />
-		<menu_item_check label="Verdenskort" name="World Map" />
-		<menu_item_check label="Lokalt kort" name="Mini-Map" />
-		<menu_item_separator label="-----------" name="separator3" />
-		<menu_item_check label="Teknisk info" name="Statistics Bar" />
-		<menu_item_check label="Parcel skel" name="Property Lines" />
-		<menu_item_check label="Grundejere" name="Land Owners" />
-		<menu_item_separator label="-----------" name="separator4" />
-		<menu label="Tips visning" name="Hover Tips">
-			<menu_item_check label="Vis tips" name="Show Tips" />
-			<menu_item_separator label="-----------" name="separator" />
-			<menu_item_check label="Tips om land" name="Land Tips" />
-			<menu_item_check label="Tips på alle objekter" name="Tips On All Objects" />
-		</menu>
-		<menu_item_check label="Fremhæv gennemsigtigt" name="Highlight Transparent" />
-		<menu_item_check label="Pejlelys" name="beacons" />
-		<menu_item_check label="Skjul partikler" name="Hide Particles" />
-		<menu_item_check label="Vis HUD vedhæftninger" name="Show HUD Attachments" />
-		<menu_item_separator label="-----------" name="separator5" />
-		<menu_item_call label="Zoom ind" name="Zoom In" />
-		<menu_item_call label="Zoom standard" name="Zoom Default" />
-		<menu_item_call label="Zoom ud" name="Zoom Out" />
-		<menu_item_separator label="-----------" name="separator6" />
-		<menu_item_call label="Skift fuld skærm/vindue" name="Toggle Fullscreen" />
-		<menu_item_call label="Sæt brugerfladestørrelse til normal" name="Set UI Size to Default" />
-	</menu>
-	<menu label="Verden" name="World">
-		<menu_item_call label="Chat" name="Chat" />
-		<menu_item_check label="Løb" name="Always Run" />
-		<menu_item_check label="Flyv" name="Fly" />
-		<menu_item_separator label="-----------" name="separator" />
-		<menu_item_call label="Opret landemærke her" name="Create Landmark Here" />
-		<menu_item_call label="Sæt hjem til her" name="Set Home to Here" />
-		<menu_item_separator label="-----------" name="separator2" />
-		<menu_item_call label="Teleporter hjem" name="Teleport Home" />
-		<menu_item_separator label="-----------" name="separator3" />
-		<menu_item_call label="Sæt &apos;ikke til stede&apos;" name="Set Away" />
-		<menu_item_call label="Sæt &apos;optaget&apos;" name="Set Busy" />
-		<menu_item_call label="Stop all animationer" name="Stop All Animations" />
-		<menu_item_call label="Frigiv taster" name="Release Keys" />
-		<menu_item_separator label="-----------" name="separator4" />
-		<menu_item_call label="Konto historik..." name="Account History..." />
-		<menu_item_call label="Vedligehold konto..." name="Manage My Account..." />
-		<menu_item_call label="Køb L$..." name="Buy and Sell L$..." />
-		<menu_item_separator label="-----------" name="separator5" />
-		<menu_item_call label="Mit land..." name="My Land..." />
-		<menu_item_call label="Om land..." name="About Land..." />
-		<menu_item_call label="Køb land..." name="Buy Land..." />
-		<menu_item_call label="Region/Estate..." name="Region/Estate..." />
-		<menu_item_separator label="-----------" name="separator6" />
-		<menu label="Indstillinger for omgivelser" name="Environment Settings">
-			<menu_item_call label="Solopgang" name="Sunrise" />
-			<menu_item_call label="Middag" name="Noon" />
-			<menu_item_call label="Solnedgang" name="Sunset" />
-			<menu_item_call label="Midnat" name="Midnight" />
-			<menu_item_call label="Gendan til standard for region" name="Revert to Region Default" />
-			<menu_item_separator label="-----------" name="separator" />
-			<menu_item_call label="Redigering af omgivelser" name="Environment Editor" />
-		</menu>
-	</menu>
-	<menu label="Funktioner" name="Tools">
-		<menu label="Vælg værktøj" name="Select Tool">
-			<menu_item_call label="Fokus" name="Focus" />
-			<menu_item_call label="Flyt" name="Move" />
-			<menu_item_call label="Rediger" name="Edit" />
-			<menu_item_call label="Byg" name="Create" />
-			<menu_item_call label="Land" name="Land" />
-		</menu>
-		<menu_item_separator label="-----------" name="separator" />
-		<menu_item_check label="Vælg kun egne objekter" name="Select Only My Objects" />
-		<menu_item_check label="Vælg kun flytbare objekter" name="Select Only Movable Objects" />
-		<menu_item_check label="Vælg ved at omkrandse" name="Select By Surrounding" />
-		<menu_item_check label="Vis skjulte objekter" name="Show Hidden Selection" />
-		<menu_item_check label="Vis lys-radius for valgte" name="Show Light Radius for Selection" />
-		<menu_item_check label="Vis guidelys for valgte" name="Show Selection Beam" />
-		<menu_item_separator label="-----------" name="separator2" />
-		<menu_item_check label="Ret ind til gitter" name="Snap to Grid" />
-		<menu_item_call label="Ret XY for objekt ind til gitter" name="Snap Object XY to Grid" />
-		<menu_item_call label="Benyt valgte som grundlag for gitter" name="Use Selection for Grid" />
-		<menu_item_call label="Gitter indstillinger..." name="Grid Options..." />
-		<menu_item_separator label="-----------" name="separator3" />
-		<menu_item_check label="Rediger sammekædede objekter" name="Edit Linked Parts" />
-		<menu_item_call label="Sammenkæd" name="Link" />
-		<menu_item_call label="Adskil" name="Unlink" />
-		<menu_item_separator label="-----------" name="separator4" />
-		<menu_item_call label="Fokusér på valgte" name="Focus on Selection" />
-		<menu_item_call label="Zoom på valgte" name="Zoom to Selection" />
-		<menu_item_call label="Køb objekt" name="Menu Object Take" />
-		<menu_item_call label="Tag kopi" name="Take Copy" />
-		<menu_item_call label="Opdatér objekt i beholdning med ændringer"
-		     name="Save Object Back to My Inventory" />
-		<menu_item_call label="Opdatér ændringer i indhold på objekt"
-		     name="Save Object Back to Object Contents" />
-		<menu_item_separator label="-----------" name="separator6" />
-		<menu_item_call label="Vis vindue med advarsler/fejl fra scripts"
-		     name="Show Script Warning/Error Window" />
-		<menu label="Rekompilér scripts i valgte objekter"
-		     name="Recompile Scripts in Selection">
-			<menu_item_call label="Mono" name="Mono" />
-			<menu_item_call label="LSL" name="LSL" />
-		</menu>
-		<menu_item_call label="Genstart scripts i valgte objekter" name="Reset Scripts in Selection" />
-		<menu_item_call label="Sæt scripts til &apos;Running&apos; i valgte objekter"
-		     name="Set Scripts to Running in Selection" />
-		<menu_item_call label="Sæt scripts til &apos; Not running&apos; i valgte objekter"
-		     name="Set Scripts to Not Running in Selection" />
-	</menu>
-	<menu label="Hjælp" name="Help">
-		<menu_item_call label="Second Life Hjælp" name="Second Life Help" />
-		<menu_item_call label="Tutorial" name="Tutorial" />
-		<menu_item_separator label="-----------" name="separator" />
-		<menu_item_call label="Officiel Linden Blog..." name="Official Linden Blog..." />
-		<menu_item_separator label="-----------" name="separator2" />
-		<menu_item_call label="Portal om scripts..." name="Scripting Portal..." />
-		<menu_item_separator label="-----------" name="separator3" />
-		<menu_item_call label="Rapporter misbrug..." name="Report Abuse..." />
-		<menu_item_call label="Stød, skub &amp; slag..." name="Bumps, Pushes &amp;amp; Hits..." />
-		<menu_item_call label="Lag meter" name="Lag Meter" />
-		<menu_item_separator label="-----------" name="separator7" />
-		<menu label="Fejlrapport" name="Bug Reporting">
-			<menu_item_call label="Second Life sagsstyring..." name="Public Issue Tracker..." />
-			<menu_item_call label="Hjælp til Second Life sagsstyring..."
-			     name="Publc Issue Tracker Help..." />
-			<menu_item_separator label="-----------" name="separator7" />
-			<menu_item_call label="Om fejlrapportering..." name="Bug Reporing 101..." />
-			<menu_item_call label="Anmeld sikkerhedshændelser..." name="Security Issues..." />
-			<menu_item_call label="QA Wiki..." name="QA Wiki..." />
-			<menu_item_separator label="-----------" name="separator9" />
-			<menu_item_call label="Anmeld fejl..." name="Report Bug..." />
-		</menu>
-		<menu_item_call label="Om Second Life..." name="About Second Life..." />
-		,
-	</menu>
-</menu_bar>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu_bar name="Main Menu">
+	<menu label="Filer" name="File">
+		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~" />
+		<menu label="Hent" name="upload">
+		<menu_item_call label="Hent billede (L$[COST])..." name="Upload Image" />
+		<menu_item_call label="Hent lyd (L$[COST])..." name="Upload Sound" />
+		<menu_item_call label="Hent animation (L$[COST])..." name="Upload Animation" />
+		<menu_item_call label="Hent mange (L$[COST] per file)..." name="Bulk Upload" />
+		</menu>
+		<menu_item_separator label="-----------" name="separator" />
+		<menu_item_call label="Luk vindue" name="Close Window" />
+		<menu_item_call label="Luk alle vinduer" name="Close All Windows" />
+		<menu_item_separator label="-----------" name="separator2" />
+		<menu_item_call label="Gem tekstur som..." name="Save Texture As..." />
+		<menu_item_separator label="-----------" name="separator3" />
+		<menu_item_call label="Tag foto" name="Take Snapshot" />
+		<menu_item_call label="Tag foto til disk" name="Snapshot to Disk" />
+		<menu_item_separator label="-----------" name="separator4" />
+		<menu_item_call label="Afslut" name="Quit" />
+	</menu>
+	<menu label="Redigér" name="Edit">
+		<menu_item_call label="Annullér" name="Undo" />
+		<menu_item_call label="Gentag" name="Redo" />
+		<menu_item_separator label="-----------" name="separator" />
+		<menu_item_call label="Klip" name="Cut" />
+		<menu_item_call label="Kopier" name="Copy" />
+		<menu_item_call label="Sæt ind" name="Paste" />
+		<menu_item_call label="Slet" name="Delete" />
+		<menu_item_separator label="-----------" name="separator2" />
+		<menu_item_call label="Søg..." name="Search..." />
+		<menu_item_separator label="-----------" name="separator3" />
+		<menu_item_call label="Vælg alt" name="Select All" />
+		<menu_item_call label="Vælg intet" name="Deselect" />
+		<menu_item_separator label="-----------" name="separator4" />
+		<menu_item_call label="Duplikér" name="Duplicate" />
+		<menu_item_separator label="-----------" name="separator5" />
+		<menu label="Vedhæft objekt" name="Attach Object" />
+		<menu label="Tag objekt af" name="Detach Object" />
+		<menu label="Tag tøj af" name="Take Off Clothing">
+			<menu_item_call label="Trøje" name="Shirt" />
+			<menu_item_call label="Bukser" name="Pants" />
+			<menu_item_call label="Sko" name="Shoes" />
+			<menu_item_call label="Strømper" name="Socks" />
+			<menu_item_call label="Jakke" name="Jacket" />
+			<menu_item_call label="Handsker" name="Gloves" />
+			<menu_item_call label="Undertrøje" name="Menu Undershirt" />
+			<menu_item_call label="Underbukser" name="Menu Underpants" />
+			<menu_item_call label="Nederdel" name="Skirt" />
+			<menu_item_call label="Alt tøj" name="All Clothes" />
+		</menu>
+		<menu_item_separator label="-----------" name="separator6" />
+		<menu_item_call label="Bevægelser..." name="Gestures..." />
+		<menu_item_call label="Profil..." name="Profile..." />
+		<menu_item_call label="Udseende..." name="Appearance..." />
+		<menu_item_separator label="-----------" name="separator7" />
+		<menu_item_check label="Venner..." name="Friends..." />
+		<menu_item_call label="Grupper..." name="Groups..." />
+		<menu_item_separator label="-----------" name="separator8" />
+		<menu_item_call label="Indstillinger..." name="Preferences..." />
+	</menu>
+	<menu label="Vis" name="View">
+		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~" />
+		<menu_item_call label="Første person" name="Mouselook" />
+		<menu_item_check label="Byg" name="Build" />
+		<menu_item_check label="Flyv via joystick" name="Joystick Flycam" />
+		<menu_item_call label="Nulstil kamera" name="Reset View" />
+		<menu_item_call label="Se på sidste chatter" name="Look at Last Chatter" />
+		<menu_item_separator label="-----------" name="separator" />
+		<menu_item_check label="Værktøjslinie" name="Toolbar" />
+		<menu_item_check label="Local chat" name="Chat History" />
+		<menu_item_check label="Kommunikér" name="Instant Message" />
+		<menu_item_check label="Beholdning" name="Inventory" />
+		<menu_item_check label="Aktive talere" name="Active Speakers" />
+		<menu_item_check label="Vis blokerede avatarer" name="Mute List" />
+		<menu_item_separator label="-----------" name="separator2" />
+		<menu_item_check label="Kamera kontrol" name="Camera Controls" />
+		<menu_item_check label="Bevægelses kontrol" name="Movement Controls" />
+		<menu_item_check label="Verdenskort" name="World Map" />
+		<menu_item_check label="Lokalt kort" name="Mini-Map" />
+		<menu_item_separator label="-----------" name="separator3" />
+		<menu_item_check label="Teknisk info" name="Statistics Bar" />
+		<menu_item_check label="Parcel skel" name="Property Lines" />
+		<menu_item_check label="Grundejere" name="Land Owners" />
+		<menu_item_separator label="-----------" name="separator4" />
+		<menu label="Tips visning" name="Hover Tips">
+			<menu_item_check label="Vis tips" name="Show Tips" />
+			<menu_item_separator label="-----------" name="separator" />
+			<menu_item_check label="Tips om land" name="Land Tips" />
+			<menu_item_check label="Tips på alle objekter" name="Tips On All Objects" />
+		</menu>
+		<menu_item_check label="Fremhæv gennemsigtigt" name="Highlight Transparent" />
+		<menu_item_check label="Pejlelys" name="beacons" />
+		<menu_item_check label="Skjul partikler" name="Hide Particles" />
+		<menu_item_check label="Vis HUD vedhæftninger" name="Show HUD Attachments" />
+		<menu_item_separator label="-----------" name="separator5" />
+		<menu_item_call label="Zoom ind" name="Zoom In" />
+		<menu_item_call label="Zoom standard" name="Zoom Default" />
+		<menu_item_call label="Zoom ud" name="Zoom Out" />
+		<menu_item_separator label="-----------" name="separator6" />
+		<menu_item_call label="Skift fuld skærm/vindue" name="Toggle Fullscreen" />
+		<menu_item_call label="Sæt brugerfladestørrelse til normal" name="Set UI Size to Default" />
+	</menu>
+	<menu label="Verden" name="World">
+		<menu_item_call label="Chat" name="Chat" />
+		<menu_item_check label="Løb" name="Always Run" />
+		<menu_item_check label="Flyv" name="Fly" />
+		<menu_item_separator label="-----------" name="separator" />
+		<menu_item_call label="Opret landemærke her" name="Create Landmark Here" />
+		<menu_item_call label="Sæt hjem til her" name="Set Home to Here" />
+		<menu_item_separator label="-----------" name="separator2" />
+		<menu_item_call label="Teleporter hjem" name="Teleport Home" />
+		<menu_item_separator label="-----------" name="separator3" />
+		<menu_item_call label="Sæt &apos;ikke til stede&apos;" name="Set Away" />
+		<menu_item_call label="Sæt &apos;optaget&apos;" name="Set Busy" />
+		<menu_item_call label="Stop all animationer" name="Stop All Animations" />
+		<menu_item_call label="Frigiv taster" name="Release Keys" />
+		<menu_item_separator label="-----------" name="separator4" />
+		<menu_item_call label="Konto historik..." name="Account History..." />
+		<menu_item_call label="Vedligehold konto..." name="Manage My Account..." />
+		<menu_item_call label="Køb L$..." name="Buy and Sell L$..." />
+		<menu_item_separator label="-----------" name="separator5" />
+		<menu_item_call label="Mit land..." name="My Land..." />
+		<menu_item_call label="Om land..." name="About Land..." />
+		<menu_item_call label="Køb land..." name="Buy Land..." />
+		<menu_item_call label="Region/Estate..." name="Region/Estate..." />
+		<menu_item_separator label="-----------" name="separator6" />
+		<menu label="Indstillinger for omgivelser" name="Environment Settings">
+			<menu_item_call label="Solopgang" name="Sunrise" />
+			<menu_item_call label="Middag" name="Noon" />
+			<menu_item_call label="Solnedgang" name="Sunset" />
+			<menu_item_call label="Midnat" name="Midnight" />
+			<menu_item_call label="Gendan til standard for region" name="Revert to Region Default" />
+			<menu_item_separator label="-----------" name="separator" />
+			<menu_item_call label="Redigering af omgivelser" name="Environment Editor" />
+		</menu>
+	</menu>
+	<menu label="Funktioner" name="Tools">
+		<menu label="Vælg værktøj" name="Select Tool">
+			<menu_item_call label="Fokus" name="Focus" />
+			<menu_item_call label="Flyt" name="Move" />
+			<menu_item_call label="Rediger" name="Edit" />
+			<menu_item_call label="Byg" name="Create" />
+			<menu_item_call label="Land" name="Land" />
+		</menu>
+		<menu_item_separator label="-----------" name="separator" />
+		<menu_item_check label="Vælg kun egne objekter" name="Select Only My Objects" />
+		<menu_item_check label="Vælg kun flytbare objekter" name="Select Only Movable Objects" />
+		<menu_item_check label="Vælg ved at omkrandse" name="Select By Surrounding" />
+		<menu_item_check label="Vis skjulte objekter" name="Show Hidden Selection" />
+		<menu_item_check label="Vis lys-radius for valgte" name="Show Light Radius for Selection" />
+		<menu_item_check label="Vis guidelys for valgte" name="Show Selection Beam" />
+		<menu_item_separator label="-----------" name="separator2" />
+		<menu_item_check label="Ret ind til gitter" name="Snap to Grid" />
+		<menu_item_call label="Ret XY for objekt ind til gitter" name="Snap Object XY to Grid" />
+		<menu_item_call label="Benyt valgte som grundlag for gitter" name="Use Selection for Grid" />
+		<menu_item_call label="Gitter indstillinger..." name="Grid Options..." />
+		<menu_item_separator label="-----------" name="separator3" />
+		<menu_item_check label="Rediger sammekædede objekter" name="Edit Linked Parts" />
+		<menu_item_call label="Sammenkæd" name="Link" />
+		<menu_item_call label="Adskil" name="Unlink" />
+		<menu_item_separator label="-----------" name="separator4" />
+		<menu_item_call label="Fokusér på valgte" name="Focus on Selection" />
+		<menu_item_call label="Zoom på valgte" name="Zoom to Selection" />
+		<menu_item_call label="Køb objekt" name="Menu Object Take" />
+		<menu_item_call label="Tag kopi" name="Take Copy" />
+		<menu_item_call label="Opdatér objekt i beholdning med ændringer"
+		     name="Save Object Back to My Inventory" />
+		<menu_item_call label="Opdatér ændringer i indhold på objekt"
+		     name="Save Object Back to Object Contents" />
+		<menu_item_separator label="-----------" name="separator6" />
+		<menu_item_call label="Vis vindue med advarsler/fejl fra scripts"
+		     name="Show Script Warning/Error Window" />
+		<menu label="Rekompilér scripts i valgte objekter"
+		     name="Recompile Scripts in Selection">
+			<menu_item_call label="Mono" name="Mono" />
+			<menu_item_call label="LSL" name="LSL" />
+		</menu>
+		<menu_item_call label="Genstart scripts i valgte objekter" name="Reset Scripts in Selection" />
+		<menu_item_call label="Sæt scripts til &apos;Running&apos; i valgte objekter"
+		     name="Set Scripts to Running in Selection" />
+		<menu_item_call label="Sæt scripts til &apos; Not running&apos; i valgte objekter"
+		     name="Set Scripts to Not Running in Selection" />
+	</menu>
+	<menu label="Hjælp" name="Help">
+		<menu_item_call label="Second Life Hjælp" name="Second Life Help" />
+		<menu_item_call label="Tutorial" name="Tutorial" />
+		<menu_item_separator label="-----------" name="separator" />
+		<menu_item_call label="Officiel Linden Blog..." name="Official Linden Blog..." />
+		<menu_item_separator label="-----------" name="separator2" />
+		<menu_item_call label="Portal om scripts..." name="Scripting Portal..." />
+		<menu_item_separator label="-----------" name="separator3" />
+		<menu_item_call label="Rapporter misbrug..." name="Report Abuse..." />
+		<menu_item_call label="Stød, skub &amp; slag..." name="Bumps, Pushes &amp;amp; Hits..." />
+		<menu_item_call label="Lag meter" name="Lag Meter" />
+		<menu_item_separator label="-----------" name="separator7" />
+		<menu label="Fejlrapport" name="Bug Reporting">
+			<menu_item_call label="Second Life sagsstyring..." name="Public Issue Tracker..." />
+			<menu_item_call label="Hjælp til Second Life sagsstyring..."
+			     name="Publc Issue Tracker Help..." />
+			<menu_item_separator label="-----------" name="separator7" />
+			<menu_item_call label="Om fejlrapportering..." name="Bug Reporing 101..." />
+			<menu_item_call label="Anmeld sikkerhedshændelser..." name="Security Issues..." />
+			<menu_item_call label="QA Wiki..." name="QA Wiki..." />
+			<menu_item_separator label="-----------" name="separator9" />
+			<menu_item_call label="Anmeld fejl..." name="Report Bug..." />
+		</menu>
+		<menu_item_call label="Om Second Life..." name="About Second Life..." />
+		,
+	</menu>
+</menu_bar>
diff --git a/indra/newview/skins/default/xui/da/panel_login.xml b/indra/newview/skins/default/xui/da/panel_login.xml
index 9ef1a0f2b9..308db3d299 100644
--- a/indra/newview/skins/default/xui/da/panel_login.xml
+++ b/indra/newview/skins/default/xui/da/panel_login.xml
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="panel_login">
-	<string name="real_url">
-		http://secondlife.com/app/login/
-	</string>
-	<string name="forgot_password_url">
-		http://secondlife.com/account/request.php
-	</string>
-	<text name="first_name_text">
-		Fornavn:
-	</text>
-	<text name="last_name_text">
-		Efternavn:
-	</text>
-	<text name="password_text">
-		Password:
-	</text>
-	<text name="start_location_text">
-		Start lokation:
-	</text>
-	<combo_box name="start_location_combo">
-		<combo_item name="MyHome">
-			Hjem
-		</combo_item>
-		<combo_item name="MyLastLocation">
-			Min sidste lokation
-		</combo_item>
-		<combo_item name="Typeregionname">
-			&lt;Skriv navn på region&gt;
-		</combo_item>
-	</combo_box>
-	<check_box label="Husk password" name="remember_check" />
-	<button label="Log ind" label_selected="Log ind" name="connect_btn" />
-	<text name="create_new_account_text">
-		Opret bruger
-	</text>
-	<text name="forgot_password_text">
-		Glemt navn eller password?
-	</text>
-	<text name="channel_text">
-		[VERSION]
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel name="panel_login">
+	<string name="real_url">
+		http://secondlife.com/app/login/
+	</string>
+	<string name="forgot_password_url">
+		http://secondlife.com/account/request.php
+	</string>
+	<text name="first_name_text">
+		Fornavn:
+	</text>
+	<text name="last_name_text">
+		Efternavn:
+	</text>
+	<text name="password_text">
+		Password:
+	</text>
+	<text name="start_location_text">
+		Start lokation:
+	</text>
+	<combo_box name="start_location_combo">
+		<combo_box.item name="MyHome">
+			Hjem
+		</combo_box.item>
+		<combo_box.item name="MyLastLocation">
+			Min sidste lokation
+		</combo_box.item>
+		<combo_box.item name="Typeregionname">
+			&lt;Skriv navn på region&gt;
+		</combo_box.item>
+	</combo_box>
+	<check_box label="Husk password" name="remember_check" />
+	<button label="Log ind" label_selected="Log ind" name="connect_btn" />
+	<text name="create_new_account_text">
+		Opret bruger
+	</text>
+	<text name="forgot_password_text">
+		Glemt navn eller password?
+	</text>
+	<text name="channel_text">
+		[VERSION]
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
index 6e15a7ef4b..254cd6ddb9 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
@@ -1,61 +1,61 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel label="Tekst chat" name="chat">
-	<text type="string" length="1" name="text_box">
-		Chat skriftstørrelse:
-	</text>
-	<radio_group name="chat_font_size">
-		<radio_item type="string" length="1" name="radio">
-			Lille
-		</radio_item>
-		<radio_item type="string" length="1" name="radio2">
-			Mellem
-		</radio_item>
-		<radio_item type="string" length="1" name="radio3">
-			Stor
-		</radio_item>
-	</radio_group>
-	<text type="string" length="1" name="text_box2">
-		Chat farve:
-	</text>
-	<color_swatch label="Dig" name="user" />
-	<color_swatch label="Andre" name="agent" />
-	<color_swatch label="IM" name="im" />
-	<color_swatch label="System" name="system" />
-	<color_swatch label="Fejl" name="script_error" />
-	<color_swatch label="Objekter" name="objects" />
-	<color_swatch label="Ejer" name="owner" />
-	<color_swatch label="Bobler" name="background" />
-	<color_swatch label="URL&apos;er" name="links" />
-	<text type="string" length="1" name="text_box8">
-		Script fejl:
-	</text>
-	<check_box label="Vis script fejl og advarsler i almindelig chat"
-	     name="script_errors_as_chat" />
-	<text type="string" length="1" name="text_box3">
-		Chat vindue:
-	</text>
-	<spinner label="Udfas chat efter" name="fade_chat_time" label_width="90" width="140" />
-	<text type="string" length="1" name="text_box4" left="292" >
-		(sekunder)
-	</text>
-	<spinner left="350" name="max_chat_count"/>
-	<text type="string" length="1" name="text_box5" left="415">
-		(linier)
-	</text>
-	<slider label="Gennemsigtighed" name="console_opacity" />
-	<check_box label="Brug fuldskærms bredde  (Kræver genstart)"
-	     name="chat_full_width_check" />
-	<text type="string" length="1" name="text_box6">
-		Chat indstillinger:
-	</text>
-	<check_box label="Luk chat efter tryk på enter" name="close_chat_on_return_check" />
-	<check_box label="Piletaster flytter altid figur under chat"
-	     name="arrow_keys_move_avatar_check" />
-	<check_box label="Vis klokkeslæt i lokal chat" name="show_timestamps_check" />
-	<check_box label="Afspil skrive animation ved chat" name="play_typing_animation" />
-	<text type="string" length="1" name="text_box7">
-		Chat talebobler:
-	</text>
-	<check_box label="Vis chat bobler" name="bubble_text_chat" />
-	<slider label="Gennemsigtighed" name="bubble_chat_opacity" />
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel label="Tekst chat" name="chat">
+	<text type="string" length="1" name="text_box">
+		Chat skriftstørrelse:
+	</text>
+	<radio_group name="chat_font_size">
+		<radio_item type="string" length="1" name="radio">
+			Lille
+		</radio_item>
+		<radio_item type="string" length="1" name="radio2">
+			Mellem
+		</radio_item>
+		<radio_item type="string" length="1" name="radio3">
+			Stor
+		</radio_item>
+	</radio_group>
+	<text type="string" length="1" name="text_box2">
+		Chat farve:
+	</text>
+	<color_swatch label="Dig" name="user" />
+	<color_swatch label="Andre" name="agent" />
+	<color_swatch label="IM" name="im" />
+	<color_swatch label="System" name="system" />
+	<color_swatch label="Fejl" name="script_error" />
+	<color_swatch label="Objekter" name="objects" />
+	<color_swatch label="Ejer" name="owner" />
+	<color_swatch label="Bobler" name="background" />
+	<color_swatch label="URL&apos;er" name="links" />
+	<text type="string" length="1" name="text_box8">
+		Script fejl:
+	</text>
+	<check_box label="Vis script fejl og advarsler i almindelig chat"
+	     name="script_errors_as_chat" />
+	<text type="string" length="1" name="text_box3">
+		Chat vindue:
+	</text>
+	<spinner label="Udfas chat efter" name="fade_chat_time" label_width="90" width="140" />
+	<text type="string" length="1" name="text_box4" left="292" >
+		(sekunder)
+	</text>
+	<spinner left="350" name="max_chat_count"/>
+	<text type="string" length="1" name="text_box5" left="415">
+		(linier)
+	</text>
+	<slider label="Gennemsigtighed" name="console_opacity" />
+	<check_box label="Brug fuldskærms bredde  (Kræver genstart)"
+	     name="chat_full_width_check" />
+	<text type="string" length="1" name="text_box6">
+		Chat indstillinger:
+	</text>
+	<check_box label="Luk chat efter tryk på enter" name="close_chat_on_return_check" />
+	<check_box label="Piletaster flytter altid figur under chat"
+	     name="arrow_keys_move_avatar_check" />
+	<check_box label="Vis klokkeslæt i lokal chat" name="show_timestamps_check" />
+	<check_box label="Afspil skrive animation ved chat" name="play_typing_animation" />
+	<text type="string" length="1" name="text_box7">
+		Chat talebobler:
+	</text>
+	<check_box label="Vis chat bobler" name="bubble_text_chat" />
+	<slider label="Gennemsigtighed" name="bubble_chat_opacity" />
+</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_general.xml b/indra/newview/skins/default/xui/da/panel_preferences_general.xml
index 9fa256b553..74a1ab1d7a 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_general.xml
@@ -1,118 +1,118 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel label="Generelt" name="general_panel">
-	<radio_group name="default_start_location">
-		<radio_item name="MyHome" tool_tip="Log ind til min hjemme lokation som standard.">
-			Mit hjem
-		</radio_item>
-		<radio_item name="MyLastLocation" tool_tip="Log ind til min sidste lokation som standard.">
-			Min sidste lokation
-		</radio_item>
-	</radio_group>
-	<check_box label="Vis start lokation på login billedet" name="show_location_checkbox" />
-	<combo_box name="fade_out_combobox">
-		<combo_item name="Never">
-			Aldrig
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Vis midlertidigt
-		</combo_item>
-		<combo_item name="Always">
-			Altid
-		</combo_item>
-	</combo_box>
-	<check_box label="Små avatar navne" name="small_avatar_names_checkbox" />
-	<check_box label="Skjul mit navn på min skærm" name="show_my_name_checkbox" />
-	<text type="string" length="1" name="group_titles_textbox">
-		Gruppe titler:
-	</text>
-	<check_box label="Skjul alle gruppe titler" name="show_all_title_checkbox" />
-	<check_box label="Gem min gruppe titel" name="show_my_title_checkbox" />
-	<color_swatch label="" name="effect_color_swatch" tool_tip="Klik for at åbne farvevælger" />
-	<text type="string" length="1" name="UI Size:">
-		UI Størrelse:
-	</text>
-	<check_box label="Brug opløsnings uafhængig skalering" name="ui_auto_scale" />
-	<spinner label="Tid før inaktiv:" name="afk_timeout_spinner" />
-	<check_box label="Rotér mini-kort" name="rotate_mini_map_checkbox" />
-	<check_box label="Giv besked når Linden dollars (L$) bliver brugt eller modtaget"
-	     name="notify_money_change_checkbox" />
-	<check_box label="Brug standard farve vælger" name="use_system_color_picker_checkbox"
-	     tool_tip="Brug dit systems standard farve vælger i stedet for den der er indbygget i Second Life." />
-	<check_box label="Vis Søg i øverste højre hjørne" name="show_search_panel"
-	     tool_tip="Vis indbygget søgepanel." />
-	<text type="string" length="1" name="start_location_textbox">
-		Start lokation:
-	</text>
-	<text type="string" length="1" name="show_names_textbox">
-		Vis navne:
-	</text>
-	<text type="string" length="1" name="effects_color_textbox">
-		Farve til mine effekter:
-	</text>
-	<text type="string" length="1" name="seconds_textbox">
-		sekunder
-	</text>
-	<text type="string" length="1" name="crash_report_textbox">
-		Nedbrudsrapporter:
-	</text>
-	<text type="string" length="1" name="language_textbox">
-		Sprog:
-	</text>
-	<text type="string" length="1" name="language_textbox2">
-		(Kræver genstart for at virke optimalt)
-	</text>
-	<string name="region_name_prompt">
-		&lt;Skriv regions navn&gt;
-	</string>
-	<combo_box name="crash_behavior_combobox">
-		<combo_item type="string" length="1" name="Askbeforesending">
-			Bed om bekræftigelse
-		</combo_item>
-		<combo_item type="string" length="1" name="Alwayssend">
-			Send altid
-		</combo_item>
-		<combo_item type="string" length="1" name="Neversend">
-			Send aldrig
-		</combo_item>
-	</combo_box>
-	<combo_box name="language_combobox">
-		<combo_item type="string" length="1" name="System Default Language">
-			System standard
-		</combo_item>
-		<combo_item type="string" length="1" name="English">
-			English (Engelsk)
-		</combo_item>
-		<combo_item type="string" length="1" name="Danish">
-			Dansk - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Deutsch(German)">
-			Deutsch (Tysk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Spanish">
-			Español (Spansk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="French">
-			Français (Fransk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Hungarian">
-			Magyar (Ungarsk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Polish">
-			Polski (Polsk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Portugese">
-			Portugués (Portugisisk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Chinese">
-			中文 (简体) (Kinesisk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="(Japanese)">
-			日本語 (Japansk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="(Korean)">
-			한국어 (Koreansk) - Beta
-		</combo_item>
-	</combo_box>
-	<check_box label="Del sprog med objekter" name="language_is_public"
-	     tool_tip="Dette lader objekter i verden vide hvad dit foretrukne sprog er." />
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel label="Generelt" name="general_panel">
+	<radio_group name="default_start_location">
+		<radio_item name="MyHome" tool_tip="Log ind til min hjemme lokation som standard.">
+			Mit hjem
+		</radio_item>
+		<radio_item name="MyLastLocation" tool_tip="Log ind til min sidste lokation som standard.">
+			Min sidste lokation
+		</radio_item>
+	</radio_group>
+	<check_box label="Vis start lokation på login billedet" name="show_location_checkbox" />
+	<combo_box name="fade_out_combobox">
+		<combo_item name="Never">
+			Aldrig
+		</combo_item>
+		<combo_item name="Show Temporarily">
+			Vis midlertidigt
+		</combo_item>
+		<combo_item name="Always">
+			Altid
+		</combo_item>
+	</combo_box>
+	<check_box label="Små avatar navne" name="small_avatar_names_checkbox" />
+	<check_box label="Skjul mit navn på min skærm" name="show_my_name_checkbox" />
+	<text type="string" length="1" name="group_titles_textbox">
+		Gruppe titler:
+	</text>
+	<check_box label="Skjul alle gruppe titler" name="show_all_title_checkbox" />
+	<check_box label="Gem min gruppe titel" name="show_my_title_checkbox" />
+	<color_swatch label="" name="effect_color_swatch" tool_tip="Klik for at åbne farvevælger" />
+	<text type="string" length="1" name="UI Size:">
+		UI Størrelse:
+	</text>
+	<check_box label="Brug opløsnings uafhængig skalering" name="ui_auto_scale" />
+	<spinner label="Tid før inaktiv:" name="afk_timeout_spinner" />
+	<check_box label="Rotér mini-kort" name="rotate_mini_map_checkbox" />
+	<check_box label="Giv besked når Linden dollars (L$) bliver brugt eller modtaget"
+	     name="notify_money_change_checkbox" />
+	<check_box label="Brug standard farve vælger" name="use_system_color_picker_checkbox"
+	     tool_tip="Brug dit systems standard farve vælger i stedet for den der er indbygget i Second Life." />
+	<check_box label="Vis Søg i øverste højre hjørne" name="show_search_panel"
+	     tool_tip="Vis indbygget søgepanel." />
+	<text type="string" length="1" name="start_location_textbox">
+		Start lokation:
+	</text>
+	<text type="string" length="1" name="show_names_textbox">
+		Vis navne:
+	</text>
+	<text type="string" length="1" name="effects_color_textbox">
+		Farve til mine effekter:
+	</text>
+	<text type="string" length="1" name="seconds_textbox">
+		sekunder
+	</text>
+	<text type="string" length="1" name="crash_report_textbox">
+		Nedbrudsrapporter:
+	</text>
+	<text type="string" length="1" name="language_textbox">
+		Sprog:
+	</text>
+	<text type="string" length="1" name="language_textbox2">
+		(Kræver genstart for at virke optimalt)
+	</text>
+	<string name="region_name_prompt">
+		&lt;Skriv regions navn&gt;
+	</string>
+	<combo_box name="crash_behavior_combobox">
+		<combo_item type="string" length="1" name="Askbeforesending">
+			Bed om bekræftigelse
+		</combo_item>
+		<combo_item type="string" length="1" name="Alwayssend">
+			Send altid
+		</combo_item>
+		<combo_item type="string" length="1" name="Neversend">
+			Send aldrig
+		</combo_item>
+	</combo_box>
+	<combo_box name="language_combobox">
+		<combo_item type="string" length="1" name="System Default Language">
+			System standard
+		</combo_item>
+		<combo_item type="string" length="1" name="English">
+			English (Engelsk)
+		</combo_item>
+		<combo_item type="string" length="1" name="Danish">
+			Dansk - Beta
+		</combo_item>
+		<combo_item type="string" length="1" name="Deutsch(German)">
+			Deutsch (Tysk) - Beta
+		</combo_item>
+		<combo_item type="string" length="1" name="Spanish">
+			Español (Spansk) - Beta
+		</combo_item>
+		<combo_item type="string" length="1" name="French">
+			Français (Fransk) - Beta
+		</combo_item>
+		<combo_item type="string" length="1" name="Hungarian">
+			Magyar (Ungarsk) - Beta
+		</combo_item>
+		<combo_item type="string" length="1" name="Polish">
+			Polski (Polsk) - Beta
+		</combo_item>
+		<combo_item type="string" length="1" name="Portugese">
+			Portugués (Portugisisk) - Beta
+		</combo_item>
+		<combo_item type="string" length="1" name="Chinese">
+			中文 (简体) (Kinesisk) - Beta
+		</combo_item>
+		<combo_item type="string" length="1" name="(Japanese)">
+			日本語 (Japansk) - Beta
+		</combo_item>
+		<combo_item type="string" length="1" name="(Korean)">
+			한국어 (Koreansk) - Beta
+		</combo_item>
+	</combo_box>
+	<check_box label="Del sprog med objekter" name="language_is_public"
+	     tool_tip="Dette lader objekter i verden vide hvad dit foretrukne sprog er." />
+</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
index a074e85869..8add1304ae 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
@@ -1,179 +1,179 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel label="Grafik" name="Display panel">
-	<button label="?" name="GraphicsPreferencesHelpButton" />
-	<check_box label="Kør Second Life i et vindue" name="windowed mode" />
-	<text_editor type="string" length="1" name="FullScreenInfo">
-		Hvis dette ikke er valgt kører Second Life i Fuld skærm.
-	</text_editor>
-	<text type="string" length="1" name="WindowSizeLabel">
-		Opløsning:
-	</text>
-	<combo_box name="windowsize combo">
-		<combo_item type="string" length="1" name="640x480">
-			640x480
-		</combo_item>
-		<combo_item type="string" length="1" name="800x600">
-			800x600
-		</combo_item>
-		<combo_item type="string" length="1" name="720x480">
-			720x480 (NTSC)
-		</combo_item>
-		<combo_item type="string" length="1" name="768x576">
-			768x576 (PAL)
-		</combo_item>
-		<combo_item type="string" length="1" name="1024x768">
-			1024x768
-		</combo_item>
-	</combo_box>
-	<text type="string" length="1" name="DisplayResLabel">
-		Skærm opløsning:
-	</text>
-	<text type="string" length="1" name="AspectRatioLabel1" tool_tip="bredde / højde">
-		Format:
-	</text>
-	<combo_box name="aspect_ratio" tool_tip="bredde/ højde">
-		<combo_item type="string" length="1" name="4:3(StandardCRT)">
-			4:3 (Standard CRT)
-		</combo_item>
-		<combo_item type="string" length="1" name="5:4(1280x1024LCD)">
-			5:4 (1280x1024 LCD)
-		</combo_item>
-		<combo_item type="string" length="1" name="8:5(Widescreen)">
-			8:5 (Widescreen)
-		</combo_item>
-		<combo_item type="string" length="1" name="16:9(Widescreen)">
-			16:9 (Widescreen)
-		</combo_item>
-	</combo_box>
-	<check_box label="Auto-detect format" name="aspect_auto_detect" />
-	<text type="string" length="1" name="HigherText">
-		Kvalitet og
-	</text>
-	<text type="string" length="1" name="QualityText">
-		Ydelse:
-	</text>
-	<text type="string" length="1" name="FasterText">
-		Hurtigere
-	</text>
-	<text type="string" length="1" name="ShadersPrefText">
-		Lav
-	</text>
-	<text type="string" length="1" name="ShadersPrefText2">
-		Middel
-	</text>
-	<text type="string" length="1" name="ShadersPrefText3">
-		Høj
-	</text>
-	<text type="string" length="1" name="ShadersPrefText4">
-		Ultra
-	</text>
-	<text type="string" length="1" name="HigherText2">
-		Højere
-	</text>
-	<text type="string" length="1" name="QualityText2">
-		Kvalitet
-	</text>
-	<slider label="" name="QualityPerformanceSelection" />
-	<check_box label="Manuelt" name="CustomSettings" />
-	<text type="string" length="1" name="ShadersText">
-		Overflader:
-	</text>
-	<check_box label="Glatte flader og skin" name="BumpShiny" />
-	<check_box label="Basale flader" name="BasicShaders"
-	     tool_tip="Ved at slå dette valg fra, kan det forhindres at visse grafikkort drivere crasher." />
-	<check_box label="Atmosfæriske flader" name="WindLightUseAtmosShaders" />
-	<check_box label="Reflektioner i vand" name="Reflections" />
-	<text type="string" length="1" name="ReflectionDetailText">
-		Spejlnings detaljer:
-	</text>
-	<radio_group name="ReflectionDetailRadio">
-		<radio_item type="string" length="1" name="0">
-			Terræn og træer
-		</radio_item>
-		<radio_item type="string" length="1" name="1">
-			Alle statiske objekter
-		</radio_item>
-		<radio_item type="string" length="1" name="2">
-			Alle avatarer og objekter
-		</radio_item>
-		<radio_item type="string" length="1" name="3">
-			Alt
-		</radio_item>
-	</radio_group>
-	<text type="string" length="1" name="AvatarRenderingText">
-		Avatar gengivelse
-	</text>
-	<check_box label="Mini-figurer på lang afstand" name="AvatarImpostors" />
-	<check_box label="Hardware Skinning" name="AvatarVertexProgram" />
-	<check_box label="Avatar tøj" name="AvatarCloth" />
-	<text type="string" length="1" name="DrawDistanceMeterText1">
-		m
-	</text>
-	<text type="string" length="1" name="DrawDistanceMeterText2">
-		m
-	</text>
-	<slider label="Maks. visnings-afstand:" name="DrawDistance" />
-	<slider label="Maks. antal partikler:" name="MaxParticleCount" />
-	<slider label="Efterbehandlingskvalitet:" name="RenderPostProcess" />
-	<text type="string" length="1" name="MeshDetailText">
-		Netmaske detaljer:
-	</text>
-	<slider label="  Objekter:" name="ObjectMeshDetail" />
-	<slider label="  Flexiprims:" name="FlexibleMeshDetail" />
-	<slider label="  Træer:" name="TreeMeshDetail" />
-	<slider label="  Avatarer:" name="AvatarMeshDetail" />
-	<slider label="  Terræn:" name="TerrainMeshDetail" />
-	<slider label="  Himmel:" name="SkyMeshDetail" />
-	<text type="string" length="1" name="PostProcessText">
-		Lav
-	</text>
-	<text type="string" length="1" name="ObjectMeshDetailText">
-		Lav
-	</text>
-	<text type="string" length="1" name="FlexibleMeshDetailText">
-		Lav
-	</text>
-	<text type="string" length="1" name="TreeMeshDetailText">
-		Lav
-	</text>
-	<text type="string" length="1" name="AvatarMeshDetailText">
-		Lav
-	</text>
-	<text type="string" length="1" name="TerrainMeshDetailText">
-		Lav
-	</text>
-	<text type="string" length="1" name="SkyMeshDetailText">
-		Lav
-	</text>
-	<text type="string" length="1" name="LightingDetailText">
-		Lys detaljer:
-	</text>
-	<radio_group name="LightingDetailRadio">
-		<radio_item type="string" length="1" name="SunMoon">
-			Kun sol og måne
-		</radio_item>
-		<radio_item type="string" length="1" name="LocalLights">
-			Lys i nærheden
-		</radio_item>
-	</radio_group>
-	<text type="string" length="1" name="TerrainDetailText">
-		Terræn detaljer:
-	</text>
-	<radio_group name="TerrainDetailRadio">
-		<radio_item type="string" length="1" name="0">
-			Lav
-		</radio_item>
-		<radio_item type="string" length="1" name="2">
-			Høj
-		</radio_item>
-	</radio_group>
-	<button label="Anbefalede indstillinger" name="Defaults" />
-	<button label="Hardware valg" label_selected="Hardware Options"
-	     name="GraphicsHardwareButton" />
-	<string name="resolution_format">
-		[RES_X] x [RES_Y]
-	</string>
-	<string name="aspect_ratio_text">
-		[NUM]:[DEN]
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel label="Grafik" name="Display panel">
+	<button label="?" name="GraphicsPreferencesHelpButton" />
+	<check_box label="Kør Second Life i et vindue" name="windowed mode" />
+	<text_editor type="string" length="1" name="FullScreenInfo">
+		Hvis dette ikke er valgt kører Second Life i Fuld skærm.
+	</text_editor>
+	<text type="string" length="1" name="WindowSizeLabel">
+		Opløsning:
+	</text>
+	<combo_box name="windowsize combo">
+		<combo_box.item type="string" length="1" name="640x480">
+			640x480
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="800x600">
+			800x600
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="720x480">
+			720x480 (NTSC)
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="768x576">
+			768x576 (PAL)
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="1024x768">
+			1024x768
+		</combo_box.item>
+	</combo_box>
+	<text type="string" length="1" name="DisplayResLabel">
+		Skærm opløsning:
+	</text>
+	<text type="string" length="1" name="AspectRatioLabel1" tool_tip="bredde / højde">
+		Format:
+	</text>
+	<combo_box name="aspect_ratio" tool_tip="bredde/ højde">
+		<combo_box.item type="string" length="1" name="4:3(StandardCRT)">
+			4:3 (Standard CRT)
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)">
+			5:4 (1280x1024 LCD)
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="8:5(Widescreen)">
+			8:5 (Widescreen)
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="16:9(Widescreen)">
+			16:9 (Widescreen)
+		</combo_box.item>
+	</combo_box>
+	<check_box label="Auto-detect format" name="aspect_auto_detect" />
+	<text type="string" length="1" name="HigherText">
+		Kvalitet og
+	</text>
+	<text type="string" length="1" name="QualityText">
+		Ydelse:
+	</text>
+	<text type="string" length="1" name="FasterText">
+		Hurtigere
+	</text>
+	<text type="string" length="1" name="ShadersPrefText">
+		Lav
+	</text>
+	<text type="string" length="1" name="ShadersPrefText2">
+		Middel
+	</text>
+	<text type="string" length="1" name="ShadersPrefText3">
+		Høj
+	</text>
+	<text type="string" length="1" name="ShadersPrefText4">
+		Ultra
+	</text>
+	<text type="string" length="1" name="HigherText2">
+		Højere
+	</text>
+	<text type="string" length="1" name="QualityText2">
+		Kvalitet
+	</text>
+	<slider label="" name="QualityPerformanceSelection" />
+	<check_box label="Manuelt" name="CustomSettings" />
+	<text type="string" length="1" name="ShadersText">
+		Overflader:
+	</text>
+	<check_box label="Glatte flader og skin" name="BumpShiny" />
+	<check_box label="Basale flader" name="BasicShaders"
+	     tool_tip="Ved at slå dette valg fra, kan det forhindres at visse grafikkort drivere crasher." />
+	<check_box label="Atmosfæriske flader" name="WindLightUseAtmosShaders" />
+	<check_box label="Reflektioner i vand" name="Reflections" />
+	<text type="string" length="1" name="ReflectionDetailText">
+		Spejlnings detaljer:
+	</text>
+	<radio_group name="ReflectionDetailRadio">
+		<radio_item type="string" length="1" name="0">
+			Terræn og træer
+		</radio_item>
+		<radio_item type="string" length="1" name="1">
+			Alle statiske objekter
+		</radio_item>
+		<radio_item type="string" length="1" name="2">
+			Alle avatarer og objekter
+		</radio_item>
+		<radio_item type="string" length="1" name="3">
+			Alt
+		</radio_item>
+	</radio_group>
+	<text type="string" length="1" name="AvatarRenderingText">
+		Avatar gengivelse
+	</text>
+	<check_box label="Mini-figurer på lang afstand" name="AvatarImpostors" />
+	<check_box label="Hardware Skinning" name="AvatarVertexProgram" />
+	<check_box label="Avatar tøj" name="AvatarCloth" />
+	<text type="string" length="1" name="DrawDistanceMeterText1">
+		m
+	</text>
+	<text type="string" length="1" name="DrawDistanceMeterText2">
+		m
+	</text>
+	<slider label="Maks. visnings-afstand:" name="DrawDistance" />
+	<slider label="Maks. antal partikler:" name="MaxParticleCount" />
+	<slider label="Efterbehandlingskvalitet:" name="RenderPostProcess" />
+	<text type="string" length="1" name="MeshDetailText">
+		Netmaske detaljer:
+	</text>
+	<slider label="  Objekter:" name="ObjectMeshDetail" />
+	<slider label="  Flexiprims:" name="FlexibleMeshDetail" />
+	<slider label="  Træer:" name="TreeMeshDetail" />
+	<slider label="  Avatarer:" name="AvatarMeshDetail" />
+	<slider label="  Terræn:" name="TerrainMeshDetail" />
+	<slider label="  Himmel:" name="SkyMeshDetail" />
+	<text type="string" length="1" name="PostProcessText">
+		Lav
+	</text>
+	<text type="string" length="1" name="ObjectMeshDetailText">
+		Lav
+	</text>
+	<text type="string" length="1" name="FlexibleMeshDetailText">
+		Lav
+	</text>
+	<text type="string" length="1" name="TreeMeshDetailText">
+		Lav
+	</text>
+	<text type="string" length="1" name="AvatarMeshDetailText">
+		Lav
+	</text>
+	<text type="string" length="1" name="TerrainMeshDetailText">
+		Lav
+	</text>
+	<text type="string" length="1" name="SkyMeshDetailText">
+		Lav
+	</text>
+	<text type="string" length="1" name="LightingDetailText">
+		Lys detaljer:
+	</text>
+	<radio_group name="LightingDetailRadio">
+		<radio_item type="string" length="1" name="SunMoon">
+			Kun sol og måne
+		</radio_item>
+		<radio_item type="string" length="1" name="LocalLights">
+			Lys i nærheden
+		</radio_item>
+	</radio_group>
+	<text type="string" length="1" name="TerrainDetailText">
+		Terræn detaljer:
+	</text>
+	<radio_group name="TerrainDetailRadio">
+		<radio_item type="string" length="1" name="0">
+			Lav
+		</radio_item>
+		<radio_item type="string" length="1" name="2">
+			Høj
+		</radio_item>
+	</radio_group>
+	<button label="Anbefalede indstillinger" name="Defaults" />
+	<button label="Hardware valg" label_selected="Hardware Options"
+	     name="GraphicsHardwareButton" />
+	<string name="resolution_format">
+		[RES_X] x [RES_Y]
+	</string>
+	<string name="aspect_ratio_text">
+		[NUM]:[DEN]
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml
index 874e9b04fd..bd34d39993 100644
--- a/indra/newview/skins/default/xui/da/strings.xml
+++ b/indra/newview/skins/default/xui/da/strings.xml
@@ -1,405 +1,405 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<strings>
-	<string name="LoginInProgress">
-		Logger p. [APP_NAME] kan virke laast.  Vent venligst.
-	</string>
-	<string name="LoginAuthenticating">
-		Validerer adgang
-	</string>
-	<string name="LoginMaintenance">
-		Udfører konto vedligeholdelse...
-	</string>
-	<string name="LoginAttempt">
-		Tidligere forsø på login fejlede. Logger på, forsøg [NUMBER]
-	</string>
-	<string name="LoginPrecaching">
-		verden...
-	</string>
-	<string name="LoginInitializingBrowser">
-		Klargør indbyggede web browser...
-	</string>
-	<string name="LoginInitializingMultimedia">
-		Klargør multimedia...
-	</string>
-	<string name="LoginVerifyingCache">
-		Verificérer cache filer (kan tage 60-90 sekunder)...
-	</string>
-	<string name="LoginProcessingResponse">
-		Behandler svar...
-	</string>
-	<string name="LoginInitializingWorld">
-		Initialiserer verden...
-	</string>
-	<string name="LoginDecodingImages">
-		Behandler billeder...
-	</string>
-	<string name="LoginInitializingQuicktime">
-		Initialiserer QuickTime...
-	</string>
-	<string name="LoginQuicktimeNotFound">
-		QuickTime ikke fundet- kunne derfor ikke initialisere.
-	</string>
-	<string name="LoginQuicktimeOK">
-		QuickTime initialiseret.
-	</string>
-	<string name="LoginWaitingForRegionHandshake">
-		Venter på svar fra region...
-	</string>
-	<string name="LoginConnectingToRegion">
-		Tilslutter til region...
-	</string>
-	<string name="LoginDownloadingClothing">
-		Henter tøj...
-	</string>
-	<string name="LoginFailedNoNetwork">
-		Netværks fejl: Kunne ikke oprette forbindelse, tjek venligst din netværksforbindelse.
-	</string>
-	<string name="AgentLostConnection">
-		Denne region kan have problemer. Tjek venligst din forbindelse til internettet.
-	</string>
-	<string name="TooltipOwner">
-		Ejer:
-	</string>
-	<string name="TooltipPublic">
-		Offentlig
-	</string>
-	<string name="TooltipIsGroup">
-		(Gruppe)
-	</string>
-	<string name="TooltipFlagScript">
-		Script
-	</string>
-	<string name="TooltipFlagPhysics">
-		Fysik
-	</string>
-	<string name="TooltipFlagTouch">
-		Rør
-	</string>
-	<string name="TooltipFlagL$">
-		L$
-	</string>
-	<string name="TooltipFlagPhantom">
-		Fantom
-	</string>
-	<string name="TooltipFlagTemporary">
-		Temporær
-	</string>
-	<string name="TooltipFreeToCopy">
-		Kan kopieres
-	</string>
-	<string name="TooltipForSaleL$">
-		Til salg: L$[AMOUNT]
-	</string>
-	<string name="TooltipForSaleMsg">
-		Til salg: [MESSAGE]
-	</string>
-	<string name="TooltipFlagGroupBuild">
-		Gruppe byg
-	</string>
-	<string name="TooltipFlagNoBuild">
-		Må ikke bygge
-	</string>
-	<string name="TooltipFlagNoEdit">
-		Gruppe byg
-	</string>
-	<string name="TooltipFlagNotSafe">
-		Ikke sikker område
-	</string>
-	<string name="TooltipFlagNoFly">
-		Ingen flyvning
-	</string>
-	<string name="TooltipFlagGroupScripts">
-		Gruppe scripts
-	</string>
-	<string name="TooltipFlagNoScripts">
-		Ingen Scripts
-	</string>
-	<string name="TooltipLand">
-		Land:
-	</string>
-	<string name="TooltipMustSingleDrop">
-		Kun et enkelt element kan trækkes ind her
-	</string>
-	<string name="RetrievingData">
-		Henter...
-	</string>
-	<string name="ReleaseNotes">
-		Noter om version
-	</string>
-	<string name="LoadingData">
-		Henter...
-	</string>
-	<string name="AvatarNameNobody">
-		(ingen)
-	</string>
-	<string name="AvatarNameWaiting">
-		(venter)
-	</string>
-	<string name="AvatarNameHippos">
-		(hippos)
-	</string>
-	<string name="GroupNameNone">
-		(ingen)
-	</string>
-	<string name="AssetErrorNone">
-		Ingen fejl
-	</string>
-	<string name="AssetErrorRequestFailed">
-		Element forespørgsel: fejlede
-	</string>
-	<string name="AssetErrorNonexistentFile">
-		Element forespørgsel: fil findes ikke
-	</string>
-	<string name="AssetErrorNotInDatabase">
-		Element forespørgsel: element ikke fundet i database
-	</string>
-	<string name="AssetErrorEOF">
-		Slutning af fil
-	</string>
-	<string name="AssetErrorCannotOpenFile">
-		Kan ikke åbne fil
-	</string>
-	<string name="AssetErrorFileNotFound">
-		Fil ikke fundet
-	</string>
-	<string name="AssetErrorTCPTimeout">
-		Tidsgrænse overskredet ved filhentning
-	</string>
-	<string name="AssetErrorCircuitGone">
-		Forbindelsen mistet
-	</string>
-	<string name="AssetErrorUnknownStatus">
-		Ukendt status
-	</string>
-	<string name="AvatarEditingApparance">
-		(Ændrer udseende)
-	</string>
-	<string name="AvatarAway">
-		Væk
-	</string>
-	<string name="AvatarBusy">
-		Optaget
-	</string>
-	<string name="AvatarMuted">
-		Blokeret
-	</string>
-	<string name="anim_express_afraid">
-		Bange
-	</string>
-	<string name="anim_express_anger">
-		Vred
-	</string>
-	<string name="anim_away">
-		Væk
-	</string>
-	<string name="anim_backflip">
-		Baglæns salto
-	</string>
-	<string name="anim_express_laugh">
-		Hjertelig latter
-	</string>
-	<string name="anim_express_toothsmile">
-		Stort smil
-	</string>
-	<string name="anim_blowkiss">
-		Sende kys
-	</string>
-	<string name="anim_express_bored">
-		Keder sig
-	</string>
-	<string name="anim_bow">
-		Buk
-	</string>
-	<string name="anim_clap">
-		Klap
-	</string>
-	<string name="anim_courtbow">
-		Højtideligt buk
-	</string>
-	<string name="anim_express_cry">
-		Græd
-	</string>
-	<string name="anim_dance1">
-		Dans 1
-	</string>
-	<string name="anim_dance2">
-		Dans 2
-	</string>
-	<string name="anim_dance3">
-		Dans 3
-	</string>
-	<string name="anim_dance4">
-		Dans 4
-	</string>
-	<string name="anim_dance5">
-		Dans 5
-	</string>
-	<string name="anim_dance6">
-		Dans 6
-	</string>
-	<string name="anim_dance7">
-		Dans 7
-	</string>
-	<string name="anim_dance8">
-		Dans 8
-	</string>
-	<string name="anim_express_disdain">
-		Foragt
-	</string>
-	<string name="anim_drink">
-		Drik
-	</string>
-	<string name="anim_express_embarrased">
-		Flov
-	</string>
-	<string name="anim_angry_fingerwag">
-		Løftet finger
-	</string>
-	<string name="anim_fist_pump">
-		Knytnæve
-	</string>
-	<string name="anim_yoga_float">
-		Svævende yoga
-	</string>
-	<string name="anim_express_frown">
-		Mistroisk
-	</string>
-	<string name="anim_impatient">
-		Utålmodig
-	</string>
-	<string name="anim_jumpforjoy">
-		Glædeshop
-	</string>
-	<string name="anim_kissmybutt">
-		Kys min r..
-	</string>
-	<string name="anim_express_kiss">
-		Kys
-	</string>
-	<string name="anim_laugh_short">
-		Grin
-	</string>
-	<string name="anim_musclebeach">
-		Bodybuilder
-	</string>
-	<string name="anim_no_unhappy">
-		Nej (sur)
-	</string>
-	<string name="anim_no_head">
-		Nej
-	</string>
-	<string name="anim_nyanya">
-		Æv-bæv
-	</string>
-	<string name="anim_punch_onetwo">
-		Et-to slag
-	</string>
-	<string name="anim_express_open_mouth">
-		Åben mund
-	</string>
-	<string name="anim_peace">
-		Peace
-	</string>
-	<string name="anim_point_you">
-		Peg på andre
-	</string>
-	<string name="anim_point_me">
-		Peg på dig selv
-	</string>
-	<string name="anim_punch_l">
-		Slå venstre
-	</string>
-	<string name="anim_punch_r">
-		Slå højre
-	</string>
-	<string name="anim_rps_countdown">
-		SSP - Tæl
-	</string>
-	<string name="anim_rps_paper">
-		SSP - Papir
-	</string>
-	<string name="anim_rps_rock">
-		SSP - Sten
-	</string>
-	<string name="anim_rps_scissors">
-		SSP - Saks
-	</string>
-	<string name="anim_express_repulsed">
-		Misfornøjet
-	</string>
-	<string name="anim_kick_roundhouse_r">
-		Karatepark
-	</string>
-	<string name="anim_express_sad">
-		Ked af det
-	</string>
-	<string name="anim_salute">
-		Honnør
-	</string>
-	<string name="anim_shout">
-		Råb
-	</string>
-	<string name="anim_express_shrug">
-		Skuldertræk
-	</string>
-	<string name="anim_express_smile">
-		Smil
-	</string>
-	<string name="anim_smoke_idle">
-		Ryg
-	</string>
-	<string name="anim_smoke_inhale">
-		Indhalér
-	</string>
-	<string name="anim_smoke_throw_down">
-		Smid cigaret
-	</string>
-	<string name="anim_express_surprise">
-		Overrasket
-	</string>
-	<string name="anim_sword_strike_r">
-		Sværdslag
-	</string>
-	<string name="anim_angry_tantrum">
-		Ekstatisk
-	</string>
-	<string name="anim_express_tongue_out">
-		Tunge ud
-	</string>
-	<string name="anim_hello">
-		Vink
-	</string>
-	<string name="anim_whisper">
-		Knib øje i
-	</string>
-	<string name="anim_whistle">
-		Pift
-	</string>
-	<string name="anim_express_wink">
-		Blink
-	</string>
-	<string name="anim_wink_hollywood">
-		Blink (Hollywood)
-	</string>
-	<string name="anim_express_worry">
-		Bekymret
-	</string>
-	<string name="anim_yes_happy">
-		Ja (glad)
-	</string>
-	<string name="anim_yes_head">
-		Ja
-	</string>
-	<string name="texture_loading">
-		Henter...
-	</string>
-	<string name="worldmap_offline">
-		Offline
-	</string>
-	<string name="whisper">
-		hvisker:
-	</string>
-	<string name="shout">
-		råber:
-	</string>
-</strings>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<strings>
+	<string name="LoginInProgress">
+		Logger p. [APP_NAME] kan virke laast.  Vent venligst.
+	</string>
+	<string name="LoginAuthenticating">
+		Validerer adgang
+	</string>
+	<string name="LoginMaintenance">
+		Udfører konto vedligeholdelse...
+	</string>
+	<string name="LoginAttempt">
+		Tidligere forsø på login fejlede. Logger på, forsøg [NUMBER]
+	</string>
+	<string name="LoginPrecaching">
+		verden...
+	</string>
+	<string name="LoginInitializingBrowser">
+		Klargør indbyggede web browser...
+	</string>
+	<string name="LoginInitializingMultimedia">
+		Klargør multimedia...
+	</string>
+	<string name="LoginVerifyingCache">
+		Verificérer cache filer (kan tage 60-90 sekunder)...
+	</string>
+	<string name="LoginProcessingResponse">
+		Behandler svar...
+	</string>
+	<string name="LoginInitializingWorld">
+		Initialiserer verden...
+	</string>
+	<string name="LoginDecodingImages">
+		Behandler billeder...
+	</string>
+	<string name="LoginInitializingQuicktime">
+		Initialiserer QuickTime...
+	</string>
+	<string name="LoginQuicktimeNotFound">
+		QuickTime ikke fundet- kunne derfor ikke initialisere.
+	</string>
+	<string name="LoginQuicktimeOK">
+		QuickTime initialiseret.
+	</string>
+	<string name="LoginWaitingForRegionHandshake">
+		Venter på svar fra region...
+	</string>
+	<string name="LoginConnectingToRegion">
+		Tilslutter til region...
+	</string>
+	<string name="LoginDownloadingClothing">
+		Henter tøj...
+	</string>
+	<string name="LoginFailedNoNetwork">
+		Netværks fejl: Kunne ikke oprette forbindelse, tjek venligst din netværksforbindelse.
+	</string>
+	<string name="AgentLostConnection">
+		Denne region kan have problemer. Tjek venligst din forbindelse til internettet.
+	</string>
+	<string name="TooltipOwner">
+		Ejer:
+	</string>
+	<string name="TooltipPublic">
+		Offentlig
+	</string>
+	<string name="TooltipIsGroup">
+		(Gruppe)
+	</string>
+	<string name="TooltipFlagScript">
+		Script
+	</string>
+	<string name="TooltipFlagPhysics">
+		Fysik
+	</string>
+	<string name="TooltipFlagTouch">
+		Rør
+	</string>
+	<string name="TooltipFlagL$">
+		L$
+	</string>
+	<string name="TooltipFlagPhantom">
+		Fantom
+	</string>
+	<string name="TooltipFlagTemporary">
+		Temporær
+	</string>
+	<string name="TooltipFreeToCopy">
+		Kan kopieres
+	</string>
+	<string name="TooltipForSaleL$">
+		Til salg: L$[AMOUNT]
+	</string>
+	<string name="TooltipForSaleMsg">
+		Til salg: [MESSAGE]
+	</string>
+	<string name="TooltipFlagGroupBuild">
+		Gruppe byg
+	</string>
+	<string name="TooltipFlagNoBuild">
+		Må ikke bygge
+	</string>
+	<string name="TooltipFlagNoEdit">
+		Gruppe byg
+	</string>
+	<string name="TooltipFlagNotSafe">
+		Ikke sikker område
+	</string>
+	<string name="TooltipFlagNoFly">
+		Ingen flyvning
+	</string>
+	<string name="TooltipFlagGroupScripts">
+		Gruppe scripts
+	</string>
+	<string name="TooltipFlagNoScripts">
+		Ingen Scripts
+	</string>
+	<string name="TooltipLand">
+		Land:
+	</string>
+	<string name="TooltipMustSingleDrop">
+		Kun et enkelt element kan trækkes ind her
+	</string>
+	<string name="RetrievingData">
+		Henter...
+	</string>
+	<string name="ReleaseNotes">
+		Noter om version
+	</string>
+	<string name="LoadingData">
+		Henter...
+	</string>
+	<string name="AvatarNameNobody">
+		(ingen)
+	</string>
+	<string name="AvatarNameWaiting">
+		(venter)
+	</string>
+	<string name="AvatarNameHippos">
+		(hippos)
+	</string>
+	<string name="GroupNameNone">
+		(ingen)
+	</string>
+	<string name="AssetErrorNone">
+		Ingen fejl
+	</string>
+	<string name="AssetErrorRequestFailed">
+		Element forespørgsel: fejlede
+	</string>
+	<string name="AssetErrorNonexistentFile">
+		Element forespørgsel: fil findes ikke
+	</string>
+	<string name="AssetErrorNotInDatabase">
+		Element forespørgsel: element ikke fundet i database
+	</string>
+	<string name="AssetErrorEOF">
+		Slutning af fil
+	</string>
+	<string name="AssetErrorCannotOpenFile">
+		Kan ikke åbne fil
+	</string>
+	<string name="AssetErrorFileNotFound">
+		Fil ikke fundet
+	</string>
+	<string name="AssetErrorTCPTimeout">
+		Tidsgrænse overskredet ved filhentning
+	</string>
+	<string name="AssetErrorCircuitGone">
+		Forbindelsen mistet
+	</string>
+	<string name="AssetErrorUnknownStatus">
+		Ukendt status
+	</string>
+	<string name="AvatarEditingApparance">
+		(Ændrer udseende)
+	</string>
+	<string name="AvatarAway">
+		Væk
+	</string>
+	<string name="AvatarBusy">
+		Optaget
+	</string>
+	<string name="AvatarMuted">
+		Blokeret
+	</string>
+	<string name="anim_express_afraid">
+		Bange
+	</string>
+	<string name="anim_express_anger">
+		Vred
+	</string>
+	<string name="anim_away">
+		Væk
+	</string>
+	<string name="anim_backflip">
+		Baglæns salto
+	</string>
+	<string name="anim_express_laugh">
+		Hjertelig latter
+	</string>
+	<string name="anim_express_toothsmile">
+		Stort smil
+	</string>
+	<string name="anim_blowkiss">
+		Sende kys
+	</string>
+	<string name="anim_express_bored">
+		Keder sig
+	</string>
+	<string name="anim_bow">
+		Buk
+	</string>
+	<string name="anim_clap">
+		Klap
+	</string>
+	<string name="anim_courtbow">
+		Højtideligt buk
+	</string>
+	<string name="anim_express_cry">
+		Græd
+	</string>
+	<string name="anim_dance1">
+		Dans 1
+	</string>
+	<string name="anim_dance2">
+		Dans 2
+	</string>
+	<string name="anim_dance3">
+		Dans 3
+	</string>
+	<string name="anim_dance4">
+		Dans 4
+	</string>
+	<string name="anim_dance5">
+		Dans 5
+	</string>
+	<string name="anim_dance6">
+		Dans 6
+	</string>
+	<string name="anim_dance7">
+		Dans 7
+	</string>
+	<string name="anim_dance8">
+		Dans 8
+	</string>
+	<string name="anim_express_disdain">
+		Foragt
+	</string>
+	<string name="anim_drink">
+		Drik
+	</string>
+	<string name="anim_express_embarrased">
+		Flov
+	</string>
+	<string name="anim_angry_fingerwag">
+		Løftet finger
+	</string>
+	<string name="anim_fist_pump">
+		Knytnæve
+	</string>
+	<string name="anim_yoga_float">
+		Svævende yoga
+	</string>
+	<string name="anim_express_frown">
+		Mistroisk
+	</string>
+	<string name="anim_impatient">
+		Utålmodig
+	</string>
+	<string name="anim_jumpforjoy">
+		Glædeshop
+	</string>
+	<string name="anim_kissmybutt">
+		Kys min r..
+	</string>
+	<string name="anim_express_kiss">
+		Kys
+	</string>
+	<string name="anim_laugh_short">
+		Grin
+	</string>
+	<string name="anim_musclebeach">
+		Bodybuilder
+	</string>
+	<string name="anim_no_unhappy">
+		Nej (sur)
+	</string>
+	<string name="anim_no_head">
+		Nej
+	</string>
+	<string name="anim_nyanya">
+		Æv-bæv
+	</string>
+	<string name="anim_punch_onetwo">
+		Et-to slag
+	</string>
+	<string name="anim_express_open_mouth">
+		Åben mund
+	</string>
+	<string name="anim_peace">
+		Peace
+	</string>
+	<string name="anim_point_you">
+		Peg på andre
+	</string>
+	<string name="anim_point_me">
+		Peg på dig selv
+	</string>
+	<string name="anim_punch_l">
+		Slå venstre
+	</string>
+	<string name="anim_punch_r">
+		Slå højre
+	</string>
+	<string name="anim_rps_countdown">
+		SSP - Tæl
+	</string>
+	<string name="anim_rps_paper">
+		SSP - Papir
+	</string>
+	<string name="anim_rps_rock">
+		SSP - Sten
+	</string>
+	<string name="anim_rps_scissors">
+		SSP - Saks
+	</string>
+	<string name="anim_express_repulsed">
+		Misfornøjet
+	</string>
+	<string name="anim_kick_roundhouse_r">
+		Karatepark
+	</string>
+	<string name="anim_express_sad">
+		Ked af det
+	</string>
+	<string name="anim_salute">
+		Honnør
+	</string>
+	<string name="anim_shout">
+		Råb
+	</string>
+	<string name="anim_express_shrug">
+		Skuldertræk
+	</string>
+	<string name="anim_express_smile">
+		Smil
+	</string>
+	<string name="anim_smoke_idle">
+		Ryg
+	</string>
+	<string name="anim_smoke_inhale">
+		Indhalér
+	</string>
+	<string name="anim_smoke_throw_down">
+		Smid cigaret
+	</string>
+	<string name="anim_express_surprise">
+		Overrasket
+	</string>
+	<string name="anim_sword_strike_r">
+		Sværdslag
+	</string>
+	<string name="anim_angry_tantrum">
+		Ekstatisk
+	</string>
+	<string name="anim_express_tongue_out">
+		Tunge ud
+	</string>
+	<string name="anim_hello">
+		Vink
+	</string>
+	<string name="anim_whisper">
+		Knib øje i
+	</string>
+	<string name="anim_whistle">
+		Pift
+	</string>
+	<string name="anim_express_wink">
+		Blink
+	</string>
+	<string name="anim_wink_hollywood">
+		Blink (Hollywood)
+	</string>
+	<string name="anim_express_worry">
+		Bekymret
+	</string>
+	<string name="anim_yes_happy">
+		Ja (glad)
+	</string>
+	<string name="anim_yes_head">
+		Ja
+	</string>
+	<string name="texture_loading">
+		Henter...
+	</string>
+	<string name="worldmap_offline">
+		Offline
+	</string>
+	<string name="whisper">
+		hvisker:
+	</string>
+	<string name="shout">
+		råber:
+	</string>
+</strings>
diff --git a/indra/newview/skins/default/xui/da/xui_version.xml b/indra/newview/skins/default/xui/da/xui_version.xml
index ee2a0be745..0e777751d3 100644
--- a/indra/newview/skins/default/xui/da/xui_version.xml
+++ b/indra/newview/skins/default/xui/da/xui_version.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<xui_version>
-	1.0
-</xui_version>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xui_version>
+	1.0
+</xui_version>
diff --git a/indra/newview/skins/default/xui/de/floater_animation_preview.xml b/indra/newview/skins/default/xui/de/floater_animation_preview.xml
index 299b6a7f7e..48df5fd917 100644
--- a/indra/newview/skins/default/xui/de/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/de/floater_animation_preview.xml
@@ -15,127 +15,127 @@
 		Handhaltung
 	</text>
 	<combo_box label="" name="hand_pose_combo" tool_tip="Steuert während der Animation die Bewegung der Hände.">
-		<combo_item name="Spread">
+		<combo_box.item name="Spread">
 			Dehnen
-		</combo_item>
-		<combo_item name="Relaxed">
+		</combo_box.item>
+		<combo_box.item name="Relaxed">
 			Entspannt
-		</combo_item>
-		<combo_item name="PointBoth">
+		</combo_box.item>
+		<combo_box.item name="PointBoth">
 			Beide zeigen
-		</combo_item>
-		<combo_item name="Fist">
+		</combo_box.item>
+		<combo_box.item name="Fist">
 			Faust
-		</combo_item>
-		<combo_item name="RelaxedLeft">
+		</combo_box.item>
+		<combo_box.item name="RelaxedLeft">
 			Links entspannt
-		</combo_item>
-		<combo_item name="PointLeft">
+		</combo_box.item>
+		<combo_box.item name="PointLeft">
 			Nach links zeigen
-		</combo_item>
-		<combo_item name="FistLeft">
+		</combo_box.item>
+		<combo_box.item name="FistLeft">
 			Linke Faust
-		</combo_item>
-		<combo_item name="RelaxedRight">
+		</combo_box.item>
+		<combo_box.item name="RelaxedRight">
 			Rechts entspannt
-		</combo_item>
-		<combo_item name="PointRight">
+		</combo_box.item>
+		<combo_box.item name="PointRight">
 			Nach rechts zeigen
-		</combo_item>
-		<combo_item name="FistRight">
+		</combo_box.item>
+		<combo_box.item name="FistRight">
 			Rechte Faust
-		</combo_item>
-		<combo_item name="SaluteRight">
+		</combo_box.item>
+		<combo_box.item name="SaluteRight">
 			Rechts salutieren
-		</combo_item>
-		<combo_item name="Typing">
+		</combo_box.item>
+		<combo_box.item name="Typing">
 			Tippt
-		</combo_item>
-		<combo_item name="PeaceRight">
+		</combo_box.item>
+		<combo_box.item name="PeaceRight">
 			Friedensrecht
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="emote_label">
 		Ausdruck
 	</text>
 	<combo_box label="" name="emote_combo" tool_tip="Steuert Gesichtsregungen während der Animation.">
-		<combo_item name="[None]">
+		<combo_box.item name="[None]">
 			[Keine]
-		</combo_item>
-		<combo_item name="Aaaaah">
+		</combo_box.item>
+		<combo_box.item name="Aaaaah">
 			Aaaaah
-		</combo_item>
-		<combo_item name="Afraid">
+		</combo_box.item>
+		<combo_box.item name="Afraid">
 			Ängstlich
-		</combo_item>
-		<combo_item name="Angry">
+		</combo_box.item>
+		<combo_box.item name="Angry">
 			Verärgert
-		</combo_item>
-		<combo_item name="BigSmile">
+		</combo_box.item>
+		<combo_box.item name="BigSmile">
 			Grinst
-		</combo_item>
-		<combo_item name="Bored">
+		</combo_box.item>
+		<combo_box.item name="Bored">
 			Gelangweilt
-		</combo_item>
-		<combo_item name="Cry">
+		</combo_box.item>
+		<combo_box.item name="Cry">
 			Weinen
-		</combo_item>
-		<combo_item name="Disdain">
+		</combo_box.item>
+		<combo_box.item name="Disdain">
 			Verachten
-		</combo_item>
-		<combo_item name="Embarrassed">
+		</combo_box.item>
+		<combo_box.item name="Embarrassed">
 			Verlegen
-		</combo_item>
-		<combo_item name="Frown">
+		</combo_box.item>
+		<combo_box.item name="Frown">
 			Stirnrunzeln
-		</combo_item>
-		<combo_item name="Kiss">
+		</combo_box.item>
+		<combo_box.item name="Kiss">
 			Küssen
-		</combo_item>
-		<combo_item name="Laugh">
+		</combo_box.item>
+		<combo_box.item name="Laugh">
 			Lachen
-		</combo_item>
-		<combo_item name="Plllppt">
+		</combo_box.item>
+		<combo_box.item name="Plllppt">
 			Bäääh
-		</combo_item>
-		<combo_item name="Repulsed">
+		</combo_box.item>
+		<combo_box.item name="Repulsed">
 			Zurückgestoßen
-		</combo_item>
-		<combo_item name="Sad">
+		</combo_box.item>
+		<combo_box.item name="Sad">
 			Traurig
-		</combo_item>
-		<combo_item name="Shrug">
+		</combo_box.item>
+		<combo_box.item name="Shrug">
 			Schulterzucken
-		</combo_item>
-		<combo_item name="Smile">
+		</combo_box.item>
+		<combo_box.item name="Smile">
 			Lächeln
-		</combo_item>
-		<combo_item name="Surprise">
+		</combo_box.item>
+		<combo_box.item name="Surprise">
 			Überraschung
-		</combo_item>
-		<combo_item name="Wink">
+		</combo_box.item>
+		<combo_box.item name="Wink">
 			Zwinkern
-		</combo_item>
-		<combo_item name="Worry">
+		</combo_box.item>
+		<combo_box.item name="Worry">
 			Sorgenvoll
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="preview_label" width="97">
 		Vorschau während:
 	</text>
 	<combo_box label="" left_delta="107" name="preview_base_anim" tool_tip="Hiermit können Sie das Verhalten Ihres Avatars testen, während Ihr Avatar normale Bewegungen ausführt.">
-		<combo_item name="Standing">
+		<combo_box.item name="Standing">
 			Stehend
-		</combo_item>
-		<combo_item name="Walking">
+		</combo_box.item>
+		<combo_box.item name="Walking">
 			Geht
-		</combo_item>
-		<combo_item name="Sitting">
+		</combo_box.item>
+		<combo_box.item name="Sitting">
 			Sitzt
-		</combo_item>
-		<combo_item name="Flying">
+		</combo_box.item>
+		<combo_box.item name="Flying">
 			Fliegend
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<spinner label="Eingang glätten (s)" label_width="105" name="ease_in_time" tool_tip="Einblendungsgeschwindigkeit von Animationen (in Sekunden)." width="175"/>
 	<spinner bottom_delta="-20" label="Ausgang glätten (s)" label_width="105" left="10" name="ease_out_time" tool_tip="Ausblendungsgeschwindigkeit von Animationen (in Sekunden)." width="175"/>
diff --git a/indra/newview/skins/default/xui/de/floater_beacons.xml b/indra/newview/skins/default/xui/de/floater_beacons.xml
index d1ec9d968d..0992727e73 100644
--- a/indra/newview/skins/default/xui/de/floater_beacons.xml
+++ b/indra/newview/skins/default/xui/de/floater_beacons.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="beacons" title="Beacons">
-	<panel name="beacons_panel">
-		<check_box label="Auf Berührung beschränkte Skriptobjekte" name="touch_only"/>
-		<check_box label="Skripting-Objekte" name="scripted"/>
-		<check_box label="Physische Objekte" name="physical"/>
-		<check_box label="Soundquellen" name="sounds"/>
-		<check_box label="Partikelquellen" name="particles"/>
-		<check_box label="Glanzlichter anzeigen" name="highlights"/>
-		<check_box label="Beacons anzeigen" name="beacons"/>
-		<text name="beacon_width_label">
-			Beacon-Breite:
-		</text>
-	</panel>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="beacons" title="Beacons">
+	<panel name="beacons_panel">
+		<check_box label="Auf Berührung beschränkte Skriptobjekte" name="touch_only"/>
+		<check_box label="Skripting-Objekte" name="scripted"/>
+		<check_box label="Physische Objekte" name="physical"/>
+		<check_box label="Soundquellen" name="sounds"/>
+		<check_box label="Partikelquellen" name="particles"/>
+		<check_box label="Glanzlichter anzeigen" name="highlights"/>
+		<check_box label="Beacons anzeigen" name="beacons"/>
+		<text name="beacon_width_label">
+			Beacon-Breite:
+		</text>
+	</panel>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_buy_land.xml b/indra/newview/skins/default/xui/de/floater_buy_land.xml
index 332c900190..0b2f86ed8f 100644
--- a/indra/newview/skins/default/xui/de/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/de/floater_buy_land.xml
@@ -66,15 +66,15 @@
 		Landbesitz ist Premium-Mitgliedern vorbehalten.
 	</text>
 	<combo_box name="account_level">
-		<combo_item name="US$9.95/month,billedmonthly">
+		<combo_box.item name="US$9.95/month,billedmonthly">
 			9,95 US$/Monat, monatliche Abrechnung
-		</combo_item>
-		<combo_item name="US$7.50/month,billedquarterly">
+		</combo_box.item>
+		<combo_box.item name="US$7.50/month,billedquarterly">
 			7,50 US$/Monat, vierteljährliche Abrechnung
-		</combo_item>
-		<combo_item name="US$6.00/month,billedannually">
+		</combo_box.item>
+		<combo_box.item name="US$6.00/month,billedannually">
 			6,00 US$/Monat, jährliche Abrechnung
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="land_use_action">
 		Erhöhen Sie Ihre monatlichen Landnutzungsgebühren auf 40 US$/month.
diff --git a/indra/newview/skins/default/xui/de/floater_camera.xml b/indra/newview/skins/default/xui/de/floater_camera.xml
index bb36ebd7fd..198b5b07f2 100644
--- a/indra/newview/skins/default/xui/de/floater_camera.xml
+++ b/indra/newview/skins/default/xui/de/floater_camera.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="move floater">
-	<string name="rotate_tooltip">
-		Kamera um Fokus drehen
-	</string>
-	<string name="zoom_tooltip">
-		Kamera auf Fokus zoomen
-	</string>
-	<string name="move_tooltip">
-		Kamera nach oben, unten, links und rechts bewegen
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="move floater">
+	<string name="rotate_tooltip">
+		Kamera um Fokus drehen
+	</string>
+	<string name="zoom_tooltip">
+		Kamera auf Fokus zoomen
+	</string>
+	<string name="move_tooltip">
+		Kamera nach oben, unten, links und rechts bewegen
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml
index d2e981c492..d5a216a0b5 100644
--- a/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml
@@ -1,96 +1,96 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Day Cycle Floater" title="Tageszyklus-Editor">
-	<tab_container name="Day Cycle Tabs">
-		<panel label="Tageszyklus" name="Day Cycle">
-			<button label=" ?" name="WLDayCycleHelp" />
-			<text name="WL12am">
-				24:00
-			</text>
-			<text name="WL3am">
-				03:00
-			</text>
-			<text name="WL6am">
-				06:00
-			</text>
-			<text name="WL9amHash">
-				09:00
-			</text>
-			<text name="WL12pmHash">
-				12:00
-			</text>
-			<text name="WL3pm">
-				15:00
-			</text>
-			<text name="WL6pm">
-				18:00
-			</text>
-			<text name="WL9pm">
-				21:00
-			</text>
-			<text name="WL12am2">
-				24:00
-			</text>
-			<text name="WL12amHash">
-				|
-			</text>
-			<text name="WL3amHash">
-				I
-			</text>
-			<text name="WL6amHash">
-				|
-			</text>
-			<text name="WL9amHash2">
-				I
-			</text>
-			<text name="WL12pmHash2">
-				|
-			</text>
-			<text name="WL3pmHash">
-				I
-			</text>
-			<text name="WL6pmHash">
-				|
-			</text>
-			<text name="WL9pmHash">
-				I
-			</text>
-			<text name="WL12amHash2">
-				|
-			</text>
-			<button label="Key hinzu" label_selected="Key hinzu" name="WLAddKey" />
-			<button label="Key löschen" label_selected="Key löschen" name="WLDeleteKey" />
-			<text name="WLCurKeyFrameText">
-				Keyframe-Einstellungen:
-			</text>
-			<text name="WLCurKeyTimeText">
-				Key-Zeit:
-			</text>
-			<spinner label="Std." name="WLCurKeyHour" />
-			<spinner label="Min." name="WLCurKeyMin" />
-			<text name="WLCurKeyTimeText2">
-				Key-Voreinstellung:
-			</text>
-			<combo_box label="Voreinstellung" name="WLKeyPresets" />
-			<text name="DayCycleText">
-				Einrasten:
-			</text>
-			<combo_box label="5 min" name="WLSnapOptions" />
-			<text name="DayCycleText2">
-				Zykluslänge:
-			</text>
-			<spinner label="Std." name="WLLengthOfDayHour" />
-			<spinner label="Min." name="WLLengthOfDayMin" />
-			<spinner label="Sek." name="WLLengthOfDaySec" />
-			<text name="DayCycleText3">
-				Vorschau:
-			</text>
-			<button label="Start" label_selected="Start" name="WLAnimSky" />
-			<button label="Stopp" label_selected="Stopp" name="WLStopAnimSky" />
-			<button label="Grundstückszeit verw" label_selected="Zur Grundstückszeit"
-			     name="WLUseLindenTime" />
-			<button label="Testtag speichern" label_selected="Testtag speichern"
-			     name="WLSaveDayCycle" />
-			<button label="Testtag laden" label_selected="Testtag laden" name="WLLoadDayCycle" />
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Day Cycle Floater" title="Tageszyklus-Editor">
+	<tab_container name="Day Cycle Tabs">
+		<panel label="Tageszyklus" name="Day Cycle">
+			<button label=" ?" name="WLDayCycleHelp" />
+			<text name="WL12am">
+				24:00
+			</text>
+			<text name="WL3am">
+				03:00
+			</text>
+			<text name="WL6am">
+				06:00
+			</text>
+			<text name="WL9amHash">
+				09:00
+			</text>
+			<text name="WL12pmHash">
+				12:00
+			</text>
+			<text name="WL3pm">
+				15:00
+			</text>
+			<text name="WL6pm">
+				18:00
+			</text>
+			<text name="WL9pm">
+				21:00
+			</text>
+			<text name="WL12am2">
+				24:00
+			</text>
+			<text name="WL12amHash">
+				|
+			</text>
+			<text name="WL3amHash">
+				I
+			</text>
+			<text name="WL6amHash">
+				|
+			</text>
+			<text name="WL9amHash2">
+				I
+			</text>
+			<text name="WL12pmHash2">
+				|
+			</text>
+			<text name="WL3pmHash">
+				I
+			</text>
+			<text name="WL6pmHash">
+				|
+			</text>
+			<text name="WL9pmHash">
+				I
+			</text>
+			<text name="WL12amHash2">
+				|
+			</text>
+			<button label="Key hinzu" label_selected="Key hinzu" name="WLAddKey" />
+			<button label="Key löschen" label_selected="Key löschen" name="WLDeleteKey" />
+			<text name="WLCurKeyFrameText">
+				Keyframe-Einstellungen:
+			</text>
+			<text name="WLCurKeyTimeText">
+				Key-Zeit:
+			</text>
+			<spinner label="Std." name="WLCurKeyHour" />
+			<spinner label="Min." name="WLCurKeyMin" />
+			<text name="WLCurKeyTimeText2">
+				Key-Voreinstellung:
+			</text>
+			<combo_box label="Voreinstellung" name="WLKeyPresets" />
+			<text name="DayCycleText">
+				Einrasten:
+			</text>
+			<combo_box label="5 min" name="WLSnapOptions" />
+			<text name="DayCycleText2">
+				Zykluslänge:
+			</text>
+			<spinner label="Std." name="WLLengthOfDayHour" />
+			<spinner label="Min." name="WLLengthOfDayMin" />
+			<spinner label="Sek." name="WLLengthOfDaySec" />
+			<text name="DayCycleText3">
+				Vorschau:
+			</text>
+			<button label="Start" label_selected="Start" name="WLAnimSky" />
+			<button label="Stopp" label_selected="Stopp" name="WLStopAnimSky" />
+			<button label="Grundstückszeit verw" label_selected="Zur Grundstückszeit"
+			     name="WLUseLindenTime" />
+			<button label="Testtag speichern" label_selected="Testtag speichern"
+			     name="WLSaveDayCycle" />
+			<button label="Testtag laden" label_selected="Testtag laden" name="WLLoadDayCycle" />
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_device_settings.xml b/indra/newview/skins/default/xui/de/floater_device_settings.xml
index 6feebdf1d2..734f4e942c 100644
--- a/indra/newview/skins/default/xui/de/floater_device_settings.xml
+++ b/indra/newview/skins/default/xui/de/floater_device_settings.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_device_settings" title="Geräte-Einstellungen für Voice-Chat" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_device_settings" title="Geräte-Einstellungen für Voice-Chat" />
diff --git a/indra/newview/skins/default/xui/de/floater_env_settings.xml b/indra/newview/skins/default/xui/de/floater_env_settings.xml
index bb9e5efc36..3717ff6a48 100644
--- a/indra/newview/skins/default/xui/de/floater_env_settings.xml
+++ b/indra/newview/skins/default/xui/de/floater_env_settings.xml
@@ -1,24 +1,24 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Environment Editor Floater" title="Umwelt-Editor">
-	<text name="EnvTimeText">
-		Tageszeit
-	</text>
-	<text name="EnvTimeText2">
-		12:00
-	</text>
-	<text name="EnvCloudText">
-		Wolkendecke
-	</text>
-	<text name="EnvWaterColorText">
-		Wasserfarbe
-	</text>
-	<color_swatch name="EnvWaterColor" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen" />
-	<text name="EnvWaterFogText">
-		Wasser-
-trübung
-	</text>
-	<button label="Grundstückszeit verw." name="EnvUseEstateTimeButton" />
-	<button label="Himmel (erweitert)" name="EnvAdvancedSkyButton" />
-	<button label="Wasser (erweitert)" name="EnvAdvancedWaterButton" />
-	<button label=" ?" name="EnvSettingsHelpButton" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Environment Editor Floater" title="Umwelt-Editor">
+	<text name="EnvTimeText">
+		Tageszeit
+	</text>
+	<text name="EnvTimeText2">
+		12:00
+	</text>
+	<text name="EnvCloudText">
+		Wolkendecke
+	</text>
+	<text name="EnvWaterColorText">
+		Wasserfarbe
+	</text>
+	<color_swatch name="EnvWaterColor" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen" />
+	<text name="EnvWaterFogText">
+		Wasser-
+trübung
+	</text>
+	<button label="Grundstückszeit verw." name="EnvUseEstateTimeButton" />
+	<button label="Himmel (erweitert)" name="EnvAdvancedSkyButton" />
+	<button label="Wasser (erweitert)" name="EnvAdvancedWaterButton" />
+	<button label=" ?" name="EnvSettingsHelpButton" />
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_god_tools.xml b/indra/newview/skins/default/xui/de/floater_god_tools.xml
index dcb6982588..15143f59d3 100644
--- a/indra/newview/skins/default/xui/de/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/de/floater_god_tools.xml
@@ -115,29 +115,29 @@
 				Ziel:
 			</text>
 			<combo_box name="destination">
-				<combo_item name="Selection">
+				<combo_box.item name="Selection">
 					Auswahl
-				</combo_item>
-				<combo_item name="AgentRegion">
+				</combo_box.item>
+				<combo_box.item name="AgentRegion">
 					Avatar-Region
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="Request:">
 				Anfrage:
 			</text>
 			<combo_box name="request">
-				<combo_item name="colliders&lt;steps&gt;">
+				<combo_box.item name="colliders&lt;steps&gt;">
 					Kollisionsobjekte &lt;Schritte&gt;
-				</combo_item>
-				<combo_item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
+				</combo_box.item>
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
 					Skripts &lt;Zähler&gt;,&lt;Optionales Muster&gt;
-				</combo_item>
-				<combo_item name="objects&lt;pattern&gt;">
+				</combo_box.item>
+				<combo_box.item name="objects&lt;pattern&gt;">
 					Objekte &lt;Muster&gt;
-				</combo_item>
-				<combo_item name="rez&lt;asset_id&gt;">
+				</combo_box.item>
+				<combo_box.item name="rez&lt;asset_id&gt;">
 					&lt;asset_id&gt; erstellen
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="Parameter:">
 				Parameter:
diff --git a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml
index 4149d8de06..6642de7e6a 100644
--- a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml
@@ -1,40 +1,40 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Hardware Settings Floater" title="Hardware-Einstellungen">
-	<text name="Filtering:">
-		Filtern:
-	</text>
-	<check_box label="Anisotropische Filterung (langsamer, wenn aktiviert)" name="ani" />
-	<text name="Antialiasing:">
-		Antialiasing:
-	</text>
-	<combo_box label="Antialiasing" name="fsaa">
-		<combo_item name="FSAADisabled">
-			Deaktiviert
-		</combo_item>
-		<combo_item name="2x">
-			2x
-		</combo_item>
-		<combo_item name="4x">
-			4x
-		</combo_item>
-		<combo_item name="8x">
-			8x
-		</combo_item>
-		<combo_item name="16x">
-			16x
-		</combo_item>
-	</combo_box>
-	<spinner label="Gamma:" name="gamma" />
-	<text name="(brightness, lower is brighter)">
-		(Helligkeit, niedriger ist heller, 0=Standard)
-	</text>
-	<text name="Enable VBO:">
-		VBO aktivieren:
-	</text>
-	<check_box label="OpenGL Vertex-Buffer-Objekte aktivieren" name="vbo"
-	     tool_tip="Wenn Sie über moderne Grafikhardware verfügen, können Sie durch Aktivieren dieser Option die Geschwindigkeit verbessern.  Bei alter Hardware sind die VBO oft schlecht implementiert, was zu Abstürzen führen kann, wenn diese Option aktiviert ist." />
-	<slider label="Texturspeicher (MB):" name="GrapicsCardTextureMemory"
-	     tool_tip="Speicherplatz, der für Texturen zur Verfügung steht. In der Regel handelt es sich um Grafikkartenspeicher. Ein kleinerer Wert kann die Geschwindigkeit erhöhen, aber auch zu Texturunschärfen führen." />
-	<spinner label="Nebeldistanzverhältnis:" name="fog" />
-	<button label="OK" label_selected="OK" name="OK" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Hardware Settings Floater" title="Hardware-Einstellungen">
+	<text name="Filtering:">
+		Filtern:
+	</text>
+	<check_box label="Anisotropische Filterung (langsamer, wenn aktiviert)" name="ani" />
+	<text name="Antialiasing:">
+		Antialiasing:
+	</text>
+	<combo_box label="Antialiasing" name="fsaa">
+		<combo_box.item name="FSAADisabled">
+			Deaktiviert
+		</combo_box.item>
+		<combo_box.item name="2x">
+			2x
+		</combo_box.item>
+		<combo_box.item name="4x">
+			4x
+		</combo_box.item>
+		<combo_box.item name="8x">
+			8x
+		</combo_box.item>
+		<combo_box.item name="16x">
+			16x
+		</combo_box.item>
+	</combo_box>
+	<spinner label="Gamma:" name="gamma" />
+	<text name="(brightness, lower is brighter)">
+		(Helligkeit, niedriger ist heller, 0=Standard)
+	</text>
+	<text name="Enable VBO:">
+		VBO aktivieren:
+	</text>
+	<check_box label="OpenGL Vertex-Buffer-Objekte aktivieren" name="vbo"
+	     tool_tip="Wenn Sie über moderne Grafikhardware verfügen, können Sie durch Aktivieren dieser Option die Geschwindigkeit verbessern.  Bei alter Hardware sind die VBO oft schlecht implementiert, was zu Abstürzen führen kann, wenn diese Option aktiviert ist." />
+	<slider label="Texturspeicher (MB):" name="GrapicsCardTextureMemory"
+	     tool_tip="Speicherplatz, der für Texturen zur Verfügung steht. In der Regel handelt es sich um Grafikkartenspeicher. Ein kleinerer Wert kann die Geschwindigkeit erhöhen, aber auch zu Texturunschärfen führen." />
+	<spinner label="Nebeldistanzverhältnis:" name="fog" />
+	<button label="OK" label_selected="OK" name="OK" />
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_hud.xml b/indra/newview/skins/default/xui/de/floater_hud.xml
index adf9cae60a..0f11e2346d 100644
--- a/indra/newview/skins/default/xui/de/floater_hud.xml
+++ b/indra/newview/skins/default/xui/de/floater_hud.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_hud" title="Tutorial" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_hud" title="Tutorial" />
diff --git a/indra/newview/skins/default/xui/de/floater_image_preview.xml b/indra/newview/skins/default/xui/de/floater_image_preview.xml
index 145e0bbc33..db0930f657 100644
--- a/indra/newview/skins/default/xui/de/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/de/floater_image_preview.xml
@@ -10,36 +10,36 @@
 		Bildvorschau als:
 	</text>
 	<combo_box label="Kleidungstyp" name="clothing_type_combo">
-		<combo_item name="Image">
+		<combo_box.item name="Image">
 			Bild
-		</combo_item>
-		<combo_item name="Hair">
+		</combo_box.item>
+		<combo_box.item name="Hair">
 			Haar
-		</combo_item>
-		<combo_item name="FemaleHead">
+		</combo_box.item>
+		<combo_box.item name="FemaleHead">
 			Kopf (Frau)
-		</combo_item>
-		<combo_item name="FemaleUpperBody">
+		</combo_box.item>
+		<combo_box.item name="FemaleUpperBody">
 			Oberkörper (Frau)
-		</combo_item>
-		<combo_item name="FemaleLowerBody">
+		</combo_box.item>
+		<combo_box.item name="FemaleLowerBody">
 			Unterkörper (Frau)
-		</combo_item>
-		<combo_item name="MaleHead">
+		</combo_box.item>
+		<combo_box.item name="MaleHead">
 			Kopf (Mann)
-		</combo_item>
-		<combo_item name="MaleUpperBody">
+		</combo_box.item>
+		<combo_box.item name="MaleUpperBody">
 			Oberkörper (Mann)
-		</combo_item>
-		<combo_item name="MaleLowerBody">
+		</combo_box.item>
+		<combo_box.item name="MaleLowerBody">
 			Unterkörper (Mann)
-		</combo_item>
-		<combo_item name="Skirt">
+		</combo_box.item>
+		<combo_box.item name="Skirt">
 			Rock
-		</combo_item>
-		<combo_item name="SculptedPrim">
+		</combo_box.item>
+		<combo_box.item name="SculptedPrim">
 			Geformtes Primitiv
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="bad_image_text">
 		Bild kann nicht gelesen werden.
diff --git a/indra/newview/skins/default/xui/de/floater_inspect.xml b/indra/newview/skins/default/xui/de/floater_inspect.xml
index afe7bec2fa..f8c9b62824 100644
--- a/indra/newview/skins/default/xui/de/floater_inspect.xml
+++ b/indra/newview/skins/default/xui/de/floater_inspect.xml
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="inspect" title="Objekt prüfen" min_width="450" >
-	<scroll_list name="object_list"
-	     tool_tip="Wählen Sie ein Objekt aus dieser Liste, um es in der Second Life-Welt zu markieren">
-		<column label="Objektname" name="object_name" />
-		<column label="Besitzer" name="owner_name"  />
-		<column label="Ersteller" name="creator_name" />
-		<column label="Erstellungsdatum" name="creation_date" />
-	</scroll_list>
-	<button label="Besitzerprofil einsehen..." name="button owner"
-	     tool_tip="Profil des Besitzers des markierten Objekts einsehen" width="155" />
-	<button label="Erstellerprofil einsehen..." name="button creator"
-	     tool_tip="Profil des ursprünglichen Erstellers des markierten Objekts einsehen" width="155" left="175"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="inspect" title="Objekt prüfen" min_width="450" >
+	<scroll_list name="object_list"
+	     tool_tip="Wählen Sie ein Objekt aus dieser Liste, um es in der Second Life-Welt zu markieren">
+		<column label="Objektname" name="object_name" />
+		<column label="Besitzer" name="owner_name"  />
+		<column label="Ersteller" name="creator_name" />
+		<column label="Erstellungsdatum" name="creation_date" />
+	</scroll_list>
+	<button label="Besitzerprofil einsehen..." name="button owner"
+	     tool_tip="Profil des Besitzers des markierten Objekts einsehen" width="155" />
+	<button label="Erstellerprofil einsehen..." name="button creator"
+	     tool_tip="Profil des ursprünglichen Erstellers des markierten Objekts einsehen" width="155" left="175"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_joystick.xml b/indra/newview/skins/default/xui/de/floater_joystick.xml
index 837ac7d975..bf3083a14b 100644
--- a/indra/newview/skins/default/xui/de/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/de/floater_joystick.xml
@@ -1,76 +1,76 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Joystick" title="Joystick-Konfiguration">
-	<check_box name="enable_joystick" width="80" >Joystick aktivieren:</check_box>
-	<text name="joystick_type" left="140" width="360"></text>
-	<spinner label="X-Achse" name="JoystickAxis1" />
-	<spinner label="Y-Achse" name="JoystickAxis2" />
-	<spinner label="Z-Achse" name="JoystickAxis0" />
-	<spinner label="Neigungswinkel" name="JoystickAxis4" />
-	<spinner label="Gierwinkel" name="JoystickAxis5" />
-	<spinner label="Rollwinkel" name="JoystickAxis3" />
-	<spinner label="Zoom" name="JoystickAxis6" />
-	<check_box label="Direkt-Zoom" name="ZoomDirect" />
-	<check_box label="3D-Cursor"  left="300" name="Cursor3D" />
-	<check_box label="Automatisch ausrichten" left="390" name="AutoLeveling" />
-	<text name="Control Modes:">
-		Steuermodi:
-	</text>
-	<check_box name="JoystickAvatarEnabled">Avatar</check_box>
-	<check_box name="JoystickBuildEnabled">Bauen</check_box>
-	<check_box name="JoystickFlycamEnabled">Flycam</check_box>
-	<text name="XScale">
-		X-Skala
-	</text>
-	<text name="YScale">
-		Y-Skala
-	</text>
-	<text name="ZScale">
-		Z-Skala
-	</text>
-	<text name="PitchScale">
-		Neigungsskala
-	</text>
-	<text name="YawScale">
-		Gierskala
-	</text>
-	<text name="RollScale">
-		Rollskala
-	</text>
-	<text name="XDeadZone">
-		X-Totzone
-	</text>
-	<text name="YDeadZone">
-		Y-Totzone
-	</text>
-	<text name="ZDeadZone">
-		Z-Totzone
-	</text>
-	<text name="PitchDeadZone">
-		Neigen-Totzone
-	</text>
-	<text name="YawDeadZone">
-		Gieren-Totzone
-	</text>
-	<text name="RollDeadZone">
-		Rollen-Totzone
-	</text>
-	<text name="Feathering">
-		Auslaufen
-	</text>
-	<text name="ZoomScale2">
-		Zoom-Skala
-	</text>
-	<text name="ZoomDeadZone">
-		Zoom-Totzone
-	</text>
-	<button label="SpaceNavigator-Standards" name="SpaceNavigatorDefaults" />
-	<string name="JoystickMonitor">
-		Joystick-Monitor
-	</string>
-	<string name="Axis">
-		Achse [NUM]
-	</string>
-	<string name="NoDevice">
-		Kein Gerät erkannt
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Joystick" title="Joystick-Konfiguration">
+	<check_box name="enable_joystick" width="80" >Joystick aktivieren:</check_box>
+	<text name="joystick_type" left="140" width="360"></text>
+	<spinner label="X-Achse" name="JoystickAxis1" />
+	<spinner label="Y-Achse" name="JoystickAxis2" />
+	<spinner label="Z-Achse" name="JoystickAxis0" />
+	<spinner label="Neigungswinkel" name="JoystickAxis4" />
+	<spinner label="Gierwinkel" name="JoystickAxis5" />
+	<spinner label="Rollwinkel" name="JoystickAxis3" />
+	<spinner label="Zoom" name="JoystickAxis6" />
+	<check_box label="Direkt-Zoom" name="ZoomDirect" />
+	<check_box label="3D-Cursor"  left="300" name="Cursor3D" />
+	<check_box label="Automatisch ausrichten" left="390" name="AutoLeveling" />
+	<text name="Control Modes:">
+		Steuermodi:
+	</text>
+	<check_box name="JoystickAvatarEnabled">Avatar</check_box>
+	<check_box name="JoystickBuildEnabled">Bauen</check_box>
+	<check_box name="JoystickFlycamEnabled">Flycam</check_box>
+	<text name="XScale">
+		X-Skala
+	</text>
+	<text name="YScale">
+		Y-Skala
+	</text>
+	<text name="ZScale">
+		Z-Skala
+	</text>
+	<text name="PitchScale">
+		Neigungsskala
+	</text>
+	<text name="YawScale">
+		Gierskala
+	</text>
+	<text name="RollScale">
+		Rollskala
+	</text>
+	<text name="XDeadZone">
+		X-Totzone
+	</text>
+	<text name="YDeadZone">
+		Y-Totzone
+	</text>
+	<text name="ZDeadZone">
+		Z-Totzone
+	</text>
+	<text name="PitchDeadZone">
+		Neigen-Totzone
+	</text>
+	<text name="YawDeadZone">
+		Gieren-Totzone
+	</text>
+	<text name="RollDeadZone">
+		Rollen-Totzone
+	</text>
+	<text name="Feathering">
+		Auslaufen
+	</text>
+	<text name="ZoomScale2">
+		Zoom-Skala
+	</text>
+	<text name="ZoomDeadZone">
+		Zoom-Totzone
+	</text>
+	<button label="SpaceNavigator-Standards" name="SpaceNavigatorDefaults" />
+	<string name="JoystickMonitor">
+		Joystick-Monitor
+	</string>
+	<string name="Axis">
+		Achse [NUM]
+	</string>
+	<string name="NoDevice">
+		Kein Gerät erkannt
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_lagmeter.xml b/indra/newview/skins/default/xui/de/floater_lagmeter.xml
index 91ae544887..4dd9fd6c76 100644
--- a/indra/newview/skins/default/xui/de/floater_lagmeter.xml
+++ b/indra/newview/skins/default/xui/de/floater_lagmeter.xml
@@ -1,152 +1,152 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_lagmeter" title="Lag-Anzeige">
-	<button name="client_lagmeter" tool_tip="Client-Lag-Status" />
-	<text name="client">
-		Client:
-	</text>
-	<text name="client_text">
-		Normal
-	</text>
-	<button name="network_lagmeter" tool_tip="Netzwerk-Lag-Status" />
-	<text name="network">
-		Netzwerk:
-	</text>
-	<text name="network_text">
-		Normal
-	</text>
-	<button name="server_lagmeter" tool_tip="Server-Lag-Status" />
-	<text name="server">
-		Server:
-	</text>
-	<text name="server_text">
-		Normal
-	</text>
-	<button label="?" name="server_help" />
-	<button label="&gt;&gt; " name="minimize" />
-	<text name="max_title_msg">
-		Lag-Anzeige
-	</text>
-	<text name="max_width_px">
-		350
-	</text>
-	<text name="min_title_msg">
-		Lag
-	</text>
-	<text name="min_width_px">
-		90
-	</text>
-	<text name="client_text_msg">
-		Client
-	</text>
-	<text name="client_frame_rate_critical_fps">
-		10
-	</text>
-	<text name="client_frame_rate_warning_fps">
-		15
-	</text>
-	<text name="client_frame_time_window_bg_msg">
-		Normal, Fenster im Hintergrund
-	</text>
-	<text name="client_frame_time_critical_msg">
-		Client-Frame-Rate unter [CLIENT_FRAME_RATE_CRITICAL]
-	</text>
-	<text name="client_frame_time_warning_msg">
-		Client-Frame-Rate zwischen [CLIENT_FRAME_RATE_CRITICAL] und [CLIENT_FRAME_RATE_WARNING]
-	</text>
-	<text name="client_frame_time_normal_msg">
-		Normal
-	</text>
-	<text name="client_draw_distance_cause_msg">
-		Mögliche Ursache: Sichtweite zu groß
-	</text>
-	<text name="client_texture_loading_cause_msg">
-		Mögliche Ursache: Bilder werden geladen
-	</text>
-	<text name="client_texture_memory_cause_msg">
-		Mögliche Ursache: Zu viele Bilder im Speicher
-	</text>
-	<text name="client_complex_objects_cause_msg">
-		Mögliche Ursache: Zu viele komplexe Objekte in der Szene
-	</text>
-	<text name="network_text_msg">
-		Netzwerk
-	</text>
-	<text name="network_packet_loss_critical_pct">
-		10
-	</text>
-	<text name="network_packet_loss_warning_pct">
-		5
-	</text>
-	<text name="network_packet_loss_critical_msg">
-		Paketverlust der Verbindung übersteigt [NETWORK_PACKET_LOSS_CRITICAL]%
-	</text>
-	<text name="network_packet_loss_warning_msg">
-		Paketverlust der Verbindung liegt bei [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]%
-	</text>
-	<text name="network_performance_normal_msg">
-		Normal
-	</text>
-	<text name="network_ping_critical_ms">
-		600
-	</text>
-	<text name="network_ping_warning_ms">
-		300
-	</text>
-	<text name="network_ping_critical_msg">
-		Ping-Zeit der Verbindung übersteigt [NETWORK_PING_CRITICAL] ms
-	</text>
-	<text name="network_ping_warning_msg">
-		Ping-Zeit der Verbindung liegt bei [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
-	</text>
-	<text name="network_packet_loss_cause_msg">
-		Möglicherweise schlechte Verbindung oder zu hoher Wert für „Bandbreite“.
-	</text>
-	<text name="network_ping_cause_msg">
-		Möglicherweise schlechte Verbindung oder File-Sharing-Anwendung.
-	</text>
-	<text name="server_text_msg">
-		Server
-	</text>
-	<text name="server_frame_rate_critical_fps">
-		20
-	</text>
-	<text name="server_frame_rate_warning_fps">
-		30
-	</text>
-	<text name="server_single_process_max_time_ms">
-		20
-	</text>
-	<text name="server_frame_time_critical_msg">
-		Simulator-Frame-Rate liegt unter [SERVER_FRAME_RATE_CRITICAL]
-	</text>
-	<text name="server_frame_time_warning_msg">
-		Simulator-Frame-Rate liegt zwischen [SERVER_FRAME_RATE_CRITICAL] und [SERVER_FRAME_RATE_WARNING]
-	</text>
-	<text name="server_frame_time_normal_msg">
-		Normal
-	</text>
-	<text name="server_physics_cause_msg">
-		Mögliche Ursache: Zu viele physische Objekte
-	</text>
-	<text name="server_scripts_cause_msg">
-		Mögliche Ursache: Zu viele geskriptete Objekte
-	</text>
-	<text name="server_net_cause_msg">
-		Mögliche Ursache: Zu viel Netzwerktraffic
-	</text>
-	<text name="server_agent_cause_msg">
-		Mögliche Ursache: Zu viele Personen in Bewegung in der Region
-	</text>
-	<text name="server_images_cause_msg">
-		Mögliche Ursache: Zu viele Bildberechnungen
-	</text>
-	<text name="server_generic_cause_msg">
-		Mögliche Ursache: Zu hohe Simulator-Last
-	</text>
-	<text name="smaller_label">
-		&gt;&gt; 
-	</text>
-	<text name="bigger_label">
-		&lt;&lt; 
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_lagmeter" title="Lag-Anzeige">
+	<button name="client_lagmeter" tool_tip="Client-Lag-Status" />
+	<text name="client">
+		Client:
+	</text>
+	<text name="client_text">
+		Normal
+	</text>
+	<button name="network_lagmeter" tool_tip="Netzwerk-Lag-Status" />
+	<text name="network">
+		Netzwerk:
+	</text>
+	<text name="network_text">
+		Normal
+	</text>
+	<button name="server_lagmeter" tool_tip="Server-Lag-Status" />
+	<text name="server">
+		Server:
+	</text>
+	<text name="server_text">
+		Normal
+	</text>
+	<button label="?" name="server_help" />
+	<button label="&gt;&gt; " name="minimize" />
+	<text name="max_title_msg">
+		Lag-Anzeige
+	</text>
+	<text name="max_width_px">
+		350
+	</text>
+	<text name="min_title_msg">
+		Lag
+	</text>
+	<text name="min_width_px">
+		90
+	</text>
+	<text name="client_text_msg">
+		Client
+	</text>
+	<text name="client_frame_rate_critical_fps">
+		10
+	</text>
+	<text name="client_frame_rate_warning_fps">
+		15
+	</text>
+	<text name="client_frame_time_window_bg_msg">
+		Normal, Fenster im Hintergrund
+	</text>
+	<text name="client_frame_time_critical_msg">
+		Client-Frame-Rate unter [CLIENT_FRAME_RATE_CRITICAL]
+	</text>
+	<text name="client_frame_time_warning_msg">
+		Client-Frame-Rate zwischen [CLIENT_FRAME_RATE_CRITICAL] und [CLIENT_FRAME_RATE_WARNING]
+	</text>
+	<text name="client_frame_time_normal_msg">
+		Normal
+	</text>
+	<text name="client_draw_distance_cause_msg">
+		Mögliche Ursache: Sichtweite zu groß
+	</text>
+	<text name="client_texture_loading_cause_msg">
+		Mögliche Ursache: Bilder werden geladen
+	</text>
+	<text name="client_texture_memory_cause_msg">
+		Mögliche Ursache: Zu viele Bilder im Speicher
+	</text>
+	<text name="client_complex_objects_cause_msg">
+		Mögliche Ursache: Zu viele komplexe Objekte in der Szene
+	</text>
+	<text name="network_text_msg">
+		Netzwerk
+	</text>
+	<text name="network_packet_loss_critical_pct">
+		10
+	</text>
+	<text name="network_packet_loss_warning_pct">
+		5
+	</text>
+	<text name="network_packet_loss_critical_msg">
+		Paketverlust der Verbindung übersteigt [NETWORK_PACKET_LOSS_CRITICAL]%
+	</text>
+	<text name="network_packet_loss_warning_msg">
+		Paketverlust der Verbindung liegt bei [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]%
+	</text>
+	<text name="network_performance_normal_msg">
+		Normal
+	</text>
+	<text name="network_ping_critical_ms">
+		600
+	</text>
+	<text name="network_ping_warning_ms">
+		300
+	</text>
+	<text name="network_ping_critical_msg">
+		Ping-Zeit der Verbindung übersteigt [NETWORK_PING_CRITICAL] ms
+	</text>
+	<text name="network_ping_warning_msg">
+		Ping-Zeit der Verbindung liegt bei [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
+	</text>
+	<text name="network_packet_loss_cause_msg">
+		Möglicherweise schlechte Verbindung oder zu hoher Wert für „Bandbreite“.
+	</text>
+	<text name="network_ping_cause_msg">
+		Möglicherweise schlechte Verbindung oder File-Sharing-Anwendung.
+	</text>
+	<text name="server_text_msg">
+		Server
+	</text>
+	<text name="server_frame_rate_critical_fps">
+		20
+	</text>
+	<text name="server_frame_rate_warning_fps">
+		30
+	</text>
+	<text name="server_single_process_max_time_ms">
+		20
+	</text>
+	<text name="server_frame_time_critical_msg">
+		Simulator-Frame-Rate liegt unter [SERVER_FRAME_RATE_CRITICAL]
+	</text>
+	<text name="server_frame_time_warning_msg">
+		Simulator-Frame-Rate liegt zwischen [SERVER_FRAME_RATE_CRITICAL] und [SERVER_FRAME_RATE_WARNING]
+	</text>
+	<text name="server_frame_time_normal_msg">
+		Normal
+	</text>
+	<text name="server_physics_cause_msg">
+		Mögliche Ursache: Zu viele physische Objekte
+	</text>
+	<text name="server_scripts_cause_msg">
+		Mögliche Ursache: Zu viele geskriptete Objekte
+	</text>
+	<text name="server_net_cause_msg">
+		Mögliche Ursache: Zu viel Netzwerktraffic
+	</text>
+	<text name="server_agent_cause_msg">
+		Mögliche Ursache: Zu viele Personen in Bewegung in der Region
+	</text>
+	<text name="server_images_cause_msg">
+		Mögliche Ursache: Zu viele Bildberechnungen
+	</text>
+	<text name="server_generic_cause_msg">
+		Mögliche Ursache: Zu hohe Simulator-Last
+	</text>
+	<text name="smaller_label">
+		&gt;&gt; 
+	</text>
+	<text name="bigger_label">
+		&lt;&lt; 
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_lsl_guide.xml b/indra/newview/skins/default/xui/de/floater_lsl_guide.xml
index f45983b9d6..d7f56b302d 100644
--- a/indra/newview/skins/default/xui/de/floater_lsl_guide.xml
+++ b/indra/newview/skins/default/xui/de/floater_lsl_guide.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="script ed float" title="LSL-Wiki">
-	<check_box label="Cursor folgen" name="lock_check" />
-	<combo_box label="Sperren" name="history_combo" />
-	<button label="Zurück" name="back_btn" />
-	<button label="Weiter" name="fwd_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="script ed float" title="LSL-Wiki">
+	<check_box label="Cursor folgen" name="lock_check" />
+	<combo_box label="Sperren" name="history_combo" />
+	<button label="Zurück" name="back_btn" />
+	<button label="Weiter" name="fwd_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_media_browser.xml b/indra/newview/skins/default/xui/de/floater_media_browser.xml
index 5dda873db7..ee2532127e 100644
--- a/indra/newview/skins/default/xui/de/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/de/floater_media_browser.xml
@@ -1,19 +1,19 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_about" title="Medienbrowser">
-	<layout_stack name="stack1">
-		<layout_panel name="nav_controls">
-			<button label="Zurück" name="back" />
-			<button label="Weiter" name="forward" />
-			<button label="Neu laden" name="reload" />
-			<button label="Los" name="go" />
-		</layout_panel>
-		<layout_panel name="parcel_owner_controls">
-			<button label="Aktuelle URL an Parzelle senden" name="assign" />
-		</layout_panel>
-		<layout_panel name="external_controls">
-			<button label="In meinem Browser öffnen" name="open_browser" />
-			<check_box label="Immer in meinem Browser öffnen" name="open_always" />
-			<button label="Schließen" name="close" />
-		</layout_panel>
-	</layout_stack>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_about" title="Medienbrowser">
+	<layout_stack name="stack1">
+		<layout_panel name="nav_controls">
+			<button label="Zurück" name="back" />
+			<button label="Weiter" name="forward" />
+			<button label="Neu laden" name="reload" />
+			<button label="Los" name="go" />
+		</layout_panel>
+		<layout_panel name="parcel_owner_controls">
+			<button label="Aktuelle URL an Parzelle senden" name="assign" />
+		</layout_panel>
+		<layout_panel name="external_controls">
+			<button label="In meinem Browser öffnen" name="open_browser" />
+			<check_box label="Immer in meinem Browser öffnen" name="open_always" />
+			<button label="Schließen" name="close" />
+		</layout_panel>
+	</layout_stack>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_mem_leaking.xml b/indra/newview/skins/default/xui/de/floater_mem_leaking.xml
index 4fe3058dfe..0b77a7fe9d 100644
--- a/indra/newview/skins/default/xui/de/floater_mem_leaking.xml
+++ b/indra/newview/skins/default/xui/de/floater_mem_leaking.xml
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="MemLeak" title="Speicherverlust-Simulation">
-	<spinner label="Verlustgeschwindigkeit (Bytes pro Frame):" name="leak_speed" />
-	<spinner label="Max. Speicherverlust (MB):" name="max_leak" />
-	<text name="total_leaked_label">
-		Aktueller Speicherverlust:[SIZE] KB
-	</text>
-	<text name="note_label_1">
-		[NOTE1]
-	</text>
-	<text name="note_label_2">
-		[NOTE2]
-	</text>
-	<button label="Start" name="start_btn" />
-	<button label="Stopp" name="stop_btn" />
-	<button label="Freigeben" name="release_btn" />
-	<button label="Schließen" name="close_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="MemLeak" title="Speicherverlust-Simulation">
+	<spinner label="Verlustgeschwindigkeit (Bytes pro Frame):" name="leak_speed" />
+	<spinner label="Max. Speicherverlust (MB):" name="max_leak" />
+	<text name="total_leaked_label">
+		Aktueller Speicherverlust:[SIZE] KB
+	</text>
+	<text name="note_label_1">
+		[NOTE1]
+	</text>
+	<text name="note_label_2">
+		[NOTE2]
+	</text>
+	<button label="Start" name="start_btn" />
+	<button label="Stopp" name="stop_btn" />
+	<button label="Freigeben" name="release_btn" />
+	<button label="Schließen" name="close_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_mute_object.xml b/indra/newview/skins/default/xui/de/floater_mute_object.xml
index c6351cc6e0..02eafbcb68 100644
--- a/indra/newview/skins/default/xui/de/floater_mute_object.xml
+++ b/indra/newview/skins/default/xui/de/floater_mute_object.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="mute by name" title="Objekt nach Name stummschalten">
-	<text name="message">
-		Stummschalten nach Name betrifft nur Chat und IM, keine Sounds.
-Sie müssen den Objektnamen exakt angeben.
-	</text>
-	<line_editor name="object_name">
-		Objektname
-	</line_editor>
-	<button label="OK" name="OK" />
-	<button label="Abbrechen" name="Cancel" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="mute by name" title="Objekt nach Name stummschalten">
+	<text name="message">
+		Stummschalten nach Name betrifft nur Chat und IM, keine Sounds.
+Sie müssen den Objektnamen exakt angeben.
+	</text>
+	<line_editor name="object_name">
+		Objektname
+	</line_editor>
+	<button label="OK" name="OK" />
+	<button label="Abbrechen" name="Cancel" />
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_my_friends.xml b/indra/newview/skins/default/xui/de/floater_my_friends.xml
index 7d650a2964..fc24bcece4 100644
--- a/indra/newview/skins/default/xui/de/floater_my_friends.xml
+++ b/indra/newview/skins/default/xui/de/floater_my_friends.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_my_friends" title="Kontakte">
-	<tab_container name="friends_and_groups">
-		<panel label="Freunde" name="friends_panel" />
-		<panel label="Gruppen" name="groups_panel" />
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_my_friends" title="Kontakte">
+	<tab_container name="friends_and_groups">
+		<panel label="Freunde" name="friends_panel" />
+		<panel label="Gruppen" name="groups_panel" />
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_post_process.xml b/indra/newview/skins/default/xui/de/floater_post_process.xml
index f2abb9ced1..e10806d255 100644
--- a/indra/newview/skins/default/xui/de/floater_post_process.xml
+++ b/indra/newview/skins/default/xui/de/floater_post_process.xml
@@ -1,53 +1,53 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Post-Process Floater" title="Post-Processing-Einstellungen">
-	<tab_container name="Post-Process Tabs">
-		<panel label="Farbfilter" name="wmiColorFilterPanel">
-			<check_box label="Ein" name="wmiColorFilterToggle" />
-			<text name="wmiColorFilterBrightnessText">
-				Helligkeit
-			</text>
-			<text name="wmiColorFilterSaturationText">
-				Sättigung
-			</text>
-			<text name="wmiColorFilterContrastText">
-				Kontrast
-			</text>
-			<text name="wmiColorFilterBaseText">
-				Kontrast-Grundfarbe
-			</text>
-			<slider label="R" name="wmiColorFilterBaseR" />
-			<slider label="G" name="wmiColorFilterBaseG" />
-			<slider label="B" name="wmiColorFilterBaseB" />
-			<slider label="I" name="wmiColorFilterBaseI" />
-		</panel>
-		<panel label="Nachtsicht" name="wmiNightVisionPanel">
-			<check_box label="Ein" name="wmiNightVisionToggle" />
-			<text name="wmiNightVisionBrightMultText">
-				Lichtverstärkungsmultiplikator
-			</text>
-			<text name="wmiNightVisionNoiseSizeText">
-				Rauschen-Größe
-			</text>
-			<text name="wmiNightVisionNoiseStrengthText">
-				Rauschen-Stärke
-			</text>
-		</panel>
-		<panel label="Bloom" name="wmiBloomPanel">
-			<check_box label="Ein" name="wmiBloomToggle" />
-			<text name="wmiBloomExtractText">
-				Luminanz-Extraktion
-			</text>
-			<text name="wmiBloomSizeText">
-				Bloom-Größe
-			</text>
-			<text name="wmiBloomStrengthText">
-				Bloom-Stärke
-			</text>
-		</panel>
-		<panel label="Extras" name="Extras">
-			<button label="Effekt laden" label_selected="Effekt laden" name="PPLoadEffect" />
-			<button label="Effekt speichern" label_selected="Effekt speichern" name="PPSaveEffect" />
-			<line_editor label="Effektname" name="PPEffectNameEditor" />
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Post-Process Floater" title="Post-Processing-Einstellungen">
+	<tab_container name="Post-Process Tabs">
+		<panel label="Farbfilter" name="wmiColorFilterPanel">
+			<check_box label="Ein" name="wmiColorFilterToggle" />
+			<text name="wmiColorFilterBrightnessText">
+				Helligkeit
+			</text>
+			<text name="wmiColorFilterSaturationText">
+				Sättigung
+			</text>
+			<text name="wmiColorFilterContrastText">
+				Kontrast
+			</text>
+			<text name="wmiColorFilterBaseText">
+				Kontrast-Grundfarbe
+			</text>
+			<slider label="R" name="wmiColorFilterBaseR" />
+			<slider label="G" name="wmiColorFilterBaseG" />
+			<slider label="B" name="wmiColorFilterBaseB" />
+			<slider label="I" name="wmiColorFilterBaseI" />
+		</panel>
+		<panel label="Nachtsicht" name="wmiNightVisionPanel">
+			<check_box label="Ein" name="wmiNightVisionToggle" />
+			<text name="wmiNightVisionBrightMultText">
+				Lichtverstärkungsmultiplikator
+			</text>
+			<text name="wmiNightVisionNoiseSizeText">
+				Rauschen-Größe
+			</text>
+			<text name="wmiNightVisionNoiseStrengthText">
+				Rauschen-Stärke
+			</text>
+		</panel>
+		<panel label="Bloom" name="wmiBloomPanel">
+			<check_box label="Ein" name="wmiBloomToggle" />
+			<text name="wmiBloomExtractText">
+				Luminanz-Extraktion
+			</text>
+			<text name="wmiBloomSizeText">
+				Bloom-Größe
+			</text>
+			<text name="wmiBloomStrengthText">
+				Bloom-Stärke
+			</text>
+		</panel>
+		<panel label="Extras" name="Extras">
+			<button label="Effekt laden" label_selected="Effekt laden" name="PPLoadEffect" />
+			<button label="Effekt speichern" label_selected="Effekt speichern" name="PPSaveEffect" />
+			<line_editor label="Effektname" name="PPEffectNameEditor" />
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_preview_classified.xml b/indra/newview/skins/default/xui/de/floater_preview_classified.xml
index caf544a652..2257785fda 100644
--- a/indra/newview/skins/default/xui/de/floater_preview_classified.xml
+++ b/indra/newview/skins/default/xui/de/floater_preview_classified.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="classified_preview" title="Vertrauliche Informationen" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="classified_preview" title="Vertrauliche Informationen" />
diff --git a/indra/newview/skins/default/xui/de/floater_preview_event.xml b/indra/newview/skins/default/xui/de/floater_preview_event.xml
index a0512a3a9a..75e1113eff 100644
--- a/indra/newview/skins/default/xui/de/floater_preview_event.xml
+++ b/indra/newview/skins/default/xui/de/floater_preview_event.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="event_preview" title="Event-Informationen" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="event_preview" title="Event-Informationen" />
diff --git a/indra/newview/skins/default/xui/de/floater_region_info.xml b/indra/newview/skins/default/xui/de/floater_region_info.xml
index fe87232795..4c28c7f5b0 100644
--- a/indra/newview/skins/default/xui/de/floater_region_info.xml
+++ b/indra/newview/skins/default/xui/de/floater_region_info.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="regioninfo" title="Region/Grundstück" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="regioninfo" title="Region/Grundstück" />
diff --git a/indra/newview/skins/default/xui/de/floater_select_key.xml b/indra/newview/skins/default/xui/de/floater_select_key.xml
index d8b2a5d8b4..6094d11359 100644
--- a/indra/newview/skins/default/xui/de/floater_select_key.xml
+++ b/indra/newview/skins/default/xui/de/floater_select_key.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="modal container">
-	<button label="Abbrechen" label_selected="Abbrechen" name="Cancel" />
-	<text name="Save item as:">
-		Zur Auswahl gewünschte
-Taste drücken.
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="modal container">
+	<button label="Abbrechen" label_selected="Abbrechen" name="Cancel" />
+	<text name="Save item as:">
+		Zur Auswahl gewünschte
+Taste drücken.
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_sell_land.xml b/indra/newview/skins/default/xui/de/floater_sell_land.xml
index 554957c8b0..e16a44f920 100644
--- a/indra/newview/skins/default/xui/de/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/de/floater_sell_land.xml
@@ -44,15 +44,15 @@ dieser Parzelle:
 beschränkt ist.
 	</text>
 	<combo_box follows="top|right" height="16" left="72" name="sell_to" bottom_delta="-32" width="140">
-		<combo_item name="--selectone--">
+		<combo_box.item name="--selectone--">
 			-- select one --
-		</combo_item>
-		<combo_item name="Anyone">
+		</combo_box.item>
+		<combo_box.item name="Anyone">
 			Jeder
-		</combo_item>
-		<combo_item name="Specificuser:">
+		</combo_box.item>
+		<combo_box.item name="Specificuser:">
 			Bestimmter Benutzer:
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<button label="Auswählen..." name="sell_to_select_agent" />
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/de/floater_settings_debug.xml b/indra/newview/skins/default/xui/de/floater_settings_debug.xml
index d64b9dccf9..f34fa8a5be 100644
--- a/indra/newview/skins/default/xui/de/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/de/floater_settings_debug.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater name="settings_debug" title="Debug-Einstellungen">
 	<combo_box name="boolean_combo">
-		<combo_item name="TRUE">
+		<combo_box.item name="TRUE">
 			WAHR
-		</combo_item>
-		<combo_item name="FALSE">
+		</combo_box.item>
+		<combo_box.item name="FALSE">
 			FALSCH
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<color_swatch label="Farbe" name="color_swatch" />
 	<spinner label="x" name="val_spinner_1" />
diff --git a/indra/newview/skins/default/xui/de/floater_snapshot.xml b/indra/newview/skins/default/xui/de/floater_snapshot.xml
index c7a366ae87..9b3dd1fc01 100644
--- a/indra/newview/skins/default/xui/de/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/de/floater_snapshot.xml
@@ -21,12 +21,12 @@
 	<button label="Senden" name="send_btn"/>
 	<button label="Speichern (L$10)" name="upload_btn"/>
 	<flyout_button label="Speichern" name="save_btn" tool_tip="Bild als Datei speichern">
-		<flyout_button_item name="save_item">
-			Speichern
-		</flyout_button_item>
-		<flyout_button_item name="saveas_item">
-			Speichern unter...
-		</flyout_button_item>
+    <flyout_button.item name="save_item">
+      Speichern
+    </flyout_button.item>
+    <flyout_button.item name="saveas_item">
+      Speichern unter...
+    </flyout_button.item>
 	</flyout_button>
 	<button label="Abbrechen" name="discard_btn"/>
 	<button label="Mehr &gt;&gt;" name="more_btn" tool_tip="Erweiterte Optionen"/>
@@ -38,75 +38,75 @@
 		Format
 	</text>
 	<combo_box label="Auflösung" name="postcard_size_combo">
-		<combo_item name="CurrentWindow">
+		<combo_box.item name="CurrentWindow">
 			Aktuelles Fenster
-		</combo_item>
-		<combo_item name="640x480">
+		</combo_box.item>
+		<combo_box.item name="640x480">
 			640x480
-		</combo_item>
-		<combo_item name="800x600">
+		</combo_box.item>
+		<combo_box.item name="800x600">
 			800x600
-		</combo_item>
-		<combo_item name="1024x768">
+		</combo_box.item>
+		<combo_box.item name="1024x768">
 			1024x768
-		</combo_item>
-		<combo_item name="Custom">
+		</combo_box.item>
+		<combo_box.item name="Custom">
 			Benutzerdefiniert
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="Auflösung" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
+		<combo_box.item name="CurrentWindow">
 			Aktuelles Fenster
-		</combo_item>
-		<combo_item name="Small(128x128)">
+		</combo_box.item>
+		<combo_box.item name="Small(128x128)">
 			Klein (128x128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
+		</combo_box.item>
+		<combo_box.item name="Medium(256x256)">
 			Mittel (256x256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
+		</combo_box.item>
+		<combo_box.item name="Large(512x512)">
 			Groß (512x512)
-		</combo_item>
-		<combo_item name="Custom">
+		</combo_box.item>
+		<combo_box.item name="Custom">
 			Benutzerdefiniert
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="Auflösung" name="local_size_combo">
-		<combo_item name="CurrentWindow">
+		<combo_box.item name="CurrentWindow">
 			Aktuelles Fenster
-		</combo_item>
-		<combo_item name="320x240">
+		</combo_box.item>
+		<combo_box.item name="320x240">
 			320x240
-		</combo_item>
-		<combo_item name="640x480">
+		</combo_box.item>
+		<combo_box.item name="640x480">
 			640x480
-		</combo_item>
-		<combo_item name="800x600">
+		</combo_box.item>
+		<combo_box.item name="800x600">
 			800x600
-		</combo_item>
-		<combo_item name="1024x768">
+		</combo_box.item>
+		<combo_box.item name="1024x768">
 			1024x768
-		</combo_item>
-		<combo_item name="1280x1024">
+		</combo_box.item>
+		<combo_box.item name="1280x1024">
 			1280x1024
-		</combo_item>
-		<combo_item name="1600x1200">
+		</combo_box.item>
+		<combo_box.item name="1600x1200">
 			1600x1200
-		</combo_item>
-		<combo_item name="Custom">
+		</combo_box.item>
+		<combo_box.item name="Custom">
 			Benutzerdefiniert
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="Format" name="local_format_combo">
-		<combo_item name="PNG">
+		<combo_box.item name="PNG">
 			PNG
-		</combo_item>
-		<combo_item name="JPEG">
+		</combo_box.item>
+		<combo_box.item name="JPEG">
 			JPEG
-		</combo_item>
-		<combo_item name="BMP">
+		</combo_box.item>
+		<combo_box.item name="BMP">
 			BMP
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<spinner label="Breite" name="snapshot_width"/>
 	<spinner label="Höhe" name="snapshot_height"/>
@@ -116,15 +116,15 @@
 		Aufnehmen:
 	</text>
 	<combo_box label="Bildlayer" name="layer_types" width="132" left="73">
-		<combo_item name="Colors">
+		<combo_box.item name="Colors">
 			Farben
-		</combo_item>
-		<combo_item name="Depth">
+		</combo_box.item>
+		<combo_box.item name="Depth">
 			Tiefe
-		</combo_item>
-		<combo_item name="ObjectMattes">
+		</combo_box.item>
+		<combo_box.item name="ObjectMattes">
 			Objektmasken
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<check_box label="Interface auf Foto anzeigen" name="ui_check"/>
 	<check_box label="HUD-Objekte auf Foto anzeigen" name="hud_check"/>
diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml
index b428585f12..f83d57dc6f 100644
--- a/indra/newview/skins/default/xui/de/floater_tools.xml
+++ b/indra/newview/skins/default/xui/de/floater_tools.xml
@@ -10,17 +10,23 @@
 	<text left="170" name="tool label4" width="70" />
 	<button label="" label_selected="" name="button land" tool_tip="Land" />
 	<text left="240" name="tool label5" />
-	<check_box label="Zoom" name="radio zoom" />
-	<check_box label="Orbit (Strg)" name="radio orbit" />
-	<check_box label="Schwenken (Strg-Umschalt)" name="radio pan" />
-	<check_box label="Verschieben" name="radio move" />
-	<check_box label="Heben (Strg)" name="radio lift" />
-	<check_box label="Rotieren (Strg-Umschalt)" name="radio spin" />
-	<check_box label="Position" name="radio position" />
-	<check_box label="Drehen (Strg)" name="radio rotate" />
-	<check_box label="Dehnen (Strg-Umschalt)" name="radio stretch" />
-	<check_box label="Textur auswählen" name="radio select face" />
-	<check_box label="Verknüpfte Teile bearbeiten" name="checkbox edit linked parts" />
+  <radio_group name="focus_radio_group">
+    <radio_item label="Zoom" name="radio zoom" />
+    <radio_item label="Orbit (Strg)" name="radio orbit" />
+    <radio_item label="Schwenken (Strg-Umschalt)" name="radio pan" />
+  </radio_group>
+  <radio_group name="move_radio_group">
+    <radio_item label="Verschieben" name="radio move" />
+    <radio_item label="Heben (Strg)" name="radio lift" />
+    <radio_item label="Rotieren (Strg-Umschalt)" name="radio spin" />
+  </radio_group>
+  <radio_group name="edit_radio_group">
+    <radio_item label="Position" name="radio position" />
+    <radio_item label="Drehen (Strg)" name="radio rotate" />
+    <radio_item label="Dehnen (Strg-Umschalt)" name="radio stretch" />
+    <radio_item label="Textur auswählen" name="radio select face" />
+  </radio_group>
+  <check_box label="Verknüpfte Teile bearbeiten" name="checkbox edit linked parts" />
 	<check_box label="Raster verwenden" name="checkbox snap to grid" />
 	<button label="Optionen..." label_selected="Optionen..." name="Options..." />
 	<check_box label="Beide Seiten dehnen" name="checkbox uniform" />
@@ -32,15 +38,15 @@
 		Zum Verschieben ziehen, zum Kopieren Umschalttaste-Ziehen
 	</text>
 	<combo_box name="combobox grid mode">
-		<combo_item name="World">
+		<combo_box.item name="World">
 			Welt
-		</combo_item>
-		<combo_item name="Local">
+		</combo_box.item>
+		<combo_box.item name="Local">
 			Lokal
-		</combo_item>
-		<combo_item name="Reference">
+		</combo_box.item>
+		<combo_box.item name="Reference">
 			Referenz
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<button label="" label_selected="" name="ToolCube" tool_tip="Würfel" />
 	<button label="" label_selected="" name="ToolPrism" tool_tip="Prisma" />
@@ -61,23 +67,26 @@
 	<check_box label="Tool ausgewählt lassen" name="checkbox sticky" />
 	<check_box label="Kopie zentrieren" name="checkbox copy centers" />
 	<check_box label="Kopie drehen" name="checkbox copy rotates" />
-	<check_box label="Land auswählen" name="radio select land" />
-	<check_box label="Land einebnen" name="radio flatten" />
-	<check_box label="Land anheben" name="radio raise" />
-	<check_box label="Land absenken" name="radio lower" />
-	<check_box label="Land glätten" name="radio smooth" />
-	<check_box label="Land rau machen" name="radio noise" />
-	<check_box label="Land zurückführen" name="radio revert" />
+
+  <radio_group name="land_radio_group">
+    <radio_item label="Land auswählen" name="radio select land" />
+    <radio_item label="Land einebnen" name="radio flatten" />
+    <radio_item label="Land anheben" name="radio raise" />
+    <radio_item label="Land absenken" name="radio lower" />
+    <radio_item label="Land glätten" name="radio smooth" />
+    <radio_item label="Land rau machen" name="radio noise" />
+    <radio_item label="Land zurückführen" name="radio revert" />
+  </radio_group>
 	<combo_box name="combobox brush size">
-		<combo_item name="Small">
+		<combo_box.item name="Small">
 			Klein
-		</combo_item>
-		<combo_item name="Medium">
+		</combo_box.item>
+		<combo_box.item name="Medium">
 			Mittel
-		</combo_item>
-		<combo_item name="Large">
+		</combo_box.item>
+		<combo_box.item name="Large">
 			Groß
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="Strength:">
 		Stärke:
@@ -169,27 +178,27 @@
 				Bei Linksklicken:
 			</text>
 			<combo_box name="clickaction" width="178">
-				<combo_item name="Touch/grab(default)">
+				<combo_box.item name="Touch/grab(default)">
 					Berühren/Greifen (Standard)
-				</combo_item>
-				<combo_item name="Sitonobject">
+				</combo_box.item>
+				<combo_box.item name="Sitonobject">
 					Auf Objekt sitzen
-				</combo_item>
-				<combo_item name="Buyobject">
+				</combo_box.item>
+				<combo_box.item name="Buyobject">
 					Objekt kaufen
-				</combo_item>
-				<combo_item name="Payobject">
+				</combo_box.item>
+				<combo_box.item name="Payobject">
 					Objekt bezahlen
-				</combo_item>
-				<combo_item name="Open">
+				</combo_box.item>
+				<combo_box.item name="Open">
 					Öffnen
-				</combo_item>
-				<combo_item name="Play">
+				</combo_box.item>
+				<combo_box.item name="Play">
 					Parzellenmedien wiedergeben
-				</combo_item>
-				<combo_item name="Opemmedia">
+				</combo_box.item>
+				<combo_box.item name="Opemmedia">
 					Parzellenmedien öffnen
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="B:">
 				B:
@@ -277,56 +286,56 @@
 				Material
 			</text>
 			<combo_box name="material">
-				<combo_item name="Stone">
+				<combo_box.item name="Stone">
 					Stein
-				</combo_item>
-				<combo_item name="Metal">
+				</combo_box.item>
+				<combo_box.item name="Metal">
 					Metall
-				</combo_item>
-				<combo_item name="Glass">
+				</combo_box.item>
+				<combo_box.item name="Glass">
 					Glas
-				</combo_item>
-				<combo_item name="Wood">
+				</combo_box.item>
+				<combo_box.item name="Wood">
 					Holz
-				</combo_item>
-				<combo_item name="Flesh">
+				</combo_box.item>
+				<combo_box.item name="Flesh">
 					Fleisch
-				</combo_item>
-				<combo_item name="Plastic">
+				</combo_box.item>
+				<combo_box.item name="Plastic">
 					Kunststoff
-				</combo_item>
-				<combo_item name="Rubber">
+				</combo_box.item>
+				<combo_box.item name="Rubber">
 					Gummi
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text left="115" name="label basetype">
 				Bausteintyp
 			</text>
 			<combo_box left="115" name="comboBaseType">
-				<combo_item name="Box">
+				<combo_box.item name="Box">
 					Quader
-				</combo_item>
-				<combo_item name="Cylinder">
+				</combo_box.item>
+				<combo_box.item name="Cylinder">
 					Zylinder
-				</combo_item>
-				<combo_item name="Prism">
+				</combo_box.item>
+				<combo_box.item name="Prism">
 					Prisma
-				</combo_item>
-				<combo_item name="Sphere">
+				</combo_box.item>
+				<combo_box.item name="Sphere">
 					Kugel
-				</combo_item>
-				<combo_item name="Torus">
+				</combo_box.item>
+				<combo_box.item name="Torus">
 					Torus
-				</combo_item>
-				<combo_item name="Tube">
+				</combo_box.item>
+				<combo_box.item name="Tube">
 					Rohr
-				</combo_item>
-				<combo_item name="Ring">
+				</combo_box.item>
+				<combo_box.item name="Ring">
 					Ring
-				</combo_item>
-				<combo_item name="Sculpted">
+				</combo_box.item>
+				<combo_box.item name="Sculpted">
 					Geformt
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text left="115" name="text cut" width="146">
 				Pfadschnitt Beginn und Ende
@@ -345,18 +354,18 @@
 				Hohlform
 			</text>
 			<combo_box left="115" name="hole">
-				<combo_item name="Default">
+				<combo_box.item name="Default">
 					Standard
-				</combo_item>
-				<combo_item name="Circle">
+				</combo_box.item>
+				<combo_box.item name="Circle">
 					Kreis
-				</combo_item>
-				<combo_item name="Square">
+				</combo_box.item>
+				<combo_box.item name="Square">
 					Quadrat
-				</combo_item>
-				<combo_item name="Triangle">
+				</combo_box.item>
+				<combo_box.item name="Triangle">
 					Dreieck
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text left="115" name="text twist">
 				Torsion
@@ -406,21 +415,21 @@
 				Naht
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_item name="None">
+				<combo_box.item name="None">
 					(keiner)
-				</combo_item>
-				<combo_item name="Sphere">
+				</combo_box.item>
+				<combo_box.item name="Sphere">
 					Kugel
-				</combo_item>
-				<combo_item name="Torus">
+				</combo_box.item>
+				<combo_box.item name="Torus">
 					Torus
-				</combo_item>
-				<combo_item name="Plane">
+				</combo_box.item>
+				<combo_box.item name="Plane">
 					Fläche
-				</combo_item>
-				<combo_item name="Cylinder">
+				</combo_box.item>
+				<combo_box.item name="Cylinder">
 					Zylinder
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 		</panel>
 		<panel label="Eigenschaften" name="Features">
@@ -465,88 +474,88 @@
 				Zuordnung
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_item name="Default">
+				<combo_box.item name="Default">
 					Standard
-				</combo_item>
-				<combo_item name="Planar">
+				</combo_box.item>
+				<combo_box.item name="Planar">
 					Eben
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="label shininess">
 				Glanz
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_item name="None">
+				<combo_box.item name="None">
 					Kein
-				</combo_item>
-				<combo_item name="Low">
+				</combo_box.item>
+				<combo_box.item name="Low">
 					Niedrig
-				</combo_item>
-				<combo_item name="Medium">
+				</combo_box.item>
+				<combo_box.item name="Medium">
 					Mittel
-				</combo_item>
-				<combo_item name="High">
+				</combo_box.item>
+				<combo_box.item name="High">
 					Hoch
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="label bumpiness">
 				Holprigkeit
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
+				<combo_box.item name="None">
 					Keine
-				</combo_item>
-				<combo_item name="Brightness">
+				</combo_box.item>
+				<combo_box.item name="Brightness">
 					Helligkeit
-				</combo_item>
-				<combo_item name="Darkness">
+				</combo_box.item>
+				<combo_box.item name="Darkness">
 					Dunkelheit
-				</combo_item>
-				<combo_item name="woodgrain">
+				</combo_box.item>
+				<combo_box.item name="woodgrain">
 					Holzmaserung
-				</combo_item>
-				<combo_item name="bark">
+				</combo_box.item>
+				<combo_box.item name="bark">
 					Rinde
-				</combo_item>
-				<combo_item name="bricks">
+				</combo_box.item>
+				<combo_box.item name="bricks">
 					Ziegel
-				</combo_item>
-				<combo_item name="checker">
+				</combo_box.item>
+				<combo_box.item name="checker">
 					Karo
-				</combo_item>
-				<combo_item name="concrete">
+				</combo_box.item>
+				<combo_box.item name="concrete">
 					Beton
-				</combo_item>
-				<combo_item name="crustytile">
+				</combo_box.item>
+				<combo_box.item name="crustytile">
 					verkrustete Fliesen
-				</combo_item>
-				<combo_item name="cutstone">
+				</combo_box.item>
+				<combo_box.item name="cutstone">
 					Steinplatten
-				</combo_item>
-				<combo_item name="discs">
+				</combo_box.item>
+				<combo_box.item name="discs">
 					Scheiben
-				</combo_item>
-				<combo_item name="gravel">
+				</combo_box.item>
+				<combo_box.item name="gravel">
 					Kies
-				</combo_item>
-				<combo_item name="petridish">
+				</combo_box.item>
+				<combo_box.item name="petridish">
 					Petrischale
-				</combo_item>
-				<combo_item name="siding">
+				</combo_box.item>
+				<combo_box.item name="siding">
 					Verkleidung
-				</combo_item>
-				<combo_item name="stonetile">
+				</combo_box.item>
+				<combo_box.item name="stonetile">
 					Steinfliesen
-				</combo_item>
-				<combo_item name="stucco">
+				</combo_box.item>
+				<combo_box.item name="stucco">
 					Stuck
-				</combo_item>
-				<combo_item name="suction">
+				</combo_box.item>
+				<combo_box.item name="suction">
 					Saugen
-				</combo_item>
-				<combo_item name="weave">
+				</combo_box.item>
+				<combo_box.item name="weave">
 					gewoben
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="tex scale">
 				Wiederholungen
diff --git a/indra/newview/skins/default/xui/de/floater_url_entry.xml b/indra/newview/skins/default/xui/de/floater_url_entry.xml
index c230d9c6c3..392d53a33d 100644
--- a/indra/newview/skins/default/xui/de/floater_url_entry.xml
+++ b/indra/newview/skins/default/xui/de/floater_url_entry.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="url_entry">
-	<text name="media_label">
-		Medien-URL:
-	</text>
-	<button label="OK" name="ok_btn" />
-	<button label="Abbrechen" name="cancel_btn" width="75" />
-	<button label="Löschen" name="clear_btn" />
-	<text name="loading_label">
-		Wird geladen...
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="url_entry">
+	<text name="media_label">
+		Medien-URL:
+	</text>
+	<button label="OK" name="ok_btn" />
+	<button label="Abbrechen" name="cancel_btn" width="75" />
+	<button label="Löschen" name="clear_btn" />
+	<text name="loading_label">
+		Wird geladen...
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_water.xml b/indra/newview/skins/default/xui/de/floater_water.xml
index d8ec1a2fa5..95b469434a 100644
--- a/indra/newview/skins/default/xui/de/floater_water.xml
+++ b/indra/newview/skins/default/xui/de/floater_water.xml
@@ -1,89 +1,89 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Water Floater" title="Erweiterter Wasser-Editor">
-	<text name="KeyFramePresetsText">
-		Voreinstellungen:
-	</text>
-	<button label="Neu" label_selected="Neu" name="WaterNewPreset" />
-	<button label="Speichern" label_selected="Speichern" name="WaterSavePreset" />
-	<button label="Löschen" label_selected="Löschen" name="WaterDeletePreset" />
-	<tab_container name="Water Tabs">
-		<panel label="Einstellungen" name="Settings">
-			<text name="BHText">
-				Wassertrübungsfarbe
-			</text>
-			<button label=" ?" name="WaterFogColorHelp" left="175" />
-			<color_swatch name="WaterFogColor" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen" />
-			<text name="WaterFogDensText">
-				Wassertrübungsdichte
-			</text>
-			<button label=" ?" name="WaterFogDensityHelp" left="175" />
-			<text name="WaterUnderWaterFogModText">
-				Wassertrübungs-Modifikator
-			</text>
-			<button label=" ?" name="WaterUnderWaterFogModHelp" left="175" />
-			<slider bottom_delta="-34" name="WaterUnderWaterFogMod" />
-			<text name="BDensText">
-				Reflexionswellengröße
-			</text>
-			<button label=" ?" name="WaterNormalScaleHelp" />
-			<text name="BHText2">
-				1
-			</text>
-			<text name="BHText3">
-				2
-			</text>
-			<text name="BHText4">
-				3
-			</text>
-			<text name="HDText">
-				Fresnel-Skalierung
-			</text>
-			<button label=" ?" name="WaterFresnelScaleHelp" />
-			<text name="FresnelOffsetText">
-				Fresnel-Versatz
-			</text>
-			<button label=" ?" name="WaterFresnelOffsetHelp" />
-			<text name="DensMultText">
-				Brechungsstärke oben
-			</text>
-			<button label=" ?" name="WaterScaleAboveHelp" />
-			<text name="WaterScaleBelowText">
-				Brechungsstärke unten
-			</text>
-			<button label=" ?" name="WaterScaleBelowHelp" />
-			<text name="MaxAltText">
-				Mischungsmultiplikator
-			</text>
-			<button label=" ?" name="WaterBlurMultiplierHelp" />
-		</panel>
-		<panel label="Bild" name="Waves">
-			<text name="BHText">
-				Richtung große Welle
-			</text>
-			<button label=" ?" name="WaterWave1Help" />
-			<text name="WaterWave1DirXText">
-				X
-			</text>
-			<text name="WaterWave1DirYText">
-				Y
-			</text>
-			<text name="BHText2">
-				Richtung kleine Welle
-			</text>
-			<button label=" ?" name="WaterWave2Help" />
-			<text name="WaterWave2DirXText">
-				X
-			</text>
-			<text name="WaterWave2DirYText">
-				Y
-			</text>
-			<text name="BHText3">
-				Normal-Map
-			</text>
-			<button label=" ?" name="WaterNormalMapHelp" />
-		</panel>
-	</tab_container>
-	<string name="WLDefaultWaterNames">
-		Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Water Floater" title="Erweiterter Wasser-Editor">
+	<text name="KeyFramePresetsText">
+		Voreinstellungen:
+	</text>
+	<button label="Neu" label_selected="Neu" name="WaterNewPreset" />
+	<button label="Speichern" label_selected="Speichern" name="WaterSavePreset" />
+	<button label="Löschen" label_selected="Löschen" name="WaterDeletePreset" />
+	<tab_container name="Water Tabs">
+		<panel label="Einstellungen" name="Settings">
+			<text name="BHText">
+				Wassertrübungsfarbe
+			</text>
+			<button label=" ?" name="WaterFogColorHelp" left="175" />
+			<color_swatch name="WaterFogColor" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen" />
+			<text name="WaterFogDensText">
+				Wassertrübungsdichte
+			</text>
+			<button label=" ?" name="WaterFogDensityHelp" left="175" />
+			<text name="WaterUnderWaterFogModText">
+				Wassertrübungs-Modifikator
+			</text>
+			<button label=" ?" name="WaterUnderWaterFogModHelp" left="175" />
+			<slider bottom_delta="-34" name="WaterUnderWaterFogMod" />
+			<text name="BDensText">
+				Reflexionswellengröße
+			</text>
+			<button label=" ?" name="WaterNormalScaleHelp" />
+			<text name="BHText2">
+				1
+			</text>
+			<text name="BHText3">
+				2
+			</text>
+			<text name="BHText4">
+				3
+			</text>
+			<text name="HDText">
+				Fresnel-Skalierung
+			</text>
+			<button label=" ?" name="WaterFresnelScaleHelp" />
+			<text name="FresnelOffsetText">
+				Fresnel-Versatz
+			</text>
+			<button label=" ?" name="WaterFresnelOffsetHelp" />
+			<text name="DensMultText">
+				Brechungsstärke oben
+			</text>
+			<button label=" ?" name="WaterScaleAboveHelp" />
+			<text name="WaterScaleBelowText">
+				Brechungsstärke unten
+			</text>
+			<button label=" ?" name="WaterScaleBelowHelp" />
+			<text name="MaxAltText">
+				Mischungsmultiplikator
+			</text>
+			<button label=" ?" name="WaterBlurMultiplierHelp" />
+		</panel>
+		<panel label="Bild" name="Waves">
+			<text name="BHText">
+				Richtung große Welle
+			</text>
+			<button label=" ?" name="WaterWave1Help" />
+			<text name="WaterWave1DirXText">
+				X
+			</text>
+			<text name="WaterWave1DirYText">
+				Y
+			</text>
+			<text name="BHText2">
+				Richtung kleine Welle
+			</text>
+			<button label=" ?" name="WaterWave2Help" />
+			<text name="WaterWave2DirXText">
+				X
+			</text>
+			<text name="WaterWave2DirYText">
+				Y
+			</text>
+			<text name="BHText3">
+				Normal-Map
+			</text>
+			<button label=" ?" name="WaterNormalMapHelp" />
+		</panel>
+	</tab_container>
+	<string name="WLDefaultWaterNames">
+		Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_windlight_options.xml b/indra/newview/skins/default/xui/de/floater_windlight_options.xml
index b8751262fb..8df412dab6 100644
--- a/indra/newview/skins/default/xui/de/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/de/floater_windlight_options.xml
@@ -1,190 +1,190 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="WindLight floater" title="Erweiterter Himmel-Editor">
-	<text name="KeyFramePresetsText">
-		Voreinstellungen:
-	</text>
-	<button label="Neu" label_selected="Neu" name="WLNewPreset" />
-	<button label="Speichern" label_selected="Speichern" name="WLSavePreset" />
-	<button label="Löschen" label_selected="Löschen" name="WLDeletePreset" />
-	<button label="Tageszyklus-Editor" label_selected="Tageszyklus-Editor"
-	     name="WLDayCycleMenuButton" />
-	<tab_container name="WindLight Tabs">
-		<panel label="Atmosphäre" name="Atmosphere">
-			<text name="BHText">
-				Horizontfarbe
-			</text>
-			<button label=" ?" name="WLBlueHorizonHelp" />
-			<text name="BHText2">
-				R
-			</text>
-			<text name="BHText3">
-				G
-			</text>
-			<text name="BHText4">
-				B
-			</text>
-			<text name="BHText5">
-				I
-			</text>
-			<text name="BDensText">
-				Horizonttrübung
-			</text>
-			<button label=" ?" name="WLHazeHorizonHelp" />
-			<text name="BDensText2">
-				Farbintensität
-			</text>
-			<button label=" ?" name="WLBlueDensityHelp" />
-			<text name="BHText6">
-				R
-			</text>
-			<text name="BHText7">
-				G
-			</text>
-			<text name="BHText8">
-				B
-			</text>
-			<text name="BHText9">
-				I
-			</text>
-			<text name="HDText">
-				Trübungsintensität
-			</text>
-			<button label=" ?" name="WLHazeDensityHelp" />
-			<text name="DensMultText">
-				Dichtemultiplikator
-			</text>
-			<button label=" ?" name="WLDensityMultHelp" />
-			<text name="WLDistanceMultText">
-				Entfernungsmultiplikator
-			</text>
-			<button label=" ?" name="WLDistanceMultHelp" />
-			<text name="MaxAltText">
-				Max. Höhe
-			</text>
-			<button label=" ?" name="WLMaxAltitudeHelp" />
-		</panel>
-		<panel label="Licht" name="Lighting">
-			<text name="SLCText">
-				Sonne/Mond-Farbe
-			</text>
-			<button label=" ?" name="WLSunlightColorHelp" />
-			<text name="BHText">
-				R
-			</text>
-			<text name="BHText2">
-				G
-			</text>
-			<text name="BHText3">
-				B
-			</text>
-			<text name="BHText4">
-				I
-			</text>
-			<text name="TODText">
-				Sonne/Mond-Stand
-			</text>
-			<button label=" ?" name="WLTimeOfDayHelp" />
-			<text name="WLAmbientText">
-				Umgebung
-			</text>
-			<button label=" ?" name="WLAmbientHelp" />
-			<text name="BHText5">
-				R
-			</text>
-			<text name="BHText6">
-				G
-			</text>
-			<text name="BHText7">
-				B
-			</text>
-			<text name="BHText8">
-				I
-			</text>
-			<text name="WLEastAngleText">
-				Ostausrichtung
-			</text>
-			<button label=" ?" name="WLEastAngleHelp" />
-			<text name="SunGlowText">
-				Sonnenleuchtkraft
-			</text>
-			<button label=" ?" name="WLSunGlowHelp" />
-			<slider label="Fokus " name="WLGlowB" />
-			<slider label="Größe    " name="WLGlowR" />
-			<text name="SceneGammaText">
-				Gamma in Szene
-			</text>
-			<button label=" ?" name="WLSceneGammaHelp" />
-			<text name="WLStarText">
-				Sternenleuchtkraft
-			</text>
-			<button label=" ?" name="WLStarBrightnessHelp" />
-		</panel>
-		<panel label="Wolken" name="Clouds">
-			<text name="WLCloudColorText">
-				Wolkenfarbe
-			</text>
-			<button label=" ?" name="WLCloudColorHelp" />
-			<text name="BHText">
-				R
-			</text>
-			<text name="BHText2">
-				G
-			</text>
-			<text name="BHText3">
-				B
-			</text>
-			<text name="BHText4">
-				I
-			</text>
-			<text name="WLCloudColorText2">
-				Wolken-XY/Dichte
-			</text>
-			<button label=" ?" name="WLCloudDensityHelp" />
-			<text name="BHText5">
-				X
-			</text>
-			<text name="BHText6">
-				Y
-			</text>
-			<text name="BHText7">
-				D
-			</text>
-			<text name="WLCloudCoverageText">
-				Wolkendichte
-			</text>
-			<button label=" ?" name="WLCloudCoverageHelp" />
-			<text name="WLCloudScaleText">
-				Wolkenskalierung
-			</text>
-			<button label=" ?" name="WLCloudScaleHelp" />
-			<text name="WLCloudDetailText">
-				Wolkendetails (XY/Dichte)
-			</text>
-			<button label=" ?" name="WLCloudDetailHelp" />
-			<text name="BHText8">
-				X
-			</text>
-			<text name="BHText9">
-				Y
-			</text>
-			<text name="BHText10">
-				D
-			</text>
-			<text name="WLCloudScrollXText">
-				Wolkenbewegung X
-			</text>
-			<button label=" ?" name="WLCloudScrollXHelp" />
-			<check_box label="Fest" name="WLCloudLockX" />
-			<text name="WLCloudScrollYText">
-				Wolkenbewegung Y
-			</text>
-			<button label=" ?" name="WLCloudScrollYHelp" />
-			<check_box label="Fest" name="WLCloudLockY" />
-			<check_box label="Klassische Wolken" name="DrawClassicClouds" />
-			<button label=" ?" name="WLClassicCloudsHelp" />
-		</panel>
-	</tab_container>
-	<string name="WLDefaultSkyNames">
-		A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="WindLight floater" title="Erweiterter Himmel-Editor">
+	<text name="KeyFramePresetsText">
+		Voreinstellungen:
+	</text>
+	<button label="Neu" label_selected="Neu" name="WLNewPreset" />
+	<button label="Speichern" label_selected="Speichern" name="WLSavePreset" />
+	<button label="Löschen" label_selected="Löschen" name="WLDeletePreset" />
+	<button label="Tageszyklus-Editor" label_selected="Tageszyklus-Editor"
+	     name="WLDayCycleMenuButton" />
+	<tab_container name="WindLight Tabs">
+		<panel label="Atmosphäre" name="Atmosphere">
+			<text name="BHText">
+				Horizontfarbe
+			</text>
+			<button label=" ?" name="WLBlueHorizonHelp" />
+			<text name="BHText2">
+				R
+			</text>
+			<text name="BHText3">
+				G
+			</text>
+			<text name="BHText4">
+				B
+			</text>
+			<text name="BHText5">
+				I
+			</text>
+			<text name="BDensText">
+				Horizonttrübung
+			</text>
+			<button label=" ?" name="WLHazeHorizonHelp" />
+			<text name="BDensText2">
+				Farbintensität
+			</text>
+			<button label=" ?" name="WLBlueDensityHelp" />
+			<text name="BHText6">
+				R
+			</text>
+			<text name="BHText7">
+				G
+			</text>
+			<text name="BHText8">
+				B
+			</text>
+			<text name="BHText9">
+				I
+			</text>
+			<text name="HDText">
+				Trübungsintensität
+			</text>
+			<button label=" ?" name="WLHazeDensityHelp" />
+			<text name="DensMultText">
+				Dichtemultiplikator
+			</text>
+			<button label=" ?" name="WLDensityMultHelp" />
+			<text name="WLDistanceMultText">
+				Entfernungsmultiplikator
+			</text>
+			<button label=" ?" name="WLDistanceMultHelp" />
+			<text name="MaxAltText">
+				Max. Höhe
+			</text>
+			<button label=" ?" name="WLMaxAltitudeHelp" />
+		</panel>
+		<panel label="Licht" name="Lighting">
+			<text name="SLCText">
+				Sonne/Mond-Farbe
+			</text>
+			<button label=" ?" name="WLSunlightColorHelp" />
+			<text name="BHText">
+				R
+			</text>
+			<text name="BHText2">
+				G
+			</text>
+			<text name="BHText3">
+				B
+			</text>
+			<text name="BHText4">
+				I
+			</text>
+			<text name="TODText">
+				Sonne/Mond-Stand
+			</text>
+			<button label=" ?" name="WLTimeOfDayHelp" />
+			<text name="WLAmbientText">
+				Umgebung
+			</text>
+			<button label=" ?" name="WLAmbientHelp" />
+			<text name="BHText5">
+				R
+			</text>
+			<text name="BHText6">
+				G
+			</text>
+			<text name="BHText7">
+				B
+			</text>
+			<text name="BHText8">
+				I
+			</text>
+			<text name="WLEastAngleText">
+				Ostausrichtung
+			</text>
+			<button label=" ?" name="WLEastAngleHelp" />
+			<text name="SunGlowText">
+				Sonnenleuchtkraft
+			</text>
+			<button label=" ?" name="WLSunGlowHelp" />
+			<slider label="Fokus " name="WLGlowB" />
+			<slider label="Größe    " name="WLGlowR" />
+			<text name="SceneGammaText">
+				Gamma in Szene
+			</text>
+			<button label=" ?" name="WLSceneGammaHelp" />
+			<text name="WLStarText">
+				Sternenleuchtkraft
+			</text>
+			<button label=" ?" name="WLStarBrightnessHelp" />
+		</panel>
+		<panel label="Wolken" name="Clouds">
+			<text name="WLCloudColorText">
+				Wolkenfarbe
+			</text>
+			<button label=" ?" name="WLCloudColorHelp" />
+			<text name="BHText">
+				R
+			</text>
+			<text name="BHText2">
+				G
+			</text>
+			<text name="BHText3">
+				B
+			</text>
+			<text name="BHText4">
+				I
+			</text>
+			<text name="WLCloudColorText2">
+				Wolken-XY/Dichte
+			</text>
+			<button label=" ?" name="WLCloudDensityHelp" />
+			<text name="BHText5">
+				X
+			</text>
+			<text name="BHText6">
+				Y
+			</text>
+			<text name="BHText7">
+				D
+			</text>
+			<text name="WLCloudCoverageText">
+				Wolkendichte
+			</text>
+			<button label=" ?" name="WLCloudCoverageHelp" />
+			<text name="WLCloudScaleText">
+				Wolkenskalierung
+			</text>
+			<button label=" ?" name="WLCloudScaleHelp" />
+			<text name="WLCloudDetailText">
+				Wolkendetails (XY/Dichte)
+			</text>
+			<button label=" ?" name="WLCloudDetailHelp" />
+			<text name="BHText8">
+				X
+			</text>
+			<text name="BHText9">
+				Y
+			</text>
+			<text name="BHText10">
+				D
+			</text>
+			<text name="WLCloudScrollXText">
+				Wolkenbewegung X
+			</text>
+			<button label=" ?" name="WLCloudScrollXHelp" />
+			<check_box label="Fest" name="WLCloudLockX" />
+			<text name="WLCloudScrollYText">
+				Wolkenbewegung Y
+			</text>
+			<button label=" ?" name="WLCloudScrollYHelp" />
+			<check_box label="Fest" name="WLCloudLockY" />
+			<check_box label="Klassische Wolken" name="DrawClassicClouds" />
+			<button label=" ?" name="WLClassicCloudsHelp" />
+		</panel>
+	</tab_container>
+	<string name="WLDefaultSkyNames">
+		A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_world_map.xml b/indra/newview/skins/default/xui/de/floater_world_map.xml
index 44d5dd0496..b937fdda01 100644
--- a/indra/newview/skins/default/xui/de/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/de/floater_world_map.xml
@@ -42,14 +42,14 @@
 
 	<check_box label=" " name="event_mature_chk"/>
 	<combo_box label="Online-Freunde" name="friend combo" tool_tip="Freund, der auf Karte angezeigt werden soll">
-		<combo_item name="none_selected">
+		<combo_box.item name="none_selected">
 			Online-Freunde
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="Landmarken" name="landmark combo" tool_tip="Landmarke, die auf Karte angezeigt werden soll">
-		<combo_item name="none_selected">
+		<combo_box.item name="none_selected">
 			Landmarken
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<line_editor label="Nach Regionsname suchen" name="location" tool_tip="Geben Sie den Namen einer Region ein"/>
 	<button label="Suchen" name="DoSearch" tool_tip="Nach einer Region suchen"/>
diff --git a/indra/newview/skins/default/xui/de/menu_login.xml b/indra/newview/skins/default/xui/de/menu_login.xml
index 86629638e7..29330d894a 100644
--- a/indra/newview/skins/default/xui/de/menu_login.xml
+++ b/indra/newview/skins/default/xui/de/menu_login.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu_bar name="Login Menu">
-	<menu label="Datei" name="File">
-		<menu_item_call label="Beenden" name="Quit" />
-	</menu>
-	<menu label="Bearbeiten" name="Edit">
-		<menu_item_call label="Einstellungen..." name="Preferences..." />
-	</menu>
-	<menu label="Hilfe" name="Help">
-		<menu_item_call label="Hilfe zu Second Life" name="Second Life Help" />
-		<menu_item_call label="Über Second Life..." name="About Second Life..." />
-	</menu>
-</menu_bar>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu_bar name="Login Menu">
+	<menu label="Datei" name="File">
+		<menu_item_call label="Beenden" name="Quit" />
+	</menu>
+	<menu label="Bearbeiten" name="Edit">
+		<menu_item_call label="Einstellungen..." name="Preferences..." />
+	</menu>
+	<menu label="Hilfe" name="Help">
+		<menu_item_call label="Hilfe zu Second Life" name="Second Life Help" />
+		<menu_item_call label="Über Second Life..." name="About Second Life..." />
+	</menu>
+</menu_bar>
diff --git a/indra/newview/skins/default/xui/de/menu_slurl.xml b/indra/newview/skins/default/xui/de/menu_slurl.xml
index 13b91b533b..d9793e5906 100644
--- a/indra/newview/skins/default/xui/de/menu_slurl.xml
+++ b/indra/newview/skins/default/xui/de/menu_slurl.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu name="Popup">
-	<menu_item_call label="URL-Info" name="about_url" />
-	<menu_item_call label="Zu URL teleportieren" name="teleport_to_url" />
-	<menu_item_call label="Auf Karte" name="show_on_map" />
-</menu>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu name="Popup">
+	<menu_item_call label="URL-Info" name="about_url" />
+	<menu_item_call label="Zu URL teleportieren" name="teleport_to_url" />
+	<menu_item_call label="Auf Karte" name="show_on_map" />
+</menu>
diff --git a/indra/newview/skins/default/xui/de/mime_types.xml b/indra/newview/skins/default/xui/de/mime_types.xml
index 5384559446..e01649e911 100644
--- a/indra/newview/skins/default/xui/de/mime_types.xml
+++ b/indra/newview/skins/default/xui/de/mime_types.xml
@@ -1,230 +1,230 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<mimetypes name="default">
-	<widgetset name="web">
-		<label name="web_label">
-			Webinhalt
-		</label>
-		<tooltip name="web_tooltip">
-			Dieser Ort verfügt über Webinhalte
-		</tooltip>
-		<playtip name="web_playtip">
-			Webinhalt anzeigen
-		</playtip>
-	</widgetset>
-	<widgetset name="movie">
-		<label name="movie_label">
-			Video
-		</label>
-		<tooltip name="movie_tooltip">
-			Ein Video wurde gefunden.
-		</tooltip>
-		<playtip name="movie_playtip">
-			Video wiedergeben
-		</playtip>
-	</widgetset>
-	<widgetset name="none">
-		<label name="none_label">
-			Keine Inhalte
-		</label>
-		<tooltip name="none_tooltip">
-			Keine Medien gefunden
-		</tooltip>
-	</widgetset>
-	<widgetset name="image">
-		<label name="image_label">
-			Bild
-		</label>
-		<tooltip name="image_tooltip">
-			Dieser Ort verfügt über Bildinhalte
-		</tooltip>
-		<playtip name="image_playtip">
-			Das Bild an diesem Ort anzeigen
-		</playtip>
-	</widgetset>
-	<widgetset name="audio">
-		<label name="audio_label">
-			Audio
-		</label>
-		<tooltip name="audio_tooltip">
-			Dieser Ort verfügt über Audioinhalte
-		</tooltip>
-		<playtip name="audio_playtip">
-			Audio an diesem Ort wiedergeben
-		</playtip>
-	</widgetset>
-	<scheme name="rtsp">
-		<label name="rtsp_label">
-			Echtzeit-Streaming
-		</label>
-	</scheme>
-	<mimetype name="blank">
-		<label name="blank_label">
-			- Keine -
-		</label>
-	</mimetype>
-	<mimetype name="none/none">
-		<label name="none/none_label">
-			- Keine -
-		</label>
-	</mimetype>
-	<mimetype name="audio/*">
-		<label name="audio2_label">
-			Audio
-		</label>
-	</mimetype>
-	<mimetype name="video/*">
-		<label name="video2_label">
-			Video
-		</label>
-	</mimetype>
-	<mimetype name="image/*">
-		<label name="image2_label">
-			Bild
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
-		<label name="vnd.secondlife.qt.legacy_label">
-			Video (QuickTime)
-		</label>
-	</mimetype>
-	<mimetype name="application/javascript">
-		<label name="application/javascript_label">
-			Javascript
-		</label>
-	</mimetype>
-	<mimetype name="application/ogg">
-		<label name="application/ogg_label">
-			Ogg Audio/Video
-		</label>
-	</mimetype>
-	<mimetype name="application/pdf">
-		<label name="application/pdf_label">
-			PDF-Dokument
-		</label>
-	</mimetype>
-	<mimetype name="application/postscript">
-		<label name="application/postscript_label">
-			Postscript-Dokument
-		</label>
-	</mimetype>
-	<mimetype name="application/rtf">
-		<label name="application/rtf_label">
-			Rich Text (RTF)
-		</label>
-	</mimetype>
-	<mimetype name="application/smil">
-		<label name="application/smil_label">
-			Synchronized Multimedia Integration Language (SMIL)
-		</label>
-	</mimetype>
-	<mimetype name="application/xhtml+xml">
-		<label name="application/xhtml+xml_label">
-			Webseite (XHTML)
-		</label>
-	</mimetype>
-	<mimetype name="application/x-director">
-		<label name="application/x-director_label">
-			Macromedia Director
-		</label>
-	</mimetype>
-	<mimetype name="application/x-shockwave-flash">
-		<label name="application/x-shockwave-flash_label">
-			Flash
-		</label>
-	</mimetype>
-	<mimetype name="audio/mid">
-		<label name="audio/mid_label">
-			Audio (MIDI)
-		</label>
-	</mimetype>
-	<mimetype name="audio/mpeg">
-		<label name="audio/mpeg_label">
-			Audio (MP3)
-		</label>
-	</mimetype>
-	<mimetype name="audio/x-aiff">
-		<label name="audio/x-aiff_label">
-			Audio (AIFF)
-		</label>
-	</mimetype>
-	<mimetype name="audio/x-wav">
-		<label name="audio/x-wav_label">
-			Audio (WAV)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="image/bmp">
-		<label name="image/bmp_label">
-			Bild (BMP)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="image/gif">
-		<label name="image/gif_label">
-			Bild (GIF)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="image/jpeg">
-		<label name="image/jpeg_label">
-			Bild (JPEG)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="image/png">
-		<label name="image/png_label">
-			Bild (PNG)
-		</label>
-	</mimetype>
-	<mimetype name="image/svg+xml">
-		<label name="image/svg+xml_label">
-			Bild (SVG)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="image/tiff">
-		<label name="image/tiff_label">
-			Bild (TIFF)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="text/html">
-		<label name="text/html_label">
-			Webseite
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="text/plain">
-		<label name="text/plain_label">
-			Text
-		</label>
-	</mimetype>
-	<mimetype name="text/xml">
-		<label name="text/xml_label">
-			XML
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="video/mpeg">
-		<label name="video/mpeg_label">
-			Video (MPEG)
-		</label>
-	</mimetype>
-	<mimetype name="video/mp4">
-		<label name="video/mp4_label">
-			Video (MP4)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="video/quicktime">
-		<label name="video/quicktime_label">
-			Video (QuickTime)
-		</label>
-	</mimetype>
-	<mimetype name="video/x-ms-asf">
-		<label name="video/x-ms-asf_label">
-			Video (Windows Media ASF)
-		</label>
-	</mimetype>
-	<mimetype name="video/x-ms-wmv">
-		<label name="video/x-ms-wmv_label">
-			Video (Windows Media WMV)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="video/x-msvideo">
-		<label name="video/x-msvideo_label">
-			Video (AVI)
-		</label>
-	</mimetype>
-</mimetypes>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<mimetypes name="default">
+	<widgetset name="web">
+		<label name="web_label">
+			Webinhalt
+		</label>
+		<tooltip name="web_tooltip">
+			Dieser Ort verfügt über Webinhalte
+		</tooltip>
+		<playtip name="web_playtip">
+			Webinhalt anzeigen
+		</playtip>
+	</widgetset>
+	<widgetset name="movie">
+		<label name="movie_label">
+			Video
+		</label>
+		<tooltip name="movie_tooltip">
+			Ein Video wurde gefunden.
+		</tooltip>
+		<playtip name="movie_playtip">
+			Video wiedergeben
+		</playtip>
+	</widgetset>
+	<widgetset name="none">
+		<label name="none_label">
+			Keine Inhalte
+		</label>
+		<tooltip name="none_tooltip">
+			Keine Medien gefunden
+		</tooltip>
+	</widgetset>
+	<widgetset name="image">
+		<label name="image_label">
+			Bild
+		</label>
+		<tooltip name="image_tooltip">
+			Dieser Ort verfügt über Bildinhalte
+		</tooltip>
+		<playtip name="image_playtip">
+			Das Bild an diesem Ort anzeigen
+		</playtip>
+	</widgetset>
+	<widgetset name="audio">
+		<label name="audio_label">
+			Audio
+		</label>
+		<tooltip name="audio_tooltip">
+			Dieser Ort verfügt über Audioinhalte
+		</tooltip>
+		<playtip name="audio_playtip">
+			Audio an diesem Ort wiedergeben
+		</playtip>
+	</widgetset>
+	<scheme name="rtsp">
+		<label name="rtsp_label">
+			Echtzeit-Streaming
+		</label>
+	</scheme>
+	<mimetype name="blank">
+		<label name="blank_label">
+			- Keine -
+		</label>
+	</mimetype>
+	<mimetype name="none/none">
+		<label name="none/none_label">
+			- Keine -
+		</label>
+	</mimetype>
+	<mimetype name="audio/*">
+		<label name="audio2_label">
+			Audio
+		</label>
+	</mimetype>
+	<mimetype name="video/*">
+		<label name="video2_label">
+			Video
+		</label>
+	</mimetype>
+	<mimetype name="image/*">
+		<label name="image2_label">
+			Bild
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
+		<label name="vnd.secondlife.qt.legacy_label">
+			Video (QuickTime)
+		</label>
+	</mimetype>
+	<mimetype name="application/javascript">
+		<label name="application/javascript_label">
+			Javascript
+		</label>
+	</mimetype>
+	<mimetype name="application/ogg">
+		<label name="application/ogg_label">
+			Ogg Audio/Video
+		</label>
+	</mimetype>
+	<mimetype name="application/pdf">
+		<label name="application/pdf_label">
+			PDF-Dokument
+		</label>
+	</mimetype>
+	<mimetype name="application/postscript">
+		<label name="application/postscript_label">
+			Postscript-Dokument
+		</label>
+	</mimetype>
+	<mimetype name="application/rtf">
+		<label name="application/rtf_label">
+			Rich Text (RTF)
+		</label>
+	</mimetype>
+	<mimetype name="application/smil">
+		<label name="application/smil_label">
+			Synchronized Multimedia Integration Language (SMIL)
+		</label>
+	</mimetype>
+	<mimetype name="application/xhtml+xml">
+		<label name="application/xhtml+xml_label">
+			Webseite (XHTML)
+		</label>
+	</mimetype>
+	<mimetype name="application/x-director">
+		<label name="application/x-director_label">
+			Macromedia Director
+		</label>
+	</mimetype>
+	<mimetype name="application/x-shockwave-flash">
+		<label name="application/x-shockwave-flash_label">
+			Flash
+		</label>
+	</mimetype>
+	<mimetype name="audio/mid">
+		<label name="audio/mid_label">
+			Audio (MIDI)
+		</label>
+	</mimetype>
+	<mimetype name="audio/mpeg">
+		<label name="audio/mpeg_label">
+			Audio (MP3)
+		</label>
+	</mimetype>
+	<mimetype name="audio/x-aiff">
+		<label name="audio/x-aiff_label">
+			Audio (AIFF)
+		</label>
+	</mimetype>
+	<mimetype name="audio/x-wav">
+		<label name="audio/x-wav_label">
+			Audio (WAV)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="image/bmp">
+		<label name="image/bmp_label">
+			Bild (BMP)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="image/gif">
+		<label name="image/gif_label">
+			Bild (GIF)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="image/jpeg">
+		<label name="image/jpeg_label">
+			Bild (JPEG)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="image/png">
+		<label name="image/png_label">
+			Bild (PNG)
+		</label>
+	</mimetype>
+	<mimetype name="image/svg+xml">
+		<label name="image/svg+xml_label">
+			Bild (SVG)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="image/tiff">
+		<label name="image/tiff_label">
+			Bild (TIFF)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="text/html">
+		<label name="text/html_label">
+			Webseite
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="text/plain">
+		<label name="text/plain_label">
+			Text
+		</label>
+	</mimetype>
+	<mimetype name="text/xml">
+		<label name="text/xml_label">
+			XML
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="video/mpeg">
+		<label name="video/mpeg_label">
+			Video (MPEG)
+		</label>
+	</mimetype>
+	<mimetype name="video/mp4">
+		<label name="video/mp4_label">
+			Video (MP4)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="video/quicktime">
+		<label name="video/quicktime_label">
+			Video (QuickTime)
+		</label>
+	</mimetype>
+	<mimetype name="video/x-ms-asf">
+		<label name="video/x-ms-asf_label">
+			Video (Windows Media ASF)
+		</label>
+	</mimetype>
+	<mimetype name="video/x-ms-wmv">
+		<label name="video/x-ms-wmv_label">
+			Video (Windows Media WMV)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="video/x-msvideo">
+		<label name="video/x-msvideo_label">
+			Video (AVI)
+		</label>
+	</mimetype>
+</mimetypes>
diff --git a/indra/newview/skins/default/xui/de/panel_audio_device.xml b/indra/newview/skins/default/xui/de/panel_audio_device.xml
index 006d768c18..6ecd1f0241 100644
--- a/indra/newview/skins/default/xui/de/panel_audio_device.xml
+++ b/indra/newview/skins/default/xui/de/panel_audio_device.xml
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="device_settings">
-	<text name="Audio Devices">
-		Audiogeräte
-	</text>
-	<text name="Output device (speakers):">
-		Ausgabegerät (Lautsprecher):
-	</text>
-	<text name="Input device (microphone):">
-		Eingabegerät (Mikro):
-	</text>
-	<text name="Input level:">
-		Eingangslautstärke
-	</text>
-	<text_editor name="voice_intro_text1">
-		Mit dem Regler steuern Sie, wie laut andere Einwohner Sie hören. Testen Sie die Eingangslautstärke, indem Sie in das Mikro sprechen.
-	</text_editor>
-	<volume_slider name="mic_volume_slider" tool_tip="Ändern Sie die Lautstärke mit dem Regler" />
-	<text name="wait_text">
-		Bitte warten
-	</text>
-	<text name="default_text">
-		Standard
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel name="device_settings">
+	<text name="Audio Devices">
+		Audiogeräte
+	</text>
+	<text name="Output device (speakers):">
+		Ausgabegerät (Lautsprecher):
+	</text>
+	<text name="Input device (microphone):">
+		Eingabegerät (Mikro):
+	</text>
+	<text name="Input level:">
+		Eingangslautstärke
+	</text>
+	<text_editor name="voice_intro_text1">
+		Mit dem Regler steuern Sie, wie laut andere Einwohner Sie hören. Testen Sie die Eingangslautstärke, indem Sie in das Mikro sprechen.
+	</text_editor>
+	<volume_slider name="mic_volume_slider" tool_tip="Ändern Sie die Lautstärke mit dem Regler" />
+	<text name="wait_text">
+		Bitte warten
+	</text>
+	<text name="default_text">
+		Standard
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_friends.xml b/indra/newview/skins/default/xui/de/panel_friends.xml
index 17c073427c..bb2adb36fe 100644
--- a/indra/newview/skins/default/xui/de/panel_friends.xml
+++ b/indra/newview/skins/default/xui/de/panel_friends.xml
@@ -1,41 +1,41 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="friends">
-	<string name="Multiple">
-		Mehrere Freunde...
-	</string>
-	<scroll_list name="friend_list"
-	     tool_tip="Halten Sie die Tasten „Umschalt“ oder „Strg“ gedrückt, um durch Klicken mehrere Freunde auszuwählen.">
-		<column name="icon_online_status" tool_tip="Online-Status" />
-		<column label="Name" name="friend_name" tool_tip="Name" />
-		<column name="icon_visible_online" tool_tip="Freund kann sehen, wenn Sie online sind" />
-		<column name="icon_visible_map" tool_tip="Freund kann Sie auf der Karte finden" />
-		<column name="icon_edit_mine"
-		     tool_tip="Freunde können Objekte bearbeiten, löschen und an sich nehmen" />
-		<column name="icon_edit_theirs"
-		     tool_tip="Sie können die Objekte dieses Freunds bearbeiten" />
-	</scroll_list>
-	<panel name="rights_container">
-		<text name="friend_name_label">
-			Wählen Sie den/die Freund(e) aus, dessen/deren Rechte Sie ändern möchten...
-		</text>
-		<check_box label="Kann meinen Online-Status sehen" name="online_status_cb"
-		     tool_tip="Festlegen, ob dieser Freund meinen Online-Status auf seiner Freundesliste oder Visitenkarte einsehen kann" />
-		<check_box label="Kann mich auf der Weltkarte sehen" name="map_status_cb"
-		     tool_tip="Festlegen, ob dieser Freund auf seiner Karte meinen Standort sehen kann" />
-		<check_box label="Kann meine Objekte verändern" name="modify_status_cb"
-		     tool_tip="Festlegen, ob dieser Freund meine Objekte verändern kann" />
-		<text name="process_rights_label">
-			Rechte werden geändert...
-		</text>
-	</panel>
-	<button label="IM/Anruf" name="im_btn" tool_tip="Beginnt eine Instant Message-Sitzung" />
-	<button label="Profil" name="profile_btn"
-	     tool_tip="Bilder, Gruppen und andere Informationen anzeigen" />
-	<button label="Teleport" name="offer_teleport_btn"
-	     tool_tip="Bieten Sie diesem Freund einen Teleport an Ihre Position an" />
-	<button label="Zahlen" name="pay_btn" tool_tip="Diesem Freund Linden-Dollar (L$) geben" />
-	<button label="Entfernen" name="remove_btn"
-	     tool_tip="Diese Person von Ihrer Freundesliste entfernen" />
-	<button label="Hinzufügen" name="add_btn"
-	     tool_tip="Bieten Sie einem Einwohner die Freundschaft an" />
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel name="friends">
+	<string name="Multiple">
+		Mehrere Freunde...
+	</string>
+	<scroll_list name="friend_list"
+	     tool_tip="Halten Sie die Tasten „Umschalt“ oder „Strg“ gedrückt, um durch Klicken mehrere Freunde auszuwählen.">
+		<column name="icon_online_status" tool_tip="Online-Status" />
+		<column label="Name" name="friend_name" tool_tip="Name" />
+		<column name="icon_visible_online" tool_tip="Freund kann sehen, wenn Sie online sind" />
+		<column name="icon_visible_map" tool_tip="Freund kann Sie auf der Karte finden" />
+		<column name="icon_edit_mine"
+		     tool_tip="Freunde können Objekte bearbeiten, löschen und an sich nehmen" />
+		<column name="icon_edit_theirs"
+		     tool_tip="Sie können die Objekte dieses Freunds bearbeiten" />
+	</scroll_list>
+	<panel name="rights_container">
+		<text name="friend_name_label">
+			Wählen Sie den/die Freund(e) aus, dessen/deren Rechte Sie ändern möchten...
+		</text>
+		<check_box label="Kann meinen Online-Status sehen" name="online_status_cb"
+		     tool_tip="Festlegen, ob dieser Freund meinen Online-Status auf seiner Freundesliste oder Visitenkarte einsehen kann" />
+		<check_box label="Kann mich auf der Weltkarte sehen" name="map_status_cb"
+		     tool_tip="Festlegen, ob dieser Freund auf seiner Karte meinen Standort sehen kann" />
+		<check_box label="Kann meine Objekte verändern" name="modify_status_cb"
+		     tool_tip="Festlegen, ob dieser Freund meine Objekte verändern kann" />
+		<text name="process_rights_label">
+			Rechte werden geändert...
+		</text>
+	</panel>
+	<button label="IM/Anruf" name="im_btn" tool_tip="Beginnt eine Instant Message-Sitzung" />
+	<button label="Profil" name="profile_btn"
+	     tool_tip="Bilder, Gruppen und andere Informationen anzeigen" />
+	<button label="Teleport" name="offer_teleport_btn"
+	     tool_tip="Bieten Sie diesem Freund einen Teleport an Ihre Position an" />
+	<button label="Zahlen" name="pay_btn" tool_tip="Diesem Freund Linden-Dollar (L$) geben" />
+	<button label="Entfernen" name="remove_btn"
+	     tool_tip="Diese Person von Ihrer Freundesliste entfernen" />
+	<button label="Hinzufügen" name="add_btn"
+	     tool_tip="Bieten Sie einem Einwohner die Freundschaft an" />
+</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_groups.xml b/indra/newview/skins/default/xui/de/panel_groups.xml
index 00148d15da..95a2ef14f9 100644
--- a/indra/newview/skins/default/xui/de/panel_groups.xml
+++ b/indra/newview/skins/default/xui/de/panel_groups.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="groups">
-	<text name="groupdesc">
-		Die derzeit aktive Gruppe ist fett hervorgehoben.
-	</text>
-	<text name="groupcount">
-		Sie sind Mitglied bei [COUNT] Gruppen (von max. [MAX]).
-	</text>
-	<button label="IM/Anruf" name="IM" tool_tip="Beginnt eine Instant Message-Sitzung" />
-	<button label="Info" name="Info" />
-	<button label="Aktivieren" name="Activate" />
-	<button label="Verlassen" name="Leave" />
-	<button label="Erstellen..." name="Create" />
-	<button label="Suchen..." name="Search..." />
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel name="groups">
+	<text name="groupdesc">
+		Die derzeit aktive Gruppe ist fett hervorgehoben.
+	</text>
+	<text name="groupcount">
+		Sie sind Mitglied bei [COUNT] Gruppen (von max. [MAX]).
+	</text>
+	<button label="IM/Anruf" name="IM" tool_tip="Beginnt eine Instant Message-Sitzung" />
+	<button label="Info" name="Info" />
+	<button label="Aktivieren" name="Activate" />
+	<button label="Verlassen" name="Leave" />
+	<button label="Erstellen..." name="Create" />
+	<button label="Suchen..." name="Search..." />
+</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_login.xml b/indra/newview/skins/default/xui/de/panel_login.xml
index 6846b1536c..5b5a6d8c77 100644
--- a/indra/newview/skins/default/xui/de/panel_login.xml
+++ b/indra/newview/skins/default/xui/de/panel_login.xml
@@ -13,15 +13,15 @@
 		Startposition:
 	</text>
 	<combo_box name="start_location_combo">
-		<combo_item name="MyHome">
+		<combo_box.item name="MyHome">
 			Mein Heimatort
-		</combo_item>
-		<combo_item name="MyLastLocation">
+		</combo_box.item>
+		<combo_box.item name="MyLastLocation">
 			Mein letzter Standort
-		</combo_item>
-		<combo_item name="Typeregionname">
+		</combo_box.item>
+		<combo_box.item name="Typeregionname">
 			&lt;Region eingeben&gt;
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<check_box label="Kennwort merken" name="remember_check"/>
 	<text name="full_screen_text">
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_general.xml b/indra/newview/skins/default/xui/de/panel_preferences_general.xml
index 3365c5c428..18fd2f2baa 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_general.xml
@@ -10,15 +10,9 @@
 	</radio_group>
 	<check_box label="Startposition auf Anmeldebildschirm anzeigen" name="show_location_checkbox"/>
 	<combo_box name="fade_out_combobox">
-		<combo_item name="Never">
-			Nie
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Temporär anzeigen
-		</combo_item>
-		<combo_item name="Always">
-			Immer
-		</combo_item>
+		<combo_box.item name="Never" label="Nie" />
+		<combo_box.item name="Show Temporarily" label="Temporär anzeigen" />
+		<combo_box.item name="Always" label="Immer" />
 	</combo_box>
 	<check_box label="Kleine Avatarnamen" name="small_avatar_names_checkbox"/>
 	<check_box label="Meinen Namen auf meinem Bildschirm ausblenden" name="show_my_name_checkbox"/>
@@ -62,53 +56,23 @@
 		&lt;Region eingeben&gt;
 	</string>
 	<combo_box name="crash_behavior_combobox">
-		<combo_item name="Askbeforesending">
-			Vor dem Senden fragen
-		</combo_item>
-		<combo_item name="Alwayssend">
-			Immer senden
-		</combo_item>
-		<combo_item name="Neversend">
-			Nie senden
-		</combo_item>
+		<combo_box.item name="Askbeforesending" label="Vor dem Senden fragen" />
+		<combo_box.item name="Alwayssend" label="Immer senden" />
+		<combo_box.item name="Neversend" label="Nie senden" />
 	</combo_box>
 	<combo_box name="language_combobox">
-		<combo_item name="System Default Language">
-			Betriebssystem-Einstellung
-		</combo_item>
-		<combo_item name="English">
-			English (Englisch)
-		</combo_item>
-		<combo_item name="Danish">
-			Danks (Dänisch) - Beta
-		</combo_item>
-		<combo_item name="Deutsch(German)">
-			Deutsch - Beta
-		</combo_item>
-		<combo_item name="Spanish">
-			Español (Spanisch) - Beta
-		</combo_item>
-		<combo_item name="French">
-			Français (Französisch) - Beta
-		</combo_item>
-		<combo_item name="Hungarian">
-			Magyar (Ungarisch) - Beta
-		</combo_item>
-		<combo_item name="Polish">
-			Polski (Polnisch) - Beta
-		</combo_item>
-		<combo_item name="Portugese">
-			Português (Portugiesisch) - Beta
-		</combo_item>
-		<combo_item name="Chinese">
-			中文 (简体) (Chinesisch) - Beta
-		</combo_item>
-		<combo_item name="(Japanese)">
-			日本語 (Japanisch) - Beta
-		</combo_item>
-		<combo_item name="(Korean)">
-			한국어 (Koreanisch) - Beta
-		</combo_item>
+		<combo_box.item name="System Default Language" label="Betriebssystem-Einstellung" />
+		<combo_box.item name="English" label="English (Englisch)" />
+		<combo_box.item name="Danish" label="Danks (Dänisch) - Beta" />
+		<combo_box.item name="Deutsch(German)" label="Deutsch - Beta" />
+		<combo_box.item name="Spanish" label="Español (Spanisch) - Beta" />
+		<combo_box.item name="French" label="Français (Französisch) - Beta" />
+		<combo_box.item name="Hungarian" label="Magyar (Ungarisch) - Beta" />
+		<combo_box.item name="Polish" label="Polski (Polnisch) - Beta" />
+		<combo_box.item name="Portugese" label="Português (Portugiesisch) - Beta" />
+		<combo_box.item name="Chinese" label="中文 (简体) (Chinesisch) - Beta" />
+		<combo_box.item name="(Japanese)" label="日本語 (Japanisch) - Beta" />
+		<combo_box.item name="(Korean)" label="한국어 (Koreanisch) - Beta" />
 	</combo_box>
 	<check_box label="Objekten Sprache mitteilen" name="language_is_public" tool_tip="In-Welt-Objekten wird Ihre bevorzugte Spracheinstellung mitgeteilt."/>
 </panel>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
index bc40ec0da1..2276fd8a9d 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
@@ -21,21 +21,21 @@
 		Fenstergröße:
 	</text>
 	<combo_box left="115" name="windowsize combo">
-		<combo_item name="640x480">
+		<combo_box.item name="640x480">
 			640x480
-		</combo_item>
-		<combo_item name="800x600">
+		</combo_box.item>
+		<combo_box.item name="800x600">
 			800x600
-		</combo_item>
-		<combo_item name="720x480">
+		</combo_box.item>
+		<combo_box.item name="720x480">
 			720x480 (NTSC)
-		</combo_item>
-		<combo_item name="768x576">
+		</combo_box.item>
+		<combo_box.item name="768x576">
 			768x576 (PAL)
-		</combo_item>
-		<combo_item name="1024x768">
+		</combo_box.item>
+		<combo_box.item name="1024x768">
 			1024x768
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="DisplayResLabel" width="100">
 		Anzeigeauflösung:
@@ -45,18 +45,18 @@
 		Aspektverhältnis:
 	</text>
 	<combo_box left="115" name="aspect_ratio" tool_tip="Breite/Höhe">
-		<combo_item type="string" length="1" name="4:3(StandardCRT)">
+		<combo_box.item type="string" length="1" name="4:3(StandardCRT)">
 			4:3 (Standard-CRT)
-		</combo_item>
-		<combo_item type="string" length="1" name="5:4(1280x1024LCD)">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)">
 			5:4 (1280x1024 LCD)
-		</combo_item>
-		<combo_item name="8:5(Widescreen)">
+		</combo_box.item>
+		<combo_box.item name="8:5(Widescreen)">
 			8:5 (Widescreen)
-		</combo_item>
-		<combo_item type="string" length="1" name="16:9(Widescreen)">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="16:9(Widescreen)">
 			16:9 (Widescreen)
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<check_box label="Verhältnis automatisch erkennen" left="275" name="aspect_auto_detect" />
 	<text type="string" length="1" name="UI Size:">
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index 56cc7560ed..07f3269541 100644
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -1,443 +1,443 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<!-- This file contains strings that used to be hardcoded in the source.
-     It is only for those strings which don&apos;t belong in a floater.
-     For example, the strings used in avatar chat bubbles, and strings 
-     that are returned from one component and may appear in many places-->
-<strings>
-	<!-- Login -->
-	<string name="LoginInProgress">
-		Anmeldevorgang gestartet. [APP_NAME] reagiert möglicherweise nicht.  Bitte warten.
-	</string>
-	<string name="LoginAuthenticating">
-		Authentifizierung
-	</string>
-	<string name="LoginMaintenance">
-		Account wird aktualisiert...
-	</string>
-	<string name="LoginAttempt">
-		Ein früherer Anmeldeversuch ist fehlgeschlagen. Anmeldung, Versuch [NUMBER]
-	</string>
-	<string name="LoginPrecaching">
-		Welt wird geladen...
-	</string>
-	<string name="LoginInitializingBrowser">
-		Integrierter Webbrowser wird initialisiert...
-	</string>
-	<string name="LoginInitializingMultimedia">
-		Multimedia wird initialisiert...
-	</string>
-	<string name="LoginVerifyingCache">
-		Cache-Dateien werden überprüft (dauert 60-90 Sekunden)...
-	</string>
-	<string name="LoginProcessingResponse">
-		Antwort wird verarbeitet...
-	</string>
-	<string name="LoginInitializingWorld">
-		Welt wird initialisiert...
-	</string>
-	<string name="LoginDecodingImages">
-		Bilder werden entpackt...
-	</string>
-	<string name="LoginInitializingQuicktime">
-		QuickTime wird initialisiert...
-	</string>
-	<string name="LoginQuicktimeNotFound">
-		QuickTime nicht gefunden - Initialisierung nicht möglich.
-	</string>
-	<string name="LoginQuicktimeOK">
-		QuickTime wurde initialisiert.
-	</string>
-	<string name="LoginWaitingForRegionHandshake">
-		Region-Handshake...
-	</string>
-	<string name="LoginConnectingToRegion">
-		Region-Verbindung...
-	</string>
-	<string name="LoginDownloadingClothing">
-		Kleidung wird geladen...
-	</string>
-	<string name="LoginFailedNoNetwork">
-		Netzwerk Fehler: Eine Verbindung konnte nicht hergestellt werden. Bitte überprüfen Sie Ihre Netzwerkverbindung.
-	</string>
-	<!-- Disconnection -->
-	<string name="AgentLostConnection">
-		In dieser Region kann es zu Problemen kommen. Bitte überprüfen Sie Ihre Internetverbindung.
-	</string>
-	<!-- Tooltip, llhoverview.cpp -->
-	<string name="TooltipPerson">
-		Person
-	</string>
-	<!-- Object under mouse pointer is an avatar -->
-	<string name="TooltipNoName">
-		(namenlos)
-	</string>
-	<!-- No name on an object -->
-	<string name="TooltipOwner">
-		Eigentümer:
-	</string>
-	<!-- Owner name follows -->
-	<string name="TooltipPublic">
-		Öffentlich
-	</string>
-	<!-- Public permissions on an object -->
-	<string name="TooltipIsGroup">
-		(Gruppe)
-	</string>
-	<!-- The name before this text is that of a group -->
-	<string name="TooltipFlagScript">
-		Skript
-	</string>
-	<string name="TooltipFlagPhysics">
-		Physik
-	</string>
-	<string name="TooltipFlagTouch">
-		Berühren
-	</string>
-	<string name="TooltipFlagL$">
-		L$
-	</string>
-	<string name="TooltipFlagDropInventory">
-		Inventar fallen lassen
-	</string>
-	<string name="TooltipFlagPhantom">
-		Phantom
-	</string>
-	<string name="TooltipFlagTemporary">
-		Temporär
-	</string>
-	<string name="TooltipFlagRightClickMenu">
-		(Rechtsklick für Menü)
-	</string>
-	<string name="TooltipFreeToCopy">
-		Kopieren möglich
-	</string>
-	<string name="TooltipForSaleL$">
-		Zum Verkauf: [AMOUNT] L$
-	</string>
-	<!-- L$ version -->
-	<string name="TooltipForSaleMsg">
-		Zum Verkauf: [MESSAGE]
-	</string>
-	<!-- Message (RetrievingData) -->
-	<string name="TooltipFlagGroupBuild">
-		Gruppenbau
-	</string>
-	<string name="TooltipFlagNoBuild">
-		Bauen aus
-	</string>
-	<string name="TooltipFlagNoEdit">
-		Gruppenbau
-	</string>
-	<string name="TooltipFlagNotSafe">
-		Unsicher
-	</string>
-	<!-- damage area -->
-	<string name="TooltipFlagNoFly">
-		Fliegen aus
-	</string>
-	<string name="TooltipFlagGroupScripts">
-		Gruppenskripte
-	</string>
-	<string name="TooltipFlagNoScripts">
-		Skripte aus
-	</string>
-	<string name="TooltipLand">
-		Land:
-	</string>
-	<string name="TooltipMustSingleDrop">
-		Sie können nur ein einzelnes Objekt hierher ziehen
-	</string>
-	<!-- Indicates that an avatar&apos;s name or other similar datum is being retrieved. General usage. -->
-	<string name="RetrievingData">
-		Laden...
-	</string>
-	<string name="ReleaseNotes">
-		Versionshinweise
-	</string>
-	<!-- Indicates something is being loaded. Maybe should be merged with RetrievingData -->
-	<string name="LoadingData">
-		Wird geladen...
-	</string>
-	<!-- namecache -->
-	<!-- Avatar name: text shown for LLUUID::null -->
-	<string name="AvatarNameNobody">
-		(niemand)
-	</string>
-	<!-- Avatar name: text shown while fetching name -->
-	<string name="AvatarNameWaiting">
-		(wartet)
-	</string>
-	<!-- Avatar name: text shown as an alternative to AvatarNameFetching, easter egg. -->
-	<string name="AvatarNameHippos">
-		(hippos)
-	</string>
-	<!-- Group name: text shown for LLUUID::null -->
-	<string name="GroupNameNone">
-		(keiner)
-	</string>
-	<!-- Asset errors. Used in llassetstorage.cpp, translation from error code to error message. -->
-	<string name="AssetErrorNone">
-		Kein Fehler
-	</string>
-	<string name="AssetErrorRequestFailed">
-		Asset-Anforderung: fehlgeschlagen
-	</string>
-	<string name="AssetErrorNonexistentFile">
-		Asset-Anforderung: Datei existiert nicht
-	</string>
-	<string name="AssetErrorNotInDatabase">
-		Asset-Anforderung: Asset in Datenbank nicht gefunden
-	</string>
-	<string name="AssetErrorEOF">
-		Ende der Datei
-	</string>
-	<string name="AssetErrorCannotOpenFile">
-		Datei kann nicht geöffnet werden
-	</string>
-	<string name="AssetErrorFileNotFound">
-		Datei nicht gefunden
-	</string>
-	<string name="AssetErrorTCPTimeout">
-		Zeitüberschreitung bei Dateiübertragung
-	</string>
-	<string name="AssetErrorCircuitGone">
-		Verbindung verloren
-	</string>
-	<string name="AssetErrorUnknownStatus">
-		Status unbekannt
-	</string>
-	<!-- llvoavatar. Displayed in the avatar&apos;s chat bubble -->
-	<string name="AvatarEditingApparance">
-		(Aussehen wird bearbeitet)
-	</string>
-	<string name="AvatarAway">
-		Abwesend
-	</string>
-	<string name="AvatarBusy">
-		Beschäftigt
-	</string>
-	<string name="AvatarMuted">
-		Stummgeschaltet
-	</string>
-	<!-- animations -->
-	<string name="anim_express_afraid">
-		Ängstlich
-	</string>
-	<string name="anim_express_anger">
-		Verärgert
-	</string>
-	<string name="anim_away">
-		Abwesend
-	</string>
-	<string name="anim_backflip">
-		Rückwärtssalto
-	</string>
-	<string name="anim_express_laugh">
-		Lachkrampf
-	</string>
-	<string name="anim_express_toothsmile">
-		Grinsen
-	</string>
-	<string name="anim_blowkiss">
-		Kusshand
-	</string>
-	<string name="anim_express_bored">
-		Gelangweilt
-	</string>
-	<string name="anim_bow">
-		Verbeugen
-	</string>
-	<string name="anim_clap">
-		Klatschen
-	</string>
-	<string name="anim_courtbow">
-		Diener
-	</string>
-	<string name="anim_express_cry">
-		Weinen
-	</string>
-	<string name="anim_dance1">
-		Tanz 1
-	</string>
-	<string name="anim_dance2">
-		Tanz 2
-	</string>
-	<string name="anim_dance3">
-		Tanz 3
-	</string>
-	<string name="anim_dance4">
-		Tanz 4
-	</string>
-	<string name="anim_dance5">
-		Tanz 5
-	</string>
-	<string name="anim_dance6">
-		Tanz 6
-	</string>
-	<string name="anim_dance7">
-		Tanz 7
-	</string>
-	<string name="anim_dance8">
-		Tanz 8
-	</string>
-	<string name="anim_express_disdain">
-		Verachten
-	</string>
-	<string name="anim_drink">
-		Trinken
-	</string>
-	<string name="anim_express_embarrased">
-		Verlegen
-	</string>
-	<string name="anim_angry_fingerwag">
-		Drohen
-	</string>
-	<string name="anim_fist_pump">
-		Faust pumpen
-	</string>
-	<string name="anim_yoga_float">
-		Yogaflieger
-	</string>
-	<string name="anim_express_frown">
-		Stirnrunzeln
-	</string>
-	<string name="anim_impatient">
-		Ungeduldig
-	</string>
-	<string name="anim_jumpforjoy">
-		Freudensprung
-	</string>
-	<string name="anim_kissmybutt">
-		LMA
-	</string>
-	<string name="anim_express_kiss">
-		Küssen
-	</string>
-	<string name="anim_laugh_short">
-		Lachen
-	</string>
-	<string name="anim_musclebeach">
-		Posen
-	</string>
-	<string name="anim_no_unhappy">
-		Nein (Bedauernd)
-	</string>
-	<string name="anim_no_head">
-		Nein
-	</string>
-	<string name="anim_nyanya">
-		Ällabätsch
-	</string>
-	<string name="anim_punch_onetwo">
-		Eins-Zwei-Punch
-	</string>
-	<string name="anim_express_open_mouth">
-		Mund offen
-	</string>
-	<string name="anim_peace">
-		Friede
-	</string>
-	<string name="anim_point_you">
-		Auf anderen zeigen
-	</string>
-	<string name="anim_point_me">
-		Auf mich zeigen
-	</string>
-	<string name="anim_punch_l">
-		Linker Haken
-	</string>
-	<string name="anim_punch_r">
-		Rechter Haken
-	</string>
-	<string name="anim_rps_countdown">
-		SSP zählen
-	</string>
-	<string name="anim_rps_paper">
-		SSP Papier
-	</string>
-	<string name="anim_rps_rock">
-		SSP Stein
-	</string>
-	<string name="anim_rps_scissors">
-		SSP Schere
-	</string>
-	<string name="anim_express_repulsed">
-		Angewidert
-	</string>
-	<string name="anim_kick_roundhouse_r">
-		Rundkick
-	</string>
-	<string name="anim_express_sad">
-		Traurig
-	</string>
-	<string name="anim_salute">
-		Salutieren
-	</string>
-	<string name="anim_shout">
-		Rufen
-	</string>
-	<string name="anim_express_shrug">
-		Schulterzucken
-	</string>
-	<string name="anim_express_smile">
-		Lächeln
-	</string>
-	<string name="anim_smoke_idle">
-		Zigarette halten
-	</string>
-	<string name="anim_smoke_inhale">
-		Rauchen
-	</string>
-	<string name="anim_smoke_throw_down">
-		Zigarette wegwerfen
-	</string>
-	<string name="anim_express_surprise">
-		Überraschung
-	</string>
-	<string name="anim_sword_strike_r">
-		Schwerthieb
-	</string>
-	<string name="anim_angry_tantrum">
-		Wutanfall
-	</string>
-	<string name="anim_express_tongue_out">
-		Zunge rausstrecken
-	</string>
-	<string name="anim_hello">
-		Winken
-	</string>
-	<string name="anim_whisper">
-		Flüstern
-	</string>
-	<string name="anim_whistle">
-		Pfeifen
-	</string>
-	<string name="anim_express_wink">
-		Zwinkern
-	</string>
-	<string name="anim_wink_hollywood">
-		Zwinkern (Hollywood)
-	</string>
-	<string name="anim_express_worry">
-		Sorgenvoll
-	</string>
-	<string name="anim_yes_happy">
-		Ja (Erfreut)
-	</string>
-	<string name="anim_yes_head">
-		Ja
-	</string>
-	<string name="texture_loading">
-		Wird geladen...
-	</string>
-	<string name="worldmap_offline">
-		Offline
-	</string>
-	<!-- Chat -->
-	<string name="whisper">
-		flüstert:
-	</string>
-	<string name="shout">
-		ruft:
-	</string>
-</strings>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!-- This file contains strings that used to be hardcoded in the source.
+     It is only for those strings which don&apos;t belong in a floater.
+     For example, the strings used in avatar chat bubbles, and strings 
+     that are returned from one component and may appear in many places-->
+<strings>
+	<!-- Login -->
+	<string name="LoginInProgress">
+		Anmeldevorgang gestartet. [APP_NAME] reagiert möglicherweise nicht.  Bitte warten.
+	</string>
+	<string name="LoginAuthenticating">
+		Authentifizierung
+	</string>
+	<string name="LoginMaintenance">
+		Account wird aktualisiert...
+	</string>
+	<string name="LoginAttempt">
+		Ein früherer Anmeldeversuch ist fehlgeschlagen. Anmeldung, Versuch [NUMBER]
+	</string>
+	<string name="LoginPrecaching">
+		Welt wird geladen...
+	</string>
+	<string name="LoginInitializingBrowser">
+		Integrierter Webbrowser wird initialisiert...
+	</string>
+	<string name="LoginInitializingMultimedia">
+		Multimedia wird initialisiert...
+	</string>
+	<string name="LoginVerifyingCache">
+		Cache-Dateien werden überprüft (dauert 60-90 Sekunden)...
+	</string>
+	<string name="LoginProcessingResponse">
+		Antwort wird verarbeitet...
+	</string>
+	<string name="LoginInitializingWorld">
+		Welt wird initialisiert...
+	</string>
+	<string name="LoginDecodingImages">
+		Bilder werden entpackt...
+	</string>
+	<string name="LoginInitializingQuicktime">
+		QuickTime wird initialisiert...
+	</string>
+	<string name="LoginQuicktimeNotFound">
+		QuickTime nicht gefunden - Initialisierung nicht möglich.
+	</string>
+	<string name="LoginQuicktimeOK">
+		QuickTime wurde initialisiert.
+	</string>
+	<string name="LoginWaitingForRegionHandshake">
+		Region-Handshake...
+	</string>
+	<string name="LoginConnectingToRegion">
+		Region-Verbindung...
+	</string>
+	<string name="LoginDownloadingClothing">
+		Kleidung wird geladen...
+	</string>
+	<string name="LoginFailedNoNetwork">
+		Netzwerk Fehler: Eine Verbindung konnte nicht hergestellt werden. Bitte überprüfen Sie Ihre Netzwerkverbindung.
+	</string>
+	<!-- Disconnection -->
+	<string name="AgentLostConnection">
+		In dieser Region kann es zu Problemen kommen. Bitte überprüfen Sie Ihre Internetverbindung.
+	</string>
+	<!-- Tooltip, llhoverview.cpp -->
+	<string name="TooltipPerson">
+		Person
+	</string>
+	<!-- Object under mouse pointer is an avatar -->
+	<string name="TooltipNoName">
+		(namenlos)
+	</string>
+	<!-- No name on an object -->
+	<string name="TooltipOwner">
+		Eigentümer:
+	</string>
+	<!-- Owner name follows -->
+	<string name="TooltipPublic">
+		Öffentlich
+	</string>
+	<!-- Public permissions on an object -->
+	<string name="TooltipIsGroup">
+		(Gruppe)
+	</string>
+	<!-- The name before this text is that of a group -->
+	<string name="TooltipFlagScript">
+		Skript
+	</string>
+	<string name="TooltipFlagPhysics">
+		Physik
+	</string>
+	<string name="TooltipFlagTouch">
+		Berühren
+	</string>
+	<string name="TooltipFlagL$">
+		L$
+	</string>
+	<string name="TooltipFlagDropInventory">
+		Inventar fallen lassen
+	</string>
+	<string name="TooltipFlagPhantom">
+		Phantom
+	</string>
+	<string name="TooltipFlagTemporary">
+		Temporär
+	</string>
+	<string name="TooltipFlagRightClickMenu">
+		(Rechtsklick für Menü)
+	</string>
+	<string name="TooltipFreeToCopy">
+		Kopieren möglich
+	</string>
+	<string name="TooltipForSaleL$">
+		Zum Verkauf: [AMOUNT] L$
+	</string>
+	<!-- L$ version -->
+	<string name="TooltipForSaleMsg">
+		Zum Verkauf: [MESSAGE]
+	</string>
+	<!-- Message (RetrievingData) -->
+	<string name="TooltipFlagGroupBuild">
+		Gruppenbau
+	</string>
+	<string name="TooltipFlagNoBuild">
+		Bauen aus
+	</string>
+	<string name="TooltipFlagNoEdit">
+		Gruppenbau
+	</string>
+	<string name="TooltipFlagNotSafe">
+		Unsicher
+	</string>
+	<!-- damage area -->
+	<string name="TooltipFlagNoFly">
+		Fliegen aus
+	</string>
+	<string name="TooltipFlagGroupScripts">
+		Gruppenskripte
+	</string>
+	<string name="TooltipFlagNoScripts">
+		Skripte aus
+	</string>
+	<string name="TooltipLand">
+		Land:
+	</string>
+	<string name="TooltipMustSingleDrop">
+		Sie können nur ein einzelnes Objekt hierher ziehen
+	</string>
+	<!-- Indicates that an avatar&apos;s name or other similar datum is being retrieved. General usage. -->
+	<string name="RetrievingData">
+		Laden...
+	</string>
+	<string name="ReleaseNotes">
+		Versionshinweise
+	</string>
+	<!-- Indicates something is being loaded. Maybe should be merged with RetrievingData -->
+	<string name="LoadingData">
+		Wird geladen...
+	</string>
+	<!-- namecache -->
+	<!-- Avatar name: text shown for LLUUID::null -->
+	<string name="AvatarNameNobody">
+		(niemand)
+	</string>
+	<!-- Avatar name: text shown while fetching name -->
+	<string name="AvatarNameWaiting">
+		(wartet)
+	</string>
+	<!-- Avatar name: text shown as an alternative to AvatarNameFetching, easter egg. -->
+	<string name="AvatarNameHippos">
+		(hippos)
+	</string>
+	<!-- Group name: text shown for LLUUID::null -->
+	<string name="GroupNameNone">
+		(keiner)
+	</string>
+	<!-- Asset errors. Used in llassetstorage.cpp, translation from error code to error message. -->
+	<string name="AssetErrorNone">
+		Kein Fehler
+	</string>
+	<string name="AssetErrorRequestFailed">
+		Asset-Anforderung: fehlgeschlagen
+	</string>
+	<string name="AssetErrorNonexistentFile">
+		Asset-Anforderung: Datei existiert nicht
+	</string>
+	<string name="AssetErrorNotInDatabase">
+		Asset-Anforderung: Asset in Datenbank nicht gefunden
+	</string>
+	<string name="AssetErrorEOF">
+		Ende der Datei
+	</string>
+	<string name="AssetErrorCannotOpenFile">
+		Datei kann nicht geöffnet werden
+	</string>
+	<string name="AssetErrorFileNotFound">
+		Datei nicht gefunden
+	</string>
+	<string name="AssetErrorTCPTimeout">
+		Zeitüberschreitung bei Dateiübertragung
+	</string>
+	<string name="AssetErrorCircuitGone">
+		Verbindung verloren
+	</string>
+	<string name="AssetErrorUnknownStatus">
+		Status unbekannt
+	</string>
+	<!-- llvoavatar. Displayed in the avatar&apos;s chat bubble -->
+	<string name="AvatarEditingApparance">
+		(Aussehen wird bearbeitet)
+	</string>
+	<string name="AvatarAway">
+		Abwesend
+	</string>
+	<string name="AvatarBusy">
+		Beschäftigt
+	</string>
+	<string name="AvatarMuted">
+		Stummgeschaltet
+	</string>
+	<!-- animations -->
+	<string name="anim_express_afraid">
+		Ängstlich
+	</string>
+	<string name="anim_express_anger">
+		Verärgert
+	</string>
+	<string name="anim_away">
+		Abwesend
+	</string>
+	<string name="anim_backflip">
+		Rückwärtssalto
+	</string>
+	<string name="anim_express_laugh">
+		Lachkrampf
+	</string>
+	<string name="anim_express_toothsmile">
+		Grinsen
+	</string>
+	<string name="anim_blowkiss">
+		Kusshand
+	</string>
+	<string name="anim_express_bored">
+		Gelangweilt
+	</string>
+	<string name="anim_bow">
+		Verbeugen
+	</string>
+	<string name="anim_clap">
+		Klatschen
+	</string>
+	<string name="anim_courtbow">
+		Diener
+	</string>
+	<string name="anim_express_cry">
+		Weinen
+	</string>
+	<string name="anim_dance1">
+		Tanz 1
+	</string>
+	<string name="anim_dance2">
+		Tanz 2
+	</string>
+	<string name="anim_dance3">
+		Tanz 3
+	</string>
+	<string name="anim_dance4">
+		Tanz 4
+	</string>
+	<string name="anim_dance5">
+		Tanz 5
+	</string>
+	<string name="anim_dance6">
+		Tanz 6
+	</string>
+	<string name="anim_dance7">
+		Tanz 7
+	</string>
+	<string name="anim_dance8">
+		Tanz 8
+	</string>
+	<string name="anim_express_disdain">
+		Verachten
+	</string>
+	<string name="anim_drink">
+		Trinken
+	</string>
+	<string name="anim_express_embarrased">
+		Verlegen
+	</string>
+	<string name="anim_angry_fingerwag">
+		Drohen
+	</string>
+	<string name="anim_fist_pump">
+		Faust pumpen
+	</string>
+	<string name="anim_yoga_float">
+		Yogaflieger
+	</string>
+	<string name="anim_express_frown">
+		Stirnrunzeln
+	</string>
+	<string name="anim_impatient">
+		Ungeduldig
+	</string>
+	<string name="anim_jumpforjoy">
+		Freudensprung
+	</string>
+	<string name="anim_kissmybutt">
+		LMA
+	</string>
+	<string name="anim_express_kiss">
+		Küssen
+	</string>
+	<string name="anim_laugh_short">
+		Lachen
+	</string>
+	<string name="anim_musclebeach">
+		Posen
+	</string>
+	<string name="anim_no_unhappy">
+		Nein (Bedauernd)
+	</string>
+	<string name="anim_no_head">
+		Nein
+	</string>
+	<string name="anim_nyanya">
+		Ällabätsch
+	</string>
+	<string name="anim_punch_onetwo">
+		Eins-Zwei-Punch
+	</string>
+	<string name="anim_express_open_mouth">
+		Mund offen
+	</string>
+	<string name="anim_peace">
+		Friede
+	</string>
+	<string name="anim_point_you">
+		Auf anderen zeigen
+	</string>
+	<string name="anim_point_me">
+		Auf mich zeigen
+	</string>
+	<string name="anim_punch_l">
+		Linker Haken
+	</string>
+	<string name="anim_punch_r">
+		Rechter Haken
+	</string>
+	<string name="anim_rps_countdown">
+		SSP zählen
+	</string>
+	<string name="anim_rps_paper">
+		SSP Papier
+	</string>
+	<string name="anim_rps_rock">
+		SSP Stein
+	</string>
+	<string name="anim_rps_scissors">
+		SSP Schere
+	</string>
+	<string name="anim_express_repulsed">
+		Angewidert
+	</string>
+	<string name="anim_kick_roundhouse_r">
+		Rundkick
+	</string>
+	<string name="anim_express_sad">
+		Traurig
+	</string>
+	<string name="anim_salute">
+		Salutieren
+	</string>
+	<string name="anim_shout">
+		Rufen
+	</string>
+	<string name="anim_express_shrug">
+		Schulterzucken
+	</string>
+	<string name="anim_express_smile">
+		Lächeln
+	</string>
+	<string name="anim_smoke_idle">
+		Zigarette halten
+	</string>
+	<string name="anim_smoke_inhale">
+		Rauchen
+	</string>
+	<string name="anim_smoke_throw_down">
+		Zigarette wegwerfen
+	</string>
+	<string name="anim_express_surprise">
+		Überraschung
+	</string>
+	<string name="anim_sword_strike_r">
+		Schwerthieb
+	</string>
+	<string name="anim_angry_tantrum">
+		Wutanfall
+	</string>
+	<string name="anim_express_tongue_out">
+		Zunge rausstrecken
+	</string>
+	<string name="anim_hello">
+		Winken
+	</string>
+	<string name="anim_whisper">
+		Flüstern
+	</string>
+	<string name="anim_whistle">
+		Pfeifen
+	</string>
+	<string name="anim_express_wink">
+		Zwinkern
+	</string>
+	<string name="anim_wink_hollywood">
+		Zwinkern (Hollywood)
+	</string>
+	<string name="anim_express_worry">
+		Sorgenvoll
+	</string>
+	<string name="anim_yes_happy">
+		Ja (Erfreut)
+	</string>
+	<string name="anim_yes_head">
+		Ja
+	</string>
+	<string name="texture_loading">
+		Wird geladen...
+	</string>
+	<string name="worldmap_offline">
+		Offline
+	</string>
+	<!-- Chat -->
+	<string name="whisper">
+		flüstert:
+	</string>
+	<string name="shout">
+		ruft:
+	</string>
+</strings>
diff --git a/indra/newview/skins/default/xui/de/teleport_strings.xml b/indra/newview/skins/default/xui/de/teleport_strings.xml
index 6beba54540..7d1a154310 100644
--- a/indra/newview/skins/default/xui/de/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/de/teleport_strings.xml
@@ -1,90 +1,90 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<teleport_messages name="">
-	<message_set name="errors">
-		<message name="invalid_tport">
-			Bei der Bearbeitung Ihrer Teleport-Anfrage ist ein Problem aufgetreten. Sie müssen
-sich zum Teleportieren eventuell neu anmelden. Wenn Sie diese
-Nachricht weiterhin erhalten, konsultieren Sie bitte die Tech-Support-FAQ unter:
-www.secondlife.com/support
-		</message>
-		<message name="invalid_region_handoff">
-			Bei der Bearbeitung Ihres Regionswechsels ist ein Problem aufgetreten. Sie müssen
-sich zum Wechsel der Region eventuell neu anmelden. Wenn Sie diese
-Nachricht weiterhin erhalten, konsultieren Sie bitte die Tech-Support-FAQ unter:
-www.secondlife.com/support.
-		</message>
-		<message name="blocked_tport">
-			Teleportieren ist zurzeit leider nicht möglich. Versuchen Sie es später noch einmal.
-Wenn der Teleport dann immer noch nicht funktioniert, melden Sie
-sich bitte ab und wieder an.
-		</message>
-		<message name="nolandmark_tport">
-			Das System konnte das Landmarken-Ziel nicht finden.
-		</message>
-		<message name="timeout_tport">
-			Das System konnte keine Teleport-Verbindung herstellen.
-Versuchen Sie es später noch einmal.
-		</message>
-		<message name="noaccess_tport">
-			Sie haben leider keinen Zugang zu diesem Teleport-Ziel.
-		</message>
-		<message name="missing_attach_tport">
-			Ihre Anhänge sind noch nicht eingetroffen. Warten Sie kurz
-oder melden Sie sich ab und wieder an, bevor Sie einen neuen
-Teleport-Versuch unternehmen.
-		</message>
-		<message name="too_many_uploads_tport">
-			Die Asset-Warteschlange in dieser Region ist zurzeit überlastet.
-Ihre Teleport-Anfrage kann nicht sofort bearbeitet werden. Versuchen Sie es
-in einigen Minuten erneut oder besuchen Sie eine weniger überfüllte Region.
-		</message>
-		<message name="expired_tport">
-			Das System konnte Ihre Teleport-Anfrage nicht
-rechtzeitig bearbeiten. Versuchen Sie es in einigen Minuten erneut.
-		</message>
-		<message name="expired_region_handoff">
-			Das System konnte Ihre Anfrage zum Regionswechsel nicht
-rechtzeitig bearbeiten. Versuchen Sie es in einigen Minuten erneut.
-		</message>
-		<message name="no_host">
-			Teleport-Ziel wurde nicht gefunden. Das Ziel ist
-entweder im Moment nicht verfügbar oder existiert nicht mehr. Versuchen Sie es
-in einigen Minuten erneut.
-		</message>
-		<message name="no_inventory_host">
-			Das Inventarsystem ist zurzeit nicht verfügbar.
-		</message>
-	</message_set>
-	<message_set name="progress">
-		<message name="sending_dest">
-			Transport zum Ziel.
-		</message>
-		<message name="redirecting">
-			Weiterleitung an anderes Ziel.
-		</message>
-		<message name="relaying">
-			Weiterleitung zum Ziel.
-		</message>
-		<message name="sending_home">
-			Zuhause-Position wird ermittelt.
-		</message>
-		<message name="sending_landmark">
-			Landmarken-Position wird ermittelt.
-		</message>
-		<message name="completing">
-			Teleport wird abgeschlossen.
-		</message>
-		<message name="resolving">
-			Ziel wird ermittelt.
-		</message>
-		<message name="contacting">
-			Verbindung zu neuer Region.
-		</message>
-		<message name="arriving">
-			Ziel erreicht...
-		</message>
-		<message name="requesting">
-			Teleport wird initialisiert...
-		</message>
-	</message_set>
-</teleport_messages>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<teleport_messages name="">
+	<message_set name="errors">
+		<message name="invalid_tport">
+			Bei der Bearbeitung Ihrer Teleport-Anfrage ist ein Problem aufgetreten. Sie müssen
+sich zum Teleportieren eventuell neu anmelden. Wenn Sie diese
+Nachricht weiterhin erhalten, konsultieren Sie bitte die Tech-Support-FAQ unter:
+www.secondlife.com/support
+		</message>
+		<message name="invalid_region_handoff">
+			Bei der Bearbeitung Ihres Regionswechsels ist ein Problem aufgetreten. Sie müssen
+sich zum Wechsel der Region eventuell neu anmelden. Wenn Sie diese
+Nachricht weiterhin erhalten, konsultieren Sie bitte die Tech-Support-FAQ unter:
+www.secondlife.com/support.
+		</message>
+		<message name="blocked_tport">
+			Teleportieren ist zurzeit leider nicht möglich. Versuchen Sie es später noch einmal.
+Wenn der Teleport dann immer noch nicht funktioniert, melden Sie
+sich bitte ab und wieder an.
+		</message>
+		<message name="nolandmark_tport">
+			Das System konnte das Landmarken-Ziel nicht finden.
+		</message>
+		<message name="timeout_tport">
+			Das System konnte keine Teleport-Verbindung herstellen.
+Versuchen Sie es später noch einmal.
+		</message>
+		<message name="noaccess_tport">
+			Sie haben leider keinen Zugang zu diesem Teleport-Ziel.
+		</message>
+		<message name="missing_attach_tport">
+			Ihre Anhänge sind noch nicht eingetroffen. Warten Sie kurz
+oder melden Sie sich ab und wieder an, bevor Sie einen neuen
+Teleport-Versuch unternehmen.
+		</message>
+		<message name="too_many_uploads_tport">
+			Die Asset-Warteschlange in dieser Region ist zurzeit überlastet.
+Ihre Teleport-Anfrage kann nicht sofort bearbeitet werden. Versuchen Sie es
+in einigen Minuten erneut oder besuchen Sie eine weniger überfüllte Region.
+		</message>
+		<message name="expired_tport">
+			Das System konnte Ihre Teleport-Anfrage nicht
+rechtzeitig bearbeiten. Versuchen Sie es in einigen Minuten erneut.
+		</message>
+		<message name="expired_region_handoff">
+			Das System konnte Ihre Anfrage zum Regionswechsel nicht
+rechtzeitig bearbeiten. Versuchen Sie es in einigen Minuten erneut.
+		</message>
+		<message name="no_host">
+			Teleport-Ziel wurde nicht gefunden. Das Ziel ist
+entweder im Moment nicht verfügbar oder existiert nicht mehr. Versuchen Sie es
+in einigen Minuten erneut.
+		</message>
+		<message name="no_inventory_host">
+			Das Inventarsystem ist zurzeit nicht verfügbar.
+		</message>
+	</message_set>
+	<message_set name="progress">
+		<message name="sending_dest">
+			Transport zum Ziel.
+		</message>
+		<message name="redirecting">
+			Weiterleitung an anderes Ziel.
+		</message>
+		<message name="relaying">
+			Weiterleitung zum Ziel.
+		</message>
+		<message name="sending_home">
+			Zuhause-Position wird ermittelt.
+		</message>
+		<message name="sending_landmark">
+			Landmarken-Position wird ermittelt.
+		</message>
+		<message name="completing">
+			Teleport wird abgeschlossen.
+		</message>
+		<message name="resolving">
+			Ziel wird ermittelt.
+		</message>
+		<message name="contacting">
+			Verbindung zu neuer Region.
+		</message>
+		<message name="arriving">
+			Ziel erreicht...
+		</message>
+		<message name="requesting">
+			Teleport wird initialisiert...
+		</message>
+	</message_set>
+</teleport_messages>
diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml
index 9ff8293f84..0b3143a0e8 100644
--- a/indra/newview/skins/default/xui/es/floater_about.xml
+++ b/indra/newview/skins/default/xui/es/floater_about.xml
@@ -1,36 +1,36 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_about" title="Acerca de Second Life">
-	<text_editor name="credits_editor">
-		Le ofrecen Second Life Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les, y otros muchos.
-
-  Gracias a todos estos residentes por contribuir a garantizar que, por el momento, esta es la mejor versión: 
-
-  3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion
-  APR Copyright (C) 2000-2004 The Apache Software Foundation
-  cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
-  DBus/dbus-glib Copyright (C) 2002, 2003  CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
-  expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
-  FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
-  GL Copyright (C) 1999-2004 Brian Paul.
-  Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
-  jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
-  jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
-  ogg/vorbis Copyright (C) 2001, Xiphophorus
-  OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
-  SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
-  SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-  xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
-  zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
-  google-perftools Copyright (c) 2005, Google Inc.
-  
-  All rights reserved.  See licenses.txt for details.
-
-  Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
-
-
-  Me las apañaré con un poco de ayuda de mis amigos. -- Richard Starkey
-	</text_editor>
-	<string name="you_are_at">
-		Está en [POSITION]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_about" title="Acerca de Second Life">
+	<text_editor name="credits_editor">
+		Le ofrecen Second Life Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les, y otros muchos.
+
+  Gracias a todos estos residentes por contribuir a garantizar que, por el momento, esta es la mejor versión: 
+
+  3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion
+  APR Copyright (C) 2000-2004 The Apache Software Foundation
+  cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
+  DBus/dbus-glib Copyright (C) 2002, 2003  CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
+  expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
+  FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
+  GL Copyright (C) 1999-2004 Brian Paul.
+  Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
+  jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
+  jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
+  ogg/vorbis Copyright (C) 2001, Xiphophorus
+  OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
+  SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
+  SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+  xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
+  zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
+  google-perftools Copyright (c) 2005, Google Inc.
+  
+  All rights reserved.  See licenses.txt for details.
+
+  Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
+
+
+  Me las apañaré con un poco de ayuda de mis amigos. -- Richard Starkey
+	</text_editor>
+	<string name="you_are_at">
+		Está en [POSITION]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml
index ad1031fcbc..526327d28b 100644
--- a/indra/newview/skins/default/xui/es/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/es/floater_about_land.xml
@@ -1,428 +1,428 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floaterland" title="Acerca del terreno">
-	<tab_container name="landtab">
-		<panel label="General" name="land_general_panel">
-			<text length="1" name="Name:" type="string">
-				Nombre:
-			</text>
-			<text length="1" name="Description:" type="string">
-				Descripción:
-			</text>
-			<text length="1" name="Owner:" type="string">
-				Propietario:
-			</text>
-			<text length="1" name="OwnerText" type="string">
-				Leyla Linden
-			</text>
-			<button label="Perfil..." label_selected="Perfil..." name="Profile..."/>
-			<text length="1" name="Group:" type="string">
-				Grupo:
-			</text>
-			<button label="Configurar..." label_selected="Configurar..." name="Set..."/>
-			<check_box label="Permitir transferir al grupo" name="check deed" tool_tip="Un oficial del grupo puede transferir este terreno al grupo. El terreno será apoyado por el grupo en sus asignaciones de terreno."/>
-			<button label="Transferir..." label_selected="Transferir..." name="Deed..." tool_tip="Sólo si es usted un oficial del grupo seleccionado puede transferir terreno."/>
-			<check_box label="El propietario hace una contribución transfiriendo" name="check contrib" tool_tip="Cuando el terreno se transfiere al grupo, el antiguo propietario contribuye con una asignación suficiente de terreno."/>
-			<text length="1" name="For Sale:" type="string">
-				En venta:
-			</text>
-			<text length="1" name="Not for sale." type="string">
-				No está en venta.
-			</text>
-			<text length="1" name="For Sale: Price L$[PRICE]." type="string">
-				Precio: [PRICE] L$
-			</text>
-			<button label="Vender el terreno..." label_selected="Vender el terreno..." name="Sell Land..."/>
-			<text length="1" name="For sale to" type="string">
-				En venta a: [BUYER]
-			</text>
-			<text length="1" name="Sell with landowners objects in parcel." type="string">
-				Los objetos se incluyen en la venta.
-			</text>
-			<text length="1" name="Selling with no objects in parcel." type="string">
-				Los objetos no se incluyen en la venta.
-			</text>
-			<button label="Cancelar la venta del terreno" label_selected="Cancelar la venta del terreno" name="Cancel Land Sale"/>
-			<text length="1" name="Claimed:" type="string">
-				Reclamada:
-			</text>
-			<text length="1" name="DateClaimText" type="string">
-				Mar 15 Ago 15 13:47:25 2006
-			</text>
-			<text length="1" name="PriceLabel" type="string">
-				Superficie:
-			</text>
-			<text length="1" name="PriceText" type="string">
-				4048 m²
-			</text>
-			<text length="1" name="Traffic:" type="string">
-				Tráfico:
-			</text>
-			<text length="1" name="DwellText" type="string">
-				0
-			</text>
-			<button label="Comprar terreno..." label_selected="Comprar terreno..." name="Buy Land..."/>
-			<button label="Comprar para el grupo..." label_selected="Comprar para el grupo..." name="Buy For Group..."/>
-			<button label="Comprar un pase..." label_selected="Comprar un pase..." name="Buy Pass..." tool_tip="Un pase le da acceso temporal a este terreno."/>
-			<button label="Abandonar el terreno..." label_selected="Abandonar el terreno..." name="Abandon Land..."/>
-			<button label="Reclamar el terreno..." label_selected="Reclamar el terreno..." name="Reclaim Land..."/>
-			<button label="Venta Linden..." label_selected="Venta Linden..." name="Linden Sale..." tool_tip="El terreno debe estar en propiedad, con contenido, y no estar en subasta."/>
-			<string name="new users only">
-				Sólo usuarios nuevos
-			</string>
-			<string name="anyone">
-				Cualquiera
-			</string>
-			<string name="area_text">
-				Superficie
-			</string>
-			<string name="area_size_text">
-				[AREA] m²
-			</string>
-			<string name="auction_id_text">
-				ID de la subasta: [ID]
-			</string>
-			<string name="need_tier_to_modify">
-				Debe aprobar su compra para modificar este terreno.
-			</string>
-			<string name="group_owned_text">
-				(Propiedad del grupo)
-			</string>
-			<string name="profile_text">
-				Perfil...
-			</string>
-			<string name="info_text">
-				Información...
-			</string>
-			<string name="public_text">
-				(público)
-			</string>
-			<string name="none_text">
-				(ninguno)
-			</string>
-			<string name="sale_pending_text">
-				(Venta pendiente)
-			</string>
-			<string name="no_selection_text">
-				No se ha seleccionado una parcela.
-Vaya al menú Mundo &gt; Acerca del terreno o seleccione otra parcela para ver sus características.
-			</string>
-		</panel>
-		<panel label="Contrato" name="land_covenant_panel">
-			<text length="1" name="covenant_timestamp_text" type="string">
-				Última modificación, Dic Miér 31 16:00:00 1969
-			</text>
-			<text length="1" name="region_name_lbl" type="string">
-				Región:
-			</text>
-			<text length="1" name="region_name_text" type="string">
-				leyla
-			</text>
-			<text length="1" name="estate_name_lbl" type="string">
-				Estado:
-			</text>
-			<text length="1" name="estate_name_text" type="string">
-				mainland
-			</text>
-			<text length="1" name="estate_owner_lbl" type="string">
-				Propietario del estado:
-			</text>
-			<text length="1" name="estate_owner_text" type="string">
-				(nadie)
-			</text>
-			<text length="1" name="resellable_clause" type="string">
-				El terreno comprado en esta región no se podrá revender.
-			</text>
-			<text length="1" name="changeable_clause" type="string">
-				El terreno comprado en esta región no se podrá unir/dividir.
-			</text>
-			<text_editor length="1" name="covenant_editor" type="string">
-				No se ha aportado un contrato para este estado.
-			</text_editor>
-			<string name="can_resell">
-				El terreno comprado en esta región se podrá revender.
-			</string>
-			<string name="can_not_resell">
-				El terreno comprado en esta región no se podrá revender.
-			</string>
-			<string name="can_change">
-				El terreno comprado en esta región se podrá unir o dividir.
-			</string>
-			<string name="can_not_change">
-				PEl terreno comprado en esta región no se podrá unir o dividir.
-			</string>
-		</panel>
-		<panel label="Objetos" name="land_objects_panel">
-			<text name="parcel_object_bonus">
-				Plus de objetos en la región: [BONUS]
-			</text>
-			<text length="1" name="Simulator primitive usage:" type="string">
-				Simulador de uso de prims:
-			</text>
-			<text name="objects_available">
-				[COUNT] de un máximo de [MAX] ([AVAILABLE] disponibles)
-			</text>
-			<string name="objects_available_text">
-				[COUNT] de un máximo de [MAX] ([AVAILABLE] disponibles)
-			</string>
-			<string name="objects_deleted_text">
-				[COUNT] de un máximo de [MAX] ([DELETED] se borrarán)
-			</string>
-			<text length="1" name="Primitives parcel supports:" type="string">
-				Prims que admite la parcela:
-			</text>
-			<text name="object_contrib_text">
-				[COUNT]
-			</text>
-			<text length="1" name="Primitives on parcel:" type="string">
-				Prims en la parcela:
-			</text>
-			<text name="total_objects_text">
-				[COUNT]
-			</text>
-			<text length="1" name="Owned by parcel owner:" type="string">
-				Del propietario de la parcela:
-			</text>
-			<text name="owner_objects_text">
-				[COUNT]
-			</text>
-			<button label="Mostrar" label_selected="Mostrar" name="ShowOwner"/>
-			<button label="Devolver..." label_selected="Devolver..." name="ReturnOwner..." tool_tip="Devolver los objetos a sus propietarios."/>
-			<text length="1" name="Set to group:" type="string">
-				Del grupo:
-			</text>
-			<text name="group_objects_text">
-				[COUNT]
-			</text>
-			<button label="Mostrar" label_selected="Mostrar" name="ShowGroup"/>
-			<button label="Devolver..." label_selected="Devolver..." name="ReturnGroup..." tool_tip="Devolver los objetos a sus propietarios."/>
-			<text length="1" name="Owned by others:" type="string">
-				Propiedad de otros:
-			</text>
-			<text name="other_objects_text">
-				[COUNT]
-			</text>
-			<button label="Mostrar" label_selected="Mostrar" name="ShowOther"/>
-			<button label="Devolver..." label_selected="Devolver..." name="ReturnOther..." tool_tip="Devolver los objetos a sus propietarios."/>
-			<text length="1" name="Selected / sat upon:" type="string">
-				Seleccionados / con gente sentada:
-			</text>
-			<text name="selected_objects_text">
-				[COUNT]
-			</text>
-			<text name="Autoreturn">
-				Autodevolución de objetos a otros residentes (minutos; 0 la desactiva):
-			</text>
-			<text length="1" name="Object Owners:" type="string">
-				Propietarios de los objetos:
-			</text>
-			<button label="Actualizar la lista" label_selected="Actualizar la lista" name="Refresh List"/>
-			<button label="Devolver los objetos..." label_selected="Devolver los objetos..." name="Return objects..."/>
-			<name_list name="owner list">
-				<column label="Tipo" name="type"/>
-				<column label="Nombre" name="name"/>
-				<column label="Número" name="count"/>
-				<column label="Más recientes" name="mostrecent"/>
-			</name_list>
-		</panel>
-		<panel label="Opciones" name="land_options_panel">
-			<text length="1" name="allow_label" type="string">
-				Permitir a otros residentes:
-			</text>
-			<check_box label="Editar el terreno" name="edit land check" tool_tip="Si se marca, cualquiera podrá modificar su terreno. Mejor dejarlo desmarcado, pues usted siempre puede modificar su terreno."/>
-			<check_box label="Crear hitos" name="check landmark"/>
-			<check_box label="Volar" name="check fly" tool_tip="Si se marca, los residentes podrán volar en su terreno. Si no, sólo podrán volar al cruzarlo o hasta que aterricen en él."/>
-			<text length="1" name="allow_label2" type="string">
-				Crear objetos:
-			</text>
-			<check_box label="Todos los residentes" name="edit objects check"/>
-			<check_box label="El grupo" name="edit group objects check"/>
-			<text length="1" name="allow_label3" type="string">
-				Dejar objetos:
-			</text>
-			<check_box label="Todos los residentes" name="all object entry check"/>
-			<check_box label="El grupo" name="group object entry check"/>
-			<text length="1" name="allow_label4" type="string">
-				Ejecutar scripts:
-			</text>
-			<check_box label="Todos los residentes" name="check other scripts"/>
-			<check_box label="El grupo" name="check group scripts"/>
-			<text length="1" name="land_options_label" type="string">
-				Opciones del terreno:
-			</text>
-			<check_box label="Seguro (sin daño)" name="check safe" tool_tip="Si se marca, convierte el terreno en &apos;seguro&apos;, desactivando el daño en combate. Si no, se activa el daño en combate."/>
-			<check_box label="Sin &apos;empujones&apos;" name="PushRestrictCheck" tool_tip="Previene scripts que empujen. Marcando esta opción prevendrá que en su terreno haya comportamientos destructivos."/>
-			<check_box label="Mostrar la parcela en Buscar (30 L$/semana) en" name="ShowDirectoryCheck" tool_tip="Let people see this parcel in search results"/>
-			<combo_box name="land category">
-				<combo_item name="AnyCategory">
-					Cualquier categoría
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Localización Linden
-				</combo_item>
-
-				<combo_item name="Arts&amp;Culture">
-					Arte y Cultura
-				</combo_item>
-				<combo_item name="Business">
-					Negocios
-				</combo_item>
-				<combo_item name="Educational">
-					Educativo
-				</combo_item>
-				<combo_item name="Gaming">
-					Juegos de azar
-				</combo_item>
-				<combo_item name="Hangout">
-					Entretenimiento
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Para recién llegados
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parques y Naturaleza
-				</combo_item>
-				<combo_item name="Residential">
-					Residencial
-				</combo_item>
-				<combo_item name="Shopping">
-					Compras
-				</combo_item>
-				<combo_item name="Other">
-					Otra
-				</combo_item>
-			</combo_box>
-			<button label="?" label_selected="?" name="?"/>
-			<check_box name="MatureCheck" />
-			<text length="1" name="Snapshot:" type="string">
-				Foto:
-			</text>
-			<texture_picker label="" name="snapshot_ctrl" tool_tip="Pulse para elegir una imagen"/>
-			<text name="landing_point">
-				Punto de llegada: [LANDING]
-			</text>
-			<string name="landing_point_none">
-				(ninguno)
-			</string>
-			<button label="Definir" label_selected="Definir" name="Set" tool_tip="Configura el punto de llegada donde aparecerán los visitantes. Configúrelo a la posición de su avatar dentro de esta parcela."/>
-			<button label="Borrar" label_selected="Borrar" name="Clear" tool_tip="Borrar el punto de llegada."/>
-			<text length="1" name="Teleport Routing: " type="string">
-				Punto de teleporte:
-			</text>
-			<combo_box name="landing type" tool_tip="Punto de teleporte: defina cómo manejar en su terreno los teleportes.">
-				<combo_item length="1" name="Blocked" type="string">
-					Bloqueado
-				</combo_item>
-				<combo_item length="1" name="LandingPoint" type="string">
-					Punto de llegada
-				</combo_item>
-				<combo_item length="1" name="Anywhere" type="string">
-					Cualquiera
-				</combo_item>
-			</combo_box>
-			<string name="push_restrict_text">
-				Sin &apos;empujones&apos;
-			</string>
-			<string name="push_restrict_region_text">
-				Sin &apos;empujones&apos; (prevalece lo marcado en la región)
-			</string>
-		</panel>
-		<panel label="Media" name="land_media_panel">
-			<text name="with media:">
-				Tipo de media:
-			</text>
-			<combo_box name="media type" tool_tip="Especifique si la URL es una película, una web, u otro media"/>
-			<text name="at URL:">
-				URL del media:
-			</text>
-			<button label="Definir..." label_selected="Definir..." name="set_media_url"/>
-			<text name="Description:">
-				Descripción:
-			</text>
-			<line_editor name="url_description" tool_tip="Texto a mostrar cerca del botón play/cargar"/>
-			<text length="1" name="Media texture:" type="string">
-				Cambiar
-la textura:
-			</text>
-			<texture_picker label="" name="media texture" tool_tip="Pulse para elegir una imagen"/>
-			<text name="replace_texture_help">
-				(Los objetos que usen esta textura mostrarán la película o la web
-cuando pulse la flecha de play)
-			</text>
-			<text name="Options:">
-				Opciones de
-los media:
-			</text>
-			<check_box label="Escala automática" name="media_auto_scale" tool_tip="Marcando esta opción, se ajustará el tamaño del contenido automáticamente. Puede ser ligeramente más lento y con menor calidad visual, pero no tendrá que ajustar ni alinear ninguna textura."/>
-			<check_box label="Media en bucle" name="media_loop" tool_tip="Ejecuta el media en bucle: cuando acaba su ejecución, vuelve a empezar."/>
-			<check_box label="Ocultar la URL del media" name="hide_media_url" tool_tip="Marcando esta opción esconderá en la información de esta parcela -a quien no esté autorizado a verla- la URL del media. Note que esto no está disponible para HTML."/>
-			<check_box label="Ocultar la URL de la música" name="hide_music_url" tool_tip="Marcando esta opción esconderá en la información de esta parcela -a quien no esté autorizado a verla- la URL de la música"/>
-			<text name="media_size" tool_tip="Tamaño en el que mostrar las web (marque 0 para por defecto).">
-				Tamaño del media:
-			</text>
-			<spinner name="media_size_width" tool_tip="Tamaño en el que mostrar las web (marque 0 para por defecto)."/>
-			<spinner name="media_size_height" tool_tip="Tamaño en el que mostrar las web (marque 0 para por defecto)."/>
-			<text name="pixels">
-				píxeles
-			</text>
-			<text name="MusicURL:">
-				URL de la música:
-			</text>
-			<text name="Sound:">
-				Sonido:
-			</text>
-			<check_box label="Limitar el sonido a sólo esta parcela" name="check sound local"/>
-			<text name="Voice settings:">
-				Voz:
-			</text>
-			<radio_group name="parcel_voice_channel">
-				<radio_item name="Estate">
-					Usar el canal del estado
-				</radio_item>
-				<radio_item name="Private">
-					Usar un canal privado
-				</radio_item>
-				<radio_item name="Disabled">
-					Desactivar el audio ambiental en esta parcela
-				</radio_item>
-			</radio_group>
-		</panel>
-		<panel label="Acceso" name="land_access_panel">
-			<text length="1" name="Limit access to this parcel to:" type="string">
-				Acceso a esta parcela
-			</text>
-			<check_box label="Permitir el acceso público" name="public_access"/>
-			<text name="Only Allow">
-				Impedir el acceso a:
-			</text>
-			<check_box label="Residentes que no hayan dado a Linden Lab información de su forma de pago" name="limit_payment" tool_tip="Impedir el acceso a los residentes no identificados."/>
-			<check_box label="Residentes de los que no se ha verificado si son adultos" name="limit_age_verified" tool_tip="Residentes que no hayan verificado su edad. Para más información, vea  support.secondlife.com"/>
-			<string name="estate_override">
-				Una o más de esta opciones está configurada a nivel del estado
-			</string>
-			<check_box label="Acceso permitido al grupo: [GROUP]" name="GroupCheck" tool_tip="Elija el grupo en la pestaña General."/>
-			<check_box label="Vender pases a:" name="PassCheck" tool_tip="Permitir acceso temporal a esta parcela"/>
-			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Cualquiera
-				</combo_item>
-				<combo_item name="Group">
-					Grupo
-				</combo_item>
-			</combo_box>
-			<spinner label="Precio en L$:" name="PriceSpin"/>
-			<spinner label="Horas de acceso:" name="HoursSpin"/>
-			<text label="Permitir siempre" name="AllowedText">
-				Residentes autorizados
-			</text>
-			<name_list name="AccessList" tool_tip="([LISTED] listados, el máx. es de [MAX])"/>
-			<button label="Añadir..." label_selected="Añadir..." name="add_allowed"/>
-			<button label="Quitar" label_selected="Quitar" name="remove_allowed"/>
-			<text label="Prohibir el acceso" name="BanCheck">
-				Residentes con el acceso prohibido
-			</text>
-			<name_list name="BannedList" tool_tip="([LISTED] listados, el máx. es de [MAX])"/>
-			<button label="Añadir..." label_selected="Añadir..." name="add_banned"/>
-			<button label="Quitar" label_selected="Quitar" name="remove_banned"/>
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floaterland" title="Acerca del terreno">
+	<tab_container name="landtab">
+		<panel label="General" name="land_general_panel">
+			<text length="1" name="Name:" type="string">
+				Nombre:
+			</text>
+			<text length="1" name="Description:" type="string">
+				Descripción:
+			</text>
+			<text length="1" name="Owner:" type="string">
+				Propietario:
+			</text>
+			<text length="1" name="OwnerText" type="string">
+				Leyla Linden
+			</text>
+			<button label="Perfil..." label_selected="Perfil..." name="Profile..."/>
+			<text length="1" name="Group:" type="string">
+				Grupo:
+			</text>
+			<button label="Configurar..." label_selected="Configurar..." name="Set..."/>
+			<check_box label="Permitir transferir al grupo" name="check deed" tool_tip="Un oficial del grupo puede transferir este terreno al grupo. El terreno será apoyado por el grupo en sus asignaciones de terreno."/>
+			<button label="Transferir..." label_selected="Transferir..." name="Deed..." tool_tip="Sólo si es usted un oficial del grupo seleccionado puede transferir terreno."/>
+			<check_box label="El propietario hace una contribución transfiriendo" name="check contrib" tool_tip="Cuando el terreno se transfiere al grupo, el antiguo propietario contribuye con una asignación suficiente de terreno."/>
+			<text length="1" name="For Sale:" type="string">
+				En venta:
+			</text>
+			<text length="1" name="Not for sale." type="string">
+				No está en venta.
+			</text>
+			<text length="1" name="For Sale: Price L$[PRICE]." type="string">
+				Precio: [PRICE] L$
+			</text>
+			<button label="Vender el terreno..." label_selected="Vender el terreno..." name="Sell Land..."/>
+			<text length="1" name="For sale to" type="string">
+				En venta a: [BUYER]
+			</text>
+			<text length="1" name="Sell with landowners objects in parcel." type="string">
+				Los objetos se incluyen en la venta.
+			</text>
+			<text length="1" name="Selling with no objects in parcel." type="string">
+				Los objetos no se incluyen en la venta.
+			</text>
+			<button label="Cancelar la venta del terreno" label_selected="Cancelar la venta del terreno" name="Cancel Land Sale"/>
+			<text length="1" name="Claimed:" type="string">
+				Reclamada:
+			</text>
+			<text length="1" name="DateClaimText" type="string">
+				Mar 15 Ago 15 13:47:25 2006
+			</text>
+			<text length="1" name="PriceLabel" type="string">
+				Superficie:
+			</text>
+			<text length="1" name="PriceText" type="string">
+				4048 m²
+			</text>
+			<text length="1" name="Traffic:" type="string">
+				Tráfico:
+			</text>
+			<text length="1" name="DwellText" type="string">
+				0
+			</text>
+			<button label="Comprar terreno..." label_selected="Comprar terreno..." name="Buy Land..."/>
+			<button label="Comprar para el grupo..." label_selected="Comprar para el grupo..." name="Buy For Group..."/>
+			<button label="Comprar un pase..." label_selected="Comprar un pase..." name="Buy Pass..." tool_tip="Un pase le da acceso temporal a este terreno."/>
+			<button label="Abandonar el terreno..." label_selected="Abandonar el terreno..." name="Abandon Land..."/>
+			<button label="Reclamar el terreno..." label_selected="Reclamar el terreno..." name="Reclaim Land..."/>
+			<button label="Venta Linden..." label_selected="Venta Linden..." name="Linden Sale..." tool_tip="El terreno debe estar en propiedad, con contenido, y no estar en subasta."/>
+			<string name="new users only">
+				Sólo usuarios nuevos
+			</string>
+			<string name="anyone">
+				Cualquiera
+			</string>
+			<string name="area_text">
+				Superficie
+			</string>
+			<string name="area_size_text">
+				[AREA] m²
+			</string>
+			<string name="auction_id_text">
+				ID de la subasta: [ID]
+			</string>
+			<string name="need_tier_to_modify">
+				Debe aprobar su compra para modificar este terreno.
+			</string>
+			<string name="group_owned_text">
+				(Propiedad del grupo)
+			</string>
+			<string name="profile_text">
+				Perfil...
+			</string>
+			<string name="info_text">
+				Información...
+			</string>
+			<string name="public_text">
+				(público)
+			</string>
+			<string name="none_text">
+				(ninguno)
+			</string>
+			<string name="sale_pending_text">
+				(Venta pendiente)
+			</string>
+			<string name="no_selection_text">
+				No se ha seleccionado una parcela.
+Vaya al menú Mundo &gt; Acerca del terreno o seleccione otra parcela para ver sus características.
+			</string>
+		</panel>
+		<panel label="Contrato" name="land_covenant_panel">
+			<text length="1" name="covenant_timestamp_text" type="string">
+				Última modificación, Dic Miér 31 16:00:00 1969
+			</text>
+			<text length="1" name="region_name_lbl" type="string">
+				Región:
+			</text>
+			<text length="1" name="region_name_text" type="string">
+				leyla
+			</text>
+			<text length="1" name="estate_name_lbl" type="string">
+				Estado:
+			</text>
+			<text length="1" name="estate_name_text" type="string">
+				mainland
+			</text>
+			<text length="1" name="estate_owner_lbl" type="string">
+				Propietario del estado:
+			</text>
+			<text length="1" name="estate_owner_text" type="string">
+				(nadie)
+			</text>
+			<text length="1" name="resellable_clause" type="string">
+				El terreno comprado en esta región no se podrá revender.
+			</text>
+			<text length="1" name="changeable_clause" type="string">
+				El terreno comprado en esta región no se podrá unir/dividir.
+			</text>
+			<text_editor length="1" name="covenant_editor" type="string">
+				No se ha aportado un contrato para este estado.
+			</text_editor>
+			<string name="can_resell">
+				El terreno comprado en esta región se podrá revender.
+			</string>
+			<string name="can_not_resell">
+				El terreno comprado en esta región no se podrá revender.
+			</string>
+			<string name="can_change">
+				El terreno comprado en esta región se podrá unir o dividir.
+			</string>
+			<string name="can_not_change">
+				PEl terreno comprado en esta región no se podrá unir o dividir.
+			</string>
+		</panel>
+		<panel label="Objetos" name="land_objects_panel">
+			<text name="parcel_object_bonus">
+				Plus de objetos en la región: [BONUS]
+			</text>
+			<text length="1" name="Simulator primitive usage:" type="string">
+				Simulador de uso de prims:
+			</text>
+			<text name="objects_available">
+				[COUNT] de un máximo de [MAX] ([AVAILABLE] disponibles)
+			</text>
+			<string name="objects_available_text">
+				[COUNT] de un máximo de [MAX] ([AVAILABLE] disponibles)
+			</string>
+			<string name="objects_deleted_text">
+				[COUNT] de un máximo de [MAX] ([DELETED] se borrarán)
+			</string>
+			<text length="1" name="Primitives parcel supports:" type="string">
+				Prims que admite la parcela:
+			</text>
+			<text name="object_contrib_text">
+				[COUNT]
+			</text>
+			<text length="1" name="Primitives on parcel:" type="string">
+				Prims en la parcela:
+			</text>
+			<text name="total_objects_text">
+				[COUNT]
+			</text>
+			<text length="1" name="Owned by parcel owner:" type="string">
+				Del propietario de la parcela:
+			</text>
+			<text name="owner_objects_text">
+				[COUNT]
+			</text>
+			<button label="Mostrar" label_selected="Mostrar" name="ShowOwner"/>
+			<button label="Devolver..." label_selected="Devolver..." name="ReturnOwner..." tool_tip="Devolver los objetos a sus propietarios."/>
+			<text length="1" name="Set to group:" type="string">
+				Del grupo:
+			</text>
+			<text name="group_objects_text">
+				[COUNT]
+			</text>
+			<button label="Mostrar" label_selected="Mostrar" name="ShowGroup"/>
+			<button label="Devolver..." label_selected="Devolver..." name="ReturnGroup..." tool_tip="Devolver los objetos a sus propietarios."/>
+			<text length="1" name="Owned by others:" type="string">
+				Propiedad de otros:
+			</text>
+			<text name="other_objects_text">
+				[COUNT]
+			</text>
+			<button label="Mostrar" label_selected="Mostrar" name="ShowOther"/>
+			<button label="Devolver..." label_selected="Devolver..." name="ReturnOther..." tool_tip="Devolver los objetos a sus propietarios."/>
+			<text length="1" name="Selected / sat upon:" type="string">
+				Seleccionados / con gente sentada:
+			</text>
+			<text name="selected_objects_text">
+				[COUNT]
+			</text>
+			<text name="Autoreturn">
+				Autodevolución de objetos a otros residentes (minutos; 0 la desactiva):
+			</text>
+			<text length="1" name="Object Owners:" type="string">
+				Propietarios de los objetos:
+			</text>
+			<button label="Actualizar la lista" label_selected="Actualizar la lista" name="Refresh List"/>
+			<button label="Devolver los objetos..." label_selected="Devolver los objetos..." name="Return objects..."/>
+			<name_list name="owner list">
+				<column label="Tipo" name="type"/>
+				<column label="Nombre" name="name"/>
+				<column label="Número" name="count"/>
+				<column label="Más recientes" name="mostrecent"/>
+			</name_list>
+		</panel>
+		<panel label="Opciones" name="land_options_panel">
+			<text length="1" name="allow_label" type="string">
+				Permitir a otros residentes:
+			</text>
+			<check_box label="Editar el terreno" name="edit land check" tool_tip="Si se marca, cualquiera podrá modificar su terreno. Mejor dejarlo desmarcado, pues usted siempre puede modificar su terreno."/>
+			<check_box label="Crear hitos" name="check landmark"/>
+			<check_box label="Volar" name="check fly" tool_tip="Si se marca, los residentes podrán volar en su terreno. Si no, sólo podrán volar al cruzarlo o hasta que aterricen en él."/>
+			<text length="1" name="allow_label2" type="string">
+				Crear objetos:
+			</text>
+			<check_box label="Todos los residentes" name="edit objects check"/>
+			<check_box label="El grupo" name="edit group objects check"/>
+			<text length="1" name="allow_label3" type="string">
+				Dejar objetos:
+			</text>
+			<check_box label="Todos los residentes" name="all object entry check"/>
+			<check_box label="El grupo" name="group object entry check"/>
+			<text length="1" name="allow_label4" type="string">
+				Ejecutar scripts:
+			</text>
+			<check_box label="Todos los residentes" name="check other scripts"/>
+			<check_box label="El grupo" name="check group scripts"/>
+			<text length="1" name="land_options_label" type="string">
+				Opciones del terreno:
+			</text>
+			<check_box label="Seguro (sin daño)" name="check safe" tool_tip="Si se marca, convierte el terreno en &apos;seguro&apos;, desactivando el daño en combate. Si no, se activa el daño en combate."/>
+			<check_box label="Sin &apos;empujones&apos;" name="PushRestrictCheck" tool_tip="Previene scripts que empujen. Marcando esta opción prevendrá que en su terreno haya comportamientos destructivos."/>
+			<check_box label="Mostrar la parcela en Buscar (30 L$/semana) en" name="ShowDirectoryCheck" tool_tip="Let people see this parcel in search results"/>
+			<combo_box name="land category">
+				<combo_item name="AnyCategory">
+					Cualquier categoría
+				</combo_item>
+				<combo_item name="LindenLocation">
+					Localización Linden
+				</combo_item>
+
+				<combo_item name="Arts&amp;Culture">
+					Arte y Cultura
+				</combo_item>
+				<combo_item name="Business">
+					Negocios
+				</combo_item>
+				<combo_item name="Educational">
+					Educativo
+				</combo_item>
+				<combo_item name="Gaming">
+					Juegos de azar
+				</combo_item>
+				<combo_item name="Hangout">
+					Entretenimiento
+				</combo_item>
+				<combo_item name="NewcomerFriendly">
+					Para recién llegados
+				</combo_item>
+				<combo_item name="Parks&amp;Nature">
+					Parques y Naturaleza
+				</combo_item>
+				<combo_item name="Residential">
+					Residencial
+				</combo_item>
+				<combo_item name="Shopping">
+					Compras
+				</combo_item>
+				<combo_item name="Other">
+					Otra
+				</combo_item>
+			</combo_box>
+			<button label="?" label_selected="?" name="?"/>
+			<check_box name="MatureCheck" />
+			<text length="1" name="Snapshot:" type="string">
+				Foto:
+			</text>
+			<texture_picker label="" name="snapshot_ctrl" tool_tip="Pulse para elegir una imagen"/>
+			<text name="landing_point">
+				Punto de llegada: [LANDING]
+			</text>
+			<string name="landing_point_none">
+				(ninguno)
+			</string>
+			<button label="Definir" label_selected="Definir" name="Set" tool_tip="Configura el punto de llegada donde aparecerán los visitantes. Configúrelo a la posición de su avatar dentro de esta parcela."/>
+			<button label="Borrar" label_selected="Borrar" name="Clear" tool_tip="Borrar el punto de llegada."/>
+			<text length="1" name="Teleport Routing: " type="string">
+				Punto de teleporte:
+			</text>
+			<combo_box name="landing type" tool_tip="Punto de teleporte: defina cómo manejar en su terreno los teleportes.">
+				<combo_item length="1" name="Blocked" type="string">
+					Bloqueado
+				</combo_item>
+				<combo_item length="1" name="LandingPoint" type="string">
+					Punto de llegada
+				</combo_item>
+				<combo_item length="1" name="Anywhere" type="string">
+					Cualquiera
+				</combo_item>
+			</combo_box>
+			<string name="push_restrict_text">
+				Sin &apos;empujones&apos;
+			</string>
+			<string name="push_restrict_region_text">
+				Sin &apos;empujones&apos; (prevalece lo marcado en la región)
+			</string>
+		</panel>
+		<panel label="Media" name="land_media_panel">
+			<text name="with media:">
+				Tipo de media:
+			</text>
+			<combo_box name="media type" tool_tip="Especifique si la URL es una película, una web, u otro media"/>
+			<text name="at URL:">
+				URL del media:
+			</text>
+			<button label="Definir..." label_selected="Definir..." name="set_media_url"/>
+			<text name="Description:">
+				Descripción:
+			</text>
+			<line_editor name="url_description" tool_tip="Texto a mostrar cerca del botón play/cargar"/>
+			<text length="1" name="Media texture:" type="string">
+				Cambiar
+la textura:
+			</text>
+			<texture_picker label="" name="media texture" tool_tip="Pulse para elegir una imagen"/>
+			<text name="replace_texture_help">
+				(Los objetos que usen esta textura mostrarán la película o la web
+cuando pulse la flecha de play)
+			</text>
+			<text name="Options:">
+				Opciones de
+los media:
+			</text>
+			<check_box label="Escala automática" name="media_auto_scale" tool_tip="Marcando esta opción, se ajustará el tamaño del contenido automáticamente. Puede ser ligeramente más lento y con menor calidad visual, pero no tendrá que ajustar ni alinear ninguna textura."/>
+			<check_box label="Media en bucle" name="media_loop" tool_tip="Ejecuta el media en bucle: cuando acaba su ejecución, vuelve a empezar."/>
+			<check_box label="Ocultar la URL del media" name="hide_media_url" tool_tip="Marcando esta opción esconderá en la información de esta parcela -a quien no esté autorizado a verla- la URL del media. Note que esto no está disponible para HTML."/>
+			<check_box label="Ocultar la URL de la música" name="hide_music_url" tool_tip="Marcando esta opción esconderá en la información de esta parcela -a quien no esté autorizado a verla- la URL de la música"/>
+			<text name="media_size" tool_tip="Tamaño en el que mostrar las web (marque 0 para por defecto).">
+				Tamaño del media:
+			</text>
+			<spinner name="media_size_width" tool_tip="Tamaño en el que mostrar las web (marque 0 para por defecto)."/>
+			<spinner name="media_size_height" tool_tip="Tamaño en el que mostrar las web (marque 0 para por defecto)."/>
+			<text name="pixels">
+				píxeles
+			</text>
+			<text name="MusicURL:">
+				URL de la música:
+			</text>
+			<text name="Sound:">
+				Sonido:
+			</text>
+			<check_box label="Limitar el sonido a sólo esta parcela" name="check sound local"/>
+			<text name="Voice settings:">
+				Voz:
+			</text>
+			<radio_group name="parcel_voice_channel">
+				<radio_item name="Estate">
+					Usar el canal del estado
+				</radio_item>
+				<radio_item name="Private">
+					Usar un canal privado
+				</radio_item>
+				<radio_item name="Disabled">
+					Desactivar el audio ambiental en esta parcela
+				</radio_item>
+			</radio_group>
+		</panel>
+		<panel label="Acceso" name="land_access_panel">
+			<text length="1" name="Limit access to this parcel to:" type="string">
+				Acceso a esta parcela
+			</text>
+			<check_box label="Permitir el acceso público" name="public_access"/>
+			<text name="Only Allow">
+				Impedir el acceso a:
+			</text>
+			<check_box label="Residentes que no hayan dado a Linden Lab información de su forma de pago" name="limit_payment" tool_tip="Impedir el acceso a los residentes no identificados."/>
+			<check_box label="Residentes de los que no se ha verificado si son adultos" name="limit_age_verified" tool_tip="Residentes que no hayan verificado su edad. Para más información, vea  support.secondlife.com"/>
+			<string name="estate_override">
+				Una o más de esta opciones está configurada a nivel del estado
+			</string>
+			<check_box label="Acceso permitido al grupo: [GROUP]" name="GroupCheck" tool_tip="Elija el grupo en la pestaña General."/>
+			<check_box label="Vender pases a:" name="PassCheck" tool_tip="Permitir acceso temporal a esta parcela"/>
+			<combo_box name="pass_combo">
+				<combo_item name="Anyone">
+					Cualquiera
+				</combo_item>
+				<combo_item name="Group">
+					Grupo
+				</combo_item>
+			</combo_box>
+			<spinner label="Precio en L$:" name="PriceSpin"/>
+			<spinner label="Horas de acceso:" name="HoursSpin"/>
+			<text label="Permitir siempre" name="AllowedText">
+				Residentes autorizados
+			</text>
+			<name_list name="AccessList" tool_tip="([LISTED] listados, el máx. es de [MAX])"/>
+			<button label="Añadir..." label_selected="Añadir..." name="add_allowed"/>
+			<button label="Quitar" label_selected="Quitar" name="remove_allowed"/>
+			<text label="Prohibir el acceso" name="BanCheck">
+				Residentes con el acceso prohibido
+			</text>
+			<name_list name="BannedList" tool_tip="([LISTED] listados, el máx. es de [MAX])"/>
+			<button label="Añadir..." label_selected="Añadir..." name="add_banned"/>
+			<button label="Quitar" label_selected="Quitar" name="remove_banned"/>
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_animation_preview.xml b/indra/newview/skins/default/xui/es/floater_animation_preview.xml
index 73522e51c1..a5b9847c4f 100644
--- a/indra/newview/skins/default/xui/es/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/es/floater_animation_preview.xml
@@ -1,164 +1,164 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Animation Preview" title="">
-	<text name="name_label">
-		Nombre:
-	</text>
-	<text name="description_label">
-		Descripción:
-	</text>
-	<spinner label="Prioridad" name="priority" tool_tip="Controle qué otras animaciones pueden ser anuladas por ésta."/>
-	<check_box label="Bucle" name="loop_check" tool_tip="Haga esta animación en bucle."/>
-	<spinner label="Empieza(%)" name="loop_in_point" tool_tip="Indique el punto en el que la animación empieza el bucle."/>
-	<spinner label="Acaba(%)" name="loop_out_point" tool_tip="Indique el punto en el que la animación acaba el bucle."/>
-	<text name="hand_label">
-		Posición de las manos
-	</text>
-	<combo_box label="" name="hand_pose_combo" tool_tip="Control de lo que hacen las manos durante la animación.">
-		<combo_item name="Spread">
-			Extendidas
-		</combo_item>
-		<combo_item name="Relaxed">
-			Relajadas
-		</combo_item>
-		<combo_item name="PointBoth">
-			Ambas señalan
-		</combo_item>
-		<combo_item name="Fist">
-			Puño
-		</combo_item>
-		<combo_item name="RelaxedLeft">
-			La izquierda relajada
-		</combo_item>
-		<combo_item name="PointLeft">
-			La izquierda señala
-		</combo_item>
-		<combo_item name="FistLeft">
-			Puño en la izquierda
-		</combo_item>
-		<combo_item name="RelaxedRight">
-			La derecha relajada
-		</combo_item>
-		<combo_item name="PointRight">
-			La derecha señala
-		</combo_item>
-		<combo_item name="FistRight">
-			Puño en la derecha
-		</combo_item>
-		<combo_item name="SaluteRight">
-			La derecha saluda
-		</combo_item>
-		<combo_item name="Typing">
-			Escribiendo
-		</combo_item>
-		<combo_item name="PeaceRight">
-			Paz en la derecha
-		</combo_item>
-	</combo_box>
-	<text name="emote_label">
-		Expresión
-	</text>
-	<combo_box label="" name="emote_combo" tool_tip="Controle qué hace la cara durante la animación.">
-		<combo_item name="[None]">
-			[Nada]
-		</combo_item>
-		<combo_item name="Aaaaah">
-			Aaaaah
-		</combo_item>
-		<combo_item name="Afraid">
-			Con miedo
-		</combo_item>
-		<combo_item name="Angry">
-			Enfadada
-		</combo_item>
-		<combo_item name="BigSmile">
-			Gran sonrisa
-		</combo_item>
-		<combo_item name="Bored">
-			Aburrida
-		</combo_item>
-		<combo_item name="Cry">
-			Llorar
-		</combo_item>
-		<combo_item name="Disdain">
-			Desdén
-		</combo_item>
-		<combo_item name="Embarrassed">
-			Avergonzada
-		</combo_item>
-		<combo_item name="Frown">
-			Fruncir el ceño
-		</combo_item>
-		<combo_item name="Kiss">
-			Besar
-		</combo_item>
-		<combo_item name="Laugh">
-			Reír
-		</combo_item>
-		<combo_item name="Plllppt">
-			Sacar la lengua
-		</combo_item>
-		<combo_item name="Repulsed">
-			Rechazo
-		</combo_item>
-		<combo_item name="Sad">
-			Triste
-		</combo_item>
-		<combo_item name="Shrug">
-			Encogerse de hombros
-		</combo_item>
-		<combo_item name="Smile">
-			Sonrisa
-		</combo_item>
-		<combo_item name="Surprise">
-			Sorpresa
-		</combo_item>
-		<combo_item name="Wink">
-			Guiño
-		</combo_item>
-		<combo_item name="Worry">
-			Preocupación
-		</combo_item>
-	</combo_box>
-	<text name="preview_label">
-		Vista previa mientras
-	</text>
-	<combo_box label="" name="preview_base_anim" tool_tip="Compruebe cómo se comporta su animación a la vez que el avatar realiza acciones comunes.">
-		<combo_item name="Standing">
-			Estar de pie
-		</combo_item>
-		<combo_item name="Walking">
-			Caminar
-		</combo_item>
-		<combo_item name="Sitting">
-			Estar sentado
-		</combo_item>
-		<combo_item name="Flying">
-			Volar
-		</combo_item>
-	</combo_box>
-	<spinner label="Combinar (sec)" name="ease_in_time" tool_tip="Tiempo (en segundos) en el que se combinan las animaciones."/>
-	<spinner label="Dejar de combinar (sec)" name="ease_out_time" tool_tip="Tiempo (en segundos) en el que dejan de combinarse las animaciones."/>
-	<button label="" name="play_btn" tool_tip="Mover/Pausar su animación."/>
-	<button label="" name="stop_btn" tool_tip="Parar la repetición de la animación"/>
-	<slider label="" name="playback_slider"/>
-	<text name="bad_animation_text">
-		No se ha podido leer el archivo de la animación.
-
-Recomendamos usar archivos BVH exportados de Poser 4.
-	</text>
-	<button label="Cancelar" name="cancel_btn"/>
-	<button label="Subir ([AMOUNT] L$)" name="ok_btn"/>
-	<string name="failed_to_initialize">
-		Fallo al iniciar el movimiento
-	</string>
-	<string name="anim_too_long">
-		El archivo de la animación dura [LENGTH] segundos.
-
-La duración máxima de una animación es de [MAX_LENGTH] segundos.
-	</string>
-	<string name="failed_file_read">
-		No se ha podido leer el archivo de la animación.
-
-[STATUS]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Animation Preview" title="">
+	<text name="name_label">
+		Nombre:
+	</text>
+	<text name="description_label">
+		Descripción:
+	</text>
+	<spinner label="Prioridad" name="priority" tool_tip="Controle qué otras animaciones pueden ser anuladas por ésta."/>
+	<check_box label="Bucle" name="loop_check" tool_tip="Haga esta animación en bucle."/>
+	<spinner label="Empieza(%)" name="loop_in_point" tool_tip="Indique el punto en el que la animación empieza el bucle."/>
+	<spinner label="Acaba(%)" name="loop_out_point" tool_tip="Indique el punto en el que la animación acaba el bucle."/>
+	<text name="hand_label">
+		Posición de las manos
+	</text>
+	<combo_box label="" name="hand_pose_combo" tool_tip="Control de lo que hacen las manos durante la animación.">
+		<combo_item name="Spread">
+			Extendidas
+		</combo_item>
+		<combo_item name="Relaxed">
+			Relajadas
+		</combo_item>
+		<combo_item name="PointBoth">
+			Ambas señalan
+		</combo_item>
+		<combo_item name="Fist">
+			Puño
+		</combo_item>
+		<combo_item name="RelaxedLeft">
+			La izquierda relajada
+		</combo_item>
+		<combo_item name="PointLeft">
+			La izquierda señala
+		</combo_item>
+		<combo_item name="FistLeft">
+			Puño en la izquierda
+		</combo_item>
+		<combo_item name="RelaxedRight">
+			La derecha relajada
+		</combo_item>
+		<combo_item name="PointRight">
+			La derecha señala
+		</combo_item>
+		<combo_item name="FistRight">
+			Puño en la derecha
+		</combo_item>
+		<combo_item name="SaluteRight">
+			La derecha saluda
+		</combo_item>
+		<combo_item name="Typing">
+			Escribiendo
+		</combo_item>
+		<combo_item name="PeaceRight">
+			Paz en la derecha
+		</combo_item>
+	</combo_box>
+	<text name="emote_label">
+		Expresión
+	</text>
+	<combo_box label="" name="emote_combo" tool_tip="Controle qué hace la cara durante la animación.">
+		<combo_item name="[None]">
+			[Nada]
+		</combo_item>
+		<combo_item name="Aaaaah">
+			Aaaaah
+		</combo_item>
+		<combo_item name="Afraid">
+			Con miedo
+		</combo_item>
+		<combo_item name="Angry">
+			Enfadada
+		</combo_item>
+		<combo_item name="BigSmile">
+			Gran sonrisa
+		</combo_item>
+		<combo_item name="Bored">
+			Aburrida
+		</combo_item>
+		<combo_item name="Cry">
+			Llorar
+		</combo_item>
+		<combo_item name="Disdain">
+			Desdén
+		</combo_item>
+		<combo_item name="Embarrassed">
+			Avergonzada
+		</combo_item>
+		<combo_item name="Frown">
+			Fruncir el ceño
+		</combo_item>
+		<combo_item name="Kiss">
+			Besar
+		</combo_item>
+		<combo_item name="Laugh">
+			Reír
+		</combo_item>
+		<combo_item name="Plllppt">
+			Sacar la lengua
+		</combo_item>
+		<combo_item name="Repulsed">
+			Rechazo
+		</combo_item>
+		<combo_item name="Sad">
+			Triste
+		</combo_item>
+		<combo_item name="Shrug">
+			Encogerse de hombros
+		</combo_item>
+		<combo_item name="Smile">
+			Sonrisa
+		</combo_item>
+		<combo_item name="Surprise">
+			Sorpresa
+		</combo_item>
+		<combo_item name="Wink">
+			Guiño
+		</combo_item>
+		<combo_item name="Worry">
+			Preocupación
+		</combo_item>
+	</combo_box>
+	<text name="preview_label">
+		Vista previa mientras
+	</text>
+	<combo_box label="" name="preview_base_anim" tool_tip="Compruebe cómo se comporta su animación a la vez que el avatar realiza acciones comunes.">
+		<combo_item name="Standing">
+			Estar de pie
+		</combo_item>
+		<combo_item name="Walking">
+			Caminar
+		</combo_item>
+		<combo_item name="Sitting">
+			Estar sentado
+		</combo_item>
+		<combo_item name="Flying">
+			Volar
+		</combo_item>
+	</combo_box>
+	<spinner label="Combinar (sec)" name="ease_in_time" tool_tip="Tiempo (en segundos) en el que se combinan las animaciones."/>
+	<spinner label="Dejar de combinar (sec)" name="ease_out_time" tool_tip="Tiempo (en segundos) en el que dejan de combinarse las animaciones."/>
+	<button label="" name="play_btn" tool_tip="Mover/Pausar su animación."/>
+	<button label="" name="stop_btn" tool_tip="Parar la repetición de la animación"/>
+	<slider label="" name="playback_slider"/>
+	<text name="bad_animation_text">
+		No se ha podido leer el archivo de la animación.
+
+Recomendamos usar archivos BVH exportados de Poser 4.
+	</text>
+	<button label="Cancelar" name="cancel_btn"/>
+	<button label="Subir ([AMOUNT] L$)" name="ok_btn"/>
+	<string name="failed_to_initialize">
+		Fallo al iniciar el movimiento
+	</string>
+	<string name="anim_too_long">
+		El archivo de la animación dura [LENGTH] segundos.
+
+La duración máxima de una animación es de [MAX_LENGTH] segundos.
+	</string>
+	<string name="failed_file_read">
+		No se ha podido leer el archivo de la animación.
+
+[STATUS]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_auction.xml b/indra/newview/skins/default/xui/es/floater_auction.xml
index 1fcba4a3e3..c6d89891bc 100644
--- a/indra/newview/skins/default/xui/es/floater_auction.xml
+++ b/indra/newview/skins/default/xui/es/floater_auction.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_auction" title="Empezar venta de terreno Linden">
-	<check_box label="Incluir la valla amarilla de selección" name="fence_check"/>
-	<button label="Foto" label_selected="Foto" name="snapshot_btn"/>
-	<button label="OK" label_selected="OK" name="ok_btn"/>
-	<text name="already for sale">
-		No puede subastar parcelas que ya están en venta.
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_auction" title="Empezar venta de terreno Linden">
+	<check_box label="Incluir la valla amarilla de selección" name="fence_check"/>
+	<button label="Foto" label_selected="Foto" name="snapshot_btn"/>
+	<button label="OK" label_selected="OK" name="ok_btn"/>
+	<text name="already for sale">
+		No puede subastar parcelas que ya están en venta.
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_avatar_picker.xml b/indra/newview/skins/default/xui/es/floater_avatar_picker.xml
index e5291c6e5e..a75243cb38 100644
--- a/indra/newview/skins/default/xui/es/floater_avatar_picker.xml
+++ b/indra/newview/skins/default/xui/es/floater_avatar_picker.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="avatarpicker" title="Elegir a un residente">
-	<text name="instruct_search_resident_name">
-		Escriba parte del nombre del residente:
-	</text>
-	<button label="Encontrar" label_selected="Encontrar" name="Find"/>
-	<text name="Or select their calling card:">
-		O elija una tarjeta de visita:
-	</text>
-	<button label="Cerrar" label_selected="Cerrar" name="Close"/>
-	<button label="Elegir" label_selected="Elegir" name="Select"/>
-	<string name="NotFound">
-		No se ha encontrado &apos;[TEXT]&apos;
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="avatarpicker" title="Elegir a un residente">
+	<text name="instruct_search_resident_name">
+		Escriba parte del nombre del residente:
+	</text>
+	<button label="Encontrar" label_selected="Encontrar" name="Find"/>
+	<text name="Or select their calling card:">
+		O elija una tarjeta de visita:
+	</text>
+	<button label="Cerrar" label_selected="Cerrar" name="Close"/>
+	<button label="Elegir" label_selected="Elegir" name="Select"/>
+	<string name="NotFound">
+		No se ha encontrado &apos;[TEXT]&apos;
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_avatar_textures.xml b/indra/newview/skins/default/xui/es/floater_avatar_textures.xml
index b79fd4ba4c..6344768c7f 100644
--- a/indra/newview/skins/default/xui/es/floater_avatar_textures.xml
+++ b/indra/newview/skins/default/xui/es/floater_avatar_textures.xml
@@ -1,30 +1,30 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="avatar_texture_debug" title="Texturas del avatar">
-	<text name="baked_label">
-		Texturas predeterminadas
-	</text>
-	<text name="composite_label">
-		Texturas compuestas
-	</text>
-	<texture_picker label="Cabeza" name="baked_head"/>
-	<texture_picker label="Maquillaje" name="head_bodypaint"/>
-	<texture_picker label="Pelo" name="hair"/>
-	<button label="Soltar" label_selected="Soltar" name="Dump"/>
-	<texture_picker label="Ojos" name="baked_eyes"/>
-	<texture_picker label="Ojo" name="eye_texture"/>
-	<texture_picker label="Parte superior del cuerpo" name="baked_upper_body"/>
-	<texture_picker label="Tatuaje de la parte superior del cuerpo" name="upper_bodypaint"/>
-	<texture_picker label="Camiseta" name="undershirt"/>
-	<texture_picker label="Guantes" name="gloves"/>
-	<texture_picker label="Camisa" name="shirt"/>
-	<texture_picker label="Parte superior de la chaqueta" name="upper_jacket"/>
-	<texture_picker label="Parte inferior del cuerpo" name="baked_lower_body"/>
-	<texture_picker label="Tatuaje de la parte inferior del cuerpo" name="lower_bodypaint"/>
-	<texture_picker label="Ropa interior" name="underpants"/>
-	<texture_picker label="Calcetines" name="socks"/>
-	<texture_picker label="Zapatos" name="shoes"/>
-	<texture_picker label="Pantalones" name="pants"/>
-	<texture_picker label="Chaqueta" name="jacket"/>
-	<texture_picker label="Falda" name="baked_skirt"/>
-	<texture_picker label="Falda" name="skirt_texture"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="avatar_texture_debug" title="Texturas del avatar">
+	<text name="baked_label">
+		Texturas predeterminadas
+	</text>
+	<text name="composite_label">
+		Texturas compuestas
+	</text>
+	<texture_picker label="Cabeza" name="baked_head"/>
+	<texture_picker label="Maquillaje" name="head_bodypaint"/>
+	<texture_picker label="Pelo" name="hair"/>
+	<button label="Soltar" label_selected="Soltar" name="Dump"/>
+	<texture_picker label="Ojos" name="baked_eyes"/>
+	<texture_picker label="Ojo" name="eye_texture"/>
+	<texture_picker label="Parte superior del cuerpo" name="baked_upper_body"/>
+	<texture_picker label="Tatuaje de la parte superior del cuerpo" name="upper_bodypaint"/>
+	<texture_picker label="Camiseta" name="undershirt"/>
+	<texture_picker label="Guantes" name="gloves"/>
+	<texture_picker label="Camisa" name="shirt"/>
+	<texture_picker label="Parte superior de la chaqueta" name="upper_jacket"/>
+	<texture_picker label="Parte inferior del cuerpo" name="baked_lower_body"/>
+	<texture_picker label="Tatuaje de la parte inferior del cuerpo" name="lower_bodypaint"/>
+	<texture_picker label="Ropa interior" name="underpants"/>
+	<texture_picker label="Calcetines" name="socks"/>
+	<texture_picker label="Zapatos" name="shoes"/>
+	<texture_picker label="Pantalones" name="pants"/>
+	<texture_picker label="Chaqueta" name="jacket"/>
+	<texture_picker label="Falda" name="baked_skirt"/>
+	<texture_picker label="Falda" name="skirt_texture"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_build_options.xml b/indra/newview/skins/default/xui/es/floater_build_options.xml
index 313fcab38f..bbb5b0e36d 100644
--- a/indra/newview/skins/default/xui/es/floater_build_options.xml
+++ b/indra/newview/skins/default/xui/es/floater_build_options.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="build options floater" title="Opciones de la cuadrícula">
-	<spinner label="Unidad de la cuadrícula (metros)" name="GridResolution"/>
-	<spinner label="Graduación de la cuadrícula (metros)" name="GridDrawSize"/>
-	<check_box label="Activar subunidades" name="GridSubUnit"/>
-	<check_box label="Ver la sección transversal" name="GridCrossSection"/>
-	<slider label="Opacidad de la cuadrícula" name="GridOpacity"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="build options floater" title="Opciones de la cuadrícula">
+	<spinner label="Unidad de la cuadrícula (metros)" name="GridResolution"/>
+	<spinner label="Graduación de la cuadrícula (metros)" name="GridDrawSize"/>
+	<check_box label="Activar subunidades" name="GridSubUnit"/>
+	<check_box label="Ver la sección transversal" name="GridCrossSection"/>
+	<slider label="Opacidad de la cuadrícula" name="GridOpacity"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_bumps.xml b/indra/newview/skins/default/xui/es/floater_bumps.xml
index dce3b457a4..ed43e93688 100644
--- a/indra/newview/skins/default/xui/es/floater_bumps.xml
+++ b/indra/newview/skins/default/xui/es/floater_bumps.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_bumps" title="Choques, empujones, e impactos">
-	<text name="none_detected">
-		No se han detectado
-	</text>
-	<text name="bump">
-		[TIME]  [FIRST] [LAST] ha chocado con usted
-	</text>
-	<text name="llpushobject">
-		[TIME]  [FIRST] [LAST] le ha empujado con un script
-	</text>
-	<text name="selected_object_collide">
-		[TIME]  [FIRST] [LAST] ha hecho que un objeto impacte con usted
-	</text>
-	<text name="scripted_object_collide">
-		[TIME]  [FIRST] [LAST] ha hecho que un objeto con script impacte con usted
-	</text>
-	<text name="physical_object_collide">
-		[TIME]  [FIRST] [LAST] ha hecho que un objeto material impacte con usted
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_bumps" title="Choques, empujones, e impactos">
+	<text name="none_detected">
+		No se han detectado
+	</text>
+	<text name="bump">
+		[TIME]  [FIRST] [LAST] ha chocado con usted
+	</text>
+	<text name="llpushobject">
+		[TIME]  [FIRST] [LAST] le ha empujado con un script
+	</text>
+	<text name="selected_object_collide">
+		[TIME]  [FIRST] [LAST] ha hecho que un objeto impacte con usted
+	</text>
+	<text name="scripted_object_collide">
+		[TIME]  [FIRST] [LAST] ha hecho que un objeto con script impacte con usted
+	</text>
+	<text name="physical_object_collide">
+		[TIME]  [FIRST] [LAST] ha hecho que un objeto material impacte con usted
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_buy_contents.xml b/indra/newview/skins/default/xui/es/floater_buy_contents.xml
index 24a3eb431d..e93b8bce2d 100644
--- a/indra/newview/skins/default/xui/es/floater_buy_contents.xml
+++ b/indra/newview/skins/default/xui/es/floater_buy_contents.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_buy_contents" title="Comprar el contenido">
-	<text name="contains_text">
-		[NAME] contiene:
-	</text>
-	<text name="buy_text">
-		¿Comprar por [AMOUNT] L$ a [NAME]?
-	</text>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
-	<button label="Comprar" label_selected="Comprar" name="buy_btn"/>
-	<check_box label="Vestirse ahora la ropa" name="wear_check"/>
-	<string name="no_copy_text">
-		(no copiable)
-	</string>
-	<string name="no_modify_text">
-		(no modificable)
-	</string>
-	<string name="no_transfer_text">
-		(no transferible)
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_buy_contents" title="Comprar el contenido">
+	<text name="contains_text">
+		[NAME] contiene:
+	</text>
+	<text name="buy_text">
+		¿Comprar por [AMOUNT] L$ a [NAME]?
+	</text>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
+	<button label="Comprar" label_selected="Comprar" name="buy_btn"/>
+	<check_box label="Vestirse ahora la ropa" name="wear_check"/>
+	<string name="no_copy_text">
+		(no copiable)
+	</string>
+	<string name="no_modify_text">
+		(no modificable)
+	</string>
+	<string name="no_transfer_text">
+		(no transferible)
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_buy_currency.xml b/indra/newview/skins/default/xui/es/floater_buy_currency.xml
index 5b37713d4c..03a6d511ab 100644
--- a/indra/newview/skins/default/xui/es/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/es/floater_buy_currency.xml
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="buy currency" title="Comprar dinero">
-	<text name="info_buying">
-		Comprando dinero:
-	</text>
-	<text name="info_cannot_buy">
-		No puede comprar en este momento:
-	</text>
-	<text name="info_need_more">
-		Necesita más dinero:
-	</text>
-	<text name="error_message">
-		Algo no va bien.
-	</text>
-	<button label="Ir al sitio web" name="error_web"/>
-	<text name="contacting">
-		Contactando con el LindeX...
-	</text>
-	<text name="buy_action_unknown">
-		Comprar L$ en el sistema LindeX de cambio de moneda
-	</text>
-	<text name="buy_action">
-		[NAME] [PRICE] L$
-	</text>
-	<text name="currency_action">
-		Comprar L$
-	</text>
-	<line_editor name="currency_amt">
-		1234
-	</line_editor>
-	<text name="currency_est">
-		por, aprox., [USD] US$
-	</text>
-	<text name="getting_data">
-		Obteniendo los datos...
-	</text>
-	<text name="balance_label">
-		Actualmente, tiene
-	</text>
-	<text name="balance_amount">
-		[AMT] L$
-	</text>
-	<text name="buying_label">
-		Está comprando
-	</text>
-	<text name="buying_amount">
-		[AMT] L$
-	</text>
-	<text name="total_label">
-		Su saldo será de
-	</text>
-	<text name="total_amount">
-		[AMT] L$
-	</text>
-	<text name="purchase_warning_repurchase">
-		Confirmando esta compra sólo compra la moneda.
-Tendrá que intentar de nuevo la operación.
-	</text>
-	<text name="purchase_warning_notenough">
-		No está comprando dinero suficiente.
-Aumente la cantidad a comprar.
-	</text>
-	<button label="Cancelar" name="cancel_btn"/>
-	<button label="Comprar" name="buy_btn"/>
-	<string name="buy_currency">
-		Comprar L$ [LINDENS] por, aprox., [USD] U$D
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="buy currency" title="Comprar dinero">
+	<text name="info_buying">
+		Comprando dinero:
+	</text>
+	<text name="info_cannot_buy">
+		No puede comprar en este momento:
+	</text>
+	<text name="info_need_more">
+		Necesita más dinero:
+	</text>
+	<text name="error_message">
+		Algo no va bien.
+	</text>
+	<button label="Ir al sitio web" name="error_web"/>
+	<text name="contacting">
+		Contactando con el LindeX...
+	</text>
+	<text name="buy_action_unknown">
+		Comprar L$ en el sistema LindeX de cambio de moneda
+	</text>
+	<text name="buy_action">
+		[NAME] [PRICE] L$
+	</text>
+	<text name="currency_action">
+		Comprar L$
+	</text>
+	<line_editor name="currency_amt">
+		1234
+	</line_editor>
+	<text name="currency_est">
+		por, aprox., [USD] US$
+	</text>
+	<text name="getting_data">
+		Obteniendo los datos...
+	</text>
+	<text name="balance_label">
+		Actualmente, tiene
+	</text>
+	<text name="balance_amount">
+		[AMT] L$
+	</text>
+	<text name="buying_label">
+		Está comprando
+	</text>
+	<text name="buying_amount">
+		[AMT] L$
+	</text>
+	<text name="total_label">
+		Su saldo será de
+	</text>
+	<text name="total_amount">
+		[AMT] L$
+	</text>
+	<text name="purchase_warning_repurchase">
+		Confirmando esta compra sólo compra la moneda.
+Tendrá que intentar de nuevo la operación.
+	</text>
+	<text name="purchase_warning_notenough">
+		No está comprando dinero suficiente.
+Aumente la cantidad a comprar.
+	</text>
+	<button label="Cancelar" name="cancel_btn"/>
+	<button label="Comprar" name="buy_btn"/>
+	<string name="buy_currency">
+		Comprar L$ [LINDENS] por, aprox., [USD] U$D
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_buy_land.xml b/indra/newview/skins/default/xui/es/floater_buy_land.xml
index 16d1ac8de0..c5286b1d14 100644
--- a/indra/newview/skins/default/xui/es/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/es/floater_buy_land.xml
@@ -1,228 +1,228 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="buy land" title="Comprar terreno">
-	<text name="region_name_label">
-		Región:
-	</text>
-	<text name="region_name_text">
-		(desconocida)
-	</text>
-	<text name="estate_name_label">
-		Estado:
-	</text>
-	<text name="estate_name_text">
-		(desconocido)
-	</text>
-	<text name="estate_owner_label">
-		Propietario del estado:
-	</text>
-	<text name="estate_owner_text">
-		(desconocido)
-	</text>
-	<text name="resellable_changeable_label">
-		El terreno comprado en esta región:
-	</text>
-	<text name="resellable_clause">
-		El terreno comprado en esta región puede o no puede ser revendido.
-	</text>
-	<text name="changeable_clause">
-		puede o no puede ser unido o subdividido.
-	</text>
-	<text name="covenant_text">
-		Deve aceptar el Contrato del Estado:
-	</text>
-	<text_editor name="covenant_editor">
-		Cargando...
-	</text_editor>
-	<check_box label="Estoy de acuerdo con el contrato descrito arriba." name="agree_covenant"/>
-	<text name="info_parcel_label">
-		Parcela:
-	</text>
-	<text name="info_parcel">
-		Scotopteryx 138,204
-	</text>
-	<text name="info_size_label">
-		Tamaño:
-	</text>
-	<text name="info_size">
-		1024 m²
-	</text>
-	<text name="info_price_label">
-		Precio:
-	</text>
-	<text name="info_price">
-		1500 L$, objetos incluidos
-	</text>
-	<text name="info_action">
-		Al comprar este terreno:
-	</text>
-	<text name="error_message">
-		Algo no está bien.
-	</text>
-	<button label="Ir al sitio web" name="error_web"/>
-	<text name="account_action">
-		Ascienda a la categoría de miembro premium.
-	</text>
-	<text name="account_reason">
-		Sólo pueden ser propietarios de terreno los miembros premium.
-	</text>
-	<combo_box name="account_level">
-		<combo_item name="US$9.95/month,billedmonthly">
-			9.95 US$/mes, facturados mensualmente
-		</combo_item>
-		<combo_item name="US$7.50/month,billedquarterly">
-			7.50 US$/mes, facturados cuatrimestralmente
-		</combo_item>
-		<combo_item name="US$6.00/month,billedannually">
-			6.00 US$/mes, facturados anualmente
-		</combo_item>
-	</combo_box>
-	<text name="land_use_action">
-		Aumenta su cuota mensual por uso de terreno a 40 US$/mes.
-	</text>
-	<text name="land_use_reason">
-		Usted es propietario de 1.309 m² de terreno. 
-Esta parcela tiene 512 m² de terreno.
-	</text>
-	<text name="purchase_action">
-		Pagar al residente Joe 4.000 L$ por el terreno
-	</text>
-	<text name="currency_reason">
-		Tiene 2.100 L$.
-	</text>
-	<text name="currency_action">
-		Comprar más L$
-	</text>
-	<line_editor name="currency_amt">
-		1.000
-	</line_editor>
-	<text name="currency_est">
-		por, aprox., [AMOUNT2] US$
-	</text>
-	<text name="currency_balance">
-		Tiene 2.100 L$.
-	</text>
-	<check_box label="Quitar [AMOUNT] m² de la contribución del grupo." name="remove_contribution"/>
-	<button label="Comprar" name="buy_btn"/>
-	<button label="Cancelar" name="cancel_btn"/>
-	<string name="can_resell">
-		Puede revenderse.
-	</string>
-	<string name="can_not_resell">
-		No se puede revender.
-	</string>
-	<string name="can_change">
-		Puede unirse o dividirse.
-	</string>
-	<string name="can_not_change">
-		No puede unirse ni dividirse.
-	</string>
-	<string name="cant_buy_for_group">
-		No tiene permiso de comprar terreno para el grupo que tiene activado.
-	</string>
-	<string name="no_land_selected">
-		No se ha seleccionado terreno.
-	</string>
-	<string name="multiple_parcels_selected">
-		Se han seleccionado varias parcelas diferentes. 
-Inténtelo seleccionando un área más pequeña.
-	</string>
-	<string name="no_permission">
-		No tiene permiso de comprar terreno para el grupo que tiene activado.
-	</string>
-	<string name="parcel_not_for_sale">
-		La parcela seleccionada no está en venta.
-	</string>
-	<string name="group_already_owns">
-		El grupo ya es propietario de la parcela.
-	</string>
-	<string name="you_already_own">
-		Usted ya es propietario de la parcela.
-	</string>
-	<string name="set_to_sell_to_other">
-		La parcela seleccionada está marcada para ser vendida a otro
-	</string>
-	<string name="no_public_land">
-		El área seleccionada no tiene terreno público.
-	</string>
-	<string name="not_owned_by_you">
-		Se ha seleccionado terreno propiedad de otro. 
-Inténtelo seleccionando un área más pequeña.
-	</string>
-	<string name="processing">
-		Procesando su compra...
- 
-(Llevará uno o dos minutos).
-	</string>
-	<string name="fetching_error">
-		Se ha producido un error al ir a buscar la información de compra de terreno.
-	</string>
-	<string name="buying_will">
-		Al comprar este terreno:
-	</string>
-	<string name="buying_for_group">
-		Comprando terreno para el grupo:
-	</string>
-	<string name="cannot_buy_now">
-		No se puede comprar ahora:
-	</string>
-	<string name="not_for_sale">
-		No está en venta:
-	</string>
-	<string name="none_needed">
-		no necesita
-	</string>
-	<string name="must_upgrade">
-		Para poseer terreno, su cuenta debe ascender de categoría.
-	</string>
-	<string name="cant_own_land">
-		Su cuenta puede poseer terreno.
-	</string>
-	<string name="land_holdings">
-		Usted tiene [BUYER] m² de terreno.
-	</string>
-	<string name="pay_to_for_land">
-		Pagar por este terreno [AMOUNT] L$ a [SELLER]
-	</string>
-	<string name="buy_for_US">
-		Comprar [AMOUNT] L$ por, aprox., [AMOUNT2] US$ ,
-	</string>
-	<string name="parcel_meters">
-		Esta parcela tiene [AMOUNT] m².
-	</string>
-	<string name="premium_land">
-		Este terreno es premium, y se contará como de [AMOUNT] m².
-	</string>
-	<string name="discounted_land">
-		Este terreno tiene descuento, y se contará como de [AMOUNT] m².
-	</string>
-	<string name="meters_supports_object">
-		[AMOUNT] m²
-admite [AMOUNT2] objetos
-	</string>
-	<string name="sold_with_objects">
-		vendido con los objetos
-	</string>
-	<string name="insufficient_land_credits">
-		Antes de que se complete la compra, el grupo [GROUP] necesitará
-los suficientes créditos de uso en contribución de terreno
-para cubrir esta parcela.
-	</string>
-	<string name="have_enough_lindens">
-		Tiene [AMOUNT] L$, cantidad suficiente para comprar este terreno.
-	</string>
-	<string name="not_enough_lindens">
-		Sólo tiene [AMOUNT] L$. Necesitaría [AMOUNT2] L$ más.
-	</string>
-	<string name="balance_left">
-		Tras la compra, aún tendrá [AMOUNT] L$.
-	</string>
-	<string name="balance_needed">
-		Para costearse este terreno, deberá comprar, al menos, [AMOUNT] L$.
-	</string>
-	<string name="no_parcel_selected">
-		(No se ha seleccionado una parcela)
-	</string>
-	<string name="buy_currency">
-		Comprar [LINDENS] L$ por, aprox., [USD] US$
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="buy land" title="Comprar terreno">
+	<text name="region_name_label">
+		Región:
+	</text>
+	<text name="region_name_text">
+		(desconocida)
+	</text>
+	<text name="estate_name_label">
+		Estado:
+	</text>
+	<text name="estate_name_text">
+		(desconocido)
+	</text>
+	<text name="estate_owner_label">
+		Propietario del estado:
+	</text>
+	<text name="estate_owner_text">
+		(desconocido)
+	</text>
+	<text name="resellable_changeable_label">
+		El terreno comprado en esta región:
+	</text>
+	<text name="resellable_clause">
+		El terreno comprado en esta región puede o no puede ser revendido.
+	</text>
+	<text name="changeable_clause">
+		puede o no puede ser unido o subdividido.
+	</text>
+	<text name="covenant_text">
+		Deve aceptar el Contrato del Estado:
+	</text>
+	<text_editor name="covenant_editor">
+		Cargando...
+	</text_editor>
+	<check_box label="Estoy de acuerdo con el contrato descrito arriba." name="agree_covenant"/>
+	<text name="info_parcel_label">
+		Parcela:
+	</text>
+	<text name="info_parcel">
+		Scotopteryx 138,204
+	</text>
+	<text name="info_size_label">
+		Tamaño:
+	</text>
+	<text name="info_size">
+		1024 m²
+	</text>
+	<text name="info_price_label">
+		Precio:
+	</text>
+	<text name="info_price">
+		1500 L$, objetos incluidos
+	</text>
+	<text name="info_action">
+		Al comprar este terreno:
+	</text>
+	<text name="error_message">
+		Algo no está bien.
+	</text>
+	<button label="Ir al sitio web" name="error_web"/>
+	<text name="account_action">
+		Ascienda a la categoría de miembro premium.
+	</text>
+	<text name="account_reason">
+		Sólo pueden ser propietarios de terreno los miembros premium.
+	</text>
+	<combo_box name="account_level">
+		<combo_box.item name="US$9.95/month,billedmonthly">
+			9.95 US$/mes, facturados mensualmente
+		</combo_box.item>
+		<combo_box.item name="US$7.50/month,billedquarterly">
+			7.50 US$/mes, facturados cuatrimestralmente
+		</combo_box.item>
+		<combo_box.item name="US$6.00/month,billedannually">
+			6.00 US$/mes, facturados anualmente
+		</combo_box.item>
+	</combo_box>
+	<text name="land_use_action">
+		Aumenta su cuota mensual por uso de terreno a 40 US$/mes.
+	</text>
+	<text name="land_use_reason">
+		Usted es propietario de 1.309 m² de terreno. 
+Esta parcela tiene 512 m² de terreno.
+	</text>
+	<text name="purchase_action">
+		Pagar al residente Joe 4.000 L$ por el terreno
+	</text>
+	<text name="currency_reason">
+		Tiene 2.100 L$.
+	</text>
+	<text name="currency_action">
+		Comprar más L$
+	</text>
+	<line_editor name="currency_amt">
+		1.000
+	</line_editor>
+	<text name="currency_est">
+		por, aprox., [AMOUNT2] US$
+	</text>
+	<text name="currency_balance">
+		Tiene 2.100 L$.
+	</text>
+	<check_box label="Quitar [AMOUNT] m² de la contribución del grupo." name="remove_contribution"/>
+	<button label="Comprar" name="buy_btn"/>
+	<button label="Cancelar" name="cancel_btn"/>
+	<string name="can_resell">
+		Puede revenderse.
+	</string>
+	<string name="can_not_resell">
+		No se puede revender.
+	</string>
+	<string name="can_change">
+		Puede unirse o dividirse.
+	</string>
+	<string name="can_not_change">
+		No puede unirse ni dividirse.
+	</string>
+	<string name="cant_buy_for_group">
+		No tiene permiso de comprar terreno para el grupo que tiene activado.
+	</string>
+	<string name="no_land_selected">
+		No se ha seleccionado terreno.
+	</string>
+	<string name="multiple_parcels_selected">
+		Se han seleccionado varias parcelas diferentes. 
+Inténtelo seleccionando un área más pequeña.
+	</string>
+	<string name="no_permission">
+		No tiene permiso de comprar terreno para el grupo que tiene activado.
+	</string>
+	<string name="parcel_not_for_sale">
+		La parcela seleccionada no está en venta.
+	</string>
+	<string name="group_already_owns">
+		El grupo ya es propietario de la parcela.
+	</string>
+	<string name="you_already_own">
+		Usted ya es propietario de la parcela.
+	</string>
+	<string name="set_to_sell_to_other">
+		La parcela seleccionada está marcada para ser vendida a otro
+	</string>
+	<string name="no_public_land">
+		El área seleccionada no tiene terreno público.
+	</string>
+	<string name="not_owned_by_you">
+		Se ha seleccionado terreno propiedad de otro. 
+Inténtelo seleccionando un área más pequeña.
+	</string>
+	<string name="processing">
+		Procesando su compra...
+ 
+(Llevará uno o dos minutos).
+	</string>
+	<string name="fetching_error">
+		Se ha producido un error al ir a buscar la información de compra de terreno.
+	</string>
+	<string name="buying_will">
+		Al comprar este terreno:
+	</string>
+	<string name="buying_for_group">
+		Comprando terreno para el grupo:
+	</string>
+	<string name="cannot_buy_now">
+		No se puede comprar ahora:
+	</string>
+	<string name="not_for_sale">
+		No está en venta:
+	</string>
+	<string name="none_needed">
+		no necesita
+	</string>
+	<string name="must_upgrade">
+		Para poseer terreno, su cuenta debe ascender de categoría.
+	</string>
+	<string name="cant_own_land">
+		Su cuenta puede poseer terreno.
+	</string>
+	<string name="land_holdings">
+		Usted tiene [BUYER] m² de terreno.
+	</string>
+	<string name="pay_to_for_land">
+		Pagar por este terreno [AMOUNT] L$ a [SELLER]
+	</string>
+	<string name="buy_for_US">
+		Comprar [AMOUNT] L$ por, aprox., [AMOUNT2] US$ ,
+	</string>
+	<string name="parcel_meters">
+		Esta parcela tiene [AMOUNT] m².
+	</string>
+	<string name="premium_land">
+		Este terreno es premium, y se contará como de [AMOUNT] m².
+	</string>
+	<string name="discounted_land">
+		Este terreno tiene descuento, y se contará como de [AMOUNT] m².
+	</string>
+	<string name="meters_supports_object">
+		[AMOUNT] m²
+admite [AMOUNT2] objetos
+	</string>
+	<string name="sold_with_objects">
+		vendido con los objetos
+	</string>
+	<string name="insufficient_land_credits">
+		Antes de que se complete la compra, el grupo [GROUP] necesitará
+los suficientes créditos de uso en contribución de terreno
+para cubrir esta parcela.
+	</string>
+	<string name="have_enough_lindens">
+		Tiene [AMOUNT] L$, cantidad suficiente para comprar este terreno.
+	</string>
+	<string name="not_enough_lindens">
+		Sólo tiene [AMOUNT] L$. Necesitaría [AMOUNT2] L$ más.
+	</string>
+	<string name="balance_left">
+		Tras la compra, aún tendrá [AMOUNT] L$.
+	</string>
+	<string name="balance_needed">
+		Para costearse este terreno, deberá comprar, al menos, [AMOUNT] L$.
+	</string>
+	<string name="no_parcel_selected">
+		(No se ha seleccionado una parcela)
+	</string>
+	<string name="buy_currency">
+		Comprar [LINDENS] L$ por, aprox., [USD] US$
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_buy_object.xml b/indra/newview/skins/default/xui/es/floater_buy_object.xml
index f37fa546ea..8e713f362b 100644
--- a/indra/newview/skins/default/xui/es/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/es/floater_buy_object.xml
@@ -1,26 +1,26 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="contents" title="Comprar una copia del objeto">
-	<text name="contents_text">
-		y sus contenidos:
-	</text>
-	<text name="buy_text">
-		¿Comprarlo por [AMOUNT] L$ a [NAME]?
-	</text>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
-	<button label="Comprar" label_selected="Comprar" name="buy_btn"/>
-	<string name="title_buy_text">
-		Comprar
-	</string>
-	<string name="title_buy_copy_text">
-		Comprar una copia de
-	</string>
-	<string name="no_copy_text">
-		(no copiable)
-	</string>
-	<string name="no_modify_text">
-		(no modificable)
-	</string>
-	<string name="no_transfer_text">
-		(no transferible)
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="contents" title="Comprar una copia del objeto">
+	<text name="contents_text">
+		y sus contenidos:
+	</text>
+	<text name="buy_text">
+		¿Comprarlo por [AMOUNT] L$ a [NAME]?
+	</text>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
+	<button label="Comprar" label_selected="Comprar" name="buy_btn"/>
+	<string name="title_buy_text">
+		Comprar
+	</string>
+	<string name="title_buy_copy_text">
+		Comprar una copia de
+	</string>
+	<string name="no_copy_text">
+		(no copiable)
+	</string>
+	<string name="no_modify_text">
+		(no modificable)
+	</string>
+	<string name="no_transfer_text">
+		(no transferible)
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_choose_group.xml b/indra/newview/skins/default/xui/es/floater_choose_group.xml
index c3238638d1..71331abb65 100644
--- a/indra/newview/skins/default/xui/es/floater_choose_group.xml
+++ b/indra/newview/skins/default/xui/es/floater_choose_group.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="groups" title="Grupos">
-	<text name="groupdesc">
-		Elegir un grupo:
-	</text>
-	<button label="OK" label_selected="OK" name="OK"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="groups" title="Grupos">
+	<text name="groupdesc">
+		Elegir un grupo:
+	</text>
+	<button label="OK" label_selected="OK" name="OK"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_color_picker.xml b/indra/newview/skins/default/xui/es/floater_color_picker.xml
index f9ba1c1219..238853c58d 100644
--- a/indra/newview/skins/default/xui/es/floater_color_picker.xml
+++ b/indra/newview/skins/default/xui/es/floater_color_picker.xml
@@ -1,30 +1,30 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="ColorPicker" title="Paleta de colores">
-	<text name="r_val_text">
-		Rojo:
-	</text>
-	<text name="g_val_text">
-		Verde:
-	</text>
-	<text name="b_val_text">
-		Azul:
-	</text>
-	<text name="h_val_text">
-		Tono:
-	</text>
-	<text name="s_val_text">
-		Sat.:
-	</text>
-	<text name="l_val_text">
-		Lumin.:
-	</text>
-	<check_box label="Aplicar ahora mismo" name="apply_immediate"/>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
-	<button label="Elegir" label_selected="Elegir" name="select_btn"/>
-	<text name="Current color:">
-		Color actual:
-	</text>
-	<text name="(Drag below to save.)">
-		(Arrástrelo abajo para guardarlo)
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="ColorPicker" title="Paleta de colores">
+	<text name="r_val_text">
+		Rojo:
+	</text>
+	<text name="g_val_text">
+		Verde:
+	</text>
+	<text name="b_val_text">
+		Azul:
+	</text>
+	<text name="h_val_text">
+		Tono:
+	</text>
+	<text name="s_val_text">
+		Sat.:
+	</text>
+	<text name="l_val_text">
+		Lumin.:
+	</text>
+	<check_box label="Aplicar ahora mismo" name="apply_immediate"/>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
+	<button label="Elegir" label_selected="Elegir" name="select_btn"/>
+	<text name="Current color:">
+		Color actual:
+	</text>
+	<text name="(Drag below to save.)">
+		(Arrástrelo abajo para guardarlo)
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_critical.xml b/indra/newview/skins/default/xui/es/floater_critical.xml
index 31e0081f40..e5cbea8810 100644
--- a/indra/newview/skins/default/xui/es/floater_critical.xml
+++ b/indra/newview/skins/default/xui/es/floater_critical.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="modal container" title=" ">
-	<button label="Continuar" label_selected="Continuar" name="Continue"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-	<text name="tos_heading">
-		Por favor, lea cuidadosamente el siguiente mensaje.
-	</text>
-	<text_editor name="tos_text">
-		TOS_TEXT
-	</text_editor>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="modal container" title=" ">
+	<button label="Continuar" label_selected="Continuar" name="Continue"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+	<text name="tos_heading">
+		Por favor, lea cuidadosamente el siguiente mensaje.
+	</text>
+	<text_editor name="tos_text">
+		TOS_TEXT
+	</text_editor>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_customize.xml b/indra/newview/skins/default/xui/es/floater_customize.xml
index a03375f81f..4922d08178 100644
--- a/indra/newview/skins/default/xui/es/floater_customize.xml
+++ b/indra/newview/skins/default/xui/es/floater_customize.xml
@@ -1,427 +1,427 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater customize" title="Apariencia">
-	<tab_container name="customize tab container">
-		<panel label="Partes del cuerpo" name="body_parts_placeholder"/>
-		<panel label="Forma" name="Shape">
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-			<button label="Cuerpo" label_selected="Cuerpo" name="Body"/>
-			<button label="Cabeza" label_selected="Cabeza" name="Head"/>
-			<button label="Ojos" label_selected="Ojos" name="Eyes"/>
-			<button label="Ojos" label_selected="Orejas" name="Ears"/>
-			<button label="Nariz" label_selected="Nariz" name="Nose"/>
-			<button label="Boca" label_selected="Boca" name="Mouth"/>
-			<button label="Barbilla" label_selected="Barbilla" name="Chin"/>
-			<button label="Torso" label_selected="Torso" name="Torso"/>
-			<button label="Piernas" label_selected="Piernas" name="Legs"/>
-			<radio_group name="sex radio">
-				<radio_item length="1" name="radio" type="string">
-					Mujer
-				</radio_item>
-				<radio_item length="1" name="radio2" type="string">
-					Varón
-				</radio_item>
-			</radio_group>
-			<button label="Aleatoria" label_selected="Aleatoria" name="Randomize"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificable
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situada en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase una forma nueva arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<button label="Crear una forma nueva" label_selected="Crear una forma nueva" name="Create New"/>
-			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-		</panel>
-		<panel label="Piel" name="Skin">
-			<button label="Color de piel" label_selected="Color de piel" name="Skin Color"/>
-			<button label="Detalles faciales" label_selected="Detalles faciales" name="Face Detail"/>
-			<button label="Maquillaje" label_selected="Maquillaje" name="Makeup"/>
-			<button label="Detalles del cuerpo" label_selected="Detalles del cuerpo" name="Body Detail"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificable
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situada en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otra piel arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<texture_picker label="Tatuajes de la cabeza" name="Head Tattoos" tool_tip="Pulse para elegir una imagen"/>
-			<texture_picker label="Tatuajes superiores" name="Upper Tattoos" tool_tip="Pulse para elegir una imagen"/>
-			<texture_picker label="Tatuajes inferiores" name="Lower Tattoos" tool_tip="Pulse para elegir una imagen"/>
-			<button label="Aleatoria" label_selected="Aleatoria" name="Randomize"/>
-			<button label="Crear una piel nueva" label_selected="Crear una piel nueva" name="Create New"/>
-			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-		</panel>
-		<panel label="Pelo" name="Hair">
-			<button label="Color" label_selected="Color" name="Color"/>
-			<button label="Peinado" label_selected="Peinado" name="Style"/>
-			<button label="Cejas" label_selected="Cejas" name="Eyebrows"/>
-			<button label="Facial" label_selected="Facial" name="Facial"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificable
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situado en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otro pelo arrastrando uno desde su inventario hasta su avatar. O parta de cero creando uno nueva y vistiéndolo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<texture_picker label="Textura" name="Texture" tool_tip="Pulse para elegir una imagen"/>
-			<button label="Aleatorio" label_selected="Aleatorio" name="Randomize"/>
-			<button label="Crear un pelo nuevo" label_selected="Crear un pelo nuevo" name="Create New"/>
-			<button label="Quitarlo" label_selected="Quitarlo" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-		</panel>
-		<panel label="Ojos" name="Eyes">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificables
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situados en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otros ojos arrastrando unos desde su inventario hasta su avatar. O parta de cero creando unos nuevos y vistiéndoselos.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<texture_picker label="Iris" name="Iris" tool_tip="Pulse para elegir una imagen"/>
-			<button label="Aleatorios" label_selected="Aleatorios" name="Randomize"/>
-			<button label="Crear unos ojos nuevos" label_selected="Crear unos ojos nuevos" name="Create New"/>
-			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-		</panel>
-		<panel label="Ropa" name="clothes_placeholder"/>
-		<panel label="Camisa" name="Shirt">
-			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
-			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
-			<button label="Crear una falda nueva" label_selected="Crear una falda nueva" name="Create New"/>
-			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificable
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situada en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otra camisa arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-		</panel>
-		<panel label="Pantalones" name="Pants">
-			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
-			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
-			<button label="Crear unos pantalones nuevos" label_selected="Crear unos pantalones nuevos" name="Create New"/>
-			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificables
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situados en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otros pantalones arrastrando unos desde su inventario hasta su avatar. O parta de cero creando unos nuevos y vistiéndoselos.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-		</panel>
-		<panel label="Shoes" name="Shoes">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificables
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situados en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otros zapatos arrastrando unos desde su inventario hasta su avatar. O parta de cero creando unos nuevos y vistiéndoselos.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
-			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
-			<button label="Crear unos zapatos nuevos" label_selected="Crear unos zapatos nuevos" name="Create New"/>
-			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-		</panel>
-		<panel label="Calcetines" name="Socks">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificables
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situados en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otros calcetines arrastrando unos desde su inventario hasta su avatar. O parta de cero creando unos nuevos y vistiéndoselos.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
-			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
-			<button label="Crear unos calcetines nuevos" label_selected="Crear unos calcetines nuevos" name="Create New"/>
-			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-		</panel>
-		<panel label="Chaqueta" name="Jacket">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificable
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situada en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otra chaqueta arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<texture_picker label="Tela superior" name="Upper Fabric" tool_tip="Pulse para elegir una imagen"/>
-			<texture_picker label="Tela inferior" name="Lower Fabric" tool_tip="Pulse para elegir una imagen"/>
-			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
-			<button label="Crear una chaqueta nueva" label_selected="Crear una chaqueta nueva" name="Create New"/>
-			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-		</panel>
-		<panel label="Guantes" name="Gloves">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificables
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situados en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otros guantes arrastrando unos desde su inventario hasta su avatar. O parta de cero creando unos nuevos y vistiéndoselos.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
-			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
-			<button label="Crear unos guantes nuevos" label_selected="Crear unos guantes nuevos" name="Create New"/>
-			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-		</panel>
-		<panel label="Camiseta" name="Undershirt">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificable
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situada en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otra camiseta arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
-			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
-			<button label="Crear una camiseta nueva" label_selected="Crear una camiseta nueva" name="Create New"/>
-			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-		</panel>
-		<panel label="Ropa interior" name="Underpants">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificable
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situada en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otra ropa interior arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
-			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
-			<button label="Crear una ropa interior nueva" label_selected="Crear una ropa interior nueva" name="Create New"/>
-			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-		</panel>
-		<panel label="Falda" name="Skirt">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: no modificable
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: cargando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: no lleva
-			</text>
-			<text length="1" name="path" type="string">
-				Situada en [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Póngase otra falda arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				No tiene permiso para modificar este ítem.
-			</text>
-			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
-			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
-			<button label="Crear una falda nueva" label_selected="Crear una falda nueva" name="Create New"/>
-			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
-			<button label="Guardar" label_selected="Guardar" name="Save"/>
-			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
-			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
-		</panel>
-	</tab_container>
-	<button label="Cerrar" label_selected="Cerrar" name="Close"/>
-	<button label="Guardar todo" label_selected="Guardar todo" name="Save All"/>
-	<button label="Hacer un vestuario" label_selected="Hacer un vestuario" name="Make Outfit"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater customize" title="Apariencia">
+	<tab_container name="customize tab container">
+		<panel label="Partes del cuerpo" name="body_parts_placeholder"/>
+		<panel label="Forma" name="Shape">
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+			<button label="Cuerpo" label_selected="Cuerpo" name="Body"/>
+			<button label="Cabeza" label_selected="Cabeza" name="Head"/>
+			<button label="Ojos" label_selected="Ojos" name="Eyes"/>
+			<button label="Ojos" label_selected="Orejas" name="Ears"/>
+			<button label="Nariz" label_selected="Nariz" name="Nose"/>
+			<button label="Boca" label_selected="Boca" name="Mouth"/>
+			<button label="Barbilla" label_selected="Barbilla" name="Chin"/>
+			<button label="Torso" label_selected="Torso" name="Torso"/>
+			<button label="Piernas" label_selected="Piernas" name="Legs"/>
+			<radio_group name="sex radio">
+				<radio_item length="1" name="radio" type="string">
+					Mujer
+				</radio_item>
+				<radio_item length="1" name="radio2" type="string">
+					Varón
+				</radio_item>
+			</radio_group>
+			<button label="Aleatoria" label_selected="Aleatoria" name="Randomize"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificable
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situada en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase una forma nueva arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<button label="Crear una forma nueva" label_selected="Crear una forma nueva" name="Create New"/>
+			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+		</panel>
+		<panel label="Piel" name="Skin">
+			<button label="Color de piel" label_selected="Color de piel" name="Skin Color"/>
+			<button label="Detalles faciales" label_selected="Detalles faciales" name="Face Detail"/>
+			<button label="Maquillaje" label_selected="Maquillaje" name="Makeup"/>
+			<button label="Detalles del cuerpo" label_selected="Detalles del cuerpo" name="Body Detail"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificable
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situada en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otra piel arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<texture_picker label="Tatuajes de la cabeza" name="Head Tattoos" tool_tip="Pulse para elegir una imagen"/>
+			<texture_picker label="Tatuajes superiores" name="Upper Tattoos" tool_tip="Pulse para elegir una imagen"/>
+			<texture_picker label="Tatuajes inferiores" name="Lower Tattoos" tool_tip="Pulse para elegir una imagen"/>
+			<button label="Aleatoria" label_selected="Aleatoria" name="Randomize"/>
+			<button label="Crear una piel nueva" label_selected="Crear una piel nueva" name="Create New"/>
+			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+		</panel>
+		<panel label="Pelo" name="Hair">
+			<button label="Color" label_selected="Color" name="Color"/>
+			<button label="Peinado" label_selected="Peinado" name="Style"/>
+			<button label="Cejas" label_selected="Cejas" name="Eyebrows"/>
+			<button label="Facial" label_selected="Facial" name="Facial"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificable
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situado en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otro pelo arrastrando uno desde su inventario hasta su avatar. O parta de cero creando uno nueva y vistiéndolo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<texture_picker label="Textura" name="Texture" tool_tip="Pulse para elegir una imagen"/>
+			<button label="Aleatorio" label_selected="Aleatorio" name="Randomize"/>
+			<button label="Crear un pelo nuevo" label_selected="Crear un pelo nuevo" name="Create New"/>
+			<button label="Quitarlo" label_selected="Quitarlo" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+		</panel>
+		<panel label="Ojos" name="Eyes">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificables
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situados en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otros ojos arrastrando unos desde su inventario hasta su avatar. O parta de cero creando unos nuevos y vistiéndoselos.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<texture_picker label="Iris" name="Iris" tool_tip="Pulse para elegir una imagen"/>
+			<button label="Aleatorios" label_selected="Aleatorios" name="Randomize"/>
+			<button label="Crear unos ojos nuevos" label_selected="Crear unos ojos nuevos" name="Create New"/>
+			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+		</panel>
+		<panel label="Ropa" name="clothes_placeholder"/>
+		<panel label="Camisa" name="Shirt">
+			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
+			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
+			<button label="Crear una falda nueva" label_selected="Crear una falda nueva" name="Create New"/>
+			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificable
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situada en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otra camisa arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+		</panel>
+		<panel label="Pantalones" name="Pants">
+			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
+			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
+			<button label="Crear unos pantalones nuevos" label_selected="Crear unos pantalones nuevos" name="Create New"/>
+			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificables
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situados en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otros pantalones arrastrando unos desde su inventario hasta su avatar. O parta de cero creando unos nuevos y vistiéndoselos.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+		</panel>
+		<panel label="Shoes" name="Shoes">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificables
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situados en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otros zapatos arrastrando unos desde su inventario hasta su avatar. O parta de cero creando unos nuevos y vistiéndoselos.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
+			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
+			<button label="Crear unos zapatos nuevos" label_selected="Crear unos zapatos nuevos" name="Create New"/>
+			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+		</panel>
+		<panel label="Calcetines" name="Socks">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificables
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situados en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otros calcetines arrastrando unos desde su inventario hasta su avatar. O parta de cero creando unos nuevos y vistiéndoselos.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
+			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
+			<button label="Crear unos calcetines nuevos" label_selected="Crear unos calcetines nuevos" name="Create New"/>
+			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+		</panel>
+		<panel label="Chaqueta" name="Jacket">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificable
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situada en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otra chaqueta arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<texture_picker label="Tela superior" name="Upper Fabric" tool_tip="Pulse para elegir una imagen"/>
+			<texture_picker label="Tela inferior" name="Lower Fabric" tool_tip="Pulse para elegir una imagen"/>
+			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
+			<button label="Crear una chaqueta nueva" label_selected="Crear una chaqueta nueva" name="Create New"/>
+			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+		</panel>
+		<panel label="Guantes" name="Gloves">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificables
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situados en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otros guantes arrastrando unos desde su inventario hasta su avatar. O parta de cero creando unos nuevos y vistiéndoselos.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
+			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
+			<button label="Crear unos guantes nuevos" label_selected="Crear unos guantes nuevos" name="Create New"/>
+			<button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+		</panel>
+		<panel label="Camiseta" name="Undershirt">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificable
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situada en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otra camiseta arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
+			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
+			<button label="Crear una camiseta nueva" label_selected="Crear una camiseta nueva" name="Create New"/>
+			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+		</panel>
+		<panel label="Ropa interior" name="Underpants">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificable
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situada en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otra ropa interior arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
+			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
+			<button label="Crear una ropa interior nueva" label_selected="Crear una ropa interior nueva" name="Create New"/>
+			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+		</panel>
+		<panel label="Falda" name="Skirt">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: no modificable
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: cargando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: no lleva
+			</text>
+			<text length="1" name="path" type="string">
+				Situada en [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Póngase otra falda arrastrando una desde su inventario hasta su avatar. O parta de cero creando una nueva y vistiéndola.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				No tiene permiso para modificar este ítem.
+			</text>
+			<texture_picker label="Tela" name="Fabric" tool_tip="Pulse para elegir una imagen"/>
+			<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulse para abrir el selector de color"/>
+			<button label="Crear una falda nueva" label_selected="Crear una falda nueva" name="Create New"/>
+			<button label="Quitarla" label_selected="Quitarla" name="Take Off"/>
+			<button label="Guardar" label_selected="Guardar" name="Save"/>
+			<button label="Guardar como" label_selected="Guardar como" name="Save As"/>
+			<button label="Restablecer" label_selected="Restablecer" name="Revert"/>
+		</panel>
+	</tab_container>
+	<button label="Cerrar" label_selected="Cerrar" name="Close"/>
+	<button label="Guardar todo" label_selected="Guardar todo" name="Save All"/>
+	<button label="Hacer un vestuario" label_selected="Hacer un vestuario" name="Make Outfit"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_gesture.xml b/indra/newview/skins/default/xui/es/floater_gesture.xml
index fff60e64e1..4f19286d01 100644
--- a/indra/newview/skins/default/xui/es/floater_gesture.xml
+++ b/indra/newview/skins/default/xui/es/floater_gesture.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="gestures" title="Gestos disponibles">
-	<text name="help_label">
-		Pulse dos veces en un gesto para reproducir las animaciones y sonidos.
-	</text>
-	<scroll_list name="gesture_list">
-		<column label="Botón" name="trigger"/>
-		<column label="Tecla" name="shortcut"/>
-		<column label="Nombre" name="name"/>
-	</scroll_list>
-	<button label="Nuevo" name="new_gesture_btn"/>
-	<button label="Editar" name="edit_btn"/>
-	<button label="Reproducir" name="play_btn"/>
-	<button label="Parar" name="stop_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="gestures" title="Gestos disponibles">
+	<text name="help_label">
+		Pulse dos veces en un gesto para reproducir las animaciones y sonidos.
+	</text>
+	<scroll_list name="gesture_list">
+		<column label="Botón" name="trigger"/>
+		<column label="Tecla" name="shortcut"/>
+		<column label="Nombre" name="name"/>
+	</scroll_list>
+	<button label="Nuevo" name="new_gesture_btn"/>
+	<button label="Editar" name="edit_btn"/>
+	<button label="Reproducir" name="play_btn"/>
+	<button label="Parar" name="stop_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_god_tools.xml b/indra/newview/skins/default/xui/es/floater_god_tools.xml
index 2b734ecc4b..b429d1ccaf 100644
--- a/indra/newview/skins/default/xui/es/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/es/floater_god_tools.xml
@@ -1,147 +1,147 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="godtools floater" title="Herramientas de Dios">
-	<tab_container name="GodTools Tabs">
-		<panel label="Red" name="grid">
-			<button label="Expulsar a todos los usuarios"
-			     label_selected="Expulsar a todos los usuarios" name="Kick all users" />
-			<button label="Vaciar los caches de visibilidad del mapa de la región"
-			     label_selected="Vaciar los caches de visibilidad del mapa de la región"
-			     name="Flush This Region&apos;s Map Visibility Caches" />
-		</panel>
-		<panel label="Región" name="region">
-			<text name="Sim Name:">
-				Nombre del Sim:
-			</text>
-			<check_box label="Preludio" name="check prelude"
-			     tool_tip="Defina esté para hacer un preludio de la región." />
-			<check_box label="Sol fijo" name="check fixed sun"
-			     tool_tip="Fijar la posición del sol (así como en Región/Propiedad &gt; Terreno." />
-			<check_box label="Restaurar casa en el teletransporte" name="check reset home"
-			     tool_tip="Cuando el residente sea teletransportado hacia fuera, restaurar su casa para la posición de destino." />
-			<check_box label="Visible" name="check visible"
-			     tool_tip="Defina esté para tornar la región visible a no dioses." />
-			<check_box label="Daño" name="check damage"
-			     tool_tip="Defina esté para activar el daño en esta región." />
-			<check_box label="Bloquear rastreo de tráfico" name="block dwell"
-			     tool_tip="Defina esté para hacer que una región no compute el tráfico." />
-			<check_box label="Bloquear formar terreno" name="block terraform"
-			     tool_tip="Defina esté para no permitir que personas muden la formación del terreno de ellas" />
-			<check_box label="Caja de arena" name="is sandbox"
-			     tool_tip="Activar/desactivar si ésta es una región caja de arena." />
-			<button label="Formar terreno" label_selected="Formar terreno" name="Bake Terrain"
-			     tool_tip="Guardar el terreno actual como patrón." />
-			<button label="Revertir terreno" label_selected="Revertir terreno"
-			     name="Revert Terrain"
-			     tool_tip="Sustituir el terreno actual por el patrón." />
-			<button label="Cambiar terreno" label_selected="Cambiar terreno" name="Swap Terrain"
-			     tool_tip="Cambiar terreno actual por el patrón." />
-			<text name="estate id">
-				ID de la propiedad:
-			</text>
-			<text name="parent id">
-				ID del padre:
-			</text>
-			<line_editor name="parentestate" tool_tip="Ésta es una propiedad padre para esta región" />
-			<text name="Grid Pos: ">
-				Red Pos:
-			</text>
-			<line_editor name="gridposx" tool_tip="Ésta es la posición x de la reja para esta región" />
-			<line_editor name="gridposy" tool_tip="Ésta es la posición y de la reja para esta región" />
-			<text name="Redirect to Grid: ">
-				Redireccionar para red:
-			</text>
-			<text name="billable factor text">
-				Factor cobrable:
-			</text>
-			<text name="land cost text">
-				L$ por m2:
-			</text>
-			<button label="Actualizar" label_selected="Actualizar" name="Refresh"
-			     tool_tip="Haga clic aquí para actualizar la información arriba." />
-			<button label="Aplicar" label_selected="Aplicar" name="Apply"
-			     tool_tip="Haga clic aquí para aplicar cualesquiera de las mudanzas arriba." />
-			<button label="Seleccionar región" label_selected="Seleccionar región"
-			     name="Select Region"
-			     tool_tip="Seleccione toda la región con esta herramienta de terreno." />
-			<button label="Guardado automático ahora" label_selected="Guardado automático ahora"
-			     name="Autosave now"
-			     tool_tip="Guardar estado con gzip en el directorio de guardado automático." />
-		</panel>
-		<panel label="Objetos" name="objects">
-			<text name="Sim Name:">
-				Nombre del Sim:
-			</text>
-			<text name="region name">
-				Galés
-			</text>
-			<check_box label="Desactivar scripts" name="disable scripts"
-			     tool_tip="Defina esté para desactivar todos los scripts en esta región" />
-			<check_box label="Desactivar colisiones" name="disable collisions"
-			     tool_tip="Defina esté para desactivar las colisiones entre no agentes en esta región" />
-			<check_box label="Desactivar física" name="disable physics"
-			     tool_tip="Defina esté para desactivar toda la física en esta región" />
-			<button label="Aplicar" label_selected="Aplicar" name="Apply"
-			     tool_tip="Haga clic aquí para aplicar cualesquiera de las mudanzas arriba." />
-			<button label="Definir blanco" label_selected="Definir blanco" name="Set Target"
-			     tool_tip="Ajuste el avatar del blanco para la exclusión del objeto." />
-			<text name="target_avatar_name">
-				(sin blanco)
-			</text>
-			<button label="Borrar objetos con script del blanco en otros terrenos"
-			     label_selected="Borrar objetos con script del blanco en otros terrenos"
-			     name="Delete Target&apos;s Scripted Objects On Others Land"
-			     tool_tip="Borrar todos los objetos con script pertenecientes al blanco en el terreno que no pertenece a él. Objetos (sin copia) retornarán." />
-			<button label="Borrar objetos con script del blanco en *TODOS* los terrenos"
-			     label_selected="Borrar objetos con script del blanco en *TODOS* los terrenos"
-			     name="Delete Target&apos;s Scripted Objects On *Any* Land"
-			     tool_tip="Borrar todos los objetos con script pertenecientes al blanco en esta región. Objetos (sin copia) retornarán." />
-			<button label="Borrar *TODOS* los objetos del blanco"
-			     label_selected="Borrar *TODOS* los objetos del blanco"
-			     name="Delete *ALL* Of Target&apos;s Objects"
-			     tool_tip="Borrar todos los objetos pertenecientes al blanco en esta región. Objetos (sin copia) retornarán." />
-			<button label="Obtener top de colisionadores"
-			     label_selected="Obtener top de colisionadores" name="Get Top Colliders"
-			     tool_tip="Coger lista de objetos que están recibiendo narrowphase callbacks." />
-			<button label="Obtener top de scripts" label_selected="Obtener top de scripts"
-			     name="Get Top Scripts"
-			     tool_tip="Coger lista de objetos que están consumiendo más tiempo de ejecución de scripts." />
-			<button label="Compilador de scripts" label_selected="Compilador de scripts"
-			     name="Scripts digest"
-			     tool_tip="Coger una lista de todos los scripts y sus respectivos números de ocurrencia." />
-		</panel>
-		<panel label="Requerir" name="request">
-			<text name="Destination:">
-				Destino:
-			</text>
-			<combo_box name="destination">
-				<combo_item name="Selection">
-					Selección
-				</combo_item>
-				<combo_item name="AgentRegion">
-					Agente de región
-				</combo_item>
-			</combo_box>
-			<text name="Request:">
-				Exigencia:
-			</text>
-			<combo_box name="request">
-				<combo_item name="colliders&lt;steps&gt;">
-					colisionadores &lt;pasos&gt;
-				</combo_item>
-				<combo_item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
-					scripts &lt;contar&gt;,&lt;patrón opcional&gt;
-				</combo_item>
-				<combo_item name="objects&lt;pattern&gt;">
-					objetos &lt;patrón&gt;
-				</combo_item>
-				<combo_item name="rez&lt;asset_id&gt;">
-					rez &lt;asset_id&gt;
-				</combo_item>
-			</combo_box>
-			<text name="Parameter:">
-				Parámetro:
-			</text>
-			<button label="Hacer exigencia" label_selected="Hacer exigencia" name="Make Request" />
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="godtools floater" title="Herramientas de Dios">
+	<tab_container name="GodTools Tabs">
+		<panel label="Red" name="grid">
+			<button label="Expulsar a todos los usuarios"
+			     label_selected="Expulsar a todos los usuarios" name="Kick all users" />
+			<button label="Vaciar los caches de visibilidad del mapa de la región"
+			     label_selected="Vaciar los caches de visibilidad del mapa de la región"
+			     name="Flush This Region&apos;s Map Visibility Caches" />
+		</panel>
+		<panel label="Región" name="region">
+			<text name="Sim Name:">
+				Nombre del Sim:
+			</text>
+			<check_box label="Preludio" name="check prelude"
+			     tool_tip="Defina esté para hacer un preludio de la región." />
+			<check_box label="Sol fijo" name="check fixed sun"
+			     tool_tip="Fijar la posición del sol (así como en Región/Propiedad &gt; Terreno." />
+			<check_box label="Restaurar casa en el teletransporte" name="check reset home"
+			     tool_tip="Cuando el residente sea teletransportado hacia fuera, restaurar su casa para la posición de destino." />
+			<check_box label="Visible" name="check visible"
+			     tool_tip="Defina esté para tornar la región visible a no dioses." />
+			<check_box label="Daño" name="check damage"
+			     tool_tip="Defina esté para activar el daño en esta región." />
+			<check_box label="Bloquear rastreo de tráfico" name="block dwell"
+			     tool_tip="Defina esté para hacer que una región no compute el tráfico." />
+			<check_box label="Bloquear formar terreno" name="block terraform"
+			     tool_tip="Defina esté para no permitir que personas muden la formación del terreno de ellas" />
+			<check_box label="Caja de arena" name="is sandbox"
+			     tool_tip="Activar/desactivar si ésta es una región caja de arena." />
+			<button label="Formar terreno" label_selected="Formar terreno" name="Bake Terrain"
+			     tool_tip="Guardar el terreno actual como patrón." />
+			<button label="Revertir terreno" label_selected="Revertir terreno"
+			     name="Revert Terrain"
+			     tool_tip="Sustituir el terreno actual por el patrón." />
+			<button label="Cambiar terreno" label_selected="Cambiar terreno" name="Swap Terrain"
+			     tool_tip="Cambiar terreno actual por el patrón." />
+			<text name="estate id">
+				ID de la propiedad:
+			</text>
+			<text name="parent id">
+				ID del padre:
+			</text>
+			<line_editor name="parentestate" tool_tip="Ésta es una propiedad padre para esta región" />
+			<text name="Grid Pos: ">
+				Red Pos:
+			</text>
+			<line_editor name="gridposx" tool_tip="Ésta es la posición x de la reja para esta región" />
+			<line_editor name="gridposy" tool_tip="Ésta es la posición y de la reja para esta región" />
+			<text name="Redirect to Grid: ">
+				Redireccionar para red:
+			</text>
+			<text name="billable factor text">
+				Factor cobrable:
+			</text>
+			<text name="land cost text">
+				L$ por m2:
+			</text>
+			<button label="Actualizar" label_selected="Actualizar" name="Refresh"
+			     tool_tip="Haga clic aquí para actualizar la información arriba." />
+			<button label="Aplicar" label_selected="Aplicar" name="Apply"
+			     tool_tip="Haga clic aquí para aplicar cualesquiera de las mudanzas arriba." />
+			<button label="Seleccionar región" label_selected="Seleccionar región"
+			     name="Select Region"
+			     tool_tip="Seleccione toda la región con esta herramienta de terreno." />
+			<button label="Guardado automático ahora" label_selected="Guardado automático ahora"
+			     name="Autosave now"
+			     tool_tip="Guardar estado con gzip en el directorio de guardado automático." />
+		</panel>
+		<panel label="Objetos" name="objects">
+			<text name="Sim Name:">
+				Nombre del Sim:
+			</text>
+			<text name="region name">
+				Galés
+			</text>
+			<check_box label="Desactivar scripts" name="disable scripts"
+			     tool_tip="Defina esté para desactivar todos los scripts en esta región" />
+			<check_box label="Desactivar colisiones" name="disable collisions"
+			     tool_tip="Defina esté para desactivar las colisiones entre no agentes en esta región" />
+			<check_box label="Desactivar física" name="disable physics"
+			     tool_tip="Defina esté para desactivar toda la física en esta región" />
+			<button label="Aplicar" label_selected="Aplicar" name="Apply"
+			     tool_tip="Haga clic aquí para aplicar cualesquiera de las mudanzas arriba." />
+			<button label="Definir blanco" label_selected="Definir blanco" name="Set Target"
+			     tool_tip="Ajuste el avatar del blanco para la exclusión del objeto." />
+			<text name="target_avatar_name">
+				(sin blanco)
+			</text>
+			<button label="Borrar objetos con script del blanco en otros terrenos"
+			     label_selected="Borrar objetos con script del blanco en otros terrenos"
+			     name="Delete Target&apos;s Scripted Objects On Others Land"
+			     tool_tip="Borrar todos los objetos con script pertenecientes al blanco en el terreno que no pertenece a él. Objetos (sin copia) retornarán." />
+			<button label="Borrar objetos con script del blanco en *TODOS* los terrenos"
+			     label_selected="Borrar objetos con script del blanco en *TODOS* los terrenos"
+			     name="Delete Target&apos;s Scripted Objects On *Any* Land"
+			     tool_tip="Borrar todos los objetos con script pertenecientes al blanco en esta región. Objetos (sin copia) retornarán." />
+			<button label="Borrar *TODOS* los objetos del blanco"
+			     label_selected="Borrar *TODOS* los objetos del blanco"
+			     name="Delete *ALL* Of Target&apos;s Objects"
+			     tool_tip="Borrar todos los objetos pertenecientes al blanco en esta región. Objetos (sin copia) retornarán." />
+			<button label="Obtener top de colisionadores"
+			     label_selected="Obtener top de colisionadores" name="Get Top Colliders"
+			     tool_tip="Coger lista de objetos que están recibiendo narrowphase callbacks." />
+			<button label="Obtener top de scripts" label_selected="Obtener top de scripts"
+			     name="Get Top Scripts"
+			     tool_tip="Coger lista de objetos que están consumiendo más tiempo de ejecución de scripts." />
+			<button label="Compilador de scripts" label_selected="Compilador de scripts"
+			     name="Scripts digest"
+			     tool_tip="Coger una lista de todos los scripts y sus respectivos números de ocurrencia." />
+		</panel>
+		<panel label="Requerir" name="request">
+			<text name="Destination:">
+				Destino:
+			</text>
+			<combo_box name="destination">
+				<combo_box.item name="Selection">
+					Selección
+				</combo_box.item>
+				<combo_box.item name="AgentRegion">
+					Agente de región
+				</combo_box.item>
+			</combo_box>
+			<text name="Request:">
+				Exigencia:
+			</text>
+			<combo_box name="request">
+				<combo_box.item name="colliders&lt;steps&gt;">
+					colisionadores &lt;pasos&gt;
+				</combo_box.item>
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
+					scripts &lt;contar&gt;,&lt;patrón opcional&gt;
+				</combo_box.item>
+				<combo_box.item name="objects&lt;pattern&gt;">
+					objetos &lt;patrón&gt;
+				</combo_box.item>
+				<combo_box.item name="rez&lt;asset_id&gt;">
+					rez &lt;asset_id&gt;
+				</combo_box.item>
+			</combo_box>
+			<text name="Parameter:">
+				Parámetro:
+			</text>
+			<button label="Hacer exigencia" label_selected="Hacer exigencia" name="Make Request" />
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_im.xml b/indra/newview/skins/default/xui/es/floater_im.xml
index fd43613221..3e92003bac 100644
--- a/indra/newview/skins/default/xui/es/floater_im.xml
+++ b/indra/newview/skins/default/xui/es/floater_im.xml
@@ -1,45 +1,45 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<multi_floater name="im_floater" title="Mensaje Instantáneo">
-	<string name="only_user_message">
-		Usted es el único usuario en esta sesión.
-	</string>
-	<string name="offline_message">
-		[FIRST] [LAST] no está conectado.
-	</string>
-	<string name="invite_message">
-		Pulse el botón [BUTTON NAME] para aceptar/conectar este chat de voz.
-	</string>
-	<string name="muted_message">
-		Ha ignorado a este residente. Al enviarle un mensaje, automáticamente dejará de ignorarle.
-	</string>
-	<string name="generic_request_error">
-		Error al hacer lo solicitado; por favor, inténtelo más tarde.
-	</string>
-	<string name="insufficient_perms_error">
-		Usted no tiene permisos suficientes.
-	</string>
-	<string name="session_does_not_exist_error">
-		La sesión ya acabó
-	</string>
-	<string name="no_ability_error">
-		Usted no tiene esa capacidad.
-	</string>
-	<string name="not_a_mod_error">
-		Usted no es un moderador de la sesión.
-	</string>
-	<string name="muted_error">
-		Un moderador del grupo le ha desactivado el chat de texto.
-	</string>
-	<string name="add_session_event">
-		No se ha podido añadir usuarios a la sesión de chat con [RECIPIENT].
-	</string>
-	<string name="message_session_event">
-		No se ha podido enviar su mensaje a la sesión de chat con [RECIPIENT].
-	</string>
-	<string name="removed_from_group">
-		Ha sido eliminado del grupo.
-	</string>
-	<string name="close_on_no_ability">
-		Usted ya no tendrá más la capacidad de estar en la sesión de chat.
-	</string>
-</multi_floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<multi_floater name="im_floater" title="Mensaje Instantáneo">
+	<string name="only_user_message">
+		Usted es el único usuario en esta sesión.
+	</string>
+	<string name="offline_message">
+		[FIRST] [LAST] no está conectado.
+	</string>
+	<string name="invite_message">
+		Pulse el botón [BUTTON NAME] para aceptar/conectar este chat de voz.
+	</string>
+	<string name="muted_message">
+		Ha ignorado a este residente. Al enviarle un mensaje, automáticamente dejará de ignorarle.
+	</string>
+	<string name="generic_request_error">
+		Error al hacer lo solicitado; por favor, inténtelo más tarde.
+	</string>
+	<string name="insufficient_perms_error">
+		Usted no tiene permisos suficientes.
+	</string>
+	<string name="session_does_not_exist_error">
+		La sesión ya acabó
+	</string>
+	<string name="no_ability_error">
+		Usted no tiene esa capacidad.
+	</string>
+	<string name="not_a_mod_error">
+		Usted no es un moderador de la sesión.
+	</string>
+	<string name="muted_error">
+		Un moderador del grupo le ha desactivado el chat de texto.
+	</string>
+	<string name="add_session_event">
+		No se ha podido añadir usuarios a la sesión de chat con [RECIPIENT].
+	</string>
+	<string name="message_session_event">
+		No se ha podido enviar su mensaje a la sesión de chat con [RECIPIENT].
+	</string>
+	<string name="removed_from_group">
+		Ha sido eliminado del grupo.
+	</string>
+	<string name="close_on_no_ability">
+		Usted ya no tendrá más la capacidad de estar en la sesión de chat.
+	</string>
+</multi_floater>
diff --git a/indra/newview/skins/default/xui/es/floater_image_preview.xml b/indra/newview/skins/default/xui/es/floater_image_preview.xml
index fc71757c44..8e242d848d 100644
--- a/indra/newview/skins/default/xui/es/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/es/floater_image_preview.xml
@@ -1,52 +1,52 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Image Preview" title="">
-	<text name="name_label">
-		Nombre:
-	</text>
-	<text name="description_label">
-		Descripción:
-	</text>
-	<text name="preview_label">
-		Previsualizar la imagen como:
-	</text>
-	<combo_box label="Tipo de ropa" name="clothing_type_combo">
-		<combo_item name="Image">
-			Imagen
-		</combo_item>
-		<combo_item name="Hair">
-			Pelo
-		</combo_item>
-		<combo_item name="FemaleHead">
-			Cabeza de mujer
-		</combo_item>
-		<combo_item name="FemaleUpperBody">
-			Mujer: parte superior del cuerpo
-		</combo_item>
-		<combo_item name="FemaleLowerBody">
-			Mujer: parte inferior del cuerpo
-		</combo_item>
-		<combo_item name="MaleHead">
-			Cabeza de varón
-		</combo_item>
-		<combo_item name="MaleUpperBody">
-			Varón: parte superior del cuerpo
-		</combo_item>
-		<combo_item name="MaleLowerBody">
-			Varón: parte inferior del cuerpo
-		</combo_item>
-		<combo_item name="Skirt">
-			Falda
-		</combo_item>
-		<combo_item name="SculptedPrim">
-			Prim sculpted
-		</combo_item>
-	</combo_box>
-	<text name="bad_image_text">
-		Imposible leer la imagen.
-
-Pruebe a guardar la imagen como Targa (.tga) de 24 bites.
-	</text>
-	<check_box label="Usar compresión sin pérdida" name="lossless_check"/>
-	<button label="Cancelar" name="cancel_btn"/>
-	<button label="Subir ([AMOUNT] 10L$)" name="ok_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Image Preview" title="">
+	<text name="name_label">
+		Nombre:
+	</text>
+	<text name="description_label">
+		Descripción:
+	</text>
+	<text name="preview_label">
+		Previsualizar la imagen como:
+	</text>
+	<combo_box label="Tipo de ropa" name="clothing_type_combo">
+		<combo_box.item name="Image">
+			Imagen
+		</combo_box.item>
+		<combo_box.item name="Hair">
+			Pelo
+		</combo_box.item>
+		<combo_box.item name="FemaleHead">
+			Cabeza de mujer
+		</combo_box.item>
+		<combo_box.item name="FemaleUpperBody">
+			Mujer: parte superior del cuerpo
+		</combo_box.item>
+		<combo_box.item name="FemaleLowerBody">
+			Mujer: parte inferior del cuerpo
+		</combo_box.item>
+		<combo_box.item name="MaleHead">
+			Cabeza de varón
+		</combo_box.item>
+		<combo_box.item name="MaleUpperBody">
+			Varón: parte superior del cuerpo
+		</combo_box.item>
+		<combo_box.item name="MaleLowerBody">
+			Varón: parte inferior del cuerpo
+		</combo_box.item>
+		<combo_box.item name="Skirt">
+			Falda
+		</combo_box.item>
+		<combo_item name="SculptedPrim">
+			Prim sculpted
+		</combo_item>
+	</combo_box>
+	<text name="bad_image_text">
+		Imposible leer la imagen.
+
+Pruebe a guardar la imagen como Targa (.tga) de 24 bites.
+	</text>
+	<check_box label="Usar compresión sin pérdida" name="lossless_check"/>
+	<button label="Cancelar" name="cancel_btn"/>
+	<button label="Subir ([AMOUNT] 10L$)" name="ok_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_inventory.xml b/indra/newview/skins/default/xui/es/floater_inventory.xml
index 339b8b7d69..7da14c0579 100644
--- a/indra/newview/skins/default/xui/es/floater_inventory.xml
+++ b/indra/newview/skins/default/xui/es/floater_inventory.xml
@@ -1,47 +1,47 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Inventory" title="Inventario">
-	<search_editor label="Escriba aquí para buscar" name="inventory search editor"/>
-	<tab_container name="inventory filter tabs">
-		<inventory_panel label="Todos los ítems" name="All Items"/>
-		<inventory_panel label="Ítems recientes" name="Recent Items"/>
-	</tab_container>
-	<menu_bar name="Inventory Menu">
-		<menu label="Archivo" name="File">
-			<menu_item_call label="Abrir" name="Open"/>
-			<menu_item_call label="Nueva ventana" name="New Window"/>
-			<menu_item_call label="Ver los filtros" name="Show Filters"/>
-			<menu_item_call label="Restablecer los filtros" name="Reset Current"/>
-			<menu_item_call label="Cerrar todas las carpetas" name="Close All Folders"/>
-			<menu_item_call label="Vaciar la papelera" name="Empty Trash"/>
-		</menu>
-		<menu label="Crear" name="Create">
-			<menu_item_call label="Carpeta nueva" name="New Folder"/>
-			<menu_item_call label="Script nuevo" name="New Script"/>
-			<menu_item_call label="Nota nueva" name="New Note"/>
-			<menu_item_call label="Gesto nuevo" name="New Gesture"/>
-			<menu name="New Clothes">
-				<menu_item_call label="Falda nueva" name="New Shirt"/>
-				<menu_item_call label="Pantalones nuevos" name="New Pants"/>
-				<menu_item_call label="Zapatos nuevos" name="New Shoes"/>
-				<menu_item_call label="Calcetines nuevos" name="New Socks"/>
-				<menu_item_call label="Chaqueta nueva" name="New Jacket"/>
-				<menu_item_call label="Falda nueva" name="New Skirt"/>
-				<menu_item_call label="Guantes nuevos" name="New Gloves"/>
-				<menu_item_call label="Camiseta nueva" name="New Undershirt"/>
-				<menu_item_call label="Ropa interior nueva" name="New Underpants"/>
-			</menu>
-			<menu name="New Body Parts">
-				<menu_item_call label="Forma nueva" name="New Shape"/>
-				<menu_item_call label="Piel nueva" name="New Skin"/>
-				<menu_item_call label="Pelo nuevo" name="New Hair"/>
-				<menu_item_call label="Ojos nuevos" name="New Eyes"/>
-			</menu>
-		</menu>
-		<menu label="Ordenar" name="Sort">
-			<menu_item_check label="Por el nombre" name="By Name"/>
-			<menu_item_check label="Por la fecha" name="By Date"/>
-			<menu_item_check label="Las carpetas, siempre por la fecha" name="Folders Always By Name"/>
-			<menu_item_check label="Las carpetas del sistema, arriba" name="System Folders To Top"/>
-		</menu>
-	</menu_bar>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Inventory" title="Inventario">
+	<search_editor label="Escriba aquí para buscar" name="inventory search editor"/>
+	<tab_container name="inventory filter tabs">
+		<inventory_panel label="Todos los ítems" name="All Items"/>
+		<inventory_panel label="Ítems recientes" name="Recent Items"/>
+	</tab_container>
+	<menu_bar name="Inventory Menu">
+		<menu label="Archivo" name="File">
+			<menu_item_call label="Abrir" name="Open"/>
+			<menu_item_call label="Nueva ventana" name="New Window"/>
+			<menu_item_call label="Ver los filtros" name="Show Filters"/>
+			<menu_item_call label="Restablecer los filtros" name="Reset Current"/>
+			<menu_item_call label="Cerrar todas las carpetas" name="Close All Folders"/>
+			<menu_item_call label="Vaciar la papelera" name="Empty Trash"/>
+		</menu>
+		<menu label="Crear" name="Create">
+			<menu_item_call label="Carpeta nueva" name="New Folder"/>
+			<menu_item_call label="Script nuevo" name="New Script"/>
+			<menu_item_call label="Nota nueva" name="New Note"/>
+			<menu_item_call label="Gesto nuevo" name="New Gesture"/>
+			<menu name="New Clothes">
+				<menu_item_call label="Falda nueva" name="New Shirt"/>
+				<menu_item_call label="Pantalones nuevos" name="New Pants"/>
+				<menu_item_call label="Zapatos nuevos" name="New Shoes"/>
+				<menu_item_call label="Calcetines nuevos" name="New Socks"/>
+				<menu_item_call label="Chaqueta nueva" name="New Jacket"/>
+				<menu_item_call label="Falda nueva" name="New Skirt"/>
+				<menu_item_call label="Guantes nuevos" name="New Gloves"/>
+				<menu_item_call label="Camiseta nueva" name="New Undershirt"/>
+				<menu_item_call label="Ropa interior nueva" name="New Underpants"/>
+			</menu>
+			<menu name="New Body Parts">
+				<menu_item_call label="Forma nueva" name="New Shape"/>
+				<menu_item_call label="Piel nueva" name="New Skin"/>
+				<menu_item_call label="Pelo nuevo" name="New Hair"/>
+				<menu_item_call label="Ojos nuevos" name="New Eyes"/>
+			</menu>
+		</menu>
+		<menu label="Ordenar" name="Sort">
+			<menu_item_check label="Por el nombre" name="By Name"/>
+			<menu_item_check label="Por la fecha" name="By Date"/>
+			<menu_item_check label="Las carpetas, siempre por la fecha" name="Folders Always By Name"/>
+			<menu_item_check label="Las carpetas del sistema, arriba" name="System Folders To Top"/>
+		</menu>
+	</menu_bar>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml
index 543e75867b..dfe0b8e520 100644
--- a/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml
@@ -1,85 +1,85 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="item properties" title="Propiedades del ítem del inventario">
-	<text name="LabelItemNameTitle">
-		Nombre:
-	</text>
-	<text name="LabelItemDescTitle">
-		Descripción:
-	</text>
-	<text name="LabelCreatorTitle">
-		Creador:
-	</text>
-	<text name="LabelCreatorName">
-		Nicole Linden
-	</text>
-	<button label="Perfil..." label_selected="" name="BtnCreator"/>
-	<text name="LabelOwnerTitle">
-		Propietario:
-	</text>
-	<text name="LabelOwnerName">
-		Thrax Linden
-	</text>
-	<button label="Perfil..." label_selected="" name="BtnOwner"/>
-	<text name="LabelAcquiredTitle">
-		Adquirido:
-	</text>
-	<text name="LabelAcquiredDate">
-		May Mié 24 12:50:46 2006
-	</text>
-	<text name="OwnerLabel">
-		Usted puede:
-	</text>
-	<check_box label="Modificarlo" name="CheckOwnerModify"/>
-	<check_box label="Copiarlo" name="CheckOwnerCopy"/>
-	<check_box label="Venderlo/darlo" name="CheckOwnerTransfer"/>
-	<text name="BaseMaskDebug">
-		B:
-	</text>
-	<text name="OwnerMaskDebug">
-		O:
-	</text>
-	<text name="GroupMaskDebug">
-		G:
-	</text>
-	<text name="EveryoneMaskDebug">
-		E:
-	</text>
-	<text name="NextMaskDebug">
-		N:
-	</text>
-	<check_box label="Compartir con el grupo" name="CheckShareWithGroup"/>
-	<check_box label="Permitir a cualquiera que lo copie" name="CheckEveryoneCopy"/>
-	<text name="NextOwnerLabel">
-		El próximo propietario puede:
-	</text>
-	<check_box label="Modificarlo" name="CheckNextOwnerModify"/>
-	<check_box label="Copiarlo" name="CheckNextOwnerCopy"/>
-	<check_box label="Revenderlo/darlo" name="CheckNextOwnerTransfer"/>
-	<text name="SaleLabel">
-		Marcar ítem como:
-	</text>
-	<check_box label="En venta" name="CheckPurchase"/>
-	<radio_group name="RadioSaleType">
-		<radio_item name="radio">
-			Original
-		</radio_item>
-		<radio_item name="radio2">
-			Copia
-		</radio_item>
-	</radio_group>
-	<text name="TextPrice">
-		Precio:  L$
-	</text>
-	<string name="unknown">
-		(desconocido)
-	</string>
-	<string name="public">
-		(público)
-	</string>
-	<string name="you_can">
-		Usted puede:
-	</string>
-	<string name="owner_can">
-		El propietario puede:
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="item properties" title="Propiedades del ítem del inventario">
+	<text name="LabelItemNameTitle">
+		Nombre:
+	</text>
+	<text name="LabelItemDescTitle">
+		Descripción:
+	</text>
+	<text name="LabelCreatorTitle">
+		Creador:
+	</text>
+	<text name="LabelCreatorName">
+		Nicole Linden
+	</text>
+	<button label="Perfil..." label_selected="" name="BtnCreator"/>
+	<text name="LabelOwnerTitle">
+		Propietario:
+	</text>
+	<text name="LabelOwnerName">
+		Thrax Linden
+	</text>
+	<button label="Perfil..." label_selected="" name="BtnOwner"/>
+	<text name="LabelAcquiredTitle">
+		Adquirido:
+	</text>
+	<text name="LabelAcquiredDate">
+		May Mié 24 12:50:46 2006
+	</text>
+	<text name="OwnerLabel">
+		Usted puede:
+	</text>
+	<check_box label="Modificarlo" name="CheckOwnerModify"/>
+	<check_box label="Copiarlo" name="CheckOwnerCopy"/>
+	<check_box label="Venderlo/darlo" name="CheckOwnerTransfer"/>
+	<text name="BaseMaskDebug">
+		B:
+	</text>
+	<text name="OwnerMaskDebug">
+		O:
+	</text>
+	<text name="GroupMaskDebug">
+		G:
+	</text>
+	<text name="EveryoneMaskDebug">
+		E:
+	</text>
+	<text name="NextMaskDebug">
+		N:
+	</text>
+	<check_box label="Compartir con el grupo" name="CheckShareWithGroup"/>
+	<check_box label="Permitir a cualquiera que lo copie" name="CheckEveryoneCopy"/>
+	<text name="NextOwnerLabel">
+		El próximo propietario puede:
+	</text>
+	<check_box label="Modificarlo" name="CheckNextOwnerModify"/>
+	<check_box label="Copiarlo" name="CheckNextOwnerCopy"/>
+	<check_box label="Revenderlo/darlo" name="CheckNextOwnerTransfer"/>
+	<text name="SaleLabel">
+		Marcar ítem como:
+	</text>
+	<check_box label="En venta" name="CheckPurchase"/>
+	<radio_group name="RadioSaleType">
+		<radio_item name="radio">
+			Original
+		</radio_item>
+		<radio_item name="radio2">
+			Copia
+		</radio_item>
+	</radio_group>
+	<text name="TextPrice">
+		Precio:  L$
+	</text>
+	<string name="unknown">
+		(desconocido)
+	</string>
+	<string name="public">
+		(público)
+	</string>
+	<string name="you_can">
+		Usted puede:
+	</string>
+	<string name="owner_can">
+		El propietario puede:
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml
index fc3e6912c3..d341de17e9 100644
--- a/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml
@@ -1,24 +1,24 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Inventory Finder" title="ítems_recientes_del_inventario">
-	<check_box label="Animaciones" name="check_animation"/>
-	<check_box label="Tarjetas de visita" name="check_calling_card"/>
-	<check_box label="Ropa" name="check_clothing"/>
-	<check_box label="Gestos" name="check_gesture"/>
-	<check_box label="Hitos" name="check_landmark"/>
-	<check_box label="Notas" name="check_notecard"/>
-	<check_box label="Objetos" name="check_object"/>
-	<check_box label="Scripts" name="check_script"/>
-	<check_box label="Sonidos" name="check_sound"/>
-	<check_box label="Texturas" name="check_texture"/>
-	<check_box label="Fotos" name="check_snapshot"/>
-	<button label="Todo" label_selected="Todo" name="All"/>
-	<button label="Nada" label_selected="Nada" name="None"/>
-	<check_box label="Mostrar siempre las carpetas" name="check_show_empty"/>
-	<check_box label="Desde el fin de sesión" name="check_since_logoff"/>
-	<text length="1" name="- OR -" type="string">
-		- O -
-	</text>
-	<spinner label="horas atrás" name="spin_hours_ago"/>
-	<spinner label="días atrás" name="spin_days_ago"/>
-	<button label="Cerrar" label_selected="Cerrar" name="Close"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Inventory Finder" title="ítems_recientes_del_inventario">
+	<check_box label="Animaciones" name="check_animation"/>
+	<check_box label="Tarjetas de visita" name="check_calling_card"/>
+	<check_box label="Ropa" name="check_clothing"/>
+	<check_box label="Gestos" name="check_gesture"/>
+	<check_box label="Hitos" name="check_landmark"/>
+	<check_box label="Notas" name="check_notecard"/>
+	<check_box label="Objetos" name="check_object"/>
+	<check_box label="Scripts" name="check_script"/>
+	<check_box label="Sonidos" name="check_sound"/>
+	<check_box label="Texturas" name="check_texture"/>
+	<check_box label="Fotos" name="check_snapshot"/>
+	<button label="Todo" label_selected="Todo" name="All"/>
+	<button label="Nada" label_selected="Nada" name="None"/>
+	<check_box label="Mostrar siempre las carpetas" name="check_show_empty"/>
+	<check_box label="Desde el fin de sesión" name="check_since_logoff"/>
+	<text length="1" name="- OR -" type="string">
+		- O -
+	</text>
+	<spinner label="horas atrás" name="spin_hours_ago"/>
+	<spinner label="días atrás" name="spin_days_ago"/>
+	<button label="Cerrar" label_selected="Cerrar" name="Close"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_land_holdings.xml b/indra/newview/skins/default/xui/es/floater_land_holdings.xml
index 93f219a00f..7c18e63155 100644
--- a/indra/newview/skins/default/xui/es/floater_land_holdings.xml
+++ b/indra/newview/skins/default/xui/es/floater_land_holdings.xml
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="land holdings floater" title="Mi terreno">
-	<scroll_list name="parcel list">
-		<column label="Nombre" name="name"/>
-		<column label="Localización" name="location"/>
-		<column label="Superficie" name="area"/>
-		<column label="" name="hidden"/>
-	</scroll_list>
-	<button label="Teleportar" label_selected="Teleportar" name="Teleport" tool_tip="Teleportar al centro de este terreno."/>
-	<button label="Mostrar en el mapa" label_selected="Mostrar en el mapa" name="Show on Map" tool_tip="Mostrar este terreno en el mapa del mundo."/>
-	<text name="contrib_label">
-		Contribuciones a sus grupos:
-	</text>
-	<scroll_list name="grant list">
-		<column label="Grupo" name="group"/>
-		<column label="Superficie" name="area"/>
-	</scroll_list>
-	<text name="allowed_label">
-		Propiedades de terreno permitidas en el plan de pago actual:
-	</text>
-	<text name="allowed_text">
-		[AREA] m²
-	</text>
-	<text name="current_label">
-		Propiedades de terreno actuales:
-	</text>
-	<text name="current_text">
-		[AREA] m²
-	</text>
-	<text name="available_label">
-		Disponible para compras de terreno:
-	</text>
-	<text name="available_text">
-		[AREA] m²
-	</text>
-	<string name="area_string">
-		[AREA] m²
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="land holdings floater" title="Mi terreno">
+	<scroll_list name="parcel list">
+		<column label="Nombre" name="name"/>
+		<column label="Localización" name="location"/>
+		<column label="Superficie" name="area"/>
+		<column label="" name="hidden"/>
+	</scroll_list>
+	<button label="Teleportar" label_selected="Teleportar" name="Teleport" tool_tip="Teleportar al centro de este terreno."/>
+	<button label="Mostrar en el mapa" label_selected="Mostrar en el mapa" name="Show on Map" tool_tip="Mostrar este terreno en el mapa del mundo."/>
+	<text name="contrib_label">
+		Contribuciones a sus grupos:
+	</text>
+	<scroll_list name="grant list">
+		<column label="Grupo" name="group"/>
+		<column label="Superficie" name="area"/>
+	</scroll_list>
+	<text name="allowed_label">
+		Propiedades de terreno permitidas en el plan de pago actual:
+	</text>
+	<text name="allowed_text">
+		[AREA] m²
+	</text>
+	<text name="current_label">
+		Propiedades de terreno actuales:
+	</text>
+	<text name="current_text">
+		[AREA] m²
+	</text>
+	<text name="available_label">
+		Disponible para compras de terreno:
+	</text>
+	<text name="available_text">
+		[AREA] m²
+	</text>
+	<string name="area_string">
+		[AREA] m²
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/es/floater_live_lsleditor.xml
index a2592c58d7..00a6995575 100644
--- a/indra/newview/skins/default/xui/es/floater_live_lsleditor.xml
+++ b/indra/newview/skins/default/xui/es/floater_live_lsleditor.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="script ed float" title="Script: script nuevo">
-	<button label="Reiniciar" label_selected="Reiniciar" name="Reset"/>
-	<check_box label="Ejecutándose" name="running"/>
-	<check_box label="Mono" name="mono"/>
-	<string name="not_allowed">
-		No está autorizado para ver este script.
-	</string>
-	<string name="script_running">
-		Ejecutándose
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="script ed float" title="Script: script nuevo">
+	<button label="Reiniciar" label_selected="Reiniciar" name="Reset"/>
+	<check_box label="Ejecutándose" name="running"/>
+	<check_box label="Mono" name="mono"/>
+	<string name="not_allowed">
+		No está autorizado para ver este script.
+	</string>
+	<string name="script_running">
+		Ejecutándose
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_moveview.xml b/indra/newview/skins/default/xui/es/floater_moveview.xml
index a449e714c4..a5cd2f3097 100644
--- a/indra/newview/skins/default/xui/es/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/es/floater_moveview.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="move floater" title="">
-	<button label="" label_selected="" name="turn left btn" tool_tip="Girar a la izquierda"/>
-	<button label="" label_selected="" name="turn right btn" tool_tip="Girar a la derecha"/>
-	<button label="" label_selected="" name="move up btn" tool_tip="Saltar o ascender"/>
-	<button label="" label_selected="" name="move down btn" tool_tip="Agacharse o descender"/>
-	<joystick_slide name="slide left btn" tool_tip="Ir hacia la izquierda"/>
-	<joystick_slide name="slide right btn" tool_tip="Ir hacia la derecha"/>
-	<joystick_turn name="forward btn" tool_tip="Ir hacia adelante"/>
-	<joystick_turn name="backward btn" tool_tip="Ir hacia atrás"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="move floater" title="">
+	<button label="" label_selected="" name="turn left btn" tool_tip="Girar a la izquierda"/>
+	<button label="" label_selected="" name="turn right btn" tool_tip="Girar a la derecha"/>
+	<button label="" label_selected="" name="move up btn" tool_tip="Saltar o ascender"/>
+	<button label="" label_selected="" name="move down btn" tool_tip="Agacharse o descender"/>
+	<joystick_slide name="slide left btn" tool_tip="Ir hacia la izquierda"/>
+	<joystick_slide name="slide right btn" tool_tip="Ir hacia la derecha"/>
+	<joystick_turn name="forward btn" tool_tip="Ir hacia adelante"/>
+	<joystick_turn name="backward btn" tool_tip="Ir hacia atrás"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_openobject.xml b/indra/newview/skins/default/xui/es/floater_openobject.xml
index fced746cdd..c7846afa6a 100644
--- a/indra/newview/skins/default/xui/es/floater_openobject.xml
+++ b/indra/newview/skins/default/xui/es/floater_openobject.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="objectcontents" title="Contenido del objeto">
-	<text length="1" name="object_name" type="string">
-		[DESC]:
-	</text>
-	<button label="Copiar al inventario" label_selected="Copiar al inventario" name="copy_to_inventory_button"/>
-	<button label="Copiar y vestirse" label_selected="Copiar y vestirse" name="copy_and_wear_button"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="objectcontents" title="Contenido del objeto">
+	<text length="1" name="object_name" type="string">
+		[DESC]:
+	</text>
+	<button label="Copiar al inventario" label_selected="Copiar al inventario" name="copy_to_inventory_button"/>
+	<button label="Copiar y vestirse" label_selected="Copiar y vestirse" name="copy_and_wear_button"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_pay.xml b/indra/newview/skins/default/xui/es/floater_pay.xml
index 8cce1fe9b7..9770e90bf4 100644
--- a/indra/newview/skins/default/xui/es/floater_pay.xml
+++ b/indra/newview/skins/default/xui/es/floater_pay.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Give Money" title="">
-	<button label="1 L$" label_selected="1 L$" name="fastpay 1"/>
-	<button label="5 L$" label_selected="5 L$" name="fastpay 5"/>
-	<button label="10 L$" label_selected="10 L$" name="fastpay 10"/>
-	<button label="20 L$" label_selected="20 L$" name="fastpay 20"/>
-	<button label="Pagar" label_selected="Pagar" name="pay btn"/>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel btn"/>
-	<text length="1" name="payee_label" type="string">
-		Pagar al residente:
-	</text>
-	<text length="1" name="payee_name" type="string">
-		[FIRST] [LAST]
-	</text>
-	<text length="1" name="fastpay text" type="string">
-		Pago rápido:
-	</text>
-	<text length="1" name="amount text" type="string">
-		Cantidad:
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Give Money" title="">
+	<button label="1 L$" label_selected="1 L$" name="fastpay 1"/>
+	<button label="5 L$" label_selected="5 L$" name="fastpay 5"/>
+	<button label="10 L$" label_selected="10 L$" name="fastpay 10"/>
+	<button label="20 L$" label_selected="20 L$" name="fastpay 20"/>
+	<button label="Pagar" label_selected="Pagar" name="pay btn"/>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel btn"/>
+	<text length="1" name="payee_label" type="string">
+		Pagar al residente:
+	</text>
+	<text length="1" name="payee_name" type="string">
+		[FIRST] [LAST]
+	</text>
+	<text length="1" name="fastpay text" type="string">
+		Pago rápido:
+	</text>
+	<text length="1" name="amount text" type="string">
+		Cantidad:
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_pay_object.xml b/indra/newview/skins/default/xui/es/floater_pay_object.xml
index 2885d9a785..86b3af76f8 100644
--- a/indra/newview/skins/default/xui/es/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/es/floater_pay_object.xml
@@ -1,30 +1,30 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Give Money" title="">
-	<text length="1" name="payee_group" type="string">
-		Pagar al grupo:
-	</text>
-	<text length="1" name="payee_resident" type="string">
-		Pagar al residente:
-	</text>
-	<text length="1" name="payee_name" type="string">
-		[FIRST] [LAST]
-	</text>
-	<text length="1" name="object_name_label" type="string">
-		A través del objeto:
-	</text>
-	<text length="1" name="object_name_text" type="string">
-		...
-	</text>
-	<text length="1" name="fastpay text" type="string">
-		Pago rápido:
-	</text>
-	<text length="1" name="amount text" type="string">
-		Cantidad:
-	</text>
-	<button label="1 L$" label_selected="1 L$" name="fastpay 1"/>
-	<button label="5 L$" label_selected="5 L$" name="fastpay 5"/>
-	<button label="10 L$" label_selected="10 L$" name="fastpay 10"/>
-	<button label="20 L$" label_selected="20 L$" name="fastpay 20"/>
-	<button label="Pagar" label_selected="Pagar" name="pay btn"/>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Give Money" title="">
+	<text length="1" name="payee_group" type="string">
+		Pagar al grupo:
+	</text>
+	<text length="1" name="payee_resident" type="string">
+		Pagar al residente:
+	</text>
+	<text length="1" name="payee_name" type="string">
+		[FIRST] [LAST]
+	</text>
+	<text length="1" name="object_name_label" type="string">
+		A través del objeto:
+	</text>
+	<text length="1" name="object_name_text" type="string">
+		...
+	</text>
+	<text length="1" name="fastpay text" type="string">
+		Pago rápido:
+	</text>
+	<text length="1" name="amount text" type="string">
+		Cantidad:
+	</text>
+	<button label="1 L$" label_selected="1 L$" name="fastpay 1"/>
+	<button label="5 L$" label_selected="5 L$" name="fastpay 5"/>
+	<button label="10 L$" label_selected="10 L$" name="fastpay 10"/>
+	<button label="20 L$" label_selected="20 L$" name="fastpay 20"/>
+	<button label="Pagar" label_selected="Pagar" name="pay btn"/>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_postcard.xml b/indra/newview/skins/default/xui/es/floater_postcard.xml
index 11e319793a..06f8e7294a 100644
--- a/indra/newview/skins/default/xui/es/floater_postcard.xml
+++ b/indra/newview/skins/default/xui/es/floater_postcard.xml
@@ -1,36 +1,36 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Postcard" title="Foto por correo electrónico">
-	<text name="to_label">
-		Correo electrónico del destinatario:
-	</text>
-	<text name="from_label">
-		Su correo electrónico:
-	</text>
-	<text name="name_label">
-		Su nombre:
-	</text>
-	<text name="subject_label">
-		Asunto:
-	</text>
-	<line_editor label="Escriba aquí el asunto." name="subject_form"/>
-	<text name="msg_label">
-		Mensaje:
-	</text>
-	<text_editor name="msg_form">
-		Escriba aquí el mensaje.
-	</text_editor>
-	<text name="fine_print">
-		Si su destinatario se registra en SL, usted conseguirá un bono de referido.
-	</text>
-	<button label="Cancelar" name="cancel_btn"/>
-	<button label="Enviar" name="send_btn"/>
-	<string name="default_subject">
-		Postal desde Second Life.
-	</string>
-	<string name="default_message">
-		¡Mira esto!
-	</string>
-	<string name="upload_message">
-		&quot;Enviando...&quot;
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Postcard" title="Foto por correo electrónico">
+	<text name="to_label">
+		Correo electrónico del destinatario:
+	</text>
+	<text name="from_label">
+		Su correo electrónico:
+	</text>
+	<text name="name_label">
+		Su nombre:
+	</text>
+	<text name="subject_label">
+		Asunto:
+	</text>
+	<line_editor label="Escriba aquí el asunto." name="subject_form"/>
+	<text name="msg_label">
+		Mensaje:
+	</text>
+	<text_editor name="msg_form">
+		Escriba aquí el mensaje.
+	</text_editor>
+	<text name="fine_print">
+		Si su destinatario se registra en SL, usted conseguirá un bono de referido.
+	</text>
+	<button label="Cancelar" name="cancel_btn"/>
+	<button label="Enviar" name="send_btn"/>
+	<string name="default_subject">
+		Postal desde Second Life.
+	</string>
+	<string name="default_message">
+		¡Mira esto!
+	</string>
+	<string name="upload_message">
+		&quot;Enviando...&quot;
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_preferences.xml b/indra/newview/skins/default/xui/es/floater_preferences.xml
index b579316890..56e99e2285 100644
--- a/indra/newview/skins/default/xui/es/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/es/floater_preferences.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Preferences" title="Preferencias">
-	<button label="OK" label_selected="OK" name="OK"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-	<button label="Aplicar" label_selected="Aplicar" name="Apply"/>
-	<button label="Acerca de" label_selected="Acerca de" name="About..."/>
-	<button label="Ayuda" label_selected="Ayuda" name="Help"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Preferences" title="Preferencias">
+	<button label="OK" label_selected="OK" name="OK"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+	<button label="Aplicar" label_selected="Aplicar" name="Apply"/>
+	<button label="Acerca de" label_selected="Acerca de" name="About..."/>
+	<button label="Ayuda" label_selected="Ayuda" name="Help"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_preview_animation.xml b/indra/newview/skins/default/xui/es/floater_preview_animation.xml
index 7a9747f331..cea2273089 100644
--- a/indra/newview/skins/default/xui/es/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/es/floater_preview_animation.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="preview_anim">
-	<text length="1" name="desc txt" type="string">
-		Descripción:
-	</text>
-	<button label="Ejecutarla en el mundo" label_selected="Parar" name="Anim play btn" tool_tip="Ejecutar esta animación de modo que puedan verla los demás."/>
-	<button label="Ejecutarla para usted" label_selected="Parar" name="Anim audition btn" tool_tip="Ejecutar esta animación de modo que sólo la vea usted."/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="preview_anim">
+	<text length="1" name="desc txt" type="string">
+		Descripción:
+	</text>
+	<button label="Ejecutarla en el mundo" label_selected="Parar" name="Anim play btn" tool_tip="Ejecutar esta animación de modo que puedan verla los demás."/>
+	<button label="Ejecutarla para usted" label_selected="Parar" name="Anim audition btn" tool_tip="Ejecutar esta animación de modo que sólo la vea usted."/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_preview_gesture.xml b/indra/newview/skins/default/xui/es/floater_preview_gesture.xml
index acc2bec5d2..4513fc6f3c 100644
--- a/indra/newview/skins/default/xui/es/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/es/floater_preview_gesture.xml
@@ -1,60 +1,60 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="gesture_preview">
-	<string name="stop_txt">
-		Parar
-	</string>
-	<string name="preview_txt">
-		Vista previa
-	</string>
-	<string name="none_text">
-		-- Ninguno --
-	</string>
-	<text name="desc_label">
-		Descripción:
-	</text>
-	<text name="trigger_label">
-		Palabra clave:
-	</text>
-	<text name="replace_text" tool_tip="Reemplaza la/s palabra/s clave con estas palabras. Por ejemplo, si cambia la palabra clave &apos;hola&apos; por &apos;qué tal&apos;, se cambiará en el chat &apos;Quise decir hola&apos; por &apos;Quise decir qué tal&apos; en cuanto realice el gesto.">
-		Reemplazar por:
-	</text>
-	<line_editor name="replace_editor" tool_tip="Reemplaza la/s palabra/s clave con estas palabras. Por ejemplo, si cambia la palabra clave &apos;hola&apos; por &apos;qué tal&apos;, se cambiará en el chat &apos;Quise decir hola&apos; por &apos;Quise decir qué tal&apos; en cuanto realice el gesto."/>
-	<text name="key_label">
-		Atajo de teclado:
-	</text>
-	<combo_box label="Ninguno" name="modifier_combo"/>
-	<combo_box label="Ninguno" name="key_combo"/>
-	<text name="library_label">
-		Biblioteca:
-	</text>
-	<text name="steps_label">
-		Pasos:
-	</text>
-	<scroll_list name="library_list">
-		Animación
-Sonido
-Chat
-Esperar
-	</scroll_list>
-	<button label="Añadir &gt;&gt;" name="add_btn"/>
-	<button label="Hacia arriba" name="up_btn"/>
-	<button label="Hacia abajo" name="down_btn"/>
-	<button label="Quitar" name="delete_btn"/>
-	<text name="help_label">
-		Todos los pasos suceden a la vez, 
-a menos que añada pasos de espera.
-	</text>
-	<radio_group name="animation_trigger_type">
-		<radio_item name="start">
-			Empezar
-		</radio_item>
-		<radio_item name="stop">
-			Parar
-		</radio_item>
-	</radio_group>
-	<check_box label="hasta que las animaciones estén hechas" name="wait_anim_check"/>
-	<check_box label="tiempo en segundos" name="wait_time_check"/>
-	<check_box label="Disponible" name="active_check" tool_tip="Los gestos disponibles pueden realizarse escribiendo en el chat su frase clave o pulsando su tecla de acceso rápido. Generalmente, los gestos pasan a no disponibles cuando hay un conflicto de teclas."/>
-	<button label="Vista previa" name="preview_btn"/>
-	<button label="Guardar" name="save_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="gesture_preview">
+	<string name="stop_txt">
+		Parar
+	</string>
+	<string name="preview_txt">
+		Vista previa
+	</string>
+	<string name="none_text">
+		-- Ninguno --
+	</string>
+	<text name="desc_label">
+		Descripción:
+	</text>
+	<text name="trigger_label">
+		Palabra clave:
+	</text>
+	<text name="replace_text" tool_tip="Reemplaza la/s palabra/s clave con estas palabras. Por ejemplo, si cambia la palabra clave &apos;hola&apos; por &apos;qué tal&apos;, se cambiará en el chat &apos;Quise decir hola&apos; por &apos;Quise decir qué tal&apos; en cuanto realice el gesto.">
+		Reemplazar por:
+	</text>
+	<line_editor name="replace_editor" tool_tip="Reemplaza la/s palabra/s clave con estas palabras. Por ejemplo, si cambia la palabra clave &apos;hola&apos; por &apos;qué tal&apos;, se cambiará en el chat &apos;Quise decir hola&apos; por &apos;Quise decir qué tal&apos; en cuanto realice el gesto."/>
+	<text name="key_label">
+		Atajo de teclado:
+	</text>
+	<combo_box label="Ninguno" name="modifier_combo"/>
+	<combo_box label="Ninguno" name="key_combo"/>
+	<text name="library_label">
+		Biblioteca:
+	</text>
+	<text name="steps_label">
+		Pasos:
+	</text>
+	<scroll_list name="library_list">
+		Animación
+Sonido
+Chat
+Esperar
+	</scroll_list>
+	<button label="Añadir &gt;&gt;" name="add_btn"/>
+	<button label="Hacia arriba" name="up_btn"/>
+	<button label="Hacia abajo" name="down_btn"/>
+	<button label="Quitar" name="delete_btn"/>
+	<text name="help_label">
+		Todos los pasos suceden a la vez, 
+a menos que añada pasos de espera.
+	</text>
+	<radio_group name="animation_trigger_type">
+		<radio_item name="start">
+			Empezar
+		</radio_item>
+		<radio_item name="stop">
+			Parar
+		</radio_item>
+	</radio_group>
+	<check_box label="hasta que las animaciones estén hechas" name="wait_anim_check"/>
+	<check_box label="tiempo en segundos" name="wait_time_check"/>
+	<check_box label="Disponible" name="active_check" tool_tip="Los gestos disponibles pueden realizarse escribiendo en el chat su frase clave o pulsando su tecla de acceso rápido. Generalmente, los gestos pasan a no disponibles cuando hay un conflicto de teclas."/>
+	<button label="Vista previa" name="preview_btn"/>
+	<button label="Guardar" name="save_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_preview_notecard.xml b/indra/newview/skins/default/xui/es/floater_preview_notecard.xml
index a663b23666..2d13e41924 100644
--- a/indra/newview/skins/default/xui/es/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/es/floater_preview_notecard.xml
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="preview notecard" title="Nota:">
-	<button label="Guardar" label_selected="Guardar" name="Save"/>
-	<text length="1" name="desc txt" type="string">
-		Descripción:
-	</text>
-	<text_editor length="1" name="Notecard Editor" type="string">
-		Cargando...
-	</text_editor>
-	<string name="no_object">
-		No se ha podido encontrar el objeto que contiene esta nota.
-	</string>
-	<string name="not_allowed">
-		No está autorizado a ver esta nota.
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="preview notecard" title="Nota:">
+	<button label="Guardar" label_selected="Guardar" name="Save"/>
+	<text length="1" name="desc txt" type="string">
+		Descripción:
+	</text>
+	<text_editor length="1" name="Notecard Editor" type="string">
+		Cargando...
+	</text_editor>
+	<string name="no_object">
+		No se ha podido encontrar el objeto que contiene esta nota.
+	</string>
+	<string name="not_allowed">
+		No está autorizado a ver esta nota.
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_preview_sound.xml b/indra/newview/skins/default/xui/es/floater_preview_sound.xml
index 9b11bdf123..82c01e1d1b 100644
--- a/indra/newview/skins/default/xui/es/floater_preview_sound.xml
+++ b/indra/newview/skins/default/xui/es/floater_preview_sound.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="preview_sound">
-	<text length="1" name="desc txt" type="string">
-		Descripción:
-	</text>
-	<button label="Tocar en el mundo" label_selected="Tocar en el mundo" name="Sound play btn" tool_tip="Tocar este sonido para que puedan oírlo los demás."/>
-	<button label="Oír sólo uno mismo" label_selected="Oír sólo uno mismo" name="Sound audition btn" tool_tip="Tocar este sonido para que sólo pueda oírlo usted."/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="preview_sound">
+	<text length="1" name="desc txt" type="string">
+		Descripción:
+	</text>
+	<button label="Tocar en el mundo" label_selected="Tocar en el mundo" name="Sound play btn" tool_tip="Tocar este sonido para que puedan oírlo los demás."/>
+	<button label="Oír sólo uno mismo" label_selected="Oír sólo uno mismo" name="Sound audition btn" tool_tip="Tocar este sonido para que sólo pueda oírlo usted."/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_preview_texture.xml b/indra/newview/skins/default/xui/es/floater_preview_texture.xml
index 826562c1c2..2fb66f1fdc 100644
--- a/indra/newview/skins/default/xui/es/floater_preview_texture.xml
+++ b/indra/newview/skins/default/xui/es/floater_preview_texture.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="preview_texture">
-	<text length="1" name="desc txt" type="string">
-		Descripción:
-	</text>
-	<text length="1" name="dimensions" type="string">
-		Tamaño: [WIDTH] x [HEIGHT]
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="preview_texture">
+	<text length="1" name="desc txt" type="string">
+		Descripción:
+	</text>
+	<text length="1" name="dimensions" type="string">
+		Tamaño: [WIDTH] x [HEIGHT]
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_report_abuse.xml b/indra/newview/skins/default/xui/es/floater_report_abuse.xml
index b79a10a863..4e1782995c 100644
--- a/indra/newview/skins/default/xui/es/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/es/floater_report_abuse.xml
@@ -1,180 +1,180 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_report_abuse" title="Denuncia de Infracción">
-	<texture_picker label="" name="screenshot"/>
-	<check_box label="Incluir una captura de pantalla" name="screen_check"/>
-	<text name="reporter_title">
-		Denunciante:
-	</text>
-	<text name="reporter_field">
-		Loremipsum Dolorsitamut
-	</text>
-	<text name="sim_title">
-		Región:
-	</text>
-	<text name="sim_field">
-		Nombre de la región
-	</text>
-	<text name="pos_title">
-		Posición:
-	</text>
-	<text name="pos_field">
-		{128.1, 128.1, 15.4}
-	</text>
-	<text name="select_object_label">
-		Pulse el botón y luego el objeto:
-	</text>
-	<button label="" label_selected="" name="pick_btn" tool_tip="Señalar objeto - Identificar un objeto como sujeto de esta denuncia"/>
-	<text name="object_name_label">
-		Nombre:
-	</text>
-	<text name="object_name">
-		Consetetur Sadipscing
-	</text>
-	<text name="owner_name_label">
-		Propietario:
-	</text>
-	<text name="owner_name">
-		Hendrerit Vulputate
-	</text>
-	<combo_box name="category_combo" tool_tip="Categoría -- Elija la categoría que describa mejor esta denuncia">
-		<combo_item name="Select_category">
-			Elegir la categoría
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Edad &gt; Jugar a ser niño
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Edad &gt; Residente adulto en Teen Second Life
-		</combo_item>
-		
-		
-		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Ataque &gt; Sandbox de combate / Zona no segura
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Ataque &gt; Zona segura
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Ataque &gt; Sandbox de prueba de armas
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Comercio &gt; Error en la entrega de productos o servicios
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Indiscreción &gt; Información del mundo real
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Indiscreción &gt; Monitorizar a distancia el chat
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Indiscreción &gt; Información Se Second Life, el chat o los MI
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Perturbando la paz &gt; Abuso de los recursos de la región
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Perturbando la paz &gt; Excesivos objetos con script
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Perturbando la paz &gt; Objeto basura
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Perturbando la paz &gt; Spam (mensajes no pedidos) repetitivo
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Perturbando la paz &gt; Publicidad no deseada
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Fraude &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Fraude &gt; Terreno
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Fraude &gt; Esquemas piramidales o cadenas de cartas
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Fraude &gt; US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Acoso &gt; Anuncios múltiples / Spam visual
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Acoso &gt; Difamación de individuos o grupos
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Acoso &gt; Impedir el movimiento
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Acoso &gt; Acoso sexual
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Acoso &gt; Incitar a, o pedir, que otros violen las Condiciones del Servicio
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Acoso &gt; Abuso verbal
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Indecencia &gt; En general, contenido o conducta ofensivos
-		</combo_item>
-		
-		
-		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Indecencia &gt; Nombre inapropiado del avatar
-		</combo_item>
-		
-		
-		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Infracción de la propiedad intelectual &gt; Eliminación de contenidos
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Infracción de la propiedad intelectual &gt; CopyBot o Exploit (programa malicioso) de permisos
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intolerancia
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Terreno &gt; Abuso de los recursos de un sandbox
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Terreno &gt; Invasión &gt; Objetos/Texturas
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Terreno &gt; Invasión &gt; Partículas
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Terreno &gt; Invasión &gt; Árboles/Plantas
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Apuestas/Juego
-		</combo_item>
-		<combo_item name="Other">
-			Otra
-		</combo_item>
-	</combo_box>
-	<text name="abuser_name_title">
-		Nombre del infractor:
-	</text>
-	<button label="Elegir al residente" label_selected="" name="select_abuser" tool_tip="Elegir de una lista el nombre del infractor"/>
-	<check_box label="No sé el nombre del infractor" name="omit_abuser_name" tool_tip="Marque esto si no puede aportar el nombre del infractor"/>
-	<text name="abuser_name_title2">
-		Localización de la infracción:
-	</text>
-	<text name="sum_title">
-		Resumen:
-	</text>
-	<text name="dscr_title">
-		Detalles:
-	</text>
-	<text name="bug_aviso">
-		Por favor, sea muy concreto sobre la fecha, la localización, la naturaleza de la infracción, el aportar textos relevantes del chat o los MI, y, si es posible, seleccione el objeto.
-	</text>
-	<text name="incomplete_title">
-		Nota: las denuncias incompletas no se investigarán.
-	</text>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
-	<button label="Denunciar la infracción" label_selected="Denunciar la infracción" name="send_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_report_abuse" title="Denuncia de Infracción">
+	<texture_picker label="" name="screenshot"/>
+	<check_box label="Incluir una captura de pantalla" name="screen_check"/>
+	<text name="reporter_title">
+		Denunciante:
+	</text>
+	<text name="reporter_field">
+		Loremipsum Dolorsitamut
+	</text>
+	<text name="sim_title">
+		Región:
+	</text>
+	<text name="sim_field">
+		Nombre de la región
+	</text>
+	<text name="pos_title">
+		Posición:
+	</text>
+	<text name="pos_field">
+		{128.1, 128.1, 15.4}
+	</text>
+	<text name="select_object_label">
+		Pulse el botón y luego el objeto:
+	</text>
+	<button label="" label_selected="" name="pick_btn" tool_tip="Señalar objeto - Identificar un objeto como sujeto de esta denuncia"/>
+	<text name="object_name_label">
+		Nombre:
+	</text>
+	<text name="object_name">
+		Consetetur Sadipscing
+	</text>
+	<text name="owner_name_label">
+		Propietario:
+	</text>
+	<text name="owner_name">
+		Hendrerit Vulputate
+	</text>
+	<combo_box name="category_combo" tool_tip="Categoría -- Elija la categoría que describa mejor esta denuncia">
+		<combo_item name="Select_category">
+			Elegir la categoría
+		</combo_item>
+		<combo_item name="Age__Age_play">
+			Edad &gt; Jugar a ser niño
+		</combo_item>
+		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
+			Edad &gt; Residente adulto en Teen Second Life
+		</combo_item>
+		
+		
+		
+		<combo_item name="Assault__Combat_sandbox___unsafe_area">
+			Ataque &gt; Sandbox de combate / Zona no segura
+		</combo_item>
+		<combo_item name="Assault__Safe_area">
+			Ataque &gt; Zona segura
+		</combo_item>
+		<combo_item name="Assault__Weapons_testing_sandbox">
+			Ataque &gt; Sandbox de prueba de armas
+		</combo_item>
+		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
+			Comercio &gt; Error en la entrega de productos o servicios
+		</combo_item>
+		<combo_item name="Disclosure__Real_world_information">
+			Indiscreción &gt; Información del mundo real
+		</combo_item>
+		<combo_item name="Disclosure__Remotely_monitoring chat">
+			Indiscreción &gt; Monitorizar a distancia el chat
+		</combo_item>
+		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
+			Indiscreción &gt; Información Se Second Life, el chat o los MI
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
+			Perturbando la paz &gt; Abuso de los recursos de la región
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
+			Perturbando la paz &gt; Excesivos objetos con script
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Object_littering">
+			Perturbando la paz &gt; Objeto basura
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Repetitive_spam">
+			Perturbando la paz &gt; Spam (mensajes no pedidos) repetitivo
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
+			Perturbando la paz &gt; Publicidad no deseada
+		</combo_item>
+		<combo_item name="Fraud__L$">
+			Fraude &gt; L$
+		</combo_item>
+		<combo_item name="Fraud__Land">
+			Fraude &gt; Terreno
+		</combo_item>
+		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
+			Fraude &gt; Esquemas piramidales o cadenas de cartas
+		</combo_item>
+		<combo_item name="Fraud__US$">
+			Fraude &gt; US$
+		</combo_item>
+		<combo_item name="Harassment__Advert_farms___visual_spam">
+			Acoso &gt; Anuncios múltiples / Spam visual
+		</combo_item>
+		<combo_item name="Harassment__Defaming_individuals_or_groups">
+			Acoso &gt; Difamación de individuos o grupos
+		</combo_item>
+		<combo_item name="Harassment__Impeding_movement">
+			Acoso &gt; Impedir el movimiento
+		</combo_item>
+		<combo_item name="Harassment__Sexual_harassment">
+			Acoso &gt; Acoso sexual
+		</combo_item>
+		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
+			Acoso &gt; Incitar a, o pedir, que otros violen las Condiciones del Servicio
+		</combo_item>
+		<combo_item name="Harassment__Verbal_abuse">
+			Acoso &gt; Abuso verbal
+		</combo_item>
+		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
+			Indecencia &gt; En general, contenido o conducta ofensivos
+		</combo_item>
+		
+		
+		
+		<combo_item name="Indecency__Inappropriate_avatar_name">
+			Indecencia &gt; Nombre inapropiado del avatar
+		</combo_item>
+		
+		
+		
+		<combo_item name="Intellectual_property_infringement_Content_Removal">
+			Infracción de la propiedad intelectual &gt; Eliminación de contenidos
+		</combo_item>
+		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
+			Infracción de la propiedad intelectual &gt; CopyBot o Exploit (programa malicioso) de permisos
+		</combo_item>
+		<combo_item name="Intolerance">
+			Intolerancia
+		</combo_item>
+		<combo_item name="Land__Abuse_of_sandbox_resources">
+			Terreno &gt; Abuso de los recursos de un sandbox
+		</combo_item>
+		<combo_item name="Land__Encroachment__Objects_textures">
+			Terreno &gt; Invasión &gt; Objetos/Texturas
+		</combo_item>
+		<combo_item name="Land__Encroachment__Particles">
+			Terreno &gt; Invasión &gt; Partículas
+		</combo_item>
+		<combo_item name="Land__Encroachment__Trees_plants">
+			Terreno &gt; Invasión &gt; Árboles/Plantas
+		</combo_item>
+		<combo_item name="Wagering_gambling">
+			Apuestas/Juego
+		</combo_item>
+		<combo_item name="Other">
+			Otra
+		</combo_item>
+	</combo_box>
+	<text name="abuser_name_title">
+		Nombre del infractor:
+	</text>
+	<button label="Elegir al residente" label_selected="" name="select_abuser" tool_tip="Elegir de una lista el nombre del infractor"/>
+	<check_box label="No sé el nombre del infractor" name="omit_abuser_name" tool_tip="Marque esto si no puede aportar el nombre del infractor"/>
+	<text name="abuser_name_title2">
+		Localización de la infracción:
+	</text>
+	<text name="sum_title">
+		Resumen:
+	</text>
+	<text name="dscr_title">
+		Detalles:
+	</text>
+	<text name="bug_aviso">
+		Por favor, sea muy concreto sobre la fecha, la localización, la naturaleza de la infracción, el aportar textos relevantes del chat o los MI, y, si es posible, seleccione el objeto.
+	</text>
+	<text name="incomplete_title">
+		Nota: las denuncias incompletas no se investigarán.
+	</text>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
+	<button label="Denunciar la infracción" label_selected="Denunciar la infracción" name="send_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_script_debug.xml b/indra/newview/skins/default/xui/es/floater_script_debug.xml
index 301d4837a8..e33ffb7d96 100644
--- a/indra/newview/skins/default/xui/es/floater_script_debug.xml
+++ b/indra/newview/skins/default/xui/es/floater_script_debug.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<multi_floater name="script debug floater" title="Alerta/Error de los scripts">
-	<tab_container name="Preview Tabs">
-		<floater label="Script" name="all_scripts" title="[Todos los scripts]"/>
-	</tab_container>
-</multi_floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<multi_floater name="script debug floater" title="Alerta/Error de los scripts">
+	<tab_container name="Preview Tabs">
+		<floater label="Script" name="all_scripts" title="[Todos los scripts]"/>
+	</tab_container>
+</multi_floater>
diff --git a/indra/newview/skins/default/xui/es/floater_script_preview.xml b/indra/newview/skins/default/xui/es/floater_script_preview.xml
index eb1b5440cb..f8d143af9d 100644
--- a/indra/newview/skins/default/xui/es/floater_script_preview.xml
+++ b/indra/newview/skins/default/xui/es/floater_script_preview.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="preview lsl text" title="Script: script de rotación">
-	<text length="1" name="desc txt" type="string">
-		Descripción:
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="preview lsl text" title="Script: script de rotación">
+	<text length="1" name="desc txt" type="string">
+		Descripción:
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_script_queue.xml b/indra/newview/skins/default/xui/es/floater_script_queue.xml
index ecfaecc2b9..dcd2bfe5b0 100644
--- a/indra/newview/skins/default/xui/es/floater_script_queue.xml
+++ b/indra/newview/skins/default/xui/es/floater_script_queue.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="queue" title="Reinicio">
-	<button label="Cerrar" label_selected="Cerrar" name="close"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="queue" title="Reinicio">
+	<button label="Cerrar" label_selected="Cerrar" name="close"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_script_search.xml b/indra/newview/skins/default/xui/es/floater_script_search.xml
index 738260b05b..9cabed9e36 100644
--- a/indra/newview/skins/default/xui/es/floater_script_search.xml
+++ b/indra/newview/skins/default/xui/es/floater_script_search.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="script search" title="Buscar en el script">
-	<check_box label="Indiferente mays./mins." name="case_text"/>
-	<button label="Buscar" label_selected="Buscar" name="search_btn"/>
-	<button label="Reemplazar" label_selected="Reemplazar" name="replace_btn"/>
-	<button label="Reemplazar todos" label_selected="Reemplazar todos" name="replace_all_btn"/>
-	<text length="1" name="txt" type="string">
-		Buscar
-	</text>
-	<text length="1" name="txt2" type="string">
-		Reemplazar
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="script search" title="Buscar en el script">
+	<check_box label="Indiferente mays./mins." name="case_text"/>
+	<button label="Buscar" label_selected="Buscar" name="search_btn"/>
+	<button label="Reemplazar" label_selected="Reemplazar" name="replace_btn"/>
+	<button label="Reemplazar todos" label_selected="Reemplazar todos" name="replace_all_btn"/>
+	<text length="1" name="txt" type="string">
+		Buscar
+	</text>
+	<text length="1" name="txt2" type="string">
+		Reemplazar
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_sell_land.xml b/indra/newview/skins/default/xui/es/floater_sell_land.xml
index 0276ff0d3c..8d47bad6dc 100644
--- a/indra/newview/skins/default/xui/es/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/es/floater_sell_land.xml
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="sell land" title="Vender el terreno">
-	<text name="info_parcel_label">
-		Parcela:
-	</text>
-	<text name="info_parcel">
-		NOMBRE DE LA PARCELA
-	</text>
-	<text name="info_size_label">
-		Tamaño:
-	</text>
-	<text name="info_size">
-		[AREA] m²
-	</text>
-	<text name="info_action">
-		Vender esta parcela:
-	</text>
-	<text name="price_label">
-		Marque un precio:
-	</text>
-	<text name="price_text">
-		Elija un precio adecuado para esta parcela.
-	</text>
-	<text name="price_ld">
-		L$
-	</text>
-	<text name="price_per_m">
-		([PER_METER] L$ por metro cuadrado)
-	</text>
-	<text name="sell_to_label">
-		Vender este terreno a:
-	</text>
-	<text name="sell_to_text">
-		Elija si venderlo a cualquiera o a un comprador concreto.
-	</text>
-	<combo_box name="sell_to">
-		<combo_item name="--selectone--">
-			-- seleccione --
-		</combo_item>
-		<combo_item name="Anyone">
-			Cualquiera
-		</combo_item>
-		<combo_item name="Specificuser:">
-			Un usuario concreto:
-		</combo_item>
-	</combo_box>
-	<button label="Seleccionar..." name="sell_to_select_agent"/>
-	<text name="sell_objects_label">
-		¿Vender los objetos con el terreno?
-	</text>
-	<text name="sell_objects_text">
-		Los objetos transferibles del propietario del terreno cambiarán de propietario.
-	</text>
-	<radio_group name="sell_objects">
-		<radio_item name="no">
-			No, mantener la propiedad de los objetos
-		</radio_item>
-		<radio_item name="yes">
-			Sí, vender los objetos con el terreno
-		</radio_item>
-	</radio_group>
-	<button label="Mostrar los objetos" name="show_objects"/>
-	<text name="nag_message_label">
-		RECUERDE: todas las ventas son definitivas.
-	</text>
-	<button label="Poner el terreno en venta" name="sell_btn"/>
-	<button label="Cancelar" name="cancel_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="sell land" title="Vender el terreno">
+	<text name="info_parcel_label">
+		Parcela:
+	</text>
+	<text name="info_parcel">
+		NOMBRE DE LA PARCELA
+	</text>
+	<text name="info_size_label">
+		Tamaño:
+	</text>
+	<text name="info_size">
+		[AREA] m²
+	</text>
+	<text name="info_action">
+		Vender esta parcela:
+	</text>
+	<text name="price_label">
+		Marque un precio:
+	</text>
+	<text name="price_text">
+		Elija un precio adecuado para esta parcela.
+	</text>
+	<text name="price_ld">
+		L$
+	</text>
+	<text name="price_per_m">
+		([PER_METER] L$ por metro cuadrado)
+	</text>
+	<text name="sell_to_label">
+		Vender este terreno a:
+	</text>
+	<text name="sell_to_text">
+		Elija si venderlo a cualquiera o a un comprador concreto.
+	</text>
+	<combo_box name="sell_to">
+		<combo_box.item name="--selectone--">
+			-- seleccione --
+		</combo_box.item>
+		<combo_box.item name="Anyone">
+			Cualquiera
+		</combo_box.item>
+		<combo_box.item name="Specificuser:">
+			Un usuario concreto:
+		</combo_box.item>
+	</combo_box>
+	<button label="Seleccionar..." name="sell_to_select_agent"/>
+	<text name="sell_objects_label">
+		¿Vender los objetos con el terreno?
+	</text>
+	<text name="sell_objects_text">
+		Los objetos transferibles del propietario del terreno cambiarán de propietario.
+	</text>
+	<radio_group name="sell_objects">
+		<radio_item name="no">
+			No, mantener la propiedad de los objetos
+		</radio_item>
+		<radio_item name="yes">
+			Sí, vender los objetos con el terreno
+		</radio_item>
+	</radio_group>
+	<button label="Mostrar los objetos" name="show_objects"/>
+	<text name="nag_message_label">
+		RECUERDE: todas las ventas son definitivas.
+	</text>
+	<button label="Poner el terreno en venta" name="sell_btn"/>
+	<button label="Cancelar" name="cancel_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_settings_debug.xml b/indra/newview/skins/default/xui/es/floater_settings_debug.xml
index 3387a3d4f2..28fb1478d3 100644
--- a/indra/newview/skins/default/xui/es/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/es/floater_settings_debug.xml
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="settings_debug" title="Configuración del depurador">
-	<combo_box name="boolean_combo">
-		<combo_item name="TRUE">
-			TRUE
-		</combo_item>
-		<combo_item name="FALSE">
-			FALSE
-		</combo_item>
-	</combo_box>
-	<color_swatch label="Color" name="color_swatch"/>
-	<spinner label="x" name="val_spinner_1"/>
-	<spinner label="x" name="val_spinner_2"/>
-	<spinner label="x" name="val_spinner_3"/>
-	<spinner label="x" name="val_spinner_4"/>
-	<button label="Volver a las opciones por defecto" name="default_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="settings_debug" title="Configuración del depurador">
+	<combo_box name="boolean_combo">
+		<combo_box.item name="TRUE">
+			TRUE
+		</combo_box.item>
+		<combo_box.item name="FALSE">
+			FALSE
+		</combo_box.item>
+	</combo_box>
+	<color_swatch label="Color" name="color_swatch"/>
+	<spinner label="x" name="val_spinner_1"/>
+	<spinner label="x" name="val_spinner_2"/>
+	<spinner label="x" name="val_spinner_3"/>
+	<spinner label="x" name="val_spinner_4"/>
+	<button label="Volver a las opciones por defecto" name="default_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_snapshot.xml b/indra/newview/skins/default/xui/es/floater_snapshot.xml
index 72659c58a2..0461f996f6 100644
--- a/indra/newview/skins/default/xui/es/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/es/floater_snapshot.xml
@@ -1,137 +1,133 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Snapshot" title="Vista previa de la foto">
-	<text name="type_label">
-		Destino de la foto
-	</text>
-	<radio_group label="Tipo de la foto" name="snapshot_type_radio">
-		<radio_item name="postcard">
-			Enviar por correo electrónico
-		</radio_item>
-		<radio_item name="texture">
-			Guardarla en su inventario ([AMOUNT] L$)
-		</radio_item>
-		<radio_item name="local">
-			Guardarla en su disco duro
-		</radio_item>
-	</radio_group>
-	<text name="file_size_label">
-		Tamaño del archivo: [SIZE] KB
-	</text>
-	<button label="Actualizar la foto" name="new_snapshot_btn"/>
-	<button label="Enviar" name="send_btn"/>
-	<button label="Guardar ([AMOUNT] L$)" name="upload_btn"/>
-	<flyout_button label="Guardar" name="save_btn" tool_tip="Guardar la imagen en un archivo">
-		<flyout_button_item name="save_item">
-			Guardar
-		</flyout_button_item>
-		<flyout_button_item name="saveas_item">
-			Guardar como...
-		</flyout_button_item>
-	</flyout_button>
-	<button label="Cancelar" name="discard_btn"/>
-	<button label="Más &gt;&gt;" name="more_btn" tool_tip="Opciones avanzadas"/>
-	<button label="&lt;&lt; Menos" name="less_btn" tool_tip="Opciones avanzadas"/>
-	<text name="type_label2">
-		Tamaño
-	</text>
-	<text name="format_label">
-		Formato
-	</text>
-	<combo_box label="Resolución" name="postcard_size_combo">
-		<combo_item name="CurrentWindow">
-			Ventana actual
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="Custom">
-			Personalizar
-		</combo_item>
-	</combo_box>
-	<combo_box label="Resolución" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
-			Ventana actual
-		</combo_item>
-		<combo_item name="Small(128x128)">
-			Pequeño (128x128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
-			Medio (256x256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
-			Grande (512x512)
-		</combo_item>
-		<combo_item name="Custom">
-			Personalizar
-		</combo_item>
-	</combo_box>
-	<combo_box label="Resolución" name="local_size_combo">
-		<combo_item name="CurrentWindow">
-			Ventana actual
-		</combo_item>
-		<combo_item name="320x240">
-			320x240
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="1280x1024">
-			1280x1024
-		</combo_item>
-		<combo_item name="1600x1200">
-			1600x1200
-		</combo_item>
-		<combo_item name="Custom">
-			Personalizar
-		</combo_item>
-	</combo_box>
-	<combo_box label="Formato" name="local_format_combo">
-		<combo_item name="PNG">
-			PNG
-		</combo_item>
-		<combo_item name="JPEG">
-			JPEG
-		</combo_item>
-		<combo_item name="BMP">
-			BMP
-		</combo_item>
-	</combo_box>
-	<spinner label="Ancho" name="snapshot_width"/>
-	<spinner label="Alto" name="snapshot_height"/>
-	<check_box label="Mantener las proporciones" name="keep_aspect_check"/>
-	<slider label="Calidad de la imagen" name="image_quality_slider"/>
-	<text name="layer_type_label">
-		Captura:
-	</text>
-	<combo_box label="Capas de la imagen" name="layer_types">
-		<combo_item name="Colors">
-			Colores
-		</combo_item>
-		<combo_item name="Depth">
-			Profundidad
-		</combo_item>
-		<combo_item name="ObjectMattes">
-			Bandas negras
-		</combo_item>
-	</combo_box>
-	<check_box label="Incluir la interfaz en la foto" name="ui_check"/>
-	<check_box label="Incluir los HUD en la foto" name="hud_check"/>
-	<check_box label="Mantenerla abierta tras guardarla" name="keep_open_check"/>
-	<check_box label="Congelar la toma (vista previa en pantalla completa)" name="freeze_frame_check"/>
-	<check_box label="Actualizar automáticamente" name="auto_snapshot_check"/>
-	<string name="unknown">
-		desconocido
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Snapshot" title="Vista previa de la foto">
+	<text name="type_label">
+		Destino de la foto
+	</text>
+	<radio_group label="Tipo de la foto" name="snapshot_type_radio">
+		<radio_item name="postcard">
+			Enviar por correo electrónico
+		</radio_item>
+		<radio_item name="texture">
+			Guardarla en su inventario ([AMOUNT] L$)
+		</radio_item>
+		<radio_item name="local">
+			Guardarla en su disco duro
+		</radio_item>
+	</radio_group>
+	<text name="file_size_label">
+		Tamaño del archivo: [SIZE] KB
+	</text>
+	<button label="Actualizar la foto" name="new_snapshot_btn"/>
+	<button label="Enviar" name="send_btn"/>
+	<button label="Guardar ([AMOUNT] L$)" name="upload_btn"/>
+	<flyout_button label="Guardar" name="save_btn" tool_tip="Guardar la imagen en un archivo">
+		<flyout_button_item name="save_item" label="Guardar"/>
+		<flyout_button_item name="saveas_item" label="Guardar como..."/>
+	</flyout_button>
+	<button label="Cancelar" name="discard_btn"/>
+	<button label="Más &gt;&gt;" name="more_btn" tool_tip="Opciones avanzadas"/>
+	<button label="&lt;&lt; Menos" name="less_btn" tool_tip="Opciones avanzadas"/>
+	<text name="type_label2">
+		Tamaño
+	</text>
+	<text name="format_label">
+		Formato
+	</text>
+	<combo_box label="Resolución" name="postcard_size_combo">
+		<combo_item name="CurrentWindow">
+			Ventana actual
+		</combo_item>
+		<combo_item name="640x480">
+			640x480
+		</combo_item>
+		<combo_item name="800x600">
+			800x600
+		</combo_item>
+		<combo_item name="1024x768">
+			1024x768
+		</combo_item>
+		<combo_item name="Custom">
+			Personalizar
+		</combo_item>
+	</combo_box>
+	<combo_box label="Resolución" name="texture_size_combo">
+		<combo_item name="CurrentWindow">
+			Ventana actual
+		</combo_item>
+		<combo_item name="Small(128x128)">
+			Pequeño (128x128)
+		</combo_item>
+		<combo_item name="Medium(256x256)">
+			Medio (256x256)
+		</combo_item>
+		<combo_item name="Large(512x512)">
+			Grande (512x512)
+		</combo_item>
+		<combo_item name="Custom">
+			Personalizar
+		</combo_item>
+	</combo_box>
+	<combo_box label="Resolución" name="local_size_combo">
+		<combo_item name="CurrentWindow">
+			Ventana actual
+		</combo_item>
+		<combo_item name="320x240">
+			320x240
+		</combo_item>
+		<combo_item name="640x480">
+			640x480
+		</combo_item>
+		<combo_item name="800x600">
+			800x600
+		</combo_item>
+		<combo_item name="1024x768">
+			1024x768
+		</combo_item>
+		<combo_item name="1280x1024">
+			1280x1024
+		</combo_item>
+		<combo_item name="1600x1200">
+			1600x1200
+		</combo_item>
+		<combo_item name="Custom">
+			Personalizar
+		</combo_item>
+	</combo_box>
+	<combo_box label="Formato" name="local_format_combo">
+		<combo_item name="PNG">
+			PNG
+		</combo_item>
+		<combo_item name="JPEG">
+			JPEG
+		</combo_item>
+		<combo_item name="BMP">
+			BMP
+		</combo_item>
+	</combo_box>
+	<spinner label="Ancho" name="snapshot_width"/>
+	<spinner label="Alto" name="snapshot_height"/>
+	<check_box label="Mantener las proporciones" name="keep_aspect_check"/>
+	<slider label="Calidad de la imagen" name="image_quality_slider"/>
+	<text name="layer_type_label">
+		Captura:
+	</text>
+	<combo_box label="Capas de la imagen" name="layer_types">
+		<combo_item name="Colors">
+			Colores
+		</combo_item>
+		<combo_item name="Depth">
+			Profundidad
+		</combo_item>
+		<combo_item name="ObjectMattes">
+			Bandas negras
+		</combo_item>
+	</combo_box>
+	<check_box label="Incluir la interfaz en la foto" name="ui_check"/>
+	<check_box label="Incluir los HUD en la foto" name="hud_check"/>
+	<check_box label="Mantenerla abierta tras guardarla" name="keep_open_check"/>
+	<check_box label="Congelar la toma (vista previa en pantalla completa)" name="freeze_frame_check"/>
+	<check_box label="Actualizar automáticamente" name="auto_snapshot_check"/>
+	<string name="unknown">
+		desconocido
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_sound_preview.xml b/indra/newview/skins/default/xui/es/floater_sound_preview.xml
index bec618366d..3e92b2423d 100644
--- a/indra/newview/skins/default/xui/es/floater_sound_preview.xml
+++ b/indra/newview/skins/default/xui/es/floater_sound_preview.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Name/Description" title="sound.wav">
-	<text name="name_label">
-		Nombre:
-	</text>
-	<text name="description_label">
-		Descripción:
-	</text>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
-	<button label="Subir ([AMOUNT] L$)" label_selected="Subir ([AMOUNT] L$)" name="ok_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Name/Description" title="sound.wav">
+	<text name="name_label">
+		Nombre:
+	</text>
+	<text name="description_label">
+		Descripción:
+	</text>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
+	<button label="Subir ([AMOUNT] L$)" label_selected="Subir ([AMOUNT] L$)" name="ok_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_telehub.xml b/indra/newview/skins/default/xui/es/floater_telehub.xml
index f1d7999288..921577751a 100644
--- a/indra/newview/skins/default/xui/es/floater_telehub.xml
+++ b/indra/newview/skins/default/xui/es/floater_telehub.xml
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="telehub" title="Punto de Teleporte">
-	<text name="status_text_connected">
-		Punto de Teleporte conectado al objeto [OBJECT]
-	</text>
-	<text name="status_text_not_connected">
-		Punto de Teleporte sin conectar.
-	</text>
-	<text name="help_text_connected">
-		Para quitar, pulse Desconectar.
-	</text>
-	<text name="help_text_not_connected">
-		Seleccione el objeto y pulse Conectar el Punto de Teleporte.
-	</text>
-	<button label="Conectar el Punto de Teleporte" name="connect_btn"/>
-	<button label="Desconectar" name="disconnect_btn"/>
-	<text name="spawn_points_text">
-		Spawn Points (positions, not objects):
-	</text>
-	<button label="Añadir sucursales" name="add_spawn_point_btn"/>
-	<button label="Quitar sucursales" name="remove_spawn_point_btn"/>
-	<text name="spawn_point_help">
-		Seleccione el objeto y pulse Añadir para especificar la posición.
-Hecho eso, puede mover o borrar el objeto.
-Las posiciones son relativas al centro del Punto de Teleporte.
-Seleccione un ítem de la lista para mostrar su posición en el mundo.
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="telehub" title="Punto de Teleporte">
+	<text name="status_text_connected">
+		Punto de Teleporte conectado al objeto [OBJECT]
+	</text>
+	<text name="status_text_not_connected">
+		Punto de Teleporte sin conectar.
+	</text>
+	<text name="help_text_connected">
+		Para quitar, pulse Desconectar.
+	</text>
+	<text name="help_text_not_connected">
+		Seleccione el objeto y pulse Conectar el Punto de Teleporte.
+	</text>
+	<button label="Conectar el Punto de Teleporte" name="connect_btn"/>
+	<button label="Desconectar" name="disconnect_btn"/>
+	<text name="spawn_points_text">
+		Spawn Points (positions, not objects):
+	</text>
+	<button label="Añadir sucursales" name="add_spawn_point_btn"/>
+	<button label="Quitar sucursales" name="remove_spawn_point_btn"/>
+	<text name="spawn_point_help">
+		Seleccione el objeto y pulse Añadir para especificar la posición.
+Hecho eso, puede mover o borrar el objeto.
+Las posiciones son relativas al centro del Punto de Teleporte.
+Seleccione un ítem de la lista para mostrar su posición en el mundo.
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml
index fc6951bfa4..8c3882f0c8 100644
--- a/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml
@@ -1,24 +1,24 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="texture picker" title="Elegir: Textura">
-	<string name="choose_picture">
-		Pulse para elegir una imagen
-	</string>
-	<text length="1" name="Multiple" type="string">
-		Múltiple
-	</text>
-	<text length="1" name="unknown" type="string">
-		Dimensiones: [DIMENSIONS]
-	</text>
-	<button label="Por defecto" label_selected="Por defecto" name="Default"/>
-	<button label="Ninguna" label_selected="Ninguna" name="None"/>
-	<button label="Blanca" label_selected="Blanca" name="Blank"/>
-	<check_box label="Ver las carpetas" name="show_folders_check"/>
-	<search_editor label="Escriba aquí para buscar una" name="inventory search editor"/>
-	<check_box label="Aplicar ahora mismo" name="apply_immediate_check"/>
-	<button label="" label_selected="" name="Pipette"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-	<button label="Elegir" label_selected="Elegir" name="Select"/>
-	<string name="pick title">
-		Elegir:
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="texture picker" title="Elegir: Textura">
+	<string name="choose_picture">
+		Pulse para elegir una imagen
+	</string>
+	<text length="1" name="Multiple" type="string">
+		Múltiple
+	</text>
+	<text length="1" name="unknown" type="string">
+		Dimensiones: [DIMENSIONS]
+	</text>
+	<button label="Por defecto" label_selected="Por defecto" name="Default"/>
+	<button label="Ninguna" label_selected="Ninguna" name="None"/>
+	<button label="Blanca" label_selected="Blanca" name="Blank"/>
+	<check_box label="Ver las carpetas" name="show_folders_check"/>
+	<search_editor label="Escriba aquí para buscar una" name="inventory search editor"/>
+	<check_box label="Aplicar ahora mismo" name="apply_immediate_check"/>
+	<button label="" label_selected="" name="Pipette"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+	<button label="Elegir" label_selected="Elegir" name="Select"/>
+	<string name="pick title">
+		Elegir:
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml
index 5e2fa6da96..0f3a3fd217 100644
--- a/indra/newview/skins/default/xui/es/floater_tools.xml
+++ b/indra/newview/skins/default/xui/es/floater_tools.xml
@@ -1,611 +1,611 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="toolbox floater" title="">
-	<button label="" label_selected="" name="button focus" tool_tip="Visión"/>
-	<button label="" label_selected="" name="button move" tool_tip="Mover"/>
-	<button label="" label_selected="" name="button edit" tool_tip="Editar"/>
-	<button label="" label_selected="" name="button create" tool_tip="Crear"/>
-	<button label="" label_selected="" name="button land" tool_tip="Terreno"/>
-	<check_box label="Zoom" name="radio zoom"/>
-	<check_box label="Órbita (Ctrl)" name="radio orbit"/>
-	<check_box label="Panorámica (Ctrl-Shift)" name="radio pan"/>
-	<check_box label="Mover" name="radio move"/>
-	<check_box label="Vertical (Ctrl)" name="radio lift"/>
-	<check_box label="Horizontal (Ctrl-Shift)" name="radio spin"/>
-	<check_box label="Posición" name="radio position"/>
-	<check_box label="Girar (Ctrl)" name="radio rotate"/>
-	<check_box label="Estirar (Ctrl-Shift)" name="radio stretch"/>
-	<check_box label="Elegir la cara" name="radio select face"/>
-	<check_box label="Editar las partes enlazadas" name="checkbox edit linked parts"/>
-	<text name="text ruler mode">
-		Modo de ajuste:
-	</text>
-	<combo_box name="combobox grid mode">
-		<combo_item name="World">
-			Mundo
-		</combo_item>
-		<combo_item name="Local">
-			Local
-		</combo_item>
-		<combo_item name="Reference">
-			Referencia
-		</combo_item>
-	</combo_box>
-	<check_box label="Estirar ambos lados" name="checkbox uniform"/>
-	<check_box label="Estirar las texturas" name="checkbox stretch textures"/>
-	<check_box label="Usar la cuadrícula" name="checkbox snap to grid"/>
-	<button label="Opciones..." label_selected="Opciones..." name="Options..."/>
-	<text name="text status">
-		Arrastrar para mover, arrastrar + Mayús. para copiar
-	</text>
-	<button label="" label_selected="" name="ToolCube" tool_tip="Cubo"/>
-	<button label="" label_selected="" name="ToolPrism" tool_tip="Prisma"/>
-	<button label="" label_selected="" name="ToolPyramid" tool_tip="Pirámide"/>
-	<button label="" label_selected="" name="ToolTetrahedron" tool_tip="Tetraedro"/>
-	<button label="" label_selected="" name="ToolCylinder" tool_tip="Cilindro"/>
-	<button label="" label_selected="" name="ToolHemiCylinder" tool_tip="Semicilindro"/>
-	<button label="" label_selected="" name="ToolCone" tool_tip="Cono"/>
-	<button label="" label_selected="" name="ToolHemiCone" tool_tip="Semicono"/>
-	<button label="" label_selected="" name="ToolSphere" tool_tip="Esfera"/>
-	<button label="" label_selected="" name="ToolHemiSphere" tool_tip="Semiesfera"/>
-	<button label="" label_selected="" name="ToolTorus" tool_tip="Toroide"/>
-	<button label="" label_selected="" name="ToolTube" tool_tip="Tubo"/>
-	<button label="" label_selected="" name="ToolRing" tool_tip="Cono truncado"/>
-	<button label="" label_selected="" name="ToolTree" tool_tip="Árbol"/>
-	<button label="" label_selected="" name="ToolGrass" tool_tip="Hierba"/>
-	<check_box label="Mantener esta herramienta" name="checkbox sticky"/>
-	<check_box label="Copiar la selección" name="checkbox copy selection"/>
-	<check_box label="Copia centrada" name="checkbox copy centers"/>
-	<check_box label="Copia girada" name="checkbox copy rotates"/>
-	<check_box label="Seleccionar el terreno" name="radio select land"/>
-	<check_box label="Nivelar el terreno" name="radio flatten"/>
-	<check_box label="Elevar el terreno" name="radio raise"/>
-	<check_box label="Bajar el terreno" name="radio lower"/>
-	<check_box label="Suavizar el terreno" name="radio smooth"/>
-	<check_box label="Escarpar el terreno" name="radio noise"/>
-	<check_box label="Restablecer el terreno" name="radio revert"/>
-	<combo_box name="combobox brush size">
-		<combo_item name="Small">
-			Pequeño
-		</combo_item>
-		<combo_item name="Medium">
-			Medio
-		</combo_item>
-		<combo_item name="Large">
-			Grande
-		</combo_item>
-	</combo_box>
-	<text name="Strength:">
-		Fuerza:
-	</text>
-	<button label="Aplicar a lo seleccionado" label_selected="Aplicar a lo seleccionado" name="button apply to selection" tool_tip="Modificar el terreno seleccionado"/>
-	<check_box label="Mostrar los propietarios" name="checkbox show owners"/>
-	<button label="Más &gt;&gt;" name="button more" tool_tip="Opciones avanzadas"/>
-	<button label="&lt;&lt; Menos" name="button less" tool_tip="Opciones avanzadas"/>
-	<tab_container name="Object Info Tabs">
-		<panel label="General" name="General">
-			<text name="Name:">
-				Nombre:
-			</text>
-			<text name="Description:">
-				Descripción:
-			</text>
-			<text name="Creator:">
-				Creador:
-			</text>
-			<text name="Creator Name">
-				Thrax Linden
-			</text>
-			<button label="Perfil..." label_selected="Perfil..." name="button creator profile"/>
-			<text name="Owner:">
-				Propietario:
-			</text>
-			<text name="Owner Name">
-				Thrax Linden
-			</text>
-			<button label="Perfil..." label_selected="Perfil..." name="button owner profile"/>
-			<text name="Group:">
-				Grupo:
-			</text>
-			<text name="Group Name Proxy">
-				Los Linden
-			</text>
-			<button label="Configurar..." label_selected="Configurar..." name="button set group"/>
-			<text name="prim info">
-				1 objeto, 1 prim
-			</text>
-			<text name="Permissions:">
-				Permisos:
-			</text>
-			<text name="perm_modify">
-				Puede modificar este objeto.
-			</text>
-			<check_box label="Compartir con el grupo" name="checkbox share with group" tool_tip="Permitir a los miembros del grupo mover, modificar, copiar, y borrar."/>
-			<string name="text deed continued">
-				Transferir...
-			</string>
-			<string name="text deed">
-				Transferir
-			</string>
-			<button label="Transferir..." label_selected="Transferir..." name="button deed" tool_tip="Los objetos compartidos por el grupo pueden ser transferidos por un oficial del grupo."/>
-			<check_box label="Permitir a cualquiera que lo mueva" name="checkbox allow everyone move"/>
-			<check_box label="Permitir a cualquiera que lo copie" name="checkbox allow everyone copy"/>
-			<check_box label="Mostrar en la búsqueda" name="search_check" tool_tip="Dejar que la gente vea este objeto en los resultados de la búsqueda"/>
-			<check_box label="En venta" name="checkbox for sale"/>
-			<text name="Cost">
-				Precio:  L$
-			</text>
-			<radio_group name="sale type">
-				<radio_item name="Original">
-					Original
-				</radio_item>
-				<radio_item name="Copy">
-					Copia
-				</radio_item>
-				<radio_item name="Contents">
-					Contenidos
-				</radio_item>
-			</radio_group>
-			<text name="Next owner can:">
-				El próximo propietario puede:
-			</text>
-			<check_box label="Modificarlo" name="checkbox next owner can modify"/>
-			<check_box label="Copiarlo" name="checkbox next owner can copy"/>
-			<check_box label="Revenderlo/Darlo" name="checkbox next owner can transfer"/>
-			<text name="label click action">
-				Al pulsarlo con el botón izquierdo:
-			</text>
-			<combo_box name="clickaction">
-				<combo_item name="Touch/grab(default)">
-					Tocar/Agarrar (por defecto)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					Sentarse en el objeto
-				</combo_item>
-				<combo_item name="Buyobject">
-					Comprar el objeto
-				</combo_item>
-				<combo_item name="Payobject">
-					Pagar al objeto
-				</combo_item>
-				<combo_item name="Open">
-					Abrirlo
-				</combo_item>
-				<combo_item name="Play">
-					Ejecutar los media de la parcela
-				</combo_item>
-				<combo_item name="Opemmedia">
-					Abrir los media de la parcela
-				</combo_item>
-			</combo_box>
-			<text name="B:">
-				B:
-			</text>
-			<text name="O:">
-				O:
-			</text>
-			<text name="G:">
-				G:
-			</text>
-			<text name="E:">
-				E:
-			</text>
-			<text name="N:">
-				N:
-			</text>
-			<text name="F:">
-				F:
-			</text>
-			<string name="text modify info 1">
-				Puede modificar este objeto.
-			</string>
-			<string name="text modify info 2">
-				Puede modificar estos objetos.
-			</string>
-			<string name="text modify info 3">
-				No puede modificar este objeto.
-			</string>
-			<string name="text modify info 4">
-				No puede modificar estos objetos.
-			</string>
-			<string name="text modify warning">
-				Debe seleccionar todo el objeto para definir los permisos.
-			</string>
-			<string name="Cost Default">
-				Precio:           L$
-			</string>
-			<string name="Cost Total">
-				Precio total:  L$
-			</string>
-			<string name="Cost Per Unit">
-				Precio por:     L$
-			</string>
-			<string name="Cost Mixed">
-				Precio variable
-			</string>
-			<string name="Sale Mixed">
-				Venta variable
-			</string>
-		</panel>
-		<panel label="Objeto" name="Object">
-			<text name="select_single">
-				Seleccione un único prim para editar los parámetros.
-			</text>
-			<text name="edit_object">
-				Modificar los parámetros del objeto:
-			</text>
-			<check_box label="Bloqueado" name="checkbox locked" tool_tip="Previene que el objeto sea movido o borrado. Suele ser útil mientras se construye, para prevenir que se modifique sin querer."/>
-			<check_box label="Material" name="Physical Checkbox Ctrl" tool_tip="Permite que el objeto pueda ser empujado y le afecte la gravedad."/>
-			<check_box label="Temporal" name="Temporary Checkbox Ctrl" tool_tip="Hace que el objeto se borre 1 minuto después de su creación."/>
-			<check_box label="Inmaterial" name="Phantom Checkbox Ctrl" tool_tip="Hace que el objeto no colisiones con otros objetos o avatares."/>
-			<text name="label position">
-				Posición (metros)
-			</text>
-			<spinner label="X" name="Pos X"/>
-			<spinner label="Y" name="Pos Y"/>
-			<spinner label="Z" name="Pos Z"/>
-			<text name="label size">
-				Tamaño (metros)
-			</text>
-			<spinner label="X" name="Scale X"/>
-			<spinner label="Y" name="Scale Y"/>
-			<spinner label="Z" name="Scale Z"/>
-			<text name="label rotation">
-				Rotación (grados)
-			</text>
-			<spinner label="X" name="Rot X"/>
-			<spinner label="Y" name="Rot Y"/>
-			<spinner label="Z" name="Rot Z"/>
-			<text name="label material">
-				Material
-			</text>
-			<combo_box name="material">
-				<combo_item name="Stone">
-					Piedra
-				</combo_item>
-				<combo_item name="Metal">
-					Metal
-				</combo_item>
-				<combo_item name="Glass">
-					Vidrio
-				</combo_item>
-				<combo_item name="Wood">
-					Madera
-				</combo_item>
-				<combo_item name="Flesh">
-					Carne
-				</combo_item>
-				<combo_item name="Plastic">
-					Plástico
-				</combo_item>
-				<combo_item name="Rubber">
-					Goma
-				</combo_item>
-			</combo_box>
-			<text name="label basetype">
-				Tipo de objeto para construir
-			</text>
-			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					Caja
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilindro
-				</combo_item>
-				<combo_item name="Prism">
-					Prisma
-				</combo_item>
-				<combo_item name="Sphere">
-					Esfera
-				</combo_item>
-				<combo_item name="Torus">
-					Toroide
-				</combo_item>
-				<combo_item name="Tube">
-					Tubo
-				</combo_item>
-				<combo_item name="Ring">
-					Cono truncado
-				</combo_item>
-				<combo_item name="Sculpted">
-					Sculpted
-				</combo_item>
-			</combo_box>
-			<text name="text cut">
-				Inicio y Fin del corte
-			</text>
-			<spinner label="I" name="cut begin"/>
-			<spinner label="F" name="cut end"/>
-			<text name="text hollow">
-				Hueco
-			</text>
-			<text name="text skew">
-				Sesgo
-			</text>
-			<text name="Hollow Shape">
-				Forma del hueco
-			</text>
-			<combo_box name="hole">
-				<combo_item name="Default">
-					Por defecto
-				</combo_item>
-				<combo_item name="Circle">
-					Círculo
-				</combo_item>
-				<combo_item name="Square">
-					Cuadrado
-				</combo_item>
-				<combo_item name="Triangle">
-					Triángulo
-				</combo_item>
-			</combo_box>
-			<text name="text twist">
-				Inicio y Fin de la torsión
-			</text>
-			<spinner label="I" name="Twist Begin"/>
-			<spinner label="F" name="Twist End"/>
-			<text name="scale_taper">
-				Biselar
-			</text>
-			<text name="scale_hole">
-				Tamaño del hueco
-			</text>
-			<spinner label="X" name="Taper Scale X"/>
-			<spinner label="Y" name="Taper Scale Y"/>
-			<text name="text topshear">
-				Inclinación superior
-			</text>
-			<spinner label="X" name="Shear X"/>
-			<spinner label="Y" name="Shear Y"/>
-			<text name="advanced_cut">
-				Inicio y Fin del corte del perfil
-			</text>
-			<text name="advanced_dimple">
-				Horadar: Inicio y Fin
-			</text>
-			<spinner label="I" name="Path Limit Begin"/>
-			<spinner label="F" name="Path Limit End"/>
-			<text name="text taper2">
-				Biselar
-			</text>
-			<spinner label="X" name="Taper X"/>
-			<spinner label="Y" name="Taper Y"/>
-			<text name="text radius delta">
-				Radio
-			</text>
-			<text name="text revolutions">
-				Giros
-			</text>
-			<texture_picker label="Textura para sculpted" name="sculpt texture control" tool_tip="Pulse para elegir una imagen"/>
-			<check_box label="Espejo" name="sculpt mirror control" tool_tip="Girar el prim sculpted siguiendo el eje X."/>
-			<check_box label="Dentro-Fuera" name="sculpt invert control" tool_tip="Invertir los valores de los prims sculpted, haciendo aparecer fuera lo de dentro."/>
-			<text name="label sculpt type">
-				Tipo de unión
-			</text>
-			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(ninguna)
-				</combo_item>
-				<combo_item name="Sphere">
-					Esfera
-				</combo_item>
-				<combo_item name="Torus">
-					Toroide
-				</combo_item>
-				<combo_item name="Plane">
-					Plano
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilindro
-				</combo_item>
-			</combo_box>
-		</panel>
-		<panel label="Características" name="Features">
-			<text name="select_single">
-				Seleccione un sólo prim para editar las características.
-			</text>
-			<text name="edit_object">
-				Editar las características del objeto:
-			</text>
-			<check_box label="Flexibilidad" name="Flexible1D Checkbox Ctrl" tool_tip="Permite que el objeto flexione en el eje Z. (Sólo del lado del cliente)"/>
-			<spinner label="Blandura" name="FlexNumSections"/>
-			<spinner label="Gravedad" name="FlexGravity"/>
-			<spinner label="Fricción" name="FlexFriction"/>
-			<spinner label="Viento" name="FlexWind"/>
-			<spinner label="Tirantez" name="FlexTension"/>
-			<spinner label="Fuerza en X" name="FlexForceX"/>
-			<spinner label="Fuerza en Y" name="FlexForceY"/>
-			<spinner label="Fuerza en Z" name="FlexForceZ"/>
-			<check_box label="Luz" name="Light Checkbox Ctrl" tool_tip="Hace que el objeto emita luz"/>
-			<text name="label color">
-				Color
-			</text>
-			<color_swatch label="" name="colorswatch" tool_tip="Pulse para abrir el selector de color"/>
-			<spinner label="Intensidad" name="Light Intensity"/>
-			<spinner label="Radio" name="Light Radius"/>
-			<spinner label="Atenuación" name="Light Falloff"/>
-		</panel>
-		<panel label="Textura" name="Texture">
-			<texture_picker label="Textura" name="texture control" tool_tip="Pulse para elegir una imagen"/>
-			<color_swatch label="Color" name="colorswatch" tool_tip="Pulse para abrir el selector de color"/>
-			<text name="color trans">
-				Transparencia %
-			</text>
-			<text name="glow label">
-				Resplandor
-			</text>
-			<check_box label="Brillo al máximo" name="checkbox fullbright"/>
-			<text name="tex gen">
-				Detallado
-			</text>
-			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					Por defecto
-				</combo_item>
-				<combo_item name="Planar">
-					Plano
-				</combo_item>
-			</combo_box>
-			<text name="label shininess">
-				Brillantez
-			</text>
-			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					Ninguna
-				</combo_item>
-				<combo_item name="Low">
-					Baja
-				</combo_item>
-				<combo_item name="Medium">
-					Media
-				</combo_item>
-				<combo_item name="High">
-					Alta
-				</combo_item>
-			</combo_box>
-			<text name="label bumpiness">
-				Relieve
-			</text>
-			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					Ninguno
-				</combo_item>
-				<combo_item name="Brightness">
-					Brillo
-				</combo_item>
-				<combo_item name="Darkness">
-					Oscuro
-				</combo_item>
-				<combo_item name="woodgrain">
-					grano de madera
-				</combo_item>
-				<combo_item name="bark">
-					corteza
-				</combo_item>
-				<combo_item name="bricks">
-					ladrillos
-				</combo_item>
-				<combo_item name="checker">
-					cajero
-				</combo_item>
-				<combo_item name="concrete">
-					cemento
-				</combo_item>
-				<combo_item name="crustytile">
-					azulejería
-				</combo_item>
-				<combo_item name="cutstone">
-					piedra cortada
-				</combo_item>
-				<combo_item name="discs">
-					discos
-				</combo_item>
-				<combo_item name="gravel">
-					grava
-				</combo_item>
-				<combo_item name="petridish">
-					placa de Petri
-				</combo_item>
-				<combo_item name="siding">
-					revestimiento
-				</combo_item>
-				<combo_item name="stonetile">
-					baldosa de piedra
-				</combo_item>
-				<combo_item name="stucco">
-					estuco
-				</combo_item>
-				<combo_item name="suction">
-					succión
-				</combo_item>
-				<combo_item name="weave">
-					tejido
-				</combo_item>
-			</combo_box>
-			<text name="tex scale">
-				Repeticiones por cara
-			</text>
-			<spinner label="Horizontal (U)" name="TexScaleU"/>
-			<check_box label="Voltear" name="checkbox flip s"/>
-			<spinner label="Vertical (V)" name="TexScaleV"/>
-			<check_box label="Voltear" name="checkbox flip t"/>
-			<text name="tex rotate">
-				Rotación (grados)
-			</text>
-			<string name="string repeats per meter">
-				Repeticiones por metro
-			</string>
-			<string name="string repeats per face">
-				Repeticiones por cara
-			</string>
-			<text name="rpt">
-				Repeticiones por metro
-			</text>
-			<button label="Aplicar" label_selected="Aplicar" name="button apply"/>
-			<text name="tex offset">
-				Desplazar
-			</text>
-			<spinner label="Horizontal (U)" name="TexOffsetU"/>
-			<spinner label="Vertical (V)" name="TexOffsetV"/>
-			<text name="textbox autofix">
-				Centrar la textura para los media
-(primero debe subirla)
-			</text>
-			<button label="Alinear" label_selected="Alinear" name="button align"/>
-		</panel>
-		<panel label="Contenido" name="Contents">
-			<button label="Script nuevo..." label_selected="Script nuevo..." name="button new script"/>
-		</panel>
-	</tab_container>
-	<panel name="land info panel">
-		<text name="label_area_price">
-			Precio: [PRICE] L$ por [AREA] m²
-		</text>
-		<text name="label_area">
-			Superficie: [AREA] m²
-		</text>
-		<button label="Comprar terreno..." label_selected="Comprar terreno..." name="button buy land"/>
-		<button label="Abandonar el terreno..." label_selected="Abandonar el terreno..." name="button abandon land"/>
-		<button label="Subdividir..." label_selected="Subdividir..." name="button subdivide land"/>
-		<button label="Unir..." label_selected="Unir..." name="button join land"/>
-		<button label="Acerca del terreno..." label_selected="Acerca del terreno..." name="button about land"/>
-	</panel>
-	<string name="status_rotate">
-		Arrastre las bandas de color para girar el objeto
-	</string>
-	<string name="status_scale">
-		Pulse y arrastre para estirar el lado seleccionado
-	</string>
-	<string name="status_move">
-		Arrastrar para mover, arrastrar + Mayús. para copiar
-	</string>
-	<string name="status_modifyland">
-		Mantenga pulsado para modificar el terreno
-	</string>
-	<string name="status_camera">
-		Pulse y arrastre para cambiar el punto de vista
-	</string>
-	<string name="status_grab">
-		Arrastre para mover objetos: Ctrl, verticalmente; Ctrl-Mayús., horizontalmente
-	</string>
-	<string name="status_place">
-		Pulse en el mundo para crear; mayús. y pulsar para seleccionar
-	</string>
-	<string name="status_selectland">
-		Pulse y arrastre para seleccionar el terreno
-	</string>
-	<string name="grid_screen_text">
-		Pantalla
-	</string>
-	<string name="grid_local_text">
-		Local
-	</string>
-	<string name="grid_world_text">
-		Mundo
-	</string>
-	<string name="grid_reference_text">
-		Referencia
-	</string>
-	<string name="grid_attachment_text">
-		Añadido
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="toolbox floater" title="">
+	<button label="" label_selected="" name="button focus" tool_tip="Visión"/>
+	<button label="" label_selected="" name="button move" tool_tip="Mover"/>
+	<button label="" label_selected="" name="button edit" tool_tip="Editar"/>
+	<button label="" label_selected="" name="button create" tool_tip="Crear"/>
+	<button label="" label_selected="" name="button land" tool_tip="Terreno"/>
+	<check_box label="Zoom" name="radio zoom"/>
+	<check_box label="Órbita (Ctrl)" name="radio orbit"/>
+	<check_box label="Panorámica (Ctrl-Shift)" name="radio pan"/>
+	<check_box label="Mover" name="radio move"/>
+	<check_box label="Vertical (Ctrl)" name="radio lift"/>
+	<check_box label="Horizontal (Ctrl-Shift)" name="radio spin"/>
+	<check_box label="Posición" name="radio position"/>
+	<check_box label="Girar (Ctrl)" name="radio rotate"/>
+	<check_box label="Estirar (Ctrl-Shift)" name="radio stretch"/>
+	<check_box label="Elegir la cara" name="radio select face"/>
+	<check_box label="Editar las partes enlazadas" name="checkbox edit linked parts"/>
+	<text name="text ruler mode">
+		Modo de ajuste:
+	</text>
+	<combo_box name="combobox grid mode">
+		<combo_item name="World">
+			Mundo
+		</combo_item>
+		<combo_item name="Local">
+			Local
+		</combo_item>
+		<combo_item name="Reference">
+			Referencia
+		</combo_item>
+	</combo_box>
+	<check_box label="Estirar ambos lados" name="checkbox uniform"/>
+	<check_box label="Estirar las texturas" name="checkbox stretch textures"/>
+	<check_box label="Usar la cuadrícula" name="checkbox snap to grid"/>
+	<button label="Opciones..." label_selected="Opciones..." name="Options..."/>
+	<text name="text status">
+		Arrastrar para mover, arrastrar + Mayús. para copiar
+	</text>
+	<button label="" label_selected="" name="ToolCube" tool_tip="Cubo"/>
+	<button label="" label_selected="" name="ToolPrism" tool_tip="Prisma"/>
+	<button label="" label_selected="" name="ToolPyramid" tool_tip="Pirámide"/>
+	<button label="" label_selected="" name="ToolTetrahedron" tool_tip="Tetraedro"/>
+	<button label="" label_selected="" name="ToolCylinder" tool_tip="Cilindro"/>
+	<button label="" label_selected="" name="ToolHemiCylinder" tool_tip="Semicilindro"/>
+	<button label="" label_selected="" name="ToolCone" tool_tip="Cono"/>
+	<button label="" label_selected="" name="ToolHemiCone" tool_tip="Semicono"/>
+	<button label="" label_selected="" name="ToolSphere" tool_tip="Esfera"/>
+	<button label="" label_selected="" name="ToolHemiSphere" tool_tip="Semiesfera"/>
+	<button label="" label_selected="" name="ToolTorus" tool_tip="Toroide"/>
+	<button label="" label_selected="" name="ToolTube" tool_tip="Tubo"/>
+	<button label="" label_selected="" name="ToolRing" tool_tip="Cono truncado"/>
+	<button label="" label_selected="" name="ToolTree" tool_tip="Árbol"/>
+	<button label="" label_selected="" name="ToolGrass" tool_tip="Hierba"/>
+	<check_box label="Mantener esta herramienta" name="checkbox sticky"/>
+	<check_box label="Copiar la selección" name="checkbox copy selection"/>
+	<check_box label="Copia centrada" name="checkbox copy centers"/>
+	<check_box label="Copia girada" name="checkbox copy rotates"/>
+	<check_box label="Seleccionar el terreno" name="radio select land"/>
+	<check_box label="Nivelar el terreno" name="radio flatten"/>
+	<check_box label="Elevar el terreno" name="radio raise"/>
+	<check_box label="Bajar el terreno" name="radio lower"/>
+	<check_box label="Suavizar el terreno" name="radio smooth"/>
+	<check_box label="Escarpar el terreno" name="radio noise"/>
+	<check_box label="Restablecer el terreno" name="radio revert"/>
+	<combo_box name="combobox brush size">
+		<combo_item name="Small">
+			Pequeño
+		</combo_item>
+		<combo_item name="Medium">
+			Medio
+		</combo_item>
+		<combo_item name="Large">
+			Grande
+		</combo_item>
+	</combo_box>
+	<text name="Strength:">
+		Fuerza:
+	</text>
+	<button label="Aplicar a lo seleccionado" label_selected="Aplicar a lo seleccionado" name="button apply to selection" tool_tip="Modificar el terreno seleccionado"/>
+	<check_box label="Mostrar los propietarios" name="checkbox show owners"/>
+	<button label="Más &gt;&gt;" name="button more" tool_tip="Opciones avanzadas"/>
+	<button label="&lt;&lt; Menos" name="button less" tool_tip="Opciones avanzadas"/>
+	<tab_container name="Object Info Tabs">
+		<panel label="General" name="General">
+			<text name="Name:">
+				Nombre:
+			</text>
+			<text name="Description:">
+				Descripción:
+			</text>
+			<text name="Creator:">
+				Creador:
+			</text>
+			<text name="Creator Name">
+				Thrax Linden
+			</text>
+			<button label="Perfil..." label_selected="Perfil..." name="button creator profile"/>
+			<text name="Owner:">
+				Propietario:
+			</text>
+			<text name="Owner Name">
+				Thrax Linden
+			</text>
+			<button label="Perfil..." label_selected="Perfil..." name="button owner profile"/>
+			<text name="Group:">
+				Grupo:
+			</text>
+			<text name="Group Name Proxy">
+				Los Linden
+			</text>
+			<button label="Configurar..." label_selected="Configurar..." name="button set group"/>
+			<text name="prim info">
+				1 objeto, 1 prim
+			</text>
+			<text name="Permissions:">
+				Permisos:
+			</text>
+			<text name="perm_modify">
+				Puede modificar este objeto.
+			</text>
+			<check_box label="Compartir con el grupo" name="checkbox share with group" tool_tip="Permitir a los miembros del grupo mover, modificar, copiar, y borrar."/>
+			<string name="text deed continued">
+				Transferir...
+			</string>
+			<string name="text deed">
+				Transferir
+			</string>
+			<button label="Transferir..." label_selected="Transferir..." name="button deed" tool_tip="Los objetos compartidos por el grupo pueden ser transferidos por un oficial del grupo."/>
+			<check_box label="Permitir a cualquiera que lo mueva" name="checkbox allow everyone move"/>
+			<check_box label="Permitir a cualquiera que lo copie" name="checkbox allow everyone copy"/>
+			<check_box label="Mostrar en la búsqueda" name="search_check" tool_tip="Dejar que la gente vea este objeto en los resultados de la búsqueda"/>
+			<check_box label="En venta" name="checkbox for sale"/>
+			<text name="Cost">
+				Precio:  L$
+			</text>
+			<radio_group name="sale type">
+				<radio_item name="Original">
+					Original
+				</radio_item>
+				<radio_item name="Copy">
+					Copia
+				</radio_item>
+				<radio_item name="Contents">
+					Contenidos
+				</radio_item>
+			</radio_group>
+			<text name="Next owner can:">
+				El próximo propietario puede:
+			</text>
+			<check_box label="Modificarlo" name="checkbox next owner can modify"/>
+			<check_box label="Copiarlo" name="checkbox next owner can copy"/>
+			<check_box label="Revenderlo/Darlo" name="checkbox next owner can transfer"/>
+			<text name="label click action">
+				Al pulsarlo con el botón izquierdo:
+			</text>
+			<combo_box name="clickaction">
+				<combo_item name="Touch/grab(default)">
+					Tocar/Agarrar (por defecto)
+				</combo_item>
+				<combo_item name="Sitonobject">
+					Sentarse en el objeto
+				</combo_item>
+				<combo_item name="Buyobject">
+					Comprar el objeto
+				</combo_item>
+				<combo_item name="Payobject">
+					Pagar al objeto
+				</combo_item>
+				<combo_item name="Open">
+					Abrirlo
+				</combo_item>
+				<combo_item name="Play">
+					Ejecutar los media de la parcela
+				</combo_item>
+				<combo_item name="Opemmedia">
+					Abrir los media de la parcela
+				</combo_item>
+			</combo_box>
+			<text name="B:">
+				B:
+			</text>
+			<text name="O:">
+				O:
+			</text>
+			<text name="G:">
+				G:
+			</text>
+			<text name="E:">
+				E:
+			</text>
+			<text name="N:">
+				N:
+			</text>
+			<text name="F:">
+				F:
+			</text>
+			<string name="text modify info 1">
+				Puede modificar este objeto.
+			</string>
+			<string name="text modify info 2">
+				Puede modificar estos objetos.
+			</string>
+			<string name="text modify info 3">
+				No puede modificar este objeto.
+			</string>
+			<string name="text modify info 4">
+				No puede modificar estos objetos.
+			</string>
+			<string name="text modify warning">
+				Debe seleccionar todo el objeto para definir los permisos.
+			</string>
+			<string name="Cost Default">
+				Precio:           L$
+			</string>
+			<string name="Cost Total">
+				Precio total:  L$
+			</string>
+			<string name="Cost Per Unit">
+				Precio por:     L$
+			</string>
+			<string name="Cost Mixed">
+				Precio variable
+			</string>
+			<string name="Sale Mixed">
+				Venta variable
+			</string>
+		</panel>
+		<panel label="Objeto" name="Object">
+			<text name="select_single">
+				Seleccione un único prim para editar los parámetros.
+			</text>
+			<text name="edit_object">
+				Modificar los parámetros del objeto:
+			</text>
+			<check_box label="Bloqueado" name="checkbox locked" tool_tip="Previene que el objeto sea movido o borrado. Suele ser útil mientras se construye, para prevenir que se modifique sin querer."/>
+			<check_box label="Material" name="Physical Checkbox Ctrl" tool_tip="Permite que el objeto pueda ser empujado y le afecte la gravedad."/>
+			<check_box label="Temporal" name="Temporary Checkbox Ctrl" tool_tip="Hace que el objeto se borre 1 minuto después de su creación."/>
+			<check_box label="Inmaterial" name="Phantom Checkbox Ctrl" tool_tip="Hace que el objeto no colisiones con otros objetos o avatares."/>
+			<text name="label position">
+				Posición (metros)
+			</text>
+			<spinner label="X" name="Pos X"/>
+			<spinner label="Y" name="Pos Y"/>
+			<spinner label="Z" name="Pos Z"/>
+			<text name="label size">
+				Tamaño (metros)
+			</text>
+			<spinner label="X" name="Scale X"/>
+			<spinner label="Y" name="Scale Y"/>
+			<spinner label="Z" name="Scale Z"/>
+			<text name="label rotation">
+				Rotación (grados)
+			</text>
+			<spinner label="X" name="Rot X"/>
+			<spinner label="Y" name="Rot Y"/>
+			<spinner label="Z" name="Rot Z"/>
+			<text name="label material">
+				Material
+			</text>
+			<combo_box name="material">
+				<combo_item name="Stone">
+					Piedra
+				</combo_item>
+				<combo_item name="Metal">
+					Metal
+				</combo_item>
+				<combo_item name="Glass">
+					Vidrio
+				</combo_item>
+				<combo_item name="Wood">
+					Madera
+				</combo_item>
+				<combo_item name="Flesh">
+					Carne
+				</combo_item>
+				<combo_item name="Plastic">
+					Plástico
+				</combo_item>
+				<combo_item name="Rubber">
+					Goma
+				</combo_item>
+			</combo_box>
+			<text name="label basetype">
+				Tipo de objeto para construir
+			</text>
+			<combo_box name="comboBaseType">
+				<combo_item name="Box">
+					Caja
+				</combo_item>
+				<combo_item name="Cylinder">
+					Cilindro
+				</combo_item>
+				<combo_item name="Prism">
+					Prisma
+				</combo_item>
+				<combo_item name="Sphere">
+					Esfera
+				</combo_item>
+				<combo_item name="Torus">
+					Toroide
+				</combo_item>
+				<combo_item name="Tube">
+					Tubo
+				</combo_item>
+				<combo_item name="Ring">
+					Cono truncado
+				</combo_item>
+				<combo_item name="Sculpted">
+					Sculpted
+				</combo_item>
+			</combo_box>
+			<text name="text cut">
+				Inicio y Fin del corte
+			</text>
+			<spinner label="I" name="cut begin"/>
+			<spinner label="F" name="cut end"/>
+			<text name="text hollow">
+				Hueco
+			</text>
+			<text name="text skew">
+				Sesgo
+			</text>
+			<text name="Hollow Shape">
+				Forma del hueco
+			</text>
+			<combo_box name="hole">
+				<combo_item name="Default">
+					Por defecto
+				</combo_item>
+				<combo_item name="Circle">
+					Círculo
+				</combo_item>
+				<combo_item name="Square">
+					Cuadrado
+				</combo_item>
+				<combo_item name="Triangle">
+					Triángulo
+				</combo_item>
+			</combo_box>
+			<text name="text twist">
+				Inicio y Fin de la torsión
+			</text>
+			<spinner label="I" name="Twist Begin"/>
+			<spinner label="F" name="Twist End"/>
+			<text name="scale_taper">
+				Biselar
+			</text>
+			<text name="scale_hole">
+				Tamaño del hueco
+			</text>
+			<spinner label="X" name="Taper Scale X"/>
+			<spinner label="Y" name="Taper Scale Y"/>
+			<text name="text topshear">
+				Inclinación superior
+			</text>
+			<spinner label="X" name="Shear X"/>
+			<spinner label="Y" name="Shear Y"/>
+			<text name="advanced_cut">
+				Inicio y Fin del corte del perfil
+			</text>
+			<text name="advanced_dimple">
+				Horadar: Inicio y Fin
+			</text>
+			<spinner label="I" name="Path Limit Begin"/>
+			<spinner label="F" name="Path Limit End"/>
+			<text name="text taper2">
+				Biselar
+			</text>
+			<spinner label="X" name="Taper X"/>
+			<spinner label="Y" name="Taper Y"/>
+			<text name="text radius delta">
+				Radio
+			</text>
+			<text name="text revolutions">
+				Giros
+			</text>
+			<texture_picker label="Textura para sculpted" name="sculpt texture control" tool_tip="Pulse para elegir una imagen"/>
+			<check_box label="Espejo" name="sculpt mirror control" tool_tip="Girar el prim sculpted siguiendo el eje X."/>
+			<check_box label="Dentro-Fuera" name="sculpt invert control" tool_tip="Invertir los valores de los prims sculpted, haciendo aparecer fuera lo de dentro."/>
+			<text name="label sculpt type">
+				Tipo de unión
+			</text>
+			<combo_box name="sculpt type control">
+				<combo_item name="None">
+					(ninguna)
+				</combo_item>
+				<combo_item name="Sphere">
+					Esfera
+				</combo_item>
+				<combo_item name="Torus">
+					Toroide
+				</combo_item>
+				<combo_item name="Plane">
+					Plano
+				</combo_item>
+				<combo_item name="Cylinder">
+					Cilindro
+				</combo_item>
+			</combo_box>
+		</panel>
+		<panel label="Características" name="Features">
+			<text name="select_single">
+				Seleccione un sólo prim para editar las características.
+			</text>
+			<text name="edit_object">
+				Editar las características del objeto:
+			</text>
+			<check_box label="Flexibilidad" name="Flexible1D Checkbox Ctrl" tool_tip="Permite que el objeto flexione en el eje Z. (Sólo del lado del cliente)"/>
+			<spinner label="Blandura" name="FlexNumSections"/>
+			<spinner label="Gravedad" name="FlexGravity"/>
+			<spinner label="Fricción" name="FlexFriction"/>
+			<spinner label="Viento" name="FlexWind"/>
+			<spinner label="Tirantez" name="FlexTension"/>
+			<spinner label="Fuerza en X" name="FlexForceX"/>
+			<spinner label="Fuerza en Y" name="FlexForceY"/>
+			<spinner label="Fuerza en Z" name="FlexForceZ"/>
+			<check_box label="Luz" name="Light Checkbox Ctrl" tool_tip="Hace que el objeto emita luz"/>
+			<text name="label color">
+				Color
+			</text>
+			<color_swatch label="" name="colorswatch" tool_tip="Pulse para abrir el selector de color"/>
+			<spinner label="Intensidad" name="Light Intensity"/>
+			<spinner label="Radio" name="Light Radius"/>
+			<spinner label="Atenuación" name="Light Falloff"/>
+		</panel>
+		<panel label="Textura" name="Texture">
+			<texture_picker label="Textura" name="texture control" tool_tip="Pulse para elegir una imagen"/>
+			<color_swatch label="Color" name="colorswatch" tool_tip="Pulse para abrir el selector de color"/>
+			<text name="color trans">
+				Transparencia %
+			</text>
+			<text name="glow label">
+				Resplandor
+			</text>
+			<check_box label="Brillo al máximo" name="checkbox fullbright"/>
+			<text name="tex gen">
+				Detallado
+			</text>
+			<combo_box name="combobox texgen">
+				<combo_item name="Default">
+					Por defecto
+				</combo_item>
+				<combo_item name="Planar">
+					Plano
+				</combo_item>
+			</combo_box>
+			<text name="label shininess">
+				Brillantez
+			</text>
+			<combo_box name="combobox shininess">
+				<combo_item name="None">
+					Ninguna
+				</combo_item>
+				<combo_item name="Low">
+					Baja
+				</combo_item>
+				<combo_item name="Medium">
+					Media
+				</combo_item>
+				<combo_item name="High">
+					Alta
+				</combo_item>
+			</combo_box>
+			<text name="label bumpiness">
+				Relieve
+			</text>
+			<combo_box name="combobox bumpiness">
+				<combo_item name="None">
+					Ninguno
+				</combo_item>
+				<combo_item name="Brightness">
+					Brillo
+				</combo_item>
+				<combo_item name="Darkness">
+					Oscuro
+				</combo_item>
+				<combo_item name="woodgrain">
+					grano de madera
+				</combo_item>
+				<combo_item name="bark">
+					corteza
+				</combo_item>
+				<combo_item name="bricks">
+					ladrillos
+				</combo_item>
+				<combo_item name="checker">
+					cajero
+				</combo_item>
+				<combo_item name="concrete">
+					cemento
+				</combo_item>
+				<combo_item name="crustytile">
+					azulejería
+				</combo_item>
+				<combo_item name="cutstone">
+					piedra cortada
+				</combo_item>
+				<combo_item name="discs">
+					discos
+				</combo_item>
+				<combo_item name="gravel">
+					grava
+				</combo_item>
+				<combo_item name="petridish">
+					placa de Petri
+				</combo_item>
+				<combo_item name="siding">
+					revestimiento
+				</combo_item>
+				<combo_item name="stonetile">
+					baldosa de piedra
+				</combo_item>
+				<combo_item name="stucco">
+					estuco
+				</combo_item>
+				<combo_item name="suction">
+					succión
+				</combo_item>
+				<combo_item name="weave">
+					tejido
+				</combo_item>
+			</combo_box>
+			<text name="tex scale">
+				Repeticiones por cara
+			</text>
+			<spinner label="Horizontal (U)" name="TexScaleU"/>
+			<check_box label="Voltear" name="checkbox flip s"/>
+			<spinner label="Vertical (V)" name="TexScaleV"/>
+			<check_box label="Voltear" name="checkbox flip t"/>
+			<text name="tex rotate">
+				Rotación (grados)
+			</text>
+			<string name="string repeats per meter">
+				Repeticiones por metro
+			</string>
+			<string name="string repeats per face">
+				Repeticiones por cara
+			</string>
+			<text name="rpt">
+				Repeticiones por metro
+			</text>
+			<button label="Aplicar" label_selected="Aplicar" name="button apply"/>
+			<text name="tex offset">
+				Desplazar
+			</text>
+			<spinner label="Horizontal (U)" name="TexOffsetU"/>
+			<spinner label="Vertical (V)" name="TexOffsetV"/>
+			<text name="textbox autofix">
+				Centrar la textura para los media
+(primero debe subirla)
+			</text>
+			<button label="Alinear" label_selected="Alinear" name="button align"/>
+		</panel>
+		<panel label="Contenido" name="Contents">
+			<button label="Script nuevo..." label_selected="Script nuevo..." name="button new script"/>
+		</panel>
+	</tab_container>
+	<panel name="land info panel">
+		<text name="label_area_price">
+			Precio: [PRICE] L$ por [AREA] m²
+		</text>
+		<text name="label_area">
+			Superficie: [AREA] m²
+		</text>
+		<button label="Comprar terreno..." label_selected="Comprar terreno..." name="button buy land"/>
+		<button label="Abandonar el terreno..." label_selected="Abandonar el terreno..." name="button abandon land"/>
+		<button label="Subdividir..." label_selected="Subdividir..." name="button subdivide land"/>
+		<button label="Unir..." label_selected="Unir..." name="button join land"/>
+		<button label="Acerca del terreno..." label_selected="Acerca del terreno..." name="button about land"/>
+	</panel>
+	<string name="status_rotate">
+		Arrastre las bandas de color para girar el objeto
+	</string>
+	<string name="status_scale">
+		Pulse y arrastre para estirar el lado seleccionado
+	</string>
+	<string name="status_move">
+		Arrastrar para mover, arrastrar + Mayús. para copiar
+	</string>
+	<string name="status_modifyland">
+		Mantenga pulsado para modificar el terreno
+	</string>
+	<string name="status_camera">
+		Pulse y arrastre para cambiar el punto de vista
+	</string>
+	<string name="status_grab">
+		Arrastre para mover objetos: Ctrl, verticalmente; Ctrl-Mayús., horizontalmente
+	</string>
+	<string name="status_place">
+		Pulse en el mundo para crear; mayús. y pulsar para seleccionar
+	</string>
+	<string name="status_selectland">
+		Pulse y arrastre para seleccionar el terreno
+	</string>
+	<string name="grid_screen_text">
+		Pantalla
+	</string>
+	<string name="grid_local_text">
+		Local
+	</string>
+	<string name="grid_world_text">
+		Mundo
+	</string>
+	<string name="grid_reference_text">
+		Referencia
+	</string>
+	<string name="grid_attachment_text">
+		Añadido
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_top_objects.xml b/indra/newview/skins/default/xui/es/floater_top_objects.xml
index 97660a5e87..ce0c22062b 100644
--- a/indra/newview/skins/default/xui/es/floater_top_objects.xml
+++ b/indra/newview/skins/default/xui/es/floater_top_objects.xml
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="top_objects" title="cargando...">
-	<text name="title_text">
-		Cargando...
-	</text>
-	<scroll_list name="objects_list">
-		<column label="Resultado" name="score"/>
-		<column label="Nombre" name="name"/>
-		<column label="Propietario" name="owner"/>
-		<column label="Posición" name="location"/>
-		<column label="Tiempo" name="time"/>
-		<column label="Tiempo en Mono" name="mono_time"/>
-	</scroll_list>
-	<text name="id_text">
-		ID del objeto:
-	</text>
-	<button label="Mostrar la baliza" name="show_beacon_btn"/>
-	<text name="obj_name_text">
-		Nombre del objeto:
-	</text>
-	<button label="Filtro" name="filter_object_btn"/>
-	<text name="owner_name_text">
-		Nombre del propietario:
-	</text>
-	<button label="Filtro" name="filter_owner_btn"/>
-	<button label="Devolver lo seleccionado" name="return_selected_btn"/>
-	<button label="Devolver todo" name="return_all_btn"/>
-	<button label="Desactivar lo seleccionado" name="disable_selected_btn"/>
-	<button label="Desactivar todo" name="disable_all_btn"/>
-	<button label="Actualizar" name="refresh_btn"/>
-	<string name="top_scripts_title">
-		Scripts según su uso
-	</string>
-	<string name="top_scripts_text">
-		[COUNT] scripts con un total de [TIME] ms
-	</string>
-	<string name="scripts_score_label">
-		Tiempo
-	</string>
-	<string name="scripts_mono_time_label">
-		Tiempo en Mono
-	</string>
-	<string name="top_colliders_title">
-		Objetos que colisionan
-	</string>
-	<string name="top_colliders_text">
-		[COUNT] objetos con muchas posibles colisiones
-	</string>
-	<string name="colliders_score_label">
-		Resultado
-	</string>
-	<string name="none_descriptor">
-		No se ha encontrado ninguno.
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="top_objects" title="cargando...">
+	<text name="title_text">
+		Cargando...
+	</text>
+	<scroll_list name="objects_list">
+		<column label="Resultado" name="score"/>
+		<column label="Nombre" name="name"/>
+		<column label="Propietario" name="owner"/>
+		<column label="Posición" name="location"/>
+		<column label="Tiempo" name="time"/>
+		<column label="Tiempo en Mono" name="mono_time"/>
+	</scroll_list>
+	<text name="id_text">
+		ID del objeto:
+	</text>
+	<button label="Mostrar la baliza" name="show_beacon_btn"/>
+	<text name="obj_name_text">
+		Nombre del objeto:
+	</text>
+	<button label="Filtro" name="filter_object_btn"/>
+	<text name="owner_name_text">
+		Nombre del propietario:
+	</text>
+	<button label="Filtro" name="filter_owner_btn"/>
+	<button label="Devolver lo seleccionado" name="return_selected_btn"/>
+	<button label="Devolver todo" name="return_all_btn"/>
+	<button label="Desactivar lo seleccionado" name="disable_selected_btn"/>
+	<button label="Desactivar todo" name="disable_all_btn"/>
+	<button label="Actualizar" name="refresh_btn"/>
+	<string name="top_scripts_title">
+		Scripts según su uso
+	</string>
+	<string name="top_scripts_text">
+		[COUNT] scripts con un total de [TIME] ms
+	</string>
+	<string name="scripts_score_label">
+		Tiempo
+	</string>
+	<string name="scripts_mono_time_label">
+		Tiempo en Mono
+	</string>
+	<string name="top_colliders_title">
+		Objetos que colisionan
+	</string>
+	<string name="top_colliders_text">
+		[COUNT] objetos con muchas posibles colisiones
+	</string>
+	<string name="colliders_score_label">
+		Resultado
+	</string>
+	<string name="none_descriptor">
+		No se ha encontrado ninguno.
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_tos.xml b/indra/newview/skins/default/xui/es/floater_tos.xml
index bdd7a802a7..9f2ff615f3 100644
--- a/indra/newview/skins/default/xui/es/floater_tos.xml
+++ b/indra/newview/skins/default/xui/es/floater_tos.xml
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="modal container" title=" ">
-	<button label="Continuar" label_selected="Continuar" name="Continue"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-	<check_box label="Estoy de acuerdo con las Condiciones del Servicio" name="agree_chk"/>
-	<text name="tos_heading">
-		Por favor, lea cuidadosamente las siguientes Condiciones del Servicio. Si quiere seguir iniciando sesión en Second Life,
-debe aceptar el acuerdo.
-	</text>
-	<text_editor name="tos_text">
-		TOS_TEXT
-	</text_editor>
-	<string name="real_url">
-		http://secondlife.com/app/tos/
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="modal container" title=" ">
+	<button label="Continuar" label_selected="Continuar" name="Continue"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+	<check_box label="Estoy de acuerdo con las Condiciones del Servicio" name="agree_chk"/>
+	<text name="tos_heading">
+		Por favor, lea cuidadosamente las siguientes Condiciones del Servicio. Si quiere seguir iniciando sesión en Second Life,
+debe aceptar el acuerdo.
+	</text>
+	<text_editor name="tos_text">
+		TOS_TEXT
+	</text_editor>
+	<string name="real_url">
+		http://secondlife.com/app/tos/
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_wearable_save_as.xml b/indra/newview/skins/default/xui/es/floater_wearable_save_as.xml
index 4a4fb15aef..34e76abb42 100644
--- a/indra/newview/skins/default/xui/es/floater_wearable_save_as.xml
+++ b/indra/newview/skins/default/xui/es/floater_wearable_save_as.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="modal container" title=" ">
-	<button label="Guardar" label_selected="Guardar" name="Save"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-	<text length="1" name="Save item as:" type="string">
-		Guardar el ítem como:
-	</text>
-	<line_editor name="name ed">
-		Nuevo [DESC]
-	</line_editor>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="modal container" title=" ">
+	<button label="Guardar" label_selected="Guardar" name="Save"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+	<text length="1" name="Save item as:" type="string">
+		Guardar el ítem como:
+	</text>
+	<line_editor name="name ed">
+		Nuevo [DESC]
+	</line_editor>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/floater_world_map.xml b/indra/newview/skins/default/xui/es/floater_world_map.xml
index 2dc51d6c2e..cf1af23479 100644
--- a/indra/newview/skins/default/xui/es/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/es/floater_world_map.xml
@@ -1,74 +1,74 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="worldmap" title="Mapa del Mundo">
-	<tab_container name="maptab">
-		<panel label="Objetos" name="objects_mapview"/>
-		<panel label="Terreno" name="terrain_mapview"/>
-	</tab_container>
-	<text name="land_for_sale_label">
-		Terreno en venta
-	</text>
-	<text name="auction_label">
-		Subasta
-	</text>
-	<text name="you_label">
-		Usted
-	</text>
-	<text name="home_label">
-		Base
-	</text>
-	<button label="Ir a la Base" label_selected="Ir a la Base" name="Go Home" tool_tip="Teleportar a su Base"/>
-	<text name="person_label">
-		Persona
-	</text>
-	<check_box label=" " name="people_chk"/>
-	<text name="infohub_label">
-		Punto de Información
-	</text>
-	<check_box label=" " name="infohub_chk"/>
-	<text name="telehub_label">
-		Punto de Teleporte
-	</text>
-	<check_box label=" " name="telehubchk"/>
-	<text name="land_for_sale_label2">
-		Terreno en venta
-	</text>
-	<check_box label=" " name="land_for_sale_chk"/>
-	<text name="events_label">
-		Eventos
-	</text>
-	<check_box label=" " name="event_chk"/>
-
-
-	<check_box name="event_mature_chk"/>
-	<combo_box label="Amigos conectados" name="friend combo" tool_tip="Amigo a mostrar en el mapa">
-		<combo_item name="none_selected">
-			Amigos conectados
-		</combo_item>
-	</combo_box>
-	<combo_box label="Hitos" name="landmark combo" tool_tip="Hito a mostrar en el mapa">
-		<combo_item name="none_selected">
-			Hitos
-		</combo_item>
-	</combo_box>
-	<line_editor label="Buscar por el nombre de la región" name="location" tool_tip="Escriba el nombre de una región"/>
-	<button label="Buscar" name="DoSearch" tool_tip="Buscar una región"/>
-	<text name="search_label">
-		Resultados de la búsqueda:
-	</text>
-	<scroll_list name="search_results">
-		<column label="" name="icon"/>
-		<column label="" name="sim_name"/>
-	</scroll_list>
-	<text name="location_label">
-		Localización:
-	</text>
-	<spinner name="spin x" tool_tip="Coordenada X de la posición a mostrar en el mapa"/>
-	<spinner name="spin y" tool_tip="Coordenada Y de la posición a mostrar en el mapa"/>
-	<spinner name="spin z" tool_tip="Coordenada Z de la posición a mostrar en el mapa"/>
-	<button label="Teleportar" label_selected="Teleportar" name="Teleport" tool_tip="Teleportarse a la localización elegida"/>
-	<button label="Mostrar el destino" label_selected="Mostrar el destino" name="Show Destination" tool_tip="Centrar el mapa en la localización elegida"/>
-	<button label="Limpiar" label_selected="Limpiar" name="Clear" tool_tip="Parar la búsqueda"/>
-	<button label="Mostrar mi posición" label_selected="Mostrar mi posición" name="Show My Location" tool_tip="Centrar el mapa en la posición de su avatar"/>
-	<button label="Copiar la SLurl al portapapeles" name="copy_slurl" tool_tip="Copiar la posición actual como una SLurl, para usarla en la web."/>
-	<slider label="Zoom" name="zoom slider"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="worldmap" title="Mapa del Mundo">
+	<tab_container name="maptab">
+		<panel label="Objetos" name="objects_mapview"/>
+		<panel label="Terreno" name="terrain_mapview"/>
+	</tab_container>
+	<text name="land_for_sale_label">
+		Terreno en venta
+	</text>
+	<text name="auction_label">
+		Subasta
+	</text>
+	<text name="you_label">
+		Usted
+	</text>
+	<text name="home_label">
+		Base
+	</text>
+	<button label="Ir a la Base" label_selected="Ir a la Base" name="Go Home" tool_tip="Teleportar a su Base"/>
+	<text name="person_label">
+		Persona
+	</text>
+	<check_box label=" " name="people_chk"/>
+	<text name="infohub_label">
+		Punto de Información
+	</text>
+	<check_box label=" " name="infohub_chk"/>
+	<text name="telehub_label">
+		Punto de Teleporte
+	</text>
+	<check_box label=" " name="telehubchk"/>
+	<text name="land_for_sale_label2">
+		Terreno en venta
+	</text>
+	<check_box label=" " name="land_for_sale_chk"/>
+	<text name="events_label">
+		Eventos
+	</text>
+	<check_box label=" " name="event_chk"/>
+
+
+	<check_box name="event_mature_chk"/>
+	<combo_box label="Amigos conectados" name="friend combo" tool_tip="Amigo a mostrar en el mapa">
+		<combo_box.item name="none_selected">
+			Amigos conectados
+		</combo_box.item>
+	</combo_box>
+	<combo_box label="Hitos" name="landmark combo" tool_tip="Hito a mostrar en el mapa">
+		<combo_box.item name="none_selected">
+			Hitos
+		</combo_box.item>
+	</combo_box>
+	<line_editor label="Buscar por el nombre de la región" name="location" tool_tip="Escriba el nombre de una región"/>
+	<button label="Buscar" name="DoSearch" tool_tip="Buscar una región"/>
+	<text name="search_label">
+		Resultados de la búsqueda:
+	</text>
+	<scroll_list name="search_results">
+		<column label="" name="icon"/>
+		<column label="" name="sim_name"/>
+	</scroll_list>
+	<text name="location_label">
+		Localización:
+	</text>
+	<spinner name="spin x" tool_tip="Coordenada X de la posición a mostrar en el mapa"/>
+	<spinner name="spin y" tool_tip="Coordenada Y de la posición a mostrar en el mapa"/>
+	<spinner name="spin z" tool_tip="Coordenada Z de la posición a mostrar en el mapa"/>
+	<button label="Teleportar" label_selected="Teleportar" name="Teleport" tool_tip="Teleportarse a la localización elegida"/>
+	<button label="Mostrar el destino" label_selected="Mostrar el destino" name="Show Destination" tool_tip="Centrar el mapa en la localización elegida"/>
+	<button label="Limpiar" label_selected="Limpiar" name="Clear" tool_tip="Parar la búsqueda"/>
+	<button label="Mostrar mi posición" label_selected="Mostrar mi posición" name="Show My Location" tool_tip="Centrar el mapa en la posición de su avatar"/>
+	<button label="Copiar la SLurl al portapapeles" name="copy_slurl" tool_tip="Copiar la posición actual como una SLurl, para usarla en la web."/>
+	<slider label="Zoom" name="zoom slider"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/es/menu_inventory.xml b/indra/newview/skins/default/xui/es/menu_inventory.xml
index e776bf0b0c..a503429ff9 100644
--- a/indra/newview/skins/default/xui/es/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/es/menu_inventory.xml
@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu name="Popup">
-	<menu_item_call label="Comprar" name="Task Buy"/>
-	<menu_item_call label="Abrir" name="Task Open"/>
-	<menu_item_call label="Ejecutar" name="Task Play"/>
-	<menu_item_call label="Propiedades" name="Task Properties"/>
-	<menu_item_call label="Renombrar" name="Task Rename"/>
-	<menu_item_call label="Borrar" name="Task Remove"/>
-	<menu_item_call label="Vaciar la papelera" name="Empty Trash"/>
-	<menu_item_call label="Vaciar Objetos Perdidos" name="Empty Lost And Found"/>
-	<menu_item_call label="Carpeta nueva" name="New Folder"/>
-	<menu_item_call label="Script nuevo" name="New Script"/>
-	<menu_item_call label="Nota nueva" name="New Note"/>
-	<menu_item_call label="Gesto nuevo" name="New Gesture"/>
-	<menu name="New Clothes">
-		<menu_item_call label="Camisa nueva" name="New Shirt"/>
-		<menu_item_call label="Pantalones nuevos" name="New Pants"/>
-		<menu_item_call label="Zapatos nuevos" name="New Shoes"/>
-		<menu_item_call label="Calcetines nuevos" name="New Socks"/>
-		<menu_item_call label="Chaqueta nueva" name="New Jacket"/>
-		<menu_item_call label="Falda nueva" name="New Skirt"/>
-		<menu_item_call label="Guantes nuevos" name="New Gloves"/>
-		<menu_item_call label="Camiseta nueva" name="New Undershirt"/>
-		<menu_item_call label="Ropa interior nueva" name="New Underpants"/>
-	</menu>
-	<menu name="New Body Parts">
-		<menu_item_call label="Forma nueva" name="New Shape"/>
-		<menu_item_call label="Piel nueva" name="New Skin"/>
-		<menu_item_call label="Pelo nuevo" name="New Hair"/>
-		<menu_item_call label="Ojos nuevos" name="New Eyes"/>
-	</menu>
-	<menu_item_call label="Teleportar" name="Landmark Open"/>
-	<menu_item_call label="Abrir" name="Animation Open"/>
-	<menu_item_call label="Abrir" name="Sound Open"/>
-	<menu_item_call label="Eliminar el ítem" name="Purge Item"/>
-	<menu_item_call label="Restaurar el ítem" name="Restore Item"/>
-	<menu_item_call label="Abrir" name="Open"/>
-	<menu_item_call label="Propiedades" name="Properties"/>
-	<menu_item_call label="Renombrar" name="Rename"/>
-	<menu_item_call label="Copiar la UUID" name="Copy Asset UUID"/>
-	<menu_item_call label="Copiar" name="Copy"/>
-	<menu_item_call label="Pegar" name="Paste"/>
-	<menu_item_call label="Borrar" name="Delete"/>
-	<menu_item_call label="Quitarse los ítems" name="Take Off Items"/>
-	<menu_item_call label="Añadir al vestuario" name="Add To Outfit"/>
-	<menu_item_call label="Reemplazar el vestuario" name="Replace Outfit"/>
-	<menu_item_call label="Empezar multiconferencia" name="Conference Chat Folder"/>
-	<menu_item_call label="Escuchar" name="Sound Play"/>
-	<menu_item_call label="Acerca del hito" name="Teleport To Landmark"/>
-	<menu_item_call label="Ver en el mundo" name="Animation Play"/>
-	<menu_item_call label="Ejecutarla para usted" name="Animation Audition"/>
-	<menu_item_call label="Enviar un mensaje instantáneo" name="Send Instant Message"/>
-	<menu_item_call label="Ofrecer teleporte..." name="Offer Teleport..."/>
-	<menu_item_call label="Empezar multiconferencia" name="Conference Chat"/>
-	<menu_item_call label="Activar" name="Activate"/>
-	<menu_item_call label="Desactivar" name="Deactivate"/>
-	<menu_item_call label="Quitarse" name="Detach From Yourself"/>
-	<menu_item_call label="Ponerse" name="Object Wear"/>
-	<menu label="Anexar a" name="Attach To"/>
-	<menu label="Anexar como HUD" name="Attach To HUD"/>
-	<menu_item_call label="Editar" name="Wearable Edit"/>
-	<menu_item_call label="Ponerse" name="Wearable Wear"/>
-	<menu_item_call label="Quitarse" name="Take Off"/>
-	<menu_item_call label="--sin opciones--" name="--no options--"/>
-</menu>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<menu name="Popup">
+	<menu_item_call label="Comprar" name="Task Buy"/>
+	<menu_item_call label="Abrir" name="Task Open"/>
+	<menu_item_call label="Ejecutar" name="Task Play"/>
+	<menu_item_call label="Propiedades" name="Task Properties"/>
+	<menu_item_call label="Renombrar" name="Task Rename"/>
+	<menu_item_call label="Borrar" name="Task Remove"/>
+	<menu_item_call label="Vaciar la papelera" name="Empty Trash"/>
+	<menu_item_call label="Vaciar Objetos Perdidos" name="Empty Lost And Found"/>
+	<menu_item_call label="Carpeta nueva" name="New Folder"/>
+	<menu_item_call label="Script nuevo" name="New Script"/>
+	<menu_item_call label="Nota nueva" name="New Note"/>
+	<menu_item_call label="Gesto nuevo" name="New Gesture"/>
+	<menu name="New Clothes">
+		<menu_item_call label="Camisa nueva" name="New Shirt"/>
+		<menu_item_call label="Pantalones nuevos" name="New Pants"/>
+		<menu_item_call label="Zapatos nuevos" name="New Shoes"/>
+		<menu_item_call label="Calcetines nuevos" name="New Socks"/>
+		<menu_item_call label="Chaqueta nueva" name="New Jacket"/>
+		<menu_item_call label="Falda nueva" name="New Skirt"/>
+		<menu_item_call label="Guantes nuevos" name="New Gloves"/>
+		<menu_item_call label="Camiseta nueva" name="New Undershirt"/>
+		<menu_item_call label="Ropa interior nueva" name="New Underpants"/>
+	</menu>
+	<menu name="New Body Parts">
+		<menu_item_call label="Forma nueva" name="New Shape"/>
+		<menu_item_call label="Piel nueva" name="New Skin"/>
+		<menu_item_call label="Pelo nuevo" name="New Hair"/>
+		<menu_item_call label="Ojos nuevos" name="New Eyes"/>
+	</menu>
+	<menu_item_call label="Teleportar" name="Landmark Open"/>
+	<menu_item_call label="Abrir" name="Animation Open"/>
+	<menu_item_call label="Abrir" name="Sound Open"/>
+	<menu_item_call label="Eliminar el ítem" name="Purge Item"/>
+	<menu_item_call label="Restaurar el ítem" name="Restore Item"/>
+	<menu_item_call label="Abrir" name="Open"/>
+	<menu_item_call label="Propiedades" name="Properties"/>
+	<menu_item_call label="Renombrar" name="Rename"/>
+	<menu_item_call label="Copiar la UUID" name="Copy Asset UUID"/>
+	<menu_item_call label="Copiar" name="Copy"/>
+	<menu_item_call label="Pegar" name="Paste"/>
+	<menu_item_call label="Borrar" name="Delete"/>
+	<menu_item_call label="Quitarse los ítems" name="Take Off Items"/>
+	<menu_item_call label="Añadir al vestuario" name="Add To Outfit"/>
+	<menu_item_call label="Reemplazar el vestuario" name="Replace Outfit"/>
+	<menu_item_call label="Empezar multiconferencia" name="Conference Chat Folder"/>
+	<menu_item_call label="Escuchar" name="Sound Play"/>
+	<menu_item_call label="Acerca del hito" name="Teleport To Landmark"/>
+	<menu_item_call label="Ver en el mundo" name="Animation Play"/>
+	<menu_item_call label="Ejecutarla para usted" name="Animation Audition"/>
+	<menu_item_call label="Enviar un mensaje instantáneo" name="Send Instant Message"/>
+	<menu_item_call label="Ofrecer teleporte..." name="Offer Teleport..."/>
+	<menu_item_call label="Empezar multiconferencia" name="Conference Chat"/>
+	<menu_item_call label="Activar" name="Activate"/>
+	<menu_item_call label="Desactivar" name="Deactivate"/>
+	<menu_item_call label="Quitarse" name="Detach From Yourself"/>
+	<menu_item_call label="Ponerse" name="Object Wear"/>
+	<menu label="Anexar a" name="Attach To"/>
+	<menu label="Anexar como HUD" name="Attach To HUD"/>
+	<menu_item_call label="Editar" name="Wearable Edit"/>
+	<menu_item_call label="Ponerse" name="Wearable Wear"/>
+	<menu_item_call label="Quitarse" name="Take Off"/>
+	<menu_item_call label="--sin opciones--" name="--no options--"/>
+</menu>
diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml
index 8e95c158da..1721701c9f 100644
--- a/indra/newview/skins/default/xui/es/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/es/menu_viewer.xml
@@ -1,203 +1,203 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu_bar name="Main Menu">
-	<menu label="Archivo" name="File">
-		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
-		<menu label="Subir" name="upload">
-			<menu_item_call label="Subir imagen ([COST] L$)..." name="Upload Image"/>
-			<menu_item_call label="Subir sonido ([COST] L$)..." name="Upload Sound"/>
-			<menu_item_call label="Subir animación ([COST] L$)..." name="Upload Animation"/>
-			<menu_item_call label="Subida masiva ([COST] L$ por archivo)..." name="Bulk Upload"/>
-		</menu>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Cerrar la ventana" name="Close Window"/>
-		<menu_item_call label="Cerrar todas las ventanas" name="Close All Windows"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Guardar la textura como..." name="Save Texture As..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Hacer una foto" name="Take Snapshot"/>
-		<menu_item_call label="Guardar una foto" name="Snapshot to Disk"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Salir" name="Quit"/>
-	</menu>
-	<menu label="Editar" name="Edit">
-		<menu_item_call label="Deshacer" name="Undo"/>
-		<menu_item_call label="Rehacer" name="Redo"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Cortar" name="Cut"/>
-		<menu_item_call label="Copiar" name="Copy"/>
-		<menu_item_call label="Pegar" name="Paste"/>
-		<menu_item_call label="Borrar" name="Delete"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Buscar..." name="Search..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Seleccionar todo" name="Select All"/>
-		<menu_item_call label="Deseleccionar" name="Deselect"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Duplicar" name="Duplicate"/>
-		<menu_item_separator label="-----------" name="separator5"/>
-		<menu label="Anexar el objeto" name="Attach Object"/>
-		<menu label="Quitarse el objeto" name="Detach Object"/>
-		<menu label="Quitarse ropa" name="Take Off Clothing">
-			<menu_item_call label="Camisa" name="Shirt"/>
-			<menu_item_call label="Pantalones" name="Pants"/>
-			<menu_item_call label="Zapatos" name="Shoes"/>
-			<menu_item_call label="Calcetines" name="Socks"/>
-			<menu_item_call label="Chaqueta" name="Jacket"/>
-			<menu_item_call label="Guantes" name="Gloves"/>
-			<menu_item_call label="Camiseta" name="Menu Undershirt"/>
-			<menu_item_call label="Ropa interior" name="Menu Underpants"/>
-			<menu_item_call label="Falda" name="Skirt"/>
-			<menu_item_call label="Toda la ropa" name="All Clothes"/>
-		</menu>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu_item_call label="Gestos..." name="Gestures..."/>
-		<menu_item_call label="Perfil..." name="Profile..."/>
-		<menu_item_call label="Apariencia..." name="Appearance..."/>
-		<menu_item_separator label="-----------" name="separator7"/>
-		<menu_item_check label="Amigos..." name="Friends..."/>
-		<menu_item_call label="Grupos..." name="Groups..."/>
-		<menu_item_separator label="-----------" name="separator8"/>
-		<menu_item_call label="Preferencias..." name="Preferences..."/>
-	</menu>
-	<menu label="Ver" name="View">
-		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
-		<menu_item_call label="Vista subjetiva" name="Mouselook"/>
-		<menu_item_check label="Construir" name="Build"/>
-		<menu_item_check label="Flycam del joystick" name="Joystick Flycam"/>
-		<menu_item_call label="Volver a la vista por defecto" name="Reset View"/>
-		<menu_item_call label="Mirar al último que habló" name="Look at Last Chatter"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_check label="Barra de herramientas" name="Toolbar"/>
-		<menu_item_check label="Chat" name="Chat History"/>
-		<menu_item_check label="Comunicarse" name="Instant Message"/>
-		<menu_item_check label="Inventario" name="Inventory"/>
-		<menu_item_check label="Participantes activos" name="Active Speakers"/>
-		<menu_item_check label="Lista de ignorados" name="Mute List"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_check label="Controles de la cámara" name="Camera Controls"/>
-		<menu_item_check label="Controles del movimiento" name="Movement Controls"/>
-		<menu_item_check label="Mapa del mundo" name="World Map"/>
-		<menu_item_check label="Minimapa" name="Mini-Map"/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_check label="Estadísticas" name="Statistics Bar"/>
-		<menu_item_check label="Límites de las parcelas" name="Property Lines"/>
-		<menu_item_check label="Propietarios del terreno" name="Land Owners"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu label="Información adicional" name="Hover Tips">
-			<menu_item_check label="Mostrar información adicional." name="Show Tips"/>
-			<menu_item_separator label="-----------" name="separator"/>
-			<menu_item_check label="Información adicional del terreno" name="Land Tips"/>
-			<menu_item_check label="Información adicional en todos los objetos" name="Tips On All Objects"/>
-		</menu>
-		<menu_item_check label="Realzar las transparencias" name="Highlight Transparent"/>
-		<menu_item_check label="Balizas" name="beacons"/>
-		<menu_item_check label="Ocultar las partículas" name="Hide Particles"/>
-		<menu_item_check label="Mostrar los HUD en uso" name="Show HUD Attachments"/>
-		<menu_item_separator label="-----------" name="separator5"/>
-		<menu_item_call label="Acercar el zoom" name="Zoom In"/>
-		<menu_item_call label="Zoom predeterminado" name="Zoom Default"/>
-		<menu_item_call label="Alejar el zoom" name="Zoom Out"/>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu_item_call label="Pantalla completa" name="Toggle Fullscreen"/>
-		<menu_item_call label="Interfaz en el tamaño predeterminado" name="Set UI Size to Default"/>
-	</menu>
-	<menu label="Mundo" name="World">
-		<menu_item_call label="Chat" name="Chat"/>
-		<menu_item_check label="Correr siempre" name="Always Run"/>
-		<menu_item_check label="Volar" name="Fly"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Crear aquí un hito" name="Create Landmark Here"/>
-		<menu_item_call label="Fijar mi Base aquí" name="Set Home to Here"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Teleportar a mi Base" name="Teleport Home"/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Pasar al estado ausente" name="Set Away"/>
-		<menu_item_call label="Pasar al estado ocupado" name="Set Busy"/>
-		<menu_item_call label="Parar todas las animaciones" name="Stop All Animations"/>
-		<menu_item_call label="Recuperar las teclas" name="Release Keys"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Historial de mi cuenta..." name="Account History..."/>
-		<menu_item_call label="Administrar mi cuenta..." name="Manage My Account..."/>
-		<menu_item_call label="Comprar L$..." name="Buy and Sell L$..."/>
-		<menu_item_separator label="-----------" name="separator5"/>
-		<menu_item_call label="Mi terreno..." name="My Land..."/>
-		<menu_item_call label="Acerca del terreno..." name="About Land..."/>
-		<menu_item_call label="Comprar terreno..." name="Buy Land..."/>
-		<menu_item_call label="Region/Estado..." name="Region/Estate..."/>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu label="Configuración del entorno" name="Environment Settings">
-			<menu_item_call label="Amanecer" name="Sunrise"/>
-			<menu_item_call label="Mediodía" name="Noon"/>
-			<menu_item_call label="Atardecer" name="Sunset"/>
-			<menu_item_call label="Medianoche" name="Midnight"/>
-			<menu_item_call label="Volver a los valores por defecto de la región" name="Revert to Region Default"/>
-			<menu_item_separator label="-----------" name="separator"/>
-			<menu_item_call label="Editor del entorno" name="Environment Editor"/>
-		</menu>
-	</menu>
-	<menu label="Herramientas" name="Tools">
-		<menu label="Elegir una herramienta" name="Select Tool">
-			<menu_item_call label="Visión" name="Focus"/>
-			<menu_item_call label="Moverse" name="Move"/>
-			<menu_item_call label="Modificar" name="Edit"/>
-			<menu_item_call label="Crear" name="Create"/>
-			<menu_item_call label="Terreno" name="Land"/>
-		</menu>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_check label="Seleccionar sólo mis objetos" name="Select Only My Objects"/>
-		<menu_item_check label="Seleccionar sólo objetos movibles" name="Select Only Movable Objects"/>
-		<menu_item_check label="Seleccionar marcando los alrededores" name="Select By Surrounding"/>
-		<menu_item_check label="Al seleccionar, mostrar los ocultos" name="Show Hidden Selection"/>
-		<menu_item_check label="Al seleccionar, mostrar el radio de la luz" name="Show Light Radius for Selection"/>
-		<menu_item_check label="Mostrar rayo indicador" name="Show Selection Beam"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_check label="Ajustar a la cuadrícula" name="Snap to Grid"/>
-		<menu_item_call label="Ajustar a la cuadrícula los ejes X e Y" name="Snap Object XY to Grid"/>
-		<menu_item_call label="Usar lo seleccionado como cuadrícula" name="Use Selection for Grid"/>
-		<menu_item_call label="Opciones de la cuadrícula..." name="Grid Options..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_check label="Editar las partes enlazadas" name="Edit Linked Parts"/>
-		<menu_item_call label="Enlazar" name="Link"/>
-		<menu_item_call label="Desenlazar" name="Unlink"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Visión en lo seleccionado" name="Focus on Selection"/>
-		<menu_item_call label="Zoom en lo seleccionado" name="Zoom to Selection"/>
-		<menu_item_call label="Comprar el objeto" name="Menu Object Take"/>
-		<menu_item_call label="Coger una copia" name="Take Copy"/>
-		<menu_item_call label="Devolver una copia del objeto a mi inventario" name="Save Object Back to My Inventory"/>
-		<menu_item_call label="Devolver una copia del objeto a los contenidos de donde salió" name="Save Object Back to Object Contents"/>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu_item_call label="Ver en una ventana los errores o alertas de los scripts" name="Show Script Warning/Error Window"/>
-		<menu label="Recompilar los scripts en lo seleccionado" name="Recompile Scripts in Selection">
-			<menu_item_call label="Mono" name="Mono"/>
-			<menu_item_call label="LSL" name="LSL"/>
-		</menu>
-		<menu_item_call label="Reiniciar los scripts en lo seleccionado" name="Reset Scripts in Selection"/>
-		<menu_item_call label="Definir los scripts a ejecutar en lo seleccionado" name="Set Scripts to Running in Selection"/>
-		<menu_item_call label="Definir los scripts a no ejecutar en lo seleccionado" name="Set Scripts to Not Running in Selection"/>
-	</menu>
-	<menu label="Ayuda" name="Help">
-		<menu_item_call label="Ayuda de Second Life" name="Second Life Help"/>
-		<menu_item_call label="Tutorial" name="Tutorial"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Blog oficial..." name="Official Linden Blog..."/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Portal de programación..." name="Scripting Portal..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Denunciar una infracción..." name="Report Abuse..."/>
-		<menu_item_call label="Choques, empujones, e impactos..." name="Bumps, Pushes &amp;amp; Hits..."/>
-		<menu_item_call label="Medidor del lag" name="Lag Meter"/>
-		<menu_item_separator label="-----------" name="separator7"/>
-		<menu label="Informes de fallos" name="Bug Reporting">
-			<menu_item_call label="Public Issue Tracker..." name="Public Issue Tracker..."/>
-			<menu_item_call label="Ayuda del Public Issue Tracker..." name="Publc Issue Tracker Help..."/>
-			<menu_item_separator label="-----------" name="separator7"/>
-			<menu_item_call label="Informes de fallos - instrucciones..." name="Bug Reporing 101..."/>
-			<menu_item_call label="Problemas de seguridad..." name="Security Issues..."/>
-			<menu_item_call label="Wiki QA..." name="QA Wiki..."/>
-			<menu_item_separator label="-----------" name="separator9"/>
-			<menu_item_call label="Informar de un fallo..." name="Report Bug..."/>
-		</menu>
-		<menu_item_call label="Acerca de Second Life..." name="About Second Life..."/>
-	</menu>
-</menu_bar>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<menu_bar name="Main Menu">
+	<menu label="Archivo" name="File">
+		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
+		<menu label="Subir" name="upload">
+			<menu_item_call label="Subir imagen ([COST] L$)..." name="Upload Image"/>
+			<menu_item_call label="Subir sonido ([COST] L$)..." name="Upload Sound"/>
+			<menu_item_call label="Subir animación ([COST] L$)..." name="Upload Animation"/>
+			<menu_item_call label="Subida masiva ([COST] L$ por archivo)..." name="Bulk Upload"/>
+		</menu>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Cerrar la ventana" name="Close Window"/>
+		<menu_item_call label="Cerrar todas las ventanas" name="Close All Windows"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Guardar la textura como..." name="Save Texture As..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Hacer una foto" name="Take Snapshot"/>
+		<menu_item_call label="Guardar una foto" name="Snapshot to Disk"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Salir" name="Quit"/>
+	</menu>
+	<menu label="Editar" name="Edit">
+		<menu_item_call label="Deshacer" name="Undo"/>
+		<menu_item_call label="Rehacer" name="Redo"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Cortar" name="Cut"/>
+		<menu_item_call label="Copiar" name="Copy"/>
+		<menu_item_call label="Pegar" name="Paste"/>
+		<menu_item_call label="Borrar" name="Delete"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Buscar..." name="Search..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Seleccionar todo" name="Select All"/>
+		<menu_item_call label="Deseleccionar" name="Deselect"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Duplicar" name="Duplicate"/>
+		<menu_item_separator label="-----------" name="separator5"/>
+		<menu label="Anexar el objeto" name="Attach Object"/>
+		<menu label="Quitarse el objeto" name="Detach Object"/>
+		<menu label="Quitarse ropa" name="Take Off Clothing">
+			<menu_item_call label="Camisa" name="Shirt"/>
+			<menu_item_call label="Pantalones" name="Pants"/>
+			<menu_item_call label="Zapatos" name="Shoes"/>
+			<menu_item_call label="Calcetines" name="Socks"/>
+			<menu_item_call label="Chaqueta" name="Jacket"/>
+			<menu_item_call label="Guantes" name="Gloves"/>
+			<menu_item_call label="Camiseta" name="Menu Undershirt"/>
+			<menu_item_call label="Ropa interior" name="Menu Underpants"/>
+			<menu_item_call label="Falda" name="Skirt"/>
+			<menu_item_call label="Toda la ropa" name="All Clothes"/>
+		</menu>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu_item_call label="Gestos..." name="Gestures..."/>
+		<menu_item_call label="Perfil..." name="Profile..."/>
+		<menu_item_call label="Apariencia..." name="Appearance..."/>
+		<menu_item_separator label="-----------" name="separator7"/>
+		<menu_item_check label="Amigos..." name="Friends..."/>
+		<menu_item_call label="Grupos..." name="Groups..."/>
+		<menu_item_separator label="-----------" name="separator8"/>
+		<menu_item_call label="Preferencias..." name="Preferences..."/>
+	</menu>
+	<menu label="Ver" name="View">
+		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
+		<menu_item_call label="Vista subjetiva" name="Mouselook"/>
+		<menu_item_check label="Construir" name="Build"/>
+		<menu_item_check label="Flycam del joystick" name="Joystick Flycam"/>
+		<menu_item_call label="Volver a la vista por defecto" name="Reset View"/>
+		<menu_item_call label="Mirar al último que habló" name="Look at Last Chatter"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_check label="Barra de herramientas" name="Toolbar"/>
+		<menu_item_check label="Chat" name="Chat History"/>
+		<menu_item_check label="Comunicarse" name="Instant Message"/>
+		<menu_item_check label="Inventario" name="Inventory"/>
+		<menu_item_check label="Participantes activos" name="Active Speakers"/>
+		<menu_item_check label="Lista de ignorados" name="Mute List"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_check label="Controles de la cámara" name="Camera Controls"/>
+		<menu_item_check label="Controles del movimiento" name="Movement Controls"/>
+		<menu_item_check label="Mapa del mundo" name="World Map"/>
+		<menu_item_check label="Minimapa" name="Mini-Map"/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_check label="Estadísticas" name="Statistics Bar"/>
+		<menu_item_check label="Límites de las parcelas" name="Property Lines"/>
+		<menu_item_check label="Propietarios del terreno" name="Land Owners"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu label="Información adicional" name="Hover Tips">
+			<menu_item_check label="Mostrar información adicional." name="Show Tips"/>
+			<menu_item_separator label="-----------" name="separator"/>
+			<menu_item_check label="Información adicional del terreno" name="Land Tips"/>
+			<menu_item_check label="Información adicional en todos los objetos" name="Tips On All Objects"/>
+		</menu>
+		<menu_item_check label="Realzar las transparencias" name="Highlight Transparent"/>
+		<menu_item_check label="Balizas" name="beacons"/>
+		<menu_item_check label="Ocultar las partículas" name="Hide Particles"/>
+		<menu_item_check label="Mostrar los HUD en uso" name="Show HUD Attachments"/>
+		<menu_item_separator label="-----------" name="separator5"/>
+		<menu_item_call label="Acercar el zoom" name="Zoom In"/>
+		<menu_item_call label="Zoom predeterminado" name="Zoom Default"/>
+		<menu_item_call label="Alejar el zoom" name="Zoom Out"/>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu_item_call label="Pantalla completa" name="Toggle Fullscreen"/>
+		<menu_item_call label="Interfaz en el tamaño predeterminado" name="Set UI Size to Default"/>
+	</menu>
+	<menu label="Mundo" name="World">
+		<menu_item_call label="Chat" name="Chat"/>
+		<menu_item_check label="Correr siempre" name="Always Run"/>
+		<menu_item_check label="Volar" name="Fly"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Crear aquí un hito" name="Create Landmark Here"/>
+		<menu_item_call label="Fijar mi Base aquí" name="Set Home to Here"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Teleportar a mi Base" name="Teleport Home"/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Pasar al estado ausente" name="Set Away"/>
+		<menu_item_call label="Pasar al estado ocupado" name="Set Busy"/>
+		<menu_item_call label="Parar todas las animaciones" name="Stop All Animations"/>
+		<menu_item_call label="Recuperar las teclas" name="Release Keys"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Historial de mi cuenta..." name="Account History..."/>
+		<menu_item_call label="Administrar mi cuenta..." name="Manage My Account..."/>
+		<menu_item_call label="Comprar L$..." name="Buy and Sell L$..."/>
+		<menu_item_separator label="-----------" name="separator5"/>
+		<menu_item_call label="Mi terreno..." name="My Land..."/>
+		<menu_item_call label="Acerca del terreno..." name="About Land..."/>
+		<menu_item_call label="Comprar terreno..." name="Buy Land..."/>
+		<menu_item_call label="Region/Estado..." name="Region/Estate..."/>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu label="Configuración del entorno" name="Environment Settings">
+			<menu_item_call label="Amanecer" name="Sunrise"/>
+			<menu_item_call label="Mediodía" name="Noon"/>
+			<menu_item_call label="Atardecer" name="Sunset"/>
+			<menu_item_call label="Medianoche" name="Midnight"/>
+			<menu_item_call label="Volver a los valores por defecto de la región" name="Revert to Region Default"/>
+			<menu_item_separator label="-----------" name="separator"/>
+			<menu_item_call label="Editor del entorno" name="Environment Editor"/>
+		</menu>
+	</menu>
+	<menu label="Herramientas" name="Tools">
+		<menu label="Elegir una herramienta" name="Select Tool">
+			<menu_item_call label="Visión" name="Focus"/>
+			<menu_item_call label="Moverse" name="Move"/>
+			<menu_item_call label="Modificar" name="Edit"/>
+			<menu_item_call label="Crear" name="Create"/>
+			<menu_item_call label="Terreno" name="Land"/>
+		</menu>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_check label="Seleccionar sólo mis objetos" name="Select Only My Objects"/>
+		<menu_item_check label="Seleccionar sólo objetos movibles" name="Select Only Movable Objects"/>
+		<menu_item_check label="Seleccionar marcando los alrededores" name="Select By Surrounding"/>
+		<menu_item_check label="Al seleccionar, mostrar los ocultos" name="Show Hidden Selection"/>
+		<menu_item_check label="Al seleccionar, mostrar el radio de la luz" name="Show Light Radius for Selection"/>
+		<menu_item_check label="Mostrar rayo indicador" name="Show Selection Beam"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_check label="Ajustar a la cuadrícula" name="Snap to Grid"/>
+		<menu_item_call label="Ajustar a la cuadrícula los ejes X e Y" name="Snap Object XY to Grid"/>
+		<menu_item_call label="Usar lo seleccionado como cuadrícula" name="Use Selection for Grid"/>
+		<menu_item_call label="Opciones de la cuadrícula..." name="Grid Options..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_check label="Editar las partes enlazadas" name="Edit Linked Parts"/>
+		<menu_item_call label="Enlazar" name="Link"/>
+		<menu_item_call label="Desenlazar" name="Unlink"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Visión en lo seleccionado" name="Focus on Selection"/>
+		<menu_item_call label="Zoom en lo seleccionado" name="Zoom to Selection"/>
+		<menu_item_call label="Comprar el objeto" name="Menu Object Take"/>
+		<menu_item_call label="Coger una copia" name="Take Copy"/>
+		<menu_item_call label="Devolver una copia del objeto a mi inventario" name="Save Object Back to My Inventory"/>
+		<menu_item_call label="Devolver una copia del objeto a los contenidos de donde salió" name="Save Object Back to Object Contents"/>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu_item_call label="Ver en una ventana los errores o alertas de los scripts" name="Show Script Warning/Error Window"/>
+		<menu label="Recompilar los scripts en lo seleccionado" name="Recompile Scripts in Selection">
+			<menu_item_call label="Mono" name="Mono"/>
+			<menu_item_call label="LSL" name="LSL"/>
+		</menu>
+		<menu_item_call label="Reiniciar los scripts en lo seleccionado" name="Reset Scripts in Selection"/>
+		<menu_item_call label="Definir los scripts a ejecutar en lo seleccionado" name="Set Scripts to Running in Selection"/>
+		<menu_item_call label="Definir los scripts a no ejecutar en lo seleccionado" name="Set Scripts to Not Running in Selection"/>
+	</menu>
+	<menu label="Ayuda" name="Help">
+		<menu_item_call label="Ayuda de Second Life" name="Second Life Help"/>
+		<menu_item_call label="Tutorial" name="Tutorial"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Blog oficial..." name="Official Linden Blog..."/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Portal de programación..." name="Scripting Portal..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Denunciar una infracción..." name="Report Abuse..."/>
+		<menu_item_call label="Choques, empujones, e impactos..." name="Bumps, Pushes &amp;amp; Hits..."/>
+		<menu_item_call label="Medidor del lag" name="Lag Meter"/>
+		<menu_item_separator label="-----------" name="separator7"/>
+		<menu label="Informes de fallos" name="Bug Reporting">
+			<menu_item_call label="Public Issue Tracker..." name="Public Issue Tracker..."/>
+			<menu_item_call label="Ayuda del Public Issue Tracker..." name="Publc Issue Tracker Help..."/>
+			<menu_item_separator label="-----------" name="separator7"/>
+			<menu_item_call label="Informes de fallos - instrucciones..." name="Bug Reporing 101..."/>
+			<menu_item_call label="Problemas de seguridad..." name="Security Issues..."/>
+			<menu_item_call label="Wiki QA..." name="QA Wiki..."/>
+			<menu_item_separator label="-----------" name="separator9"/>
+			<menu_item_call label="Informar de un fallo..." name="Report Bug..."/>
+		</menu>
+		<menu_item_call label="Acerca de Second Life..." name="About Second Life..."/>
+	</menu>
+</menu_bar>
diff --git a/indra/newview/skins/default/xui/es/panel_group_general.xml b/indra/newview/skins/default/xui/es/panel_group_general.xml
index 54377ef828..865dad9028 100644
--- a/indra/newview/skins/default/xui/es/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/es/panel_group_general.xml
@@ -1,71 +1,71 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="General" name="general_tab">
-	<string name="help_text">
-		La pestaña General contiene información global de este grupo,
-la lista de propietarios y miembros visibles,
-las preferencias generales del grupo, y las opciones de los miembros.
-
-Ponga su ratón sobre las opciones para más información.
-	</string>
-	<string name="group_info_unchanged">
-		La información general del grupo ha cambiado.
-	</string>
-	<button label="?" label_selected="?" name="help_button"/>
-	<line_editor label="Escriba aquí el nombre de su nuevo grupo" name="group_name_editor"/>
-	<text name="group_name">
-		Escriba aquí el nombre de su nuevo grupo
-	</text>
-	<text name="prepend_founded_by">
-		Creado por
-	</text>
-	<text name="founder_name">
-		(esperando)
-	</text>
-	<text name="group_charter_label">
-		Carta del grupo
-	</text>
-	<texture_picker label="Emblema del grupo" name="insignia" tool_tip="Pulse para elegir una imagen"/>
-	<text_editor name="charter">
-		Carta del grupo
-	</text_editor>
-	<button label="Entrar (0 L$)" label_selected="Entrar (0 L$)" name="join_button"/>
-	<button label="Ver en detalle" label_selected="Ver en detalle" name="info_button"/>
-	<text name="text_owners_and_visible_members">
-		Propietarios y Miembros visibles
-	</text>
-	<text name="text_owners_are_shown_in_bold">
-		(los propietarios aparecen en negrilla)
-	</text>
-	<name_list name="visible_members">
-		<column label="Nombre del miembro" name="name"/>
-		<column label="Etiqueta" name="title"/>
-		<column label="Última conexión" name="online"/>
-	</name_list>
-	<text name="text_group_preferences">
-		Preferencias del grupo
-	</text>
-	<panel name="preferences_container">
-		<check_box label="Mostrar en la búsqueda" name="show_in_group_list" tool_tip="Dejar que la gente vea este grupo en los resultados de la búsqueda."/>
-		<check_box label="Inscripción libre" name="open_enrollement" tool_tip="Definir si se admiten al grupo nuevos miembros sin que sea preciso invitárseles."/>
-		<check_box label="Cuota de inscripción en L$" name="check_enrollment_fee" tool_tip="Define si se requiere una cuota para entrar al grupo."/>
-		<spinner name="spin_enrollment_fee" tool_tip="Cuando está marcado &apos;Cuota de inscripción&apos;, los miembros nuevos deben pagar esta cuota para entrar al grupo."/>
-
-
-		<panel name="title_container">
-			<text name="active_title_label">
-				Mi etiqueta activa
-			</text>
-			<combo_box name="active_title" tool_tip="Define la etiqueta que aparecerá sobre el nombre de su avatar cuando tenga activo este grupo."/>
-		</panel>
-		<check_box label="Recibir los avisos del grupo" name="receive_notices" tool_tip="Define si quiere recibir avisos de este grupo. Desmarque esto si el grupo le envía spam."/>
-		<check_box label="Mostrar el grupo en mi perfil" name="list_groups_in_profile" tool_tip="Define si quiere que este grupo aparezca en su perfil."/>
-	</panel>
-	<string name="incomplete_member_data_str">
-		Recuperando los datos de los miembros
-	</string>
-	<string name="confirm_group_create_str">
-		Crear este grupo cuesta 100 L$. 
-¿Está plena, absoluta, y TOTALMENTE seguro de que quiere gastarse 100 L$ para crear este grupo?
-Queda avisado de que si, en un plazo de 48 horas, no entra nadie al grupo, éste será disuelto, y el nombre no se podrá usar en el futuro.
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="General" name="general_tab">
+	<string name="help_text">
+		La pestaña General contiene información global de este grupo,
+la lista de propietarios y miembros visibles,
+las preferencias generales del grupo, y las opciones de los miembros.
+
+Ponga su ratón sobre las opciones para más información.
+	</string>
+	<string name="group_info_unchanged">
+		La información general del grupo ha cambiado.
+	</string>
+	<button label="?" label_selected="?" name="help_button"/>
+	<line_editor label="Escriba aquí el nombre de su nuevo grupo" name="group_name_editor"/>
+	<text name="group_name">
+		Escriba aquí el nombre de su nuevo grupo
+	</text>
+	<text name="prepend_founded_by">
+		Creado por
+	</text>
+	<text name="founder_name">
+		(esperando)
+	</text>
+	<text name="group_charter_label">
+		Carta del grupo
+	</text>
+	<texture_picker label="Emblema del grupo" name="insignia" tool_tip="Pulse para elegir una imagen"/>
+	<text_editor name="charter">
+		Carta del grupo
+	</text_editor>
+	<button label="Entrar (0 L$)" label_selected="Entrar (0 L$)" name="join_button"/>
+	<button label="Ver en detalle" label_selected="Ver en detalle" name="info_button"/>
+	<text name="text_owners_and_visible_members">
+		Propietarios y Miembros visibles
+	</text>
+	<text name="text_owners_are_shown_in_bold">
+		(los propietarios aparecen en negrilla)
+	</text>
+	<name_list name="visible_members">
+		<column label="Nombre del miembro" name="name"/>
+		<column label="Etiqueta" name="title"/>
+		<column label="Última conexión" name="online"/>
+	</name_list>
+	<text name="text_group_preferences">
+		Preferencias del grupo
+	</text>
+	<panel name="preferences_container">
+		<check_box label="Mostrar en la búsqueda" name="show_in_group_list" tool_tip="Dejar que la gente vea este grupo en los resultados de la búsqueda."/>
+		<check_box label="Inscripción libre" name="open_enrollement" tool_tip="Definir si se admiten al grupo nuevos miembros sin que sea preciso invitárseles."/>
+		<check_box label="Cuota de inscripción en L$" name="check_enrollment_fee" tool_tip="Define si se requiere una cuota para entrar al grupo."/>
+		<spinner name="spin_enrollment_fee" tool_tip="Cuando está marcado &apos;Cuota de inscripción&apos;, los miembros nuevos deben pagar esta cuota para entrar al grupo."/>
+
+
+		<panel name="title_container">
+			<text name="active_title_label">
+				Mi etiqueta activa
+			</text>
+			<combo_box name="active_title" tool_tip="Define la etiqueta que aparecerá sobre el nombre de su avatar cuando tenga activo este grupo."/>
+		</panel>
+		<check_box label="Recibir los avisos del grupo" name="receive_notices" tool_tip="Define si quiere recibir avisos de este grupo. Desmarque esto si el grupo le envía spam."/>
+		<check_box label="Mostrar el grupo en mi perfil" name="list_groups_in_profile" tool_tip="Define si quiere que este grupo aparezca en su perfil."/>
+	</panel>
+	<string name="incomplete_member_data_str">
+		Recuperando los datos de los miembros
+	</string>
+	<string name="confirm_group_create_str">
+		Crear este grupo cuesta 100 L$. 
+¿Está plena, absoluta, y TOTALMENTE seguro de que quiere gastarse 100 L$ para crear este grupo?
+Queda avisado de que si, en un plazo de 48 horas, no entra nadie al grupo, éste será disuelto, y el nombre no se podrá usar en el futuro.
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_group_invite.xml b/indra/newview/skins/default/xui/es/panel_group_invite.xml
index 3bd3fd5c6e..66329c4f2b 100644
--- a/indra/newview/skins/default/xui/es/panel_group_invite.xml
+++ b/indra/newview/skins/default/xui/es/panel_group_invite.xml
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Invitar a un miembro" name="invite_panel">
-	<text name="help_text">
-		Puede seleccionar a varios residentes para 
-invitarles a su grupo. Para empezar, pulse
-&apos;Abrir el selector de personas&apos;.
-	</text>
-	<button label="Abrir el selector de personas" name="add_button" tool_tip=""/>
-	<name_list name="invitee_list" tool_tip="Para seleccionar a varios residentes, mantenga pulsada la tecla Ctrl y vaya pulsando sus nombres."/>
-	<button label="Eliminar de la lista a los seleccionados" name="remove_button" tool_tip="Elimina los residentes seleccionados de la lista de invitaciones."/>
-	<text name="role_text">
-		Elegir qué rol asignarles:
-	</text>
-	<combo_box name="role_name" tool_tip="Elige de la lista de roles cuál asignar a los miembros."/>
-	<button label="Enviar las invitaciones" name="ok_button"/>
-	<button label="Cancelar" name="cancel_button"/>
-	<string name="confirm_invite_owner_str">
-		¿Está seguro de que quiere invitar a un nuevo propietario/s? ¡Esta acción es permanente!
-	</string>
-	<string name="loading">
-		(cargando...)
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Invitar a un miembro" name="invite_panel">
+	<text name="help_text">
+		Puede seleccionar a varios residentes para 
+invitarles a su grupo. Para empezar, pulse
+&apos;Abrir el selector de personas&apos;.
+	</text>
+	<button label="Abrir el selector de personas" name="add_button" tool_tip=""/>
+	<name_list name="invitee_list" tool_tip="Para seleccionar a varios residentes, mantenga pulsada la tecla Ctrl y vaya pulsando sus nombres."/>
+	<button label="Eliminar de la lista a los seleccionados" name="remove_button" tool_tip="Elimina los residentes seleccionados de la lista de invitaciones."/>
+	<text name="role_text">
+		Elegir qué rol asignarles:
+	</text>
+	<combo_box name="role_name" tool_tip="Elige de la lista de roles cuál asignar a los miembros."/>
+	<button label="Enviar las invitaciones" name="ok_button"/>
+	<button label="Cancelar" name="cancel_button"/>
+	<string name="confirm_invite_owner_str">
+		¿Está seguro de que quiere invitar a un nuevo propietario/s? ¡Esta acción es permanente!
+	</string>
+	<string name="loading">
+		(cargando...)
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_group_land_money.xml b/indra/newview/skins/default/xui/es/panel_group_land_money.xml
index e1ac9e0c33..436a79d429 100644
--- a/indra/newview/skins/default/xui/es/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/es/panel_group_land_money.xml
@@ -1,75 +1,75 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Terreno y L$" name="land_money_tab">
-	<string name="help_text">
-		Se listan las parcelas propiedad del grupo, detallando las contribuciones. Aparece una advertencia si el Terreno total en uso es menor que o igual a la Contribución total. Las pestañas &apos;Planeamiento&apos;, &apos;Detalles&apos; y &apos;Ventas&apos; aportan información sobre las finanzas del grupo.
-	</string>
-	<button label="?" name="help_button"/>
-	<string name="cant_view_group_land_text">
-		No tiene permiso para ver qué terreno posee el grupo.
-	</string>
-	<string name="cant_view_group_accounting_text">
-		No tiene permiso para ver la información de la cuenta del grupo.
-	</string>
-	<string name="loading_txt">
-		Cargando...
-	</string>
-	<text name="group_land_heading">
-		Terreno propiedad del grupo
-	</text>
-	<scroll_list name="group_parcel_list">
-		<column label="Nombre de la parcela" name="name"/>
-		<column label="Región" name="location"/>
-		<column label="Superficie" name="area"/>
-		<column label="" name="hidden"/>
-	</scroll_list>
-	<button label="Mostrar en el mapa" label_selected="Mostrar en el mapa" name="map_button"/>
-	<text name="total_contributed_land_label">
-		Contribución total:
-	</text>
-	<text name="total_contributed_land_value">
-		[AREA] m²
-	</text>
-	<text name="total_land_in_use_label">
-		Terreno total en uso:
-	</text>
-	<text name="total_land_in_use_value">
-		[AREA] m²
-	</text>
-	<text name="land_available_label">
-		Terreno disponible:
-	</text>
-	<text name="land_available_value">
-		[AREA] m²
-	</text>
-	<text name="your_contribution_label">
-		Su contribución:
-	</text>
-	<string name="land_contrib_error">
-		No se ha podido defininir su contribución de terreno.
-	</string>
-	<text name="your_contribution_max_value">
-		m² ([AMOUNT] máx.)
-	</text>
-	<text name="group_over_limit_text">
-		Los miembros del grupo deben contribuir con más créditos de terreno para mantener el terreno en uso.
-	</text>
-	<text name="group_money_heading">
-		L$ del grupo
-	</text>
-	<tab_container name="group_money_tab_container">
-		<panel label="Detalles" name="group_money_details_tab">
-			<text_editor name="group_money_details_text">
-				Calculando...
-			</text_editor>
-			<button label="&lt; Antes" label_selected="&lt; Antes" name="earlier_details_button" tool_tip="Ir hacia atrás en el tiempo"/>
-			<button label="Después &gt;" label_selected="Después &gt;" name="later_details_button" tool_tip="Ir hacia adelante en el tiempo"/>
-		</panel>
-		<panel label="Ventas" name="group_money_sales_tab">
-			<text_editor name="group_money_sales_text">
-				Calculando...
-			</text_editor>
-			<button label="&lt; Antes" label_selected="&lt; Antes" name="earlier_sales_button" tool_tip="Ir hacia atrás en el tiempo"/>
-			<button label="Después &gt;" label_selected="Después &gt;" name="later_sales_button" tool_tip="Ir hacia adelante en el tiempo"/>
-		</panel>
-	</tab_container>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Terreno y L$" name="land_money_tab">
+	<string name="help_text">
+		Se listan las parcelas propiedad del grupo, detallando las contribuciones. Aparece una advertencia si el Terreno total en uso es menor que o igual a la Contribución total. Las pestañas &apos;Planeamiento&apos;, &apos;Detalles&apos; y &apos;Ventas&apos; aportan información sobre las finanzas del grupo.
+	</string>
+	<button label="?" name="help_button"/>
+	<string name="cant_view_group_land_text">
+		No tiene permiso para ver qué terreno posee el grupo.
+	</string>
+	<string name="cant_view_group_accounting_text">
+		No tiene permiso para ver la información de la cuenta del grupo.
+	</string>
+	<string name="loading_txt">
+		Cargando...
+	</string>
+	<text name="group_land_heading">
+		Terreno propiedad del grupo
+	</text>
+	<scroll_list name="group_parcel_list">
+		<column label="Nombre de la parcela" name="name"/>
+		<column label="Región" name="location"/>
+		<column label="Superficie" name="area"/>
+		<column label="" name="hidden"/>
+	</scroll_list>
+	<button label="Mostrar en el mapa" label_selected="Mostrar en el mapa" name="map_button"/>
+	<text name="total_contributed_land_label">
+		Contribución total:
+	</text>
+	<text name="total_contributed_land_value">
+		[AREA] m²
+	</text>
+	<text name="total_land_in_use_label">
+		Terreno total en uso:
+	</text>
+	<text name="total_land_in_use_value">
+		[AREA] m²
+	</text>
+	<text name="land_available_label">
+		Terreno disponible:
+	</text>
+	<text name="land_available_value">
+		[AREA] m²
+	</text>
+	<text name="your_contribution_label">
+		Su contribución:
+	</text>
+	<string name="land_contrib_error">
+		No se ha podido defininir su contribución de terreno.
+	</string>
+	<text name="your_contribution_max_value">
+		m² ([AMOUNT] máx.)
+	</text>
+	<text name="group_over_limit_text">
+		Los miembros del grupo deben contribuir con más créditos de terreno para mantener el terreno en uso.
+	</text>
+	<text name="group_money_heading">
+		L$ del grupo
+	</text>
+	<tab_container name="group_money_tab_container">
+		<panel label="Detalles" name="group_money_details_tab">
+			<text_editor name="group_money_details_text">
+				Calculando...
+			</text_editor>
+			<button label="&lt; Antes" label_selected="&lt; Antes" name="earlier_details_button" tool_tip="Ir hacia atrás en el tiempo"/>
+			<button label="Después &gt;" label_selected="Después &gt;" name="later_details_button" tool_tip="Ir hacia adelante en el tiempo"/>
+		</panel>
+		<panel label="Ventas" name="group_money_sales_tab">
+			<text_editor name="group_money_sales_text">
+				Calculando...
+			</text_editor>
+			<button label="&lt; Antes" label_selected="&lt; Antes" name="earlier_sales_button" tool_tip="Ir hacia atrás en el tiempo"/>
+			<button label="Después &gt;" label_selected="Después &gt;" name="later_sales_button" tool_tip="Ir hacia adelante en el tiempo"/>
+		</panel>
+	</tab_container>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_group_notices.xml b/indra/newview/skins/default/xui/es/panel_group_notices.xml
index ac3ffb0f86..8215575362 100644
--- a/indra/newview/skins/default/xui/es/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/es/panel_group_notices.xml
@@ -1,71 +1,71 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Avisos" name="notices_tab">
-	<text name="help_text">
-		Los avisos son una forma rápida de comunicación dentro
-de un grupo, difundiendo un mensaje y,
-si se quiere, añadiéndole un ítem. Los avisos sólo
-los reciben los miembros del grupo cuyo rol
-tiene adjudicada tal habilidad. Puede desactivar
-los avisos en la pestaña General
-	</text>
-	<text name="no_notices_text">
-		No hay avisos pasados.
-	</text>
-	<button label="?" label_selected="?" name="help_button"/>
-	<text name="lbl">
-		Archivo de avisos del grupo
-	</text>
-	<text name="lbl2">
-		Los avisos se mantienen durante 14 días. Pulse en la lista de abajo el que quiere ver.
-Pulse el botón &apos;Actualizar&apos; para comprobar si se han recibido avisos nuevos.
-Las listas de avisos tienen un límite de 200 avisos por día.
-	</text>
-	<scroll_list name="notice_list">
-		<column label="Asunto" name="subject"/>
-		<column label="De" name="from"/>
-		<column label="Fecha" name="date"/>
-	</scroll_list>
-	<text name="notice_list_none_found">
-		No se han encontrado.
-	</text>
-	<button label="Crear un aviso nuevo" label_selected="Crear un aviso nuevo" name="create_new_notice"/>
-	<button label="Actualizar" label_selected="Actualizar la lista" name="refresh_notices"/>
-	<panel label="Crear un aviso nuevo" name="panel_create_new_notice">
-		<text name="lbl">
-			Crear un aviso
-		</text>
-		<text name="lbl2">
-			Para enviar un aviso, debe escribir un asunto. Puede añadir un ítem
-al aviso arrastrándolo desde su inventario a este panel. 
-Los ítems anexados deben ser copiables y transferibles,
-y no se puede enviar una carpeta.
-		</text>
-		<text name="lbl3">
-			Asunto:
-		</text>
-		<text name="lbl4">
-			Mensaje:
-		</text>
-		<text name="lbl5">
-			Anexar:
-		</text>
-		<button label="Remover lo anexado" label_selected="Remover lo anexado" name="remove_attachment"/>
-		<button label="Enviar el aviso" label_selected="Enviar el aviso" name="send_notice"/>
-		<panel name="drop_target" tool_tip="Para enviar un ítem con el aviso, arrástrelo desde su inventario hasta el cuadro del mensaje. Para poder enviar ese objeto con el aviso, usted debe tener permiso para copiarlo y transferirlo."/>
-	</panel>
-	<panel label="Ver avisos pasados" name="panel_view_past_notice">
-		<text name="lbl">
-			Avisos archivados
-		</text>
-		<text name="lbl2">
-			Pulse el botón &apos;Crear un aviso nuevo&apos; para enviar uno nuevo.
-		</text>
-		<text name="lbl3">
-			Asunto:
-		</text>
-		<text name="lbl4">
-			Mensaje:
-		</text>
-		<button label="Abrir lo anexado" label_selected="Abrir lo anexado" name="open_attachment"/>
-	</panel>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Avisos" name="notices_tab">
+	<text name="help_text">
+		Los avisos son una forma rápida de comunicación dentro
+de un grupo, difundiendo un mensaje y,
+si se quiere, añadiéndole un ítem. Los avisos sólo
+los reciben los miembros del grupo cuyo rol
+tiene adjudicada tal habilidad. Puede desactivar
+los avisos en la pestaña General
+	</text>
+	<text name="no_notices_text">
+		No hay avisos pasados.
+	</text>
+	<button label="?" label_selected="?" name="help_button"/>
+	<text name="lbl">
+		Archivo de avisos del grupo
+	</text>
+	<text name="lbl2">
+		Los avisos se mantienen durante 14 días. Pulse en la lista de abajo el que quiere ver.
+Pulse el botón &apos;Actualizar&apos; para comprobar si se han recibido avisos nuevos.
+Las listas de avisos tienen un límite de 200 avisos por día.
+	</text>
+	<scroll_list name="notice_list">
+		<column label="Asunto" name="subject"/>
+		<column label="De" name="from"/>
+		<column label="Fecha" name="date"/>
+	</scroll_list>
+	<text name="notice_list_none_found">
+		No se han encontrado.
+	</text>
+	<button label="Crear un aviso nuevo" label_selected="Crear un aviso nuevo" name="create_new_notice"/>
+	<button label="Actualizar" label_selected="Actualizar la lista" name="refresh_notices"/>
+	<panel label="Crear un aviso nuevo" name="panel_create_new_notice">
+		<text name="lbl">
+			Crear un aviso
+		</text>
+		<text name="lbl2">
+			Para enviar un aviso, debe escribir un asunto. Puede añadir un ítem
+al aviso arrastrándolo desde su inventario a este panel. 
+Los ítems anexados deben ser copiables y transferibles,
+y no se puede enviar una carpeta.
+		</text>
+		<text name="lbl3">
+			Asunto:
+		</text>
+		<text name="lbl4">
+			Mensaje:
+		</text>
+		<text name="lbl5">
+			Anexar:
+		</text>
+		<button label="Remover lo anexado" label_selected="Remover lo anexado" name="remove_attachment"/>
+		<button label="Enviar el aviso" label_selected="Enviar el aviso" name="send_notice"/>
+		<panel name="drop_target" tool_tip="Para enviar un ítem con el aviso, arrástrelo desde su inventario hasta el cuadro del mensaje. Para poder enviar ese objeto con el aviso, usted debe tener permiso para copiarlo y transferirlo."/>
+	</panel>
+	<panel label="Ver avisos pasados" name="panel_view_past_notice">
+		<text name="lbl">
+			Avisos archivados
+		</text>
+		<text name="lbl2">
+			Pulse el botón &apos;Crear un aviso nuevo&apos; para enviar uno nuevo.
+		</text>
+		<text name="lbl3">
+			Asunto:
+		</text>
+		<text name="lbl4">
+			Mensaje:
+		</text>
+		<button label="Abrir lo anexado" label_selected="Abrir lo anexado" name="open_attachment"/>
+	</panel>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_group_roles.xml b/indra/newview/skins/default/xui/es/panel_group_roles.xml
index 08620b7778..4c3e40ecc2 100644
--- a/indra/newview/skins/default/xui/es/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/es/panel_group_roles.xml
@@ -1,150 +1,150 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Miembros y Roles" name="roles_tab">
-	<string name="default_needs_apply_text">
-		En esta pestaña hay cambios sin aplicar.
-	</string>
-	<string name="want_apply_text">
-		¿Quiere aplicar estos cambios?
-	</string>
-	<button label="?" name="help_button"/>
-	<panel name="members_header">
-		<text name="static">
-			Miembros y Roles
-		</text>
-		<text name="static2">
-			Los miembros del grupo tienen asignados roles con distintas capacidades. Estas configuraciones son fácilmente personalizables, para facilitar una mayor flexibilidad y organización.
-		</text>
-	</panel>
-	<panel name="roles_header">
-		<text name="static">
-			Roles
-		</text>
-		<text name="role_properties_modifiable">
-			Elija un rol de los de abajo. Puede modificar su nombre, su descripción, y la etiqueta de los miembros.
-		</text>
-		<text name="role_properties_not_modifiable">
-			Elija un rol de los de abajo para ver sus propiedades, miembros, y qué capacidades tiene asignadas.
-		</text>
-		<text name="role_actions_modifiable">
-			También puede asignar capacidades al rol.
-		</text>
-		<text name="role_actions_not_modifiable">
-			Puede ver, pero no modificar, las capacidades asignadas.
-		</text>
-	</panel>
-	<panel name="actions_header">
-		<text name="static">
-			Capacidades
-		</text>
-		<text name="static2">
-			Puede ver una descripción de la capacidad, y qué miembros y roles pueden realizarla.
-		</text>
-	</panel>
-	<tab_container name="roles_tab_container">
-		<panel label="Miembros" name="members_sub_tab" tool_tip="Miembros">
-			<button label="Buscar" name="search_button"/>
-			<button label="Verlos todos" name="show_all_button"/>
-			<name_list name="member_list">
-				<column label="Nombre del miembro" name="name"/>
-				<column label="Cuotas donadas" name="donated"/>
-				<column label="Última conexión" name="online"/>
-			</name_list>
-			<button label="Invitar a una nueva persona..." name="member_invite"/>
-			<button label="Expulsar del grupo" name="member_eject"/>
-			<string name="help_text">
-				Puede añadir o quitar los roles asignados a los miembros.
-Seleccione varios nombres manteniendo pulsada la tecla Ctrl y pulsando en cada uno de ellos.
-			</string>
-		</panel>
-		<panel label="Roles" name="roles_sub_tab">
-			<button label="Buscar" name="search_button"/>
-			<button label="Verlos todos" name="show_all_button"/>
-			<scroll_list name="role_list">
-				<column label="Nombre del rol" name="name"/>
-				<column label="Etiqueta" name="title"/>
-				<column label="Miembros" name="members"/>
-			</scroll_list>
-			<button label="Crear un rol nuevo..." name="role_create"/>
-			<button label="Eliminar el rol" name="role_delete"/>
-			<string name="help_text">
-				Los roles tienen una etiqueta y una serie de capacidades permitidas que los miembros pueden desarrollar. Los miembros pueden tener más de un rol. Un grupo puede tener hasta 10 roles, incluyendo el de Todos y el de Propietarios.
-			</string>
-			<string name="cant_delete_role">
-				Los roles de &apos;Todos&apos; y &apos;Propietarios&apos; son especiales, y no pueden eliminarse.
-			</string>
-		</panel>
-		<panel label="Capacidades" name="actions_sub_tab">
-			<button label="Buscar" name="search_button"/>
-			<button label="Verlos todos" name="show_all_button"/>
-			<scroll_list name="action_list" tool_tip="Elija una capacidad para verla más en detalle.">
-				<column label="" name="icon"/>
-				<column label="" name="action"/>
-			</scroll_list>
-			<string name="help_text">
-				Las capacidades permiten a los miembros que tienen ese rol el hacer tareas específicas dentro de este grupo. Hay una gran variedad de capacidades.
-			</string>
-		</panel>
-	</tab_container>
-	<panel name="members_footer">
-		<text name="static">
-			Roles asignados
-		</text>
-		<text name="static2">
-			Capacidades permitidas
-		</text>
-		<scroll_list name="member_assigned_roles">
-			<column label="" name="checkbox"/>
-			<column label="" name="role"/>
-		</scroll_list>
-		<scroll_list name="member_allowed_actions" tool_tip="Para más detalles de cada capacidad permitida, vea la pestaña Capacidades.">
-			<column label="" name="icon"/>
-			<column label="" name="action"/>
-		</scroll_list>
-	</panel>
-	<panel name="roles_footer">
-		<text name="static">
-			Nombre
-		</text>
-		<text name="static2">
-			Descripción
-		</text>
-		<line_editor name="role_name">
-			Empleados
-		</line_editor>
-		<text name="static3">
-			Etiqueta
-		</text>
-		<line_editor name="role_title">
-			(esperando)
-		</line_editor>
-		<text_editor name="role_description">
-			(esperando)
-		</text_editor>
-		<text name="static4">
-			Miembros asignados
-		</text>
-		<text name="static5" tool_tip="Una lista de las capacidades que puede desarrollar el rol seleccionado actualmente.">
-			Capacidades asignadas
-		</text>
-		<check_box label="Los miembros son visibles." name="role_visible_in_list" tool_tip="Establece si los miembros de este rol pueden ser vistos en la pestaña General por personas ajenas al grupo."/>
-		<scroll_list name="role_allowed_actions" tool_tip="Para más detalles de cada capacidad permitida, vea la pestaña Capacidades.">
-			<column label="" name="icon"/>
-			<column label="" name="checkbox"/>
-			<column label="" name="action"/>
-		</scroll_list>
-	</panel>
-	<panel name="actions_footer">
-		<text name="static">
-			Descripción
-		</text>
-		<text_editor name="action_description">
-			Esta capacidad es la de &apos;Expulsar miembros de este grupo&apos;. Sólo un propietario puede expulsar a otro.
-		</text_editor>
-		<text name="static2">
-			Roles con la capacidad
-		</text>
-		<text name="static3">
-			Miembros con la capacidad
-		</text>
-	</panel>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Miembros y Roles" name="roles_tab">
+	<string name="default_needs_apply_text">
+		En esta pestaña hay cambios sin aplicar.
+	</string>
+	<string name="want_apply_text">
+		¿Quiere aplicar estos cambios?
+	</string>
+	<button label="?" name="help_button"/>
+	<panel name="members_header">
+		<text name="static">
+			Miembros y Roles
+		</text>
+		<text name="static2">
+			Los miembros del grupo tienen asignados roles con distintas capacidades. Estas configuraciones son fácilmente personalizables, para facilitar una mayor flexibilidad y organización.
+		</text>
+	</panel>
+	<panel name="roles_header">
+		<text name="static">
+			Roles
+		</text>
+		<text name="role_properties_modifiable">
+			Elija un rol de los de abajo. Puede modificar su nombre, su descripción, y la etiqueta de los miembros.
+		</text>
+		<text name="role_properties_not_modifiable">
+			Elija un rol de los de abajo para ver sus propiedades, miembros, y qué capacidades tiene asignadas.
+		</text>
+		<text name="role_actions_modifiable">
+			También puede asignar capacidades al rol.
+		</text>
+		<text name="role_actions_not_modifiable">
+			Puede ver, pero no modificar, las capacidades asignadas.
+		</text>
+	</panel>
+	<panel name="actions_header">
+		<text name="static">
+			Capacidades
+		</text>
+		<text name="static2">
+			Puede ver una descripción de la capacidad, y qué miembros y roles pueden realizarla.
+		</text>
+	</panel>
+	<tab_container name="roles_tab_container">
+		<panel label="Miembros" name="members_sub_tab" tool_tip="Miembros">
+			<button label="Buscar" name="search_button"/>
+			<button label="Verlos todos" name="show_all_button"/>
+			<name_list name="member_list">
+				<column label="Nombre del miembro" name="name"/>
+				<column label="Cuotas donadas" name="donated"/>
+				<column label="Última conexión" name="online"/>
+			</name_list>
+			<button label="Invitar a una nueva persona..." name="member_invite"/>
+			<button label="Expulsar del grupo" name="member_eject"/>
+			<string name="help_text">
+				Puede añadir o quitar los roles asignados a los miembros.
+Seleccione varios nombres manteniendo pulsada la tecla Ctrl y pulsando en cada uno de ellos.
+			</string>
+		</panel>
+		<panel label="Roles" name="roles_sub_tab">
+			<button label="Buscar" name="search_button"/>
+			<button label="Verlos todos" name="show_all_button"/>
+			<scroll_list name="role_list">
+				<column label="Nombre del rol" name="name"/>
+				<column label="Etiqueta" name="title"/>
+				<column label="Miembros" name="members"/>
+			</scroll_list>
+			<button label="Crear un rol nuevo..." name="role_create"/>
+			<button label="Eliminar el rol" name="role_delete"/>
+			<string name="help_text">
+				Los roles tienen una etiqueta y una serie de capacidades permitidas que los miembros pueden desarrollar. Los miembros pueden tener más de un rol. Un grupo puede tener hasta 10 roles, incluyendo el de Todos y el de Propietarios.
+			</string>
+			<string name="cant_delete_role">
+				Los roles de &apos;Todos&apos; y &apos;Propietarios&apos; son especiales, y no pueden eliminarse.
+			</string>
+		</panel>
+		<panel label="Capacidades" name="actions_sub_tab">
+			<button label="Buscar" name="search_button"/>
+			<button label="Verlos todos" name="show_all_button"/>
+			<scroll_list name="action_list" tool_tip="Elija una capacidad para verla más en detalle.">
+				<column label="" name="icon"/>
+				<column label="" name="action"/>
+			</scroll_list>
+			<string name="help_text">
+				Las capacidades permiten a los miembros que tienen ese rol el hacer tareas específicas dentro de este grupo. Hay una gran variedad de capacidades.
+			</string>
+		</panel>
+	</tab_container>
+	<panel name="members_footer">
+		<text name="static">
+			Roles asignados
+		</text>
+		<text name="static2">
+			Capacidades permitidas
+		</text>
+		<scroll_list name="member_assigned_roles">
+			<column label="" name="checkbox"/>
+			<column label="" name="role"/>
+		</scroll_list>
+		<scroll_list name="member_allowed_actions" tool_tip="Para más detalles de cada capacidad permitida, vea la pestaña Capacidades.">
+			<column label="" name="icon"/>
+			<column label="" name="action"/>
+		</scroll_list>
+	</panel>
+	<panel name="roles_footer">
+		<text name="static">
+			Nombre
+		</text>
+		<text name="static2">
+			Descripción
+		</text>
+		<line_editor name="role_name">
+			Empleados
+		</line_editor>
+		<text name="static3">
+			Etiqueta
+		</text>
+		<line_editor name="role_title">
+			(esperando)
+		</line_editor>
+		<text_editor name="role_description">
+			(esperando)
+		</text_editor>
+		<text name="static4">
+			Miembros asignados
+		</text>
+		<text name="static5" tool_tip="Una lista de las capacidades que puede desarrollar el rol seleccionado actualmente.">
+			Capacidades asignadas
+		</text>
+		<check_box label="Los miembros son visibles." name="role_visible_in_list" tool_tip="Establece si los miembros de este rol pueden ser vistos en la pestaña General por personas ajenas al grupo."/>
+		<scroll_list name="role_allowed_actions" tool_tip="Para más detalles de cada capacidad permitida, vea la pestaña Capacidades.">
+			<column label="" name="icon"/>
+			<column label="" name="checkbox"/>
+			<column label="" name="action"/>
+		</scroll_list>
+	</panel>
+	<panel name="actions_footer">
+		<text name="static">
+			Descripción
+		</text>
+		<text_editor name="action_description">
+			Esta capacidad es la de &apos;Expulsar miembros de este grupo&apos;. Sólo un propietario puede expulsar a otro.
+		</text_editor>
+		<text name="static2">
+			Roles con la capacidad
+		</text>
+		<text name="static3">
+			Miembros con la capacidad
+		</text>
+	</panel>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_login.xml b/indra/newview/skins/default/xui/es/panel_login.xml
index c74dd13178..04edcc4faa 100644
--- a/indra/newview/skins/default/xui/es/panel_login.xml
+++ b/indra/newview/skins/default/xui/es/panel_login.xml
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_login">
-	<string name="real_url">
-		http://secondlife.com/app/login/
-	</string>
-	<string name="forgot_password_url">
-		http://secondlife.com/account/request.php
-	</string>
-	<text name="first_name_text">
-		Nombre:
-	</text>
-	<text name="last_name_text">
-		Apellido:
-	</text>
-	<text name="password_text">
-		Contraseña:
-	</text>
-	<text name="start_location_text">
-		Posición inicial:
-	</text>
-	<combo_box name="start_location_combo">
-		<combo_item name="MyHome">
-			Mi Base
-		</combo_item>
-		<combo_item name="MyLastLocation">
-			Mi última posición
-		</combo_item>
-		<combo_item name="Typeregionname">
-			&lt;Escriba el nombre de la Región&gt;
-		</combo_item>
-	</combo_box>
-	<check_box label="Recordar la contraseña" name="remember_check"/>
-	<button label="Iniciar sesión" label_selected="Iniciar sesión" name="connect_btn"/>
-	<text name="create_new_account_text">
-		Regístrese para obtener una cuenta
-	</text>
-	<text name="forgot_password_text">
-		¿Olvidó su nombre o su contraseña?
-	</text>
-	<text name="channel_text">
-		[VERSION]
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="panel_login">
+	<string name="real_url">
+		http://secondlife.com/app/login/
+	</string>
+	<string name="forgot_password_url">
+		http://secondlife.com/account/request.php
+	</string>
+	<text name="first_name_text">
+		Nombre:
+	</text>
+	<text name="last_name_text">
+		Apellido:
+	</text>
+	<text name="password_text">
+		Contraseña:
+	</text>
+	<text name="start_location_text">
+		Posición inicial:
+	</text>
+	<combo_box name="start_location_combo">
+		<combo_item name="MyHome">
+			Mi Base
+		</combo_item>
+		<combo_item name="MyLastLocation">
+			Mi última posición
+		</combo_item>
+		<combo_item name="Typeregionname">
+			&lt;Escriba el nombre de la Región&gt;
+		</combo_item>
+	</combo_box>
+	<check_box label="Recordar la contraseña" name="remember_check"/>
+	<button label="Iniciar sesión" label_selected="Iniciar sesión" name="connect_btn"/>
+	<text name="create_new_account_text">
+		Regístrese para obtener una cuenta
+	</text>
+	<text name="forgot_password_text">
+		¿Olvidó su nombre o su contraseña?
+	</text>
+	<text name="channel_text">
+		[VERSION]
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
index 36d0265a9c..0e092e58a2 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
@@ -1,57 +1,57 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Chat de texto" name="chat">
-	<text length="1" name="text_box" type="string">
-		Tamaño de la fuente del chat:
-	</text>
-	<radio_group name="chat_font_size">
-		<radio_item name="radio">
-			Pequeño
-		</radio_item>
-		<radio_item name="radio2">
-			Medio
-		</radio_item>
-		<radio_item name="radio3">
-			Grande
-		</radio_item>
-	</radio_group>
-	<text length="1" name="text_box2" type="string">
-		Color del chat:
-	</text>
-	<color_swatch label="Usted" name="user"/>
-	<color_swatch label="Otros" name="agent" width="60" left_delta="48"/>
-	<color_swatch label="MI" name="im" left_delta="64" width="50"/>
-	<color_swatch label="Sistema" name="system"/>
-	<color_swatch label="Errores" name="script_error" left_delta="48"/>
-	<color_swatch label="Objetos" name="objects"/>
-	<color_swatch label="Propietario" name="owner" width="60" left_delta="48"/>
-	<color_swatch label="Bocadillo" name="background" left_delta="64"  width="50"/>
-	<color_swatch label="URL" name="links" />
-	<text length="1" name="text_box8" type="string">
-		Errores de script:
-	</text>
-	<check_box label="Ver en el chat los avisos y errores de los scripts" name="script_errors_as_chat"/>
-	<text length="1" name="text_box3" type="string">
-		Consola del chat:
-	</text>
-	<spinner label="Quitar el chat tras" name="fade_chat_time" label_width="95" width="145" />
-	<text length="1" name="text_box4" type="string" left="297" >
-		(s)
-	</text>
-	<text length="1" name="text_box5" type="string">
-		(# líneas)
-	</text>
-	<slider label="Opacidad" name="console_opacity"/>
-	<check_box label="Usar el ancho de la pantalla (tras reiniciar)" name="chat_full_width_check"/>
-	<text length="1" name="text_box6" type="string">
-		Opciones del chat:
-	</text>
-	<check_box label="Cerrar el chat al pulsar Intro" name="close_chat_on_return_check"/>
-	<check_box label="En el chat, las teclas del cursor mueven el avatar" name="arrow_keys_move_avatar_check"/>
-	<check_box label="Incluir la hora en el chat" name="show_timestamps_check"/>
-	<check_box label="Ejecutar la animación de escribir al hacerlo en el chat" name="play_typing_animation"/>
-	<text length="1" name="text_box7" type="string">
-		Bocadillos del chat:
-	</text>
-	<check_box label="Mostrar el chat en bocadillos" name="bubble_text_chat"/>
-	<slider label="Opacidad" name="bubble_chat_opacity"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Chat de texto" name="chat">
+	<text length="1" name="text_box" type="string">
+		Tamaño de la fuente del chat:
+	</text>
+	<radio_group name="chat_font_size">
+		<radio_item name="radio">
+			Pequeño
+		</radio_item>
+		<radio_item name="radio2">
+			Medio
+		</radio_item>
+		<radio_item name="radio3">
+			Grande
+		</radio_item>
+	</radio_group>
+	<text length="1" name="text_box2" type="string">
+		Color del chat:
+	</text>
+	<color_swatch label="Usted" name="user"/>
+	<color_swatch label="Otros" name="agent" width="60" left_delta="48"/>
+	<color_swatch label="MI" name="im" left_delta="64" width="50"/>
+	<color_swatch label="Sistema" name="system"/>
+	<color_swatch label="Errores" name="script_error" left_delta="48"/>
+	<color_swatch label="Objetos" name="objects"/>
+	<color_swatch label="Propietario" name="owner" width="60" left_delta="48"/>
+	<color_swatch label="Bocadillo" name="background" left_delta="64"  width="50"/>
+	<color_swatch label="URL" name="links" />
+	<text length="1" name="text_box8" type="string">
+		Errores de script:
+	</text>
+	<check_box label="Ver en el chat los avisos y errores de los scripts" name="script_errors_as_chat"/>
+	<text length="1" name="text_box3" type="string">
+		Consola del chat:
+	</text>
+	<spinner label="Quitar el chat tras" name="fade_chat_time" label_width="95" width="145" />
+	<text length="1" name="text_box4" type="string" left="297" >
+		(s)
+	</text>
+	<text length="1" name="text_box5" type="string">
+		(# líneas)
+	</text>
+	<slider label="Opacidad" name="console_opacity"/>
+	<check_box label="Usar el ancho de la pantalla (tras reiniciar)" name="chat_full_width_check"/>
+	<text length="1" name="text_box6" type="string">
+		Opciones del chat:
+	</text>
+	<check_box label="Cerrar el chat al pulsar Intro" name="close_chat_on_return_check"/>
+	<check_box label="En el chat, las teclas del cursor mueven el avatar" name="arrow_keys_move_avatar_check"/>
+	<check_box label="Incluir la hora en el chat" name="show_timestamps_check"/>
+	<check_box label="Ejecutar la animación de escribir al hacerlo en el chat" name="play_typing_animation"/>
+	<text length="1" name="text_box7" type="string">
+		Bocadillos del chat:
+	</text>
+	<check_box label="Mostrar el chat en bocadillos" name="bubble_text_chat"/>
+	<slider label="Opacidad" name="bubble_chat_opacity"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_general.xml b/indra/newview/skins/default/xui/es/panel_preferences_general.xml
index 0528c5e9c8..173da17f98 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_general.xml
@@ -1,114 +1,114 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="General" name="general_panel">
-	<radio_group name="default_start_location">
-		<radio_item name="MyHome" tool_tip="Por defecto, iniciar sesión en mi Base.">
-			Mi Base
-		</radio_item>
-		<radio_item name="MyLastLocation" tool_tip="Por defecto, iniciar sesión en mi última posición.">
-			Mi última posición
-		</radio_item>
-	</radio_group>
-	<check_box label="Ver mi posición inicial en la pantalla de inicio de sesión" name="show_location_checkbox"/>
-	<combo_box name="fade_out_combobox" width="166">
-		<combo_item name="Never">
-			Nunca
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Mostrarlos temporalmente
-		</combo_item>
-		<combo_item name="Always">
-			Siempre
-		</combo_item>
-	</combo_box>
-	<check_box label="Nombres de avatar en pequeño" name="small_avatar_names_checkbox"/>
-	<check_box label="No ver mi nombre en mi pantalla" name="show_my_name_checkbox"/>
-	<text name="group_titles_textbox">
-		Etiquetas de grupo:
-	</text>
-	<check_box label="Ocultar las etiquetas de grupo" name="show_all_title_checkbox"/>
-	<check_box label="Ocultar mi etiqueta de grupo" name="show_my_title_checkbox"/>
-	<color_swatch label="" name="effect_color_swatch" tool_tip="Pulse para abrir el selector de color"/>
-	<text name="UI Size:">
-		Tamaño de la interfaz:
-	</text>
-	<check_box label="Resolución independiente del tamaño" name="ui_auto_scale"/>
-	<spinner label="Ausente tras:" name="afk_timeout_spinner"/>
-	<check_box label="Girar el minimapa" name="rotate_mini_map_checkbox"/>
-	<check_box label="Avisar cuando gasto o recibo dólares Linden (L$)" name="notify_money_change_checkbox"/>
-	<check_box label="Usar los colores del SO" name="use_system_color_picker_checkbox" tool_tip="Usar los colores del propio sistema operativo en vez de los propios de Second Life."/>
-	<check_box label="Incluir una ventana de búsqueda en la barra superior" name="show_search_panel" tool_tip="Muestra el panel de búsqueda insertado."/>
-	<text length="1" name="start_location_textbox" type="string">
-		Posición inicial:
-	</text>
-	<text length="1" name="show_names_textbox" type="string">
-		Mostrar los nombres:
-	</text>
-	<text length="1" name="effects_color_textbox" type="string">
-		Color de mis efectos:
-	</text>
-	<text length="1" name="seconds_textbox" type="string">
-		segundos
-	</text>
-	<text length="1" name="crash_report_textbox" type="string">
-		Informes de caídas:
-	</text>
-	<text length="1" name="language_textbox" type="string">
-		Idioma:
-	</text>
-	<text length="1" name="language_textbox2" type="string" left_delta="313" >
-		(Tendrá efecto tras reiniciar)
-	</text>
-	<string name="region_name_prompt">
-		&lt;escriba el nombre de la región&gt;
-	</string>
-	<combo_box name="crash_behavior_combobox" width="166">
-		<combo_item length="1" name="Askbeforesending" type="string">
-			Preguntar antes de enviar
-		</combo_item>
-		<combo_item length="1" name="Alwayssend" type="string">
-			Enviar siempre
-		</combo_item>
-		<combo_item length="1" name="Neversend" type="string">
-			No enviar nunca
-		</combo_item>
-	</combo_box>
-	<combo_box name="language_combobox" width="166">
-		<combo_item name="System Default Language">
-			Predeterminado del sistema
-		</combo_item>
-		<combo_item length="1" name="English" type="string">
-			English (Inglés)
-		</combo_item>
-		<combo_item name="Danish">
-			Dansk (Danés) - Beta
-		</combo_item>
-		<combo_item length="1" name="Deutsch(German)" type="string">
-			Deutsch (Alemán) - Beta
-		</combo_item>
-		<combo_item name="Spanish" type="string">
-			Español - Beta
-		</combo_item>
-		<combo_item length="1" name="French" type="string">
-			Français (Francés) - Beta
-		</combo_item>
-		<combo_item name="Hungarian">
-			Magyar (Húngaro) - Beta
-		</combo_item>
-		<combo_item name="Polish">
-			Polski (Polaco) - Beta
-		</combo_item>
-		<combo_item name="Portugese">
-			Portugués (Portugués) - Beta
-		</combo_item>
-		<combo_item length="1" name="Chinese" type="string">
-			中文 (简体) (Chino) - Beta
-		</combo_item>
-		<combo_item length="1" name="(Japanese)" type="string">
-			日本語 (Japonés) - Beta
-		</combo_item>
-		<combo_item length="1" name="(Korean)" type="string">
-			한국어 (Coreano) - Beta
-		</combo_item>
-	</combo_box>
-	<check_box label="Compartir el idioma con los objetos" name="language_is_public" tool_tip="Hace que los objetos con script del mundo sepan su idioma preferido."/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="General" name="general_panel">
+	<radio_group name="default_start_location">
+		<radio_item name="MyHome" tool_tip="Por defecto, iniciar sesión en mi Base.">
+			Mi Base
+		</radio_item>
+		<radio_item name="MyLastLocation" tool_tip="Por defecto, iniciar sesión en mi última posición.">
+			Mi última posición
+		</radio_item>
+	</radio_group>
+	<check_box label="Ver mi posición inicial en la pantalla de inicio de sesión" name="show_location_checkbox"/>
+	<combo_box name="fade_out_combobox" width="166">
+		<combo_item name="Never">
+			Nunca
+		</combo_item>
+		<combo_item name="Show Temporarily">
+			Mostrarlos temporalmente
+		</combo_item>
+		<combo_item name="Always">
+			Siempre
+		</combo_item>
+	</combo_box>
+	<check_box label="Nombres de avatar en pequeño" name="small_avatar_names_checkbox"/>
+	<check_box label="No ver mi nombre en mi pantalla" name="show_my_name_checkbox"/>
+	<text name="group_titles_textbox">
+		Etiquetas de grupo:
+	</text>
+	<check_box label="Ocultar las etiquetas de grupo" name="show_all_title_checkbox"/>
+	<check_box label="Ocultar mi etiqueta de grupo" name="show_my_title_checkbox"/>
+	<color_swatch label="" name="effect_color_swatch" tool_tip="Pulse para abrir el selector de color"/>
+	<text name="UI Size:">
+		Tamaño de la interfaz:
+	</text>
+	<check_box label="Resolución independiente del tamaño" name="ui_auto_scale"/>
+	<spinner label="Ausente tras:" name="afk_timeout_spinner"/>
+	<check_box label="Girar el minimapa" name="rotate_mini_map_checkbox"/>
+	<check_box label="Avisar cuando gasto o recibo dólares Linden (L$)" name="notify_money_change_checkbox"/>
+	<check_box label="Usar los colores del SO" name="use_system_color_picker_checkbox" tool_tip="Usar los colores del propio sistema operativo en vez de los propios de Second Life."/>
+	<check_box label="Incluir una ventana de búsqueda en la barra superior" name="show_search_panel" tool_tip="Muestra el panel de búsqueda insertado."/>
+	<text length="1" name="start_location_textbox" type="string">
+		Posición inicial:
+	</text>
+	<text length="1" name="show_names_textbox" type="string">
+		Mostrar los nombres:
+	</text>
+	<text length="1" name="effects_color_textbox" type="string">
+		Color de mis efectos:
+	</text>
+	<text length="1" name="seconds_textbox" type="string">
+		segundos
+	</text>
+	<text length="1" name="crash_report_textbox" type="string">
+		Informes de caídas:
+	</text>
+	<text length="1" name="language_textbox" type="string">
+		Idioma:
+	</text>
+	<text length="1" name="language_textbox2" type="string" left_delta="313" >
+		(Tendrá efecto tras reiniciar)
+	</text>
+	<string name="region_name_prompt">
+		&lt;escriba el nombre de la región&gt;
+	</string>
+	<combo_box name="crash_behavior_combobox" width="166">
+		<combo_item length="1" name="Askbeforesending" type="string">
+			Preguntar antes de enviar
+		</combo_item>
+		<combo_item length="1" name="Alwayssend" type="string">
+			Enviar siempre
+		</combo_item>
+		<combo_item length="1" name="Neversend" type="string">
+			No enviar nunca
+		</combo_item>
+	</combo_box>
+	<combo_box name="language_combobox" width="166">
+		<combo_item name="System Default Language">
+			Predeterminado del sistema
+		</combo_item>
+		<combo_item length="1" name="English" type="string">
+			English (Inglés)
+		</combo_item>
+		<combo_item name="Danish">
+			Dansk (Danés) - Beta
+		</combo_item>
+		<combo_item length="1" name="Deutsch(German)" type="string">
+			Deutsch (Alemán) - Beta
+		</combo_item>
+		<combo_item name="Spanish" type="string">
+			Español - Beta
+		</combo_item>
+		<combo_item length="1" name="French" type="string">
+			Français (Francés) - Beta
+		</combo_item>
+		<combo_item name="Hungarian">
+			Magyar (Húngaro) - Beta
+		</combo_item>
+		<combo_item name="Polish">
+			Polski (Polaco) - Beta
+		</combo_item>
+		<combo_item name="Portugese">
+			Portugués (Portugués) - Beta
+		</combo_item>
+		<combo_item length="1" name="Chinese" type="string">
+			中文 (简体) (Chino) - Beta
+		</combo_item>
+		<combo_item length="1" name="(Japanese)" type="string">
+			日本語 (Japonés) - Beta
+		</combo_item>
+		<combo_item length="1" name="(Korean)" type="string">
+			한국어 (Coreano) - Beta
+		</combo_item>
+	</combo_box>
+	<check_box label="Compartir el idioma con los objetos" name="language_is_public" tool_tip="Hace que los objetos con script del mundo sepan su idioma preferido."/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml
index 9a4f06af96..03eb802117 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml
@@ -1,176 +1,176 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Gráficos" name="Display panel">
-	<button label="?" name="GraphicsPreferencesHelpButton"/>
-	<check_box label="Abrir Second Life en una ventana" name="windowed mode"/>
-	<text_editor name="FullScreenInfo">
-		Si no está marcado, el visor se mostrará en pantalla completa cuando inicie sesión.
-	</text_editor>
-	<text name="WindowSizeLabel">
-		Tamaño de la ventana:
-	</text>
-	<combo_box name="windowsize combo">
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="720x480">
-			720x480 (NTSC)
-		</combo_item>
-		<combo_item name="768x576">
-			768x576 (PAL)
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-	</combo_box>
-	<text name="DisplayResLabel">
-		Resolución:
-	</text>
-	<text name="AspectRatioLabel1" tool_tip="ancho / alto">
-		Proporción:
-	</text>
-	<combo_box name="aspect_ratio" tool_tip="ancho / alto">
-		<combo_item length="1" name="4:3(StandardCRT)" type="string">
-			4:3 (Standard CRT)
-		</combo_item>
-		<combo_item length="1" name="5:4(1280x1024LCD)" type="string">
-			5:4 (1280x1024 LCD)
-		</combo_item>
-		<combo_item name="8:5(Widescreen)">
-			8:5 (Widescreen)
-		</combo_item>
-		<combo_item length="1" name="16:9(Widescreen)" type="string">
-			16:9 (Widescreen)
-		</combo_item>
-	</combo_box>
-	<check_box label="Detectar automáticamente la proporción" name="aspect_auto_detect"/>
-	<text name="HigherText">
-		Calidad y
-	</text>
-	<text name="QualityText">
-		Rendimiento:
-	</text>
-	<text name="FasterText">
-		El más rápido
-	</text>
-	<text name="ShadersPrefText">
-		Bajo
-	</text>
-	<text name="ShadersPrefText2">
-		Medio
-	</text>
-	<text name="ShadersPrefText3">
-		Alto
-	</text>
-	<text name="ShadersPrefText4">
-		Ultra
-	</text>
-	<text name="HigherText2">
-		Más alto
-	</text>
-	<text name="QualityText2">
-		Calidad
-	</text>
-	<check_box label="Personalizar" name="CustomSettings"/>
-	<text name="ShadersText">
-		Shaders:
-	</text>
-	<check_box label="Efecto de relieve y brillo" name="BumpShiny"/>
-	<check_box label="Shaders básicos" name="BasicShaders" tool_tip="Desactivando esta opción puede prevenir fallos en algunos controladores de la tarjeta gráfica."/>
-	<check_box label="Shaders de la atmósfera" name="WindLightUseAtmosShaders"/>
-	<check_box label="Reflejos en el agua" name="Reflections"/>
-	<text name="ReflectionDetailText">
-		Objetos reflejados:
-	</text>
-	<radio_group name="ReflectionDetailRadio">
-		<radio_item name="0">
-			Terreno y árboles
-		</radio_item>
-		<radio_item name="1">
-			Todos los objetos estáticos
-		</radio_item>
-		<radio_item name="2">
-			Todos los avatares y objetos
-		</radio_item>
-		<radio_item name="3">
-			Todo
-		</radio_item>
-	</radio_group>
-	<text name="AvatarRenderingText">
-		Renderización del avatar:
-	</text>
-	<check_box label="Avatares simulados" name="AvatarImpostors"/>
-	<check_box label="Renderizado por hardware" name="AvatarVertexProgram"/>
-	<check_box label="Ropas del avatar" name="AvatarCloth"/>
-	<text name="DrawDistanceMeterText1">
-		m
-	</text>
-	<text name="DrawDistanceMeterText2">
-		m
-	</text>
-	<slider label="Distancia de dibujo:" name="DrawDistance"/>
-	<slider label="Núm. máx. de partículas:" name="MaxParticleCount"/>
-	<slider label="Calidad del procesamiento:" name="RenderPostProcess"/>
-	<text name="MeshDetailText">
-		Detalle de la malla:
-	</text>
-	<slider label="Objetos:" name="ObjectMeshDetail"/>
-	<slider label="Prims flexibles:" name="FlexibleMeshDetail"/>
-	<slider label="Árboles:" name="TreeMeshDetail"/>
-	<slider label="Avatares:" name="AvatarMeshDetail"/>
-	<slider label="Terreno:" name="TerrainMeshDetail"/>
-	<slider label="Cielo:" name="SkyMeshDetail"/>
-	<text name="PostProcessText">
-		Baja
-	</text>
-	<text name="ObjectMeshDetailText">
-		Bajo
-	</text>
-	<text name="FlexibleMeshDetailText">
-		Bajo
-	</text>
-	<text name="TreeMeshDetailText">
-		Bajo
-	</text>
-	<text name="AvatarMeshDetailText">
-		Bajo
-	</text>
-	<text name="TerrainMeshDetailText">
-		Bajo
-	</text>
-	<text name="SkyMeshDetailText">
-		Bajo
-	</text>
-	<text name="LightingDetailText">
-		Detalles de la iluminación:
-	</text>
-	<radio_group name="LightingDetailRadio">
-		<radio_item name="SunMoon">
-			Sólo el Sol y la Luna
-		</radio_item>
-		<radio_item name="LocalLights">
-			Puntos de luz cercanos
-		</radio_item>
-	</radio_group>
-	<text name="TerrainDetailText">
-		Nivel de detalle del terreno:
-	</text>
-	<radio_group name="TerrainDetailRadio">
-		<radio_item name="0">
-			Bajo
-		</radio_item>
-		<radio_item name="2">
-			Alto
-		</radio_item>
-	</radio_group>
-	<button label="Configuraciones recomendadas" name="Defaults"/>
-	<button label="Opciones del hardware" label_selected="Opciones del hardware" name="GraphicsHardwareButton"/>
-	<string name="resolution_format">
-		[RES_X] x [RES_Y]
-	</string>
-	<string name="aspect_ratio_text">
-		[NUM]:[DEN]
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Gráficos" name="Display panel">
+	<button label="?" name="GraphicsPreferencesHelpButton"/>
+	<check_box label="Abrir Second Life en una ventana" name="windowed mode"/>
+	<text_editor name="FullScreenInfo">
+		Si no está marcado, el visor se mostrará en pantalla completa cuando inicie sesión.
+	</text_editor>
+	<text name="WindowSizeLabel">
+		Tamaño de la ventana:
+	</text>
+	<combo_box name="windowsize combo">
+		<combo_item name="640x480">
+			640x480
+		</combo_item>
+		<combo_item name="800x600">
+			800x600
+		</combo_item>
+		<combo_item name="720x480">
+			720x480 (NTSC)
+		</combo_item>
+		<combo_item name="768x576">
+			768x576 (PAL)
+		</combo_item>
+		<combo_item name="1024x768">
+			1024x768
+		</combo_item>
+	</combo_box>
+	<text name="DisplayResLabel">
+		Resolución:
+	</text>
+	<text name="AspectRatioLabel1" tool_tip="ancho / alto">
+		Proporción:
+	</text>
+	<combo_box name="aspect_ratio" tool_tip="ancho / alto">
+		<combo_item length="1" name="4:3(StandardCRT)" type="string">
+			4:3 (Standard CRT)
+		</combo_item>
+		<combo_item length="1" name="5:4(1280x1024LCD)" type="string">
+			5:4 (1280x1024 LCD)
+		</combo_item>
+		<combo_item name="8:5(Widescreen)">
+			8:5 (Widescreen)
+		</combo_item>
+		<combo_item length="1" name="16:9(Widescreen)" type="string">
+			16:9 (Widescreen)
+		</combo_item>
+	</combo_box>
+	<check_box label="Detectar automáticamente la proporción" name="aspect_auto_detect"/>
+	<text name="HigherText">
+		Calidad y
+	</text>
+	<text name="QualityText">
+		Rendimiento:
+	</text>
+	<text name="FasterText">
+		El más rápido
+	</text>
+	<text name="ShadersPrefText">
+		Bajo
+	</text>
+	<text name="ShadersPrefText2">
+		Medio
+	</text>
+	<text name="ShadersPrefText3">
+		Alto
+	</text>
+	<text name="ShadersPrefText4">
+		Ultra
+	</text>
+	<text name="HigherText2">
+		Más alto
+	</text>
+	<text name="QualityText2">
+		Calidad
+	</text>
+	<check_box label="Personalizar" name="CustomSettings"/>
+	<text name="ShadersText">
+		Shaders:
+	</text>
+	<check_box label="Efecto de relieve y brillo" name="BumpShiny"/>
+	<check_box label="Shaders básicos" name="BasicShaders" tool_tip="Desactivando esta opción puede prevenir fallos en algunos controladores de la tarjeta gráfica."/>
+	<check_box label="Shaders de la atmósfera" name="WindLightUseAtmosShaders"/>
+	<check_box label="Reflejos en el agua" name="Reflections"/>
+	<text name="ReflectionDetailText">
+		Objetos reflejados:
+	</text>
+	<radio_group name="ReflectionDetailRadio">
+		<radio_item name="0">
+			Terreno y árboles
+		</radio_item>
+		<radio_item name="1">
+			Todos los objetos estáticos
+		</radio_item>
+		<radio_item name="2">
+			Todos los avatares y objetos
+		</radio_item>
+		<radio_item name="3">
+			Todo
+		</radio_item>
+	</radio_group>
+	<text name="AvatarRenderingText">
+		Renderización del avatar:
+	</text>
+	<check_box label="Avatares simulados" name="AvatarImpostors"/>
+	<check_box label="Renderizado por hardware" name="AvatarVertexProgram"/>
+	<check_box label="Ropas del avatar" name="AvatarCloth"/>
+	<text name="DrawDistanceMeterText1">
+		m
+	</text>
+	<text name="DrawDistanceMeterText2">
+		m
+	</text>
+	<slider label="Distancia de dibujo:" name="DrawDistance"/>
+	<slider label="Núm. máx. de partículas:" name="MaxParticleCount"/>
+	<slider label="Calidad del procesamiento:" name="RenderPostProcess"/>
+	<text name="MeshDetailText">
+		Detalle de la malla:
+	</text>
+	<slider label="Objetos:" name="ObjectMeshDetail"/>
+	<slider label="Prims flexibles:" name="FlexibleMeshDetail"/>
+	<slider label="Árboles:" name="TreeMeshDetail"/>
+	<slider label="Avatares:" name="AvatarMeshDetail"/>
+	<slider label="Terreno:" name="TerrainMeshDetail"/>
+	<slider label="Cielo:" name="SkyMeshDetail"/>
+	<text name="PostProcessText">
+		Baja
+	</text>
+	<text name="ObjectMeshDetailText">
+		Bajo
+	</text>
+	<text name="FlexibleMeshDetailText">
+		Bajo
+	</text>
+	<text name="TreeMeshDetailText">
+		Bajo
+	</text>
+	<text name="AvatarMeshDetailText">
+		Bajo
+	</text>
+	<text name="TerrainMeshDetailText">
+		Bajo
+	</text>
+	<text name="SkyMeshDetailText">
+		Bajo
+	</text>
+	<text name="LightingDetailText">
+		Detalles de la iluminación:
+	</text>
+	<radio_group name="LightingDetailRadio">
+		<radio_item name="SunMoon">
+			Sólo el Sol y la Luna
+		</radio_item>
+		<radio_item name="LocalLights">
+			Puntos de luz cercanos
+		</radio_item>
+	</radio_group>
+	<text name="TerrainDetailText">
+		Nivel de detalle del terreno:
+	</text>
+	<radio_group name="TerrainDetailRadio">
+		<radio_item name="0">
+			Bajo
+		</radio_item>
+		<radio_item name="2">
+			Alto
+		</radio_item>
+	</radio_group>
+	<button label="Configuraciones recomendadas" name="Defaults"/>
+	<button label="Opciones del hardware" label_selected="Opciones del hardware" name="GraphicsHardwareButton"/>
+	<string name="resolution_format">
+		[RES_X] x [RES_Y]
+	</string>
+	<string name="aspect_ratio_text">
+		[NUM]:[DEN]
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_region_covenant.xml b/indra/newview/skins/default/xui/es/panel_region_covenant.xml
index 94e480ca8c..e353f6cdec 100644
--- a/indra/newview/skins/default/xui/es/panel_region_covenant.xml
+++ b/indra/newview/skins/default/xui/es/panel_region_covenant.xml
@@ -1,50 +1,50 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Contrato" name="Covenant">
-	<text name="covenant_help_text">
-		Los cambios que se hagan en la información del contrato se mostrarán en todas las parcelas del estado.
-	</text>
-	<text name="region_name_lbl">
-		Región:
-	</text>
-	<text name="region_name_text">
-		(desconocida)
-	</text>
-	<text name="estate_name_lbl">
-		Estado:
-	</text>
-	<text name="estate_name_text">
-		(desconocido)
-	</text>
-	<text name="covenent_instructions">
-		Para cambiar el contrato de este estado, arrastre y suelte una nota.
-	</text>
-	<button label="?" name="covenant_help"/>
-	<button label="Cambiar" name="reset_covenant"/>
-	<text name="estate_owner_lbl">
-		Propietario del estado:
-	</text>
-	<text name="estate_owner_text">
-		(desconocido)
-	</text>
-	<text name="resellable_clause">
-		El terreno comprado en esta región se podrá o no revender.
-	</text>
-	<text name="changeable_clause">
-		El terreno comprado en esta región se podrá o no unir o subdividir.
-	</text>
-	<text_editor name="covenant_editor">
-		Cargando...
-	</text_editor>
-	<text name="can_resell">
-		El terreno comprado en esta región se podrá revender.
-	</text>
-	<text name="can_not_resell">
-		El terreno comprado en esta región no se podrá revender.
-	</text>
-	<text name="can_change">
-		El terreno comprado en esta región se podrá unir o subdividir.
-	</text>
-	<text name="can_not_change">
-		El terreno comprado en esta región no se podrá unir ni subdividir.
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Contrato" name="Covenant">
+	<text name="covenant_help_text">
+		Los cambios que se hagan en la información del contrato se mostrarán en todas las parcelas del estado.
+	</text>
+	<text name="region_name_lbl">
+		Región:
+	</text>
+	<text name="region_name_text">
+		(desconocida)
+	</text>
+	<text name="estate_name_lbl">
+		Estado:
+	</text>
+	<text name="estate_name_text">
+		(desconocido)
+	</text>
+	<text name="covenent_instructions">
+		Para cambiar el contrato de este estado, arrastre y suelte una nota.
+	</text>
+	<button label="?" name="covenant_help"/>
+	<button label="Cambiar" name="reset_covenant"/>
+	<text name="estate_owner_lbl">
+		Propietario del estado:
+	</text>
+	<text name="estate_owner_text">
+		(desconocido)
+	</text>
+	<text name="resellable_clause">
+		El terreno comprado en esta región se podrá o no revender.
+	</text>
+	<text name="changeable_clause">
+		El terreno comprado en esta región se podrá o no unir o subdividir.
+	</text>
+	<text_editor name="covenant_editor">
+		Cargando...
+	</text_editor>
+	<text name="can_resell">
+		El terreno comprado en esta región se podrá revender.
+	</text>
+	<text name="can_not_resell">
+		El terreno comprado en esta región no se podrá revender.
+	</text>
+	<text name="can_change">
+		El terreno comprado en esta región se podrá unir o subdividir.
+	</text>
+	<text name="can_not_change">
+		El terreno comprado en esta región no se podrá unir ni subdividir.
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_region_debug.xml b/indra/newview/skins/default/xui/es/panel_region_debug.xml
index a370599e59..a722235243 100644
--- a/indra/newview/skins/default/xui/es/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/es/panel_region_debug.xml
@@ -1,40 +1,40 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Depurar" name="Debug">
-	<text name="region_text_lbl">
-		Región:
-	</text>
-	<text name="region_text">
-		desconocida
-	</text>
-	<check_box label="Desactivar los scripts" name="disable_scripts_check" tool_tip="Descativar todos los scripts en esta región"/>
-	<button label="?" name="disable_scripts_help"/>
-	<check_box label="Desactivar las colisiones" name="disable_collisions_check" tool_tip="Desactiva las colisiones (no las de avatares) en esta región"/>
-	<button label="?" name="disable_collisions_help"/>
-	<check_box label="Desactivar las propiedades físicas" name="disable_physics_check" tool_tip="Desactiva toda la física en esta región"/>
-	<button label="?" name="disable_physics_help"/>
-	<button label="Aplicar" name="apply_btn"/>
-	<text name="objret_text_lbl">
-		Devolver el objeto
-	</text>
-	<text name="resident_text_lbl">
-		Residente:
-	</text>
-	<line_editor name="target_avatar_name">
-		(nadie)
-	</line_editor>
-	<button label="Elegir..." name="choose_avatar_btn"/>
-	<text name="options_text_lbl">
-		Opciones:
-	</text>
-	<check_box label="Devolver sólo los objetos con scripts" name="return_scripts" tool_tip="Devolver sólo los objetos que tengan scripts."/>
-	<check_box label="Devolver sólo los objetos que están en terreno de otro" name="return_other_land" tool_tip="Devolver sólo los objetos que están en terreno de otro"/>
-	<check_box label="Devolver los objetos de cualquier región de este estado" name="return_estate_wide" tool_tip="Devolver los objetos de todas las regiones que forman este estado"/>
-	<button label="Devolver" name="return_btn"/>
-	<button label="Listar los objetos que colisionan..." name="top_colliders_btn" tool_tip="Lista de los objetos con más posibles colisiones potenciales"/>
-	<button label="?" name="top_colliders_help"/>
-	<button label="Listar los scripts según su uso..." name="top_scripts_btn" tool_tip="Lista de los objetos que más tiempo emplean ejecutando scripts"/>
-	<button label="?" name="top_scripts_help"/>
-	<button label="Reiniciar la región" name="restart_btn" tool_tip="Cuenta atrás de 2 minutos y reiniciar la región"/>
-	<button label="?" name="restart_help"/>
-	<button label="Retrasar el reinicio" name="cancel_restart_btn" tool_tip="Retrasar una hora el reinicio de la región"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Depurar" name="Debug">
+	<text name="region_text_lbl">
+		Región:
+	</text>
+	<text name="region_text">
+		desconocida
+	</text>
+	<check_box label="Desactivar los scripts" name="disable_scripts_check" tool_tip="Descativar todos los scripts en esta región"/>
+	<button label="?" name="disable_scripts_help"/>
+	<check_box label="Desactivar las colisiones" name="disable_collisions_check" tool_tip="Desactiva las colisiones (no las de avatares) en esta región"/>
+	<button label="?" name="disable_collisions_help"/>
+	<check_box label="Desactivar las propiedades físicas" name="disable_physics_check" tool_tip="Desactiva toda la física en esta región"/>
+	<button label="?" name="disable_physics_help"/>
+	<button label="Aplicar" name="apply_btn"/>
+	<text name="objret_text_lbl">
+		Devolver el objeto
+	</text>
+	<text name="resident_text_lbl">
+		Residente:
+	</text>
+	<line_editor name="target_avatar_name">
+		(nadie)
+	</line_editor>
+	<button label="Elegir..." name="choose_avatar_btn"/>
+	<text name="options_text_lbl">
+		Opciones:
+	</text>
+	<check_box label="Devolver sólo los objetos con scripts" name="return_scripts" tool_tip="Devolver sólo los objetos que tengan scripts."/>
+	<check_box label="Devolver sólo los objetos que están en terreno de otro" name="return_other_land" tool_tip="Devolver sólo los objetos que están en terreno de otro"/>
+	<check_box label="Devolver los objetos de cualquier región de este estado" name="return_estate_wide" tool_tip="Devolver los objetos de todas las regiones que forman este estado"/>
+	<button label="Devolver" name="return_btn"/>
+	<button label="Listar los objetos que colisionan..." name="top_colliders_btn" tool_tip="Lista de los objetos con más posibles colisiones potenciales"/>
+	<button label="?" name="top_colliders_help"/>
+	<button label="Listar los scripts según su uso..." name="top_scripts_btn" tool_tip="Lista de los objetos que más tiempo emplean ejecutando scripts"/>
+	<button label="?" name="top_scripts_help"/>
+	<button label="Reiniciar la región" name="restart_btn" tool_tip="Cuenta atrás de 2 minutos y reiniciar la región"/>
+	<button label="?" name="restart_help"/>
+	<button label="Retrasar el reinicio" name="cancel_restart_btn" tool_tip="Retrasar una hora el reinicio de la región"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_region_estate.xml b/indra/newview/skins/default/xui/es/panel_region_estate.xml
index 1cffc13175..93155d828d 100644
--- a/indra/newview/skins/default/xui/es/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/es/panel_region_estate.xml
@@ -1,69 +1,69 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Estado" name="Estate">
-	<text name="estate_help_text">
-		Los cambios en las configuraciones de esta pestaña afectarán a todas
-las regiones de este estado.
-	</text>
-	<text name="estate_text">
-		Estado:
-	</text>
-	<text name="estate_name">
-		(desconocido)
-	</text>
-	<text name="owner_text">
-		Propietario:
-	</text>
-	<text name="estate_owner">
-		(desconocido)
-	</text>
-	<check_box label="Usar el horario global" name="use_global_time_check"/>
-	<button label="?" name="use_global_time_help"/>
-	<check_box label="Fijar el Sol" name="fixed_sun_check"/>
-	<button label="?" name="fixed_sun_help"/>
-	<slider label="Fase" name="sun_hour_slider"/>
-	<check_box label="Permitir el acceso público" name="externally_visible_check"/>
-	<button label="?" name="externally_visible_help"/>
-	<text name="Only Allow">
-		Impedir el acceso a:
-	</text>
-	<check_box label="Residentes sin información de pago archivada" name="limit_payment" tool_tip="Impedir el acceso a los residentes no identificados."/>
-	<check_box label="Residentes de los que no se ha verificado si son adultos" name="limit_age_verified" tool_tip="Impedir el acceso a residentes que no hayan verificado su edad. Para más información, vea  support.secondlife.com"/>
-	<check_box label="Permitir el chat de voz" name="voice_chat_check"/>
-	<button label="?" name="voice_chat_help"/>
-	<check_box label="Permitir el teleporte a cualquier punto" name="allow_direct_teleport"/>
-	<button label="?" name="allow_direct_teleport_help"/>
-	<text name="abuse_email_text">
-		Dirección de correo electrónico para infracciones:
-	</text>
-	<string name="email_unsupported">
-		Característica no disponible
-	</string>
-	<button label="?" name="abuse_email_address_help"/>
-	<button label="Aplicar" name="apply_btn"/>
-	<button label="Echar usuarios del estado..." name="kick_user_from_estate_btn"/>
-	<button label="Enviar un mensaje al estado..." name="message_estate_btn"/>
-	<text name="estate_manager_label">
-		Administradores del estado:
-	</text>
-	<button label="?" name="estate_manager_help"/>
-	<button label="Quitar..." name="remove_estate_manager_btn"/>
-	<button label="Añadir..." name="add_estate_manager_btn"/>
-	<text name="allow_resident_label">
-		Residentes autorizados:
-	</text>
-	<button label="?" name="allow_resident_help"/>
-	<button label="Quitar..." name="remove_allowed_avatar_btn"/>
-	<button label="Añadir..." name="add_allowed_avatar_btn"/>
-	<text name="allow_group_label">
-		Grupos autorizados:
-	</text>
-	<button label="?" name="allow_group_help"/>
-	<button label="Quitar..." name="remove_allowed_group_btn"/>
-	<button label="Añadir..." name="add_allowed_group_btn"/>
-	<text name="ban_resident_label">
-		Residentes con el acceso prohibido:
-	</text>
-	<button label="?" name="ban_resident_help"/>
-	<button label="Quitar..." name="remove_banned_avatar_btn"/>
-	<button label="Añadir..." name="add_banned_avatar_btn"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Estado" name="Estate">
+	<text name="estate_help_text">
+		Los cambios en las configuraciones de esta pestaña afectarán a todas
+las regiones de este estado.
+	</text>
+	<text name="estate_text">
+		Estado:
+	</text>
+	<text name="estate_name">
+		(desconocido)
+	</text>
+	<text name="owner_text">
+		Propietario:
+	</text>
+	<text name="estate_owner">
+		(desconocido)
+	</text>
+	<check_box label="Usar el horario global" name="use_global_time_check"/>
+	<button label="?" name="use_global_time_help"/>
+	<check_box label="Fijar el Sol" name="fixed_sun_check"/>
+	<button label="?" name="fixed_sun_help"/>
+	<slider label="Fase" name="sun_hour_slider"/>
+	<check_box label="Permitir el acceso público" name="externally_visible_check"/>
+	<button label="?" name="externally_visible_help"/>
+	<text name="Only Allow">
+		Impedir el acceso a:
+	</text>
+	<check_box label="Residentes sin información de pago archivada" name="limit_payment" tool_tip="Impedir el acceso a los residentes no identificados."/>
+	<check_box label="Residentes de los que no se ha verificado si son adultos" name="limit_age_verified" tool_tip="Impedir el acceso a residentes que no hayan verificado su edad. Para más información, vea  support.secondlife.com"/>
+	<check_box label="Permitir el chat de voz" name="voice_chat_check"/>
+	<button label="?" name="voice_chat_help"/>
+	<check_box label="Permitir el teleporte a cualquier punto" name="allow_direct_teleport"/>
+	<button label="?" name="allow_direct_teleport_help"/>
+	<text name="abuse_email_text">
+		Dirección de correo electrónico para infracciones:
+	</text>
+	<string name="email_unsupported">
+		Característica no disponible
+	</string>
+	<button label="?" name="abuse_email_address_help"/>
+	<button label="Aplicar" name="apply_btn"/>
+	<button label="Echar usuarios del estado..." name="kick_user_from_estate_btn"/>
+	<button label="Enviar un mensaje al estado..." name="message_estate_btn"/>
+	<text name="estate_manager_label">
+		Administradores del estado:
+	</text>
+	<button label="?" name="estate_manager_help"/>
+	<button label="Quitar..." name="remove_estate_manager_btn"/>
+	<button label="Añadir..." name="add_estate_manager_btn"/>
+	<text name="allow_resident_label">
+		Residentes autorizados:
+	</text>
+	<button label="?" name="allow_resident_help"/>
+	<button label="Quitar..." name="remove_allowed_avatar_btn"/>
+	<button label="Añadir..." name="add_allowed_avatar_btn"/>
+	<text name="allow_group_label">
+		Grupos autorizados:
+	</text>
+	<button label="?" name="allow_group_help"/>
+	<button label="Quitar..." name="remove_allowed_group_btn"/>
+	<button label="Añadir..." name="add_allowed_group_btn"/>
+	<text name="ban_resident_label">
+		Residentes con el acceso prohibido:
+	</text>
+	<button label="?" name="ban_resident_help"/>
+	<button label="Quitar..." name="remove_banned_avatar_btn"/>
+	<button label="Añadir..." name="add_banned_avatar_btn"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_region_general.xml b/indra/newview/skins/default/xui/es/panel_region_general.xml
index 95a57dc917..9ff7c97fc7 100644
--- a/indra/newview/skins/default/xui/es/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/es/panel_region_general.xml
@@ -1,46 +1,46 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Región" name="General">
-	<text name="region_text_lbl">
-		Región:
-	</text>
-	<text name="region_text">
-		desconocida
-	</text>
-	<text name="version_channel_text_lbl">
-		Versión:
-	</text>
-	<text name="version_channel_text">
-		desconocida
-	</text>
-	<check_box label="No permitir modificar el terreno" name="block_terraform_check"/>
-	<button label="?" name="terraform_help"/>
-	<check_box label="Prohibir volar" name="block_fly_check"/>
-	<button label="?" name="fly_help"/>
-	<check_box label="Permitir el daño" name="allow_damage_check"/>
-	<button label="?" name="damage_help"/>
-	<check_box label="Impedir los &apos;empujones&apos;" name="restrict_pushobject"/>
-	<button label="?" name="restrict_pushobject_help"/>
-	<check_box label="Permitir la reventa del terreno" name="allow_land_resell_check"/>
-	<button label="?" name="land_resell_help"/>
-	<check_box label="Permitir unir/dividir el terreno" name="allow_parcel_changes_check"/>
-	<button label="?" name="parcel_changes_help"/>
-	<check_box label="Bloquear el mostrar el terreno en la búsqueda." name="block_parcel_search_check" tool_tip="Permitir que la gente vea esta región y sus parcelas en los resultados de la búsqueda."/>
-	<button label="?" name="parcel_search_help"/>
-	<spinner label="Nº máximo de avatares" name="agent_limit_spin"/>
-	<button label="?" name="agent_limit_help"/>
-	<spinner label="Plus de objetos" name="object_bonus_spin"/>
-	<button label="?" name="object_bonus_help"/>
-	<text label="Calificación" name="access_text">
-		Calificación:
-	</text>
-
-
-
-
-	<button label="?" name="access_help"/>
-	<button label="Aplicar" name="apply_btn"/>
-	<button label="Teleportar a su Base a un usuario..." name="kick_btn"/>
-	<button label="Teleportar a su Base a todos los usuarios..." name="kick_all_btn"/>
-	<button label="Enviar un mensaje a toda la región..." name="im_btn"/>
-	<button label="Administrar el Punto de Teleporte..." name="manage_telehub_btn"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Región" name="General">
+	<text name="region_text_lbl">
+		Región:
+	</text>
+	<text name="region_text">
+		desconocida
+	</text>
+	<text name="version_channel_text_lbl">
+		Versión:
+	</text>
+	<text name="version_channel_text">
+		desconocida
+	</text>
+	<check_box label="No permitir modificar el terreno" name="block_terraform_check"/>
+	<button label="?" name="terraform_help"/>
+	<check_box label="Prohibir volar" name="block_fly_check"/>
+	<button label="?" name="fly_help"/>
+	<check_box label="Permitir el daño" name="allow_damage_check"/>
+	<button label="?" name="damage_help"/>
+	<check_box label="Impedir los &apos;empujones&apos;" name="restrict_pushobject"/>
+	<button label="?" name="restrict_pushobject_help"/>
+	<check_box label="Permitir la reventa del terreno" name="allow_land_resell_check"/>
+	<button label="?" name="land_resell_help"/>
+	<check_box label="Permitir unir/dividir el terreno" name="allow_parcel_changes_check"/>
+	<button label="?" name="parcel_changes_help"/>
+	<check_box label="Bloquear el mostrar el terreno en la búsqueda." name="block_parcel_search_check" tool_tip="Permitir que la gente vea esta región y sus parcelas en los resultados de la búsqueda."/>
+	<button label="?" name="parcel_search_help"/>
+	<spinner label="Nº máximo de avatares" name="agent_limit_spin"/>
+	<button label="?" name="agent_limit_help"/>
+	<spinner label="Plus de objetos" name="object_bonus_spin"/>
+	<button label="?" name="object_bonus_help"/>
+	<text label="Calificación" name="access_text">
+		Calificación:
+	</text>
+
+
+
+
+	<button label="?" name="access_help"/>
+	<button label="Aplicar" name="apply_btn"/>
+	<button label="Teleportar a su Base a un usuario..." name="kick_btn"/>
+	<button label="Teleportar a su Base a todos los usuarios..." name="kick_all_btn"/>
+	<button label="Enviar un mensaje a toda la región..." name="im_btn"/>
+	<button label="Administrar el Punto de Teleporte..." name="manage_telehub_btn"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_region_terrain.xml b/indra/newview/skins/default/xui/es/panel_region_terrain.xml
index 48a5f7837d..df333c0c5e 100644
--- a/indra/newview/skins/default/xui/es/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/es/panel_region_terrain.xml
@@ -1,27 +1,27 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Terreno" name="Terrain">
-	<text name="region_text_lbl">
-		Región:
-	</text>
-	<text name="region_text">
-		desconocida
-	</text>
-	<spinner label="Nivel del agua" name="water_height_spin"/>
-	<button label="?" name="water_height_help"/>
-	<spinner label="Límite de elevación del terreno" name="terrain_raise_spin"/>
-	<button label="?" name="terrain_raise_help"/>
-	<spinner label="Límite de bajada del terreno" name="terrain_lower_spin"/>
-	<button label="?" name="terrain_lower_help"/>
-	<check_box label="Usar el Sol del estado" name="use_estate_sun_check"/>
-	<button label="?" name="use_estate_sun_help"/>
-	<check_box label="Fijar el Sol" name="fixed_sun_check"/>
-	<button label="?" name="fixed_sun_help"/>
-	<slider label="Fase" name="sun_hour_slider"/>
-	<button label="Aplicar" name="apply_btn"/>
-	<button label="Descargar el RAW del terreno..." name="download_raw_btn" tool_tip="Disponible sólo para los propietarios del estado, no para los administradores"/>
-	<button label="?" name="download_raw_help"/>
-	<button label="Subir un RAW para el terreno..." name="upload_raw_btn" tool_tip="Disponible sólo para los propietarios del estado, no para los administradores"/>
-	<button label="?" name="upload_raw_help"/>
-	<button label="Predeterminar este terreno" name="bake_terrain_btn" tool_tip="Definir el terreno actual como punto medio para los límites de elevación/bajada"/>
-	<button label="?" name="bake_terrain_help"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Terreno" name="Terrain">
+	<text name="region_text_lbl">
+		Región:
+	</text>
+	<text name="region_text">
+		desconocida
+	</text>
+	<spinner label="Nivel del agua" name="water_height_spin"/>
+	<button label="?" name="water_height_help"/>
+	<spinner label="Límite de elevación del terreno" name="terrain_raise_spin"/>
+	<button label="?" name="terrain_raise_help"/>
+	<spinner label="Límite de bajada del terreno" name="terrain_lower_spin"/>
+	<button label="?" name="terrain_lower_help"/>
+	<check_box label="Usar el Sol del estado" name="use_estate_sun_check"/>
+	<button label="?" name="use_estate_sun_help"/>
+	<check_box label="Fijar el Sol" name="fixed_sun_check"/>
+	<button label="?" name="fixed_sun_help"/>
+	<slider label="Fase" name="sun_hour_slider"/>
+	<button label="Aplicar" name="apply_btn"/>
+	<button label="Descargar el RAW del terreno..." name="download_raw_btn" tool_tip="Disponible sólo para los propietarios del estado, no para los administradores"/>
+	<button label="?" name="download_raw_help"/>
+	<button label="Subir un RAW para el terreno..." name="upload_raw_btn" tool_tip="Disponible sólo para los propietarios del estado, no para los administradores"/>
+	<button label="?" name="upload_raw_help"/>
+	<button label="Predeterminar este terreno" name="bake_terrain_btn" tool_tip="Definir el terreno actual como punto medio para los límites de elevación/bajada"/>
+	<button label="?" name="bake_terrain_help"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_region_texture.xml b/indra/newview/skins/default/xui/es/panel_region_texture.xml
index 94dbdad8f5..d7f42ac41c 100644
--- a/indra/newview/skins/default/xui/es/panel_region_texture.xml
+++ b/indra/newview/skins/default/xui/es/panel_region_texture.xml
@@ -1,57 +1,57 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Texturas del terreno" name="Textures">
-	<text name="region_text_lbl">
-		Región:
-	</text>
-	<text name="region_text">
-		desconocida
-	</text>
-	<text name="detail_texture_text">
-		Texturas del terreno (se requieren archivos .tga de 512x512 y 24 bites)
-	</text>
-	<text name="height_text_lbl">
-		1 (Baja)
-	</text>
-	<text name="height_text_lbl2">
-		2
-	</text>
-	<text name="height_text_lbl3">
-		3
-	</text>
-	<text name="height_text_lbl4">
-		4 (Alta)
-	</text>
-	<text name="height_text_lbl5">
-		Rangos de la elevación de la textura
-	</text>
-	<text name="height_text_lbl6">
-		Suroeste
-	</text>
-	<text name="height_text_lbl7">
-		Noroeste
-	</text>
-	<text name="height_text_lbl8">
-		Sureste
-	</text>
-	<text name="height_text_lbl9">
-		Noreste
-	</text>
-	<spinner label="Baja" name="height_start_spin_0"/>
-	<spinner label="Baja" name="height_start_spin_1"/>
-	<spinner label="Baja" name="height_start_spin_2"/>
-	<spinner label="Baja" name="height_start_spin_3"/>
-	<spinner label="Alta" name="height_range_spin_0"/>
-	<spinner label="Alta" name="height_range_spin_1"/>
-	<spinner label="Alta" name="height_range_spin_2"/>
-	<spinner label="Alta" name="height_range_spin_3"/>
-	<text name="height_text_lbl10">
-		Estos valores representan la gama de mezclas para las texturas superiores.
-	</text>
-	<text name="height_text_lbl11">
-		Midiendo en metros, el valor BAJA es la altura MÁXIMA de la textura #1,
-	</text>
-	<text name="height_text_lbl12">
-		y el valor ALTA es la altura MÍNIMA de la textura #4.
-	</text>
-	<button label="Aplicar" name="apply_btn"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Texturas del terreno" name="Textures">
+	<text name="region_text_lbl">
+		Región:
+	</text>
+	<text name="region_text">
+		desconocida
+	</text>
+	<text name="detail_texture_text">
+		Texturas del terreno (se requieren archivos .tga de 512x512 y 24 bites)
+	</text>
+	<text name="height_text_lbl">
+		1 (Baja)
+	</text>
+	<text name="height_text_lbl2">
+		2
+	</text>
+	<text name="height_text_lbl3">
+		3
+	</text>
+	<text name="height_text_lbl4">
+		4 (Alta)
+	</text>
+	<text name="height_text_lbl5">
+		Rangos de la elevación de la textura
+	</text>
+	<text name="height_text_lbl6">
+		Suroeste
+	</text>
+	<text name="height_text_lbl7">
+		Noroeste
+	</text>
+	<text name="height_text_lbl8">
+		Sureste
+	</text>
+	<text name="height_text_lbl9">
+		Noreste
+	</text>
+	<spinner label="Baja" name="height_start_spin_0"/>
+	<spinner label="Baja" name="height_start_spin_1"/>
+	<spinner label="Baja" name="height_start_spin_2"/>
+	<spinner label="Baja" name="height_start_spin_3"/>
+	<spinner label="Alta" name="height_range_spin_0"/>
+	<spinner label="Alta" name="height_range_spin_1"/>
+	<spinner label="Alta" name="height_range_spin_2"/>
+	<spinner label="Alta" name="height_range_spin_3"/>
+	<text name="height_text_lbl10">
+		Estos valores representan la gama de mezclas para las texturas superiores.
+	</text>
+	<text name="height_text_lbl11">
+		Midiendo en metros, el valor BAJA es la altura MÁXIMA de la textura #1,
+	</text>
+	<text name="height_text_lbl12">
+		y el valor ALTA es la altura MÍNIMA de la textura #4.
+	</text>
+	<button label="Aplicar" name="apply_btn"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_scrolling_param.xml b/indra/newview/skins/default/xui/es/panel_scrolling_param.xml
index 80ed489ba7..f6feab274f 100644
--- a/indra/newview/skins/default/xui/es/panel_scrolling_param.xml
+++ b/indra/newview/skins/default/xui/es/panel_scrolling_param.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="LLScrollingPanelParam">
-	<text length="1" name="Loading..." type="string">
-		Cargando...
-	</text>
-	<text length="1" name="Loading...2" type="string">
-		Cargando...
-	</text>
-	<slider label="[DESC]" name="param slider"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="LLScrollingPanelParam">
+	<text length="1" name="Loading..." type="string">
+		Cargando...
+	</text>
+	<text length="1" name="Loading...2" type="string">
+		Cargando...
+	</text>
+	<slider label="[DESC]" name="param slider"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_status_bar.xml b/indra/newview/skins/default/xui/es/panel_status_bar.xml
index d48f2d9427..add7db2f9a 100644
--- a/indra/newview/skins/default/xui/es/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/es/panel_status_bar.xml
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="status">
-	<text length="1" name="ParcelNameText" tool_tip="Nombre de la parcela en la que está. Pulse Acerca del terreno." type="string">
-		el nombre de la parcela va aquí
-	</text>
-	<text length="1" name="BalanceText" tool_tip="Saldo de su cuenta" type="string">
-		Cargando...
-	</text>
-	<button label="" label_selected="" name="buycurrency" tool_tip="Comprar dinero"/>
-	<text length="12" name="TimeText" tool_tip="Hora actual (costa oeste EE.UU.)" type="string">
-		12:00 AM
-	</text>
-	<string name="StatBarDaysOfWeek">
-		Domingo:Lunes:Martes:Miércoles:Jueves:Viernes:Sábado
-	</string>
-	<string name="StatBarMonthsOfYear">
-		Enero:Febrero:Marzo:Abril:Mayo:Junio:Julio:Agosto:Septiembre:Octubre:Noviembre:Diciembre
-	</string>
-	<button label="" label_selected="" name="scriptout" tool_tip="Errores y alertas de los scripts"/>
-	<button label="" label_selected="" name="health" tool_tip="Vida"/>
-	<text length="1" name="HealthText" tool_tip="Vida" type="string">
-		100%
-	</text>
-	<button label="" label_selected="" name="no_fly" tool_tip="Prohibido volar"/>
-	<button label="" label_selected="" name="no_build" tool_tip="No se permite Construir/Renderizar"/>
-	<button label="" label_selected="" name="no_scripts" tool_tip="No se permiten los scripts"/>
-	<button label="" label_selected="" name="restrictpush" tool_tip="Sin &apos;empujones&apos;"/>
-	<button label="" label_selected="" name="status_no_voice" tool_tip="Aquí no está disponible la voz"/>
-	<button label="" label_selected="" name="buyland" tool_tip="Comprar esta parcela"/>
-	<line_editor label="Buscar" name="search_editor" tool_tip="Buscar en Second Life"/>
-	<button label="" label_selected="" name="search_btn" tool_tip="Buscar en Second Life"/>
-	<string name="packet_loss_tooltip">
-		Pérdida de paquetes
-	</string>
-	<string name="bandwidth_tooltip">
-		Ancho de banda
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="status">
+	<text length="1" name="ParcelNameText" tool_tip="Nombre de la parcela en la que está. Pulse Acerca del terreno." type="string">
+		el nombre de la parcela va aquí
+	</text>
+	<text length="1" name="BalanceText" tool_tip="Saldo de su cuenta" type="string">
+		Cargando...
+	</text>
+	<button label="" label_selected="" name="buycurrency" tool_tip="Comprar dinero"/>
+	<text length="12" name="TimeText" tool_tip="Hora actual (costa oeste EE.UU.)" type="string">
+		12:00 AM
+	</text>
+	<string name="StatBarDaysOfWeek">
+		Domingo:Lunes:Martes:Miércoles:Jueves:Viernes:Sábado
+	</string>
+	<string name="StatBarMonthsOfYear">
+		Enero:Febrero:Marzo:Abril:Mayo:Junio:Julio:Agosto:Septiembre:Octubre:Noviembre:Diciembre
+	</string>
+	<button label="" label_selected="" name="scriptout" tool_tip="Errores y alertas de los scripts"/>
+	<button label="" label_selected="" name="health" tool_tip="Vida"/>
+	<text length="1" name="HealthText" tool_tip="Vida" type="string">
+		100%
+	</text>
+	<button label="" label_selected="" name="no_fly" tool_tip="Prohibido volar"/>
+	<button label="" label_selected="" name="no_build" tool_tip="No se permite Construir/Renderizar"/>
+	<button label="" label_selected="" name="no_scripts" tool_tip="No se permiten los scripts"/>
+	<button label="" label_selected="" name="restrictpush" tool_tip="Sin &apos;empujones&apos;"/>
+	<button label="" label_selected="" name="status_no_voice" tool_tip="Aquí no está disponible la voz"/>
+	<button label="" label_selected="" name="buyland" tool_tip="Comprar esta parcela"/>
+	<line_editor label="Buscar" name="search_editor" tool_tip="Buscar en Second Life"/>
+	<button label="" label_selected="" name="search_btn" tool_tip="Buscar en Second Life"/>
+	<string name="packet_loss_tooltip">
+		Pérdida de paquetes
+	</string>
+	<string name="bandwidth_tooltip">
+		Ancho de banda
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/xui_version.xml b/indra/newview/skins/default/xui/es/xui_version.xml
index ee2a0be745..0e777751d3 100644
--- a/indra/newview/skins/default/xui/es/xui_version.xml
+++ b/indra/newview/skins/default/xui/es/xui_version.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<xui_version>
-	1.0
-</xui_version>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xui_version>
+	1.0
+</xui_version>
diff --git a/indra/newview/skins/default/xui/fr/floater_about.xml b/indra/newview/skins/default/xui/fr/floater_about.xml
index 22bc6e5fdc..1565e7cd68 100644
--- a/indra/newview/skins/default/xui/fr/floater_about.xml
+++ b/indra/newview/skins/default/xui/fr/floater_about.xml
@@ -1,34 +1,34 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_about" title="A propos de Second Life">
-	<text_editor name="credits_editor">
-		Second Life existe grâce aux efforts de Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les et de nombreuses autres personnes.
-
-  Tous nos remerciements aux résidents suivants pour avoir testé cette version (la meilleure qui soit jusqu&apos;à présent) :  afon shepherd, Aimee Trescothick, Alexandrea Fride, Alissa Sabre, Amber DeCuir, Asuka Neely, Auron Forcella, Blue Revolution, Bocan Undercroft, Boroondas Gupte, Brandon Shinobu, Bri Gufler, Buckaroo Mu, Celierra Darling, Christos Atlantis, Coder Kas, Cummere Mayo, dakota schwade, Dirk Talamasca, Dizzy Banjo, Drew Dwi, Duckling Kwak, Ellla McMahon, Erikah Jameson, Erinyse Planer, Eyana Yohkoh, Ezian Ecksol, Faron Karu, Fenoe Lowey, Fox Hwasung, Francisca Biedermann, Gally Young, Gellan Glenelg, Geneko Nemeth, Glenn Rotaru, Hagar Qinan, Harleen Gretzky, Holger Gilruth, hotrodjohnny gears, IAm Zabelin, Inigo Catteneo, Iustinian Tomsen, Jacek Antonell, James Benedek, Jim Kupferberg, Joeseph Albanese, JPT62089 Agnon, Kardargo Adamczyk, Kirstenlee Cinquetti, Latif Khalifa, lea Parnall, Lex Neva, Lillith Anatine, Lilly Zenovka, Lim Catteneo, Lindal Kidd, Mark Rosenbaum, MasterJ Chaplin, McCabe Maxsted, Melvin Starbrook, Meni Kaiousei, Mero Collas, Minakothegothicgeisha Kamachi, Moon Metty, neofilo aabye, Neutron Chesnokov, Nomad Ingwer, norritt Xi, Opensource Obscure, Oracle Weatherwax, Ourasi Ferraris, Pabl0 Roffo, Peyton Aleixandre, Phli Foxchase, Psi Merlin, r2d2 Wunderlich, Regi Yifu, Saijanai Kuhn, Sandor Balczo, Sarkan Dreamscape, Scree Raymaker, Sedona Mills, Selena Beale, Sheet Spotter, Shibari Twine, Silver Key, Simon Kline, SLB Wirefly, Stacy Wombat, Sugarcult Dagger, Tayra Dagostino, Tetsuryu Vlodovic, ThaBiGGDoGG Richez, Timo Gufler, tx Oh, wayfinder wishbringer, Wizzytoe McCullough, Wundur Primbee, Yann Dufaux, Yuu Nakamichi, Aminom Marvin, Andred Qinan, arminasx saiman, caroline apollo, Iskar Ariantho, Jenika Connolly, Maghnus Balogh, Nefertiti Nefarious, RodneyLee Jessop
-
-  3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion
-  APR Copyright (C) 2000-2004 The Apache Software Foundation
-  cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
-  expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
-  FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
-  GL Copyright (C) 1999-2004 Brian Paul.
-  Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
-  jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
-  jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
-  ogg/vorbis Copyright (C) 2001, Xiphophorus
-  OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
-  SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
-  SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-  xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
-  zlib Copyright (C) 1995-2002 Jean-loup Gailly et Mark Adler.
-
-  Tous droits réservés.  Voir licenses.txt pour plus de détails.
-
-  Codage Audio du chat vocal : Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
-
-
-  Je m&apos;en sors avec un peu d&apos;aide de mes amis. --Richard Starkey
-	</text_editor>
-	<string name="you_are_at">
-		Votre position : [POSITION]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_about" title="A propos de Second Life">
+	<text_editor name="credits_editor">
+		Second Life existe grâce aux efforts de Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les et de nombreuses autres personnes.
+
+  Tous nos remerciements aux résidents suivants pour avoir testé cette version (la meilleure qui soit jusqu&apos;à présent) :  afon shepherd, Aimee Trescothick, Alexandrea Fride, Alissa Sabre, Amber DeCuir, Asuka Neely, Auron Forcella, Blue Revolution, Bocan Undercroft, Boroondas Gupte, Brandon Shinobu, Bri Gufler, Buckaroo Mu, Celierra Darling, Christos Atlantis, Coder Kas, Cummere Mayo, dakota schwade, Dirk Talamasca, Dizzy Banjo, Drew Dwi, Duckling Kwak, Ellla McMahon, Erikah Jameson, Erinyse Planer, Eyana Yohkoh, Ezian Ecksol, Faron Karu, Fenoe Lowey, Fox Hwasung, Francisca Biedermann, Gally Young, Gellan Glenelg, Geneko Nemeth, Glenn Rotaru, Hagar Qinan, Harleen Gretzky, Holger Gilruth, hotrodjohnny gears, IAm Zabelin, Inigo Catteneo, Iustinian Tomsen, Jacek Antonell, James Benedek, Jim Kupferberg, Joeseph Albanese, JPT62089 Agnon, Kardargo Adamczyk, Kirstenlee Cinquetti, Latif Khalifa, lea Parnall, Lex Neva, Lillith Anatine, Lilly Zenovka, Lim Catteneo, Lindal Kidd, Mark Rosenbaum, MasterJ Chaplin, McCabe Maxsted, Melvin Starbrook, Meni Kaiousei, Mero Collas, Minakothegothicgeisha Kamachi, Moon Metty, neofilo aabye, Neutron Chesnokov, Nomad Ingwer, norritt Xi, Opensource Obscure, Oracle Weatherwax, Ourasi Ferraris, Pabl0 Roffo, Peyton Aleixandre, Phli Foxchase, Psi Merlin, r2d2 Wunderlich, Regi Yifu, Saijanai Kuhn, Sandor Balczo, Sarkan Dreamscape, Scree Raymaker, Sedona Mills, Selena Beale, Sheet Spotter, Shibari Twine, Silver Key, Simon Kline, SLB Wirefly, Stacy Wombat, Sugarcult Dagger, Tayra Dagostino, Tetsuryu Vlodovic, ThaBiGGDoGG Richez, Timo Gufler, tx Oh, wayfinder wishbringer, Wizzytoe McCullough, Wundur Primbee, Yann Dufaux, Yuu Nakamichi, Aminom Marvin, Andred Qinan, arminasx saiman, caroline apollo, Iskar Ariantho, Jenika Connolly, Maghnus Balogh, Nefertiti Nefarious, RodneyLee Jessop
+
+  3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion
+  APR Copyright (C) 2000-2004 The Apache Software Foundation
+  cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
+  expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
+  FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
+  GL Copyright (C) 1999-2004 Brian Paul.
+  Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
+  jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
+  jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
+  ogg/vorbis Copyright (C) 2001, Xiphophorus
+  OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
+  SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
+  SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+  xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
+  zlib Copyright (C) 1995-2002 Jean-loup Gailly et Mark Adler.
+
+  Tous droits réservés.  Voir licenses.txt pour plus de détails.
+
+  Codage Audio du chat vocal : Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
+
+
+  Je m&apos;en sors avec un peu d&apos;aide de mes amis. --Richard Starkey
+	</text_editor>
+	<string name="you_are_at">
+		Votre position : [POSITION]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml
index 7949f02914..8212db046f 100644
--- a/indra/newview/skins/default/xui/fr/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml
@@ -1,440 +1,440 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floaterland" title="À propos du terrain">
-	<tab_container name="landtab">
-		<panel label="Général" name="land_general_panel">
-			<text length="1" name="Name:" type="string">
-				Nom :
-			</text>
-			<line_editor name="Name"/>
-			<text length="1" name="Description:" type="string">
-				Description :
-			</text>
-			<text_editor name="Description"/>
-			<text length="1" name="Owner:" type="string">
-				Propriétaire :
-			</text>
-			<text length="1" name="OwnerText" type="string">
-				Leyla Linden
-			</text>
-			<button label="Profil..." label_selected="Profil..." name="Profile..."/>
-			<text length="1" name="Group:" type="string">
-				Groupe :
-			</text>
-			<text name="GroupText"/>
-			<button label="Définir..." label_selected="Définir..." name="Set..."/>
-			<check_box label="Autoriser la cession au groupe" name="check deed" tool_tip="Un officier peut céder ce terrain au groupe. Il viendra alors s&apos;ajouter au patrimoine du groupe."/>
-			<button label="Céder..." label_selected="Céder..." name="Deed..." tool_tip="Vous ne pouvez céder le terrain que si vous avez un rôle d&apos;officier dans le groupe sélectionné."/>
-			<check_box label="Le propriétaire contribue en cédant du terrain" name="check contrib" tool_tip="Lorsqu&apos;un terrain est cédé au groupe, l&apos;ancien propriétaire fait également un don de terrain suffisant."/>
-			<text length="1" name="For Sale:" type="string">
-				À vendre :
-			</text>
-			<text length="1" name="Not for sale." type="string">
-				Pas à vendre
-			</text>
-			<text length="1" name="For Sale: Price L$[PRICE]." type="string">
-				Prix : [PRICE] L$ ([PRICE_PER_SQM] L$/m²).
-			</text>
-			<text name="SalePending"/>
-			<button label="Vendre le terrain..." label_selected="Vendre le terrain..." name="Sell Land..."/>
-			<text length="1" name="For sale to" type="string">
-				À vendre à : [BUYER]
-			</text>
-			<text length="1" name="Sell with landowners objects in parcel." type="string">
-				Objets inclus dans la vente.
-			</text>
-			<text length="1" name="Selling with no objects in parcel." type="string">
-				Objets non inclus dans la vente.
-			</text>
-			<button label="Annuler la vente du terrain" label_selected="Annuler la vente du terrain" name="Cancel Land Sale" width="165" left="275"/>
-			<text length="1" name="Claimed:" type="string">
-				Acquis :
-			</text>
-			<text length="1" name="DateClaimText" type="string">
-				Tue Aug 15 13:47:25 2006
-			</text>
-			<text length="1" name="PriceLabel" type="string">
-				Surface :
-			</text>
-			<text length="1" name="PriceText" type="string">
-				4048 m²
-			</text>
-			<text length="1" name="Traffic:" type="string">
-				Trafic :
-			</text>
-			<text length="1" name="DwellText" type="string">
-				0
-			</text>
-			<button label="Acheter le terrain..." label_selected="Acheter le terrain..." name="Buy Land..." width="125" left="130"/>
-			<button label="Acheter pour le groupe..." label_selected="Acheter pour le groupe..." name="Buy For Group..."/>
-			<button label="Acheter un pass..." label_selected="Acheter un pass..." name="Buy Pass..." tool_tip="Un pass vous donne un accès temporaire à ce terrain." width="125" left="130"/>
-			<button label="Abandonner le terrain..." label_selected="Abandonner le terrain..." name="Abandon Land..."/>
-			<button label="Redemander le terrain..." label_selected="Redemander le terrain…" name="Reclaim Land..."/>
-			<button label="Vente Linden..." label_selected="Vente Linden..." name="Linden Sale..." tool_tip="Le terrain doit être la propriété d&apos;un résident, avoir un contenu défini et ne pas être aux enchères."/>
-			<string name="new users only">
-				Nouveaux utilisateurs uniquement
-			</string>
-			<string name="anyone">
-				Tout le monde
-			</string>
-			<string name="area_text">
-				Surface
-			</string>
-			<string name="area_size_text">
-				[AREA] m²
-			</string>
-			<string name="auction_id_text">
-				Code de l&apos;enchère : [ID]
-			</string>
-			<string name="need_tier_to_modify">
-				Pour modifier ce terrain, vous devez approuver votre achat.
-			</string>
-			<string name="group_owned_text">
-				(propriété du groupe)
-			</string>
-			<string name="profile_text">
-				Profil...
-			</string>
-			<string name="info_text">
-				Infos...
-			</string>
-			<string name="public_text">
-				(public)
-			</string>
-			<string name="none_text">
-				(aucun)
-			</string>
-			<string name="sale_pending_text">
-				(vente en cours)
-			</string>
-			<string name="no_selection_text">
-				Aucune parcelle sélectionnée.
-Allez dans le menu Monde &gt; À propos du terrain ou sélectionnez une autre parcelle pour en afficher les détails.
-			</string>
-		</panel>
-		<panel label="Règlement" name="land_covenant_panel">
-			<text length="1" name="covenant_timestamp_text" type="string">
-				Last Modified Wed Dec 31 16:00:00 1969
-			</text>
-			<text length="1" name="region_name_lbl" type="string">
-				Région :
-			</text>
-			<text length="1" name="region_name_text" type="string">
-				leyla
-			</text>
-			<text length="1" name="estate_name_lbl" type="string">
-				Domaine :
-			</text>
-			<text length="1" name="estate_name_text" type="string">
-				continent
-			</text>
-			<text length="1" name="estate_owner_lbl" type="string">
-				Propriétaire :
-			</text>
-			<text length="1" name="estate_owner_text" type="string">
-				(aucun)
-			</text>
-			<text length="1" name="resellable_clause" type="string">
-				Le terrain acheté dans cette région ne peut être revendu.
-			</text>
-			<text length="1" name="changeable_clause" type="string">
-				Le terrain acheté dans cette région ne peut être revendu/divisé.
-			</text>
-			<text_editor length="1" name="covenant_editor" type="string">
-				Il n&apos;y a aucun règlement pour ce domaine.
-			</text_editor>
-			<string name="can_resell">
-				Le terrain acheté dans cette région peut être revendu.
-			</string>
-			<string name="can_not_resell">
-				Le terrain acheté dans cette région ne peut pas être revendu.
-			</string>
-			<string name="can_change">
-				Le terrain acheté dans cette région peut être fusionné ou divisé.
-			</string>
-			<string name="can_not_change">
-				Le terrain acheté dans cette région ne peut pas être fusionné ou divisé.
-			</string>
-		</panel>
-		<panel label="Objets" name="land_objects_panel">
-			<text name="parcel_object_bonus">
-				Facteur Bonus Objets : [BONUS]
-			</text>
-			<text length="1" name="Simulator primitive usage:" type="string">
-				Prims utilisées sur la parcelle :
-			</text>
-			<text name="objects_available" left="214" width="230">
-				[COUNT] sur [MAX] ([AVAILABLE] disponibles)
-			</text>
-			<string name="objects_available_text">
-				[COUNT] sur [MAX] ([AVAILABLE] disponibles)
-			</string>
-			<string name="objects_deleted_text">
-				[COUNT] sur [MAX] ([DELETED] seront supprimés)
-			</string>
-			<text length="1" name="Primitives parcel supports:" type="string" width="200">
-				Prims max. sur la parcelle :
-			</text>
-			<text length="1" name="object_contrib_text" type="string" left="214" width="152">
-				[COUNT]
-			</text>
-			<text length="1" name="Primitives on parcel:" type="string">
-				Prims sur la parcelle :
-			</text>
-			<text length="1" name="total_objects_text" type="string" left="214" width="48">
-				[COUNT]
-			</text>
-			<text length="1" name="Owned by parcel owner:" type="string" left="14" width="180">
-				Appartenant au propriétaire :
-			</text>
-			<text length="1" name="owner_objects_text" type="string" left="214" width="48">
-				[COUNT]
-			</text>
-			<button label="Afficher" label_selected="Afficher" name="ShowOwner" right="-135" width="60"/>
-			<button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnOwner..." tool_tip="Renvoyer les objets à leurs propriétaires." right="-10" width="119"/>
-			<text length="1" name="Set to group:" type="string" left="14" width="180">
-				Donnés au groupe :
-			</text>
-			<text length="1" name="group_objects_text" type="string" left="214" width="48">
-				[COUNT]
-			</text>
-			<button label="Afficher" label_selected="Afficher" name="ShowGroup" width="60" right="-135"/>
-			<button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnGroup..." tool_tip="Renvoyer les objets à leurs propriétaires." right="-10" width="119"/>
-			<text length="1" name="Owned by others:" type="string" left="14" width="128">
-				Appartenant à d&apos;autres :
-			</text>
-			<text length="1" name="other_objects_text" type="string" left="214" width="48">
-				[COUNT]
-			</text>
-			<button label="Afficher" label_selected="Afficher" name="ShowOther" right="-135" width="60"/>
-			<button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnOther..." tool_tip="Renvoyer les objets à leurs propriétaires."  right="-10" width="119"/>
-			<text length="1" name="Selected / sat upon:" type="string" left="14" width="193">
-				Sélectionnés/où quelqu&apos;un est assis :
-			</text>
-			<text length="1" name="selected_objects_text" type="string" left="214" width="48">
-				[COUNT]
-			</text>
-			<text name="Autoreturn" width="412" left="4">
-				Renvoi automatique des objets d&apos;autres résidents (minutes, 0 pour désactiver) :
-			</text>
-			<line_editor name="clean other time" right="-6" width="36" />
-			<text length="1" name="Object Owners:" type="string">
-				Propriétaires :
-			</text>
-			<button label="Rafraîchir" label_selected="Rafraîchir" name="Refresh List"/>
-			<button label="Renvoyer les objets..." label_selected="Renvoyer les objets..." name="Return objects..."/>
-			<name_list label="Plus récents" name="owner list">
-				<column label="Type" name="type"/>
-				<column name="online_status"/>
-				<column label="Nom" name="name"/>
-				<column label="Nombre" name="count"/>
-				<column label="Plus récents" name="mostrecent"/>
-			</name_list>
-		</panel>
-		<panel label="Options" name="land_options_panel">
-			<text length="1" name="allow_label" type="string">
-				Autoriser les autres résidents à :
-			</text>
-			<check_box label="Modifier le terrain" name="edit land check" tool_tip="Si cette option est cochée, n&apos;importe qui peut terraformer votre terrain. Il vaut mieux ne pas cocher cette option pour toujours pouvoir modifer votre propre terrain."/>
-			<check_box label="Créer des repères" name="check landmark"/>
-			<check_box label="Voler" name="check fly" tool_tip="Si cette option est cochée, les résidents peuvent voler sur votre terrain. Si elle n&apos;est pas cochée, ils ne pourront voler que lorsqu&apos;ils arrivent et passent au dessus de votre terrain."/>
-			<text name="allow_label2" left="152">
-				Créer des objets :
-			</text>
-			<check_box label="Tous les résidents" name="edit objects check" left="285"/>
-			<check_box label="Groupe" name="edit group objects check" left="395"/>
-			<text name="allow_label3" left="152" width="134">
-				Laisser entrer des objets :
-			</text>
-			<check_box label="Tous les résidents" name="all object entry check" left="285"/>
-			<check_box label="Groupe" name="group object entry check" left="395"/>
-			<text name="allow_label4" left="152">
-				Exécuter des scripts :
-			</text>
-			<check_box label="Tous les résidents" name="check other scripts" left="285"/>
-			<check_box label="Groupe" name="check group scripts" left="395"/>
-			<text length="1" name="land_options_label" type="string">
-				Options du terrain :
-			</text>
-			<check_box label="Sécurisé (pas de dégâts)" name="check safe" tool_tip="Si cette option est cochée, le terrain est sécurisé et il n&apos;y pas de risques de dommages causés par des combats. Si elle est décochée, des dommages causés par les combats peuvent avoir lieu."/>
-			<check_box label="Pas de bousculades" left="14" bottom="-140"
-				name="PushRestrictCheck" tool_tip="Empêche l&apos;utilisation de scripts causant des bousculades. Cette option est utile pour empêcher les comportements abusifs sur votre terrain."/>
-			<check_box label="Afficher dans la recherche (30 L$/semaine) sous" name="ShowDirectoryCheck" tool_tip="Afficher la parcelle dans les résultats de recherche" bottom="-160"/>
-			<combo_box name="land category" left="286" width="146" bottom="-160">
-				<combo_item name="AnyCategory">
-					Toutes catégories
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Appartenant aux Lindens
-				</combo_item>
-
-
-				<combo_item name="Arts&amp;Culture">
-					Art et Culture
-				</combo_item>
-				<combo_item name="Business">
-					Affaires
-				</combo_item>
-				<combo_item name="Educational">
-					Éducation
-				</combo_item>
-				<combo_item name="Gaming">
-					Jeux
-				</combo_item>
-				<combo_item name="Hangout">
-					Favoris
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Accueil pour les nouveaux
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parcs et Nature
-				</combo_item>
-				<combo_item name="Residential">
-					Résidentiel
-				</combo_item>
-				<combo_item name="Shopping">
-					Shopping
-				</combo_item>
-				<combo_item name="Other">
-					Autre
-				</combo_item>
-			</combo_box>
-			<button label="?" label_selected="?" name="?" left="436" bottom="-160"/>
-			<check_box name="MatureCheck" bottom="-180"/>
-			<text length="1" name="Snapshot:" type="string" bottom="-200">
-				Photo :
-			</text>
-			<texture_picker label="" name="snapshot_ctrl" tool_tip="Cliquez pour sélectionner une image" bottom="-319"/>
-			<text name="landing_point" bottom="-323">
-				Lieu d&apos;arrivée : [LANDING]
-			</text>
-			<string name="landing_point_none">
-				(aucun)
-			</string>
-			<button label="Définir" label_selected="Définir" name="Set" tool_tip="Définit le point d&apos;arrivée des visiteurs. Définit l&apos;emplacement de votre avatar sur ce terrain." bottom="-323"/>
-			<button label="Annuler" label_selected="Annuler" name="Clear" tool_tip="Libérer le lieu d&apos;arrivée." bottom="-323"/>
-			<text length="1" name="Teleport Routing: " type="string" bottom="-343">
-				Règles de téléportation :
-			</text>
-			<combo_box name="landing type" tool_tip="Vous permet de paramétrer les téléportations sur votre terrain." left="140" width="140" bottom="-343">
-				<combo_item length="1" name="Blocked" type="string">
-					Bloqué
-				</combo_item>
-				<combo_item length="1" name="LandingPoint" type="string">
-					Lieu d&apos;arrivée fixe
-				</combo_item>
-				<combo_item length="1" name="Anywhere" type="string">
-					Lieu d&apos;arrivée libre
-				</combo_item>
-			</combo_box>
-			<string name="push_restrict_text">
-				Pas de bousculades
-			</string>
-			<string name="push_restrict_region_text">
-				Pas de bousculades (les règles de la région priment)
-			</string>
-		</panel>
-		<panel label="Médias" name="land_media_panel">
-			<text name="with media:" width="85">
-				Type de média :
-			</text>
-			<combo_box name="media type" tool_tip="Indiquez s&apos;il s&apos;agit de l&apos;URL d&apos;un film, d&apos;une page web ou autre" left="97"/>
-			<text name="mime_type"/>
-			<text name="at URL:" width="85">
-				URL du média :
-			</text>
-			<line_editor name="media_url" left="97"/>
-			<button label="Définir..." label_selected="Définir..." name="set_media_url"/>
-			<text name="Description:">
-				Description :
-			</text>
-			<line_editor name="url_description" tool_tip="Texte affiché à côté du bouton Jouer/Charger" left="97"/>
-			<text length="1" name="Media texture:" type="string">
-				Remplacer
-la texture :
-			</text>
-			<texture_picker label="" name="media texture" tool_tip="Cliquez pour sélectionner une image" left="97"/>
-			<text name="replace_texture_help">
-				(Les objets avec cette texture affichent le film ou 
-la page web quand vous cliquez sur la flèche Jouer.)
-			</text>
-			<text name="Options:">
-				Options
-média :
-			</text>
-			<check_box left="97" label="Échelle automatique" name="media_auto_scale" tool_tip="Si vous sélectionnez cette option, le contenu de cette parcelle sera automatiquement mis à l&apos;échelle. La qualité visuelle sera peut-être amoindrie mais vous n&apos;aurez à faire aucune autre mise à l&apos;échelle ou alignement."/>
-			<check_box label="Média en boucle" name="media_loop" tool_tip="Jouer le média en boucle. Lorsque le média aura fini de jouer, il recommencera."/>
-			<check_box left="97" label="Masquer l&apos;URL du média" name="hide_media_url" tool_tip="Si vous cochez cette option, les personnes non autorisées à accéder aux infos de cette parcelle ne verront pas l&apos;URL du média. Cette option n&apos;est pas disponible pour les fichiers HTML."/>
-			<check_box label="Masquer l&apos;URL de la musique" name="hide_music_url" tool_tip="Si vous cochez cette option, les personnes non autorisées à accéder aux infos de cette parcelle ne verront pas l&apos;URL de la musique."/>
-			<text name="media_size" tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut." width="105" left="102">
-				Taille du média :
-			</text>
-			<spinner name="media_size_width" tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut." left_delta="89"/>
-			<spinner name="media_size_height" tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut."/>
-			<text name="pixels">
-				pixels
-			</text>
-			<text name="MusicURL:" bottom_delta="-28">
-				URL de la
-musique :
-			</text>
-			<line_editor name="music_url" left="97" bottom_delta="-12"/>
-			<text name="Sound:">
-				Son :
-			</text>
-			<check_box label="Limiter le son ambiant à cette parcelle" name="check sound local" left="97" />
-			<text name="Voice settings:">
-				Voix :
-			</text>
-			<radio_group name="parcel_voice_channel" left="97" width="310">
-				<radio_item name="Estate">
-					Utiliser le canal du domaine
-				</radio_item>
-				<radio_item name="Private">
-					Utiliser un canal privé
-				</radio_item>
-				<radio_item name="Disabled">
-					Désactiver les canaux audios
-				</radio_item>
-			</radio_group>
-		</panel>
-		<panel label="Accès" name="land_access_panel">
-			<text length="1" name="Limit access to this parcel to:" type="string">
-				Accès à cette parcelle
-			</text>
-			<check_box label="Autoriser l&apos;accès public" name="public_access"/>
-			<text name="Only Allow">
-				Bloquer l&apos;accès aux résidents :
-			</text>
-			<check_box label="Qui n&apos;ont pas fourni leurs informations de paiement à Linden Lab" name="limit_payment" tool_tip="Aux résidents non identifés"/>
-			<check_box label="Dont l&apos;âge n&apos;a pas été vérifié" name="limit_age_verified" tool_tip="Aux résidents dont l&apos;âge n&apos;a pas été vérifié. Pour plus d&apos;infos, consultez la page support.secondlife.com."/>
-			<string name="estate_override">
-				Au moins une de ces options est définie au niveau du domaine.
-			</string>
-			<check_box label="Autoriser l&apos;accès au groupe : [GROUP]" name="GroupCheck" tool_tip="Définir le groupe à l&apos;onglet Général."/>
-			<check_box label="Vendre des pass à :" name="PassCheck" tool_tip="Autoriser un accès temporaire à cette parcelle"/>
-			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Tout le monde
-				</combo_item>
-				<combo_item name="Group">
-					Groupe
-				</combo_item>
-			</combo_box>
-			<spinner label="Prix en L$ :" name="PriceSpin"/>
-			<spinner label="Durée en heures :" name="HoursSpin"/>
-			<text label="Toujours autoriser" name="AllowedText">
-				Résidents autorisés
-			</text>
-			<name_list name="AccessList" tool_tip="([LISTED] listés, [MAX] max)"/>
-			<button label="Ajouter..." label_selected="Ajouter..." name="add_allowed"/>
-			<button label="Supprimer" label_selected="Supprimer" name="remove_allowed"/>
-			<text label="Bannir" name="BanCheck">
-				Résidents bannis
-			</text>
-			<name_list name="BannedList" tool_tip="([LISTED] listés, [MAX] max)"/>
-			<button label="Ajouter..." label_selected="Ajouter..." name="add_banned"/>
-			<button label="Supprimer" label_selected="Supprimer" name="remove_banned"/>
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floaterland" title="À propos du terrain">
+	<tab_container name="landtab">
+		<panel label="Général" name="land_general_panel">
+			<text length="1" name="Name:" type="string">
+				Nom :
+			</text>
+			<line_editor name="Name"/>
+			<text length="1" name="Description:" type="string">
+				Description :
+			</text>
+			<text_editor name="Description"/>
+			<text length="1" name="Owner:" type="string">
+				Propriétaire :
+			</text>
+			<text length="1" name="OwnerText" type="string">
+				Leyla Linden
+			</text>
+			<button label="Profil..." label_selected="Profil..." name="Profile..."/>
+			<text length="1" name="Group:" type="string">
+				Groupe :
+			</text>
+			<text name="GroupText"/>
+			<button label="Définir..." label_selected="Définir..." name="Set..."/>
+			<check_box label="Autoriser la cession au groupe" name="check deed" tool_tip="Un officier peut céder ce terrain au groupe. Il viendra alors s&apos;ajouter au patrimoine du groupe."/>
+			<button label="Céder..." label_selected="Céder..." name="Deed..." tool_tip="Vous ne pouvez céder le terrain que si vous avez un rôle d&apos;officier dans le groupe sélectionné."/>
+			<check_box label="Le propriétaire contribue en cédant du terrain" name="check contrib" tool_tip="Lorsqu&apos;un terrain est cédé au groupe, l&apos;ancien propriétaire fait également un don de terrain suffisant."/>
+			<text length="1" name="For Sale:" type="string">
+				À vendre :
+			</text>
+			<text length="1" name="Not for sale." type="string">
+				Pas à vendre
+			</text>
+			<text length="1" name="For Sale: Price L$[PRICE]." type="string">
+				Prix : [PRICE] L$ ([PRICE_PER_SQM] L$/m²).
+			</text>
+			<text name="SalePending"/>
+			<button label="Vendre le terrain..." label_selected="Vendre le terrain..." name="Sell Land..."/>
+			<text length="1" name="For sale to" type="string">
+				À vendre à : [BUYER]
+			</text>
+			<text length="1" name="Sell with landowners objects in parcel." type="string">
+				Objets inclus dans la vente.
+			</text>
+			<text length="1" name="Selling with no objects in parcel." type="string">
+				Objets non inclus dans la vente.
+			</text>
+			<button label="Annuler la vente du terrain" label_selected="Annuler la vente du terrain" name="Cancel Land Sale" width="165" left="275"/>
+			<text length="1" name="Claimed:" type="string">
+				Acquis :
+			</text>
+			<text length="1" name="DateClaimText" type="string">
+				Tue Aug 15 13:47:25 2006
+			</text>
+			<text length="1" name="PriceLabel" type="string">
+				Surface :
+			</text>
+			<text length="1" name="PriceText" type="string">
+				4048 m²
+			</text>
+			<text length="1" name="Traffic:" type="string">
+				Trafic :
+			</text>
+			<text length="1" name="DwellText" type="string">
+				0
+			</text>
+			<button label="Acheter le terrain..." label_selected="Acheter le terrain..." name="Buy Land..." width="125" left="130"/>
+			<button label="Acheter pour le groupe..." label_selected="Acheter pour le groupe..." name="Buy For Group..."/>
+			<button label="Acheter un pass..." label_selected="Acheter un pass..." name="Buy Pass..." tool_tip="Un pass vous donne un accès temporaire à ce terrain." width="125" left="130"/>
+			<button label="Abandonner le terrain..." label_selected="Abandonner le terrain..." name="Abandon Land..."/>
+			<button label="Redemander le terrain..." label_selected="Redemander le terrain…" name="Reclaim Land..."/>
+			<button label="Vente Linden..." label_selected="Vente Linden..." name="Linden Sale..." tool_tip="Le terrain doit être la propriété d&apos;un résident, avoir un contenu défini et ne pas être aux enchères."/>
+			<string name="new users only">
+				Nouveaux utilisateurs uniquement
+			</string>
+			<string name="anyone">
+				Tout le monde
+			</string>
+			<string name="area_text">
+				Surface
+			</string>
+			<string name="area_size_text">
+				[AREA] m²
+			</string>
+			<string name="auction_id_text">
+				Code de l&apos;enchère : [ID]
+			</string>
+			<string name="need_tier_to_modify">
+				Pour modifier ce terrain, vous devez approuver votre achat.
+			</string>
+			<string name="group_owned_text">
+				(propriété du groupe)
+			</string>
+			<string name="profile_text">
+				Profil...
+			</string>
+			<string name="info_text">
+				Infos...
+			</string>
+			<string name="public_text">
+				(public)
+			</string>
+			<string name="none_text">
+				(aucun)
+			</string>
+			<string name="sale_pending_text">
+				(vente en cours)
+			</string>
+			<string name="no_selection_text">
+				Aucune parcelle sélectionnée.
+Allez dans le menu Monde &gt; À propos du terrain ou sélectionnez une autre parcelle pour en afficher les détails.
+			</string>
+		</panel>
+		<panel label="Règlement" name="land_covenant_panel">
+			<text length="1" name="covenant_timestamp_text" type="string">
+				Last Modified Wed Dec 31 16:00:00 1969
+			</text>
+			<text length="1" name="region_name_lbl" type="string">
+				Région :
+			</text>
+			<text length="1" name="region_name_text" type="string">
+				leyla
+			</text>
+			<text length="1" name="estate_name_lbl" type="string">
+				Domaine :
+			</text>
+			<text length="1" name="estate_name_text" type="string">
+				continent
+			</text>
+			<text length="1" name="estate_owner_lbl" type="string">
+				Propriétaire :
+			</text>
+			<text length="1" name="estate_owner_text" type="string">
+				(aucun)
+			</text>
+			<text length="1" name="resellable_clause" type="string">
+				Le terrain acheté dans cette région ne peut être revendu.
+			</text>
+			<text length="1" name="changeable_clause" type="string">
+				Le terrain acheté dans cette région ne peut être revendu/divisé.
+			</text>
+			<text_editor length="1" name="covenant_editor" type="string">
+				Il n&apos;y a aucun règlement pour ce domaine.
+			</text_editor>
+			<string name="can_resell">
+				Le terrain acheté dans cette région peut être revendu.
+			</string>
+			<string name="can_not_resell">
+				Le terrain acheté dans cette région ne peut pas être revendu.
+			</string>
+			<string name="can_change">
+				Le terrain acheté dans cette région peut être fusionné ou divisé.
+			</string>
+			<string name="can_not_change">
+				Le terrain acheté dans cette région ne peut pas être fusionné ou divisé.
+			</string>
+		</panel>
+		<panel label="Objets" name="land_objects_panel">
+			<text name="parcel_object_bonus">
+				Facteur Bonus Objets : [BONUS]
+			</text>
+			<text length="1" name="Simulator primitive usage:" type="string">
+				Prims utilisées sur la parcelle :
+			</text>
+			<text name="objects_available" left="214" width="230">
+				[COUNT] sur [MAX] ([AVAILABLE] disponibles)
+			</text>
+			<string name="objects_available_text">
+				[COUNT] sur [MAX] ([AVAILABLE] disponibles)
+			</string>
+			<string name="objects_deleted_text">
+				[COUNT] sur [MAX] ([DELETED] seront supprimés)
+			</string>
+			<text length="1" name="Primitives parcel supports:" type="string" width="200">
+				Prims max. sur la parcelle :
+			</text>
+			<text length="1" name="object_contrib_text" type="string" left="214" width="152">
+				[COUNT]
+			</text>
+			<text length="1" name="Primitives on parcel:" type="string">
+				Prims sur la parcelle :
+			</text>
+			<text length="1" name="total_objects_text" type="string" left="214" width="48">
+				[COUNT]
+			</text>
+			<text length="1" name="Owned by parcel owner:" type="string" left="14" width="180">
+				Appartenant au propriétaire :
+			</text>
+			<text length="1" name="owner_objects_text" type="string" left="214" width="48">
+				[COUNT]
+			</text>
+			<button label="Afficher" label_selected="Afficher" name="ShowOwner" right="-135" width="60"/>
+			<button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnOwner..." tool_tip="Renvoyer les objets à leurs propriétaires." right="-10" width="119"/>
+			<text length="1" name="Set to group:" type="string" left="14" width="180">
+				Donnés au groupe :
+			</text>
+			<text length="1" name="group_objects_text" type="string" left="214" width="48">
+				[COUNT]
+			</text>
+			<button label="Afficher" label_selected="Afficher" name="ShowGroup" width="60" right="-135"/>
+			<button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnGroup..." tool_tip="Renvoyer les objets à leurs propriétaires." right="-10" width="119"/>
+			<text length="1" name="Owned by others:" type="string" left="14" width="128">
+				Appartenant à d&apos;autres :
+			</text>
+			<text length="1" name="other_objects_text" type="string" left="214" width="48">
+				[COUNT]
+			</text>
+			<button label="Afficher" label_selected="Afficher" name="ShowOther" right="-135" width="60"/>
+			<button label="Renvoyer..." label_selected="Renvoyer..." name="ReturnOther..." tool_tip="Renvoyer les objets à leurs propriétaires."  right="-10" width="119"/>
+			<text length="1" name="Selected / sat upon:" type="string" left="14" width="193">
+				Sélectionnés/où quelqu&apos;un est assis :
+			</text>
+			<text length="1" name="selected_objects_text" type="string" left="214" width="48">
+				[COUNT]
+			</text>
+			<text name="Autoreturn" width="412" left="4">
+				Renvoi automatique des objets d&apos;autres résidents (minutes, 0 pour désactiver) :
+			</text>
+			<line_editor name="clean other time" right="-6" width="36" />
+			<text length="1" name="Object Owners:" type="string">
+				Propriétaires :
+			</text>
+			<button label="Rafraîchir" label_selected="Rafraîchir" name="Refresh List"/>
+			<button label="Renvoyer les objets..." label_selected="Renvoyer les objets..." name="Return objects..."/>
+			<name_list label="Plus récents" name="owner list">
+				<column label="Type" name="type"/>
+				<column name="online_status"/>
+				<column label="Nom" name="name"/>
+				<column label="Nombre" name="count"/>
+				<column label="Plus récents" name="mostrecent"/>
+			</name_list>
+		</panel>
+		<panel label="Options" name="land_options_panel">
+			<text length="1" name="allow_label" type="string">
+				Autoriser les autres résidents à :
+			</text>
+			<check_box label="Modifier le terrain" name="edit land check" tool_tip="Si cette option est cochée, n&apos;importe qui peut terraformer votre terrain. Il vaut mieux ne pas cocher cette option pour toujours pouvoir modifer votre propre terrain."/>
+			<check_box label="Créer des repères" name="check landmark"/>
+			<check_box label="Voler" name="check fly" tool_tip="Si cette option est cochée, les résidents peuvent voler sur votre terrain. Si elle n&apos;est pas cochée, ils ne pourront voler que lorsqu&apos;ils arrivent et passent au dessus de votre terrain."/>
+			<text name="allow_label2" left="152">
+				Créer des objets :
+			</text>
+			<check_box label="Tous les résidents" name="edit objects check" left="285"/>
+			<check_box label="Groupe" name="edit group objects check" left="395"/>
+			<text name="allow_label3" left="152" width="134">
+				Laisser entrer des objets :
+			</text>
+			<check_box label="Tous les résidents" name="all object entry check" left="285"/>
+			<check_box label="Groupe" name="group object entry check" left="395"/>
+			<text name="allow_label4" left="152">
+				Exécuter des scripts :
+			</text>
+			<check_box label="Tous les résidents" name="check other scripts" left="285"/>
+			<check_box label="Groupe" name="check group scripts" left="395"/>
+			<text length="1" name="land_options_label" type="string">
+				Options du terrain :
+			</text>
+			<check_box label="Sécurisé (pas de dégâts)" name="check safe" tool_tip="Si cette option est cochée, le terrain est sécurisé et il n&apos;y pas de risques de dommages causés par des combats. Si elle est décochée, des dommages causés par les combats peuvent avoir lieu."/>
+			<check_box label="Pas de bousculades" left="14" bottom="-140"
+				name="PushRestrictCheck" tool_tip="Empêche l&apos;utilisation de scripts causant des bousculades. Cette option est utile pour empêcher les comportements abusifs sur votre terrain."/>
+			<check_box label="Afficher dans la recherche (30 L$/semaine) sous" name="ShowDirectoryCheck" tool_tip="Afficher la parcelle dans les résultats de recherche" bottom="-160"/>
+			<combo_box name="land category" left="286" width="146" bottom="-160">
+				<combo_item name="AnyCategory">
+					Toutes catégories
+				</combo_item>
+				<combo_item name="LindenLocation">
+					Appartenant aux Lindens
+				</combo_item>
+
+
+				<combo_item name="Arts&amp;Culture">
+					Art et Culture
+				</combo_item>
+				<combo_item name="Business">
+					Affaires
+				</combo_item>
+				<combo_item name="Educational">
+					Éducation
+				</combo_item>
+				<combo_item name="Gaming">
+					Jeux
+				</combo_item>
+				<combo_item name="Hangout">
+					Favoris
+				</combo_item>
+				<combo_item name="NewcomerFriendly">
+					Accueil pour les nouveaux
+				</combo_item>
+				<combo_item name="Parks&amp;Nature">
+					Parcs et Nature
+				</combo_item>
+				<combo_item name="Residential">
+					Résidentiel
+				</combo_item>
+				<combo_item name="Shopping">
+					Shopping
+				</combo_item>
+				<combo_item name="Other">
+					Autre
+				</combo_item>
+			</combo_box>
+			<button label="?" label_selected="?" name="?" left="436" bottom="-160"/>
+			<check_box name="MatureCheck" bottom="-180"/>
+			<text length="1" name="Snapshot:" type="string" bottom="-200">
+				Photo :
+			</text>
+			<texture_picker label="" name="snapshot_ctrl" tool_tip="Cliquez pour sélectionner une image" bottom="-319"/>
+			<text name="landing_point" bottom="-323">
+				Lieu d&apos;arrivée : [LANDING]
+			</text>
+			<string name="landing_point_none">
+				(aucun)
+			</string>
+			<button label="Définir" label_selected="Définir" name="Set" tool_tip="Définit le point d&apos;arrivée des visiteurs. Définit l&apos;emplacement de votre avatar sur ce terrain." bottom="-323"/>
+			<button label="Annuler" label_selected="Annuler" name="Clear" tool_tip="Libérer le lieu d&apos;arrivée." bottom="-323"/>
+			<text length="1" name="Teleport Routing: " type="string" bottom="-343">
+				Règles de téléportation :
+			</text>
+			<combo_box name="landing type" tool_tip="Vous permet de paramétrer les téléportations sur votre terrain." left="140" width="140" bottom="-343">
+				<combo_item length="1" name="Blocked" type="string">
+					Bloqué
+				</combo_item>
+				<combo_item length="1" name="LandingPoint" type="string">
+					Lieu d&apos;arrivée fixe
+				</combo_item>
+				<combo_item length="1" name="Anywhere" type="string">
+					Lieu d&apos;arrivée libre
+				</combo_item>
+			</combo_box>
+			<string name="push_restrict_text">
+				Pas de bousculades
+			</string>
+			<string name="push_restrict_region_text">
+				Pas de bousculades (les règles de la région priment)
+			</string>
+		</panel>
+		<panel label="Médias" name="land_media_panel">
+			<text name="with media:" width="85">
+				Type de média :
+			</text>
+			<combo_box name="media type" tool_tip="Indiquez s&apos;il s&apos;agit de l&apos;URL d&apos;un film, d&apos;une page web ou autre" left="97"/>
+			<text name="mime_type"/>
+			<text name="at URL:" width="85">
+				URL du média :
+			</text>
+			<line_editor name="media_url" left="97"/>
+			<button label="Définir..." label_selected="Définir..." name="set_media_url"/>
+			<text name="Description:">
+				Description :
+			</text>
+			<line_editor name="url_description" tool_tip="Texte affiché à côté du bouton Jouer/Charger" left="97"/>
+			<text length="1" name="Media texture:" type="string">
+				Remplacer
+la texture :
+			</text>
+			<texture_picker label="" name="media texture" tool_tip="Cliquez pour sélectionner une image" left="97"/>
+			<text name="replace_texture_help">
+				(Les objets avec cette texture affichent le film ou 
+la page web quand vous cliquez sur la flèche Jouer.)
+			</text>
+			<text name="Options:">
+				Options
+média :
+			</text>
+			<check_box left="97" label="Échelle automatique" name="media_auto_scale" tool_tip="Si vous sélectionnez cette option, le contenu de cette parcelle sera automatiquement mis à l&apos;échelle. La qualité visuelle sera peut-être amoindrie mais vous n&apos;aurez à faire aucune autre mise à l&apos;échelle ou alignement."/>
+			<check_box label="Média en boucle" name="media_loop" tool_tip="Jouer le média en boucle. Lorsque le média aura fini de jouer, il recommencera."/>
+			<check_box left="97" label="Masquer l&apos;URL du média" name="hide_media_url" tool_tip="Si vous cochez cette option, les personnes non autorisées à accéder aux infos de cette parcelle ne verront pas l&apos;URL du média. Cette option n&apos;est pas disponible pour les fichiers HTML."/>
+			<check_box label="Masquer l&apos;URL de la musique" name="hide_music_url" tool_tip="Si vous cochez cette option, les personnes non autorisées à accéder aux infos de cette parcelle ne verront pas l&apos;URL de la musique."/>
+			<text name="media_size" tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut." width="105" left="102">
+				Taille du média :
+			</text>
+			<spinner name="media_size_width" tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut." left_delta="89"/>
+			<spinner name="media_size_height" tool_tip="Taille du média Web, laisser 0 pour la valeur par défaut."/>
+			<text name="pixels">
+				pixels
+			</text>
+			<text name="MusicURL:" bottom_delta="-28">
+				URL de la
+musique :
+			</text>
+			<line_editor name="music_url" left="97" bottom_delta="-12"/>
+			<text name="Sound:">
+				Son :
+			</text>
+			<check_box label="Limiter le son ambiant à cette parcelle" name="check sound local" left="97" />
+			<text name="Voice settings:">
+				Voix :
+			</text>
+			<radio_group name="parcel_voice_channel" left="97" width="310">
+				<radio_item name="Estate">
+					Utiliser le canal du domaine
+				</radio_item>
+				<radio_item name="Private">
+					Utiliser un canal privé
+				</radio_item>
+				<radio_item name="Disabled">
+					Désactiver les canaux audios
+				</radio_item>
+			</radio_group>
+		</panel>
+		<panel label="Accès" name="land_access_panel">
+			<text length="1" name="Limit access to this parcel to:" type="string">
+				Accès à cette parcelle
+			</text>
+			<check_box label="Autoriser l&apos;accès public" name="public_access"/>
+			<text name="Only Allow">
+				Bloquer l&apos;accès aux résidents :
+			</text>
+			<check_box label="Qui n&apos;ont pas fourni leurs informations de paiement à Linden Lab" name="limit_payment" tool_tip="Aux résidents non identifés"/>
+			<check_box label="Dont l&apos;âge n&apos;a pas été vérifié" name="limit_age_verified" tool_tip="Aux résidents dont l&apos;âge n&apos;a pas été vérifié. Pour plus d&apos;infos, consultez la page support.secondlife.com."/>
+			<string name="estate_override">
+				Au moins une de ces options est définie au niveau du domaine.
+			</string>
+			<check_box label="Autoriser l&apos;accès au groupe : [GROUP]" name="GroupCheck" tool_tip="Définir le groupe à l&apos;onglet Général."/>
+			<check_box label="Vendre des pass à :" name="PassCheck" tool_tip="Autoriser un accès temporaire à cette parcelle"/>
+			<combo_box name="pass_combo">
+				<combo_item name="Anyone">
+					Tout le monde
+				</combo_item>
+				<combo_item name="Group">
+					Groupe
+				</combo_item>
+			</combo_box>
+			<spinner label="Prix en L$ :" name="PriceSpin"/>
+			<spinner label="Durée en heures :" name="HoursSpin"/>
+			<text label="Toujours autoriser" name="AllowedText">
+				Résidents autorisés
+			</text>
+			<name_list name="AccessList" tool_tip="([LISTED] listés, [MAX] max)"/>
+			<button label="Ajouter..." label_selected="Ajouter..." name="add_allowed"/>
+			<button label="Supprimer" label_selected="Supprimer" name="remove_allowed"/>
+			<text label="Bannir" name="BanCheck">
+				Résidents bannis
+			</text>
+			<name_list name="BannedList" tool_tip="([LISTED] listés, [MAX] max)"/>
+			<button label="Ajouter..." label_selected="Ajouter..." name="add_banned"/>
+			<button label="Supprimer" label_selected="Supprimer" name="remove_banned"/>
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_animation_preview.xml b/indra/newview/skins/default/xui/fr/floater_animation_preview.xml
index 4af68a6cf4..a1c3ef35b3 100644
--- a/indra/newview/skins/default/xui/fr/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/fr/floater_animation_preview.xml
@@ -1,165 +1,165 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Animation Preview" title="">
-	<text name="name_label">
-		Nom :
-	</text>
-	<text name="description_label">
-		Description :
-	</text>
-	<spinner label="Priorité" name="priority" tool_tip="Contrôle quelles animations peuvent êtres écrasées par cette animation."/>
-	<text name="preview_label" width="110">
-		Prévisualiser pendant
-	</text>
-	<combo_box label="" name="preview_base_anim" tool_tip="Utilisez cette option pour tester votre animation pendant que votre avatar fait des choses banales." left_delta="116" width="124">
-		<combo_item name="Standing">
-			Debout
-		</combo_item>
-		<combo_item name="Walking">
-			En train de marcher
-		</combo_item>
-		<combo_item name="Sitting">
-			Assis
-		</combo_item>
-		<combo_item name="Flying">
-			En train de voler
-		</combo_item>
-	</combo_box>
-	<check_box  left="6" label="Boucle" name="loop_check" tool_tip="Joue cette animation en boucle."/>
-	<spinner left="76" label_width="55" width="105" label="Début (%)" name="loop_in_point" tool_tip="Définit le moment de l&apos;animation où la boucle repart."/>
-	<spinner left="195" label="Fin (%)" name="loop_out_point" tool_tip="Définit le moment de l&apos;animation où la boucle finit."/>
-	<text name="hand_label" width="110">
-		Mouvement de main
-	</text>
-	<combo_box label="" name="hand_pose_combo" tool_tip="Contrôle le mouvement des mains au cours de l&apos;animation" left_delta="116" width="124">
-		<combo_item name="Spread">
-			Doigts écartés
-		</combo_item>
-		<combo_item name="Relaxed">
-			Détendues
-		</combo_item>
-		<combo_item name="PointBoth">
-			Pointer (les deux)
-		</combo_item>
-		<combo_item name="Fist">
-			Poing
-		</combo_item>
-		<combo_item name="RelaxedLeft">
-			Détendue (gauche)
-		</combo_item>
-		<combo_item name="PointLeft">
-			Pointer (gauche)
-		</combo_item>
-		<combo_item name="FistLeft">
-			Poing (gauche)
-		</combo_item>
-		<combo_item name="RelaxedRight">
-			Détendue (droite)
-		</combo_item>
-		<combo_item name="PointRight">
-			Pointer (droite)
-		</combo_item>
-		<combo_item name="FistRight">
-			Poing (droite)
-		</combo_item>
-		<combo_item name="SaluteRight">
-			Saluer (droite)
-		</combo_item>
-		<combo_item name="Typing">
-			Taper
-		</combo_item>
-		<combo_item name="PeaceRight">
-			Paix (main droite)
-		</combo_item>
-	</combo_box>
-	<text name="emote_label">
-		Expression
-	</text>
-	<combo_box label="" name="emote_combo" tool_tip="Contrôle l&apos;expression du visage au cours de l&apos;animation." left_delta="116" width="124">
-		<combo_item name="[None]">
-			[None]
-		</combo_item>
-		<combo_item name="Aaaaah">
-			Aaaaah
-		</combo_item>
-		<combo_item name="Afraid">
-			Effrayé
-		</combo_item>
-		<combo_item name="Angry">
-			En colère
-		</combo_item>
-		<combo_item name="BigSmile">
-			Grand sourire
-		</combo_item>
-		<combo_item name="Bored">
-			Ennui
-		</combo_item>
-		<combo_item name="Cry">
-			Pleurer
-		</combo_item>
-		<combo_item name="Disdain">
-			Mépris
-		</combo_item>
-		<combo_item name="Embarrassed">
-			Gêne
-		</combo_item>
-		<combo_item name="Frown">
-			Froncer les sourcils
-		</combo_item>
-		<combo_item name="Kiss">
-			Embrasser
-		</combo_item>
-		<combo_item name="Laugh">
-			Rire
-		</combo_item>
-		<combo_item name="Plllppt">
-			Plllppt
-		</combo_item>
-		<combo_item name="Repulsed">
-			Dégoût
-		</combo_item>
-		<combo_item name="Sad">
-			Triste
-		</combo_item>
-		<combo_item name="Shrug">
-			Hausser les épaules
-		</combo_item>
-		<combo_item name="Smile">
-			Sourire
-		</combo_item>
-		<combo_item name="Surprise">
-			Surprise
-		</combo_item>
-		<combo_item name="Wink">
-			Clin d&apos;œil
-		</combo_item>
-		<combo_item name="Worry">
-			Soucis
-		</combo_item>
-	</combo_box>
-	<spinner label_width="65" label="Transition &#10;début (s)" name="ease_in_time" tool_tip="Durée (en secondes) pendant laquelle l&apos;animation s&apos;intègre au mouvement."/>
-	<spinner label_width="65" left="160" width="125" label="Transition &#10;fin (s)" name="ease_out_time" tool_tip="Durée (en secondes) pendant laquelle l&apos;animation disparaît du mouvement."/>
-	<button label="" name="play_btn" tool_tip="Jouer/Arrêter votre animation." bottom_delta="-48"/>
-	<button label="" name="stop_btn" tool_tip="Arrêter le playback"/>
-	<slider label="" name="playback_slider"/>
-	<text name="bad_animation_text">
-		Impossible de lire le fichier d&apos;animation.
-
-Nous recommandons les fichiers BVH extraits de
-Poser 4.
-	</text>
-	<button label="Annuler" name="cancel_btn"/>
-	<button label="Charger ([AMOUNT] L$)" name="ok_btn"/>
-	<string name="failed_to_initialize">
-		Echec de l&apos;initialisation du mouvement
-	</string>
-	<string name="anim_too_long">
-		Le fichier d&apos;animation fait [LENGTH] secondes.
-
-La longueur maximale est de [MAX_LENGTH] secondes.
-	</string>
-	<string name="failed_file_read">
-		Impossible de lire le fichier d&apos;animation.
-
-[STATUS]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Animation Preview" title="">
+	<text name="name_label">
+		Nom :
+	</text>
+	<text name="description_label">
+		Description :
+	</text>
+	<spinner label="Priorité" name="priority" tool_tip="Contrôle quelles animations peuvent êtres écrasées par cette animation."/>
+	<text name="preview_label" width="110">
+		Prévisualiser pendant
+	</text>
+	<combo_box label="" name="preview_base_anim" tool_tip="Utilisez cette option pour tester votre animation pendant que votre avatar fait des choses banales." left_delta="116" width="124">
+		<combo_box.item name="Standing">
+			Debout
+		</combo_box.item>
+		<combo_box.item name="Walking">
+			En train de marcher
+		</combo_box.item>
+		<combo_box.item name="Sitting">
+			Assis
+		</combo_box.item>
+		<combo_box.item name="Flying">
+			En train de voler
+		</combo_box.item>
+	</combo_box>
+	<check_box  left="6" label="Boucle" name="loop_check" tool_tip="Joue cette animation en boucle."/>
+	<spinner left="76" label_width="55" width="105" label="Début (%)" name="loop_in_point" tool_tip="Définit le moment de l&apos;animation où la boucle repart."/>
+	<spinner left="195" label="Fin (%)" name="loop_out_point" tool_tip="Définit le moment de l&apos;animation où la boucle finit."/>
+	<text name="hand_label" width="110">
+		Mouvement de main
+	</text>
+	<combo_box label="" name="hand_pose_combo" tool_tip="Contrôle le mouvement des mains au cours de l&apos;animation" left_delta="116" width="124">
+		<combo_box.item name="Spread">
+			Doigts écartés
+		</combo_box.item>
+		<combo_box.item name="Relaxed">
+			Détendues
+		</combo_box.item>
+		<combo_box.item name="PointBoth">
+			Pointer (les deux)
+		</combo_box.item>
+		<combo_box.item name="Fist">
+			Poing
+		</combo_box.item>
+		<combo_box.item name="RelaxedLeft">
+			Détendue (gauche)
+		</combo_box.item>
+		<combo_box.item name="PointLeft">
+			Pointer (gauche)
+		</combo_box.item>
+		<combo_box.item name="FistLeft">
+			Poing (gauche)
+		</combo_box.item>
+		<combo_box.item name="RelaxedRight">
+			Détendue (droite)
+		</combo_box.item>
+		<combo_box.item name="PointRight">
+			Pointer (droite)
+		</combo_box.item>
+		<combo_box.item name="FistRight">
+			Poing (droite)
+		</combo_box.item>
+		<combo_box.item name="SaluteRight">
+			Saluer (droite)
+		</combo_box.item>
+		<combo_box.item name="Typing">
+			Taper
+		</combo_box.item>
+		<combo_box.item name="PeaceRight">
+			Paix (main droite)
+		</combo_box.item>
+	</combo_box>
+	<text name="emote_label">
+		Expression
+	</text>
+	<combo_box label="" name="emote_combo" tool_tip="Contrôle l&apos;expression du visage au cours de l&apos;animation." left_delta="116" width="124">
+		<combo_box.item name="[None]">
+			[None]
+		</combo_box.item>
+		<combo_box.item name="Aaaaah">
+			Aaaaah
+		</combo_box.item>
+		<combo_box.item name="Afraid">
+			Effrayé
+		</combo_box.item>
+		<combo_box.item name="Angry">
+			En colère
+		</combo_box.item>
+		<combo_box.item name="BigSmile">
+			Grand sourire
+		</combo_box.item>
+		<combo_box.item name="Bored">
+			Ennui
+		</combo_box.item>
+		<combo_box.item name="Cry">
+			Pleurer
+		</combo_box.item>
+		<combo_box.item name="Disdain">
+			Mépris
+		</combo_box.item>
+		<combo_box.item name="Embarrassed">
+			Gêne
+		</combo_box.item>
+		<combo_box.item name="Frown">
+			Froncer les sourcils
+		</combo_box.item>
+		<combo_box.item name="Kiss">
+			Embrasser
+		</combo_box.item>
+		<combo_box.item name="Laugh">
+			Rire
+		</combo_box.item>
+		<combo_box.item name="Plllppt">
+			Plllppt
+		</combo_box.item>
+		<combo_box.item name="Repulsed">
+			Dégoût
+		</combo_box.item>
+		<combo_box.item name="Sad">
+			Triste
+		</combo_box.item>
+		<combo_box.item name="Shrug">
+			Hausser les épaules
+		</combo_box.item>
+		<combo_box.item name="Smile">
+			Sourire
+		</combo_box.item>
+		<combo_box.item name="Surprise">
+			Surprise
+		</combo_box.item>
+		<combo_box.item name="Wink">
+			Clin d&apos;œil
+		</combo_box.item>
+		<combo_box.item name="Worry">
+			Soucis
+		</combo_box.item>
+	</combo_box>
+	<spinner label_width="65" label="Transition &#10;début (s)" name="ease_in_time" tool_tip="Durée (en secondes) pendant laquelle l&apos;animation s&apos;intègre au mouvement."/>
+	<spinner label_width="65" left="160" width="125" label="Transition &#10;fin (s)" name="ease_out_time" tool_tip="Durée (en secondes) pendant laquelle l&apos;animation disparaît du mouvement."/>
+	<button label="" name="play_btn" tool_tip="Jouer/Arrêter votre animation." bottom_delta="-48"/>
+	<button label="" name="stop_btn" tool_tip="Arrêter le playback"/>
+	<slider label="" name="playback_slider"/>
+	<text name="bad_animation_text">
+		Impossible de lire le fichier d&apos;animation.
+
+Nous recommandons les fichiers BVH extraits de
+Poser 4.
+	</text>
+	<button label="Annuler" name="cancel_btn"/>
+	<button label="Charger ([AMOUNT] L$)" name="ok_btn"/>
+	<string name="failed_to_initialize">
+		Echec de l&apos;initialisation du mouvement
+	</string>
+	<string name="anim_too_long">
+		Le fichier d&apos;animation fait [LENGTH] secondes.
+
+La longueur maximale est de [MAX_LENGTH] secondes.
+	</string>
+	<string name="failed_file_read">
+		Impossible de lire le fichier d&apos;animation.
+
+[STATUS]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_auction.xml b/indra/newview/skins/default/xui/fr/floater_auction.xml
index 75a8e2f1f3..90e70c6094 100644
--- a/indra/newview/skins/default/xui/fr/floater_auction.xml
+++ b/indra/newview/skins/default/xui/fr/floater_auction.xml
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_auction" title="Commencer la vente de terrain Linden">
-	<check_box label="Inclure le marquage de sélection jaune" name="fence_check" />
-	<combo_box name="saletype_combo">
-		<combo_item name="Auction">
-			Enchères
-		</combo_item>
-		<combo_item name="FirstLand">
-			Premier terrain
-		</combo_item>
-	</combo_box>
-	<button label="Capture d&apos;écran" label_selected="Capture d&apos;écran"
-	     name="snapshot_btn" width="110" />
-	<button label="OK" label_selected="OK" name="ok_btn" left_delta="114"/>
-	<text name="already for sale">
-		Vous ne pouvez pas mettre aux enchères des parcelles déjà en vente.
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_auction" title="Commencer la vente de terrain Linden">
+	<check_box label="Inclure le marquage de sélection jaune" name="fence_check" />
+	<combo_box name="saletype_combo">
+		<combo_box.item name="Auction">
+			Enchères
+		</combo_box.item>
+		<combo_box.item name="FirstLand">
+			Premier terrain
+		</combo_box.item>
+	</combo_box>
+	<button label="Capture d&apos;écran" label_selected="Capture d&apos;écran"
+	     name="snapshot_btn" width="110" />
+	<button label="OK" label_selected="OK" name="ok_btn" left_delta="114"/>
+	<text name="already for sale">
+		Vous ne pouvez pas mettre aux enchères des parcelles déjà en vente.
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_avatar_picker.xml b/indra/newview/skins/default/xui/fr/floater_avatar_picker.xml
index d98cb5aad3..82d715d941 100644
--- a/indra/newview/skins/default/xui/fr/floater_avatar_picker.xml
+++ b/indra/newview/skins/default/xui/fr/floater_avatar_picker.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="avatarpicker" title="Choisir le résident">
-	<text name="Type part of the person&apos;s name:">
-		Entrez les premières lettres du nom de la personne :
-	</text>
-	<text name="instruct_search_resident_name">
-		Saisissez une partie du nom du résident :
-	</text>
-	<button label="Chercher" label_selected="Chercher" name="Find"/>
-	<text name="Or select a calling card:">
-		Ou sélectionnez une carte de visite :
-	</text>
-	<text name="Or select their calling card:">
-		Ou sélectionnez une carte de visite :
-	</text>
-	<button label="Sélectionner" label_selected="Sélectionner" name="Select"/>
-	<button label="Fermer" label_selected="Fermer" name="Close"/>
-	<text name="NotFound">
-		&apos;[TEXT]&apos; introuvable
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="avatarpicker" title="Choisir le résident">
+	<text name="Type part of the person&apos;s name:">
+		Entrez les premières lettres du nom de la personne :
+	</text>
+	<text name="instruct_search_resident_name">
+		Saisissez une partie du nom du résident :
+	</text>
+	<button label="Chercher" label_selected="Chercher" name="Find"/>
+	<text name="Or select a calling card:">
+		Ou sélectionnez une carte de visite :
+	</text>
+	<text name="Or select their calling card:">
+		Ou sélectionnez une carte de visite :
+	</text>
+	<button label="Sélectionner" label_selected="Sélectionner" name="Select"/>
+	<button label="Fermer" label_selected="Fermer" name="Close"/>
+	<text name="NotFound">
+		&apos;[TEXT]&apos; introuvable
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml b/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml
index 63f5ae8573..929bc31d9c 100644
--- a/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml
+++ b/indra/newview/skins/default/xui/fr/floater_avatar_textures.xml
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="avatar_texture_debug" title="Textures de l&apos;avatar">
-	<text name="">
-		Baked Textures
-	</text>
-	<text name="">
-		Composite Textures
-	</text>
-	<text name="baked_label">
-		Textures fixées
-	</text>
-	<text name="composite_label">
-		Textures composées
-	</text>
-	<texture_picker label="Tête" name="baked_head" />
-	<texture_picker label="Maquillage" name="head_bodypaint" />
-	<texture_picker label="Cheveux" name="hair" />
-	<button label="Vider" label_selected="Vider" name="Dump" />
-	<texture_picker label="Yeux" name="baked_eyes" />
-	<texture_picker label="Œil" name="eye_texture" />
-	<texture_picker label="Haut du corps" name="baked_upper_body" />
-	<texture_picker label="Tatouage haut du corps" name="upper_bodypaint" />
-	<texture_picker label="Tricot" name="undershirt" />
-	<texture_picker label="Gants" name="gloves" />
-	<texture_picker label="Chemise" name="shirt" />
-	<texture_picker label="Veste (en haut)" name="upper_jacket" />
-	<texture_picker label="
-Bas du corps
-" name="baked_lower_body" />
-	<texture_picker label="Tatouage bas du corps" name="lower_bodypaint" />
-	<texture_picker label="Sous-vêtements" name="underpants" />
-	<texture_picker label="Chaussettes" name="socks" />
-	<texture_picker label="Chaussures" name="shoes" />
-	<texture_picker label="Pantalon" name="pants" />
-	<texture_picker label="Veste" name="jacket" />
-	<texture_picker label="Jupe" name="baked_skirt" />
-	<texture_picker label="Jupe" name="skirt_texture" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="avatar_texture_debug" title="Textures de l&apos;avatar">
+	<text name="">
+		Baked Textures
+	</text>
+	<text name="">
+		Composite Textures
+	</text>
+	<text name="baked_label">
+		Textures fixées
+	</text>
+	<text name="composite_label">
+		Textures composées
+	</text>
+	<texture_picker label="Tête" name="baked_head" />
+	<texture_picker label="Maquillage" name="head_bodypaint" />
+	<texture_picker label="Cheveux" name="hair" />
+	<button label="Vider" label_selected="Vider" name="Dump" />
+	<texture_picker label="Yeux" name="baked_eyes" />
+	<texture_picker label="Œil" name="eye_texture" />
+	<texture_picker label="Haut du corps" name="baked_upper_body" />
+	<texture_picker label="Tatouage haut du corps" name="upper_bodypaint" />
+	<texture_picker label="Tricot" name="undershirt" />
+	<texture_picker label="Gants" name="gloves" />
+	<texture_picker label="Chemise" name="shirt" />
+	<texture_picker label="Veste (en haut)" name="upper_jacket" />
+	<texture_picker label="
+Bas du corps
+" name="baked_lower_body" />
+	<texture_picker label="Tatouage bas du corps" name="lower_bodypaint" />
+	<texture_picker label="Sous-vêtements" name="underpants" />
+	<texture_picker label="Chaussettes" name="socks" />
+	<texture_picker label="Chaussures" name="shoes" />
+	<texture_picker label="Pantalon" name="pants" />
+	<texture_picker label="Veste" name="jacket" />
+	<texture_picker label="Jupe" name="baked_skirt" />
+	<texture_picker label="Jupe" name="skirt_texture" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_beacons.xml b/indra/newview/skins/default/xui/fr/floater_beacons.xml
index 06bcdee28c..76e05a26ec 100644
--- a/indra/newview/skins/default/xui/fr/floater_beacons.xml
+++ b/indra/newview/skins/default/xui/fr/floater_beacons.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="beacons" title="Balises">
-	<panel name="beacons_panel">
-		<check_box label="Objets scriptés avec Toucher uniquement" name="touch_only"/>
-		<check_box label="Objets scriptés" name="scripted"/>
-		<check_box label="Objets physiques" name="physical"/>
-		<check_box label="Sources sonores" name="sounds"/>
-		<check_box label="Sources des particules" name="particles"/>
-		<check_box label="Montrer les surbrillances" name="highlights"/>
-		<check_box label="Montrer les balises" name="beacons"/>
-		<text name="beacon_width_label">
-			Largeur de la balise :
-		</text>
-	</panel>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="beacons" title="Balises">
+	<panel name="beacons_panel">
+		<check_box label="Objets scriptés avec Toucher uniquement" name="touch_only"/>
+		<check_box label="Objets scriptés" name="scripted"/>
+		<check_box label="Objets physiques" name="physical"/>
+		<check_box label="Sources sonores" name="sounds"/>
+		<check_box label="Sources des particules" name="particles"/>
+		<check_box label="Montrer les surbrillances" name="highlights"/>
+		<check_box label="Montrer les balises" name="beacons"/>
+		<text name="beacon_width_label">
+			Largeur de la balise :
+		</text>
+	</panel>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_build_options.xml b/indra/newview/skins/default/xui/fr/floater_build_options.xml
index 0906059e34..3451c2de4c 100644
--- a/indra/newview/skins/default/xui/fr/floater_build_options.xml
+++ b/indra/newview/skins/default/xui/fr/floater_build_options.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="build options floater" title="Options de la grille">
-	<spinner label="Unité (mètres)" name="GridResolution" />
-	<spinner label="Mesures (mètres)" name="GridDrawSize" />
-	<check_box label="Activer la fixation des sous-unités" name="GridSubUnit" />
-	<check_box label="Afficher les sections transversales" name="GridCrossSection" />
-	<slider label="Opacité de la grille" name="GridOpacity" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="build options floater" title="Options de la grille">
+	<spinner label="Unité (mètres)" name="GridResolution" />
+	<spinner label="Mesures (mètres)" name="GridDrawSize" />
+	<check_box label="Activer la fixation des sous-unités" name="GridSubUnit" />
+	<check_box label="Afficher les sections transversales" name="GridCrossSection" />
+	<slider label="Opacité de la grille" name="GridOpacity" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_bumps.xml b/indra/newview/skins/default/xui/fr/floater_bumps.xml
index f9f3bc89f8..e12c7ed17d 100644
--- a/indra/newview/skins/default/xui/fr/floater_bumps.xml
+++ b/indra/newview/skins/default/xui/fr/floater_bumps.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_bumps" title="Collisions, coups et bousculades">
-	<text name="none_detected">
-		Aucun détecté
-	</text>
-	<text name="bump">
-		[TIME]  [FIRST] [LAST] est entré en collision avec vous
-	</text>
-	<text name="llpushobject">
-		[TIME]  [FIRST] [LAST] vous a bousculé avec un script
-	</text>
-	<text name="selected_object_collide">
-		[TIME]  [FIRST] [LAST] vous a donné un coup avec un objet
-	</text>
-	<text name="scripted_object_collide">
-		[TIME]  [FIRST] [LAST] vous a donné un coup avec un objet scripté
-	</text>
-	<text name="physical_object_collide">
-		[TIME]  [FIRST] [LAST] vous a donné un coup avec un objet physique
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_bumps" title="Collisions, coups et bousculades">
+	<text name="none_detected">
+		Aucun détecté
+	</text>
+	<text name="bump">
+		[TIME]  [FIRST] [LAST] est entré en collision avec vous
+	</text>
+	<text name="llpushobject">
+		[TIME]  [FIRST] [LAST] vous a bousculé avec un script
+	</text>
+	<text name="selected_object_collide">
+		[TIME]  [FIRST] [LAST] vous a donné un coup avec un objet
+	</text>
+	<text name="scripted_object_collide">
+		[TIME]  [FIRST] [LAST] vous a donné un coup avec un objet scripté
+	</text>
+	<text name="physical_object_collide">
+		[TIME]  [FIRST] [LAST] vous a donné un coup avec un objet physique
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_buy_contents.xml b/indra/newview/skins/default/xui/fr/floater_buy_contents.xml
index a305c305bf..3d55a1ef70 100644
--- a/indra/newview/skins/default/xui/fr/floater_buy_contents.xml
+++ b/indra/newview/skins/default/xui/fr/floater_buy_contents.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_buy_contents" title="Acheter des contenus">
-	<text name="contains_text">
-		[NAME] contient :
-	</text>
-	<text name="buy_text">
-		Acheter [AMOUNT] L$ à [NAME] ?
-	</text>
-	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
-	<button label="Acheter" label_selected="Acheter" name="buy_btn"/>
-	<check_box label="Porter maintenant" name="wear_check"/>
-	<string name="no_copy_text">
-		(pas de copie)
-	</string>
-	<string name="no_modify_text">
-		(pas de modification)
-	</string>
-	<string name="no_transfer_text">
-		(pas de transfert)
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_buy_contents" title="Acheter des contenus">
+	<text name="contains_text">
+		[NAME] contient :
+	</text>
+	<text name="buy_text">
+		Acheter [AMOUNT] L$ à [NAME] ?
+	</text>
+	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
+	<button label="Acheter" label_selected="Acheter" name="buy_btn"/>
+	<check_box label="Porter maintenant" name="wear_check"/>
+	<string name="no_copy_text">
+		(pas de copie)
+	</string>
+	<string name="no_modify_text">
+		(pas de modification)
+	</string>
+	<string name="no_transfer_text">
+		(pas de transfert)
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_buy_currency.xml b/indra/newview/skins/default/xui/fr/floater_buy_currency.xml
index 3268a428f5..9ae924c28a 100644
--- a/indra/newview/skins/default/xui/fr/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/fr/floater_buy_currency.xml
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="buy currency" title="Acheter des L$">
-	<text left="5" name="info_buying">
-		Achat de L$ :
-	</text>
-	<text left="5" name="info_cannot_buy" right="-5">
-		Impossible d&apos;acheter maintenant :
-	</text>
-	<text left="5" name="info_need_more" right="-5">
-		Vous avez besoin de plus de devises:
-	</text>
-	<text name="error_message">
-		Quelque chose ne va pas.
-	</text>
-	<button label="Aller sur le site" name="error_web"/>
-	<text name="contacting">
-		En train de contacter le Lindex...
-	</text>
-	<text name="buy_action_unknown" right="-5">
-		Acheter des L$ sur le marché du LindeX
-	</text>
-	<text name="buy_action">
-		[NAME] L$ [PRICE]
-	</text>
-	<text name="currency_action">
-		Acheter des L$
-	</text>
-	<line_editor name="currency_amt">
-		1234
-	</line_editor>
-	<text name="currency_est" width="138">
-		pour environ [USD] US$
-	</text>
-	<text name="getting_data" width="138">
-		Obtention des données...
-	</text>
-	<text name="balance_label">
-		Actuellement, vous avez
-	</text>
-	<text name="balance_amount">
-		[AMT] L$
-	</text>
-	<text name="buying_label">
-		Vous achetez
-	</text>
-	<text name="buying_amount">
-		[AMT] L$
-	</text>
-	<text name="total_label">
-		Votre solde sera de
-	</text>
-	<text name="total_amount">
-		[AMT] L$
-	</text>
-	<text name="purchase_warning_repurchase">
-		En confirmant cette transaction, vous achetez uniquement les devises.
-Vous devrez recommencer cette opération.
-	</text>
-	<text name="purchase_warning_notenough">
-		Vous n&apos;achetez pas assez de devises.
-Veuillez saisir un montant plus élevé.
-	</text>
-	<button label="Acheter" name="buy_btn"/>
-	<button label="Annuler" name="cancel_btn"/>
-	<string name="buy_currency">
-		Acheter [LINDENS] L$ pour environ [USD] US$
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="buy currency" title="Acheter des L$">
+	<text left="5" name="info_buying">
+		Achat de L$ :
+	</text>
+	<text left="5" name="info_cannot_buy" right="-5">
+		Impossible d&apos;acheter maintenant :
+	</text>
+	<text left="5" name="info_need_more" right="-5">
+		Vous avez besoin de plus de devises:
+	</text>
+	<text name="error_message">
+		Quelque chose ne va pas.
+	</text>
+	<button label="Aller sur le site" name="error_web"/>
+	<text name="contacting">
+		En train de contacter le Lindex...
+	</text>
+	<text name="buy_action_unknown" right="-5">
+		Acheter des L$ sur le marché du LindeX
+	</text>
+	<text name="buy_action">
+		[NAME] L$ [PRICE]
+	</text>
+	<text name="currency_action">
+		Acheter des L$
+	</text>
+	<line_editor name="currency_amt">
+		1234
+	</line_editor>
+	<text name="currency_est" width="138">
+		pour environ [USD] US$
+	</text>
+	<text name="getting_data" width="138">
+		Obtention des données...
+	</text>
+	<text name="balance_label">
+		Actuellement, vous avez
+	</text>
+	<text name="balance_amount">
+		[AMT] L$
+	</text>
+	<text name="buying_label">
+		Vous achetez
+	</text>
+	<text name="buying_amount">
+		[AMT] L$
+	</text>
+	<text name="total_label">
+		Votre solde sera de
+	</text>
+	<text name="total_amount">
+		[AMT] L$
+	</text>
+	<text name="purchase_warning_repurchase">
+		En confirmant cette transaction, vous achetez uniquement les devises.
+Vous devrez recommencer cette opération.
+	</text>
+	<text name="purchase_warning_notenough">
+		Vous n&apos;achetez pas assez de devises.
+Veuillez saisir un montant plus élevé.
+	</text>
+	<button label="Acheter" name="buy_btn"/>
+	<button label="Annuler" name="cancel_btn"/>
+	<string name="buy_currency">
+		Acheter [LINDENS] L$ pour environ [USD] US$
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_buy_land.xml b/indra/newview/skins/default/xui/fr/floater_buy_land.xml
index 6a4ee3aef3..935df46f14 100644
--- a/indra/newview/skins/default/xui/fr/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/fr/floater_buy_land.xml
@@ -1,236 +1,236 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="buy land" title="Acheter le terrain">
-	<text name="region_name_label">
-		Région :
-	</text>
-	<text name="region_name_text">
-		(inconnue)
-	</text>
-	<text name="estate_name_label">
-		Domaine :
-	</text>
-	<text name="estate_name_text">
-		(inconnu)
-	</text>
-	<text name="estate_owner_label">
-		Propriétaire :
-	</text>
-	<text name="estate_owner_text">
-		(inconnu)
-	</text>
-	<text name="resellable_changeable_label">
-		Terrain acheté dans cette région :
-	</text>
-	<text name="resellable_clause">
-		Le terrain acheté dans cette région peut être revendu ou pas.
-	</text>
-	<text name="changeable_clause">
-		peut être fusionné/divisé ou pas.
-	</text>
-	<text name="covenant_text">
-		Vous devez accepter le règlement du domaine :
-	</text>
-	<text_editor name="covenant_editor">
-		Chargement...
-	</text_editor>
-	<check_box label="J&apos;accepte le règlement ci-dessus." name="agree_covenant"/>
-	<text name="info_parcel_label">
-		Parcelle :
-	</text>
-	<text name="info_parcel">
-		Scotopteryx 138,204
-	</text>
-	<text name="info_size_label">
-		Taille :
-	</text>
-	<text name="info_size">
-		1024 m²
-	</text>
-	<text name="info_price_label">
-		Prix :
-	</text>
-	<text name="info_price">
-		1500 L$
-		(1,1 L$/m²)
-		vendu avec objets
-	</text>
-	<text name="info_action" width="275">
-		Si vous achetez ce terrain :
-	</text>
-	<text name="error_message">
-		Quelque chose ne va pas.
-	</text>
-	<button label="Aller sur le site" name="error_web"/>
-	<text name="account_action">
-		Vous passerez à un compte Premium.
-	</text>
-	<text name="account_reason">
-		Seuls les membres Premium peuvent posséder du terrain.
-	</text>
-	<combo_box name="account_level">
-		<combo_item name="US$9.95/month,billedmonthly">
-			9,95 US$/mois, facturation mensuelle
-		</combo_item>
-		<combo_item name="US$7.50/month,billedquarterly">
-			7,50 US$/mois, facturation trimestrielle
-		</combo_item>
-		<combo_item name="US$6.00/month,billedannually">
-			6,00 US$/mois, facturation annuelle
-		</combo_item>
-	</combo_box>
-	<text name="land_use_action" right="430" width="210">
-		Augmentez vos frais d&apos;occupation de terrain à 40 US$/mois.
-	</text>
-	<text name="land_use_reason">
-		Vous possédez un terrain de 1,309 mètres carrés. 
-Cette parcelle fait 512 mètres carrés.
-	</text>
-	<text name="purchase_action">
-		Payez au résident X 4 000 L$ pour le terrain
-	</text>
-	<text name="currency_reason">
-		Vous avez 2 100 L$.
-	</text>
-	<text name="currency_action">
-		Acheter des L$
-	</text>
-	<line_editor name="currency_amt">
-		1000
-	</line_editor>
-	<text name="currency_est">
-		pour environ [AMOUNT2] US$
-	</text>
-	<text name="currency_balance">
-		Vous avez 2 100 L$.
-	</text>
-	<check_box label="Supprimer [AMOUNT] mètres carrés de votre contribution au groupe." name="remove_contribution"/>
-	<button label="Acheter" name="buy_btn"/>
-	<button label="Annuler" name="cancel_btn"/>
-	<string name="can_resell">
-		Peut être revendu.
-	</string>
-	<string name="can_not_resell">
-		Ne peut pas être revendu.
-	</string>
-	<string name="can_change">
-		Peut être fusionné ou divisé.
-	</string>
-	<string name="can_not_change">
-		Ne peut pas être fusionné ou divisé.
-	</string>
-	<string name="cant_buy_for_group">
-		Vous n&apos;avez pas la permission d&apos;acheter de terrain pour votre groupe.
-	</string>
-	<string name="no_land_selected">
-		Aucun terrain sélectionné.
-	</string>
-	<string name="multiple_parcels_selected">
-		Vous avez sélectionné plusieurs parcelles. 
-Sélectionnez une zone plus petite.
-	</string>
-	<string name="no_permission">
-		Vous n&apos;avez pas la permission d&apos;acheter de terrain pour votre groupe.
-	</string>
-	<string name="parcel_not_for_sale">
-		La parcelle sélectionnée n&apos;est pas à vendre.
-	</string>
-	<string name="group_already_owns">
-		La parcelle appartient déjà au groupe.
-	</string>
-	<string name="you_already_own">
-		La parcelle vous appartient déjà.
-	</string>
-	<string name="set_to_sell_to_other">
-		La parcelle sélectionnée doit déjà être vendue à quelqu&apos;un d&apos;autre.
-	</string>
-	<string name="no_public_land">
-		Il n&apos;y a pas de terrain public dans cette zone.
-	</string>
-	<string name="not_owned_by_you">
-		Le terrain sélectionné appartient à quelqu&apos;un d&apos;autre. 
-Sélectionnez une zone plus petite.
-	</string>
-	<string name="processing">
-		Achat en cours de traitement...
- 
-(Veuillez patienter quelques instants.)
-	</string>
-	<string name="fetching_error">
-		Une erreur s&apos;est produite pendant le traitement de l&apos;achat du terrain.
-	</string>
-	<string name="buying_will">
-		Si vous achetez ce terrain :
-	</string>
-	<string name="buying_for_group">
-		Achat de terrain pour le groupe :
-	</string>
-	<string name="cannot_buy_now">
-		Impossible d&apos;acheter maintenant :
-	</string>
-	<string name="not_for_sale">
-		Pas à vendre :
-	</string>
-	<string name="none_needed">
-		aucun besoin
-	</string>
-	<string name="must_upgrade">
-		Pour posséder du terrain, vous devez avoir un niveau de compte supérieur.
-	</string>
-	<string name="cant_own_land">
-		Avec votre compte, vous pouvez posséder du terrain.
-	</string>
-	<string name="land_holdings">
-		Vous possédez un terrain de [BUYER] m².
-	</string>
-	<string name="pay_to_for_land">
-		Payez [AMOUNT] L$ à [SELLER] pour ce terrain
-	</string>
-	<string name="buy_for_US">
-		Acheter [AMOUNT] L$ pour environ [AMOUNT2] US$,
-	</string>
-	<string name="parcel_meters">
-		Cette parcelle fait [AMOUNT] m².
-	</string>
-	<string name="premium_land">
-		Ce terrain est premium et les frais associés sont ceux d&apos;un terrain de [AMOUNT] m².
-	</string>
-	<string name="discounted_land">
-		Ce terrain est en solde et les frais associés sont ceux d&apos;un terrain de [AMOUNT] m².
-	</string>
-	<string name="meters_supports_object">
-		[AMOUNT] m²
-peuvent contenir [AMOUNT2] prims
-	</string>
-	<string name="sold_with_objects">
-		vendu avec objets
-	</string>
-	<string name="sold_without_objects">
-		objets non inclus
-	</string>
-	<string name="info_price_string">
-		[PRICE] L$
-([PRICE_PER_SQM] L$/m²)
-[SOLD_WITH_OBJECTS]
-	</string>
-	<string name="insufficient_land_credits">
-		Ce groupe, [GROUP], aura besoin de suffisamment de crédit pour payer les frais d&apos;occupation de terrain avant que l&apos;achat de cette parcelle ne soit finalisé.
-	</string>
-	<string name="have_enough_lindens">
-		Vous avez [AMOUNT]L$, ce qui est suffisant pour acheter ce terrain.
-	</string>
-	<string name="not_enough_lindens">
-		Vous n&apos;avez que [AMOUNT] L$ et vous avez besoin de [AMOUNT2] L$ de plus.
-	</string>
-	<string name="balance_left">
-		Après cet achat, il vous restera [AMOUNT] L$.
-	</string>
-	<string name="balance_needed">
-		Pour avoir les moyens d&apos;acquérir ce terrain, vous devez acheter au moins [AMOUNT] L$.
-	</string>
-	<string name="no_parcel_selected">
-		(aucune parcelle sélectionnée)
-	</string>
-	<string name="buy_currency">
-		Acheter [LINDENS] L$ pour environ [USD] US$
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="buy land" title="Acheter le terrain">
+	<text name="region_name_label">
+		Région :
+	</text>
+	<text name="region_name_text">
+		(inconnue)
+	</text>
+	<text name="estate_name_label">
+		Domaine :
+	</text>
+	<text name="estate_name_text">
+		(inconnu)
+	</text>
+	<text name="estate_owner_label">
+		Propriétaire :
+	</text>
+	<text name="estate_owner_text">
+		(inconnu)
+	</text>
+	<text name="resellable_changeable_label">
+		Terrain acheté dans cette région :
+	</text>
+	<text name="resellable_clause">
+		Le terrain acheté dans cette région peut être revendu ou pas.
+	</text>
+	<text name="changeable_clause">
+		peut être fusionné/divisé ou pas.
+	</text>
+	<text name="covenant_text">
+		Vous devez accepter le règlement du domaine :
+	</text>
+	<text_editor name="covenant_editor">
+		Chargement...
+	</text_editor>
+	<check_box label="J&apos;accepte le règlement ci-dessus." name="agree_covenant"/>
+	<text name="info_parcel_label">
+		Parcelle :
+	</text>
+	<text name="info_parcel">
+		Scotopteryx 138,204
+	</text>
+	<text name="info_size_label">
+		Taille :
+	</text>
+	<text name="info_size">
+		1024 m²
+	</text>
+	<text name="info_price_label">
+		Prix :
+	</text>
+	<text name="info_price">
+		1500 L$
+		(1,1 L$/m²)
+		vendu avec objets
+	</text>
+	<text name="info_action" width="275">
+		Si vous achetez ce terrain :
+	</text>
+	<text name="error_message">
+		Quelque chose ne va pas.
+	</text>
+	<button label="Aller sur le site" name="error_web"/>
+	<text name="account_action">
+		Vous passerez à un compte Premium.
+	</text>
+	<text name="account_reason">
+		Seuls les membres Premium peuvent posséder du terrain.
+	</text>
+	<combo_box name="account_level">
+		<combo_item name="US$9.95/month,billedmonthly">
+			9,95 US$/mois, facturation mensuelle
+		</combo_item>
+		<combo_item name="US$7.50/month,billedquarterly">
+			7,50 US$/mois, facturation trimestrielle
+		</combo_item>
+		<combo_item name="US$6.00/month,billedannually">
+			6,00 US$/mois, facturation annuelle
+		</combo_item>
+	</combo_box>
+	<text name="land_use_action" right="430" width="210">
+		Augmentez vos frais d&apos;occupation de terrain à 40 US$/mois.
+	</text>
+	<text name="land_use_reason">
+		Vous possédez un terrain de 1,309 mètres carrés. 
+Cette parcelle fait 512 mètres carrés.
+	</text>
+	<text name="purchase_action">
+		Payez au résident X 4 000 L$ pour le terrain
+	</text>
+	<text name="currency_reason">
+		Vous avez 2 100 L$.
+	</text>
+	<text name="currency_action">
+		Acheter des L$
+	</text>
+	<line_editor name="currency_amt">
+		1000
+	</line_editor>
+	<text name="currency_est">
+		pour environ [AMOUNT2] US$
+	</text>
+	<text name="currency_balance">
+		Vous avez 2 100 L$.
+	</text>
+	<check_box label="Supprimer [AMOUNT] mètres carrés de votre contribution au groupe." name="remove_contribution"/>
+	<button label="Acheter" name="buy_btn"/>
+	<button label="Annuler" name="cancel_btn"/>
+	<string name="can_resell">
+		Peut être revendu.
+	</string>
+	<string name="can_not_resell">
+		Ne peut pas être revendu.
+	</string>
+	<string name="can_change">
+		Peut être fusionné ou divisé.
+	</string>
+	<string name="can_not_change">
+		Ne peut pas être fusionné ou divisé.
+	</string>
+	<string name="cant_buy_for_group">
+		Vous n&apos;avez pas la permission d&apos;acheter de terrain pour votre groupe.
+	</string>
+	<string name="no_land_selected">
+		Aucun terrain sélectionné.
+	</string>
+	<string name="multiple_parcels_selected">
+		Vous avez sélectionné plusieurs parcelles. 
+Sélectionnez une zone plus petite.
+	</string>
+	<string name="no_permission">
+		Vous n&apos;avez pas la permission d&apos;acheter de terrain pour votre groupe.
+	</string>
+	<string name="parcel_not_for_sale">
+		La parcelle sélectionnée n&apos;est pas à vendre.
+	</string>
+	<string name="group_already_owns">
+		La parcelle appartient déjà au groupe.
+	</string>
+	<string name="you_already_own">
+		La parcelle vous appartient déjà.
+	</string>
+	<string name="set_to_sell_to_other">
+		La parcelle sélectionnée doit déjà être vendue à quelqu&apos;un d&apos;autre.
+	</string>
+	<string name="no_public_land">
+		Il n&apos;y a pas de terrain public dans cette zone.
+	</string>
+	<string name="not_owned_by_you">
+		Le terrain sélectionné appartient à quelqu&apos;un d&apos;autre. 
+Sélectionnez une zone plus petite.
+	</string>
+	<string name="processing">
+		Achat en cours de traitement...
+ 
+(Veuillez patienter quelques instants.)
+	</string>
+	<string name="fetching_error">
+		Une erreur s&apos;est produite pendant le traitement de l&apos;achat du terrain.
+	</string>
+	<string name="buying_will">
+		Si vous achetez ce terrain :
+	</string>
+	<string name="buying_for_group">
+		Achat de terrain pour le groupe :
+	</string>
+	<string name="cannot_buy_now">
+		Impossible d&apos;acheter maintenant :
+	</string>
+	<string name="not_for_sale">
+		Pas à vendre :
+	</string>
+	<string name="none_needed">
+		aucun besoin
+	</string>
+	<string name="must_upgrade">
+		Pour posséder du terrain, vous devez avoir un niveau de compte supérieur.
+	</string>
+	<string name="cant_own_land">
+		Avec votre compte, vous pouvez posséder du terrain.
+	</string>
+	<string name="land_holdings">
+		Vous possédez un terrain de [BUYER] m².
+	</string>
+	<string name="pay_to_for_land">
+		Payez [AMOUNT] L$ à [SELLER] pour ce terrain
+	</string>
+	<string name="buy_for_US">
+		Acheter [AMOUNT] L$ pour environ [AMOUNT2] US$,
+	</string>
+	<string name="parcel_meters">
+		Cette parcelle fait [AMOUNT] m².
+	</string>
+	<string name="premium_land">
+		Ce terrain est premium et les frais associés sont ceux d&apos;un terrain de [AMOUNT] m².
+	</string>
+	<string name="discounted_land">
+		Ce terrain est en solde et les frais associés sont ceux d&apos;un terrain de [AMOUNT] m².
+	</string>
+	<string name="meters_supports_object">
+		[AMOUNT] m²
+peuvent contenir [AMOUNT2] prims
+	</string>
+	<string name="sold_with_objects">
+		vendu avec objets
+	</string>
+	<string name="sold_without_objects">
+		objets non inclus
+	</string>
+	<string name="info_price_string">
+		[PRICE] L$
+([PRICE_PER_SQM] L$/m²)
+[SOLD_WITH_OBJECTS]
+	</string>
+	<string name="insufficient_land_credits">
+		Ce groupe, [GROUP], aura besoin de suffisamment de crédit pour payer les frais d&apos;occupation de terrain avant que l&apos;achat de cette parcelle ne soit finalisé.
+	</string>
+	<string name="have_enough_lindens">
+		Vous avez [AMOUNT]L$, ce qui est suffisant pour acheter ce terrain.
+	</string>
+	<string name="not_enough_lindens">
+		Vous n&apos;avez que [AMOUNT] L$ et vous avez besoin de [AMOUNT2] L$ de plus.
+	</string>
+	<string name="balance_left">
+		Après cet achat, il vous restera [AMOUNT] L$.
+	</string>
+	<string name="balance_needed">
+		Pour avoir les moyens d&apos;acquérir ce terrain, vous devez acheter au moins [AMOUNT] L$.
+	</string>
+	<string name="no_parcel_selected">
+		(aucune parcelle sélectionnée)
+	</string>
+	<string name="buy_currency">
+		Acheter [LINDENS] L$ pour environ [USD] US$
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_buy_object.xml b/indra/newview/skins/default/xui/fr/floater_buy_object.xml
index 2bbbbc97b4..9e0ce25b97 100644
--- a/indra/newview/skins/default/xui/fr/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/fr/floater_buy_object.xml
@@ -1,26 +1,26 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="contents" title="Acheter une copie de l&apos;objet">
-	<text name="contents_text">
-		et ses contenus :
-	</text>
-	<text name="buy_text">
-		Acheter pour [AMOUNT] L$ à [NAME] ?
-	</text>
-	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
-	<button label="Acheter" label_selected="Acheter" name="buy_btn"/>
-	<string name="title_buy_text">
-		Acheter
-	</string>
-	<string name="title_buy_copy_text">
-		Acheter une copie
-	</string>
-	<string name="no_copy_text">
-		(pas de copie)
-	</string>
-	<string name="no_modify_text">
-		(pas de modification)
-	</string>
-	<string name="no_transfer_text">
-		(pas de transfert)
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="contents" title="Acheter une copie de l&apos;objet">
+	<text name="contents_text">
+		et ses contenus :
+	</text>
+	<text name="buy_text">
+		Acheter pour [AMOUNT] L$ à [NAME] ?
+	</text>
+	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
+	<button label="Acheter" label_selected="Acheter" name="buy_btn"/>
+	<string name="title_buy_text">
+		Acheter
+	</string>
+	<string name="title_buy_copy_text">
+		Acheter une copie
+	</string>
+	<string name="no_copy_text">
+		(pas de copie)
+	</string>
+	<string name="no_modify_text">
+		(pas de modification)
+	</string>
+	<string name="no_transfer_text">
+		(pas de transfert)
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_camera.xml b/indra/newview/skins/default/xui/fr/floater_camera.xml
index 26c78d167d..9f280b7265 100644
--- a/indra/newview/skins/default/xui/fr/floater_camera.xml
+++ b/indra/newview/skins/default/xui/fr/floater_camera.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="move floater">
-	<string name="rotate_tooltip">
-		Faire tourner la caméra autour du point central
-	</string>
-	<string name="zoom_tooltip">
-		Zoomer en direction du point central
-	</string>
-	<string name="move_tooltip">
-		Déplacer la caméra vers le haut et le bas, la gauche et la droite
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="move floater">
+	<string name="rotate_tooltip">
+		Faire tourner la caméra autour du point central
+	</string>
+	<string name="zoom_tooltip">
+		Zoomer en direction du point central
+	</string>
+	<string name="move_tooltip">
+		Déplacer la caméra vers le haut et le bas, la gauche et la droite
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_choose_group.xml b/indra/newview/skins/default/xui/fr/floater_choose_group.xml
index bedc51cd10..ade440f296 100644
--- a/indra/newview/skins/default/xui/fr/floater_choose_group.xml
+++ b/indra/newview/skins/default/xui/fr/floater_choose_group.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="groups" title="Groupes">
-	<text name="groupdesc">
-		Choisissez un groupe :
-	</text>
-	<button label="OK" label_selected="OK" name="OK" />
-	<button label="Annuler" label_selected="Annuler" name="Cancel" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="groups" title="Groupes">
+	<text name="groupdesc">
+		Choisissez un groupe :
+	</text>
+	<button label="OK" label_selected="OK" name="OK" />
+	<button label="Annuler" label_selected="Annuler" name="Cancel" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_color_picker.xml b/indra/newview/skins/default/xui/fr/floater_color_picker.xml
index f6c210c4ce..adab86dac0 100644
--- a/indra/newview/skins/default/xui/fr/floater_color_picker.xml
+++ b/indra/newview/skins/default/xui/fr/floater_color_picker.xml
@@ -1,32 +1,32 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="ColorPicker" title="Choix de texture et de couleur">
-	<text name="r_val_text">
-		Rouge :
-	</text>
-	<text name="g_val_text">
-		Vert :
-	</text>
-	<text name="b_val_text">
-		Bleu :
-	</text>
-	<text name="h_val_text">
-		Teinte :
-	</text>
-	<text name="s_val_text">
-		Sat :
-	</text>
-	<text name="l_val_text">
-		Lum :
-	</text>
-	<check_box label="Application auto" left="4" name="apply_immediate" width="108"/>
-	<button label="" label_selected="" left_delta="138" name="color_pipette"/>
-	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
-	<button label="Sélectionner" label_selected="Sélectionner" name="select_btn"/>
-	<text left="8" name="Current color:">
-		Couleur actuelle :
-	</text>
-	<text left="8" name="(Drag below to save.)" width="114">
-		(Faire glisser dessous
-pour enregistrer.)
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="ColorPicker" title="Choix de texture et de couleur">
+	<text name="r_val_text">
+		Rouge :
+	</text>
+	<text name="g_val_text">
+		Vert :
+	</text>
+	<text name="b_val_text">
+		Bleu :
+	</text>
+	<text name="h_val_text">
+		Teinte :
+	</text>
+	<text name="s_val_text">
+		Sat :
+	</text>
+	<text name="l_val_text">
+		Lum :
+	</text>
+	<check_box label="Application auto" left="4" name="apply_immediate" width="108"/>
+	<button label="" label_selected="" left_delta="138" name="color_pipette"/>
+	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
+	<button label="Sélectionner" label_selected="Sélectionner" name="select_btn"/>
+	<text left="8" name="Current color:">
+		Couleur actuelle :
+	</text>
+	<text left="8" name="(Drag below to save.)" width="114">
+		(Faire glisser dessous
+pour enregistrer.)
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_critical.xml b/indra/newview/skins/default/xui/fr/floater_critical.xml
index de7cfe0487..6d30d97048 100644
--- a/indra/newview/skins/default/xui/fr/floater_critical.xml
+++ b/indra/newview/skins/default/xui/fr/floater_critical.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="modal container" title=" ">
-	<button label="Continuer" label_selected="Continuer" name="Continue" />
-	<button label="Annuler" label_selected="Annuler" name="Cancel" />
-	<text name="tos_heading">
-		Veuillez lire le message suivant avec attention.
-	</text>
-	<text_editor name="tos_text">
-		TOS_TEXT
-	</text_editor>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="modal container" title=" ">
+	<button label="Continuer" label_selected="Continuer" name="Continue" />
+	<button label="Annuler" label_selected="Annuler" name="Cancel" />
+	<text name="tos_heading">
+		Veuillez lire le message suivant avec attention.
+	</text>
+	<text_editor name="tos_text">
+		TOS_TEXT
+	</text_editor>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_customize.xml b/indra/newview/skins/default/xui/fr/floater_customize.xml
index a5c0857a07..e718907709 100644
--- a/indra/newview/skins/default/xui/fr/floater_customize.xml
+++ b/indra/newview/skins/default/xui/fr/floater_customize.xml
@@ -1,449 +1,449 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater customize" title="Apparence" width="563">
-	<tab_container name="customize tab container" tab_min_width="165" width="561">
-		<panel label="Parties du corps"/>
-		<panel label="Parties du corps" name="body_parts_placeholder"/>
-		<panel label="Silhouette" left="169" name="Shape" width="389">
-			<button label="Créer une silhouette" label_selected="Créer une silhouette" name="Create New" width="140"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<button label="Corps" label_selected="Corps" name="Body"/>
-			<button label="Tête" label_selected="Tête" name="Head"/>
-			<button label="Yeux" label_selected="Yeux" name="Eyes"/>
-			<button label="Oreilles" label_selected="Oreilles" name="Ears"/>
-			<button label="Nez" label_selected="Nez" name="Nose"/>
-			<button label="Bouche" label_selected="Bouche" name="Mouth"/>
-			<button label="Menton" label_selected="Menton" name="Chin"/>
-			<button label="Torse" label_selected="Torse" name="Torso"/>
-			<button label="Jambes" label_selected="Jambes" name="Legs"/>
-			<button label="Aléatoire" label_selected="Aléatoire" name="Randomize"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portée
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de silhouette, faites-en glisser une à partir de votre
-inventaire jusqu&apos;à votre avatar. Vous pouvez aussi en créer une nouvelle et la porter.
-une nouvelle et de la porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<radio_group name="sex radio">
-				<radio_item length="1" name="radio" type="string">
-					Femme
-				</radio_item>
-				<radio_item length="1" name="radio2" type="string">
-					Homme
-				</radio_item>
-			</radio_group>
-		</panel>
-		<panel label="Peau" name="Skin">
-			<button label="Créer une peau" label_selected="Créer une peau" name="Create New"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<button label="Couleur" label_selected="Couleur" name="Skin Color" width="84"/>
-			<button label="Détails visage" label_selected="Détails visage" name="Face Detail" width="84"/>
-			<button label="Maquillage" label_selected="Maquillage" name="Makeup" width="84"/>
-			<button label="Détails corps" label_selected="Détails corps" name="Body Detail" width="84"/>
-			<button label="Aléatoire" label_selected="Aléatoire" name="Randomize" width="84"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portée
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de peau, faites-en glisser une à partir de votre inventaire.
-Vous pouvez aussi en créer une nouvelle et la porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<texture_picker label="Tatouages tête" name="Head Tattoos" tool_tip="Cliquez pour sélectionner une image" width="78"/>
-			<texture_picker label="Tatouages haut" name="Upper Tattoos" tool_tip="Cliquez pour sélectionner une image" width="78"/>
-			<texture_picker label="Tatouages bas" name="Lower Tattoos" tool_tip="Cliquez pour sélectionner une image" width="78"/>
-		</panel>
-		<panel label="Cheveux" name="Hair">
-			<button label="Créer des cheveux" label_selected="Créer des cheveux" name="Create New"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<button label="Couleur" label_selected="Couleur" name="Color"/>
-			<button label="Style" label_selected="Style" name="Style"/>
-			<button label="Sourcils" label_selected="Sourcils" name="Eyebrows"/>
-			<button label="Pilosité" label_selected="Pilosité" name="Facial"/>
-			<button label="Aléatoire" label_selected="Aléatoire" name="Randomize"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portés
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de chevelure, faites-en glisser une de votre inventaire
-jusqu&apos;à votre avatar. Vous pouvez aussi en créer une
-nouvelle et la porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<texture_picker label="Texture" name="Texture" tool_tip="Cliquez pour sélectionner une image"/>
-		</panel>
-		<panel label="Yeux" name="Eyes">
-			<button label="Créer des yeux" label_selected="Créer des yeux" name="Create New"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<button label="Aléatoire" label_selected="Aléatoire" name="Randomize"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portés
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer vos yeux, faites-les glisser de votre inventaire
-jusqu&apos;à votre avatar. Vous pouvez aussi en créer de nouveaux et les porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<texture_picker label="Iris" name="Iris" tool_tip="Cliquez pour sélectionner une image"/>
-		</panel>
-		<panel label="Vêtements"/>
-		<panel label="Habits" name="clothes_placeholder"/>
-		<panel label="Chemise" name="Shirt">
-			<button label="Créer une chemise" label_selected="Créer une chemise" name="Create New"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portée
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de chemise, faites-en glisser une de votre inventaire
-jusqu&apos;à votre avatar. Vous pouvez aussi en créer une nouvelle et la porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
-			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
-		</panel>
-		<panel label="Pantalon" name="Pants">
-			<button label="Créer un pantalon" label_selected="Créer un pantalon" name="Create New"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non porté
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de pantalon, faites-en glisser un de votre inventaire
-jusqu&apos;à votre avatar. Vous pouvez aussi en créer un nouveau et le porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
-			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
-		</panel>
-		<panel label="Chaussures" name="Shoes">
-			<button label="Créer des chaussures" label_selected="Créer des chaussures" name="Create New" width="140"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portées
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de chaussures, faites-en glisser une paire de votre
-inventaire jusqu&apos;à votre avatar. Vous pouvez aussi en créer une
-nouvelle paire et la porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
-			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
-		</panel>
-		<panel label="Chaussettes" name="Socks">
-			<button label="Créer des chaussettes" label_selected="Créer des chaussettes" name="Create New" width="140"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portées
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de chaussettes, faites-en glisser une paire de votre
-inventaire jusqu&apos;à votre avatar. Vous pouvez aussi en créer une
-nouvelle paire et la porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
-			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
-		</panel>
-		<panel label="Veste" name="Jacket">
-			<button label="Créer une veste" label_selected="Créer une veste" name="Create New"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portée
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de veste, faites-en glisser une de votre inventaire
-jusqu&apos;à votre avatar. Vous pouvez aussi en créer une
-nouvelle et la porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="81"/>
-			<texture_picker label="Tissu (dessus)" name="Upper Fabric" tool_tip="Cliquez pour sélectionner une image" width="81"/>
-			<texture_picker label="Tissu (dessous)" name="Lower Fabric" tool_tip="Cliquez pour sélectionner une image" width="81"/>
-		</panel>
-		<panel label="Gants" name="Gloves">
-			<button label="Créer des gants" label_selected="Créer des gants" name="Create New"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portés
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de gants, faites-en glisser une paire à partir de votre
-inventaire. Vous pouvez aussi en créer une nouvelle paire
-et la porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
-			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
-		</panel>
-		<panel label="Sous-vêtements (homme)" name="Undershirt">
-			<button label="Créer des sous-vêtements" label_selected="Créer des sous-vêtements" name="Create New" width="166"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portés
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de sous-vêtement, faites-en glisser une paire à partir de
-votre inventaire. Vous pouvez aussi en créer des nouveaux et les porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
-			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
-		</panel>
-		<panel label="Sous-vêtements (femme)" name="Underpants">
-			<button label="Créer des sous-vêtements" label_selected="Créer des sous-vêtements" name="Create New" width="166"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portés
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de sous-vêtement, faites-en glisser une paire à partir de
-votre inventaire. Vous pouvez aussi en créer des nouveaux et les porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
-			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
-		</panel>
-		<panel label="Jupe" name="Skirt">
-			<button label="Créer une jupe" label_selected="Créer une jupe" name="Create New"/>
-			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
-			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
-			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
-			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: impossible de modifier
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: en cours de chargement...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: non portée
-			</text>
-			<text length="1" name="path" type="string">
-				Emplacement : [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Pour changer de jupe, faites-en glisser une à partir de votre inventaire.
-Vous pouvez aussi en créer une nouvelle et la porter.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Vous n&apos;avez pas la permission de modifier cet objet.
-			</text>
-			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
-			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
-		</panel>
-	</tab_container>
-	<scroll_container left="266" name="panel_container"/>
-	<button label="Créer un ensemble" label_selected="Créer un ensemble" name="Make Outfit" right="-252" width="115"/>
-	<button label="Tout enregistrer" label_selected="Tout enregistrer" name="Save All" right="-131" width="115"/>
-	<button label="Fermer" label_selected="Fermer" name="Close" width="115"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater customize" title="Apparence" width="563">
+	<tab_container name="customize tab container" tab_min_width="165" width="561">
+		<panel label="Parties du corps"/>
+		<panel label="Parties du corps" name="body_parts_placeholder"/>
+		<panel label="Silhouette" left="169" name="Shape" width="389">
+			<button label="Créer une silhouette" label_selected="Créer une silhouette" name="Create New" width="140"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<button label="Corps" label_selected="Corps" name="Body"/>
+			<button label="Tête" label_selected="Tête" name="Head"/>
+			<button label="Yeux" label_selected="Yeux" name="Eyes"/>
+			<button label="Oreilles" label_selected="Oreilles" name="Ears"/>
+			<button label="Nez" label_selected="Nez" name="Nose"/>
+			<button label="Bouche" label_selected="Bouche" name="Mouth"/>
+			<button label="Menton" label_selected="Menton" name="Chin"/>
+			<button label="Torse" label_selected="Torse" name="Torso"/>
+			<button label="Jambes" label_selected="Jambes" name="Legs"/>
+			<button label="Aléatoire" label_selected="Aléatoire" name="Randomize"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portée
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de silhouette, faites-en glisser une à partir de votre
+inventaire jusqu&apos;à votre avatar. Vous pouvez aussi en créer une nouvelle et la porter.
+une nouvelle et de la porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<radio_group name="sex radio">
+				<radio_item length="1" name="radio" type="string">
+					Femme
+				</radio_item>
+				<radio_item length="1" name="radio2" type="string">
+					Homme
+				</radio_item>
+			</radio_group>
+		</panel>
+		<panel label="Peau" name="Skin">
+			<button label="Créer une peau" label_selected="Créer une peau" name="Create New"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<button label="Couleur" label_selected="Couleur" name="Skin Color" width="84"/>
+			<button label="Détails visage" label_selected="Détails visage" name="Face Detail" width="84"/>
+			<button label="Maquillage" label_selected="Maquillage" name="Makeup" width="84"/>
+			<button label="Détails corps" label_selected="Détails corps" name="Body Detail" width="84"/>
+			<button label="Aléatoire" label_selected="Aléatoire" name="Randomize" width="84"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portée
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de peau, faites-en glisser une à partir de votre inventaire.
+Vous pouvez aussi en créer une nouvelle et la porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<texture_picker label="Tatouages tête" name="Head Tattoos" tool_tip="Cliquez pour sélectionner une image" width="78"/>
+			<texture_picker label="Tatouages haut" name="Upper Tattoos" tool_tip="Cliquez pour sélectionner une image" width="78"/>
+			<texture_picker label="Tatouages bas" name="Lower Tattoos" tool_tip="Cliquez pour sélectionner une image" width="78"/>
+		</panel>
+		<panel label="Cheveux" name="Hair">
+			<button label="Créer des cheveux" label_selected="Créer des cheveux" name="Create New"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<button label="Couleur" label_selected="Couleur" name="Color"/>
+			<button label="Style" label_selected="Style" name="Style"/>
+			<button label="Sourcils" label_selected="Sourcils" name="Eyebrows"/>
+			<button label="Pilosité" label_selected="Pilosité" name="Facial"/>
+			<button label="Aléatoire" label_selected="Aléatoire" name="Randomize"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portés
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de chevelure, faites-en glisser une de votre inventaire
+jusqu&apos;à votre avatar. Vous pouvez aussi en créer une
+nouvelle et la porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<texture_picker label="Texture" name="Texture" tool_tip="Cliquez pour sélectionner une image"/>
+		</panel>
+		<panel label="Yeux" name="Eyes">
+			<button label="Créer des yeux" label_selected="Créer des yeux" name="Create New"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<button label="Aléatoire" label_selected="Aléatoire" name="Randomize"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portés
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer vos yeux, faites-les glisser de votre inventaire
+jusqu&apos;à votre avatar. Vous pouvez aussi en créer de nouveaux et les porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<texture_picker label="Iris" name="Iris" tool_tip="Cliquez pour sélectionner une image"/>
+		</panel>
+		<panel label="Vêtements"/>
+		<panel label="Habits" name="clothes_placeholder"/>
+		<panel label="Chemise" name="Shirt">
+			<button label="Créer une chemise" label_selected="Créer une chemise" name="Create New"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portée
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de chemise, faites-en glisser une de votre inventaire
+jusqu&apos;à votre avatar. Vous pouvez aussi en créer une nouvelle et la porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
+			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
+		</panel>
+		<panel label="Pantalon" name="Pants">
+			<button label="Créer un pantalon" label_selected="Créer un pantalon" name="Create New"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non porté
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de pantalon, faites-en glisser un de votre inventaire
+jusqu&apos;à votre avatar. Vous pouvez aussi en créer un nouveau et le porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
+			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
+		</panel>
+		<panel label="Chaussures" name="Shoes">
+			<button label="Créer des chaussures" label_selected="Créer des chaussures" name="Create New" width="140"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portées
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de chaussures, faites-en glisser une paire de votre
+inventaire jusqu&apos;à votre avatar. Vous pouvez aussi en créer une
+nouvelle paire et la porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
+			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
+		</panel>
+		<panel label="Chaussettes" name="Socks">
+			<button label="Créer des chaussettes" label_selected="Créer des chaussettes" name="Create New" width="140"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portées
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de chaussettes, faites-en glisser une paire de votre
+inventaire jusqu&apos;à votre avatar. Vous pouvez aussi en créer une
+nouvelle paire et la porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
+			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
+		</panel>
+		<panel label="Veste" name="Jacket">
+			<button label="Créer une veste" label_selected="Créer une veste" name="Create New"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portée
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de veste, faites-en glisser une de votre inventaire
+jusqu&apos;à votre avatar. Vous pouvez aussi en créer une
+nouvelle et la porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="81"/>
+			<texture_picker label="Tissu (dessus)" name="Upper Fabric" tool_tip="Cliquez pour sélectionner une image" width="81"/>
+			<texture_picker label="Tissu (dessous)" name="Lower Fabric" tool_tip="Cliquez pour sélectionner une image" width="81"/>
+		</panel>
+		<panel label="Gants" name="Gloves">
+			<button label="Créer des gants" label_selected="Créer des gants" name="Create New"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portés
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de gants, faites-en glisser une paire à partir de votre
+inventaire. Vous pouvez aussi en créer une nouvelle paire
+et la porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
+			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
+		</panel>
+		<panel label="Sous-vêtements (homme)" name="Undershirt">
+			<button label="Créer des sous-vêtements" label_selected="Créer des sous-vêtements" name="Create New" width="166"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portés
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de sous-vêtement, faites-en glisser une paire à partir de
+votre inventaire. Vous pouvez aussi en créer des nouveaux et les porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
+			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
+		</panel>
+		<panel label="Sous-vêtements (femme)" name="Underpants">
+			<button label="Créer des sous-vêtements" label_selected="Créer des sous-vêtements" name="Create New" width="166"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portés
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de sous-vêtement, faites-en glisser une paire à partir de
+votre inventaire. Vous pouvez aussi en créer des nouveaux et les porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
+			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
+		</panel>
+		<panel label="Jupe" name="Skirt">
+			<button label="Créer une jupe" label_selected="Créer une jupe" name="Create New"/>
+			<button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/>
+			<button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/>
+			<button label="Enregistrer sous" label_selected="Enregistrer sous" left="188" name="Save As" width="105"/>
+			<button label="Rétablir" label_selected="Rétablir" left="299" name="Revert" width="82"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: impossible de modifier
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: en cours de chargement...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: non portée
+			</text>
+			<text length="1" name="path" type="string">
+				Emplacement : [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Pour changer de jupe, faites-en glisser une à partir de votre inventaire.
+Vous pouvez aussi en créer une nouvelle et la porter.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Vous n&apos;avez pas la permission de modifier cet objet.
+			</text>
+			<color_swatch label="Couleur/Teinte" name="Color/Tint" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" width="74"/>
+			<texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/>
+		</panel>
+	</tab_container>
+	<scroll_container left="266" name="panel_container"/>
+	<button label="Créer un ensemble" label_selected="Créer un ensemble" name="Make Outfit" right="-252" width="115"/>
+	<button label="Tout enregistrer" label_selected="Tout enregistrer" name="Save All" right="-131" width="115"/>
+	<button label="Fermer" label_selected="Fermer" name="Close" width="115"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml
index f664e6925e..1103539898 100644
--- a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml
@@ -1,97 +1,97 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Day Cycle Floater" title="Editeur du cycle du jour">
-	<tab_container name="Day Cycle Tabs">
-		<panel label="Cycle du jour" name="Day Cycle">
-			<button label="?" name="WLDayCycleHelp" />
-			<text name="WL12am">
-				Minuit
-			</text>
-			<text name="WL3am">
-				3h
-			</text>
-			<text name="WL6am">
-				6h
-			</text>
-			<text name="WL9amHash">
-				9h
-			</text>
-			<text name="WL12pmHash">
-				Midi
-			</text>
-			<text name="WL3pm">
-				15h
-			</text>
-			<text name="WL6pm">
-				18h
-			</text>
-			<text name="WL9pm">
-				21h
-			</text>
-			<text name="WL12am2">
-				Minuit
-			</text>
-			<text name="WL12amHash">
-				|
-			</text>
-			<text name="WL3amHash">
-				I
-			</text>
-			<text name="WL6amHash">
-				|
-			</text>
-			<text name="WL9amHash2">
-				I
-			</text>
-			<text name="WL12pmHash2">
-				|
-			</text>
-			<text name="WL3pmHash">
-				I
-			</text>
-			<text name="WL6pmHash">
-				|
-			</text>
-			<text name="WL9pmHash">
-				I
-			</text>
-			<text name="WL12amHash2">
-				|
-			</text>
-			<button label="Ajouter clé" label_selected="Ajouter clé" name="WLAddKey" width="89" bottom="-45" />
-			<button label="Supprimer clé" label_selected="Supprimer clé" name="WLDeleteKey" width="89" bottom="-70" />
-			<text name="WLCurKeyFrameText">
-				Réglages des images-clés :
-			</text>
-			<text name="WLCurKeyTimeText">
-				Heure de la clé :
-			</text>
-			<spinner label="Heure" name="WLCurKeyHour" />
-			<spinner label="Min" name="WLCurKeyMin" />
-			<text name="WLCurKeyTimeText2">
-				Préréglages clés :
-			</text>
-			<combo_box label="Préréglage" name="WLKeyPresets" />
-			<text name="DayCycleText">
-				Snap :
-			</text>
-			<combo_box label="5 min" name="WLSnapOptions" />
-			<text name="DayCycleText2">
-				Durée du cycle :
-			</text>
-			<spinner label="Heure" name="WLLengthOfDayHour" />
-			<spinner label="Min" name="WLLengthOfDayMin" />
-			<spinner label="S" name="WLLengthOfDaySec" label_width="10" width="50" left_delta="75"/>
-			<text name="DayCycleText3">
-				Prévisualiser :
-			</text>
-			<button label="Jouer" label_selected="Jouer" name="WLAnimSky" />
-			<button label="Stop !" label_selected="Stop" name="WLStopAnimSky" />
-			<button label="Utiliser heure domaine" label_selected="Aller heure domaine"
-			     name="WLUseLindenTime" />
-			<button label="Enregistrer jour test" label_selected="Enregistrer jour test"
-			     name="WLSaveDayCycle" />
-			<button label="Charger jour test" label_selected="Charger jour test"
-			     name="WLLoadDayCycle" />
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Day Cycle Floater" title="Editeur du cycle du jour">
+	<tab_container name="Day Cycle Tabs">
+		<panel label="Cycle du jour" name="Day Cycle">
+			<button label="?" name="WLDayCycleHelp" />
+			<text name="WL12am">
+				Minuit
+			</text>
+			<text name="WL3am">
+				3h
+			</text>
+			<text name="WL6am">
+				6h
+			</text>
+			<text name="WL9amHash">
+				9h
+			</text>
+			<text name="WL12pmHash">
+				Midi
+			</text>
+			<text name="WL3pm">
+				15h
+			</text>
+			<text name="WL6pm">
+				18h
+			</text>
+			<text name="WL9pm">
+				21h
+			</text>
+			<text name="WL12am2">
+				Minuit
+			</text>
+			<text name="WL12amHash">
+				|
+			</text>
+			<text name="WL3amHash">
+				I
+			</text>
+			<text name="WL6amHash">
+				|
+			</text>
+			<text name="WL9amHash2">
+				I
+			</text>
+			<text name="WL12pmHash2">
+				|
+			</text>
+			<text name="WL3pmHash">
+				I
+			</text>
+			<text name="WL6pmHash">
+				|
+			</text>
+			<text name="WL9pmHash">
+				I
+			</text>
+			<text name="WL12amHash2">
+				|
+			</text>
+			<button label="Ajouter clé" label_selected="Ajouter clé" name="WLAddKey" width="89" bottom="-45" />
+			<button label="Supprimer clé" label_selected="Supprimer clé" name="WLDeleteKey" width="89" bottom="-70" />
+			<text name="WLCurKeyFrameText">
+				Réglages des images-clés :
+			</text>
+			<text name="WLCurKeyTimeText">
+				Heure de la clé :
+			</text>
+			<spinner label="Heure" name="WLCurKeyHour" />
+			<spinner label="Min" name="WLCurKeyMin" />
+			<text name="WLCurKeyTimeText2">
+				Préréglages clés :
+			</text>
+			<combo_box label="Préréglage" name="WLKeyPresets" />
+			<text name="DayCycleText">
+				Snap :
+			</text>
+			<combo_box label="5 min" name="WLSnapOptions" />
+			<text name="DayCycleText2">
+				Durée du cycle :
+			</text>
+			<spinner label="Heure" name="WLLengthOfDayHour" />
+			<spinner label="Min" name="WLLengthOfDayMin" />
+			<spinner label="S" name="WLLengthOfDaySec" label_width="10" width="50" left_delta="75"/>
+			<text name="DayCycleText3">
+				Prévisualiser :
+			</text>
+			<button label="Jouer" label_selected="Jouer" name="WLAnimSky" />
+			<button label="Stop !" label_selected="Stop" name="WLStopAnimSky" />
+			<button label="Utiliser heure domaine" label_selected="Aller heure domaine"
+			     name="WLUseLindenTime" />
+			<button label="Enregistrer jour test" label_selected="Enregistrer jour test"
+			     name="WLSaveDayCycle" />
+			<button label="Charger jour test" label_selected="Charger jour test"
+			     name="WLLoadDayCycle" />
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_device_settings.xml b/indra/newview/skins/default/xui/fr/floater_device_settings.xml
index 0bd21a4dc6..656f1c4fba 100644
--- a/indra/newview/skins/default/xui/fr/floater_device_settings.xml
+++ b/indra/newview/skins/default/xui/fr/floater_device_settings.xml
@@ -1,3 +1,3 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_device_settings"
-     title="Paramètres du matériel utilisé pour le chat vocal" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_device_settings"
+     title="Paramètres du matériel utilisé pour le chat vocal" />
diff --git a/indra/newview/skins/default/xui/fr/floater_env_settings.xml b/indra/newview/skins/default/xui/fr/floater_env_settings.xml
index 3d46559285..1d14142dd3 100644
--- a/indra/newview/skins/default/xui/fr/floater_env_settings.xml
+++ b/indra/newview/skins/default/xui/fr/floater_env_settings.xml
@@ -1,27 +1,27 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="Éditeur d&apos;environnement">
-	<text bottom="-45" name="EnvTimeText">
-		Heure de la
-journée
-	</text>
-	<text bottom_delta="-36" name="EnvTimeText2">
-		Midi
-	</text>
-	<text name="EnvCloudText">
-		Couverture
-nuageuse
-	</text>
-	<text bottom="-45" name="EnvWaterColorText">
-		Couleur de
-l&apos;eau
-	</text>
-	<color_swatch name="EnvWaterColor" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs"/>
-	<text name="EnvWaterFogText">
-		Brouillard
-dans l&apos;eau
-	</text>
-	<button bottom="-144" label="Utiliser heure du domaine" name="EnvUseEstateTimeButton" width="145"/>
-	<button label="Ciel avancé" name="EnvAdvancedSkyButton" width="145" left="162" />
-	<button label="Eau avancée" name="EnvAdvancedWaterButton" width="145" left="316"/>
-	<button label="?" name="EnvSettingsHelpButton"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Environment Editor Floater" title="Éditeur d&apos;environnement">
+	<text bottom="-45" name="EnvTimeText">
+		Heure de la
+journée
+	</text>
+	<text bottom_delta="-36" name="EnvTimeText2">
+		Midi
+	</text>
+	<text name="EnvCloudText">
+		Couverture
+nuageuse
+	</text>
+	<text bottom="-45" name="EnvWaterColorText">
+		Couleur de
+l&apos;eau
+	</text>
+	<color_swatch name="EnvWaterColor" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs"/>
+	<text name="EnvWaterFogText">
+		Brouillard
+dans l&apos;eau
+	</text>
+	<button bottom="-144" label="Utiliser heure du domaine" name="EnvUseEstateTimeButton" width="145"/>
+	<button label="Ciel avancé" name="EnvAdvancedSkyButton" width="145" left="162" />
+	<button label="Eau avancée" name="EnvAdvancedWaterButton" width="145" left="316"/>
+	<button label="?" name="EnvSettingsHelpButton"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_font_test.xml b/indra/newview/skins/default/xui/fr/floater_font_test.xml
index b469e08c81..fce3615725 100644
--- a/indra/newview/skins/default/xui/fr/floater_font_test.xml
+++ b/indra/newview/skins/default/xui/fr/floater_font_test.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
-     height="800" min_height="175" min_width="154" name="contents"
-     title="Font Test" width="500">
-
-<text name="linea" font="OverrideTest" follows="left|top|right" bottom_delta="-20" left="16" height="16">
-OverrideTest, should be timesbd, from default/xui/fr
-</text>
-
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
+     height="800" min_height="175" min_width="154" name="contents"
+     title="Font Test" width="500">
+
+<text name="linea" font="OverrideTest" follows="left|top|right" bottom_delta="-20" left="16" height="16">
+OverrideTest, should be timesbd, from default/xui/fr
+</text>
+
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_gesture.xml b/indra/newview/skins/default/xui/fr/floater_gesture.xml
index d45d3e76f2..4411fee480 100644
--- a/indra/newview/skins/default/xui/fr/floater_gesture.xml
+++ b/indra/newview/skins/default/xui/fr/floater_gesture.xml
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="gestures" title="Gestes utilisés">
-	<text name="help_label">
-		Double-cliquez sur un geste pour jouer les animations
-et les sons.
-	</text>
-	<scroll_list bottom_delta="-385" height="360" name="gesture_list">
-		<column label="Déclencheur" name="trigger" width="85" />
-		<column label="Touche" name="shortcut" />
-		<column label="" name="key" />
-		<column label="Nom" name="name" width="145"/>
-	</scroll_list>
-	<button label="Nouveau" name="new_gesture_btn" />
-	<button label="Inventaire" name="inventory_btn" />
-	<button label="Modifier" name="edit_btn" />
-	<button label="Jouer" name="play_btn" />
-	<button label="Stop" name="stop_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="gestures" title="Gestes utilisés">
+	<text name="help_label">
+		Double-cliquez sur un geste pour jouer les animations
+et les sons.
+	</text>
+	<scroll_list bottom_delta="-385" height="360" name="gesture_list">
+		<column label="Déclencheur" name="trigger" width="85" />
+		<column label="Touche" name="shortcut" />
+		<column label="" name="key" />
+		<column label="Nom" name="name" width="145"/>
+	</scroll_list>
+	<button label="Nouveau" name="new_gesture_btn" />
+	<button label="Inventaire" name="inventory_btn" />
+	<button label="Modifier" name="edit_btn" />
+	<button label="Jouer" name="play_btn" />
+	<button label="Stop" name="stop_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_god_tools.xml b/indra/newview/skins/default/xui/fr/floater_god_tools.xml
index 1700b8d94b..ab8b061cd3 100644
--- a/indra/newview/skins/default/xui/fr/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/fr/floater_god_tools.xml
@@ -1,111 +1,111 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="godtools floater" title="Outils divins">
-	<tab_container name="GodTools Tabs">
-		<panel label="Grille" name="grid">
-			<button label="Éjecter tous" label_selected="Éjecter tous" name="Kick all users" width="175" />
-			<button label="Vider le cache cartographique de la région" label_selected="Vider le cache cartographique de la région" name="Flush This Region&apos;s Map Visibility Caches" width="285"/>
-		</panel>
-		<panel label="Région" name="region">
-			<text name="Sim Name:" width="70">
-				Nom du sim :
-			</text>
-			<line_editor left="85" name="region name" width="198" />
-			<check_box label="Initiation" name="check prelude" tool_tip="Définir cette région comme zone d&apos;initiation."/>
-			<check_box label="Soleil fixe" name="check fixed sun" tool_tip="Définir la position du soleil (comme dans Région et Domaine &gt; Terrain.)"/>
-			<check_box label="Réinitialiser le domicile &#10;à la téléportation" name="check reset home" tool_tip="Lorsqu&apos;un résident se téléporte à l&apos;extérieur, réinitialise son domicile à la position de sa destination."  height="32"/>
-			<check_box label="Visible" name="check visible" tool_tip="Cochez pour rendre la région visible aux non-admins."  bottom_delta="-32"/>
-			<check_box label="Dégâts" name="check damage" tool_tip="Cochez pour activer les dégâts dans cette région."/>
-			<check_box label="Bloquer le suivi de trafic" name="block dwell" tool_tip="Cochez pour que la région ne comptabilise pas le trafic."/>
-			<check_box label="Bloquer le terraformage" name="block terraform" tool_tip="Cochez pour empêcher les personnes de terraformer leur terrain"/>
-			<check_box label="Bac à sable" name="is sandbox" tool_tip="Basculer cette région en bac à sable."/>
-			<button label="Figer le terrain" label_selected="Figer le terrain" name="Bake Terrain" tool_tip="Enregistrer le terrain actuel comme terrain par défaut." width="118" />
-			<button label="Rétablir le terrain" label_selected="Rétablir le terrain" name="Revert Terrain" tool_tip="Remplacer le terrain actuel avec le terrain par défaut." width="118" />
-			<button label="Échanger le terrain" label_selected="Échanger le terrain" name="Swap Terrain" tool_tip="Échangez le terrain actuel avec le terrain par défaut." width="118" />
-			<text name="estate id">
-				ID du domaine :
-			</text>
-			<text name="parent id">
-				ID parent :
-			</text>
-			<line_editor name="parentestate" tool_tip="Il s&apos;agit du domaine parent de cette région"/>
-			<text name="Grid Pos: ">
-				Position sur la grille :
-			</text>
-			<line_editor name="gridposx" tool_tip="Position x de cette région sur la grille" left_delta="120" width="35"/>
-			<line_editor name="gridposy" tool_tip="Position y de cette région sur la grille" left_delta="40" width="35" />
-			<text name="Redirect to Grid: ">
-				Rediriger vers la grille :
-			</text>
-			<line_editor left_delta="120" name="redirectx" width="35" />
-			<line_editor left_delta="40" name="redirecty" width="35" />
-			<spinner left="320" name="billable factor" width="70" />
-			<text name="billable factor text" font="SansSerifSmall" left_delta="-120" width="120">
-				Facteur de facturation :
-			</text>
-			<spinner left="320" name="land cost" width="70" />
-			<text name="land cost text" left_delta="-120">
-				L$ par m² :
-			</text>
-			<button label="Rafraîchir" label_selected="Rafraîchir" name="Refresh" tool_tip="Cliquez ici pour rafraîchir les informations ci-dessus."/>
-			<button label="Appliquer" label_selected="Appliquer" name="Apply" tool_tip="Cliquez ici pour appliquer les modifications effectuées ci-dessus."/>
-			<button label="Sélectionner une région" label_selected="Sélectionner une région" name="Select Region" tool_tip="Sélectionnez une région entière à l&apos;aide de l&apos;outil Terrain."  width="140" left="136"/>
-			<button label="Sauvegarde automatique" label_selected="Sauvegarde automatique" name="Autosave now" tool_tip="Sauvegarde automatique au format gzip." width="140" left="136"/>
-		</panel>
-		<panel label="Objets" name="objects">
-			<text name="Sim Name:" width="70">
-				Nom du sim :
-			</text>
-			<text name="region name" left_delta="75">
-				Welsh
-			</text>
-			<check_box label="Désactiver les &#10;scripts" name="disable scripts" tool_tip="Cochez pour désactiver tous les scripts dans cette région"/>
-			<check_box label="Désactiver les &#10;collisions" name="disable collisions" tool_tip="Cochez pour désactiver les collisions entre non-avatars dans cette région"/>
-			<check_box label="Désactiver les &#10;propriétés physiques" name="disable physics" tool_tip="Cochez pour désactiver toutes les propriétés physiques dans cette région"/>
-			<button label="Appliquer" label_selected="Appliquer" name="Apply" tool_tip="Cliquez ici pour appliquer les modifications effectuées ci-dessus."  bottom="-85"/>
-			<button label="Définir la cible" label_selected="Définir la cible" name="Set Target" tool_tip="Définir l&apos;avatar cible pour la suppression de l&apos;objet."/>
-			<text name="target_avatar_name">
-				(aucune cible)
-			</text>
-			<button label="Supprimer tous les objets scriptés de la cible sur les terrains des autres" label_selected="Supprimer tous les objets scriptés de la cible sur les terrains des autres" name="Delete Target&apos;s Scripted Objects On Others Land" tool_tip="Supprimer tous les objets scriptés appartenant à la cible sur les terrains ne lui appartenant pas. Les objets non reproductibles seront renvoyés."/>
-			<button label="Supprimer les objets scriptés de la cible sur *tous* les terrains" label_selected="Supprimer les objets scriptés de la cible sur *tous* les terrains" name="Delete Target&apos;s Scripted Objects On *Any* Land" tool_tip="Supprimer les objets scriptés appartenant à la cible dans cette région. Les objets non reproductibles seront renvoyés."/>
-			<button label="Supprimer *tous* les objets de la cible" label_selected="Supprimer *tous* les objets de la cible" name="Delete *ALL* Of Target&apos;s Objects" tool_tip="Supprimer tous les objets appartenant à la cible dans cette région. Les objets non reproductibles seront renvoyés."/>
-			<button width="300" label="Afficher les objets souvent responsables de collision" label_selected="Afficher les objets souvent responsables de collision" name="Get Top Colliders" tool_tip="Dresse une liste des objets avec les callbacks les plus fréquents. "/>
-			<button width="300" label="Afficher les scripts fréquemment utilisés" label_selected="Afficher les scripts fréquemment utilisés" name="Get Top Scripts" tool_tip="Dresse une liste des objets qui passent le plus de temps à exécuter des scripts."/>
-			<button width="300" label="Résumé des scripts" label_selected="Résumé des scripts" name="Scripts digest" tool_tip="Dresse une liste des scripts et de leurs occurrences."/>
-		</panel>
-		<panel label="Requête" name="request">
-			<text name="Destination:">
-				Destination :
-			</text>
-			<combo_box name="destination">
-				<combo_item name="Selection">
-					Sélection
-				</combo_item>
-				<combo_item name="AgentRegion">
-					Région de l&apos;avatar
-				</combo_item>
-			</combo_box>
-			<text name="Request:">
-				Requête :
-			</text>
-			<combo_box name="request">
-				<combo_item name="colliders&lt;steps&gt;">
-					Objets responsables de collisions : étapes
-				</combo_item>
-				<combo_item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
-					Nombre de scripts et schéma optionnel
-				</combo_item>
-				<combo_item name="objects&lt;pattern&gt;">
-					Schéma des objets
-				</combo_item>
-				<combo_item name="rez&lt;asset_id&gt;">
-					rezzer &lt;asset_id&gt;
-				</combo_item>
-			</combo_box>
-			<text name="Parameter:">
-				Paramètre :
-			</text>
-			<button label="Effectuer la requête" label_selected="Effectuer la requête" name="Make Request" width="140"/>
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="godtools floater" title="Outils divins">
+	<tab_container name="GodTools Tabs">
+		<panel label="Grille" name="grid">
+			<button label="Éjecter tous" label_selected="Éjecter tous" name="Kick all users" width="175" />
+			<button label="Vider le cache cartographique de la région" label_selected="Vider le cache cartographique de la région" name="Flush This Region&apos;s Map Visibility Caches" width="285"/>
+		</panel>
+		<panel label="Région" name="region">
+			<text name="Sim Name:" width="70">
+				Nom du sim :
+			</text>
+			<line_editor left="85" name="region name" width="198" />
+			<check_box label="Initiation" name="check prelude" tool_tip="Définir cette région comme zone d&apos;initiation."/>
+			<check_box label="Soleil fixe" name="check fixed sun" tool_tip="Définir la position du soleil (comme dans Région et Domaine &gt; Terrain.)"/>
+			<check_box label="Réinitialiser le domicile &#10;à la téléportation" name="check reset home" tool_tip="Lorsqu&apos;un résident se téléporte à l&apos;extérieur, réinitialise son domicile à la position de sa destination."  height="32"/>
+			<check_box label="Visible" name="check visible" tool_tip="Cochez pour rendre la région visible aux non-admins."  bottom_delta="-32"/>
+			<check_box label="Dégâts" name="check damage" tool_tip="Cochez pour activer les dégâts dans cette région."/>
+			<check_box label="Bloquer le suivi de trafic" name="block dwell" tool_tip="Cochez pour que la région ne comptabilise pas le trafic."/>
+			<check_box label="Bloquer le terraformage" name="block terraform" tool_tip="Cochez pour empêcher les personnes de terraformer leur terrain"/>
+			<check_box label="Bac à sable" name="is sandbox" tool_tip="Basculer cette région en bac à sable."/>
+			<button label="Figer le terrain" label_selected="Figer le terrain" name="Bake Terrain" tool_tip="Enregistrer le terrain actuel comme terrain par défaut." width="118" />
+			<button label="Rétablir le terrain" label_selected="Rétablir le terrain" name="Revert Terrain" tool_tip="Remplacer le terrain actuel avec le terrain par défaut." width="118" />
+			<button label="Échanger le terrain" label_selected="Échanger le terrain" name="Swap Terrain" tool_tip="Échangez le terrain actuel avec le terrain par défaut." width="118" />
+			<text name="estate id">
+				ID du domaine :
+			</text>
+			<text name="parent id">
+				ID parent :
+			</text>
+			<line_editor name="parentestate" tool_tip="Il s&apos;agit du domaine parent de cette région"/>
+			<text name="Grid Pos: ">
+				Position sur la grille :
+			</text>
+			<line_editor name="gridposx" tool_tip="Position x de cette région sur la grille" left_delta="120" width="35"/>
+			<line_editor name="gridposy" tool_tip="Position y de cette région sur la grille" left_delta="40" width="35" />
+			<text name="Redirect to Grid: ">
+				Rediriger vers la grille :
+			</text>
+			<line_editor left_delta="120" name="redirectx" width="35" />
+			<line_editor left_delta="40" name="redirecty" width="35" />
+			<spinner left="320" name="billable factor" width="70" />
+			<text name="billable factor text" font="SansSerifSmall" left_delta="-120" width="120">
+				Facteur de facturation :
+			</text>
+			<spinner left="320" name="land cost" width="70" />
+			<text name="land cost text" left_delta="-120">
+				L$ par m² :
+			</text>
+			<button label="Rafraîchir" label_selected="Rafraîchir" name="Refresh" tool_tip="Cliquez ici pour rafraîchir les informations ci-dessus."/>
+			<button label="Appliquer" label_selected="Appliquer" name="Apply" tool_tip="Cliquez ici pour appliquer les modifications effectuées ci-dessus."/>
+			<button label="Sélectionner une région" label_selected="Sélectionner une région" name="Select Region" tool_tip="Sélectionnez une région entière à l&apos;aide de l&apos;outil Terrain."  width="140" left="136"/>
+			<button label="Sauvegarde automatique" label_selected="Sauvegarde automatique" name="Autosave now" tool_tip="Sauvegarde automatique au format gzip." width="140" left="136"/>
+		</panel>
+		<panel label="Objets" name="objects">
+			<text name="Sim Name:" width="70">
+				Nom du sim :
+			</text>
+			<text name="region name" left_delta="75">
+				Welsh
+			</text>
+			<check_box label="Désactiver les &#10;scripts" name="disable scripts" tool_tip="Cochez pour désactiver tous les scripts dans cette région"/>
+			<check_box label="Désactiver les &#10;collisions" name="disable collisions" tool_tip="Cochez pour désactiver les collisions entre non-avatars dans cette région"/>
+			<check_box label="Désactiver les &#10;propriétés physiques" name="disable physics" tool_tip="Cochez pour désactiver toutes les propriétés physiques dans cette région"/>
+			<button label="Appliquer" label_selected="Appliquer" name="Apply" tool_tip="Cliquez ici pour appliquer les modifications effectuées ci-dessus."  bottom="-85"/>
+			<button label="Définir la cible" label_selected="Définir la cible" name="Set Target" tool_tip="Définir l&apos;avatar cible pour la suppression de l&apos;objet."/>
+			<text name="target_avatar_name">
+				(aucune cible)
+			</text>
+			<button label="Supprimer tous les objets scriptés de la cible sur les terrains des autres" label_selected="Supprimer tous les objets scriptés de la cible sur les terrains des autres" name="Delete Target&apos;s Scripted Objects On Others Land" tool_tip="Supprimer tous les objets scriptés appartenant à la cible sur les terrains ne lui appartenant pas. Les objets non reproductibles seront renvoyés."/>
+			<button label="Supprimer les objets scriptés de la cible sur *tous* les terrains" label_selected="Supprimer les objets scriptés de la cible sur *tous* les terrains" name="Delete Target&apos;s Scripted Objects On *Any* Land" tool_tip="Supprimer les objets scriptés appartenant à la cible dans cette région. Les objets non reproductibles seront renvoyés."/>
+			<button label="Supprimer *tous* les objets de la cible" label_selected="Supprimer *tous* les objets de la cible" name="Delete *ALL* Of Target&apos;s Objects" tool_tip="Supprimer tous les objets appartenant à la cible dans cette région. Les objets non reproductibles seront renvoyés."/>
+			<button width="300" label="Afficher les objets souvent responsables de collision" label_selected="Afficher les objets souvent responsables de collision" name="Get Top Colliders" tool_tip="Dresse une liste des objets avec les callbacks les plus fréquents. "/>
+			<button width="300" label="Afficher les scripts fréquemment utilisés" label_selected="Afficher les scripts fréquemment utilisés" name="Get Top Scripts" tool_tip="Dresse une liste des objets qui passent le plus de temps à exécuter des scripts."/>
+			<button width="300" label="Résumé des scripts" label_selected="Résumé des scripts" name="Scripts digest" tool_tip="Dresse une liste des scripts et de leurs occurrences."/>
+		</panel>
+		<panel label="Requête" name="request">
+			<text name="Destination:">
+				Destination :
+			</text>
+			<combo_box name="destination">
+				<combo_box.item name="Selection">
+					Sélection
+				</combo_box.item>
+				<combo_box.item name="AgentRegion">
+					Région de l&apos;avatar
+				</combo_box.item>
+			</combo_box>
+			<text name="Request:">
+				Requête :
+			</text>
+			<combo_box name="request">
+				<combo_box.item name="colliders&lt;steps&gt;">
+					Objets responsables de collisions : étapes
+				</combo_box.item>
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
+					Nombre de scripts et schéma optionnel
+				</combo_box.item>
+				<combo_box.item name="objects&lt;pattern&gt;">
+					Schéma des objets
+				</combo_box.item>
+				<combo_box.item name="rez&lt;asset_id&gt;">
+					rezzer &lt;asset_id&gt;
+				</combo_box.item>
+			</combo_box>
+			<text name="Parameter:">
+				Paramètre :
+			</text>
+			<button label="Effectuer la requête" label_selected="Effectuer la requête" name="Make Request" width="140"/>
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml b/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml
index 461bd8dae4..eb632bc9a8 100644
--- a/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Hardware Settings Floater" title="Configuration du matériel">
-	<text name="Filtering:">
-		Filtres :
-	</text>
-	<check_box label="Filtre anisotrope (plus lent si activé)" name="ani"/>
-	<text name="Antialiasing:">
-		Anti-aliasing :
-	</text>
-	<combo_box label="Anti-aliasing" name="fsaa" width="84">
-		<combo_item name="FSAADisabled">
-			Désactivé
-		</combo_item>
-		<combo_item name="2x">
-			2x
-		</combo_item>
-		<combo_item name="4x">
-			4x
-		</combo_item>
-		<combo_item name="8x">
-			8x
-		</combo_item>
-		<combo_item name="16x">
-			16x
-		</combo_item>
-	</combo_box>
-	<spinner label="Gamma :" name="gamma"/>
-	<text left="217" name="(brightness, lower is brighter)">
-		(0 = défaut, valeur faible = plus lumineux)
-	</text>
-	<text name="Enable VBO:">
-		Activer le VBO :
-	</text>
-	<check_box label="Activer OpenGL Vertex Buffer Objects" name="vbo" tool_tip="Sur un matériel moderne, cette option permet une meilleure performance. Par contre, sur un matériel plus ancien, les VBO sont souvent mal implémentés et peuvent causer des crashs lorsqu&apos;ils sont activés."/>
-	<slider label="Mémoire vidéo (Mo) :" name="GrapicsCardTextureMemory" tool_tip="Total de la mémoire alloué aux textures. Mémoire de la carte vidéo par défaut. En réduisant cette valeur, vous pouvez accroître la performance mais les textures risquent de devenir floues."/>
-	<spinner label="Indice du brouillard :" name="fog"/>
-	<button label="OK" label_selected="OK" name="OK"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Hardware Settings Floater" title="Configuration du matériel">
+	<text name="Filtering:">
+		Filtres :
+	</text>
+	<check_box label="Filtre anisotrope (plus lent si activé)" name="ani"/>
+	<text name="Antialiasing:">
+		Anti-aliasing :
+	</text>
+	<combo_box label="Anti-aliasing" name="fsaa" width="84">
+		<combo_box.item name="FSAADisabled">
+			Désactivé
+		</combo_box.item>
+		<combo_box.item name="2x">
+			2x
+		</combo_box.item>
+		<combo_box.item name="4x">
+			4x
+		</combo_box.item>
+		<combo_box.item name="8x">
+			8x
+		</combo_box.item>
+		<combo_box.item name="16x">
+			16x
+		</combo_box.item>
+	</combo_box>
+	<spinner label="Gamma :" name="gamma"/>
+	<text left="217" name="(brightness, lower is brighter)">
+		(0 = défaut, valeur faible = plus lumineux)
+	</text>
+	<text name="Enable VBO:">
+		Activer le VBO :
+	</text>
+	<check_box label="Activer OpenGL Vertex Buffer Objects" name="vbo" tool_tip="Sur un matériel moderne, cette option permet une meilleure performance. Par contre, sur un matériel plus ancien, les VBO sont souvent mal implémentés et peuvent causer des crashs lorsqu&apos;ils sont activés."/>
+	<slider label="Mémoire vidéo (Mo) :" name="GrapicsCardTextureMemory" tool_tip="Total de la mémoire alloué aux textures. Mémoire de la carte vidéo par défaut. En réduisant cette valeur, vous pouvez accroître la performance mais les textures risquent de devenir floues."/>
+	<spinner label="Indice du brouillard :" name="fog"/>
+	<button label="OK" label_selected="OK" name="OK"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_hud.xml b/indra/newview/skins/default/xui/fr/floater_hud.xml
index a8ce59f234..55c8b57ae2 100644
--- a/indra/newview/skins/default/xui/fr/floater_hud.xml
+++ b/indra/newview/skins/default/xui/fr/floater_hud.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_hud" title="Didacticiel" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_hud" title="Didacticiel" />
diff --git a/indra/newview/skins/default/xui/fr/floater_im.xml b/indra/newview/skins/default/xui/fr/floater_im.xml
index 8f347c0708..0c9ea2c913 100644
--- a/indra/newview/skins/default/xui/fr/floater_im.xml
+++ b/indra/newview/skins/default/xui/fr/floater_im.xml
@@ -1,45 +1,45 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<multi_floater name="im_floater" title="Message instantané">
-	<text name="only_user_message">
-		Vous êtes le seul participant à cette session.
-	</text>
-	<text name="offline_message">
-		[FIRST] [LAST] est déconnecté(e).
-	</text>
-	<string name="invite_message">
-		Pour accepter ce chat vocal/vous connecter, cliquez sur le bouton [BUTTON NAME].
-	</string>
-	<string name="muted_message">
-		Vous ignorez ce résident. Si vous lui envoyez un message, il ne sera plus ignoré.
-	</string>
-	<string name="generic_request_error">
-		Erreur lors de la requête, veuillez réessayer ultérieurement.
-	</string>
-	<string name="insufficient_perms_error">
-		Vous n&apos;avez pas les permissions requises.
-	</string>
-	<string name="session_does_not_exist_error">
-		La session a expiré
-	</string>
-	<string name="no_ability_error">
-		Vous n&apos;avez pas ce pouvoir.
-	</string>
-	<string name="not_a_mod_error">
-		Vous n&apos;êtes pas modérateur de session.
-	</string>
-	<string name="muted_error">
-		Un modérateur de groupe a désactivé votre chat écrit.
-	</string>
-	<string name="add_session_event">
-		Impossible d&apos;ajouter des participants à la session de chat avec [RECIPIENT].
-	</string>
-	<string name="message_session_event">
-		Impossible d&apos;envoyer votre message à la session de chat avec [RECIPIENT].
-	</string>
-	<string name="removed_from_group">
-		Vous avez été supprimé du groupe.
-	</string>
-	<string name="close_on_no_ability">
-		Vous ne pouvez plus participer à la session de chat.
-	</string>
-</multi_floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<multi_floater name="im_floater" title="Message instantané">
+	<text name="only_user_message">
+		Vous êtes le seul participant à cette session.
+	</text>
+	<text name="offline_message">
+		[FIRST] [LAST] est déconnecté(e).
+	</text>
+	<string name="invite_message">
+		Pour accepter ce chat vocal/vous connecter, cliquez sur le bouton [BUTTON NAME].
+	</string>
+	<string name="muted_message">
+		Vous ignorez ce résident. Si vous lui envoyez un message, il ne sera plus ignoré.
+	</string>
+	<string name="generic_request_error">
+		Erreur lors de la requête, veuillez réessayer ultérieurement.
+	</string>
+	<string name="insufficient_perms_error">
+		Vous n&apos;avez pas les permissions requises.
+	</string>
+	<string name="session_does_not_exist_error">
+		La session a expiré
+	</string>
+	<string name="no_ability_error">
+		Vous n&apos;avez pas ce pouvoir.
+	</string>
+	<string name="not_a_mod_error">
+		Vous n&apos;êtes pas modérateur de session.
+	</string>
+	<string name="muted_error">
+		Un modérateur de groupe a désactivé votre chat écrit.
+	</string>
+	<string name="add_session_event">
+		Impossible d&apos;ajouter des participants à la session de chat avec [RECIPIENT].
+	</string>
+	<string name="message_session_event">
+		Impossible d&apos;envoyer votre message à la session de chat avec [RECIPIENT].
+	</string>
+	<string name="removed_from_group">
+		Vous avez été supprimé du groupe.
+	</string>
+	<string name="close_on_no_ability">
+		Vous ne pouvez plus participer à la session de chat.
+	</string>
+</multi_floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_image_preview.xml b/indra/newview/skins/default/xui/fr/floater_image_preview.xml
index 2477fb684f..3af7dc9113 100644
--- a/indra/newview/skins/default/xui/fr/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/fr/floater_image_preview.xml
@@ -1,52 +1,52 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Image Preview" title="">
-	<text name="name_label">
-		Nom :
-	</text>
-	<text name="description_label">
-		Description :
-	</text>
-	<text name="preview_label">
-		Prévisualiser comme :
-	</text>
-	<combo_box label="Habits" name="clothing_type_combo" left="126" >
-		<combo_item name="Image">
-			Image
-		</combo_item>
-		<combo_item name="Hair">
-			Cheveux
-		</combo_item>
-		<combo_item name="FemaleHead">
-			Tête de femme
-		</combo_item>
-		<combo_item name="FemaleUpperBody">
-			Corps de femme (haut)
-		</combo_item>
-		<combo_item name="FemaleLowerBody">
-			Corps de femme (bas)
-		</combo_item>
-		<combo_item name="MaleHead">
-			Tête d&apos;homme
-		</combo_item>
-		<combo_item name="MaleUpperBody">
-			Corps d&apos;homme (haut)
-		</combo_item>
-		<combo_item name="MaleLowerBody">
-			Corps d&apos;homme (bas)
-		</combo_item>
-		<combo_item name="Skirt">
-			Jupe
-		</combo_item>
-		<combo_item name="SculptedPrim">
-			Sculptie
-		</combo_item>
-	</combo_box>
-	<text name="bad_image_text">
-		Impossible de lire l&apos;image.
-
-Sauvegardez en Targa 24 bit (.tga).
-	</text>
-	<check_box label="Utiliser une compression sans perte" name="lossless_check"/>
-	<button label="Annuler" name="cancel_btn"/>
-	<button label="Charger ([AMOUNT] L$)" name="ok_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Image Preview" title="">
+	<text name="name_label">
+		Nom :
+	</text>
+	<text name="description_label">
+		Description :
+	</text>
+	<text name="preview_label">
+		Prévisualiser comme :
+	</text>
+	<combo_box label="Habits" name="clothing_type_combo" left="126" >
+		<combo_box.item name="Image">
+			Image
+		</combo_box.item>
+		<combo_box.item name="Hair">
+			Cheveux
+		</combo_box.item>
+		<combo_box.item name="FemaleHead">
+			Tête de femme
+		</combo_box.item>
+		<combo_box.item name="FemaleUpperBody">
+			Corps de femme (haut)
+		</combo_box.item>
+		<combo_box.item name="FemaleLowerBody">
+			Corps de femme (bas)
+		</combo_box.item>
+		<combo_box.item name="MaleHead">
+			Tête d&apos;homme
+		</combo_box.item>
+		<combo_box.item name="MaleUpperBody">
+			Corps d&apos;homme (haut)
+		</combo_box.item>
+		<combo_box.item name="MaleLowerBody">
+			Corps d&apos;homme (bas)
+		</combo_box.item>
+		<combo_box.item name="Skirt">
+			Jupe
+		</combo_box.item>
+		<combo_box.item name="SculptedPrim">
+			Sculptie
+		</combo_box.item>
+	</combo_box>
+	<text name="bad_image_text">
+		Impossible de lire l&apos;image.
+
+Sauvegardez en Targa 24 bit (.tga).
+	</text>
+	<check_box label="Utiliser une compression sans perte" name="lossless_check"/>
+	<button label="Annuler" name="cancel_btn"/>
+	<button label="Charger ([AMOUNT] L$)" name="ok_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_inspect.xml b/indra/newview/skins/default/xui/fr/floater_inspect.xml
index ac5f79c321..f140c66de0 100644
--- a/indra/newview/skins/default/xui/fr/floater_inspect.xml
+++ b/indra/newview/skins/default/xui/fr/floater_inspect.xml
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="inspect" title="Inspecter les objets">
-	<scroll_list name="object_list"
-	     tool_tip="Sélectionner un objet de la liste pour le mettre en surbrillance dans le Monde.">
-		<column label="Nom" name="object_name" />
-		<column label="Propriétaire" name="owner_name" />
-		<column label="Créateur" name="creator_name" />
-		<column label="Date de création" name="creation_date" />
-	</scroll_list>
-	<button label="Voir le profil du propriétaire..." name="button owner" width="172"
-	     tool_tip="Voir le profil du propriétaire de l&apos;objet en surbrillance" />
-	<button label="Voir le profil du créateur..." name="button creator" left="192" width="172"
-	     tool_tip="Voir le profil du créateur de l&apos;objet en surbrillance" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="inspect" title="Inspecter les objets">
+	<scroll_list name="object_list"
+	     tool_tip="Sélectionner un objet de la liste pour le mettre en surbrillance dans le Monde.">
+		<column label="Nom" name="object_name" />
+		<column label="Propriétaire" name="owner_name" />
+		<column label="Créateur" name="creator_name" />
+		<column label="Date de création" name="creation_date" />
+	</scroll_list>
+	<button label="Voir le profil du propriétaire..." name="button owner" width="172"
+	     tool_tip="Voir le profil du propriétaire de l&apos;objet en surbrillance" />
+	<button label="Voir le profil du créateur..." name="button creator" left="192" width="172"
+	     tool_tip="Voir le profil du créateur de l&apos;objet en surbrillance" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_inventory.xml b/indra/newview/skins/default/xui/fr/floater_inventory.xml
index ba545ec631..071c0ae133 100644
--- a/indra/newview/skins/default/xui/fr/floater_inventory.xml
+++ b/indra/newview/skins/default/xui/fr/floater_inventory.xml
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Inventory" title="Inventaire">
-	<search_editor label="Saisissez votre recherche ici" name="inventory search editor"/>
-	<tab_container name="inventory filter tabs">
-		<inventory_panel label="Tous les objets" name="All Items"/>
-		<inventory_panel label="Objets récents" name="Recent Items"/>
-	</tab_container>
-	<menu_bar name="Inventory Menu">
-		<menu label="Fichier" name="File">
-			<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
-			<menu_item_call label="Ouvrir" name="Open"/>
-			<menu_item_call label="Nouvelle fenêtre" name="New Window"/>
-			<menu_item_call label="Afficher les filtres" name="Show Filters"/>
-			<menu_item_call label="Réinitialiser les filtres" name="Reset Current"/>
-			<menu_item_call label="Fermer tous les dossiers" name="Close All Folders"/>
-			<menu_item_call label="Vider la corbeille" name="Empty Trash"/>
-		</menu>
-		<menu label="Créer" name="Create">
-			<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
-			<menu_item_call label="Nouveau dossier" name="New Folder"/>
-			<menu_item_call label="Nouveau script" name="New Script"/>
-			<menu_item_call label="Nouvelle note" name="New Note"/>
-			<menu_item_call label="Nouveau geste" name="New Gesture"/>
-			<menu name="New Clothes">
-				<menu_item_call label="Nouvelle chemise" name="New Shirt"/>
-				<menu_item_call label="Nouveau pantalon" name="New Pants"/>
-				<menu_item_call label="Nouvelles chaussures" name="New Shoes"/>
-				<menu_item_call label="Nouvelles chaussettes" name="New Socks"/>
-				<menu_item_call label="Nouvelle veste" name="New Jacket"/>
-				<menu_item_call label="Nouvelle jupe" name="New Skirt"/>
-				<menu_item_call label="Nouveaux gants" name="New Gloves"/>
-				<menu_item_call label="Nouveau tricot" name="New Undershirt"/>
-				<menu_item_call label="Nouveaux sous-vêtements" name="New Underpants"/>
-			</menu>
-			<menu name="New Body Parts">
-				<menu_item_call label="Nouvelle silhouette" name="New Shape"/>
-				<menu_item_call label="Nouvelle peau" name="New Skin"/>
-				<menu_item_call label="Nouveaux cheveux" name="New Hair"/>
-				<menu_item_call label="Nouveaux yeux" name="New Eyes"/>
-			</menu>
-		</menu>
-		<menu label="Trier" name="Sort">
-			<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
-			<menu_item_check label="Par nom" name="By Name"/>
-			<menu_item_check label="Par date" name="By Date"/>
-			<menu_item_check label="Trier les dossiers par nom" name="Folders Always By Name"/>
-			<menu_item_check label="Dossiers système en premier" name="System Folders To Top"/>
-		</menu>
-		<menu label="Filters" name="Filters">
-			<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
-			<menu_item_check label="Modifier actuel" name="Modify Current"/>
-			<menu_item_call label="Réinitialiser actuel" name="Reset Current"/>
-		</menu>
-	</menu_bar>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Inventory" title="Inventaire">
+	<search_editor label="Saisissez votre recherche ici" name="inventory search editor"/>
+	<tab_container name="inventory filter tabs">
+		<inventory_panel label="Tous les objets" name="All Items"/>
+		<inventory_panel label="Objets récents" name="Recent Items"/>
+	</tab_container>
+	<menu_bar name="Inventory Menu">
+		<menu label="Fichier" name="File">
+			<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
+			<menu_item_call label="Ouvrir" name="Open"/>
+			<menu_item_call label="Nouvelle fenêtre" name="New Window"/>
+			<menu_item_call label="Afficher les filtres" name="Show Filters"/>
+			<menu_item_call label="Réinitialiser les filtres" name="Reset Current"/>
+			<menu_item_call label="Fermer tous les dossiers" name="Close All Folders"/>
+			<menu_item_call label="Vider la corbeille" name="Empty Trash"/>
+		</menu>
+		<menu label="Créer" name="Create">
+			<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
+			<menu_item_call label="Nouveau dossier" name="New Folder"/>
+			<menu_item_call label="Nouveau script" name="New Script"/>
+			<menu_item_call label="Nouvelle note" name="New Note"/>
+			<menu_item_call label="Nouveau geste" name="New Gesture"/>
+			<menu name="New Clothes">
+				<menu_item_call label="Nouvelle chemise" name="New Shirt"/>
+				<menu_item_call label="Nouveau pantalon" name="New Pants"/>
+				<menu_item_call label="Nouvelles chaussures" name="New Shoes"/>
+				<menu_item_call label="Nouvelles chaussettes" name="New Socks"/>
+				<menu_item_call label="Nouvelle veste" name="New Jacket"/>
+				<menu_item_call label="Nouvelle jupe" name="New Skirt"/>
+				<menu_item_call label="Nouveaux gants" name="New Gloves"/>
+				<menu_item_call label="Nouveau tricot" name="New Undershirt"/>
+				<menu_item_call label="Nouveaux sous-vêtements" name="New Underpants"/>
+			</menu>
+			<menu name="New Body Parts">
+				<menu_item_call label="Nouvelle silhouette" name="New Shape"/>
+				<menu_item_call label="Nouvelle peau" name="New Skin"/>
+				<menu_item_call label="Nouveaux cheveux" name="New Hair"/>
+				<menu_item_call label="Nouveaux yeux" name="New Eyes"/>
+			</menu>
+		</menu>
+		<menu label="Trier" name="Sort">
+			<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
+			<menu_item_check label="Par nom" name="By Name"/>
+			<menu_item_check label="Par date" name="By Date"/>
+			<menu_item_check label="Trier les dossiers par nom" name="Folders Always By Name"/>
+			<menu_item_check label="Dossiers système en premier" name="System Folders To Top"/>
+		</menu>
+		<menu label="Filters" name="Filters">
+			<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
+			<menu_item_check label="Modifier actuel" name="Modify Current"/>
+			<menu_item_call label="Réinitialiser actuel" name="Reset Current"/>
+		</menu>
+	</menu_bar>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml
index 823546e5df..92dbc36a03 100644
--- a/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml
@@ -1,85 +1,85 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="item properties" title="Propriétés de l&apos;objet de l&apos;inventaire">
-	<text name="LabelItemNameTitle">
-		Nom :
-	</text>
-	<text name="LabelItemDescTitle">
-		Description :
-	</text>
-	<text name="LabelCreatorTitle">
-		Créateur :
-	</text>
-	<text name="LabelCreatorName">
-		Nicole Linden
-	</text>
-	<button label="Profil..." label_selected="" name="BtnCreator"/>
-	<text name="LabelOwnerTitle">
-		Propriétaire :
-	</text>
-	<text name="LabelOwnerName">
-		Thrax Linden
-	</text>
-	<button label="Profil..." label_selected="" name="BtnOwner"/>
-	<text name="LabelAcquiredTitle">
-		Acquis :
-	</text>
-	<text name="LabelAcquiredDate">
-		Wed May 24 12:50:46 2006
-	</text>
-	<text name="OwnerLabel">
-		Vous pouvez :
-	</text>
-	<check_box label="Modifier" name="CheckOwnerModify"/>
-	<check_box label="Copier" name="CheckOwnerCopy"/>
-	<check_box label="Revendre/Donner" name="CheckOwnerTransfer"/>
-	<text name="BaseMaskDebug">
-		B :
-	</text>
-	<text name="OwnerMaskDebug">
-		O :
-	</text>
-	<text name="GroupMaskDebug">
-		G :
-	</text>
-	<text name="EveryoneMaskDebug">
-		E :
-	</text>
-	<text name="NextMaskDebug">
-		N :
-	</text>
-	<check_box label="Partager avec le groupe" name="CheckShareWithGroup"/>
-	<check_box label="Autoriser tout le monde à copier" name="CheckEveryoneCopy"/>
-	<text name="NextOwnerLabel" width="192">
-		Le prochain propriétaire pourra :
-	</text>
-	<check_box label="Modifier" name="CheckNextOwnerModify"/>
-	<check_box label="Copier" name="CheckNextOwnerCopy"/>
-	<check_box label="Revendre/Donner" name="CheckNextOwnerTransfer"/>
-	<text name="SaleLabel">
-		Marquer l&apos;objet :
-	</text>
-	<check_box label="À vendre" name="CheckPurchase"/>
-	<radio_group name="RadioSaleType">
-		<radio_item name="radio">
-			Original
-		</radio_item>
-		<radio_item name="radio2">
-			Copie
-		</radio_item>
-	</radio_group>
-	<text name="TextPrice">
-		Prix :  L$
-	</text>
-	<string name="unknown">
-		(inconnu)
-	</string>
-	<string name="public">
-		(public)
-	</string>
-	<string name="you_can">
-		Vous pouvez :
-	</string>
-	<string name="owner_can">
-		Le propriétaire peut :
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="item properties" title="Propriétés de l&apos;objet de l&apos;inventaire">
+	<text name="LabelItemNameTitle">
+		Nom :
+	</text>
+	<text name="LabelItemDescTitle">
+		Description :
+	</text>
+	<text name="LabelCreatorTitle">
+		Créateur :
+	</text>
+	<text name="LabelCreatorName">
+		Nicole Linden
+	</text>
+	<button label="Profil..." label_selected="" name="BtnCreator"/>
+	<text name="LabelOwnerTitle">
+		Propriétaire :
+	</text>
+	<text name="LabelOwnerName">
+		Thrax Linden
+	</text>
+	<button label="Profil..." label_selected="" name="BtnOwner"/>
+	<text name="LabelAcquiredTitle">
+		Acquis :
+	</text>
+	<text name="LabelAcquiredDate">
+		Wed May 24 12:50:46 2006
+	</text>
+	<text name="OwnerLabel">
+		Vous pouvez :
+	</text>
+	<check_box label="Modifier" name="CheckOwnerModify"/>
+	<check_box label="Copier" name="CheckOwnerCopy"/>
+	<check_box label="Revendre/Donner" name="CheckOwnerTransfer"/>
+	<text name="BaseMaskDebug">
+		B :
+	</text>
+	<text name="OwnerMaskDebug">
+		O :
+	</text>
+	<text name="GroupMaskDebug">
+		G :
+	</text>
+	<text name="EveryoneMaskDebug">
+		E :
+	</text>
+	<text name="NextMaskDebug">
+		N :
+	</text>
+	<check_box label="Partager avec le groupe" name="CheckShareWithGroup"/>
+	<check_box label="Autoriser tout le monde à copier" name="CheckEveryoneCopy"/>
+	<text name="NextOwnerLabel" width="192">
+		Le prochain propriétaire pourra :
+	</text>
+	<check_box label="Modifier" name="CheckNextOwnerModify"/>
+	<check_box label="Copier" name="CheckNextOwnerCopy"/>
+	<check_box label="Revendre/Donner" name="CheckNextOwnerTransfer"/>
+	<text name="SaleLabel">
+		Marquer l&apos;objet :
+	</text>
+	<check_box label="À vendre" name="CheckPurchase"/>
+	<radio_group name="RadioSaleType">
+		<radio_item name="radio">
+			Original
+		</radio_item>
+		<radio_item name="radio2">
+			Copie
+		</radio_item>
+	</radio_group>
+	<text name="TextPrice">
+		Prix :  L$
+	</text>
+	<string name="unknown">
+		(inconnu)
+	</string>
+	<string name="public">
+		(public)
+	</string>
+	<string name="you_can">
+		Vous pouvez :
+	</string>
+	<string name="owner_can">
+		Le propriétaire peut :
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml
index 99bc0a2410..090f5f6bc9 100644
--- a/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml
@@ -1,24 +1,24 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Inventory Finder" title="inventory_recent_items">
-	<check_box label="Animations" name="check_animation"/>
-	<check_box label="Cartes de visite" name="check_calling_card"/>
-	<check_box label="Habits" name="check_clothing"/>
-	<check_box label="Gestes" name="check_gesture"/>
-	<check_box label="Repères" name="check_landmark"/>
-	<check_box label="Notes" name="check_notecard"/>
-	<check_box label="Objets" name="check_object"/>
-	<check_box label="Scripts" name="check_script"/>
-	<check_box label="Sons" name="check_sound"/>
-	<check_box label="Textures" name="check_texture"/>
-	<check_box label="Photos" name="check_snapshot"/>
-	<button label="Tout" label_selected="Tout" name="All" width="70"/>
-	<button label="Aucun" label_selected="Aucun" name="None" width="70" bottom="-260" left="83"/>
-	<check_box label="Toujours montrer &#10;les dossiers" name="check_show_empty" bottom="-284"/>
-	<check_box label="Depuis la déconnexion" name="check_since_logoff" bottom="-318"/>
-	<text length="1" name="- OR -" type="string">
-		Ou il y a...
-	</text>
-	<spinner label="Heures" name="spin_hours_ago"/>
-	<spinner label="Jours" name="spin_days_ago"/>
-	<button label="Fermer" label_selected="Fermer" name="Close"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Inventory Finder" title="inventory_recent_items">
+	<check_box label="Animations" name="check_animation"/>
+	<check_box label="Cartes de visite" name="check_calling_card"/>
+	<check_box label="Habits" name="check_clothing"/>
+	<check_box label="Gestes" name="check_gesture"/>
+	<check_box label="Repères" name="check_landmark"/>
+	<check_box label="Notes" name="check_notecard"/>
+	<check_box label="Objets" name="check_object"/>
+	<check_box label="Scripts" name="check_script"/>
+	<check_box label="Sons" name="check_sound"/>
+	<check_box label="Textures" name="check_texture"/>
+	<check_box label="Photos" name="check_snapshot"/>
+	<button label="Tout" label_selected="Tout" name="All" width="70"/>
+	<button label="Aucun" label_selected="Aucun" name="None" width="70" bottom="-260" left="83"/>
+	<check_box label="Toujours montrer &#10;les dossiers" name="check_show_empty" bottom="-284"/>
+	<check_box label="Depuis la déconnexion" name="check_since_logoff" bottom="-318"/>
+	<text length="1" name="- OR -" type="string">
+		Ou il y a...
+	</text>
+	<spinner label="Heures" name="spin_hours_ago"/>
+	<spinner label="Jours" name="spin_days_ago"/>
+	<button label="Fermer" label_selected="Fermer" name="Close"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_joystick.xml b/indra/newview/skins/default/xui/fr/floater_joystick.xml
index 49810f8ec9..be336c827e 100644
--- a/indra/newview/skins/default/xui/fr/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/fr/floater_joystick.xml
@@ -1,85 +1,85 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Joystick" title="Configuration du joystick">
-	<check_box name="enable_joystick">
-		Activer :
-	</check_box>
-	<spinner label="Mapping axe des X " name="JoystickAxis1"/>
-	<spinner label="Mapping axe des Y" name="JoystickAxis2"/>
-	<spinner label="Mapping axe des Z" name="JoystickAxis0"/>
-	<spinner label="Mapping du tangage" label_width="111" left="8" name="JoystickAxis4" width="152"/>
-	<spinner label="Mapping du lacet" name="JoystickAxis5"/>
-	<spinner label="Mapping du roulis" name="JoystickAxis3"/>
-	<spinner label="Mapping du zoom" name="JoystickAxis6"/>
-	<check_box label="Zoom direct" name="ZoomDirect"/>
-	<check_box label="Curseur 3D" name="Cursor3D"/>
-	<check_box label="Niveau automatique" name="AutoLeveling"/>
-	<text name="Control Modes:">
-		Modes de contrôle :
-	</text>
-	<check_box name="JoystickAvatarEnabled">
-		Avatar
-	</check_box>
-	<check_box name="JoystickBuildEnabled">
-		Build
-	</check_box>
-	<check_box name="JoystickFlycamEnabled">
-		Flycam
-	</check_box>
-	<text name="XScale">
-		Échelle des X
-	</text>
-	<text name="YScale">
-		Échelle des Y
-	</text>
-	<text name="ZScale">
-		Échelle des Z
-	</text>
-	<text left="9" name="PitchScale" width="104">
-		Échelle du tangage
-	</text>
-	<text name="YawScale">
-		Échelle du lacet
-	</text>
-	<text name="RollScale">
-		Échelle du roulis
-	</text>
-	<text name="XDeadZone">
-		Zone neutre X
-	</text>
-	<text name="YDeadZone">
-		Zone neutre Y
-	</text>
-	<text name="ZDeadZone">
-		Zone neutre Z
-	</text>
-	<text left="4" name="PitchDeadZone" width="110">
-		Zone neutre Tangage
-	</text>
-	<text name="YawDeadZone">
-		Zone neutre lacet
-	</text>
-	<text name="RollDeadZone">
-		Zone neutre roulis
-	</text>
-	<text name="Feathering">
-		Feathering
-	</text>
-	<text name="ZoomScale2">
-		Échelle du zoom
-	</text>
-	<text left="6" name="ZoomDeadZone" width="110">
-		Zone neutre du zoom
-	</text>
-	<button label="Options par défaut du joystick" name="SpaceNavigatorDefaults"/>
-	<button label="OK" label_selected="OK" name="ok_btn"/>
-	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
-	<string name="JoystickMonitor">
-		Contrôle du joystick
-	</string>
-	<string name="Axis">
-		Axe [NUM]
-	</string>
-	<string name="NoDevice">
-		aucun joystick détecté
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Joystick" title="Configuration du joystick">
+	<check_box name="enable_joystick">
+		Activer :
+	</check_box>
+	<spinner label="Mapping axe des X " name="JoystickAxis1"/>
+	<spinner label="Mapping axe des Y" name="JoystickAxis2"/>
+	<spinner label="Mapping axe des Z" name="JoystickAxis0"/>
+	<spinner label="Mapping du tangage" label_width="111" left="8" name="JoystickAxis4" width="152"/>
+	<spinner label="Mapping du lacet" name="JoystickAxis5"/>
+	<spinner label="Mapping du roulis" name="JoystickAxis3"/>
+	<spinner label="Mapping du zoom" name="JoystickAxis6"/>
+	<check_box label="Zoom direct" name="ZoomDirect"/>
+	<check_box label="Curseur 3D" name="Cursor3D"/>
+	<check_box label="Niveau automatique" name="AutoLeveling"/>
+	<text name="Control Modes:">
+		Modes de contrôle :
+	</text>
+	<check_box name="JoystickAvatarEnabled">
+		Avatar
+	</check_box>
+	<check_box name="JoystickBuildEnabled">
+		Build
+	</check_box>
+	<check_box name="JoystickFlycamEnabled">
+		Flycam
+	</check_box>
+	<text name="XScale">
+		Échelle des X
+	</text>
+	<text name="YScale">
+		Échelle des Y
+	</text>
+	<text name="ZScale">
+		Échelle des Z
+	</text>
+	<text left="9" name="PitchScale" width="104">
+		Échelle du tangage
+	</text>
+	<text name="YawScale">
+		Échelle du lacet
+	</text>
+	<text name="RollScale">
+		Échelle du roulis
+	</text>
+	<text name="XDeadZone">
+		Zone neutre X
+	</text>
+	<text name="YDeadZone">
+		Zone neutre Y
+	</text>
+	<text name="ZDeadZone">
+		Zone neutre Z
+	</text>
+	<text left="4" name="PitchDeadZone" width="110">
+		Zone neutre Tangage
+	</text>
+	<text name="YawDeadZone">
+		Zone neutre lacet
+	</text>
+	<text name="RollDeadZone">
+		Zone neutre roulis
+	</text>
+	<text name="Feathering">
+		Feathering
+	</text>
+	<text name="ZoomScale2">
+		Échelle du zoom
+	</text>
+	<text left="6" name="ZoomDeadZone" width="110">
+		Zone neutre du zoom
+	</text>
+	<button label="Options par défaut du joystick" name="SpaceNavigatorDefaults"/>
+	<button label="OK" label_selected="OK" name="ok_btn"/>
+	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
+	<string name="JoystickMonitor">
+		Contrôle du joystick
+	</string>
+	<string name="Axis">
+		Axe [NUM]
+	</string>
+	<string name="NoDevice">
+		aucun joystick détecté
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_lagmeter.xml b/indra/newview/skins/default/xui/fr/floater_lagmeter.xml
index da51b1b426..54069c9c49 100644
--- a/indra/newview/skins/default/xui/fr/floater_lagmeter.xml
+++ b/indra/newview/skins/default/xui/fr/floater_lagmeter.xml
@@ -1,152 +1,152 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="Mesure du lag">
-	<button name="client_lagmeter" tool_tip="Statut du lag client"/>
-	<text name="client">
-		Client :
-	</text>
-	<text name="client_text">
-		Normal
-	</text>
-	<button name="network_lagmeter" tool_tip="Statut du lag réseau"/>
-	<text name="network">
-		Réseau :
-	</text>
-	<text name="network_text">
-		Normal
-	</text>
-	<button name="server_lagmeter" tool_tip="Statut du lag serveur"/>
-	<text name="server">
-		Serveur :
-	</text>
-	<text name="server_text">
-		Normal
-	</text>
-	<button label="?" name="server_help"/>
-	<button label="&gt;&gt;" name="minimize"/>
-	<string name="max_title_msg">
-		Mesure du lag
-	</string>
-	<string name="max_width_px">
-		360
-	</string>
-	<string name="min_title_msg">
-		Lag
-	</string>
-	<string name="min_width_px">
-		90
-	</string>
-	<string name="client_text_msg">
-		Client
-	</string>
-	<string name="client_frame_rate_critical_fps">
-		10
-	</string>
-	<string name="client_frame_rate_warning_fps">
-		15
-	</string>
-	<string name="client_frame_time_window_bg_msg">
-		Normal, fenêtre en arrière-plan
-	</string>
-	<string name="client_frame_time_critical_msg">
-		Taux de défilement client ci-dessous [CLIENT_FRAME_RATE_CRITICAL]
-	</string>
-	<string name="client_frame_time_warning_msg">
-		Taux de défilement client entre [CLIENT_FRAME_RATE_CRITICAL] et [CLIENT_FRAME_RATE_WARNING]
-	</string>
-	<string name="client_frame_time_normal_msg">
-		Normal
-	</string>
-	<string name="client_draw_distance_cause_msg">
-		Cause possible : la limite d&apos;affichage est trop élevée
-	</string>
-	<string name="client_texture_loading_cause_msg">
-		Cause possible : images en cours de chargement
-	</string>
-	<string name="client_texture_memory_cause_msg">
-		Cause possible : trop d&apos;images en mémoire
-	</string>
-	<string name="client_complex_objects_cause_msg">
-		Cause possible : trop d&apos;objets complexes dans la scène
-	</string>
-	<string name="network_text_msg">
-		Réseau
-	</string>
-	<string name="network_packet_loss_critical_pct">
-		10
-	</string>
-	<string name="network_packet_loss_warning_pct">
-		5
-	</string>
-	<string name="network_packet_loss_critical_msg">
-		La connexion perd plus de [NETWORK_PACKET_LOSS_CRITICAL] % de paquets
-	</string>
-	<string name="network_packet_loss_warning_msg">
-		La connexion perd entre [NETWORK_PACKET_LOSS_WARNING] % et [NETWORK_PACKET_LOSS_CRITICAL] % de paquets
-	</string>
-	<string name="network_performance_normal_msg">
-		Normal
-	</string>
-	<string name="network_ping_critical_ms">
-		600
-	</string>
-	<string name="network_ping_warning_ms">
-		300
-	</string>
-	<string name="network_ping_critical_msg">
-		Temps de connexion ping supérieur à [NETWORK_PING_CRITICAL] ms
-	</string>
-	<string name="network_ping_warning_msg">
-		Temps de connexion ping entre [NETWORK_PING_WARNING] et [NETWORK_PING_CRITICAL] ms
-	</string>
-	<string name="network_packet_loss_cause_msg">
-		Mauvaise connexion possible ou réglage de la bande passante trop élevé.
-	</string>
-	<string name="network_ping_cause_msg">
-		Mauvaise connexion possible ou app. de partage des fichiers
-	</string>
-	<string name="server_text_msg">
-		Serveur
-	</string>
-	<string name="server_frame_rate_critical_fps">
-		20
-	</string>
-	<string name="server_frame_rate_warning_fps">
-		30
-	</string>
-	<string name="server_single_process_max_time_ms">
-		20
-	</string>
-	<string name="server_frame_time_critical_msg">
-		Taux de défilement du simulateur au dessous de [SERVER_FRAME_RATE_CRITICAL]
-	</string>
-	<string name="server_frame_time_warning_msg">
-		Taux de défilement du simulateur entre [SERVER_FRAME_RATE_CRITICAL] et [SERVER_FRAME_RATE_WARNING]
-	</string>
-	<string name="server_frame_time_normal_msg">
-		Normal
-	</string>
-	<string name="server_physics_cause_msg">
-		Cause possible : trop d&apos;objets physiques
-	</string>
-	<string name="server_scripts_cause_msg">
-		Cause possible : trop d&apos;objets scriptés
-	</string>
-	<string name="server_net_cause_msg">
-		Cause possible : trop de trafic réseau
-	</string>
-	<string name="server_agent_cause_msg">
-		Cause possible : trop de personnes en mouvement dans la région
-	</string>
-	<string name="server_images_cause_msg">
-		Cause possible : trop de calculs d&apos;images
-	</string>
-	<string name="server_generic_cause_msg">
-		Cause possible : charge simulateur trop lourde
-	</string>
-	<string name="smaller_label">
-		&gt;&gt;
-	</string>
-	<string name="bigger_label">
-		&lt;&lt;
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_lagmeter" title="Mesure du lag">
+	<button name="client_lagmeter" tool_tip="Statut du lag client"/>
+	<text name="client">
+		Client :
+	</text>
+	<text name="client_text">
+		Normal
+	</text>
+	<button name="network_lagmeter" tool_tip="Statut du lag réseau"/>
+	<text name="network">
+		Réseau :
+	</text>
+	<text name="network_text">
+		Normal
+	</text>
+	<button name="server_lagmeter" tool_tip="Statut du lag serveur"/>
+	<text name="server">
+		Serveur :
+	</text>
+	<text name="server_text">
+		Normal
+	</text>
+	<button label="?" name="server_help"/>
+	<button label="&gt;&gt;" name="minimize"/>
+	<string name="max_title_msg">
+		Mesure du lag
+	</string>
+	<string name="max_width_px">
+		360
+	</string>
+	<string name="min_title_msg">
+		Lag
+	</string>
+	<string name="min_width_px">
+		90
+	</string>
+	<string name="client_text_msg">
+		Client
+	</string>
+	<string name="client_frame_rate_critical_fps">
+		10
+	</string>
+	<string name="client_frame_rate_warning_fps">
+		15
+	</string>
+	<string name="client_frame_time_window_bg_msg">
+		Normal, fenêtre en arrière-plan
+	</string>
+	<string name="client_frame_time_critical_msg">
+		Taux de défilement client ci-dessous [CLIENT_FRAME_RATE_CRITICAL]
+	</string>
+	<string name="client_frame_time_warning_msg">
+		Taux de défilement client entre [CLIENT_FRAME_RATE_CRITICAL] et [CLIENT_FRAME_RATE_WARNING]
+	</string>
+	<string name="client_frame_time_normal_msg">
+		Normal
+	</string>
+	<string name="client_draw_distance_cause_msg">
+		Cause possible : la limite d&apos;affichage est trop élevée
+	</string>
+	<string name="client_texture_loading_cause_msg">
+		Cause possible : images en cours de chargement
+	</string>
+	<string name="client_texture_memory_cause_msg">
+		Cause possible : trop d&apos;images en mémoire
+	</string>
+	<string name="client_complex_objects_cause_msg">
+		Cause possible : trop d&apos;objets complexes dans la scène
+	</string>
+	<string name="network_text_msg">
+		Réseau
+	</string>
+	<string name="network_packet_loss_critical_pct">
+		10
+	</string>
+	<string name="network_packet_loss_warning_pct">
+		5
+	</string>
+	<string name="network_packet_loss_critical_msg">
+		La connexion perd plus de [NETWORK_PACKET_LOSS_CRITICAL] % de paquets
+	</string>
+	<string name="network_packet_loss_warning_msg">
+		La connexion perd entre [NETWORK_PACKET_LOSS_WARNING] % et [NETWORK_PACKET_LOSS_CRITICAL] % de paquets
+	</string>
+	<string name="network_performance_normal_msg">
+		Normal
+	</string>
+	<string name="network_ping_critical_ms">
+		600
+	</string>
+	<string name="network_ping_warning_ms">
+		300
+	</string>
+	<string name="network_ping_critical_msg">
+		Temps de connexion ping supérieur à [NETWORK_PING_CRITICAL] ms
+	</string>
+	<string name="network_ping_warning_msg">
+		Temps de connexion ping entre [NETWORK_PING_WARNING] et [NETWORK_PING_CRITICAL] ms
+	</string>
+	<string name="network_packet_loss_cause_msg">
+		Mauvaise connexion possible ou réglage de la bande passante trop élevé.
+	</string>
+	<string name="network_ping_cause_msg">
+		Mauvaise connexion possible ou app. de partage des fichiers
+	</string>
+	<string name="server_text_msg">
+		Serveur
+	</string>
+	<string name="server_frame_rate_critical_fps">
+		20
+	</string>
+	<string name="server_frame_rate_warning_fps">
+		30
+	</string>
+	<string name="server_single_process_max_time_ms">
+		20
+	</string>
+	<string name="server_frame_time_critical_msg">
+		Taux de défilement du simulateur au dessous de [SERVER_FRAME_RATE_CRITICAL]
+	</string>
+	<string name="server_frame_time_warning_msg">
+		Taux de défilement du simulateur entre [SERVER_FRAME_RATE_CRITICAL] et [SERVER_FRAME_RATE_WARNING]
+	</string>
+	<string name="server_frame_time_normal_msg">
+		Normal
+	</string>
+	<string name="server_physics_cause_msg">
+		Cause possible : trop d&apos;objets physiques
+	</string>
+	<string name="server_scripts_cause_msg">
+		Cause possible : trop d&apos;objets scriptés
+	</string>
+	<string name="server_net_cause_msg">
+		Cause possible : trop de trafic réseau
+	</string>
+	<string name="server_agent_cause_msg">
+		Cause possible : trop de personnes en mouvement dans la région
+	</string>
+	<string name="server_images_cause_msg">
+		Cause possible : trop de calculs d&apos;images
+	</string>
+	<string name="server_generic_cause_msg">
+		Cause possible : charge simulateur trop lourde
+	</string>
+	<string name="smaller_label">
+		&gt;&gt;
+	</string>
+	<string name="bigger_label">
+		&lt;&lt;
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_land_holdings.xml b/indra/newview/skins/default/xui/fr/floater_land_holdings.xml
index a8121d77c6..4a63abf4e1 100644
--- a/indra/newview/skins/default/xui/fr/floater_land_holdings.xml
+++ b/indra/newview/skins/default/xui/fr/floater_land_holdings.xml
@@ -1,41 +1,41 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="land holdings floater" title="Mes terrains">
-	<scroll_list name="parcel list">
-		<column label="Nom" name="name" />
-		<column label="Emplacement" name="location" />
-		<column label="Surface" name="area" />
-		<column label="" name="hidden" />
-	</scroll_list>
-	<button label="Téléporter" label_selected="Téléporter" name="Teleport"
-	     tool_tip="Téléportez-vous au milieu de ce terrain." />
-	<button label="Voir sur la carte" label_selected="Voir sur la carte" name="Show on Map"
-	     tool_tip="Affichez ce terrain sur la carte du monde." />
-	<text name="contrib_label">
-		Vos contributions :
-	</text>
-	<scroll_list name="grant list">
-		<column label="Groupe" name="group" />
-		<column label="Surface" name="area" />
-	</scroll_list>
-	<text name="allowed_label">
-		Surface de terrain autorisée avec votre compte :
-	</text>
-	<text name="allowed_text">
-		[AREA] m²
-	</text>
-	<text name="current_label">
-		Surface occupée actuellement :
-	</text>
-	<text name="current_text">
-		[AREA] m²
-	</text>
-	<text name="available_label">
-		Disponible à l&apos;achat :
-	</text>
-	<text name="available_text">
-		[AREA] m²
-	</text>
-	<string name="area_string">
-		[AREA] m²
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="land holdings floater" title="Mes terrains">
+	<scroll_list name="parcel list">
+		<column label="Nom" name="name" />
+		<column label="Emplacement" name="location" />
+		<column label="Surface" name="area" />
+		<column label="" name="hidden" />
+	</scroll_list>
+	<button label="Téléporter" label_selected="Téléporter" name="Teleport"
+	     tool_tip="Téléportez-vous au milieu de ce terrain." />
+	<button label="Voir sur la carte" label_selected="Voir sur la carte" name="Show on Map"
+	     tool_tip="Affichez ce terrain sur la carte du monde." />
+	<text name="contrib_label">
+		Vos contributions :
+	</text>
+	<scroll_list name="grant list">
+		<column label="Groupe" name="group" />
+		<column label="Surface" name="area" />
+	</scroll_list>
+	<text name="allowed_label">
+		Surface de terrain autorisée avec votre compte :
+	</text>
+	<text name="allowed_text">
+		[AREA] m²
+	</text>
+	<text name="current_label">
+		Surface occupée actuellement :
+	</text>
+	<text name="current_text">
+		[AREA] m²
+	</text>
+	<text name="available_label">
+		Disponible à l&apos;achat :
+	</text>
+	<text name="available_text">
+		[AREA] m²
+	</text>
+	<string name="area_string">
+		[AREA] m²
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml
index 18f3a5d1d1..2ca6a85ea4 100644
--- a/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml
+++ b/indra/newview/skins/default/xui/fr/floater_live_lsleditor.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="script ed float" title="Script : Nouveau script">
-	<button label="Redéfinir" label_selected="Redéfinir" name="Reset" width="100" left="390"/>
-	<check_box label="Exécution en cours" name="running" left="4"/>
-	<check_box label="Mono" name="mono" left="130"/>
-	<string name="not_allowed">
-		Vous n&apos;êtes pas autorisé à afficher ce script.
-	</string>
-	<string name="script_running">
-		Exécution en cours
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="script ed float" title="Script : Nouveau script">
+	<button label="Redéfinir" label_selected="Redéfinir" name="Reset" width="100" left="390"/>
+	<check_box label="Exécution en cours" name="running" left="4"/>
+	<check_box label="Mono" name="mono" left="130"/>
+	<string name="not_allowed">
+		Vous n&apos;êtes pas autorisé à afficher ce script.
+	</string>
+	<string name="script_running">
+		Exécution en cours
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_lsl_guide.xml b/indra/newview/skins/default/xui/fr/floater_lsl_guide.xml
index ea39098a41..5dc0fa76a3 100644
--- a/indra/newview/skins/default/xui/fr/floater_lsl_guide.xml
+++ b/indra/newview/skins/default/xui/fr/floater_lsl_guide.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="script ed float" title="Wiki LSL">
-	<check_box label="Suivre le curseur" name="lock_check" />
-	<combo_box label="Verrouiller" name="history_combo" left_delta="120" width="70"/>
-	<button label="Précédente" name="back_btn" left_delta="75"/>
-	<button label="Suivante" name="fwd_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="script ed float" title="Wiki LSL">
+	<check_box label="Suivre le curseur" name="lock_check" />
+	<combo_box label="Verrouiller" name="history_combo" left_delta="120" width="70"/>
+	<button label="Précédente" name="back_btn" left_delta="75"/>
+	<button label="Suivante" name="fwd_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_media_browser.xml b/indra/newview/skins/default/xui/fr/floater_media_browser.xml
index d8da196f12..e75b45c43a 100644
--- a/indra/newview/skins/default/xui/fr/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/fr/floater_media_browser.xml
@@ -1,20 +1,20 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_about" title="Navigateur">
-	<layout_stack name="stack1">
-		<layout_panel name="nav_controls">
-			<button label="Précédente" name="back" width="75"/>
-			<button label="Suivante" left_delta="75" name="forward" width="70"/>
-			<button label="Rafraîchir" left_delta="75" name="reload"/>
-			<combo_box left_delta="75" name="address" width="510"/>
-			<button label="OK" left_delta="515" name="go"/>
-		</layout_panel>
-		<layout_panel name="parcel_owner_controls">
-			<button label="Envoyer l&apos;URL sur la parcelle" name="assign"/>
-		</layout_panel>
-		<layout_panel name="external_controls">
-			<button label="Ouvrir dans mon navigateur web" name="open_browser" width="196"/>
-			<check_box label="Toujours ouvrir dans mon navigateur web" left_delta="201" name="open_always"/>
-			<button label="Fermer" name="close"/>
-		</layout_panel>
-	</layout_stack>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_about" title="Navigateur">
+	<layout_stack name="stack1">
+		<layout_panel name="nav_controls">
+			<button label="Précédente" name="back" width="75"/>
+			<button label="Suivante" left_delta="75" name="forward" width="70"/>
+			<button label="Rafraîchir" left_delta="75" name="reload"/>
+			<combo_box left_delta="75" name="address" width="510"/>
+			<button label="OK" left_delta="515" name="go"/>
+		</layout_panel>
+		<layout_panel name="parcel_owner_controls">
+			<button label="Envoyer l&apos;URL sur la parcelle" name="assign"/>
+		</layout_panel>
+		<layout_panel name="external_controls">
+			<button label="Ouvrir dans mon navigateur web" name="open_browser" width="196"/>
+			<check_box label="Toujours ouvrir dans mon navigateur web" left_delta="201" name="open_always"/>
+			<button label="Fermer" name="close"/>
+		</layout_panel>
+	</layout_stack>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_mem_leaking.xml b/indra/newview/skins/default/xui/fr/floater_mem_leaking.xml
index 4b4a879cab..a22d0a2934 100644
--- a/indra/newview/skins/default/xui/fr/floater_mem_leaking.xml
+++ b/indra/newview/skins/default/xui/fr/floater_mem_leaking.xml
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="MemLeak" title="Simulation fuite mémoire">
-	<spinner label="Vitesse de la fuite (octets) :" name="leak_speed" />
-	<spinner label="Max mémoire perdue (Mo) :" name="max_leak" />
-	<text name="total_leaked_label">
-		Mémoire perdue actuelle : [SIZE] Ko
-	</text>
-	<text name="note_label_1">
-		[NOTE1]
-	</text>
-	<text name="note_label_2">
-		[NOTE2]
-	</text>
-	<button label="Commencer" name="start_btn" />
-	<button label="Stop" name="stop_btn" />
-	<button label="Libérer" name="release_btn" />
-	<button label="Fermer" name="close_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="MemLeak" title="Simulation fuite mémoire">
+	<spinner label="Vitesse de la fuite (octets) :" name="leak_speed" />
+	<spinner label="Max mémoire perdue (Mo) :" name="max_leak" />
+	<text name="total_leaked_label">
+		Mémoire perdue actuelle : [SIZE] Ko
+	</text>
+	<text name="note_label_1">
+		[NOTE1]
+	</text>
+	<text name="note_label_2">
+		[NOTE2]
+	</text>
+	<button label="Commencer" name="start_btn" />
+	<button label="Stop" name="stop_btn" />
+	<button label="Libérer" name="release_btn" />
+	<button label="Fermer" name="close_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_moveview.xml b/indra/newview/skins/default/xui/fr/floater_moveview.xml
index 7da1b46680..55ea8700a6 100644
--- a/indra/newview/skins/default/xui/fr/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/fr/floater_moveview.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="move floater" title="">
-	<button label="" label_selected="" name="turn left btn" tool_tip="Tourner à gauche"/>
-	<button label="" label_selected="" name="turn right btn" tool_tip="Tourner à droite"/>
-	<button label="" label_selected="" name="move up btn" tool_tip="Sauter ou voler vers le haut"/>
-	<button label="" label_selected="" name="move down btn" tool_tip="S&apos;accroupir ou voler vers le bas"/>
-	<button label="Voler" label_selected="Voler" name="fly btn" tool_tip="Démarrer/arrêter le vol"/>
-	<joystick_slide name="slide left btn" tool_tip="Se déplacer vers la gauche"/>
-	<joystick_slide name="slide right btn" tool_tip="Se déplacer vers la droite"/>
-	<joystick_turn name="forward btn" tool_tip="Se déplacer vers l&apos;avant"/>
-	<joystick_turn name="backward btn" tool_tip="Se déplacer vers l&apos;arrière"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="move floater" title="">
+	<button label="" label_selected="" name="turn left btn" tool_tip="Tourner à gauche"/>
+	<button label="" label_selected="" name="turn right btn" tool_tip="Tourner à droite"/>
+	<button label="" label_selected="" name="move up btn" tool_tip="Sauter ou voler vers le haut"/>
+	<button label="" label_selected="" name="move down btn" tool_tip="S&apos;accroupir ou voler vers le bas"/>
+	<button label="Voler" label_selected="Voler" name="fly btn" tool_tip="Démarrer/arrêter le vol"/>
+	<joystick_slide name="slide left btn" tool_tip="Se déplacer vers la gauche"/>
+	<joystick_slide name="slide right btn" tool_tip="Se déplacer vers la droite"/>
+	<joystick_turn name="forward btn" tool_tip="Se déplacer vers l&apos;avant"/>
+	<joystick_turn name="backward btn" tool_tip="Se déplacer vers l&apos;arrière"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_mute_object.xml b/indra/newview/skins/default/xui/fr/floater_mute_object.xml
index 61f40e8010..23d351f32d 100644
--- a/indra/newview/skins/default/xui/fr/floater_mute_object.xml
+++ b/indra/newview/skins/default/xui/fr/floater_mute_object.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="mute by name" title="Ignorer les objets par nom">
-	<text name="message">
-		Cette fonction ne marche que pour les chats et les IM,
-pas les sons. Saisissez le nom exact de l&apos;objet.
-	</text>
-	<line_editor name="object_name">
-		Nom de l&apos;objet
-	</line_editor>
-	<button label="OK" name="OK"/>
-	<button label="Annuler" name="Cancel"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="mute by name" title="Ignorer les objets par nom">
+	<text name="message">
+		Cette fonction ne marche que pour les chats et les IM,
+pas les sons. Saisissez le nom exact de l&apos;objet.
+	</text>
+	<line_editor name="object_name">
+		Nom de l&apos;objet
+	</line_editor>
+	<button label="OK" name="OK"/>
+	<button label="Annuler" name="Cancel"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_my_friends.xml b/indra/newview/skins/default/xui/fr/floater_my_friends.xml
index 552afee4c3..911647d8be 100644
--- a/indra/newview/skins/default/xui/fr/floater_my_friends.xml
+++ b/indra/newview/skins/default/xui/fr/floater_my_friends.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_my_friends" title="Contacts">
-	<tab_container name="friends_and_groups">
-		<panel label="Amis" name="friends_panel" />
-		<panel label="Groupes" name="groups_panel" />
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_my_friends" title="Contacts">
+	<tab_container name="friends_and_groups">
+		<panel label="Amis" name="friends_panel" />
+		<panel label="Groupes" name="groups_panel" />
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_openobject.xml b/indra/newview/skins/default/xui/fr/floater_openobject.xml
index 5d8f0bed46..36c712e8a3 100644
--- a/indra/newview/skins/default/xui/fr/floater_openobject.xml
+++ b/indra/newview/skins/default/xui/fr/floater_openobject.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="objectcontents" title="Contenu des objets">
-	<text type="string" length="1" name="object_name">
-		[DESC]:
-	</text>
-	<button label="Copier vers l&apos;inventaire" label_selected="Copier vers l&apos;inventaire" name="copy_to_inventory_button" width="132" />
-	<button label="Copier et porter" label_selected="Copier et porter" name="copy_and_wear_button" left="152"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="objectcontents" title="Contenu des objets">
+	<text type="string" length="1" name="object_name">
+		[DESC]:
+	</text>
+	<button label="Copier vers l&apos;inventaire" label_selected="Copier vers l&apos;inventaire" name="copy_to_inventory_button" width="132" />
+	<button label="Copier et porter" label_selected="Copier et porter" name="copy_and_wear_button" left="152"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_pay.xml b/indra/newview/skins/default/xui/fr/floater_pay.xml
index 08251de71b..c5b689e2dd 100644
--- a/indra/newview/skins/default/xui/fr/floater_pay.xml
+++ b/indra/newview/skins/default/xui/fr/floater_pay.xml
@@ -1,22 +1,22 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Give Money" title="">
-	<button label="1 L$" label_selected="1 L$" name="fastpay 1"/>
-	<button label="5 L$" label_selected="5 L$" name="fastpay 5"/>
-	<button label="10 L$" label_selected="10 L$" name="fastpay 10"/>
-	<button label="20 L$" label_selected="20 L$" name="fastpay 20"/>
-	<button label="Payer" label_selected="Payer" name="pay btn"/>
-	<button label="Annuler" label_selected="Annuler" name="cancel btn"/>
-	<text length="1" name="payee_label" type="string" left="5">
-		Payer :
-	</text>
-	<text length="1" name="payee_name" type="string">
-		[FIRST] [LAST]
-	</text>
-	<text length="1" name="fastpay text" type="string" width="100" halign="left">
-		Paiement rapide :
-	</text>
-	<text left="4" length="1" name="amount text" type="string">
-		Montant :
-	</text>
-	<line_editor left="60" name="amount" width="55"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Give Money" title="">
+	<button label="1 L$" label_selected="1 L$" name="fastpay 1"/>
+	<button label="5 L$" label_selected="5 L$" name="fastpay 5"/>
+	<button label="10 L$" label_selected="10 L$" name="fastpay 10"/>
+	<button label="20 L$" label_selected="20 L$" name="fastpay 20"/>
+	<button label="Payer" label_selected="Payer" name="pay btn"/>
+	<button label="Annuler" label_selected="Annuler" name="cancel btn"/>
+	<text length="1" name="payee_label" type="string" left="5">
+		Payer :
+	</text>
+	<text length="1" name="payee_name" type="string">
+		[FIRST] [LAST]
+	</text>
+	<text length="1" name="fastpay text" type="string" width="100" halign="left">
+		Paiement rapide :
+	</text>
+	<text left="4" length="1" name="amount text" type="string">
+		Montant :
+	</text>
+	<line_editor left="60" name="amount" width="55"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_pay_object.xml b/indra/newview/skins/default/xui/fr/floater_pay_object.xml
index 53599554fb..3dc0af75e8 100644
--- a/indra/newview/skins/default/xui/fr/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/fr/floater_pay_object.xml
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Give Money" title="">
-	<text length="1" name="payee_group" type="string" width="95">
-		Payer le groupe :
-	</text>
-	<text length="1" name="payee_resident" type="string" width="100" halign="left" >
-		Payer le résident :
-	</text>
-	<text length="1" name="payee_name" type="string" left="105">
-		[FIRST] [LAST]
-	</text>
-	<text length="1" name="object_name_label" type="string" left="25">
-		Via un objet :
-	</text>
-	<text length="1" name="object_name_text" type="string" left="105">
-		...
-	</text>
-	<text length="1" name="fastpay text" type="string" width="95">
-		Paiement rapide :
-	</text>
-	<text length="1" name="amount text" type="string" left="5" halign="left">
-		Montant :
-	</text>
-	<button label="1 L$" label_selected="1 L$" name="fastpay 1" left="105" />
-	<button label="5 L$" label_selected="5 L$" name="fastpay 5" left="190"/>
-	<button label="10 L$" label_selected="10 L$" name="fastpay 10" left="105" />
-	<button label="20 L$" label_selected="20 L$" name="fastpay 20" left="190"/>
-	<button label="Payer" label_selected="Payer" name="pay btn"/>
-	<button label="Annuler" label_selected="Annuler" name="cancel btn"/>
-	<line_editor left="65" name="amount" width="50" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Give Money" title="">
+	<text length="1" name="payee_group" type="string" width="95">
+		Payer le groupe :
+	</text>
+	<text length="1" name="payee_resident" type="string" width="100" halign="left" >
+		Payer le résident :
+	</text>
+	<text length="1" name="payee_name" type="string" left="105">
+		[FIRST] [LAST]
+	</text>
+	<text length="1" name="object_name_label" type="string" left="25">
+		Via un objet :
+	</text>
+	<text length="1" name="object_name_text" type="string" left="105">
+		...
+	</text>
+	<text length="1" name="fastpay text" type="string" width="95">
+		Paiement rapide :
+	</text>
+	<text length="1" name="amount text" type="string" left="5" halign="left">
+		Montant :
+	</text>
+	<button label="1 L$" label_selected="1 L$" name="fastpay 1" left="105" />
+	<button label="5 L$" label_selected="5 L$" name="fastpay 5" left="190"/>
+	<button label="10 L$" label_selected="10 L$" name="fastpay 10" left="105" />
+	<button label="20 L$" label_selected="20 L$" name="fastpay 20" left="190"/>
+	<button label="Payer" label_selected="Payer" name="pay btn"/>
+	<button label="Annuler" label_selected="Annuler" name="cancel btn"/>
+	<line_editor left="65" name="amount" width="50" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_post_process.xml b/indra/newview/skins/default/xui/fr/floater_post_process.xml
index 74c19dc299..52afb340a6 100644
--- a/indra/newview/skins/default/xui/fr/floater_post_process.xml
+++ b/indra/newview/skins/default/xui/fr/floater_post_process.xml
@@ -1,54 +1,54 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Post-Process Floater" title="Paramètres post-traitement">
-	<tab_container name="Post-Process Tabs">
-		<panel label="Filtre couleur" name="wmiColorFilterPanel">
-			<check_box label="Activer" name="wmiColorFilterToggle" />
-			<text name="wmiColorFilterBrightnessText">
-				Luminosité
-			</text>
-			<text name="wmiColorFilterSaturationText">
-				Saturation
-			</text>
-			<text name="wmiColorFilterContrastText">
-				Contraste
-			</text>
-			<text name="wmiColorFilterBaseText">
-				Couleur de base du contraste
-			</text>
-			<slider label="R" name="wmiColorFilterBaseR" />
-			<slider label="V" name="wmiColorFilterBaseG" />
-			<slider label="B" name="wmiColorFilterBaseB" />
-			<slider label="I" name="wmiColorFilterBaseI" />
-		</panel>
-		<panel label="Vision de nuit" name="wmiNightVisionPanel">
-			<check_box label="Activer" name="wmiNightVisionToggle" />
-			<text name="wmiNightVisionBrightMultText">
-				Multiple d&apos;amplificateur de lumière
-			</text>
-			<text name="wmiNightVisionNoiseSizeText">
-				Taille du bruit
-			</text>
-			<text name="wmiNightVisionNoiseStrengthText">
-				Force du bruit
-			</text>
-		</panel>
-		<panel label="Éclat" name="wmiBloomPanel">
-			<check_box label="Activer" name="wmiBloomToggle" />
-			<text name="wmiBloomExtractText">
-				Extraction de la luminosité
-			</text>
-			<text name="wmiBloomSizeText">
-				Taille de l&apos;éclat
-			</text>
-			<text name="wmiBloomStrengthText">
-				Force de l&apos;éclat
-			</text>
-		</panel>
-		<panel label="Extras" name="Extras">
-			<button label="Charger effet" label_selected="Charger effet" name="PPLoadEffect" />
-			<button label="Enregistrer effet" label_selected="Enregistrer effet"
-			     name="PPSaveEffect" />
-			<line_editor label="Nom de l&apos;effet" name="PPEffectNameEditor" />
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Post-Process Floater" title="Paramètres post-traitement">
+	<tab_container name="Post-Process Tabs">
+		<panel label="Filtre couleur" name="wmiColorFilterPanel">
+			<check_box label="Activer" name="wmiColorFilterToggle" />
+			<text name="wmiColorFilterBrightnessText">
+				Luminosité
+			</text>
+			<text name="wmiColorFilterSaturationText">
+				Saturation
+			</text>
+			<text name="wmiColorFilterContrastText">
+				Contraste
+			</text>
+			<text name="wmiColorFilterBaseText">
+				Couleur de base du contraste
+			</text>
+			<slider label="R" name="wmiColorFilterBaseR" />
+			<slider label="V" name="wmiColorFilterBaseG" />
+			<slider label="B" name="wmiColorFilterBaseB" />
+			<slider label="I" name="wmiColorFilterBaseI" />
+		</panel>
+		<panel label="Vision de nuit" name="wmiNightVisionPanel">
+			<check_box label="Activer" name="wmiNightVisionToggle" />
+			<text name="wmiNightVisionBrightMultText">
+				Multiple d&apos;amplificateur de lumière
+			</text>
+			<text name="wmiNightVisionNoiseSizeText">
+				Taille du bruit
+			</text>
+			<text name="wmiNightVisionNoiseStrengthText">
+				Force du bruit
+			</text>
+		</panel>
+		<panel label="Éclat" name="wmiBloomPanel">
+			<check_box label="Activer" name="wmiBloomToggle" />
+			<text name="wmiBloomExtractText">
+				Extraction de la luminosité
+			</text>
+			<text name="wmiBloomSizeText">
+				Taille de l&apos;éclat
+			</text>
+			<text name="wmiBloomStrengthText">
+				Force de l&apos;éclat
+			</text>
+		</panel>
+		<panel label="Extras" name="Extras">
+			<button label="Charger effet" label_selected="Charger effet" name="PPLoadEffect" />
+			<button label="Enregistrer effet" label_selected="Enregistrer effet"
+			     name="PPSaveEffect" />
+			<line_editor label="Nom de l&apos;effet" name="PPEffectNameEditor" />
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_postcard.xml b/indra/newview/skins/default/xui/fr/floater_postcard.xml
index a17f1f64c1..38eb0ced4a 100644
--- a/indra/newview/skins/default/xui/fr/floater_postcard.xml
+++ b/indra/newview/skins/default/xui/fr/floater_postcard.xml
@@ -1,45 +1,45 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Postcard" title="Envoyer la photo par e-mail">
-	<text name="to_label" width="135">
-		E-mail du destinataire :
-	</text>
-	<line_editor name="to_form" left="143" width="127" />
-	<text name="from_label">
-		Votre e-mail :
-	</text>
-	<line_editor name="from_form" left="143" width="127" />
-	<text name="name_label">
-		Votre nom :
-	</text>
-	<line_editor name="name_form" left="143" width="127" />
-	<text name="subject_label">
-		Sujet :
-	</text>
-	<line_editor name="subject_form" left="143" width="127" />
-	<line_editor label="Saisissez votre sujet ici." name="subject_form" />
-	<text name="msg_label">
-		Message :
-	</text>
-	<check_box label="Publier sur le web" name="allow_publish_check"
-	     tool_tip="Publiez cette carte postale sur le web." />
-	<check_box label="Contenu adulte" name="mature_check"
-	     tool_tip="Cette carte postale est à caractère adulte." />
-	<button label="?" name="publish_help_btn" />
-	<text_editor name="msg_form">
-		Saisissez votre message ici.
-	</text_editor>
-	<text name="fine_print">
-		Si le destinataire s&apos;inscrit sur Second Life, vous recevrez un bonus.
-	</text>
-	<button label="Annuler" name="cancel_btn" />
-	<button label="Envoyer" name="send_btn" />
-	<string name="default_subject">
-		Carte postale de Second Life.
-	</string>
-	<string name="default_message">
-		Ouvrez-moi !
-	</string>
-	<string name="upload_message">
-		Envoi en cours...
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Postcard" title="Envoyer la photo par e-mail">
+	<text name="to_label" width="135">
+		E-mail du destinataire :
+	</text>
+	<line_editor name="to_form" left="143" width="127" />
+	<text name="from_label">
+		Votre e-mail :
+	</text>
+	<line_editor name="from_form" left="143" width="127" />
+	<text name="name_label">
+		Votre nom :
+	</text>
+	<line_editor name="name_form" left="143" width="127" />
+	<text name="subject_label">
+		Sujet :
+	</text>
+	<line_editor name="subject_form" left="143" width="127" />
+	<line_editor label="Saisissez votre sujet ici." name="subject_form" />
+	<text name="msg_label">
+		Message :
+	</text>
+	<check_box label="Publier sur le web" name="allow_publish_check"
+	     tool_tip="Publiez cette carte postale sur le web." />
+	<check_box label="Contenu adulte" name="mature_check"
+	     tool_tip="Cette carte postale est à caractère adulte." />
+	<button label="?" name="publish_help_btn" />
+	<text_editor name="msg_form">
+		Saisissez votre message ici.
+	</text_editor>
+	<text name="fine_print">
+		Si le destinataire s&apos;inscrit sur Second Life, vous recevrez un bonus.
+	</text>
+	<button label="Annuler" name="cancel_btn" />
+	<button label="Envoyer" name="send_btn" />
+	<string name="default_subject">
+		Carte postale de Second Life.
+	</string>
+	<string name="default_message">
+		Ouvrez-moi !
+	</string>
+	<string name="upload_message">
+		Envoi en cours...
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_preferences.xml b/indra/newview/skins/default/xui/fr/floater_preferences.xml
index cb1e245ee4..9dab4d642c 100644
--- a/indra/newview/skins/default/xui/fr/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preferences.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Preferences" title="Préférences" min_width="330" width="626">
-	<button label="À propos" label_selected="À propos" name="About..." />
-	<button label="OK" label_selected="OK" name="OK" />
-	<button label="Annuler" label_selected="Annuler" name="Cancel" />
-	<button label="Appliquer" label_selected="Appliquer" name="Apply" />
-	<button label="Aide" label_selected="Aide" name="Help" />
-	<tab_container name="pref core" tab_width="126" width="626" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Preferences" title="Préférences" min_width="330" width="626">
+	<button label="À propos" label_selected="À propos" name="About..." />
+	<button label="OK" label_selected="OK" name="OK" />
+	<button label="Annuler" label_selected="Annuler" name="Cancel" />
+	<button label="Appliquer" label_selected="Appliquer" name="Apply" />
+	<button label="Aide" label_selected="Aide" name="Help" />
+	<tab_container name="pref core" tab_width="126" width="626" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_animation.xml b/indra/newview/skins/default/xui/fr/floater_preview_animation.xml
index bdb1e9eda5..0ee4ea1df6 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_animation.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview_anim">
-	<text type="string" length="1" name="desc txt">
-		Description :
-	</text>
-	<button label="Jouer dans le Monde" label_selected="Stop" name="Anim play btn"
-	     tool_tip="Jouer cette animation et partagez-la avec d&apos;autres." width="131" left="20"/>
-	<button label="Jouer localement" label_selected="Stop" name="Anim audition btn"
-	     tool_tip="Jouer cette animation et soyez le seul à la voir." width="125" left="162"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview_anim">
+	<text type="string" length="1" name="desc txt">
+		Description :
+	</text>
+	<button label="Jouer dans le Monde" label_selected="Stop" name="Anim play btn"
+	     tool_tip="Jouer cette animation et partagez-la avec d&apos;autres." width="131" left="20"/>
+	<button label="Jouer localement" label_selected="Stop" name="Anim audition btn"
+	     tool_tip="Jouer cette animation et soyez le seul à la voir." width="125" left="162"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_classified.xml b/indra/newview/skins/default/xui/fr/floater_preview_classified.xml
index 8322f3932d..1b6f26150d 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_classified.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_classified.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="classified_preview" title="Informations sur la petite annonce" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="classified_preview" title="Informations sur la petite annonce" />
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_event.xml b/indra/newview/skins/default/xui/fr/floater_preview_event.xml
index ed929c78e4..e7fc2aa8dd 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_event.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_event.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="event_preview" title="Informations sur l&apos;événement" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="event_preview" title="Informations sur l&apos;événement" />
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml b/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml
index 6c373030ad..5322993b0b 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml
@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="gesture_preview">
-	<string name="stop_txt">
-		Stop
-	</string>
-	<string name="preview_txt">
-		Prévisualiser
-	</string>
-	<string name="none_text">
-		-- Aucune --
-	</string>
-	<text name="desc_label">
-		Description :
-	</text>
-	<text name="trigger_label">
-		Déclencheur :
-	</text>
-	<text name="replace_text"
-	     tool_tip="Remplacer les raccourcis avec ces mots. Par exemple, remplacer le mot-clé « salut » par « bonjour » fera dire « je venais dire bonjour » au lieu de « je venais dire salut » dans le chat, et déclenchera le geste.">
-		Remplacer par :
-	</text>
-	<line_editor left="310" name="replace_editor"
-	     tool_tip="Remplacer les raccourcis avec ces mots. Par exemple, remplacer le mot-clé « salut » par « bonjour » fera dire « je venais dire bonjour » au lieu de « je venais dire salut » dans le chat, et déclenchera le geste"
-	     width="120" />
-	<text name="key_label">
-		Raccourci :
-	</text>
-	<combo_box label="Aucun" name="modifier_combo" width="55" />
-	<combo_box label="Aucun" name="key_combo" width="55" />
-	<text name="library_label">
-		Bibliothèque :
-	</text>
-	<text name="steps_label">
-		Étapes :
-	</text>
-	<scroll_list name="library_list">
-		Animation
-Son
-Chat
-Attendre
-	</scroll_list>
-	<button label="Ajouter &gt;&gt;" name="add_btn" />
-	<button label="Monter" name="up_btn" />
-	<button label="Descendre" name="down_btn" />
-	<button label="Supprimer" name="delete_btn" />
-	<text name="help_label">
-		Toutes les étapes ont lieu
-simultanément, sauf si vous
-ajoutez des pauses.
-	</text>
-	<radio_group name="animation_trigger_type">
-		<radio_item name="start">
-			Commencer
-		</radio_item>
-		<radio_item name="stop">
-			Stop
-		</radio_item>
-	</radio_group>
-	<check_box label="jusqu&apos;à la fin des animations" name="wait_anim_check" />
-	<check_box label="temps en secondes" name="wait_time_check" />
-	<check_box label="Actifs" name="active_check"
-	     tool_tip="Les gestes actifs peuvent être déclenchés en saisissant leur raccourci dans le chat ou en appuyant sur les raccourcis. Les gestes deviennent généralement inactifs lorsqu&apos;il y a un conflit entre les raccourcis." />
-	<button label="Prévisualiser" name="preview_btn" width="86" />
-	<button label="Enregistrer" name="save_btn" width="86" left_delta="96"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="gesture_preview">
+	<string name="stop_txt">
+		Stop
+	</string>
+	<string name="preview_txt">
+		Prévisualiser
+	</string>
+	<string name="none_text">
+		-- Aucune --
+	</string>
+	<text name="desc_label">
+		Description :
+	</text>
+	<text name="trigger_label">
+		Déclencheur :
+	</text>
+	<text name="replace_text"
+	     tool_tip="Remplacer les raccourcis avec ces mots. Par exemple, remplacer le mot-clé « salut » par « bonjour » fera dire « je venais dire bonjour » au lieu de « je venais dire salut » dans le chat, et déclenchera le geste.">
+		Remplacer par :
+	</text>
+	<line_editor left="310" name="replace_editor"
+	     tool_tip="Remplacer les raccourcis avec ces mots. Par exemple, remplacer le mot-clé « salut » par « bonjour » fera dire « je venais dire bonjour » au lieu de « je venais dire salut » dans le chat, et déclenchera le geste"
+	     width="120" />
+	<text name="key_label">
+		Raccourci :
+	</text>
+	<combo_box label="Aucun" name="modifier_combo" width="55" />
+	<combo_box label="Aucun" name="key_combo" width="55" />
+	<text name="library_label">
+		Bibliothèque :
+	</text>
+	<text name="steps_label">
+		Étapes :
+	</text>
+	<scroll_list name="library_list">
+		Animation
+Son
+Chat
+Attendre
+	</scroll_list>
+	<button label="Ajouter &gt;&gt;" name="add_btn" />
+	<button label="Monter" name="up_btn" />
+	<button label="Descendre" name="down_btn" />
+	<button label="Supprimer" name="delete_btn" />
+	<text name="help_label">
+		Toutes les étapes ont lieu
+simultanément, sauf si vous
+ajoutez des pauses.
+	</text>
+	<radio_group name="animation_trigger_type">
+		<radio_item name="start">
+			Commencer
+		</radio_item>
+		<radio_item name="stop">
+			Stop
+		</radio_item>
+	</radio_group>
+	<check_box label="jusqu&apos;à la fin des animations" name="wait_anim_check" />
+	<check_box label="temps en secondes" name="wait_time_check" />
+	<check_box label="Actifs" name="active_check"
+	     tool_tip="Les gestes actifs peuvent être déclenchés en saisissant leur raccourci dans le chat ou en appuyant sur les raccourcis. Les gestes deviennent généralement inactifs lorsqu&apos;il y a un conflit entre les raccourcis." />
+	<button label="Prévisualiser" name="preview_btn" width="86" />
+	<button label="Enregistrer" name="save_btn" width="86" left_delta="96"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_notecard.xml b/indra/newview/skins/default/xui/fr/floater_preview_notecard.xml
index 0de77b30cb..5e7d7b86ad 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_notecard.xml
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview notecard" title="Remarque :">
-	<button label="Enregistrer" label_selected="Enregistrer" name="Save" />
-	<text type="string" length="1" name="desc txt">
-		Description :
-	</text>
-	<text_editor type="string" length="1" name="Notecard Editor">
-		Chargement...
-	</text_editor>
-	<string name="no_object">
-		Impossible de trouver l&apos;objet contenant cette note.
-	</string>
-	<string name="not_allowed">
-		Vous n&apos;êtes pas autorisé à afficher cette note.
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview notecard" title="Remarque :">
+	<button label="Enregistrer" label_selected="Enregistrer" name="Save" />
+	<text type="string" length="1" name="desc txt">
+		Description :
+	</text>
+	<text_editor type="string" length="1" name="Notecard Editor">
+		Chargement...
+	</text_editor>
+	<string name="no_object">
+		Impossible de trouver l&apos;objet contenant cette note.
+	</string>
+	<string name="not_allowed">
+		Vous n&apos;êtes pas autorisé à afficher cette note.
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_sound.xml b/indra/newview/skins/default/xui/fr/floater_preview_sound.xml
index 030ef7951e..e55ca1a583 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_sound.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_sound.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview_sound">
-	<text type="string" length="1" name="desc txt">
-		Description :
-	</text>
-	<button label="Jouer dans le Monde" label_selected="Jouer dans le Monde"
-	     name="Sound play btn"
-	     tool_tip="Jouer ce son et partagez-le avec d&apos;autres." width="131" left_delta="-142"/>
-	<button label="Jouer localement" label_selected="Jouer localement"
-	     name="Sound audition btn"
-	     tool_tip="Jouer ce son et soyez le seul à l&apos;entendre." width="125" left="162"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview_sound">
+	<text type="string" length="1" name="desc txt">
+		Description :
+	</text>
+	<button label="Jouer dans le Monde" label_selected="Jouer dans le Monde"
+	     name="Sound play btn"
+	     tool_tip="Jouer ce son et partagez-le avec d&apos;autres." width="131" left_delta="-142"/>
+	<button label="Jouer localement" label_selected="Jouer localement"
+	     name="Sound audition btn"
+	     tool_tip="Jouer ce son et soyez le seul à l&apos;entendre." width="125" left="162"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_texture.xml b/indra/newview/skins/default/xui/fr/floater_preview_texture.xml
index 08f5eefa45..245847809e 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_texture.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_texture.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview_texture">
-	<text type="string" length="1" name="desc txt">
-		Description :
-	</text>
-	<text type="string" length="1" name="dimensions">
-		Dimensions : [WIDTH] x [HEIGHT]
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview_texture">
+	<text type="string" length="1" name="desc txt">
+		Description :
+	</text>
+	<text type="string" length="1" name="dimensions">
+		Dimensions : [WIDTH] x [HEIGHT]
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_region_info.xml b/indra/newview/skins/default/xui/fr/floater_region_info.xml
index be36b41f27..d69f212b86 100644
--- a/indra/newview/skins/default/xui/fr/floater_region_info.xml
+++ b/indra/newview/skins/default/xui/fr/floater_region_info.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="regioninfo" title="Région et domaine"/>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="regioninfo" title="Région et domaine"/>
diff --git a/indra/newview/skins/default/xui/fr/floater_report_abuse.xml b/indra/newview/skins/default/xui/fr/floater_report_abuse.xml
index 0ce671db32..3946219458 100644
--- a/indra/newview/skins/default/xui/fr/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/fr/floater_report_abuse.xml
@@ -1,183 +1,183 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_report_abuse" title="Signaler une infraction">
-	<texture_picker label="" name="screenshot"/>
-	<check_box label="Inclure une capture d&apos;écran" name="screen_check"/>
-	<text name="reporter_title" width="60">
-		Déposant :
-	</text>
-	<text name="reporter_field">
-		Loremipsum Dolorsitamut
-	</text>
-	<text name="sim_title">
-		Région :
-	</text>
-	<text name="sim_field">
-		Nom de la région
-	</text>
-	<text name="pos_title">
-		Position :
-	</text>
-	<text name="pos_field">
-		{128.1, 128.1, 15.4}
-	</text>
-	<text name="select_object_label">
-		Cliquez sur le bouton puis l&apos;objet :
-	</text>
-	<button label="" label_selected="" name="pick_btn" tool_tip="Le sélecteur d&apos;objet vous permet d&apos;identifier un objet comme sujet du rapport."/>
-	<text name="object_name_label">
-		Nom :
-	</text>
-	<text left_delta="70" name="object_name" width="105">
-		Consetetur Sadipscing
-	</text>
-	<text name="owner_name_label" width="66">
-		Propriétaire :
-	</text>
-	<text left_delta="70" name="owner_name" width="105">
-		Hendrerit Vulputate
-	</text>
-	<combo_box name="category_combo" tool_tip="Choisissez la catégorie qui décrit le mieux ce rapport">
-		<combo_item name="Select_category">
-			Sélectionnez une catégorie
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Âge &gt; « Age play »
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Âge &gt; Résident adulte sur Second Life pour adolescents
-		</combo_item>
-		
-		
-		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Assaut &gt; Bac à sable utilisé pour des combats/zone non sécurisée
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Assaut &gt; Zone sécurisée
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Assaut &gt; Bac à sable pour tests d&apos;armes à feu
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Commerce &gt; Incapacité à fournir un produit ou service
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Divulgation &gt; Informations sur la vie réelle
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Divulgation &gt; Écoute d&apos;un chat à distance
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Divulgation &gt; Informations sur Second Life/chat/IM
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Trouble de la paix &gt; Utilisation inadéquate des ressources de la région
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Trouble de la paix &gt; Nombre d&apos;objets scriptés excessif
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Trouble de la paix &gt; Abandon d&apos;objets
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Trouble de la paix &gt; Spam à répétition
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Trouble de la paix &gt; Spam à caractère commercial
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Fraude &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Fraude &gt; Terrain
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Fraude &gt; Vente pyramidale ou lettre-chaîne
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Fraude &gt; US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Harcèlement &gt; Spam visuel
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Harcèlement &gt; Diffamation envers des individus ou des groupes
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Harcèlement &gt; Immobilisation
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Harcèlement &gt;  Harcèlement sexuel
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Harcèlement &gt; Incitation à enfreindre les Conditions d&apos;utilisation
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Harcèlement &gt; Abus verbal
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Indécence &gt; Contenu ou comportement offensifs
-		</combo_item>
-		
-		
-		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Indécence &gt; Nom d&apos;avatar inapproprié
-		</combo_item>
-		
-		
-		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Violation de droits de propriété intellectuelle &gt; Suppression de contenu
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Violation de droits de propriété intellectuelle &gt; CopyBot ou exploitation abusive des permissions
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intolérance
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Terrain &gt; Utilisation abusive des ressources du bac à sable
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Terrain &gt; Empiètement &gt; Objets/textures
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Terrain &gt; Empiètement &gt; Particules
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Terrain &gt; Empiètement &gt; Arbres/plantes
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Paris/jeux d&apos;argent
-		</combo_item>
-		<combo_item name="Other">
-			Autre
-		</combo_item>
-	</combo_box>
-	<text name="abuser_name_title">
-		Nom du contrevenant :
-	</text>
-	<button label="Choisir le résident" label_selected="" name="select_abuser" tool_tip="Sélectionnez le nom du résident dans une liste"/>
-	<check_box label="Ne connaît pas le nom du contrevenant" name="omit_abuser_name" tool_tip="Cochez cette case si vous ne connaissez pas le nom du contrevenant"/>
-	<text name="abuser_name_title2">
-		Indiquez où l&apos;infraction a eu lieu :
-	</text>
-	<text name="sum_title">
-		Récapitulatif :
-	</text>
-	<text name="dscr_title">
-		Détails :
-	</text>
-	<text name="bug_aviso">
-		Indiquez la date, le lieu, la nature de l&apos;infraction, ainsi que
-tout chat ou IM relatif à l&apos;infraction, en étant aussi précis
-que possible. Pensez à indiquer un objet si possible.
-	</text>
-	<text bottom_delta="-16" name="incomplete_title">
-		Remarque : les rapports incomplets ne feront pas l&apos;objet d&apos;une
-enquête.
-	</text>
-	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
-	<button label="Signaler une infraction" label_selected="Signaler une infraction" name="send_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_report_abuse" title="Signaler une infraction">
+	<texture_picker label="" name="screenshot"/>
+	<check_box label="Inclure une capture d&apos;écran" name="screen_check"/>
+	<text name="reporter_title" width="60">
+		Déposant :
+	</text>
+	<text name="reporter_field">
+		Loremipsum Dolorsitamut
+	</text>
+	<text name="sim_title">
+		Région :
+	</text>
+	<text name="sim_field">
+		Nom de la région
+	</text>
+	<text name="pos_title">
+		Position :
+	</text>
+	<text name="pos_field">
+		{128.1, 128.1, 15.4}
+	</text>
+	<text name="select_object_label">
+		Cliquez sur le bouton puis l&apos;objet :
+	</text>
+	<button label="" label_selected="" name="pick_btn" tool_tip="Le sélecteur d&apos;objet vous permet d&apos;identifier un objet comme sujet du rapport."/>
+	<text name="object_name_label">
+		Nom :
+	</text>
+	<text left_delta="70" name="object_name" width="105">
+		Consetetur Sadipscing
+	</text>
+	<text name="owner_name_label" width="66">
+		Propriétaire :
+	</text>
+	<text left_delta="70" name="owner_name" width="105">
+		Hendrerit Vulputate
+	</text>
+	<combo_box name="category_combo" tool_tip="Choisissez la catégorie qui décrit le mieux ce rapport">
+		<combo_item name="Select_category">
+			Sélectionnez une catégorie
+		</combo_item>
+		<combo_item name="Age__Age_play">
+			Âge &gt; « Age play »
+		</combo_item>
+		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
+			Âge &gt; Résident adulte sur Second Life pour adolescents
+		</combo_item>
+		
+		
+		
+		<combo_item name="Assault__Combat_sandbox___unsafe_area">
+			Assaut &gt; Bac à sable utilisé pour des combats/zone non sécurisée
+		</combo_item>
+		<combo_item name="Assault__Safe_area">
+			Assaut &gt; Zone sécurisée
+		</combo_item>
+		<combo_item name="Assault__Weapons_testing_sandbox">
+			Assaut &gt; Bac à sable pour tests d&apos;armes à feu
+		</combo_item>
+		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
+			Commerce &gt; Incapacité à fournir un produit ou service
+		</combo_item>
+		<combo_item name="Disclosure__Real_world_information">
+			Divulgation &gt; Informations sur la vie réelle
+		</combo_item>
+		<combo_item name="Disclosure__Remotely_monitoring chat">
+			Divulgation &gt; Écoute d&apos;un chat à distance
+		</combo_item>
+		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
+			Divulgation &gt; Informations sur Second Life/chat/IM
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
+			Trouble de la paix &gt; Utilisation inadéquate des ressources de la région
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
+			Trouble de la paix &gt; Nombre d&apos;objets scriptés excessif
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Object_littering">
+			Trouble de la paix &gt; Abandon d&apos;objets
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Repetitive_spam">
+			Trouble de la paix &gt; Spam à répétition
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
+			Trouble de la paix &gt; Spam à caractère commercial
+		</combo_item>
+		<combo_item name="Fraud__L$">
+			Fraude &gt; L$
+		</combo_item>
+		<combo_item name="Fraud__Land">
+			Fraude &gt; Terrain
+		</combo_item>
+		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
+			Fraude &gt; Vente pyramidale ou lettre-chaîne
+		</combo_item>
+		<combo_item name="Fraud__US$">
+			Fraude &gt; US$
+		</combo_item>
+		<combo_item name="Harassment__Advert_farms___visual_spam">
+			Harcèlement &gt; Spam visuel
+		</combo_item>
+		<combo_item name="Harassment__Defaming_individuals_or_groups">
+			Harcèlement &gt; Diffamation envers des individus ou des groupes
+		</combo_item>
+		<combo_item name="Harassment__Impeding_movement">
+			Harcèlement &gt; Immobilisation
+		</combo_item>
+		<combo_item name="Harassment__Sexual_harassment">
+			Harcèlement &gt;  Harcèlement sexuel
+		</combo_item>
+		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
+			Harcèlement &gt; Incitation à enfreindre les Conditions d&apos;utilisation
+		</combo_item>
+		<combo_item name="Harassment__Verbal_abuse">
+			Harcèlement &gt; Abus verbal
+		</combo_item>
+		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
+			Indécence &gt; Contenu ou comportement offensifs
+		</combo_item>
+		
+		
+		
+		<combo_item name="Indecency__Inappropriate_avatar_name">
+			Indécence &gt; Nom d&apos;avatar inapproprié
+		</combo_item>
+		
+		
+		
+		<combo_item name="Intellectual_property_infringement_Content_Removal">
+			Violation de droits de propriété intellectuelle &gt; Suppression de contenu
+		</combo_item>
+		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
+			Violation de droits de propriété intellectuelle &gt; CopyBot ou exploitation abusive des permissions
+		</combo_item>
+		<combo_item name="Intolerance">
+			Intolérance
+		</combo_item>
+		<combo_item name="Land__Abuse_of_sandbox_resources">
+			Terrain &gt; Utilisation abusive des ressources du bac à sable
+		</combo_item>
+		<combo_item name="Land__Encroachment__Objects_textures">
+			Terrain &gt; Empiètement &gt; Objets/textures
+		</combo_item>
+		<combo_item name="Land__Encroachment__Particles">
+			Terrain &gt; Empiètement &gt; Particules
+		</combo_item>
+		<combo_item name="Land__Encroachment__Trees_plants">
+			Terrain &gt; Empiètement &gt; Arbres/plantes
+		</combo_item>
+		<combo_item name="Wagering_gambling">
+			Paris/jeux d&apos;argent
+		</combo_item>
+		<combo_item name="Other">
+			Autre
+		</combo_item>
+	</combo_box>
+	<text name="abuser_name_title">
+		Nom du contrevenant :
+	</text>
+	<button label="Choisir le résident" label_selected="" name="select_abuser" tool_tip="Sélectionnez le nom du résident dans une liste"/>
+	<check_box label="Ne connaît pas le nom du contrevenant" name="omit_abuser_name" tool_tip="Cochez cette case si vous ne connaissez pas le nom du contrevenant"/>
+	<text name="abuser_name_title2">
+		Indiquez où l&apos;infraction a eu lieu :
+	</text>
+	<text name="sum_title">
+		Récapitulatif :
+	</text>
+	<text name="dscr_title">
+		Détails :
+	</text>
+	<text name="bug_aviso">
+		Indiquez la date, le lieu, la nature de l&apos;infraction, ainsi que
+tout chat ou IM relatif à l&apos;infraction, en étant aussi précis
+que possible. Pensez à indiquer un objet si possible.
+	</text>
+	<text bottom_delta="-16" name="incomplete_title">
+		Remarque : les rapports incomplets ne feront pas l&apos;objet d&apos;une
+enquête.
+	</text>
+	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
+	<button label="Signaler une infraction" label_selected="Signaler une infraction" name="send_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_script_debug.xml b/indra/newview/skins/default/xui/fr/floater_script_debug.xml
index 3381e510e8..3664222fd2 100644
--- a/indra/newview/skins/default/xui/fr/floater_script_debug.xml
+++ b/indra/newview/skins/default/xui/fr/floater_script_debug.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<multi_floater name="script debug floater" title="Erreurs/alertes de scripts">
-	<tab_container name="Preview Tabs">
-		<floater label="Script" name="all_scripts" title="[All scripts]" />
-	</tab_container>
-</multi_floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<multi_floater name="script debug floater" title="Erreurs/alertes de scripts">
+	<tab_container name="Preview Tabs">
+		<floater label="Script" name="all_scripts" title="[All scripts]" />
+	</tab_container>
+</multi_floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_script_preview.xml b/indra/newview/skins/default/xui/fr/floater_script_preview.xml
index ff5d46c794..4b77d6b4cd 100644
--- a/indra/newview/skins/default/xui/fr/floater_script_preview.xml
+++ b/indra/newview/skins/default/xui/fr/floater_script_preview.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview lsl text" title="Script : Script de rotation">
-	<text type="string" length="1" name="desc txt">
-		Description :
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview lsl text" title="Script : Script de rotation">
+	<text type="string" length="1" name="desc txt">
+		Description :
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_script_queue.xml b/indra/newview/skins/default/xui/fr/floater_script_queue.xml
index d93fd92a76..55487f75db 100644
--- a/indra/newview/skins/default/xui/fr/floater_script_queue.xml
+++ b/indra/newview/skins/default/xui/fr/floater_script_queue.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="queue" title="Réinitialiser progression">
-	<button label="Fermer" label_selected="Fermer" name="close" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="queue" title="Réinitialiser progression">
+	<button label="Fermer" label_selected="Fermer" name="close" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_script_search.xml b/indra/newview/skins/default/xui/fr/floater_script_search.xml
index abc1e79f4b..1c20c9c34b 100644
--- a/indra/newview/skins/default/xui/fr/floater_script_search.xml
+++ b/indra/newview/skins/default/xui/fr/floater_script_search.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="script search" title="Recherche de scripts" width="320">
-	<check_box label="Non sensible à la casse" name="case_text"  left="75"/>
-	<button label="Rechercher" label_selected="Rechercher" name="search_btn" width="96"/>
-	<button label="Remplacer" label_selected="Remplacer" name="replace_btn" left="111" width="96"/>
-	<button label="Tout remplacer" label_selected="Tout remplacer" name="replace_all_btn" left="212" width="96"/>
-	<text type="string" length="1" name="txt" width="65">
-		Rechercher
-	</text>
-	<text type="string" length="1" name="txt2" width="65">
-		Remplacer
-	</text>
-	<line_editor left="75" name="search_text" width="240" />
-	<line_editor left="75" name="replace_text" width="240" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="script search" title="Recherche de scripts" width="320">
+	<check_box label="Non sensible à la casse" name="case_text"  left="75"/>
+	<button label="Rechercher" label_selected="Rechercher" name="search_btn" width="96"/>
+	<button label="Remplacer" label_selected="Remplacer" name="replace_btn" left="111" width="96"/>
+	<button label="Tout remplacer" label_selected="Tout remplacer" name="replace_all_btn" left="212" width="96"/>
+	<text type="string" length="1" name="txt" width="65">
+		Rechercher
+	</text>
+	<text type="string" length="1" name="txt2" width="65">
+		Remplacer
+	</text>
+	<line_editor left="75" name="search_text" width="240" />
+	<line_editor left="75" name="replace_text" width="240" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_select_key.xml b/indra/newview/skins/default/xui/fr/floater_select_key.xml
index fc8fae4bbe..0dc47df72b 100644
--- a/indra/newview/skins/default/xui/fr/floater_select_key.xml
+++ b/indra/newview/skins/default/xui/fr/floater_select_key.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="modal container">
-	<button label="Annuler" label_selected="Annuler" name="Cancel" />
-	<text name="Save item as:">
-		Appuyer sur une touche pour choisir
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="modal container">
+	<button label="Annuler" label_selected="Annuler" name="Cancel" />
+	<text name="Save item as:">
+		Appuyer sur une touche pour choisir
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_sell_land.xml b/indra/newview/skins/default/xui/fr/floater_sell_land.xml
index f14a5e4ea6..6c5044da5a 100644
--- a/indra/newview/skins/default/xui/fr/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/fr/floater_sell_land.xml
@@ -1,72 +1,72 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="sell land" title="Vendre terrain">
-	<text name="info_parcel_label" width="48">
-		Parcelle :
-	</text>
-	<text name="info_parcel" left="66">
-		PARCEL NAME
-	</text>
-	<text name="info_size_label">
-		Taille :
-	</text>
-	<text name="info_size"  left="66">
-		[AREA] m²
-	</text>
-	<text name="info_action" bottom_delta="-60">
-		Pour vendre cette
-parcelle :
-	</text>
-	<icon bottom_delta="-86" name="step_price" />
-	<text name="price_label">
-		Votre prix de vente :
-	</text>
-	<text name="price_text">
-		Fixez un prix convenable pour ce terrain.
-	</text>
-	<text name="price_ld">
-		L$
-	</text>
-	<text name="price_per_m">
-		([PER_METER] L$ par mètre carré)
-	</text>
-	<text name="sell_to_label">
-		Vos acheteurs :
-	</text>
-	<text name="sell_to_text">
-		Vendez votre terrain à n&apos;importe qui ou uniquement à un acheteur
-spécifique.
-	</text>
-	<combo_box name="sell_to" bottom_delta="-32">
-		<combo_item name="--selectone--">
-			-- Sélectionnez --
-		</combo_item>
-		<combo_item name="Anyone">
-			N&apos;importe qui
-		</combo_item>
-		<combo_item name="Specificuser:">
-			Acheteur spécifique :
-		</combo_item>
-	</combo_box>
-	<button label="Sélectionner..." name="sell_to_select_agent" width="100"/>
-	<text name="sell_objects_label">
-		Vendez-vous des objets avec ce terrain ?
-	</text>
-	<text name="sell_objects_text">
-		Les objets transférables se trouvant sur la parcelle changeront
-de propriétaire.
-	</text>
-	<radio_group name="sell_objects" right="430" bottom_delta="-54">
-		<radio_item name="no">
-			Non, rester le propriétaire des objets
-		</radio_item>
-		<radio_item name="yes">
-			Oui, vendre les objets avec le terrain
-		</radio_item>
-	</radio_group>
-	<button label="Afficher les objets" name="show_objects" right="420" width="120"/>
-	<text name="nag_message_label" bottom_delta="-30">
-		Rappel : Toute vente est définitive.
-	</text>
-	<button label="Mettre le terrain en vente" name="sell_btn" width="165"/>
-	<button label="Annuler" name="cancel_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="sell land" title="Vendre terrain">
+	<text name="info_parcel_label" width="48">
+		Parcelle :
+	</text>
+	<text name="info_parcel" left="66">
+		PARCEL NAME
+	</text>
+	<text name="info_size_label">
+		Taille :
+	</text>
+	<text name="info_size"  left="66">
+		[AREA] m²
+	</text>
+	<text name="info_action" bottom_delta="-60">
+		Pour vendre cette
+parcelle :
+	</text>
+	<icon bottom_delta="-86" name="step_price" />
+	<text name="price_label">
+		Votre prix de vente :
+	</text>
+	<text name="price_text">
+		Fixez un prix convenable pour ce terrain.
+	</text>
+	<text name="price_ld">
+		L$
+	</text>
+	<text name="price_per_m">
+		([PER_METER] L$ par mètre carré)
+	</text>
+	<text name="sell_to_label">
+		Vos acheteurs :
+	</text>
+	<text name="sell_to_text">
+		Vendez votre terrain à n&apos;importe qui ou uniquement à un acheteur
+spécifique.
+	</text>
+	<combo_box name="sell_to" bottom_delta="-32">
+		<combo_box.item name="--selectone--">
+			-- Sélectionnez --
+		</combo_box.item>
+		<combo_box.item name="Anyone">
+			N&apos;importe qui
+		</combo_box.item>
+		<combo_box.item name="Specificuser:">
+			Acheteur spécifique :
+		</combo_box.item>
+	</combo_box>
+	<button label="Sélectionner..." name="sell_to_select_agent" width="100"/>
+	<text name="sell_objects_label">
+		Vendez-vous des objets avec ce terrain ?
+	</text>
+	<text name="sell_objects_text">
+		Les objets transférables se trouvant sur la parcelle changeront
+de propriétaire.
+	</text>
+	<radio_group name="sell_objects" right="430" bottom_delta="-54">
+		<radio_item name="no">
+			Non, rester le propriétaire des objets
+		</radio_item>
+		<radio_item name="yes">
+			Oui, vendre les objets avec le terrain
+		</radio_item>
+	</radio_group>
+	<button label="Afficher les objets" name="show_objects" right="420" width="120"/>
+	<text name="nag_message_label" bottom_delta="-30">
+		Rappel : Toute vente est définitive.
+	</text>
+	<button label="Mettre le terrain en vente" name="sell_btn" width="165"/>
+	<button label="Annuler" name="cancel_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_settings_debug.xml b/indra/newview/skins/default/xui/fr/floater_settings_debug.xml
index 8d6249bf52..18cf2d7e55 100644
--- a/indra/newview/skins/default/xui/fr/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/fr/floater_settings_debug.xml
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="settings_debug" title="Paramétrages du mode Debug">
-	<combo_box name="boolean_combo">
-		<combo_item name="TRUE">
-			TRUE
-		</combo_item>
-		<combo_item name="FALSE">
-			FALSE
-		</combo_item>
-	</combo_box>
-	<color_swatch label="Couleur" name="color_swatch" width="43" />
-	<spinner label="x" name="val_spinner_1" />
-	<spinner label="x" name="val_spinner_2" />
-	<spinner label="x" name="val_spinner_3" />
-	<spinner label="x" name="val_spinner_4" />
-	<button label="Paramètres par défaut" name="default_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="settings_debug" title="Paramétrages du mode Debug">
+	<combo_box name="boolean_combo">
+		<combo_box.item name="TRUE">
+			TRUE
+		</combo_box.item>
+		<combo_box.item name="FALSE">
+			FALSE
+		</combo_box.item>
+	</combo_box>
+	<color_swatch label="Couleur" name="color_swatch" width="43" />
+	<spinner label="x" name="val_spinner_1" />
+	<spinner label="x" name="val_spinner_2" />
+	<spinner label="x" name="val_spinner_3" />
+	<spinner label="x" name="val_spinner_4" />
+	<button label="Paramètres par défaut" name="default_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_snapshot.xml b/indra/newview/skins/default/xui/fr/floater_snapshot.xml
index a0978a9ab0..63ed77c8b5 100644
--- a/indra/newview/skins/default/xui/fr/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/fr/floater_snapshot.xml
@@ -1,137 +1,137 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Snapshot" title="Prévisualiser la photo" width="247">
-	<text name="type_label">
-		Destination de la photo
-	</text>
-	<radio_group label="Type de photo" name="snapshot_type_radio" width="228">
-		<radio_item name="postcard">
-			Envoyer par e-mail
-		</radio_item>
-		<radio_item name="texture">
-			Enregistrer dans votre inventaire ([AMOUNT] L$)
-		</radio_item>
-		<radio_item name="local">
-			Enregistrer sur votre disque dur
-		</radio_item>
-	</radio_group>
-	<button label="Plus &gt;&gt;" name="more_btn" tool_tip="Options avancées"/>
-	<button label="&lt;&lt; Moins" name="less_btn" tool_tip="Options avancées"/>
-	<text name="type_label2">
-		Taille
-	</text>
-	<text name="format_label">
-		Format
-	</text>
-	<combo_box label="Résolution" name="postcard_size_combo">
-		<combo_item name="640x480">
-			640 x 480
-		</combo_item>
-		<combo_item name="800x600">
-			800 x 600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024 x 768
-		</combo_item>
-		<combo_item name="CurrentWindow">
-			Fenêtre actuelle
-		</combo_item>
-		<combo_item name="Custom">
-			Personnaliser
-		</combo_item>
-	</combo_box>
-	<combo_box label="Résolution" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
-			Fenêtre actuelle
-		</combo_item>
-		<combo_item name="Small(128x128)">
-			Petite (128 x 128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
-			Moyenne (256 x 256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
-			Grande (512 x 512)
-		</combo_item>
-		<combo_item name="Custom">
-			Personnaliser
-		</combo_item>
-	</combo_box>
-	<combo_box label="Résolution" name="local_size_combo">
-		<combo_item name="CurrentWindow">
-			Fenêtre actuelle
-		</combo_item>
-		<combo_item name="320x240">
-			320 x 240
-		</combo_item>
-		<combo_item name="640x480">
-			640 x 480
-		</combo_item>
-		<combo_item name="800x600">
-			800 x 600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024 x 768
-		</combo_item>
-		<combo_item name="1280x1024">
-			1280 x 1024
-		</combo_item>
-		<combo_item name="1600x1200">
-			1600 x 1200
-		</combo_item>
-		<combo_item name="Custom">
-			Personnaliser
-		</combo_item>
-	</combo_box>
-	<combo_box label="Format" name="local_format_combo">
-		<combo_item name="PNG">
-			PNG
-		</combo_item>
-		<combo_item name="JPEG">
-			JPEG
-		</combo_item>
-		<combo_item name="BMP">
-			BMP
-		</combo_item>
-	</combo_box>
-	<spinner label="Largeur" label_width="41" name="snapshot_width" width="101"/>
-	<spinner label="Hauteur" label_width="41" left="121" name="snapshot_height" width="101"/>
-	<slider label="Qualité de l&apos;image" name="image_quality_slider"/>
-	<text name="layer_type_label">
-		Capturer :
-	</text>
-	<combo_box label="Couches de l&apos;image" name="layer_types">
-		<combo_item name="Colors">
-			Couleurs
-		</combo_item>
-		<combo_item name="Depth">
-			Profondeur
-		</combo_item>
-		<combo_item name="ObjectMattes">
-			Matte des objets
-		</combo_item>
-	</combo_box>
-	<text name="file_size_label">
-		Taille du fichier : [SIZE] Ko
-	</text>
-	<check_box label="Voir l&apos;interface sur la photo" name="ui_check"/>
-	<check_box label="Voir les éléments HUD sur la photo" name="hud_check"/>
-	<check_box label="Garder ouvert après enregistrement" name="keep_open_check"/>
-	<check_box label="Imposer les proportions" name="keep_aspect_check"/>
-	<check_box label="Prévisualisation plein écran (geler l&apos;écran)" name="freeze_frame_check"/>
-	<button label="Rafraîchir" name="new_snapshot_btn"/>
-	<check_box label="Rafraîchissement automatique" name="auto_snapshot_check"/>
-	<button label="Enregistrer ([AMOUNT] L$)" name="upload_btn" width="118"/>
-	<button label="Envoyer" name="send_btn" width="118"/>
-	<flyout_button label="Enregistrer" name="save_btn" tool_tip="Enregistrer l&apos;image dans un fichier" width="118">
-		<flyout_button_item name="save_item">
-			Enregistrer
-		</flyout_button_item>
-		<flyout_button_item name="saveas_item">
-			Enregistrer sous...
-		</flyout_button_item>
-	</flyout_button>
-	<button label="Annuler" name="discard_btn" left="133" width="72" />
-	<string name="unknown">
-		inconnu
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Snapshot" title="Prévisualiser la photo" width="247">
+	<text name="type_label">
+		Destination de la photo
+	</text>
+	<radio_group label="Type de photo" name="snapshot_type_radio" width="228">
+		<radio_item name="postcard">
+			Envoyer par e-mail
+		</radio_item>
+		<radio_item name="texture">
+			Enregistrer dans votre inventaire ([AMOUNT] L$)
+		</radio_item>
+		<radio_item name="local">
+			Enregistrer sur votre disque dur
+		</radio_item>
+	</radio_group>
+	<button label="Plus &gt;&gt;" name="more_btn" tool_tip="Options avancées"/>
+	<button label="&lt;&lt; Moins" name="less_btn" tool_tip="Options avancées"/>
+	<text name="type_label2">
+		Taille
+	</text>
+	<text name="format_label">
+		Format
+	</text>
+	<combo_box label="Résolution" name="postcard_size_combo">
+		<combo_box.item name="640x480">
+			640 x 480
+		</combo_box.item>
+		<combo_box.item name="800x600">
+			800 x 600
+		</combo_box.item>
+		<combo_box.item name="1024x768">
+			1024 x 768
+		</combo_box.item>
+		<combo_box.item name="CurrentWindow">
+			Fenêtre actuelle
+		</combo_box.item>
+		<combo_box.item name="Custom">
+			Personnaliser
+		</combo_box.item>
+	</combo_box>
+	<combo_box label="Résolution" name="texture_size_combo">
+		<combo_box.item name="CurrentWindow">
+			Fenêtre actuelle
+		</combo_box.item>
+		<combo_box.item name="Small(128x128)">
+			Petite (128 x 128)
+		</combo_box.item>
+		<combo_box.item name="Medium(256x256)">
+			Moyenne (256 x 256)
+		</combo_box.item>
+		<combo_box.item name="Large(512x512)">
+			Grande (512 x 512)
+		</combo_box.item>
+		<combo_box.item name="Custom">
+			Personnaliser
+		</combo_box.item>
+	</combo_box>
+	<combo_box label="Résolution" name="local_size_combo">
+		<combo_box.item name="CurrentWindow">
+			Fenêtre actuelle
+		</combo_box.item>
+		<combo_box.item name="320x240">
+			320 x 240
+		</combo_box.item>
+		<combo_box.item name="640x480">
+			640 x 480
+		</combo_box.item>
+		<combo_box.item name="800x600">
+			800 x 600
+		</combo_box.item>
+		<combo_box.item name="1024x768">
+			1024 x 768
+		</combo_box.item>
+		<combo_box.item name="1280x1024">
+			1280 x 1024
+		</combo_box.item>
+		<combo_box.item name="1600x1200">
+			1600 x 1200
+		</combo_box.item>
+		<combo_box.item name="Custom">
+			Personnaliser
+		</combo_box.item>
+	</combo_box>
+	<combo_box label="Format" name="local_format_combo">
+		<combo_box.item name="PNG">
+			PNG
+		</combo_box.item>
+		<combo_box.item name="JPEG">
+			JPEG
+		</combo_box.item>
+		<combo_box.item name="BMP">
+			BMP
+		</combo_box.item>
+	</combo_box>
+	<spinner label="Largeur" label_width="41" name="snapshot_width" width="101"/>
+	<spinner label="Hauteur" label_width="41" left="121" name="snapshot_height" width="101"/>
+	<slider label="Qualité de l&apos;image" name="image_quality_slider"/>
+	<text name="layer_type_label">
+		Capturer :
+	</text>
+	<combo_box label="Couches de l&apos;image" name="layer_types">
+		<combo_box.item name="Colors">
+			Couleurs
+		</combo_box.item>
+		<combo_box.item name="Depth">
+			Profondeur
+		</combo_box.item>
+		<combo_box.item name="ObjectMattes">
+			Matte des objets
+		</combo_box.item>
+	</combo_box>
+	<text name="file_size_label">
+		Taille du fichier : [SIZE] Ko
+	</text>
+	<check_box label="Voir l&apos;interface sur la photo" name="ui_check"/>
+	<check_box label="Voir les éléments HUD sur la photo" name="hud_check"/>
+	<check_box label="Garder ouvert après enregistrement" name="keep_open_check"/>
+	<check_box label="Imposer les proportions" name="keep_aspect_check"/>
+	<check_box label="Prévisualisation plein écran (geler l&apos;écran)" name="freeze_frame_check"/>
+	<button label="Rafraîchir" name="new_snapshot_btn"/>
+	<check_box label="Rafraîchissement automatique" name="auto_snapshot_check"/>
+	<button label="Enregistrer ([AMOUNT] L$)" name="upload_btn" width="118"/>
+	<button label="Envoyer" name="send_btn" width="118"/>
+	<flyout_button label="Enregistrer" name="save_btn" tool_tip="Enregistrer l&apos;image dans un fichier" width="118">
+    <flyout_button.item name="save_item">
+      Enregistrer
+    </flyout_button.item>
+    <flyout_button.item name="saveas_item">
+      Enregistrer sous...
+    </flyout_button.item>
+	</flyout_button>
+	<button label="Annuler" name="discard_btn" left="133" width="72" />
+	<string name="unknown">
+		inconnu
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_sound_preview.xml b/indra/newview/skins/default/xui/fr/floater_sound_preview.xml
index 0b4731f0da..eb2383b1bc 100644
--- a/indra/newview/skins/default/xui/fr/floater_sound_preview.xml
+++ b/indra/newview/skins/default/xui/fr/floater_sound_preview.xml
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Name/Description" title="sound.wav">
-	<text name="name_label">
-		Nom :
-	</text>
-	<text name="description_label">
-		Description :
-	</text>
-	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
-	<button label="Importer ([AMOUNT] L$)" label_selected="Charger ([AMOUNT] L$)" name="ok_btn"/>
-	<text name="text">
-		Débit (kbps) :
-	</text>
-	<radio_group name="bitrate">
-		<radio_item name="32">
-			32
-		</radio_item>
-		<radio_item name="64">
-			64
-		</radio_item>
-		<radio_item name="96">
-			96
-		</radio_item>
-		<radio_item name="128">
-			128
-		</radio_item>
-	</radio_group>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Name/Description" title="sound.wav">
+	<text name="name_label">
+		Nom :
+	</text>
+	<text name="description_label">
+		Description :
+	</text>
+	<button label="Annuler" label_selected="Annuler" name="cancel_btn"/>
+	<button label="Importer ([AMOUNT] L$)" label_selected="Charger ([AMOUNT] L$)" name="ok_btn"/>
+	<text name="text">
+		Débit (kbps) :
+	</text>
+	<radio_group name="bitrate">
+		<radio_item name="32">
+			32
+		</radio_item>
+		<radio_item name="64">
+			64
+		</radio_item>
+		<radio_item name="96">
+			96
+		</radio_item>
+		<radio_item name="128">
+			128
+		</radio_item>
+	</radio_group>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_telehub.xml b/indra/newview/skins/default/xui/fr/floater_telehub.xml
index 59d41fdaf3..e6201785bd 100644
--- a/indra/newview/skins/default/xui/fr/floater_telehub.xml
+++ b/indra/newview/skins/default/xui/fr/floater_telehub.xml
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="telehub" title="Téléhub" min_height="310" height="310" >
-	<text name="status_text_connected">
-		Téléhub connecté à l&apos;objet [OBJECT]
-	</text>
-	<text name="status_text_not_connected">
-		Aucun téléhub connecté.
-	</text>
-	<text name="help_text_connected">
-		Pour supprimer, cliquez sur Déconnecter.
-	</text>
-	<text name="help_text_not_connected" height="38" bottom_delta="-18">
-		Sélectionner l&apos;objet et cliquez sur Connecter
-le téléhub.
-	</text>
-	<button label="Connecter le téléhub" name="connect_btn" width="122"/>
-	<button label="Déconnecter" name="disconnect_btn" left="142" width="98"/>
-	<text name="spawn_points_text" width="230">
-		Points d&apos;apparition (positions, pas objets) :
-	</text>
-	<button label="Ajouter point" name="add_spawn_point_btn" />
-	<button label="Supprimer point" name="remove_spawn_point_btn" />
-	<text name="spawn_point_help">
-		Sélectionnez l&apos;objet et cliquez sur Ajouter pour
-indiquer la position. Vous pourrez ensuite
-déplacer ou supprimer l&apos;objet.
-Les positions sont relatives au centre du téléhub.
-Sélectionnez l&apos;élément dans la liste pour afficher
-sa position dans le Monde.
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="telehub" title="Téléhub" min_height="310" height="310" >
+	<text name="status_text_connected">
+		Téléhub connecté à l&apos;objet [OBJECT]
+	</text>
+	<text name="status_text_not_connected">
+		Aucun téléhub connecté.
+	</text>
+	<text name="help_text_connected">
+		Pour supprimer, cliquez sur Déconnecter.
+	</text>
+	<text name="help_text_not_connected" height="38" bottom_delta="-18">
+		Sélectionner l&apos;objet et cliquez sur Connecter
+le téléhub.
+	</text>
+	<button label="Connecter le téléhub" name="connect_btn" width="122"/>
+	<button label="Déconnecter" name="disconnect_btn" left="142" width="98"/>
+	<text name="spawn_points_text" width="230">
+		Points d&apos;apparition (positions, pas objets) :
+	</text>
+	<button label="Ajouter point" name="add_spawn_point_btn" />
+	<button label="Supprimer point" name="remove_spawn_point_btn" />
+	<text name="spawn_point_help">
+		Sélectionnez l&apos;objet et cliquez sur Ajouter pour
+indiquer la position. Vous pourrez ensuite
+déplacer ou supprimer l&apos;objet.
+Les positions sont relatives au centre du téléhub.
+Sélectionnez l&apos;élément dans la liste pour afficher
+sa position dans le Monde.
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml
index 1a8e57e604..2a234a37c5 100644
--- a/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml
@@ -1,24 +1,24 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="texture picker" title="Texture">
-	<string name="choose_picture">
-		Cliquez pour sélectionner une image
-	</string>
-	<text length="1" name="Multiple" type="string">
-		Multiple
-	</text>
-	<text length="1" name="unknown" type="string">
-		Dimensions : [DIMENSIONS]
-	</text>
-	<button label="Défaut" label_selected="Défaut" name="Default" width="60" />
-	<button label="Aucune" label_selected="Aucune" name="None" width="60" left="68" />
-	<button label="Vierge" label_selected="Vierge" name="Blank" width="60" />
-	<check_box label="Afficher les dossiers" name="show_folders_check"/>
-	<search_editor label="Saisissez votre recherche ici" name="inventory search editor"/>
-	<check_box label="Appliquer immédiatement" name="apply_immediate_check" />
-	<button label="" label_selected="" name="Pipette" bottom="-240" />
-	<button label="Annuler" label_selected="Annuler" name="Cancel"/>
-	<button label="Sélectionner" label_selected="Sélectionner" name="Select"/>
-	<string name="pick title">
-		Choisir :
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="texture picker" title="Texture">
+	<string name="choose_picture">
+		Cliquez pour sélectionner une image
+	</string>
+	<text length="1" name="Multiple" type="string">
+		Multiple
+	</text>
+	<text length="1" name="unknown" type="string">
+		Dimensions : [DIMENSIONS]
+	</text>
+	<button label="Défaut" label_selected="Défaut" name="Default" width="60" />
+	<button label="Aucune" label_selected="Aucune" name="None" width="60" left="68" />
+	<button label="Vierge" label_selected="Vierge" name="Blank" width="60" />
+	<check_box label="Afficher les dossiers" name="show_folders_check"/>
+	<search_editor label="Saisissez votre recherche ici" name="inventory search editor"/>
+	<check_box label="Appliquer immédiatement" name="apply_immediate_check" />
+	<button label="" label_selected="" name="Pipette" bottom="-240" />
+	<button label="Annuler" label_selected="Annuler" name="Cancel"/>
+	<button label="Sélectionner" label_selected="Sélectionner" name="Select"/>
+	<string name="pick title">
+		Choisir :
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml
index 2eb95124ba..fed4a789ce 100644
--- a/indra/newview/skins/default/xui/fr/floater_tools.xml
+++ b/indra/newview/skins/default/xui/fr/floater_tools.xml
@@ -1,624 +1,624 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="toolbox floater" title="">
-	<button label="" label_selected="" name="button focus" tool_tip="Mise au point"/>
-	<button label="" label_selected="" name="button move" tool_tip="Déplacer"/>
-	<button label="" label_selected="" name="button edit" tool_tip="Modifier"/>
-	<button label="" label_selected="" name="button create" tool_tip="Créer"/>
-	<button label="" label_selected="" name="button land" tool_tip="Terrain"/>
-	<check_box label="Zoom" name="radio zoom"/>
-	<check_box label="Orbite (Ctrl)" name="radio orbit"/>
-	<check_box label="Panoramique (Ctrl-Maj)" name="radio pan"/>
-	<check_box label="Déplacer" name="radio move"/>
-	<check_box label="Orbite (Ctrl)" name="radio lift"/>
-	<check_box label="Faire tourner (Ctrl-Maj)" name="radio spin"/>
-	<check_box label="Positionner" name="radio position"/>
-	<check_box label="Pivoter (Ctrl)" name="radio rotate"/>
-	<check_box label="Étirer (Ctrl-Maj)" name="radio stretch"/>
-	<check_box label="Sélectionner une face" name="radio select face"/>
-	<check_box label="Modifier les parties liées" name="checkbox edit linked parts"/>
-	<text name="text ruler mode">
-		Axe :
-	</text>
-	<combo_box name="combobox grid mode">
-		<combo_item name="World">
-			Monde
-		</combo_item>
-		<combo_item name="Local">
-			Local
-		</combo_item>
-		<combo_item name="Reference">
-			Référence
-		</combo_item>
-	</combo_box>
-	<check_box label="Étirer les deux côtés" name="checkbox uniform"/>
-	<check_box label="Étirer les textures" name="checkbox stretch textures"/>
-	<check_box label="Utiliser la grille" name="checkbox snap to grid"/>
-	<button label="Options..." label_selected="Options..." name="Options..."/>
-	<text name="text status">
-		Faîtes glisser pour déplacer, Maj-faire glisser pour
-		copier.
-	</text>
-	<button label="" label_selected="" name="ToolCube" tool_tip="Cube"/>
-	<button label="" label_selected="" name="ToolPrism" tool_tip="Prisme"/>
-	<button label="" label_selected="" name="ToolPyramid" tool_tip="Pyramide"/>
-	<button label="" label_selected="" name="ToolTetrahedron" tool_tip="Tétraèdre"/>
-	<button label="" label_selected="" name="ToolCylinder" tool_tip="Cylindre"/>
-	<button label="" label_selected="" name="ToolHemiCylinder" tool_tip="Demi-cylindre"/>
-	<button label="" label_selected="" name="ToolCone" tool_tip="Cône"/>
-	<button label="" label_selected="" name="ToolHemiCone" tool_tip="Demi-cône"/>
-	<button label="" label_selected="" name="ToolSphere" tool_tip="Sphère"/>
-	<button label="" label_selected="" name="ToolHemiSphere" tool_tip="Demi-sphère"/>
-	<button label="" label_selected="" name="ToolTorus" tool_tip="Tore"/>
-	<button label="" label_selected="" name="ToolTube" tool_tip="Tube"/>
-	<button label="" label_selected="" name="ToolRing" tool_tip="Anneau"/>
-	<button label="" label_selected="" name="ToolTree" tool_tip="Arbre"/>
-	<button label="" label_selected="" name="ToolGrass" tool_tip="Herbe"/>
-	<check_box label="Maintenir l&apos;outil sélectionné" name="checkbox sticky"/>
-	<check_box label="Copier la sélection" name="checkbox copy selection"/>
-	<check_box label="Centrer" name="checkbox copy centers"/>
-	<check_box label="Pivoter" name="checkbox copy rotates"/>
-	<check_box label="Sélectionner le terrain" name="radio select land"/>
-	<check_box label="Aplatir" name="radio flatten"/>
-	<check_box label="Élever" name="radio raise"/>
-	<check_box label="Abaisser" name="radio lower"/>
-	<check_box label="Lisser" name="radio smooth"/>
-	<check_box label="Bosseler" name="radio noise"/>
-	<check_box label="Annuler modification" name="radio revert"/>
-	<button label="Appliquer" label_selected="Appliquer" name="button apply to selection" tool_tip="Modifier le terrain sélectionné"/>
-	<text name="Bulldozer:">
-		Bulldozer :
-	</text>
-	<text name="Dozer Size:">
-		Taille
-	</text>
-	<text name="Strength:">
-		Force
-	</text>
-	<text name="obj_count">
-		Objets sélectionnés : [COUNT]
-	</text>
-	<text name="prim_count">
-		Prims : [COUNT]
-	</text>
-	<tab_container name="Object Info Tabs">
-		<panel label="Général" name="General">
-			<text name="Name:">
-				Nom :
-			</text>
-			<text name="Description:">
-				Description :
-			</text>
-			<text name="Creator:">
-				Créateur :
-			</text>
-			<text name="Creator Name">
-				Thrax Linden
-			</text>
-			<button label="Profil..." label_selected="Profil..." name="button creator profile"/>
-			<text name="Owner:">
-				Propriétaire :
-			</text>
-			<text name="Owner Name">
-				Thrax Linden
-			</text>
-			<button label="Profil..." label_selected="Profil..." name="button owner profile"/>
-			<text name="Group:">
-				Groupe :
-			</text>
-			<text name="Group Name Proxy">
-				Les Lindens
-			</text>
-			<button label="Définir..." label_selected="Définir..." name="button set group"/>
-			<text name="Permissions:">
-				Autorisations :
-			</text>
-			<text name="perm_modify">
-				Vous pouvez modifier cet objet.
-			</text>
-			<check_box label="Partager avec le groupe" name="checkbox share with group" tool_tip="Autoriser les membres du groupe à déplacer, copier et supprimer."/>
-			<string name="text deed continued">
-				Transférer...
-			</string>
-			<string name="text deed">
-				Transférer
-			</string>
-			<button label="Céder..." label_selected="Céder..." name="button deed" tool_tip="Les objets partagés par un groupe peuvent être cédés par un officier."/>
-			<check_box label="Autoriser tout le monde à déplacer" name="checkbox allow everyone move"/>
-			<check_box label="Autoriser tout le monde à copier" name="checkbox allow everyone copy"/>
-			<check_box label="Afficher dans la recherche" name="search_check" tool_tip="Afficher l&apos;objet dans les résultats de recherche"/>
-			<check_box label="À vendre" name="checkbox for sale"/>
-			<text name="Cost">
-				Prix : L$
-			</text>
-			<radio_group name="sale type">
-				<radio_item name="Original">
-					Original
-				</radio_item>
-				<radio_item name="Copy">
-					Copie
-				</radio_item>
-				<radio_item name="Contents">
-					Contenus
-				</radio_item>
-			</radio_group>
-			<text name="Next owner can:">
-				Le prochain propriétaire pourra :
-			</text>
-			<check_box label="Modifier" name="checkbox next owner can modify"/>
-			<check_box label="Copier" left_delta="66" name="checkbox next owner can copy"/>
-			<check_box label="Revendre/Donner" name="checkbox next owner can transfer"/>
-			<text name="label click action">
-				Action du clic-gauche :
-			</text>
-			<combo_box name="clickaction" width="178">
-				<combo_item name="Touch/grab(default)">
-					Toucher/attraper (défaut)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					S&apos;asseoir sur l&apos;objet
-				</combo_item>
-				<combo_item name="Buyobject">
-					Acheter l&apos;objet
-				</combo_item>
-				<combo_item name="Payobject">
-					Payer l&apos;objet
-				</combo_item>
-				<combo_item name="Open">
-					Ouvrir
-				</combo_item>
-				<combo_item name="Play">
-					Jouer le média de la parcelle
-				</combo_item>
-				<combo_item name="Opemmedia">
-					Ouvrir le média de la parcelle
-				</combo_item>
-			</combo_box>
-			<text name="B:">
-				B :
-			</text>
-			<text name="O:">
-				O :
-			</text>
-			<text name="G:">
-				G :
-			</text>
-			<text name="E:">
-				E :
-			</text>
-			<text name="N:">
-				N :
-			</text>
-			<text name="F:">
-				F :
-			</text>
-			<string name="text modify info 1">
-				Vous pouvez modifier cet objet.
-			</string>
-			<string name="text modify info 2">
-				Vous pouvez modifier ces objets.
-			</string>
-			<string name="text modify info 3">
-				Vous ne pouvez pas modifier cet objet.
-			</string>
-			<string name="text modify info 4">
-				Vous ne pouvez pas modifier ces objets.
-			</string>
-			<string name="text modify warning">
-				Sélectionnez l&apos;objet en entier.
-			</string>
-			<string name="Cost Default">
-				Prix :           L$
-			</string>
-			<string name="Cost Total">
-				Prix total :  L$
-			</string>
-			<string name="Cost Per Unit">
-				Prix par :     L$
-			</string>
-			<string name="Cost Mixed">
-				Prix mixte
-			</string>
-			<string name="Sale Mixed">
-				Vente mixte
-			</string>
-		</panel>
-		<panel label="Objet" name="Object">
-			<text name="select_single">
-				Sélectionnez un prim pour modifier les paramètres.
-			</text>
-			<text name="edit_object">
-				Modifier les paramètres de l&apos;objet :
-			</text>
-			<check_box label="Verrouillé" name="checkbox locked" tool_tip="Empêche l&apos;objet d&apos;être déplacé ou supprimé. Utile pendant la construction pour éviter les modifications involontaires."/>
-			<check_box label="Physique" name="Physical Checkbox Ctrl" tool_tip="Permet à l&apos;objet d&apos;être poussé et affecté par la gravité"/>
-			<check_box label="Temporaire" name="Temporary Checkbox Ctrl" tool_tip="L&apos;objet est supprimé 1 mn après sa création."/>
-			<check_box label="Fantôme" name="Phantom Checkbox Ctrl" tool_tip="Permet à l&apos;objet de ne pas entrer en collision avec d&apos;autres objets ou avatars."/>
-			<text name="label position">
-				Position (mètres)
-			</text>
-			<spinner label="X" name="Pos X"/>
-			<spinner label="Y" name="Pos Y"/>
-			<spinner label="Z" name="Pos Z"/>
-			<text name="label size">
-				Taille (mètres)
-			</text>
-			<spinner label="X" name="Scale X"/>
-			<spinner label="Y" name="Scale Y"/>
-			<spinner label="Z" name="Scale Z"/>
-			<text name="label rotation">
-				Rotation (degrés)
-			</text>
-			<spinner label="X" name="Rot X"/>
-			<spinner label="Y" name="Rot Y"/>
-			<spinner label="Z" name="Rot Z"/>
-			<text name="label material">
-				Matériau
-			</text>
-			<combo_box name="material">
-				<combo_item name="Stone">
-					Pierre
-				</combo_item>
-				<combo_item name="Metal">
-					Métal
-				</combo_item>
-				<combo_item name="Glass">
-					Verre
-				</combo_item>
-				<combo_item name="Wood">
-					Bois
-				</combo_item>
-				<combo_item name="Flesh">
-					Chair
-				</combo_item>
-				<combo_item name="Plastic">
-					Plastique
-				</combo_item>
-				<combo_item name="Rubber">
-					Caoutchouc
-				</combo_item>
-			</combo_box>
-			<text name="label basetype">
-				Type de construction
-			</text>
-			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					Boîte
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cylindre
-				</combo_item>
-				<combo_item name="Prism">
-					Prisme
-				</combo_item>
-				<combo_item name="Sphere">
-					Sphère
-				</combo_item>
-				<combo_item name="Torus">
-					Tore
-				</combo_item>
-				<combo_item name="Tube">
-					Tube
-				</combo_item>
-				<combo_item name="Ring">
-					Anneau
-				</combo_item>
-				<combo_item name="Sculpted">
-					Sculptie
-				</combo_item>
-			</combo_box>
-			<text name="text cut">
-				Début et fin de découpe du tracé
-			</text>
-			<spinner label="D" name="cut begin"/>
-			<spinner label="F" name="cut end"/>
-			<text name="text hollow">
-				Creux
-			</text>
-			<text name="text skew">
-				Biais
-			</text>
-			<text name="Hollow Shape">
-				Forme du creux
-			</text>
-			<combo_box name="hole">
-				<combo_item name="Default">
-					Défaut
-				</combo_item>
-				<combo_item name="Circle">
-					Cercle
-				</combo_item>
-				<combo_item name="Square">
-					Carré
-				</combo_item>
-				<combo_item name="Triangle">
-					Triangle
-				</combo_item>
-			</combo_box>
-			<text name="text twist">
-				Début et fin de vrille
-			</text>
-			<spinner label="D" name="Twist Begin"/>
-			<spinner label="F" name="Twist End"/>
-			<text name="scale_taper">
-				Biseautage
-			</text>
-			<text name="scale_hole">
-				Taille du trou
-			</text>
-			<spinner label="X" name="Taper Scale X"/>
-			<spinner label="Y" name="Taper Scale Y"/>
-			<text name="text topshear">
-				Inclinaison
-			</text>
-			<spinner label="X" name="Shear X"/>
-			<spinner label="Y" name="Shear Y"/>
-			<text name="advanced_cut">
-				Début et fin de découpe du profilé
-			</text>
-			<text name="advanced_dimple">
-				Début et fin du creux
-			</text>
-			<text name="advanced_slice">
-				Début et fin de la tranche
-			</text>
-			<spinner label="D" name="Path Limit Begin"/>
-			<spinner label="F" name="Path Limit End"/>
-			<text name="text taper2">
-				Biseautage
-			</text>
-			<spinner label="X" name="Taper X"/>
-			<spinner label="Y" name="Taper Y"/>
-			<text name="text radius delta">
-				Rayon
-			</text>
-			<text name="text revolutions">
-				Révolutions
-			</text>
-			<texture_picker label="Texture du sculptie" name="sculpt texture control" tool_tip="Cliquez pour sélectionner une image"/>
-			<check_box label="Mirroir" name="sculpt mirror control" tool_tip="Retourne le sculptie le long de l&apos;axe des X."/>
-			<check_box label="A l&apos;envers" name="sculpt invert control" tool_tip="Inverse les valeurs normales d&apos;un sculptie et le fait apparaître à l&apos;envers."/>
-			<text name="label sculpt type">
-				Type de raccord
-			</text>
-			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(aucun)
-				</combo_item>
-				<combo_item name="Sphere">
-					Sphère
-				</combo_item>
-				<combo_item name="Torus">
-					Tore
-				</combo_item>
-				<combo_item name="Plane">
-					Plan
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cylindre
-				</combo_item>
-			</combo_box>
-		</panel>
-		<panel label="Attributs" name="Features">
-			<text name="select_single">
-				Sélectionnez un prim pour modifier les attributs.
-			</text>
-			<text name="edit_object">
-				Modifier les attributs de l&apos;objet :
-			</text>
-			<check_box label="Flexibilité" name="Flexible1D Checkbox Ctrl" tool_tip="Donne à l&apos;objet de la souplesse sur l&apos;axe des Z (côté client uniquement)."/>
-			<spinner label="Souplesse" name="FlexNumSections"/>
-			<spinner label="Gravité" name="FlexGravity"/>
-			<spinner label="Élasticité" name="FlexFriction"/>
-			<spinner label="Vent" name="FlexWind"/>
-			<spinner label="Tension" name="FlexTension"/>
-			<spinner label="Force X" name="FlexForceX"/>
-			<spinner label="Force Y" name="FlexForceY"/>
-			<spinner label="Force Z" name="FlexForceZ"/>
-			<check_box label="Lumière" name="Light Checkbox Ctrl" tool_tip="Permet aux objets d&apos;émettre de la lumière"/>
-			<text name="label color">
-				Couleur
-			</text>
-			<color_swatch label="" name="colorswatch" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/>
-			<spinner label="Intensité" name="Light Intensity"/>
-			<spinner label="Portée" name="Light Radius"/>
-			<spinner label="Atténuation" name="Light Falloff"/>
-		</panel>
-		<panel label="Texture" name="Texture">
-			<texture_picker label="Texture" name="texture control" tool_tip="Cliquez pour sélectionner une image"/>
-			<color_swatch label="Couleur" name="colorswatch" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs"/>
-			<text name="color trans" width="88">
-				Transparence
-			</text>
-			<text name="glow label">
-				Rayonnement
-			</text>
-			<check_box label="Lumineux" name="checkbox fullbright"/>
-			<text name="tex gen">
-				Application
-			</text>
-			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					Défaut
-				</combo_item>
-				<combo_item name="Planar">
-					Planar
-				</combo_item>
-			</combo_box>
-			<text name="label shininess">
-				Brillance
-			</text>
-			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					Aucune
-				</combo_item>
-				<combo_item name="Low">
-					Faible
-				</combo_item>
-				<combo_item name="Medium">
-					Moyenne
-				</combo_item>
-				<combo_item name="High">
-					Élevée
-				</combo_item>
-			</combo_box>
-			<text name="label bumpiness">
-				Relief
-			</text>
-			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					Aucun
-				</combo_item>
-				<combo_item name="Brightness">
-					Luminosité
-				</combo_item>
-				<combo_item name="Darkness">
-					Obscurité
-				</combo_item>
-				<combo_item name="woodgrain">
-					Aggloméré
-				</combo_item>
-				<combo_item name="bark">
-					Écorce
-				</combo_item>
-				<combo_item name="bricks">
-					Briques
-				</combo_item>
-				<combo_item name="checker">
-					Damier
-				</combo_item>
-				<combo_item name="concrete">
-					Béton
-				</combo_item>
-				<combo_item name="crustytile">
-					Carrelage
-				</combo_item>
-				<combo_item name="cutstone">
-					Pierre de taille
-				</combo_item>
-				<combo_item name="discs">
-					Disques
-				</combo_item>
-				<combo_item name="gravel">
-					Gravier
-				</combo_item>
-				<combo_item name="petridish">
-					Boîte de Petri
-				</combo_item>
-				<combo_item name="siding">
-					Lattes
-				</combo_item>
-				<combo_item name="stonetile">
-					Carreaux
-				</combo_item>
-				<combo_item name="stucco">
-					Stuc
-				</combo_item>
-				<combo_item name="suction">
-					Ventouses
-				</combo_item>
-				<combo_item name="weave">
-					Tissage
-				</combo_item>
-			</combo_box>
-			<text name="tex scale">
-				Répétitions par face
-			</text>
-			<spinner label="Horizontal (U)" name="TexScaleU"/>
-			<check_box label="Inverser" name="checkbox flip s"/>
-			<spinner label="Vertical (V)" name="TexScaleV"/>
-			<check_box label="Inverser" name="checkbox flip t"/>
-			<text name="tex rotate">
-				Rotation (degrés)
-			</text>
-			<spinner left="122" name="TexRot" width="58"/>
-			<string name="string repeats per meter">
-				Répétitions au mètre
-			</string>
-			<string name="string repeats per face">
-				Répétitions par face
-			</string>
-			<text name="rpt" width="160">
-				Répétitions au mètre
-			</text>
-			<spinner left="122" name="rptctrl" width="58"/>
-			<button label="Appliquer" label_selected="Appliquer" left_delta="68" name="button apply" width="75"/>
-			<text name="tex offset">
-				Décalage
-			</text>
-			<spinner label="Horizontal (U)" name="TexOffsetU"/>
-			<spinner label="Vertical (V)" name="TexOffsetV"/>
-			<text name="textbox autofix">
-				Ajuster la texture du média
-(chargement préalable)
-			</text>
-			<button label="Ajuster" label_selected="Ajuster" left="150" name="button align"/>
-		</panel>
-		<panel label="Contenu" name="Contents">
-			<button label="Nouveau script" label_selected="Nouveau script..." name="button new script"/>
-			<button label="Permissions..." name="button permissions"/>
-		</panel>
-	</tab_container>
-	<panel name="land info panel">
-		<text name="label_parcel_info">
-			Informations sur la parcelle
-		</text>
-		<text name="label_area_price">
-			Prix : [PRICE] L$ pour [AREA] m².
-		</text>
-		<text name="label_area">
-			Surface : [AREA] m²
-		</text>
-		<button label="À propos du terrain..." label_selected="À propos du terrain..." name="button about land" width="132"/>
-		<check_box label="Afficher les propriétaires" name="checkbox show owners" tool_tip="Colorie les parcelles en fonction de leur propriétaire"/>
-		<button label="?" label_selected="?" name="button show owners help"/>
-		<text name="label_parcel_modify">
-			Modifier la parcelle
-		</text>
-		<button label="Diviser..." label_selected="Diviser..." name="button subdivide land" width="132"/>
-		<button label="Fusionner..." label_selected="Fusionner..." name="button join land" width="132"/>
-		<text name="label_parcel_trans">
-			Transactions
-		</text>
-		<button label="Acheter le terrain..." label_selected="Acheter le terrain..." name="button buy land" width="132"/>
-		<button label="Abandonner le terrain..." label_selected="Abandonner le terrain..." name="button abandon land" width="132"/>
-	</panel>
-	<string name="status_rotate">
-		Pour faire tourner l&apos;objet, faîtes glisser les bandes de couleur.
-	</string>
-	<string name="status_scale">
-		Pour étirer le côté sélectionné, cliquez et faites glisser
-	</string>
-	<string name="status_move">
-		Faîtes glisser pour déplacer, Maj-faire glisser pour copier.
-	</string>
-	<string name="status_modifyland">
-		Cliquez et maintenez pour modifier le terrain
-	</string>
-	<string name="status_camera">
-		Cliquez et faites glisser pour changer l&apos;affichage
-	</string>
-	<string name="status_grab">
-		Faîtes glisser pour déplacer, appuyez sur Ctrl pour soulever, Crtl-Maj pour pivoter
-	</string>
-	<string name="status_place">
-		Cliquez dans le monde pour construire
-	</string>
-	<string name="status_selectland">
-		Cliquez et faites glisser pour sélectionner le terrain
-	</string>
-	<string name="grid_screen_text">
-		Écran
-	</string>
-	<string name="grid_local_text">
-		Local
-	</string>
-	<string name="grid_world_text">
-		Monde
-	</string>
-	<string name="grid_reference_text">
-		Référence
-	</string>
-	<string name="grid_attachment_text">
-		Pièce-jointe
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="toolbox floater" title="">
+	<button label="" label_selected="" name="button focus" tool_tip="Mise au point"/>
+	<button label="" label_selected="" name="button move" tool_tip="Déplacer"/>
+	<button label="" label_selected="" name="button edit" tool_tip="Modifier"/>
+	<button label="" label_selected="" name="button create" tool_tip="Créer"/>
+	<button label="" label_selected="" name="button land" tool_tip="Terrain"/>
+	<check_box label="Zoom" name="radio zoom"/>
+	<check_box label="Orbite (Ctrl)" name="radio orbit"/>
+	<check_box label="Panoramique (Ctrl-Maj)" name="radio pan"/>
+	<check_box label="Déplacer" name="radio move"/>
+	<check_box label="Orbite (Ctrl)" name="radio lift"/>
+	<check_box label="Faire tourner (Ctrl-Maj)" name="radio spin"/>
+	<check_box label="Positionner" name="radio position"/>
+	<check_box label="Pivoter (Ctrl)" name="radio rotate"/>
+	<check_box label="Étirer (Ctrl-Maj)" name="radio stretch"/>
+	<check_box label="Sélectionner une face" name="radio select face"/>
+	<check_box label="Modifier les parties liées" name="checkbox edit linked parts"/>
+	<text name="text ruler mode">
+		Axe :
+	</text>
+	<combo_box name="combobox grid mode">
+		<combo_item name="World">
+			Monde
+		</combo_item>
+		<combo_item name="Local">
+			Local
+		</combo_item>
+		<combo_item name="Reference">
+			Référence
+		</combo_item>
+	</combo_box>
+	<check_box label="Étirer les deux côtés" name="checkbox uniform"/>
+	<check_box label="Étirer les textures" name="checkbox stretch textures"/>
+	<check_box label="Utiliser la grille" name="checkbox snap to grid"/>
+	<button label="Options..." label_selected="Options..." name="Options..."/>
+	<text name="text status">
+		Faîtes glisser pour déplacer, Maj-faire glisser pour
+		copier.
+	</text>
+	<button label="" label_selected="" name="ToolCube" tool_tip="Cube"/>
+	<button label="" label_selected="" name="ToolPrism" tool_tip="Prisme"/>
+	<button label="" label_selected="" name="ToolPyramid" tool_tip="Pyramide"/>
+	<button label="" label_selected="" name="ToolTetrahedron" tool_tip="Tétraèdre"/>
+	<button label="" label_selected="" name="ToolCylinder" tool_tip="Cylindre"/>
+	<button label="" label_selected="" name="ToolHemiCylinder" tool_tip="Demi-cylindre"/>
+	<button label="" label_selected="" name="ToolCone" tool_tip="Cône"/>
+	<button label="" label_selected="" name="ToolHemiCone" tool_tip="Demi-cône"/>
+	<button label="" label_selected="" name="ToolSphere" tool_tip="Sphère"/>
+	<button label="" label_selected="" name="ToolHemiSphere" tool_tip="Demi-sphère"/>
+	<button label="" label_selected="" name="ToolTorus" tool_tip="Tore"/>
+	<button label="" label_selected="" name="ToolTube" tool_tip="Tube"/>
+	<button label="" label_selected="" name="ToolRing" tool_tip="Anneau"/>
+	<button label="" label_selected="" name="ToolTree" tool_tip="Arbre"/>
+	<button label="" label_selected="" name="ToolGrass" tool_tip="Herbe"/>
+	<check_box label="Maintenir l&apos;outil sélectionné" name="checkbox sticky"/>
+	<check_box label="Copier la sélection" name="checkbox copy selection"/>
+	<check_box label="Centrer" name="checkbox copy centers"/>
+	<check_box label="Pivoter" name="checkbox copy rotates"/>
+	<check_box label="Sélectionner le terrain" name="radio select land"/>
+	<check_box label="Aplatir" name="radio flatten"/>
+	<check_box label="Élever" name="radio raise"/>
+	<check_box label="Abaisser" name="radio lower"/>
+	<check_box label="Lisser" name="radio smooth"/>
+	<check_box label="Bosseler" name="radio noise"/>
+	<check_box label="Annuler modification" name="radio revert"/>
+	<button label="Appliquer" label_selected="Appliquer" name="button apply to selection" tool_tip="Modifier le terrain sélectionné"/>
+	<text name="Bulldozer:">
+		Bulldozer :
+	</text>
+	<text name="Dozer Size:">
+		Taille
+	</text>
+	<text name="Strength:">
+		Force
+	</text>
+	<text name="obj_count">
+		Objets sélectionnés : [COUNT]
+	</text>
+	<text name="prim_count">
+		Prims : [COUNT]
+	</text>
+	<tab_container name="Object Info Tabs">
+		<panel label="Général" name="General">
+			<text name="Name:">
+				Nom :
+			</text>
+			<text name="Description:">
+				Description :
+			</text>
+			<text name="Creator:">
+				Créateur :
+			</text>
+			<text name="Creator Name">
+				Thrax Linden
+			</text>
+			<button label="Profil..." label_selected="Profil..." name="button creator profile"/>
+			<text name="Owner:">
+				Propriétaire :
+			</text>
+			<text name="Owner Name">
+				Thrax Linden
+			</text>
+			<button label="Profil..." label_selected="Profil..." name="button owner profile"/>
+			<text name="Group:">
+				Groupe :
+			</text>
+			<text name="Group Name Proxy">
+				Les Lindens
+			</text>
+			<button label="Définir..." label_selected="Définir..." name="button set group"/>
+			<text name="Permissions:">
+				Autorisations :
+			</text>
+			<text name="perm_modify">
+				Vous pouvez modifier cet objet.
+			</text>
+			<check_box label="Partager avec le groupe" name="checkbox share with group" tool_tip="Autoriser les membres du groupe à déplacer, copier et supprimer."/>
+			<string name="text deed continued">
+				Transférer...
+			</string>
+			<string name="text deed">
+				Transférer
+			</string>
+			<button label="Céder..." label_selected="Céder..." name="button deed" tool_tip="Les objets partagés par un groupe peuvent être cédés par un officier."/>
+			<check_box label="Autoriser tout le monde à déplacer" name="checkbox allow everyone move"/>
+			<check_box label="Autoriser tout le monde à copier" name="checkbox allow everyone copy"/>
+			<check_box label="Afficher dans la recherche" name="search_check" tool_tip="Afficher l&apos;objet dans les résultats de recherche"/>
+			<check_box label="À vendre" name="checkbox for sale"/>
+			<text name="Cost">
+				Prix : L$
+			</text>
+			<radio_group name="sale type">
+				<radio_item name="Original">
+					Original
+				</radio_item>
+				<radio_item name="Copy">
+					Copie
+				</radio_item>
+				<radio_item name="Contents">
+					Contenus
+				</radio_item>
+			</radio_group>
+			<text name="Next owner can:">
+				Le prochain propriétaire pourra :
+			</text>
+			<check_box label="Modifier" name="checkbox next owner can modify"/>
+			<check_box label="Copier" left_delta="66" name="checkbox next owner can copy"/>
+			<check_box label="Revendre/Donner" name="checkbox next owner can transfer"/>
+			<text name="label click action">
+				Action du clic-gauche :
+			</text>
+			<combo_box name="clickaction" width="178">
+				<combo_item name="Touch/grab(default)">
+					Toucher/attraper (défaut)
+				</combo_item>
+				<combo_item name="Sitonobject">
+					S&apos;asseoir sur l&apos;objet
+				</combo_item>
+				<combo_item name="Buyobject">
+					Acheter l&apos;objet
+				</combo_item>
+				<combo_item name="Payobject">
+					Payer l&apos;objet
+				</combo_item>
+				<combo_item name="Open">
+					Ouvrir
+				</combo_item>
+				<combo_item name="Play">
+					Jouer le média de la parcelle
+				</combo_item>
+				<combo_item name="Opemmedia">
+					Ouvrir le média de la parcelle
+				</combo_item>
+			</combo_box>
+			<text name="B:">
+				B :
+			</text>
+			<text name="O:">
+				O :
+			</text>
+			<text name="G:">
+				G :
+			</text>
+			<text name="E:">
+				E :
+			</text>
+			<text name="N:">
+				N :
+			</text>
+			<text name="F:">
+				F :
+			</text>
+			<string name="text modify info 1">
+				Vous pouvez modifier cet objet.
+			</string>
+			<string name="text modify info 2">
+				Vous pouvez modifier ces objets.
+			</string>
+			<string name="text modify info 3">
+				Vous ne pouvez pas modifier cet objet.
+			</string>
+			<string name="text modify info 4">
+				Vous ne pouvez pas modifier ces objets.
+			</string>
+			<string name="text modify warning">
+				Sélectionnez l&apos;objet en entier.
+			</string>
+			<string name="Cost Default">
+				Prix :           L$
+			</string>
+			<string name="Cost Total">
+				Prix total :  L$
+			</string>
+			<string name="Cost Per Unit">
+				Prix par :     L$
+			</string>
+			<string name="Cost Mixed">
+				Prix mixte
+			</string>
+			<string name="Sale Mixed">
+				Vente mixte
+			</string>
+		</panel>
+		<panel label="Objet" name="Object">
+			<text name="select_single">
+				Sélectionnez un prim pour modifier les paramètres.
+			</text>
+			<text name="edit_object">
+				Modifier les paramètres de l&apos;objet :
+			</text>
+			<check_box label="Verrouillé" name="checkbox locked" tool_tip="Empêche l&apos;objet d&apos;être déplacé ou supprimé. Utile pendant la construction pour éviter les modifications involontaires."/>
+			<check_box label="Physique" name="Physical Checkbox Ctrl" tool_tip="Permet à l&apos;objet d&apos;être poussé et affecté par la gravité"/>
+			<check_box label="Temporaire" name="Temporary Checkbox Ctrl" tool_tip="L&apos;objet est supprimé 1 mn après sa création."/>
+			<check_box label="Fantôme" name="Phantom Checkbox Ctrl" tool_tip="Permet à l&apos;objet de ne pas entrer en collision avec d&apos;autres objets ou avatars."/>
+			<text name="label position">
+				Position (mètres)
+			</text>
+			<spinner label="X" name="Pos X"/>
+			<spinner label="Y" name="Pos Y"/>
+			<spinner label="Z" name="Pos Z"/>
+			<text name="label size">
+				Taille (mètres)
+			</text>
+			<spinner label="X" name="Scale X"/>
+			<spinner label="Y" name="Scale Y"/>
+			<spinner label="Z" name="Scale Z"/>
+			<text name="label rotation">
+				Rotation (degrés)
+			</text>
+			<spinner label="X" name="Rot X"/>
+			<spinner label="Y" name="Rot Y"/>
+			<spinner label="Z" name="Rot Z"/>
+			<text name="label material">
+				Matériau
+			</text>
+			<combo_box name="material">
+				<combo_item name="Stone">
+					Pierre
+				</combo_item>
+				<combo_item name="Metal">
+					Métal
+				</combo_item>
+				<combo_item name="Glass">
+					Verre
+				</combo_item>
+				<combo_item name="Wood">
+					Bois
+				</combo_item>
+				<combo_item name="Flesh">
+					Chair
+				</combo_item>
+				<combo_item name="Plastic">
+					Plastique
+				</combo_item>
+				<combo_item name="Rubber">
+					Caoutchouc
+				</combo_item>
+			</combo_box>
+			<text name="label basetype">
+				Type de construction
+			</text>
+			<combo_box name="comboBaseType">
+				<combo_item name="Box">
+					Boîte
+				</combo_item>
+				<combo_item name="Cylinder">
+					Cylindre
+				</combo_item>
+				<combo_item name="Prism">
+					Prisme
+				</combo_item>
+				<combo_item name="Sphere">
+					Sphère
+				</combo_item>
+				<combo_item name="Torus">
+					Tore
+				</combo_item>
+				<combo_item name="Tube">
+					Tube
+				</combo_item>
+				<combo_item name="Ring">
+					Anneau
+				</combo_item>
+				<combo_item name="Sculpted">
+					Sculptie
+				</combo_item>
+			</combo_box>
+			<text name="text cut">
+				Début et fin de découpe du tracé
+			</text>
+			<spinner label="D" name="cut begin"/>
+			<spinner label="F" name="cut end"/>
+			<text name="text hollow">
+				Creux
+			</text>
+			<text name="text skew">
+				Biais
+			</text>
+			<text name="Hollow Shape">
+				Forme du creux
+			</text>
+			<combo_box name="hole">
+				<combo_item name="Default">
+					Défaut
+				</combo_item>
+				<combo_item name="Circle">
+					Cercle
+				</combo_item>
+				<combo_item name="Square">
+					Carré
+				</combo_item>
+				<combo_item name="Triangle">
+					Triangle
+				</combo_item>
+			</combo_box>
+			<text name="text twist">
+				Début et fin de vrille
+			</text>
+			<spinner label="D" name="Twist Begin"/>
+			<spinner label="F" name="Twist End"/>
+			<text name="scale_taper">
+				Biseautage
+			</text>
+			<text name="scale_hole">
+				Taille du trou
+			</text>
+			<spinner label="X" name="Taper Scale X"/>
+			<spinner label="Y" name="Taper Scale Y"/>
+			<text name="text topshear">
+				Inclinaison
+			</text>
+			<spinner label="X" name="Shear X"/>
+			<spinner label="Y" name="Shear Y"/>
+			<text name="advanced_cut">
+				Début et fin de découpe du profilé
+			</text>
+			<text name="advanced_dimple">
+				Début et fin du creux
+			</text>
+			<text name="advanced_slice">
+				Début et fin de la tranche
+			</text>
+			<spinner label="D" name="Path Limit Begin"/>
+			<spinner label="F" name="Path Limit End"/>
+			<text name="text taper2">
+				Biseautage
+			</text>
+			<spinner label="X" name="Taper X"/>
+			<spinner label="Y" name="Taper Y"/>
+			<text name="text radius delta">
+				Rayon
+			</text>
+			<text name="text revolutions">
+				Révolutions
+			</text>
+			<texture_picker label="Texture du sculptie" name="sculpt texture control" tool_tip="Cliquez pour sélectionner une image"/>
+			<check_box label="Mirroir" name="sculpt mirror control" tool_tip="Retourne le sculptie le long de l&apos;axe des X."/>
+			<check_box label="A l&apos;envers" name="sculpt invert control" tool_tip="Inverse les valeurs normales d&apos;un sculptie et le fait apparaître à l&apos;envers."/>
+			<text name="label sculpt type">
+				Type de raccord
+			</text>
+			<combo_box name="sculpt type control">
+				<combo_item name="None">
+					(aucun)
+				</combo_item>
+				<combo_item name="Sphere">
+					Sphère
+				</combo_item>
+				<combo_item name="Torus">
+					Tore
+				</combo_item>
+				<combo_item name="Plane">
+					Plan
+				</combo_item>
+				<combo_item name="Cylinder">
+					Cylindre
+				</combo_item>
+			</combo_box>
+		</panel>
+		<panel label="Attributs" name="Features">
+			<text name="select_single">
+				Sélectionnez un prim pour modifier les attributs.
+			</text>
+			<text name="edit_object">
+				Modifier les attributs de l&apos;objet :
+			</text>
+			<check_box label="Flexibilité" name="Flexible1D Checkbox Ctrl" tool_tip="Donne à l&apos;objet de la souplesse sur l&apos;axe des Z (côté client uniquement)."/>
+			<spinner label="Souplesse" name="FlexNumSections"/>
+			<spinner label="Gravité" name="FlexGravity"/>
+			<spinner label="Élasticité" name="FlexFriction"/>
+			<spinner label="Vent" name="FlexWind"/>
+			<spinner label="Tension" name="FlexTension"/>
+			<spinner label="Force X" name="FlexForceX"/>
+			<spinner label="Force Y" name="FlexForceY"/>
+			<spinner label="Force Z" name="FlexForceZ"/>
+			<check_box label="Lumière" name="Light Checkbox Ctrl" tool_tip="Permet aux objets d&apos;émettre de la lumière"/>
+			<text name="label color">
+				Couleur
+			</text>
+			<color_swatch label="" name="colorswatch" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/>
+			<spinner label="Intensité" name="Light Intensity"/>
+			<spinner label="Portée" name="Light Radius"/>
+			<spinner label="Atténuation" name="Light Falloff"/>
+		</panel>
+		<panel label="Texture" name="Texture">
+			<texture_picker label="Texture" name="texture control" tool_tip="Cliquez pour sélectionner une image"/>
+			<color_swatch label="Couleur" name="colorswatch" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs"/>
+			<text name="color trans" width="88">
+				Transparence
+			</text>
+			<text name="glow label">
+				Rayonnement
+			</text>
+			<check_box label="Lumineux" name="checkbox fullbright"/>
+			<text name="tex gen">
+				Application
+			</text>
+			<combo_box name="combobox texgen">
+				<combo_item name="Default">
+					Défaut
+				</combo_item>
+				<combo_item name="Planar">
+					Planar
+				</combo_item>
+			</combo_box>
+			<text name="label shininess">
+				Brillance
+			</text>
+			<combo_box name="combobox shininess">
+				<combo_item name="None">
+					Aucune
+				</combo_item>
+				<combo_item name="Low">
+					Faible
+				</combo_item>
+				<combo_item name="Medium">
+					Moyenne
+				</combo_item>
+				<combo_item name="High">
+					Élevée
+				</combo_item>
+			</combo_box>
+			<text name="label bumpiness">
+				Relief
+			</text>
+			<combo_box name="combobox bumpiness">
+				<combo_item name="None">
+					Aucun
+				</combo_item>
+				<combo_item name="Brightness">
+					Luminosité
+				</combo_item>
+				<combo_item name="Darkness">
+					Obscurité
+				</combo_item>
+				<combo_item name="woodgrain">
+					Aggloméré
+				</combo_item>
+				<combo_item name="bark">
+					Écorce
+				</combo_item>
+				<combo_item name="bricks">
+					Briques
+				</combo_item>
+				<combo_item name="checker">
+					Damier
+				</combo_item>
+				<combo_item name="concrete">
+					Béton
+				</combo_item>
+				<combo_item name="crustytile">
+					Carrelage
+				</combo_item>
+				<combo_item name="cutstone">
+					Pierre de taille
+				</combo_item>
+				<combo_item name="discs">
+					Disques
+				</combo_item>
+				<combo_item name="gravel">
+					Gravier
+				</combo_item>
+				<combo_item name="petridish">
+					Boîte de Petri
+				</combo_item>
+				<combo_item name="siding">
+					Lattes
+				</combo_item>
+				<combo_item name="stonetile">
+					Carreaux
+				</combo_item>
+				<combo_item name="stucco">
+					Stuc
+				</combo_item>
+				<combo_item name="suction">
+					Ventouses
+				</combo_item>
+				<combo_item name="weave">
+					Tissage
+				</combo_item>
+			</combo_box>
+			<text name="tex scale">
+				Répétitions par face
+			</text>
+			<spinner label="Horizontal (U)" name="TexScaleU"/>
+			<check_box label="Inverser" name="checkbox flip s"/>
+			<spinner label="Vertical (V)" name="TexScaleV"/>
+			<check_box label="Inverser" name="checkbox flip t"/>
+			<text name="tex rotate">
+				Rotation (degrés)
+			</text>
+			<spinner left="122" name="TexRot" width="58"/>
+			<string name="string repeats per meter">
+				Répétitions au mètre
+			</string>
+			<string name="string repeats per face">
+				Répétitions par face
+			</string>
+			<text name="rpt" width="160">
+				Répétitions au mètre
+			</text>
+			<spinner left="122" name="rptctrl" width="58"/>
+			<button label="Appliquer" label_selected="Appliquer" left_delta="68" name="button apply" width="75"/>
+			<text name="tex offset">
+				Décalage
+			</text>
+			<spinner label="Horizontal (U)" name="TexOffsetU"/>
+			<spinner label="Vertical (V)" name="TexOffsetV"/>
+			<text name="textbox autofix">
+				Ajuster la texture du média
+(chargement préalable)
+			</text>
+			<button label="Ajuster" label_selected="Ajuster" left="150" name="button align"/>
+		</panel>
+		<panel label="Contenu" name="Contents">
+			<button label="Nouveau script" label_selected="Nouveau script..." name="button new script"/>
+			<button label="Permissions..." name="button permissions"/>
+		</panel>
+	</tab_container>
+	<panel name="land info panel">
+		<text name="label_parcel_info">
+			Informations sur la parcelle
+		</text>
+		<text name="label_area_price">
+			Prix : [PRICE] L$ pour [AREA] m².
+		</text>
+		<text name="label_area">
+			Surface : [AREA] m²
+		</text>
+		<button label="À propos du terrain..." label_selected="À propos du terrain..." name="button about land" width="132"/>
+		<check_box label="Afficher les propriétaires" name="checkbox show owners" tool_tip="Colorie les parcelles en fonction de leur propriétaire"/>
+		<button label="?" label_selected="?" name="button show owners help"/>
+		<text name="label_parcel_modify">
+			Modifier la parcelle
+		</text>
+		<button label="Diviser..." label_selected="Diviser..." name="button subdivide land" width="132"/>
+		<button label="Fusionner..." label_selected="Fusionner..." name="button join land" width="132"/>
+		<text name="label_parcel_trans">
+			Transactions
+		</text>
+		<button label="Acheter le terrain..." label_selected="Acheter le terrain..." name="button buy land" width="132"/>
+		<button label="Abandonner le terrain..." label_selected="Abandonner le terrain..." name="button abandon land" width="132"/>
+	</panel>
+	<string name="status_rotate">
+		Pour faire tourner l&apos;objet, faîtes glisser les bandes de couleur.
+	</string>
+	<string name="status_scale">
+		Pour étirer le côté sélectionné, cliquez et faites glisser
+	</string>
+	<string name="status_move">
+		Faîtes glisser pour déplacer, Maj-faire glisser pour copier.
+	</string>
+	<string name="status_modifyland">
+		Cliquez et maintenez pour modifier le terrain
+	</string>
+	<string name="status_camera">
+		Cliquez et faites glisser pour changer l&apos;affichage
+	</string>
+	<string name="status_grab">
+		Faîtes glisser pour déplacer, appuyez sur Ctrl pour soulever, Crtl-Maj pour pivoter
+	</string>
+	<string name="status_place">
+		Cliquez dans le monde pour construire
+	</string>
+	<string name="status_selectland">
+		Cliquez et faites glisser pour sélectionner le terrain
+	</string>
+	<string name="grid_screen_text">
+		Écran
+	</string>
+	<string name="grid_local_text">
+		Local
+	</string>
+	<string name="grid_world_text">
+		Monde
+	</string>
+	<string name="grid_reference_text">
+		Référence
+	</string>
+	<string name="grid_attachment_text">
+		Pièce-jointe
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_top_objects.xml b/indra/newview/skins/default/xui/fr/floater_top_objects.xml
index 0aa21d313e..3be281b6c2 100644
--- a/indra/newview/skins/default/xui/fr/floater_top_objects.xml
+++ b/indra/newview/skins/default/xui/fr/floater_top_objects.xml
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="top_objects" title="en cours de chargement...">
-	<text name="title_text">
-		Chargement...
-	</text>
-	<scroll_list name="objects_list">
-		<column label="Score" name="score"/>
-		<column label="Nom" name="name"/>
-		<column label="Propriétaire" name="owner"/>
-		<column label="Lieu" name="location"/>
-		<column label="Heure" name="time"/>
-		<column label="Heure Mono" name="mono_time"/>
-	</scroll_list>
-	<text name="id_text">
-		ID de l&apos;objet :
-	</text>
-	<button label="Afficher balise" name="show_beacon_btn"/>
-	<text name="obj_name_text">
-		Nom :
-	</text>
-	<button label="Filtre" name="filter_object_btn"/>
-	<text name="owner_name_text">
-		Nom :
-	</text>
-	<button label="Filtre" name="filter_owner_btn"/>
-	<button label="Renvoyer" name="return_selected_btn"/>
-	<button label="Renvoyer tous" name="return_all_btn"/>
-	<button label="Désactiver" name="disable_selected_btn"/>
-	<button label="Désactiver tous" name="disable_all_btn"/>
-	<button label="Rafraîchir" name="refresh_btn"/>
-	<string name="top_scripts_title">
-		Scripts principaux
-	</string>
-	<string name="top_scripts_text">
-		[COUNT] scripts prenant un total de [TIME] ms
-	</string>
-	<string name="scripts_score_label">
-		Heure
-	</string>
-	<string name="scripts_mono_time_label">
-		Heure Mono
-	</string>
-	<string name="top_colliders_title">
-		Objets souvent responsables de collision
-	</string>
-	<string name="top_colliders_text">
-		[COUNT] objets souvent responsables de collisions
-	</string>
-	<string name="colliders_score_label">
-		Score
-	</string>
-	<string name="none_descriptor">
-		Aucun résultat.
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="top_objects" title="en cours de chargement...">
+	<text name="title_text">
+		Chargement...
+	</text>
+	<scroll_list name="objects_list">
+		<column label="Score" name="score"/>
+		<column label="Nom" name="name"/>
+		<column label="Propriétaire" name="owner"/>
+		<column label="Lieu" name="location"/>
+		<column label="Heure" name="time"/>
+		<column label="Heure Mono" name="mono_time"/>
+	</scroll_list>
+	<text name="id_text">
+		ID de l&apos;objet :
+	</text>
+	<button label="Afficher balise" name="show_beacon_btn"/>
+	<text name="obj_name_text">
+		Nom :
+	</text>
+	<button label="Filtre" name="filter_object_btn"/>
+	<text name="owner_name_text">
+		Nom :
+	</text>
+	<button label="Filtre" name="filter_owner_btn"/>
+	<button label="Renvoyer" name="return_selected_btn"/>
+	<button label="Renvoyer tous" name="return_all_btn"/>
+	<button label="Désactiver" name="disable_selected_btn"/>
+	<button label="Désactiver tous" name="disable_all_btn"/>
+	<button label="Rafraîchir" name="refresh_btn"/>
+	<string name="top_scripts_title">
+		Scripts principaux
+	</string>
+	<string name="top_scripts_text">
+		[COUNT] scripts prenant un total de [TIME] ms
+	</string>
+	<string name="scripts_score_label">
+		Heure
+	</string>
+	<string name="scripts_mono_time_label">
+		Heure Mono
+	</string>
+	<string name="top_colliders_title">
+		Objets souvent responsables de collision
+	</string>
+	<string name="top_colliders_text">
+		[COUNT] objets souvent responsables de collisions
+	</string>
+	<string name="colliders_score_label">
+		Score
+	</string>
+	<string name="none_descriptor">
+		Aucun résultat.
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_tos.xml b/indra/newview/skins/default/xui/fr/floater_tos.xml
index 83e0a2aab4..b77838d92c 100644
--- a/indra/newview/skins/default/xui/fr/floater_tos.xml
+++ b/indra/newview/skins/default/xui/fr/floater_tos.xml
@@ -1,27 +1,27 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="modal container" title=" ">
-	<button label="Continuer" label_selected="Continuer" name="Continue" />
-	<button label="Annuler" label_selected="Annuler" name="Cancel" />
-	<radio_group name="tos_agreement">
-		<radio_item name="radio_disagree">
-			Je n&apos;accepte pas les Conditions Générales d&apos;Utilisation
-		</radio_item>
-		<radio_item name="radio_agree">
-			J&apos;accepte les Conditions Générales d&apos;Utilisation
-		</radio_item>
-	</radio_group>
-	<text name="tos_title">
-		Acceptation des Conditions Générales d&apos;Utilisation
-	</text>
-	<check_box label="J&apos;accepte les Conditions d&apos;utilisation" name="agree_chk" />
-	<text name="tos_heading">
-		Veuillez lire attentivement les Conditions d&apos;utilisation suivantes. Pour continuer à utiliser
-Second Life, vous devez accepter ces conditions.
-	</text>
-	<text_editor name="tos_text">
-		TOS_TEXT
-	</text_editor>
-	<text name="real_url">
-		http://secondlife.com/app/tos/
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="modal container" title=" ">
+	<button label="Continuer" label_selected="Continuer" name="Continue" />
+	<button label="Annuler" label_selected="Annuler" name="Cancel" />
+	<radio_group name="tos_agreement">
+		<radio_item name="radio_disagree">
+			Je n&apos;accepte pas les Conditions Générales d&apos;Utilisation
+		</radio_item>
+		<radio_item name="radio_agree">
+			J&apos;accepte les Conditions Générales d&apos;Utilisation
+		</radio_item>
+	</radio_group>
+	<text name="tos_title">
+		Acceptation des Conditions Générales d&apos;Utilisation
+	</text>
+	<check_box label="J&apos;accepte les Conditions d&apos;utilisation" name="agree_chk" />
+	<text name="tos_heading">
+		Veuillez lire attentivement les Conditions d&apos;utilisation suivantes. Pour continuer à utiliser
+Second Life, vous devez accepter ces conditions.
+	</text>
+	<text_editor name="tos_text">
+		TOS_TEXT
+	</text_editor>
+	<text name="real_url">
+		http://secondlife.com/app/tos/
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_url_entry.xml b/indra/newview/skins/default/xui/fr/floater_url_entry.xml
index fce1f483cf..6a90731691 100644
--- a/indra/newview/skins/default/xui/fr/floater_url_entry.xml
+++ b/indra/newview/skins/default/xui/fr/floater_url_entry.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="url_entry">
-	<text name="media_label">
-		URL du média :
-	</text>
-	<combo_box left="100" name="media_entry" width="360" />
-	<button label="OK" name="ok_btn" />
-	<button label="Annuler" name="cancel_btn" />
-	<button label="Effacer" name="clear_btn" />
-	<text name="loading_label">
-		Chargement...
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="url_entry">
+	<text name="media_label">
+		URL du média :
+	</text>
+	<combo_box left="100" name="media_entry" width="360" />
+	<button label="OK" name="ok_btn" />
+	<button label="Annuler" name="cancel_btn" />
+	<button label="Effacer" name="clear_btn" />
+	<text name="loading_label">
+		Chargement...
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_water.xml b/indra/newview/skins/default/xui/fr/floater_water.xml
index 9c4d7ad653..9b77c2450d 100644
--- a/indra/newview/skins/default/xui/fr/floater_water.xml
+++ b/indra/newview/skins/default/xui/fr/floater_water.xml
@@ -1,89 +1,89 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Water Floater" title="Éditeur d&apos;eau avancé">
-	<text name="KeyFramePresetsText">
-		Préréglages eau :
-	</text>
-	<button label="Nouveau" label_selected="Nouveau" name="WaterNewPreset" />
-	<button label="Enregistrer" label_selected="Enregistrer" name="WaterSavePreset" width="75" left_delta="75"/>
-	<button label="Supprimer" label_selected="Supprimer" name="WaterDeletePreset" left_delta="80"/>
-	<tab_container name="Water Tabs">
-		<panel label="Paramètres" name="Settings">
-			<text name="BHText">
-				Couleur du brouillard
-dans l&apos;eau
-			</text>
-			<button label="?" name="WaterFogColorHelp" />
-			<color_swatch name="WaterFogColor" left="75" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" />
-			<text name="WaterFogDensText">
-				Densité du brouillard
-			</text>
-			<button label="?" name="WaterFogDensityHelp" />
-			<text name="WaterUnderWaterFogModText">
-				Brouillard sous-marin
-			</text>
-			<button label="?" name="WaterUnderWaterFogModHelp" />
-			<text name="BDensText">
-				Échelle des vaguelettes
-			</text>
-			<button label="?" name="WaterNormalScaleHelp" />
-			<text name="BHText2">
-				1
-			</text>
-			<text name="BHText3">
-				2
-			</text>
-			<text name="BHText4">
-				3
-			</text>
-			<text name="HDText">
-				Échelle Fresnel
-			</text>
-			<button label="?" name="WaterFresnelScaleHelp" />
-			<text name="FresnelOffsetText">
-				Décalage Fresnel
-			</text>
-			<button label="?" name="WaterFresnelOffsetHelp" />
-			<text name="DensMultText">
-				Réfraction au dessus
-			</text>
-			<button label="?" name="WaterScaleAboveHelp" />
-			<text name="WaterScaleBelowText">
-				Réfraction en dessous
-			</text>
-			<button label="?" name="WaterScaleBelowHelp" />
-			<text name="MaxAltText">
-				Multiplicateur de flou
-			</text>
-			<button label="?" name="WaterBlurMultiplierHelp" />
-		</panel>
-		<panel label="Image" name="Waves">
-			<text name="BHText">
-				Direction grande vague
-			</text>
-			<button label="?" name="WaterWave1Help" />
-			<text name="WaterWave1DirXText">
-				X
-			</text>
-			<text name="WaterWave1DirYText">
-				Y
-			</text>
-			<text name="BHText2">
-				Direction petite vague
-			</text>
-			<button label="?" name="WaterWave2Help" />
-			<text name="WaterWave2DirXText">
-				X
-			</text>
-			<text name="WaterWave2DirYText">
-				Y
-			</text>
-			<text name="BHText3">
-				Normal Map
-			</text>
-			<button label="?" name="WaterNormalMapHelp" />
-		</panel>
-	</tab_container>
-	<string name="WLDefaultWaterNames">
-		Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Water Floater" title="Éditeur d&apos;eau avancé">
+	<text name="KeyFramePresetsText">
+		Préréglages eau :
+	</text>
+	<button label="Nouveau" label_selected="Nouveau" name="WaterNewPreset" />
+	<button label="Enregistrer" label_selected="Enregistrer" name="WaterSavePreset" width="75" left_delta="75"/>
+	<button label="Supprimer" label_selected="Supprimer" name="WaterDeletePreset" left_delta="80"/>
+	<tab_container name="Water Tabs">
+		<panel label="Paramètres" name="Settings">
+			<text name="BHText">
+				Couleur du brouillard
+dans l&apos;eau
+			</text>
+			<button label="?" name="WaterFogColorHelp" />
+			<color_swatch name="WaterFogColor" left="75" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs" />
+			<text name="WaterFogDensText">
+				Densité du brouillard
+			</text>
+			<button label="?" name="WaterFogDensityHelp" />
+			<text name="WaterUnderWaterFogModText">
+				Brouillard sous-marin
+			</text>
+			<button label="?" name="WaterUnderWaterFogModHelp" />
+			<text name="BDensText">
+				Échelle des vaguelettes
+			</text>
+			<button label="?" name="WaterNormalScaleHelp" />
+			<text name="BHText2">
+				1
+			</text>
+			<text name="BHText3">
+				2
+			</text>
+			<text name="BHText4">
+				3
+			</text>
+			<text name="HDText">
+				Échelle Fresnel
+			</text>
+			<button label="?" name="WaterFresnelScaleHelp" />
+			<text name="FresnelOffsetText">
+				Décalage Fresnel
+			</text>
+			<button label="?" name="WaterFresnelOffsetHelp" />
+			<text name="DensMultText">
+				Réfraction au dessus
+			</text>
+			<button label="?" name="WaterScaleAboveHelp" />
+			<text name="WaterScaleBelowText">
+				Réfraction en dessous
+			</text>
+			<button label="?" name="WaterScaleBelowHelp" />
+			<text name="MaxAltText">
+				Multiplicateur de flou
+			</text>
+			<button label="?" name="WaterBlurMultiplierHelp" />
+		</panel>
+		<panel label="Image" name="Waves">
+			<text name="BHText">
+				Direction grande vague
+			</text>
+			<button label="?" name="WaterWave1Help" />
+			<text name="WaterWave1DirXText">
+				X
+			</text>
+			<text name="WaterWave1DirYText">
+				Y
+			</text>
+			<text name="BHText2">
+				Direction petite vague
+			</text>
+			<button label="?" name="WaterWave2Help" />
+			<text name="WaterWave2DirXText">
+				X
+			</text>
+			<text name="WaterWave2DirYText">
+				Y
+			</text>
+			<text name="BHText3">
+				Normal Map
+			</text>
+			<button label="?" name="WaterNormalMapHelp" />
+		</panel>
+	</tab_container>
+	<string name="WLDefaultWaterNames">
+		Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_wearable_save_as.xml b/indra/newview/skins/default/xui/fr/floater_wearable_save_as.xml
index 8c279d8724..a5bc87d951 100644
--- a/indra/newview/skins/default/xui/fr/floater_wearable_save_as.xml
+++ b/indra/newview/skins/default/xui/fr/floater_wearable_save_as.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="modal container">
-	<button label="Enregistrer" label_selected="Enregistrer" name="Save" />
-	<button label="Annuler" label_selected="Annuler" name="Cancel" />
-	<text type="string" length="1" name="Save item as:">
-		Enregistrer l&apos;objet sous :
-	</text>
-	<line_editor name="name ed">
-		Nouveau [DESC]
-	</line_editor>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="modal container">
+	<button label="Enregistrer" label_selected="Enregistrer" name="Save" />
+	<button label="Annuler" label_selected="Annuler" name="Cancel" />
+	<text type="string" length="1" name="Save item as:">
+		Enregistrer l&apos;objet sous :
+	</text>
+	<line_editor name="name ed">
+		Nouveau [DESC]
+	</line_editor>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
index 1aa6cd5a45..d1a62dc6bc 100644
--- a/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/fr/floater_windlight_options.xml
@@ -1,190 +1,190 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="WindLight floater" title="Éditeur de ciel avancé" width="706">
-	<text name="KeyFramePresetsText">
-		Préréglages ciel :
-	</text>
-	<button label="Nouveau" label_selected="Nouveau" name="WLNewPreset" />
-	<button label="Enregistrer" label_selected="Enregistrer" name="WLSavePreset" width="75" left_delta="75"/>
-	<button label="Supprimer" label_selected="Supprimer" name="WLDeletePreset" left_delta="80"/>
-	<button label="Éditeur du cycle du jour" label_selected="Éditeur du cycle du jour"
-	     name="WLDayCycleMenuButton" width="150" left_delta="95" />
-	<tab_container name="WindLight Tabs" width="706">
-		<panel label="Atmosphère" name="Atmosphere">
-			<text name="BHText">
-				Bleu de l&apos;horizon
-			</text>
-			<button label="?" name="WLBlueHorizonHelp" />
-			<text name="BHText2">
-				R
-			</text>
-			<text name="BHText3">
-				V
-			</text>
-			<text name="BHText4">
-				B
-			</text>
-			<text name="BHText5">
-				I
-			</text>
-			<text name="BDensText">
-				Quantité de brume
-			</text>
-			<button label="?" name="WLHazeHorizonHelp" />
-			<text name="BDensText2">
-				Densité du bleu
-			</text>
-			<button label="?" name="WLBlueDensityHelp" />
-			<text name="BHText6">
-				R
-			</text>
-			<text name="BHText7">
-				V
-			</text>
-			<text name="BHText8">
-				B
-			</text>
-			<text name="BHText9">
-				I
-			</text>
-			<text name="HDText">
-				Densité de la brume
-			</text>
-			<button label="?" name="WLHazeDensityHelp" />
-			<text name="DensMultText">
-				Multiplicateur de densité
-			</text>
-			<button label="?" name="WLDensityMultHelp" />
-			<text name="WLDistanceMultText">
-				Multiplicateur de distance
-			</text>
-			<button label="?" name="WLDistanceMultHelp" />
-			<text name="MaxAltText">
-				Altitude maximum
-			</text>
-			<button label="?" name="WLMaxAltitudeHelp" />
-		</panel>
-		<panel label="Éclairage" name="Lighting">
-			<text name="SLCText">
-				Couleur soleil/lune
-			</text>
-			<button label="?" name="WLSunlightColorHelp" />
-			<text name="BHText">
-				R
-			</text>
-			<text name="BHText2">
-				V
-			</text>
-			<text name="BHText3">
-				B
-			</text>
-			<text name="BHText4">
-				I
-			</text>
-			<text name="TODText">
-				Position soleil/lune
-			</text>
-			<button label="?" name="WLTimeOfDayHelp" />
-			<text name="WLAmbientText">
-				Éclairage ambiant
-			</text>
-			<button label="?" name="WLAmbientHelp" />
-			<text name="BHText5">
-				R
-			</text>
-			<text name="BHText6">
-				V
-			</text>
-			<text name="BHText7">
-				B
-			</text>
-			<text name="BHText8">
-				I
-			</text>
-			<text name="WLEastAngleText">
-				Angle du levant
-			</text>
-			<button label="?" name="WLEastAngleHelp" />
-			<text name="SunGlowText">
-				Rayonnement du soleil
-			</text>
-			<button label="?" name="WLSunGlowHelp" />
-			<slider label="Netteté " name="WLGlowB" />
-			<slider label="Taille    " name="WLGlowR" />
-			<text name="SceneGammaText">
-				Gamma de la scène
-			</text>
-			<button label="?" name="WLSceneGammaHelp" />
-			<text name="WLStarText">
-				Éclat des étoiles
-			</text>
-			<button label="?" name="WLStarBrightnessHelp" />
-		</panel>
-		<panel label="Nuages" name="Clouds">
-			<text name="WLCloudColorText">
-				Couleur des nuages
-			</text>
-			<button label="?" name="WLCloudColorHelp" />
-			<text name="BHText">
-				R
-			</text>
-			<text name="BHText2">
-				V
-			</text>
-			<text name="BHText3">
-				B
-			</text>
-			<text name="BHText4">
-				I
-			</text>
-			<text name="WLCloudColorText2">
-				Nuages XY/densité
-			</text>
-			<button label="?" name="WLCloudDensityHelp" />
-			<text name="BHText5">
-				X
-			</text>
-			<text name="BHText6">
-				Y
-			</text>
-			<text name="BHText7">
-				D
-			</text>
-			<text name="WLCloudCoverageText">
-				Couverture nuageuse
-			</text>
-			<button label="?" name="WLCloudCoverageHelp" left="407"/>
-			<text name="WLCloudScaleText">
-				Altitude des nuages
-			</text>
-			<button label="?" name="WLCloudScaleHelp" left="407"/>
-			<text name="WLCloudDetailText">
-				Détails nuages (XY/densité)
-			</text>
-			<button label="?" name="WLCloudDetailHelp" left="407" bottom_delta="-2" />
-			<text name="BHText8">
-				X
-			</text>
-			<text name="BHText9">
-				Y
-			</text>
-			<text name="BHText10">
-				D
-			</text>
-			<text name="WLCloudScrollXText">
-				Direction et vitesse X
-			</text>
-			<button label="?" name="WLCloudScrollXHelp" />
-			<check_box label="Verrouiller" name="WLCloudLockX" />
-			<text name="WLCloudScrollYText">
-				Direction et vitesse Y
-			</text>
-			<button label="?" name="WLCloudScrollYHelp" />
-			<check_box label="Verrouiller" name="WLCloudLockY" />
-			<check_box label="Nuages classiques" name="DrawClassicClouds" />
-			<button label="?" name="WLClassicCloudsHelp" />
-		</panel>
-	</tab_container>
-	<string name="WLDefaultSkyNames">
-		A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="WindLight floater" title="Éditeur de ciel avancé" width="706">
+	<text name="KeyFramePresetsText">
+		Préréglages ciel :
+	</text>
+	<button label="Nouveau" label_selected="Nouveau" name="WLNewPreset" />
+	<button label="Enregistrer" label_selected="Enregistrer" name="WLSavePreset" width="75" left_delta="75"/>
+	<button label="Supprimer" label_selected="Supprimer" name="WLDeletePreset" left_delta="80"/>
+	<button label="Éditeur du cycle du jour" label_selected="Éditeur du cycle du jour"
+	     name="WLDayCycleMenuButton" width="150" left_delta="95" />
+	<tab_container name="WindLight Tabs" width="706">
+		<panel label="Atmosphère" name="Atmosphere">
+			<text name="BHText">
+				Bleu de l&apos;horizon
+			</text>
+			<button label="?" name="WLBlueHorizonHelp" />
+			<text name="BHText2">
+				R
+			</text>
+			<text name="BHText3">
+				V
+			</text>
+			<text name="BHText4">
+				B
+			</text>
+			<text name="BHText5">
+				I
+			</text>
+			<text name="BDensText">
+				Quantité de brume
+			</text>
+			<button label="?" name="WLHazeHorizonHelp" />
+			<text name="BDensText2">
+				Densité du bleu
+			</text>
+			<button label="?" name="WLBlueDensityHelp" />
+			<text name="BHText6">
+				R
+			</text>
+			<text name="BHText7">
+				V
+			</text>
+			<text name="BHText8">
+				B
+			</text>
+			<text name="BHText9">
+				I
+			</text>
+			<text name="HDText">
+				Densité de la brume
+			</text>
+			<button label="?" name="WLHazeDensityHelp" />
+			<text name="DensMultText">
+				Multiplicateur de densité
+			</text>
+			<button label="?" name="WLDensityMultHelp" />
+			<text name="WLDistanceMultText">
+				Multiplicateur de distance
+			</text>
+			<button label="?" name="WLDistanceMultHelp" />
+			<text name="MaxAltText">
+				Altitude maximum
+			</text>
+			<button label="?" name="WLMaxAltitudeHelp" />
+		</panel>
+		<panel label="Éclairage" name="Lighting">
+			<text name="SLCText">
+				Couleur soleil/lune
+			</text>
+			<button label="?" name="WLSunlightColorHelp" />
+			<text name="BHText">
+				R
+			</text>
+			<text name="BHText2">
+				V
+			</text>
+			<text name="BHText3">
+				B
+			</text>
+			<text name="BHText4">
+				I
+			</text>
+			<text name="TODText">
+				Position soleil/lune
+			</text>
+			<button label="?" name="WLTimeOfDayHelp" />
+			<text name="WLAmbientText">
+				Éclairage ambiant
+			</text>
+			<button label="?" name="WLAmbientHelp" />
+			<text name="BHText5">
+				R
+			</text>
+			<text name="BHText6">
+				V
+			</text>
+			<text name="BHText7">
+				B
+			</text>
+			<text name="BHText8">
+				I
+			</text>
+			<text name="WLEastAngleText">
+				Angle du levant
+			</text>
+			<button label="?" name="WLEastAngleHelp" />
+			<text name="SunGlowText">
+				Rayonnement du soleil
+			</text>
+			<button label="?" name="WLSunGlowHelp" />
+			<slider label="Netteté " name="WLGlowB" />
+			<slider label="Taille    " name="WLGlowR" />
+			<text name="SceneGammaText">
+				Gamma de la scène
+			</text>
+			<button label="?" name="WLSceneGammaHelp" />
+			<text name="WLStarText">
+				Éclat des étoiles
+			</text>
+			<button label="?" name="WLStarBrightnessHelp" />
+		</panel>
+		<panel label="Nuages" name="Clouds">
+			<text name="WLCloudColorText">
+				Couleur des nuages
+			</text>
+			<button label="?" name="WLCloudColorHelp" />
+			<text name="BHText">
+				R
+			</text>
+			<text name="BHText2">
+				V
+			</text>
+			<text name="BHText3">
+				B
+			</text>
+			<text name="BHText4">
+				I
+			</text>
+			<text name="WLCloudColorText2">
+				Nuages XY/densité
+			</text>
+			<button label="?" name="WLCloudDensityHelp" />
+			<text name="BHText5">
+				X
+			</text>
+			<text name="BHText6">
+				Y
+			</text>
+			<text name="BHText7">
+				D
+			</text>
+			<text name="WLCloudCoverageText">
+				Couverture nuageuse
+			</text>
+			<button label="?" name="WLCloudCoverageHelp" left="407"/>
+			<text name="WLCloudScaleText">
+				Altitude des nuages
+			</text>
+			<button label="?" name="WLCloudScaleHelp" left="407"/>
+			<text name="WLCloudDetailText">
+				Détails nuages (XY/densité)
+			</text>
+			<button label="?" name="WLCloudDetailHelp" left="407" bottom_delta="-2" />
+			<text name="BHText8">
+				X
+			</text>
+			<text name="BHText9">
+				Y
+			</text>
+			<text name="BHText10">
+				D
+			</text>
+			<text name="WLCloudScrollXText">
+				Direction et vitesse X
+			</text>
+			<button label="?" name="WLCloudScrollXHelp" />
+			<check_box label="Verrouiller" name="WLCloudLockX" />
+			<text name="WLCloudScrollYText">
+				Direction et vitesse Y
+			</text>
+			<button label="?" name="WLCloudScrollYHelp" />
+			<check_box label="Verrouiller" name="WLCloudLockY" />
+			<check_box label="Nuages classiques" name="DrawClassicClouds" />
+			<button label="?" name="WLClassicCloudsHelp" />
+		</panel>
+	</tab_container>
+	<string name="WLDefaultSkyNames">
+		A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_world_map.xml b/indra/newview/skins/default/xui/fr/floater_world_map.xml
index d7eaba3d04..b04390bc13 100644
--- a/indra/newview/skins/default/xui/fr/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/fr/floater_world_map.xml
@@ -1,89 +1,89 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="worldmap" title="Carte du monde">
-	<tab_container name="maptab" width="955">
-		<panel label="Objets" name="objects_mapview" width="953"/>
-		<panel label="Terrain" name="terrain_mapview" width="953"/>
-	</tab_container>
-	<icon left="973" name="square"/>
-	<text name="land_for_sale_label">
-		Terrain à vendre
-	</text>
-	<icon left="1113" name="square2"/>
-	<text name="auction_label">
-		Terrain aux enchères
-	</text>
-	<icon left="973" name="self"/>
-	<text name="you_label">
-		Vous
-	</text>
-	<icon left="1033" name="home"/>
-	<text name="home_label">
-		Domicile
-	</text>
-	<button label="Aller chez moi" label_selected="Aller chez moi" name="Go Home" tool_tip="Vous téléporte à votre domicile"/>
-	<text name="classifieds_label">
-		Petites annonces
-	</text>
-	<icon left="977" name="person"/>
-	<text name="person_label">
-		Résident
-	</text>
-	<check_box label=" " left_delta="60" name="people_chk"/>
-	<icon left="973" name="infohub"/>
-	<text name="infohub_label">
-		Infohub
-	</text>
-	<check_box label=" " left_delta="60" name="infohub_chk"/>
-	<icon left="973" name="telehub"/>
-	<text name="telehub_label">
-		Téléhub
-	</text>
-	<check_box label=" " left_delta="60" name="telehubchk"/>
-	<icon left="1113" name="landforsale"/>
-	<text name="land_for_sale_label2">
-		Terrain à vendre
-	</text>
-	<check_box label=" " name="land_for_sale_chk"/>
-	<icon left="1113" name="event"/>
-	<text name="events_label">
-		Événements
-	</text>
-	<check_box label=" " name="event_chk"/>
-	<icon left="1113" name="events_mature_icon"/>
-
-	<check_box name="event_mature_chk"/>
-	<icon left="973" name="avatar_icon"/>
-	<combo_box label="Amis connectés" name="friend combo" tool_tip="Ami à afficher sur la carte" width="232">
-		<combo_item name="none_selected">
-			Amis connectés
-		</combo_item>
-	</combo_box>
-	<icon left="973" name="landmark_icon"/>
-	<combo_box label="Repères" name="landmark combo" tool_tip="Repère à afficher sur la carte" width="232">
-		<combo_item name="none_selected">
-			Repères
-		</combo_item>
-	</combo_box>
-	<icon left="973" name="location_icon"/>
-	<line_editor label="Rechercher par nom de région" name="location" tool_tip="Saisissez le nom d&apos;une région" width="155"/>
-	<button label="Rechercher" label_selected="&gt;" left_delta="160" name="DoSearch" tool_tip="Recherchez sur la carte" width="75"/>
-	<text left="973" name="search_label">
-		Résultats de la recherche :
-	</text>
-	<scroll_list left="973" name="search_results" width="252">
-		<column label="" name="icon"/>
-		<column label="" name="sim_name"/>
-	</scroll_list>
-	<text left="973" name="location_label">
-		Emplacement :
-	</text>
-	<spinner left="993" name="spin x" tool_tip="Coordonnées des X du lieu à afficher sur la carte"/>
-	<spinner left="993" name="spin y" tool_tip="Coordonnées des Y du lieu à afficher sur la carte"/>
-	<spinner left="993" name="spin z" tool_tip="Coordonnées des Z du lieu à afficher sur la carte"/>
-	<button label="Téléporter" label_selected="Téléporter" left="-270" name="Teleport" tool_tip="Téléporter à l&apos;endroit sélectionné"/>
-	<button label="Afficher la destination" label_selected="Afficher la destination" name="Show Destination" tool_tip="Centrer la carte sur l&apos;endroit sélectionné" width="165"/>
-	<button label="Effacer" label_selected="Effacer" left="-270" name="Clear" tool_tip="Arrêter de suivre"/>
-	<button label="Afficher mon emplacement" label_selected="Afficher mon emplacement" name="Show My Location" tool_tip="Centrer la carte sur l&apos;emplacement de votre avatar" width="165"/>
-	<button label="Copier la SLURL dans le presse-papier" left="-270" name="copy_slurl" tool_tip="Copier l&apos;emplacement actuel comme SLURL pour l&apos;utiliser sur le Web." width="262"/>
-	<slider label="Zoom" left="-270" name="zoom slider"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="worldmap" title="Carte du monde">
+	<tab_container name="maptab" width="955">
+		<panel label="Objets" name="objects_mapview" width="953"/>
+		<panel label="Terrain" name="terrain_mapview" width="953"/>
+	</tab_container>
+	<icon left="973" name="square"/>
+	<text name="land_for_sale_label">
+		Terrain à vendre
+	</text>
+	<icon left="1113" name="square2"/>
+	<text name="auction_label">
+		Terrain aux enchères
+	</text>
+	<icon left="973" name="self"/>
+	<text name="you_label">
+		Vous
+	</text>
+	<icon left="1033" name="home"/>
+	<text name="home_label">
+		Domicile
+	</text>
+	<button label="Aller chez moi" label_selected="Aller chez moi" name="Go Home" tool_tip="Vous téléporte à votre domicile"/>
+	<text name="classifieds_label">
+		Petites annonces
+	</text>
+	<icon left="977" name="person"/>
+	<text name="person_label">
+		Résident
+	</text>
+	<check_box label=" " left_delta="60" name="people_chk"/>
+	<icon left="973" name="infohub"/>
+	<text name="infohub_label">
+		Infohub
+	</text>
+	<check_box label=" " left_delta="60" name="infohub_chk"/>
+	<icon left="973" name="telehub"/>
+	<text name="telehub_label">
+		Téléhub
+	</text>
+	<check_box label=" " left_delta="60" name="telehubchk"/>
+	<icon left="1113" name="landforsale"/>
+	<text name="land_for_sale_label2">
+		Terrain à vendre
+	</text>
+	<check_box label=" " name="land_for_sale_chk"/>
+	<icon left="1113" name="event"/>
+	<text name="events_label">
+		Événements
+	</text>
+	<check_box label=" " name="event_chk"/>
+	<icon left="1113" name="events_mature_icon"/>
+
+	<check_box name="event_mature_chk"/>
+	<icon left="973" name="avatar_icon"/>
+	<combo_box label="Amis connectés" name="friend combo" tool_tip="Ami à afficher sur la carte" width="232">
+		<combo_box.item name="none_selected">
+			Amis connectés
+		</combo_box.item>
+	</combo_box>
+	<icon left="973" name="landmark_icon"/>
+	<combo_box label="Repères" name="landmark combo" tool_tip="Repère à afficher sur la carte" width="232">
+		<combo_box.item name="none_selected">
+			Repères
+		</combo_box.item>
+	</combo_box>
+	<icon left="973" name="location_icon"/>
+	<line_editor label="Rechercher par nom de région" name="location" tool_tip="Saisissez le nom d&apos;une région" width="155"/>
+	<button label="Rechercher" label_selected="&gt;" left_delta="160" name="DoSearch" tool_tip="Recherchez sur la carte" width="75"/>
+	<text left="973" name="search_label">
+		Résultats de la recherche :
+	</text>
+	<scroll_list left="973" name="search_results" width="252">
+		<column label="" name="icon"/>
+		<column label="" name="sim_name"/>
+	</scroll_list>
+	<text left="973" name="location_label">
+		Emplacement :
+	</text>
+	<spinner left="993" name="spin x" tool_tip="Coordonnées des X du lieu à afficher sur la carte"/>
+	<spinner left="993" name="spin y" tool_tip="Coordonnées des Y du lieu à afficher sur la carte"/>
+	<spinner left="993" name="spin z" tool_tip="Coordonnées des Z du lieu à afficher sur la carte"/>
+	<button label="Téléporter" label_selected="Téléporter" left="-270" name="Teleport" tool_tip="Téléporter à l&apos;endroit sélectionné"/>
+	<button label="Afficher la destination" label_selected="Afficher la destination" name="Show Destination" tool_tip="Centrer la carte sur l&apos;endroit sélectionné" width="165"/>
+	<button label="Effacer" label_selected="Effacer" left="-270" name="Clear" tool_tip="Arrêter de suivre"/>
+	<button label="Afficher mon emplacement" label_selected="Afficher mon emplacement" name="Show My Location" tool_tip="Centrer la carte sur l&apos;emplacement de votre avatar" width="165"/>
+	<button label="Copier la SLURL dans le presse-papier" left="-270" name="copy_slurl" tool_tip="Copier l&apos;emplacement actuel comme SLURL pour l&apos;utiliser sur le Web." width="262"/>
+	<slider label="Zoom" left="-270" name="zoom slider"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/fr/fonts.xml b/indra/newview/skins/default/xui/fr/fonts.xml
index 021372d6f2..cccb45b973 100644
--- a/indra/newview/skins/default/xui/fr/fonts.xml
+++ b/indra/newview/skins/default/xui/fr/fonts.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<fonts>
-
-  <font name="OverrideTest"
-	comment="Name of font to test overriding">
-    <file>timesbd.ttf</file>
-  </font>
-
-</fonts>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<fonts>
+
+  <font name="OverrideTest"
+	comment="Name of font to test overriding">
+    <file>timesbd.ttf</file>
+  </font>
+
+</fonts>
diff --git a/indra/newview/skins/default/xui/fr/menu_inventory.xml b/indra/newview/skins/default/xui/fr/menu_inventory.xml
index 787e4c83db..ce347afe89 100644
--- a/indra/newview/skins/default/xui/fr/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/fr/menu_inventory.xml
@@ -1,66 +1,66 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu name="Popup">
-	<menu_item_call label="Acheter" name="Task Buy"/>
-	<menu_item_call label="Ouvrir" name="Task Open"/>
-	<menu_item_call label="Jouer" name="Task Play"/>
-	<menu_item_call label="Propriétés" name="Task Properties"/>
-	<menu_item_call label="Renommer" name="Task Rename"/>
-	<menu_item_call label="Supprimer" name="Task Remove"/>
-	<menu_item_call label="Vider la corbeille" name="Empty Trash"/>
-	<menu_item_call label="Vider les objets trouvés" name="Empty Lost And Found"/>
-	<menu_item_call label="Nouveau dossier" name="New Folder"/>
-	<menu_item_call label="Nouveau script" name="New Script"/>
-	<menu_item_call label="Nouvelle note" name="New Note"/>
-	<menu_item_call label="Nouveau geste" name="New Gesture"/>
-	<menu name="New Clothes">
-		<menu_item_call label="Nouvelle chemise" name="New Shirt"/>
-		<menu_item_call label="Nouveau pantalon" name="New Pants"/>
-		<menu_item_call label="Nouvelles chaussures" name="New Shoes"/>
-		<menu_item_call label="Nouvelles chaussettes" name="New Socks"/>
-		<menu_item_call label="Nouvelle veste" name="New Jacket"/>
-		<menu_item_call label="Nouvelle jupe" name="New Skirt"/>
-		<menu_item_call label="Nouveaux gants" name="New Gloves"/>
-		<menu_item_call label="Nouveau tricot" name="New Undershirt"/>
-		<menu_item_call label="Nouveaux sous-vêtements" name="New Underpants"/>
-	</menu>
-	<menu name="New Body Parts">
-		<menu_item_call label="Nouvelle silhouette" name="New Shape"/>
-		<menu_item_call label="Nouvelle peau" name="New Skin"/>
-		<menu_item_call label="Nouveaux cheveux" name="New Hair"/>
-		<menu_item_call label="Nouveaux yeux" name="New Eyes"/>
-	</menu>
-	<menu_item_call label="Téléporter" name="Landmark Open"/>
-	<menu_item_call label="Ouvrir" name="Animation Open"/>
-	<menu_item_call label="Ouvrir" name="Sound Open"/>
-	<menu_item_call label="Purger l&apos;objet" name="Purge Item"/>
-	<menu_item_call label="Restaurer l&apos;objet" name="Restore Item"/>
-	<menu_item_call label="Ouvrir" name="Open"/>
-	<menu_item_call label="Propriétés" name="Properties"/>
-	<menu_item_call label="Renommer" name="Rename"/>
-	<menu_item_call label="Copier l&apos;UUID (identifiant universel unique)" name="Copy Asset UUID"/>
-	<menu_item_call label="Copier" name="Copy"/>
-	<menu_item_call label="Coller" name="Paste"/>
-	<menu_item_call label="Supprimer" name="Delete"/>
-	<menu_item_call label="Enlever les objets" name="Take Off Items"/>
-	<menu_item_call label="Ajouter à l&apos;ensemble" name="Add To Outfit"/>
-	<menu_item_call label="Remplacer l&apos;ensemble" name="Replace Outfit"/>
-	<menu_item_call label="Démarrer le chat conférence" name="Conference Chat Folder"/>
-	<menu_item_call label="Jouer" name="Sound Play"/>
-	<menu_item_call label="Au sujet du repère" name="Teleport To Landmark"/>
-	<menu_item_call label="Jouer dans le Monde" name="Animation Play"/>
-	<menu_item_call label="Jouer localement" name="Animation Audition"/>
-	<menu_item_call label="Envoyer un message instantané" name="Send Instant Message"/>
-	<menu_item_call label="Offrir de téléporter..." name="Offer Teleport..."/>
-	<menu_item_call label="Démarrer le chat conférence" name="Conference Chat"/>
-	<menu_item_call label="Activer" name="Activate"/>
-	<menu_item_call label="Désactiver" name="Deactivate"/>
-	<menu_item_call label="Détacher de vous" name="Detach From Yourself"/>
-	<menu_item_call label="Remettre dans le dernier emplacement" name="Restore to Last Position"/>
-	<menu_item_call label="Porter" name="Object Wear"/>
-	<menu label="Attacher à" name="Attach To"/>
-	<menu label="Attacher au HUD " name="Attach To HUD"/>
-	<menu_item_call label="Éditer" name="Wearable Edit"/>
-	<menu_item_call label="Porter" name="Wearable Wear"/>
-	<menu_item_call label="Enlever" name="Take Off"/>
-	<menu_item_call label="--aucune option--" name="--no options--"/>
-</menu>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<menu name="Popup">
+	<menu_item_call label="Acheter" name="Task Buy"/>
+	<menu_item_call label="Ouvrir" name="Task Open"/>
+	<menu_item_call label="Jouer" name="Task Play"/>
+	<menu_item_call label="Propriétés" name="Task Properties"/>
+	<menu_item_call label="Renommer" name="Task Rename"/>
+	<menu_item_call label="Supprimer" name="Task Remove"/>
+	<menu_item_call label="Vider la corbeille" name="Empty Trash"/>
+	<menu_item_call label="Vider les objets trouvés" name="Empty Lost And Found"/>
+	<menu_item_call label="Nouveau dossier" name="New Folder"/>
+	<menu_item_call label="Nouveau script" name="New Script"/>
+	<menu_item_call label="Nouvelle note" name="New Note"/>
+	<menu_item_call label="Nouveau geste" name="New Gesture"/>
+	<menu name="New Clothes">
+		<menu_item_call label="Nouvelle chemise" name="New Shirt"/>
+		<menu_item_call label="Nouveau pantalon" name="New Pants"/>
+		<menu_item_call label="Nouvelles chaussures" name="New Shoes"/>
+		<menu_item_call label="Nouvelles chaussettes" name="New Socks"/>
+		<menu_item_call label="Nouvelle veste" name="New Jacket"/>
+		<menu_item_call label="Nouvelle jupe" name="New Skirt"/>
+		<menu_item_call label="Nouveaux gants" name="New Gloves"/>
+		<menu_item_call label="Nouveau tricot" name="New Undershirt"/>
+		<menu_item_call label="Nouveaux sous-vêtements" name="New Underpants"/>
+	</menu>
+	<menu name="New Body Parts">
+		<menu_item_call label="Nouvelle silhouette" name="New Shape"/>
+		<menu_item_call label="Nouvelle peau" name="New Skin"/>
+		<menu_item_call label="Nouveaux cheveux" name="New Hair"/>
+		<menu_item_call label="Nouveaux yeux" name="New Eyes"/>
+	</menu>
+	<menu_item_call label="Téléporter" name="Landmark Open"/>
+	<menu_item_call label="Ouvrir" name="Animation Open"/>
+	<menu_item_call label="Ouvrir" name="Sound Open"/>
+	<menu_item_call label="Purger l&apos;objet" name="Purge Item"/>
+	<menu_item_call label="Restaurer l&apos;objet" name="Restore Item"/>
+	<menu_item_call label="Ouvrir" name="Open"/>
+	<menu_item_call label="Propriétés" name="Properties"/>
+	<menu_item_call label="Renommer" name="Rename"/>
+	<menu_item_call label="Copier l&apos;UUID (identifiant universel unique)" name="Copy Asset UUID"/>
+	<menu_item_call label="Copier" name="Copy"/>
+	<menu_item_call label="Coller" name="Paste"/>
+	<menu_item_call label="Supprimer" name="Delete"/>
+	<menu_item_call label="Enlever les objets" name="Take Off Items"/>
+	<menu_item_call label="Ajouter à l&apos;ensemble" name="Add To Outfit"/>
+	<menu_item_call label="Remplacer l&apos;ensemble" name="Replace Outfit"/>
+	<menu_item_call label="Démarrer le chat conférence" name="Conference Chat Folder"/>
+	<menu_item_call label="Jouer" name="Sound Play"/>
+	<menu_item_call label="Au sujet du repère" name="Teleport To Landmark"/>
+	<menu_item_call label="Jouer dans le Monde" name="Animation Play"/>
+	<menu_item_call label="Jouer localement" name="Animation Audition"/>
+	<menu_item_call label="Envoyer un message instantané" name="Send Instant Message"/>
+	<menu_item_call label="Offrir de téléporter..." name="Offer Teleport..."/>
+	<menu_item_call label="Démarrer le chat conférence" name="Conference Chat"/>
+	<menu_item_call label="Activer" name="Activate"/>
+	<menu_item_call label="Désactiver" name="Deactivate"/>
+	<menu_item_call label="Détacher de vous" name="Detach From Yourself"/>
+	<menu_item_call label="Remettre dans le dernier emplacement" name="Restore to Last Position"/>
+	<menu_item_call label="Porter" name="Object Wear"/>
+	<menu label="Attacher à" name="Attach To"/>
+	<menu label="Attacher au HUD " name="Attach To HUD"/>
+	<menu_item_call label="Éditer" name="Wearable Edit"/>
+	<menu_item_call label="Porter" name="Wearable Wear"/>
+	<menu_item_call label="Enlever" name="Take Off"/>
+	<menu_item_call label="--aucune option--" name="--no options--"/>
+</menu>
diff --git a/indra/newview/skins/default/xui/fr/menu_login.xml b/indra/newview/skins/default/xui/fr/menu_login.xml
index 523042f104..3b904b6802 100644
--- a/indra/newview/skins/default/xui/fr/menu_login.xml
+++ b/indra/newview/skins/default/xui/fr/menu_login.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu_bar name="Login Menu">
-	<menu label="Fichier" name="File">
-		<menu_item_call label="Quitter" name="Quit" />
-	</menu>
-	<menu label="Édition" name="Edit">
-		<menu_item_call label="Préférences..." name="Preferences..." />
-	</menu>
-	<menu label="Aide" name="Help">
-		<menu_item_call label="Aide Second Life" name="Second Life Help" />
-		<menu_item_call label="À propos de Second Life..." name="About Second Life..." />
-	</menu>
-</menu_bar>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu_bar name="Login Menu">
+	<menu label="Fichier" name="File">
+		<menu_item_call label="Quitter" name="Quit" />
+	</menu>
+	<menu label="Édition" name="Edit">
+		<menu_item_call label="Préférences..." name="Preferences..." />
+	</menu>
+	<menu label="Aide" name="Help">
+		<menu_item_call label="Aide Second Life" name="Second Life Help" />
+		<menu_item_call label="À propos de Second Life..." name="About Second Life..." />
+	</menu>
+</menu_bar>
diff --git a/indra/newview/skins/default/xui/fr/menu_slurl.xml b/indra/newview/skins/default/xui/fr/menu_slurl.xml
index 296b1ae001..ebd042a38a 100644
--- a/indra/newview/skins/default/xui/fr/menu_slurl.xml
+++ b/indra/newview/skins/default/xui/fr/menu_slurl.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu name="Popup">
-	<menu_item_call label="À propos de l&apos;URL" name="about_url" />
-	<menu_item_call label="Téléporter vers l&apos;URL" name="teleport_to_url" />
-	<menu_item_call label="Voir sur la carte" name="show_on_map" />
-</menu>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu name="Popup">
+	<menu_item_call label="À propos de l&apos;URL" name="about_url" />
+	<menu_item_call label="Téléporter vers l&apos;URL" name="teleport_to_url" />
+	<menu_item_call label="Voir sur la carte" name="show_on_map" />
+</menu>
diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml
index 381a41d503..f0a4541e6b 100644
--- a/indra/newview/skins/default/xui/fr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml
@@ -1,211 +1,211 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu_bar name="Main Menu">
-	<menu label="Fichier" name="File">
-		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
-		<menu label="Importer" name="upload">
-			<menu_item_call label="Image ([COST] L$)..." name="Upload Image"/>
-			<menu_item_call label="Son ([COST] L$)..." name="Upload Sound"/>
-			<menu_item_call label="Animation ([COST] L$)..." name="Upload Animation"/>
-			<menu_item_call label="Lot ([COST] L$ par fichier)..." name="Bulk Upload"/>
-			<menu_item_separator label="-----------" name="separator"/>
-			<menu_item_call label="Définir les permissions par défaut..." name="perm prefs"/>
-		</menu>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Fermer la fenêtre" name="Close Window"/>
-		<menu_item_call label="Fermer toutes les fenêtres" name="Close All Windows"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Enregistrer la texture sous..." name="Save Texture As..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Prendre une photo" name="Take Snapshot"/>
-		<menu_item_call label="Enregistrer la photo sur le disque" name="Snapshot to Disk" shortcut="control|shift|X"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Quitter" name="Quit"/>
-	</menu>
-	<menu label="Édition" name="Edit">
-		<menu_item_call label="Annuler" name="Undo"/>
-		<menu_item_call label="Recommencer" name="Redo"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Couper" name="Cut"/>
-		<menu_item_call label="Copier" name="Copy"/>
-		<menu_item_call label="Coller" name="Paste"/>
-		<menu_item_call label="Supprimer" name="Delete"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Rechercher..." name="Search..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Tout sélectionner" name="Select All"/>
-		<menu_item_call label="Désélectionner" name="Deselect"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Dupliquer" name="Duplicate"/>
-		<menu_item_separator label="-----------" name="separator5"/>
-		<menu label="Attacher l&apos;objet" name="Attach Object"/>
-		<menu label="Détacher l&apos;objet" name="Detach Object"/>
-		<menu label="Enlever mes habits" name="Take Off Clothing">
-			<menu_item_call label="Chemise" name="Shirt"/>
-			<menu_item_call label="Pantalon" name="Pants"/>
-			<menu_item_call label="Chaussures" name="Shoes"/>
-			<menu_item_call label="Chaussettes" name="Socks"/>
-			<menu_item_call label="Veste" name="Jacket"/>
-			<menu_item_call label="Gants" name="Gloves"/>
-			<menu_item_call label="Tricot" name="Menu Undershirt"/>
-			<menu_item_call label="Sous-vêtements" name="Menu Underpants"/>
-			<menu_item_call label="Jupe" name="Skirt"/>
-			<menu_item_call label="Tous les habits" name="All Clothes"/>
-		</menu>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu_item_call label="Gestes..." name="Gestures..."/>
-		<menu_item_call label="Profil..." name="Profile..."/>
-		<menu_item_call label="Apparence..." name="Appearance..."/>
-		<menu_item_separator label="-----------" name="separator7"/>
-		<menu_item_check label="Amis..." name="Friends..."/>
-		<menu_item_call label="Groupes..." name="Groups..."/>
-		<menu_item_separator label="-----------" name="separator8"/>
-		<menu_item_call label="Préférences..." name="Preferences..."/>
-	</menu>
-	<menu label="Affichage" name="View">
-		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
-		<menu_item_call label="Vue subjective" name="Mouselook"/>
-		<menu_item_check label="Construire" name="Build"/>
-		<menu_item_check label="Vue au joystick" name="Joystick Flycam"/>
-		<menu_item_call label="Réinitialiser l&apos;affichage" name="Reset View"/>
-		<menu_item_call label="Regarder le dernier intervenant" name="Look at Last Chatter" shortcut="alt|V"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_check label="Barre d&apos;outils" name="Toolbar"/>
-		<menu_item_check label="Chat local" name="Chat History"/>
-		<menu_item_check label="Communiquer" name="Instant Message"/>
-		<menu_item_check label="Inventaire" name="Inventory"/>
-		<menu_item_check label="Intervenants actifs" name="Active Speakers"/>
-		<menu_item_check label="Liste des ignorés" name="Mute List"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_check label="Contrôles de la caméra" name="Camera Controls"/>
-		<menu_item_check label="Contrôle des déplacements" name="Movement Controls"/>
-		<menu_item_check label="Carte du monde" name="World Map"/>
-		<menu_item_check label="Mini-carte" name="Mini-Map"/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_check label="Statistiques" name="Statistics Bar"/>
-		<menu_item_check label="Limites des parcelles" name="Property Lines"/>
-		<menu_item_check label="Propriétaires fonciers" name="Land Owners"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu label="Infobulles" name="Hover Tips">
-			<menu_item_check label="Affichez les infobulles" name="Show Tips"/>
-			<menu_item_separator label="-----------" name="separator"/>
-			<menu_item_check label="Infobulles des terrains" name="Land Tips"/>
-			<menu_item_check label="Infobulles de tous les objets" name="Tips On All Objects"/>
-		</menu>
-		<menu_item_check label="Voir les objets invisibles" name="Highlight Transparent"/>
-		<menu_item_check label="Balises" name="beacons"/>
-		<menu_item_check label="Masquer les particules" name="Hide Particles"/>
-		<menu_item_check label="Afficher les éléments HUD" name="Show HUD Attachments"/>
-		<menu_item_separator label="-----------" name="separator5"/>
-		<menu_item_call label="Zoomer" name="Zoom In"/>
-		<menu_item_call label="Zoom par défaut" name="Zoom Default"/>
-		<menu_item_call label="Zoomer en arrière" name="Zoom Out"/>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu_item_call label="Activer/Quitter le plein écran" name="Toggle Fullscreen"/>
-		<menu_item_call label="Taille de l&apos;interface par défaut" name="Set UI Size to Default"/>
-	</menu>
-	<menu label="Monde" name="World">
-		<menu_item_call label="Chat" name="Chat"/>
-		<menu_item_check label="Toujours courir" name="Always Run"/>
-		<menu_item_check label="Voler" name="Fly" shortcut="F"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Créer un repère ici" name="Create Landmark Here"/>
-		<menu_item_call label="Définir comme domicile" name="Set Home to Here"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Me téléporter chez moi" name="Teleport Home"/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Me mettre absent(e)" name="Set Away"/>
-		<menu_item_call label="Me mettre occupé(e)" name="Set Busy"/>
-		<menu_item_call label="Arrêter d&apos;animer mon avatar" name="Stop Animating My Avatar"/>
-		<menu_item_call label="Reprendre le contrôle" name="Release Keys"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Historique de mon compte..." name="Account History...">
-			<on_click name="AccountHistory_url" userdata="WebLaunchAccountHistory,http://secondlife.com/account/transactions.php?lang=fr"/>
-		</menu_item_call>
-		<menu_item_call label="Gérer mon compte..." name="Manage My Account...">
-			<on_click name="ManageMyAccount_url" userdata="WebLaunchJoinNow,http://secondlife.com/account/index.php?lang=fr"/>
-		</menu_item_call>
-		<menu_item_call label="Acheter des L$..." name="Buy and Sell L$..."/>
-		<menu_item_separator label="-----------" name="separator5"/>
-		<menu_item_call label="Mes terrains..." name="My Land..."/>
-		<menu_item_call label="À propos du terrain..." name="About Land..."/>
-		<menu_item_call label="Acheter le terrain..." name="Buy Land..."/>
-		<menu_item_call label="Région et domaine..." name="Region/Estate..."/>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu label="Environnement" name="Environment Settings">
-			<menu_item_call label="Aube" name="Sunrise"/>
-			<menu_item_call label="Milieu de journée" name="Noon"/>
-			<menu_item_call label="Coucher de soleil" name="Sunset"/>
-			<menu_item_call label="Minuit" name="Midnight"/>
-			<menu_item_call label="Revenir aux options par défaut" name="Revert to Region Default"/>
-			<menu_item_separator label="-----------" name="separator"/>
-			<menu_item_call label="Éditeur d&apos;environnement" name="Environment Editor"/>
-		</menu>
-	</menu>
-	<menu label="Outils" name="Tools">
-		<menu label="Sélectionner un outil" name="Select Tool">
-			<menu_item_call label="Mise au point" name="Focus"/>
-			<menu_item_call label="Déplacer" name="Move"/>
-			<menu_item_call label="Éditer" name="Edit"/>
-			<menu_item_call label="Créer" name="Create"/>
-			<menu_item_call label="Terrain" name="Land"/>
-		</menu>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_check label="Sélectionner mes objets uniquement" name="Select Only My Objects"/>
-		<menu_item_check label="Sélectionner les objets déplaçables uniquement" name="Select Only Movable Objects"/>
-		<menu_item_check label="Sélectionner en entourant" name="Select By Surrounding"/>
-		<menu_item_check label="Afficher les parties cachées de la sélection" name="Show Hidden Selection"/>
-		<menu_item_check label="Afficher la sphère de lumière de la sélection" name="Show Light Radius for Selection"/>
-		<menu_item_check label="Afficher le faisceau de sélection" name="Show Selection Beam"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_check label="Aligner sur la grille" name="Snap to Grid"/>
-		<menu_item_call label="Aligner sur les axes XY de la grille" name="Snap Object XY to Grid"/>
-		<menu_item_call label="Utiliser la sélection pour la grille" name="Use Selection for Grid"/>
-		<menu_item_call label="Options de la grille..." name="Grid Options..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_check label="Modifier les parties liées" name="Edit Linked Parts"/>
-		<menu_item_call label="Lier" name="Link"/>
-		<menu_item_call label="Délier" name="Unlink"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Mise au point sur la sélection" name="Focus on Selection"/>
-		<menu_item_call label="Zoom sur la sélection" name="Zoom to Selection"/>
-		<menu_item_call label="Acheter l&apos;objet" name="Menu Object Take"/>
-		<menu_item_call label="Prendre une copie" name="Take Copy"/>
-		<menu_item_call label="Remplacer l&apos;objet dans mon inventaire" name="Save Object Back to My Inventory"/>
-		<menu_item_call label="Remplacer l&apos;objet dans le contenu de l&apos;objet" name="Save Object Back to Object Contents"/>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu_item_call label="Afficher la fenêtre d&apos;alertes/erreurs de script" name="Show Script Warning/Error Window"/>
-		<menu label="Recompiler les scripts dans la sélection" name="Recompile Scripts in Selection">
-			<menu_item_call label="Mono" name="Mono"/>
-			<menu_item_call label="LSL" name="LSL"/>
-		</menu>
-		<menu_item_call label="Réinitialiser les scripts dans la sélection" name="Reset Scripts in Selection"/>
-		<menu_item_call label="Activer les scripts dans la sélection" name="Set Scripts to Running in Selection"/>
-		<menu_item_call label="Désactiver les scripts dans la sélection" name="Set Scripts to Not Running in Selection"/>
-	</menu>
-	<menu label="Aide" name="Help">
-		<menu_item_call label="Aide Second Life" name="Second Life Help"/>
-		<menu_item_call label="Didacticiel" name="Tutorial"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Blog officiel..." name="Official Linden Blog..."/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Aide sur le LSL..." name="Scripting Portal..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Signaler une infraction..." name="Report Abuse..."/>
-		<menu_item_call label="Collisions, coups et bousculades…" name="Bumps, Pushes &amp;amp; Hits..."/>
-		<menu_item_call label="Mesure du lag" name="Lag Meter"/>
-		<menu_item_separator label="-----------" name="separator7"/>
-		<menu label="Signaler des bugs" name="Bug Reporting">
-			<menu_item_call label="Ouvrir un JIRA..." name="Public Issue Tracker..."/>
-			<menu_item_call label="Comment utiliser JIRA ?" name="Publc Issue Tracker Help..."/>
-			<menu_item_separator label="-----------" name="separator7"/>
-			<menu_item_call label="Comment signaler des bugs ?" name="Bug Reporing 101..."/>
-			<menu_item_call label="Comment signaler un problème de sécurité ?" name="Security Issues...">
-				<on_click name="SecurityIssues_url" userdata="WebLaunchSecurityIssues,http://wiki.secondlife.com/wiki/Security_issues/fr"/>
-			</menu_item_call>
-			<menu_item_call label="Wiki Assurance Qualité…" name="QA Wiki..."/>
-			<menu_item_separator label="-----------" name="separator9"/>
-			<menu_item_call label="Signaler un bug..." name="Report Bug..."/>
-		</menu>
-		<menu_item_call label="À propos de Second Life..." name="About Second Life..."/>
-	</menu>
-</menu_bar>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<menu_bar name="Main Menu">
+	<menu label="Fichier" name="File">
+		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
+		<menu label="Importer" name="upload">
+			<menu_item_call label="Image ([COST] L$)..." name="Upload Image"/>
+			<menu_item_call label="Son ([COST] L$)..." name="Upload Sound"/>
+			<menu_item_call label="Animation ([COST] L$)..." name="Upload Animation"/>
+			<menu_item_call label="Lot ([COST] L$ par fichier)..." name="Bulk Upload"/>
+			<menu_item_separator label="-----------" name="separator"/>
+			<menu_item_call label="Définir les permissions par défaut..." name="perm prefs"/>
+		</menu>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Fermer la fenêtre" name="Close Window"/>
+		<menu_item_call label="Fermer toutes les fenêtres" name="Close All Windows"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Enregistrer la texture sous..." name="Save Texture As..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Prendre une photo" name="Take Snapshot"/>
+		<menu_item_call label="Enregistrer la photo sur le disque" name="Snapshot to Disk" shortcut="control|shift|X"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Quitter" name="Quit"/>
+	</menu>
+	<menu label="Édition" name="Edit">
+		<menu_item_call label="Annuler" name="Undo"/>
+		<menu_item_call label="Recommencer" name="Redo"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Couper" name="Cut"/>
+		<menu_item_call label="Copier" name="Copy"/>
+		<menu_item_call label="Coller" name="Paste"/>
+		<menu_item_call label="Supprimer" name="Delete"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Rechercher..." name="Search..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Tout sélectionner" name="Select All"/>
+		<menu_item_call label="Désélectionner" name="Deselect"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Dupliquer" name="Duplicate"/>
+		<menu_item_separator label="-----------" name="separator5"/>
+		<menu label="Attacher l&apos;objet" name="Attach Object"/>
+		<menu label="Détacher l&apos;objet" name="Detach Object"/>
+		<menu label="Enlever mes habits" name="Take Off Clothing">
+			<menu_item_call label="Chemise" name="Shirt"/>
+			<menu_item_call label="Pantalon" name="Pants"/>
+			<menu_item_call label="Chaussures" name="Shoes"/>
+			<menu_item_call label="Chaussettes" name="Socks"/>
+			<menu_item_call label="Veste" name="Jacket"/>
+			<menu_item_call label="Gants" name="Gloves"/>
+			<menu_item_call label="Tricot" name="Menu Undershirt"/>
+			<menu_item_call label="Sous-vêtements" name="Menu Underpants"/>
+			<menu_item_call label="Jupe" name="Skirt"/>
+			<menu_item_call label="Tous les habits" name="All Clothes"/>
+		</menu>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu_item_call label="Gestes..." name="Gestures..."/>
+		<menu_item_call label="Profil..." name="Profile..."/>
+		<menu_item_call label="Apparence..." name="Appearance..."/>
+		<menu_item_separator label="-----------" name="separator7"/>
+		<menu_item_check label="Amis..." name="Friends..."/>
+		<menu_item_call label="Groupes..." name="Groups..."/>
+		<menu_item_separator label="-----------" name="separator8"/>
+		<menu_item_call label="Préférences..." name="Preferences..."/>
+	</menu>
+	<menu label="Affichage" name="View">
+		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
+		<menu_item_call label="Vue subjective" name="Mouselook"/>
+		<menu_item_check label="Construire" name="Build"/>
+		<menu_item_check label="Vue au joystick" name="Joystick Flycam"/>
+		<menu_item_call label="Réinitialiser l&apos;affichage" name="Reset View"/>
+		<menu_item_call label="Regarder le dernier intervenant" name="Look at Last Chatter" shortcut="alt|V"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_check label="Barre d&apos;outils" name="Toolbar"/>
+		<menu_item_check label="Chat local" name="Chat History"/>
+		<menu_item_check label="Communiquer" name="Instant Message"/>
+		<menu_item_check label="Inventaire" name="Inventory"/>
+		<menu_item_check label="Intervenants actifs" name="Active Speakers"/>
+		<menu_item_check label="Liste des ignorés" name="Mute List"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_check label="Contrôles de la caméra" name="Camera Controls"/>
+		<menu_item_check label="Contrôle des déplacements" name="Movement Controls"/>
+		<menu_item_check label="Carte du monde" name="World Map"/>
+		<menu_item_check label="Mini-carte" name="Mini-Map"/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_check label="Statistiques" name="Statistics Bar"/>
+		<menu_item_check label="Limites des parcelles" name="Property Lines"/>
+		<menu_item_check label="Propriétaires fonciers" name="Land Owners"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu label="Infobulles" name="Hover Tips">
+			<menu_item_check label="Affichez les infobulles" name="Show Tips"/>
+			<menu_item_separator label="-----------" name="separator"/>
+			<menu_item_check label="Infobulles des terrains" name="Land Tips"/>
+			<menu_item_check label="Infobulles de tous les objets" name="Tips On All Objects"/>
+		</menu>
+		<menu_item_check label="Voir les objets invisibles" name="Highlight Transparent"/>
+		<menu_item_check label="Balises" name="beacons"/>
+		<menu_item_check label="Masquer les particules" name="Hide Particles"/>
+		<menu_item_check label="Afficher les éléments HUD" name="Show HUD Attachments"/>
+		<menu_item_separator label="-----------" name="separator5"/>
+		<menu_item_call label="Zoomer" name="Zoom In"/>
+		<menu_item_call label="Zoom par défaut" name="Zoom Default"/>
+		<menu_item_call label="Zoomer en arrière" name="Zoom Out"/>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu_item_call label="Activer/Quitter le plein écran" name="Toggle Fullscreen"/>
+		<menu_item_call label="Taille de l&apos;interface par défaut" name="Set UI Size to Default"/>
+	</menu>
+	<menu label="Monde" name="World">
+		<menu_item_call label="Chat" name="Chat"/>
+		<menu_item_check label="Toujours courir" name="Always Run"/>
+		<menu_item_check label="Voler" name="Fly" shortcut="F"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Créer un repère ici" name="Create Landmark Here"/>
+		<menu_item_call label="Définir comme domicile" name="Set Home to Here"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Me téléporter chez moi" name="Teleport Home"/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Me mettre absent(e)" name="Set Away"/>
+		<menu_item_call label="Me mettre occupé(e)" name="Set Busy"/>
+		<menu_item_call label="Arrêter d&apos;animer mon avatar" name="Stop Animating My Avatar"/>
+		<menu_item_call label="Reprendre le contrôle" name="Release Keys"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Historique de mon compte..." name="Account History...">
+			<on_click name="AccountHistory_url" userdata="WebLaunchAccountHistory,http://secondlife.com/account/transactions.php?lang=fr"/>
+		</menu_item_call>
+		<menu_item_call label="Gérer mon compte..." name="Manage My Account...">
+			<on_click name="ManageMyAccount_url" userdata="WebLaunchJoinNow,http://secondlife.com/account/index.php?lang=fr"/>
+		</menu_item_call>
+		<menu_item_call label="Acheter des L$..." name="Buy and Sell L$..."/>
+		<menu_item_separator label="-----------" name="separator5"/>
+		<menu_item_call label="Mes terrains..." name="My Land..."/>
+		<menu_item_call label="À propos du terrain..." name="About Land..."/>
+		<menu_item_call label="Acheter le terrain..." name="Buy Land..."/>
+		<menu_item_call label="Région et domaine..." name="Region/Estate..."/>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu label="Environnement" name="Environment Settings">
+			<menu_item_call label="Aube" name="Sunrise"/>
+			<menu_item_call label="Milieu de journée" name="Noon"/>
+			<menu_item_call label="Coucher de soleil" name="Sunset"/>
+			<menu_item_call label="Minuit" name="Midnight"/>
+			<menu_item_call label="Revenir aux options par défaut" name="Revert to Region Default"/>
+			<menu_item_separator label="-----------" name="separator"/>
+			<menu_item_call label="Éditeur d&apos;environnement" name="Environment Editor"/>
+		</menu>
+	</menu>
+	<menu label="Outils" name="Tools">
+		<menu label="Sélectionner un outil" name="Select Tool">
+			<menu_item_call label="Mise au point" name="Focus"/>
+			<menu_item_call label="Déplacer" name="Move"/>
+			<menu_item_call label="Éditer" name="Edit"/>
+			<menu_item_call label="Créer" name="Create"/>
+			<menu_item_call label="Terrain" name="Land"/>
+		</menu>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_check label="Sélectionner mes objets uniquement" name="Select Only My Objects"/>
+		<menu_item_check label="Sélectionner les objets déplaçables uniquement" name="Select Only Movable Objects"/>
+		<menu_item_check label="Sélectionner en entourant" name="Select By Surrounding"/>
+		<menu_item_check label="Afficher les parties cachées de la sélection" name="Show Hidden Selection"/>
+		<menu_item_check label="Afficher la sphère de lumière de la sélection" name="Show Light Radius for Selection"/>
+		<menu_item_check label="Afficher le faisceau de sélection" name="Show Selection Beam"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_check label="Aligner sur la grille" name="Snap to Grid"/>
+		<menu_item_call label="Aligner sur les axes XY de la grille" name="Snap Object XY to Grid"/>
+		<menu_item_call label="Utiliser la sélection pour la grille" name="Use Selection for Grid"/>
+		<menu_item_call label="Options de la grille..." name="Grid Options..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_check label="Modifier les parties liées" name="Edit Linked Parts"/>
+		<menu_item_call label="Lier" name="Link"/>
+		<menu_item_call label="Délier" name="Unlink"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Mise au point sur la sélection" name="Focus on Selection"/>
+		<menu_item_call label="Zoom sur la sélection" name="Zoom to Selection"/>
+		<menu_item_call label="Acheter l&apos;objet" name="Menu Object Take"/>
+		<menu_item_call label="Prendre une copie" name="Take Copy"/>
+		<menu_item_call label="Remplacer l&apos;objet dans mon inventaire" name="Save Object Back to My Inventory"/>
+		<menu_item_call label="Remplacer l&apos;objet dans le contenu de l&apos;objet" name="Save Object Back to Object Contents"/>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu_item_call label="Afficher la fenêtre d&apos;alertes/erreurs de script" name="Show Script Warning/Error Window"/>
+		<menu label="Recompiler les scripts dans la sélection" name="Recompile Scripts in Selection">
+			<menu_item_call label="Mono" name="Mono"/>
+			<menu_item_call label="LSL" name="LSL"/>
+		</menu>
+		<menu_item_call label="Réinitialiser les scripts dans la sélection" name="Reset Scripts in Selection"/>
+		<menu_item_call label="Activer les scripts dans la sélection" name="Set Scripts to Running in Selection"/>
+		<menu_item_call label="Désactiver les scripts dans la sélection" name="Set Scripts to Not Running in Selection"/>
+	</menu>
+	<menu label="Aide" name="Help">
+		<menu_item_call label="Aide Second Life" name="Second Life Help"/>
+		<menu_item_call label="Didacticiel" name="Tutorial"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Blog officiel..." name="Official Linden Blog..."/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Aide sur le LSL..." name="Scripting Portal..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Signaler une infraction..." name="Report Abuse..."/>
+		<menu_item_call label="Collisions, coups et bousculades…" name="Bumps, Pushes &amp;amp; Hits..."/>
+		<menu_item_call label="Mesure du lag" name="Lag Meter"/>
+		<menu_item_separator label="-----------" name="separator7"/>
+		<menu label="Signaler des bugs" name="Bug Reporting">
+			<menu_item_call label="Ouvrir un JIRA..." name="Public Issue Tracker..."/>
+			<menu_item_call label="Comment utiliser JIRA ?" name="Publc Issue Tracker Help..."/>
+			<menu_item_separator label="-----------" name="separator7"/>
+			<menu_item_call label="Comment signaler des bugs ?" name="Bug Reporing 101..."/>
+			<menu_item_call label="Comment signaler un problème de sécurité ?" name="Security Issues...">
+				<on_click name="SecurityIssues_url" userdata="WebLaunchSecurityIssues,http://wiki.secondlife.com/wiki/Security_issues/fr"/>
+			</menu_item_call>
+			<menu_item_call label="Wiki Assurance Qualité…" name="QA Wiki..."/>
+			<menu_item_separator label="-----------" name="separator9"/>
+			<menu_item_call label="Signaler un bug..." name="Report Bug..."/>
+		</menu>
+		<menu_item_call label="À propos de Second Life..." name="About Second Life..."/>
+	</menu>
+</menu_bar>
diff --git a/indra/newview/skins/default/xui/fr/mime_types.xml b/indra/newview/skins/default/xui/fr/mime_types.xml
index 5b8b7ca2fb..322887fb76 100644
--- a/indra/newview/skins/default/xui/fr/mime_types.xml
+++ b/indra/newview/skins/default/xui/fr/mime_types.xml
@@ -1,230 +1,230 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<mimetypes name="default">
-	<widgetset name="web">
-		<label name="web_label">
-			Contenu web
-		</label>
-		<tooltip name="web_tooltip">
-			Cette parcelle propose du contenu multimédia
-		</tooltip>
-		<playtip name="web_playtip">
-			Afficher le contenu web
-		</playtip>
-	</widgetset>
-	<widgetset name="movie">
-		<label name="movie_label">
-			Film
-		</label>
-		<tooltip name="movie_tooltip">
-			Vous pouvez jouer un film ici
-		</tooltip>
-		<playtip name="movie_playtip">
-			Jouer le film
-		</playtip>
-	</widgetset>
-	<widgetset name="none">
-		<label name="none_label">
-			Aucun contenu
-		</label>
-		<tooltip name="none_tooltip">
-			Aucun média ici
-		</tooltip>
-	</widgetset>
-	<widgetset name="image">
-		<label name="image_label">
-			Image
-		</label>
-		<tooltip name="image_tooltip">
-			Cette parcelle contient une image
-		</tooltip>
-		<playtip name="image_playtip">
-			Afficher l&apos;image qui se trouve ici
-		</playtip>
-	</widgetset>
-	<widgetset name="audio">
-		<label name="audio_label">
-			Audio
-		</label>
-		<tooltip name="audio_tooltip">
-			Cette parcelle propose du contenu audio
-		</tooltip>
-		<playtip name="audio_playtip">
-			Jouer le contenu audio qui se trouve ici
-		</playtip>
-	</widgetset>
-	<scheme name="rtsp">
-		<label name="rtsp_label">
-			Flux en temps réel
-		</label>
-	</scheme>
-	<mimetype name="blank">
-		<label name="blank_label">
-			- Aucun -
-		</label>
-	</mimetype>
-	<mimetype name="none/none">
-		<label name="none/none_label">
-			- Aucun -
-		</label>
-	</mimetype>
-	<mimetype name="audio/*">
-		<label name="audio2_label">
-			Audio
-		</label>
-	</mimetype>
-	<mimetype name="video/*">
-		<label name="video2_label">
-			Vidéo
-		</label>
-	</mimetype>
-	<mimetype name="image/*">
-		<label name="image2_label">
-			Image
-		</label>
-	</mimetype>
-	<mimetype name="video/vnd.secondlife.qt.legacy">
-		<label name="vnd.secondlife.qt.legacy_label">
-			Film (Quicktime)
-		</label>
-	</mimetype>
-	<mimetype name="application/javascript">
-		<label name="application/javascript_label">
-			Javascript
-		</label>
-	</mimetype>
-	<mimetype name="application/ogg">
-		<label name="application/ogg_label">
-			Audio/Vidéo Ogg
-		</label>
-	</mimetype>
-	<mimetype name="application/pdf">
-		<label name="application/pdf_label">
-			Document PDF
-		</label>
-	</mimetype>
-	<mimetype name="application/postscript">
-		<label name="application/postscript_label">
-			Document Postscript
-		</label>
-	</mimetype>
-	<mimetype name="application/rtf">
-		<label name="application/rtf_label">
-			Format RTF
-		</label>
-	</mimetype>
-	<mimetype name="application/smil">
-		<label name="application/smil_label">
-			SMIL (Synchronized Multimedia Integration Language)
-		</label>
-	</mimetype>
-	<mimetype name="application/xhtml+xml">
-		<label name="application/xhtml+xml_label">
-			Page web (XHTML)
-		</label>
-	</mimetype>
-	<mimetype name="application/x-director">
-		<label name="application/x-director_label">
-			Macromedia Director
-		</label>
-	</mimetype>
-	<mimetype name="application/x-shockwave-flash">
-		<label name="application/x-shockwave-flash_label">
-			Flash
-		</label>
-	</mimetype>
-	<mimetype name="audio/mid">
-		<label name="audio/mid_label">
-			Audio (MIDI)
-		</label>
-	</mimetype>
-	<mimetype name="audio/mpeg">
-		<label name="audio/mpeg_label">
-			Audio (MP3)
-		</label>
-	</mimetype>
-	<mimetype name="audio/x-aiff">
-		<label name="audio/x-aiff_label">
-			Audio (AIFF)
-		</label>
-	</mimetype>
-	<mimetype name="audio/x-wav">
-		<label name="audio/x-wav_label">
-			Audio (WAV)
-		</label>
-	</mimetype>
-	<mimetype name="image/bmp">
-		<label name="image/bmp_label">
-			Image (BMP)
-		</label>
-	</mimetype>
-	<mimetype name="image/gif">
-		<label name="image/gif_label">
-			Image (GIF)
-		</label>
-	</mimetype>
-	<mimetype name="image/jpeg">
-		<label name="image/jpeg_label">
-			Image (JPEG)
-		</label>
-	</mimetype>
-	<mimetype name="image/png">
-		<label name="image/png_label">
-			Image (PNG)
-		</label>
-	</mimetype>
-	<mimetype name="image/svg+xml">
-		<label name="image/svg+xml_label">
-			Image (SVG)
-		</label>
-	</mimetype>
-	<mimetype name="image/tiff">
-		<label name="image/tiff_label">
-			Image (TIFF)
-		</label>
-	</mimetype>
-	<mimetype name="text/html">
-		<label name="text/html_label">
-			Page web
-		</label>
-	</mimetype>
-	<mimetype name="text/plain">
-		<label name="text/plain_label">
-			Texte
-		</label>
-	</mimetype>
-	<mimetype name="text/xml">
-		<label name="text/xml_label">
-			XML
-		</label>
-	</mimetype>
-	<mimetype name="video/mpeg">
-		<label name="video/mpeg_label">
-			Film (MPEG)
-		</label>
-	</mimetype>
-	<mimetype name="video/mp4">
-		<label name="video/mp4_label">
-			Film (MP4)
-		</label>
-	</mimetype>
-	<mimetype name="video/quicktime">
-		<label name="video/quicktime_label">
-			Film (Quicktime)
-		</label>
-	</mimetype>
-	<mimetype name="video/x-ms-asf">
-		<label name="video/x-ms-asf_label">
-			Film (Windows Media ASF)
-		</label>
-	</mimetype>
-	<mimetype name="video/x-ms-wmv">
-		<label name="video/x-ms-wmv_label">
-			Film (Windows Media WMV)
-		</label>
-	</mimetype>
-	<mimetype name="video/x-msvideo">
-		<label name="video/x-msvideo_label">
-			Film (AVI)
-		</label>
-	</mimetype>
-</mimetypes>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<mimetypes name="default">
+	<widgetset name="web">
+		<label name="web_label">
+			Contenu web
+		</label>
+		<tooltip name="web_tooltip">
+			Cette parcelle propose du contenu multimédia
+		</tooltip>
+		<playtip name="web_playtip">
+			Afficher le contenu web
+		</playtip>
+	</widgetset>
+	<widgetset name="movie">
+		<label name="movie_label">
+			Film
+		</label>
+		<tooltip name="movie_tooltip">
+			Vous pouvez jouer un film ici
+		</tooltip>
+		<playtip name="movie_playtip">
+			Jouer le film
+		</playtip>
+	</widgetset>
+	<widgetset name="none">
+		<label name="none_label">
+			Aucun contenu
+		</label>
+		<tooltip name="none_tooltip">
+			Aucun média ici
+		</tooltip>
+	</widgetset>
+	<widgetset name="image">
+		<label name="image_label">
+			Image
+		</label>
+		<tooltip name="image_tooltip">
+			Cette parcelle contient une image
+		</tooltip>
+		<playtip name="image_playtip">
+			Afficher l&apos;image qui se trouve ici
+		</playtip>
+	</widgetset>
+	<widgetset name="audio">
+		<label name="audio_label">
+			Audio
+		</label>
+		<tooltip name="audio_tooltip">
+			Cette parcelle propose du contenu audio
+		</tooltip>
+		<playtip name="audio_playtip">
+			Jouer le contenu audio qui se trouve ici
+		</playtip>
+	</widgetset>
+	<scheme name="rtsp">
+		<label name="rtsp_label">
+			Flux en temps réel
+		</label>
+	</scheme>
+	<mimetype name="blank">
+		<label name="blank_label">
+			- Aucun -
+		</label>
+	</mimetype>
+	<mimetype name="none/none">
+		<label name="none/none_label">
+			- Aucun -
+		</label>
+	</mimetype>
+	<mimetype name="audio/*">
+		<label name="audio2_label">
+			Audio
+		</label>
+	</mimetype>
+	<mimetype name="video/*">
+		<label name="video2_label">
+			Vidéo
+		</label>
+	</mimetype>
+	<mimetype name="image/*">
+		<label name="image2_label">
+			Image
+		</label>
+	</mimetype>
+	<mimetype name="video/vnd.secondlife.qt.legacy">
+		<label name="vnd.secondlife.qt.legacy_label">
+			Film (Quicktime)
+		</label>
+	</mimetype>
+	<mimetype name="application/javascript">
+		<label name="application/javascript_label">
+			Javascript
+		</label>
+	</mimetype>
+	<mimetype name="application/ogg">
+		<label name="application/ogg_label">
+			Audio/Vidéo Ogg
+		</label>
+	</mimetype>
+	<mimetype name="application/pdf">
+		<label name="application/pdf_label">
+			Document PDF
+		</label>
+	</mimetype>
+	<mimetype name="application/postscript">
+		<label name="application/postscript_label">
+			Document Postscript
+		</label>
+	</mimetype>
+	<mimetype name="application/rtf">
+		<label name="application/rtf_label">
+			Format RTF
+		</label>
+	</mimetype>
+	<mimetype name="application/smil">
+		<label name="application/smil_label">
+			SMIL (Synchronized Multimedia Integration Language)
+		</label>
+	</mimetype>
+	<mimetype name="application/xhtml+xml">
+		<label name="application/xhtml+xml_label">
+			Page web (XHTML)
+		</label>
+	</mimetype>
+	<mimetype name="application/x-director">
+		<label name="application/x-director_label">
+			Macromedia Director
+		</label>
+	</mimetype>
+	<mimetype name="application/x-shockwave-flash">
+		<label name="application/x-shockwave-flash_label">
+			Flash
+		</label>
+	</mimetype>
+	<mimetype name="audio/mid">
+		<label name="audio/mid_label">
+			Audio (MIDI)
+		</label>
+	</mimetype>
+	<mimetype name="audio/mpeg">
+		<label name="audio/mpeg_label">
+			Audio (MP3)
+		</label>
+	</mimetype>
+	<mimetype name="audio/x-aiff">
+		<label name="audio/x-aiff_label">
+			Audio (AIFF)
+		</label>
+	</mimetype>
+	<mimetype name="audio/x-wav">
+		<label name="audio/x-wav_label">
+			Audio (WAV)
+		</label>
+	</mimetype>
+	<mimetype name="image/bmp">
+		<label name="image/bmp_label">
+			Image (BMP)
+		</label>
+	</mimetype>
+	<mimetype name="image/gif">
+		<label name="image/gif_label">
+			Image (GIF)
+		</label>
+	</mimetype>
+	<mimetype name="image/jpeg">
+		<label name="image/jpeg_label">
+			Image (JPEG)
+		</label>
+	</mimetype>
+	<mimetype name="image/png">
+		<label name="image/png_label">
+			Image (PNG)
+		</label>
+	</mimetype>
+	<mimetype name="image/svg+xml">
+		<label name="image/svg+xml_label">
+			Image (SVG)
+		</label>
+	</mimetype>
+	<mimetype name="image/tiff">
+		<label name="image/tiff_label">
+			Image (TIFF)
+		</label>
+	</mimetype>
+	<mimetype name="text/html">
+		<label name="text/html_label">
+			Page web
+		</label>
+	</mimetype>
+	<mimetype name="text/plain">
+		<label name="text/plain_label">
+			Texte
+		</label>
+	</mimetype>
+	<mimetype name="text/xml">
+		<label name="text/xml_label">
+			XML
+		</label>
+	</mimetype>
+	<mimetype name="video/mpeg">
+		<label name="video/mpeg_label">
+			Film (MPEG)
+		</label>
+	</mimetype>
+	<mimetype name="video/mp4">
+		<label name="video/mp4_label">
+			Film (MP4)
+		</label>
+	</mimetype>
+	<mimetype name="video/quicktime">
+		<label name="video/quicktime_label">
+			Film (Quicktime)
+		</label>
+	</mimetype>
+	<mimetype name="video/x-ms-asf">
+		<label name="video/x-ms-asf_label">
+			Film (Windows Media ASF)
+		</label>
+	</mimetype>
+	<mimetype name="video/x-ms-wmv">
+		<label name="video/x-ms-wmv_label">
+			Film (Windows Media WMV)
+		</label>
+	</mimetype>
+	<mimetype name="video/x-msvideo">
+		<label name="video/x-msvideo_label">
+			Film (AVI)
+		</label>
+	</mimetype>
+</mimetypes>
diff --git a/indra/newview/skins/default/xui/fr/panel_audio_device.xml b/indra/newview/skins/default/xui/fr/panel_audio_device.xml
index 7ca53b7c0d..a9540d8346 100644
--- a/indra/newview/skins/default/xui/fr/panel_audio_device.xml
+++ b/indra/newview/skins/default/xui/fr/panel_audio_device.xml
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="device_settings">
-	<text name="Audio Devices">
-		Matériel audio
-	</text>
-	<text name="Input device (microphone):">
-		Périphérique d&apos;entrée (micro) :
-	</text>
-	<text name="Output device (speakers):">
-		Périphérique de sortie (haut-parleurs) :
-	</text>
-	<text name="Input level:">
-		Volume d&apos;entrée
-	</text>
-	<text_editor name="voice_intro_text1">
-		Pour que les autres résidents vous entendent plus ou moins fort, utilisez le curseur. Pour tester le volume, parlez dans le micro.
-	</text_editor>
-	<volume_slider name="mic_volume_slider" tool_tip="Réglez le volume avec ce curseur."/>
-	<text name="wait_text">
-		Veuillez patienter
-	</text>
-	<string name="default_text">
-		Défaut
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="device_settings">
+	<text name="Audio Devices">
+		Matériel audio
+	</text>
+	<text name="Input device (microphone):">
+		Périphérique d&apos;entrée (micro) :
+	</text>
+	<text name="Output device (speakers):">
+		Périphérique de sortie (haut-parleurs) :
+	</text>
+	<text name="Input level:">
+		Volume d&apos;entrée
+	</text>
+	<text_editor name="voice_intro_text1">
+		Pour que les autres résidents vous entendent plus ou moins fort, utilisez le curseur. Pour tester le volume, parlez dans le micro.
+	</text_editor>
+	<volume_slider name="mic_volume_slider" tool_tip="Réglez le volume avec ce curseur."/>
+	<text name="wait_text">
+		Veuillez patienter
+	</text>
+	<string name="default_text">
+		Défaut
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_friends.xml b/indra/newview/skins/default/xui/fr/panel_friends.xml
index e43305b89e..fa0d08bb97 100644
--- a/indra/newview/skins/default/xui/fr/panel_friends.xml
+++ b/indra/newview/skins/default/xui/fr/panel_friends.xml
@@ -1,20 +1,20 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="friends">
-	<string name="Multiple">
-		Amis multiples...
-	</string>
-	<scroll_list name="friend_list" tool_tip="Pour sélectionner plusieurs amis, cliquez en maintenant la touche Maj ou Ctrl appuyée">
-		<column name="icon_online_status" tool_tip="Statut en ligne"/>
-		<column label="Nom" name="friend_name" tool_tip="Nom"/>
-		<column name="icon_visible_online" tool_tip="Vos amis voient si vous êtes connecté(e)"/>
-		<column name="icon_visible_map" tool_tip="Vos amis peuvent vous situer sur la carte"/>
-		<column name="icon_edit_mine" tool_tip="Vos amis peuvent modifier, supprimer ou prendre vos objets"/>
-		<column name="icon_edit_theirs" tool_tip="Vous pouvez modifier les objets de cet ami"/>
-	</scroll_list>
-	<button label="IM/Appel" name="im_btn" tool_tip="Ouvrez une session de messagerie instantanée"/>
-	<button label="Profil" name="profile_btn" tool_tip="Affichez une photo, vos groupes et autres infos"/>
-	<button label="Téléporter..." name="offer_teleport_btn" tool_tip="Proposez à cet ami d&apos;être téléporté là où vous êtes"/>
-	<button label="Payer..." name="pay_btn" tool_tip="Donnez des L$ à cet ami"/>
-	<button label="Supprimer..." name="remove_btn" tool_tip="Supprimez cette personne de votre liste d&apos;amis"/>
-	<button label="Ajouter..." name="add_btn" tool_tip="Demandez à un résident de devenir votre ami"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="friends">
+	<string name="Multiple">
+		Amis multiples...
+	</string>
+	<scroll_list name="friend_list" tool_tip="Pour sélectionner plusieurs amis, cliquez en maintenant la touche Maj ou Ctrl appuyée">
+		<column name="icon_online_status" tool_tip="Statut en ligne"/>
+		<column label="Nom" name="friend_name" tool_tip="Nom"/>
+		<column name="icon_visible_online" tool_tip="Vos amis voient si vous êtes connecté(e)"/>
+		<column name="icon_visible_map" tool_tip="Vos amis peuvent vous situer sur la carte"/>
+		<column name="icon_edit_mine" tool_tip="Vos amis peuvent modifier, supprimer ou prendre vos objets"/>
+		<column name="icon_edit_theirs" tool_tip="Vous pouvez modifier les objets de cet ami"/>
+	</scroll_list>
+	<button label="IM/Appel" name="im_btn" tool_tip="Ouvrez une session de messagerie instantanée"/>
+	<button label="Profil" name="profile_btn" tool_tip="Affichez une photo, vos groupes et autres infos"/>
+	<button label="Téléporter..." name="offer_teleport_btn" tool_tip="Proposez à cet ami d&apos;être téléporté là où vous êtes"/>
+	<button label="Payer..." name="pay_btn" tool_tip="Donnez des L$ à cet ami"/>
+	<button label="Supprimer..." name="remove_btn" tool_tip="Supprimez cette personne de votre liste d&apos;amis"/>
+	<button label="Ajouter..." name="add_btn" tool_tip="Demandez à un résident de devenir votre ami"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_group_general.xml b/indra/newview/skins/default/xui/fr/panel_group_general.xml
index f8eecf13a2..7c7efdc1f1 100644
--- a/indra/newview/skins/default/xui/fr/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/fr/panel_group_general.xml
@@ -1,80 +1,80 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Général" name="general_tab">
-	<text name="help_text">
-		L&apos;onglet Général contient les infos générales et les préférences du groupe ainsi que la liste des propriétaires et des membres visibles.
-
-	</text>
-	<string name="group_info_unchanged">
-		Le profil du groupe a changé.
-	</string>
-	<button label="?" label_selected="?" name="help_button"/>
-	<line_editor label="Saisissez le nom du groupe ici" name="group_name_editor">
-		Saisissez le nom du groupe ici
-	</line_editor>
-	<text name="group_name">
-		Saisissez le nom du groupe ici
-	</text>
-	<text name="prepend_founded_by">
-		Fondé par </text>
-	<text name="founder_name" left_delta="54">
-		(en attente)
-	</text>
-	<text name="group_charter_label">
-		Charte du groupe
-	</text>
-	<texture_picker label="Logo du groupe" name="insignia" tool_tip="Cliquez pour sélectionner une image"/>
-	<text_editor name="charter">
-		Indiquez ici la charte de votre groupe
-	</text_editor>
-	<button label="Rejoindre (0L$)" label_selected="Rejoindre (0L$)" name="join_button"/>
-	<button label="Affichage détaillé" label_selected="Affichage détaillé" name="info_button"/>
-	<text>
-		Propriétaires et membres visibles
-	</text>
-	<text>
-		(Propriétaires affichés en gras)
-	</text>
-	<text name="text_owners_and_visible_members">
-		Propriétaires et membres visibles
-	</text>
-	<text name="text_owners_are_shown_in_bold">
-		(Les propriétaires apparaissent en gras)
-	</text>
-	<name_list name="visible_members">
-		<column label="Nom du membre" name="name" relwidth="0.40"/>
-		<column label="Titre" name="title" relwidth="0.25"/>
-		<column label="Dernière connexion" name="online" relwidth="0.35"/>
-	</name_list>
-	<text name="text_group_preferences">
-		Préférences
-	</text>
-	<text name="incomplete_member_data_str">
-		Extraction des données du résident en cours
-	</text>
-	<text name="confirm_group_create_str">
-		La création de ce groupe coûte 100 L$. 
-Êtes-vous vraiment certain de vouloir dépenser 100 L$ pour créer ce groupe ?
-Sachez que si personne ne rejoint ce groupe sous 48h, il sera démantelé et ne pourra plus être utilisé.
-	</text>
-	<text>
-		Préférences
-	</text>
-	<panel name="preferences_container">
-		<check_box label="Afficher dans la recherche" name="show_in_group_list" tool_tip="Afficher ce groupe dans les résultats de recherche."/>
-		<check_box label="Publier sur le web" name="publish_on_web" tool_tip="Cochez pour publier les informations de ce groupe sur le web."/>
-		<check_box label="Inscription libre" name="open_enrollement" tool_tip="Indique si une invitation est nécessaire pour devenir membre de ce groupe."/>
-		<check_box label="Frais d&apos;inscription : L$" name="check_enrollment_fee" tool_tip="Indique s&apos;il y a des frais d&apos;inscription pour devenir membre."/>
-		<spinner name="spin_enrollment_fee" tool_tip="Si la case Frais d&apos;inscription est cochée, cela signifie qu&apos;il faut payer des frais pour devenir membre."/>
-		<check_box name="mature" />
-		<combo_box name="group_mature_check" width="195">
-		</combo_box>
-		<panel name="title_container">
-			<text name="active_title_label">
-				Mon titre actuel
-			</text>
-			<combo_box name="active_title" tool_tip="Définit le titre qui apparaît près du nom de votre avatar lorsque ce groupe est actif."/>
-		</panel>
-		<check_box label="Recevoir les notices" name="receive_notices" tool_tip="Cochez si vous souhaitez recevoir les notices envoyées au groupe. Décochez si ce groupe vous envoie des spams."/>
-		<check_box label="Afficher dans mon profil" name="list_groups_in_profile" tool_tip="Indique si vous voulez que ce groupe apparaisse dans votre profil"/>
-	</panel>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Général" name="general_tab">
+	<text name="help_text">
+		L&apos;onglet Général contient les infos générales et les préférences du groupe ainsi que la liste des propriétaires et des membres visibles.
+
+	</text>
+	<string name="group_info_unchanged">
+		Le profil du groupe a changé.
+	</string>
+	<button label="?" label_selected="?" name="help_button"/>
+	<line_editor label="Saisissez le nom du groupe ici" name="group_name_editor">
+		Saisissez le nom du groupe ici
+	</line_editor>
+	<text name="group_name">
+		Saisissez le nom du groupe ici
+	</text>
+	<text name="prepend_founded_by">
+		Fondé par </text>
+	<text name="founder_name" left_delta="54">
+		(en attente)
+	</text>
+	<text name="group_charter_label">
+		Charte du groupe
+	</text>
+	<texture_picker label="Logo du groupe" name="insignia" tool_tip="Cliquez pour sélectionner une image"/>
+	<text_editor name="charter">
+		Indiquez ici la charte de votre groupe
+	</text_editor>
+	<button label="Rejoindre (0L$)" label_selected="Rejoindre (0L$)" name="join_button"/>
+	<button label="Affichage détaillé" label_selected="Affichage détaillé" name="info_button"/>
+	<text>
+		Propriétaires et membres visibles
+	</text>
+	<text>
+		(Propriétaires affichés en gras)
+	</text>
+	<text name="text_owners_and_visible_members">
+		Propriétaires et membres visibles
+	</text>
+	<text name="text_owners_are_shown_in_bold">
+		(Les propriétaires apparaissent en gras)
+	</text>
+	<name_list name="visible_members">
+		<column label="Nom du membre" name="name" relwidth="0.40"/>
+		<column label="Titre" name="title" relwidth="0.25"/>
+		<column label="Dernière connexion" name="online" relwidth="0.35"/>
+	</name_list>
+	<text name="text_group_preferences">
+		Préférences
+	</text>
+	<text name="incomplete_member_data_str">
+		Extraction des données du résident en cours
+	</text>
+	<text name="confirm_group_create_str">
+		La création de ce groupe coûte 100 L$. 
+Êtes-vous vraiment certain de vouloir dépenser 100 L$ pour créer ce groupe ?
+Sachez que si personne ne rejoint ce groupe sous 48h, il sera démantelé et ne pourra plus être utilisé.
+	</text>
+	<text>
+		Préférences
+	</text>
+	<panel name="preferences_container">
+		<check_box label="Afficher dans la recherche" name="show_in_group_list" tool_tip="Afficher ce groupe dans les résultats de recherche."/>
+		<check_box label="Publier sur le web" name="publish_on_web" tool_tip="Cochez pour publier les informations de ce groupe sur le web."/>
+		<check_box label="Inscription libre" name="open_enrollement" tool_tip="Indique si une invitation est nécessaire pour devenir membre de ce groupe."/>
+		<check_box label="Frais d&apos;inscription : L$" name="check_enrollment_fee" tool_tip="Indique s&apos;il y a des frais d&apos;inscription pour devenir membre."/>
+		<spinner name="spin_enrollment_fee" tool_tip="Si la case Frais d&apos;inscription est cochée, cela signifie qu&apos;il faut payer des frais pour devenir membre."/>
+		<check_box name="mature" />
+		<combo_box name="group_mature_check" width="195">
+		</combo_box>
+		<panel name="title_container">
+			<text name="active_title_label">
+				Mon titre actuel
+			</text>
+			<combo_box name="active_title" tool_tip="Définit le titre qui apparaît près du nom de votre avatar lorsque ce groupe est actif."/>
+		</panel>
+		<check_box label="Recevoir les notices" name="receive_notices" tool_tip="Cochez si vous souhaitez recevoir les notices envoyées au groupe. Décochez si ce groupe vous envoie des spams."/>
+		<check_box label="Afficher dans mon profil" name="list_groups_in_profile" tool_tip="Indique si vous voulez que ce groupe apparaisse dans votre profil"/>
+	</panel>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_group_invite.xml b/indra/newview/skins/default/xui/fr/panel_group_invite.xml
index f770b4b137..4cb0b88672 100644
--- a/indra/newview/skins/default/xui/fr/panel_group_invite.xml
+++ b/indra/newview/skins/default/xui/fr/panel_group_invite.xml
@@ -1,26 +1,26 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Inviter un résident" name="invite_panel">
-	<text name="help_text">
-		Vous pouvez inviter plusieurs résidents
-à la fois. Cliquez d&apos;abord sur
-Choisir un résident.
-	</text>
-	<button label="Choisir un résident" name="add_button" tool_tip=""/>
-	<name_list name="invitee_list" tool_tip="Pour sélectionner plusieurs noms, maintenez la touche Ctrl enfoncée en cliquant sur le nom des résidents."/>
-	<button label="Supprimer de la liste" name="remove_button" tool_tip="Supprime les résidents sélectionnés de la liste des invités."/>
-	<text>
-		Assignez-leur un rôle :
-	</text>
-	<text name="role_text">
-		Assignez-leur un rôle :
-	</text>
-	<combo_box name="role_name" tool_tip="Choisissez des rôles à assigner aux membres dans la liste."/>
-	<button label="Envoyer les invitations" name="ok_button"/>
-	<button label="Annuler" name="cancel_button"/>
-	<string name="confirm_invite_owner_str">
-		Etes-vous certain de vouloir inviter un/de nouveau(x) propriétaire(s) ? Ce choix est permanent !
-	</string>
-	<string name="loading">
-		(en cours de chargement...)
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Inviter un résident" name="invite_panel">
+	<text name="help_text">
+		Vous pouvez inviter plusieurs résidents
+à la fois. Cliquez d&apos;abord sur
+Choisir un résident.
+	</text>
+	<button label="Choisir un résident" name="add_button" tool_tip=""/>
+	<name_list name="invitee_list" tool_tip="Pour sélectionner plusieurs noms, maintenez la touche Ctrl enfoncée en cliquant sur le nom des résidents."/>
+	<button label="Supprimer de la liste" name="remove_button" tool_tip="Supprime les résidents sélectionnés de la liste des invités."/>
+	<text>
+		Assignez-leur un rôle :
+	</text>
+	<text name="role_text">
+		Assignez-leur un rôle :
+	</text>
+	<combo_box name="role_name" tool_tip="Choisissez des rôles à assigner aux membres dans la liste."/>
+	<button label="Envoyer les invitations" name="ok_button"/>
+	<button label="Annuler" name="cancel_button"/>
+	<string name="confirm_invite_owner_str">
+		Etes-vous certain de vouloir inviter un/de nouveau(x) propriétaire(s) ? Ce choix est permanent !
+	</string>
+	<string name="loading">
+		(en cours de chargement...)
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_group_land_money.xml b/indra/newview/skins/default/xui/fr/panel_group_land_money.xml
index 8d057dbda2..7fd900acaa 100644
--- a/indra/newview/skins/default/xui/fr/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/fr/panel_group_land_money.xml
@@ -1,85 +1,85 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Terrain et L$" name="land_money_tab">
-	<text name="help_text">
-		Les parcelles appartenant au groupe sont indiquées avec le détails des contributions. Un avertissement apparaît si la surface utilisée par le groupe est supérieure ou égale au total des contributions. Les onglets Planification, Détails et Ventes correspondent aux finances du groupe.
-	</text>
-	<button label="?" name="help_button"/>
-	<text name="cant_view_group_land_text">
-		Vous n&apos;avez pas la permission de voir quel terrain possède ce groupe.
-	</text>
-	<text name="cant_view_group_accounting_text">
-		Vous n&apos;avez pas la permission d&apos;accéder aux informations
-financières de ce groupe.
-	</text>
-	<string name="loading_txt">
-		Chargement...
-	</string>
-	<text name="group_land_heading">
-		Terrain du groupe
-	</text>
-	<scroll_list name="group_parcel_list">
-		<column label="Nom de la parcelle" name="name"/>
-		<column label="Région" name="location"/>
-		<column label="Surface" name="area"/>
-		<column label="" name="hidden"/>
-	</scroll_list>
-	<button label="Voir sur la carte" label_selected="Voir sur la carte" name="map_button"/>
-	<text name="total_contributed_land_label">
-		Total des contributions :
-	</text>
-	<text name="total_contributed_land_value">
-		[AREA] m²
-	</text>
-	<text name="total_land_in_use_label">
-		Superficie déjà utilisée :
-	</text>
-	<text name="total_land_in_use_value">
-		[AREA] m²
-	</text>
-	<text name="land_available_label">
-		Superficie disponible :
-	</text>
-	<text name="land_available_value">
-		[AREA] m²
-	</text>
-	<text name="your_contribution_label">
-		Votre contribution :
-	</text>
-	<text name="your_contribution_max_value_append">
-		mètres carrés
-	</text>
-	<string name="land_contrib_error">
-		Impossible de définir votre don de terre.
-	</string>
-	<text name="your_contribution_max_value">
-		m² ([AMOUNT] max.)
-	</text>
-	<text name="group_over_limit_text">
-		Une contribution supplémentaire du groupe est requise pour prendre en
-charge le terrain utilisé.
-	</text>
-	<text name="group_money_heading">
-		Finances
-	</text>
-	<tab_container name="group_money_tab_container">
-		<panel label="Planification" name="group_money_planning_tab">
-			<text_editor name="group_money_planning_text">
-				Calcul en cours...
-			</text_editor>
-		</panel>
-		<panel label="Détails" name="group_money_details_tab">
-			<text_editor name="group_money_details_text">
-				Calcul en cours...
-			</text_editor>
-			<button label="&lt; Plus tôt" label_selected="&lt; Plus tôt" name="earlier_details_button" tool_tip="Reculer dans le temps"/>
-			<button label="Plus tard &gt;" label_selected="Plus tard &gt;" name="later_details_button" tool_tip="Avancer dans le temps"/>
-		</panel>
-		<panel label="Ventes" name="group_money_sales_tab">
-			<text_editor name="group_money_sales_text">
-				Calcul en cours...
-			</text_editor>
-			<button label="&lt; Plus tôt" label_selected="&lt; Plus tôt" name="earlier_sales_button" tool_tip="Reculer dans le temps"/>
-			<button label="Plus tard &gt;" label_selected="Plus tard &gt;" name="later_sales_button" tool_tip="Avancer dans le temps"/>
-		</panel>
-	</tab_container>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Terrain et L$" name="land_money_tab">
+	<text name="help_text">
+		Les parcelles appartenant au groupe sont indiquées avec le détails des contributions. Un avertissement apparaît si la surface utilisée par le groupe est supérieure ou égale au total des contributions. Les onglets Planification, Détails et Ventes correspondent aux finances du groupe.
+	</text>
+	<button label="?" name="help_button"/>
+	<text name="cant_view_group_land_text">
+		Vous n&apos;avez pas la permission de voir quel terrain possède ce groupe.
+	</text>
+	<text name="cant_view_group_accounting_text">
+		Vous n&apos;avez pas la permission d&apos;accéder aux informations
+financières de ce groupe.
+	</text>
+	<string name="loading_txt">
+		Chargement...
+	</string>
+	<text name="group_land_heading">
+		Terrain du groupe
+	</text>
+	<scroll_list name="group_parcel_list">
+		<column label="Nom de la parcelle" name="name"/>
+		<column label="Région" name="location"/>
+		<column label="Surface" name="area"/>
+		<column label="" name="hidden"/>
+	</scroll_list>
+	<button label="Voir sur la carte" label_selected="Voir sur la carte" name="map_button"/>
+	<text name="total_contributed_land_label">
+		Total des contributions :
+	</text>
+	<text name="total_contributed_land_value">
+		[AREA] m²
+	</text>
+	<text name="total_land_in_use_label">
+		Superficie déjà utilisée :
+	</text>
+	<text name="total_land_in_use_value">
+		[AREA] m²
+	</text>
+	<text name="land_available_label">
+		Superficie disponible :
+	</text>
+	<text name="land_available_value">
+		[AREA] m²
+	</text>
+	<text name="your_contribution_label">
+		Votre contribution :
+	</text>
+	<text name="your_contribution_max_value_append">
+		mètres carrés
+	</text>
+	<string name="land_contrib_error">
+		Impossible de définir votre don de terre.
+	</string>
+	<text name="your_contribution_max_value">
+		m² ([AMOUNT] max.)
+	</text>
+	<text name="group_over_limit_text">
+		Une contribution supplémentaire du groupe est requise pour prendre en
+charge le terrain utilisé.
+	</text>
+	<text name="group_money_heading">
+		Finances
+	</text>
+	<tab_container name="group_money_tab_container">
+		<panel label="Planification" name="group_money_planning_tab">
+			<text_editor name="group_money_planning_text">
+				Calcul en cours...
+			</text_editor>
+		</panel>
+		<panel label="Détails" name="group_money_details_tab">
+			<text_editor name="group_money_details_text">
+				Calcul en cours...
+			</text_editor>
+			<button label="&lt; Plus tôt" label_selected="&lt; Plus tôt" name="earlier_details_button" tool_tip="Reculer dans le temps"/>
+			<button label="Plus tard &gt;" label_selected="Plus tard &gt;" name="later_details_button" tool_tip="Avancer dans le temps"/>
+		</panel>
+		<panel label="Ventes" name="group_money_sales_tab">
+			<text_editor name="group_money_sales_text">
+				Calcul en cours...
+			</text_editor>
+			<button label="&lt; Plus tôt" label_selected="&lt; Plus tôt" name="earlier_sales_button" tool_tip="Reculer dans le temps"/>
+			<button label="Plus tard &gt;" label_selected="Plus tard &gt;" name="later_sales_button" tool_tip="Avancer dans le temps"/>
+		</panel>
+	</tab_container>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_group_notices.xml b/indra/newview/skins/default/xui/fr/panel_group_notices.xml
index d89c4313b5..d824ae5461 100644
--- a/indra/newview/skins/default/xui/fr/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/fr/panel_group_notices.xml
@@ -1,72 +1,72 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notices" name="notices_tab">
-	<text name="help_text">
-		Les notices vous permettent d&apos;envoyer des messages et pièces-jointes aux membres du groupe autorisés à les recevoir. Vous pouvez désactiver la réception des notices à l&apos;onglet Général.
-	</text>
-	<text name="no_notices_text">
-		Aucune notice
-	</text>
-	<button label="?" label_selected="?" name="help_button"/>
-	<text name="lbl">
-		Anciennes notices du groupe
-	</text>
-	<text name="lbl2">
-		Double-cliquez sur une notice pour l'afficher. Les notices sont conservées
-pendant 14 jours et chaque groupe a une limite quotidienne de 200 notices.
-	</text>
-	<scroll_list name="notice_list">
-		<column label="" name="icon"/>
-		<column label="Sujet" name="subject"/>
-		<column label="De" name="from"/>
-		<column label="Date" name="date"/>
-	</scroll_list>
-	<text name="notice_list_none_found">
-		Aucun résultat.
-	</text>
-	<button label="Créer une notice" label_selected="Créer une notice" name="create_new_notice"/>
-	<button label="Rafraîchir" label_selected="Rafraîchir la liste" name="refresh_notices"/>
-	<panel label="Créer une notice" name="panel_create_new_notice">
-		<text name="lbl">
-			Créer une notice
-		</text>
-		<text name="lbl2">
-			Pour envoyer une notice, saisissez un sujet. Pour joindre
-une pièce-jointe à cette notice, faites-la glisser depuis votre 
-inventaire vers cette fenêtre. Les pièces-jointes doivent être
-copiables et transférables. Il n&apos;est pas possible d&apos;envoyer de
-dossiers.
-		</text>
-		<text bottom_delta="-79" name="lbl3" left="20">
-			Sujet :
-		</text>
-		<line_editor name="create_subject" width="331" left_delta="61"/>
-		<text name="lbl4" left="20">
-			Message :
-		</text>
-		<text_editor name="create_message" bottom_delta="-90" height="104" left_delta="61" width="330"/>
-		<text name="lbl5" width="68">
-			Pièce-jointe :
-		</text>
-		<line_editor name="create_inventory_name" width="190" left_delta="74"/>
-		<button label="Supprimer pièce-jointe" label_selected="Supprimer pièce-jointe" left="274" name="remove_attachment" width="140"/>
-		<button label="Envoyer la notice" label_selected="Envoyer la notice" left="274" name="send_notice" width="140"/>
-		<panel name="drop_target2" tool_tip="Pour joindre un objet de l&apos;inventaire à la notice, faites-le glisser dans la boîte de message. Pour envoyer l&apos;objet avec la notice, vous devez avoir la permission de le copier et de le transférer."/>
-		<panel name="drop_target" tool_tip="Pour joindre un objet de l&apos;inventaire à la notice, faites-le glisser dans la boîte de message. Pour envoyer l&apos;objet avec la notice, vous devez avoir la permission de le copier et de le transférer."/>
-	</panel>
-	<panel label="Voir ancienne notice" name="panel_view_past_notice">
-		<text name="lbl">
-			Détails
-		</text>
-		<text name="lbl2">
-			Pour envoyer une nouvelle notice, cliquez sur Créer une notice ci-dessus.
-		</text>
-		<text name="lbl3">
-			Sujet :
-		</text>
-		<text name="lbl4">
-			Message :
-		</text>
-		<button label="Ouvrir pièce-jointe" label_selected="Ouvrir pièce-jointe" name="open_attachment" width="118"/>
-		<line_editor left="128" name="view_inventory_name" width="256"/>
-	</panel>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Notices" name="notices_tab">
+	<text name="help_text">
+		Les notices vous permettent d&apos;envoyer des messages et pièces-jointes aux membres du groupe autorisés à les recevoir. Vous pouvez désactiver la réception des notices à l&apos;onglet Général.
+	</text>
+	<text name="no_notices_text">
+		Aucune notice
+	</text>
+	<button label="?" label_selected="?" name="help_button"/>
+	<text name="lbl">
+		Anciennes notices du groupe
+	</text>
+	<text name="lbl2">
+		Double-cliquez sur une notice pour l'afficher. Les notices sont conservées
+pendant 14 jours et chaque groupe a une limite quotidienne de 200 notices.
+	</text>
+	<scroll_list name="notice_list">
+		<column label="" name="icon"/>
+		<column label="Sujet" name="subject"/>
+		<column label="De" name="from"/>
+		<column label="Date" name="date"/>
+	</scroll_list>
+	<text name="notice_list_none_found">
+		Aucun résultat.
+	</text>
+	<button label="Créer une notice" label_selected="Créer une notice" name="create_new_notice"/>
+	<button label="Rafraîchir" label_selected="Rafraîchir la liste" name="refresh_notices"/>
+	<panel label="Créer une notice" name="panel_create_new_notice">
+		<text name="lbl">
+			Créer une notice
+		</text>
+		<text name="lbl2">
+			Pour envoyer une notice, saisissez un sujet. Pour joindre
+une pièce-jointe à cette notice, faites-la glisser depuis votre 
+inventaire vers cette fenêtre. Les pièces-jointes doivent être
+copiables et transférables. Il n&apos;est pas possible d&apos;envoyer de
+dossiers.
+		</text>
+		<text bottom_delta="-79" name="lbl3" left="20">
+			Sujet :
+		</text>
+		<line_editor name="create_subject" width="331" left_delta="61"/>
+		<text name="lbl4" left="20">
+			Message :
+		</text>
+		<text_editor name="create_message" bottom_delta="-90" height="104" left_delta="61" width="330"/>
+		<text name="lbl5" width="68">
+			Pièce-jointe :
+		</text>
+		<line_editor name="create_inventory_name" width="190" left_delta="74"/>
+		<button label="Supprimer pièce-jointe" label_selected="Supprimer pièce-jointe" left="274" name="remove_attachment" width="140"/>
+		<button label="Envoyer la notice" label_selected="Envoyer la notice" left="274" name="send_notice" width="140"/>
+		<panel name="drop_target2" tool_tip="Pour joindre un objet de l&apos;inventaire à la notice, faites-le glisser dans la boîte de message. Pour envoyer l&apos;objet avec la notice, vous devez avoir la permission de le copier et de le transférer."/>
+		<panel name="drop_target" tool_tip="Pour joindre un objet de l&apos;inventaire à la notice, faites-le glisser dans la boîte de message. Pour envoyer l&apos;objet avec la notice, vous devez avoir la permission de le copier et de le transférer."/>
+	</panel>
+	<panel label="Voir ancienne notice" name="panel_view_past_notice">
+		<text name="lbl">
+			Détails
+		</text>
+		<text name="lbl2">
+			Pour envoyer une nouvelle notice, cliquez sur Créer une notice ci-dessus.
+		</text>
+		<text name="lbl3">
+			Sujet :
+		</text>
+		<text name="lbl4">
+			Message :
+		</text>
+		<button label="Ouvrir pièce-jointe" label_selected="Ouvrir pièce-jointe" name="open_attachment" width="118"/>
+		<line_editor left="128" name="view_inventory_name" width="256"/>
+	</panel>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_group_roles.xml b/indra/newview/skins/default/xui/fr/panel_group_roles.xml
index 53608f61a2..008402db32 100644
--- a/indra/newview/skins/default/xui/fr/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/fr/panel_group_roles.xml
@@ -1,160 +1,160 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Membres et rôles" name="roles_tab">
-	<text name="default_needs_apply_text">
-		Certains changements n&apos;ont pas été appliqués sur ce sous-onglet.
-	</text>
-	<text name="want_apply_text">
-		Voulez-vous enregistrer les modifications ?
-	</text>
-	<text name="cant_delete_role">
-		Les Rôles Tout le monde et Propriétaires sont spéciaux et ne peuvent être supprimés.
-	</text>
-	<button label="?" name="help_button"/>
-	<panel name="members_header">
-		<text name="static">
-			Membres
-		</text>
-		<text name="static2">
-			Les rôles de chaque membre peuvent être personnalisés, ce qui permet une
-meilleure organisation du groupe.
-		</text>
-	</panel>
-	<panel name="roles_header">
-		<text name="static">
-			Rôles
-		</text>
-		<text name="role_properties_modifiable">
-			Sélectionnez un rôle ci-dessous. Vous pouvez modifier le nom, la
-description et le titre du membre.
-		</text>
-		<text name="role_properties_not_modifiable">
-			Sélectionnez un rôle ci-dessous pour en connaître les propriétés, les
-membres et les pouvoirs.
-		</text>
-		<text bottom_delta="-28" name="role_actions_modifiable">
-			Vous pouvez aussi assigner des pouvoirs au rôle.
-		</text>
-		<text name="role_actions_not_modifiable">
-			Vous pouvez afficher mais non modifier les pouvoirs assignés.
-		</text>
-	</panel>
-	<panel name="actions_header">
-		<text name="static">
-			Pouvoirs
-		</text>
-		<text name="static2">
-			Vous pouvez afficher la description du pouvoir et voir à quels rôles ou à
-quels membres ces pouvoirs sont assignés.
-		</text>
-	</panel>
-	<tab_container height="164" name="roles_tab_container">
-		<panel height="148" label="Membres" name="members_sub_tab" tool_tip="Membres">
-			<line_editor bottom="127" name="search_text"/>
-			<button label="Rechercher" name="search_button" width="75"/>
-			<button label="Afficher tout" left_delta="80" name="show_all_button"/>
-			<name_list bottom_delta="-105" height="104" name="member_list">
-				<column label="Nom du membre" name="name"/>
-				<column label="Surface donnée" name="donated" width="116"/>
-				<column label="Dernière connexion" name="online" width="136"/>
-			</name_list>
-			<button label="Inviter un membre..." name="member_invite" width="165"/>
-			<button label="Expulser un membre" name="member_eject"/>
-			<text name="help_text">
-				Vous pouvez ajouter ou supprimer les rôles assignés aux membres.
-Pour sélectionner plusieurs membres, cliquez sur leurs noms en maintenant la touche Ctrl enfoncée.
-			</text>
-		</panel>
-		<panel height="148" label="Rôles" name="roles_sub_tab">
-			<line_editor bottom="127" name="search_text"/>
-			<button label="Rechercher" name="search_button" width="75"/>
-			<button label="Afficher tout" left_delta="80" name="show_all_button"/>
-			<scroll_list bottom_delta="-104" height="104" name="role_list">
-				<column label="Nom du rôle" name="name"/>
-				<column label="Titre" name="title"/>
-				<column label="Membres" name="members"/>
-			</scroll_list>
-			<button label="Créer un rôle..." name="role_create"/>
-			<button label="Supprimer le rôle" name="role_delete"/>
-			<text name="help_text">
-				Chaque rôle possède un titre et des pouvoirs. Un membre peut avoir plusieurs rôles mais il ne peut y avoir que 10 rôles dans un groupe, Visiteur et Propriétaire inclus.
-			</text>
-			<string name="cant_delete_role">
-				Les rôles Tous et Propriétaires sont spéciaux et ne peuvent pas être supprimés.
-			</string>
-		</panel>
-		<panel height="148" label="Pouvoirs" name="actions_sub_tab">
-			<line_editor bottom="127" name="search_text"/>
-			<button label="Rechercher" name="search_button" width="75"/>
-			<button label="Afficher tout" left_delta="80" name="show_all_button"/>
-			<scroll_list bottom_delta="-120" height="118" name="action_list" tool_tip="Sélectionnez un pouvoir pour en afficher les détails.">
-				<column label="" name="icon"/>
-				<column label="" name="action"/>
-			</scroll_list>
-			<text name="help_text">
-				Les pouvoirs déterminent les facultés de chaque membre dans le groupe.
-			</text>
-		</panel>
-	</tab_container>
-	<panel name="members_footer">
-		<text name="static">
-			Rôles assignés
-		</text>
-		<text name="static2">
-			Pouvoirs attribués
-		</text>
-		<scroll_list name="member_assigned_roles">
-			<column label="" name="checkbox"/>
-			<column label="" name="role"/>
-		</scroll_list>
-		<scroll_list name="member_allowed_actions" tool_tip="Pour avoir des détails sur chacun des pouvoirs attribués, allez à l&apos;onglet Pouvoirs.">
-			<column label="" name="icon"/>
-			<column label="" name="action"/>
-		</scroll_list>
-	</panel>
-	<panel name="roles_footer">
-		<text name="static">
-			Nom
-		</text>
-		<text name="static2">
-			Description
-		</text>
-		<line_editor name="role_name">
-			Employés
-		</line_editor>
-		<text name="static3">
-			Titre
-		</text>
-		<line_editor name="role_title">
-			(en attente)
-		</line_editor>
-		<text_editor name="role_description">
-			(en attente)
-		</text_editor>
-		<text name="static4">
-			Membres assignés
-		</text>
-		<text name="static5" tool_tip="Une liste des pouvoirs auquel le rôle sélectionné a accès.">
-			Pouvoirs attribués
-		</text>
-		<check_box label="Membres visibles" name="role_visible_in_list" tool_tip="Définit si les membres de ce rôle sont visibles à partir de l&apos;onglet Général aux personnes en dehors du groupe."/>
-		<scroll_list name="role_allowed_actions" tool_tip="Pour avoir des détails sur chacun des pouvoirs attribués, allez à l&apos;onglet Pouvoirs.">
-			<column label="" name="icon"/>
-			<column label="" name="checkbox"/>
-			<column label="" name="action"/>
-		</scroll_list>
-	</panel>
-	<panel name="actions_footer">
-		<text name="static">
-			Description
-		</text>
-		<text_editor name="action_description">
-			Ce pouvoir permet d&apos;expulser des membres du groupe. Seul un propriétaire peut expulser un autre propriétaire.
-		</text_editor>
-		<text name="static2">
-			Rôles avec ce pouvoir
-		</text>
-		<text name="static3">
-			Membres avec ce pouvoir
-		</text>
-	</panel>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Membres et rôles" name="roles_tab">
+	<text name="default_needs_apply_text">
+		Certains changements n&apos;ont pas été appliqués sur ce sous-onglet.
+	</text>
+	<text name="want_apply_text">
+		Voulez-vous enregistrer les modifications ?
+	</text>
+	<text name="cant_delete_role">
+		Les Rôles Tout le monde et Propriétaires sont spéciaux et ne peuvent être supprimés.
+	</text>
+	<button label="?" name="help_button"/>
+	<panel name="members_header">
+		<text name="static">
+			Membres
+		</text>
+		<text name="static2">
+			Les rôles de chaque membre peuvent être personnalisés, ce qui permet une
+meilleure organisation du groupe.
+		</text>
+	</panel>
+	<panel name="roles_header">
+		<text name="static">
+			Rôles
+		</text>
+		<text name="role_properties_modifiable">
+			Sélectionnez un rôle ci-dessous. Vous pouvez modifier le nom, la
+description et le titre du membre.
+		</text>
+		<text name="role_properties_not_modifiable">
+			Sélectionnez un rôle ci-dessous pour en connaître les propriétés, les
+membres et les pouvoirs.
+		</text>
+		<text bottom_delta="-28" name="role_actions_modifiable">
+			Vous pouvez aussi assigner des pouvoirs au rôle.
+		</text>
+		<text name="role_actions_not_modifiable">
+			Vous pouvez afficher mais non modifier les pouvoirs assignés.
+		</text>
+	</panel>
+	<panel name="actions_header">
+		<text name="static">
+			Pouvoirs
+		</text>
+		<text name="static2">
+			Vous pouvez afficher la description du pouvoir et voir à quels rôles ou à
+quels membres ces pouvoirs sont assignés.
+		</text>
+	</panel>
+	<tab_container height="164" name="roles_tab_container">
+		<panel height="148" label="Membres" name="members_sub_tab" tool_tip="Membres">
+			<line_editor bottom="127" name="search_text"/>
+			<button label="Rechercher" name="search_button" width="75"/>
+			<button label="Afficher tout" left_delta="80" name="show_all_button"/>
+			<name_list bottom_delta="-105" height="104" name="member_list">
+				<column label="Nom du membre" name="name"/>
+				<column label="Surface donnée" name="donated" width="116"/>
+				<column label="Dernière connexion" name="online" width="136"/>
+			</name_list>
+			<button label="Inviter un membre..." name="member_invite" width="165"/>
+			<button label="Expulser un membre" name="member_eject"/>
+			<text name="help_text">
+				Vous pouvez ajouter ou supprimer les rôles assignés aux membres.
+Pour sélectionner plusieurs membres, cliquez sur leurs noms en maintenant la touche Ctrl enfoncée.
+			</text>
+		</panel>
+		<panel height="148" label="Rôles" name="roles_sub_tab">
+			<line_editor bottom="127" name="search_text"/>
+			<button label="Rechercher" name="search_button" width="75"/>
+			<button label="Afficher tout" left_delta="80" name="show_all_button"/>
+			<scroll_list bottom_delta="-104" height="104" name="role_list">
+				<column label="Nom du rôle" name="name"/>
+				<column label="Titre" name="title"/>
+				<column label="Membres" name="members"/>
+			</scroll_list>
+			<button label="Créer un rôle..." name="role_create"/>
+			<button label="Supprimer le rôle" name="role_delete"/>
+			<text name="help_text">
+				Chaque rôle possède un titre et des pouvoirs. Un membre peut avoir plusieurs rôles mais il ne peut y avoir que 10 rôles dans un groupe, Visiteur et Propriétaire inclus.
+			</text>
+			<string name="cant_delete_role">
+				Les rôles Tous et Propriétaires sont spéciaux et ne peuvent pas être supprimés.
+			</string>
+		</panel>
+		<panel height="148" label="Pouvoirs" name="actions_sub_tab">
+			<line_editor bottom="127" name="search_text"/>
+			<button label="Rechercher" name="search_button" width="75"/>
+			<button label="Afficher tout" left_delta="80" name="show_all_button"/>
+			<scroll_list bottom_delta="-120" height="118" name="action_list" tool_tip="Sélectionnez un pouvoir pour en afficher les détails.">
+				<column label="" name="icon"/>
+				<column label="" name="action"/>
+			</scroll_list>
+			<text name="help_text">
+				Les pouvoirs déterminent les facultés de chaque membre dans le groupe.
+			</text>
+		</panel>
+	</tab_container>
+	<panel name="members_footer">
+		<text name="static">
+			Rôles assignés
+		</text>
+		<text name="static2">
+			Pouvoirs attribués
+		</text>
+		<scroll_list name="member_assigned_roles">
+			<column label="" name="checkbox"/>
+			<column label="" name="role"/>
+		</scroll_list>
+		<scroll_list name="member_allowed_actions" tool_tip="Pour avoir des détails sur chacun des pouvoirs attribués, allez à l&apos;onglet Pouvoirs.">
+			<column label="" name="icon"/>
+			<column label="" name="action"/>
+		</scroll_list>
+	</panel>
+	<panel name="roles_footer">
+		<text name="static">
+			Nom
+		</text>
+		<text name="static2">
+			Description
+		</text>
+		<line_editor name="role_name">
+			Employés
+		</line_editor>
+		<text name="static3">
+			Titre
+		</text>
+		<line_editor name="role_title">
+			(en attente)
+		</line_editor>
+		<text_editor name="role_description">
+			(en attente)
+		</text_editor>
+		<text name="static4">
+			Membres assignés
+		</text>
+		<text name="static5" tool_tip="Une liste des pouvoirs auquel le rôle sélectionné a accès.">
+			Pouvoirs attribués
+		</text>
+		<check_box label="Membres visibles" name="role_visible_in_list" tool_tip="Définit si les membres de ce rôle sont visibles à partir de l&apos;onglet Général aux personnes en dehors du groupe."/>
+		<scroll_list name="role_allowed_actions" tool_tip="Pour avoir des détails sur chacun des pouvoirs attribués, allez à l&apos;onglet Pouvoirs.">
+			<column label="" name="icon"/>
+			<column label="" name="checkbox"/>
+			<column label="" name="action"/>
+		</scroll_list>
+	</panel>
+	<panel name="actions_footer">
+		<text name="static">
+			Description
+		</text>
+		<text_editor name="action_description">
+			Ce pouvoir permet d&apos;expulser des membres du groupe. Seul un propriétaire peut expulser un autre propriétaire.
+		</text_editor>
+		<text name="static2">
+			Rôles avec ce pouvoir
+		</text>
+		<text name="static3">
+			Membres avec ce pouvoir
+		</text>
+	</panel>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_groups.xml b/indra/newview/skins/default/xui/fr/panel_groups.xml
index c64ce9e3cc..98320656fb 100644
--- a/indra/newview/skins/default/xui/fr/panel_groups.xml
+++ b/indra/newview/skins/default/xui/fr/panel_groups.xml
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="groups">
-	<scroll_list bottom="50" name="group list"/>
-	<text bottom="16" height="32" name="groupdesc" width="268">
-		Le groupe actif est en gras.
-	</text>
-	<text bottom="3" name="groupcount">
-		Vous appartenez à [COUNT] groupes ([MAX] max).
-	</text>
-	<button label="IM/Appel" name="IM" tool_tip="Ouvrir une session de messagerie instantanée"/>
-	<button label="Infos" name="Info"/>
-	<button label="Activer" name="Activate"/>
-	<button label="Quitter" name="Leave"/>
-	<button label="Créer..." name="Create"/>
-	<button label="Rechercher..." name="Search..."/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="groups">
+	<scroll_list bottom="50" name="group list"/>
+	<text bottom="16" height="32" name="groupdesc" width="268">
+		Le groupe actif est en gras.
+	</text>
+	<text bottom="3" name="groupcount">
+		Vous appartenez à [COUNT] groupes ([MAX] max).
+	</text>
+	<button label="IM/Appel" name="IM" tool_tip="Ouvrir une session de messagerie instantanée"/>
+	<button label="Infos" name="Info"/>
+	<button label="Activer" name="Activate"/>
+	<button label="Quitter" name="Leave"/>
+	<button label="Créer..." name="Create"/>
+	<button label="Rechercher..." name="Search..."/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_login.xml b/indra/newview/skins/default/xui/fr/panel_login.xml
index 6174682a48..821aec65b2 100644
--- a/indra/newview/skins/default/xui/fr/panel_login.xml
+++ b/indra/newview/skins/default/xui/fr/panel_login.xml
@@ -1,52 +1,52 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_login">
-	<string name="forgot_password_url">
-		http://secondlife.com/account/request.php
-	</string>
-	<text name="first_name_text">
-		Prénom :
-	</text>
-	<text name="last_name_text">
-		Nom :
-	</text>
-	<text name="password_text">
-		Mot de passe :
-	</text>
-	<text name="start_location_text">
-		Lieu de départ :
-	</text>
-	<combo_box name="start_location_combo">
-		<combo_item name="MyHome">
-			Domicile
-		</combo_item>
-		<combo_item name="MyLastLocation">
-			Dernier emplacement
-		</combo_item>
-		<combo_item name="&lt;Typeregionname&gt;">
-			&lt;Choisir région&gt;
-		</combo_item>
-		<combo_item name="Typeregionname">
-			&lt;Nom de la région&gt;
-		</combo_item>
-	</combo_box>
-	<check_box label="Mémoriser" name="remember_check"/>
-	<text name="full_screen_text">
-		Le plein écran sera activé après identification.
-	</text>
-	<button label="Nouveau Compte..." label_selected="Nouveau Compte..." name="new_account_btn"/>
-	<button label="Me connecter" label_selected="Me connecter" name="connect_btn"/>
-	<button label="Préférences..." label_selected="Préférences..." name="preferences_btn"/>
-	<button label="Quitter" label_selected="Quitter" name="quit_btn"/>
-	<text name="version_text">
-		1.23.4 (5)
-	</text>
-	<text name="create_new_account_text">
-		Créer un compte
-	</text>
-	<text name="forgot_password_text">
-		Nom ou mot de passe oublié ?
-	</text>
-	<text name="channel_text">
-		[VERSION]
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="panel_login">
+	<string name="forgot_password_url">
+		http://secondlife.com/account/request.php
+	</string>
+	<text name="first_name_text">
+		Prénom :
+	</text>
+	<text name="last_name_text">
+		Nom :
+	</text>
+	<text name="password_text">
+		Mot de passe :
+	</text>
+	<text name="start_location_text">
+		Lieu de départ :
+	</text>
+	<combo_box name="start_location_combo">
+		<combo_box.item name="MyHome">
+			Domicile
+		</combo_box.item>
+		<combo_box.item name="MyLastLocation">
+			Dernier emplacement
+		</combo_box.item>
+		<combo_box.item name="&lt;Typeregionname&gt;">
+			&lt;Choisir région&gt;
+		</combo_box.item>
+		<combo_box.item name="Typeregionname">
+			&lt;Nom de la région&gt;
+		</combo_box.item>
+	</combo_box>
+	<check_box label="Mémoriser" name="remember_check"/>
+	<text name="full_screen_text">
+		Le plein écran sera activé après identification.
+	</text>
+	<button label="Nouveau Compte..." label_selected="Nouveau Compte..." name="new_account_btn"/>
+	<button label="Me connecter" label_selected="Me connecter" name="connect_btn"/>
+	<button label="Préférences..." label_selected="Préférences..." name="preferences_btn"/>
+	<button label="Quitter" label_selected="Quitter" name="quit_btn"/>
+	<text name="version_text">
+		1.23.4 (5)
+	</text>
+	<text name="create_new_account_text">
+		Créer un compte
+	</text>
+	<text name="forgot_password_text">
+		Nom ou mot de passe oublié ?
+	</text>
+	<text name="channel_text">
+		[VERSION]
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml
index d89a47dba0..d29ec67272 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml
@@ -1,59 +1,59 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Chat écrit" name="chat">
-	<text length="1" name="text_box" type="string">
-		Taille de la police 
-du chat :
-	</text>
-	<radio_group name="chat_font_size">
-		<radio_item length="1" name="radio" type="string">
-			Petite
-		</radio_item>
-		<radio_item length="1" name="radio2" type="string">
-			Moyenne
-		</radio_item>
-		<radio_item length="1" name="radio3" type="string">
-			Grande
-		</radio_item>
-	</radio_group>
-	<text length="1" name="text_box2" type="string">
-		Couleur du chat :
-	</text>
-	<color_swatch label="Vous" name="user"/>
-	<color_swatch label="Avatars" name="agent" width="60"/>
-	<color_swatch label="IM" left_delta="64" name="im"/>
-	<color_swatch label="Système" name="system"/>
-	<color_swatch label="Erreurs" name="script_error"/>
-	<color_swatch label="Objets" name="objects"/>
-	<color_swatch label="Propriétaire" name="owner" width="60"/>
-	<color_swatch label="Bulle" left_delta="64" name="background"/>
-	<color_swatch label="URL" name="links"/>
-	<text length="1" name="text_box3" type="string">
-		Console du chat :
-	</text>
-	<spinner label="Effacer le texte après" label_width="112" name="fade_chat_time" width="162"/>
-	<text left="313" length="1" name="text_box4" type="string">
-		s
-	</text>
-	<spinner left="335" name="max_chat_count"/>
-	<text left="397" length="1" name="text_box5" type="string" width="74">
-		lignes
-	</text>
-	<slider label="Opacité" name="console_opacity"/>
-	<text length="1" name="text_box6" type="string">
-		Options du chat :
-	</text>
-	<check_box label="Utiliser la largeur de l&apos;écran (redémarrage requis)" name="chat_full_width_check"/>
-	<check_box label="Fermer le chat après avoir appuyé sur Entrée" name="close_chat_on_return_check"/>
-	<check_box label="Faire bouger l&apos;avatar avec les touches de direction" name="arrow_keys_move_avatar_check"/>
-	<check_box label="Afficher les heures dans le chat" name="show_timestamps_check"/>
-	<check_box label="Jouer l&apos;animation clavier quand vous écrivez" name="play_typing_animation"/>
-	<text length="1" name="text_box7" type="string">
-		Bulles de chat  :
-	</text>
-	<check_box label="Afficher les bulles de chat" name="bubble_text_chat"/>
-	<slider label="Opacité" name="bubble_chat_opacity"/>
-	<text length="1" name="text_box8" type="string">
-		Erreurs de script :
-	</text>
-	<check_box label="Afficher les erreurs dans le chat" name="script_errors_as_chat"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Chat écrit" name="chat">
+	<text length="1" name="text_box" type="string">
+		Taille de la police 
+du chat :
+	</text>
+	<radio_group name="chat_font_size">
+		<radio_item length="1" name="radio" type="string">
+			Petite
+		</radio_item>
+		<radio_item length="1" name="radio2" type="string">
+			Moyenne
+		</radio_item>
+		<radio_item length="1" name="radio3" type="string">
+			Grande
+		</radio_item>
+	</radio_group>
+	<text length="1" name="text_box2" type="string">
+		Couleur du chat :
+	</text>
+	<color_swatch label="Vous" name="user"/>
+	<color_swatch label="Avatars" name="agent" width="60"/>
+	<color_swatch label="IM" left_delta="64" name="im"/>
+	<color_swatch label="Système" name="system"/>
+	<color_swatch label="Erreurs" name="script_error"/>
+	<color_swatch label="Objets" name="objects"/>
+	<color_swatch label="Propriétaire" name="owner" width="60"/>
+	<color_swatch label="Bulle" left_delta="64" name="background"/>
+	<color_swatch label="URL" name="links"/>
+	<text length="1" name="text_box3" type="string">
+		Console du chat :
+	</text>
+	<spinner label="Effacer le texte après" label_width="112" name="fade_chat_time" width="162"/>
+	<text left="313" length="1" name="text_box4" type="string">
+		s
+	</text>
+	<spinner left="335" name="max_chat_count"/>
+	<text left="397" length="1" name="text_box5" type="string" width="74">
+		lignes
+	</text>
+	<slider label="Opacité" name="console_opacity"/>
+	<text length="1" name="text_box6" type="string">
+		Options du chat :
+	</text>
+	<check_box label="Utiliser la largeur de l&apos;écran (redémarrage requis)" name="chat_full_width_check"/>
+	<check_box label="Fermer le chat après avoir appuyé sur Entrée" name="close_chat_on_return_check"/>
+	<check_box label="Faire bouger l&apos;avatar avec les touches de direction" name="arrow_keys_move_avatar_check"/>
+	<check_box label="Afficher les heures dans le chat" name="show_timestamps_check"/>
+	<check_box label="Jouer l&apos;animation clavier quand vous écrivez" name="play_typing_animation"/>
+	<text length="1" name="text_box7" type="string">
+		Bulles de chat  :
+	</text>
+	<check_box label="Afficher les bulles de chat" name="bubble_text_chat"/>
+	<slider label="Opacité" name="bubble_chat_opacity"/>
+	<text length="1" name="text_box8" type="string">
+		Erreurs de script :
+	</text>
+	<check_box label="Afficher les erreurs dans le chat" name="script_errors_as_chat"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_general.xml b/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
index 1713086ed1..dbb471093e 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
@@ -1,119 +1,119 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Général" name="general_panel">
-	<radio_group name="default_start_location" width="166">
-		<radio_item name="MyHome" tool_tip="Par défaut, choisir mon domicile comme lieu de départ.">
-			Domicile
-		</radio_item>
-		<radio_item name="MyLastLocation" tool_tip="Par défaut, choisir mon dernier emplacement comme lieu de départ.">
-			Dernier emplacement
-		</radio_item>
-	</radio_group>
-	<check_box label="Afficher le lieu de départ sur l&apos;écran de connexion" name="show_location_checkbox"/>
-	<combo_box name="fade_out_combobox" width="166">
-		<combo_item name="Never">
-			Jamais
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Afficher temporairement
-		</combo_item>
-		<combo_item name="Always">
-			Toujours
-		</combo_item>
-	</combo_box>
-	<check_box label="Nom des avatars en petit" name="small_avatar_names_checkbox"/>
-	<check_box label="Masquer mon nom sur mon écran" name="show_my_name_checkbox"/>
-	<text name="group_titles_textbox">
-		Titres de groupe :
-	</text>
-	<check_box label="Masquer tous les titres de groupe" name="show_all_title_checkbox"/>
-	<check_box label="Masquer mon titre de groupe" name="show_my_title_checkbox"/>
-	<color_swatch label="" name="effect_color_swatch" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs"/>
-	<text name="UI Size:">
-		Taille de l&apos;interface :
-	</text>
-	<slider name="ui_scale_slider"/>
-	<check_box label="Utiliser une échelle indépendante de la résolution" name="ui_auto_scale"/>
-	<spinner label="Absent(e) après :" name="afk_timeout_spinner"/>
-	<check_box label="M&apos;avertir lorsque je dépense ou reçois des L$" name="notify_money_change_checkbox"/>
-	<text length="1" name="start_location_textbox" type="string">
-		Lieu de départ :
-	</text>
-	<text length="1" name="show_names_textbox" type="string">
-		Afficher les noms :
-	</text>
-	<text bottom="-174" length="1" name="effects_color_textbox" type="string">
-		Couleur du faisceau 
-de sélection :
-	</text>
-	<text length="1" name="seconds_textbox" type="string">
-		secondes
-	</text>
-	<text length="1" name="crash_report_textbox" type="string">
-		Rapports de crash :
-	</text>
-	<text length="1" name="language_textbox" type="string">
-		Langue :
-	</text>
-	<text left_delta="313" length="1" name="language_textbox2" type="string">
-		(redémarrage requis)
-	</text>
-	<string name="region_name_prompt">
-		&lt;Saisissez le nom de la région&gt;
-	</string>
-	<combo_box name="crash_behavior_combobox" width="166">
-		<combo_item length="1" name="Askbeforesending" type="string">
-			Demander avant d&apos;envoyer
-		</combo_item>
-		<combo_item length="1" name="Alwayssend" type="string">
-			Toujours envoyer
-		</combo_item>
-		<combo_item length="1" name="Neversend" type="string">
-			Ne jamais envoyer
-		</combo_item>
-	</combo_box>
-	<combo_box name="language_combobox" width="166">
-		<combo_item name="System Default Language">
-			Choix par défaut
-		</combo_item>
-		<combo_item length="1" name="English" type="string">
-			English (Anglais)
-		</combo_item>
-		<combo_item length="1" name="Danish" type="string">
-			Dansk (Danois) - Bêta
-		</combo_item>
-		<combo_item length="1" name="Deutsch(German)" type="string">
-			Deutsch (Allemand) - Bêta
-		</combo_item>
-		<combo_item name="Spanish">
-			Español (Espagnol) - Bêta
-		</combo_item>
-		<combo_item name="French">
-			Français - Bêta
-		</combo_item>
-		<combo_item name="Hungarian">
-			Magyar (Hongrois) - Bêta
-		</combo_item>
-		<combo_item name="Polish">
-			Polski (Polonais) - Bêta
-		</combo_item>
-		<combo_item name="Portugese">
-			Portugués (Portugais) - Bêta
-		</combo_item>
-		<combo_item name="Russian">
-			Русский (Russe) - Bêta
-		</combo_item>
-		<combo_item name="Ukrainian">
-			Українська (Ukrainien) - Bêta
-		</combo_item>
-		<combo_item length="1" name="Chinese" type="string">
-			中文 (简体) (Chinois) - Bêta
-		</combo_item>
-		<combo_item length="1" name="(Japanese)" type="string">
-			日本語 (Japonais) - Bêta
-		</combo_item>
-		<combo_item length="1" name="(Korean)" type="string">
-			한국어 (Coréen) - Bêta
-		</combo_item>
-	</combo_box>
-	<check_box label="Partager la langue avec les objets" name="language_is_public" tool_tip="Cette option permet de faire connaître aux objets du Monde votre langue favorite."/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Général" name="general_panel">
+	<radio_group name="default_start_location" width="166">
+		<radio_item name="MyHome" tool_tip="Par défaut, choisir mon domicile comme lieu de départ.">
+			Domicile
+		</radio_item>
+		<radio_item name="MyLastLocation" tool_tip="Par défaut, choisir mon dernier emplacement comme lieu de départ.">
+			Dernier emplacement
+		</radio_item>
+	</radio_group>
+	<check_box label="Afficher le lieu de départ sur l&apos;écran de connexion" name="show_location_checkbox"/>
+	<combo_box name="fade_out_combobox" width="166">
+		<combo_item name="Never">
+			Jamais
+		</combo_item>
+		<combo_item name="Show Temporarily">
+			Afficher temporairement
+		</combo_item>
+		<combo_item name="Always">
+			Toujours
+		</combo_item>
+	</combo_box>
+	<check_box label="Nom des avatars en petit" name="small_avatar_names_checkbox"/>
+	<check_box label="Masquer mon nom sur mon écran" name="show_my_name_checkbox"/>
+	<text name="group_titles_textbox">
+		Titres de groupe :
+	</text>
+	<check_box label="Masquer tous les titres de groupe" name="show_all_title_checkbox"/>
+	<check_box label="Masquer mon titre de groupe" name="show_my_title_checkbox"/>
+	<color_swatch label="" name="effect_color_swatch" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs"/>
+	<text name="UI Size:">
+		Taille de l&apos;interface :
+	</text>
+	<slider name="ui_scale_slider"/>
+	<check_box label="Utiliser une échelle indépendante de la résolution" name="ui_auto_scale"/>
+	<spinner label="Absent(e) après :" name="afk_timeout_spinner"/>
+	<check_box label="M&apos;avertir lorsque je dépense ou reçois des L$" name="notify_money_change_checkbox"/>
+	<text length="1" name="start_location_textbox" type="string">
+		Lieu de départ :
+	</text>
+	<text length="1" name="show_names_textbox" type="string">
+		Afficher les noms :
+	</text>
+	<text bottom="-174" length="1" name="effects_color_textbox" type="string">
+		Couleur du faisceau 
+de sélection :
+	</text>
+	<text length="1" name="seconds_textbox" type="string">
+		secondes
+	</text>
+	<text length="1" name="crash_report_textbox" type="string">
+		Rapports de crash :
+	</text>
+	<text length="1" name="language_textbox" type="string">
+		Langue :
+	</text>
+	<text left_delta="313" length="1" name="language_textbox2" type="string">
+		(redémarrage requis)
+	</text>
+	<string name="region_name_prompt">
+		&lt;Saisissez le nom de la région&gt;
+	</string>
+	<combo_box name="crash_behavior_combobox" width="166">
+		<combo_item length="1" name="Askbeforesending" type="string">
+			Demander avant d&apos;envoyer
+		</combo_item>
+		<combo_item length="1" name="Alwayssend" type="string">
+			Toujours envoyer
+		</combo_item>
+		<combo_item length="1" name="Neversend" type="string">
+			Ne jamais envoyer
+		</combo_item>
+	</combo_box>
+	<combo_box name="language_combobox" width="166">
+		<combo_item name="System Default Language">
+			Choix par défaut
+		</combo_item>
+		<combo_item length="1" name="English" type="string">
+			English (Anglais)
+		</combo_item>
+		<combo_item length="1" name="Danish" type="string">
+			Dansk (Danois) - Bêta
+		</combo_item>
+		<combo_item length="1" name="Deutsch(German)" type="string">
+			Deutsch (Allemand) - Bêta
+		</combo_item>
+		<combo_item name="Spanish">
+			Español (Espagnol) - Bêta
+		</combo_item>
+		<combo_item name="French">
+			Français - Bêta
+		</combo_item>
+		<combo_item name="Hungarian">
+			Magyar (Hongrois) - Bêta
+		</combo_item>
+		<combo_item name="Polish">
+			Polski (Polonais) - Bêta
+		</combo_item>
+		<combo_item name="Portugese">
+			Portugués (Portugais) - Bêta
+		</combo_item>
+		<combo_item name="Russian">
+			Русский (Russe) - Bêta
+		</combo_item>
+		<combo_item name="Ukrainian">
+			Українська (Ukrainien) - Bêta
+		</combo_item>
+		<combo_item length="1" name="Chinese" type="string">
+			中文 (简体) (Chinois) - Bêta
+		</combo_item>
+		<combo_item length="1" name="(Japanese)" type="string">
+			日本語 (Japonais) - Bêta
+		</combo_item>
+		<combo_item length="1" name="(Korean)" type="string">
+			한국어 (Coréen) - Bêta
+		</combo_item>
+	</combo_box>
+	<check_box label="Partager la langue avec les objets" name="language_is_public" tool_tip="Cette option permet de faire connaître aux objets du Monde votre langue favorite."/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
index 0892db463e..aaf6591f2e 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
@@ -1,195 +1,195 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Graphiques" name="Display panel">
-	<button label="?" name="GraphicsPreferencesHelpButton"/>
-	<text_editor bottom="-56" height="40" left="25" name="FullScreenInfo" width="460">
-		Décochez cette option pour passer en mode plein écran.
-	</text_editor>
-	<text name="WindowSizeLabel">
-		Taille de la fenêtre :
-	</text>
-	<combo_box name="windowsize combo">
-		<combo_item name="640x480">
-			640 x 480
-		</combo_item>
-		<combo_item name="800x600">
-			800 x 600
-		</combo_item>
-		<combo_item name="720x480">
-			720 x 480 (NTSC)
-		</combo_item>
-		<combo_item name="768x576">
-			768 x 576 (PAL)
-		</combo_item>
-		<combo_item name="1024x768">
-			1024 x 768
-		</combo_item>
-	</combo_box>
-	<text name="DisplayResLabel" width="165">
-		Résolution de l&apos;affichage :
-	</text>
-	<text name="AspectRatioLabel1" tool_tip="largeur/hauteur">
-		Rapport hauteur/largeur :
-	</text>
-	<combo_box name="aspect_ratio" tool_tip="largeur/hauteur">
-		<combo_item length="1" name="4:3(StandardCRT)" type="string">
-			4:3 (Standard CRT)
-		</combo_item>
-		<combo_item length="1" name="5:4(1280x1024LCD)" type="string">
-			5:4 (1280 x 1024 LCD)
-		</combo_item>
-		<combo_item name="8:5(Widescreen)">
-			8:5 (écran large)
-		</combo_item>
-		<combo_item length="1" name="16:9(Widescreen)" type="string">
-			16:9 (plein écran)
-		</combo_item>
-	</combo_box>
-	<text length="1" name="text" type="string">
-		Résolution d&apos;affichage :
-	</text>
-	<text length="1" name="Fullscreen Aspect Ratio:" type="string">
-		Format de plein écran :
-	</text>
-	<text length="1" name="(width / height)" type="string">
-		(largeur / hauteur)
-	</text>
-	<text length="1" name="UI Size:" type="string">
-		Taille de l&apos;IU :
-	</text>
-	<text length="1" name="(meters, lower is faster)" type="string">
-		(mètres, moins = plus rapide)
-	</text>
-	<text length="1" name="text2" type="string">
-		Options d&apos;affichage :
-	</text>
-	<check_box label="Lancer Second Life en mode fenêtré" name="windowed mode"/>
-	<check_box label="Auto-détection du ratio" left="350" name="aspect_auto_detect"/>
-	<check_box label="Utiliser échelle de résolution indépendante" name="ui_auto_scale"/>
-	<check_box label="Montrer l&apos;avatar en vue subjective" name="avfp"/>
-	<spinner label="Distance d&apos;affichage :" name="draw_distance"/>
-	<text name="HigherText">
-		Qualité et
-	</text>
-	<text name="QualityText">
-		Performance :
-	</text>
-	<text left="105" name="FasterText">
-		Plus rapide
-	</text>
-	<text name="ShadersPrefText">
-		Faible
-	</text>
-	<text name="ShadersPrefText2">
-		Moyen
-	</text>
-	<text name="ShadersPrefText3">
-		Élevé
-	</text>
-	<text name="ShadersPrefText4">
-		Ultra
-	</text>
-	<text bottom="-86" left="325" name="HigherText2">
-		Plus élevée
-	</text>
-	<text name="QualityText2" visible="false"/>
-	<check_box label="Personnaliser" left="395" name="CustomSettings"/>
-	<text name="ShadersText">
-		Effets :
-	</text>
-	<check_box label="Placage de relief et brillance" name="BumpShiny"/>
-	<check_box label="Effets de base" name="BasicShaders" tool_tip="Désactiver cette option peut empêcher certains drivers de cartes graphiques de planter."/>
-	<check_box label="Effets atmosphériques" name="WindLightUseAtmosShaders"/>
-	<check_box label="Reflets de l&apos;eau" name="Reflections"/>
-	<text name="ReflectionDetailText">
-		Objets reflétés :
-	</text>
-	<radio_group name="ReflectionDetailRadio">
-		<radio_item name="0">
-			Terrain et Arbres
-		</radio_item>
-		<radio_item name="1">
-			Objets statiques
-		</radio_item>
-		<radio_item name="2">
-			Objets et avatars
-		</radio_item>
-		<radio_item name="3">
-			Tout
-		</radio_item>
-	</radio_group>
-	<text name="AvatarRenderingText">
-		Rendu de l&apos;avatar :
-	</text>
-	<check_box label="Avatars éloignés en 2D" name="AvatarImpostors"/>
-	<check_box label="Accélération du rendu" name="AvatarVertexProgram"/>
-	<check_box label="Mouvement des habits" name="AvatarCloth"/>
-	<text name="DrawDistanceMeterText1">
-		m
-	</text>
-	<text name="DrawDistanceMeterText2">
-		m
-	</text>
-	<slider label="Limite d&apos;affichage :" name="DrawDistance"/>
-	<slider label="Nombre de particules max. :" label_width="143" name="MaxParticleCount"/>
-	<slider label="Qualité post-traitement :" name="RenderPostProcess"/>
-	<text name="MeshDetailText">
-		Détails des rendus :
-	</text>
-	<slider label="  Objets :" name="ObjectMeshDetail"/>
-	<slider label="  Flexiprims :" name="FlexibleMeshDetail"/>
-	<slider label="  Arbres :" name="TreeMeshDetail"/>
-	<slider label="  Avatars :" name="AvatarMeshDetail"/>
-	<slider label="  Relief :" name="TerrainMeshDetail"/>
-	<slider label="  Ciel :" name="SkyMeshDetail"/>
-	<text name="PostProcessText">
-		Faible
-	</text>
-	<text name="ObjectMeshDetailText">
-		Faible
-	</text>
-	<text name="FlexibleMeshDetailText">
-		Faible
-	</text>
-	<text name="TreeMeshDetailText">
-		Faible
-	</text>
-	<text name="AvatarMeshDetailText">
-		Faible
-	</text>
-	<text name="TerrainMeshDetailText">
-		Faible
-	</text>
-	<text name="SkyMeshDetailText">
-		Faible
-	</text>
-	<text name="LightingDetailText">
-		Sources lumineuses :
-	</text>
-	<radio_group name="LightingDetailRadio">
-		<radio_item name="SunMoon">
-			Soleil et lune uniquement
-		</radio_item>
-		<radio_item name="LocalLights">
-			Lumières à proximité
-		</radio_item>
-	</radio_group>
-	<text left="380" name="TerrainDetailText">
-		Rendu du terrain :
-	</text>
-	<radio_group name="TerrainDetailRadio">
-		<radio_item name="0">
-			Faible
-		</radio_item>
-		<radio_item name="2">
-			Élevé
-		</radio_item>
-	</radio_group>
-	<button label="Paramètres recommandés" name="Defaults"/>
-	<button label="Configuration du matériel" label_selected="Configuration du matériel" name="GraphicsHardwareButton"/>
-	<text name="resolution_format">
-		[RES_X] x [RES_Y]
-	</text>
-	<text name="aspect_ratio_text">
-		[NUM]:[DEN]
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Graphiques" name="Display panel">
+	<button label="?" name="GraphicsPreferencesHelpButton"/>
+	<text_editor bottom="-56" height="40" left="25" name="FullScreenInfo" width="460">
+		Décochez cette option pour passer en mode plein écran.
+	</text_editor>
+	<text name="WindowSizeLabel">
+		Taille de la fenêtre :
+	</text>
+	<combo_box name="windowsize combo">
+		<combo_box.item name="640x480">
+			640 x 480
+		</combo_box.item>
+		<combo_box.item name="800x600">
+			800 x 600
+		</combo_box.item>
+		<combo_box.item name="720x480">
+			720 x 480 (NTSC)
+		</combo_box.item>
+		<combo_box.item name="768x576">
+			768 x 576 (PAL)
+		</combo_box.item>
+		<combo_box.item name="1024x768">
+			1024 x 768
+		</combo_box.item>
+	</combo_box>
+	<text name="DisplayResLabel" width="165">
+		Résolution de l&apos;affichage :
+	</text>
+	<text name="AspectRatioLabel1" tool_tip="largeur/hauteur">
+		Rapport hauteur/largeur :
+	</text>
+	<combo_box name="aspect_ratio" tool_tip="largeur/hauteur">
+		<combo_box.item length="1" name="4:3(StandardCRT)" type="string">
+			4:3 (Standard CRT)
+		</combo_box.item>
+		<combo_box.item length="1" name="5:4(1280x1024LCD)" type="string">
+			5:4 (1280 x 1024 LCD)
+		</combo_box.item>
+		<combo_box.item name="8:5(Widescreen)">
+			8:5 (écran large)
+		</combo_box.item>
+		<combo_box.item length="1" name="16:9(Widescreen)" type="string">
+			16:9 (plein écran)
+		</combo_box.item>
+	</combo_box>
+	<text length="1" name="text" type="string">
+		Résolution d&apos;affichage :
+	</text>
+	<text length="1" name="Fullscreen Aspect Ratio:" type="string">
+		Format de plein écran :
+	</text>
+	<text length="1" name="(width / height)" type="string">
+		(largeur / hauteur)
+	</text>
+	<text length="1" name="UI Size:" type="string">
+		Taille de l&apos;IU :
+	</text>
+	<text length="1" name="(meters, lower is faster)" type="string">
+		(mètres, moins = plus rapide)
+	</text>
+	<text length="1" name="text2" type="string">
+		Options d&apos;affichage :
+	</text>
+	<check_box label="Lancer Second Life en mode fenêtré" name="windowed mode"/>
+	<check_box label="Auto-détection du ratio" left="350" name="aspect_auto_detect"/>
+	<check_box label="Utiliser échelle de résolution indépendante" name="ui_auto_scale"/>
+	<check_box label="Montrer l&apos;avatar en vue subjective" name="avfp"/>
+	<spinner label="Distance d&apos;affichage :" name="draw_distance"/>
+	<text name="HigherText">
+		Qualité et
+	</text>
+	<text name="QualityText">
+		Performance :
+	</text>
+	<text left="105" name="FasterText">
+		Plus rapide
+	</text>
+	<text name="ShadersPrefText">
+		Faible
+	</text>
+	<text name="ShadersPrefText2">
+		Moyen
+	</text>
+	<text name="ShadersPrefText3">
+		Élevé
+	</text>
+	<text name="ShadersPrefText4">
+		Ultra
+	</text>
+	<text bottom="-86" left="325" name="HigherText2">
+		Plus élevée
+	</text>
+	<text name="QualityText2" visible="false"/>
+	<check_box label="Personnaliser" left="395" name="CustomSettings"/>
+	<text name="ShadersText">
+		Effets :
+	</text>
+	<check_box label="Placage de relief et brillance" name="BumpShiny"/>
+	<check_box label="Effets de base" name="BasicShaders" tool_tip="Désactiver cette option peut empêcher certains drivers de cartes graphiques de planter."/>
+	<check_box label="Effets atmosphériques" name="WindLightUseAtmosShaders"/>
+	<check_box label="Reflets de l&apos;eau" name="Reflections"/>
+	<text name="ReflectionDetailText">
+		Objets reflétés :
+	</text>
+	<radio_group name="ReflectionDetailRadio">
+		<radio_item name="0">
+			Terrain et Arbres
+		</radio_item>
+		<radio_item name="1">
+			Objets statiques
+		</radio_item>
+		<radio_item name="2">
+			Objets et avatars
+		</radio_item>
+		<radio_item name="3">
+			Tout
+		</radio_item>
+	</radio_group>
+	<text name="AvatarRenderingText">
+		Rendu de l&apos;avatar :
+	</text>
+	<check_box label="Avatars éloignés en 2D" name="AvatarImpostors"/>
+	<check_box label="Accélération du rendu" name="AvatarVertexProgram"/>
+	<check_box label="Mouvement des habits" name="AvatarCloth"/>
+	<text name="DrawDistanceMeterText1">
+		m
+	</text>
+	<text name="DrawDistanceMeterText2">
+		m
+	</text>
+	<slider label="Limite d&apos;affichage :" name="DrawDistance"/>
+	<slider label="Nombre de particules max. :" label_width="143" name="MaxParticleCount"/>
+	<slider label="Qualité post-traitement :" name="RenderPostProcess"/>
+	<text name="MeshDetailText">
+		Détails des rendus :
+	</text>
+	<slider label="  Objets :" name="ObjectMeshDetail"/>
+	<slider label="  Flexiprims :" name="FlexibleMeshDetail"/>
+	<slider label="  Arbres :" name="TreeMeshDetail"/>
+	<slider label="  Avatars :" name="AvatarMeshDetail"/>
+	<slider label="  Relief :" name="TerrainMeshDetail"/>
+	<slider label="  Ciel :" name="SkyMeshDetail"/>
+	<text name="PostProcessText">
+		Faible
+	</text>
+	<text name="ObjectMeshDetailText">
+		Faible
+	</text>
+	<text name="FlexibleMeshDetailText">
+		Faible
+	</text>
+	<text name="TreeMeshDetailText">
+		Faible
+	</text>
+	<text name="AvatarMeshDetailText">
+		Faible
+	</text>
+	<text name="TerrainMeshDetailText">
+		Faible
+	</text>
+	<text name="SkyMeshDetailText">
+		Faible
+	</text>
+	<text name="LightingDetailText">
+		Sources lumineuses :
+	</text>
+	<radio_group name="LightingDetailRadio">
+		<radio_item name="SunMoon">
+			Soleil et lune uniquement
+		</radio_item>
+		<radio_item name="LocalLights">
+			Lumières à proximité
+		</radio_item>
+	</radio_group>
+	<text left="380" name="TerrainDetailText">
+		Rendu du terrain :
+	</text>
+	<radio_group name="TerrainDetailRadio">
+		<radio_item name="0">
+			Faible
+		</radio_item>
+		<radio_item name="2">
+			Élevé
+		</radio_item>
+	</radio_group>
+	<button label="Paramètres recommandés" name="Defaults"/>
+	<button label="Configuration du matériel" label_selected="Configuration du matériel" name="GraphicsHardwareButton"/>
+	<text name="resolution_format">
+		[RES_X] x [RES_Y]
+	</text>
+	<text name="aspect_ratio_text">
+		[NUM]:[DEN]
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_covenant.xml b/indra/newview/skins/default/xui/fr/panel_region_covenant.xml
index 37a129811e..557e88267d 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_covenant.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_covenant.xml
@@ -1,51 +1,51 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel label="Règlement" name="Covenant">
-	<text name="covenant_help_text" bottom="-25">
-		Les changements apportés au règlement apparaîtront sur toutes les
-parcelles du domaine.
-	</text>
-	<text name="region_name_lbl" bottom_delta="-31">
-		Région :
-	</text>
-	<text name="region_name_text">
-		(inconnue)
-	</text>
-	<text name="estate_name_lbl" bottom_delta="-19">
-		Domaine :
-	</text>
-	<text name="estate_name_text">
-		(inconnu)
-	</text>
-	<text name="covenent_instructions">
-		Pour modifier le règlement de ce domaine, glissez-déposez une note.
-	</text>
-	<button label="?" name="covenant_help" />
-	<button label="Redéfinir" name="reset_covenant" />
-	<text name="estate_owner_lbl" bottom_delta="-19">
-		Propriétaire :
-	</text>
-	<text name="estate_owner_text">
-		(inconnu)
-	</text>
-	<text name="resellable_clause">
-		Le terrain acheté dans cette région peut être revendu ou pas.
-	</text>
-	<text name="changeable_clause">
-		Le terrain acheté dans cette région peut être fusionné/divisé ou pas.
-	</text>
-	<text_editor name="covenant_editor">
-		Chargement...
-	</text_editor>
-	<text name="can_resell">
-		Le terrain acheté dans cette région peut être revendu.
-	</text>
-	<text name="can_not_resell">
-		Le terrain acheté dans cette région ne peut pas être revendu.
-	</text>
-	<text name="can_change">
-		Le terrain acheté dans cette région peut être fusionné ou divisé.
-	</text>
-	<text name="can_not_change">
-		Le terrain acheté dans cette région ne peut pas être fusionné ou divisé.
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel label="Règlement" name="Covenant">
+	<text name="covenant_help_text" bottom="-25">
+		Les changements apportés au règlement apparaîtront sur toutes les
+parcelles du domaine.
+	</text>
+	<text name="region_name_lbl" bottom_delta="-31">
+		Région :
+	</text>
+	<text name="region_name_text">
+		(inconnue)
+	</text>
+	<text name="estate_name_lbl" bottom_delta="-19">
+		Domaine :
+	</text>
+	<text name="estate_name_text">
+		(inconnu)
+	</text>
+	<text name="covenent_instructions">
+		Pour modifier le règlement de ce domaine, glissez-déposez une note.
+	</text>
+	<button label="?" name="covenant_help" />
+	<button label="Redéfinir" name="reset_covenant" />
+	<text name="estate_owner_lbl" bottom_delta="-19">
+		Propriétaire :
+	</text>
+	<text name="estate_owner_text">
+		(inconnu)
+	</text>
+	<text name="resellable_clause">
+		Le terrain acheté dans cette région peut être revendu ou pas.
+	</text>
+	<text name="changeable_clause">
+		Le terrain acheté dans cette région peut être fusionné/divisé ou pas.
+	</text>
+	<text_editor name="covenant_editor">
+		Chargement...
+	</text_editor>
+	<text name="can_resell">
+		Le terrain acheté dans cette région peut être revendu.
+	</text>
+	<text name="can_not_resell">
+		Le terrain acheté dans cette région ne peut pas être revendu.
+	</text>
+	<text name="can_change">
+		Le terrain acheté dans cette région peut être fusionné ou divisé.
+	</text>
+	<text name="can_not_change">
+		Le terrain acheté dans cette région ne peut pas être fusionné ou divisé.
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_debug.xml b/indra/newview/skins/default/xui/fr/panel_region_debug.xml
index 07a4d5d012..92f44fa0e2 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_debug.xml
@@ -1,40 +1,40 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Débugger" name="Debug">
-	<text name="region_text_lbl">
-		Région :
-	</text>
-	<text name="region_text">
-		(inconnue)
-	</text>
-	<check_box label="Désactiver les scripts" name="disable_scripts_check" tool_tip="Désactiver tous les scripts dans cette région"/>
-	<button label="?" name="disable_scripts_help"/>
-	<check_box label="Désactiver les collisions" name="disable_collisions_check" tool_tip="Désactiver les collisions entre non-avatars dans cette région"/>
-	<button label="?" name="disable_collisions_help"/>
-	<check_box label="Désactiver les propriétés &#10;physiques" name="disable_physics_check" tool_tip="Désactiver toutes les propriétés physiques dans cette région"/>
-	<button label="?" name="disable_physics_help"/>
-	<button label="Appliquer" name="apply_btn" bottom_delta="-38"/>
-	<text name="objret_text_lbl" bottom_delta="-42">
-		Renvoi de l&apos;objet
-	</text>
-	<text name="resident_text_lbl">
-		Résident :
-	</text>
-	<line_editor name="target_avatar_name">
-		(aucun)
-	</line_editor>
-	<button label="Choisir..." name="choose_avatar_btn"/>
-	<text name="options_text_lbl">
-		Options :
-	</text>
-	<check_box label="Ne renvoyer que les objets avec des scripts" name="return_scripts" tool_tip="Ne renvoyer que les objets avec des scripts."/>
-	<check_box label="Ne renvoyer que les objets sur le terrain de quelqu&apos;un d&apos;autre" name="return_other_land" tool_tip="Ne renvoyer que les objets se trouvant sur le terrain de quelqu&apos;un d&apos;autre"/>
-	<check_box label="Renvoyer les objets dans toutes les régions de ce domaine" name="return_estate_wide" tool_tip="Renvoyer les objets dans toutes les régions qui constituent ce domaine"/>
-	<button label="Renvoyer" name="return_btn"/>
-	<button label="Afficher les objets souvent responsables de collision..." name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="320"/>
-	<button label="?" name="top_colliders_help" left="337"/>
-	<button label="Afficher les objets exécutant le plus de scripts..." name="top_scripts_btn" tool_tip="Liste des objets qui passent le plus de temps à exécuter des scripts" width="320"/>
-	<button label="?" name="top_scripts_help" left="337"/>
-	<button label="Redémarrer la région" name="restart_btn" tool_tip="Redémarrer la région au bout de 2 minutes" width="160"/>
-	<button label="?" name="restart_help" left="177" />
-	<button label="Retarder le redémarrage" name="cancel_restart_btn" tool_tip="Retarder le redémarrage de la région d&apos;une heure" width="160"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Débugger" name="Debug">
+	<text name="region_text_lbl">
+		Région :
+	</text>
+	<text name="region_text">
+		(inconnue)
+	</text>
+	<check_box label="Désactiver les scripts" name="disable_scripts_check" tool_tip="Désactiver tous les scripts dans cette région"/>
+	<button label="?" name="disable_scripts_help"/>
+	<check_box label="Désactiver les collisions" name="disable_collisions_check" tool_tip="Désactiver les collisions entre non-avatars dans cette région"/>
+	<button label="?" name="disable_collisions_help"/>
+	<check_box label="Désactiver les propriétés &#10;physiques" name="disable_physics_check" tool_tip="Désactiver toutes les propriétés physiques dans cette région"/>
+	<button label="?" name="disable_physics_help"/>
+	<button label="Appliquer" name="apply_btn" bottom_delta="-38"/>
+	<text name="objret_text_lbl" bottom_delta="-42">
+		Renvoi de l&apos;objet
+	</text>
+	<text name="resident_text_lbl">
+		Résident :
+	</text>
+	<line_editor name="target_avatar_name">
+		(aucun)
+	</line_editor>
+	<button label="Choisir..." name="choose_avatar_btn"/>
+	<text name="options_text_lbl">
+		Options :
+	</text>
+	<check_box label="Ne renvoyer que les objets avec des scripts" name="return_scripts" tool_tip="Ne renvoyer que les objets avec des scripts."/>
+	<check_box label="Ne renvoyer que les objets sur le terrain de quelqu&apos;un d&apos;autre" name="return_other_land" tool_tip="Ne renvoyer que les objets se trouvant sur le terrain de quelqu&apos;un d&apos;autre"/>
+	<check_box label="Renvoyer les objets dans toutes les régions de ce domaine" name="return_estate_wide" tool_tip="Renvoyer les objets dans toutes les régions qui constituent ce domaine"/>
+	<button label="Renvoyer" name="return_btn"/>
+	<button label="Afficher les objets souvent responsables de collision..." name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="320"/>
+	<button label="?" name="top_colliders_help" left="337"/>
+	<button label="Afficher les objets exécutant le plus de scripts..." name="top_scripts_btn" tool_tip="Liste des objets qui passent le plus de temps à exécuter des scripts" width="320"/>
+	<button label="?" name="top_scripts_help" left="337"/>
+	<button label="Redémarrer la région" name="restart_btn" tool_tip="Redémarrer la région au bout de 2 minutes" width="160"/>
+	<button label="?" name="restart_help" left="177" />
+	<button label="Retarder le redémarrage" name="cancel_restart_btn" tool_tip="Retarder le redémarrage de la région d&apos;une heure" width="160"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_estate.xml b/indra/newview/skins/default/xui/fr/panel_region_estate.xml
index 475339dd92..425f273790 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_estate.xml
@@ -1,78 +1,78 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Domaine" name="Estate">
-	<text name="estate_help_text" bottom="-34">
-		Les changements apportés aux paramètres
-de cet onglet auront des répercussions sur
-toutes les régions du domaine.
-	</text>
-	<text name="estate_text" bottom_delta="-34">
-		Domaine :
-	</text>
-	<text name="estate_name">
-		(inconnu)
-	</text>
-	<text name="owner_text">
-		Propriétaire :
-	</text>
-	<text name="estate_owner">
-		(inconnu)
-	</text>
-	<text name="Only Allow">
-		Limiter l&apos;accès aux résidents qui :
-	</text>
-	<check_box label="Ont enregistré leurs infos de paiement" name="limit_payment" tool_tip="Bannir les résidents non identifés."/>
-	<check_box label="Ont fait vérifier leur âge" name="limit_age_verified" tool_tip="Bannir les résidents dont l&apos;âge n&apos;a pas été vérifié. Pour plus d&apos;infos, consultez la page support.secondlife.com."/>
-	<check_box label="Autoriser les chats vocaux" name="voice_chat_check"/>
-	<button label="?" name="voice_chat_help"/>
-	<text name="abuse_email_text">
-		E-mail où signaler l&apos;infraction :
-	</text>
-	<string name="email_unsupported">
-		Non pris en charge
-	</string>
-	<button label="?" name="abuse_email_address_help"/>
-	<text name="estate_manager_label">
-		Gérants du domaine :
-	</text>
-	<button label="?" name="estate_manager_help"/>
-	<button label="Ajouter..." name="add_estate_manager_btn"/>
-	<button label="Supprimer..." name="remove_estate_manager_btn"/>
-	<check_box label="Utiliser le temps universel" name="use_global_time_check"/>
-	<button label="?" name="use_global_time_help"/>
-	<check_box label="Soleil fixe" name="fixed_sun_check"/>
-	<button label="?" name="fixed_sun_help"/>
-	<slider label="Phase" name="sun_hour_slider"/>
-	<check_box label="Autoriser l&apos;accès public" name="externally_visible_check"/>
-	<button label="?" name="externally_visible_help"/>
-	<check_box label="Vue sur le continent" name="mainland_visible_check"/>
-	<button label="?" name="mainland_visible_help"/>
-	<check_box label="Autoriser la téléportation directe" name="allow_direct_teleport"/>
-	<button label="?" name="allow_direct_teleport_help"/>
-	<text name="region_text_lbl">
-		Refuser l&apos;accès selon les infos de paiement :
-	</text>
-	<check_box label="Refuser sans infos de paiement enregistrées" name="deny_anonymous"/>
-	<check_box label="Refuser avec infos de paiement enregistrées" name="deny_identified"/>
-	<check_box label="Refuser avec infos de paiement utilisées" name="deny_transacted"/>
-	<button label="Appliquer" name="apply_btn"/>
-	<text name="allow_resident_label">
-		Résidents autorisés :
-	</text>
-	<button label="?" name="allow_resident_help"/>
-	<button label="Ajouter..." name="add_allowed_avatar_btn"/>
-	<button label="Supprimer..." name="remove_allowed_avatar_btn"/>
-	<text name="allow_group_label">
-		Groupes autorisés :
-	</text>
-	<button label="?" name="allow_group_help"/>
-	<button label="Ajouter..." name="add_allowed_group_btn"/>
-	<button label="Supprimer..." name="remove_allowed_group_btn"/>
-	<text name="ban_resident_label">
-		Résidents bannis :
-	</text>
-	<button label="?" name="ban_resident_help"/>
-	<button label="Ajouter..." name="add_banned_avatar_btn"/>
-	<button label="Supprimer..." name="remove_banned_avatar_btn"/>
-	<button label="Envoyer un message au domaine..." name="message_estate_btn"/>
-	<button label="Éjecter le résident du domaine..." name="kick_user_from_estate_btn"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Domaine" name="Estate">
+	<text name="estate_help_text" bottom="-34">
+		Les changements apportés aux paramètres
+de cet onglet auront des répercussions sur
+toutes les régions du domaine.
+	</text>
+	<text name="estate_text" bottom_delta="-34">
+		Domaine :
+	</text>
+	<text name="estate_name">
+		(inconnu)
+	</text>
+	<text name="owner_text">
+		Propriétaire :
+	</text>
+	<text name="estate_owner">
+		(inconnu)
+	</text>
+	<text name="Only Allow">
+		Limiter l&apos;accès aux résidents qui :
+	</text>
+	<check_box label="Ont enregistré leurs infos de paiement" name="limit_payment" tool_tip="Bannir les résidents non identifés."/>
+	<check_box label="Ont fait vérifier leur âge" name="limit_age_verified" tool_tip="Bannir les résidents dont l&apos;âge n&apos;a pas été vérifié. Pour plus d&apos;infos, consultez la page support.secondlife.com."/>
+	<check_box label="Autoriser les chats vocaux" name="voice_chat_check"/>
+	<button label="?" name="voice_chat_help"/>
+	<text name="abuse_email_text">
+		E-mail où signaler l&apos;infraction :
+	</text>
+	<string name="email_unsupported">
+		Non pris en charge
+	</string>
+	<button label="?" name="abuse_email_address_help"/>
+	<text name="estate_manager_label">
+		Gérants du domaine :
+	</text>
+	<button label="?" name="estate_manager_help"/>
+	<button label="Ajouter..." name="add_estate_manager_btn"/>
+	<button label="Supprimer..." name="remove_estate_manager_btn"/>
+	<check_box label="Utiliser le temps universel" name="use_global_time_check"/>
+	<button label="?" name="use_global_time_help"/>
+	<check_box label="Soleil fixe" name="fixed_sun_check"/>
+	<button label="?" name="fixed_sun_help"/>
+	<slider label="Phase" name="sun_hour_slider"/>
+	<check_box label="Autoriser l&apos;accès public" name="externally_visible_check"/>
+	<button label="?" name="externally_visible_help"/>
+	<check_box label="Vue sur le continent" name="mainland_visible_check"/>
+	<button label="?" name="mainland_visible_help"/>
+	<check_box label="Autoriser la téléportation directe" name="allow_direct_teleport"/>
+	<button label="?" name="allow_direct_teleport_help"/>
+	<text name="region_text_lbl">
+		Refuser l&apos;accès selon les infos de paiement :
+	</text>
+	<check_box label="Refuser sans infos de paiement enregistrées" name="deny_anonymous"/>
+	<check_box label="Refuser avec infos de paiement enregistrées" name="deny_identified"/>
+	<check_box label="Refuser avec infos de paiement utilisées" name="deny_transacted"/>
+	<button label="Appliquer" name="apply_btn"/>
+	<text name="allow_resident_label">
+		Résidents autorisés :
+	</text>
+	<button label="?" name="allow_resident_help"/>
+	<button label="Ajouter..." name="add_allowed_avatar_btn"/>
+	<button label="Supprimer..." name="remove_allowed_avatar_btn"/>
+	<text name="allow_group_label">
+		Groupes autorisés :
+	</text>
+	<button label="?" name="allow_group_help"/>
+	<button label="Ajouter..." name="add_allowed_group_btn"/>
+	<button label="Supprimer..." name="remove_allowed_group_btn"/>
+	<text name="ban_resident_label">
+		Résidents bannis :
+	</text>
+	<button label="?" name="ban_resident_help"/>
+	<button label="Ajouter..." name="add_banned_avatar_btn"/>
+	<button label="Supprimer..." name="remove_banned_avatar_btn"/>
+	<button label="Envoyer un message au domaine..." name="message_estate_btn"/>
+	<button label="Éjecter le résident du domaine..." name="kick_user_from_estate_btn"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_general.xml b/indra/newview/skins/default/xui/fr/panel_region_general.xml
index ef07290b3f..7f272ab431 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_general.xml
@@ -1,45 +1,45 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Région" name="General">
-	<text name="region_text_lbl">
-		Région :
-	</text>
-	<text name="region_text">
-		(inconnue)
-	</text>
-	<text name="version_channel_text_lbl">
-		Version :
-	</text>
-	<text name="version_channel_text">
-		(inconnu)
-	</text>
-	<check_box label="Bloquer le terraformage" name="block_terraform_check"/>
-	<button label="?" name="terraform_help"/>
-	<check_box label="Interdire le vol" name="block_fly_check"/>
-	<button label="?" name="fly_help"/>
-	<check_box label="Autoriser les dégâts" name="allow_damage_check"/>
-	<button label="?" name="damage_help"/>
-	<check_box label="Interdire les bousculades" name="restrict_pushobject"/>
-	<button label="?" name="restrict_pushobject_help"/>
-	<check_box label="Autoriser la revente" name="allow_land_resell_check"/>
-	<button label="?" name="land_resell_help"/>
-	<check_box label="Autoriser la fusion/division" name="allow_parcel_changes_check"/>
-	<button label="?" name="parcel_changes_help"/>
-	<check_box label="Ne pas afficher dans la recherche" name="block_parcel_search_check" tool_tip="Afficher cette région et ses parcelles dans les résultats de recherche"/>
-	<button label="?" name="parcel_search_help"/>
-	<spinner label="Nombre limite d&apos;avatars" name="agent_limit_spin" label_width="127" width="190"/>
-	<button label="?" name="agent_limit_help"/>
-	<spinner label="Bonus objet" name="object_bonus_spin" label_width="127" width="190"/>
-	<button label="?" name="object_bonus_help"/>
-	<text label="Maturité" name="access_text">
-		Maturité :
-	</text>
-
-
-
-	<button label="?" name="access_help"/>
-	<button label="Appliquer" name="apply_btn"/>
-	<button label="Téléporter un résident chez lui..." name="kick_btn"/>
-	<button label="Téléporter tous les résidents chez eux..." name="kick_all_btn"/>
-	<button label="Envoyer un message à la région..." name="im_btn"/>
-	<button label="Gérer le Téléhub..." name="manage_telehub_btn"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Région" name="General">
+	<text name="region_text_lbl">
+		Région :
+	</text>
+	<text name="region_text">
+		(inconnue)
+	</text>
+	<text name="version_channel_text_lbl">
+		Version :
+	</text>
+	<text name="version_channel_text">
+		(inconnu)
+	</text>
+	<check_box label="Bloquer le terraformage" name="block_terraform_check"/>
+	<button label="?" name="terraform_help"/>
+	<check_box label="Interdire le vol" name="block_fly_check"/>
+	<button label="?" name="fly_help"/>
+	<check_box label="Autoriser les dégâts" name="allow_damage_check"/>
+	<button label="?" name="damage_help"/>
+	<check_box label="Interdire les bousculades" name="restrict_pushobject"/>
+	<button label="?" name="restrict_pushobject_help"/>
+	<check_box label="Autoriser la revente" name="allow_land_resell_check"/>
+	<button label="?" name="land_resell_help"/>
+	<check_box label="Autoriser la fusion/division" name="allow_parcel_changes_check"/>
+	<button label="?" name="parcel_changes_help"/>
+	<check_box label="Ne pas afficher dans la recherche" name="block_parcel_search_check" tool_tip="Afficher cette région et ses parcelles dans les résultats de recherche"/>
+	<button label="?" name="parcel_search_help"/>
+	<spinner label="Nombre limite d&apos;avatars" name="agent_limit_spin" label_width="127" width="190"/>
+	<button label="?" name="agent_limit_help"/>
+	<spinner label="Bonus objet" name="object_bonus_spin" label_width="127" width="190"/>
+	<button label="?" name="object_bonus_help"/>
+	<text label="Maturité" name="access_text">
+		Maturité :
+	</text>
+
+
+
+	<button label="?" name="access_help"/>
+	<button label="Appliquer" name="apply_btn"/>
+	<button label="Téléporter un résident chez lui..." name="kick_btn"/>
+	<button label="Téléporter tous les résidents chez eux..." name="kick_all_btn"/>
+	<button label="Envoyer un message à la région..." name="im_btn"/>
+	<button label="Gérer le Téléhub..." name="manage_telehub_btn"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_terrain.xml b/indra/newview/skins/default/xui/fr/panel_region_terrain.xml
index 96c1530e64..4d7652eb6f 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_terrain.xml
@@ -1,27 +1,27 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Terrain" name="Terrain">
-	<text name="region_text_lbl">
-		Région :
-	</text>
-	<text name="region_text">
-		(inconnue)
-	</text>
-	<spinner label="Niveau de l&apos;eau" name="water_height_spin"/>
-	<button label="?" name="water_height_help"/>
-	<spinner label="Limite d&apos;élévation du &#10;terrain" name="terrain_raise_spin"/>
-	<button label="?" name="terrain_raise_help"/>
-	<spinner label="Limite d&apos;abaissement &#10;du terrain" name="terrain_lower_spin" bottom_delta="-34"/>
-	<button label="?" name="terrain_lower_help"/>
-	<check_box label="Utiliser le soleil du domaine" name="use_estate_sun_check"/>
-	<button label="?" name="use_estate_sun_help"/>
-	<check_box label="Soleil fixe" name="fixed_sun_check"/>
-	<button label="?" name="fixed_sun_help"/>
-	<slider label="Phase" name="sun_hour_slider"/>
-	<button label="Appliquer" name="apply_btn"/>
-	<button label="Télécharger le terrain au format RAW..." name="download_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/>
-	<button label="?" name="download_raw_help" left="246" />
-	<button label="Charger le terrain au format RAW..." name="upload_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/>
-	<button label="?" name="upload_raw_help" left="246" />
-	<button label="Figer le terrain" name="bake_terrain_btn" tool_tip="Définir le terrain actuel comme point central pour les limites d&apos;élévation/abaissement"/>
-	<button label="?" name="bake_terrain_help"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Terrain" name="Terrain">
+	<text name="region_text_lbl">
+		Région :
+	</text>
+	<text name="region_text">
+		(inconnue)
+	</text>
+	<spinner label="Niveau de l&apos;eau" name="water_height_spin"/>
+	<button label="?" name="water_height_help"/>
+	<spinner label="Limite d&apos;élévation du &#10;terrain" name="terrain_raise_spin"/>
+	<button label="?" name="terrain_raise_help"/>
+	<spinner label="Limite d&apos;abaissement &#10;du terrain" name="terrain_lower_spin" bottom_delta="-34"/>
+	<button label="?" name="terrain_lower_help"/>
+	<check_box label="Utiliser le soleil du domaine" name="use_estate_sun_check"/>
+	<button label="?" name="use_estate_sun_help"/>
+	<check_box label="Soleil fixe" name="fixed_sun_check"/>
+	<button label="?" name="fixed_sun_help"/>
+	<slider label="Phase" name="sun_hour_slider"/>
+	<button label="Appliquer" name="apply_btn"/>
+	<button label="Télécharger le terrain au format RAW..." name="download_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/>
+	<button label="?" name="download_raw_help" left="246" />
+	<button label="Charger le terrain au format RAW..." name="upload_raw_btn" tool_tip="Réservé aux propriétaires de domaine, pas aux gérants" width="230"/>
+	<button label="?" name="upload_raw_help" left="246" />
+	<button label="Figer le terrain" name="bake_terrain_btn" tool_tip="Définir le terrain actuel comme point central pour les limites d&apos;élévation/abaissement"/>
+	<button label="?" name="bake_terrain_help"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_texture.xml b/indra/newview/skins/default/xui/fr/panel_region_texture.xml
index 2ad403fda2..d312646788 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_texture.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_texture.xml
@@ -1,72 +1,72 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel label="Textures du sol" name="Textures">
-	<text name="region_text_lbl">
-		Région :
-	</text>
-	<text name="region_text">
-		(inconnue)
-	</text>
-	<text name="base_texture_text">
-		Textures de base (fichiers 128x128, 24 bit .tga)
-	</text>
-	<text name="height_text_lbl">
-		1 (faible)
-	</text>
-	<text name="height_text_lbl2">
-		2
-	</text>
-	<text name="height_text_lbl3">
-		3
-	</text>
-	<text name="height_text_lbl4">
-		4 (élevé)
-	</text>
-	<text name="detail_texture_text">
-		Textures du terrain (fichiers.tga 512 x 512, 24 bit requis)
-	</text>
-	<text name="height_text_lbl5">
-		Limites d&apos;élévation de texture
-	</text>
-	<text name="height_text_lbl6">
-		Sud-ouest
-	</text>
-	<text name="height_text_lbl7">
-		Nord-ouest
-	</text>
-	<text name="height_text_lbl8">
-		Sud-est
-	</text>
-	<text name="height_text_lbl9">
-		Nord-est
-	</text>
-	<text name="height_text_lbl10">
-		Ces valeurs représentent les limites de mélange pour les textures ci-dessus.
-	</text>
-	<text name="height_text_lbl11">
-		En mètres, la valeur Bas correspond à la hauteur maximum de la texture n°1
-	</text>
-	<text name="height_text_lbl12">
-		et la valeur Haut correspond à la hauteur minimum de la texture n°4.
-	</text>
-	<text name="height_text_lbl13">
-		Nord-est
-	</text>
-	<spinner label="Bas" name="height_start_spin_0" />
-	<spinner label="Bas" name="height_start_spin_1" />
-	<spinner label="Bas" name="height_start_spin_2" />
-	<spinner label="Bas" name="height_start_spin_3" />
-	<spinner label="Haut" name="height_range_spin_0" />
-	<spinner label="Haut" name="height_range_spin_1" />
-	<spinner label="Haut" name="height_range_spin_2" />
-	<spinner label="Haut" name="height_range_spin_3" />
-	<text name="height_text_lbl14">
-		Ces valeurs représentent les limites de mélange pour les textures ci-dessus.
-	</text>
-	<text name="height_text_lbl15">
-		En mètres, la valeur BASSE correspond à la hauteur MAXIMUM de la Texture #1,
-	</text>
-	<text name="height_text_lbl16">
-		et la valeur HAUTE correspond à la hauteur MINIMUM de la Texture #4.
-	</text>
-	<button label="Appliquer" name="apply_btn" />
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel label="Textures du sol" name="Textures">
+	<text name="region_text_lbl">
+		Région :
+	</text>
+	<text name="region_text">
+		(inconnue)
+	</text>
+	<text name="base_texture_text">
+		Textures de base (fichiers 128x128, 24 bit .tga)
+	</text>
+	<text name="height_text_lbl">
+		1 (faible)
+	</text>
+	<text name="height_text_lbl2">
+		2
+	</text>
+	<text name="height_text_lbl3">
+		3
+	</text>
+	<text name="height_text_lbl4">
+		4 (élevé)
+	</text>
+	<text name="detail_texture_text">
+		Textures du terrain (fichiers.tga 512 x 512, 24 bit requis)
+	</text>
+	<text name="height_text_lbl5">
+		Limites d&apos;élévation de texture
+	</text>
+	<text name="height_text_lbl6">
+		Sud-ouest
+	</text>
+	<text name="height_text_lbl7">
+		Nord-ouest
+	</text>
+	<text name="height_text_lbl8">
+		Sud-est
+	</text>
+	<text name="height_text_lbl9">
+		Nord-est
+	</text>
+	<text name="height_text_lbl10">
+		Ces valeurs représentent les limites de mélange pour les textures ci-dessus.
+	</text>
+	<text name="height_text_lbl11">
+		En mètres, la valeur Bas correspond à la hauteur maximum de la texture n°1
+	</text>
+	<text name="height_text_lbl12">
+		et la valeur Haut correspond à la hauteur minimum de la texture n°4.
+	</text>
+	<text name="height_text_lbl13">
+		Nord-est
+	</text>
+	<spinner label="Bas" name="height_start_spin_0" />
+	<spinner label="Bas" name="height_start_spin_1" />
+	<spinner label="Bas" name="height_start_spin_2" />
+	<spinner label="Bas" name="height_start_spin_3" />
+	<spinner label="Haut" name="height_range_spin_0" />
+	<spinner label="Haut" name="height_range_spin_1" />
+	<spinner label="Haut" name="height_range_spin_2" />
+	<spinner label="Haut" name="height_range_spin_3" />
+	<text name="height_text_lbl14">
+		Ces valeurs représentent les limites de mélange pour les textures ci-dessus.
+	</text>
+	<text name="height_text_lbl15">
+		En mètres, la valeur BASSE correspond à la hauteur MAXIMUM de la Texture #1,
+	</text>
+	<text name="height_text_lbl16">
+		et la valeur HAUTE correspond à la hauteur MINIMUM de la Texture #4.
+	</text>
+	<button label="Appliquer" name="apply_btn" />
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_scrolling_param.xml b/indra/newview/skins/default/xui/fr/panel_scrolling_param.xml
index 722295f6c3..a6ec93bef5 100644
--- a/indra/newview/skins/default/xui/fr/panel_scrolling_param.xml
+++ b/indra/newview/skins/default/xui/fr/panel_scrolling_param.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="LLScrollingPanelParam">
-	<text type="string" length="1" name="Loading...">
-		Chargement...
-	</text>
-	<text type="string" length="1" name="Loading...2">
-		Chargement...
-	</text>
-	<button label="" label_selected="" name="less" />
-	<button label="" label_selected="" name="more" />
-	<slider label="[DESC]" name="param slider" />
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel name="LLScrollingPanelParam">
+	<text type="string" length="1" name="Loading...">
+		Chargement...
+	</text>
+	<text type="string" length="1" name="Loading...2">
+		Chargement...
+	</text>
+	<button label="" label_selected="" name="less" />
+	<button label="" label_selected="" name="more" />
+	<slider label="[DESC]" name="param slider" />
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_status_bar.xml b/indra/newview/skins/default/xui/fr/panel_status_bar.xml
index 3ddfe31cac..2e4c694efa 100644
--- a/indra/newview/skins/default/xui/fr/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/fr/panel_status_bar.xml
@@ -1,41 +1,41 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="status">
-	<text length="1" name="ParcelNameText" tool_tip="Nom de la parcelle de terrain sur laquelle vous vous trouvez. Cliquez pour ouvrir la section À propos du terrain." type="string">
-		Saisissez le nom de la parcelle ici
-	</text>
-	<text length="1" name="BalanceText" tool_tip="Solde du compte" type="string">
-		Chargement...
-	</text>
-	<button label="" label_selected="" name="buycurrency" tool_tip="Acheter des devises"/>
-	<text length="12" name="TimeText" tool_tip="Heure actuelle (Californie)" type="string">
-		midi
-	</text>
-	<string name="StatBarDaysOfWeek">
-		Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday
-	</string>
-	<string name="StatBarMonthsOfYear">
-		January:February:March:April:May:June:July:August:September:October:November:December
-	</string>
-	<button label="" label_selected="" name="scriptout" tool_tip="Alertes et erreurs de scripts"/>
-	<button label="" label_selected="" name="health" tool_tip="Santé"/>
-	<text length="1" name="HealthText" tool_tip="Santé" type="string">
-		100 %
-	</text>
-	<button label="" label_selected="" name="fly" tool_tip="Vol interdit"/>
-	<button label="" label_selected="" name="build" tool_tip="Construction interdite"/>
-	<button label="" label_selected="" name="scripts" tool_tip="Scripts interdits"/>
-	<button name="no_fly" tool_tip="Interdiction de voler"/>
-	<button name="no_build" tool_tip="Interdiction de construire/rezzer"/>
-	<button name="no_scripts" tool_tip="Interdiction d&apos;utiliser des scripts"/>
-	<button label="" label_selected="" name="restrictpush" tool_tip="Pas de bousculades"/>
-	<button name="status_no_voice" tool_tip="Voix non disponible ici"/>
-	<button label="" label_selected="" name="buyland" tool_tip="Acheter cette parcelle"/>
-	<line_editor label="Rechercher" name="search_editor" tool_tip="Rechercher dans Second Life"/>
-	<button name="search_btn" tool_tip="Rechercher dans Second Life"/>
-	<text name="packet_loss_tooltip">
-		Perte de paquets
-	</text>
-	<text name="bandwidth_tooltip">
-		Bande passante
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="status">
+	<text length="1" name="ParcelNameText" tool_tip="Nom de la parcelle de terrain sur laquelle vous vous trouvez. Cliquez pour ouvrir la section À propos du terrain." type="string">
+		Saisissez le nom de la parcelle ici
+	</text>
+	<text length="1" name="BalanceText" tool_tip="Solde du compte" type="string">
+		Chargement...
+	</text>
+	<button label="" label_selected="" name="buycurrency" tool_tip="Acheter des devises"/>
+	<text length="12" name="TimeText" tool_tip="Heure actuelle (Californie)" type="string">
+		midi
+	</text>
+	<string name="StatBarDaysOfWeek">
+		Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday
+	</string>
+	<string name="StatBarMonthsOfYear">
+		January:February:March:April:May:June:July:August:September:October:November:December
+	</string>
+	<button label="" label_selected="" name="scriptout" tool_tip="Alertes et erreurs de scripts"/>
+	<button label="" label_selected="" name="health" tool_tip="Santé"/>
+	<text length="1" name="HealthText" tool_tip="Santé" type="string">
+		100 %
+	</text>
+	<button label="" label_selected="" name="fly" tool_tip="Vol interdit"/>
+	<button label="" label_selected="" name="build" tool_tip="Construction interdite"/>
+	<button label="" label_selected="" name="scripts" tool_tip="Scripts interdits"/>
+	<button name="no_fly" tool_tip="Interdiction de voler"/>
+	<button name="no_build" tool_tip="Interdiction de construire/rezzer"/>
+	<button name="no_scripts" tool_tip="Interdiction d&apos;utiliser des scripts"/>
+	<button label="" label_selected="" name="restrictpush" tool_tip="Pas de bousculades"/>
+	<button name="status_no_voice" tool_tip="Voix non disponible ici"/>
+	<button label="" label_selected="" name="buyland" tool_tip="Acheter cette parcelle"/>
+	<line_editor label="Rechercher" name="search_editor" tool_tip="Rechercher dans Second Life"/>
+	<button name="search_btn" tool_tip="Rechercher dans Second Life"/>
+	<text name="packet_loss_tooltip">
+		Perte de paquets
+	</text>
+	<text name="bandwidth_tooltip">
+		Bande passante
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/role_actions.xml b/indra/newview/skins/default/xui/fr/role_actions.xml
index 5ba025f351..4dd1288e18 100644
--- a/indra/newview/skins/default/xui/fr/role_actions.xml
+++ b/indra/newview/skins/default/xui/fr/role_actions.xml
@@ -1,201 +1,201 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<role_actions>
-	<action_set
-	     description="Ces pouvoirs permettent d&apos;ajouter et de supprimer des membres du groupe et permettent aux nouveaux membres de rejoindre le groupe sans recevoir d&apos;invitation."
-	     name="Membership">
-		<action description="Inviter des membres dans ce groupe"
-		     longdescription="Invitez des membres à rejoindre ce groupe en utilisant le bouton Inviter un nouveau membre à partir de l&apos;onglet Membres et rôles &gt; Membres."
-		     name="member invite" value="1" />
-		<action description="Expulser des membres du groupe"
-		     longdescription="Expulsez des membres de ce groupe en utilisant le bouton Expulser un membre à partir de l&apos;onglet Membres et rôles &gt; Membres. Un propriétaire ne peut pas être expulsé. Un membre peut être expulsé d&apos;un groupe uniquement s&apos;il a le rôle Tous (Everyone). Si vous n&apos;êtes pas propriétaire, vous devez d&apos;abord retirer les rôles d&apos;un membre avant de pouvoir l&apos;expulser."
-		     name="member eject" value="2" />
-		<action
-		     description="Gérer l&apos;inscription et les frais d&apos;inscription"
-		     longdescription="Choisissez l&apos;inscription libre pour permettre aux nouveaux membres de rejoindre le groupe sans invitation et modifiez les frais d&apos;inscription à l&apos;onglet Général."
-		     name="member options" value="3" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs permettent d&apos;ajouter, de supprimer et de modifier les rôles dans le groupe et d&apos;y assigner des membres et des pouvoirs."
-	     name="Roles">
-		<action description="Créer des rôles"
-		     longdescription="Créez de nouveaux rôles à l&apos;onglet Membres et rôles &gt; Rôles."
-		     name="role create" value="4" />
-		<action description="Supprimer des rôles"
-		     longdescription="Supprimez des rôles à l&apos;onglet Membres et rôles &gt; Rôles."
-		     name="role delete" value="5" />
-		<action description="Modifier les noms, les titres et les descriptions des rôles"
-		     longdescription="Modifiez les noms, titres et descriptions des rôles à l&apos;onglet Membres et rôles &gt; Rôles."
-		     name="role properties" value="6" />
-		<action description="Attribuer des rôles limités"
-		     longdescription="Affectez des membres à certains rôles à l&apos;onglet Membres et rôles &gt; Membres. Un membre ne peut attribuer que des rôles auxquels il est lui-même affecté."
-		     name="role assign member limited" value="7" />
-		<action description="Attribuer tous les rôles"
-		     longdescription="Affectez des membres à tous types de rôles à l&apos;onglet Membres et rôles &gt; Membres &gt; Rôles assignés. Attention : ce pouvoir peut conférer des rôles très importants, proches de ceux d&apos;un propriétaire. Assurez-vous de bien comprendre ce pouvoir avant de l&apos;attribuer."
-		     name="role assign member" value="8" />
-		<action description="Destituer des membres de leurs rôles"
-		     longdescription="Destituez des membres de leurs rôles à partir du menu Rôles attribués à l&apos;onglet Membres et rôles &gt; Membres. Les propriétaires ne peuvent pas être destitués."
-		     name="role remove member" value="9" />
-		<action description="Modifier les pouvoirs d&apos;un rôle"
-		     longdescription="Attribuez et retirez les pouvoirs d&apos;un rôle à partir du menu Pouvoirs attribués à l&apos;onglet Membres et rôles &gt; Rôles &gt; Pouvoirs attribués. Attention : ce pouvoir peut donner des rôles très importants, proches de ceux d&apos;un propriétaire. Assurez-vous de bien comprendre ce pouvoir avant de l&apos;attribuer."
-		     name="role change actions" value="10" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs permettent de modifier le profil public du groupe, sa charte et son logo."
-	     name="Group Identity">
-		<action
-		     description="Modifier le profil public du groupe"
-		     longdescription="Modifiez la charte, le logo, l&apos;affichage dans la recherche et la liste des membres visibles à l&apos;onglet Général."
-		     name="group change identity" value="11" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs permettent de transférer, modifier et vendre du terrain appartenant au groupe. Pour accéder au menu À propos du terrain, cliquez sur le nom de la parcelle en haut de l&apos;écran ou cliquez à droite sur le sol."
-	     name="Parcel Management">
-		<action description="Transférer et acheter des parcelles pour le groupe"
-		     longdescription="Transférez et achetez des parcelles pour le groupe à partir du menu À propos du terrain &gt; Général."
-		     name="land deed" value="12" />
-		<action description="Abandonner le terrain"
-		     longdescription="Abandonnez des parcelles du groupe à Linden Lab. Attention : ce pouvoir autorise l&apos;abandon d&apos;un terrain appartenant au groupe. Ce terrain sera alors définitivement perdu. Assurez-vous de bien comprendre ce pouvoir avant de l&apos;attribuer."
-		     name="land release" value="13" />
-		<action description="Vendre du terrain"
-		     longdescription="Vendez des parcelles du groupe. Attention : ce pouvoir autorise la vente d&apos;un terrain appartenant au groupe. Ce terrain sera alors définitivement perdu. Assurez-vous de bien comprendre ce pouvoir avant de l&apos;attribuer."
-		     name="land set sale info" value="14" />
-		<action description="Diviser et fusionner des parcelles"
-		     longdescription="Divisez et fusionnez des parcelles. Pour cela, cliquez à droite sur le sol, sélectionnez Modifier le terrain, et faites glisser votre souris sur l&apos;endroit que vous souhaitez modifier. Pour diviser le terrain, sélectionnez un endroit puis cliquez sur Diviser... Pour fusionner des parcelles, sélectionnez au moins deux parcelles adjacentes et cliquez sur Fusionner."
-		     name="land divide join" value="15" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs permettent de modifier le nom de la parcelle, son référencement dans la recherche et le lieu de téléportation."
-	     name="Parcel Identity">
-		<action
-		     description="Afficher dans la recherche et définir une catégorie"
-		     longdescription="Choisissez de faire apparaître la parcelle dans la recherche et définissez sa catégorie à partir du menu À propos du terrain &gt; Options."
-		     name="land find places" value="17" />
-		<action
-		     description="Modifier le nom, la description et le référencement du terrain dans la recherche"
-		     longdescription="Modifiez le nom, la description de la parcelle et son référencement dans la recherche à partir du menu À propos du terrain &gt; Options."
-		     name="land change identity" value="18" />
-		<action
-		     description="Définir le lieu d&apos;arrivée et le routage des téléportations"
-		     longdescription="Définissez le lieu d&apos;arrivée des téléportations et le routage à partir du menu À propos du terrain &gt; Options."
-		     name="land set landing point" value="19" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs permettent de définir les options de la parcelle concernant la musique, les médias, la création d&apos;objets et le relief."
-	     name="Parcel Settings">
-		<action description="Modifier la musique et les médias"
-		     longdescription="Changez la musique et les médias à partir du menu À propos du terrain &gt; Médias."
-		     name="land change media" value="20" />
-		<action description="Changer l&apos;option Modifier le terrain"
-		     longdescription="Changez l&apos;option Modifier le terrain à partir du menu À propos du terrain &gt; Options. Attention : ce pouvoir permet de terraformer votre terrain et de placer ou déplacer des plantes Linden. Assurez-vous de bien comprendre ce pouvoir avant de l&apos;attribuer. "
-		     name="land edit" value="21" />
-		<action
-		     description="Changer diverses options du terrain"
-		     longdescription="Changez diverses options de la parcelle à partir du menu À propos du terrain &gt; Options. Vous pouvez permettre aux autres résidents de voler, créer des objets, modifier le terrain, lancer des scripts, créer des repères etc."
-		     name="land options" value="22" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs permettent aux membres d&apos;outrepasser les restrictions sur les parcelles du groupe."
-	     name="Parcel Powers">
-		<action description="Toujours autoriser Modifier le terrain"
-		     longdescription="Vous pouvez modifier le relief d&apos;une parcelle du groupe, même si l&apos;option est désactivée à partir du menu À propos du terrain &gt; Options."
-		     name="land allow edit land" value="23" />
-		<action description="Toujours autoriser à voler"
-		     longdescription="Vous pouvez voler sur une parcelle du groupe, même si l&apos;option est désactivée à partir du menu À propos du terrain &gt; Options."
-		     name="land allow fly" value="24" />
-		<action description="Toujours autoriser à créer des objets"
-		     longdescription="Vous pouvez créer des objets sur une parcelle du groupe, même si l&apos;option est désactivée à partir du menu À propos du terrain &gt; Options."
-		     name="land allow create" value="25" />
-		<action description="Toujours autoriser à créer des repères"
-		     longdescription="Vous pouvez créer un repère sur une parcelle du groupe, même si l&apos;option est désactivée à partir du menu À propos du terrain &gt; Options."
-		     name="land allow landmark" value="26" />
-		<action description="Autoriser à définir un domicile sur le terrain du groupe"
-		     longdescription="Vous pouvez définir votre domicile sur une parcelle du groupe à partir du menu Monde &gt; Définir comme domicile."
-		     name="land allow set home" value="28" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs permettent d&apos;autoriser ou d&apos;interdire l&apos;accès à des parcelles du groupe et de geler ou d&apos;expulser des résidents."
-	     name="Parcel Access">
-		<action description="Gérer la liste d&apos;accès à la parcelle"
-		     longdescription="Gérez la liste des résidents autorisés sur la parcelle à partir du menu À propos du terrain &gt; Accès."
-		     name="land manage allowed" value="29" />
-		<action description="Gérer la liste noire de cette parcelle"
-		     longdescription="Gérez la liste des résidents interdits sur la parcelle à partir du menu À propos du terrain &gt; Interdire."
-		     name="land manage banned" value="30" />
-		<action description="Vendre des pass"
-		     longdescription="Choisissez le prix et la durée des pass pour accéder à la parcelle à partir du menu À propos du terrain &gt; Accès."
-		     name="land manage passes" value="31" />
-		<action description="Expulser et geler des résidents"
-		     longdescription="Vous pouvez expulser ou geler un résident indésirable en cliquant-droit sur lui, menu radial &gt; Plus."
-		     name="land admin" value="32" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs permettent de renvoyer des objets du groupe et de placer ou déplacer des plantes Linden pour aménager le paysage. Utilisez ce pouvoir avec précaution car les objets renvoyés le sont définitivement."
-	     name="Parcel Content">
-		<action description="Renvoyer les objets transférés au groupe"
-		     longdescription="Vous pouvez renvoyer des objets appartenant au groupe à partir du menu À propos du terrain &gt; Objets."
-		     name="land return group owned" value="48" />
-		<action description="Renvoyer les objets attribués au groupe"
-		     longdescription="Renvoyez les objets attribués au groupe et sur des parcelles du groupe à partir du menu À propos du terrain &gt; Objets."
-		     name="land return group set" value="33" />
-		<action description="Renvoyer des objets n&apos;appartenant pas au groupe"
-		     longdescription="Renvoyez les objets n&apos;appartenant pas au groupe et sur des parcelles du groupe à partir du menu À propos du terrain &gt; Objets."
-		     name="land return non group" value="34" />
-		<action description="Aménager le paysage avec des plantes Linden"
-		     longdescription="Placez et déplacez des arbres, plantes et herbes Linden. Vous les trouverez dans le dossier Objets de la  bibliothèque de votre inventaire mais aussi à partir du menu Construire."
-		     name="land gardening" value="35" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs permettent de transférer, modifier et vendre des objets du groupe. Ces changements se font à partir du menu Construire &gt; Modifier &gt; Général."
-	     name="Object Management">
-		<action description="Transférer des objets au groupe"
-		     longdescription="Transférez des objets au groupe à partir du menu Construire &gt; Modifier &gt; Général."
-		     name="object deed" value="36" />
-		<action
-		     description="Manipuler les objets du groupe"
-		     longdescription="Déplacez, copiez et modifiez les objets du groupe à partir du menu Construire &gt; Modifier &gt; Général."
-		     name="object manipulate" value="38" />
-		<action description="Vendre des objets du groupe"
-		     longdescription="Mettez en vente des objets du groupe à partir du menu Construire &gt; Modifier &gt; Général."
-		     name="object set sale" value="39" />
-	</action_set>
-	<action_set
-	     description="Ce pouvoir définit les contributions aux frais du groupe, la réception des dividendes et l&apos;accès aux finances du groupe."
-	     name="Accounting">
-		<action description="Contribuer aux frais du groupe et recevoir des dividendes"
-		     longdescription="Contribuez aux frais du groupe et recevez des dividendes en cas de bénéfices. Vous recevrez une partie des ventes de terrains et objets appartenant au groupe et contribuerez aux frais divers (mise en vente des terrains etc.)"
-		     name="accounting accountable" value="40" />
-	</action_set>
-	<action_set
-	     description="Envoyez, recevez et consultez les notices du groupe."
-	     name="Notices">
-		<action description="Envoyer des notices"
-		     longdescription="Envoyez des notices à l&apos;onglet Notices."
-		     name="notices send" value="42" />
-		<action description="Recevoir et consulter les notices"
-		     longdescription="Recevez des notices et consulter d&apos;anciennes notices à l&apos;onglet Notices."
-		     name="notices receive" value="43" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs permettent de créer de nouvelles propositions, de voter et de consulter l&apos;historique des votes."
-	     name="Proposals">
-		<action description="Créer des propositions"
-		     longdescription="Ces pouvoirs permettent de créer des propositions et de les soumettre au vote, à partir du menu Profil du groupe &gt; Propositions."
-		     name="proposal start" value="44" />
-		<action description="Voter les propositions"
-		     longdescription="Votez les propositions à partir du menu Profil du groupe &gt; Propositions."
-		     name="proposal vote" value="45" />
-	</action_set>
-	<action_set
-	     description="Ces pouvoirs vous permettent de gérer l&apos;accès aux sessions de chat écrit ou vocal du groupe."
-	     name="Chat">
-		<action description="Participer aux chats"
-		     longdescription="Participez aux chats du groupe."
-		     name="join group chat" />
-		<action description="Participer au chat vocal"
-		     longdescription="Participez au chat vocal du groupe. Remarque : vous devez au préalable avoir le pouvoir de participer aux chats."
-		     name="join voice chat" />
-		<action description="Modérer les chats"
-		     longdescription="Contrôlez l&apos;accès et la participation aux chats de groupe écrits et vocaux."
-		     name="moderate group chat" />
-	</action_set>
-</role_actions>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<role_actions>
+	<action_set
+	     description="Ces pouvoirs permettent d&apos;ajouter et de supprimer des membres du groupe et permettent aux nouveaux membres de rejoindre le groupe sans recevoir d&apos;invitation."
+	     name="Membership">
+		<action description="Inviter des membres dans ce groupe"
+		     longdescription="Invitez des membres à rejoindre ce groupe en utilisant le bouton Inviter un nouveau membre à partir de l&apos;onglet Membres et rôles &gt; Membres."
+		     name="member invite" value="1" />
+		<action description="Expulser des membres du groupe"
+		     longdescription="Expulsez des membres de ce groupe en utilisant le bouton Expulser un membre à partir de l&apos;onglet Membres et rôles &gt; Membres. Un propriétaire ne peut pas être expulsé. Un membre peut être expulsé d&apos;un groupe uniquement s&apos;il a le rôle Tous (Everyone). Si vous n&apos;êtes pas propriétaire, vous devez d&apos;abord retirer les rôles d&apos;un membre avant de pouvoir l&apos;expulser."
+		     name="member eject" value="2" />
+		<action
+		     description="Gérer l&apos;inscription et les frais d&apos;inscription"
+		     longdescription="Choisissez l&apos;inscription libre pour permettre aux nouveaux membres de rejoindre le groupe sans invitation et modifiez les frais d&apos;inscription à l&apos;onglet Général."
+		     name="member options" value="3" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs permettent d&apos;ajouter, de supprimer et de modifier les rôles dans le groupe et d&apos;y assigner des membres et des pouvoirs."
+	     name="Roles">
+		<action description="Créer des rôles"
+		     longdescription="Créez de nouveaux rôles à l&apos;onglet Membres et rôles &gt; Rôles."
+		     name="role create" value="4" />
+		<action description="Supprimer des rôles"
+		     longdescription="Supprimez des rôles à l&apos;onglet Membres et rôles &gt; Rôles."
+		     name="role delete" value="5" />
+		<action description="Modifier les noms, les titres et les descriptions des rôles"
+		     longdescription="Modifiez les noms, titres et descriptions des rôles à l&apos;onglet Membres et rôles &gt; Rôles."
+		     name="role properties" value="6" />
+		<action description="Attribuer des rôles limités"
+		     longdescription="Affectez des membres à certains rôles à l&apos;onglet Membres et rôles &gt; Membres. Un membre ne peut attribuer que des rôles auxquels il est lui-même affecté."
+		     name="role assign member limited" value="7" />
+		<action description="Attribuer tous les rôles"
+		     longdescription="Affectez des membres à tous types de rôles à l&apos;onglet Membres et rôles &gt; Membres &gt; Rôles assignés. Attention : ce pouvoir peut conférer des rôles très importants, proches de ceux d&apos;un propriétaire. Assurez-vous de bien comprendre ce pouvoir avant de l&apos;attribuer."
+		     name="role assign member" value="8" />
+		<action description="Destituer des membres de leurs rôles"
+		     longdescription="Destituez des membres de leurs rôles à partir du menu Rôles attribués à l&apos;onglet Membres et rôles &gt; Membres. Les propriétaires ne peuvent pas être destitués."
+		     name="role remove member" value="9" />
+		<action description="Modifier les pouvoirs d&apos;un rôle"
+		     longdescription="Attribuez et retirez les pouvoirs d&apos;un rôle à partir du menu Pouvoirs attribués à l&apos;onglet Membres et rôles &gt; Rôles &gt; Pouvoirs attribués. Attention : ce pouvoir peut donner des rôles très importants, proches de ceux d&apos;un propriétaire. Assurez-vous de bien comprendre ce pouvoir avant de l&apos;attribuer."
+		     name="role change actions" value="10" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs permettent de modifier le profil public du groupe, sa charte et son logo."
+	     name="Group Identity">
+		<action
+		     description="Modifier le profil public du groupe"
+		     longdescription="Modifiez la charte, le logo, l&apos;affichage dans la recherche et la liste des membres visibles à l&apos;onglet Général."
+		     name="group change identity" value="11" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs permettent de transférer, modifier et vendre du terrain appartenant au groupe. Pour accéder au menu À propos du terrain, cliquez sur le nom de la parcelle en haut de l&apos;écran ou cliquez à droite sur le sol."
+	     name="Parcel Management">
+		<action description="Transférer et acheter des parcelles pour le groupe"
+		     longdescription="Transférez et achetez des parcelles pour le groupe à partir du menu À propos du terrain &gt; Général."
+		     name="land deed" value="12" />
+		<action description="Abandonner le terrain"
+		     longdescription="Abandonnez des parcelles du groupe à Linden Lab. Attention : ce pouvoir autorise l&apos;abandon d&apos;un terrain appartenant au groupe. Ce terrain sera alors définitivement perdu. Assurez-vous de bien comprendre ce pouvoir avant de l&apos;attribuer."
+		     name="land release" value="13" />
+		<action description="Vendre du terrain"
+		     longdescription="Vendez des parcelles du groupe. Attention : ce pouvoir autorise la vente d&apos;un terrain appartenant au groupe. Ce terrain sera alors définitivement perdu. Assurez-vous de bien comprendre ce pouvoir avant de l&apos;attribuer."
+		     name="land set sale info" value="14" />
+		<action description="Diviser et fusionner des parcelles"
+		     longdescription="Divisez et fusionnez des parcelles. Pour cela, cliquez à droite sur le sol, sélectionnez Modifier le terrain, et faites glisser votre souris sur l&apos;endroit que vous souhaitez modifier. Pour diviser le terrain, sélectionnez un endroit puis cliquez sur Diviser... Pour fusionner des parcelles, sélectionnez au moins deux parcelles adjacentes et cliquez sur Fusionner."
+		     name="land divide join" value="15" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs permettent de modifier le nom de la parcelle, son référencement dans la recherche et le lieu de téléportation."
+	     name="Parcel Identity">
+		<action
+		     description="Afficher dans la recherche et définir une catégorie"
+		     longdescription="Choisissez de faire apparaître la parcelle dans la recherche et définissez sa catégorie à partir du menu À propos du terrain &gt; Options."
+		     name="land find places" value="17" />
+		<action
+		     description="Modifier le nom, la description et le référencement du terrain dans la recherche"
+		     longdescription="Modifiez le nom, la description de la parcelle et son référencement dans la recherche à partir du menu À propos du terrain &gt; Options."
+		     name="land change identity" value="18" />
+		<action
+		     description="Définir le lieu d&apos;arrivée et le routage des téléportations"
+		     longdescription="Définissez le lieu d&apos;arrivée des téléportations et le routage à partir du menu À propos du terrain &gt; Options."
+		     name="land set landing point" value="19" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs permettent de définir les options de la parcelle concernant la musique, les médias, la création d&apos;objets et le relief."
+	     name="Parcel Settings">
+		<action description="Modifier la musique et les médias"
+		     longdescription="Changez la musique et les médias à partir du menu À propos du terrain &gt; Médias."
+		     name="land change media" value="20" />
+		<action description="Changer l&apos;option Modifier le terrain"
+		     longdescription="Changez l&apos;option Modifier le terrain à partir du menu À propos du terrain &gt; Options. Attention : ce pouvoir permet de terraformer votre terrain et de placer ou déplacer des plantes Linden. Assurez-vous de bien comprendre ce pouvoir avant de l&apos;attribuer. "
+		     name="land edit" value="21" />
+		<action
+		     description="Changer diverses options du terrain"
+		     longdescription="Changez diverses options de la parcelle à partir du menu À propos du terrain &gt; Options. Vous pouvez permettre aux autres résidents de voler, créer des objets, modifier le terrain, lancer des scripts, créer des repères etc."
+		     name="land options" value="22" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs permettent aux membres d&apos;outrepasser les restrictions sur les parcelles du groupe."
+	     name="Parcel Powers">
+		<action description="Toujours autoriser Modifier le terrain"
+		     longdescription="Vous pouvez modifier le relief d&apos;une parcelle du groupe, même si l&apos;option est désactivée à partir du menu À propos du terrain &gt; Options."
+		     name="land allow edit land" value="23" />
+		<action description="Toujours autoriser à voler"
+		     longdescription="Vous pouvez voler sur une parcelle du groupe, même si l&apos;option est désactivée à partir du menu À propos du terrain &gt; Options."
+		     name="land allow fly" value="24" />
+		<action description="Toujours autoriser à créer des objets"
+		     longdescription="Vous pouvez créer des objets sur une parcelle du groupe, même si l&apos;option est désactivée à partir du menu À propos du terrain &gt; Options."
+		     name="land allow create" value="25" />
+		<action description="Toujours autoriser à créer des repères"
+		     longdescription="Vous pouvez créer un repère sur une parcelle du groupe, même si l&apos;option est désactivée à partir du menu À propos du terrain &gt; Options."
+		     name="land allow landmark" value="26" />
+		<action description="Autoriser à définir un domicile sur le terrain du groupe"
+		     longdescription="Vous pouvez définir votre domicile sur une parcelle du groupe à partir du menu Monde &gt; Définir comme domicile."
+		     name="land allow set home" value="28" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs permettent d&apos;autoriser ou d&apos;interdire l&apos;accès à des parcelles du groupe et de geler ou d&apos;expulser des résidents."
+	     name="Parcel Access">
+		<action description="Gérer la liste d&apos;accès à la parcelle"
+		     longdescription="Gérez la liste des résidents autorisés sur la parcelle à partir du menu À propos du terrain &gt; Accès."
+		     name="land manage allowed" value="29" />
+		<action description="Gérer la liste noire de cette parcelle"
+		     longdescription="Gérez la liste des résidents interdits sur la parcelle à partir du menu À propos du terrain &gt; Interdire."
+		     name="land manage banned" value="30" />
+		<action description="Vendre des pass"
+		     longdescription="Choisissez le prix et la durée des pass pour accéder à la parcelle à partir du menu À propos du terrain &gt; Accès."
+		     name="land manage passes" value="31" />
+		<action description="Expulser et geler des résidents"
+		     longdescription="Vous pouvez expulser ou geler un résident indésirable en cliquant-droit sur lui, menu radial &gt; Plus."
+		     name="land admin" value="32" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs permettent de renvoyer des objets du groupe et de placer ou déplacer des plantes Linden pour aménager le paysage. Utilisez ce pouvoir avec précaution car les objets renvoyés le sont définitivement."
+	     name="Parcel Content">
+		<action description="Renvoyer les objets transférés au groupe"
+		     longdescription="Vous pouvez renvoyer des objets appartenant au groupe à partir du menu À propos du terrain &gt; Objets."
+		     name="land return group owned" value="48" />
+		<action description="Renvoyer les objets attribués au groupe"
+		     longdescription="Renvoyez les objets attribués au groupe et sur des parcelles du groupe à partir du menu À propos du terrain &gt; Objets."
+		     name="land return group set" value="33" />
+		<action description="Renvoyer des objets n&apos;appartenant pas au groupe"
+		     longdescription="Renvoyez les objets n&apos;appartenant pas au groupe et sur des parcelles du groupe à partir du menu À propos du terrain &gt; Objets."
+		     name="land return non group" value="34" />
+		<action description="Aménager le paysage avec des plantes Linden"
+		     longdescription="Placez et déplacez des arbres, plantes et herbes Linden. Vous les trouverez dans le dossier Objets de la  bibliothèque de votre inventaire mais aussi à partir du menu Construire."
+		     name="land gardening" value="35" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs permettent de transférer, modifier et vendre des objets du groupe. Ces changements se font à partir du menu Construire &gt; Modifier &gt; Général."
+	     name="Object Management">
+		<action description="Transférer des objets au groupe"
+		     longdescription="Transférez des objets au groupe à partir du menu Construire &gt; Modifier &gt; Général."
+		     name="object deed" value="36" />
+		<action
+		     description="Manipuler les objets du groupe"
+		     longdescription="Déplacez, copiez et modifiez les objets du groupe à partir du menu Construire &gt; Modifier &gt; Général."
+		     name="object manipulate" value="38" />
+		<action description="Vendre des objets du groupe"
+		     longdescription="Mettez en vente des objets du groupe à partir du menu Construire &gt; Modifier &gt; Général."
+		     name="object set sale" value="39" />
+	</action_set>
+	<action_set
+	     description="Ce pouvoir définit les contributions aux frais du groupe, la réception des dividendes et l&apos;accès aux finances du groupe."
+	     name="Accounting">
+		<action description="Contribuer aux frais du groupe et recevoir des dividendes"
+		     longdescription="Contribuez aux frais du groupe et recevez des dividendes en cas de bénéfices. Vous recevrez une partie des ventes de terrains et objets appartenant au groupe et contribuerez aux frais divers (mise en vente des terrains etc.)"
+		     name="accounting accountable" value="40" />
+	</action_set>
+	<action_set
+	     description="Envoyez, recevez et consultez les notices du groupe."
+	     name="Notices">
+		<action description="Envoyer des notices"
+		     longdescription="Envoyez des notices à l&apos;onglet Notices."
+		     name="notices send" value="42" />
+		<action description="Recevoir et consulter les notices"
+		     longdescription="Recevez des notices et consulter d&apos;anciennes notices à l&apos;onglet Notices."
+		     name="notices receive" value="43" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs permettent de créer de nouvelles propositions, de voter et de consulter l&apos;historique des votes."
+	     name="Proposals">
+		<action description="Créer des propositions"
+		     longdescription="Ces pouvoirs permettent de créer des propositions et de les soumettre au vote, à partir du menu Profil du groupe &gt; Propositions."
+		     name="proposal start" value="44" />
+		<action description="Voter les propositions"
+		     longdescription="Votez les propositions à partir du menu Profil du groupe &gt; Propositions."
+		     name="proposal vote" value="45" />
+	</action_set>
+	<action_set
+	     description="Ces pouvoirs vous permettent de gérer l&apos;accès aux sessions de chat écrit ou vocal du groupe."
+	     name="Chat">
+		<action description="Participer aux chats"
+		     longdescription="Participez aux chats du groupe."
+		     name="join group chat" />
+		<action description="Participer au chat vocal"
+		     longdescription="Participez au chat vocal du groupe. Remarque : vous devez au préalable avoir le pouvoir de participer aux chats."
+		     name="join voice chat" />
+		<action description="Modérer les chats"
+		     longdescription="Contrôlez l&apos;accès et la participation aux chats de groupe écrits et vocaux."
+		     name="moderate group chat" />
+	</action_set>
+</role_actions>
diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml
index 142c87047b..b0efe4f510 100644
--- a/indra/newview/skins/default/xui/fr/strings.xml
+++ b/indra/newview/skins/default/xui/fr/strings.xml
@@ -1,466 +1,466 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<!-- This file contains strings that used to be hardcoded in the source.
-     It is only for those strings which don&apos;t belong in a floater.
-     For example, the strings used in avatar chat bubbles, and strings 
-     that are returned from one component and may appear in many places-->
-<strings>
-	<string name="LoginInProgress">
-		La connexion à [APP_NAME] apparaît peut-être comme étant gelée. Veuillez patienter.
-	</string>
-	<string name="LoginAuthenticating">
-		Authentification en cours
-	</string>
-	<string name="LoginMaintenance">
-		Maintenance du compte en cours…
-	</string>
-	<string name="LoginAttempt">
-		La tentative de connexion précédente a échoué. Connexion, esssai [NUMBER]
-	</string>
-	<string name="LoginPrecaching">
-		Monde en cours de chargement…
-	</string>
-	<string name="LoginInitializingBrowser">
-		Navigateur Web incorporé en cours d&apos;initialisation…
-	</string>
-	<string name="LoginInitializingMultimedia">
-		Multimédia en cours d&apos;initialisation…
-	</string>
-	<string name="LoginVerifyingCache">
-		Fichiers du cache en cours de vérification (peut prendre 60-90 s)...
-	</string>
-	<string name="LoginProcessingResponse">
-		Réponse en cours de traitement…
-	</string>
-	<string name="LoginInitializingWorld">
-		Monde en cours d&apos;initialisation…
-	</string>
-	<string name="LoginDecodingImages">
-		Décodage des images en cours...
-	</string>
-	<string name="LoginInitializingQuicktime">
-		Quicktime en cours d&apos;initialisation
-	</string>
-	<string name="LoginQuicktimeNotFound">
-		Quicktime introuvable, impossible de procéder à l&apos;initialisation.
-	</string>
-	<string name="LoginQuicktimeOK">
-		Initialisation de Quicktime réussie.
-	</string>
-	<string name="LoginWaitingForRegionHandshake">
-		Liaison avec la région en cours de création...
-	</string>
-	<string name="LoginConnectingToRegion">
-		Connexion avec la région en cours...
-	</string>
-	<string name="LoginDownloadingClothing">
-		Habits en cours de téléchargement...
-	</string>
-	<string name="AgentLostConnection">
-		Il y a peut-être des problèmes techniques dans cette region. Veuillez vérifier votre connexion Internet.
-	</string>
-	<string name="TooltipPerson">
-		Personne
-	</string>
-	<string name="TooltipNoName">
-		(pas de nom)
-	</string>
-	<string name="TooltipOwner">
-		Propriétaire :
-	</string>
-	<string name="TooltipPublic">
-		Public
-	</string>
-	<string name="TooltipIsGroup">
-		(Groupe)
-	</string>
-	<string name="TooltipFlagScript">
-		Script
-	</string>
-	<string name="TooltipFlagPhysics">
-		Propriétés physique
-	</string>
-	<string name="TooltipFlagTouch">
-		Toucher
-	</string>
-	<string name="TooltipFlagL$">
-		L$
-	</string>
-	<string name="TooltipFlagDropInventory">
-		Laisser tomber l&apos;inventaire
-	</string>
-	<string name="TooltipFlagPhantom">
-		Fantôme
-	</string>
-	<string name="TooltipFlagTemporary">
-		Temporaire
-	</string>
-	<string name="TooltipFlagRightClickMenu">
-		(cliquez à droite pour le menu)
-	</string>
-	<string name="TooltipFreeToCopy">
-		Copie autorisée
-	</string>
-	<string name="TooltipForSaleL$">
-		À vendre : [AMOUNT] L$
-	</string>
-	<string name="TooltipForSaleMsg">
-		À vendre : [MESSAGE]
-	</string>
-	<string name="TooltipFlagGroupBuild">
-		Contruction de groupe
-	</string>
-	<string name="TooltipFlagNoBuild">
-		Pas de construction
-	</string>
-	<string name="TooltipFlagNoEdit">
-		Contruction de groupe
-	</string>
-	<string name="TooltipFlagNotSafe">
-		Non sécurisé
-	</string>
-	<string name="TooltipFlagNoFly">
-		Interdiction de voler
-	</string>
-	<string name="TooltipFlagGroupScripts">
-		Scripts de groupe
-	</string>
-	<string name="TooltipFlagNoScripts">
-		Pas de scripts
-	</string>
-	<string name="TooltipLand">
-		Terrain :
-	</string>
-	<string name="TooltipMustSingleDrop">
-		Impossible de faire glisser plus d&apos;un objet ici
-	</string>
-	<string name="RetrievingData">
-		En cours d&apos;extraction...
-	</string>
-	<string name="ReleaseNotes">
-		Notes de version
-	</string>
-	<string name="LoadingData">
-		Chargement..
-	</string>
-	<string name="AvatarNameNobody">
-		(personne)
-	</string>
-	<string name="AvatarNameWaiting">
-		(en attente)
-	</string>
-	<string name="AvatarNameHippos">
-		(hippos)
-	</string>
-	<string name="GroupNameNone">
-		(aucun)
-	</string>
-	<string name="AssetErrorNone">
-		Aucune erreur
-	</string>
-	<string name="AssetErrorRequestFailed">
-		Requête de l&apos;actif : échec
-	</string>
-	<string name="AssetErrorNonexistentFile">
-		Requête de l&apos;actif : fichier inexistant
-	</string>
-	<string name="AssetErrorNotInDatabase">
-		Requête de l&apos;actif : actif introuvable dans la base de données
-	</string>
-	<string name="AssetErrorEOF">
-		Fin du ficher
-	</string>
-	<string name="AssetErrorCannotOpenFile">
-		Impossible d&apos;ouvrir le fichier
-	</string>
-	<string name="AssetErrorFileNotFound">
-		Fichier introuvable
-	</string>
-	<string name="AssetErrorTCPTimeout">
-		Délai d&apos;attente du transfert du fichier dépassé
-	</string>
-	<string name="AssetErrorCircuitGone">
-		Disparition du circuit
-	</string>
-	<string name="AssetErrorPriceMismatch">
-		Il y a une différence de prix entre le client et le serveur
-	</string>
-	<string name="AssetErrorUnknownStatus">
-		Statut inconnu
-	</string>
-	<string name="AvatarEditingApparance">
-		(Apparence en cours de modification)
-	</string>
-	<string name="AvatarAway">
-		Absent
-	</string>
-	<string name="AvatarBusy">
-		Occupé
-	</string>
-	<string name="AvatarMuted">
-		Ignoré
-	</string>
-	<string name="anim_express_afraid">
-		Effrayé
-	</string>
-	<string name="anim_express_anger">
-		En colère
-	</string>
-	<string name="anim_away">
-		Absent
-	</string>
-	<string name="anim_backflip">
-		Salto arrière
-	</string>
-	<string name="anim_express_laugh">
-		Rire en se tenant le ventre
-	</string>
-	<string name="anim_express_toothsmile">
-		Grand sourire
-	</string>
-	<string name="anim_blowkiss">
-		Envoyer un baiser
-	</string>
-	<string name="anim_express_bored">
-		Bailler d&apos;ennui
-	</string>
-	<string name="anim_bow">
-		S&apos;incliner
-	</string>
-	<string name="anim_clap">
-		Applaudir
-	</string>
-	<string name="anim_courtbow">
-		Révérence de cour
-	</string>
-	<string name="anim_express_cry">
-		Pleurer
-	</string>
-	<string name="anim_dance1">
-		Danse 1
-	</string>
-	<string name="anim_dance2">
-		Danse 2
-	</string>
-	<string name="anim_dance3">
-		Danse 3
-	</string>
-	<string name="anim_dance4">
-		Danse 4
-	</string>
-	<string name="anim_dance5">
-		Danse 5
-	</string>
-	<string name="anim_dance6">
-		Danse 6
-	</string>
-	<string name="anim_dance7">
-		Danse 7
-	</string>
-	<string name="anim_dance8">
-		Danse 8
-	</string>
-	<string name="anim_express_disdain">
-		Mépris
-	</string>
-	<string name="anim_drink">
-		Boire
-	</string>
-	<string name="anim_express_embarrased">
-		Gêne
-	</string>
-	<string name="anim_angry_fingerwag">
-		Désapprobation
-	</string>
-	<string name="anim_fist_pump">
-		Victoire
-	</string>
-	<string name="anim_yoga_float">
-		Yoga
-	</string>
-	<string name="anim_express_frown">
-		Froncer les sourcils
-	</string>
-	<string name="anim_impatient">
-		Impatient
-	</string>
-	<string name="anim_jumpforjoy">
-		Sauter de joie
-	</string>
-	<string name="anim_kissmybutt">
-		Va te faire voir !
-	</string>
-	<string name="anim_express_kiss">
-		Baiser
-	</string>
-	<string name="anim_laugh_short">
-		Rire
-	</string>
-	<string name="anim_musclebeach">
-		Montrer ses muscles
-	</string>
-	<string name="anim_no_unhappy">
-		Non (mécontent)
-	</string>
-	<string name="anim_no_head">
-		Non
-	</string>
-	<string name="anim_nyanya">
-		Na na na na nère
-	</string>
-	<string name="anim_punch_onetwo">
-		Gauche-droite
-	</string>
-	<string name="anim_express_open_mouth">
-		Bouche ouverte
-	</string>
-	<string name="anim_peace">
-		Paix
-	</string>
-	<string name="anim_point_you">
-		Montrer quelqu&apos;un du doigt
-	</string>
-	<string name="anim_point_me">
-		Se montrer du doigt
-	</string>
-	<string name="anim_punch_l">
-		Gauche
-	</string>
-	<string name="anim_punch_r">
-		Droite
-	</string>
-	<string name="anim_rps_countdown">
-		Compter (pierre-papier-ciseaux)
-	</string>
-	<string name="anim_rps_paper">
-		Papier (pierre-papier-ciseaux)
-	</string>
-	<string name="anim_rps_rock">
-		Pierre (pierre-papier-ciseaux)
-	</string>
-	<string name="anim_rps_scissors">
-		Ciseaux (pierre-papier-ciseaux)
-	</string>
-	<string name="anim_express_repulsed">
-		Dégoût
-	</string>
-	<string name="anim_kick_roundhouse_r">
-		Coup de pied circulaire
-	</string>
-	<string name="anim_express_sad">
-		Triste
-	</string>
-	<string name="anim_salute">
-		Salut
-	</string>
-	<string name="anim_shout">
-		Crier
-	</string>
-	<string name="anim_express_shrug">
-		Hausser les épaules
-	</string>
-	<string name="anim_express_smile">
-		Sourire
-	</string>
-	<string name="anim_smoke_idle">
-		Fumer, immobile
-	</string>
-	<string name="anim_smoke_inhale">
-		Fumer, prendre une bouffée
-	</string>
-	<string name="anim_smoke_throw_down">
-		Fumer, jeter son mégot
-	</string>
-	<string name="anim_express_surprise">
-		Surprise
-	</string>
-	<string name="anim_sword_strike_r">
-		Coup d&apos;épée
-	</string>
-	<string name="anim_angry_tantrum">
-		Caprice
-	</string>
-	<string name="anim_express_tongue_out">
-		Tirer la langue
-	</string>
-	<string name="anim_hello">
-		Faire signe
-	</string>
-	<string name="anim_whisper">
-		Chuchoter
-	</string>
-	<string name="anim_whistle">
-		Siffler
-	</string>
-	<string name="anim_express_wink">
-		Clin d&apos;œil
-	</string>
-	<string name="anim_wink_hollywood">
-		Clin d&apos;œil (Hollywood)
-	</string>
-	<string name="anim_express_worry">
-		Soucis
-	</string>
-	<string name="anim_yes_happy">
-		Oui (Joie)
-	</string>
-	<string name="anim_yes_head">
-		Oui
-	</string>
-	<string name="texture_loading">
-		Chargement...
-	</string>
-	<string name="worldmap_offline">
-		Hors ligne
-	</string>
-	<string name="whisper">
-		chuchote :
-	</string>
-	<string name="shout">
-		crie :
-	</string>
-	<string name="all_files">
-		Tous fichiers
-	</string>
-	<string name="sound_files">
-		Sons
-	</string>
-	<string name="animation_files">
-		Animations
-	</string>
-	<string name="image_files">
-		Images
-	</string>
-	<string name="save_file_verb">
-		Enregistrer
-	</string>
-	<string name="load_file_verb">
-		Charger
-	</string>
-	<string name="targa_image_files">
-		Images Targa
-	</string>
-	<string name="bitmap_image_files">
-		Images Bitmap
-	</string>
-	<string name="avi_movie_file">
-		Fichier de film AVI
-	</string>
-	<string name="xaf_animation_file">
-		Fichier d&apos;animation XAF
-	</string>
-	<string name="xml_file">
-		Fichier XML
-	</string>
-	<string name="dot_raw_file">
-		Fichier RAW
-	</string>
-	<string name="compressed_image_files">
-		Images compressées
-	</string>
-	<string name="load_files">
-		Charger des fichiers
-	</string>
-	<string name="choose_the_directory">
-		Choisir le répertoire
-	</string>
-</strings>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!-- This file contains strings that used to be hardcoded in the source.
+     It is only for those strings which don&apos;t belong in a floater.
+     For example, the strings used in avatar chat bubbles, and strings 
+     that are returned from one component and may appear in many places-->
+<strings>
+	<string name="LoginInProgress">
+		La connexion à [APP_NAME] apparaît peut-être comme étant gelée. Veuillez patienter.
+	</string>
+	<string name="LoginAuthenticating">
+		Authentification en cours
+	</string>
+	<string name="LoginMaintenance">
+		Maintenance du compte en cours…
+	</string>
+	<string name="LoginAttempt">
+		La tentative de connexion précédente a échoué. Connexion, esssai [NUMBER]
+	</string>
+	<string name="LoginPrecaching">
+		Monde en cours de chargement…
+	</string>
+	<string name="LoginInitializingBrowser">
+		Navigateur Web incorporé en cours d&apos;initialisation…
+	</string>
+	<string name="LoginInitializingMultimedia">
+		Multimédia en cours d&apos;initialisation…
+	</string>
+	<string name="LoginVerifyingCache">
+		Fichiers du cache en cours de vérification (peut prendre 60-90 s)...
+	</string>
+	<string name="LoginProcessingResponse">
+		Réponse en cours de traitement…
+	</string>
+	<string name="LoginInitializingWorld">
+		Monde en cours d&apos;initialisation…
+	</string>
+	<string name="LoginDecodingImages">
+		Décodage des images en cours...
+	</string>
+	<string name="LoginInitializingQuicktime">
+		Quicktime en cours d&apos;initialisation
+	</string>
+	<string name="LoginQuicktimeNotFound">
+		Quicktime introuvable, impossible de procéder à l&apos;initialisation.
+	</string>
+	<string name="LoginQuicktimeOK">
+		Initialisation de Quicktime réussie.
+	</string>
+	<string name="LoginWaitingForRegionHandshake">
+		Liaison avec la région en cours de création...
+	</string>
+	<string name="LoginConnectingToRegion">
+		Connexion avec la région en cours...
+	</string>
+	<string name="LoginDownloadingClothing">
+		Habits en cours de téléchargement...
+	</string>
+	<string name="AgentLostConnection">
+		Il y a peut-être des problèmes techniques dans cette region. Veuillez vérifier votre connexion Internet.
+	</string>
+	<string name="TooltipPerson">
+		Personne
+	</string>
+	<string name="TooltipNoName">
+		(pas de nom)
+	</string>
+	<string name="TooltipOwner">
+		Propriétaire :
+	</string>
+	<string name="TooltipPublic">
+		Public
+	</string>
+	<string name="TooltipIsGroup">
+		(Groupe)
+	</string>
+	<string name="TooltipFlagScript">
+		Script
+	</string>
+	<string name="TooltipFlagPhysics">
+		Propriétés physique
+	</string>
+	<string name="TooltipFlagTouch">
+		Toucher
+	</string>
+	<string name="TooltipFlagL$">
+		L$
+	</string>
+	<string name="TooltipFlagDropInventory">
+		Laisser tomber l&apos;inventaire
+	</string>
+	<string name="TooltipFlagPhantom">
+		Fantôme
+	</string>
+	<string name="TooltipFlagTemporary">
+		Temporaire
+	</string>
+	<string name="TooltipFlagRightClickMenu">
+		(cliquez à droite pour le menu)
+	</string>
+	<string name="TooltipFreeToCopy">
+		Copie autorisée
+	</string>
+	<string name="TooltipForSaleL$">
+		À vendre : [AMOUNT] L$
+	</string>
+	<string name="TooltipForSaleMsg">
+		À vendre : [MESSAGE]
+	</string>
+	<string name="TooltipFlagGroupBuild">
+		Contruction de groupe
+	</string>
+	<string name="TooltipFlagNoBuild">
+		Pas de construction
+	</string>
+	<string name="TooltipFlagNoEdit">
+		Contruction de groupe
+	</string>
+	<string name="TooltipFlagNotSafe">
+		Non sécurisé
+	</string>
+	<string name="TooltipFlagNoFly">
+		Interdiction de voler
+	</string>
+	<string name="TooltipFlagGroupScripts">
+		Scripts de groupe
+	</string>
+	<string name="TooltipFlagNoScripts">
+		Pas de scripts
+	</string>
+	<string name="TooltipLand">
+		Terrain :
+	</string>
+	<string name="TooltipMustSingleDrop">
+		Impossible de faire glisser plus d&apos;un objet ici
+	</string>
+	<string name="RetrievingData">
+		En cours d&apos;extraction...
+	</string>
+	<string name="ReleaseNotes">
+		Notes de version
+	</string>
+	<string name="LoadingData">
+		Chargement..
+	</string>
+	<string name="AvatarNameNobody">
+		(personne)
+	</string>
+	<string name="AvatarNameWaiting">
+		(en attente)
+	</string>
+	<string name="AvatarNameHippos">
+		(hippos)
+	</string>
+	<string name="GroupNameNone">
+		(aucun)
+	</string>
+	<string name="AssetErrorNone">
+		Aucune erreur
+	</string>
+	<string name="AssetErrorRequestFailed">
+		Requête de l&apos;actif : échec
+	</string>
+	<string name="AssetErrorNonexistentFile">
+		Requête de l&apos;actif : fichier inexistant
+	</string>
+	<string name="AssetErrorNotInDatabase">
+		Requête de l&apos;actif : actif introuvable dans la base de données
+	</string>
+	<string name="AssetErrorEOF">
+		Fin du ficher
+	</string>
+	<string name="AssetErrorCannotOpenFile">
+		Impossible d&apos;ouvrir le fichier
+	</string>
+	<string name="AssetErrorFileNotFound">
+		Fichier introuvable
+	</string>
+	<string name="AssetErrorTCPTimeout">
+		Délai d&apos;attente du transfert du fichier dépassé
+	</string>
+	<string name="AssetErrorCircuitGone">
+		Disparition du circuit
+	</string>
+	<string name="AssetErrorPriceMismatch">
+		Il y a une différence de prix entre le client et le serveur
+	</string>
+	<string name="AssetErrorUnknownStatus">
+		Statut inconnu
+	</string>
+	<string name="AvatarEditingApparance">
+		(Apparence en cours de modification)
+	</string>
+	<string name="AvatarAway">
+		Absent
+	</string>
+	<string name="AvatarBusy">
+		Occupé
+	</string>
+	<string name="AvatarMuted">
+		Ignoré
+	</string>
+	<string name="anim_express_afraid">
+		Effrayé
+	</string>
+	<string name="anim_express_anger">
+		En colère
+	</string>
+	<string name="anim_away">
+		Absent
+	</string>
+	<string name="anim_backflip">
+		Salto arrière
+	</string>
+	<string name="anim_express_laugh">
+		Rire en se tenant le ventre
+	</string>
+	<string name="anim_express_toothsmile">
+		Grand sourire
+	</string>
+	<string name="anim_blowkiss">
+		Envoyer un baiser
+	</string>
+	<string name="anim_express_bored">
+		Bailler d&apos;ennui
+	</string>
+	<string name="anim_bow">
+		S&apos;incliner
+	</string>
+	<string name="anim_clap">
+		Applaudir
+	</string>
+	<string name="anim_courtbow">
+		Révérence de cour
+	</string>
+	<string name="anim_express_cry">
+		Pleurer
+	</string>
+	<string name="anim_dance1">
+		Danse 1
+	</string>
+	<string name="anim_dance2">
+		Danse 2
+	</string>
+	<string name="anim_dance3">
+		Danse 3
+	</string>
+	<string name="anim_dance4">
+		Danse 4
+	</string>
+	<string name="anim_dance5">
+		Danse 5
+	</string>
+	<string name="anim_dance6">
+		Danse 6
+	</string>
+	<string name="anim_dance7">
+		Danse 7
+	</string>
+	<string name="anim_dance8">
+		Danse 8
+	</string>
+	<string name="anim_express_disdain">
+		Mépris
+	</string>
+	<string name="anim_drink">
+		Boire
+	</string>
+	<string name="anim_express_embarrased">
+		Gêne
+	</string>
+	<string name="anim_angry_fingerwag">
+		Désapprobation
+	</string>
+	<string name="anim_fist_pump">
+		Victoire
+	</string>
+	<string name="anim_yoga_float">
+		Yoga
+	</string>
+	<string name="anim_express_frown">
+		Froncer les sourcils
+	</string>
+	<string name="anim_impatient">
+		Impatient
+	</string>
+	<string name="anim_jumpforjoy">
+		Sauter de joie
+	</string>
+	<string name="anim_kissmybutt">
+		Va te faire voir !
+	</string>
+	<string name="anim_express_kiss">
+		Baiser
+	</string>
+	<string name="anim_laugh_short">
+		Rire
+	</string>
+	<string name="anim_musclebeach">
+		Montrer ses muscles
+	</string>
+	<string name="anim_no_unhappy">
+		Non (mécontent)
+	</string>
+	<string name="anim_no_head">
+		Non
+	</string>
+	<string name="anim_nyanya">
+		Na na na na nère
+	</string>
+	<string name="anim_punch_onetwo">
+		Gauche-droite
+	</string>
+	<string name="anim_express_open_mouth">
+		Bouche ouverte
+	</string>
+	<string name="anim_peace">
+		Paix
+	</string>
+	<string name="anim_point_you">
+		Montrer quelqu&apos;un du doigt
+	</string>
+	<string name="anim_point_me">
+		Se montrer du doigt
+	</string>
+	<string name="anim_punch_l">
+		Gauche
+	</string>
+	<string name="anim_punch_r">
+		Droite
+	</string>
+	<string name="anim_rps_countdown">
+		Compter (pierre-papier-ciseaux)
+	</string>
+	<string name="anim_rps_paper">
+		Papier (pierre-papier-ciseaux)
+	</string>
+	<string name="anim_rps_rock">
+		Pierre (pierre-papier-ciseaux)
+	</string>
+	<string name="anim_rps_scissors">
+		Ciseaux (pierre-papier-ciseaux)
+	</string>
+	<string name="anim_express_repulsed">
+		Dégoût
+	</string>
+	<string name="anim_kick_roundhouse_r">
+		Coup de pied circulaire
+	</string>
+	<string name="anim_express_sad">
+		Triste
+	</string>
+	<string name="anim_salute">
+		Salut
+	</string>
+	<string name="anim_shout">
+		Crier
+	</string>
+	<string name="anim_express_shrug">
+		Hausser les épaules
+	</string>
+	<string name="anim_express_smile">
+		Sourire
+	</string>
+	<string name="anim_smoke_idle">
+		Fumer, immobile
+	</string>
+	<string name="anim_smoke_inhale">
+		Fumer, prendre une bouffée
+	</string>
+	<string name="anim_smoke_throw_down">
+		Fumer, jeter son mégot
+	</string>
+	<string name="anim_express_surprise">
+		Surprise
+	</string>
+	<string name="anim_sword_strike_r">
+		Coup d&apos;épée
+	</string>
+	<string name="anim_angry_tantrum">
+		Caprice
+	</string>
+	<string name="anim_express_tongue_out">
+		Tirer la langue
+	</string>
+	<string name="anim_hello">
+		Faire signe
+	</string>
+	<string name="anim_whisper">
+		Chuchoter
+	</string>
+	<string name="anim_whistle">
+		Siffler
+	</string>
+	<string name="anim_express_wink">
+		Clin d&apos;œil
+	</string>
+	<string name="anim_wink_hollywood">
+		Clin d&apos;œil (Hollywood)
+	</string>
+	<string name="anim_express_worry">
+		Soucis
+	</string>
+	<string name="anim_yes_happy">
+		Oui (Joie)
+	</string>
+	<string name="anim_yes_head">
+		Oui
+	</string>
+	<string name="texture_loading">
+		Chargement...
+	</string>
+	<string name="worldmap_offline">
+		Hors ligne
+	</string>
+	<string name="whisper">
+		chuchote :
+	</string>
+	<string name="shout">
+		crie :
+	</string>
+	<string name="all_files">
+		Tous fichiers
+	</string>
+	<string name="sound_files">
+		Sons
+	</string>
+	<string name="animation_files">
+		Animations
+	</string>
+	<string name="image_files">
+		Images
+	</string>
+	<string name="save_file_verb">
+		Enregistrer
+	</string>
+	<string name="load_file_verb">
+		Charger
+	</string>
+	<string name="targa_image_files">
+		Images Targa
+	</string>
+	<string name="bitmap_image_files">
+		Images Bitmap
+	</string>
+	<string name="avi_movie_file">
+		Fichier de film AVI
+	</string>
+	<string name="xaf_animation_file">
+		Fichier d&apos;animation XAF
+	</string>
+	<string name="xml_file">
+		Fichier XML
+	</string>
+	<string name="dot_raw_file">
+		Fichier RAW
+	</string>
+	<string name="compressed_image_files">
+		Images compressées
+	</string>
+	<string name="load_files">
+		Charger des fichiers
+	</string>
+	<string name="choose_the_directory">
+		Choisir le répertoire
+	</string>
+</strings>
diff --git a/indra/newview/skins/default/xui/fr/teleport_strings.xml b/indra/newview/skins/default/xui/fr/teleport_strings.xml
index 9ce079fff8..91455297ad 100644
--- a/indra/newview/skins/default/xui/fr/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/fr/teleport_strings.xml
@@ -1,90 +1,90 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<teleport_messages name="">
-	<message_set name="errors">
-		<message name="invalid_tport">
-			Nous avons rencontré des problèmes en essayant de vous téléporter. Vous devrez peut-être
-vous reconnecter avant de pouvoir être téléporté. Si vous continuez
-à recevoir ce message, veuillez consulter notre FAQ technique à la page suivante :
-www.secondlife.com/support
-		</message>
-		<message name="invalid_region_handoff">
-			Nous avons rencontré des problèmes en essayant de vous téléporter. Vous devrez peut-être
-vous reconnecter avant de pouvoir être téléporté. Si vous continuez
-à recevoir ce message, veuillez consulter notre FAQ technique à la page suivante :
-www.secondlife.com/support.
-		</message>
-		<message name="blocked_tport">
-			Désolé, la téléportation est bloquée actuellement. Veuillez réessayer dans un moment.
-Si vous ne parvenez toujours pas à être téléporté, déconnectez-vous puis reconnectez-vous 
-pour résoudre le problème.
-		</message>
-		<message name="nolandmark_tport">
-			Désolé, le système n&apos;a pas réussi à localiser la destination de votre repère.
-		</message>
-		<message name="timeout_tport">
-			Désolé, la connexion vers votre lieu de téléportation n&apos;a pas abouti.
-Veuillez réessayer dans un moment.
-		</message>
-		<message name="noaccess_tport">
-			Désolé, vous n&apos;avez pas accès à cette destination.
-		</message>
-		<message name="missing_attach_tport">
-			Vos pieces-jointes ne sont pas encore arrivées. Attendez quelques
-secondes de plus ou déconnectez-vous puis reconnectez-vous avant d&apos;essayer
-de vous téléporter.
-		</message>
-		<message name="too_many_uploads_tport">
-			Le trafic vers cette région est bouché en ce moment. Votre téléportation
-ne pourra pas avoir lieu immédiatement. Veuillez réessayer
-dans quelques minutes ou bien aller dans une zone moins fréquentée.
-		</message>
-		<message name="expired_tport">
-			Désolé, votre demande de téléportation n&apos;a pas abouti
-assez rapidement. Veuillez réessayer dans quelques minutes.
-		</message>
-		<message name="expired_region_handoff">
-			Désolé, votre demande pour passer dans une autre région n&apos;a pas abouti
-assez rapidement. Veuillez réessayer dans quelques minutes.
-		</message>
-		<message name="no_host">
-			Impossible de trouver la destination de la téléportation. Il est possible que cette destination soit
-temporairement indisponible ou qu&apos;elle n&apos;existe plus. Veuillez réessayer
-dans quelques minutes.
-		</message>
-		<message name="no_inventory_host">
-			L&apos;inventaire est temporairement indisponible.
-		</message>
-	</message_set>
-	<message_set name="progress">
-		<message name="sending_dest">
-			Envoi vers la destination en cours.
-		</message>
-		<message name="redirecting">
-			Redirection vers un emplacement différent en cours.
-		</message>
-		<message name="relaying">
-			Relai vers la destination en cours.
-		</message>
-		<message name="sending_home">
-			Requête de la demande d&apos;envoi vers votre domicile en cours.
-		</message>
-		<message name="sending_landmark">
-			Requête de la demande d&apos;envoi vers le repère en cours.
-		</message>
-		<message name="completing">
-			Téléportation sur le point d&apos;aboutir.
-		</message>
-		<message name="resolving">
-			Destination en cours de résolution.
-		</message>
-		<message name="contacting">
-			Contact avec la nouvelle région en cours.
-		</message>
-		<message name="arriving">
-			Vous arrivez...
-		</message>
-		<message name="requesting">
-			Demande de téléportation en cours...
-		</message>
-	</message_set>
-</teleport_messages>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<teleport_messages name="">
+	<message_set name="errors">
+		<message name="invalid_tport">
+			Nous avons rencontré des problèmes en essayant de vous téléporter. Vous devrez peut-être
+vous reconnecter avant de pouvoir être téléporté. Si vous continuez
+à recevoir ce message, veuillez consulter notre FAQ technique à la page suivante :
+www.secondlife.com/support
+		</message>
+		<message name="invalid_region_handoff">
+			Nous avons rencontré des problèmes en essayant de vous téléporter. Vous devrez peut-être
+vous reconnecter avant de pouvoir être téléporté. Si vous continuez
+à recevoir ce message, veuillez consulter notre FAQ technique à la page suivante :
+www.secondlife.com/support.
+		</message>
+		<message name="blocked_tport">
+			Désolé, la téléportation est bloquée actuellement. Veuillez réessayer dans un moment.
+Si vous ne parvenez toujours pas à être téléporté, déconnectez-vous puis reconnectez-vous 
+pour résoudre le problème.
+		</message>
+		<message name="nolandmark_tport">
+			Désolé, le système n&apos;a pas réussi à localiser la destination de votre repère.
+		</message>
+		<message name="timeout_tport">
+			Désolé, la connexion vers votre lieu de téléportation n&apos;a pas abouti.
+Veuillez réessayer dans un moment.
+		</message>
+		<message name="noaccess_tport">
+			Désolé, vous n&apos;avez pas accès à cette destination.
+		</message>
+		<message name="missing_attach_tport">
+			Vos pieces-jointes ne sont pas encore arrivées. Attendez quelques
+secondes de plus ou déconnectez-vous puis reconnectez-vous avant d&apos;essayer
+de vous téléporter.
+		</message>
+		<message name="too_many_uploads_tport">
+			Le trafic vers cette région est bouché en ce moment. Votre téléportation
+ne pourra pas avoir lieu immédiatement. Veuillez réessayer
+dans quelques minutes ou bien aller dans une zone moins fréquentée.
+		</message>
+		<message name="expired_tport">
+			Désolé, votre demande de téléportation n&apos;a pas abouti
+assez rapidement. Veuillez réessayer dans quelques minutes.
+		</message>
+		<message name="expired_region_handoff">
+			Désolé, votre demande pour passer dans une autre région n&apos;a pas abouti
+assez rapidement. Veuillez réessayer dans quelques minutes.
+		</message>
+		<message name="no_host">
+			Impossible de trouver la destination de la téléportation. Il est possible que cette destination soit
+temporairement indisponible ou qu&apos;elle n&apos;existe plus. Veuillez réessayer
+dans quelques minutes.
+		</message>
+		<message name="no_inventory_host">
+			L&apos;inventaire est temporairement indisponible.
+		</message>
+	</message_set>
+	<message_set name="progress">
+		<message name="sending_dest">
+			Envoi vers la destination en cours.
+		</message>
+		<message name="redirecting">
+			Redirection vers un emplacement différent en cours.
+		</message>
+		<message name="relaying">
+			Relai vers la destination en cours.
+		</message>
+		<message name="sending_home">
+			Requête de la demande d&apos;envoi vers votre domicile en cours.
+		</message>
+		<message name="sending_landmark">
+			Requête de la demande d&apos;envoi vers le repère en cours.
+		</message>
+		<message name="completing">
+			Téléportation sur le point d&apos;aboutir.
+		</message>
+		<message name="resolving">
+			Destination en cours de résolution.
+		</message>
+		<message name="contacting">
+			Contact avec la nouvelle région en cours.
+		</message>
+		<message name="arriving">
+			Vous arrivez...
+		</message>
+		<message name="requesting">
+			Demande de téléportation en cours...
+		</message>
+	</message_set>
+</teleport_messages>
diff --git a/indra/newview/skins/default/xui/fr/xui_version.xml b/indra/newview/skins/default/xui/fr/xui_version.xml
index ee2a0be745..0e777751d3 100644
--- a/indra/newview/skins/default/xui/fr/xui_version.xml
+++ b/indra/newview/skins/default/xui/fr/xui_version.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<xui_version>
-	1.0
-</xui_version>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xui_version>
+	1.0
+</xui_version>
diff --git a/indra/newview/skins/default/xui/it/floater_snapshot.xml b/indra/newview/skins/default/xui/it/floater_snapshot.xml
index 8febc6d898..7729d84fa6 100644
--- a/indra/newview/skins/default/xui/it/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/it/floater_snapshot.xml
@@ -21,12 +21,8 @@
 	<button label="Invia" name="send_btn"/>
 	<button label="Salva ([AMOUNT] L$)" name="upload_btn"/>
 	<flyout_button label="Salva" name="save_btn" tool_tip="Salva l&apos;immagine come file">
-		<flyout_button_item name="save_item">
-			Salva
-		</flyout_button_item>
-		<flyout_button_item name="saveas_item">
-			Salva come...
-		</flyout_button_item>
+		<flyout_button_item name="save_item" label="Salva"/>
+		<flyout_button_item name="saveas_item" label="Salva come..."/>
 	</flyout_button>
 	<button label="Annulla" name="discard_btn"/>
 	<button label="Espandi &gt;&gt;" name="more_btn" tool_tip="Opzioni avanzate"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_animation_preview.xml b/indra/newview/skins/default/xui/ja/floater_animation_preview.xml
index 27a07e633b..4673f908c4 100644
--- a/indra/newview/skins/default/xui/ja/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/ja/floater_animation_preview.xml
@@ -13,18 +13,18 @@
 	</text>
 	<combo_box label="" name="preview_base_anim"
 	     tool_tip="アバターが普通の行動をするときのアニメーションの動きをテストするためにこれを使います。">
-		<combo_item name="Standing">
+		<combo_box.item name="Standing">
 			立つ
-		</combo_item>
-		<combo_item name="Walking">
+		</combo_box.item>
+		<combo_box.item name="Walking">
 			歩く
-		</combo_item>
-		<combo_item name="Sitting">
+		</combo_box.item>
+		<combo_box.item name="Sitting">
 			座る
-		</combo_item>
-		<combo_item name="Flying">
+		</combo_box.item>
+		<combo_box.item name="Flying">
 			飛行
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<pad height="7" />
 	<check_box label="ループ" name="loop_check"
@@ -38,111 +38,111 @@
 	</text>
 	<combo_box label="" name="hand_pose_combo"
 	     tool_tip="アニメーションの手の動きをコントロールします。">
-		<combo_item name="Spread">
+		<combo_box.item name="Spread">
 			広がる
-		</combo_item>
-		<combo_item name="Relaxed">
+		</combo_box.item>
+		<combo_box.item name="Relaxed">
 			リラックス
-		</combo_item>
-		<combo_item name="PointBoth">
+		</combo_box.item>
+		<combo_box.item name="PointBoth">
 			両方を指す
-		</combo_item>
-		<combo_item name="Fist">
+		</combo_box.item>
+		<combo_box.item name="Fist">
 			拳
-		</combo_item>
-		<combo_item name="RelaxedLeft">
+		</combo_box.item>
+		<combo_box.item name="RelaxedLeft">
 			リラックス左
-		</combo_item>
-		<combo_item name="PointLeft">
+		</combo_box.item>
+		<combo_box.item name="PointLeft">
 			左を指す
-		</combo_item>
-		<combo_item name="FistLeft">
+		</combo_box.item>
+		<combo_box.item name="FistLeft">
 			拳左
-		</combo_item>
-		<combo_item name="RelaxedRight">
+		</combo_box.item>
+		<combo_box.item name="RelaxedRight">
 			リラックス右
-		</combo_item>
-		<combo_item name="PointRight">
+		</combo_box.item>
+		<combo_box.item name="PointRight">
 			右を指す
-		</combo_item>
-		<combo_item name="FistRight">
+		</combo_box.item>
+		<combo_box.item name="FistRight">
 			拳右
-		</combo_item>
-		<combo_item name="SaluteRight">
+		</combo_box.item>
+		<combo_box.item name="SaluteRight">
 			敬礼右
-		</combo_item>
-		<combo_item name="Typing">
+		</combo_box.item>
+		<combo_box.item name="Typing">
 			入力する
-		</combo_item>
-		<combo_item name="PeaceRight">
+		</combo_box.item>
+		<combo_box.item name="PeaceRight">
 			ピース・サイン右
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="emote_label">
 		表現
 	</text>
 	<combo_box label="" name="emote_combo"
 	     tool_tip="アニメーションの顔を表情をコントロールします。">
-		<combo_item name="[None]">
+		<combo_box.item name="[None]">
 			[None]
-		</combo_item>
-		<combo_item name="Aaaaah">
+		</combo_box.item>
+		<combo_box.item name="Aaaaah">
 			アーーーーー
-		</combo_item>
-		<combo_item name="Afraid">
+		</combo_box.item>
+		<combo_box.item name="Afraid">
 			怖れ
-		</combo_item>
-		<combo_item name="Angry">
+		</combo_box.item>
+		<combo_box.item name="Angry">
 			怒り
-		</combo_item>
-		<combo_item name="BigSmile">
+		</combo_box.item>
+		<combo_box.item name="BigSmile">
 			満面の笑み
-		</combo_item>
-		<combo_item name="Bored">
+		</combo_box.item>
+		<combo_box.item name="Bored">
 			退屈
-		</combo_item>
-		<combo_item name="Cry">
+		</combo_box.item>
+		<combo_box.item name="Cry">
 			泣く
-		</combo_item>
-		<combo_item name="Disdain">
+		</combo_box.item>
+		<combo_box.item name="Disdain">
 			侮蔑
-		</combo_item>
-		<combo_item name="Embarrassed">
+		</combo_box.item>
+		<combo_box.item name="Embarrassed">
 			困惑
-		</combo_item>
-		<combo_item name="Frown">
+		</combo_box.item>
+		<combo_box.item name="Frown">
 			しかめっ面
-		</combo_item>
-		<combo_item name="Kiss">
+		</combo_box.item>
+		<combo_box.item name="Kiss">
 			キス
-		</combo_item>
-		<combo_item name="Laugh">
+		</combo_box.item>
+		<combo_box.item name="Laugh">
 			笑う
-		</combo_item>
-		<combo_item name="Plllppt">
+		</combo_box.item>
+		<combo_box.item name="Plllppt">
 			Plllppt
-		</combo_item>
-		<combo_item name="Repulsed">
+		</combo_box.item>
+		<combo_box.item name="Repulsed">
 			嫌悪感
-		</combo_item>
-		<combo_item name="Sad">
+		</combo_box.item>
+		<combo_box.item name="Sad">
 			悲しい
-		</combo_item>
-		<combo_item name="Shrug">
+		</combo_box.item>
+		<combo_box.item name="Shrug">
 			肩をすくめる
-		</combo_item>
-		<combo_item name="Smile">
+		</combo_box.item>
+		<combo_box.item name="Smile">
 			笑み
-		</combo_item>
-		<combo_item name="Surprise">
+		</combo_box.item>
+		<combo_box.item name="Surprise">
 			驚き
-		</combo_item>
-		<combo_item name="Wink">
+		</combo_box.item>
+		<combo_box.item name="Wink">
 			ウィンク
-		</combo_item>
-		<combo_item name="Worry">
+		</combo_box.item>
+		<combo_box.item name="Worry">
 			心配
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<spinner label="フェーズイン(秒)" name="ease_in_time"
 	     tool_tip="アニメーションのブレンド・イン時間(秒)" />
diff --git a/indra/newview/skins/default/xui/ja/floater_beacons.xml b/indra/newview/skins/default/xui/ja/floater_beacons.xml
index 49c87588b4..2065656732 100644
--- a/indra/newview/skins/default/xui/ja/floater_beacons.xml
+++ b/indra/newview/skins/default/xui/ja/floater_beacons.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="beacons" title="ビーコン(標識)">
-	<panel name="beacons_panel">
-		<check_box label="タッチオンリーのスクリプトを含むオブジェクト" name="touch_only"/>
-		<check_box label="スクリプト・オブジェクト" name="scripted"/>
-		<check_box label="物理的オブジェクト" name="physical"/>
-		<check_box label="音源" name="sounds"/>
-		<check_box label="パーティクル源" name="particles"/>
-		<check_box label="ハイライトのレンダリング" name="highlights"/>
-		<check_box label="ビーコン(標識)のレンダリング" name="beacons"/>
-		<text name="beacon_width_label">
-			ビーコン(標識)の幅
-		</text>
-	</panel>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="beacons" title="ビーコン(標識)">
+	<panel name="beacons_panel">
+		<check_box label="タッチオンリーのスクリプトを含むオブジェクト" name="touch_only"/>
+		<check_box label="スクリプト・オブジェクト" name="scripted"/>
+		<check_box label="物理的オブジェクト" name="physical"/>
+		<check_box label="音源" name="sounds"/>
+		<check_box label="パーティクル源" name="particles"/>
+		<check_box label="ハイライトのレンダリング" name="highlights"/>
+		<check_box label="ビーコン(標識)のレンダリング" name="beacons"/>
+		<text name="beacon_width_label">
+			ビーコン(標識)の幅
+		</text>
+	</panel>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_buy_land.xml b/indra/newview/skins/default/xui/ja/floater_buy_land.xml
index 0a47e0e970..4c3637d6a1 100644
--- a/indra/newview/skins/default/xui/ja/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/ja/floater_buy_land.xml
@@ -68,15 +68,15 @@
 		土地を保有できるのはプレミアム・メンバーだけです
 	</text>
 	<combo_box name="account_level">
-		<combo_item name="US$9.95/month,billedmonthly">
+		<combo_box.item name="US$9.95/month,billedmonthly">
 			月額9.95米ドル、月払い
-		</combo_item>
-		<combo_item name="US$7.50/month,billedquarterly">
+		</combo_box.item>
+		<combo_box.item name="US$7.50/month,billedquarterly">
 			月額7.50米ドル、年4回払い
-		</combo_item>
-		<combo_item name="US$6.00/month,billedannually">
+		</combo_box.item>
+		<combo_box.item name="US$6.00/month,billedannually">
 			月額6.00米ドル、年払い
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="land_use_action">
 		毎月の土地使用料をUS$40に引き上げます
diff --git a/indra/newview/skins/default/xui/ja/floater_camera.xml b/indra/newview/skins/default/xui/ja/floater_camera.xml
index e5a491b28b..46e7b1990d 100644
--- a/indra/newview/skins/default/xui/ja/floater_camera.xml
+++ b/indra/newview/skins/default/xui/ja/floater_camera.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="move floater">
-	<string name="rotate_tooltip">
-		フォーカスを中心にカメラを回転
-	</string>
-	<string name="zoom_tooltip">
-		フォーカスに向けてカメラをズーム
-	</string>
-	<string name="move_tooltip">
-		カメラを上下左右に移動
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="move floater">
+	<string name="rotate_tooltip">
+		フォーカスを中心にカメラを回転
+	</string>
+	<string name="zoom_tooltip">
+		フォーカスに向けてカメラをズーム
+	</string>
+	<string name="move_tooltip">
+		カメラを上下左右に移動
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml
index 1b0c89a1fb..2d8b54cdd5 100644
--- a/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml
@@ -1,97 +1,97 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Day Cycle Floater" title="デイ・サイクル編集">
-	<tab_container name="Day Cycle Tabs">
-		<panel label="デイ・サイクル" name="Day Cycle">
-			<button label="?" name="WLDayCycleHelp" />
-			<text name="WL12am">
-				深夜 12時
-			</text>
-			<text name="WL3am">
-				午前 3時
-			</text>
-			<text name="WL6am">
-				午前 6時
-			</text>
-			<text name="WL9amHash">
-				午前 9時
-			</text>
-			<text name="WL12pmHash">
-				正午 12時
-			</text>
-			<text name="WL3pm">
-				午後 3時
-			</text>
-			<text name="WL6pm">
-				午後 6時
-			</text>
-			<text name="WL9pm">
-				午後 9時
-			</text>
-			<text name="WL12am2">
-				深夜 12時
-			</text>
-			<text name="WL12amHash">
-				|
-			</text>
-			<text name="WL3amHash">
-				I
-			</text>
-			<text name="WL6amHash">
-				|
-			</text>
-			<text name="WL9amHash2">
-				I
-			</text>
-			<text name="WL12pmHash2">
-				|
-			</text>
-			<text name="WL3pmHash">
-				I
-			</text>
-			<text name="WL6pmHash">
-				|
-			</text>
-			<text name="WL9pmHash">
-				I
-			</text>
-			<text name="WL12amHash2">
-				|
-			</text>
-			<button label="キーの追加" label_selected="キーの追加" name="WLAddKey" />
-			<button label="キーの削除" label_selected="キーの削除" name="WLDeleteKey" />
-			<text name="WLCurKeyFrameText">
-				キーフレームの設定:
-			</text>
-			<text name="WLCurKeyTimeText">
-				キー・タイム:
-			</text>
-			<spinner label="時間" name="WLCurKeyHour" />
-			<spinner label="分" name="WLCurKeyMin" />
-			<text name="WLCurKeyTimeText2">
-				キーの事前設定:
-			</text>
-			<combo_box label="事前設定" name="WLKeyPresets" />
-			<text name="DayCycleText">
-				スナップ:
-			</text>
-			<combo_box label="5 分" name="WLSnapOptions" />
-			<text name="DayCycleText2">
-				サイクルの長さ:
-			</text>
-			<spinner label="時間" name="WLLengthOfDayHour" />
-			<spinner label="分" name="WLLengthOfDayMin" />
-			<spinner label="秒" name="WLLengthOfDaySec" />
-			<text name="DayCycleText3">
-				プレビュー:
-			</text>
-			<button label="再生" label_selected="再生" name="WLAnimSky" />
-			<button label="停止!" label_selected="停止" name="WLStopAnimSky" />
-			<button label="不動産の時刻を使用"
-			     label_selected="不動産の時刻に変更" name="WLUseLindenTime" />
-			<button label="デイ・テストを保存"
-			     label_selected="デイ・テストを保存" name="WLSaveDayCycle" />
-			<button label="デイ・テストをロード"
-			     label_selected="デイ・テストをロード" name="WLLoadDayCycle" />
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Day Cycle Floater" title="デイ・サイクル編集">
+	<tab_container name="Day Cycle Tabs">
+		<panel label="デイ・サイクル" name="Day Cycle">
+			<button label="?" name="WLDayCycleHelp" />
+			<text name="WL12am">
+				深夜 12時
+			</text>
+			<text name="WL3am">
+				午前 3時
+			</text>
+			<text name="WL6am">
+				午前 6時
+			</text>
+			<text name="WL9amHash">
+				午前 9時
+			</text>
+			<text name="WL12pmHash">
+				正午 12時
+			</text>
+			<text name="WL3pm">
+				午後 3時
+			</text>
+			<text name="WL6pm">
+				午後 6時
+			</text>
+			<text name="WL9pm">
+				午後 9時
+			</text>
+			<text name="WL12am2">
+				深夜 12時
+			</text>
+			<text name="WL12amHash">
+				|
+			</text>
+			<text name="WL3amHash">
+				I
+			</text>
+			<text name="WL6amHash">
+				|
+			</text>
+			<text name="WL9amHash2">
+				I
+			</text>
+			<text name="WL12pmHash2">
+				|
+			</text>
+			<text name="WL3pmHash">
+				I
+			</text>
+			<text name="WL6pmHash">
+				|
+			</text>
+			<text name="WL9pmHash">
+				I
+			</text>
+			<text name="WL12amHash2">
+				|
+			</text>
+			<button label="キーの追加" label_selected="キーの追加" name="WLAddKey" />
+			<button label="キーの削除" label_selected="キーの削除" name="WLDeleteKey" />
+			<text name="WLCurKeyFrameText">
+				キーフレームの設定:
+			</text>
+			<text name="WLCurKeyTimeText">
+				キー・タイム:
+			</text>
+			<spinner label="時間" name="WLCurKeyHour" />
+			<spinner label="分" name="WLCurKeyMin" />
+			<text name="WLCurKeyTimeText2">
+				キーの事前設定:
+			</text>
+			<combo_box label="事前設定" name="WLKeyPresets" />
+			<text name="DayCycleText">
+				スナップ:
+			</text>
+			<combo_box label="5 分" name="WLSnapOptions" />
+			<text name="DayCycleText2">
+				サイクルの長さ:
+			</text>
+			<spinner label="時間" name="WLLengthOfDayHour" />
+			<spinner label="分" name="WLLengthOfDayMin" />
+			<spinner label="秒" name="WLLengthOfDaySec" />
+			<text name="DayCycleText3">
+				プレビュー:
+			</text>
+			<button label="再生" label_selected="再生" name="WLAnimSky" />
+			<button label="停止!" label_selected="停止" name="WLStopAnimSky" />
+			<button label="不動産の時刻を使用"
+			     label_selected="不動産の時刻に変更" name="WLUseLindenTime" />
+			<button label="デイ・テストを保存"
+			     label_selected="デイ・テストを保存" name="WLSaveDayCycle" />
+			<button label="デイ・テストをロード"
+			     label_selected="デイ・テストをロード" name="WLLoadDayCycle" />
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_device_settings.xml b/indra/newview/skins/default/xui/ja/floater_device_settings.xml
index b9a0332f45..5c258df9fd 100644
--- a/indra/newview/skins/default/xui/ja/floater_device_settings.xml
+++ b/indra/newview/skins/default/xui/ja/floater_device_settings.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater name="floater_device_settings" title="ボイスチャット機器の設定" />
\ No newline at end of file
diff --git a/indra/newview/skins/default/xui/ja/floater_env_settings.xml b/indra/newview/skins/default/xui/ja/floater_env_settings.xml
index 4c19de1db7..48c22323f8 100644
--- a/indra/newview/skins/default/xui/ja/floater_env_settings.xml
+++ b/indra/newview/skins/default/xui/ja/floater_env_settings.xml
@@ -1,24 +1,24 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Environment Editor Floater" title="環境編集">
-	<text name="EnvTimeText">
-		時刻
-	</text>
-	<text name="EnvTimeText2">
-		正午 12:00
-	</text>
-	<text name="EnvCloudText">
-		雲の量
-	</text>
-	<text name="EnvWaterColorText">
-		水の色
-	</text>
-	<color_swatch name="EnvWaterColor"
-	     tool_tip="カラー・ピッカーをクリックして開く" />
-	<text name="EnvWaterFogText">
-		水中照度
-	</text>
-	<button label="不動産の時刻を使用" name="EnvUseEstateTimeButton" />
-	<button label="空の高度な設定" name="EnvAdvancedSkyButton" />
-	<button label="水の高度な設定" name="EnvAdvancedWaterButton" />
-	<button label="?" name="EnvSettingsHelpButton" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Environment Editor Floater" title="環境編集">
+	<text name="EnvTimeText">
+		時刻
+	</text>
+	<text name="EnvTimeText2">
+		正午 12:00
+	</text>
+	<text name="EnvCloudText">
+		雲の量
+	</text>
+	<text name="EnvWaterColorText">
+		水の色
+	</text>
+	<color_swatch name="EnvWaterColor"
+	     tool_tip="カラー・ピッカーをクリックして開く" />
+	<text name="EnvWaterFogText">
+		水中照度
+	</text>
+	<button label="不動産の時刻を使用" name="EnvUseEstateTimeButton" />
+	<button label="空の高度な設定" name="EnvAdvancedSkyButton" />
+	<button label="水の高度な設定" name="EnvAdvancedWaterButton" />
+	<button label="?" name="EnvSettingsHelpButton" />
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_god_tools.xml b/indra/newview/skins/default/xui/ja/floater_god_tools.xml
index 7524356bfc..8d77542dc0 100644
--- a/indra/newview/skins/default/xui/ja/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/ja/floater_god_tools.xml
@@ -122,29 +122,29 @@
 				目的地:
 			</text>
 			<combo_box name="destination">
-				<combo_item name="Selection">
+				<combo_box.item name="Selection">
 					選択
-				</combo_item>
-				<combo_item name="AgentRegion">
+				</combo_box.item>
+				<combo_box.item name="AgentRegion">
 					エージェント地域
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="Request:">
 				要求:
 			</text>
 			<combo_box name="request">
-				<combo_item name="colliders&lt;steps&gt;">
+				<combo_box.item name="colliders&lt;steps&gt;">
 					コライダー<ステップ>
-				</combo_item>
-				<combo_item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
+				</combo_box.item>
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
 					スクリプト<回数>、<オプション・パターン>
-				</combo_item>
-				<combo_item name="objects&lt;pattern&gt;">
+				</combo_box.item>
+				<combo_box.item name="objects&lt;pattern&gt;">
 					オブジェクト<パターン>
-				</combo_item>
-				<combo_item name="rez&lt;asset_id&gt;">
+				</combo_box.item>
+				<combo_box.item name="rez&lt;asset_id&gt;">
 					rez &lt;asset_id&gt;
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="Parameter:">
 				パラメーター:
diff --git a/indra/newview/skins/default/xui/ja/floater_hardware_settings.xml b/indra/newview/skins/default/xui/ja/floater_hardware_settings.xml
index 7413141e56..f2ff28d5f1 100644
--- a/indra/newview/skins/default/xui/ja/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/ja/floater_hardware_settings.xml
@@ -1,42 +1,42 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Hardware Settings Floater" title="ハードウェア設定">
-	<text name="Filtering:">
-		フィルタリング:
-	</text>
-	<check_box
-	     label="異方的フィルタリング(有効にすると速度が低下します)"
-	     name="ani" />
-	<text name="Antialiasing:">
-		アンチエイリアシング:
-	</text>
-	<combo_box label="アンチエイリアシング" name="fsaa">
-		<combo_item name="FSAADisabled">
-			無効
-		</combo_item>
-		<combo_item name="2x">
-			2x
-		</combo_item>
-		<combo_item name="4x">
-			4x
-		</combo_item>
-		<combo_item name="8x">
-			8x
-		</combo_item>
-		<combo_item name="16x">
-			16x
-		</combo_item>
-	</combo_box>
-	<spinner label="ガンマ:" name="gamma" />
-	<text name="(brightness, lower is brighter)">
-		(輝度:低い=高輝度、0=デフォルト値)
-	</text>
-	<text name="Enable VBO:">
-		VBO を有効化:
-	</text>
-	<check_box label="OpenGL Vertex Buffer Objectsを有効化" name="vbo"
-	     tool_tip="最新のハードウェアでこの設定を有効にすると、パフォーマンスが向上します。  しかし、旧型のハードウェアでは VBO の実装が貧弱な場合が多く、この設定を有効にすることでクラッシュにつながるおそれがあります。" />
-	<slider label="テクスチャメモリ(MB):" name="GrapicsCardTextureMemory"
-	     tool_tip="テクスチャーに割り当てるメモリの合計。 ビデオ・カード・メモリをデフォルトにします。 この数値を減らすと、パフォーマンスが改善されますが、テクスチャーがぼやけた感じになる場合があります。" />
-	<spinner label="フォグの距離比率:" name="fog" />
-	<button label="OK" label_selected="OK" name="OK" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Hardware Settings Floater" title="ハードウェア設定">
+	<text name="Filtering:">
+		フィルタリング:
+	</text>
+	<check_box
+	     label="異方的フィルタリング(有効にすると速度が低下します)"
+	     name="ani" />
+	<text name="Antialiasing:">
+		アンチエイリアシング:
+	</text>
+	<combo_box label="アンチエイリアシング" name="fsaa">
+		<combo_box.item name="FSAADisabled">
+			無効
+		</combo_box.item>
+		<combo_box.item name="2x">
+			2x
+		</combo_box.item>
+		<combo_box.item name="4x">
+			4x
+		</combo_box.item>
+		<combo_box.item name="8x">
+			8x
+		</combo_box.item>
+		<combo_box.item name="16x">
+			16x
+		</combo_box.item>
+	</combo_box>
+	<spinner label="ガンマ:" name="gamma" />
+	<text name="(brightness, lower is brighter)">
+		(輝度:低い=高輝度、0=デフォルト値)
+	</text>
+	<text name="Enable VBO:">
+		VBO を有効化:
+	</text>
+	<check_box label="OpenGL Vertex Buffer Objectsを有効化" name="vbo"
+	     tool_tip="最新のハードウェアでこの設定を有効にすると、パフォーマンスが向上します。  しかし、旧型のハードウェアでは VBO の実装が貧弱な場合が多く、この設定を有効にすることでクラッシュにつながるおそれがあります。" />
+	<slider label="テクスチャメモリ(MB):" name="GrapicsCardTextureMemory"
+	     tool_tip="テクスチャーに割り当てるメモリの合計。 ビデオ・カード・メモリをデフォルトにします。 この数値を減らすと、パフォーマンスが改善されますが、テクスチャーがぼやけた感じになる場合があります。" />
+	<spinner label="フォグの距離比率:" name="fog" />
+	<button label="OK" label_selected="OK" name="OK" />
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_hud.xml b/indra/newview/skins/default/xui/ja/floater_hud.xml
index 4b4137b3bf..a1970ebbd5 100644
--- a/indra/newview/skins/default/xui/ja/floater_hud.xml
+++ b/indra/newview/skins/default/xui/ja/floater_hud.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_hud" title="チュートリアル" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_hud" title="チュートリアル" />
diff --git a/indra/newview/skins/default/xui/ja/floater_image_preview.xml b/indra/newview/skins/default/xui/ja/floater_image_preview.xml
index be8e5c6416..3244a2f395 100644
--- a/indra/newview/skins/default/xui/ja/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/ja/floater_image_preview.xml
@@ -10,36 +10,36 @@
 		イメージのプレビュー:
 	</text>
 	<combo_box label="服の種類" name="clothing_type_combo">
-		<combo_item name="Image">
+		<combo_box.item name="Image">
 			画像
-		</combo_item>
-		<combo_item name="Hair">
+		</combo_box.item>
+		<combo_box.item name="Hair">
 			髪
-		</combo_item>
-		<combo_item name="FemaleHead">
+		</combo_box.item>
+		<combo_box.item name="FemaleHead">
 			女性の頭
-		</combo_item>
-		<combo_item name="FemaleUpperBody">
+		</combo_box.item>
+		<combo_box.item name="FemaleUpperBody">
 			女性の上半身
-		</combo_item>
-		<combo_item name="FemaleLowerBody">
+		</combo_box.item>
+		<combo_box.item name="FemaleLowerBody">
 			女性の下半身
-		</combo_item>
-		<combo_item name="MaleHead">
+		</combo_box.item>
+		<combo_box.item name="MaleHead">
 			男性の頭
-		</combo_item>
-		<combo_item name="MaleUpperBody">
+		</combo_box.item>
+		<combo_box.item name="MaleUpperBody">
 			男性の上半身
-		</combo_item>
-		<combo_item name="MaleLowerBody">
+		</combo_box.item>
+		<combo_box.item name="MaleLowerBody">
 			男性の下半身
-		</combo_item>
-		<combo_item name="Skirt">
+		</combo_box.item>
+		<combo_box.item name="Skirt">
 			スカート
-		</combo_item>
-		<combo_item name="SculptedPrim">
+		</combo_box.item>
+		<combo_box.item name="SculptedPrim">
 			変形されたプリム
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="bad_image_text">
 		イメージを読み取れません。
diff --git a/indra/newview/skins/default/xui/ja/floater_inspect.xml b/indra/newview/skins/default/xui/ja/floater_inspect.xml
index c831201d93..3ada48ef8e 100644
--- a/indra/newview/skins/default/xui/ja/floater_inspect.xml
+++ b/indra/newview/skins/default/xui/ja/floater_inspect.xml
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="inspect" title="オブジェクト検査" min_width="450" >
-	<scroll_list name="object_list"
-	     tool_tip="このリストからオブジェクトを選択し、この世界で強調表示します。">
-		<column label="オブジェクト名" name="object_name" />
-		<column label="所有者名" name="owner_name" />
-		<column label="制作者名" name="creator_name" />
-		<column label="作成日" name="creation_date" />
-	</scroll_list>
-	<button label="所有者のプロフィールを表示..." name="button owner"
-	     tool_tip="選択されたオブジェクトの所有者のプロフィールを見る" />
-	<button label="制作者のプロフィールを表示..." name="button creator"
-	     tool_tip="選択されたオブジェクトの制作者のプロフィールを見る" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="inspect" title="オブジェクト検査" min_width="450" >
+	<scroll_list name="object_list"
+	     tool_tip="このリストからオブジェクトを選択し、この世界で強調表示します。">
+		<column label="オブジェクト名" name="object_name" />
+		<column label="所有者名" name="owner_name" />
+		<column label="制作者名" name="creator_name" />
+		<column label="作成日" name="creation_date" />
+	</scroll_list>
+	<button label="所有者のプロフィールを表示..." name="button owner"
+	     tool_tip="選択されたオブジェクトの所有者のプロフィールを見る" />
+	<button label="制作者のプロフィールを表示..." name="button creator"
+	     tool_tip="選択されたオブジェクトの制作者のプロフィールを見る" />
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_joystick.xml b/indra/newview/skins/default/xui/ja/floater_joystick.xml
index a5ab9da127..5029a781f6 100644
--- a/indra/newview/skins/default/xui/ja/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/ja/floater_joystick.xml
@@ -1,125 +1,125 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Joystick" title="ジョイスティックの設定">
-	<check_box name="enable_joystick" width="120">
-		ジョイスティックを使う:
-	</check_box>
-	<text left="180" name="joystick_type" width="320"/>
-	<spinner label="X軸マッピング" name="JoystickAxis1"/>
-	<spinner label="Y軸マッピング" name="JoystickAxis2"/>
-	<spinner label="Z軸マッピング" name="JoystickAxis0"/>
-	<spinner label="ピッチ・マッピング" label_width="110" left="10" name="JoystickAxis4" width="150"/>
-	<spinner label="ヨー・マッピング" name="JoystickAxis5"/>
-	<spinner label="ロール・マッピング" label_width="110" left="350" name="JoystickAxis3" width="150"/>
-	<spinner label="ズーム・マッピング" label_width="110" left="10" name="JoystickAxis6" width="150"/>
-	<check_box label="直接ズーム" name="ZoomDirect"/>
-	<check_box label="3Dカーソル" name="Cursor3D"/>
-	<check_box label="自動レベル" name="AutoLeveling"/>
-	<text name="Control Modes:">
-		制御モード:
-	</text>
-	<check_box left="131" name="JoystickAvatarEnabled">
-		アバター
-	</check_box>
-	<check_box left="201" name="JoystickBuildEnabled">
-		造る
-	</check_box>
-	<check_box left="271" name="JoystickFlycamEnabled">
-		フライ・カメラ
-	</check_box>
-	<text left="5" name="XScale" width="120">
-		Xスケール
-	</text>
-	<spinner left="135" name="AvatarAxisScale1" width="50"/>
-	<spinner left="205" name="BuildAxisScale1" width="50"/>
-	<spinner left="275" name="FlycamAxisScale1" width="50"/>
-	<text left="5" name="YScale" width="120">
-		Yスケール
-	</text>
-	<spinner left="135" name="AvatarAxisScale2" width="50"/>
-	<spinner left="205" name="BuildAxisScale2" width="50"/>
-	<spinner left="275" name="FlycamAxisScale2" width="50"/>
-	<text left="5" name="ZScale" width="120">
-		Zスケール
-	</text>
-	<spinner left="135" name="AvatarAxisScale0" width="50"/>
-	<spinner left="205" name="BuildAxisScale0" width="50"/>
-	<spinner left="275" name="FlycamAxisScale0" width="50"/>
-	<text left="5" name="PitchScale" width="120">
-		ピッチ・スケール
-	</text>
-	<spinner left="135" name="AvatarAxisScale4" width="50"/>
-	<spinner left="205" name="BuildAxisScale4" width="50"/>
-	<spinner left="275" name="FlycamAxisScale4" width="50"/>
-	<text left="5" name="YawScale" width="120">
-		ヨー・スケール
-	</text>
-	<spinner left="135" name="AvatarAxisScale5" width="50"/>
-	<spinner left="205" name="BuildAxisScale5" width="50"/>
-	<spinner left="275" name="FlycamAxisScale5" width="50"/>
-	<text left="5" name="RollScale" width="120">
-		ロール・スケール
-	</text>
-	<spinner left="205" name="BuildAxisScale3" width="50"/>
-	<spinner left="275" name="FlycamAxisScale3" width="50"/>
-	<text left="5" name="XDeadZone" width="120">
-		Xデッド・ゾーン
-	</text>
-	<spinner left="135" name="AvatarAxisDeadZone1" width="50"/>
-	<spinner left="205" name="BuildAxisDeadZone1" width="50"/>
-	<spinner left="275" name="FlycamAxisDeadZone1" width="50"/>
-	<text left="5" name="YDeadZone" width="120">
-		Yデッド・ゾーン
-	</text>
-	<spinner left="135" name="AvatarAxisDeadZone2" width="50"/>
-	<spinner left="205" name="BuildAxisDeadZone2" width="50"/>
-	<spinner left="275" name="FlycamAxisDeadZone2" width="50"/>
-	<text left="5" name="ZDeadZone" width="120">
-		Zデッド・ゾーン
-	</text>
-	<spinner left="135" name="AvatarAxisDeadZone0" width="50"/>
-	<spinner left="205" name="BuildAxisDeadZone0" width="50"/>
-	<spinner left="275" name="FlycamAxisDeadZone0" width="50"/>
-	<text left="0" name="PitchDeadZone" width="135">
-		ピッチ・デッド・ゾーン
-	</text>
-	<spinner left="135" name="AvatarAxisDeadZone4" width="50"/>
-	<spinner left="205" name="BuildAxisDeadZone4" width="50"/>
-	<spinner left="275" name="FlycamAxisDeadZone4" width="50"/>
-	<text left="5" name="YawDeadZone" width="120">
-		ヨー・デッド・ゾーン
-	</text>
-	<spinner left="135" name="AvatarAxisDeadZone5" width="50"/>
-	<spinner left="205" name="BuildAxisDeadZone5" width="50"/>
-	<spinner left="275" name="FlycamAxisDeadZone5" width="50"/>
-	<text left="0" name="RollDeadZone" width="135">
-		ロール・デッド・ゾーン
-	</text>
-	<spinner left="205" name="BuildAxisDeadZone3" width="50"/>
-	<spinner left="275" name="FlycamAxisDeadZone3" width="50"/>
-	<text name="Feathering">
-		羽毛
-	</text>
-	<slider label="" left="126" name="AvatarFeathering" width="67"/>
-	<slider label="" left="196" name="BuildFeathering" width="67"/>
-	<slider label="" left="266" name="FlycamFeathering" width="67"/>
-	<text left="0" name="ZoomScale2" width="140">
-		ズーム・スケール
-	</text>
-	<spinner label="" left="275" name="FlycamAxisScale6" width="50"/>
-	<text left="0" name="ZoomDeadZone" width="140">
-		ズーム・デッド・ゾーン
-	</text>
-	<spinner label="" left="275" name="FlycamAxisDeadZone6" width="50"/>
-	<button label="SpaceNavigatorのデフォルト設定" left="330" name="SpaceNavigatorDefaults" width="210"/>
-	<button label="OK" label_selected="OK" name="ok_btn"/>
-	<button label="取り消し" label_selected="取り消し" name="cancel_btn"/>
-	<string name="JoystickMonitor">
-		ジョイスティック・モニター
-	</string>
-	<string name="Axis">
-		軸 [NUM]
-	</string>
-	<string name="NoDevice">
-		デバイスは検出されませんでした
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Joystick" title="ジョイスティックの設定">
+	<check_box name="enable_joystick" width="120">
+		ジョイスティックを使う:
+	</check_box>
+	<text left="180" name="joystick_type" width="320"/>
+	<spinner label="X軸マッピング" name="JoystickAxis1"/>
+	<spinner label="Y軸マッピング" name="JoystickAxis2"/>
+	<spinner label="Z軸マッピング" name="JoystickAxis0"/>
+	<spinner label="ピッチ・マッピング" label_width="110" left="10" name="JoystickAxis4" width="150"/>
+	<spinner label="ヨー・マッピング" name="JoystickAxis5"/>
+	<spinner label="ロール・マッピング" label_width="110" left="350" name="JoystickAxis3" width="150"/>
+	<spinner label="ズーム・マッピング" label_width="110" left="10" name="JoystickAxis6" width="150"/>
+	<check_box label="直接ズーム" name="ZoomDirect"/>
+	<check_box label="3Dカーソル" name="Cursor3D"/>
+	<check_box label="自動レベル" name="AutoLeveling"/>
+	<text name="Control Modes:">
+		制御モード:
+	</text>
+	<check_box left="131" name="JoystickAvatarEnabled">
+		アバター
+	</check_box>
+	<check_box left="201" name="JoystickBuildEnabled">
+		造る
+	</check_box>
+	<check_box left="271" name="JoystickFlycamEnabled">
+		フライ・カメラ
+	</check_box>
+	<text left="5" name="XScale" width="120">
+		Xスケール
+	</text>
+	<spinner left="135" name="AvatarAxisScale1" width="50"/>
+	<spinner left="205" name="BuildAxisScale1" width="50"/>
+	<spinner left="275" name="FlycamAxisScale1" width="50"/>
+	<text left="5" name="YScale" width="120">
+		Yスケール
+	</text>
+	<spinner left="135" name="AvatarAxisScale2" width="50"/>
+	<spinner left="205" name="BuildAxisScale2" width="50"/>
+	<spinner left="275" name="FlycamAxisScale2" width="50"/>
+	<text left="5" name="ZScale" width="120">
+		Zスケール
+	</text>
+	<spinner left="135" name="AvatarAxisScale0" width="50"/>
+	<spinner left="205" name="BuildAxisScale0" width="50"/>
+	<spinner left="275" name="FlycamAxisScale0" width="50"/>
+	<text left="5" name="PitchScale" width="120">
+		ピッチ・スケール
+	</text>
+	<spinner left="135" name="AvatarAxisScale4" width="50"/>
+	<spinner left="205" name="BuildAxisScale4" width="50"/>
+	<spinner left="275" name="FlycamAxisScale4" width="50"/>
+	<text left="5" name="YawScale" width="120">
+		ヨー・スケール
+	</text>
+	<spinner left="135" name="AvatarAxisScale5" width="50"/>
+	<spinner left="205" name="BuildAxisScale5" width="50"/>
+	<spinner left="275" name="FlycamAxisScale5" width="50"/>
+	<text left="5" name="RollScale" width="120">
+		ロール・スケール
+	</text>
+	<spinner left="205" name="BuildAxisScale3" width="50"/>
+	<spinner left="275" name="FlycamAxisScale3" width="50"/>
+	<text left="5" name="XDeadZone" width="120">
+		Xデッド・ゾーン
+	</text>
+	<spinner left="135" name="AvatarAxisDeadZone1" width="50"/>
+	<spinner left="205" name="BuildAxisDeadZone1" width="50"/>
+	<spinner left="275" name="FlycamAxisDeadZone1" width="50"/>
+	<text left="5" name="YDeadZone" width="120">
+		Yデッド・ゾーン
+	</text>
+	<spinner left="135" name="AvatarAxisDeadZone2" width="50"/>
+	<spinner left="205" name="BuildAxisDeadZone2" width="50"/>
+	<spinner left="275" name="FlycamAxisDeadZone2" width="50"/>
+	<text left="5" name="ZDeadZone" width="120">
+		Zデッド・ゾーン
+	</text>
+	<spinner left="135" name="AvatarAxisDeadZone0" width="50"/>
+	<spinner left="205" name="BuildAxisDeadZone0" width="50"/>
+	<spinner left="275" name="FlycamAxisDeadZone0" width="50"/>
+	<text left="0" name="PitchDeadZone" width="135">
+		ピッチ・デッド・ゾーン
+	</text>
+	<spinner left="135" name="AvatarAxisDeadZone4" width="50"/>
+	<spinner left="205" name="BuildAxisDeadZone4" width="50"/>
+	<spinner left="275" name="FlycamAxisDeadZone4" width="50"/>
+	<text left="5" name="YawDeadZone" width="120">
+		ヨー・デッド・ゾーン
+	</text>
+	<spinner left="135" name="AvatarAxisDeadZone5" width="50"/>
+	<spinner left="205" name="BuildAxisDeadZone5" width="50"/>
+	<spinner left="275" name="FlycamAxisDeadZone5" width="50"/>
+	<text left="0" name="RollDeadZone" width="135">
+		ロール・デッド・ゾーン
+	</text>
+	<spinner left="205" name="BuildAxisDeadZone3" width="50"/>
+	<spinner left="275" name="FlycamAxisDeadZone3" width="50"/>
+	<text name="Feathering">
+		羽毛
+	</text>
+	<slider label="" left="126" name="AvatarFeathering" width="67"/>
+	<slider label="" left="196" name="BuildFeathering" width="67"/>
+	<slider label="" left="266" name="FlycamFeathering" width="67"/>
+	<text left="0" name="ZoomScale2" width="140">
+		ズーム・スケール
+	</text>
+	<spinner label="" left="275" name="FlycamAxisScale6" width="50"/>
+	<text left="0" name="ZoomDeadZone" width="140">
+		ズーム・デッド・ゾーン
+	</text>
+	<spinner label="" left="275" name="FlycamAxisDeadZone6" width="50"/>
+	<button label="SpaceNavigatorのデフォルト設定" left="330" name="SpaceNavigatorDefaults" width="210"/>
+	<button label="OK" label_selected="OK" name="ok_btn"/>
+	<button label="取り消し" label_selected="取り消し" name="cancel_btn"/>
+	<string name="JoystickMonitor">
+		ジョイスティック・モニター
+	</string>
+	<string name="Axis">
+		軸 [NUM]
+	</string>
+	<string name="NoDevice">
+		デバイスは検出されませんでした
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_lagmeter.xml b/indra/newview/skins/default/xui/ja/floater_lagmeter.xml
index fbd7a6d93e..e25771ea72 100644
--- a/indra/newview/skins/default/xui/ja/floater_lagmeter.xml
+++ b/indra/newview/skins/default/xui/ja/floater_lagmeter.xml
@@ -1,152 +1,152 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_lagmeter" title="ラグ メーター">
-	<button name="client_lagmeter" tool_tip="クライアント ラグ ステータス" />
-	<text name="client">
-		クライアント:
-	</text>
-	<text name="client_text">
-		ノーマル
-	</text>
-	<button name="network_lagmeter" tool_tip="ネットワーク ラグ ステータス" />
-	<text name="network">
-		ネットワーク:
-	</text>
-	<text name="network_text">
-		ノーマル
-	</text>
-	<button name="server_lagmeter" tool_tip="サーバー ラグ ステータス" />
-	<text name="server">
-		サーバー:
-	</text>
-	<text name="server_text">
-		ノーマル
-	</text>
-	<button label="?" name="server_help" />
-	<button label="&gt;&gt; " name="minimize" />
-	<text name="max_title_msg">
-		ラグ メーター
-	</text>
-	<text name="max_width_px">
-		350
-	</text>
-	<text name="min_title_msg">
-		ラグ
-	</text>
-	<text name="min_width_px">
-		90
-	</text>
-	<text name="client_text_msg">
-		クライアント
-	</text>
-	<text name="client_frame_rate_critical_fps">
-		10
-	</text>
-	<text name="client_frame_rate_warning_fps">
-		15
-	</text>
-	<text name="client_frame_time_window_bg_msg">
-		ノーマル、ウィンドウは背景に
-	</text>
-	<text name="client_frame_time_critical_msg">
-		クライアント フレームレート < [CLIENT_FRAME_RATE_CRITICAL]
-	</text>
-	<text name="client_frame_time_warning_msg">
-		クライアント フレームレート: [CLIENT_FRAME_RATE_CRITICAL] ~ [CLIENT_FRAME_RATE_WARNING]
-	</text>
-	<text name="client_frame_time_normal_msg">
-		ノーマル
-	</text>
-	<text name="client_draw_distance_cause_msg">
-		考えられる原因: 描画距離の設定が大きすぎる
-	</text>
-	<text name="client_texture_loading_cause_msg">
-		考えられる原因: 画像のロード中
-	</text>
-	<text name="client_texture_memory_cause_msg">
-		考えられる原因: メモリ内の画像数が多すぎる
-	</text>
-	<text name="client_complex_objects_cause_msg">
-		考えられる原因: 画面に含まれる複雑なオブジェクトが多すぎる
-	</text>
-	<text name="network_text_msg">
-		ネットワーク
-	</text>
-	<text name="network_packet_loss_critical_pct">
-		10
-	</text>
-	<text name="network_packet_loss_warning_pct">
-		5
-	</text>
-	<text name="network_packet_loss_critical_msg">
-		接続でドロップされるパケットの割合: > [NETWORK_PACKET_LOSS_CRITICAL]
-	</text>
-	<text name="network_packet_loss_warning_msg">
-		接続でドロップされるパケットの割合:[NETWORK_PACKET_LOSS_WARNING] ~ [NETWORK_PACKET_LOSS_CRITICAL]
-	</text>
-	<text name="network_performance_normal_msg">
-		ノーマル
-	</text>
-	<text name="network_ping_critical_ms">
-		600
-	</text>
-	<text name="network_ping_warning_ms">
-		300
-	</text>
-	<text name="network_ping_critical_msg">
-		接続の ping 時間: > [NETWORK_PING_CRITICAL] ミリ秒
-	</text>
-	<text name="network_ping_warning_msg">
-		接続の ping 時間: [NETWORK_PING_WARNING] ~ [NETWORK_PING_CRITICAL] ミリ秒
-	</text>
-	<text name="network_packet_loss_cause_msg">
-		接続不良になっているか、帯域幅設定が高すぎます。
-	</text>
-	<text name="network_ping_cause_msg">
-		接続不良になっているか、ファイル共有アプリケーションに問題があります。
-	</text>
-	<text name="server_text_msg">
-		サーバー
-	</text>
-	<text name="server_frame_rate_critical_fps">
-		20
-	</text>
-	<text name="server_frame_rate_warning_fps">
-		30
-	</text>
-	<text name="server_single_process_max_time_ms">
-		20
-	</text>
-	<text name="server_frame_time_critical_msg">
-		シミュレーターのフレームレート: < [SERVER_FRAME_RATE_CRITICAL]
-	</text>
-	<text name="server_frame_time_warning_msg">
-		シミュレーターのフレームレート: [SERVER_FRAME_RATE_CRITICAL] ~ [SERVER_FRAME_RATE_WARNING]
-	</text>
-	<text name="server_frame_time_normal_msg">
-		ノーマル
-	</text>
-	<text name="server_physics_cause_msg">
-		考えられる原因: 物理的オブジェクトが多すぎる
-	</text>
-	<text name="server_scripts_cause_msg">
-		考えられる原因: スクリプトを含むオブジェクトが多すぎる
-	</text>
-	<text name="server_net_cause_msg">
-		考えられる原因: ネットワーク トラフィック過大
-	</text>
-	<text name="server_agent_cause_msg">
-		考えられる原因: 地域内にて動いているアバターが多すぎる
-	</text>
-	<text name="server_images_cause_msg">
-		考えられる原因: 画像計算が多すぎる
-	</text>
-	<text name="server_generic_cause_msg">
-		考えられる原因: シミュレーターの過負荷
-	</text>
-	<text name="smaller_label">
-		&gt;&gt; 
-	</text>
-	<text name="bigger_label">
-		&lt;&lt; 
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_lagmeter" title="ラグ メーター">
+	<button name="client_lagmeter" tool_tip="クライアント ラグ ステータス" />
+	<text name="client">
+		クライアント:
+	</text>
+	<text name="client_text">
+		ノーマル
+	</text>
+	<button name="network_lagmeter" tool_tip="ネットワーク ラグ ステータス" />
+	<text name="network">
+		ネットワーク:
+	</text>
+	<text name="network_text">
+		ノーマル
+	</text>
+	<button name="server_lagmeter" tool_tip="サーバー ラグ ステータス" />
+	<text name="server">
+		サーバー:
+	</text>
+	<text name="server_text">
+		ノーマル
+	</text>
+	<button label="?" name="server_help" />
+	<button label="&gt;&gt; " name="minimize" />
+	<text name="max_title_msg">
+		ラグ メーター
+	</text>
+	<text name="max_width_px">
+		350
+	</text>
+	<text name="min_title_msg">
+		ラグ
+	</text>
+	<text name="min_width_px">
+		90
+	</text>
+	<text name="client_text_msg">
+		クライアント
+	</text>
+	<text name="client_frame_rate_critical_fps">
+		10
+	</text>
+	<text name="client_frame_rate_warning_fps">
+		15
+	</text>
+	<text name="client_frame_time_window_bg_msg">
+		ノーマル、ウィンドウは背景に
+	</text>
+	<text name="client_frame_time_critical_msg">
+		クライアント フレームレート < [CLIENT_FRAME_RATE_CRITICAL]
+	</text>
+	<text name="client_frame_time_warning_msg">
+		クライアント フレームレート: [CLIENT_FRAME_RATE_CRITICAL] ~ [CLIENT_FRAME_RATE_WARNING]
+	</text>
+	<text name="client_frame_time_normal_msg">
+		ノーマル
+	</text>
+	<text name="client_draw_distance_cause_msg">
+		考えられる原因: 描画距離の設定が大きすぎる
+	</text>
+	<text name="client_texture_loading_cause_msg">
+		考えられる原因: 画像のロード中
+	</text>
+	<text name="client_texture_memory_cause_msg">
+		考えられる原因: メモリ内の画像数が多すぎる
+	</text>
+	<text name="client_complex_objects_cause_msg">
+		考えられる原因: 画面に含まれる複雑なオブジェクトが多すぎる
+	</text>
+	<text name="network_text_msg">
+		ネットワーク
+	</text>
+	<text name="network_packet_loss_critical_pct">
+		10
+	</text>
+	<text name="network_packet_loss_warning_pct">
+		5
+	</text>
+	<text name="network_packet_loss_critical_msg">
+		接続でドロップされるパケットの割合: > [NETWORK_PACKET_LOSS_CRITICAL]
+	</text>
+	<text name="network_packet_loss_warning_msg">
+		接続でドロップされるパケットの割合:[NETWORK_PACKET_LOSS_WARNING] ~ [NETWORK_PACKET_LOSS_CRITICAL]
+	</text>
+	<text name="network_performance_normal_msg">
+		ノーマル
+	</text>
+	<text name="network_ping_critical_ms">
+		600
+	</text>
+	<text name="network_ping_warning_ms">
+		300
+	</text>
+	<text name="network_ping_critical_msg">
+		接続の ping 時間: > [NETWORK_PING_CRITICAL] ミリ秒
+	</text>
+	<text name="network_ping_warning_msg">
+		接続の ping 時間: [NETWORK_PING_WARNING] ~ [NETWORK_PING_CRITICAL] ミリ秒
+	</text>
+	<text name="network_packet_loss_cause_msg">
+		接続不良になっているか、帯域幅設定が高すぎます。
+	</text>
+	<text name="network_ping_cause_msg">
+		接続不良になっているか、ファイル共有アプリケーションに問題があります。
+	</text>
+	<text name="server_text_msg">
+		サーバー
+	</text>
+	<text name="server_frame_rate_critical_fps">
+		20
+	</text>
+	<text name="server_frame_rate_warning_fps">
+		30
+	</text>
+	<text name="server_single_process_max_time_ms">
+		20
+	</text>
+	<text name="server_frame_time_critical_msg">
+		シミュレーターのフレームレート: < [SERVER_FRAME_RATE_CRITICAL]
+	</text>
+	<text name="server_frame_time_warning_msg">
+		シミュレーターのフレームレート: [SERVER_FRAME_RATE_CRITICAL] ~ [SERVER_FRAME_RATE_WARNING]
+	</text>
+	<text name="server_frame_time_normal_msg">
+		ノーマル
+	</text>
+	<text name="server_physics_cause_msg">
+		考えられる原因: 物理的オブジェクトが多すぎる
+	</text>
+	<text name="server_scripts_cause_msg">
+		考えられる原因: スクリプトを含むオブジェクトが多すぎる
+	</text>
+	<text name="server_net_cause_msg">
+		考えられる原因: ネットワーク トラフィック過大
+	</text>
+	<text name="server_agent_cause_msg">
+		考えられる原因: 地域内にて動いているアバターが多すぎる
+	</text>
+	<text name="server_images_cause_msg">
+		考えられる原因: 画像計算が多すぎる
+	</text>
+	<text name="server_generic_cause_msg">
+		考えられる原因: シミュレーターの過負荷
+	</text>
+	<text name="smaller_label">
+		&gt;&gt; 
+	</text>
+	<text name="bigger_label">
+		&lt;&lt; 
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_lsl_guide.xml b/indra/newview/skins/default/xui/ja/floater_lsl_guide.xml
index dbfce5d07c..55eba966dc 100644
--- a/indra/newview/skins/default/xui/ja/floater_lsl_guide.xml
+++ b/indra/newview/skins/default/xui/ja/floater_lsl_guide.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="script ed float" title="LSL Wiki">
-	<check_box label="カーソルを追う" name="lock_check" />
-	<combo_box label="ロック" name="history_combo" />
-	<button label="戻る" name="back_btn" />
-	<button label="進む" name="fwd_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="script ed float" title="LSL Wiki">
+	<check_box label="カーソルを追う" name="lock_check" />
+	<combo_box label="ロック" name="history_combo" />
+	<button label="戻る" name="back_btn" />
+	<button label="進む" name="fwd_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_media_browser.xml b/indra/newview/skins/default/xui/ja/floater_media_browser.xml
index ff9702a99d..6877cc7f53 100644
--- a/indra/newview/skins/default/xui/ja/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/ja/floater_media_browser.xml
@@ -1,19 +1,19 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_about" title="メディア・ブラウザ">
-	<layout_stack name="stack1">
-		<layout_panel name="nav_controls">
-			<button label="戻る" name="back" />
-			<button label="進む" name="forward" />
-			<button label="更新" name="reload" />
-			<button label="閲覧" name="go" />
-		</layout_panel>
-		<layout_panel name="parcel_owner_controls">
-			<button label="現在の URL を区画に送信" name="assign" />
-		</layout_panel>
-		<layout_panel name="external_controls">
-			<button label="外部ウェブ・ブラウザで開く" name="open_browser" />
-			<check_box label="常に外部のウェブ・ブラウザで開く" name="open_always" />
-			<button label="閉じる" name="close" />
-		</layout_panel>
-	</layout_stack>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_about" title="メディア・ブラウザ">
+	<layout_stack name="stack1">
+		<layout_panel name="nav_controls">
+			<button label="戻る" name="back" />
+			<button label="進む" name="forward" />
+			<button label="更新" name="reload" />
+			<button label="閲覧" name="go" />
+		</layout_panel>
+		<layout_panel name="parcel_owner_controls">
+			<button label="現在の URL を区画に送信" name="assign" />
+		</layout_panel>
+		<layout_panel name="external_controls">
+			<button label="外部ウェブ・ブラウザで開く" name="open_browser" />
+			<check_box label="常に外部のウェブ・ブラウザで開く" name="open_always" />
+			<button label="閉じる" name="close" />
+		</layout_panel>
+	</layout_stack>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_mem_leaking.xml b/indra/newview/skins/default/xui/ja/floater_mem_leaking.xml
index 8cf2e00a9a..4d6b6ca70a 100644
--- a/indra/newview/skins/default/xui/ja/floater_mem_leaking.xml
+++ b/indra/newview/skins/default/xui/ja/floater_mem_leaking.xml
@@ -1,19 +1,19 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="MemLeak" title="メモリ・リーク・シミュレーション">
-	<spinner label="リークスピード(1フレームごとのバイト数):"
-	     name="leak_speed"  label_width="244" />
-	<spinner label="リークした最大メモリ数(MB):" name="max_leak"  label_width="244" />
-	<text name="total_leaked_label">
-		現在のリークメモリサイズ: [SIZE] KB
-	</text>
-	<text name="note_label_1">
-		[NOTE1]
-	</text>
-	<text name="note_label_2">
-		[NOTE2]
-	</text>
-	<button label="開始" name="start_btn" />
-	<button label="停止" name="stop_btn" />
-	<button label="解放" name="release_btn" />
-	<button label="閉じる" name="close_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="MemLeak" title="メモリ・リーク・シミュレーション">
+	<spinner label="リークスピード(1フレームごとのバイト数):"
+	     name="leak_speed"  label_width="244" />
+	<spinner label="リークした最大メモリ数(MB):" name="max_leak"  label_width="244" />
+	<text name="total_leaked_label">
+		現在のリークメモリサイズ: [SIZE] KB
+	</text>
+	<text name="note_label_1">
+		[NOTE1]
+	</text>
+	<text name="note_label_2">
+		[NOTE2]
+	</text>
+	<button label="開始" name="start_btn" />
+	<button label="停止" name="stop_btn" />
+	<button label="解放" name="release_btn" />
+	<button label="閉じる" name="close_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_mute_object.xml b/indra/newview/skins/default/xui/ja/floater_mute_object.xml
index c32d68405c..072bb4a576 100644
--- a/indra/newview/skins/default/xui/ja/floater_mute_object.xml
+++ b/indra/newview/skins/default/xui/ja/floater_mute_object.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="mute by name" title="オブジェクト名で無視する">
-	<text name="message">
-		テキストのみに影響し、サウンド(環境音など)には影響しません。
-正確なオブジェクト名を入力してください。
-	</text>
-	<line_editor name="object_name">
-		オブジェクト名
-	</line_editor>
-	<button label="OK" name="OK" />
-	<button label="キャンセル" name="Cancel" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="mute by name" title="オブジェクト名で無視する">
+	<text name="message">
+		テキストのみに影響し、サウンド(環境音など)には影響しません。
+正確なオブジェクト名を入力してください。
+	</text>
+	<line_editor name="object_name">
+		オブジェクト名
+	</line_editor>
+	<button label="OK" name="OK" />
+	<button label="キャンセル" name="Cancel" />
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_my_friends.xml b/indra/newview/skins/default/xui/ja/floater_my_friends.xml
index e28029ba1f..10e55f0655 100644
--- a/indra/newview/skins/default/xui/ja/floater_my_friends.xml
+++ b/indra/newview/skins/default/xui/ja/floater_my_friends.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="floater_my_friends" title="連絡先" min_width="500">
-	<tab_container name="friends_and_groups">
-		<panel label="フレンド" name="friends_panel" />
-		<panel label="グループ" name="groups_panel" />
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_my_friends" title="連絡先" min_width="500">
+	<tab_container name="friends_and_groups">
+		<panel label="フレンド" name="friends_panel" />
+		<panel label="グループ" name="groups_panel" />
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_post_process.xml b/indra/newview/skins/default/xui/ja/floater_post_process.xml
index 0ada3d128a..7c4d9c78ee 100644
--- a/indra/newview/skins/default/xui/ja/floater_post_process.xml
+++ b/indra/newview/skins/default/xui/ja/floater_post_process.xml
@@ -1,54 +1,54 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Post-Process Floater" title="ポストプロセス設定">
-	<tab_container name="Post-Process Tabs">
-		<panel label="カラー・フィルター" name="wmiColorFilterPanel">
-			<check_box label="有効" name="wmiColorFilterToggle" />
-			<text name="wmiColorFilterBrightnessText">
-				明るさ
-			</text>
-			<text name="wmiColorFilterSaturationText">
-				彩度
-			</text>
-			<text name="wmiColorFilterContrastText">
-				コントラスト
-			</text>
-			<text name="wmiColorFilterBaseText">
-				コントラストの基本色
-			</text>
-			<slider label="R" name="wmiColorFilterBaseR" />
-			<slider label="G" name="wmiColorFilterBaseG" />
-			<slider label="B" name="wmiColorFilterBaseB" />
-			<slider label="I" name="wmiColorFilterBaseI" />
-		</panel>
-		<panel label="ナイトビジョン" name="wmiNightVisionPanel">
-			<check_box label="有効" name="wmiNightVisionToggle" />
-			<text name="wmiNightVisionBrightMultText">
-				光の増幅(マルチ)
-			</text>
-			<text name="wmiNightVisionNoiseSizeText">
-				ノイズ・サイズ
-			</text>
-			<text name="wmiNightVisionNoiseStrengthText">
-				ノイズ強度
-			</text>
-		</panel>
-		<panel label="ブルーム" name="wmiBloomPanel">
-			<check_box label="有効" name="wmiBloomToggle" />
-			<text name="wmiBloomExtractText">
-				明度の抽出
-			</text>
-			<text name="wmiBloomSizeText">
-				ブルーム・サイズ
-			</text>
-			<text name="wmiBloomStrengthText">
-				ブルーム強度
-			</text>
-		</panel>
-		<panel label="その他" name="Extras">
-			<button label="効果読み込み" label_selected="効果読み込み"
-			     name="PPLoadEffect" />
-			<button label="効果保存" label_selected="効果保存" name="PPSaveEffect" />
-			<line_editor label="効果名" name="PPEffectNameEditor" />
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Post-Process Floater" title="ポストプロセス設定">
+	<tab_container name="Post-Process Tabs">
+		<panel label="カラー・フィルター" name="wmiColorFilterPanel">
+			<check_box label="有効" name="wmiColorFilterToggle" />
+			<text name="wmiColorFilterBrightnessText">
+				明るさ
+			</text>
+			<text name="wmiColorFilterSaturationText">
+				彩度
+			</text>
+			<text name="wmiColorFilterContrastText">
+				コントラスト
+			</text>
+			<text name="wmiColorFilterBaseText">
+				コントラストの基本色
+			</text>
+			<slider label="R" name="wmiColorFilterBaseR" />
+			<slider label="G" name="wmiColorFilterBaseG" />
+			<slider label="B" name="wmiColorFilterBaseB" />
+			<slider label="I" name="wmiColorFilterBaseI" />
+		</panel>
+		<panel label="ナイトビジョン" name="wmiNightVisionPanel">
+			<check_box label="有効" name="wmiNightVisionToggle" />
+			<text name="wmiNightVisionBrightMultText">
+				光の増幅(マルチ)
+			</text>
+			<text name="wmiNightVisionNoiseSizeText">
+				ノイズ・サイズ
+			</text>
+			<text name="wmiNightVisionNoiseStrengthText">
+				ノイズ強度
+			</text>
+		</panel>
+		<panel label="ブルーム" name="wmiBloomPanel">
+			<check_box label="有効" name="wmiBloomToggle" />
+			<text name="wmiBloomExtractText">
+				明度の抽出
+			</text>
+			<text name="wmiBloomSizeText">
+				ブルーム・サイズ
+			</text>
+			<text name="wmiBloomStrengthText">
+				ブルーム強度
+			</text>
+		</panel>
+		<panel label="その他" name="Extras">
+			<button label="効果読み込み" label_selected="効果読み込み"
+			     name="PPLoadEffect" />
+			<button label="効果保存" label_selected="効果保存" name="PPSaveEffect" />
+			<line_editor label="効果名" name="PPEffectNameEditor" />
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_preview_classified.xml b/indra/newview/skins/default/xui/ja/floater_preview_classified.xml
index a58d131fa3..f0770b2ed5 100644
--- a/indra/newview/skins/default/xui/ja/floater_preview_classified.xml
+++ b/indra/newview/skins/default/xui/ja/floater_preview_classified.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="classified_preview" title="クラシファイド広告情報" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="classified_preview" title="クラシファイド広告情報" />
diff --git a/indra/newview/skins/default/xui/ja/floater_preview_event.xml b/indra/newview/skins/default/xui/ja/floater_preview_event.xml
index 7f49c27b2b..9ecabfabb0 100644
--- a/indra/newview/skins/default/xui/ja/floater_preview_event.xml
+++ b/indra/newview/skins/default/xui/ja/floater_preview_event.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="event_preview" title="イベント情報" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="event_preview" title="イベント情報" />
diff --git a/indra/newview/skins/default/xui/ja/floater_region_info.xml b/indra/newview/skins/default/xui/ja/floater_region_info.xml
index 78fab8b26a..7ac7facce5 100644
--- a/indra/newview/skins/default/xui/ja/floater_region_info.xml
+++ b/indra/newview/skins/default/xui/ja/floater_region_info.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="regioninfo" title="地域/不動産" />
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="regioninfo" title="地域/不動産" />
diff --git a/indra/newview/skins/default/xui/ja/floater_select_key.xml b/indra/newview/skins/default/xui/ja/floater_select_key.xml
index 496faddbbb..09c98add47 100644
--- a/indra/newview/skins/default/xui/ja/floater_select_key.xml
+++ b/indra/newview/skins/default/xui/ja/floater_select_key.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="modal container">
-	<button label="キャンセル" label_selected="キャンセル" name="Cancel" />
-	<text name="Save item as:">
-		キーを押して選択
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="modal container">
+	<button label="キャンセル" label_selected="キャンセル" name="Cancel" />
+	<text name="Save item as:">
+		キーを押して選択
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_sell_land.xml b/indra/newview/skins/default/xui/ja/floater_sell_land.xml
index 1db0e2ad0e..3ca55621ac 100644
--- a/indra/newview/skins/default/xui/ja/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/ja/floater_sell_land.xml
@@ -34,15 +34,15 @@
 		誰にでも販売するか、特定の人にのみ販売するかを選択してください
 	</text>
 	<combo_box name="sell_to">
-		<combo_item name="--selectone--">
+		<combo_box.item name="--selectone--">
 			--1つ選択--
-		</combo_item>
-		<combo_item name="Anyone">
+		</combo_box.item>
+		<combo_box.item name="Anyone">
 			誰でも
-		</combo_item>
-		<combo_item name="Specificuser:">
+		</combo_box.item>
+		<combo_box.item name="Specificuser:">
 			特定ユーザー:
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<button label="選択..." name="sell_to_select_agent" />
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/ja/floater_settings_debug.xml b/indra/newview/skins/default/xui/ja/floater_settings_debug.xml
index 1de3763f79..46d949ad81 100644
--- a/indra/newview/skins/default/xui/ja/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/ja/floater_settings_debug.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater name="settings_debug" title="デバッグ設定">
 	<combo_box name="boolean_combo">
-		<combo_item name="TRUE">
+		<combo_box.item name="TRUE">
 			正
-		</combo_item>
-		<combo_item name="FALSE">
+		</combo_box.item>
+		<combo_box.item name="FALSE">
 			誤
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<color_swatch label="色" name="color_swatch" />
 	<spinner label="x" name="val_spinner_1" />
diff --git a/indra/newview/skins/default/xui/ja/floater_snapshot.xml b/indra/newview/skins/default/xui/ja/floater_snapshot.xml
index 7937de117c..91bc489d3b 100644
--- a/indra/newview/skins/default/xui/ja/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/ja/floater_snapshot.xml
@@ -21,12 +21,12 @@
 	<button label="送信" name="send_btn"/>
 	<button label="保存(L$[AMOUNT])" name="upload_btn"/>
 	<flyout_button label="保存" name="save_btn" tool_tip="画像をファイルに保存">
-		<flyout_button_item name="save_item">
-			保存
-		</flyout_button_item>
-		<flyout_button_item name="saveas_item">
-			名前を付けて保存
-		</flyout_button_item>
+    <flyout_button.item name="save_item">
+      保存
+    </flyout_button.item>
+    <flyout_button.item name="saveas_item">
+      名前を付けて保存
+    </flyout_button.item>
 	</flyout_button>
 	<button label="キャンセル" name="discard_btn"/>
 	<button label="全表示 &gt;&gt;" name="more_btn" tool_tip="高度なオプション"/>
@@ -38,75 +38,75 @@
 		形式
 	</text>
 	<combo_box label="解像度" name="postcard_size_combo">
-		<combo_item name="CurrentWindow">
+		<combo_box.item name="CurrentWindow">
 			現在のウィンドウ
-		</combo_item>
-		<combo_item name="640x480">
+		</combo_box.item>
+		<combo_box.item name="640x480">
 			640x480
-		</combo_item>
-		<combo_item name="800x600">
+		</combo_box.item>
+		<combo_box.item name="800x600">
 			800x600
-		</combo_item>
-		<combo_item name="1024x768">
+		</combo_box.item>
+		<combo_box.item name="1024x768">
 			1024x768
-		</combo_item>
-		<combo_item name="Custom">
+		</combo_box.item>
+		<combo_box.item name="Custom">
 			カスタム
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="解像度" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
+		<combo_box.item name="CurrentWindow">
 			現在のウィンドウ
-		</combo_item>
-		<combo_item name="Small(128x128)">
+		</combo_box.item>
+		<combo_box.item name="Small(128x128)">
 			小(128x128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
+		</combo_box.item>
+		<combo_box.item name="Medium(256x256)">
 			中(256x256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
+		</combo_box.item>
+		<combo_box.item name="Large(512x512)">
 			大(512x512)
-		</combo_item>
-		<combo_item name="Custom">
+		</combo_box.item>
+		<combo_box.item name="Custom">
 			カスタム
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="解像度" name="local_size_combo">
-		<combo_item name="CurrentWindow">
+		<combo_box.item name="CurrentWindow">
 			現在のウィンドウ
-		</combo_item>
-		<combo_item name="320x240">
+		</combo_box.item>
+		<combo_box.item name="320x240">
 			320x240
-		</combo_item>
-		<combo_item name="640x480">
+		</combo_box.item>
+		<combo_box.item name="640x480">
 			640x480
-		</combo_item>
-		<combo_item name="800x600">
+		</combo_box.item>
+		<combo_box.item name="800x600">
 			800x600
-		</combo_item>
-		<combo_item name="1024x768">
+		</combo_box.item>
+		<combo_box.item name="1024x768">
 			1024x768
-		</combo_item>
-		<combo_item name="1280x1024">
+		</combo_box.item>
+		<combo_box.item name="1280x1024">
 			1280x1024
-		</combo_item>
-		<combo_item name="1600x1200">
+		</combo_box.item>
+		<combo_box.item name="1600x1200">
 			1600x1200
-		</combo_item>
-		<combo_item name="Custom">
+		</combo_box.item>
+		<combo_box.item name="Custom">
 			カスタム
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="形式" name="local_format_combo">
-		<combo_item name="PNG">
+		<combo_box.item name="PNG">
 			PNG
-		</combo_item>
-		<combo_item name="JPEG">
+		</combo_box.item>
+		<combo_box.item name="JPEG">
 			JPEG
-		</combo_item>
-		<combo_item name="BMP">
+		</combo_box.item>
+		<combo_box.item name="BMP">
 			BMP
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<spinner label="幅" name="snapshot_width" label_width="25" width="90"/>
 	<spinner label="高さ" name="snapshot_height" label_width="30" left="115" width="90"/>
@@ -116,15 +116,15 @@
 		キャプチャ:
 	</text>
 	<combo_box label="画像レイヤー" name="layer_types">
-		<combo_item name="Colors">
+		<combo_box.item name="Colors">
 			色
-		</combo_item>
-		<combo_item name="Depth">
+		</combo_box.item>
+		<combo_box.item name="Depth">
 			深さ
-		</combo_item>
-		<combo_item name="ObjectMattes">
+		</combo_box.item>
+		<combo_box.item name="ObjectMattes">
 			オグジェクトのつや消し
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<check_box label="インタフェースを表示" name="ui_check"/>
 	<check_box label="HUD オブジェクトを表示" name="hud_check"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_url_entry.xml b/indra/newview/skins/default/xui/ja/floater_url_entry.xml
index 9b0f2dbf11..9d3ca20c7c 100644
--- a/indra/newview/skins/default/xui/ja/floater_url_entry.xml
+++ b/indra/newview/skins/default/xui/ja/floater_url_entry.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="url_entry">
-	<text name="media_label">
-		メディア URL:
-	</text>
-	<combo_box left="100" name="media_entry" width="360" />
-	<button label="OK" name="ok_btn" width="78"/>
-	<button label="キャンセル" name="cancel_btn" width="80"/>
-	<button label="クリア" name="clear_btn" />
-	<text name="loading_label">
-		ロード中...
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="url_entry">
+	<text name="media_label">
+		メディア URL:
+	</text>
+	<combo_box left="100" name="media_entry" width="360" />
+	<button label="OK" name="ok_btn" width="78"/>
+	<button label="キャンセル" name="cancel_btn" width="80"/>
+	<button label="クリア" name="clear_btn" />
+	<text name="loading_label">
+		ロード中...
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_water.xml b/indra/newview/skins/default/xui/ja/floater_water.xml
index 91094e2d7f..054b003197 100644
--- a/indra/newview/skins/default/xui/ja/floater_water.xml
+++ b/indra/newview/skins/default/xui/ja/floater_water.xml
@@ -1,89 +1,89 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Water Floater" title="水の高度な編集">
-	<text name="KeyFramePresetsText">
-		水の事前設定:
-	</text>
-	<button label="新規" label_selected="新規" name="WaterNewPreset" />
-	<button label="保存" label_selected="保存" name="WaterSavePreset" />
-	<button label="削除" label_selected="削除" name="WaterDeletePreset" />
-	<tab_container name="Water Tabs">
-		<panel label="設定" name="Settings">
-			<text name="BHText">
-				水中のフォグ効果の色
-			</text>
-			<button label="?" name="WaterFogColorHelp" />
-			<color_swatch name="WaterFogColor"
-			     tool_tip="カラー・ピッカーをクリックして開く" />
-			<text name="WaterFogDensText">
-				水中の透明度指数
-			</text>
-			<button label="?" name="WaterFogDensityHelp" />
-			<text name="WaterUnderWaterFogModText">
-				水中のフォグ効果加減
-			</text>
-			<button label="?" name="WaterUnderWaterFogModHelp" />
-			<text name="BDensText">
-				さざ波の反射スケール
-			</text>
-			<button label="?" name="WaterNormalScaleHelp" />
-			<text name="BHText2">
-				1
-			</text>
-			<text name="BHText3">
-				2
-			</text>
-			<text name="BHText4">
-				3
-			</text>
-			<text name="HDText">
-				フレネル・スケール
-			</text>
-			<button label="?" name="WaterFresnelScaleHelp" />
-			<text name="FresnelOffsetText">
-				フレネル・オフセット
-			</text>
-			<button label="?" name="WaterFresnelOffsetHelp" />
-			<text name="DensMultText">
-				水面の屈折スケール
-			</text>
-			<button label="?" name="WaterScaleAboveHelp" />
-			<text name="WaterScaleBelowText">
-				水中の屈折スケール
-			</text>
-			<button label="?" name="WaterScaleBelowHelp" />
-			<text name="MaxAltText">
-				不透明度の増幅
-			</text>
-			<button label="?" name="WaterBlurMultiplierHelp" />
-		</panel>
-		<panel label="画像" name="Waves">
-			<text name="BHText">
-				大波の方向
-			</text>
-			<button label="?" name="WaterWave1Help" />
-			<text name="WaterWave1DirXText">
-				X
-			</text>
-			<text name="WaterWave1DirYText">
-				Y
-			</text>
-			<text name="BHText2">
-				小波の方向
-			</text>
-			<button label="?" name="WaterWave2Help" />
-			<text name="WaterWave2DirXText">
-				X
-			</text>
-			<text name="WaterWave2DirYText">
-				Y
-			</text>
-			<text name="BHText3">
-				ノーマル・マップ
-			</text>
-			<button label="?" name="WaterNormalMapHelp" />
-		</panel>
-	</tab_container>
-	<string name="WLDefaultWaterNames">
-		Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Water Floater" title="水の高度な編集">
+	<text name="KeyFramePresetsText">
+		水の事前設定:
+	</text>
+	<button label="新規" label_selected="新規" name="WaterNewPreset" />
+	<button label="保存" label_selected="保存" name="WaterSavePreset" />
+	<button label="削除" label_selected="削除" name="WaterDeletePreset" />
+	<tab_container name="Water Tabs">
+		<panel label="設定" name="Settings">
+			<text name="BHText">
+				水中のフォグ効果の色
+			</text>
+			<button label="?" name="WaterFogColorHelp" />
+			<color_swatch name="WaterFogColor"
+			     tool_tip="カラー・ピッカーをクリックして開く" />
+			<text name="WaterFogDensText">
+				水中の透明度指数
+			</text>
+			<button label="?" name="WaterFogDensityHelp" />
+			<text name="WaterUnderWaterFogModText">
+				水中のフォグ効果加減
+			</text>
+			<button label="?" name="WaterUnderWaterFogModHelp" />
+			<text name="BDensText">
+				さざ波の反射スケール
+			</text>
+			<button label="?" name="WaterNormalScaleHelp" />
+			<text name="BHText2">
+				1
+			</text>
+			<text name="BHText3">
+				2
+			</text>
+			<text name="BHText4">
+				3
+			</text>
+			<text name="HDText">
+				フレネル・スケール
+			</text>
+			<button label="?" name="WaterFresnelScaleHelp" />
+			<text name="FresnelOffsetText">
+				フレネル・オフセット
+			</text>
+			<button label="?" name="WaterFresnelOffsetHelp" />
+			<text name="DensMultText">
+				水面の屈折スケール
+			</text>
+			<button label="?" name="WaterScaleAboveHelp" />
+			<text name="WaterScaleBelowText">
+				水中の屈折スケール
+			</text>
+			<button label="?" name="WaterScaleBelowHelp" />
+			<text name="MaxAltText">
+				不透明度の増幅
+			</text>
+			<button label="?" name="WaterBlurMultiplierHelp" />
+		</panel>
+		<panel label="画像" name="Waves">
+			<text name="BHText">
+				大波の方向
+			</text>
+			<button label="?" name="WaterWave1Help" />
+			<text name="WaterWave1DirXText">
+				X
+			</text>
+			<text name="WaterWave1DirYText">
+				Y
+			</text>
+			<text name="BHText2">
+				小波の方向
+			</text>
+			<button label="?" name="WaterWave2Help" />
+			<text name="WaterWave2DirXText">
+				X
+			</text>
+			<text name="WaterWave2DirYText">
+				Y
+			</text>
+			<text name="BHText3">
+				ノーマル・マップ
+			</text>
+			<button label="?" name="WaterNormalMapHelp" />
+		</panel>
+	</tab_container>
+	<string name="WLDefaultWaterNames">
+		Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_windlight_options.xml b/indra/newview/skins/default/xui/ja/floater_windlight_options.xml
index 63e68f9188..fa70de054f 100644
--- a/indra/newview/skins/default/xui/ja/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/ja/floater_windlight_options.xml
@@ -1,190 +1,190 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="WindLight floater" title="空の高度な編集">
-	<text name="KeyFramePresetsText">
-		空の事前設定:
-	</text>
-	<button label="新規" label_selected="新規" name="WLNewPreset" />
-	<button label="保存" label_selected="保存" name="WLSavePreset" />
-	<button label="削除" label_selected="削除" name="WLDeletePreset" />
-	<button label="デイサイクル編集"
-	     label_selected="デイサイクル編集" name="WLDayCycleMenuButton" />
-	<tab_container name="WindLight Tabs">
-		<panel label="大気" name="Atmosphere">
-			<text name="BHText">
-				空の配色
-			</text>
-			<button label="?" name="WLBlueHorizonHelp" />
-			<text name="BHText2">
-				R
-			</text>
-			<text name="BHText3">
-				G
-			</text>
-			<text name="BHText4">
-				B
-			</text>
-			<text name="BHText5">
-				I
-			</text>
-			<text name="BDensText">
-				空と遠景の露光
-			</text>
-			<button label="?" name="WLHazeHorizonHelp" />
-			<text name="BDensText2">
-				空の配色と濃度
-			</text>
-			<button label="?" name="WLBlueDensityHelp" />
-			<text name="BHText6">
-				R
-			</text>
-			<text name="BHText7">
-				G
-			</text>
-			<text name="BHText8">
-				B
-			</text>
-			<text name="BHText9">
-				I
-			</text>
-			<text name="HDText">
-				大気の不透明度
-			</text>
-			<button label="?" name="WLHazeDensityHelp" />
-			<text name="DensMultText">
-				大気の不透明度の増幅
-			</text>
-			<button label="?" name="WLDensityMultHelp" />
-			<text name="WLDistanceMultText">
-				視界の増幅
-			</text>
-			<button label="?" name="WLDistanceMultHelp" />
-			<text name="MaxAltText">
-				最大高度
-			</text>
-			<button label="?" name="WLMaxAltitudeHelp" />
-		</panel>
-		<panel label="ライティング" name="Lighting">
-			<text name="SLCText">
-				太陽/月の色
-			</text>
-			<button label="?" name="WLSunlightColorHelp" />
-			<text name="BHText">
-				R
-			</text>
-			<text name="BHText2">
-				G
-			</text>
-			<text name="BHText3">
-				B
-			</text>
-			<text name="BHText4">
-				I
-			</text>
-			<text name="TODText">
-				太陽/月の位置
-			</text>
-			<button label="?" name="WLTimeOfDayHelp" />
-			<text name="WLAmbientText">
-				アンビエント
-			</text>
-			<button label="?" name="WLAmbientHelp" />
-			<text name="BHText5">
-				R
-			</text>
-			<text name="BHText6">
-				G
-			</text>
-			<text name="BHText7">
-				B
-			</text>
-			<text name="BHText8">
-				I
-			</text>
-			<text name="WLEastAngleText">
-				東の角度
-			</text>
-			<button label="?" name="WLEastAngleHelp" />
-			<text name="SunGlowText">
-				太陽の輝き
-			</text>
-			<button label="?" name="WLSunGlowHelp" />
-			<slider label="フォーカス " name="WLGlowB" />
-			<slider label="サイズ    " name="WLGlowR" />
-			<text name="SceneGammaText">
-				風景ガンマ
-			</text>
-			<button label="?" name="WLSceneGammaHelp" />
-			<text name="WLStarText">
-				星の輝き
-			</text>
-			<button label="?" name="WLStarBrightnessHelp" />
-		</panel>
-		<panel label="雲" name="Clouds">
-			<text name="WLCloudColorText">
-				雲の色
-			</text>
-			<button label="?" name="WLCloudColorHelp" />
-			<text name="BHText">
-				R
-			</text>
-			<text name="BHText2">
-				G
-			</text>
-			<text name="BHText3">
-				B
-			</text>
-			<text name="BHText4">
-				I
-			</text>
-			<text name="WLCloudColorText2">
-				雲の XY/密度
-			</text>
-			<button label="?" name="WLCloudDensityHelp" />
-			<text name="BHText5">
-				X
-			</text>
-			<text name="BHText6">
-				Y
-			</text>
-			<text name="BHText7">
-				D
-			</text>
-			<text name="WLCloudCoverageText">
-				雲の量
-			</text>
-			<button label="?" name="WLCloudCoverageHelp" />
-			<text name="WLCloudScaleText">
-				雲のスケール
-			</text>
-			<button label="?" name="WLCloudScaleHelp" />
-			<text name="WLCloudDetailText">
-				雲の詳細 (XY/密度)
-			</text>
-			<button label="?" name="WLCloudDetailHelp" />
-			<text name="BHText8">
-				X
-			</text>
-			<text name="BHText9">
-				Y
-			</text>
-			<text name="BHText10">
-				D
-			</text>
-			<text name="WLCloudScrollXText">
-				雲の移動速度 (X 方向)
-			</text>
-			<button label="?" name="WLCloudScrollXHelp" />
-			<check_box label="ロック" name="WLCloudLockX" />
-			<text name="WLCloudScrollYText">
-				雲の移動速度 (Y 方向)
-			</text>
-			<button label="?" name="WLCloudScrollYHelp" />
-			<check_box label="ロック" name="WLCloudLockY" />
-			<check_box label="従来の雲を描画" name="DrawClassicClouds" />
-			<button label="?" name="WLClassicCloudsHelp" />
-		</panel>
-	</tab_container>
-	<string name="WLDefaultSkyNames">
-		A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="WindLight floater" title="空の高度な編集">
+	<text name="KeyFramePresetsText">
+		空の事前設定:
+	</text>
+	<button label="新規" label_selected="新規" name="WLNewPreset" />
+	<button label="保存" label_selected="保存" name="WLSavePreset" />
+	<button label="削除" label_selected="削除" name="WLDeletePreset" />
+	<button label="デイサイクル編集"
+	     label_selected="デイサイクル編集" name="WLDayCycleMenuButton" />
+	<tab_container name="WindLight Tabs">
+		<panel label="大気" name="Atmosphere">
+			<text name="BHText">
+				空の配色
+			</text>
+			<button label="?" name="WLBlueHorizonHelp" />
+			<text name="BHText2">
+				R
+			</text>
+			<text name="BHText3">
+				G
+			</text>
+			<text name="BHText4">
+				B
+			</text>
+			<text name="BHText5">
+				I
+			</text>
+			<text name="BDensText">
+				空と遠景の露光
+			</text>
+			<button label="?" name="WLHazeHorizonHelp" />
+			<text name="BDensText2">
+				空の配色と濃度
+			</text>
+			<button label="?" name="WLBlueDensityHelp" />
+			<text name="BHText6">
+				R
+			</text>
+			<text name="BHText7">
+				G
+			</text>
+			<text name="BHText8">
+				B
+			</text>
+			<text name="BHText9">
+				I
+			</text>
+			<text name="HDText">
+				大気の不透明度
+			</text>
+			<button label="?" name="WLHazeDensityHelp" />
+			<text name="DensMultText">
+				大気の不透明度の増幅
+			</text>
+			<button label="?" name="WLDensityMultHelp" />
+			<text name="WLDistanceMultText">
+				視界の増幅
+			</text>
+			<button label="?" name="WLDistanceMultHelp" />
+			<text name="MaxAltText">
+				最大高度
+			</text>
+			<button label="?" name="WLMaxAltitudeHelp" />
+		</panel>
+		<panel label="ライティング" name="Lighting">
+			<text name="SLCText">
+				太陽/月の色
+			</text>
+			<button label="?" name="WLSunlightColorHelp" />
+			<text name="BHText">
+				R
+			</text>
+			<text name="BHText2">
+				G
+			</text>
+			<text name="BHText3">
+				B
+			</text>
+			<text name="BHText4">
+				I
+			</text>
+			<text name="TODText">
+				太陽/月の位置
+			</text>
+			<button label="?" name="WLTimeOfDayHelp" />
+			<text name="WLAmbientText">
+				アンビエント
+			</text>
+			<button label="?" name="WLAmbientHelp" />
+			<text name="BHText5">
+				R
+			</text>
+			<text name="BHText6">
+				G
+			</text>
+			<text name="BHText7">
+				B
+			</text>
+			<text name="BHText8">
+				I
+			</text>
+			<text name="WLEastAngleText">
+				東の角度
+			</text>
+			<button label="?" name="WLEastAngleHelp" />
+			<text name="SunGlowText">
+				太陽の輝き
+			</text>
+			<button label="?" name="WLSunGlowHelp" />
+			<slider label="フォーカス " name="WLGlowB" />
+			<slider label="サイズ    " name="WLGlowR" />
+			<text name="SceneGammaText">
+				風景ガンマ
+			</text>
+			<button label="?" name="WLSceneGammaHelp" />
+			<text name="WLStarText">
+				星の輝き
+			</text>
+			<button label="?" name="WLStarBrightnessHelp" />
+		</panel>
+		<panel label="雲" name="Clouds">
+			<text name="WLCloudColorText">
+				雲の色
+			</text>
+			<button label="?" name="WLCloudColorHelp" />
+			<text name="BHText">
+				R
+			</text>
+			<text name="BHText2">
+				G
+			</text>
+			<text name="BHText3">
+				B
+			</text>
+			<text name="BHText4">
+				I
+			</text>
+			<text name="WLCloudColorText2">
+				雲の XY/密度
+			</text>
+			<button label="?" name="WLCloudDensityHelp" />
+			<text name="BHText5">
+				X
+			</text>
+			<text name="BHText6">
+				Y
+			</text>
+			<text name="BHText7">
+				D
+			</text>
+			<text name="WLCloudCoverageText">
+				雲の量
+			</text>
+			<button label="?" name="WLCloudCoverageHelp" />
+			<text name="WLCloudScaleText">
+				雲のスケール
+			</text>
+			<button label="?" name="WLCloudScaleHelp" />
+			<text name="WLCloudDetailText">
+				雲の詳細 (XY/密度)
+			</text>
+			<button label="?" name="WLCloudDetailHelp" />
+			<text name="BHText8">
+				X
+			</text>
+			<text name="BHText9">
+				Y
+			</text>
+			<text name="BHText10">
+				D
+			</text>
+			<text name="WLCloudScrollXText">
+				雲の移動速度 (X 方向)
+			</text>
+			<button label="?" name="WLCloudScrollXHelp" />
+			<check_box label="ロック" name="WLCloudLockX" />
+			<text name="WLCloudScrollYText">
+				雲の移動速度 (Y 方向)
+			</text>
+			<button label="?" name="WLCloudScrollYHelp" />
+			<check_box label="ロック" name="WLCloudLockY" />
+			<check_box label="従来の雲を描画" name="DrawClassicClouds" />
+			<button label="?" name="WLClassicCloudsHelp" />
+		</panel>
+	</tab_container>
+	<string name="WLDefaultSkyNames">
+		A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_world_map.xml b/indra/newview/skins/default/xui/ja/floater_world_map.xml
index 026247f752..0038f995b4 100644
--- a/indra/newview/skins/default/xui/ja/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/ja/floater_world_map.xml
@@ -50,15 +50,15 @@
 	<check_box label="" name="event_mature_chk" />
 	<combo_box label="オンラインのフレンド" name="friend combo"
 	     tool_tip="Friend to Show on Map">
-		<combo_item name="none_selected">
+		<combo_box.item name="none_selected">
 			オンラインのフレンド
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="ランドマーク" name="landmark combo"
 	     tool_tip="Landmark to Show on Map">
-		<combo_item name="none_selected">
+		<combo_box.item name="none_selected">
 			ランドマーク
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<line_editor label="地域名で検索" name="location"
 	     tool_tip="地域名を入力してください。" />
diff --git a/indra/newview/skins/default/xui/ja/menu_login.xml b/indra/newview/skins/default/xui/ja/menu_login.xml
index ecad945e76..1ebc9d1c88 100644
--- a/indra/newview/skins/default/xui/ja/menu_login.xml
+++ b/indra/newview/skins/default/xui/ja/menu_login.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu_bar name="Login Menu">
-	<menu label="ファイル" name="File">
-		<menu_item_call label="終了" name="Quit" />
-	</menu>
-	<menu label="編集" name="Edit">
-		<menu_item_call label="環境設定..." name="Preferences..." />
-	</menu>
-	<menu label="ヘルプ" name="Help">
-		<menu_item_call label="セカンドライフヘルプ" name="Second Life Help" />
-		<menu_item_call label="Second Lifeについて..." name="About Second Life..." />
-	</menu>
-</menu_bar>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu_bar name="Login Menu">
+	<menu label="ファイル" name="File">
+		<menu_item_call label="終了" name="Quit" />
+	</menu>
+	<menu label="編集" name="Edit">
+		<menu_item_call label="環境設定..." name="Preferences..." />
+	</menu>
+	<menu label="ヘルプ" name="Help">
+		<menu_item_call label="セカンドライフヘルプ" name="Second Life Help" />
+		<menu_item_call label="Second Lifeについて..." name="About Second Life..." />
+	</menu>
+</menu_bar>
diff --git a/indra/newview/skins/default/xui/ja/menu_slurl.xml b/indra/newview/skins/default/xui/ja/menu_slurl.xml
index 5007773c89..6d15563382 100644
--- a/indra/newview/skins/default/xui/ja/menu_slurl.xml
+++ b/indra/newview/skins/default/xui/ja/menu_slurl.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<menu name="Popup">
-	<menu_item_call label="URLについて" name="about_url" />
-	<menu_item_call label="URLへテレポートする" name="teleport_to_url" />
-	<menu_item_call label="地図上に表示" name="show_on_map" />
-</menu>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu name="Popup">
+	<menu_item_call label="URLについて" name="about_url" />
+	<menu_item_call label="URLへテレポートする" name="teleport_to_url" />
+	<menu_item_call label="地図上に表示" name="show_on_map" />
+</menu>
diff --git a/indra/newview/skins/default/xui/ja/mime_types.xml b/indra/newview/skins/default/xui/ja/mime_types.xml
index 3d5f43a805..2f945b2010 100644
--- a/indra/newview/skins/default/xui/ja/mime_types.xml
+++ b/indra/newview/skins/default/xui/ja/mime_types.xml
@@ -1,230 +1,230 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<mimetypes name="default">
-	<widgetset name="web">
-		<label name="web_label">
-			ウェブ・コンテンツ
-		</label>
-		<tooltip name="web_tooltip">
-			ここにウェブ・コンテンツがあります。
-		</tooltip>
-		<playtip name="web_playtip">
-			ウェブ・コンテンツを表示
-		</playtip>
-	</widgetset>
-	<widgetset name="movie">
-		<label name="movie_label">
-			ムービー
-		</label>
-		<tooltip name="movie_tooltip">
-			ここにはムービーがあります
-		</tooltip>
-		<playtip name="movie_playtip">
-			ムービー再生
-		</playtip>
-	</widgetset>
-	<widgetset name="none">
-		<label name="none_label">
-			コンテンツなし
-		</label>
-		<tooltip name="none_tooltip">
-			メディアなし
-		</tooltip>
-	</widgetset>
-	<widgetset name="image">
-		<label name="image_label">
-			画像
-		</label>
-		<tooltip name="image_tooltip">
-			ここには画像があります
-		</tooltip>
-		<playtip name="image_playtip">
-			ここの画像を表示
-		</playtip>
-	</widgetset>
-	<widgetset name="audio">
-		<label name="audio_label">
-			オーディオ
-		</label>
-		<tooltip name="audio_tooltip">
-			ここではオーディオが聞けます
-		</tooltip>
-		<playtip name="audio_playtip">
-			ここのオーディオを再生する
-		</playtip>
-	</widgetset>
-	<scheme name="rtsp">
-		<label name="rtsp_label">
-			リアルタイム・ストリーミング
-		</label>
-	</scheme>
-	<mimetype name="blank">
-		<label name="blank_label">
-			-- なし --
-		</label>
-	</mimetype>
-	<mimetype name="none/none">
-		<label name="none/none_label">
-			-- なし --
-		</label>
-	</mimetype>
-	<mimetype name="audio/*">
-		<label name="audio2_label">
-			オーディオ
-		</label>
-	</mimetype>
-	<mimetype name="video/*">
-		<label name="video2_label">
-			ビデオ
-		</label>
-	</mimetype>
-	<mimetype name="image/*">
-		<label name="image2_label">
-			画像
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
-		<label name="vnd.secondlife.qt.legacy_label">
-			ムービー (QuickTime)
-		</label>
-	</mimetype>
-	<mimetype name="application/javascript">
-		<label name="application/javascript_label">
-			Javascript
-		</label>
-	</mimetype>
-	<mimetype name="application/ogg">
-		<label name="application/ogg_label">
-			Oggオーディオ/ビデオ
-		</label>
-	</mimetype>
-	<mimetype name="application/pdf">
-		<label name="application/pdf_label">
-			PDFドキュメント
-		</label>
-	</mimetype>
-	<mimetype name="application/postscript">
-		<label name="application/postscript_label">
-			Postscriptドキュメント
-		</label>
-	</mimetype>
-	<mimetype name="application/rtf">
-		<label name="application/rtf_label">
-			リッチ・テキスト (RTF)
-		</label>
-	</mimetype>
-	<mimetype name="application/smil">
-		<label name="application/smil_label">
-			同期マルチメディア統合言語(SMIL)
-		</label>
-	</mimetype>
-	<mimetype name="application/xhtml+xml">
-		<label name="application/xhtml+xml_label">
-			ウェブ・ページ (XHTML)
-		</label>
-	</mimetype>
-	<mimetype name="application/x-director">
-		<label name="application/x-director_label">
-			Macromedia Director
-		</label>
-	</mimetype>
-	<mimetype name="application/x-shockwave-flash">
-		<label name="application/x-shockwave-flash_label">
-			Flash
-		</label>
-	</mimetype>
-	<mimetype name="audio/mid">
-		<label name="audio/mid_label">
-			オーディオ (MIDI)
-		</label>
-	</mimetype>
-	<mimetype name="audio/mpeg">
-		<label name="audio/mpeg_label">
-			オーディオ (MP3)
-		</label>
-	</mimetype>
-	<mimetype name="audio/x-aiff">
-		<label name="audio/x-aiff_label">
-			オーディオ (AIFF)
-		</label>
-	</mimetype>
-	<mimetype name="audio/x-wav">
-		<label name="audio/x-wav_label">
-			オーディオ (WAV)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="image/bmp">
-		<label name="image/bmp_label">
-			画像 (BMP)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="image/gif">
-		<label name="image/gif_label">
-			画像 (GIF)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="image/jpeg">
-		<label name="image/jpeg_label">
-			画像 (JPEG)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="image/png">
-		<label name="image/png_label">
-			画像 (PNG)
-		</label>
-	</mimetype>
-	<mimetype name="image/svg+xml">
-		<label name="image/svg+xml_label">
-			画像 (SVG)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="image/tiff">
-		<label name="image/tiff_label">
-			画像 (TIFF)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="text/html">
-		<label name="text/html_label">
-			ウェブ・ページ
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="text/plain">
-		<label name="text/plain_label">
-			テキスト
-		</label>
-	</mimetype>
-	<mimetype name="text/xml">
-		<label name="text/xml_label">
-			XML
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="video/mpeg">
-		<label name="video/mpeg_label">
-			ムービー (MPEG)
-		</label>
-	</mimetype>
-	<mimetype name="video/mp4">
-		<label name="video/mp4_label">
-			ムービー (MP4)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="video/quicktime">
-		<label name="video/quicktime_label">
-			ムービー (QuickTime)
-		</label>
-	</mimetype>
-	<mimetype name="video/x-ms-asf">
-		<label name="video/x-ms-asf_label">
-			ムービー (Windows Media ASF)
-		</label>
-	</mimetype>
-	<mimetype name="video/x-ms-wmv">
-		<label name="video/x-ms-wmv_label">
-			ムービー (Windows Media WMV)
-		</label>
-	</mimetype>
-	<mimetype menu="1" name="video/x-msvideo">
-		<label name="video/x-msvideo_label">
-			ムービー (AVI)
-		</label>
-	</mimetype>
-</mimetypes>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<mimetypes name="default">
+	<widgetset name="web">
+		<label name="web_label">
+			ウェブ・コンテンツ
+		</label>
+		<tooltip name="web_tooltip">
+			ここにウェブ・コンテンツがあります。
+		</tooltip>
+		<playtip name="web_playtip">
+			ウェブ・コンテンツを表示
+		</playtip>
+	</widgetset>
+	<widgetset name="movie">
+		<label name="movie_label">
+			ムービー
+		</label>
+		<tooltip name="movie_tooltip">
+			ここにはムービーがあります
+		</tooltip>
+		<playtip name="movie_playtip">
+			ムービー再生
+		</playtip>
+	</widgetset>
+	<widgetset name="none">
+		<label name="none_label">
+			コンテンツなし
+		</label>
+		<tooltip name="none_tooltip">
+			メディアなし
+		</tooltip>
+	</widgetset>
+	<widgetset name="image">
+		<label name="image_label">
+			画像
+		</label>
+		<tooltip name="image_tooltip">
+			ここには画像があります
+		</tooltip>
+		<playtip name="image_playtip">
+			ここの画像を表示
+		</playtip>
+	</widgetset>
+	<widgetset name="audio">
+		<label name="audio_label">
+			オーディオ
+		</label>
+		<tooltip name="audio_tooltip">
+			ここではオーディオが聞けます
+		</tooltip>
+		<playtip name="audio_playtip">
+			ここのオーディオを再生する
+		</playtip>
+	</widgetset>
+	<scheme name="rtsp">
+		<label name="rtsp_label">
+			リアルタイム・ストリーミング
+		</label>
+	</scheme>
+	<mimetype name="blank">
+		<label name="blank_label">
+			-- なし --
+		</label>
+	</mimetype>
+	<mimetype name="none/none">
+		<label name="none/none_label">
+			-- なし --
+		</label>
+	</mimetype>
+	<mimetype name="audio/*">
+		<label name="audio2_label">
+			オーディオ
+		</label>
+	</mimetype>
+	<mimetype name="video/*">
+		<label name="video2_label">
+			ビデオ
+		</label>
+	</mimetype>
+	<mimetype name="image/*">
+		<label name="image2_label">
+			画像
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
+		<label name="vnd.secondlife.qt.legacy_label">
+			ムービー (QuickTime)
+		</label>
+	</mimetype>
+	<mimetype name="application/javascript">
+		<label name="application/javascript_label">
+			Javascript
+		</label>
+	</mimetype>
+	<mimetype name="application/ogg">
+		<label name="application/ogg_label">
+			Oggオーディオ/ビデオ
+		</label>
+	</mimetype>
+	<mimetype name="application/pdf">
+		<label name="application/pdf_label">
+			PDFドキュメント
+		</label>
+	</mimetype>
+	<mimetype name="application/postscript">
+		<label name="application/postscript_label">
+			Postscriptドキュメント
+		</label>
+	</mimetype>
+	<mimetype name="application/rtf">
+		<label name="application/rtf_label">
+			リッチ・テキスト (RTF)
+		</label>
+	</mimetype>
+	<mimetype name="application/smil">
+		<label name="application/smil_label">
+			同期マルチメディア統合言語(SMIL)
+		</label>
+	</mimetype>
+	<mimetype name="application/xhtml+xml">
+		<label name="application/xhtml+xml_label">
+			ウェブ・ページ (XHTML)
+		</label>
+	</mimetype>
+	<mimetype name="application/x-director">
+		<label name="application/x-director_label">
+			Macromedia Director
+		</label>
+	</mimetype>
+	<mimetype name="application/x-shockwave-flash">
+		<label name="application/x-shockwave-flash_label">
+			Flash
+		</label>
+	</mimetype>
+	<mimetype name="audio/mid">
+		<label name="audio/mid_label">
+			オーディオ (MIDI)
+		</label>
+	</mimetype>
+	<mimetype name="audio/mpeg">
+		<label name="audio/mpeg_label">
+			オーディオ (MP3)
+		</label>
+	</mimetype>
+	<mimetype name="audio/x-aiff">
+		<label name="audio/x-aiff_label">
+			オーディオ (AIFF)
+		</label>
+	</mimetype>
+	<mimetype name="audio/x-wav">
+		<label name="audio/x-wav_label">
+			オーディオ (WAV)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="image/bmp">
+		<label name="image/bmp_label">
+			画像 (BMP)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="image/gif">
+		<label name="image/gif_label">
+			画像 (GIF)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="image/jpeg">
+		<label name="image/jpeg_label">
+			画像 (JPEG)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="image/png">
+		<label name="image/png_label">
+			画像 (PNG)
+		</label>
+	</mimetype>
+	<mimetype name="image/svg+xml">
+		<label name="image/svg+xml_label">
+			画像 (SVG)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="image/tiff">
+		<label name="image/tiff_label">
+			画像 (TIFF)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="text/html">
+		<label name="text/html_label">
+			ウェブ・ページ
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="text/plain">
+		<label name="text/plain_label">
+			テキスト
+		</label>
+	</mimetype>
+	<mimetype name="text/xml">
+		<label name="text/xml_label">
+			XML
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="video/mpeg">
+		<label name="video/mpeg_label">
+			ムービー (MPEG)
+		</label>
+	</mimetype>
+	<mimetype name="video/mp4">
+		<label name="video/mp4_label">
+			ムービー (MP4)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="video/quicktime">
+		<label name="video/quicktime_label">
+			ムービー (QuickTime)
+		</label>
+	</mimetype>
+	<mimetype name="video/x-ms-asf">
+		<label name="video/x-ms-asf_label">
+			ムービー (Windows Media ASF)
+		</label>
+	</mimetype>
+	<mimetype name="video/x-ms-wmv">
+		<label name="video/x-ms-wmv_label">
+			ムービー (Windows Media WMV)
+		</label>
+	</mimetype>
+	<mimetype menu="1" name="video/x-msvideo">
+		<label name="video/x-msvideo_label">
+			ムービー (AVI)
+		</label>
+	</mimetype>
+</mimetypes>
diff --git a/indra/newview/skins/default/xui/ja/panel_audio_device.xml b/indra/newview/skins/default/xui/ja/panel_audio_device.xml
index 7bd1bce15d..2352c60989 100644
--- a/indra/newview/skins/default/xui/ja/panel_audio_device.xml
+++ b/indra/newview/skins/default/xui/ja/panel_audio_device.xml
@@ -1,26 +1,26 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="device_settings">
-	<text name="Audio Devices">
-		オーディオ機器
-	</text>
-	<text name="Output device (speakers):">
-		出力機器 (スピーカー):
-	</text>
-	<text name="Input device (microphone):">
-		入力機器(マイクロフォン):
-	</text>
-	<text name="Input level:">
-		入力レベル
-	</text>
-	<text_editor name="voice_intro_text1">
-		スライダを調節して、他の住人に聞こえるあなたの音量を制御します。マイクロフォンに向かって話すだけで、入力レベルをテストできます。
-	</text_editor>
-	<volume_slider name="mic_volume_slider"
-	     tool_tip="このスライダーを使用して、ボリュームを変えてください。" />
-	<text name="wait_text">
-		お待ちください
-	</text>
-	<text name="default_text">
-		デフォルト
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel name="device_settings">
+	<text name="Audio Devices">
+		オーディオ機器
+	</text>
+	<text name="Output device (speakers):">
+		出力機器 (スピーカー):
+	</text>
+	<text name="Input device (microphone):">
+		入力機器(マイクロフォン):
+	</text>
+	<text name="Input level:">
+		入力レベル
+	</text>
+	<text_editor name="voice_intro_text1">
+		スライダを調節して、他の住人に聞こえるあなたの音量を制御します。マイクロフォンに向かって話すだけで、入力レベルをテストできます。
+	</text_editor>
+	<volume_slider name="mic_volume_slider"
+	     tool_tip="このスライダーを使用して、ボリュームを変えてください。" />
+	<text name="wait_text">
+		お待ちください
+	</text>
+	<text name="default_text">
+		デフォルト
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_friends.xml b/indra/newview/skins/default/xui/ja/panel_friends.xml
index 404380cea4..d4cf678d70 100644
--- a/indra/newview/skins/default/xui/ja/panel_friends.xml
+++ b/indra/newview/skins/default/xui/ja/panel_friends.xml
@@ -1,53 +1,53 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="friends">
-	<string name="Multiple">
-		複数のフレンド...
-	</string>
-	<scroll_list name="friend_list"
-	     tool_tip="複数のフレンドを選択するには、ShiftキーまたはCtrlキーを押しながら名前をクリックします。">
-		<column name="icon_online_status" tool_tip="オンライン・ステータス" />
-		<column label="名前" name="friend_name" tool_tip="名前" />
-		<column name="icon_visible_online"
-		     tool_tip="フレンドは、あなたがオンラインかどうか確認することができます。" />
-		<column name="icon_visible_map"
-		     tool_tip="フレンドは、地図であなたの居場所を見つけることができます。" />
-		<column name="icon_edit_mine"
-		     tool_tip="フレンドは、オブジェクトを編集、削除、または取得することができます。" />
-		<column name="icon_edit_theirs"
-		     tool_tip="あなたは、このフレンドのオブジェクトを編集することができます。" />
-	</scroll_list>
-	<panel name="rights_container">
-		<text name="friend_name_label" right="-10">
-			フレンドを選択して権利を変更...
-		</text>
-		<check_box label="オンライン・ステータスの確認を許可する"
-		     name="online_status_cb"
-		     tool_tip="コーリングカードあるいはフレンドリストでこのフレンドがオンライン状態を確認できるよう設定" />
-		<check_box label="世界地図上であなたの居場所を検索可能にする"
-		     name="map_status_cb"
-		     tool_tip="このフレンドが地図で私の位置を発見できるように設定" />
-		<check_box label="オブジェクトの修正を許可する" name="modify_status_cb"
-		     tool_tip="このフレンドがオブジェクトを改造できる許可を与える" />
-		<text name="process_rights_label">
-			権利変更をプロセス中...
-		</text>
-	</panel>
-	<pad left="-95" />
-	<button label="IM/コール" name="im_btn"
-	     tool_tip="インスタントメッセージ・セッションを開く"
-	     width="90" />
-	<button label="プロフィール" name="profile_btn"
-	     tool_tip="写真、グループ、およびその他の情報を表示します。"
-	     width="90" />
-	<button label="テレポート..." name="offer_teleport_btn"
-	     tool_tip="このフレンドに、あなたの現在のロケーションまでのテレポートを申し出ます。"
-	     width="90" />
-	<button label="支払う..." name="pay_btn"
-	     tool_tip="リンデンドル (L$) をこのフレンドにあげる"
-	     width="90" />
-	<button label="削除..." name="remove_btn"
-	     tool_tip="この人物をフレンドリストから外します。"
-	     width="90" />
-	<button label="追加..." name="add_btn"
-	     tool_tip="住人にフレンドシップを申請します。" width="90" />
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel name="friends">
+	<string name="Multiple">
+		複数のフレンド...
+	</string>
+	<scroll_list name="friend_list"
+	     tool_tip="複数のフレンドを選択するには、ShiftキーまたはCtrlキーを押しながら名前をクリックします。">
+		<column name="icon_online_status" tool_tip="オンライン・ステータス" />
+		<column label="名前" name="friend_name" tool_tip="名前" />
+		<column name="icon_visible_online"
+		     tool_tip="フレンドは、あなたがオンラインかどうか確認することができます。" />
+		<column name="icon_visible_map"
+		     tool_tip="フレンドは、地図であなたの居場所を見つけることができます。" />
+		<column name="icon_edit_mine"
+		     tool_tip="フレンドは、オブジェクトを編集、削除、または取得することができます。" />
+		<column name="icon_edit_theirs"
+		     tool_tip="あなたは、このフレンドのオブジェクトを編集することができます。" />
+	</scroll_list>
+	<panel name="rights_container">
+		<text name="friend_name_label" right="-10">
+			フレンドを選択して権利を変更...
+		</text>
+		<check_box label="オンライン・ステータスの確認を許可する"
+		     name="online_status_cb"
+		     tool_tip="コーリングカードあるいはフレンドリストでこのフレンドがオンライン状態を確認できるよう設定" />
+		<check_box label="世界地図上であなたの居場所を検索可能にする"
+		     name="map_status_cb"
+		     tool_tip="このフレンドが地図で私の位置を発見できるように設定" />
+		<check_box label="オブジェクトの修正を許可する" name="modify_status_cb"
+		     tool_tip="このフレンドがオブジェクトを改造できる許可を与える" />
+		<text name="process_rights_label">
+			権利変更をプロセス中...
+		</text>
+	</panel>
+	<pad left="-95" />
+	<button label="IM/コール" name="im_btn"
+	     tool_tip="インスタントメッセージ・セッションを開く"
+	     width="90" />
+	<button label="プロフィール" name="profile_btn"
+	     tool_tip="写真、グループ、およびその他の情報を表示します。"
+	     width="90" />
+	<button label="テレポート..." name="offer_teleport_btn"
+	     tool_tip="このフレンドに、あなたの現在のロケーションまでのテレポートを申し出ます。"
+	     width="90" />
+	<button label="支払う..." name="pay_btn"
+	     tool_tip="リンデンドル (L$) をこのフレンドにあげる"
+	     width="90" />
+	<button label="削除..." name="remove_btn"
+	     tool_tip="この人物をフレンドリストから外します。"
+	     width="90" />
+	<button label="追加..." name="add_btn"
+	     tool_tip="住人にフレンドシップを申請します。" width="90" />
+</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_groups.xml b/indra/newview/skins/default/xui/ja/panel_groups.xml
index ca334b461b..785fd868ab 100644
--- a/indra/newview/skins/default/xui/ja/panel_groups.xml
+++ b/indra/newview/skins/default/xui/ja/panel_groups.xml
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="groups">
-	<text name="groupdesc">
-		アクティブなグループ名は太字で表示されています
-	</text>
-	<text name="groupcount">
-		あなたは[COUNT] グループに所属しています (最大[MAX])
-	</text>
-	<button label="IM/コール" name="IM"
-	     tool_tip="インスタントメッセージ・セッションを開く" />
-	<button label="情報" name="Info" />
-	<button label="アクティブ" name="Activate" />
-	<button label="抜ける" name="Leave" />
-	<button label="作成..." name="Create" />
-	<button label="検索..." name="Search..." />
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel name="groups">
+	<text name="groupdesc">
+		アクティブなグループ名は太字で表示されています
+	</text>
+	<text name="groupcount">
+		あなたは[COUNT] グループに所属しています (最大[MAX])
+	</text>
+	<button label="IM/コール" name="IM"
+	     tool_tip="インスタントメッセージ・セッションを開く" />
+	<button label="情報" name="Info" />
+	<button label="アクティブ" name="Activate" />
+	<button label="抜ける" name="Leave" />
+	<button label="作成..." name="Create" />
+	<button label="検索..." name="Search..." />
+</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_login.xml b/indra/newview/skins/default/xui/ja/panel_login.xml
index c93aeacc95..d42d0ddbdf 100644
--- a/indra/newview/skins/default/xui/ja/panel_login.xml
+++ b/indra/newview/skins/default/xui/ja/panel_login.xml
@@ -15,15 +15,15 @@
 		ログイン位置:
 	</text>
 	<combo_box name="start_location_combo" left_delta="92" width="172">
-		<combo_item name="MyHome">
+		<combo_box.item name="MyHome">
 			自宅(ホーム)
-		</combo_item>
-		<combo_item name="MyLastLocation">
+		</combo_box.item>
+		<combo_box.item name="MyLastLocation">
 			最後にログアウトした場所
-		</combo_item>
-		<combo_item name="Typeregionname">
+		</combo_box.item>
+		<combo_box.item name="Typeregionname">
 			&lt; 地域の名前入力 &gt;
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<check_box label="パスワードを記憶" name="remember_check" left_delta="180"/>
 	<text name="full_screen_text">
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml
index 167bc2a1ce..7a7cf8cb3a 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml
@@ -21,21 +21,21 @@
 		ウィンドウ・サイズ:
 	</text>
 	<combo_box name="windowsize combo">
-		<combo_item name="640x480">
+		<combo_box.item name="640x480">
 			640x480
-		</combo_item>
-		<combo_item name="800x600">
+		</combo_box.item>
+		<combo_box.item name="800x600">
 			800x600
-		</combo_item>
-		<combo_item name="720x480">
+		</combo_box.item>
+		<combo_box.item name="720x480">
 			720x480 (NTSC)
-		</combo_item>
-		<combo_item name="768x576">
+		</combo_box.item>
+		<combo_box.item name="768x576">
 			768x576 (PAL)
-		</combo_item>
-		<combo_item name="1024x768">
+		</combo_box.item>
+		<combo_box.item name="1024x768">
 			1024x768
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="DisplayResLabel">
 		表示解像度:
@@ -44,18 +44,18 @@
 		縦横比:
 	</text>
 	<combo_box name="aspect_ratio" tool_tip="(幅/高さ)">
-		<combo_item type="string" length="1" name="4:3(StandardCRT)">
+		<combo_box.item type="string" length="1" name="4:3(StandardCRT)">
 			4:3(標準CRT)
-		</combo_item>
-		<combo_item type="string" length="1" name="5:4(1280x1024LCD)">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)">
 			5:4(1280x1024 LCD)
-		</combo_item>
-		<combo_item name="8:5(Widescreen)">
+		</combo_box.item>
+		<combo_box.item name="8:5(Widescreen)">
 			8:5(ワイドスクリ-ン)
-		</combo_item>
-		<combo_item type="string" length="1" name="16:9(Widescreen)">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="16:9(Widescreen)">
 			16:9(ワイドスクリ-ン)
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<check_box label="自動検出率" name="aspect_auto_detect" />
 	<text type="string" length="1" name="UI Size:">
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index 36dfa07e13..5243cc76b9 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -1,466 +1,466 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<!-- This file contains strings that used to be hardcoded in the source.
-     It is only for those strings which don&apos;t belong in a floater.
-     For example, the strings used in avatar chat bubbles, and strings 
-     that are returned from one component and may appear in many places-->
-<strings>
-	<string name="LoginInProgress">
-		ログイン中です。[APP_NAME]の表示がフリーズする場合があります。  しばらくお待ちください。
-	</string>
-	<string name="LoginAuthenticating">
-		認証しています...
-	</string>
-	<string name="LoginMaintenance">
-		アカウント・メンテナンスを実行しています...
-	</string>
-	<string name="LoginAttempt">
-		前回のログインに失敗しました。 ログイン中です([NUMBER]回目)
-	</string>
-	<string name="LoginPrecaching">
-		ワールドをロードしています...
-	</string>
-	<string name="LoginInitializingBrowser">
-		埋め込みWebブラウザを初期化しています...
-	</string>
-	<string name="LoginInitializingMultimedia">
-		マルチメディアを初期化しています...
-	</string>
-	<string name="LoginVerifyingCache">
-		キャッシュ・ファイルを検証しています(所要時間は60~90秒)...
-	</string>
-	<string name="LoginProcessingResponse">
-		応答を処理しています...
-	</string>
-	<string name="LoginInitializingWorld">
-		ワールドを初期化しています...
-	</string>
-	<string name="LoginDecodingImages">
-		画像をデコードしています...
-	</string>
-	<string name="LoginInitializingQuicktime">
-		QuickTimeを初期化しています...
-	</string>
-	<string name="LoginQuicktimeNotFound">
-		QuickTimeが見つかりません。初期化に失敗しました。
-	</string>
-	<string name="LoginQuicktimeOK">
-		QuickTimeが正常に初期化されました。
-	</string>
-	<string name="LoginWaitingForRegionHandshake">
-		地域のハンドシェイクを待っています...
-	</string>
-	<string name="LoginConnectingToRegion">
-		地域に接続しています...
-	</string>
-	<string name="LoginDownloadingClothing">
-		服をダウンロードしています...
-	</string>
-	<string name="AgentLostConnection">
-		この地域には、問題が発生している可能性があります。  インターネット接続を確認してください。
-	</string>
-	<string name="TooltipPerson">
-		人
-	</string>
-	<string name="TooltipNoName">
-		(名前なし)
-	</string>
-	<string name="TooltipOwner">
-		オーナー:
-	</string>
-	<string name="TooltipPublic">
-		公共
-	</string>
-	<string name="TooltipIsGroup">
-		(グループ)
-	</string>
-	<string name="TooltipFlagScript">
-		スクリプト
-	</string>
-	<string name="TooltipFlagPhysics">
-		物理作用
-	</string>
-	<string name="TooltipFlagTouch">
-		触る
-	</string>
-	<string name="TooltipFlagL$">
-		L$
-	</string>
-	<string name="TooltipFlagDropInventory">
-		持ち物をドロップする
-	</string>
-	<string name="TooltipFlagPhantom">
-		ファントム
-	</string>
-	<string name="TooltipFlagTemporary">
-		一時的
-	</string>
-	<string name="TooltipFlagRightClickMenu">
-		(右クリックでメニューを表示)
-	</string>
-	<string name="TooltipFreeToCopy">
-		コピー可能
-	</string>
-	<string name="TooltipForSaleL$">
-		売り出し中:L$[AMOUNT]
-	</string>
-	<string name="TooltipForSaleMsg">
-		売り出し中: [MESSAGE]
-	</string>
-	<string name="TooltipFlagGroupBuild">
-		グループ作成
-	</string>
-	<string name="TooltipFlagNoBuild">
-		作成禁止
-	</string>
-	<string name="TooltipFlagNoEdit">
-		グループ作成
-	</string>
-	<string name="TooltipFlagNotSafe">
-		危険
-	</string>
-	<string name="TooltipFlagNoFly">
-		飛行禁止
-	</string>
-	<string name="TooltipFlagGroupScripts">
-		グループ・スクリプト
-	</string>
-	<string name="TooltipFlagNoScripts">
-		スクリプトなし
-	</string>
-	<string name="TooltipLand">
-		土地:
-	</string>
-	<string name="TooltipMustSingleDrop">
-		1つのアイテムのみをここにドラッグできます
-	</string>
-	<string name="RetrievingData">
-		検索中...
-	</string>
-	<string name="ReleaseNotes">
-		リリースノート
-	</string>
-	<string name="LoadingData">
-		ロード中...
-	</string>
-	<string name="AvatarNameNobody">
-		(無人)
-	</string>
-	<string name="AvatarNameWaiting">
-		(待機中)
-	</string>
-	<string name="AvatarNameHippos">
-		(カバ)
-	</string>
-	<string name="GroupNameNone">
-		(なし)
-	</string>
-	<string name="AssetErrorNone">
-		エラーなし
-	</string>
-	<string name="AssetErrorRequestFailed">
-		資産の要求: 失敗
-	</string>
-	<string name="AssetErrorNonexistentFile">
-		資産の要求: 存在しないファイル
-	</string>
-	<string name="AssetErrorNotInDatabase">
-		資産の要求: データベースでは見つからない資産
-	</string>
-	<string name="AssetErrorEOF">
-		ファイルの終わり
-	</string>
-	<string name="AssetErrorCannotOpenFile">
-		ファイルを開くことができません
-	</string>
-	<string name="AssetErrorFileNotFound">
-		ファイルが見つかりません
-	</string>
-	<string name="AssetErrorTCPTimeout">
-		ファイル転送タイムアウトです
-	</string>
-	<string name="AssetErrorCircuitGone">
-		接続が解除されました
-	</string>
-	<string name="AssetErrorPriceMismatch">
-		ビューワとサーバーの価格が一致していません
-	</string>
-	<string name="AssetErrorUnknownStatus">
-		ステータスが不明です
-	</string>
-	<string name="AvatarEditingApparance">
-		(容姿の編集)
-	</string>
-	<string name="AvatarAway">
-		退席中
-	</string>
-	<string name="AvatarBusy">
-		取り込み中
-	</string>
-	<string name="AvatarMuted">
-		ミュート
-	</string>
-	<string name="anim_express_afraid">
-		怖れ
-	</string>
-	<string name="anim_express_anger">
-		怒り
-	</string>
-	<string name="anim_away">
-		退席中
-	</string>
-	<string name="anim_backflip">
-		後ろ宙返り
-	</string>
-	<string name="anim_express_laugh">
-		大笑い
-	</string>
-	<string name="anim_express_toothsmile">
-		満面の笑顔
-	</string>
-	<string name="anim_blowkiss">
-		投げキッス
-	</string>
-	<string name="anim_express_bored">
-		退屈
-	</string>
-	<string name="anim_bow">
-		おじぎ
-	</string>
-	<string name="anim_clap">
-		拍手
-	</string>
-	<string name="anim_courtbow">
-		深いおじぎ
-	</string>
-	<string name="anim_express_cry">
-		泣く
-	</string>
-	<string name="anim_dance1">
-		ダンス1
-	</string>
-	<string name="anim_dance2">
-		ダンス2
-	</string>
-	<string name="anim_dance3">
-		ダンス3
-	</string>
-	<string name="anim_dance4">
-		ダンス4
-	</string>
-	<string name="anim_dance5">
-		ダンス5
-	</string>
-	<string name="anim_dance6">
-		ダンス6
-	</string>
-	<string name="anim_dance7">
-		ダンス7
-	</string>
-	<string name="anim_dance8">
-		ダンス8
-	</string>
-	<string name="anim_express_disdain">
-		侮蔑
-	</string>
-	<string name="anim_drink">
-		酔っぱらう
-	</string>
-	<string name="anim_express_embarrased">
-		困惑
-	</string>
-	<string name="anim_angry_fingerwag">
-		指を振る
-	</string>
-	<string name="anim_fist_pump">
-		ガッツポーズ
-	</string>
-	<string name="anim_yoga_float">
-		ヨガ浮遊
-	</string>
-	<string name="anim_express_frown">
-		しかめっ面
-	</string>
-	<string name="anim_impatient">
-		いらいらする
-	</string>
-	<string name="anim_jumpforjoy">
-		飛び上がって喜ぶ
-	</string>
-	<string name="anim_kissmybutt">
-		挑発ポーズ
-	</string>
-	<string name="anim_express_kiss">
-		キス
-	</string>
-	<string name="anim_laugh_short">
-		笑う
-	</string>
-	<string name="anim_musclebeach">
-		力こぶを見せる
-	</string>
-	<string name="anim_no_unhappy">
-		不満げに否定する
-	</string>
-	<string name="anim_no_head">
-		否定する
-	</string>
-	<string name="anim_nyanya">
-		冷やかす
-	</string>
-	<string name="anim_punch_onetwo">
-		ワンツー・パンチ
-	</string>
-	<string name="anim_express_open_mouth">
-		口を開けて驚く
-	</string>
-	<string name="anim_peace">
-		ピース・サイン
-	</string>
-	<string name="anim_point_you">
-		他人を指差す
-	</string>
-	<string name="anim_point_me">
-		自分を指差す
-	</string>
-	<string name="anim_punch_l">
-		左パンチ
-	</string>
-	<string name="anim_punch_r">
-		右パンチ
-	</string>
-	<string name="anim_rps_countdown">
-		じゃんけんポーズ
-	</string>
-	<string name="anim_rps_paper">
-		パー
-	</string>
-	<string name="anim_rps_rock">
-		グー
-	</string>
-	<string name="anim_rps_scissors">
-		チョキ
-	</string>
-	<string name="anim_express_repulsed">
-		嫌悪感
-	</string>
-	<string name="anim_kick_roundhouse_r">
-		まわし蹴り
-	</string>
-	<string name="anim_express_sad">
-		悲しむ
-	</string>
-	<string name="anim_salute">
-		敬礼する
-	</string>
-	<string name="anim_shout">
-		叫ぶ
-	</string>
-	<string name="anim_express_shrug">
-		肩をすくめる
-	</string>
-	<string name="anim_express_smile">
-		微笑む
-	</string>
-	<string name="anim_smoke_idle">
-		たばこをくゆらす
-	</string>
-	<string name="anim_smoke_inhale">
-		たばこを吸う
-	</string>
-	<string name="anim_smoke_throw_down">
-		たばこを捨てる
-	</string>
-	<string name="anim_express_surprise">
-		驚く
-	</string>
-	<string name="anim_sword_strike_r">
-		剣で斬りつける
-	</string>
-	<string name="anim_angry_tantrum">
-		じだんだを踏む
-	</string>
-	<string name="anim_express_tongue_out">
-		舌を出す
-	</string>
-	<string name="anim_hello">
-		手を振る
-	</string>
-	<string name="anim_whisper">
-		小声で話す
-	</string>
-	<string name="anim_whistle">
-		口笛を吹く
-	</string>
-	<string name="anim_express_wink">
-		ウィンク
-	</string>
-	<string name="anim_wink_hollywood">
-		ウィンク(ハリウッド)
-	</string>
-	<string name="anim_express_worry">
-		心配する
-	</string>
-	<string name="anim_yes_happy">
-		笑顔で頷く
-	</string>
-	<string name="anim_yes_head">
-		頷く
-	</string>
-	<string name="texture_loading">
-		ロード中...
-	</string>
-	<string name="worldmap_offline">
-		オフライン
-	</string>
-	<string name="whisper">
-		のささやき:
-	</string>
-	<string name="shout">
-		の叫び:
-	</string>
-	<string name="all_files">
-		全てのファイル
-	</string>
-	<string name="sound_files">
-		サウンド
-	</string>
-	<string name="animation_files">
-		アニメーション
-	</string>
-	<string name="image_files">
-		画像
-	</string>
-	<string name="save_file_verb">
-		保存
-	</string>
-	<string name="load_file_verb">
-		ロード
-	</string>
-	<string name="targa_image_files">
-		Targa画像
-	</string>
-	<string name="bitmap_image_files">
-		ビットマップ画像
-	</string>
-	<string name="avi_movie_file">
-		AVIムービーファイル
-	</string>
-	<string name="xaf_animation_file">
-		XAFアニメーションファイル
-	</string>
-	<string name="xml_file">
-		XMLファイル
-	</string>
-	<string name="dot_raw_file">
-		RAWファイル
-	</string>
-	<string name="compressed_image_files">
-		圧縮画像
-	</string>
-	<string name="load_files">
-		ファイルのロード
-	</string>
-	<string name="choose_the_directory">
-		参照
-	</string>
-</strings>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!-- This file contains strings that used to be hardcoded in the source.
+     It is only for those strings which don&apos;t belong in a floater.
+     For example, the strings used in avatar chat bubbles, and strings 
+     that are returned from one component and may appear in many places-->
+<strings>
+	<string name="LoginInProgress">
+		ログイン中です。[APP_NAME]の表示がフリーズする場合があります。  しばらくお待ちください。
+	</string>
+	<string name="LoginAuthenticating">
+		認証しています...
+	</string>
+	<string name="LoginMaintenance">
+		アカウント・メンテナンスを実行しています...
+	</string>
+	<string name="LoginAttempt">
+		前回のログインに失敗しました。 ログイン中です([NUMBER]回目)
+	</string>
+	<string name="LoginPrecaching">
+		ワールドをロードしています...
+	</string>
+	<string name="LoginInitializingBrowser">
+		埋め込みWebブラウザを初期化しています...
+	</string>
+	<string name="LoginInitializingMultimedia">
+		マルチメディアを初期化しています...
+	</string>
+	<string name="LoginVerifyingCache">
+		キャッシュ・ファイルを検証しています(所要時間は60~90秒)...
+	</string>
+	<string name="LoginProcessingResponse">
+		応答を処理しています...
+	</string>
+	<string name="LoginInitializingWorld">
+		ワールドを初期化しています...
+	</string>
+	<string name="LoginDecodingImages">
+		画像をデコードしています...
+	</string>
+	<string name="LoginInitializingQuicktime">
+		QuickTimeを初期化しています...
+	</string>
+	<string name="LoginQuicktimeNotFound">
+		QuickTimeが見つかりません。初期化に失敗しました。
+	</string>
+	<string name="LoginQuicktimeOK">
+		QuickTimeが正常に初期化されました。
+	</string>
+	<string name="LoginWaitingForRegionHandshake">
+		地域のハンドシェイクを待っています...
+	</string>
+	<string name="LoginConnectingToRegion">
+		地域に接続しています...
+	</string>
+	<string name="LoginDownloadingClothing">
+		服をダウンロードしています...
+	</string>
+	<string name="AgentLostConnection">
+		この地域には、問題が発生している可能性があります。  インターネット接続を確認してください。
+	</string>
+	<string name="TooltipPerson">
+		人
+	</string>
+	<string name="TooltipNoName">
+		(名前なし)
+	</string>
+	<string name="TooltipOwner">
+		オーナー:
+	</string>
+	<string name="TooltipPublic">
+		公共
+	</string>
+	<string name="TooltipIsGroup">
+		(グループ)
+	</string>
+	<string name="TooltipFlagScript">
+		スクリプト
+	</string>
+	<string name="TooltipFlagPhysics">
+		物理作用
+	</string>
+	<string name="TooltipFlagTouch">
+		触る
+	</string>
+	<string name="TooltipFlagL$">
+		L$
+	</string>
+	<string name="TooltipFlagDropInventory">
+		持ち物をドロップする
+	</string>
+	<string name="TooltipFlagPhantom">
+		ファントム
+	</string>
+	<string name="TooltipFlagTemporary">
+		一時的
+	</string>
+	<string name="TooltipFlagRightClickMenu">
+		(右クリックでメニューを表示)
+	</string>
+	<string name="TooltipFreeToCopy">
+		コピー可能
+	</string>
+	<string name="TooltipForSaleL$">
+		売り出し中:L$[AMOUNT]
+	</string>
+	<string name="TooltipForSaleMsg">
+		売り出し中: [MESSAGE]
+	</string>
+	<string name="TooltipFlagGroupBuild">
+		グループ作成
+	</string>
+	<string name="TooltipFlagNoBuild">
+		作成禁止
+	</string>
+	<string name="TooltipFlagNoEdit">
+		グループ作成
+	</string>
+	<string name="TooltipFlagNotSafe">
+		危険
+	</string>
+	<string name="TooltipFlagNoFly">
+		飛行禁止
+	</string>
+	<string name="TooltipFlagGroupScripts">
+		グループ・スクリプト
+	</string>
+	<string name="TooltipFlagNoScripts">
+		スクリプトなし
+	</string>
+	<string name="TooltipLand">
+		土地:
+	</string>
+	<string name="TooltipMustSingleDrop">
+		1つのアイテムのみをここにドラッグできます
+	</string>
+	<string name="RetrievingData">
+		検索中...
+	</string>
+	<string name="ReleaseNotes">
+		リリースノート
+	</string>
+	<string name="LoadingData">
+		ロード中...
+	</string>
+	<string name="AvatarNameNobody">
+		(無人)
+	</string>
+	<string name="AvatarNameWaiting">
+		(待機中)
+	</string>
+	<string name="AvatarNameHippos">
+		(カバ)
+	</string>
+	<string name="GroupNameNone">
+		(なし)
+	</string>
+	<string name="AssetErrorNone">
+		エラーなし
+	</string>
+	<string name="AssetErrorRequestFailed">
+		資産の要求: 失敗
+	</string>
+	<string name="AssetErrorNonexistentFile">
+		資産の要求: 存在しないファイル
+	</string>
+	<string name="AssetErrorNotInDatabase">
+		資産の要求: データベースでは見つからない資産
+	</string>
+	<string name="AssetErrorEOF">
+		ファイルの終わり
+	</string>
+	<string name="AssetErrorCannotOpenFile">
+		ファイルを開くことができません
+	</string>
+	<string name="AssetErrorFileNotFound">
+		ファイルが見つかりません
+	</string>
+	<string name="AssetErrorTCPTimeout">
+		ファイル転送タイムアウトです
+	</string>
+	<string name="AssetErrorCircuitGone">
+		接続が解除されました
+	</string>
+	<string name="AssetErrorPriceMismatch">
+		ビューワとサーバーの価格が一致していません
+	</string>
+	<string name="AssetErrorUnknownStatus">
+		ステータスが不明です
+	</string>
+	<string name="AvatarEditingApparance">
+		(容姿の編集)
+	</string>
+	<string name="AvatarAway">
+		退席中
+	</string>
+	<string name="AvatarBusy">
+		取り込み中
+	</string>
+	<string name="AvatarMuted">
+		ミュート
+	</string>
+	<string name="anim_express_afraid">
+		怖れ
+	</string>
+	<string name="anim_express_anger">
+		怒り
+	</string>
+	<string name="anim_away">
+		退席中
+	</string>
+	<string name="anim_backflip">
+		後ろ宙返り
+	</string>
+	<string name="anim_express_laugh">
+		大笑い
+	</string>
+	<string name="anim_express_toothsmile">
+		満面の笑顔
+	</string>
+	<string name="anim_blowkiss">
+		投げキッス
+	</string>
+	<string name="anim_express_bored">
+		退屈
+	</string>
+	<string name="anim_bow">
+		おじぎ
+	</string>
+	<string name="anim_clap">
+		拍手
+	</string>
+	<string name="anim_courtbow">
+		深いおじぎ
+	</string>
+	<string name="anim_express_cry">
+		泣く
+	</string>
+	<string name="anim_dance1">
+		ダンス1
+	</string>
+	<string name="anim_dance2">
+		ダンス2
+	</string>
+	<string name="anim_dance3">
+		ダンス3
+	</string>
+	<string name="anim_dance4">
+		ダンス4
+	</string>
+	<string name="anim_dance5">
+		ダンス5
+	</string>
+	<string name="anim_dance6">
+		ダンス6
+	</string>
+	<string name="anim_dance7">
+		ダンス7
+	</string>
+	<string name="anim_dance8">
+		ダンス8
+	</string>
+	<string name="anim_express_disdain">
+		侮蔑
+	</string>
+	<string name="anim_drink">
+		酔っぱらう
+	</string>
+	<string name="anim_express_embarrased">
+		困惑
+	</string>
+	<string name="anim_angry_fingerwag">
+		指を振る
+	</string>
+	<string name="anim_fist_pump">
+		ガッツポーズ
+	</string>
+	<string name="anim_yoga_float">
+		ヨガ浮遊
+	</string>
+	<string name="anim_express_frown">
+		しかめっ面
+	</string>
+	<string name="anim_impatient">
+		いらいらする
+	</string>
+	<string name="anim_jumpforjoy">
+		飛び上がって喜ぶ
+	</string>
+	<string name="anim_kissmybutt">
+		挑発ポーズ
+	</string>
+	<string name="anim_express_kiss">
+		キス
+	</string>
+	<string name="anim_laugh_short">
+		笑う
+	</string>
+	<string name="anim_musclebeach">
+		力こぶを見せる
+	</string>
+	<string name="anim_no_unhappy">
+		不満げに否定する
+	</string>
+	<string name="anim_no_head">
+		否定する
+	</string>
+	<string name="anim_nyanya">
+		冷やかす
+	</string>
+	<string name="anim_punch_onetwo">
+		ワンツー・パンチ
+	</string>
+	<string name="anim_express_open_mouth">
+		口を開けて驚く
+	</string>
+	<string name="anim_peace">
+		ピース・サイン
+	</string>
+	<string name="anim_point_you">
+		他人を指差す
+	</string>
+	<string name="anim_point_me">
+		自分を指差す
+	</string>
+	<string name="anim_punch_l">
+		左パンチ
+	</string>
+	<string name="anim_punch_r">
+		右パンチ
+	</string>
+	<string name="anim_rps_countdown">
+		じゃんけんポーズ
+	</string>
+	<string name="anim_rps_paper">
+		パー
+	</string>
+	<string name="anim_rps_rock">
+		グー
+	</string>
+	<string name="anim_rps_scissors">
+		チョキ
+	</string>
+	<string name="anim_express_repulsed">
+		嫌悪感
+	</string>
+	<string name="anim_kick_roundhouse_r">
+		まわし蹴り
+	</string>
+	<string name="anim_express_sad">
+		悲しむ
+	</string>
+	<string name="anim_salute">
+		敬礼する
+	</string>
+	<string name="anim_shout">
+		叫ぶ
+	</string>
+	<string name="anim_express_shrug">
+		肩をすくめる
+	</string>
+	<string name="anim_express_smile">
+		微笑む
+	</string>
+	<string name="anim_smoke_idle">
+		たばこをくゆらす
+	</string>
+	<string name="anim_smoke_inhale">
+		たばこを吸う
+	</string>
+	<string name="anim_smoke_throw_down">
+		たばこを捨てる
+	</string>
+	<string name="anim_express_surprise">
+		驚く
+	</string>
+	<string name="anim_sword_strike_r">
+		剣で斬りつける
+	</string>
+	<string name="anim_angry_tantrum">
+		じだんだを踏む
+	</string>
+	<string name="anim_express_tongue_out">
+		舌を出す
+	</string>
+	<string name="anim_hello">
+		手を振る
+	</string>
+	<string name="anim_whisper">
+		小声で話す
+	</string>
+	<string name="anim_whistle">
+		口笛を吹く
+	</string>
+	<string name="anim_express_wink">
+		ウィンク
+	</string>
+	<string name="anim_wink_hollywood">
+		ウィンク(ハリウッド)
+	</string>
+	<string name="anim_express_worry">
+		心配する
+	</string>
+	<string name="anim_yes_happy">
+		笑顔で頷く
+	</string>
+	<string name="anim_yes_head">
+		頷く
+	</string>
+	<string name="texture_loading">
+		ロード中...
+	</string>
+	<string name="worldmap_offline">
+		オフライン
+	</string>
+	<string name="whisper">
+		のささやき:
+	</string>
+	<string name="shout">
+		の叫び:
+	</string>
+	<string name="all_files">
+		全てのファイル
+	</string>
+	<string name="sound_files">
+		サウンド
+	</string>
+	<string name="animation_files">
+		アニメーション
+	</string>
+	<string name="image_files">
+		画像
+	</string>
+	<string name="save_file_verb">
+		保存
+	</string>
+	<string name="load_file_verb">
+		ロード
+	</string>
+	<string name="targa_image_files">
+		Targa画像
+	</string>
+	<string name="bitmap_image_files">
+		ビットマップ画像
+	</string>
+	<string name="avi_movie_file">
+		AVIムービーファイル
+	</string>
+	<string name="xaf_animation_file">
+		XAFアニメーションファイル
+	</string>
+	<string name="xml_file">
+		XMLファイル
+	</string>
+	<string name="dot_raw_file">
+		RAWファイル
+	</string>
+	<string name="compressed_image_files">
+		圧縮画像
+	</string>
+	<string name="load_files">
+		ファイルのロード
+	</string>
+	<string name="choose_the_directory">
+		参照
+	</string>
+</strings>
diff --git a/indra/newview/skins/default/xui/ja/teleport_strings.xml b/indra/newview/skins/default/xui/ja/teleport_strings.xml
index 288c44bf8a..9e6b4bd26e 100644
--- a/indra/newview/skins/default/xui/ja/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/ja/teleport_strings.xml
@@ -1,87 +1,87 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<teleport_messages name="">
-	<message_set name="errors">
-		<message name="invalid_tport">
-			テレポート・リクエストの処理中に問題が発生しました。テレポートするには、
-再度ログインする必要があります。このメッセージが
-引き続き表示される場合は、技術サポートFAQ(www.secondlife.com/support)
-を参照してください。
-		</message>
-		<message name="invalid_region_handoff">
-			地域間の移動の処理中に問題が発生しました。地域間を
-移動するには、再度ログインする必要があります。このメッセージが
-引き続き表示される場合は、技術サポートFAQ(www.secondlife.com/support)
-を参照してください。
-		</message>
-		<message name="blocked_tport">
-			申し訳ございません。テレポートは現在、ブロックされています。もう少し後でやり直してください。
-やり直してもテレポートできない場合は、いったんログアウトし、再度ログインして
-問題を解決してください。
-		</message>
-		<message name="nolandmark_tport">
-			残念ながら、システムはランドマーク目的地を探せませんでした。
-		</message>
-		<message name="timeout_tport">
-			申し訳ございません。システムはテレポート接続を完了できませんでした。
-もう少し後でやり直してください。
-		</message>
-		<message name="noaccess_tport">
-			残念ながら、そのテレポート目的地へのアクセスがありません。
-		</message>
-		<message name="missing_attach_tport">
-			添付物は、まだ到着していません。あと数秒間お待ちいただくか、いったんログアウトし、再度ログインしてからテレポートをやり直してださい。
-		</message>
-		<message name="too_many_uploads_tport">
-			この地域の資産キューが現在込み合っているため、テレポート・
-リクエストを時間通りに処理することが難しい状況です。数分後にやり直すか、
-または混雑していない他の地域をお試しください。
-		</message>
-		<message name="expired_tport">
-			申し訳ございません。システムはテレポート・リクエストを時間どおりに
-完了できませんでした。数分後にやり直してください。
-		</message>
-		<message name="expired_region_handoff">
-			申し訳ございません。システムは地域間の移動を時間どおりに完了できませんでした。
-数分後にやり直してください。
-		</message>
-		<message name="no_host">
-			テレポート目的地を見つけられません。目的地が一時的に利用できない
-状態か、またはすでに消滅している可能性があります。数分後にやり直してください。
-		</message>
-		<message name="no_inventory_host">
-			持ち物システムは現在利用できません。
-		</message>
-	</message_set>
-	<message_set name="progress">
-		<message name="sending_dest">
-			目的地に送信しています。
-		</message>
-		<message name="redirecting">
-			別の目的地に再案内しています。
-		</message>
-		<message name="relaying">
-			目的地に中継しています。
-		</message>
-		<message name="sending_home">
-			ホーム位置リクエストを送信しています。
-		</message>
-		<message name="sending_landmark">
-			ランドマーク位置リクエストを送信しています。
-		</message>
-		<message name="completing">
-			テレポートを完了しています。
-		</message>
-		<message name="resolving">
-			目的地を解決しています。
-		</message>
-		<message name="contacting">
-			新しい地域にコンタクトしています。
-		</message>
-		<message name="arriving">
-			到着...
-		</message>
-		<message name="requesting">
-			テレポートをリクエスト...
-		</message>
-	</message_set>
-</teleport_messages>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<teleport_messages name="">
+	<message_set name="errors">
+		<message name="invalid_tport">
+			テレポート・リクエストの処理中に問題が発生しました。テレポートするには、
+再度ログインする必要があります。このメッセージが
+引き続き表示される場合は、技術サポートFAQ(www.secondlife.com/support)
+を参照してください。
+		</message>
+		<message name="invalid_region_handoff">
+			地域間の移動の処理中に問題が発生しました。地域間を
+移動するには、再度ログインする必要があります。このメッセージが
+引き続き表示される場合は、技術サポートFAQ(www.secondlife.com/support)
+を参照してください。
+		</message>
+		<message name="blocked_tport">
+			申し訳ございません。テレポートは現在、ブロックされています。もう少し後でやり直してください。
+やり直してもテレポートできない場合は、いったんログアウトし、再度ログインして
+問題を解決してください。
+		</message>
+		<message name="nolandmark_tport">
+			残念ながら、システムはランドマーク目的地を探せませんでした。
+		</message>
+		<message name="timeout_tport">
+			申し訳ございません。システムはテレポート接続を完了できませんでした。
+もう少し後でやり直してください。
+		</message>
+		<message name="noaccess_tport">
+			残念ながら、そのテレポート目的地へのアクセスがありません。
+		</message>
+		<message name="missing_attach_tport">
+			添付物は、まだ到着していません。あと数秒間お待ちいただくか、いったんログアウトし、再度ログインしてからテレポートをやり直してださい。
+		</message>
+		<message name="too_many_uploads_tport">
+			この地域の資産キューが現在込み合っているため、テレポート・
+リクエストを時間通りに処理することが難しい状況です。数分後にやり直すか、
+または混雑していない他の地域をお試しください。
+		</message>
+		<message name="expired_tport">
+			申し訳ございません。システムはテレポート・リクエストを時間どおりに
+完了できませんでした。数分後にやり直してください。
+		</message>
+		<message name="expired_region_handoff">
+			申し訳ございません。システムは地域間の移動を時間どおりに完了できませんでした。
+数分後にやり直してください。
+		</message>
+		<message name="no_host">
+			テレポート目的地を見つけられません。目的地が一時的に利用できない
+状態か、またはすでに消滅している可能性があります。数分後にやり直してください。
+		</message>
+		<message name="no_inventory_host">
+			持ち物システムは現在利用できません。
+		</message>
+	</message_set>
+	<message_set name="progress">
+		<message name="sending_dest">
+			目的地に送信しています。
+		</message>
+		<message name="redirecting">
+			別の目的地に再案内しています。
+		</message>
+		<message name="relaying">
+			目的地に中継しています。
+		</message>
+		<message name="sending_home">
+			ホーム位置リクエストを送信しています。
+		</message>
+		<message name="sending_landmark">
+			ランドマーク位置リクエストを送信しています。
+		</message>
+		<message name="completing">
+			テレポートを完了しています。
+		</message>
+		<message name="resolving">
+			目的地を解決しています。
+		</message>
+		<message name="contacting">
+			新しい地域にコンタクトしています。
+		</message>
+		<message name="arriving">
+			到着...
+		</message>
+		<message name="requesting">
+			テレポートをリクエスト...
+		</message>
+	</message_set>
+</teleport_messages>
diff --git a/indra/newview/skins/default/xui/nl/floater_snapshot.xml b/indra/newview/skins/default/xui/nl/floater_snapshot.xml
index 810ceda46c..e4279bffc4 100644
--- a/indra/newview/skins/default/xui/nl/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/nl/floater_snapshot.xml
@@ -21,12 +21,8 @@
 	<button label="Verzenden" name="send_btn"/>
 	<button label="Opslaan (L$[AMOUNT])" name="upload_btn"/>
 	<flyout_button label="Opslaan" name="save_btn" tool_tip="Afbeelding in een bestand opslaan">
-		<flyout_button_item name="save_item">
-			Opslaan
-		</flyout_button_item>
-		<flyout_button_item name="saveas_item">
-			Opslaan als...
-		</flyout_button_item>
+		<flyout_button_item name="save_item" label="Opslaan"/>
+		<flyout_button_item name="saveas_item" label="Opslaan als..."/>
 	</flyout_button>
 	<button label="Annuleren" name="discard_btn"/>
 	<button label="Meer &gt;&gt;" name="more_btn" tool_tip="Geavanceerde opties"/>
diff --git a/indra/newview/skins/default/xui/pl/floater_animation_preview.xml b/indra/newview/skins/default/xui/pl/floater_animation_preview.xml
index d1300a0e3c..7151f67203 100755
--- a/indra/newview/skins/default/xui/pl/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/pl/floater_animation_preview.xml
@@ -18,129 +18,129 @@
 	</text>
 	<combo_box label="" name="hand_pose_combo"
 	     tool_tip="Kontroluje co robi ręka podczas animacji">
-		<combo_item name="Spread">
+		<combo_box.item name="Spread">
 			Rozciągaj
-		</combo_item>
-		<combo_item name="Relaxed">
+		</combo_box.item>
+		<combo_box.item name="Relaxed">
 			Odpocznij
-		</combo_item>
-		<combo_item name="PointBoth">
+		</combo_box.item>
+		<combo_box.item name="PointBoth">
 			Wskazuj
-		</combo_item>
-		<combo_item name="Fist">
+		</combo_box.item>
+		<combo_box.item name="Fist">
 			Pięść
-		</combo_item>
-		<combo_item name="RelaxedLeft">
+		</combo_box.item>
+		<combo_box.item name="RelaxedLeft">
 			Lewa-Odpocznij
-		</combo_item>
-		<combo_item name="PointLeft">
+		</combo_box.item>
+		<combo_box.item name="PointLeft">
 			Wskazuj Lewą
-		</combo_item>
-		<combo_item name="FistLeft">
+		</combo_box.item>
+		<combo_box.item name="FistLeft">
 			Zaciśnij Lewą
-		</combo_item>
-		<combo_item name="RelaxedRight">
+		</combo_box.item>
+		<combo_box.item name="RelaxedRight">
 			Prawa-Odpocznj
-		</combo_item>
-		<combo_item name="PointRight">
+		</combo_box.item>
+		<combo_box.item name="PointRight">
 			Wskazuj Prawą
-		</combo_item>
-		<combo_item name="FistRight">
+		</combo_box.item>
+		<combo_box.item name="FistRight">
 			Zaciśnij Prawą
-		</combo_item>
-		<combo_item name="SaluteRight">
+		</combo_box.item>
+		<combo_box.item name="SaluteRight">
 			Salutuj Prawą
-		</combo_item>
-		<combo_item name="Typing">
+		</combo_box.item>
+		<combo_box.item name="Typing">
 			Pisz
-		</combo_item>
-		<combo_item name="PeaceRight">
+		</combo_box.item>
+		<combo_box.item name="PeaceRight">
 			Prawa-Pokój
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="emote_label">
 		Ekspresja
 	</text>
 	<combo_box label="" name="emote_combo"
 	     tool_tip="Kontroluj co wykonuje twarz w czasie animacji">
-		<combo_item name="[None]">
+		<combo_box.item name="[None]">
 			[Żadne]
-		</combo_item>
-		<combo_item name="Aaaaah">
+		</combo_box.item>
+		<combo_box.item name="Aaaaah">
 			Aaaaah
-		</combo_item>
-		<combo_item name="Afraid">
+		</combo_box.item>
+		<combo_box.item name="Afraid">
 			Obawa
-		</combo_item>
-		<combo_item name="Angry">
+		</combo_box.item>
+		<combo_box.item name="Angry">
 			Zlość
-		</combo_item>
-		<combo_item name="BigSmile">
+		</combo_box.item>
+		<combo_box.item name="BigSmile">
 			Duży Uśmiech
-		</combo_item>
-		<combo_item name="Bored">
+		</combo_box.item>
+		<combo_box.item name="Bored">
 			Znudzenie
-		</combo_item>
-		<combo_item name="Cry">
+		</combo_box.item>
+		<combo_box.item name="Cry">
 			Placz
-		</combo_item>
-		<combo_item name="Disdain">
+		</combo_box.item>
+		<combo_box.item name="Disdain">
 			Wzgarda
-		</combo_item>
-		<combo_item name="Embarrassed">
+		</combo_box.item>
+		<combo_box.item name="Embarrassed">
 			Zakłopotanie
-		</combo_item>
-		<combo_item name="Frown">
+		</combo_box.item>
+		<combo_box.item name="Frown">
 			Marszczenie Brwi
-		</combo_item>
-		<combo_item name="Kiss">
+		</combo_box.item>
+		<combo_box.item name="Kiss">
 			Pocałunek
-		</combo_item>
-		<combo_item name="Laugh">
+		</combo_box.item>
+		<combo_box.item name="Laugh">
 			Śmiech
-		</combo_item>
-		<combo_item name="Plllppt">
+		</combo_box.item>
+		<combo_box.item name="Plllppt">
 			Plllppt
-		</combo_item>
-		<combo_item name="Repulsed">
+		</combo_box.item>
+		<combo_box.item name="Repulsed">
 			Odrzucenie
-		</combo_item>
-		<combo_item name="Sad">
+		</combo_box.item>
+		<combo_box.item name="Sad">
 			Smutek
-		</combo_item>
-		<combo_item name="Shrug">
+		</combo_box.item>
+		<combo_box.item name="Shrug">
 			Wzruszanie Ramionami
-		</combo_item>
-		<combo_item name="Smile">
+		</combo_box.item>
+		<combo_box.item name="Smile">
 			Uśmiech
-		</combo_item>
-		<combo_item name="Surprise">
+		</combo_box.item>
+		<combo_box.item name="Surprise">
 			Niespodzianka
-		</combo_item>
-		<combo_item name="Wink">
+		</combo_box.item>
+		<combo_box.item name="Wink">
 			Mrugnięcie
-		</combo_item>
-		<combo_item name="Worry">
+		</combo_box.item>
+		<combo_box.item name="Worry">
 			Zmartwienie
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="preview_label">
 		Przeglądaj kiedy
 	</text>
 	<combo_box label="" name="preview_base_anim"
 	     tool_tip="Przetestuj zachowanie animacji kiedy awatar wykonuje normalne czynności">
-		<combo_item name="Standing">
+		<combo_box.item name="Standing">
 			Stanie
-		</combo_item>
-		<combo_item name="Walking">
+		</combo_box.item>
+		<combo_box.item name="Walking">
 			Chodzenie
-		</combo_item>
-		<combo_item name="Sitting">
+		</combo_box.item>
+		<combo_box.item name="Sitting">
 			Siedzenie
-		</combo_item>
-		<combo_item name="Flying">
+		</combo_box.item>
+		<combo_box.item name="Flying">
 			Latanie
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<spinner label="Złagodzić w (sekund)" name="ease_in_time"
 	     tool_tip="Ilość Czasu (w sekundach), w których animacje mieszają się" />
diff --git a/indra/newview/skins/default/xui/pl/floater_beacons.xml b/indra/newview/skins/default/xui/pl/floater_beacons.xml
index ac408f2591..9f614470da 100644
--- a/indra/newview/skins/default/xui/pl/floater_beacons.xml
+++ b/indra/newview/skins/default/xui/pl/floater_beacons.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="beacons" title="Emitery">
-	<panel name="beacons_panel">
-		<check_box label="Obiekty Dotykalne" name="touch_only"/>
-		<check_box label="Obiekty Skryptowane" name="scripted"/>
-		<check_box label="Obiekty Fizyczne" name="physical"/>
-		<check_box label="Źródła Dźwięku" name="sounds"/>
-		<check_box label="Źródła Cząsteczek" name="particles"/>
-		<check_box label="Podkreśl Emitery" name="highlights"/>
-		<check_box label="Pokaż Emitery" name="beacons"/>
-		<text name="beacon_width_label">
-			Szerokość Emiterów:
-		</text>
-	</panel>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="beacons" title="Emitery">
+	<panel name="beacons_panel">
+		<check_box label="Obiekty Dotykalne" name="touch_only"/>
+		<check_box label="Obiekty Skryptowane" name="scripted"/>
+		<check_box label="Obiekty Fizyczne" name="physical"/>
+		<check_box label="Źródła Dźwięku" name="sounds"/>
+		<check_box label="Źródła Cząsteczek" name="particles"/>
+		<check_box label="Podkreśl Emitery" name="highlights"/>
+		<check_box label="Pokaż Emitery" name="beacons"/>
+		<text name="beacon_width_label">
+			Szerokość Emiterów:
+		</text>
+	</panel>
+</floater>
diff --git a/indra/newview/skins/default/xui/pl/floater_buy_land.xml b/indra/newview/skins/default/xui/pl/floater_buy_land.xml
index 0af12e0c6d..0225c4bca5 100755
--- a/indra/newview/skins/default/xui/pl/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/pl/floater_buy_land.xml
@@ -66,15 +66,15 @@
 		Tylko członkowie z kontem Premium mogą mieć Posiadłosci.
 	</text>
 	<combo_box name="account_level">
-		<combo_item name="US$9.95/month,billedmonthly">
+		<combo_box.item name="US$9.95/month,billedmonthly">
 			9.95US$/miesiąc, płatne miesięcznie
-		</combo_item>
-		<combo_item name="US$7.50/month,billedquarterly">
+		</combo_box.item>
+		<combo_box.item name="US$7.50/month,billedquarterly">
 			7.50US$/miesiąc, płatne kwartalnie
-		</combo_item>
-		<combo_item name="US$6.00/month,billedannually">
+		</combo_box.item>
+		<combo_box.item name="US$6.00/month,billedannually">
 			6.00US$/miesiąc, płatne rocznie
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="land_use_action">
 		Zwiększ opłatę za używanie Posiadłości do 40US$/miesiąc.
diff --git a/indra/newview/skins/default/xui/pl/floater_god_tools.xml b/indra/newview/skins/default/xui/pl/floater_god_tools.xml
index 92de69eb5e..ff997c72cc 100755
--- a/indra/newview/skins/default/xui/pl/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/pl/floater_god_tools.xml
@@ -79,29 +79,29 @@
 				Cel:
 			</text>
 			<combo_box name="destination">
-				<combo_item name="Selection">
+				<combo_box.item name="Selection">
 					Selekcja
-				</combo_item>
-				<combo_item name="AgentRegion">
+				</combo_box.item>
+				<combo_box.item name="AgentRegion">
 					Agent Regionu
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="Request:">
 				Rządanie:
 			</text>
 			<combo_box name="request">
-				<combo_item name="colliders&lt;steps&gt;">
+				<combo_box.item name="colliders&lt;steps&gt;">
 					kolidery &lt;kroki&gt;
-				</combo_item>
-				<combo_item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
+				</combo_box.item>
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
 					skrypty &lt;policz&gt;,&lt;opcjonalnie powtórzenie&gt;
-				</combo_item>
-				<combo_item name="objects&lt;pattern&gt;">
+				</combo_box.item>
+				<combo_box.item name="objects&lt;pattern&gt;">
 					obiekty &lt;powtórzenia&gt;
-				</combo_item>
-				<combo_item name="rez&lt;asset_id&gt;">
+				</combo_box.item>
+				<combo_box.item name="rez&lt;asset_id&gt;">
 					rez &lt;asset_id&gt;
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="Parameter:">
 				Parameter:
diff --git a/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml b/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml
index 010537d555..e76ad56660 100755
--- a/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml
@@ -8,21 +8,21 @@
 		Antialiasing:
 	</text>
 	<combo_box label="Antialiasing" name="fsaa" width="84">
-		<combo_item name="FSAADisabled">
+		<combo_box.item name="FSAADisabled">
 			Wyłączone
-		</combo_item>
-		<combo_item name="2x">
+		</combo_box.item>
+		<combo_box.item name="2x">
 			2x
-		</combo_item>
-		<combo_item name="4x">
+		</combo_box.item>
+		<combo_box.item name="4x">
 			4x
-		</combo_item>
-		<combo_item name="8x">
+		</combo_box.item>
+		<combo_box.item name="8x">
 			8x
-		</combo_item>
-		<combo_item name="16x">
+		</combo_box.item>
+		<combo_box.item name="16x">
 			16x
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<spinner label="Gamma:" name="gamma" />
 	<text type="string" length="1" name="(brightness, lower is brighter)">
diff --git a/indra/newview/skins/default/xui/pl/floater_image_preview.xml b/indra/newview/skins/default/xui/pl/floater_image_preview.xml
index 9772dc7808..b0fe49deef 100755
--- a/indra/newview/skins/default/xui/pl/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/pl/floater_image_preview.xml
@@ -10,36 +10,36 @@
 		Wyświetl obraz jako:
 	</text>
 	<combo_box label="Rodzaj Ubrania" name="clothing_type_combo">
-		<combo_item name="Image">
+		<combo_box.item name="Image">
 			Obraz
-		</combo_item>
-		<combo_item name="Hair">
+		</combo_box.item>
+		<combo_box.item name="Hair">
 			Włosy
-		</combo_item>
-		<combo_item name="FemaleHead">
+		</combo_box.item>
+		<combo_box.item name="FemaleHead">
 			Damska Głowa
-		</combo_item>
-		<combo_item name="FemaleUpperBody">
+		</combo_box.item>
+		<combo_box.item name="FemaleUpperBody">
 			Damska Górna Część Ciała
-		</combo_item>
-		<combo_item name="FemaleLowerBody">
+		</combo_box.item>
+		<combo_box.item name="FemaleLowerBody">
 			Damska Górna Część Ciała
-		</combo_item>
-		<combo_item name="MaleHead">
+		</combo_box.item>
+		<combo_box.item name="MaleHead">
 			Męska Głowa
-		</combo_item>
-		<combo_item name="MaleUpperBody">
+		</combo_box.item>
+		<combo_box.item name="MaleUpperBody">
 			Męska Górna Część Ciała
-		</combo_item>
-		<combo_item name="MaleLowerBody">
+		</combo_box.item>
+		<combo_box.item name="MaleLowerBody">
 			Męska Dolna Część Ciała
-		</combo_item>
-		<combo_item name="Skirt">
+		</combo_box.item>
+		<combo_box.item name="Skirt">
 			Spódnica
-		</combo_item>
-		<combo_item name="SculptedPrim">
+		</combo_box.item>
+		<combo_box.item name="SculptedPrim">
 			Sculpt
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text name="bad_image_text">
 		Nie można wczytać obrazu.
diff --git a/indra/newview/skins/default/xui/pl/floater_sell_land.xml b/indra/newview/skins/default/xui/pl/floater_sell_land.xml
index 94500d0295..2d42ac3368 100755
--- a/indra/newview/skins/default/xui/pl/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/pl/floater_sell_land.xml
@@ -34,15 +34,15 @@
 		Wybierz sprzedaż dla kogokolwiek albo dla wybranego kupca.
 	</text>
 	<combo_box name="sell_to">
-		<combo_item name="--selectone--">
+		<combo_box.item name="--selectone--">
 			-- wybierz --
-		</combo_item>
-		<combo_item name="Anyone">
+		</combo_box.item>
+		<combo_box.item name="Anyone">
 			Ktokolwiek
-		</combo_item>
-		<combo_item name="Specificuser:">
+		</combo_box.item>
+		<combo_box.item name="Specificuser:">
 			Wybrany kupiec:
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<button label="Wybierz..." name="sell_to_select_agent" />
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/pl/floater_settings_debug.xml b/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
index 496f8af2db..8c3f9cc056 100755
--- a/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater name="settings_debug" title="Ustawienia Usuwania Błędów">
 	<combo_box name="boolean_combo">
-		<combo_item name="TRUE">
+		<combo_box.item name="TRUE">
 			PRAWDA
-		</combo_item>
-		<combo_item name="FALSE">
+		</combo_box.item>
+		<combo_box.item name="FALSE">
 			NIEPRAWDA
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<color_swatch label="Kolor" name="color_swatch"/>
 	<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/pl/floater_snapshot.xml b/indra/newview/skins/default/xui/pl/floater_snapshot.xml
index 9c011b9a64..e707bc797a 100755
--- a/indra/newview/skins/default/xui/pl/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/pl/floater_snapshot.xml
@@ -21,12 +21,12 @@
 	<button label="Wyślij" name="send_btn"/>
 	<button label="Załaduj (L$[AMOUNT])" name="upload_btn"/>
 	<flyout_button label="Zapisz" name="save_btn" tool_tip="Zapisz zdjęcie na dysk">
-		<flyout_button_item name="save_item">
-			Zapisz
-		</flyout_button_item>
-		<flyout_button_item name="saveas_item">
-			Zapisz Jako...
-		</flyout_button_item>
+    <flyout_button.item name="save_item">
+      Zapisz
+    </flyout_button.item>
+    <flyout_button.item name="saveas_item">
+      Zapisz Jako...
+    </flyout_button.item>
 	</flyout_button>
 	<button label="Anuluj" name="discard_btn"/>
 	<button label="Więcej &gt;&gt;" name="more_btn" tool_tip="Ustawienia Zaawansowane"/>
@@ -38,75 +38,75 @@
 		Format
 	</text>
 	<combo_box label="Rozdzielczość" name="postcard_size_combo">
-		<combo_item name="CurrentWindow">
+		<combo_box.item name="CurrentWindow">
 			Obecne Okno
-		</combo_item>
-		<combo_item name="640x480">
+		</combo_box.item>
+		<combo_box.item name="640x480">
 			640x480
-		</combo_item>
-		<combo_item name="800x600">
+		</combo_box.item>
+		<combo_box.item name="800x600">
 			800x600
-		</combo_item>
-		<combo_item name="1024x768">
+		</combo_box.item>
+		<combo_box.item name="1024x768">
 			1024x768
-		</combo_item>
-		<combo_item name="Custom">
+		</combo_box.item>
+		<combo_box.item name="Custom">
 			Wybierz
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="Rozdzielczość" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
+		<combo_box.item name="CurrentWindow">
 			Obecne Okno
-		</combo_item>
-		<combo_item name="Small(128x128)">
+		</combo_box.item>
+		<combo_box.item name="Small(128x128)">
 			Mały (128x128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
+		</combo_box.item>
+		<combo_box.item name="Medium(256x256)">
 			Średni (256x256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
+		</combo_box.item>
+		<combo_box.item name="Large(512x512)">
 			Duży (512x512)
-		</combo_item>
-		<combo_item name="Custom">
+		</combo_box.item>
+		<combo_box.item name="Custom">
 			Wybierz
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="Rozdzielczość" name="local_size_combo">
-		<combo_item name="CurrentWindow">
+		<combo_box.item name="CurrentWindow">
 			Obecne Okno
-		</combo_item>
-		<combo_item name="320x240">
+		</combo_box.item>
+		<combo_box.item name="320x240">
 			320x240
-		</combo_item>
-		<combo_item name="640x480">
+		</combo_box.item>
+		<combo_box.item name="640x480">
 			640x480
-		</combo_item>
-		<combo_item name="800x600">
+		</combo_box.item>
+		<combo_box.item name="800x600">
 			800x600
-		</combo_item>
-		<combo_item name="1024x768">
+		</combo_box.item>
+		<combo_box.item name="1024x768">
 			1024x768
-		</combo_item>
-		<combo_item name="1280x1024">
+		</combo_box.item>
+		<combo_box.item name="1280x1024">
 			1280x1024
-		</combo_item>
-		<combo_item name="1600x1200">
+		</combo_box.item>
+		<combo_box.item name="1600x1200">
 			1600x1200
-		</combo_item>
-		<combo_item name="Custom">
+		</combo_box.item>
+		<combo_box.item name="Custom">
 			Wybierz
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="Format" name="local_format_combo">
-		<combo_item name="PNG">
+		<combo_box.item name="PNG">
 			PNG
-		</combo_item>
-		<combo_item name="JPEG">
+		</combo_box.item>
+		<combo_box.item name="JPEG">
 			JPEG
-		</combo_item>
-		<combo_item name="BMP">
+		</combo_box.item>
+		<combo_box.item name="BMP">
 			BMP
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<spinner label="Szer." name="snapshot_width"/>
 	<spinner label="Wys." name="snapshot_height"/>
@@ -116,15 +116,15 @@
 		Zapisz:
 	</text>
 	<combo_box label="Warstwy Obrazu" name="layer_types">
-		<combo_item name="Colors">
+		<combo_box.item name="Colors">
 			Kolory
-		</combo_item>
-		<combo_item name="Depth">
+		</combo_box.item>
+		<combo_box.item name="Depth">
 			Głębokość
-		</combo_item>
-		<combo_item name="ObjectMattes">
+		</combo_box.item>
+		<combo_box.item name="ObjectMattes">
 			Obiekty Ślepe
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<check_box label="Pokaż interfejs na zdjęciu" name="ui_check"/>
 	<check_box label="Pokaż obiekty HUD na zdjęciu" name="hud_check"/>
diff --git a/indra/newview/skins/default/xui/pl/floater_tools.xml b/indra/newview/skins/default/xui/pl/floater_tools.xml
index a677a2558a..2555186a12 100755
--- a/indra/newview/skins/default/xui/pl/floater_tools.xml
+++ b/indra/newview/skins/default/xui/pl/floater_tools.xml
@@ -7,33 +7,39 @@
 	<button label="" label_selected="" name="button create" tool_tip="Stwórz"/>
 	<button label="" label_selected="" name="button land" tool_tip="Teren"/>
 	<!-- Focus panel -->
-	<check_box label="Zbliżenie" name="radio zoom"/>
-	<volume_slider name="slider zoom"/>
-	<check_box label="Obracanie (Ctrl)" name="radio orbit"/>
-	<check_box label="Przesunięcie (Ctrl-Shift)" name="radio pan"/>
+  <volume_slider name="slider zoom"/>
+  <radio_group name="focus_radio_group">
+    <radio_item label="Zbliżenie" name="radio zoom"/>
+    <radio_item label="Obracanie (Ctrl)" name="radio orbit"/>
+    <radio_item label="Przesunięcie (Ctrl-Shift)" name="radio pan"/>
+  </radio_group>
 	<!-- Move panel -->
-	<check_box label="Przesuń" name="radio move"/>
-	<check_box label="Podnieś (Ctrl)" name="radio lift"/>
-	<check_box label="Obróć (Ctrl-Shift)" name="radio spin"/>
+  <radio_group name="move_radio_group">
+    <radio_item label="Przesuń" name="radio move"/>
+    <radio_item label="Podnieś (Ctrl)" name="radio lift"/>
+    <radio_item label="Obróć (Ctrl-Shift)" name="radio spin"/>
+  </radio_group>
 	<!-- Edit panel -->
-	<check_box label="Pozycja" name="radio position"/>
-	<check_box label="Obróć (Ctrl)" name="radio rotate"/>
-	<check_box label="Rozciągnij (Ctrl-Shift)" name="radio stretch"/>
-	<check_box label="Wybierz Teksturę" name="radio select face"/>
+  <radio_group name="edit_radio_group">
+    <radio_item label="Pozycja" name="radio position"/>
+    <radio_item label="Obróć (Ctrl)" name="radio rotate"/>
+    <radio_item label="Rozciągnij (Ctrl-Shift)" name="radio stretch"/>
+    <radio_item label="Wybierz Teksturę" name="radio select face"/>
+  </radio_group>
 	<check_box label="Edytuj Połączone Części" name="checkbox edit linked parts"/>
 	<text name="text ruler mode">
 		Linijka:
 	</text>
 	<combo_box name="combobox grid mode">
-		<combo_item name="World">
+		<combo_box.item name="World">
 			Świat
-		</combo_item>
-		<combo_item name="Local">
+		</combo_box.item>
+		<combo_box.item name="Local">
 			Lokalna
-		</combo_item>
-		<combo_item name="Reference">
+		</combo_box.item>
+		<combo_box.item name="Reference">
 			Względna
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<check_box label="Rozciągnij 2 Strony" name="checkbox uniform"/>
 	<check_box label="Rozciągnij Teksturę" name="checkbox stretch textures"/>
@@ -64,23 +70,25 @@
 	<check_box label="Kopia Środka" name="checkbox copy centers"/>
 	<check_box label="Kopia Obrotu" name="checkbox copy rotates"/>
 	<!-- Land panel -->
-	<check_box label="Zaznaczanie" name="radio select land"/>
-	<check_box label="Niwelowanie" name="radio flatten"/>
-	<check_box label="Podnoszenie" name="radio raise"/>
-	<check_box label="Obniżanie" name="radio lower"/>
-	<check_box label="Wygładzanie" name="radio smooth"/>
-	<check_box label="Fałdowanie terenu" name="radio noise"/>
-	<check_box label="Cofnięcie modyfikacji" name="radio revert"/>
+  <radio_group name="land_radio_group">
+    <radio_item label="Zaznaczanie" name="radio select land"/>
+    <radio_item label="Niwelowanie" name="radio flatten"/>
+    <radio_item label="Podnoszenie" name="radio raise"/>
+    <radio_item label="Obniżanie" name="radio lower"/>
+    <radio_item label="Wygładzanie" name="radio smooth"/>
+    <radio_item label="Fałdowanie terenu" name="radio noise"/>
+    <radio_item label="Cofnięcie modyfikacji" name="radio revert"/>
+  </radio_group>
 	<combo_box name="combobox brush size">
-		<combo_item name="Small">
+		<combo_box.item name="Small">
 			Małe
-		</combo_item>
-		<combo_item name="Medium">
+		</combo_box.item>
+		<combo_box.item name="Medium">
 			Średnie
-		</combo_item>
-		<combo_item name="Large">
+		</combo_box.item>
+		<combo_box.item name="Large">
 			Duże
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<volume_slider name="slider force"/>
 	<text length="1" name="Strength:" type="string">
@@ -168,27 +176,27 @@
 				Lewe Kliknięcie:
 			</text>
 			<combo_box name="clickaction">
-				<combo_item name="Touch/grab(default)">
+				<combo_box.item name="Touch/grab(default)">
 					Dotknij (domyślne)
-				</combo_item>
-				<combo_item name="Sitonobject">
+				</combo_box.item>
+				<combo_box.item name="Sitonobject">
 					Usiądź na Obiekcie
-				</combo_item>
-				<combo_item name="Buyobject">
+				</combo_box.item>
+				<combo_box.item name="Buyobject">
 					Kup Obiekt
-				</combo_item>
-				<combo_item name="Payobject">
+				</combo_box.item>
+				<combo_box.item name="Payobject">
 					Zapłać Obiektowi
-				</combo_item>
-				<combo_item name="Open">
+				</combo_box.item>
+				<combo_box.item name="Open">
 					Otwórz
-				</combo_item>
-				<combo_item name="Play">
+				</combo_box.item>
+				<combo_box.item name="Play">
 					Odtwarzaj Media
-				</combo_item>
-				<combo_item name="Opemmedia">
+				</combo_box.item>
+				<combo_box.item name="Opemmedia">
 					Otwrórz Media
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="B:">
 				B:
@@ -273,56 +281,56 @@
 				Materiał
 			</text>
 			<combo_box name="material">
-				<combo_item name="Stone">
+				<combo_box.item name="Stone">
 					Kamień
-				</combo_item>
-				<combo_item name="Metal">
+				</combo_box.item>
+				<combo_box.item name="Metal">
 					Metal
-				</combo_item>
-				<combo_item name="Glass">
+				</combo_box.item>
+				<combo_box.item name="Glass">
 					Szkło
-				</combo_item>
-				<combo_item name="Wood">
+				</combo_box.item>
+				<combo_box.item name="Wood">
 					Drewno
-				</combo_item>
-				<combo_item name="Flesh">
+				</combo_box.item>
+				<combo_box.item name="Flesh">
 					Ciało
-				</combo_item>
-				<combo_item name="Plastic">
+				</combo_box.item>
+				<combo_box.item name="Plastic">
 					Plastik
-				</combo_item>
-				<combo_item name="Rubber">
+				</combo_box.item>
+				<combo_box.item name="Rubber">
 					Guma
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="label basetype">
 				Rodzaj Bloku Budowalnego
 			</text>
 			<combo_box name="comboBaseType">
-				<combo_item name="Box">
+				<combo_box.item name="Box">
 					Klocek
-				</combo_item>
-				<combo_item name="Cylinder">
+				</combo_box.item>
+				<combo_box.item name="Cylinder">
 					Walec
-				</combo_item>
-				<combo_item name="Prism">
+				</combo_box.item>
+				<combo_box.item name="Prism">
 					Graniastosłup
-				</combo_item>
-				<combo_item name="Sphere">
+				</combo_box.item>
+				<combo_box.item name="Sphere">
 					Kula
-				</combo_item>
-				<combo_item name="Torus">
+				</combo_box.item>
+				<combo_box.item name="Torus">
 					Torus
-				</combo_item>
-				<combo_item name="Tube">
+				</combo_box.item>
+				<combo_box.item name="Tube">
 					Rura
-				</combo_item>
-				<combo_item name="Ring">
+				</combo_box.item>
+				<combo_box.item name="Ring">
 					Pierścień
-				</combo_item>
-				<combo_item name="Sculpted">
+				</combo_box.item>
+				<combo_box.item name="Sculpted">
 					Skulpty
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="text cut">
 				Wykrój
@@ -341,18 +349,18 @@
 				Kształt Wydrążenia
 			</text>
 			<combo_box name="hole">
-				<combo_item name="Default">
+				<combo_box.item name="Default">
 					Domyślny
-				</combo_item>
-				<combo_item name="Circle">
+				</combo_box.item>
+				<combo_box.item name="Circle">
 					Koło
-				</combo_item>
-				<combo_item name="Square">
+				</combo_box.item>
+				<combo_box.item name="Square">
 					Kwadrat
-				</combo_item>
-				<combo_item name="Triangle">
+				</combo_box.item>
+				<combo_box.item name="Triangle">
 					Trójkąt
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="text twist">
 				Skręcenie
@@ -400,21 +408,21 @@
 				Typ Ścięgna
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_item name="None">
+				<combo_box.item name="None">
 					(żadne)
-				</combo_item>
-				<combo_item name="Sphere">
+				</combo_box.item>
+				<combo_box.item name="Sphere">
 					Kula
-				</combo_item>
-				<combo_item name="Torus">
+				</combo_box.item>
+				<combo_box.item name="Torus">
 					Torus
-				</combo_item>
-				<combo_item name="Plane">
+				</combo_box.item>
+				<combo_box.item name="Plane">
 					Płaczyzna
-				</combo_item>
-				<combo_item name="Cylinder">
+				</combo_box.item>
+				<combo_box.item name="Cylinder">
 					Walec
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 		</panel>
 		<!-- Features sub-tab -->
@@ -460,88 +468,88 @@
 				Mapowanie
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_item name="Default">
+				<combo_box.item name="Default">
 					Domyślne
-				</combo_item>
-				<combo_item name="Planar">
+				</combo_box.item>
+				<combo_box.item name="Planar">
 					Planarne
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="label shininess">
 				Połysk
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_item name="None">
+				<combo_box.item name="None">
 					Żadny
-				</combo_item>
-				<combo_item name="Low">
+				</combo_box.item>
+				<combo_box.item name="Low">
 					Niski
-				</combo_item>
-				<combo_item name="Medium">
+				</combo_box.item>
+				<combo_box.item name="Medium">
 					Średni
-				</combo_item>
-				<combo_item name="High">
+				</combo_box.item>
+				<combo_box.item name="High">
 					Wysoki
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="label bumpiness">
 				Powierzchnia
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
+				<combo_box.item name="None">
 					Żadna
-				</combo_item>
-				<combo_item name="Brightness">
+				</combo_box.item>
+				<combo_box.item name="Brightness">
 					Najjaśniejsza
-				</combo_item>
-				<combo_item name="Darkness">
+				</combo_box.item>
+				<combo_box.item name="Darkness">
 					Najciemniejsza
-				</combo_item>
-				<combo_item name="woodgrain">
+				</combo_box.item>
+				<combo_box.item name="woodgrain">
 					Drewniano-ziarnista
-				</combo_item>
-				<combo_item name="bark">
+				</combo_box.item>
+				<combo_box.item name="bark">
 					Kory Drzewa
-				</combo_item>
-				<combo_item name="bricks">
+				</combo_box.item>
+				<combo_box.item name="bricks">
 					Cegieł
-				</combo_item>
-				<combo_item name="checker">
+				</combo_box.item>
+				<combo_box.item name="checker">
 					Planszy Szachowej
-				</combo_item>
-				<combo_item name="concrete">
+				</combo_box.item>
+				<combo_box.item name="concrete">
 					Betonu
-				</combo_item>
-				<combo_item name="crustytile">
+				</combo_box.item>
+				<combo_box.item name="crustytile">
 					Płytki/Kafelki
-				</combo_item>
-				<combo_item name="cutstone">
+				</combo_box.item>
+				<combo_box.item name="cutstone">
 					Kamienia
-				</combo_item>
-				<combo_item name="discs">
+				</combo_box.item>
+				<combo_box.item name="discs">
 					Dysku CD
-				</combo_item>
-				<combo_item name="gravel">
+				</combo_box.item>
+				<combo_box.item name="gravel">
 					Żwiru
-				</combo_item>
-				<combo_item name="petridish">
+				</combo_box.item>
+				<combo_box.item name="petridish">
 					Skamieliny
-				</combo_item>
-				<combo_item name="siding">
+				</combo_box.item>
+				<combo_box.item name="siding">
 					Sidingu
-				</combo_item>
-				<combo_item name="stonetile">
+				</combo_box.item>
+				<combo_box.item name="stonetile">
 					Płytki Kamiennej
-				</combo_item>
-				<combo_item name="stucco">
+				</combo_box.item>
+				<combo_box.item name="stucco">
 					Stucco
-				</combo_item>
-				<combo_item name="suction">
+				</combo_box.item>
+				<combo_box.item name="suction">
 					Suction
-				</combo_item>
-				<combo_item name="weave">
+				</combo_box.item>
+				<combo_box.item name="weave">
 					Fali
-				</combo_item>
+				</combo_box.item>
 			</combo_box>
 			<text name="tex scale">
 				Ilość powtórzeń
diff --git a/indra/newview/skins/default/xui/pl/floater_world_map.xml b/indra/newview/skins/default/xui/pl/floater_world_map.xml
index 31f3477aeb..f4f5792494 100755
--- a/indra/newview/skins/default/xui/pl/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/pl/floater_world_map.xml
@@ -41,15 +41,15 @@
 
 	<check_box label="" name="event_mature_chk" />
 	<combo_box label="Dostępni Znajomi" name="friend combo" tool_tip="Znajomi na mapie">
-		<combo_item name="none_selected">
+		<combo_box.item name="none_selected">
 			Dostępni Znajomi
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<combo_box label="Zapisane Miejsca" name="landmark combo"
 	     tool_tip="Zapisane miejsca na mapie">
-		<combo_item name="none_selected">
+		<combo_box.item name="none_selected">
 			Zapisane Miejsca
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<line_editor label="Szukaj po nazwie regionu" name="location"
 	     tool_tip="Wpisz nazwę regionu" />
diff --git a/indra/newview/skins/default/xui/pl/panel_login.xml b/indra/newview/skins/default/xui/pl/panel_login.xml
index 08a768d44f..13fcaa25ab 100755
--- a/indra/newview/skins/default/xui/pl/panel_login.xml
+++ b/indra/newview/skins/default/xui/pl/panel_login.xml
@@ -18,16 +18,16 @@
   <text name="start_location_text">
 		Miejsce Startu:
 	</text>
-  <combo_box name="start_location_combo">
-    <combo_item name="MyHome">
+	<combo_box name="start_location_combo">
+		<combo_box.item name="MyHome">
 			Mój Start
-		</combo_item>
-    <combo_item name="MyLastLocation">
+		</combo_box.item>
+		<combo_box.item name="MyLastLocation">
 			Ostatnie Miejsce
-		</combo_item>
-    <combo_item name="Typeregionname">
+		</combo_box.item>
+		<combo_box.item name="Typeregionname">
 			&lt;Wpisz Region&gt;
-		</combo_item>
+		</combo_box.item>
   </combo_box>
   <check_box label="Zapamiętaj Hasło" name="remember_check" />
   <button label="Połącz" label_selected="Połącz" name="connect_btn" />
diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_general.xml b/indra/newview/skins/default/xui/pl/panel_preferences_general.xml
index 34b77c8e31..f120af9aaf 100755
--- a/indra/newview/skins/default/xui/pl/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/pl/panel_preferences_general.xml
@@ -10,15 +10,9 @@
 	</radio_group>
 	<check_box label="Pokaż Miejsce Startu na Ekranie Logowania" name="show_location_checkbox"/>
 	<combo_box name="fade_out_combobox">
-		<combo_item name="Never">
-			Nigdy
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Tymczasowo
-		</combo_item>
-		<combo_item name="Always">
-			Zawsze
-		</combo_item>
+		<combo_box.item name="Never" label="Nigdy" />
+		<combo_box.item name="Show Temporarily" label="Tymczasowo" />
+		<combo_box.item name="Always" label="Zawsze" />
 	</combo_box>
 	<check_box label="Używaj Małych Imion Awatarów" name="small_avatar_names_checkbox"/>
 	<check_box label="Nie Wyświetlaj Mojego Imienia" name="show_my_name_checkbox"/>
@@ -63,47 +57,21 @@
 		&lt;Wpisz Region&gt;
 	</string>
 	<combo_box name="crash_behavior_combobox">
-		<combo_item length="1" name="Askbeforesending" type="string">
-			Pytaj przed wysłaniem
-		</combo_item>
-		<combo_item length="1" name="Alwayssend" type="string">
-			Zawsze wysyłaj
-		</combo_item>
-		<combo_item length="1" name="Neversend" type="string">
-			Nigdy nie wysyłaj
-		</combo_item>
+		<combo_box.item length="1" name="Askbeforesending" type="string" label="Pytaj przed wysłaniem" />
+		<combo_box.item length="1" name="Alwayssend" type="string" label="Zawsze wysyłaj" />
+		<combo_box.item length="1" name="Neversend" type="string" label="Nigdy nie wysyłaj" />
 	</combo_box>
 	<combo_box name="language_combobox">
-		<combo_item length="1" name="System Default Language" type="string">
-			Domyślny
-		</combo_item>
-		<combo_item length="1" name="English" type="string">
-			English (Angielski)
-		</combo_item>
-		<combo_item length="1" name="Chinese" type="string">
-			中文 (简体) (Chiński) - Beta
-		</combo_item>
-		<combo_item length="1" name="Deutsch(German)" type="string">
-			Deutsch (Niemiecki) - Beta
-		</combo_item>
-		<combo_item length="1" name="French" type="string">
-			Français (Francuski) - Beta
-		</combo_item>
-		<combo_item length="1" name="(Japanese)" type="string">
-			日本語 (Japoński) - Beta
-		</combo_item>
-		<combo_item length="1" name="(Korean)" type="string">
-			한국어 (Koreański) - Beta
-		</combo_item>
-		<combo_item length="1" name="Polish" type="string">
-			Polski - Beta
-		</combo_item>
-		<combo_item length="1" name="Portugese" type="string">
-			Portugués (Portugalski) - Beta
-		</combo_item>
-		<combo_item length="1" name="Spanish" type="string">
-			Español (Hiszpański) - Beta
-		</combo_item>
+		<combo_box.item length="1" name="System Default Language" type="string" label="Domyślny" />
+		<combo_box.item length="1" name="English" type="string" label="English (Angielski)" />
+		<combo_box.item length="1" name="Chinese" type="string" label="中文 (简体) (Chiński) - Beta" />
+		<combo_box.item length="1" name="Deutsch(German)" type="string" label="Deutsch (Niemiecki) - Beta" />
+		<combo_box.item length="1" name="French" type="string" label="Français (Francuski) - Beta" />
+		<combo_box.item length="1" name="(Japanese)" type="string" label="日本語 (Japoński) - Beta" />
+		<combo_box.item length="1" name="(Korean)" type="string" label="한국어 (Koreański) - Beta" />
+		<combo_box.item length="1" name="Polish" type="string" label="Polski - Beta" />
+		<combo_box.item length="1" name="Portugese" type="string" label="Portugués (Portugalski) - Beta" />
+		<combo_box.item length="1" name="Spanish" type="string" label="Español (Hiszpański) - Beta" />
 	</combo_box>
 	<check_box label="Język znany publicznie" name="language_is_public" tool_tip="Pozwala obiektom w świecie poznać Twój wybór język."/>
 </panel>
diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/pl/panel_preferences_graphics1.xml
index 406fede4a9..ee63a12bd1 100755
--- a/indra/newview/skins/default/xui/pl/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/pl/panel_preferences_graphics1.xml
@@ -9,21 +9,21 @@
 		Wymiary Okna:
 	</text>
 	<combo_box name="windowsize combo">
-		<combo_item type="string" length="1" name="640x480">
+		<combo_box.item type="string" length="1" name="640x480">
 			640x480
-		</combo_item>
-		<combo_item type="string" length="1" name="800x600">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="800x600">
 			800x600
-		</combo_item>
-		<combo_item type="string" length="1" name="720x480">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="720x480">
 			720x480 (NTSC)
-		</combo_item>
-		<combo_item type="string" length="1" name="768x576">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="768x576">
 			768x576 (PAL)
-		</combo_item>
-		<combo_item type="string" length="1" name="1024x768">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="1024x768">
 			1024x768
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<text type="string" length="1" name="DisplayResLabel">
 		Rozdzielczość:
@@ -32,18 +32,18 @@
 		Proporcje:
 	</text>
 	<combo_box name="aspect_ratio" tool_tip="width / height">
-		<combo_item type="string" length="1" name="4:3(StandardCRT)">
+		<combo_box.item type="string" length="1" name="4:3(StandardCRT)">
 			4:3 (Standardowy CRT)
-		</combo_item>
-		<combo_item type="string" length="1" name="5:4(1280x1024LCD)">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)">
 			5:4 (1280x1024 LCD)
-		</combo_item>
-		<combo_item type="string" length="1" name="8:5(Widescreen)">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="8:5(Widescreen)">
 			8:5 (Panoramiczny)
-		</combo_item>
-		<combo_item type="string" length="1" name="16:9(Widescreen)">
+		</combo_box.item>
+		<combo_box.item type="string" length="1" name="16:9(Widescreen)">
 			16:9 (Panoramiczny)
-		</combo_item>
+		</combo_box.item>
 	</combo_box>
 	<check_box label="Detekcja proporcji" name="aspect_auto_detect" />
 	<text type="string" length="1" name="HigherText">
diff --git a/indra/newview/skins/default/xui/pt/floater_about.xml b/indra/newview/skins/default/xui/pt/floater_about.xml
index fa0e34815d..fe0e03a9ad 100644
--- a/indra/newview/skins/default/xui/pt/floater_about.xml
+++ b/indra/newview/skins/default/xui/pt/floater_about.xml
@@ -1,36 +1,36 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_about" title="Sobre o Second Life">
-	<text_editor name="credits_editor">
-		Second Life é oferecido a você por Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les e muitos outros.
-
-  Obrigado aos seguintes residentes por ajudar a garantir para que esta versão seja ainda melhor: (in progress)
-
-  3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion
-  APR Copyright (C) 2000-2004 The Apache Software Foundation
-  cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
-  DBus/dbus-glib Copyright (C) 2002, 2003  CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
-  expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
-  FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
-  GL Copyright (C) 1999-2004 Brian Paul.
-  Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
-  jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
-  jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
-  ogg/vorbis Copyright (C) 2001, Xiphophorus
-  OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
-  SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
-  SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-  xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
-  zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
-  google-perftools Copyright (c) 2005, Google Inc.
-  
-  Todos os direitos reservados.  Veja licenças.txt para detalhes.
-
-  Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
-
-
-  Eu tive uma pequena ajuda de meus amigos. --Richard Starkey
-	</text_editor>
-	<string name="you_are_at">
-		Você está em [POSITION]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_about" title="Sobre o Second Life">
+	<text_editor name="credits_editor">
+		Second Life é oferecido a você por Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les e muitos outros.
+
+  Obrigado aos seguintes residentes por ajudar a garantir para que esta versão seja ainda melhor: (in progress)
+
+  3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion
+  APR Copyright (C) 2000-2004 The Apache Software Foundation
+  cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se)
+  DBus/dbus-glib Copyright (C) 2002, 2003  CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
+  expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
+  FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
+  GL Copyright (C) 1999-2004 Brian Paul.
+  Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
+  jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
+  jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
+  ogg/vorbis Copyright (C) 2001, Xiphophorus
+  OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
+  SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
+  SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+  xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
+  zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
+  google-perftools Copyright (c) 2005, Google Inc.
+  
+  Todos os direitos reservados.  Veja licenças.txt para detalhes.
+
+  Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
+
+
+  Eu tive uma pequena ajuda de meus amigos. --Richard Starkey
+	</text_editor>
+	<string name="you_are_at">
+		Você está em [POSITION]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml
index 604b143130..3a715aa01f 100644
--- a/indra/newview/skins/default/xui/pt/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml
@@ -1,432 +1,432 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floaterland" title="Sobre o Terreno">
-	<tab_container name="landtab">
-		<panel label="Geral" name="land_general_panel">
-			<text length="1" name="Name:" type="string">
-				Nome:
-			</text>
-			<text length="1" name="Description:" type="string">
-				Descrição:
-			</text>
-			<text length="1" name="Owner:" type="string">
-				Proprietário:
-			</text>
-			<text length="1" name="OwnerText" type="string">
-				Leyla Linden
-			</text>
-			<button label="Perfil..." label_selected="Perfil..." name="Profile..."/>
-			<text length="1" name="Group:" type="string">
-				Grupo:
-			</text>
-			<button label="Ajustar..." label_selected="Ajustar..." name="Set..."/>
-			<check_box label="Permitir posse para o grupo" name="check deed" tool_tip="O gerente do grupo pode acionar essa terra ao grupo, então esta será mantida pelo gestor da ilha"/>
-			<button label="Passar..." label_selected="Passar..." name="Deed..." tool_tip="Você só pode delegar esta terra se você for um gerente selecionado pelo grupo."/>
-			<check_box label="Proprietário faz contribuição com delegação" name="check contrib" tool_tip="Quando a terra é delegada ao grupo, o proprietário anterior contribui alocando terra suficiente para mantê-la."/>
-			<text length="1" name="For Sale:" type="string">
-				À Venda:
-			</text>
-			<text length="1" name="Not for sale." type="string">
-				Não está à Venda.
-			</text>
-			<text length="1" name="For Sale: Price L$[PRICE]." type="string">
-				Preço: L$[PRICE].
-			</text>
-			<button label="Vender Terra..." label_selected="Vender Terra..." name="Sell Land..."/>
-			<text length="1" name="For sale to" type="string">
-				À venda para: [BUYER]
-			</text>
-			<text length="1" name="Sell with landowners objects in parcel." type="string">
-				À venda (Objetos incluídos).
-			</text>
-			<text length="1" name="Selling with no objects in parcel." type="string">
-				À venda (Objetos não Incluídos).
-			</text>
-			<button label="Cancelar venda do terreno" label_selected="Cancelar venda do terreno" left="275" name="Cancel Land Sale" width="165"/>
-			<text length="1" name="Claimed:" type="string">
-				Reclamado:
-			</text>
-			<text length="1" name="DateClaimText" type="string">
-				Ter Ago 15 13:47:25 2006
-			</text>
-			<text length="1" name="PriceLabel" type="string">
-				Área:
-			</text>
-			<text length="1" name="PriceText" type="string">
-				4048 m².
-			</text>
-			<text length="1" name="Traffic:" type="string">
-				Tráfego:
-			</text>
-			<text length="1" name="DwellText" type="string">
-				0
-			</text>
-			<button label="Comprar Terra..." label_selected="Comprar Terra..." left="130" name="Buy Land..." width="125"/>
-			<button label="Comprar para o Grupo..." label_selected="Comprar para o Grupo..." name="Buy For Group..."/>
-			<button label="Comprar Passe..." label_selected="Comprar Passe..." left="130" name="Buy Pass..." tool_tip="Um passe concede a você acesso temporário a esta terra." width="125"/>
-			<button label="Abandonar Terra.." label_selected="Abandonar Terra.." name="Abandon Land..."/>
-			<button label="Reclamar Terra..." label_selected="Reclamar Terra..." name="Reclaim Land..."/>
-			<button label="Venda Linden..." label_selected="Venda Linden..." name="Linden Sale..." tool_tip="A terra precisa ser possuída, estar com o conteúdo configurado e não estar pronta para leilão."/>
-			<string name="new users only">
-				Somente novos usuários
-			</string>
-			<string name="anyone">
-				Qualquer um
-			</string>
-			<string name="area_text">
-				Área
-			</string>
-			<string name="area_size_text">
-				[AREA] m².
-			</string>
-			<string name="auction_id_text">
-				ID do Leilão: [ID]
-			</string>
-			<string name="need_tier_to_modify">
-				Você deve ter sua compra aprovada para modificar este terreno.
-			</string>
-			<string name="group_owned_text">
-				(Possuído pelo Grupo)
-			</string>
-			<string name="profile_text">
-				Perfil...
-			</string>
-			<string name="info_text">
-				Informação...
-			</string>
-			<string name="public_text">
-				(público)
-			</string>
-			<string name="none_text">
-				(nenhum)
-			</string>
-			<string name="sale_pending_text">
-				(Venda Pendente)
-			</string>
-			<string name="no_selection_text">
-				Nenhum lote selecionado.
-Vá para o menu Mundo &gt; Sobre a Terra ou selecione outro lote para mostrar seus detalhes.
-			</string>
-		</panel>
-		<panel label="Corretor" name="land_covenant_panel">
-			<text length="1" name="covenant_timestamp_text" type="string">
-				Última Alteração: Qua, Dez 31 16:00:00 1969
-			</text>
-			<text length="1" name="region_name_lbl" type="string">
-				Região:
-			</text>
-			<text length="1" name="region_name_text" type="string">
-				leyla
-			</text>
-			<text length="1" name="estate_name_lbl" type="string">
-				Propriedade:
-			</text>
-			<text length="1" name="estate_name_text" type="string">
-				mainland
-			</text>
-			<text length="1" name="estate_owner_lbl" type="string">
-				Dono da Propriedade:
-			</text>
-			<text length="1" name="estate_owner_text" type="string">
-				(nenhum)
-			</text>
-			<text length="1" name="resellable_clause" type="string">
-				Terra comprada nesta região não pode ser revendida.
-			</text>
-			<text length="1" name="changeable_clause" type="string">
-				Terra comrpada nesta região não poderá ser compartilhada ou sub-dividida.
-			</text>
-			<text_editor length="1" name="covenant_editor" type="string">
-				Não há corretor para esta Propriedade.
-			</text_editor>
-			<string name="can_resell">
-				Terra comprada nesta região pode ser revendida.
-			</string>
-			<string name="can_not_resell">
-				Terra comprada nesta região não pode ser revendida.
-			</string>
-			<string name="can_change">
-				Terra comprada nesta região pode ser compartilhada ou sub-dividida.
-			</string>
-			<string name="can_not_change">
-				Terra comprada nesta região não pode ser compartilhada ou sub-dividida.
-			</string>
-		</panel>
-		<panel label="Objetos" name="land_objects_panel">
-			<text name="parcel_object_bonus">
-				Fator de Bonus para Objetos na Região: [BONUS]
-			</text>
-			<text length="1" name="Simulator primitive usage:" type="string">
-				Uso do simulador de primitivas:
-			</text>
-			<text left="214" name="objects_available" width="230">
-				[COUNT] de [MAX] ([AVAILABLE] disponíveis)
-			</text>
-			<string name="objects_available_text">
-				[COUNT] de [MAX] ([AVAILABLE] disponíveis)
-			</string>
-			<string name="objects_deleted_text">
-				[COUNT] de [MAX] ([DELETED] serão deletados)
-			</string>
-			<text length="1" name="Primitives parcel supports:" type="string" width="200">
-				Primitivas suportadas pelo lote:
-			</text>
-			<text left="214" length="1" name="object_contrib_text" type="string" width="152">
-				[COUNT]
-			</text>
-			<text length="1" name="Primitives on parcel:" type="string">
-				Primitivas no Lote:
-			</text>
-			<text left="214" length="1" name="total_objects_text" type="string" width="48">
-				[COUNT]
-			</text>
-			<text left="14" length="1" name="Owned by parcel owner:" type="string" width="180">
-				Pertencentes ao dono do lote:
-			</text>
-			<text left="214" length="1" name="owner_objects_text" type="string" width="48">
-				[COUNT]
-			</text>
-			<button label="Mostrar" label_selected="Mostrar" name="ShowOwner" right="-135" width="60"/>
-			<button label="Retornar..." label_selected="Retornar..." name="ReturnOwner..." right="-10" tool_tip="Retornar os objetos aos seus donos." width="119"/>
-			<text left="14" length="1" name="Set to group:" type="string" width="180">
-				Configurados ao grupo:
-			</text>
-			<text left="214" length="1" name="group_objects_text" type="string" width="48">
-				[COUNT]
-			</text>
-			<button label="Mostrar" label_selected="Mostrar" name="ShowGroup" right="-135" width="60"/>
-			<button label="Retornar..." label_selected="Retornar..." name="ReturnGroup..." right="-10" tool_tip="Retornar os objetos para seus donos." width="119"/>
-			<text left="14" length="1" name="Owned by others:" type="string" width="128">
-				Propriedade de Outros:
-			</text>
-			<text left="214" length="1" name="other_objects_text" type="string" width="48">
-				[COUNT]
-			</text>
-			<button label="Mostrar" label_selected="Mostrar" name="ShowOther" right="-135" width="60"/>
-			<button label="Retornar..." label_selected="Retornar..." name="ReturnOther..." right="-10" tool_tip="Retornar os objetos aos seus donos." width="119"/>
-			<text left="14" length="1" name="Selected / sat upon:" type="string" width="193">
-				Selecionado/Sentado:
-			</text>
-			<text left="214" length="1" name="selected_objects_text" type="string" width="48">
-				[COUNT]
-			</text>
-			<text left="4" length="1" name="Autoreturn" type="string" width="412">
-				Auto-retornar objetos dos outros residentes (minutos,0 para desligado):
-			</text>
-			<line_editor name="clean other time" right="-6" width="36"/>
-			<text length="1" name="Object Owners:" type="string">
-				Donos dos Objetos:
-			</text>
-			<button label="Atualizar Lista" label_selected="Atualizar Lista" name="Refresh List"/>
-			<button label="Retornar objetos..." label_selected="Retornar objetos..." name="Return objects..."/>
-			<name_list name="owner list">
-				<column label="Tipo" name="type"/>
-				<column label="Nome" name="name"/>
-				<column label="Contar" name="count"/>
-				<column label="Mais recente" name="mostrecent"/>
-			</name_list>
-		</panel>
-		<panel label="Opções" name="land_options_panel">
-			<text length="1" name="allow_label" type="string">
-				Permitir outros residentes a:
-			</text>
-			<check_box label="Editar Terreno" name="edit land check" tool_tip="Se ativado, qualquer um pode modificar a forma da sua terra. É melhor deixar esta opção desativada, uma vez que você sempre pode editar seu próprio terreno."/>
-			<check_box label="Criar Landmarks" name="check landmark"/>
-			<check_box label="Voar" name="check fly" tool_tip="Se ativado, os Residentes podem voar na sua terra. Se desativado, eles podem voar apenas para dentro e por cima de sua terra."/>
-			<text length="1" name="allow_label2" type="string">
-				Criar Objetos:
-			</text>
-			<check_box label="Residentes" name="edit objects check"/>
-			<check_box label="Grupo" name="edit group objects check"/>
-			<text length="1" name="allow_label3" type="string">
-				Entrada do Objeto:
-			</text>
-			<check_box label="Residentes" name="all object entry check"/>
-			<check_box label="Grupo" name="group object entry check"/>
-			<text length="1" name="allow_label4" type="string">
-				Executar Scripts:
-			</text>
-			<check_box label="Residentes" name="check other scripts"/>
-			<check_box label="Grupo" name="check group scripts"/>
-			<text length="1" name="land_options_label" type="string">
-				Opções de Terra:
-			</text>
-			<check_box label="Salvo (sem dano)" name="check safe" tool_tip="Se ativado, ajusta o terreno para Seguro, desabilitando combate com danos. Se não ativado, o combate com danos é habilitado."/>
-			<check_box label="Sem Empurrar" name="PushRestrictCheck" tool_tip="Evita scripts que empurram. A ativação dessa opção pode ser útil para prevenir comportamentos desordeiros na sua terra."/>
-			<check_box label="Mostra o Lugar na Busca (L$30/semana) sob" name="ShowDirectoryCheck" tool_tip="Permitir que as pessoas vejam este terreno nos resultados de busca"/>
-			<combo_box left="276" name="land category" width="146">
-				<combo_item name="AnyCategory">
-					Qualquer Categoria
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Locação Linden
-				</combo_item>
-
-				<combo_item name="Arts&amp;Culture">
-					Artes e Cultura
-				</combo_item>
-				<combo_item name="Business">
-					Negócios
-				</combo_item>
-				<combo_item name="Educational">
-					Educacional
-				</combo_item>
-				<combo_item name="Gaming">
-					Jogo
-				</combo_item>
-				<combo_item name="Hangout">
-					Lazer
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Amigável para novatos
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parques e Natureza
-				</combo_item>
-				<combo_item name="Residential">
-					Residencial
-				</combo_item>
-				<combo_item name="Shopping">
-					Compras
-				</combo_item>
-				<combo_item name="Other">
-					Outros
-				</combo_item>
-			</combo_box>
-			<button label="?" label_selected="?" left="426" name="?"/>
-			<check_box name="MatureCheck" />
-			<text length="1" name="Snapshot:" type="string">
-				Foto:
-			</text>
-			<texture_picker label="" name="snapshot_ctrl" tool_tip="Clique para escolher uma imagem"/>
-			<text name="landing_point">
-				Ponto de Aterrissagem: [LANDING]
-			</text>
-			<string name="landing_point_none">
-				(nenhum)
-			</string>
-			<button label="Definir" label_selected="Definir" name="Set" tool_tip="Define o ponto de aterrissagem aonde o visitante chega. Define para o ponto em que seu avatar se encontra neste lote."/>
-			<button label="Limpar" label_selected="Limpar" name="Clear" tool_tip="Limpar o ponto de aterrissagem."/>
-			<text length="1" name="Teleport Routing: " type="string">
-				Rota de Tele-transporte:
-			</text>
-			<combo_box left="140" name="landing type" tool_tip="Rota de Teletransporte -- Selecione como tratar os tele-transportes no seu lote." width="140">
-				<combo_item length="1" name="Blocked" type="string">
-					Bloqueado
-				</combo_item>
-				<combo_item length="1" name="LandingPoint" type="string">
-					Ponto de Aterrissagem
-				</combo_item>
-				<combo_item length="1" name="Anywhere" type="string">
-					Qualquer lugar
-				</combo_item>
-			</combo_box>
-			<string name="push_restrict_text">
-				Sem Empurrar
-			</string>
-			<string name="push_restrict_region_text">
-				Sem Empurrar (Imposição na Região)
-			</string>
-		</panel>
-		<panel label="Mídia" name="land_media_panel">
-			<text name="with media:" width="85">
-				Tipo de Mídia:
-			</text>
-			<combo_box left="97" name="media type" tool_tip="Especificar se a URL é um filme, uma página web ou outra mídia"/>
-			<text name="at URL:" width="85">
-				URL da Mídia:
-			</text>
-			<line_editor left="97" name="media_url"/>
-			<button label="Definir..." label_selected="Definir..." name="set_media_url"/>
-			<text name="Description:">
-				Descrição:
-			</text>
-			<line_editor left="97" name="url_description" tool_tip="Texto mostrado ao lado do botão reproduzir/carregar"/>
-			<text length="1" name="Media texture:" type="string">
-				Substituir
-Textura:
-			</text>
-			<texture_picker label="" left="97" name="media texture" tool_tip="Clique para escolher uma imagem"/>
-			<text name="replace_texture_help">
-				(Objetos usando esta textura, mostrarão o filme ou
-a página web depois que você clicar na seta de
-reproduzir.)
-			</text>
-			<text name="Options:">
-				Opções de
-Mídia:
-			</text>
-			<check_box label="Escala automática" left="97" name="media_auto_scale" tool_tip="Marcando esta opção o conteúdo se ajustará ao lote automaticamente. A mídia pode se tornar lenta e com baixa qualidade visual mas nenhum outro ajuste de textura ou alinhamento será necessário."/>
-			<check_box label="Mídia em Repetição" name="media_loop" tool_tip="Executar a mídia repetidamente. Quando a mídia terminar a execução, ela reiniciará do começo."/>
-			<check_box label="Esconder a URL da Mídia" left="97" name="hide_media_url" tool_tip="Ativando esta opção, a URL da mídia se ocultará para quaisquer visualizadores não autorizados a ver esta informação do lote. Notar que isto não está disponível para tipos HTML."/>
-			<check_box label="Esconder a URL de Música" name="hide_music_url" tool_tip="Ativando esta opção, a URL de música se esconderá para visualizadores não autorizados a ver esta informação do lote"/>
-			<text left="102" name="media_size" tool_tip="Tamanho para desenhar a mídia Web, deixar 0 como padrão." width="115">
-				Tamanho da mídia:
-			</text>
-			<spinner left_delta="99" name="media_size_width" tool_tip="Tamanho para desenhar a mídia Web, deixar 0 como padrão."/>
-			<spinner name="media_size_height" tool_tip="Tamanho para desenhar a mídia Web, deixar 0 como padrão."/>
-			<text name="pixels">
-				pixels
-			</text>
-			<text name="MusicURL:">
-				URL da Música:
-			</text>
-			<line_editor left="97" name="music_url"/>
-			<text name="Sound:">
-				Som:
-			</text>
-			<check_box label="Restringir som espacial a este lote" left="97" name="check sound local"/>
-			<text name="Voice settings:">
-				Voz:
-			</text>
-			<radio_group left="97" name="parcel_voice_channel" width="310">
-				<radio_item name="Estate">
-					Usar o canal espacial da Propriedade
-				</radio_item>
-				<radio_item name="Private">
-					Usar um canal especial privado
-				</radio_item>
-				<radio_item name="Disabled">
-					Desabilitar áudio espacial neste lote
-				</radio_item>
-			</radio_group>
-		</panel>
-		<panel label="Acesso" name="land_access_panel">
-			<text length="1" name="Limit access to this parcel to:" type="string">
-				Acesso a Este Lote
-			</text>
-			<check_box label="Permitir Acesso Público" name="public_access"/>
-			<text name="Only Allow">
-				Bloquear Acesso por:
-			</text>
-			<check_box label="Residentes que não forneceram informações de pagamento para a Linden Lab" name="limit_payment" tool_tip="Banir residentes não identificados."/>
-			<check_box label="Residentes que não tiveram a idade de adulto confirmada" name="limit_age_verified" tool_tip="Banir residentes que não tiveram sua idade verificada. Veja support.secondlife.com para maiores informações."/>
-			<string name="estate_override">
-				Uma ou mais destas opções está definida no nível de propriedade.
-			</string>
-			<check_box label="Permitir Acesso do Grupo: [GROUP]" name="GroupCheck" tool_tip="Definir grupo na aba Geral."/>
-			<check_box label="Vender passes para:" name="PassCheck" tool_tip="Permite acesso temporário a este terreno"/>
-			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Qualquer um
-				</combo_item>
-				<combo_item name="Group">
-					Grupo
-				</combo_item>
-			</combo_box>
-			<spinner label="Preço em L$:" name="PriceSpin"/>
-			<spinner label="Horas de Acesso:" name="HoursSpin"/>
-			<text label="Permitir Sempre" name="AllowedText">
-				Residentes Permitidos
-			</text>
-			<name_list name="AccessList" tool_tip="([LISTED] listados, [MAX] máximo)"/>
-			<button label="Adicionar..." label_selected="Adicionar..." name="add_allowed"/>
-			<button label="Remover" label_selected="Remover" name="remove_allowed"/>
-			<text label="Banir" name="BanCheck">
-				Residentes Banidos
-			</text>
-			<name_list name="BannedList" tool_tip="([LISTED] listados, [MAX] máximo)"/>
-			<button label="Adicionar..." label_selected="Adicionar..." name="add_banned"/>
-			<button label="Remover" label_selected="Remover" name="remove_banned"/>
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floaterland" title="Sobre o Terreno">
+	<tab_container name="landtab">
+		<panel label="Geral" name="land_general_panel">
+			<text length="1" name="Name:" type="string">
+				Nome:
+			</text>
+			<text length="1" name="Description:" type="string">
+				Descrição:
+			</text>
+			<text length="1" name="Owner:" type="string">
+				Proprietário:
+			</text>
+			<text length="1" name="OwnerText" type="string">
+				Leyla Linden
+			</text>
+			<button label="Perfil..." label_selected="Perfil..." name="Profile..."/>
+			<text length="1" name="Group:" type="string">
+				Grupo:
+			</text>
+			<button label="Ajustar..." label_selected="Ajustar..." name="Set..."/>
+			<check_box label="Permitir posse para o grupo" name="check deed" tool_tip="O gerente do grupo pode acionar essa terra ao grupo, então esta será mantida pelo gestor da ilha"/>
+			<button label="Passar..." label_selected="Passar..." name="Deed..." tool_tip="Você só pode delegar esta terra se você for um gerente selecionado pelo grupo."/>
+			<check_box label="Proprietário faz contribuição com delegação" name="check contrib" tool_tip="Quando a terra é delegada ao grupo, o proprietário anterior contribui alocando terra suficiente para mantê-la."/>
+			<text length="1" name="For Sale:" type="string">
+				À Venda:
+			</text>
+			<text length="1" name="Not for sale." type="string">
+				Não está à Venda.
+			</text>
+			<text length="1" name="For Sale: Price L$[PRICE]." type="string">
+				Preço: L$[PRICE].
+			</text>
+			<button label="Vender Terra..." label_selected="Vender Terra..." name="Sell Land..."/>
+			<text length="1" name="For sale to" type="string">
+				À venda para: [BUYER]
+			</text>
+			<text length="1" name="Sell with landowners objects in parcel." type="string">
+				À venda (Objetos incluídos).
+			</text>
+			<text length="1" name="Selling with no objects in parcel." type="string">
+				À venda (Objetos não Incluídos).
+			</text>
+			<button label="Cancelar venda do terreno" label_selected="Cancelar venda do terreno" left="275" name="Cancel Land Sale" width="165"/>
+			<text length="1" name="Claimed:" type="string">
+				Reclamado:
+			</text>
+			<text length="1" name="DateClaimText" type="string">
+				Ter Ago 15 13:47:25 2006
+			</text>
+			<text length="1" name="PriceLabel" type="string">
+				Área:
+			</text>
+			<text length="1" name="PriceText" type="string">
+				4048 m².
+			</text>
+			<text length="1" name="Traffic:" type="string">
+				Tráfego:
+			</text>
+			<text length="1" name="DwellText" type="string">
+				0
+			</text>
+			<button label="Comprar Terra..." label_selected="Comprar Terra..." left="130" name="Buy Land..." width="125"/>
+			<button label="Comprar para o Grupo..." label_selected="Comprar para o Grupo..." name="Buy For Group..."/>
+			<button label="Comprar Passe..." label_selected="Comprar Passe..." left="130" name="Buy Pass..." tool_tip="Um passe concede a você acesso temporário a esta terra." width="125"/>
+			<button label="Abandonar Terra.." label_selected="Abandonar Terra.." name="Abandon Land..."/>
+			<button label="Reclamar Terra..." label_selected="Reclamar Terra..." name="Reclaim Land..."/>
+			<button label="Venda Linden..." label_selected="Venda Linden..." name="Linden Sale..." tool_tip="A terra precisa ser possuída, estar com o conteúdo configurado e não estar pronta para leilão."/>
+			<string name="new users only">
+				Somente novos usuários
+			</string>
+			<string name="anyone">
+				Qualquer um
+			</string>
+			<string name="area_text">
+				Área
+			</string>
+			<string name="area_size_text">
+				[AREA] m².
+			</string>
+			<string name="auction_id_text">
+				ID do Leilão: [ID]
+			</string>
+			<string name="need_tier_to_modify">
+				Você deve ter sua compra aprovada para modificar este terreno.
+			</string>
+			<string name="group_owned_text">
+				(Possuído pelo Grupo)
+			</string>
+			<string name="profile_text">
+				Perfil...
+			</string>
+			<string name="info_text">
+				Informação...
+			</string>
+			<string name="public_text">
+				(público)
+			</string>
+			<string name="none_text">
+				(nenhum)
+			</string>
+			<string name="sale_pending_text">
+				(Venda Pendente)
+			</string>
+			<string name="no_selection_text">
+				Nenhum lote selecionado.
+Vá para o menu Mundo &gt; Sobre a Terra ou selecione outro lote para mostrar seus detalhes.
+			</string>
+		</panel>
+		<panel label="Corretor" name="land_covenant_panel">
+			<text length="1" name="covenant_timestamp_text" type="string">
+				Última Alteração: Qua, Dez 31 16:00:00 1969
+			</text>
+			<text length="1" name="region_name_lbl" type="string">
+				Região:
+			</text>
+			<text length="1" name="region_name_text" type="string">
+				leyla
+			</text>
+			<text length="1" name="estate_name_lbl" type="string">
+				Propriedade:
+			</text>
+			<text length="1" name="estate_name_text" type="string">
+				mainland
+			</text>
+			<text length="1" name="estate_owner_lbl" type="string">
+				Dono da Propriedade:
+			</text>
+			<text length="1" name="estate_owner_text" type="string">
+				(nenhum)
+			</text>
+			<text length="1" name="resellable_clause" type="string">
+				Terra comprada nesta região não pode ser revendida.
+			</text>
+			<text length="1" name="changeable_clause" type="string">
+				Terra comrpada nesta região não poderá ser compartilhada ou sub-dividida.
+			</text>
+			<text_editor length="1" name="covenant_editor" type="string">
+				Não há corretor para esta Propriedade.
+			</text_editor>
+			<string name="can_resell">
+				Terra comprada nesta região pode ser revendida.
+			</string>
+			<string name="can_not_resell">
+				Terra comprada nesta região não pode ser revendida.
+			</string>
+			<string name="can_change">
+				Terra comprada nesta região pode ser compartilhada ou sub-dividida.
+			</string>
+			<string name="can_not_change">
+				Terra comprada nesta região não pode ser compartilhada ou sub-dividida.
+			</string>
+		</panel>
+		<panel label="Objetos" name="land_objects_panel">
+			<text name="parcel_object_bonus">
+				Fator de Bonus para Objetos na Região: [BONUS]
+			</text>
+			<text length="1" name="Simulator primitive usage:" type="string">
+				Uso do simulador de primitivas:
+			</text>
+			<text left="214" name="objects_available" width="230">
+				[COUNT] de [MAX] ([AVAILABLE] disponíveis)
+			</text>
+			<string name="objects_available_text">
+				[COUNT] de [MAX] ([AVAILABLE] disponíveis)
+			</string>
+			<string name="objects_deleted_text">
+				[COUNT] de [MAX] ([DELETED] serão deletados)
+			</string>
+			<text length="1" name="Primitives parcel supports:" type="string" width="200">
+				Primitivas suportadas pelo lote:
+			</text>
+			<text left="214" length="1" name="object_contrib_text" type="string" width="152">
+				[COUNT]
+			</text>
+			<text length="1" name="Primitives on parcel:" type="string">
+				Primitivas no Lote:
+			</text>
+			<text left="214" length="1" name="total_objects_text" type="string" width="48">
+				[COUNT]
+			</text>
+			<text left="14" length="1" name="Owned by parcel owner:" type="string" width="180">
+				Pertencentes ao dono do lote:
+			</text>
+			<text left="214" length="1" name="owner_objects_text" type="string" width="48">
+				[COUNT]
+			</text>
+			<button label="Mostrar" label_selected="Mostrar" name="ShowOwner" right="-135" width="60"/>
+			<button label="Retornar..." label_selected="Retornar..." name="ReturnOwner..." right="-10" tool_tip="Retornar os objetos aos seus donos." width="119"/>
+			<text left="14" length="1" name="Set to group:" type="string" width="180">
+				Configurados ao grupo:
+			</text>
+			<text left="214" length="1" name="group_objects_text" type="string" width="48">
+				[COUNT]
+			</text>
+			<button label="Mostrar" label_selected="Mostrar" name="ShowGroup" right="-135" width="60"/>
+			<button label="Retornar..." label_selected="Retornar..." name="ReturnGroup..." right="-10" tool_tip="Retornar os objetos para seus donos." width="119"/>
+			<text left="14" length="1" name="Owned by others:" type="string" width="128">
+				Propriedade de Outros:
+			</text>
+			<text left="214" length="1" name="other_objects_text" type="string" width="48">
+				[COUNT]
+			</text>
+			<button label="Mostrar" label_selected="Mostrar" name="ShowOther" right="-135" width="60"/>
+			<button label="Retornar..." label_selected="Retornar..." name="ReturnOther..." right="-10" tool_tip="Retornar os objetos aos seus donos." width="119"/>
+			<text left="14" length="1" name="Selected / sat upon:" type="string" width="193">
+				Selecionado/Sentado:
+			</text>
+			<text left="214" length="1" name="selected_objects_text" type="string" width="48">
+				[COUNT]
+			</text>
+			<text left="4" length="1" name="Autoreturn" type="string" width="412">
+				Auto-retornar objetos dos outros residentes (minutos,0 para desligado):
+			</text>
+			<line_editor name="clean other time" right="-6" width="36"/>
+			<text length="1" name="Object Owners:" type="string">
+				Donos dos Objetos:
+			</text>
+			<button label="Atualizar Lista" label_selected="Atualizar Lista" name="Refresh List"/>
+			<button label="Retornar objetos..." label_selected="Retornar objetos..." name="Return objects..."/>
+			<name_list name="owner list">
+				<column label="Tipo" name="type"/>
+				<column label="Nome" name="name"/>
+				<column label="Contar" name="count"/>
+				<column label="Mais recente" name="mostrecent"/>
+			</name_list>
+		</panel>
+		<panel label="Opções" name="land_options_panel">
+			<text length="1" name="allow_label" type="string">
+				Permitir outros residentes a:
+			</text>
+			<check_box label="Editar Terreno" name="edit land check" tool_tip="Se ativado, qualquer um pode modificar a forma da sua terra. É melhor deixar esta opção desativada, uma vez que você sempre pode editar seu próprio terreno."/>
+			<check_box label="Criar Landmarks" name="check landmark"/>
+			<check_box label="Voar" name="check fly" tool_tip="Se ativado, os Residentes podem voar na sua terra. Se desativado, eles podem voar apenas para dentro e por cima de sua terra."/>
+			<text length="1" name="allow_label2" type="string">
+				Criar Objetos:
+			</text>
+			<check_box label="Residentes" name="edit objects check"/>
+			<check_box label="Grupo" name="edit group objects check"/>
+			<text length="1" name="allow_label3" type="string">
+				Entrada do Objeto:
+			</text>
+			<check_box label="Residentes" name="all object entry check"/>
+			<check_box label="Grupo" name="group object entry check"/>
+			<text length="1" name="allow_label4" type="string">
+				Executar Scripts:
+			</text>
+			<check_box label="Residentes" name="check other scripts"/>
+			<check_box label="Grupo" name="check group scripts"/>
+			<text length="1" name="land_options_label" type="string">
+				Opções de Terra:
+			</text>
+			<check_box label="Salvo (sem dano)" name="check safe" tool_tip="Se ativado, ajusta o terreno para Seguro, desabilitando combate com danos. Se não ativado, o combate com danos é habilitado."/>
+			<check_box label="Sem Empurrar" name="PushRestrictCheck" tool_tip="Evita scripts que empurram. A ativação dessa opção pode ser útil para prevenir comportamentos desordeiros na sua terra."/>
+			<check_box label="Mostra o Lugar na Busca (L$30/semana) sob" name="ShowDirectoryCheck" tool_tip="Permitir que as pessoas vejam este terreno nos resultados de busca"/>
+			<combo_box left="276" name="land category" width="146">
+				<combo_item name="AnyCategory">
+					Qualquer Categoria
+				</combo_item>
+				<combo_item name="LindenLocation">
+					Locação Linden
+				</combo_item>
+
+				<combo_item name="Arts&amp;Culture">
+					Artes e Cultura
+				</combo_item>
+				<combo_item name="Business">
+					Negócios
+				</combo_item>
+				<combo_item name="Educational">
+					Educacional
+				</combo_item>
+				<combo_item name="Gaming">
+					Jogo
+				</combo_item>
+				<combo_item name="Hangout">
+					Lazer
+				</combo_item>
+				<combo_item name="NewcomerFriendly">
+					Amigável para novatos
+				</combo_item>
+				<combo_item name="Parks&amp;Nature">
+					Parques e Natureza
+				</combo_item>
+				<combo_item name="Residential">
+					Residencial
+				</combo_item>
+				<combo_item name="Shopping">
+					Compras
+				</combo_item>
+				<combo_item name="Other">
+					Outros
+				</combo_item>
+			</combo_box>
+			<button label="?" label_selected="?" left="426" name="?"/>
+			<check_box name="MatureCheck" />
+			<text length="1" name="Snapshot:" type="string">
+				Foto:
+			</text>
+			<texture_picker label="" name="snapshot_ctrl" tool_tip="Clique para escolher uma imagem"/>
+			<text name="landing_point">
+				Ponto de Aterrissagem: [LANDING]
+			</text>
+			<string name="landing_point_none">
+				(nenhum)
+			</string>
+			<button label="Definir" label_selected="Definir" name="Set" tool_tip="Define o ponto de aterrissagem aonde o visitante chega. Define para o ponto em que seu avatar se encontra neste lote."/>
+			<button label="Limpar" label_selected="Limpar" name="Clear" tool_tip="Limpar o ponto de aterrissagem."/>
+			<text length="1" name="Teleport Routing: " type="string">
+				Rota de Tele-transporte:
+			</text>
+			<combo_box left="140" name="landing type" tool_tip="Rota de Teletransporte -- Selecione como tratar os tele-transportes no seu lote." width="140">
+				<combo_item length="1" name="Blocked" type="string">
+					Bloqueado
+				</combo_item>
+				<combo_item length="1" name="LandingPoint" type="string">
+					Ponto de Aterrissagem
+				</combo_item>
+				<combo_item length="1" name="Anywhere" type="string">
+					Qualquer lugar
+				</combo_item>
+			</combo_box>
+			<string name="push_restrict_text">
+				Sem Empurrar
+			</string>
+			<string name="push_restrict_region_text">
+				Sem Empurrar (Imposição na Região)
+			</string>
+		</panel>
+		<panel label="Mídia" name="land_media_panel">
+			<text name="with media:" width="85">
+				Tipo de Mídia:
+			</text>
+			<combo_box left="97" name="media type" tool_tip="Especificar se a URL é um filme, uma página web ou outra mídia"/>
+			<text name="at URL:" width="85">
+				URL da Mídia:
+			</text>
+			<line_editor left="97" name="media_url"/>
+			<button label="Definir..." label_selected="Definir..." name="set_media_url"/>
+			<text name="Description:">
+				Descrição:
+			</text>
+			<line_editor left="97" name="url_description" tool_tip="Texto mostrado ao lado do botão reproduzir/carregar"/>
+			<text length="1" name="Media texture:" type="string">
+				Substituir
+Textura:
+			</text>
+			<texture_picker label="" left="97" name="media texture" tool_tip="Clique para escolher uma imagem"/>
+			<text name="replace_texture_help">
+				(Objetos usando esta textura, mostrarão o filme ou
+a página web depois que você clicar na seta de
+reproduzir.)
+			</text>
+			<text name="Options:">
+				Opções de
+Mídia:
+			</text>
+			<check_box label="Escala automática" left="97" name="media_auto_scale" tool_tip="Marcando esta opção o conteúdo se ajustará ao lote automaticamente. A mídia pode se tornar lenta e com baixa qualidade visual mas nenhum outro ajuste de textura ou alinhamento será necessário."/>
+			<check_box label="Mídia em Repetição" name="media_loop" tool_tip="Executar a mídia repetidamente. Quando a mídia terminar a execução, ela reiniciará do começo."/>
+			<check_box label="Esconder a URL da Mídia" left="97" name="hide_media_url" tool_tip="Ativando esta opção, a URL da mídia se ocultará para quaisquer visualizadores não autorizados a ver esta informação do lote. Notar que isto não está disponível para tipos HTML."/>
+			<check_box label="Esconder a URL de Música" name="hide_music_url" tool_tip="Ativando esta opção, a URL de música se esconderá para visualizadores não autorizados a ver esta informação do lote"/>
+			<text left="102" name="media_size" tool_tip="Tamanho para desenhar a mídia Web, deixar 0 como padrão." width="115">
+				Tamanho da mídia:
+			</text>
+			<spinner left_delta="99" name="media_size_width" tool_tip="Tamanho para desenhar a mídia Web, deixar 0 como padrão."/>
+			<spinner name="media_size_height" tool_tip="Tamanho para desenhar a mídia Web, deixar 0 como padrão."/>
+			<text name="pixels">
+				pixels
+			</text>
+			<text name="MusicURL:">
+				URL da Música:
+			</text>
+			<line_editor left="97" name="music_url"/>
+			<text name="Sound:">
+				Som:
+			</text>
+			<check_box label="Restringir som espacial a este lote" left="97" name="check sound local"/>
+			<text name="Voice settings:">
+				Voz:
+			</text>
+			<radio_group left="97" name="parcel_voice_channel" width="310">
+				<radio_item name="Estate">
+					Usar o canal espacial da Propriedade
+				</radio_item>
+				<radio_item name="Private">
+					Usar um canal especial privado
+				</radio_item>
+				<radio_item name="Disabled">
+					Desabilitar áudio espacial neste lote
+				</radio_item>
+			</radio_group>
+		</panel>
+		<panel label="Acesso" name="land_access_panel">
+			<text length="1" name="Limit access to this parcel to:" type="string">
+				Acesso a Este Lote
+			</text>
+			<check_box label="Permitir Acesso Público" name="public_access"/>
+			<text name="Only Allow">
+				Bloquear Acesso por:
+			</text>
+			<check_box label="Residentes que não forneceram informações de pagamento para a Linden Lab" name="limit_payment" tool_tip="Banir residentes não identificados."/>
+			<check_box label="Residentes que não tiveram a idade de adulto confirmada" name="limit_age_verified" tool_tip="Banir residentes que não tiveram sua idade verificada. Veja support.secondlife.com para maiores informações."/>
+			<string name="estate_override">
+				Uma ou mais destas opções está definida no nível de propriedade.
+			</string>
+			<check_box label="Permitir Acesso do Grupo: [GROUP]" name="GroupCheck" tool_tip="Definir grupo na aba Geral."/>
+			<check_box label="Vender passes para:" name="PassCheck" tool_tip="Permite acesso temporário a este terreno"/>
+			<combo_box name="pass_combo">
+				<combo_item name="Anyone">
+					Qualquer um
+				</combo_item>
+				<combo_item name="Group">
+					Grupo
+				</combo_item>
+			</combo_box>
+			<spinner label="Preço em L$:" name="PriceSpin"/>
+			<spinner label="Horas de Acesso:" name="HoursSpin"/>
+			<text label="Permitir Sempre" name="AllowedText">
+				Residentes Permitidos
+			</text>
+			<name_list name="AccessList" tool_tip="([LISTED] listados, [MAX] máximo)"/>
+			<button label="Adicionar..." label_selected="Adicionar..." name="add_allowed"/>
+			<button label="Remover" label_selected="Remover" name="remove_allowed"/>
+			<text label="Banir" name="BanCheck">
+				Residentes Banidos
+			</text>
+			<name_list name="BannedList" tool_tip="([LISTED] listados, [MAX] máximo)"/>
+			<button label="Adicionar..." label_selected="Adicionar..." name="add_banned"/>
+			<button label="Remover" label_selected="Remover" name="remove_banned"/>
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_animation_preview.xml b/indra/newview/skins/default/xui/pt/floater_animation_preview.xml
index 989e5f9093..405a6f28a4 100644
--- a/indra/newview/skins/default/xui/pt/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/pt/floater_animation_preview.xml
@@ -1,161 +1,161 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Animation Preview" title="">
-	<text name="name_label">
-		Nome:
-	</text>
-	<text name="description_label">
-		Descrição:
-	</text>
-	<spinner label="Prioridade" name="priority" tool_tip="Controla quais animações podem se sobrepor a esta animação."/>
-	<check_box label="Loop" name="loop_check" tool_tip="Executa a animação repetidamente."/>
-	<spinner label="Dentro(%)" name="loop_in_point" tool_tip="Ajusta o ponto da animação onde a repetição começa."/>
-	<spinner label="Fora(%)" name="loop_out_point" tool_tip="Ajusta o ponto da animação onde a repetição termina."/>
-	<text name="hand_label">
-		Pose de Mão
-	</text>
-	<combo_box label="" name="hand_pose_combo" tool_tip="Controla o que as mãos fazem durante a animação">
-		<combo_item name="Spread">
-			Espreguiçar
-		</combo_item>
-		<combo_item name="Relaxed">
-			Relaxado
-		</combo_item>
-		<combo_item name="PointBoth">
-			Apontar Ambos
-		</combo_item>
-		<combo_item name="Fist">
-			Punho
-		</combo_item>
-		<combo_item name="RelaxedLeft">
-			Relaxado para Esquerda
-		</combo_item>
-		<combo_item name="PointLeft">
-			Apontar à Esquerda
-		</combo_item>
-		<combo_item name="FistLeft">
-			Punho Esquerdo
-		</combo_item>
-		<combo_item name="RelaxedRight">
-			Relaxado para Direita
-		</combo_item>
-		<combo_item name="PointRight">
-			Apontar à Direita
-		</combo_item>
-		<combo_item name="FistRight">
-			Punho Direito
-		</combo_item>
-		<combo_item name="SaluteRight">
-			Saudar à Direita
-		</combo_item>
-		<combo_item name="Typing">
-			Digitando
-		</combo_item>
-		<combo_item name="PeaceRight">
-			Pacífico à Direita
-		</combo_item>
-	</combo_box>
-	<text name="emote_label">
-		Expressão
-	</text>
-	<combo_box label="" name="emote_combo" tool_tip="Controla o que a face faz durante a animação.">
-		<combo_item name="[None]">
-			[None]
-		</combo_item>
-		<combo_item name="Aaaaah">
-			Aaaaah
-		</combo_item>
-		<combo_item name="Afraid">
-			Temeroso
-		</combo_item>
-		<combo_item name="Angry">
-			Raivoso
-		</combo_item>
-		<combo_item name="BigSmile">
-			Sorrisão
-		</combo_item>
-		<combo_item name="Bored">
-			Entediado
-		</combo_item>
-		<combo_item name="Cry">
-			Chorar
-		</combo_item>
-		<combo_item name="Disdain">
-			Desprezar
-		</combo_item>
-		<combo_item name="Embarrassed">
-			Envergonhado
-		</combo_item>
-		<combo_item name="Frown">
-			Franzir a testa
-		</combo_item>
-		<combo_item name="Kiss">
-			Beijar
-		</combo_item>
-		<combo_item name="Laugh">
-			Rir
-		</combo_item>
-		<combo_item name="Plllppt">
-			Plllppt
-		</combo_item>
-		<combo_item name="Repulsed">
-			Enojado
-		</combo_item>
-		<combo_item name="Sad">
-			Triste
-		</combo_item>
-		<combo_item name="Shrug">
-			Indiferença
-		</combo_item>
-		<combo_item name="Smile">
-			Sorriso
-		</combo_item>
-		<combo_item name="Surprise">
-			Surpreso
-		</combo_item>
-		<combo_item name="Wink">
-			Piscar
-		</combo_item>
-		<combo_item name="Worry">
-			Preocupado
-		</combo_item>
-	</combo_box>
-	<text name="preview_label">
-		Prever enquanto
-	</text>
-	<combo_box label="" name="preview_base_anim" tool_tip="Use isto para testar o comportamento de sua animação enquanto seu avatar executa ações comuns.">
-		<combo_item name="Standing">
-			Parado
-		</combo_item>
-		<combo_item name="Walking">
-			Andando
-		</combo_item>
-		<combo_item name="Sitting">
-			Sentando
-		</combo_item>
-		<combo_item name="Flying">
-			Voando
-		</combo_item>
-	</combo_box>
-	<spinner label="Facilitar a entrada (sec)" name="ease_in_time" tool_tip="Quantidade de tempo (em segundos) para que as animações se mesclem."/>
-	<spinner label="Facilitar a saída (sec)" name="ease_out_time" tool_tip="Quantidade de tempo (em segundos) para que a animações se mesclem."/>
-	<button label="" name="play_btn" tool_tip="Executa/pausa sua animação."/>
-	<button label="" name="stop_btn" tool_tip="Interrompe a execução da animação."/>
-	<text name="bad_animation_text">
-		Incapaz de ler o arquivo de animação. Nós recomendamos exportar arquivos BVH do Poser 4.
-	</text>
-	<button label="Cancelar" name="cancel_btn"/>
-	<button label="Carregar (L$[AMOUNT])" name="ok_btn"/>
-	<string name="failed_to_initialize">
-		Não foi possível iniciar o movimento
-	</string>
-	<string name="anim_too_long">
-		O arquivo de animação tem [LENGTH] segundos de duração. 
-
-A duração máxima de animação permitida é de [MAX_LENGTH] segundos.
-	</string>
-	<string name="failed_file_read">
-		Não foi possível ler o arquivo de animação.
-
-[STATUS]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Animation Preview" title="">
+	<text name="name_label">
+		Nome:
+	</text>
+	<text name="description_label">
+		Descrição:
+	</text>
+	<spinner label="Prioridade" name="priority" tool_tip="Controla quais animações podem se sobrepor a esta animação."/>
+	<check_box label="Loop" name="loop_check" tool_tip="Executa a animação repetidamente."/>
+	<spinner label="Dentro(%)" name="loop_in_point" tool_tip="Ajusta o ponto da animação onde a repetição começa."/>
+	<spinner label="Fora(%)" name="loop_out_point" tool_tip="Ajusta o ponto da animação onde a repetição termina."/>
+	<text name="hand_label">
+		Pose de Mão
+	</text>
+	<combo_box label="" name="hand_pose_combo" tool_tip="Controla o que as mãos fazem durante a animação">
+		<combo_box.item name="Spread">
+			Espreguiçar
+		</combo_box.item>
+		<combo_box.item name="Relaxed">
+			Relaxado
+		</combo_box.item>
+		<combo_box.item name="PointBoth">
+			Apontar Ambos
+		</combo_box.item>
+		<combo_box.item name="Fist">
+			Punho
+		</combo_box.item>
+		<combo_box.item name="RelaxedLeft">
+			Relaxado para Esquerda
+		</combo_box.item>
+		<combo_box.item name="PointLeft">
+			Apontar à Esquerda
+		</combo_box.item>
+		<combo_box.item name="FistLeft">
+			Punho Esquerdo
+		</combo_box.item>
+		<combo_box.item name="RelaxedRight">
+			Relaxado para Direita
+		</combo_box.item>
+		<combo_box.item name="PointRight">
+			Apontar à Direita
+		</combo_box.item>
+		<combo_box.item name="FistRight">
+			Punho Direito
+		</combo_box.item>
+		<combo_box.item name="SaluteRight">
+			Saudar à Direita
+		</combo_box.item>
+		<combo_box.item name="Typing">
+			Digitando
+		</combo_box.item>
+		<combo_box.item name="PeaceRight">
+			Pacífico à Direita
+		</combo_box.item>
+	</combo_box>
+	<text name="emote_label">
+		Expressão
+	</text>
+	<combo_box label="" name="emote_combo" tool_tip="Controla o que a face faz durante a animação.">
+		<combo_box.item name="[None]">
+			[None]
+		</combo_box.item>
+		<combo_box.item name="Aaaaah">
+			Aaaaah
+		</combo_box.item>
+		<combo_box.item name="Afraid">
+			Temeroso
+		</combo_box.item>
+		<combo_box.item name="Angry">
+			Raivoso
+		</combo_box.item>
+		<combo_box.item name="BigSmile">
+			Sorrisão
+		</combo_box.item>
+		<combo_box.item name="Bored">
+			Entediado
+		</combo_box.item>
+		<combo_box.item name="Cry">
+			Chorar
+		</combo_box.item>
+		<combo_box.item name="Disdain">
+			Desprezar
+		</combo_box.item>
+		<combo_box.item name="Embarrassed">
+			Envergonhado
+		</combo_box.item>
+		<combo_box.item name="Frown">
+			Franzir a testa
+		</combo_box.item>
+		<combo_box.item name="Kiss">
+			Beijar
+		</combo_box.item>
+		<combo_box.item name="Laugh">
+			Rir
+		</combo_box.item>
+		<combo_box.item name="Plllppt">
+			Plllppt
+		</combo_box.item>
+		<combo_box.item name="Repulsed">
+			Enojado
+		</combo_box.item>
+		<combo_box.item name="Sad">
+			Triste
+		</combo_box.item>
+		<combo_box.item name="Shrug">
+			Indiferença
+		</combo_box.item>
+		<combo_box.item name="Smile">
+			Sorriso
+		</combo_box.item>
+		<combo_box.item name="Surprise">
+			Surpreso
+		</combo_box.item>
+		<combo_box.item name="Wink">
+			Piscar
+		</combo_box.item>
+		<combo_box.item name="Worry">
+			Preocupado
+		</combo_box.item>
+	</combo_box>
+	<text name="preview_label">
+		Prever enquanto
+	</text>
+	<combo_box label="" name="preview_base_anim" tool_tip="Use isto para testar o comportamento de sua animação enquanto seu avatar executa ações comuns.">
+		<combo_box.item name="Standing">
+			Parado
+		</combo_box.item>
+		<combo_box.item name="Walking">
+			Andando
+		</combo_box.item>
+		<combo_box.item name="Sitting">
+			Sentando
+		</combo_box.item>
+		<combo_box.item name="Flying">
+			Voando
+		</combo_box.item>
+	</combo_box>
+	<spinner label="Facilitar a entrada (sec)" name="ease_in_time" tool_tip="Quantidade de tempo (em segundos) para que as animações se mesclem."/>
+	<spinner label="Facilitar a saída (sec)" name="ease_out_time" tool_tip="Quantidade de tempo (em segundos) para que a animações se mesclem."/>
+	<button label="" name="play_btn" tool_tip="Executa/pausa sua animação."/>
+	<button label="" name="stop_btn" tool_tip="Interrompe a execução da animação."/>
+	<text name="bad_animation_text">
+		Incapaz de ler o arquivo de animação. Nós recomendamos exportar arquivos BVH do Poser 4.
+	</text>
+	<button label="Cancelar" name="cancel_btn"/>
+	<button label="Carregar (L$[AMOUNT])" name="ok_btn"/>
+	<string name="failed_to_initialize">
+		Não foi possível iniciar o movimento
+	</string>
+	<string name="anim_too_long">
+		O arquivo de animação tem [LENGTH] segundos de duração. 
+
+A duração máxima de animação permitida é de [MAX_LENGTH] segundos.
+	</string>
+	<string name="failed_file_read">
+		Não foi possível ler o arquivo de animação.
+
+[STATUS]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_auction.xml b/indra/newview/skins/default/xui/pt/floater_auction.xml
index 9a90e3955c..48e0b92400 100644
--- a/indra/newview/skins/default/xui/pt/floater_auction.xml
+++ b/indra/newview/skins/default/xui/pt/floater_auction.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_auction" title="Iniciar a venda de terrenos da Linden">
-	<check_box label="Incluir marcador de seleção amarelo" name="fence_check"/>
-	<button label="Foto" label_selected="Foto" name="snapshot_btn"/>
-	<button label="OK" label_selected="OK" name="ok_btn"/>
-	<text name="already for sale">
-		Você não pode leiloar terrenos que já estão configurados para venda.
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_auction" title="Iniciar a venda de terrenos da Linden">
+	<check_box label="Incluir marcador de seleção amarelo" name="fence_check"/>
+	<button label="Foto" label_selected="Foto" name="snapshot_btn"/>
+	<button label="OK" label_selected="OK" name="ok_btn"/>
+	<text name="already for sale">
+		Você não pode leiloar terrenos que já estão configurados para venda.
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_avatar_picker.xml b/indra/newview/skins/default/xui/pt/floater_avatar_picker.xml
index 97f8e23a46..23b0b86675 100644
--- a/indra/newview/skins/default/xui/pt/floater_avatar_picker.xml
+++ b/indra/newview/skins/default/xui/pt/floater_avatar_picker.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="avatarpicker" title="Escolha o Residente">
-	<text name="instruct_search_resident_name">
-		Digite parte do nome do residente:
-	</text>
-	<button label="Encontrar" label_selected="Encontrar" name="Find"/>
-	<text name="Or select their calling card:">
-		Ou selecione um cartão de visita:
-	</text>
-	<button label="Fechar" label_selected="Fechar" name="Close"/>
-	<button label="Selecionar" label_selected="Selecionar" name="Select"/>
-	<string name="NotFound">
-		&apos;[TEXT]&apos; não encontrado
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="avatarpicker" title="Escolha o Residente">
+	<text name="instruct_search_resident_name">
+		Digite parte do nome do residente:
+	</text>
+	<button label="Encontrar" label_selected="Encontrar" name="Find"/>
+	<text name="Or select their calling card:">
+		Ou selecione um cartão de visita:
+	</text>
+	<button label="Fechar" label_selected="Fechar" name="Close"/>
+	<button label="Selecionar" label_selected="Selecionar" name="Select"/>
+	<string name="NotFound">
+		&apos;[TEXT]&apos; não encontrado
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml b/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml
index 94b0719053..db0023d748 100644
--- a/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml
+++ b/indra/newview/skins/default/xui/pt/floater_avatar_textures.xml
@@ -1,30 +1,30 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="avatar_texture_debug" title="Texturas do Avatar">
-	<text name="baked_label">
-		Texturas sobrepostas
-	</text>
-	<text name="composite_label">
-		Texturas compostas
-	</text>
-	<texture_picker label="Cabeça" name="baked_head"/>
-	<texture_picker label="Maquiagem" name="head_bodypaint"/>
-	<texture_picker label="Cabelo" name="hair"/>
-	<button label="Tombar" label_selected="Tombar" name="Dump"/>
-	<texture_picker label="Olhos" name="baked_eyes"/>
-	<texture_picker label="Olho" name="eye_texture"/>
-	<texture_picker label="Parte de cima" name="baked_upper_body"/>
-	<texture_picker label="Tatuagem para partes de cima" name="upper_bodypaint"/>
-	<texture_picker label="Camiseta" name="undershirt"/>
-	<texture_picker label="Luvas" name="gloves"/>
-	<texture_picker label="Camisa" name="shirt"/>
-	<texture_picker label="Jaqueta" name="upper_jacket"/>
-	<texture_picker label="Parte de baixo" name="baked_lower_body"/>
-	<texture_picker label="Tatuagem para partes de baixo" name="lower_bodypaint"/>
-	<texture_picker label="Roupas de baixo" name="underpants"/>
-	<texture_picker label="Meias" name="socks"/>
-	<texture_picker label="Calçados" name="shoes"/>
-	<texture_picker label="Calças" name="pants"/>
-	<texture_picker label="Jaqueta" name="jacket"/>
-	<texture_picker label="Saia" name="baked_skirt"/>
-	<texture_picker label="Saia" name="skirt_texture"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="avatar_texture_debug" title="Texturas do Avatar">
+	<text name="baked_label">
+		Texturas sobrepostas
+	</text>
+	<text name="composite_label">
+		Texturas compostas
+	</text>
+	<texture_picker label="Cabeça" name="baked_head"/>
+	<texture_picker label="Maquiagem" name="head_bodypaint"/>
+	<texture_picker label="Cabelo" name="hair"/>
+	<button label="Tombar" label_selected="Tombar" name="Dump"/>
+	<texture_picker label="Olhos" name="baked_eyes"/>
+	<texture_picker label="Olho" name="eye_texture"/>
+	<texture_picker label="Parte de cima" name="baked_upper_body"/>
+	<texture_picker label="Tatuagem para partes de cima" name="upper_bodypaint"/>
+	<texture_picker label="Camiseta" name="undershirt"/>
+	<texture_picker label="Luvas" name="gloves"/>
+	<texture_picker label="Camisa" name="shirt"/>
+	<texture_picker label="Jaqueta" name="upper_jacket"/>
+	<texture_picker label="Parte de baixo" name="baked_lower_body"/>
+	<texture_picker label="Tatuagem para partes de baixo" name="lower_bodypaint"/>
+	<texture_picker label="Roupas de baixo" name="underpants"/>
+	<texture_picker label="Meias" name="socks"/>
+	<texture_picker label="Calçados" name="shoes"/>
+	<texture_picker label="Calças" name="pants"/>
+	<texture_picker label="Jaqueta" name="jacket"/>
+	<texture_picker label="Saia" name="baked_skirt"/>
+	<texture_picker label="Saia" name="skirt_texture"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_beacons.xml b/indra/newview/skins/default/xui/pt/floater_beacons.xml
index e41bdc6635..edd1e08094 100644
--- a/indra/newview/skins/default/xui/pt/floater_beacons.xml
+++ b/indra/newview/skins/default/xui/pt/floater_beacons.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="beacons" title="Balizas">
-	<panel name="beacons_panel">
-		<check_box label="Objetos programados com toque apenas" name="touch_only"/>
-		<check_box label="Objetos programados" name="scripted"/>
-		<check_box label="Objetos físicos" name="physical"/>
-		<check_box label="Fontes de Som" name="sounds"/>
-		<check_box label="Fontes de Partículas" name="particles"/>
-		<check_box label="Renderização de Highlights" name="highlights"/>
-		<check_box label="Renderização de Balizas" name="beacons"/>
-		<text name="beacon_width_label">
-			Largura da Baliza
-		</text>
-	</panel>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="beacons" title="Balizas">
+	<panel name="beacons_panel">
+		<check_box label="Objetos programados com toque apenas" name="touch_only"/>
+		<check_box label="Objetos programados" name="scripted"/>
+		<check_box label="Objetos físicos" name="physical"/>
+		<check_box label="Fontes de Som" name="sounds"/>
+		<check_box label="Fontes de Partículas" name="particles"/>
+		<check_box label="Renderização de Highlights" name="highlights"/>
+		<check_box label="Renderização de Balizas" name="beacons"/>
+		<text name="beacon_width_label">
+			Largura da Baliza
+		</text>
+	</panel>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_build_options.xml b/indra/newview/skins/default/xui/pt/floater_build_options.xml
index c52ccad450..4dfebc3abd 100644
--- a/indra/newview/skins/default/xui/pt/floater_build_options.xml
+++ b/indra/newview/skins/default/xui/pt/floater_build_options.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="build options floater" title="Opções de grade">
-	<spinner label="Uni. Grade (metros)" name="GridResolution"/>
-	<spinner label="Ext. da Grade (metros)" name="GridDrawSize"/>
-	<check_box label="Habilitar ajuste de sub-grade" name="GridSubUnit"/>
-	<check_box label="Mostrar as seções de cruzamento" name="GridCrossSection"/>
-	<slider label="Opacidade da grade" name="GridOpacity"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="build options floater" title="Opções de grade">
+	<spinner label="Uni. Grade (metros)" name="GridResolution"/>
+	<spinner label="Ext. da Grade (metros)" name="GridDrawSize"/>
+	<check_box label="Habilitar ajuste de sub-grade" name="GridSubUnit"/>
+	<check_box label="Mostrar as seções de cruzamento" name="GridCrossSection"/>
+	<slider label="Opacidade da grade" name="GridOpacity"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_bumps.xml b/indra/newview/skins/default/xui/pt/floater_bumps.xml
index ec00abe415..0bc2546275 100644
--- a/indra/newview/skins/default/xui/pt/floater_bumps.xml
+++ b/indra/newview/skins/default/xui/pt/floater_bumps.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_bumps" title="Colisões, impulsos e batidas">
-	<text name="none_detected">
-		Nada detectado
-	</text>
-	<text name="bump">
-		[TIME]  [FIRST] [LAST] conflitou com você
-	</text>
-	<text name="llpushobject">
-		[TIME]  [FIRST] [LAST] empurrou você com um script
-	</text>
-	<text name="selected_object_collide">
-		[TIME]  [FIRST] [LAST] o atingiu com um objeto
-	</text>
-	<text name="scripted_object_collide">
-		[TIME]  [FIRST] [LAST] o atingiu com um objeto programado
-	</text>
-	<text name="physical_object_collide">
-		[TIME]  [FIRST] [LAST] o atingiu com um objeto físico
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_bumps" title="Colisões, impulsos e batidas">
+	<text name="none_detected">
+		Nada detectado
+	</text>
+	<text name="bump">
+		[TIME]  [FIRST] [LAST] conflitou com você
+	</text>
+	<text name="llpushobject">
+		[TIME]  [FIRST] [LAST] empurrou você com um script
+	</text>
+	<text name="selected_object_collide">
+		[TIME]  [FIRST] [LAST] o atingiu com um objeto
+	</text>
+	<text name="scripted_object_collide">
+		[TIME]  [FIRST] [LAST] o atingiu com um objeto programado
+	</text>
+	<text name="physical_object_collide">
+		[TIME]  [FIRST] [LAST] o atingiu com um objeto físico
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_buy_contents.xml b/indra/newview/skins/default/xui/pt/floater_buy_contents.xml
index 78b098b1f6..0c1fb77a08 100644
--- a/indra/newview/skins/default/xui/pt/floater_buy_contents.xml
+++ b/indra/newview/skins/default/xui/pt/floater_buy_contents.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_buy_contents" title="Comprar conteúdo">
-	<text name="contains_text">
-		[NAME] contém:
-	</text>
-	<text name="buy_text">
-		Comprar por L$[AMOUNT] de(a) [NAME]?
-	</text>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
-	<button label="Comprar" label_selected="Comprar" name="buy_btn"/>
-	<check_box label="Vestir roupa agora" name="wear_check"/>
-	<string name="no_copy_text">
-		(sem copiar)
-	</string>
-	<string name="no_modify_text">
-		(sem modificar)
-	</string>
-	<string name="no_transfer_text">
-		(sem transferir)
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_buy_contents" title="Comprar conteúdo">
+	<text name="contains_text">
+		[NAME] contém:
+	</text>
+	<text name="buy_text">
+		Comprar por L$[AMOUNT] de(a) [NAME]?
+	</text>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
+	<button label="Comprar" label_selected="Comprar" name="buy_btn"/>
+	<check_box label="Vestir roupa agora" name="wear_check"/>
+	<string name="no_copy_text">
+		(sem copiar)
+	</string>
+	<string name="no_modify_text">
+		(sem modificar)
+	</string>
+	<string name="no_transfer_text">
+		(sem transferir)
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_buy_currency.xml b/indra/newview/skins/default/xui/pt/floater_buy_currency.xml
index 53093a8c6e..ce2fe93705 100644
--- a/indra/newview/skins/default/xui/pt/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/pt/floater_buy_currency.xml
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="buy currency" title="Comprar Dinheiro">
-	<text name="info_buying">
-		Comprando Dinheiro:
-	</text>
-	<text name="info_cannot_buy">
-		Não pode comprar agora:
-	</text>
-	<text name="info_need_more">
-		Você precisa de mais dinheiro:
-	</text>
-	<text name="error_message">
-		Algo não está certo.
-	</text>
-	<button label="Ir para o website" name="error_web"/>
-	<text name="contacting">
-		Contatando LindeX...
-	</text>
-	<text name="buy_action_unknown">
-		Comprar L$ no câmbio atual da LindeX
-	</text>
-	<text name="buy_action">
-		[NAME] L$ [PRICE]
-	</text>
-	<text name="currency_action">
-		Comprar L$
-	</text>
-	<line_editor name="currency_amt">
-		1234
-	</line_editor>
-	<text name="currency_est">
-		por aproxim. US$ [USD]
-	</text>
-	<text name="getting_data">
-		Obtendo dados...
-	</text>
-	<text name="balance_label">
-		Você tem atualmente
-	</text>
-	<text name="balance_amount">
-		L$ [AMT]
-	</text>
-	<text name="buying_label">
-		Você está comprando
-	</text>
-	<text name="buying_amount">
-		L$ [AMT]
-	</text>
-	<text name="total_label">
-		Seu saldo será
-	</text>
-	<text name="total_amount">
-		L$ [AMT]
-	</text>
-	<text name="purchase_warning_repurchase">
-		Confirmando esta compra só compra a moeda.
-Você precisará tentar novamente a operação.
-	</text>
-	<text name="purchase_warning_notenough">
-		Você não está comprando moeda suficiente.
-Aumente a quantidade de compra.
-	</text>
-	<button label="Fechar" name="cancel_btn"/>
-	<button label="Adquirir" name="buy_btn"/>
-	<string name="buy_currency">
-		Comprar L$ [LINDENS] por aproximadamente US$ [USD]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="buy currency" title="Comprar Dinheiro">
+	<text name="info_buying">
+		Comprando Dinheiro:
+	</text>
+	<text name="info_cannot_buy">
+		Não pode comprar agora:
+	</text>
+	<text name="info_need_more">
+		Você precisa de mais dinheiro:
+	</text>
+	<text name="error_message">
+		Algo não está certo.
+	</text>
+	<button label="Ir para o website" name="error_web"/>
+	<text name="contacting">
+		Contatando LindeX...
+	</text>
+	<text name="buy_action_unknown">
+		Comprar L$ no câmbio atual da LindeX
+	</text>
+	<text name="buy_action">
+		[NAME] L$ [PRICE]
+	</text>
+	<text name="currency_action">
+		Comprar L$
+	</text>
+	<line_editor name="currency_amt">
+		1234
+	</line_editor>
+	<text name="currency_est">
+		por aproxim. US$ [USD]
+	</text>
+	<text name="getting_data">
+		Obtendo dados...
+	</text>
+	<text name="balance_label">
+		Você tem atualmente
+	</text>
+	<text name="balance_amount">
+		L$ [AMT]
+	</text>
+	<text name="buying_label">
+		Você está comprando
+	</text>
+	<text name="buying_amount">
+		L$ [AMT]
+	</text>
+	<text name="total_label">
+		Seu saldo será
+	</text>
+	<text name="total_amount">
+		L$ [AMT]
+	</text>
+	<text name="purchase_warning_repurchase">
+		Confirmando esta compra só compra a moeda.
+Você precisará tentar novamente a operação.
+	</text>
+	<text name="purchase_warning_notenough">
+		Você não está comprando moeda suficiente.
+Aumente a quantidade de compra.
+	</text>
+	<button label="Fechar" name="cancel_btn"/>
+	<button label="Adquirir" name="buy_btn"/>
+	<string name="buy_currency">
+		Comprar L$ [LINDENS] por aproximadamente US$ [USD]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_buy_land.xml b/indra/newview/skins/default/xui/pt/floater_buy_land.xml
index 11033f5870..e9711dc364 100644
--- a/indra/newview/skins/default/xui/pt/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/pt/floater_buy_land.xml
@@ -1,225 +1,225 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="buy land" title="Comprar terra">
-	<text name="region_name_label">
-		Região:
-	</text>
-	<text name="region_name_text">
-		(desconhecido)
-	</text>
-	<text name="estate_name_label">
-		Propriedade:
-	</text>
-	<text name="estate_name_text">
-		(desconhecido)
-	</text>
-	<text name="estate_owner_label">
-		Dono da propriedade:
-	</text>
-	<text name="estate_owner_text">
-		(desconhecido)
-	</text>
-	<text name="resellable_changeable_label">
-		Adquiriu um terreno nesta região:
-	</text>
-	<text name="resellable_clause">
-		Terra adquirida nesta região pode, ou não, ser revendida.
-	</text>
-	<text name="changeable_clause">
-		pode, ou não, ser unido ou subdividido.
-	</text>
-	<text name="covenant_text">
-		Você deve concordar com o Corretor da Propriedade:
-	</text>
-	<text_editor name="covenant_editor">
-		Carregando...
-	</text_editor>
-	<check_box label="Eu concordo com as definições do Corretor feitas acima." name="agree_covenant"/>
-	<text name="info_parcel_label">
-		Lote:
-	</text>
-	<text name="info_parcel">
-		Scotopteryx 138,204
-	</text>
-	<text name="info_size_label">
-		Tamanho:
-	</text>
-	<text name="info_size">
-		1024 m²
-	</text>
-	<text name="info_price_label">
-		Preço:
-	</text>
-	<text name="info_price">
-		L$ 1500, objetos inclusos
-	</text>
-	<text name="info_action">
-		Comprar este lote irá:
-	</text>
-	<text name="error_message">
-		Algo ainda não está correto.
-	</text>
-	<button label="Ir para a página da web" name="error_web"/>
-	<text name="account_action">
-		Evoluir sua conta para membro Premium
-	</text>
-	<text name="account_reason">
-		Somente membros Premium podem possuir terra.
-	</text>
-	<combo_box name="account_level">
-		<combo_item name="US$9.95/month,billedmonthly">
-			US$9.95/mês, debitado mensalmente
-		</combo_item>
-		<combo_item name="US$7.50/month,billedquarterly">
-			US$7.50/mês, debitado trimestralmente
-		</combo_item>
-		<combo_item name="US$6.00/month,billedannually">
-			US$6.00/mês, debitado anualmente
-		</combo_item>
-	</combo_box>
-	<text name="land_use_action">
-		Aumente sua taxa de locação de terra para US$ 40/mês.
-	</text>
-	<text name="land_use_reason">
-		Você possui 1.309 metros quadrados de terra. 
-Este lote tem 512 metros quadrados de terra.
-	</text>
-	<text name="purchase_action">
-		Pagar ao Residente Joe L$4000 pela terra
-	</text>
-	<text name="currency_reason">
-		Você tem L$2,100.
-	</text>
-	<text name="currency_action">
-		Compre L$ adicionais
-	</text>
-	<line_editor name="currency_amt">
-		1000
-	</line_editor>
-	<text name="currency_est">
-		por aproxim. US$ [AMOUNT2]
-	</text>
-	<text name="currency_balance">
-		Você tem L$2,100.
-	</text>
-	<check_box label="Remover [AMOUNT] m² de contribuição do grupo." name="remove_contribution"/>
-	<button label="Adquirir" name="buy_btn"/>
-	<button label="Cancelar" name="cancel_btn"/>
-	<string name="can_resell">
-		Pode ser revendida.
-	</string>
-	<string name="can_not_resell">
-		Não pode ser revendida.
-	</string>
-	<string name="can_change">
-		Pode ser unida ou subdivida.
-	</string>
-	<string name="can_not_change">
-		Não pode ser unida ou subdividida.
-	</string>
-	<string name="cant_buy_for_group">
-		Você não tem permissão para comprar terra para seu grupo ativo.
-	</string>
-	<string name="no_land_selected">
-		Nenhuma terra selecionada.
-	</string>
-	<string name="multiple_parcels_selected">
-		Múltiplos e diferentes lotes selecionados. Tente selecionar uma área menor.
-	</string>
-	<string name="no_permission">
-		Você não tem permissão para comprar uma terra para seu grupo ativo.
-	</string>
-	<string name="parcel_not_for_sale">
-		O lote selecionado não está a venda.
-	</string>
-	<string name="group_already_owns">
-		O grupo já possui o lote.
-	</string>
-	<string name="you_already_own">
-		Você já possui o lote.
-	</string>
-	<string name="set_to_sell_to_other">
-		O lote selecionado está configurado para ser vendido para outro grupo.
-	</string>
-	<string name="no_public_land">
-		A área selecionada não tem terras públicas.
-	</string>
-	<string name="not_owned_by_you">
-		Está selecionada uma terra pertencente a outro usuário. Tente selecionar uma área menor.
-	</string>
-	<string name="processing">
-		Processando sua compra...
- 
-(Isso pode levar um minuto.)
-	</string>
-	<string name="fetching_error">
-		Houve um erro ao buscar informações sobre compra de terras.
-	</string>
-	<string name="buying_will">
-		Comprar esta terra irá:
-	</string>
-	<string name="buying_for_group">
-		Comprar terra para o grupo:
-	</string>
-	<string name="cannot_buy_now">
-		Não foi possível comprar agora:
-	</string>
-	<string name="not_for_sale">
-		Não disponível para venda:
-	</string>
-	<string name="none_needed">
-		nada necessário
-	</string>
-	<string name="must_upgrade">
-		Sua conta deve ser evoluída para adquirir um lote.
-	</string>
-	<string name="cant_own_land">
-		Sua conta pode possuir uma terra.
-	</string>
-	<string name="land_holdings">
-		Você possui [BUYER] m² de terra.
-	</string>
-	<string name="pay_to_for_land">
-		Pagar L$ [AMOUNT] para [SELLER] por esta terra
-	</string>
-	<string name="buy_for_US">
-		Comprar L$ [AMOUNT] por aproximadamente US$ [AMOUNT2] ,
-	</string>
-	<string name="parcel_meters">
-		Este lote tem [AMOUNT] m².
-	</string>
-	<string name="premium_land">
-		Esta terra é Premium, e irá cobrar como [AMOUNT] m².
-	</string>
-	<string name="discounted_land">
-		Este lote é promocional, e irá cobrar como [AMOUNT] m².
-	</string>
-	<string name="meters_supports_object">
-		[AMOUNT] m²
-suporta [AMOUNT2] objetos
-	</string>
-	<string name="sold_with_objects">
-		vendido com objetos
-	</string>
-	<string name="insufficient_land_credits">
-		O grupo [GROUP] precisará de fundos suficientes de terras
-contribuídas para cobrir este lote antes da aquisição se completar.
-	</string>
-	<string name="have_enough_lindens">
-		Você tem L$ [AMOUNT], suficiente para comprar este lote.
-	</string>
-	<string name="not_enough_lindens">
-		Você tem somente L$ [AMOUNT], e precisa de mais L$ [AMOUNT2].
-	</string>
-	<string name="balance_left">
-		Após a compra, restará L$ [AMOUNT].
-	</string>
-	<string name="balance_needed">
-		Você precisa comprar pelo menos L$ [AMOUNT] para ter recursos para este lote.
-	</string>
-	<string name="no_parcel_selected">
-		(nenhum lote selecionado)
-	</string>
-	<string name="buy_currency">
-		Comprar L$ [LINDENS] por aproxim. US$ [USD]
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="buy land" title="Comprar terra">
+	<text name="region_name_label">
+		Região:
+	</text>
+	<text name="region_name_text">
+		(desconhecido)
+	</text>
+	<text name="estate_name_label">
+		Propriedade:
+	</text>
+	<text name="estate_name_text">
+		(desconhecido)
+	</text>
+	<text name="estate_owner_label">
+		Dono da propriedade:
+	</text>
+	<text name="estate_owner_text">
+		(desconhecido)
+	</text>
+	<text name="resellable_changeable_label">
+		Adquiriu um terreno nesta região:
+	</text>
+	<text name="resellable_clause">
+		Terra adquirida nesta região pode, ou não, ser revendida.
+	</text>
+	<text name="changeable_clause">
+		pode, ou não, ser unido ou subdividido.
+	</text>
+	<text name="covenant_text">
+		Você deve concordar com o Corretor da Propriedade:
+	</text>
+	<text_editor name="covenant_editor">
+		Carregando...
+	</text_editor>
+	<check_box label="Eu concordo com as definições do Corretor feitas acima." name="agree_covenant"/>
+	<text name="info_parcel_label">
+		Lote:
+	</text>
+	<text name="info_parcel">
+		Scotopteryx 138,204
+	</text>
+	<text name="info_size_label">
+		Tamanho:
+	</text>
+	<text name="info_size">
+		1024 m²
+	</text>
+	<text name="info_price_label">
+		Preço:
+	</text>
+	<text name="info_price">
+		L$ 1500, objetos inclusos
+	</text>
+	<text name="info_action">
+		Comprar este lote irá:
+	</text>
+	<text name="error_message">
+		Algo ainda não está correto.
+	</text>
+	<button label="Ir para a página da web" name="error_web"/>
+	<text name="account_action">
+		Evoluir sua conta para membro Premium
+	</text>
+	<text name="account_reason">
+		Somente membros Premium podem possuir terra.
+	</text>
+	<combo_box name="account_level">
+		<combo_box.item name="US$9.95/month,billedmonthly">
+			US$9.95/mês, debitado mensalmente
+		</combo_box.item>
+		<combo_box.item name="US$7.50/month,billedquarterly">
+			US$7.50/mês, debitado trimestralmente
+		</combo_box.item>
+		<combo_box.item name="US$6.00/month,billedannually">
+			US$6.00/mês, debitado anualmente
+		</combo_box.item>
+	</combo_box>
+	<text name="land_use_action">
+		Aumente sua taxa de locação de terra para US$ 40/mês.
+	</text>
+	<text name="land_use_reason">
+		Você possui 1.309 metros quadrados de terra. 
+Este lote tem 512 metros quadrados de terra.
+	</text>
+	<text name="purchase_action">
+		Pagar ao Residente Joe L$4000 pela terra
+	</text>
+	<text name="currency_reason">
+		Você tem L$2,100.
+	</text>
+	<text name="currency_action">
+		Compre L$ adicionais
+	</text>
+	<line_editor name="currency_amt">
+		1000
+	</line_editor>
+	<text name="currency_est">
+		por aproxim. US$ [AMOUNT2]
+	</text>
+	<text name="currency_balance">
+		Você tem L$2,100.
+	</text>
+	<check_box label="Remover [AMOUNT] m² de contribuição do grupo." name="remove_contribution"/>
+	<button label="Adquirir" name="buy_btn"/>
+	<button label="Cancelar" name="cancel_btn"/>
+	<string name="can_resell">
+		Pode ser revendida.
+	</string>
+	<string name="can_not_resell">
+		Não pode ser revendida.
+	</string>
+	<string name="can_change">
+		Pode ser unida ou subdivida.
+	</string>
+	<string name="can_not_change">
+		Não pode ser unida ou subdividida.
+	</string>
+	<string name="cant_buy_for_group">
+		Você não tem permissão para comprar terra para seu grupo ativo.
+	</string>
+	<string name="no_land_selected">
+		Nenhuma terra selecionada.
+	</string>
+	<string name="multiple_parcels_selected">
+		Múltiplos e diferentes lotes selecionados. Tente selecionar uma área menor.
+	</string>
+	<string name="no_permission">
+		Você não tem permissão para comprar uma terra para seu grupo ativo.
+	</string>
+	<string name="parcel_not_for_sale">
+		O lote selecionado não está a venda.
+	</string>
+	<string name="group_already_owns">
+		O grupo já possui o lote.
+	</string>
+	<string name="you_already_own">
+		Você já possui o lote.
+	</string>
+	<string name="set_to_sell_to_other">
+		O lote selecionado está configurado para ser vendido para outro grupo.
+	</string>
+	<string name="no_public_land">
+		A área selecionada não tem terras públicas.
+	</string>
+	<string name="not_owned_by_you">
+		Está selecionada uma terra pertencente a outro usuário. Tente selecionar uma área menor.
+	</string>
+	<string name="processing">
+		Processando sua compra...
+ 
+(Isso pode levar um minuto.)
+	</string>
+	<string name="fetching_error">
+		Houve um erro ao buscar informações sobre compra de terras.
+	</string>
+	<string name="buying_will">
+		Comprar esta terra irá:
+	</string>
+	<string name="buying_for_group">
+		Comprar terra para o grupo:
+	</string>
+	<string name="cannot_buy_now">
+		Não foi possível comprar agora:
+	</string>
+	<string name="not_for_sale">
+		Não disponível para venda:
+	</string>
+	<string name="none_needed">
+		nada necessário
+	</string>
+	<string name="must_upgrade">
+		Sua conta deve ser evoluída para adquirir um lote.
+	</string>
+	<string name="cant_own_land">
+		Sua conta pode possuir uma terra.
+	</string>
+	<string name="land_holdings">
+		Você possui [BUYER] m² de terra.
+	</string>
+	<string name="pay_to_for_land">
+		Pagar L$ [AMOUNT] para [SELLER] por esta terra
+	</string>
+	<string name="buy_for_US">
+		Comprar L$ [AMOUNT] por aproximadamente US$ [AMOUNT2] ,
+	</string>
+	<string name="parcel_meters">
+		Este lote tem [AMOUNT] m².
+	</string>
+	<string name="premium_land">
+		Esta terra é Premium, e irá cobrar como [AMOUNT] m².
+	</string>
+	<string name="discounted_land">
+		Este lote é promocional, e irá cobrar como [AMOUNT] m².
+	</string>
+	<string name="meters_supports_object">
+		[AMOUNT] m²
+suporta [AMOUNT2] objetos
+	</string>
+	<string name="sold_with_objects">
+		vendido com objetos
+	</string>
+	<string name="insufficient_land_credits">
+		O grupo [GROUP] precisará de fundos suficientes de terras
+contribuídas para cobrir este lote antes da aquisição se completar.
+	</string>
+	<string name="have_enough_lindens">
+		Você tem L$ [AMOUNT], suficiente para comprar este lote.
+	</string>
+	<string name="not_enough_lindens">
+		Você tem somente L$ [AMOUNT], e precisa de mais L$ [AMOUNT2].
+	</string>
+	<string name="balance_left">
+		Após a compra, restará L$ [AMOUNT].
+	</string>
+	<string name="balance_needed">
+		Você precisa comprar pelo menos L$ [AMOUNT] para ter recursos para este lote.
+	</string>
+	<string name="no_parcel_selected">
+		(nenhum lote selecionado)
+	</string>
+	<string name="buy_currency">
+		Comprar L$ [LINDENS] por aproxim. US$ [USD]
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_buy_object.xml b/indra/newview/skins/default/xui/pt/floater_buy_object.xml
index b79a5111dd..b8e1085471 100644
--- a/indra/newview/skins/default/xui/pt/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/pt/floater_buy_object.xml
@@ -1,26 +1,26 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="contents" title="Comprar cópia do objeto">
-	<text name="contents_text">
-		e seus conteúdos:
-	</text>
-	<text name="buy_text">
-		Comprar por L$[AMOUNT] de(a) [NAME]?
-	</text>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
-	<button label="Comprar" label_selected="Comprar" name="buy_btn"/>
-	<string name="title_buy_text">
-		Comprar
-	</string>
-	<string name="title_buy_copy_text">
-		Comprar uma cópia de
-	</string>
-	<string name="no_copy_text">
-		(sem copiar)
-	</string>
-	<string name="no_modify_text">
-		(sem modificar)
-	</string>
-	<string name="no_transfer_text">
-		(sem transferir)
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="contents" title="Comprar cópia do objeto">
+	<text name="contents_text">
+		e seus conteúdos:
+	</text>
+	<text name="buy_text">
+		Comprar por L$[AMOUNT] de(a) [NAME]?
+	</text>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
+	<button label="Comprar" label_selected="Comprar" name="buy_btn"/>
+	<string name="title_buy_text">
+		Comprar
+	</string>
+	<string name="title_buy_copy_text">
+		Comprar uma cópia de
+	</string>
+	<string name="no_copy_text">
+		(sem copiar)
+	</string>
+	<string name="no_modify_text">
+		(sem modificar)
+	</string>
+	<string name="no_transfer_text">
+		(sem transferir)
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_camera.xml b/indra/newview/skins/default/xui/pt/floater_camera.xml
index 435ba6294f..4dc6997606 100644
--- a/indra/newview/skins/default/xui/pt/floater_camera.xml
+++ b/indra/newview/skins/default/xui/pt/floater_camera.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="move floater" title="">
-	<string name="rotate_tooltip">
-		Girar a Câmera ao redor do Foco
-	</string>
-	<string name="zoom_tooltip">
-		Aproximar a Câmera in direção ao Foco
-	</string>
-	<string name="move_tooltip">
-		Mover a Câmera Para Cima e Para Baixo, Para a Esquerda e Para a Direita
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="move floater" title="">
+	<string name="rotate_tooltip">
+		Girar a Câmera ao redor do Foco
+	</string>
+	<string name="zoom_tooltip">
+		Aproximar a Câmera in direção ao Foco
+	</string>
+	<string name="move_tooltip">
+		Mover a Câmera Para Cima e Para Baixo, Para a Esquerda e Para a Direita
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_choose_group.xml b/indra/newview/skins/default/xui/pt/floater_choose_group.xml
index e52bb3d6ef..449d578716 100644
--- a/indra/newview/skins/default/xui/pt/floater_choose_group.xml
+++ b/indra/newview/skins/default/xui/pt/floater_choose_group.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="groups" title="Grupos">
-	<text name="groupdesc">
-		Escolha um grupo:
-	</text>
-	<button label="OK" label_selected="OK" name="OK" />
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="groups" title="Grupos">
+	<text name="groupdesc">
+		Escolha um grupo:
+	</text>
+	<button label="OK" label_selected="OK" name="OK" />
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel" />
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_color_picker.xml b/indra/newview/skins/default/xui/pt/floater_color_picker.xml
index 77e3171573..475280b013 100644
--- a/indra/newview/skins/default/xui/pt/floater_color_picker.xml
+++ b/indra/newview/skins/default/xui/pt/floater_color_picker.xml
@@ -1,30 +1,30 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="ColorPicker" title="Seletor de Cor">
-	<text name="r_val_text">
-		Vermelho:
-	</text>
-	<text name="g_val_text">
-		Verde:
-	</text>
-	<text name="b_val_text">
-		Azul:
-	</text>
-	<text name="h_val_text">
-		Matiz:
-	</text>
-	<text name="s_val_text">
-		Sat:
-	</text>
-	<text name="l_val_text">
-		Lum:
-	</text>
-	<check_box label="Aplicar imediatamente" name="apply_immediate"/>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
-	<button label="Selecionar" label_selected="Selecionar" name="select_btn"/>
-	<text name="Current color:">
-		Cor atual:
-	</text>
-	<text name="(Drag below to save.)">
-		(Arraste abaixo para salvar.)
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="ColorPicker" title="Seletor de Cor">
+	<text name="r_val_text">
+		Vermelho:
+	</text>
+	<text name="g_val_text">
+		Verde:
+	</text>
+	<text name="b_val_text">
+		Azul:
+	</text>
+	<text name="h_val_text">
+		Matiz:
+	</text>
+	<text name="s_val_text">
+		Sat:
+	</text>
+	<text name="l_val_text">
+		Lum:
+	</text>
+	<check_box label="Aplicar imediatamente" name="apply_immediate"/>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
+	<button label="Selecionar" label_selected="Selecionar" name="select_btn"/>
+	<text name="Current color:">
+		Cor atual:
+	</text>
+	<text name="(Drag below to save.)">
+		(Arraste abaixo para salvar.)
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_critical.xml b/indra/newview/skins/default/xui/pt/floater_critical.xml
index f8d403502f..5d7fe0142b 100644
--- a/indra/newview/skins/default/xui/pt/floater_critical.xml
+++ b/indra/newview/skins/default/xui/pt/floater_critical.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="modal container" title=" ">
-	<button label="Continuar" label_selected="Continuar" name="Continue"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-	<text name="tos_heading">
-		Por favor, leia a mensagem a seguir cuidadosamente.
-	</text>
-	<text_editor name="tos_text">
-		TOS_TEXT
-	</text_editor>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="modal container" title=" ">
+	<button label="Continuar" label_selected="Continuar" name="Continue"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+	<text name="tos_heading">
+		Por favor, leia a mensagem a seguir cuidadosamente.
+	</text>
+	<text_editor name="tos_text">
+		TOS_TEXT
+	</text_editor>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_customize.xml b/indra/newview/skins/default/xui/pt/floater_customize.xml
index 1be051049f..267612bb9d 100644
--- a/indra/newview/skins/default/xui/pt/floater_customize.xml
+++ b/indra/newview/skins/default/xui/pt/floater_customize.xml
@@ -1,451 +1,451 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater customize" title="Aparência" width="513">
-	<tab_container name="customize tab container" tab_min_width="115" width="511">
-		<panel label="Partes de corpo" name="body_parts_placeholder"/>
-		<panel label="Forma" name="Shape">
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-			<button label="Corpo" label_selected="Corpo" name="Body"/>
-			<button label="Cabeça" label_selected="Cabeça" name="Head"/>
-			<button label="Olhos" label_selected="Olhos" name="Eyes"/>
-			<button label="Orelhas" label_selected="Orelhas" name="Ears"/>
-			<button label="Nariz" label_selected="Nariz" name="Nose"/>
-			<button label="Boca" label_selected="Boca" name="Mouth"/>
-			<button label="Queixo" label_selected="Queixo" name="Chin"/>
-			<button label="Tórax" label_selected="Tórax" name="Torso"/>
-			<button label="Pernas" label_selected="Pernas" name="Legs"/>
-			<radio_group name="sex radio">
-				<radio_item length="1" name="radio" type="string">
-					Feminino
-				</radio_item>
-				<radio_item length="1" name="radio2" type="string">
-					Masculino
-				</radio_item>
-			</radio_group>
-			<button label="Aleatório" label_selected="Aleatório" name="Randomize"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Coloque uma nova forma arrastando uma do seu inventário
-para seu avatar. Alternativamente, você pode criar uma nova de um esboço e usá-la.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não tem permissão para modificar esta vestimenta.
-			</text>
-			<button label="Criar Nova Forma" label_selected="Criar Nova Forma" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-		</panel>
-		<panel label="Pele" name="Skin">
-			<button label="Cor de Pele" label_selected="Cor de Pele" name="Skin Color"/>
-			<button label="Detalhes Faciais" label_selected="Detalhes Faciais" name="Face Detail"/>
-			<button label="Maquiagem" label_selected="Maquiagem" name="Makeup"/>
-			<button label="Detalhes do Corpo" label_selected="Detalhes do Corpo" name="Body Detail"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando..
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizada em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Coloque uma nova pele arrastando uma de seu inventário para seu avatar.
-Alternativamente, você pode criar uma nova forma a partir de um esboço e usá-la.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não tem permissão para modificar esta vestimenta.
-			</text>
-			<texture_picker label="Tatuagens para a cabeça" name="Head Tattoos" tool_tip="Clique para escolher um desenho"/>
-			<texture_picker label="Tattoos Superiores" name="Upper Tattoos" tool_tip="Clique para escolher um desenho"/>
-			<texture_picker label="Tattoos Inferiores" name="Lower Tattoos" tool_tip="Clique para escolher um desenho"/>
-			<button label="Aleatório" label_selected="Aleatório" name="Randomize"/>
-			<button label="Criar Nova Pele" label_selected="Criar Nova Pele" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-		</panel>
-		<panel label="Cabelo" name="Hair">
-			<button label="Cor" label_selected="Cor" name="Color"/>
-			<button label="Estilo" label_selected="Estilo" name="Style"/>
-			<button label="Sombrancelhas" label_selected="Sombrancelhas" name="Eyebrows"/>
-			<button label="Rosto" label_selected="Rosto" name="Facial"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Ponha um novo cabelo em seu avatar arrastando um do seu inventário.
-Alternativamente, você pode criar um novo modelo a partir de um esboço e
-usá-lo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não ter permissão para modificar essa vestimenta.
-			</text>
-			<texture_picker label="Texture" name="Texture" tool_tip="Clique para escolher uma imagem"/>
-			<button label="Aleatório" label_selected="Aleatório" name="Randomize"/>
-			<button label="Criar Novo Cabelo" label_selected="Criar Novo Cabelo" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-		</panel>
-		<panel label="Olhos" name="Eyes">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Para colocar novos olhos, arraste um do seu inventário para seu avatar.
-Alternativamente, você pode criar um novo modelo de um esboço e
-usá-lo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não tem permissão para alterar esta vestimenta.
-			</text>
-			<texture_picker label="Íris" name="Iris" tool_tip="Clique para escolher uma imagem"/>
-			<button label="Aleatório" label_selected="Aleatório" name="Randomize"/>
-			<button label="Criar Novos Olhos" label_selected="Criar Novos Olhos" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-		</panel>
-		<panel label="Roupas" name="clothes_placeholder"/>
-		<panel label="Camisa" name="Shirt">
-			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
-			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para pegar o conta-gotas"/>
-			<button label="Criar Nova Camisa" label_selected="Criar Nova Camisa" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Para por uma nova camisa em seu avatar, arraste uma do seu
-inventário para seu avatar. Alternativamente, você pode criar um
-novo modelo a partir de um esboço e usá-lo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não ter permissão para modificar esta vestimenta.
-			</text>
-		</panel>
-		<panel label="Calças" name="Pants">
-			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
-			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para abrir o conta-gotas."/>
-			<button label="Criar Novas Calças" label_selected="Criar Novas Calças" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestindo
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Para por uma nova calça em seu avatar, basta arrastar uma outra do seu
-inventário. Alternativamente, você pode criar um novo modelo a partir
-de um esboço e usá-lo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não tem permissão para modificar esta vestimenta.
-			</text>
-		</panel>
-		<panel label="Sapatos" name="Shoes">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Para por novos sapatos em seu avatar, basta arrastar um novo do seu
-inventário. Alternativamente, você pode criar um novo modelo a partir
-de um esboço e usá-lo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não tem permissão para modificar esta vestimenta.
-			</text>
-			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
-			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para pegar o conta-gotas"/>
-			<button label="Criar Novos Sapatos" label_selected="Criar Novos Sapatos" name="Create New" width="166"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-		</panel>
-		<panel label="Meias" name="Socks">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido.
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Para por novas meias em seu avatar, basta arrastar uma nova do seu
-inventário. Alternativamente, você pode criar novas meias a partir de um esboço e usá-las.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não tem permissão para modificar essa vestimenta.
-			</text>
-			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
-			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para pegar o conta-gotas"/>
-			<button label="Criar Novas Meias" label_selected="Criar Novas Meias" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-		</panel>
-		<panel label="Jaqueta" name="Jacket">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: Não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Para por uma nova jaqueta em seu avatar, basta arrastar um novo modelo
-do seu inventário. Alternativamente, você pode criar um novo modelo a
-partir de um esboço e usá-lo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não tem permissão para modificar esta vestimenta.
-			</text>
-			<texture_picker label="Tecido Superior" name="Upper Fabric" tool_tip="Clique para escolher uma imagem." width="84"/>
-			<texture_picker label="Tecido Inferior" name="Lower Fabric" tool_tip="Clique para escolher uma imagem." width="84"/>
-			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para pegar o conta-gotas"/>
-			<button label="Criar Nova Jaqueta" label_selected="Criar Nova Jaqueta" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-		</panel>
-		<panel label="Luvas" name="Gloves">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando....
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Para colocar uma nova jaqueta em seu avatar, basta arrastar um novo modelo
-do seu inventário. Alternativamente, você pode criar uma novo modelo a
-partir de um esboço e usá-lo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não tem permissão para modificar essa vestimenta.
-			</text>
-			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
-			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para abrir o conta-gotas"/>
-			<button label="Criar Novas Luvas" label_selected="Criar Novas Luvas" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-		</panel>
-		<panel label="Camiseta" name="Undershirt">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Para por uma nova Camiseta em seu avatar, basta arrastar um novo
-modelo de seu inventário. Alternativamente, você pode criar um
-novo modelo a partir de um esboço e usá-lo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não ter permissão para modificar essa vestimenta.
-			</text>
-			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
-			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para abrir o conta-gotas"/>
-			<button label="Criar Nova Camiseta" label_selected="Criar Nova Roupa de Baixo" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-		</panel>
-		<panel label="Roupas de Baixo" name="Underpants">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Para por novas roupas de baixo em seu avatar, basta arrastar um novo
-modelo do seu inventário. Alternativamente, você pode criar um novo
-modelo a partir de um esboço e usá-lo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não tem permissão para modificar essa vestimenta.
-			</text>
-			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
-			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para pegar o conta-gotas"/>
-			<button label="Criar Novas Roupas de Baixo" label_selected="Criar Novas Roupas de Baixo" name="Create New" width="176"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-		</panel>
-		<panel label="Saia" name="Skirt">
-			<text length="1" name="title" type="string">
-				[DESC]
-			</text>
-			<text length="1" name="title_no_modify" type="string">
-				[DESC]: não foi possível modificar
-			</text>
-			<text length="1" name="title_loading" type="string">
-				[DESC]: carregando...
-			</text>
-			<text length="1" name="title_not_worn" type="string">
-				[DESC]: não vestido
-			</text>
-			<text length="1" name="path" type="string">
-				Localizado em [PATH]
-			</text>
-			<text length="1" name="not worn instructions" type="string">
-				Para por uma nova saia em seu avatar, basta arrastar um novo modelo
-do seu inventário. Alternativamente, você pode criar um novo modelo a
-partir de um esboço e usá-lo.
-			</text>
-			<text length="1" name="no modify instructions" type="string">
-				Você não tem permissão para modificar esta vestimenta.
-			</text>
-			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
-			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Click to open Color Picker"/>
-			<button label="Criar Nova Saia" label_selected="Criar Nova Saia" name="Create New"/>
-			<button label="Remover" label_selected="Remover" name="Take Off"/>
-			<button label="Salvar" label_selected="Salvar" name="Save"/>
-			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
-			<button label="Reverter" label_selected="Reverter" name="Revert"/>
-		</panel>
-	</tab_container>
-	<scroll_container left="216" name="panel_container"/>
-	<button label="Fechar" label_selected="Fechar" name="Close"/>
-	<button label="Salvar Tudo" label_selected="Salvar Tudo" name="Save All"/>
-	<button label="Criar Visual" label_selected="Criar Visual" name="Make Outfit"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater customize" title="Aparência" width="513">
+	<tab_container name="customize tab container" tab_min_width="115" width="511">
+		<panel label="Partes de corpo" name="body_parts_placeholder"/>
+		<panel label="Forma" name="Shape">
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+			<button label="Corpo" label_selected="Corpo" name="Body"/>
+			<button label="Cabeça" label_selected="Cabeça" name="Head"/>
+			<button label="Olhos" label_selected="Olhos" name="Eyes"/>
+			<button label="Orelhas" label_selected="Orelhas" name="Ears"/>
+			<button label="Nariz" label_selected="Nariz" name="Nose"/>
+			<button label="Boca" label_selected="Boca" name="Mouth"/>
+			<button label="Queixo" label_selected="Queixo" name="Chin"/>
+			<button label="Tórax" label_selected="Tórax" name="Torso"/>
+			<button label="Pernas" label_selected="Pernas" name="Legs"/>
+			<radio_group name="sex radio">
+				<radio_item length="1" name="radio" type="string">
+					Feminino
+				</radio_item>
+				<radio_item length="1" name="radio2" type="string">
+					Masculino
+				</radio_item>
+			</radio_group>
+			<button label="Aleatório" label_selected="Aleatório" name="Randomize"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Coloque uma nova forma arrastando uma do seu inventário
+para seu avatar. Alternativamente, você pode criar uma nova de um esboço e usá-la.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não tem permissão para modificar esta vestimenta.
+			</text>
+			<button label="Criar Nova Forma" label_selected="Criar Nova Forma" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+		</panel>
+		<panel label="Pele" name="Skin">
+			<button label="Cor de Pele" label_selected="Cor de Pele" name="Skin Color"/>
+			<button label="Detalhes Faciais" label_selected="Detalhes Faciais" name="Face Detail"/>
+			<button label="Maquiagem" label_selected="Maquiagem" name="Makeup"/>
+			<button label="Detalhes do Corpo" label_selected="Detalhes do Corpo" name="Body Detail"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando..
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizada em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Coloque uma nova pele arrastando uma de seu inventário para seu avatar.
+Alternativamente, você pode criar uma nova forma a partir de um esboço e usá-la.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não tem permissão para modificar esta vestimenta.
+			</text>
+			<texture_picker label="Tatuagens para a cabeça" name="Head Tattoos" tool_tip="Clique para escolher um desenho"/>
+			<texture_picker label="Tattoos Superiores" name="Upper Tattoos" tool_tip="Clique para escolher um desenho"/>
+			<texture_picker label="Tattoos Inferiores" name="Lower Tattoos" tool_tip="Clique para escolher um desenho"/>
+			<button label="Aleatório" label_selected="Aleatório" name="Randomize"/>
+			<button label="Criar Nova Pele" label_selected="Criar Nova Pele" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+		</panel>
+		<panel label="Cabelo" name="Hair">
+			<button label="Cor" label_selected="Cor" name="Color"/>
+			<button label="Estilo" label_selected="Estilo" name="Style"/>
+			<button label="Sombrancelhas" label_selected="Sombrancelhas" name="Eyebrows"/>
+			<button label="Rosto" label_selected="Rosto" name="Facial"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Ponha um novo cabelo em seu avatar arrastando um do seu inventário.
+Alternativamente, você pode criar um novo modelo a partir de um esboço e
+usá-lo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não ter permissão para modificar essa vestimenta.
+			</text>
+			<texture_picker label="Texture" name="Texture" tool_tip="Clique para escolher uma imagem"/>
+			<button label="Aleatório" label_selected="Aleatório" name="Randomize"/>
+			<button label="Criar Novo Cabelo" label_selected="Criar Novo Cabelo" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+		</panel>
+		<panel label="Olhos" name="Eyes">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Para colocar novos olhos, arraste um do seu inventário para seu avatar.
+Alternativamente, você pode criar um novo modelo de um esboço e
+usá-lo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não tem permissão para alterar esta vestimenta.
+			</text>
+			<texture_picker label="Íris" name="Iris" tool_tip="Clique para escolher uma imagem"/>
+			<button label="Aleatório" label_selected="Aleatório" name="Randomize"/>
+			<button label="Criar Novos Olhos" label_selected="Criar Novos Olhos" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+		</panel>
+		<panel label="Roupas" name="clothes_placeholder"/>
+		<panel label="Camisa" name="Shirt">
+			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
+			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para pegar o conta-gotas"/>
+			<button label="Criar Nova Camisa" label_selected="Criar Nova Camisa" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Para por uma nova camisa em seu avatar, arraste uma do seu
+inventário para seu avatar. Alternativamente, você pode criar um
+novo modelo a partir de um esboço e usá-lo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não ter permissão para modificar esta vestimenta.
+			</text>
+		</panel>
+		<panel label="Calças" name="Pants">
+			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
+			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para abrir o conta-gotas."/>
+			<button label="Criar Novas Calças" label_selected="Criar Novas Calças" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestindo
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Para por uma nova calça em seu avatar, basta arrastar uma outra do seu
+inventário. Alternativamente, você pode criar um novo modelo a partir
+de um esboço e usá-lo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não tem permissão para modificar esta vestimenta.
+			</text>
+		</panel>
+		<panel label="Sapatos" name="Shoes">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Para por novos sapatos em seu avatar, basta arrastar um novo do seu
+inventário. Alternativamente, você pode criar um novo modelo a partir
+de um esboço e usá-lo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não tem permissão para modificar esta vestimenta.
+			</text>
+			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
+			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para pegar o conta-gotas"/>
+			<button label="Criar Novos Sapatos" label_selected="Criar Novos Sapatos" name="Create New" width="166"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+		</panel>
+		<panel label="Meias" name="Socks">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido.
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Para por novas meias em seu avatar, basta arrastar uma nova do seu
+inventário. Alternativamente, você pode criar novas meias a partir de um esboço e usá-las.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não tem permissão para modificar essa vestimenta.
+			</text>
+			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
+			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para pegar o conta-gotas"/>
+			<button label="Criar Novas Meias" label_selected="Criar Novas Meias" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+		</panel>
+		<panel label="Jaqueta" name="Jacket">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: Não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Para por uma nova jaqueta em seu avatar, basta arrastar um novo modelo
+do seu inventário. Alternativamente, você pode criar um novo modelo a
+partir de um esboço e usá-lo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não tem permissão para modificar esta vestimenta.
+			</text>
+			<texture_picker label="Tecido Superior" name="Upper Fabric" tool_tip="Clique para escolher uma imagem." width="84"/>
+			<texture_picker label="Tecido Inferior" name="Lower Fabric" tool_tip="Clique para escolher uma imagem." width="84"/>
+			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para pegar o conta-gotas"/>
+			<button label="Criar Nova Jaqueta" label_selected="Criar Nova Jaqueta" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+		</panel>
+		<panel label="Luvas" name="Gloves">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando....
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Para colocar uma nova jaqueta em seu avatar, basta arrastar um novo modelo
+do seu inventário. Alternativamente, você pode criar uma novo modelo a
+partir de um esboço e usá-lo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não tem permissão para modificar essa vestimenta.
+			</text>
+			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
+			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para abrir o conta-gotas"/>
+			<button label="Criar Novas Luvas" label_selected="Criar Novas Luvas" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+		</panel>
+		<panel label="Camiseta" name="Undershirt">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Para por uma nova Camiseta em seu avatar, basta arrastar um novo
+modelo de seu inventário. Alternativamente, você pode criar um
+novo modelo a partir de um esboço e usá-lo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não ter permissão para modificar essa vestimenta.
+			</text>
+			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
+			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para abrir o conta-gotas"/>
+			<button label="Criar Nova Camiseta" label_selected="Criar Nova Roupa de Baixo" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+		</panel>
+		<panel label="Roupas de Baixo" name="Underpants">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Para por novas roupas de baixo em seu avatar, basta arrastar um novo
+modelo do seu inventário. Alternativamente, você pode criar um novo
+modelo a partir de um esboço e usá-lo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não tem permissão para modificar essa vestimenta.
+			</text>
+			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
+			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Clique para pegar o conta-gotas"/>
+			<button label="Criar Novas Roupas de Baixo" label_selected="Criar Novas Roupas de Baixo" name="Create New" width="176"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+		</panel>
+		<panel label="Saia" name="Skirt">
+			<text length="1" name="title" type="string">
+				[DESC]
+			</text>
+			<text length="1" name="title_no_modify" type="string">
+				[DESC]: não foi possível modificar
+			</text>
+			<text length="1" name="title_loading" type="string">
+				[DESC]: carregando...
+			</text>
+			<text length="1" name="title_not_worn" type="string">
+				[DESC]: não vestido
+			</text>
+			<text length="1" name="path" type="string">
+				Localizado em [PATH]
+			</text>
+			<text length="1" name="not worn instructions" type="string">
+				Para por uma nova saia em seu avatar, basta arrastar um novo modelo
+do seu inventário. Alternativamente, você pode criar um novo modelo a
+partir de um esboço e usá-lo.
+			</text>
+			<text length="1" name="no modify instructions" type="string">
+				Você não tem permissão para modificar esta vestimenta.
+			</text>
+			<texture_picker label="Tecido" name="Fabric" tool_tip="Clique para escolher uma imagem"/>
+			<color_swatch label="Cor/Tint" name="Color/Tint" tool_tip="Click to open Color Picker"/>
+			<button label="Criar Nova Saia" label_selected="Criar Nova Saia" name="Create New"/>
+			<button label="Remover" label_selected="Remover" name="Take Off"/>
+			<button label="Salvar" label_selected="Salvar" name="Save"/>
+			<button label="Salvar Como" label_selected="Salvar Como" name="Save As"/>
+			<button label="Reverter" label_selected="Reverter" name="Revert"/>
+		</panel>
+	</tab_container>
+	<scroll_container left="216" name="panel_container"/>
+	<button label="Fechar" label_selected="Fechar" name="Close"/>
+	<button label="Salvar Tudo" label_selected="Salvar Tudo" name="Save All"/>
+	<button label="Criar Visual" label_selected="Criar Visual" name="Make Outfit"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml
index bc9960a53d..5049b87a56 100644
--- a/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml
@@ -1,67 +1,67 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Day Cycle Floater" title="Editor de ciclo de dia">
-	<tab_container name="Day Cycle Tabs">
-		<panel label="Ciclo do dia" name="Day Cycle">
-			<button label="?" name="WLDayCycleHelp"/>
-			<text name="WL12am">
-				12:00 meia-noite
-			</text>
-			<text name="WL3am">
-				3:00 da manhã
-			</text>
-			<text name="WL6am">
-				6:00 da manhã
-			</text>
-			<text name="WL9amHash">
-				9:00 da manhã
-			</text>
-			<text name="WL12pmHash">
-				12:00 meio dia
-			</text>
-			<text name="WL3pm">
-				3:00 da tarde
-			</text>
-			<text name="WL6pm">
-				6:00 da tarde
-			</text>
-			<text name="WL9pm">
-				9:00 da noite
-			</text>
-			<text name="WL12am2">
-				12:00 meia noite
-			</text>
-			<button label="Add Key" label_selected="Adicionar chave" name="WLAddKey"/>
-			<button label="Apagar chave" label_selected="Apagar chave" name="WLDeleteKey"/>
-			<text name="WLCurKeyFrameText">
-				Configurações de Quadro-chave:
-			</text>
-			<text name="WLCurKeyTimeText">
-				Tempo-chave:
-			</text>
-			<spinner label="Hora" name="WLCurKeyHour"/>
-			<spinner label="Minutos" name="WLCurKeyMin"/>
-			<text name="WLCurKeyTimeText2">
-				Ajuste-chave:
-			</text>
-			<combo_box label="Ajuste" name="WLKeyPresets"/>
-			<text name="DayCycleText">
-				Grudar:
-			</text>
-			<combo_box label="5 minutos" name="WLSnapOptions"/>
-			<text name="DayCycleText2">
-				Duração do Ciclo:
-			</text>
-			<spinner label="Hora" name="WLLengthOfDayHour"/>
-			<spinner label="Minuto" name="WLLengthOfDayMin"/>
-			<spinner label="Segundo" name="WLLengthOfDaySec"/>
-			<text name="DayCycleText3">
-				Prévia:
-			</text>
-			<button label="Tocar" label_selected="Tocar" name="WLAnimSky"/>
-			<button label="Pare!" label_selected="Pare" name="WLStopAnimSky"/>
-			<button label="Usar o horário da Propriedade" label_selected="Ir para o horário da Propriedade" name="WLUseLindenTime"/>
-			<button label="Salvar o Dia teste" label_selected="Salvar o Dia teste" name="WLSaveDayCycle"/>
-			<button label="Carregar o Dia teste" label_selected="Carregar o Dia teste" name="WLLoadDayCycle"/>
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Day Cycle Floater" title="Editor de ciclo de dia">
+	<tab_container name="Day Cycle Tabs">
+		<panel label="Ciclo do dia" name="Day Cycle">
+			<button label="?" name="WLDayCycleHelp"/>
+			<text name="WL12am">
+				12:00 meia-noite
+			</text>
+			<text name="WL3am">
+				3:00 da manhã
+			</text>
+			<text name="WL6am">
+				6:00 da manhã
+			</text>
+			<text name="WL9amHash">
+				9:00 da manhã
+			</text>
+			<text name="WL12pmHash">
+				12:00 meio dia
+			</text>
+			<text name="WL3pm">
+				3:00 da tarde
+			</text>
+			<text name="WL6pm">
+				6:00 da tarde
+			</text>
+			<text name="WL9pm">
+				9:00 da noite
+			</text>
+			<text name="WL12am2">
+				12:00 meia noite
+			</text>
+			<button label="Add Key" label_selected="Adicionar chave" name="WLAddKey"/>
+			<button label="Apagar chave" label_selected="Apagar chave" name="WLDeleteKey"/>
+			<text name="WLCurKeyFrameText">
+				Configurações de Quadro-chave:
+			</text>
+			<text name="WLCurKeyTimeText">
+				Tempo-chave:
+			</text>
+			<spinner label="Hora" name="WLCurKeyHour"/>
+			<spinner label="Minutos" name="WLCurKeyMin"/>
+			<text name="WLCurKeyTimeText2">
+				Ajuste-chave:
+			</text>
+			<combo_box label="Ajuste" name="WLKeyPresets"/>
+			<text name="DayCycleText">
+				Grudar:
+			</text>
+			<combo_box label="5 minutos" name="WLSnapOptions"/>
+			<text name="DayCycleText2">
+				Duração do Ciclo:
+			</text>
+			<spinner label="Hora" name="WLLengthOfDayHour"/>
+			<spinner label="Minuto" name="WLLengthOfDayMin"/>
+			<spinner label="Segundo" name="WLLengthOfDaySec"/>
+			<text name="DayCycleText3">
+				Prévia:
+			</text>
+			<button label="Tocar" label_selected="Tocar" name="WLAnimSky"/>
+			<button label="Pare!" label_selected="Pare" name="WLStopAnimSky"/>
+			<button label="Usar o horário da Propriedade" label_selected="Ir para o horário da Propriedade" name="WLUseLindenTime"/>
+			<button label="Salvar o Dia teste" label_selected="Salvar o Dia teste" name="WLSaveDayCycle"/>
+			<button label="Carregar o Dia teste" label_selected="Carregar o Dia teste" name="WLLoadDayCycle"/>
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_env_settings.xml b/indra/newview/skins/default/xui/pt/floater_env_settings.xml
index afefae71e6..b1c85a32b7 100644
--- a/indra/newview/skins/default/xui/pt/floater_env_settings.xml
+++ b/indra/newview/skins/default/xui/pt/floater_env_settings.xml
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Environment Editor Floater" title="Editor do Ambiente">
-	<text name="EnvTimeText">
-		Hora do Dia
-	</text>
-	<text name="EnvTimeText2">
-		12:00 PM
-	</text>
-	<text name="EnvCloudText">
-		Cobertura de Nuvens
-	</text>
-	<text name="EnvWaterColorText">
-		Cor da água
-	</text>
-	<color_swatch label="" name="EnvWaterColor" tool_tip="Clique para abrir o Editor de cores"/>
-	<text name="EnvWaterFogText">
-		Névoa da água
-	</text>
-	<button label="Usar hora da propriedade" name="EnvUseEstateTimeButton"/>
-	<button label="Céu Avançado" name="EnvAdvancedSkyButton"/>
-	<button label="Água Avançada" name="EnvAdvancedWaterButton"/>
-	<button label="?" name="EnvSettingsHelpButton"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Environment Editor Floater" title="Editor do Ambiente">
+	<text name="EnvTimeText">
+		Hora do Dia
+	</text>
+	<text name="EnvTimeText2">
+		12:00 PM
+	</text>
+	<text name="EnvCloudText">
+		Cobertura de Nuvens
+	</text>
+	<text name="EnvWaterColorText">
+		Cor da água
+	</text>
+	<color_swatch label="" name="EnvWaterColor" tool_tip="Clique para abrir o Editor de cores"/>
+	<text name="EnvWaterFogText">
+		Névoa da água
+	</text>
+	<button label="Usar hora da propriedade" name="EnvUseEstateTimeButton"/>
+	<button label="Céu Avançado" name="EnvAdvancedSkyButton"/>
+	<button label="Água Avançada" name="EnvAdvancedWaterButton"/>
+	<button label="?" name="EnvSettingsHelpButton"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_gesture.xml b/indra/newview/skins/default/xui/pt/floater_gesture.xml
index 1fac88f7da..ac50f32dd1 100644
--- a/indra/newview/skins/default/xui/pt/floater_gesture.xml
+++ b/indra/newview/skins/default/xui/pt/floater_gesture.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="gestures" title="Gestos Ativos">
-	<text name="help_label">
-		Clicar duas vezes no gesto para executar animações e sons.
-	</text>
-	<scroll_list name="gesture_list">
-		<column label="Acionar" name="trigger"/>
-		<column label="Chave" name="shortcut"/>
-		<column label="Nome" name="name"/>
-	</scroll_list>
-	<button label="Novo" name="new_gesture_btn"/>
-	<button label="Editar" name="edit_btn"/>
-	<button label="Executar" name="play_btn"/>
-	<button label="Parar" name="stop_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="gestures" title="Gestos Ativos">
+	<text name="help_label">
+		Clicar duas vezes no gesto para executar animações e sons.
+	</text>
+	<scroll_list name="gesture_list">
+		<column label="Acionar" name="trigger"/>
+		<column label="Chave" name="shortcut"/>
+		<column label="Nome" name="name"/>
+	</scroll_list>
+	<button label="Novo" name="new_gesture_btn"/>
+	<button label="Editar" name="edit_btn"/>
+	<button label="Executar" name="play_btn"/>
+	<button label="Parar" name="stop_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_god_tools.xml b/indra/newview/skins/default/xui/pt/floater_god_tools.xml
index 9b94ec6908..27dad15215 100644
--- a/indra/newview/skins/default/xui/pt/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/pt/floater_god_tools.xml
@@ -1,106 +1,106 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="godtools floater" title="Ferramentas de Deus">
-	<tab_container name="GodTools Tabs">
-		<panel label="Grade" name="grid">
-			<button label="Desconectar todos os usuários" label_selected="Desconectar todos os usuários" name="Kick all users"/>
-			<button label="Limpar os cachês de visibilidade do mapa da região." label_selected="Limpar os cachês de visibilidade do mapa da região." name="Flush This Region&apos;s Map Visibility Caches"/>
-		</panel>
-		<panel label="Região" name="region">
-			<text name="Sim Name:">
-				Nome do Simulador:
-			</text>
-			<check_box label="Prelúdio" name="check prelude" tool_tip="Ajustar para tornar esta região um prelúdio."/>
-			<check_box label="Fixar Sol" name="check fixed sun" tool_tip="Fixa a posição do sol (como em Região/Estados) &gt; Terreno."/>
-			<check_box label="Redefinir Home no teletransporte" name="check reset home" tool_tip="Quando um residente se teletransporta, redefine sua home para a posição de destino."/>
-			<check_box label="Visível" name="check visible" tool_tip="Ajustar para fazer essa região visível para os não-deuses"/>
-			<check_box label="Dano" name="check damage" tool_tip="Ajustar para permitir dano nesta região"/>
-			<check_box label="Bloquear ratreamento do Tráfego" name="block dwell" tool_tip="Configure isto para fazer a região não computar o tráfego."/>
-			<check_box label="Bloquear Terraform" name="block terraform" tool_tip="Ajustar para desabilitar as pessoas a terraplanarem seus terrenos"/>
-			<check_box label="Sandbox" name="is sandbox" tool_tip="Alterar se esta região for uma sandbox."/>
-			<button label="Nivelar o terreno" label_selected="Nivelar o Terreno" name="Bake Terrain" tool_tip="Salva o terreno atual como padrão."/>
-			<button label="Reverter Terreno" label_selected="Reverter Terreno" name="Revert Terrain" tool_tip="Substituir o terreno atual pelo padrão."/>
-			<button label="Trocar Terreno" label_selected="Trocar Terreno" name="Swap Terrain" tool_tip="Trocar o terreno atual pelo padrão."/>
-			<text name="estate id">
-				ID da Propriedade:
-			</text>
-			<text name="parent id">
-				ID do Pai:
-			</text>
-			<line_editor name="parentestate" tool_tip="Esta é a propriedade pai para esta região"/>
-			<text name="Grid Pos: ">
-				Posição da Grade:
-			</text>
-			<line_editor name="gridposx" tool_tip="Esta é a  posição x da grade para esta região"/>
-			<line_editor name="gridposy" tool_tip="Esta é a posição y da grade para esta região"/>
-			<text name="Redirect to Grid: ">
-				Redirecionar para a Grade:
-			</text>
-			<text name="billable factor text">
-				Fator cobrança:
-			</text>
-			<text name="land cost text">
-				L$ por metros quadrados
-			</text>
-			<button label="Atualizar" label_selected="Atualizar" name="Refresh" tool_tip="Clique aqui para atualizar a informação acima."/>
-			<button label="Aplicar" label_selected="Aplicar" name="Apply" tool_tip="Clique aqui para aplicar qualquer mudança acima"/>
-			<button label="Selecionar Região" label_selected="Selecionar Região" name="Select Region" tool_tip="Selecionar toda a região com a ferramenta de terreno"/>
-			<button label="Autosalvar Agora" label_selected="Autosalvar Agora" name="Autosave now" tool_tip="Salvar estado compactado para o diretório de gravação automática."/>
-		</panel>
-		<panel label="Objetos" name="objects">
-			<text name="Sim Name:">
-				Sim Nome:
-			</text>
-			<text name="region name">
-				Welsh
-			</text>
-			<check_box label="Desativar Scripts" name="disable scripts" tool_tip="Ajustar para desativar todos os scripts da região"/>
-			<check_box label="Desativar Colisões" name="disable collisions" tool_tip="Ajustar para desativar colisões de não-agentes nessa região"/>
-			<check_box label="Desativar Física" name="disable physics" tool_tip="Ajustar para desativar toda a física nessa região"/>
-			<button label="Aplicar" label_selected="Aplicar" name="Apply" tool_tip="Clique aqui para aplicar todas as alterações acima."/>
-			<button label="Ajustar Alvo" label_selected="Ajustar Alvo" name="Set Target" tool_tip="Configura o avatar alvo para deleção de objetos."/>
-			<text name="target_avatar_name">
-				(sem alvo)
-			</text>
-			<button label="Apagar objetos programados do alvo em outras terras" label_selected="Apagar objetos programados do alvo em outras terras" name="Delete Target&apos;s Scripted Objects On Others Land" tool_tip="Apagar todos os objetos programados possuídos pelo alvo nas terras fora do domínio do alvo. Objetos (sem cópia) irão retornar."/>
-			<button label="Apagar objetos programados do Alvo em qualquer terreno" label_selected="Apagar objetos programados do Alvo em qualquer terreno" name="Delete Target&apos;s Scripted Objects On *Any* Land" tool_tip="Apagar todos os objetos programados do alvo nesta região. Objetos (sem cópia) irão retornar."/>
-			<button label="Apagar *TODOS* os objetos do alvo" label_selected="Apagar *TODOS* os objetos do alvo" name="Delete *ALL* Of Target&apos;s Objects" tool_tip="Apagar todos os objetos possuídos pelo alvo nesta região. Objetos (sem cópia) objetos irão retornar."/>
-			<button label="Pegar os maiores colidentes" label_selected="Pegar os maiores colidentes" name="Get Top Colliders" tool_tip="Pega a lista de objetos que estão experimentando as chamadas mais freqüentes."/>
-			<button label="Pegar os scripts principais" label_selected="Pegar os scripts principais" name="Get Top Scripts" tool_tip="Pegar a lista de objetos programados com a maior duração em tempo de execução."/>
-			<button label="Informações de Scripts" label_selected="Informações de Scripts" name="Scripts digest" tool_tip="Pega uma lista de todos os scripts e o número de ocorrências de cada um."/>
-		</panel>
-		<panel label="Requisição" name="request">
-			<text name="Destination:">
-				Destino:
-			</text>
-			<combo_box name="destination">
-				<combo_item name="Selection">
-					Seleção
-				</combo_item>
-				<combo_item name="AgentRegion">
-					Região do Agente
-				</combo_item>
-			</combo_box>
-			<text name="Request:">
-				Requisição:
-			</text>
-			<combo_box name="request">
-				<combo_item name="colliders&lt;steps&gt;">
-					Passos de Colisão
-				</combo_item>
-				<combo_item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
-					Contagem de scripts, padrão opcional
-				</combo_item>
-				<combo_item name="objects&lt;pattern&gt;">
-					Padrão de Objetos
-				</combo_item>
-				<combo_item name="rez&lt;asset_id&gt;">
-					rez &lt;asset_id&gt;
-				</combo_item>
-			</combo_box>
-			<text name="Parameter:">
-				Parametro:
-			</text>
-			<button label="Fazer Requisição" label_selected="Fazer Requisição" name="Make Request"/>
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="godtools floater" title="Ferramentas de Deus">
+	<tab_container name="GodTools Tabs">
+		<panel label="Grade" name="grid">
+			<button label="Desconectar todos os usuários" label_selected="Desconectar todos os usuários" name="Kick all users"/>
+			<button label="Limpar os cachês de visibilidade do mapa da região." label_selected="Limpar os cachês de visibilidade do mapa da região." name="Flush This Region&apos;s Map Visibility Caches"/>
+		</panel>
+		<panel label="Região" name="region">
+			<text name="Sim Name:">
+				Nome do Simulador:
+			</text>
+			<check_box label="Prelúdio" name="check prelude" tool_tip="Ajustar para tornar esta região um prelúdio."/>
+			<check_box label="Fixar Sol" name="check fixed sun" tool_tip="Fixa a posição do sol (como em Região/Estados) &gt; Terreno."/>
+			<check_box label="Redefinir Home no teletransporte" name="check reset home" tool_tip="Quando um residente se teletransporta, redefine sua home para a posição de destino."/>
+			<check_box label="Visível" name="check visible" tool_tip="Ajustar para fazer essa região visível para os não-deuses"/>
+			<check_box label="Dano" name="check damage" tool_tip="Ajustar para permitir dano nesta região"/>
+			<check_box label="Bloquear ratreamento do Tráfego" name="block dwell" tool_tip="Configure isto para fazer a região não computar o tráfego."/>
+			<check_box label="Bloquear Terraform" name="block terraform" tool_tip="Ajustar para desabilitar as pessoas a terraplanarem seus terrenos"/>
+			<check_box label="Sandbox" name="is sandbox" tool_tip="Alterar se esta região for uma sandbox."/>
+			<button label="Nivelar o terreno" label_selected="Nivelar o Terreno" name="Bake Terrain" tool_tip="Salva o terreno atual como padrão."/>
+			<button label="Reverter Terreno" label_selected="Reverter Terreno" name="Revert Terrain" tool_tip="Substituir o terreno atual pelo padrão."/>
+			<button label="Trocar Terreno" label_selected="Trocar Terreno" name="Swap Terrain" tool_tip="Trocar o terreno atual pelo padrão."/>
+			<text name="estate id">
+				ID da Propriedade:
+			</text>
+			<text name="parent id">
+				ID do Pai:
+			</text>
+			<line_editor name="parentestate" tool_tip="Esta é a propriedade pai para esta região"/>
+			<text name="Grid Pos: ">
+				Posição da Grade:
+			</text>
+			<line_editor name="gridposx" tool_tip="Esta é a  posição x da grade para esta região"/>
+			<line_editor name="gridposy" tool_tip="Esta é a posição y da grade para esta região"/>
+			<text name="Redirect to Grid: ">
+				Redirecionar para a Grade:
+			</text>
+			<text name="billable factor text">
+				Fator cobrança:
+			</text>
+			<text name="land cost text">
+				L$ por metros quadrados
+			</text>
+			<button label="Atualizar" label_selected="Atualizar" name="Refresh" tool_tip="Clique aqui para atualizar a informação acima."/>
+			<button label="Aplicar" label_selected="Aplicar" name="Apply" tool_tip="Clique aqui para aplicar qualquer mudança acima"/>
+			<button label="Selecionar Região" label_selected="Selecionar Região" name="Select Region" tool_tip="Selecionar toda a região com a ferramenta de terreno"/>
+			<button label="Autosalvar Agora" label_selected="Autosalvar Agora" name="Autosave now" tool_tip="Salvar estado compactado para o diretório de gravação automática."/>
+		</panel>
+		<panel label="Objetos" name="objects">
+			<text name="Sim Name:">
+				Sim Nome:
+			</text>
+			<text name="region name">
+				Welsh
+			</text>
+			<check_box label="Desativar Scripts" name="disable scripts" tool_tip="Ajustar para desativar todos os scripts da região"/>
+			<check_box label="Desativar Colisões" name="disable collisions" tool_tip="Ajustar para desativar colisões de não-agentes nessa região"/>
+			<check_box label="Desativar Física" name="disable physics" tool_tip="Ajustar para desativar toda a física nessa região"/>
+			<button label="Aplicar" label_selected="Aplicar" name="Apply" tool_tip="Clique aqui para aplicar todas as alterações acima."/>
+			<button label="Ajustar Alvo" label_selected="Ajustar Alvo" name="Set Target" tool_tip="Configura o avatar alvo para deleção de objetos."/>
+			<text name="target_avatar_name">
+				(sem alvo)
+			</text>
+			<button label="Apagar objetos programados do alvo em outras terras" label_selected="Apagar objetos programados do alvo em outras terras" name="Delete Target&apos;s Scripted Objects On Others Land" tool_tip="Apagar todos os objetos programados possuídos pelo alvo nas terras fora do domínio do alvo. Objetos (sem cópia) irão retornar."/>
+			<button label="Apagar objetos programados do Alvo em qualquer terreno" label_selected="Apagar objetos programados do Alvo em qualquer terreno" name="Delete Target&apos;s Scripted Objects On *Any* Land" tool_tip="Apagar todos os objetos programados do alvo nesta região. Objetos (sem cópia) irão retornar."/>
+			<button label="Apagar *TODOS* os objetos do alvo" label_selected="Apagar *TODOS* os objetos do alvo" name="Delete *ALL* Of Target&apos;s Objects" tool_tip="Apagar todos os objetos possuídos pelo alvo nesta região. Objetos (sem cópia) objetos irão retornar."/>
+			<button label="Pegar os maiores colidentes" label_selected="Pegar os maiores colidentes" name="Get Top Colliders" tool_tip="Pega a lista de objetos que estão experimentando as chamadas mais freqüentes."/>
+			<button label="Pegar os scripts principais" label_selected="Pegar os scripts principais" name="Get Top Scripts" tool_tip="Pegar a lista de objetos programados com a maior duração em tempo de execução."/>
+			<button label="Informações de Scripts" label_selected="Informações de Scripts" name="Scripts digest" tool_tip="Pega uma lista de todos os scripts e o número de ocorrências de cada um."/>
+		</panel>
+		<panel label="Requisição" name="request">
+			<text name="Destination:">
+				Destino:
+			</text>
+			<combo_box name="destination">
+				<combo_box.item name="Selection">
+					Seleção
+				</combo_box.item>
+				<combo_box.item name="AgentRegion">
+					Região do Agente
+				</combo_box.item>
+			</combo_box>
+			<text name="Request:">
+				Requisição:
+			</text>
+			<combo_box name="request">
+				<combo_box.item name="colliders&lt;steps&gt;">
+					Passos de Colisão
+				</combo_box.item>
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
+					Contagem de scripts, padrão opcional
+				</combo_box.item>
+				<combo_box.item name="objects&lt;pattern&gt;">
+					Padrão de Objetos
+				</combo_box.item>
+				<combo_box.item name="rez&lt;asset_id&gt;">
+					rez &lt;asset_id&gt;
+				</combo_box.item>
+			</combo_box>
+			<text name="Parameter:">
+				Parametro:
+			</text>
+			<button label="Fazer Requisição" label_selected="Fazer Requisição" name="Make Request"/>
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml b/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml
index c395144d4a..10ed0339a3 100644
--- a/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Hardware Settings Floater" title="Ajustes de Hardware">
-	<text name="Filtering:">
-		Filtragem:
-	</text>
-	<check_box label="Filtragem Anisotrópica (mais lento quando habilitada)" name="ani"/>
-	<text name="Antialiasing:">
-		Suavização:
-	</text>
-	<combo_box label="Suavização" name="fsaa" width="94">
-		<combo_item name="FSAADisabled">
-			Desabilitado
-		</combo_item>
-		<combo_item name="2x">
-			2x
-		</combo_item>
-		<combo_item name="4x">
-			4x
-		</combo_item>
-		<combo_item name="8x">
-			8x
-		</combo_item>
-		<combo_item name="16x">
-			16x
-		</combo_item>
-	</combo_box>
-	<spinner label="Gama:" name="gamma"/>
-	<text name="(brightness, lower is brighter)">
-		(brilho, quanto menor, mais brilho, 0=usar padrão)
-	</text>
-	<text name="Enable VBO:">
-		Habilitar VBO:
-	</text>
-	<check_box label="Habilitar Objetos com Armazenamento de Vértices" name="vbo" tool_tip="Habilitando-o em máquinas novas, ele oferece um ganho de performance. Contudo, as máquinas antigas tem freqüentemente implementações pobres de VBOs e você pode ter travamentos quando esta opção é habilitada."/>
-	<slider label="Memória de Textura (MB):" name="GrapicsCardTextureMemory" tool_tip="Quantidade de memória a se reservar para texturas. Usa por padrão, a  Memória da Placa de Vídeo. Sua redução pode aumentar a performance mas pode também deixar as texturas borradas."/>
-	<spinner label="Relação de Distância de &#10;Nevoeiro:" name="fog"/>
-	<button label="OK" label_selected="OK" name="OK"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Hardware Settings Floater" title="Ajustes de Hardware">
+	<text name="Filtering:">
+		Filtragem:
+	</text>
+	<check_box label="Filtragem Anisotrópica (mais lento quando habilitada)" name="ani"/>
+	<text name="Antialiasing:">
+		Suavização:
+	</text>
+	<combo_box label="Suavização" name="fsaa" width="94">
+		<combo_item name="FSAADisabled">
+			Desabilitado
+		</combo_item>
+		<combo_item name="2x">
+			2x
+		</combo_item>
+		<combo_item name="4x">
+			4x
+		</combo_item>
+		<combo_item name="8x">
+			8x
+		</combo_item>
+		<combo_item name="16x">
+			16x
+		</combo_item>
+	</combo_box>
+	<spinner label="Gama:" name="gamma"/>
+	<text name="(brightness, lower is brighter)">
+		(brilho, quanto menor, mais brilho, 0=usar padrão)
+	</text>
+	<text name="Enable VBO:">
+		Habilitar VBO:
+	</text>
+	<check_box label="Habilitar Objetos com Armazenamento de Vértices" name="vbo" tool_tip="Habilitando-o em máquinas novas, ele oferece um ganho de performance. Contudo, as máquinas antigas tem freqüentemente implementações pobres de VBOs e você pode ter travamentos quando esta opção é habilitada."/>
+	<slider label="Memória de Textura (MB):" name="GrapicsCardTextureMemory" tool_tip="Quantidade de memória a se reservar para texturas. Usa por padrão, a  Memória da Placa de Vídeo. Sua redução pode aumentar a performance mas pode também deixar as texturas borradas."/>
+	<spinner label="Relação de Distância de &#10;Nevoeiro:" name="fog"/>
+	<button label="OK" label_selected="OK" name="OK"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_hud.xml b/indra/newview/skins/default/xui/pt/floater_hud.xml
index c75867956b..d31bcedf05 100644
--- a/indra/newview/skins/default/xui/pt/floater_hud.xml
+++ b/indra/newview/skins/default/xui/pt/floater_hud.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_hud" title="Tutorial"/>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_hud" title="Tutorial"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_im.xml b/indra/newview/skins/default/xui/pt/floater_im.xml
index 3df47cf4cf..75c3409339 100644
--- a/indra/newview/skins/default/xui/pt/floater_im.xml
+++ b/indra/newview/skins/default/xui/pt/floater_im.xml
@@ -1,45 +1,45 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<multi_floater name="im_floater" title="Mensagem Instantânea">
-	<string name="only_user_message">
-		Você é o único usuário desta sessão.
-	</string>
-	<string name="offline_message">
-		[FIRST] [LAST] está offline.
-	</string>
-	<string name="invite_message">
-		Clique no botão [BUTTON NAME] para aceitar/ conectar a este bate-papo em voz.
-	</string>
-	<string name="muted_message">
-		Você emudeceu este residente. Enviar uma mensagem vai automaticamente reativá-lo novamente.
-	</string>
-	<string name="generic_request_error">
-		Erro na requisição, por favor, tente novamente.
-	</string>
-	<string name="insufficient_perms_error">
-		Você não tem permissões suficientes.
-	</string>
-	<string name="session_does_not_exist_error">
-		A sessão deixou de existir
-	</string>
-	<string name="no_ability_error">
-		Você não possui esta habilidade.
-	</string>
-	<string name="not_a_mod_error">
-		Você não é um moderador de sessão.
-	</string>
-	<string name="muted_error">
-		Um moderador do grupo desabilitou seu bate-papo em texto.
-	</string>
-	<string name="add_session_event">
-		Não foi possível adicionar usuários na sessão de bate-papo com [RECIPIENT].
-	</string>
-	<string name="message_session_event">
-		Não foi possível enviar sua mensagem na sessão de bate- papo com [RECIPIENT].
-	</string>
-	<string name="removed_from_group">
-		Você foi removido do grupo.
-	</string>
-	<string name="close_on_no_ability">
-		Você não possui mais a habilidade de estar na sessão de bate-papo.
-	</string>
-</multi_floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<multi_floater name="im_floater" title="Mensagem Instantânea">
+	<string name="only_user_message">
+		Você é o único usuário desta sessão.
+	</string>
+	<string name="offline_message">
+		[FIRST] [LAST] está offline.
+	</string>
+	<string name="invite_message">
+		Clique no botão [BUTTON NAME] para aceitar/ conectar a este bate-papo em voz.
+	</string>
+	<string name="muted_message">
+		Você emudeceu este residente. Enviar uma mensagem vai automaticamente reativá-lo novamente.
+	</string>
+	<string name="generic_request_error">
+		Erro na requisição, por favor, tente novamente.
+	</string>
+	<string name="insufficient_perms_error">
+		Você não tem permissões suficientes.
+	</string>
+	<string name="session_does_not_exist_error">
+		A sessão deixou de existir
+	</string>
+	<string name="no_ability_error">
+		Você não possui esta habilidade.
+	</string>
+	<string name="not_a_mod_error">
+		Você não é um moderador de sessão.
+	</string>
+	<string name="muted_error">
+		Um moderador do grupo desabilitou seu bate-papo em texto.
+	</string>
+	<string name="add_session_event">
+		Não foi possível adicionar usuários na sessão de bate-papo com [RECIPIENT].
+	</string>
+	<string name="message_session_event">
+		Não foi possível enviar sua mensagem na sessão de bate- papo com [RECIPIENT].
+	</string>
+	<string name="removed_from_group">
+		Você foi removido do grupo.
+	</string>
+	<string name="close_on_no_ability">
+		Você não possui mais a habilidade de estar na sessão de bate-papo.
+	</string>
+</multi_floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_image_preview.xml b/indra/newview/skins/default/xui/pt/floater_image_preview.xml
index 53f224a8a8..f1192e860b 100644
--- a/indra/newview/skins/default/xui/pt/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/pt/floater_image_preview.xml
@@ -1,52 +1,52 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Image Preview" title="">
-	<text name="name_label">
-		Nome:
-	</text>
-	<text name="description_label">
-		Descrição:
-	</text>
-	<text name="preview_label">
-		Prévia da Imagem como:
-	</text>
-	<combo_box label="Tipo de Roupas" name="clothing_type_combo">
-		<combo_item name="Image">
-			Imagem
-		</combo_item>
-		<combo_item name="Hair">
-			Cabelo
-		</combo_item>
-		<combo_item name="FemaleHead">
-			Cabeça Feminina
-		</combo_item>
-		<combo_item name="FemaleUpperBody">
-			Parte Superior do Corpo Feminino
-		</combo_item>
-		<combo_item name="FemaleLowerBody">
-			Parte Inferior do Corpo Feminino
-		</combo_item>
-		<combo_item name="MaleHead">
-			Cabeça Masculina
-		</combo_item>
-		<combo_item name="MaleUpperBody">
-			Parte Superior do Corpo Masculino
-		</combo_item>
-		<combo_item name="MaleLowerBody">
-			Parte Inferiro do Corpo Masculino
-		</combo_item>
-		<combo_item name="Skirt">
-			Saia
-		</combo_item>
-		<combo_item name="SculptedPrim">
-			Primitiva Esculpida
-		</combo_item>
-	</combo_box>
-	<text name="bad_image_text">
-		Incapaz de ler a imagem.
-
-Tente salvar a imagem como 24 bit Targa (.tga).
-	</text>
-	<check_box label="Usar compressão com menor perda" name="lossless_check"/>
-	<button label="Cancelar" name="cancel_btn"/>
-	<button label="Upload (L$[AMOUNT])" name="ok_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Image Preview" title="">
+	<text name="name_label">
+		Nome:
+	</text>
+	<text name="description_label">
+		Descrição:
+	</text>
+	<text name="preview_label">
+		Prévia da Imagem como:
+	</text>
+	<combo_box label="Tipo de Roupas" name="clothing_type_combo">
+		<combo_box.item name="Image">
+			Imagem
+		</combo_box.item>
+		<combo_box.item name="Hair">
+			Cabelo
+		</combo_box.item>
+		<combo_box.item name="FemaleHead">
+			Cabeça Feminina
+		</combo_box.item>
+		<combo_box.item name="FemaleUpperBody">
+			Parte Superior do Corpo Feminino
+		</combo_box.item>
+		<combo_box.item name="FemaleLowerBody">
+			Parte Inferior do Corpo Feminino
+		</combo_box.item>
+		<combo_box.item name="MaleHead">
+			Cabeça Masculina
+		</combo_box.item>
+		<combo_box.item name="MaleUpperBody">
+			Parte Superior do Corpo Masculino
+		</combo_box.item>
+		<combo_box.item name="MaleLowerBody">
+			Parte Inferiro do Corpo Masculino
+		</combo_box.item>
+		<combo_box.item name="Skirt">
+			Saia
+		</combo_box.item>
+		<combo_box.item name="SculptedPrim">
+			Primitiva Esculpida
+		</combo_box.item>
+	</combo_box>
+	<text name="bad_image_text">
+		Incapaz de ler a imagem.
+
+Tente salvar a imagem como 24 bit Targa (.tga).
+	</text>
+	<check_box label="Usar compressão com menor perda" name="lossless_check"/>
+	<button label="Cancelar" name="cancel_btn"/>
+	<button label="Upload (L$[AMOUNT])" name="ok_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_inspect.xml b/indra/newview/skins/default/xui/pt/floater_inspect.xml
index a37c8d7c5d..f3d4b0f33f 100644
--- a/indra/newview/skins/default/xui/pt/floater_inspect.xml
+++ b/indra/newview/skins/default/xui/pt/floater_inspect.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="inspect" title="Inspecionar Objeto">
-	<scroll_list name="object_list" tool_tip="Selecione um objeto nesta lista para destacá-lo in-world">
-		<column label="Nome do Objeto" name="object_name"/>
-		<column label="Nome do Proprietário" name="owner_name"/>
-		<column label="Nome do Criador" name="creator_name"/>
-		<column label="Data de Criação" name="creation_date"/>
-	</scroll_list>
-	<button label="Ver Perfil do Proprietário..." label_selected="" name="button owner" tool_tip="Veja o perfil do proprietário do objeto destacado"/>
-	<button label="Ver perfil do criador..." label_selected="" name="button creator" tool_tip="Veja o perfil do criador original do objeto destacado"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="inspect" title="Inspecionar Objeto">
+	<scroll_list name="object_list" tool_tip="Selecione um objeto nesta lista para destacá-lo in-world">
+		<column label="Nome do Objeto" name="object_name"/>
+		<column label="Nome do Proprietário" name="owner_name"/>
+		<column label="Nome do Criador" name="creator_name"/>
+		<column label="Data de Criação" name="creation_date"/>
+	</scroll_list>
+	<button label="Ver Perfil do Proprietário..." label_selected="" name="button owner" tool_tip="Veja o perfil do proprietário do objeto destacado"/>
+	<button label="Ver perfil do criador..." label_selected="" name="button creator" tool_tip="Veja o perfil do criador original do objeto destacado"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_inventory.xml b/indra/newview/skins/default/xui/pt/floater_inventory.xml
index b2ae813e6f..8a06fefe3c 100644
--- a/indra/newview/skins/default/xui/pt/floater_inventory.xml
+++ b/indra/newview/skins/default/xui/pt/floater_inventory.xml
@@ -1,47 +1,47 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Inventory" title="Inventário">
-	<search_editor label="Escreva aqui para busca" name="inventory search editor"/>
-	<tab_container name="inventory filter tabs">
-		<inventory_panel label="Todos os Itens" name="All Items"/>
-		<inventory_panel label="Itens Recentes" name="Recent Items"/>
-	</tab_container>
-	<menu_bar name="Inventory Menu">
-		<menu label="Arquivo" name="File">
-			<menu_item_call label="Abrir" name="Open"/>
-			<menu_item_call label="Nova Janela" name="New Window"/>
-			<menu_item_call label="Mostrar Filtros" name="Show Filters"/>
-			<menu_item_call label="Redefinir Filtros" name="Reset Current"/>
-			<menu_item_call label="Fechar Todas as Pastas" name="Close All Folders"/>
-			<menu_item_call label="Limpar Lixeira" name="Empty Trash"/>
-		</menu>
-		<menu label="Criar" name="Create">
-			<menu_item_call label="Nova Pasta" name="New Folder"/>
-			<menu_item_call label="Novo Script" name="New Script"/>
-			<menu_item_call label="Nova Nota" name="New Note"/>
-			<menu_item_call label="Novo Gesto" name="New Gesture"/>
-			<menu label="Nova Roupa" name="New Clothes">
-				<menu_item_call label="Nova Camisa" name="New Shirt"/>
-				<menu_item_call label="Nova Calça" name="New Pants"/>
-				<menu_item_call label="Novos Sapatos" name="New Shoes"/>
-				<menu_item_call label="Novas Meias" name="New Socks"/>
-				<menu_item_call label="Nova Jaqueta" name="New Jacket"/>
-				<menu_item_call label="Nova Saia" name="New Skirt"/>
-				<menu_item_call label="Novas Luvas" name="New Gloves"/>
-				<menu_item_call label="Nova Anágua" name="New Undershirt"/>
-				<menu_item_call label="Novas Roupas de Baixo" name="New Underpants"/>
-			</menu>
-			<menu label="Parte do corpo" name="New Body Parts">
-				<menu_item_call label="Nova Forma" name="New Shape"/>
-				<menu_item_call label="Nova Pele" name="New Skin"/>
-				<menu_item_call label="Novo Cabelo" name="New Hair"/>
-				<menu_item_call label="Novos Olhos" name="New Eyes"/>
-			</menu>
-		</menu>
-		<menu label="Ordenar" name="Sort">
-			<menu_item_check label="Por Nome" name="By Name"/>
-			<menu_item_check label="Por Data" name="By Date"/>
-			<menu_item_check label="Pastas Sempre por Nome" name="Folders Always By Name"/>
-			<menu_item_check label="Pastas do sistema primeiro" name="System Folders To Top"/>
-		</menu>
-	</menu_bar>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Inventory" title="Inventário">
+	<search_editor label="Escreva aqui para busca" name="inventory search editor"/>
+	<tab_container name="inventory filter tabs">
+		<inventory_panel label="Todos os Itens" name="All Items"/>
+		<inventory_panel label="Itens Recentes" name="Recent Items"/>
+	</tab_container>
+	<menu_bar name="Inventory Menu">
+		<menu label="Arquivo" name="File">
+			<menu_item_call label="Abrir" name="Open"/>
+			<menu_item_call label="Nova Janela" name="New Window"/>
+			<menu_item_call label="Mostrar Filtros" name="Show Filters"/>
+			<menu_item_call label="Redefinir Filtros" name="Reset Current"/>
+			<menu_item_call label="Fechar Todas as Pastas" name="Close All Folders"/>
+			<menu_item_call label="Limpar Lixeira" name="Empty Trash"/>
+		</menu>
+		<menu label="Criar" name="Create">
+			<menu_item_call label="Nova Pasta" name="New Folder"/>
+			<menu_item_call label="Novo Script" name="New Script"/>
+			<menu_item_call label="Nova Nota" name="New Note"/>
+			<menu_item_call label="Novo Gesto" name="New Gesture"/>
+			<menu label="Nova Roupa" name="New Clothes">
+				<menu_item_call label="Nova Camisa" name="New Shirt"/>
+				<menu_item_call label="Nova Calça" name="New Pants"/>
+				<menu_item_call label="Novos Sapatos" name="New Shoes"/>
+				<menu_item_call label="Novas Meias" name="New Socks"/>
+				<menu_item_call label="Nova Jaqueta" name="New Jacket"/>
+				<menu_item_call label="Nova Saia" name="New Skirt"/>
+				<menu_item_call label="Novas Luvas" name="New Gloves"/>
+				<menu_item_call label="Nova Anágua" name="New Undershirt"/>
+				<menu_item_call label="Novas Roupas de Baixo" name="New Underpants"/>
+			</menu>
+			<menu label="Parte do corpo" name="New Body Parts">
+				<menu_item_call label="Nova Forma" name="New Shape"/>
+				<menu_item_call label="Nova Pele" name="New Skin"/>
+				<menu_item_call label="Novo Cabelo" name="New Hair"/>
+				<menu_item_call label="Novos Olhos" name="New Eyes"/>
+			</menu>
+		</menu>
+		<menu label="Ordenar" name="Sort">
+			<menu_item_check label="Por Nome" name="By Name"/>
+			<menu_item_check label="Por Data" name="By Date"/>
+			<menu_item_check label="Pastas Sempre por Nome" name="Folders Always By Name"/>
+			<menu_item_check label="Pastas do sistema primeiro" name="System Folders To Top"/>
+		</menu>
+	</menu_bar>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml
index 4c24ef5d1b..3711a4c871 100644
--- a/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml
@@ -1,85 +1,85 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="item properties" title="Propriedades do Item de Inventário">
-	<text name="LabelItemNameTitle">
-		Nome:
-	</text>
-	<text name="LabelItemDescTitle">
-		Descrição:
-	</text>
-	<text name="LabelCreatorTitle">
-		Criador:
-	</text>
-	<text name="LabelCreatorName">
-		Nicole Linden
-	</text>
-	<button label="Perfil..." label_selected="" name="BtnCreator"/>
-	<text name="LabelOwnerTitle">
-		Dono:
-	</text>
-	<text name="LabelOwnerName">
-		Thrax Linden
-	</text>
-	<button label="Perfil..." label_selected="" name="BtnOwner"/>
-	<text name="LabelAcquiredTitle">
-		Adquirido:
-	</text>
-	<text name="LabelAcquiredDate">
-		Qua Mai 24 12:50:46 2006
-	</text>
-	<text name="OwnerLabel">
-		Você pode:
-	</text>
-	<check_box label="Modificar" name="CheckOwnerModify"/>
-	<check_box label="Copiar" name="CheckOwnerCopy"/>
-	<check_box label="Revender/Doar" name="CheckOwnerTransfer"/>
-	<text name="BaseMaskDebug">
-		B:
-	</text>
-	<text name="OwnerMaskDebug">
-		O:
-	</text>
-	<text name="GroupMaskDebug">
-		G:
-	</text>
-	<text name="EveryoneMaskDebug">
-		E:
-	</text>
-	<text name="NextMaskDebug">
-		N:
-	</text>
-	<check_box label="Compartilhar com o grupo" name="CheckShareWithGroup"/>
-	<check_box label="Permitir qualquer um copiar" name="CheckEveryoneCopy"/>
-	<text name="NextOwnerLabel">
-		Próximo dono pode:
-	</text>
-	<check_box label="Modificar" name="CheckNextOwnerModify"/>
-	<check_box label="Copiar" name="CheckNextOwnerCopy"/>
-	<check_box label="Revender/Doar" name="CheckNextOwnerTransfer"/>
-	<text name="SaleLabel">
-		Marcar Item:
-	</text>
-	<check_box label="À venda" name="CheckPurchase"/>
-	<radio_group name="RadioSaleType">
-		<radio_item name="radio">
-			Original
-		</radio_item>
-		<radio_item name="radio2">
-			Cópia
-		</radio_item>
-	</radio_group>
-	<text name="TextPrice">
-		Price:  L$
-	</text>
-	<string name="unknown">
-		(desconhecido)
-	</string>
-	<string name="public">
-		(público)
-	</string>
-	<string name="you_can">
-		Você pode:
-	</string>
-	<string name="owner_can">
-		Proprietário pode :
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="item properties" title="Propriedades do Item de Inventário">
+	<text name="LabelItemNameTitle">
+		Nome:
+	</text>
+	<text name="LabelItemDescTitle">
+		Descrição:
+	</text>
+	<text name="LabelCreatorTitle">
+		Criador:
+	</text>
+	<text name="LabelCreatorName">
+		Nicole Linden
+	</text>
+	<button label="Perfil..." label_selected="" name="BtnCreator"/>
+	<text name="LabelOwnerTitle">
+		Dono:
+	</text>
+	<text name="LabelOwnerName">
+		Thrax Linden
+	</text>
+	<button label="Perfil..." label_selected="" name="BtnOwner"/>
+	<text name="LabelAcquiredTitle">
+		Adquirido:
+	</text>
+	<text name="LabelAcquiredDate">
+		Qua Mai 24 12:50:46 2006
+	</text>
+	<text name="OwnerLabel">
+		Você pode:
+	</text>
+	<check_box label="Modificar" name="CheckOwnerModify"/>
+	<check_box label="Copiar" name="CheckOwnerCopy"/>
+	<check_box label="Revender/Doar" name="CheckOwnerTransfer"/>
+	<text name="BaseMaskDebug">
+		B:
+	</text>
+	<text name="OwnerMaskDebug">
+		O:
+	</text>
+	<text name="GroupMaskDebug">
+		G:
+	</text>
+	<text name="EveryoneMaskDebug">
+		E:
+	</text>
+	<text name="NextMaskDebug">
+		N:
+	</text>
+	<check_box label="Compartilhar com o grupo" name="CheckShareWithGroup"/>
+	<check_box label="Permitir qualquer um copiar" name="CheckEveryoneCopy"/>
+	<text name="NextOwnerLabel">
+		Próximo dono pode:
+	</text>
+	<check_box label="Modificar" name="CheckNextOwnerModify"/>
+	<check_box label="Copiar" name="CheckNextOwnerCopy"/>
+	<check_box label="Revender/Doar" name="CheckNextOwnerTransfer"/>
+	<text name="SaleLabel">
+		Marcar Item:
+	</text>
+	<check_box label="À venda" name="CheckPurchase"/>
+	<radio_group name="RadioSaleType">
+		<radio_item name="radio">
+			Original
+		</radio_item>
+		<radio_item name="radio2">
+			Cópia
+		</radio_item>
+	</radio_group>
+	<text name="TextPrice">
+		Price:  L$
+	</text>
+	<string name="unknown">
+		(desconhecido)
+	</string>
+	<string name="public">
+		(público)
+	</string>
+	<string name="you_can">
+		Você pode:
+	</string>
+	<string name="owner_can">
+		Proprietário pode :
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml
index d2340de471..634e236650 100644
--- a/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml
@@ -1,24 +1,24 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Inventory Finder" title="itens_de_inventário_recentes">
-	<check_box label="Animação" name="check_animation"/>
-	<check_box label="Cartões de chamadas" name="check_calling_card"/>
-	<check_box label="Roupas" name="check_clothing"/>
-	<check_box label="Gestos" name="check_gesture"/>
-	<check_box label="Landmarks" name="check_landmark"/>
-	<check_box label="Anotações" name="check_notecard"/>
-	<check_box label="Objetos" name="check_object"/>
-	<check_box label="Scripts" name="check_script"/>
-	<check_box label="Sons" name="check_sound"/>
-	<check_box label="Texturas" name="check_texture"/>
-	<check_box label="Fotos" name="check_snapshot"/>
-	<button label="Tudo" label_selected="Tudo" name="All"/>
-	<button label="Nenhum" label_selected="Nenhum" name="None"/>
-	<check_box label="Sempre mostrar as pastas" name="check_show_empty"/>
-	<check_box label="Desde o Logoff" name="check_since_logoff"/>
-	<text length="1" name="- OR -" type="string">
-		- OU -
-	</text>
-	<spinner label="Horas Atrás" name="spin_hours_ago"/>
-	<spinner label="Dias Atrás" name="spin_days_ago"/>
-	<button label="Fechar" label_selected="Fechar" name="Close"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Inventory Finder" title="itens_de_inventário_recentes">
+	<check_box label="Animação" name="check_animation"/>
+	<check_box label="Cartões de chamadas" name="check_calling_card"/>
+	<check_box label="Roupas" name="check_clothing"/>
+	<check_box label="Gestos" name="check_gesture"/>
+	<check_box label="Landmarks" name="check_landmark"/>
+	<check_box label="Anotações" name="check_notecard"/>
+	<check_box label="Objetos" name="check_object"/>
+	<check_box label="Scripts" name="check_script"/>
+	<check_box label="Sons" name="check_sound"/>
+	<check_box label="Texturas" name="check_texture"/>
+	<check_box label="Fotos" name="check_snapshot"/>
+	<button label="Tudo" label_selected="Tudo" name="All"/>
+	<button label="Nenhum" label_selected="Nenhum" name="None"/>
+	<check_box label="Sempre mostrar as pastas" name="check_show_empty"/>
+	<check_box label="Desde o Logoff" name="check_since_logoff"/>
+	<text length="1" name="- OR -" type="string">
+		- OU -
+	</text>
+	<spinner label="Horas Atrás" name="spin_hours_ago"/>
+	<spinner label="Dias Atrás" name="spin_days_ago"/>
+	<button label="Fechar" label_selected="Fechar" name="Close"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_joystick.xml b/indra/newview/skins/default/xui/pt/floater_joystick.xml
index eee08c1ade..90faa6bd05 100644
--- a/indra/newview/skins/default/xui/pt/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/pt/floater_joystick.xml
@@ -1,83 +1,83 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Joystick" title="Configuração do Joystick">
-	<check_box name="enable_joystick">
-		Habilitar Joystick:
-	</check_box>
-	<spinner label="Mapeamento do eixo X" name="JoystickAxis1"/>
-	<spinner label="Mapeamento do eixo Y" name="JoystickAxis2"/>
-	<spinner label="Mapeamento do Eixo Z" name="JoystickAxis0"/>
-	<spinner label="Mapeamento da Elevação" name="JoystickAxis4"/>
-	<spinner label="Mapeamento da Guinada" name="JoystickAxis5"/>
-	<spinner label="Mapeamento da Rolagem" name="JoystickAxis3"/>
-	<spinner label="Mapeamento do Zoom" name="JoystickAxis6"/>
-	<check_box label="Zoom Direto" name="ZoomDirect"/>
-	<check_box label="Cursor 3D" name="Cursor3D"/>
-	<check_box label="Nível Automático" name="AutoLeveling"/>
-	<text name="Control Modes:">
-		Modos de Controle:
-	</text>
-	<check_box name="JoystickAvatarEnabled">
-		Avatar
-	</check_box>
-	<check_box name="JoystickBuildEnabled">
-		Construir
-	</check_box>
-	<check_box name="JoystickFlycamEnabled">
-		Camera aérea
-	</check_box>
-	<text name="XScale">
-		Escala X
-	</text>
-	<text name="YScale">
-		Escala Y
-	</text>
-	<text name="ZScale">
-		Escala Z
-	</text>
-	<text name="PitchScale">
-		Escala de Elevação
-	</text>
-	<text name="YawScale">
-		Escala da Guinada
-	</text>
-	<text name="RollScale">
-		Escala de Rolagem
-	</text>
-	<text name="XDeadZone">
-		Zona Morta X
-	</text>
-	<text name="YDeadZone">
-		Zona Morta Y
-	</text>
-	<text name="ZDeadZone">
-		Zona Morta Z
-	</text>
-	<text name="PitchDeadZone">
-		Zona Morta da Elevação
-	</text>
-	<text name="YawDeadZone">
-		Zona Morta da Guinada
-	</text>
-	<text name="RollDeadZone">
-		Zona Morta de Rolagem
-	</text>
-	<text name="Feathering">
-		Alisar
-	</text>
-	<text name="ZoomScale2">
-		Escala de Zoom
-	</text>
-	<text name="ZoomDeadZone">
-		Zona Morta de Zoom
-	</text>
-	<button label="Padrões do Navegador Espacial" name="SpaceNavigatorDefaults"/>
-	<string name="JoystickMonitor">
-		Monitor do Joystick
-	</string>
-	<string name="Axis">
-		Eixo [NUM]
-	</string>
-	<string name="NoDevice">
-		nenhum dispositivo detectado
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Joystick" title="Configuração do Joystick">
+	<check_box name="enable_joystick">
+		Habilitar Joystick:
+	</check_box>
+	<spinner label="Mapeamento do eixo X" name="JoystickAxis1"/>
+	<spinner label="Mapeamento do eixo Y" name="JoystickAxis2"/>
+	<spinner label="Mapeamento do Eixo Z" name="JoystickAxis0"/>
+	<spinner label="Mapeamento da Elevação" name="JoystickAxis4"/>
+	<spinner label="Mapeamento da Guinada" name="JoystickAxis5"/>
+	<spinner label="Mapeamento da Rolagem" name="JoystickAxis3"/>
+	<spinner label="Mapeamento do Zoom" name="JoystickAxis6"/>
+	<check_box label="Zoom Direto" name="ZoomDirect"/>
+	<check_box label="Cursor 3D" name="Cursor3D"/>
+	<check_box label="Nível Automático" name="AutoLeveling"/>
+	<text name="Control Modes:">
+		Modos de Controle:
+	</text>
+	<check_box name="JoystickAvatarEnabled">
+		Avatar
+	</check_box>
+	<check_box name="JoystickBuildEnabled">
+		Construir
+	</check_box>
+	<check_box name="JoystickFlycamEnabled">
+		Camera aérea
+	</check_box>
+	<text name="XScale">
+		Escala X
+	</text>
+	<text name="YScale">
+		Escala Y
+	</text>
+	<text name="ZScale">
+		Escala Z
+	</text>
+	<text name="PitchScale">
+		Escala de Elevação
+	</text>
+	<text name="YawScale">
+		Escala da Guinada
+	</text>
+	<text name="RollScale">
+		Escala de Rolagem
+	</text>
+	<text name="XDeadZone">
+		Zona Morta X
+	</text>
+	<text name="YDeadZone">
+		Zona Morta Y
+	</text>
+	<text name="ZDeadZone">
+		Zona Morta Z
+	</text>
+	<text name="PitchDeadZone">
+		Zona Morta da Elevação
+	</text>
+	<text name="YawDeadZone">
+		Zona Morta da Guinada
+	</text>
+	<text name="RollDeadZone">
+		Zona Morta de Rolagem
+	</text>
+	<text name="Feathering">
+		Alisar
+	</text>
+	<text name="ZoomScale2">
+		Escala de Zoom
+	</text>
+	<text name="ZoomDeadZone">
+		Zona Morta de Zoom
+	</text>
+	<button label="Padrões do Navegador Espacial" name="SpaceNavigatorDefaults"/>
+	<string name="JoystickMonitor">
+		Monitor do Joystick
+	</string>
+	<string name="Axis">
+		Eixo [NUM]
+	</string>
+	<string name="NoDevice">
+		nenhum dispositivo detectado
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_lagmeter.xml b/indra/newview/skins/default/xui/pt/floater_lagmeter.xml
index 901e58efce..9dbad7099e 100644
--- a/indra/newview/skins/default/xui/pt/floater_lagmeter.xml
+++ b/indra/newview/skins/default/xui/pt/floater_lagmeter.xml
@@ -1,152 +1,152 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="Medidor de Atraso">
-	<button label="" label_selected="" name="client_lagmeter" tool_tip="Status de atraso no Cliente"/>
-	<text name="client">
-		Cliente:
-	</text>
-	<text name="client_text">
-		Normal
-	</text>
-	<button label="" label_selected="" name="network_lagmeter" tool_tip="Status de atraso na rede"/>
-	<text name="network">
-		Rede:
-	</text>
-	<text name="network_text">
-		Normal
-	</text>
-	<button label="" label_selected="" name="server_lagmeter" tool_tip="Status de atraso no servidor"/>
-	<text name="server">
-		Servidor:
-	</text>
-	<text name="server_text">
-		Normal
-	</text>
-	<button label="?" name="server_help"/>
-	<button label="&gt;&gt;" name="minimize"/>
-	<string name="max_title_msg">
-		Medidor de Atraso
-	</string>
-	<string name="max_width_px">
-		360
-	</string>
-	<string name="min_title_msg">
-		Atraso
-	</string>
-	<string name="min_width_px">
-		90
-	</string>
-	<string name="client_text_msg">
-		Cliente
-	</string>
-	<string name="client_frame_rate_critical_fps">
-		10
-	</string>
-	<string name="client_frame_rate_warning_fps">
-		15
-	</string>
-	<string name="client_frame_time_window_bg_msg">
-		Normal, janela por baixo
-	</string>
-	<string name="client_frame_time_critical_msg">
-		Taxa de quadros do Cliente abaixo de [CLIENT_FRAME_RATE_CRITICAL]
-	</string>
-	<string name="client_frame_time_warning_msg">
-		Taxa de quadros do Cliente entre [CLIENT_FRAME_RATE_CRITICAL] e [CLIENT_FRAME_RATE_WARNING]
-	</string>
-	<string name="client_frame_time_normal_msg">
-		Normal
-	</string>
-	<string name="client_draw_distance_cause_msg">
-		Causa possível: Distância de desenho ajustada muito alta
-	</string>
-	<string name="client_texture_loading_cause_msg">
-		Causa possível: Carregamento de Imagens
-	</string>
-	<string name="client_texture_memory_cause_msg">
-		Causa possível: Muitas imagens na memória
-	</string>
-	<string name="client_complex_objects_cause_msg">
-		Causa possível: Muitos objetos complexos na cena
-	</string>
-	<string name="network_text_msg">
-		Rede
-	</string>
-	<string name="network_packet_loss_critical_pct">
-		10
-	</string>
-	<string name="network_packet_loss_warning_pct">
-		5
-	</string>
-	<string name="network_packet_loss_critical_msg">
-		Conexão está caindo para cerca de [NETWORK_PACKET_LOSS_CRITICAL]% de pacotes
-	</string>
-	<string name="network_packet_loss_warning_msg">
-		Conexão está caindo [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% de pacotes
-	</string>
-	<string name="network_performance_normal_msg">
-		Normal
-	</string>
-	<string name="network_ping_critical_ms">
-		600
-	</string>
-	<string name="network_ping_warning_ms">
-		300
-	</string>
-	<string name="network_ping_critical_msg">
-		Tempo de conexão de ping é cerca de  [NETWORK_PING_CRITICAL] ms
-	</string>
-	<string name="network_ping_warning_msg">
-		Tempo de conexão de ping é [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
-	</string>
-	<string name="network_packet_loss_cause_msg">
-		Possível conexão ruim ou &apos;Largura de Banda&apos; escolhida muito alta.
-	</string>
-	<string name="network_ping_cause_msg">
-		Possível conexão ruim ou aplicativos compartilhando arquivos.
-	</string>
-	<string name="server_text_msg">
-		Servidor
-	</string>
-	<string name="server_frame_rate_critical_fps">
-		20
-	</string>
-	<string name="server_frame_rate_warning_fps">
-		30
-	</string>
-	<string name="server_single_process_max_time_ms">
-		20
-	</string>
-	<string name="server_frame_time_critical_msg">
-		Taxa de quadros do simulador abaixo de  [SERVER_FRAME_RATE_CRITICAL]
-	</string>
-	<string name="server_frame_time_warning_msg">
-		Taxa de quadros do simulador entre [SERVER_FRAME_RATE_CRITICAL] e [SERVER_FRAME_RATE_WARNING]
-	</string>
-	<string name="server_frame_time_normal_msg">
-		Normal
-	</string>
-	<string name="server_physics_cause_msg">
-		Causa possível: Muitos objetos físicos
-	</string>
-	<string name="server_scripts_cause_msg">
-		Causa possível: Muitos objetos com scripts
-	</string>
-	<string name="server_net_cause_msg">
-		Causa possível: Muito tráfego na rede
-	</string>
-	<string name="server_agent_cause_msg">
-		Causa possível: Muitas pessoas se movendo na região
-	</string>
-	<string name="server_images_cause_msg">
-		Causa possível: Muitos cálculos de imagem
-	</string>
-	<string name="server_generic_cause_msg">
-		Causa possível: Carga no simulador muito pesada
-	</string>
-	<string name="smaller_label">
-		&gt;&gt;
-	</string>
-	<string name="bigger_label">
-		&lt;&lt;
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_lagmeter" title="Medidor de Atraso">
+	<button label="" label_selected="" name="client_lagmeter" tool_tip="Status de atraso no Cliente"/>
+	<text name="client">
+		Cliente:
+	</text>
+	<text name="client_text">
+		Normal
+	</text>
+	<button label="" label_selected="" name="network_lagmeter" tool_tip="Status de atraso na rede"/>
+	<text name="network">
+		Rede:
+	</text>
+	<text name="network_text">
+		Normal
+	</text>
+	<button label="" label_selected="" name="server_lagmeter" tool_tip="Status de atraso no servidor"/>
+	<text name="server">
+		Servidor:
+	</text>
+	<text name="server_text">
+		Normal
+	</text>
+	<button label="?" name="server_help"/>
+	<button label="&gt;&gt;" name="minimize"/>
+	<string name="max_title_msg">
+		Medidor de Atraso
+	</string>
+	<string name="max_width_px">
+		360
+	</string>
+	<string name="min_title_msg">
+		Atraso
+	</string>
+	<string name="min_width_px">
+		90
+	</string>
+	<string name="client_text_msg">
+		Cliente
+	</string>
+	<string name="client_frame_rate_critical_fps">
+		10
+	</string>
+	<string name="client_frame_rate_warning_fps">
+		15
+	</string>
+	<string name="client_frame_time_window_bg_msg">
+		Normal, janela por baixo
+	</string>
+	<string name="client_frame_time_critical_msg">
+		Taxa de quadros do Cliente abaixo de [CLIENT_FRAME_RATE_CRITICAL]
+	</string>
+	<string name="client_frame_time_warning_msg">
+		Taxa de quadros do Cliente entre [CLIENT_FRAME_RATE_CRITICAL] e [CLIENT_FRAME_RATE_WARNING]
+	</string>
+	<string name="client_frame_time_normal_msg">
+		Normal
+	</string>
+	<string name="client_draw_distance_cause_msg">
+		Causa possível: Distância de desenho ajustada muito alta
+	</string>
+	<string name="client_texture_loading_cause_msg">
+		Causa possível: Carregamento de Imagens
+	</string>
+	<string name="client_texture_memory_cause_msg">
+		Causa possível: Muitas imagens na memória
+	</string>
+	<string name="client_complex_objects_cause_msg">
+		Causa possível: Muitos objetos complexos na cena
+	</string>
+	<string name="network_text_msg">
+		Rede
+	</string>
+	<string name="network_packet_loss_critical_pct">
+		10
+	</string>
+	<string name="network_packet_loss_warning_pct">
+		5
+	</string>
+	<string name="network_packet_loss_critical_msg">
+		Conexão está caindo para cerca de [NETWORK_PACKET_LOSS_CRITICAL]% de pacotes
+	</string>
+	<string name="network_packet_loss_warning_msg">
+		Conexão está caindo [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% de pacotes
+	</string>
+	<string name="network_performance_normal_msg">
+		Normal
+	</string>
+	<string name="network_ping_critical_ms">
+		600
+	</string>
+	<string name="network_ping_warning_ms">
+		300
+	</string>
+	<string name="network_ping_critical_msg">
+		Tempo de conexão de ping é cerca de  [NETWORK_PING_CRITICAL] ms
+	</string>
+	<string name="network_ping_warning_msg">
+		Tempo de conexão de ping é [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
+	</string>
+	<string name="network_packet_loss_cause_msg">
+		Possível conexão ruim ou &apos;Largura de Banda&apos; escolhida muito alta.
+	</string>
+	<string name="network_ping_cause_msg">
+		Possível conexão ruim ou aplicativos compartilhando arquivos.
+	</string>
+	<string name="server_text_msg">
+		Servidor
+	</string>
+	<string name="server_frame_rate_critical_fps">
+		20
+	</string>
+	<string name="server_frame_rate_warning_fps">
+		30
+	</string>
+	<string name="server_single_process_max_time_ms">
+		20
+	</string>
+	<string name="server_frame_time_critical_msg">
+		Taxa de quadros do simulador abaixo de  [SERVER_FRAME_RATE_CRITICAL]
+	</string>
+	<string name="server_frame_time_warning_msg">
+		Taxa de quadros do simulador entre [SERVER_FRAME_RATE_CRITICAL] e [SERVER_FRAME_RATE_WARNING]
+	</string>
+	<string name="server_frame_time_normal_msg">
+		Normal
+	</string>
+	<string name="server_physics_cause_msg">
+		Causa possível: Muitos objetos físicos
+	</string>
+	<string name="server_scripts_cause_msg">
+		Causa possível: Muitos objetos com scripts
+	</string>
+	<string name="server_net_cause_msg">
+		Causa possível: Muito tráfego na rede
+	</string>
+	<string name="server_agent_cause_msg">
+		Causa possível: Muitas pessoas se movendo na região
+	</string>
+	<string name="server_images_cause_msg">
+		Causa possível: Muitos cálculos de imagem
+	</string>
+	<string name="server_generic_cause_msg">
+		Causa possível: Carga no simulador muito pesada
+	</string>
+	<string name="smaller_label">
+		&gt;&gt;
+	</string>
+	<string name="bigger_label">
+		&lt;&lt;
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_land_holdings.xml b/indra/newview/skins/default/xui/pt/floater_land_holdings.xml
index 0a880b3ec2..848ab2ed2a 100644
--- a/indra/newview/skins/default/xui/pt/floater_land_holdings.xml
+++ b/indra/newview/skins/default/xui/pt/floater_land_holdings.xml
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="land holdings floater" title="Meu terreno">
-	<scroll_list name="parcel list">
-		<column label="Nome" name="name"/>
-		<column label="Localização" name="location"/>
-		<column label="Área" name="area"/>
-	</scroll_list>
-	<button label="Teletransporte" label_selected="Teletransporte" name="Teleport" tool_tip="Teletransportar para o centro do terreno."/>
-	<button label="Mostrar no mapa" label_selected="Mostrar no mapa" name="Show on Map" tool_tip="Mostrar esse terreno no mapa do mundo."/>
-	<text name="contrib_label">
-		Contribuições para os seus grupos:
-	</text>
-	<scroll_list name="grant list">
-		<column label="Grupo" name="group"/>
-		<column label="Área" name="area"/>
-	</scroll_list>
-	<text name="allowed_label">
-		Propriedades de terreno permitidas com o plano de pagamento atual:
-	</text>
-	<text name="allowed_text">
-		[AREA] m²
-	</text>
-	<text name="current_label">
-		Propriedades de terrenos atuais:
-	</text>
-	<text name="current_text">
-		[AREA] m²
-	</text>
-	<text name="available_label">
-		Disponível para compra de terras:
-	</text>
-	<text name="available_text">
-		[AREA] m²
-	</text>
-	<string name="area_string">
-		[AREA] m²
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="land holdings floater" title="Meu terreno">
+	<scroll_list name="parcel list">
+		<column label="Nome" name="name"/>
+		<column label="Localização" name="location"/>
+		<column label="Área" name="area"/>
+	</scroll_list>
+	<button label="Teletransporte" label_selected="Teletransporte" name="Teleport" tool_tip="Teletransportar para o centro do terreno."/>
+	<button label="Mostrar no mapa" label_selected="Mostrar no mapa" name="Show on Map" tool_tip="Mostrar esse terreno no mapa do mundo."/>
+	<text name="contrib_label">
+		Contribuições para os seus grupos:
+	</text>
+	<scroll_list name="grant list">
+		<column label="Grupo" name="group"/>
+		<column label="Área" name="area"/>
+	</scroll_list>
+	<text name="allowed_label">
+		Propriedades de terreno permitidas com o plano de pagamento atual:
+	</text>
+	<text name="allowed_text">
+		[AREA] m²
+	</text>
+	<text name="current_label">
+		Propriedades de terrenos atuais:
+	</text>
+	<text name="current_text">
+		[AREA] m²
+	</text>
+	<text name="available_label">
+		Disponível para compra de terras:
+	</text>
+	<text name="available_text">
+		[AREA] m²
+	</text>
+	<string name="area_string">
+		[AREA] m²
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/pt/floater_live_lsleditor.xml
index 5bf9b6ffdb..af45fa5873 100644
--- a/indra/newview/skins/default/xui/pt/floater_live_lsleditor.xml
+++ b/indra/newview/skins/default/xui/pt/floater_live_lsleditor.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="script ed float" title="Script: Novo Script">
-	<button label="Resetar" label_selected="Resetar" name="Reset"/>
-	<check_box label="Correndo" name="running"/>
-	<check_box label="Mono" name="mono"/>
-	<string name="not_allowed">
-		Você não tem permissão para visualizar este script.
-	</string>
-	<string name="script_running">
-		Executando
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="script ed float" title="Script: Novo Script">
+	<button label="Resetar" label_selected="Resetar" name="Reset"/>
+	<check_box label="Correndo" name="running"/>
+	<check_box label="Mono" name="mono"/>
+	<string name="not_allowed">
+		Você não tem permissão para visualizar este script.
+	</string>
+	<string name="script_running">
+		Executando
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_lsl_guide.xml b/indra/newview/skins/default/xui/pt/floater_lsl_guide.xml
index b13af3b21b..e7e4a22937 100644
--- a/indra/newview/skins/default/xui/pt/floater_lsl_guide.xml
+++ b/indra/newview/skins/default/xui/pt/floater_lsl_guide.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="script ed float" title="LSL Wiki">
-	<check_box label="Seguir o Cursor" name="lock_check" />
-	<combo_box label="Bloquear" name="history_combo" />
-	<button label="Anterior" name="back_btn" />
-	<button label="Posterior" name="fwd_btn" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="script ed float" title="LSL Wiki">
+	<check_box label="Seguir o Cursor" name="lock_check" />
+	<combo_box label="Bloquear" name="history_combo" />
+	<button label="Anterior" name="back_btn" />
+	<button label="Posterior" name="fwd_btn" />
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_media_browser.xml b/indra/newview/skins/default/xui/pt/floater_media_browser.xml
index dcdb2b9e09..cfaec5b410 100644
--- a/indra/newview/skins/default/xui/pt/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/pt/floater_media_browser.xml
@@ -1,20 +1,20 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater min_width="477" name="floater_about" title="Navegador de Mídia" width="570">
-	<layout_stack name="stack1" width="550">
-		<layout_panel name="nav_controls">
-			<button label="Para trás" name="back" width="75"/>
-			<button label="Para a frente" left_delta="75" name="forward" width="90"/>
-			<button label="Recarregar" left_delta="95" name="reload" width="76"/>
-			<combo_box left_delta="80" name="address" width="500"/>
-			<button label="Ir" left_delta="505" name="go" width="35"/>
-		</layout_panel>
-		<layout_panel name="parcel_owner_controls">
-			<button label="Enviar a URL atual para o terreno" name="assign"/>
-		</layout_panel>
-		<layout_panel name="external_controls">
-			<button label="Abrir no meu Navegador de Web" name="open_browser" width="196"/>
-			<check_box label="Sempre abrir no meu Navegador de Web" left_delta="201" name="open_always"/>
-			<button label="Fechar" name="close"/>
-		</layout_panel>
-	</layout_stack>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater min_width="477" name="floater_about" title="Navegador de Mídia" width="570">
+	<layout_stack name="stack1" width="550">
+		<layout_panel name="nav_controls">
+			<button label="Para trás" name="back" width="75"/>
+			<button label="Para a frente" left_delta="75" name="forward" width="90"/>
+			<button label="Recarregar" left_delta="95" name="reload" width="76"/>
+			<combo_box left_delta="80" name="address" width="500"/>
+			<button label="Ir" left_delta="505" name="go" width="35"/>
+		</layout_panel>
+		<layout_panel name="parcel_owner_controls">
+			<button label="Enviar a URL atual para o terreno" name="assign"/>
+		</layout_panel>
+		<layout_panel name="external_controls">
+			<button label="Abrir no meu Navegador de Web" name="open_browser" width="196"/>
+			<check_box label="Sempre abrir no meu Navegador de Web" left_delta="201" name="open_always"/>
+			<button label="Fechar" name="close"/>
+		</layout_panel>
+	</layout_stack>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_mem_leaking.xml b/indra/newview/skins/default/xui/pt/floater_mem_leaking.xml
index 83f47fd679..374592f0e2 100644
--- a/indra/newview/skins/default/xui/pt/floater_mem_leaking.xml
+++ b/indra/newview/skins/default/xui/pt/floater_mem_leaking.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="MemLeak" title="Simulação de Perda de Memória">
-	<spinner label="Velocidade da Perda (bytes por quadro):" name="leak_speed"/>
-	<spinner label="Máximo de Memória Perdida (MB):" name="max_leak"/>
-	<text name="total_leaked_label">
-		Memória perdida atualmente: [SIZE] KB
-	</text>
-	<button label="Iniciar" name="start_btn"/>
-	<button label="Parar" name="stop_btn"/>
-	<button label="Liberar" name="release_btn"/>
-	<button label="Fechar" name="close_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="MemLeak" title="Simulação de Perda de Memória">
+	<spinner label="Velocidade da Perda (bytes por quadro):" name="leak_speed"/>
+	<spinner label="Máximo de Memória Perdida (MB):" name="max_leak"/>
+	<text name="total_leaked_label">
+		Memória perdida atualmente: [SIZE] KB
+	</text>
+	<button label="Iniciar" name="start_btn"/>
+	<button label="Parar" name="stop_btn"/>
+	<button label="Liberar" name="release_btn"/>
+	<button label="Fechar" name="close_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_moveview.xml b/indra/newview/skins/default/xui/pt/floater_moveview.xml
index 46be67395d..fde1c16454 100644
--- a/indra/newview/skins/default/xui/pt/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/pt/floater_moveview.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="move floater" title="">
-	<button label="" label_selected="" name="turn left btn" tool_tip="Virar à esquerda"/>
-	<button label="" label_selected="" name="turn right btn" tool_tip="Virar à direita"/>
-	<button label="" label_selected="" name="move up btn" tool_tip="Pular ou Voar"/>
-	<button label="" label_selected="" name="move down btn" tool_tip="Agaixar ou pousar"/>
-	<joystick_slide name="slide left btn" tool_tip="Mover para a esquerda"/>
-	<joystick_slide name="slide right btn" tool_tip="Mover para a direita"/>
-	<joystick_turn name="forward btn" tool_tip="Mover para a frente."/>
-	<joystick_turn name="backward btn" tool_tip="Mover para trás"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="move floater" title="">
+	<button label="" label_selected="" name="turn left btn" tool_tip="Virar à esquerda"/>
+	<button label="" label_selected="" name="turn right btn" tool_tip="Virar à direita"/>
+	<button label="" label_selected="" name="move up btn" tool_tip="Pular ou Voar"/>
+	<button label="" label_selected="" name="move down btn" tool_tip="Agaixar ou pousar"/>
+	<joystick_slide name="slide left btn" tool_tip="Mover para a esquerda"/>
+	<joystick_slide name="slide right btn" tool_tip="Mover para a direita"/>
+	<joystick_turn name="forward btn" tool_tip="Mover para a frente."/>
+	<joystick_turn name="backward btn" tool_tip="Mover para trás"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_mute_object.xml b/indra/newview/skins/default/xui/pt/floater_mute_object.xml
index 506d518868..32dd62c96b 100644
--- a/indra/newview/skins/default/xui/pt/floater_mute_object.xml
+++ b/indra/newview/skins/default/xui/pt/floater_mute_object.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="mute by name" title="Emudecer objeto pelo nome">
-	<text name="message">
-		Emudecer pelo nome afeta apenas conversa de objeto e MI, não sons. Você deve digitar o nome exato do objeto.
-	</text>
-	<line_editor name="object_name">
-		Nome do objeto
-	</line_editor>
-	<button label="Ok" name="OK"/>
-	<button label="Cancelar" name="Cancel"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="mute by name" title="Emudecer objeto pelo nome">
+	<text name="message">
+		Emudecer pelo nome afeta apenas conversa de objeto e MI, não sons. Você deve digitar o nome exato do objeto.
+	</text>
+	<line_editor name="object_name">
+		Nome do objeto
+	</line_editor>
+	<button label="Ok" name="OK"/>
+	<button label="Cancelar" name="Cancel"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_openobject.xml b/indra/newview/skins/default/xui/pt/floater_openobject.xml
index 6a9a566644..78fe3398be 100644
--- a/indra/newview/skins/default/xui/pt/floater_openobject.xml
+++ b/indra/newview/skins/default/xui/pt/floater_openobject.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="objectcontents" title="Conteúdo do objeto">
-	<text length="1" name="object_name" type="string">
-		[DESC]:
-	</text>
-	<button label="Copiar para Inventário" label_selected="Copiar para Inventário" name="copy_to_inventory_button" width="132"/>
-	<button label="Copiar e Vestir" label_selected="Copiar e Vestir" left="152" name="copy_and_wear_button"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="objectcontents" title="Conteúdo do objeto">
+	<text length="1" name="object_name" type="string">
+		[DESC]:
+	</text>
+	<button label="Copiar para Inventário" label_selected="Copiar para Inventário" name="copy_to_inventory_button" width="132"/>
+	<button label="Copiar e Vestir" label_selected="Copiar e Vestir" left="152" name="copy_and_wear_button"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_pay.xml b/indra/newview/skins/default/xui/pt/floater_pay.xml
index dda7015a07..6b094d07f6 100644
--- a/indra/newview/skins/default/xui/pt/floater_pay.xml
+++ b/indra/newview/skins/default/xui/pt/floater_pay.xml
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Give Money" title="">
-	<button label="L$1" label_selected="L$1" name="fastpay 1" left="112" />
-	<button label="L$5" label_selected="L$5" name="fastpay 5" />
-	<button label="L$10" label_selected="L$10" name="fastpay 10" left="112" />
-	<button label="L$20" label_selected="L$20" name="fastpay 20" />
-	<button label="Pagar" label_selected="Pagar" name="pay btn" />
-	<button label="Cancelar" label_selected="Cancelar" name="cancel btn" />
-	<text type="string" length="1" name="payee_label" width="110" left="5">
-		Pagar residente:
-	</text>
-	<text type="string" length="1" name="payee_name" left="110">
-		[FIRST] [LAST]
-	</text>
-	<text type="string" length="1" name="fastpay text" width="120" halign="left">
-		Pagamento rápido:
-	</text>
-	<text type="string" length="1" name="amount text" left="4" >
-		Quantia:
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Give Money" title="">
+	<button label="L$1" label_selected="L$1" name="fastpay 1" left="112" />
+	<button label="L$5" label_selected="L$5" name="fastpay 5" />
+	<button label="L$10" label_selected="L$10" name="fastpay 10" left="112" />
+	<button label="L$20" label_selected="L$20" name="fastpay 20" />
+	<button label="Pagar" label_selected="Pagar" name="pay btn" />
+	<button label="Cancelar" label_selected="Cancelar" name="cancel btn" />
+	<text type="string" length="1" name="payee_label" width="110" left="5">
+		Pagar residente:
+	</text>
+	<text type="string" length="1" name="payee_name" left="110">
+		[FIRST] [LAST]
+	</text>
+	<text type="string" length="1" name="fastpay text" width="120" halign="left">
+		Pagamento rápido:
+	</text>
+	<text type="string" length="1" name="amount text" left="4" >
+		Quantia:
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_pay_object.xml b/indra/newview/skins/default/xui/pt/floater_pay_object.xml
index 824e1aebdd..ad76cf805c 100644
--- a/indra/newview/skins/default/xui/pt/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/pt/floater_pay_object.xml
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="Give Money" title="">
-	<text type="string" length="1" name="payee_group" width="100" halign="left">
-		Pagar Grupo:
-	</text>
-	<text type="string" length="1" name="payee_resident" width="120" halign="left" >
-		Pagar residente:
-	</text>
-	<text type="string" length="1" name="payee_name" left="105">
-		[FIRST] [LAST]
-	</text>
-	<text type="string" length="1" name="object_name_label" left="5" width="95" halign="left">
-		Via objeto:
-	</text>
-	<text type="string" length="1" name="object_name_text" left="105" >
-		...
-	</text>
-	<text type="string" length="1" name="fastpay text" width="115" halign="left">
-		Pagamento Rápido:
-	</text>
-	<text type="string" length="1" name="amount text" left="5" halign="left">
-		Quantia:
-	</text>
-	<button label="L$1" label_selected="L$1" name="fastpay 1" left="125" width="70"/>
-	<button label="L$5" label_selected="L$5" name="fastpay 5"  left="200" width="70"/>
-	<button label="L$10" label_selected="L$10" name="fastpay 10" left="125" width="70"/>
-	<button label="L$20" label_selected="L$20" name="fastpay 20"  left="200" width="70"/>
-	<button label="Pagar" label_selected="Pagar" name="pay btn" />
-	<button label="Cancelar" label_selected="Cancelar" name="cancel btn" />
-	<line_editor left="60" name="amount" width="50" />
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="Give Money" title="">
+	<text type="string" length="1" name="payee_group" width="100" halign="left">
+		Pagar Grupo:
+	</text>
+	<text type="string" length="1" name="payee_resident" width="120" halign="left" >
+		Pagar residente:
+	</text>
+	<text type="string" length="1" name="payee_name" left="105">
+		[FIRST] [LAST]
+	</text>
+	<text type="string" length="1" name="object_name_label" left="5" width="95" halign="left">
+		Via objeto:
+	</text>
+	<text type="string" length="1" name="object_name_text" left="105" >
+		...
+	</text>
+	<text type="string" length="1" name="fastpay text" width="115" halign="left">
+		Pagamento Rápido:
+	</text>
+	<text type="string" length="1" name="amount text" left="5" halign="left">
+		Quantia:
+	</text>
+	<button label="L$1" label_selected="L$1" name="fastpay 1" left="125" width="70"/>
+	<button label="L$5" label_selected="L$5" name="fastpay 5"  left="200" width="70"/>
+	<button label="L$10" label_selected="L$10" name="fastpay 10" left="125" width="70"/>
+	<button label="L$20" label_selected="L$20" name="fastpay 20"  left="200" width="70"/>
+	<button label="Pagar" label_selected="Pagar" name="pay btn" />
+	<button label="Cancelar" label_selected="Cancelar" name="cancel btn" />
+	<line_editor left="60" name="amount" width="50" />
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_postcard.xml b/indra/newview/skins/default/xui/pt/floater_postcard.xml
index 190d7c70b9..fe90cb3165 100644
--- a/indra/newview/skins/default/xui/pt/floater_postcard.xml
+++ b/indra/newview/skins/default/xui/pt/floater_postcard.xml
@@ -1,40 +1,40 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Postcard" title="Foto por email">
-	<text name="to_label" width="135">
-		Email do Destinatário:
-	</text>
-	<line_editor name="to_form" left="143" width="127" />
-	<text name="from_label">
-		Seu Email:
-	</text>
-	<line_editor name="from_form" left="143" width="127" />
-	<text name="name_label">
-		Seu nome:
-	</text>
-	<line_editor name="name_form" left="143" width="127" />
-	<text name="subject_label">
-		Assunto:
-	</text>
-	<line_editor name="subject_form" left="143" width="127" />
-	<line_editor label="Digite seu assunto aqui." name="subject_form"/>
-	<text name="msg_label">
-		Mensagem:
-	</text>
-	<text_editor name="msg_form">
-		Digite sua mensagem aqui.
-	</text_editor>
-	<text name="fine_print">
-		Se seu indicado entrar no SL, você receberá um bônus pela indicação.
-	</text>
-	<button label="Cancelar" name="cancel_btn"/>
-	<button label="Enviar" name="send_btn"/>
-	<string name="default_subject">
-		Cartão postal do Second Life.
-	</string>
-	<string name="default_message">
-		Dá uma olhada nisto!
-	</string>
-	<string name="upload_message">
-		&quot;Enviando...&quot;
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Postcard" title="Foto por email">
+	<text name="to_label" width="135">
+		Email do Destinatário:
+	</text>
+	<line_editor name="to_form" left="143" width="127" />
+	<text name="from_label">
+		Seu Email:
+	</text>
+	<line_editor name="from_form" left="143" width="127" />
+	<text name="name_label">
+		Seu nome:
+	</text>
+	<line_editor name="name_form" left="143" width="127" />
+	<text name="subject_label">
+		Assunto:
+	</text>
+	<line_editor name="subject_form" left="143" width="127" />
+	<line_editor label="Digite seu assunto aqui." name="subject_form"/>
+	<text name="msg_label">
+		Mensagem:
+	</text>
+	<text_editor name="msg_form">
+		Digite sua mensagem aqui.
+	</text_editor>
+	<text name="fine_print">
+		Se seu indicado entrar no SL, você receberá um bônus pela indicação.
+	</text>
+	<button label="Cancelar" name="cancel_btn"/>
+	<button label="Enviar" name="send_btn"/>
+	<string name="default_subject">
+		Cartão postal do Second Life.
+	</string>
+	<string name="default_message">
+		Dá uma olhada nisto!
+	</string>
+	<string name="upload_message">
+		&quot;Enviando...&quot;
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_preferences.xml b/indra/newview/skins/default/xui/pt/floater_preferences.xml
index 716256f135..eb28e99713 100644
--- a/indra/newview/skins/default/xui/pt/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/pt/floater_preferences.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Preferences" title="Preferências">
-	<button label="OK" label_selected="OK" name="OK"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-	<button label="Aplicar" label_selected="Aplicar" name="Apply"/>
-	<button label="Sobre" label_selected="Sobre" name="About..."/>
-	<button label="Ajuda" label_selected="Ajuda" name="Help"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Preferences" title="Preferências">
+	<button label="OK" label_selected="OK" name="OK"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+	<button label="Aplicar" label_selected="Aplicar" name="Apply"/>
+	<button label="Sobre" label_selected="Sobre" name="About..."/>
+	<button label="Ajuda" label_selected="Ajuda" name="Help"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_preview_animation.xml b/indra/newview/skins/default/xui/pt/floater_preview_animation.xml
index 2ec69ff9ea..f9b590b8c2 100644
--- a/indra/newview/skins/default/xui/pt/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/pt/floater_preview_animation.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="preview_anim">
-	<text length="1" name="desc txt" type="string">
-		Descrição:
-	</text>
-	<button label="Executar in World" label_selected="Parar" left="20" name="Anim play btn" tool_tip="Executar esta animação para que outros vejam." width="131"/>
-	<button label="Executar localmente" label_selected="Parar" left="162" name="Anim audition btn" tool_tip="Executar esta animação somente para você ver." width="125"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="preview_anim">
+	<text length="1" name="desc txt" type="string">
+		Descrição:
+	</text>
+	<button label="Executar in World" label_selected="Parar" left="20" name="Anim play btn" tool_tip="Executar esta animação para que outros vejam." width="131"/>
+	<button label="Executar localmente" label_selected="Parar" left="162" name="Anim audition btn" tool_tip="Executar esta animação somente para você ver." width="125"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_preview_classified.xml b/indra/newview/skins/default/xui/pt/floater_preview_classified.xml
index 2addac112a..4c583c28fb 100644
--- a/indra/newview/skins/default/xui/pt/floater_preview_classified.xml
+++ b/indra/newview/skins/default/xui/pt/floater_preview_classified.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="classified_preview" title="Informação do Anúncio Classificado"/>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="classified_preview" title="Informação do Anúncio Classificado"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_preview_event.xml b/indra/newview/skins/default/xui/pt/floater_preview_event.xml
index 86b804195d..3c8ebcf95a 100644
--- a/indra/newview/skins/default/xui/pt/floater_preview_event.xml
+++ b/indra/newview/skins/default/xui/pt/floater_preview_event.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="event_preview" title="Informação do Evento"/>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="event_preview" title="Informação do Evento"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_preview_gesture.xml b/indra/newview/skins/default/xui/pt/floater_preview_gesture.xml
index 74cb84d5f6..416d65fde4 100644
--- a/indra/newview/skins/default/xui/pt/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/pt/floater_preview_gesture.xml
@@ -1,59 +1,59 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="gesture_preview">
-	<string name="stop_txt">
-		Parar
-	</string>
-	<string name="preview_txt">
-		Prévia
-	</string>
-	<string name="none_text">
-		-- Nenhum --
-	</string>
-	<text name="desc_label">
-		Descrição:
-	</text>
-	<text name="trigger_label">
-		Gatilho:
-	</text>
-	<text name="replace_text" tool_tip="Substituir a(s) palavra(s) de gatilho por estas palavras. Por exemplo, o gatilho &apos;oi&apos; substituído por &apos;olá&apos;, mudará a conversa de &apos;Eu digo oi&apos; para &apos;Eu digo olá&apos; e também executando o gesto!">
-		Substituir por:
-	</text>
-	<line_editor name="replace_editor" tool_tip="Substituir a(s) palavra(s) gatilho por estas palavras.Por exemplo, o gatilho &apos;oi&apos; substituído por &apos;olá&apos;, mudará a conversa de &apos;Eu digo oi&apos; para &apos;Eu digo olá&apos; e também executando o gesto!"/>
-	<text name="key_label">
-		Tecla de Atalho:
-	</text>
-	<combo_box label="Nenhum" name="modifier_combo"/>
-	<combo_box label="Nenhum" name="key_combo"/>
-	<text name="library_label">
-		Biblioteca:
-	</text>
-	<text name="steps_label">
-		Passos:
-	</text>
-	<scroll_list name="library_list">
-		Animação
-Som
-Bate Papo
-Esperar
-	</scroll_list>
-	<button label="Incluir" name="add_btn"/>
-	<button label="Mover Para Cima" name="up_btn"/>
-	<button label="Mover Para Baixo" name="down_btn"/>
-	<button label="Remover" name="delete_btn"/>
-	<text name="help_label">
-		Todos os passos acontecem simultaneamente, a menos que você inclua passos de espera.
-	</text>
-	<radio_group name="animation_trigger_type">
-		<radio_item name="start">
-			Iniciar
-		</radio_item>
-		<radio_item name="stop">
-			Parar
-		</radio_item>
-	</radio_group>
-	<check_box label="até que as animações estejam concluídas" name="wait_anim_check"/>
-	<check_box label="tempo em segundos" name="wait_time_check"/>
-	<check_box label="Ativar" name="active_check" tool_tip="Gestos ativos podem ser gatilhados escrevendo suas frases de gatilho no chat ou através de suas teclas de atalho. Gestos normalmente ficam inativos quando existe um conflito nas teclas de atalho."/>
-	<button label="Prévia" name="preview_btn"/>
-	<button label="Salvar" name="save_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="gesture_preview">
+	<string name="stop_txt">
+		Parar
+	</string>
+	<string name="preview_txt">
+		Prévia
+	</string>
+	<string name="none_text">
+		-- Nenhum --
+	</string>
+	<text name="desc_label">
+		Descrição:
+	</text>
+	<text name="trigger_label">
+		Gatilho:
+	</text>
+	<text name="replace_text" tool_tip="Substituir a(s) palavra(s) de gatilho por estas palavras. Por exemplo, o gatilho &apos;oi&apos; substituído por &apos;olá&apos;, mudará a conversa de &apos;Eu digo oi&apos; para &apos;Eu digo olá&apos; e também executando o gesto!">
+		Substituir por:
+	</text>
+	<line_editor name="replace_editor" tool_tip="Substituir a(s) palavra(s) gatilho por estas palavras.Por exemplo, o gatilho &apos;oi&apos; substituído por &apos;olá&apos;, mudará a conversa de &apos;Eu digo oi&apos; para &apos;Eu digo olá&apos; e também executando o gesto!"/>
+	<text name="key_label">
+		Tecla de Atalho:
+	</text>
+	<combo_box label="Nenhum" name="modifier_combo"/>
+	<combo_box label="Nenhum" name="key_combo"/>
+	<text name="library_label">
+		Biblioteca:
+	</text>
+	<text name="steps_label">
+		Passos:
+	</text>
+	<scroll_list name="library_list">
+		Animação
+Som
+Bate Papo
+Esperar
+	</scroll_list>
+	<button label="Incluir" name="add_btn"/>
+	<button label="Mover Para Cima" name="up_btn"/>
+	<button label="Mover Para Baixo" name="down_btn"/>
+	<button label="Remover" name="delete_btn"/>
+	<text name="help_label">
+		Todos os passos acontecem simultaneamente, a menos que você inclua passos de espera.
+	</text>
+	<radio_group name="animation_trigger_type">
+		<radio_item name="start">
+			Iniciar
+		</radio_item>
+		<radio_item name="stop">
+			Parar
+		</radio_item>
+	</radio_group>
+	<check_box label="até que as animações estejam concluídas" name="wait_anim_check"/>
+	<check_box label="tempo em segundos" name="wait_time_check"/>
+	<check_box label="Ativar" name="active_check" tool_tip="Gestos ativos podem ser gatilhados escrevendo suas frases de gatilho no chat ou através de suas teclas de atalho. Gestos normalmente ficam inativos quando existe um conflito nas teclas de atalho."/>
+	<button label="Prévia" name="preview_btn"/>
+	<button label="Salvar" name="save_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml b/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml
index 9f48b6ee1f..e7d3144292 100644
--- a/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/pt/floater_preview_notecard.xml
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="preview notecard" title="Nota:">
-	<button label="Salvar" label_selected="Salvar" name="Save"/>
-	<text length="1" name="desc txt" type="string">
-		Descrição:
-	</text>
-	<text_editor length="1" name="Notecard Editor" type="string">
-		Carregando...
-	</text_editor>
-	<string name="no_object">
-		Não foi possível encontrar o objeto que contém esta nota.
-	</string>
-	<string name="not_allowed">
-		Você não tem permissão de visualizar esta nota.
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="preview notecard" title="Nota:">
+	<button label="Salvar" label_selected="Salvar" name="Save"/>
+	<text length="1" name="desc txt" type="string">
+		Descrição:
+	</text>
+	<text_editor length="1" name="Notecard Editor" type="string">
+		Carregando...
+	</text_editor>
+	<string name="no_object">
+		Não foi possível encontrar o objeto que contém esta nota.
+	</string>
+	<string name="not_allowed">
+		Você não tem permissão de visualizar esta nota.
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_preview_sound.xml b/indra/newview/skins/default/xui/pt/floater_preview_sound.xml
index 448cea6294..b61508480d 100644
--- a/indra/newview/skins/default/xui/pt/floater_preview_sound.xml
+++ b/indra/newview/skins/default/xui/pt/floater_preview_sound.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="preview_sound">
-	<text length="1" name="desc txt" type="string">
-		Descrição:
-	</text>
-	<button label="Executar in-World" label_selected="Executar in-World" name="Sound play btn" tool_tip="Executar este som para que todos possam ouvi-lo."/>
-	<button label="Executar Localmente" label_selected="Executar Localmente" name="Sound audition btn" tool_tip="Executar este som somente para você ouvir."/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="preview_sound">
+	<text length="1" name="desc txt" type="string">
+		Descrição:
+	</text>
+	<button label="Executar in-World" label_selected="Executar in-World" name="Sound play btn" tool_tip="Executar este som para que todos possam ouvi-lo."/>
+	<button label="Executar Localmente" label_selected="Executar Localmente" name="Sound audition btn" tool_tip="Executar este som somente para você ouvir."/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_preview_texture.xml b/indra/newview/skins/default/xui/pt/floater_preview_texture.xml
index 64b2b82d30..43f8497cbd 100644
--- a/indra/newview/skins/default/xui/pt/floater_preview_texture.xml
+++ b/indra/newview/skins/default/xui/pt/floater_preview_texture.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview_texture">
-	<text type="string" length="1" name="desc txt">
-		Descrição:
-	</text>
-	<text type="string" length="1" name="dimensions">
-		Dimensões: [WIDTH] x [HEIGHT]
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview_texture">
+	<text type="string" length="1" name="desc txt">
+		Descrição:
+	</text>
+	<text type="string" length="1" name="dimensions">
+		Dimensões: [WIDTH] x [HEIGHT]
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_region_info.xml b/indra/newview/skins/default/xui/pt/floater_region_info.xml
index b16b1a4de8..fe228ab405 100644
--- a/indra/newview/skins/default/xui/pt/floater_region_info.xml
+++ b/indra/newview/skins/default/xui/pt/floater_region_info.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="regioninfo" title="Região/Propriedade"/>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="regioninfo" title="Região/Propriedade"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_report_abuse.xml b/indra/newview/skins/default/xui/pt/floater_report_abuse.xml
index f6599b05db..9fc694fb6a 100644
--- a/indra/newview/skins/default/xui/pt/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/pt/floater_report_abuse.xml
@@ -1,181 +1,181 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_report_abuse" title="Reportar abuso">
-	<check_box label="Incluir cópia da tela" name="screen_check"/>
-	<text name="reporter_title">
-		Denunciador:
-	</text>
-	<text name="reporter_field">
-		Loremipsum Dolorsitamut
-	</text>
-	<text name="sim_title">
-		Região:
-	</text>
-	<text name="sim_field">
-		Nome da Região
-	</text>
-	<text name="pos_title">
-		Posição:
-	</text>
-	<text name="pos_field">
-		{128.1, 128.1, 15.4}
-	</text>
-	<text name="select_object_label">
-		Clique no botão e em seguida no objeto:
-	</text>
-	<button label="" label_selected="" name="pick_btn" tool_tip="Object Picker - Identifica um objeto como o assunto deste report"/>
-	<text name="object_name_label">
-		Nome:
-	</text>
-	<text name="object_name">
-		Consetetur Sadipscing
-	</text>
-	<text name="owner_name_label">
-		Proprietário:
-	</text>
-	<text name="owner_name">
-		Hendrerit Vulputate
-	</text>
-	<combo_box name="category_combo" tool_tip="Categoria -- Selecione a categoria que melhor descreve este report">
-		<combo_item name="Select_category">
-			Selecionar categoria
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Idade &gt; Idade no jogo
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Idade &gt; Residente adulto no Second Life Jovem
-		</combo_item>
-		
-		
-		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Assalto &gt; Sandbox de combate / área não segura
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Assalto &gt; Área segura
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Assalto &gt; Testando armas em sandbox
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Comércio &gt; Falha em enviar produto ou serviço
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Revelar &gt; Informação do mundo real
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Revelar &gt; Conversa monitorada remotamente
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Revelar &gt; Informação do Second Life/conversa/MIs
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Distúrbio da paz &gt; Uso injusto dos recursos da região
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Distúrbio da paz  &gt; Objetos com excesso de scripts
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Distúrbio da paz  &gt; Objeto despejando lixo
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Distúrbio da paz &gt; Spam repetitivo
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Distúrbio da paz &gt; Spam de anúncio indesejado
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Fraude &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Fraude &gt; Terra
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Fraude &gt; Esquema de pirâmide ou cartas encadeadas
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Fraude &gt; R$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Perturbação &gt; Fazendas de Anúncios / spam visual
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Perturbação &gt; Difamação de indivíduos ou grupos
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Perturbação &gt; Impedindo movimentos
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Perturbação &gt; Perturbação sexual
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Perturbação &gt; Solicitando/incitando outros a violarem o ToS
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Perturbação &gt; Abuso verbal
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Indecência &gt; Conteúdo ou conduta amplamente ofensivos
-		</combo_item>
-		
-		
-		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Indecência &gt; Nome de avatar inapropriado
-		</combo_item>
-		
-		
-		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Violação de propriedade intelectual &gt; Remoção de Conteúdo
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Violação de Propriedade intelectual  &gt; Cópia Ilegal ou  Aproveitar-se de Permissões
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intolerância
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Terra &gt; Abuso dos recursos da sandbox
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Terra &gt; Invasão &gt; Objetos/texturas
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Terra &gt; Invasão &gt; Partículas
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Terra &gt; Violação &gt; Árvores/plantas
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Apostas/jogos de azar
-		</combo_item>
-		<combo_item name="Other">
-			Outro
-		</combo_item>
-	</combo_box>
-	<text name="abuser_name_title">
-		Nome do Denunciado:
-	</text>
-	<button label="Escolher Residente" label_selected="" name="select_abuser" tool_tip="Selecione o nome do Denunciado numa lista"/>
-	<check_box label="Não sei o nome do denunciado" name="omit_abuser_name" tool_tip="Marque aqui se você não consegue fornecer o nome do denunciado"/>
-	<text name="abuser_name_title2">
-		Local do Abuso:
-	</text>
-	<text name="sum_title">
-		Resumo:
-	</text>
-	<text name="dscr_title">
-		Detalhes:
-	</text>
-	<text name="bug_aviso">
-		Por favor, seja específico(a) sobre data, localidade,
-natureza do abuso, texto relevante de conversa/MI e selecione o objeto,
-se possível.
-	</text>
-	<text name="incomplete_title">
-		Nota: Relatos incompletos não serão investigados.
-	</text>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
-	<button label="Reportar Abuso" label_selected="Reportar Abuso" name="send_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_report_abuse" title="Reportar abuso">
+	<check_box label="Incluir cópia da tela" name="screen_check"/>
+	<text name="reporter_title">
+		Denunciador:
+	</text>
+	<text name="reporter_field">
+		Loremipsum Dolorsitamut
+	</text>
+	<text name="sim_title">
+		Região:
+	</text>
+	<text name="sim_field">
+		Nome da Região
+	</text>
+	<text name="pos_title">
+		Posição:
+	</text>
+	<text name="pos_field">
+		{128.1, 128.1, 15.4}
+	</text>
+	<text name="select_object_label">
+		Clique no botão e em seguida no objeto:
+	</text>
+	<button label="" label_selected="" name="pick_btn" tool_tip="Object Picker - Identifica um objeto como o assunto deste report"/>
+	<text name="object_name_label">
+		Nome:
+	</text>
+	<text name="object_name">
+		Consetetur Sadipscing
+	</text>
+	<text name="owner_name_label">
+		Proprietário:
+	</text>
+	<text name="owner_name">
+		Hendrerit Vulputate
+	</text>
+	<combo_box name="category_combo" tool_tip="Categoria -- Selecione a categoria que melhor descreve este report">
+		<combo_item name="Select_category">
+			Selecionar categoria
+		</combo_item>
+		<combo_item name="Age__Age_play">
+			Idade &gt; Idade no jogo
+		</combo_item>
+		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
+			Idade &gt; Residente adulto no Second Life Jovem
+		</combo_item>
+		
+		
+		
+		<combo_item name="Assault__Combat_sandbox___unsafe_area">
+			Assalto &gt; Sandbox de combate / área não segura
+		</combo_item>
+		<combo_item name="Assault__Safe_area">
+			Assalto &gt; Área segura
+		</combo_item>
+		<combo_item name="Assault__Weapons_testing_sandbox">
+			Assalto &gt; Testando armas em sandbox
+		</combo_item>
+		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
+			Comércio &gt; Falha em enviar produto ou serviço
+		</combo_item>
+		<combo_item name="Disclosure__Real_world_information">
+			Revelar &gt; Informação do mundo real
+		</combo_item>
+		<combo_item name="Disclosure__Remotely_monitoring chat">
+			Revelar &gt; Conversa monitorada remotamente
+		</combo_item>
+		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
+			Revelar &gt; Informação do Second Life/conversa/MIs
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
+			Distúrbio da paz &gt; Uso injusto dos recursos da região
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
+			Distúrbio da paz  &gt; Objetos com excesso de scripts
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Object_littering">
+			Distúrbio da paz  &gt; Objeto despejando lixo
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Repetitive_spam">
+			Distúrbio da paz &gt; Spam repetitivo
+		</combo_item>
+		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
+			Distúrbio da paz &gt; Spam de anúncio indesejado
+		</combo_item>
+		<combo_item name="Fraud__L$">
+			Fraude &gt; L$
+		</combo_item>
+		<combo_item name="Fraud__Land">
+			Fraude &gt; Terra
+		</combo_item>
+		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
+			Fraude &gt; Esquema de pirâmide ou cartas encadeadas
+		</combo_item>
+		<combo_item name="Fraud__US$">
+			Fraude &gt; R$
+		</combo_item>
+		<combo_item name="Harassment__Advert_farms___visual_spam">
+			Perturbação &gt; Fazendas de Anúncios / spam visual
+		</combo_item>
+		<combo_item name="Harassment__Defaming_individuals_or_groups">
+			Perturbação &gt; Difamação de indivíduos ou grupos
+		</combo_item>
+		<combo_item name="Harassment__Impeding_movement">
+			Perturbação &gt; Impedindo movimentos
+		</combo_item>
+		<combo_item name="Harassment__Sexual_harassment">
+			Perturbação &gt; Perturbação sexual
+		</combo_item>
+		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
+			Perturbação &gt; Solicitando/incitando outros a violarem o ToS
+		</combo_item>
+		<combo_item name="Harassment__Verbal_abuse">
+			Perturbação &gt; Abuso verbal
+		</combo_item>
+		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
+			Indecência &gt; Conteúdo ou conduta amplamente ofensivos
+		</combo_item>
+		
+		
+		
+		<combo_item name="Indecency__Inappropriate_avatar_name">
+			Indecência &gt; Nome de avatar inapropriado
+		</combo_item>
+		
+		
+		
+		<combo_item name="Intellectual_property_infringement_Content_Removal">
+			Violação de propriedade intelectual &gt; Remoção de Conteúdo
+		</combo_item>
+		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
+			Violação de Propriedade intelectual  &gt; Cópia Ilegal ou  Aproveitar-se de Permissões
+		</combo_item>
+		<combo_item name="Intolerance">
+			Intolerância
+		</combo_item>
+		<combo_item name="Land__Abuse_of_sandbox_resources">
+			Terra &gt; Abuso dos recursos da sandbox
+		</combo_item>
+		<combo_item name="Land__Encroachment__Objects_textures">
+			Terra &gt; Invasão &gt; Objetos/texturas
+		</combo_item>
+		<combo_item name="Land__Encroachment__Particles">
+			Terra &gt; Invasão &gt; Partículas
+		</combo_item>
+		<combo_item name="Land__Encroachment__Trees_plants">
+			Terra &gt; Violação &gt; Árvores/plantas
+		</combo_item>
+		<combo_item name="Wagering_gambling">
+			Apostas/jogos de azar
+		</combo_item>
+		<combo_item name="Other">
+			Outro
+		</combo_item>
+	</combo_box>
+	<text name="abuser_name_title">
+		Nome do Denunciado:
+	</text>
+	<button label="Escolher Residente" label_selected="" name="select_abuser" tool_tip="Selecione o nome do Denunciado numa lista"/>
+	<check_box label="Não sei o nome do denunciado" name="omit_abuser_name" tool_tip="Marque aqui se você não consegue fornecer o nome do denunciado"/>
+	<text name="abuser_name_title2">
+		Local do Abuso:
+	</text>
+	<text name="sum_title">
+		Resumo:
+	</text>
+	<text name="dscr_title">
+		Detalhes:
+	</text>
+	<text name="bug_aviso">
+		Por favor, seja específico(a) sobre data, localidade,
+natureza do abuso, texto relevante de conversa/MI e selecione o objeto,
+se possível.
+	</text>
+	<text name="incomplete_title">
+		Nota: Relatos incompletos não serão investigados.
+	</text>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
+	<button label="Reportar Abuso" label_selected="Reportar Abuso" name="send_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_script_debug.xml b/indra/newview/skins/default/xui/pt/floater_script_debug.xml
index 87a3310bff..48c73b93a3 100644
--- a/indra/newview/skins/default/xui/pt/floater_script_debug.xml
+++ b/indra/newview/skins/default/xui/pt/floater_script_debug.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<multi_floater name="script debug floater" title="Aviso de script/erro">
-	<tab_container name="Preview Tabs">
-		<floater label="Script" name="all_scripts" title="[Todos os scripts]"/>
-	</tab_container>
-</multi_floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<multi_floater name="script debug floater" title="Aviso de script/erro">
+	<tab_container name="Preview Tabs">
+		<floater label="Script" name="all_scripts" title="[Todos os scripts]"/>
+	</tab_container>
+</multi_floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_script_preview.xml b/indra/newview/skins/default/xui/pt/floater_script_preview.xml
index 68405a62ae..d014e040a2 100644
--- a/indra/newview/skins/default/xui/pt/floater_script_preview.xml
+++ b/indra/newview/skins/default/xui/pt/floater_script_preview.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater name="preview lsl text" title="Script: Rotation Script">
-	<text type="string" length="1" name="desc txt">
-		Descrição:
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="preview lsl text" title="Script: Rotation Script">
+	<text type="string" length="1" name="desc txt">
+		Descrição:
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_script_queue.xml b/indra/newview/skins/default/xui/pt/floater_script_queue.xml
index 2a1d860cb7..7b35226bdb 100644
--- a/indra/newview/skins/default/xui/pt/floater_script_queue.xml
+++ b/indra/newview/skins/default/xui/pt/floater_script_queue.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="queue" title="Resetar Progresso">
-	<button label="Fechar" label_selected="Fechar" name="close"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="queue" title="Resetar Progresso">
+	<button label="Fechar" label_selected="Fechar" name="close"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_script_search.xml b/indra/newview/skins/default/xui/pt/floater_script_search.xml
index 293f5223c5..aaf1ea4339 100644
--- a/indra/newview/skins/default/xui/pt/floater_script_search.xml
+++ b/indra/newview/skins/default/xui/pt/floater_script_search.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="script search" title="Busca de Script">
-	<check_box label="Não diferenciar Maiúsculas de Minúsculas" name="case_text"/>
-	<button label="Buscar" label_selected="Buscar" name="search_btn"/>
-	<button label="Substituir" label_selected="Substituir" name="replace_btn"/>
-	<button label="Substituir Tudo" label_selected="Substituir Tudo" name="replace_all_btn"/>
-	<text length="1" name="txt" type="string">
-		Buscar
-	</text>
-	<text length="1" name="txt2" type="string">
-		Substituir
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="script search" title="Busca de Script">
+	<check_box label="Não diferenciar Maiúsculas de Minúsculas" name="case_text"/>
+	<button label="Buscar" label_selected="Buscar" name="search_btn"/>
+	<button label="Substituir" label_selected="Substituir" name="replace_btn"/>
+	<button label="Substituir Tudo" label_selected="Substituir Tudo" name="replace_all_btn"/>
+	<text length="1" name="txt" type="string">
+		Buscar
+	</text>
+	<text length="1" name="txt2" type="string">
+		Substituir
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_sell_land.xml b/indra/newview/skins/default/xui/pt/floater_sell_land.xml
index 7dccf87180..c3461b7d52 100644
--- a/indra/newview/skins/default/xui/pt/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/pt/floater_sell_land.xml
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="sell land" title="Vender terreno">
-	<text name="info_parcel_label">
-		Lote:
-	</text>
-	<text name="info_parcel">
-		Nome do Lote
-	</text>
-	<text name="info_size_label">
-		Tamanho:
-	</text>
-	<text name="info_size">
-		[AREA] m².
-	</text>
-	<text name="info_action">
-		Para vender este lote:
-	</text>
-	<text name="price_label">
-		Defina um preço:
-	</text>
-	<text name="price_text">
-		Escolha um preço apropriado para esta terra.
-	</text>
-	<text name="price_ld">
-		L$
-	</text>
-	<text name="price_per_m">
-		(L$[PER_METER] por m²)
-	</text>
-	<text name="sell_to_label">
-		Vender esta terra para:
-	</text>
-	<text name="sell_to_text">
-		Escolha se venderá para qualquer um ou para um comprador em particular.
-	</text>
-	<combo_box name="sell_to">
-		<combo_item name="--selectone--">
-			-- Selecione um --
-		</combo_item>
-		<combo_item name="Anyone">
-			Qualquer um
-		</combo_item>
-		<combo_item name="Specificuser:">
-			Usuário Específico:
-		</combo_item>
-	</combo_box>
-	<button label="Selecione..." name="sell_to_select_agent"/>
-	<text name="sell_objects_label">
-		Vender os objetos com a terra?
-	</text>
-	<text name="sell_objects_text">
-		Os objetos tranferíveis do proprietário do terreno que estão neste lote irão mudar de propriedade.
-	</text>
-	<radio_group name="sell_objects">
-		<radio_item name="no">
-			Não, manter a propriedade sobre os objetos
-		</radio_item>
-		<radio_item name="yes">
-			Sim, vender objetos com a terra
-		</radio_item>
-	</radio_group>
-	<button label="Mostrar Objetos" name="show_objects"/>
-	<text name="nag_message_label">
-		LEMBRE-SE: Todas as vendas são finais.
-	</text>
-	<button label="Definir Terra para Venda" name="sell_btn"/>
-	<button label="Cancelar" name="cancel_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="sell land" title="Vender terreno">
+	<text name="info_parcel_label">
+		Lote:
+	</text>
+	<text name="info_parcel">
+		Nome do Lote
+	</text>
+	<text name="info_size_label">
+		Tamanho:
+	</text>
+	<text name="info_size">
+		[AREA] m².
+	</text>
+	<text name="info_action">
+		Para vender este lote:
+	</text>
+	<text name="price_label">
+		Defina um preço:
+	</text>
+	<text name="price_text">
+		Escolha um preço apropriado para esta terra.
+	</text>
+	<text name="price_ld">
+		L$
+	</text>
+	<text name="price_per_m">
+		(L$[PER_METER] por m²)
+	</text>
+	<text name="sell_to_label">
+		Vender esta terra para:
+	</text>
+	<text name="sell_to_text">
+		Escolha se venderá para qualquer um ou para um comprador em particular.
+	</text>
+	<combo_box name="sell_to">
+		<combo_box.item name="--selectone--">
+			-- Selecione um --
+		</combo_box.item>
+		<combo_box.item name="Anyone">
+			Qualquer um
+		</combo_box.item>
+		<combo_box.item name="Specificuser:">
+			Usuário Específico:
+		</combo_box.item>
+	</combo_box>
+	<button label="Selecione..." name="sell_to_select_agent"/>
+	<text name="sell_objects_label">
+		Vender os objetos com a terra?
+	</text>
+	<text name="sell_objects_text">
+		Os objetos tranferíveis do proprietário do terreno que estão neste lote irão mudar de propriedade.
+	</text>
+	<radio_group name="sell_objects">
+		<radio_item name="no">
+			Não, manter a propriedade sobre os objetos
+		</radio_item>
+		<radio_item name="yes">
+			Sim, vender objetos com a terra
+		</radio_item>
+	</radio_group>
+	<button label="Mostrar Objetos" name="show_objects"/>
+	<text name="nag_message_label">
+		LEMBRE-SE: Todas as vendas são finais.
+	</text>
+	<button label="Definir Terra para Venda" name="sell_btn"/>
+	<button label="Cancelar" name="cancel_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_settings_debug.xml b/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
index e67fca10c9..e0c189568a 100644
--- a/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="settings_debug" title="Configurações de Debug">
-	<combo_box name="boolean_combo">
-		<combo_item name="TRUE">
-			VERDADEIRO
-		</combo_item>
-		<combo_item name="FALSE">
-			FALSO
-		</combo_item>
-	</combo_box>
-	<color_swatch label="Cor" name="color_swatch"/>
-	<spinner label="x" name="val_spinner_1"/>
-	<spinner label="x" name="val_spinner_2"/>
-	<spinner label="x" name="val_spinner_3"/>
-	<spinner label="x" name="val_spinner_4"/>
-	<button label="Restaurar padrão" name="default_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="settings_debug" title="Configurações de Debug">
+	<combo_box name="boolean_combo">
+		<combo_box.item name="TRUE">
+			VERDADEIRO
+		</combo_box.item>
+		<combo_box.item name="FALSE">
+			FALSO
+		</combo_box.item>
+	</combo_box>
+	<color_swatch label="Cor" name="color_swatch"/>
+	<spinner label="x" name="val_spinner_1"/>
+	<spinner label="x" name="val_spinner_2"/>
+	<spinner label="x" name="val_spinner_3"/>
+	<spinner label="x" name="val_spinner_4"/>
+	<button label="Restaurar padrão" name="default_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_snapshot.xml b/indra/newview/skins/default/xui/pt/floater_snapshot.xml
index 89307fc88d..067a4a71f3 100644
--- a/indra/newview/skins/default/xui/pt/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/pt/floater_snapshot.xml
@@ -1,137 +1,137 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Snapshot" title="Prévia da foto">
-	<text name="type_label">
-		Destino da foto
-	</text>
-	<radio_group label="Tipo de Foto" name="snapshot_type_radio">
-		<radio_item name="postcard">
-			Enviar por email
-		</radio_item>
-		<radio_item name="texture">
-			Salvar no seu inventário (L$[AMOUNT])
-		</radio_item>
-		<radio_item name="local">
-			Salvar no seu disco rígido
-		</radio_item>
-	</radio_group>
-	<text name="file_size_label">
-		Tamanho do arquivo: [SIZE] KB
-	</text>
-	<button label="Atualizar a foto" name="new_snapshot_btn"/>
-	<button label="Enviar" name="send_btn"/>
-	<button label="Salvar (L$[AMOUNT])" name="upload_btn"/>
-	<flyout_button label="Salvar" name="save_btn" tool_tip="Salvar imagem em um arquivo">
-		<flyout_button_item name="save_item">
-			Salvar
-		</flyout_button_item>
-		<flyout_button_item name="saveas_item">
-			Salvar como...
-		</flyout_button_item>
-	</flyout_button>
-	<button label="Cancelar" name="discard_btn"/>
-	<button label="Mais &gt;" name="more_btn" tool_tip="Opções Avançadas"/>
-	<button label="&lt; Menos" name="less_btn" tool_tip="Opções Avançadas"/>
-	<text name="type_label2">
-		Tamanho
-	</text>
-	<text name="format_label">
-		Formato
-	</text>
-	<combo_box label="Resolução" name="postcard_size_combo">
-		<combo_item name="CurrentWindow">
-			Janela Atual
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="Custom">
-			Customizado
-		</combo_item>
-	</combo_box>
-	<combo_box label="Resolução" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
-			Janela Atual
-		</combo_item>
-		<combo_item name="Small(128x128)">
-			Pequeno (128x128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
-			Médio (256x256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
-			Grande (512x512)
-		</combo_item>
-		<combo_item name="Custom">
-			Customizado
-		</combo_item>
-	</combo_box>
-	<combo_box label="Resolução" name="local_size_combo">
-		<combo_item name="CurrentWindow">
-			Janela Atual
-		</combo_item>
-		<combo_item name="320x240">
-			320x240
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="1280x1024">
-			1280x1024
-		</combo_item>
-		<combo_item name="1600x1200">
-			1600x1200
-		</combo_item>
-		<combo_item name="Custom">
-			Customizado
-		</combo_item>
-	</combo_box>
-	<combo_box label="Formato" name="local_format_combo">
-		<combo_item name="PNG">
-			PNG
-		</combo_item>
-		<combo_item name="JPEG">
-			JPEG
-		</combo_item>
-		<combo_item name="BMP">
-			BMP
-		</combo_item>
-	</combo_box>
-	<spinner label="Largura" name="snapshot_width"/>
-	<spinner label="Altura" name="snapshot_height"/>
-	<check_box label="Restringir proporções" name="keep_aspect_check"/>
-	<slider label="Qualidade da Imagem" name="image_quality_slider"/>
-	<text name="layer_type_label">
-		Capturar:
-	</text>
-	<combo_box label="Camadas da Imagem" name="layer_types">
-		<combo_item name="Colors">
-			Cores
-		</combo_item>
-		<combo_item name="Depth">
-			Formato
-		</combo_item>
-		<combo_item name="ObjectMattes">
-			Decoração do Objeto
-		</combo_item>
-	</combo_box>
-	<check_box label="Mostrar interface na Foto" name="ui_check"/>
-	<check_box label="Mostrar Objetos HUD na Foto" name="hud_check"/>
-	<check_box label="Manter aberto após salvar" name="keep_open_check"/>
-	<check_box label="Quadro Congelado (prévia da tela inteira)" name="freeze_frame_check"/>
-	<check_box label="Auto-atualizar" name="auto_snapshot_check"/>
-	<string name="unknown">
-		desconhecido
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Snapshot" title="Prévia da foto">
+	<text name="type_label">
+		Destino da foto
+	</text>
+	<radio_group label="Tipo de Foto" name="snapshot_type_radio">
+		<radio_item name="postcard">
+			Enviar por email
+		</radio_item>
+		<radio_item name="texture">
+			Salvar no seu inventário (L$[AMOUNT])
+		</radio_item>
+		<radio_item name="local">
+			Salvar no seu disco rígido
+		</radio_item>
+	</radio_group>
+	<text name="file_size_label">
+		Tamanho do arquivo: [SIZE] KB
+	</text>
+	<button label="Atualizar a foto" name="new_snapshot_btn"/>
+	<button label="Enviar" name="send_btn"/>
+	<button label="Salvar (L$[AMOUNT])" name="upload_btn"/>
+	<flyout_button label="Salvar" name="save_btn" tool_tip="Salvar imagem em um arquivo">
+    <flyout_button.item name="save_item">
+      Salvar
+    </flyout_button.item>
+    <flyout_button.item name="saveas_item">
+      Salvar como...
+    </flyout_button.item>
+	</flyout_button>
+	<button label="Cancelar" name="discard_btn"/>
+	<button label="Mais &gt;" name="more_btn" tool_tip="Opções Avançadas"/>
+	<button label="&lt; Menos" name="less_btn" tool_tip="Opções Avançadas"/>
+	<text name="type_label2">
+		Tamanho
+	</text>
+	<text name="format_label">
+		Formato
+	</text>
+	<combo_box label="Resolução" name="postcard_size_combo">
+		<combo_box.item name="CurrentWindow">
+			Janela Atual
+		</combo_box.item>
+		<combo_box.item name="640x480">
+			640x480
+		</combo_box.item>
+		<combo_box.item name="800x600">
+			800x600
+		</combo_box.item>
+		<combo_box.item name="1024x768">
+			1024x768
+		</combo_box.item>
+		<combo_box.item name="Custom">
+			Customizado
+		</combo_box.item>
+	</combo_box>
+	<combo_box label="Resolução" name="texture_size_combo">
+		<combo_box.item name="CurrentWindow">
+			Janela Atual
+		</combo_box.item>
+		<combo_box.item name="Small(128x128)">
+			Pequeno (128x128)
+		</combo_box.item>
+		<combo_box.item name="Medium(256x256)">
+			Médio (256x256)
+		</combo_box.item>
+		<combo_box.item name="Large(512x512)">
+			Grande (512x512)
+		</combo_box.item>
+		<combo_box.item name="Custom">
+			Customizado
+		</combo_box.item>
+	</combo_box>
+	<combo_box label="Resolução" name="local_size_combo">
+		<combo_box.item name="CurrentWindow">
+			Janela Atual
+		</combo_box.item>
+		<combo_box.item name="320x240">
+			320x240
+		</combo_box.item>
+		<combo_box.item name="640x480">
+			640x480
+		</combo_box.item>
+		<combo_box.item name="800x600">
+			800x600
+		</combo_box.item>
+		<combo_box.item name="1024x768">
+			1024x768
+		</combo_box.item>
+		<combo_box.item name="1280x1024">
+			1280x1024
+		</combo_box.item>
+		<combo_box.item name="1600x1200">
+			1600x1200
+		</combo_box.item>
+		<combo_box.item name="Custom">
+			Customizado
+		</combo_box.item>
+	</combo_box>
+	<combo_box label="Formato" name="local_format_combo">
+		<combo_box.item name="PNG">
+			PNG
+		</combo_box.item>
+		<combo_box.item name="JPEG">
+			JPEG
+		</combo_box.item>
+		<combo_box.item name="BMP">
+			BMP
+		</combo_box.item>
+	</combo_box>
+	<spinner label="Largura" name="snapshot_width"/>
+	<spinner label="Altura" name="snapshot_height"/>
+	<check_box label="Restringir proporções" name="keep_aspect_check"/>
+	<slider label="Qualidade da Imagem" name="image_quality_slider"/>
+	<text name="layer_type_label">
+		Capturar:
+	</text>
+	<combo_box label="Camadas da Imagem" name="layer_types">
+		<combo_box.item name="Colors">
+			Cores
+		</combo_box.item>
+		<combo_box.item name="Depth">
+			Formato
+		</combo_box.item>
+		<combo_box.item name="ObjectMattes">
+			Decoração do Objeto
+		</combo_box.item>
+	</combo_box>
+	<check_box label="Mostrar interface na Foto" name="ui_check"/>
+	<check_box label="Mostrar Objetos HUD na Foto" name="hud_check"/>
+	<check_box label="Manter aberto após salvar" name="keep_open_check"/>
+	<check_box label="Quadro Congelado (prévia da tela inteira)" name="freeze_frame_check"/>
+	<check_box label="Auto-atualizar" name="auto_snapshot_check"/>
+	<string name="unknown">
+		desconhecido
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_sound_preview.xml b/indra/newview/skins/default/xui/pt/floater_sound_preview.xml
index 933b33a2f7..34a8b6e9ef 100644
--- a/indra/newview/skins/default/xui/pt/floater_sound_preview.xml
+++ b/indra/newview/skins/default/xui/pt/floater_sound_preview.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Name/Description" title="sound.wav">
-	<text name="name_label">
-		Nome:
-	</text>
-	<text name="description_label">
-		Descrição:
-	</text>
-	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
-	<button label="Upload (L$[AMOUNT])" label_selected="Upload (L$[AMOUNT])" name="ok_btn"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Name/Description" title="sound.wav">
+	<text name="name_label">
+		Nome:
+	</text>
+	<text name="description_label">
+		Descrição:
+	</text>
+	<button label="Cancelar" label_selected="Cancelar" name="cancel_btn"/>
+	<button label="Upload (L$[AMOUNT])" label_selected="Upload (L$[AMOUNT])" name="ok_btn"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_telehub.xml b/indra/newview/skins/default/xui/pt/floater_telehub.xml
index e042918cc3..f2634be852 100644
--- a/indra/newview/skins/default/xui/pt/floater_telehub.xml
+++ b/indra/newview/skins/default/xui/pt/floater_telehub.xml
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="telehub" title="Telehub">
-	<text name="status_text_connected">
-		Telehub conectado ao objeto [OBJECT]
-	</text>
-	<text name="status_text_not_connected">
-		Sem telehub conectado.
-	</text>
-	<text name="help_text_connected">
-		Para remover, clique em Desconectar.
-	</text>
-	<text name="help_text_not_connected">
-		Selecione um objeto e clique em Conectar Telehub.
-	</text>
-	<button label="Conectar Telehub" name="connect_btn"/>
-	<button label="Desconectar" name="disconnect_btn"/>
-	<text name="spawn_points_text">
-		Pontos de Nascimento (posições, não objetos):
-	</text>
-	<button label="Adicionar Nascimento" name="add_spawn_point_btn"/>
-	<button label="Remover Nascimento" name="remove_spawn_point_btn"/>
-	<text name="spawn_point_help">
-		Selecione um objeto e clique Adicionar para especificar
-a posição. Em seguida, você pode mover ou apagar o objeto.
-As posições são relativas ao centro do telehub.
-Selecione um item na lista para mostrar a posição in-world.
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="telehub" title="Telehub">
+	<text name="status_text_connected">
+		Telehub conectado ao objeto [OBJECT]
+	</text>
+	<text name="status_text_not_connected">
+		Sem telehub conectado.
+	</text>
+	<text name="help_text_connected">
+		Para remover, clique em Desconectar.
+	</text>
+	<text name="help_text_not_connected">
+		Selecione um objeto e clique em Conectar Telehub.
+	</text>
+	<button label="Conectar Telehub" name="connect_btn"/>
+	<button label="Desconectar" name="disconnect_btn"/>
+	<text name="spawn_points_text">
+		Pontos de Nascimento (posições, não objetos):
+	</text>
+	<button label="Adicionar Nascimento" name="add_spawn_point_btn"/>
+	<button label="Remover Nascimento" name="remove_spawn_point_btn"/>
+	<text name="spawn_point_help">
+		Selecione um objeto e clique Adicionar para especificar
+a posição. Em seguida, você pode mover ou apagar o objeto.
+As posições são relativas ao centro do telehub.
+Selecione um item na lista para mostrar a posição in-world.
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml
index 46cff82067..3fd0d6103e 100644
--- a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="texture picker" title="Pegar: Textura">
-	<string name="choose_picture">
-		Clique para escolher uma imagem
-	</string>
-	<text length="1" name="Multiple" type="string">
-		Multiplo
-	</text>
-	<text length="1" name="unknown" type="string">
-		Dimensões: [DIMENSIONS]
-	</text>
-	<button label="Padrão" label_selected="Padrão" name="Default"/>
-	<button label="Nenhum" label_selected="Nenhum" name="None"/>
-	<button label="Branco" label_selected="Branco" name="Blank"/>
-	<check_box label="Mostrar Pastas" name="show_folders_check"/>
-	<search_editor label="Clique aqui para buscar" name="inventory search editor"/>
-	<check_box label="Aplicar Imediatamente" name="apply_immediate_check"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-	<button label="Selecionar" label_selected="Selecionar" name="Select"/>
-	<string name="pick title">
-		Pegar:
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="texture picker" title="Pegar: Textura">
+	<string name="choose_picture">
+		Clique para escolher uma imagem
+	</string>
+	<text length="1" name="Multiple" type="string">
+		Multiplo
+	</text>
+	<text length="1" name="unknown" type="string">
+		Dimensões: [DIMENSIONS]
+	</text>
+	<button label="Padrão" label_selected="Padrão" name="Default"/>
+	<button label="Nenhum" label_selected="Nenhum" name="None"/>
+	<button label="Branco" label_selected="Branco" name="Blank"/>
+	<check_box label="Mostrar Pastas" name="show_folders_check"/>
+	<search_editor label="Clique aqui para buscar" name="inventory search editor"/>
+	<check_box label="Aplicar Imediatamente" name="apply_immediate_check"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+	<button label="Selecionar" label_selected="Selecionar" name="Select"/>
+	<string name="pick title">
+		Pegar:
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_tools.xml b/indra/newview/skins/default/xui/pt/floater_tools.xml
index fd71ee49d1..838c7965ea 100644
--- a/indra/newview/skins/default/xui/pt/floater_tools.xml
+++ b/indra/newview/skins/default/xui/pt/floater_tools.xml
@@ -1,610 +1,610 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="toolbox floater" title="">
-	<button label="" label_selected="" name="button focus" tool_tip="Foco"/>
-	<button label="" label_selected="" name="button move" tool_tip="Mover"/>
-	<button label="" label_selected="" name="button edit" tool_tip="Editar"/>
-	<button label="" label_selected="" name="button create" tool_tip="Criar"/>
-	<button label="" label_selected="" name="button land" tool_tip="Terra"/>
-	<check_box label="Zoom" name="radio zoom"/>
-	<check_box label="Órbita (Ctrl)" name="radio orbit"/>
-	<check_box label="Pan (Ctrl-Shift)" name="radio pan"/>
-	<check_box label="Mover" name="radio move"/>
-	<check_box label="Suspender (Ctrl)" name="radio lift"/>
-	<check_box label="Girar (Ctrl-Shift)" name="radio spin"/>
-	<check_box label="Posição" name="radio position"/>
-	<check_box label="Rotacionar (Ctrl)" name="radio rotate"/>
-	<check_box label="Esticar (Ctrl-Shift)" name="radio stretch"/>
-	<check_box label="Selecionar Textura" name="radio select face"/>
-	<check_box label="Editar partes unidas" name="checkbox edit linked parts"/>
-	<text name="text ruler mode">
-		Modo da régua:
-	</text>
-	<combo_box name="combobox grid mode">
-		<combo_item name="World">
-			Mundo
-		</combo_item>
-		<combo_item name="Local">
-			Local
-		</combo_item>
-		<combo_item name="Reference">
-			Referência
-		</combo_item>
-	</combo_box>
-	<check_box label="Esticar ambos os lados" name="checkbox uniform"/>
-	<check_box label="Esticar Texturas" name="checkbox stretch textures"/>
-	<check_box label="Usar Grade" name="checkbox snap to grid"/>
-	<button label="Opções..." label_selected="Opções..." name="Options..."/>
-	<text name="text status">
-		Arraste para mover, shift+Arrastar para Copiar
-	</text>
-	<button label="" label_selected="" name="ToolCube" tool_tip="Cubo"/>
-	<button label="" label_selected="" name="ToolPrism" tool_tip="Prisma"/>
-	<button label="" label_selected="" name="ToolPyramid" tool_tip="Pirâmide"/>
-	<button label="" label_selected="" name="ToolTetrahedron" tool_tip="Tetraedro"/>
-	<button label="" label_selected="" name="ToolCylinder" tool_tip="Cilindro"/>
-	<button label="" label_selected="" name="ToolHemiCylinder" tool_tip="Semi-cilindro"/>
-	<button label="" label_selected="" name="ToolCone" tool_tip="Cone"/>
-	<button label="" label_selected="" name="ToolHemiCone" tool_tip="Semi-cone"/>
-	<button label="" label_selected="" name="ToolSphere" tool_tip="Esfera"/>
-	<button label="" label_selected="" name="ToolHemiSphere" tool_tip="Semi-esfera"/>
-	<button label="" label_selected="" name="ToolTorus" tool_tip="Toróide"/>
-	<button label="" label_selected="" name="ToolTube" tool_tip="Tubo"/>
-	<button label="" label_selected="" name="ToolRing" tool_tip="Anel"/>
-	<button label="" label_selected="" name="ToolTree" tool_tip="Árvore"/>
-	<button label="" label_selected="" name="ToolGrass" tool_tip="Grama"/>
-	<check_box label="Manter ferramenta selecionada" name="checkbox sticky"/>
-	<check_box label="Copiar Seleção" name="checkbox copy selection"/>
-	<check_box label="Copiar Centro" name="checkbox copy centers"/>
-	<check_box label="Rotacionar Cópia" name="checkbox copy rotates"/>
-	<check_box label="Selecionar Terra" name="radio select land"/>
-	<check_box label="Aplainar Terra" name="radio flatten"/>
-	<check_box label="Elevar Terra" name="radio raise"/>
-	<check_box label="Baixar Terra" name="radio lower"/>
-	<check_box label="Suavizar Terra" name="radio smooth"/>
-	<check_box label="Terreno Rígido" name="radio noise"/>
-	<check_box label="Reverter Terra" name="radio revert"/>
-	<combo_box name="combobox brush size">
-		<combo_item name="Small">
-			Pequeno
-		</combo_item>
-		<combo_item name="Medium">
-			Médio
-		</combo_item>
-		<combo_item name="Large">
-			Grande
-		</combo_item>
-	</combo_box>
-	<text name="Strength:">
-		Força:
-	</text>
-	<button label="Aplicar no selecionado" label_selected="Aplicar no selecionado" name="button apply to selection" tool_tip="Modificar Terra Selecionada"/>
-	<check_box label="Mostrar Proprietários" name="checkbox show owners"/>
-	<button label="Mais &gt;&gt;" name="button more" tool_tip="Opções Avançadas"/>
-	<button label="&lt;&lt; Menos" name="button less" tool_tip="Opções Avançadas"/>
-	<tab_container name="Object Info Tabs">
-		<panel label="Comum" name="General">
-			<text name="Name:">
-				Nome:
-			</text>
-			<text name="Description:">
-				Descrição:
-			</text>
-			<text name="Creator:">
-				Criador:
-			</text>
-			<text name="Creator Name">
-				Thrax Linden
-			</text>
-			<button label="Perfil..." label_selected="Perfil..." name="button creator profile"/>
-			<text name="Owner:">
-				Proprietário:
-			</text>
-			<text name="Owner Name">
-				Thrax Linden
-			</text>
-			<button label="Perfil..." label_selected="Perfil..." name="button owner profile"/>
-			<text name="Group:">
-				Grupo:
-			</text>
-			<text name="Group Name Proxy">
-				Os Lindens
-			</text>
-			<button label="Definir..." label_selected="Definir..." name="button set group"/>
-			<text name="prim info">
-				1 Objeto, 1 Primitiva
-			</text>
-			<text name="Permissions:">
-				Permissões:
-			</text>
-			<text name="perm_modify">
-				Você pode modificar este objeto.
-			</text>
-			<check_box label="Compartilhar com o Grupo" name="checkbox share with group" tool_tip="Permitir que o membros do grupo movam, modifiquem, copiem e apaguem"/>
-			<string name="text deed continued">
-				Doar...
-			</string>
-			<string name="text deed">
-				Doar
-			</string>
-			<button label="Doar..." label_selected="Doar..." name="button deed" tool_tip="Objetos compartilhados do Grupo pode ser doados pelo gerente do grupo."/>
-			<check_box label="Permitir que qualquer um mova" name="checkbox allow everyone move"/>
-			<check_box label="Permitir que qualquer um copie" name="checkbox allow everyone copy"/>
-			<check_box label="Mostrar na busca" name="search_check" tool_tip="Permitir que as pessoas vejam este objeto nos resultados de busca"/>
-			<check_box label="À Venda" name="checkbox for sale"/>
-			<text name="Cost">
-				Preço:  L$
-			</text>
-			<radio_group name="sale type">
-				<radio_item name="Original">
-					Original
-				</radio_item>
-				<radio_item name="Copy">
-					Cópia
-				</radio_item>
-				<radio_item name="Contents">
-					Conteúdo
-				</radio_item>
-			</radio_group>
-			<text name="Next owner can:">
-				Próximo Proprietário pode:
-			</text>
-			<check_box label="Modificar" name="checkbox next owner can modify"/>
-			<check_box label="Copiar" name="checkbox next owner can copy"/>
-			<check_box label="Revender/Dar" name="checkbox next owner can transfer"/>
-			<text name="label click action">
-				Quando clicado com o botão esquerdo:
-			</text>
-			<combo_box name="clickaction">
-				<combo_item name="Touch/grab(default)">
-					Tocar/Pegar (padrão)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					Sentar no objeto
-				</combo_item>
-				<combo_item name="Buyobject">
-					Comprar objeto
-				</combo_item>
-				<combo_item name="Payobject">
-					Pagar Objeto
-				</combo_item>
-				<combo_item name="Open">
-					Abrir
-				</combo_item>
-				<combo_item name="Play">
-					Executar a mídia do lote
-				</combo_item>
-				<combo_item name="Opemmedia">
-					Abrir a mídia do lote
-				</combo_item>
-			</combo_box>
-			<text name="B:">
-				B:
-			</text>
-			<text name="O:">
-				O;
-			</text>
-			<text name="G:">
-				G:
-			</text>
-			<text name="E:">
-				E:
-			</text>
-			<text name="N:">
-				N:
-			</text>
-			<text name="F:">
-				F:
-			</text>
-			<string name="text modify info 1">
-				Você pode modificar este objeto.
-			</string>
-			<string name="text modify info 2">
-				Você pode modificar estes objetos.
-			</string>
-			<string name="text modify info 3">
-				Você não pode modificar este objeto.
-			</string>
-			<string name="text modify info 4">
-				Você não pode modificar estes objetos.
-			</string>
-			<string name="text modify warning">
-				Você precisa selecionar o objeto todo para ajustar as permissões.
-			</string>
-			<string name="Cost Default">
-				Preço:           L$
-			</string>
-			<string name="Cost Total">
-				Preço Total:  L$
-			</string>
-			<string name="Cost Per Unit">
-				Preço Por:     L$
-			</string>
-			<string name="Cost Mixed">
-				Preço Misturado
-			</string>
-			<string name="Sale Mixed">
-				Venda Misturada
-			</string>
-		</panel>
-		<panel label="Objeto" name="Object">
-			<text name="select_single">
-				Selecione apenas uma primitiva para editar os parâmetros.
-			</text>
-			<text name="edit_object">
-				Editar os parâmetros do Objeto:
-			</text>
-			<check_box label="Travado" name="checkbox locked" tool_tip="Previne que o objeto seja movido ou apagado. Muito útil para evitar edições não intencionais durante a construção."/>
-			<check_box label="Física" name="Physical Checkbox Ctrl" tool_tip="Permite que os objetos sejam empurrados e sofram efeito da gravidade"/>
-			<check_box label="Temporário" name="Temporary Checkbox Ctrl" tool_tip="Faz com que o objeto seja apagado 1 minuto após ser criado."/>
-			<check_box label="Fantasma" name="Phantom Checkbox Ctrl" tool_tip="Faz com que o objeto não colida com outros objetos ou avatares"/>
-			<text name="label position">
-				Posição (metros)
-			</text>
-			<spinner label="X" name="Pos X"/>
-			<spinner label="Y" name="Pos Y"/>
-			<spinner label="Z" name="Pos Z"/>
-			<text name="label size">
-				Tamanho (metros)
-			</text>
-			<spinner label="X" name="Scale X"/>
-			<spinner label="Y" name="Scale Y"/>
-			<spinner label="Z" name="Scale Z"/>
-			<text name="label rotation">
-				Rotação (graus)
-			</text>
-			<spinner label="X" name="Rot X"/>
-			<spinner label="Y" name="Rot Y"/>
-			<spinner label="Z" name="Rot Z"/>
-			<text name="label material">
-				Material
-			</text>
-			<combo_box name="material">
-				<combo_item name="Stone">
-					Pedra
-				</combo_item>
-				<combo_item name="Metal">
-					Metal
-				</combo_item>
-				<combo_item name="Glass">
-					Vidro
-				</combo_item>
-				<combo_item name="Wood">
-					Madeira
-				</combo_item>
-				<combo_item name="Flesh">
-					Carne
-				</combo_item>
-				<combo_item name="Plastic">
-					Plástico
-				</combo_item>
-				<combo_item name="Rubber">
-					Couro
-				</combo_item>
-			</combo_box>
-			<text name="label basetype">
-				Forma básica
-			</text>
-			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					Caixa
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilindro
-				</combo_item>
-				<combo_item name="Prism">
-					Prisma
-				</combo_item>
-				<combo_item name="Sphere">
-					Esfera
-				</combo_item>
-				<combo_item name="Torus">
-					Toróide
-				</combo_item>
-				<combo_item name="Tube">
-					Tubo
-				</combo_item>
-				<combo_item name="Ring">
-					Anel
-				</combo_item>
-				<combo_item name="Sculpted">
-					Esculpida
-				</combo_item>
-			</combo_box>
-			<text name="text cut">
-				Recorte inicial e final
-			</text>
-			<spinner label="B" name="cut begin"/>
-			<spinner label="E" name="cut end"/>
-			<text name="text hollow">
-				Vazio
-			</text>
-			<text name="text skew">
-				Torcer
-			</text>
-			<text name="Hollow Shape">
-				Forma Vazia
-			</text>
-			<combo_box name="hole">
-				<combo_item name="Default">
-					Padrão
-				</combo_item>
-				<combo_item name="Circle">
-					Circulo
-				</combo_item>
-				<combo_item name="Square">
-					Quadrado
-				</combo_item>
-				<combo_item name="Triangle">
-					Triâgulo
-				</combo_item>
-			</combo_box>
-			<text name="text twist">
-				Torcer no Início e final
-			</text>
-			<spinner label="B" name="Twist Begin"/>
-			<spinner label="E" name="Twist End"/>
-			<text name="scale_taper">
-				Afinar
-			</text>
-			<text name="scale_hole">
-				Tamanho do Buraco
-			</text>
-			<spinner label="X" name="Taper Scale X"/>
-			<spinner label="Y" name="Taper Scale Y"/>
-			<text name="text topshear">
-				Inclinar
-			</text>
-			<spinner label="X" name="Shear X"/>
-			<spinner label="Y" name="Shear Y"/>
-			<text name="advanced_cut">
-				Perfil Recortado no Início e Final
-			</text>
-			<text name="advanced_dimple">
-				Cova Início e Final
-			</text>
-			<spinner label="B" name="Path Limit Begin"/>
-			<spinner label="E" name="Path Limit End"/>
-			<text name="text taper2">
-				Afinar
-			</text>
-			<spinner label="X" name="Taper X"/>
-			<spinner label="Y" name="Taper Y"/>
-			<text name="text radius delta">
-				Raio
-			</text>
-			<text name="text revolutions">
-				Revoluções
-			</text>
-			<texture_picker label="Texture de Escultura" name="sculpt texture control" tool_tip="Click to choose a picture"/>
-			<check_box label="Espelho" name="sculpt mirror control" tool_tip="Inverter a primitiva esculpida ao longo do eixo X."/>
-			<check_box label="De dentro para fora" name="sculpt invert control" tool_tip="Inverte as normais das primitivas esculpidas, fazendo-as parecer de dentro para fora."/>
-			<text name="label sculpt type">
-				Tipo costura
-			</text>
-			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(nenhum)
-				</combo_item>
-				<combo_item name="Sphere">
-					Esfera
-				</combo_item>
-				<combo_item name="Torus">
-					Toróide
-				</combo_item>
-				<combo_item name="Plane">
-					Plano
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilindro
-				</combo_item>
-			</combo_box>
-		</panel>
-		<panel label="Recursos" name="Features">
-			<text name="select_single">
-				Selecione apenas uma primitiva para editar suas características.
-			</text>
-			<text name="edit_object">
-				Editar características do Objeto:
-			</text>
-			<check_box label="Flexíbilidade" name="Flexible1D Checkbox Ctrl" tool_tip="Permite que o objeto flexione no eixo Z. (Somente no lado do Cliente)"/>
-			<spinner label="Suavidade" name="FlexNumSections"/>
-			<spinner label="Gravidade" name="FlexGravity"/>
-			<spinner label="Arrastar" name="FlexFriction"/>
-			<spinner label="Vento" name="FlexWind"/>
-			<spinner label="Tensão" name="FlexTension"/>
-			<spinner label="Força X" name="FlexForceX"/>
-			<spinner label="Força Y" name="FlexForceY"/>
-			<spinner label="Força Z" name="FlexForceZ"/>
-			<check_box label="Luz" name="Light Checkbox Ctrl" tool_tip="Faz com que o objeto emita luz"/>
-			<text name="label color">
-				Cor
-			</text>
-			<color_swatch label="" name="colorswatch" tool_tip="Clique para abrir o Seletor de Cores"/>
-			<spinner label="Intensidade" name="Light Intensity"/>
-			<spinner label="Raio" name="Light Radius"/>
-			<spinner label="Queda" name="Light Falloff"/>
-		</panel>
-		<panel label="Textura" name="Texture">
-			<texture_picker label="Textura" name="texture control" tool_tip="Clique para escolher uma imagem"/>
-			<color_swatch label="Cor" name="colorswatch" tool_tip="Clique para abrir o Seletor de Cores"/>
-			<text name="color trans">
-				Transparência %
-			</text>
-			<text name="glow label">
-				Brilho
-			</text>
-			<check_box label="Claridade" name="checkbox fullbright"/>
-			<text name="tex gen">
-				Mapeamento
-			</text>
-			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					Padrão
-				</combo_item>
-				<combo_item name="Planar">
-					Planar
-				</combo_item>
-			</combo_box>
-			<text name="label shininess">
-				Brilho
-			</text>
-			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					Nenhum
-				</combo_item>
-				<combo_item name="Low">
-					Baixo
-				</combo_item>
-				<combo_item name="Medium">
-					Médio
-				</combo_item>
-				<combo_item name="High">
-					Alto
-				</combo_item>
-			</combo_box>
-			<text name="label bumpiness">
-				Ondulação
-			</text>
-			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					Nenhum
-				</combo_item>
-				<combo_item name="Brightness">
-					Claridade
-				</combo_item>
-				<combo_item name="Darkness">
-					Escuridão
-				</combo_item>
-				<combo_item name="woodgrain">
-					Granulação
-				</combo_item>
-				<combo_item name="bark">
-					casca
-				</combo_item>
-				<combo_item name="bricks">
-					Tijolos
-				</combo_item>
-				<combo_item name="checker">
-					Caixa
-				</combo_item>
-				<combo_item name="concrete">
-					Concreto
-				</combo_item>
-				<combo_item name="crustytile">
-					Encaroçado
-				</combo_item>
-				<combo_item name="cutstone">
-					Pedra Cortante
-				</combo_item>
-				<combo_item name="discs">
-					Discos
-				</combo_item>
-				<combo_item name="gravel">
-					Cascalho
-				</combo_item>
-				<combo_item name="petridish">
-					Pedrisco
-				</combo_item>
-				<combo_item name="siding">
-					Revestimento
-				</combo_item>
-				<combo_item name="stonetile">
-					empedrado
-				</combo_item>
-				<combo_item name="stucco">
-					Grafiato
-				</combo_item>
-				<combo_item name="suction">
-					Sulcos
-				</combo_item>
-				<combo_item name="weave">
-					weave
-				</combo_item>
-			</combo_box>
-			<text name="tex scale">
-				Repetir por Face
-			</text>
-			<spinner label="Horizontal (U)" name="TexScaleU"/>
-			<check_box label="Flip" name="checkbox flip s"/>
-			<spinner label="Vertical (V)" name="TexScaleV"/>
-			<check_box label="Flip" name="checkbox flip t"/>
-			<text name="tex rotate">
-				Rotação (graus)
-			</text>
-			<string name="string repeats per meter">
-				Repetir por Metro
-			</string>
-			<string name="string repeats per face">
-				Repetir por Face
-			</string>
-			<text name="rpt">
-				Repetir por Metro
-			</text>
-			<button label="Aplicar" label_selected="Aplicar" name="button apply"/>
-			<text name="tex offset">
-				Deslocamento
-			</text>
-			<spinner label="Horizontal (U)" name="TexOffsetU"/>
-			<spinner label="Vertical (V)" name="TexOffsetV"/>
-			<text name="textbox autofix">
-				Alinhar Texturas
-			</text>
-			<button label="Alinhar" label_selected="Alinhar" name="button align"/>
-		</panel>
-		<panel label="Conteúdo" name="Contents">
-			<button label="Novo Script..." label_selected="Novo Script..." name="button new script"/>
-		</panel>
-	</tab_container>
-	<panel name="land info panel">
-		<text name="label_area_price">
-			Preço: L$[PRICE] por [AREA] m².
-		</text>
-		<text name="label_area">
-			Área: [AREA] m².
-		</text>
-		<button label="Comprar Terra..." label_selected="Comprar Terra.." name="button buy land"/>
-		<button label="Abandonar Terra..." label_selected="Abandonar Terra..." name="button abandon land"/>
-		<button label="Sub-Dividir..." label_selected="Sub-Dividir..." name="button subdivide land"/>
-		<button label="Unir..." label_selected="Unir..." name="button join land"/>
-		<button label="Sobre a Terra..." label_selected="Sobre a Terra..." name="button about land"/>
-	</panel>
-	<string name="status_rotate">
-		Arrastar as bandas coloridas para girar o objeto
-	</string>
-	<string name="status_scale">
-		Clicar e arrastar para esticar o lado selecionado
-	</string>
-	<string name="status_move">
-		Arrastar para mover, Shift-arrastar para copiar
-	</string>
-	<string name="status_modifyland">
-		Clicar e reter para modificar a terra
-	</string>
-	<string name="status_camera">
-		Clicar e arrastar para mudar a vista
-	</string>
-	<string name="status_grab">
-		Arrastar para mover objetos, Ctrl para levantar, Ctrl-Shift para girar
-	</string>
-	<string name="status_place">
-		Clicar no mundo para criar, shift-clicar para selecionar
-	</string>
-	<string name="status_selectland">
-		Clicar e arrastar para selecionar a terra
-	</string>
-	<string name="grid_screen_text">
-		Tela
-	</string>
-	<string name="grid_local_text">
-		Local
-	</string>
-	<string name="grid_world_text">
-		Mundo
-	</string>
-	<string name="grid_reference_text">
-		Referência
-	</string>
-	<string name="grid_attachment_text">
-		Anexo
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="toolbox floater" title="">
+	<button label="" label_selected="" name="button focus" tool_tip="Foco"/>
+	<button label="" label_selected="" name="button move" tool_tip="Mover"/>
+	<button label="" label_selected="" name="button edit" tool_tip="Editar"/>
+	<button label="" label_selected="" name="button create" tool_tip="Criar"/>
+	<button label="" label_selected="" name="button land" tool_tip="Terra"/>
+	<check_box label="Zoom" name="radio zoom"/>
+	<check_box label="Órbita (Ctrl)" name="radio orbit"/>
+	<check_box label="Pan (Ctrl-Shift)" name="radio pan"/>
+	<check_box label="Mover" name="radio move"/>
+	<check_box label="Suspender (Ctrl)" name="radio lift"/>
+	<check_box label="Girar (Ctrl-Shift)" name="radio spin"/>
+	<check_box label="Posição" name="radio position"/>
+	<check_box label="Rotacionar (Ctrl)" name="radio rotate"/>
+	<check_box label="Esticar (Ctrl-Shift)" name="radio stretch"/>
+	<check_box label="Selecionar Textura" name="radio select face"/>
+	<check_box label="Editar partes unidas" name="checkbox edit linked parts"/>
+	<text name="text ruler mode">
+		Modo da régua:
+	</text>
+	<combo_box name="combobox grid mode">
+		<combo_item name="World">
+			Mundo
+		</combo_item>
+		<combo_item name="Local">
+			Local
+		</combo_item>
+		<combo_item name="Reference">
+			Referência
+		</combo_item>
+	</combo_box>
+	<check_box label="Esticar ambos os lados" name="checkbox uniform"/>
+	<check_box label="Esticar Texturas" name="checkbox stretch textures"/>
+	<check_box label="Usar Grade" name="checkbox snap to grid"/>
+	<button label="Opções..." label_selected="Opções..." name="Options..."/>
+	<text name="text status">
+		Arraste para mover, shift+Arrastar para Copiar
+	</text>
+	<button label="" label_selected="" name="ToolCube" tool_tip="Cubo"/>
+	<button label="" label_selected="" name="ToolPrism" tool_tip="Prisma"/>
+	<button label="" label_selected="" name="ToolPyramid" tool_tip="Pirâmide"/>
+	<button label="" label_selected="" name="ToolTetrahedron" tool_tip="Tetraedro"/>
+	<button label="" label_selected="" name="ToolCylinder" tool_tip="Cilindro"/>
+	<button label="" label_selected="" name="ToolHemiCylinder" tool_tip="Semi-cilindro"/>
+	<button label="" label_selected="" name="ToolCone" tool_tip="Cone"/>
+	<button label="" label_selected="" name="ToolHemiCone" tool_tip="Semi-cone"/>
+	<button label="" label_selected="" name="ToolSphere" tool_tip="Esfera"/>
+	<button label="" label_selected="" name="ToolHemiSphere" tool_tip="Semi-esfera"/>
+	<button label="" label_selected="" name="ToolTorus" tool_tip="Toróide"/>
+	<button label="" label_selected="" name="ToolTube" tool_tip="Tubo"/>
+	<button label="" label_selected="" name="ToolRing" tool_tip="Anel"/>
+	<button label="" label_selected="" name="ToolTree" tool_tip="Árvore"/>
+	<button label="" label_selected="" name="ToolGrass" tool_tip="Grama"/>
+	<check_box label="Manter ferramenta selecionada" name="checkbox sticky"/>
+	<check_box label="Copiar Seleção" name="checkbox copy selection"/>
+	<check_box label="Copiar Centro" name="checkbox copy centers"/>
+	<check_box label="Rotacionar Cópia" name="checkbox copy rotates"/>
+	<check_box label="Selecionar Terra" name="radio select land"/>
+	<check_box label="Aplainar Terra" name="radio flatten"/>
+	<check_box label="Elevar Terra" name="radio raise"/>
+	<check_box label="Baixar Terra" name="radio lower"/>
+	<check_box label="Suavizar Terra" name="radio smooth"/>
+	<check_box label="Terreno Rígido" name="radio noise"/>
+	<check_box label="Reverter Terra" name="radio revert"/>
+	<combo_box name="combobox brush size">
+		<combo_item name="Small">
+			Pequeno
+		</combo_item>
+		<combo_item name="Medium">
+			Médio
+		</combo_item>
+		<combo_item name="Large">
+			Grande
+		</combo_item>
+	</combo_box>
+	<text name="Strength:">
+		Força:
+	</text>
+	<button label="Aplicar no selecionado" label_selected="Aplicar no selecionado" name="button apply to selection" tool_tip="Modificar Terra Selecionada"/>
+	<check_box label="Mostrar Proprietários" name="checkbox show owners"/>
+	<button label="Mais &gt;&gt;" name="button more" tool_tip="Opções Avançadas"/>
+	<button label="&lt;&lt; Menos" name="button less" tool_tip="Opções Avançadas"/>
+	<tab_container name="Object Info Tabs">
+		<panel label="Comum" name="General">
+			<text name="Name:">
+				Nome:
+			</text>
+			<text name="Description:">
+				Descrição:
+			</text>
+			<text name="Creator:">
+				Criador:
+			</text>
+			<text name="Creator Name">
+				Thrax Linden
+			</text>
+			<button label="Perfil..." label_selected="Perfil..." name="button creator profile"/>
+			<text name="Owner:">
+				Proprietário:
+			</text>
+			<text name="Owner Name">
+				Thrax Linden
+			</text>
+			<button label="Perfil..." label_selected="Perfil..." name="button owner profile"/>
+			<text name="Group:">
+				Grupo:
+			</text>
+			<text name="Group Name Proxy">
+				Os Lindens
+			</text>
+			<button label="Definir..." label_selected="Definir..." name="button set group"/>
+			<text name="prim info">
+				1 Objeto, 1 Primitiva
+			</text>
+			<text name="Permissions:">
+				Permissões:
+			</text>
+			<text name="perm_modify">
+				Você pode modificar este objeto.
+			</text>
+			<check_box label="Compartilhar com o Grupo" name="checkbox share with group" tool_tip="Permitir que o membros do grupo movam, modifiquem, copiem e apaguem"/>
+			<string name="text deed continued">
+				Doar...
+			</string>
+			<string name="text deed">
+				Doar
+			</string>
+			<button label="Doar..." label_selected="Doar..." name="button deed" tool_tip="Objetos compartilhados do Grupo pode ser doados pelo gerente do grupo."/>
+			<check_box label="Permitir que qualquer um mova" name="checkbox allow everyone move"/>
+			<check_box label="Permitir que qualquer um copie" name="checkbox allow everyone copy"/>
+			<check_box label="Mostrar na busca" name="search_check" tool_tip="Permitir que as pessoas vejam este objeto nos resultados de busca"/>
+			<check_box label="À Venda" name="checkbox for sale"/>
+			<text name="Cost">
+				Preço:  L$
+			</text>
+			<radio_group name="sale type">
+				<radio_item name="Original">
+					Original
+				</radio_item>
+				<radio_item name="Copy">
+					Cópia
+				</radio_item>
+				<radio_item name="Contents">
+					Conteúdo
+				</radio_item>
+			</radio_group>
+			<text name="Next owner can:">
+				Próximo Proprietário pode:
+			</text>
+			<check_box label="Modificar" name="checkbox next owner can modify"/>
+			<check_box label="Copiar" name="checkbox next owner can copy"/>
+			<check_box label="Revender/Dar" name="checkbox next owner can transfer"/>
+			<text name="label click action">
+				Quando clicado com o botão esquerdo:
+			</text>
+			<combo_box name="clickaction">
+				<combo_item name="Touch/grab(default)">
+					Tocar/Pegar (padrão)
+				</combo_item>
+				<combo_item name="Sitonobject">
+					Sentar no objeto
+				</combo_item>
+				<combo_item name="Buyobject">
+					Comprar objeto
+				</combo_item>
+				<combo_item name="Payobject">
+					Pagar Objeto
+				</combo_item>
+				<combo_item name="Open">
+					Abrir
+				</combo_item>
+				<combo_item name="Play">
+					Executar a mídia do lote
+				</combo_item>
+				<combo_item name="Opemmedia">
+					Abrir a mídia do lote
+				</combo_item>
+			</combo_box>
+			<text name="B:">
+				B:
+			</text>
+			<text name="O:">
+				O;
+			</text>
+			<text name="G:">
+				G:
+			</text>
+			<text name="E:">
+				E:
+			</text>
+			<text name="N:">
+				N:
+			</text>
+			<text name="F:">
+				F:
+			</text>
+			<string name="text modify info 1">
+				Você pode modificar este objeto.
+			</string>
+			<string name="text modify info 2">
+				Você pode modificar estes objetos.
+			</string>
+			<string name="text modify info 3">
+				Você não pode modificar este objeto.
+			</string>
+			<string name="text modify info 4">
+				Você não pode modificar estes objetos.
+			</string>
+			<string name="text modify warning">
+				Você precisa selecionar o objeto todo para ajustar as permissões.
+			</string>
+			<string name="Cost Default">
+				Preço:           L$
+			</string>
+			<string name="Cost Total">
+				Preço Total:  L$
+			</string>
+			<string name="Cost Per Unit">
+				Preço Por:     L$
+			</string>
+			<string name="Cost Mixed">
+				Preço Misturado
+			</string>
+			<string name="Sale Mixed">
+				Venda Misturada
+			</string>
+		</panel>
+		<panel label="Objeto" name="Object">
+			<text name="select_single">
+				Selecione apenas uma primitiva para editar os parâmetros.
+			</text>
+			<text name="edit_object">
+				Editar os parâmetros do Objeto:
+			</text>
+			<check_box label="Travado" name="checkbox locked" tool_tip="Previne que o objeto seja movido ou apagado. Muito útil para evitar edições não intencionais durante a construção."/>
+			<check_box label="Física" name="Physical Checkbox Ctrl" tool_tip="Permite que os objetos sejam empurrados e sofram efeito da gravidade"/>
+			<check_box label="Temporário" name="Temporary Checkbox Ctrl" tool_tip="Faz com que o objeto seja apagado 1 minuto após ser criado."/>
+			<check_box label="Fantasma" name="Phantom Checkbox Ctrl" tool_tip="Faz com que o objeto não colida com outros objetos ou avatares"/>
+			<text name="label position">
+				Posição (metros)
+			</text>
+			<spinner label="X" name="Pos X"/>
+			<spinner label="Y" name="Pos Y"/>
+			<spinner label="Z" name="Pos Z"/>
+			<text name="label size">
+				Tamanho (metros)
+			</text>
+			<spinner label="X" name="Scale X"/>
+			<spinner label="Y" name="Scale Y"/>
+			<spinner label="Z" name="Scale Z"/>
+			<text name="label rotation">
+				Rotação (graus)
+			</text>
+			<spinner label="X" name="Rot X"/>
+			<spinner label="Y" name="Rot Y"/>
+			<spinner label="Z" name="Rot Z"/>
+			<text name="label material">
+				Material
+			</text>
+			<combo_box name="material">
+				<combo_item name="Stone">
+					Pedra
+				</combo_item>
+				<combo_item name="Metal">
+					Metal
+				</combo_item>
+				<combo_item name="Glass">
+					Vidro
+				</combo_item>
+				<combo_item name="Wood">
+					Madeira
+				</combo_item>
+				<combo_item name="Flesh">
+					Carne
+				</combo_item>
+				<combo_item name="Plastic">
+					Plástico
+				</combo_item>
+				<combo_item name="Rubber">
+					Couro
+				</combo_item>
+			</combo_box>
+			<text name="label basetype">
+				Forma básica
+			</text>
+			<combo_box name="comboBaseType">
+				<combo_item name="Box">
+					Caixa
+				</combo_item>
+				<combo_item name="Cylinder">
+					Cilindro
+				</combo_item>
+				<combo_item name="Prism">
+					Prisma
+				</combo_item>
+				<combo_item name="Sphere">
+					Esfera
+				</combo_item>
+				<combo_item name="Torus">
+					Toróide
+				</combo_item>
+				<combo_item name="Tube">
+					Tubo
+				</combo_item>
+				<combo_item name="Ring">
+					Anel
+				</combo_item>
+				<combo_item name="Sculpted">
+					Esculpida
+				</combo_item>
+			</combo_box>
+			<text name="text cut">
+				Recorte inicial e final
+			</text>
+			<spinner label="B" name="cut begin"/>
+			<spinner label="E" name="cut end"/>
+			<text name="text hollow">
+				Vazio
+			</text>
+			<text name="text skew">
+				Torcer
+			</text>
+			<text name="Hollow Shape">
+				Forma Vazia
+			</text>
+			<combo_box name="hole">
+				<combo_item name="Default">
+					Padrão
+				</combo_item>
+				<combo_item name="Circle">
+					Circulo
+				</combo_item>
+				<combo_item name="Square">
+					Quadrado
+				</combo_item>
+				<combo_item name="Triangle">
+					Triâgulo
+				</combo_item>
+			</combo_box>
+			<text name="text twist">
+				Torcer no Início e final
+			</text>
+			<spinner label="B" name="Twist Begin"/>
+			<spinner label="E" name="Twist End"/>
+			<text name="scale_taper">
+				Afinar
+			</text>
+			<text name="scale_hole">
+				Tamanho do Buraco
+			</text>
+			<spinner label="X" name="Taper Scale X"/>
+			<spinner label="Y" name="Taper Scale Y"/>
+			<text name="text topshear">
+				Inclinar
+			</text>
+			<spinner label="X" name="Shear X"/>
+			<spinner label="Y" name="Shear Y"/>
+			<text name="advanced_cut">
+				Perfil Recortado no Início e Final
+			</text>
+			<text name="advanced_dimple">
+				Cova Início e Final
+			</text>
+			<spinner label="B" name="Path Limit Begin"/>
+			<spinner label="E" name="Path Limit End"/>
+			<text name="text taper2">
+				Afinar
+			</text>
+			<spinner label="X" name="Taper X"/>
+			<spinner label="Y" name="Taper Y"/>
+			<text name="text radius delta">
+				Raio
+			</text>
+			<text name="text revolutions">
+				Revoluções
+			</text>
+			<texture_picker label="Texture de Escultura" name="sculpt texture control" tool_tip="Click to choose a picture"/>
+			<check_box label="Espelho" name="sculpt mirror control" tool_tip="Inverter a primitiva esculpida ao longo do eixo X."/>
+			<check_box label="De dentro para fora" name="sculpt invert control" tool_tip="Inverte as normais das primitivas esculpidas, fazendo-as parecer de dentro para fora."/>
+			<text name="label sculpt type">
+				Tipo costura
+			</text>
+			<combo_box name="sculpt type control">
+				<combo_item name="None">
+					(nenhum)
+				</combo_item>
+				<combo_item name="Sphere">
+					Esfera
+				</combo_item>
+				<combo_item name="Torus">
+					Toróide
+				</combo_item>
+				<combo_item name="Plane">
+					Plano
+				</combo_item>
+				<combo_item name="Cylinder">
+					Cilindro
+				</combo_item>
+			</combo_box>
+		</panel>
+		<panel label="Recursos" name="Features">
+			<text name="select_single">
+				Selecione apenas uma primitiva para editar suas características.
+			</text>
+			<text name="edit_object">
+				Editar características do Objeto:
+			</text>
+			<check_box label="Flexíbilidade" name="Flexible1D Checkbox Ctrl" tool_tip="Permite que o objeto flexione no eixo Z. (Somente no lado do Cliente)"/>
+			<spinner label="Suavidade" name="FlexNumSections"/>
+			<spinner label="Gravidade" name="FlexGravity"/>
+			<spinner label="Arrastar" name="FlexFriction"/>
+			<spinner label="Vento" name="FlexWind"/>
+			<spinner label="Tensão" name="FlexTension"/>
+			<spinner label="Força X" name="FlexForceX"/>
+			<spinner label="Força Y" name="FlexForceY"/>
+			<spinner label="Força Z" name="FlexForceZ"/>
+			<check_box label="Luz" name="Light Checkbox Ctrl" tool_tip="Faz com que o objeto emita luz"/>
+			<text name="label color">
+				Cor
+			</text>
+			<color_swatch label="" name="colorswatch" tool_tip="Clique para abrir o Seletor de Cores"/>
+			<spinner label="Intensidade" name="Light Intensity"/>
+			<spinner label="Raio" name="Light Radius"/>
+			<spinner label="Queda" name="Light Falloff"/>
+		</panel>
+		<panel label="Textura" name="Texture">
+			<texture_picker label="Textura" name="texture control" tool_tip="Clique para escolher uma imagem"/>
+			<color_swatch label="Cor" name="colorswatch" tool_tip="Clique para abrir o Seletor de Cores"/>
+			<text name="color trans">
+				Transparência %
+			</text>
+			<text name="glow label">
+				Brilho
+			</text>
+			<check_box label="Claridade" name="checkbox fullbright"/>
+			<text name="tex gen">
+				Mapeamento
+			</text>
+			<combo_box name="combobox texgen">
+				<combo_item name="Default">
+					Padrão
+				</combo_item>
+				<combo_item name="Planar">
+					Planar
+				</combo_item>
+			</combo_box>
+			<text name="label shininess">
+				Brilho
+			</text>
+			<combo_box name="combobox shininess">
+				<combo_item name="None">
+					Nenhum
+				</combo_item>
+				<combo_item name="Low">
+					Baixo
+				</combo_item>
+				<combo_item name="Medium">
+					Médio
+				</combo_item>
+				<combo_item name="High">
+					Alto
+				</combo_item>
+			</combo_box>
+			<text name="label bumpiness">
+				Ondulação
+			</text>
+			<combo_box name="combobox bumpiness">
+				<combo_item name="None">
+					Nenhum
+				</combo_item>
+				<combo_item name="Brightness">
+					Claridade
+				</combo_item>
+				<combo_item name="Darkness">
+					Escuridão
+				</combo_item>
+				<combo_item name="woodgrain">
+					Granulação
+				</combo_item>
+				<combo_item name="bark">
+					casca
+				</combo_item>
+				<combo_item name="bricks">
+					Tijolos
+				</combo_item>
+				<combo_item name="checker">
+					Caixa
+				</combo_item>
+				<combo_item name="concrete">
+					Concreto
+				</combo_item>
+				<combo_item name="crustytile">
+					Encaroçado
+				</combo_item>
+				<combo_item name="cutstone">
+					Pedra Cortante
+				</combo_item>
+				<combo_item name="discs">
+					Discos
+				</combo_item>
+				<combo_item name="gravel">
+					Cascalho
+				</combo_item>
+				<combo_item name="petridish">
+					Pedrisco
+				</combo_item>
+				<combo_item name="siding">
+					Revestimento
+				</combo_item>
+				<combo_item name="stonetile">
+					empedrado
+				</combo_item>
+				<combo_item name="stucco">
+					Grafiato
+				</combo_item>
+				<combo_item name="suction">
+					Sulcos
+				</combo_item>
+				<combo_item name="weave">
+					weave
+				</combo_item>
+			</combo_box>
+			<text name="tex scale">
+				Repetir por Face
+			</text>
+			<spinner label="Horizontal (U)" name="TexScaleU"/>
+			<check_box label="Flip" name="checkbox flip s"/>
+			<spinner label="Vertical (V)" name="TexScaleV"/>
+			<check_box label="Flip" name="checkbox flip t"/>
+			<text name="tex rotate">
+				Rotação (graus)
+			</text>
+			<string name="string repeats per meter">
+				Repetir por Metro
+			</string>
+			<string name="string repeats per face">
+				Repetir por Face
+			</string>
+			<text name="rpt">
+				Repetir por Metro
+			</text>
+			<button label="Aplicar" label_selected="Aplicar" name="button apply"/>
+			<text name="tex offset">
+				Deslocamento
+			</text>
+			<spinner label="Horizontal (U)" name="TexOffsetU"/>
+			<spinner label="Vertical (V)" name="TexOffsetV"/>
+			<text name="textbox autofix">
+				Alinhar Texturas
+			</text>
+			<button label="Alinhar" label_selected="Alinhar" name="button align"/>
+		</panel>
+		<panel label="Conteúdo" name="Contents">
+			<button label="Novo Script..." label_selected="Novo Script..." name="button new script"/>
+		</panel>
+	</tab_container>
+	<panel name="land info panel">
+		<text name="label_area_price">
+			Preço: L$[PRICE] por [AREA] m².
+		</text>
+		<text name="label_area">
+			Área: [AREA] m².
+		</text>
+		<button label="Comprar Terra..." label_selected="Comprar Terra.." name="button buy land"/>
+		<button label="Abandonar Terra..." label_selected="Abandonar Terra..." name="button abandon land"/>
+		<button label="Sub-Dividir..." label_selected="Sub-Dividir..." name="button subdivide land"/>
+		<button label="Unir..." label_selected="Unir..." name="button join land"/>
+		<button label="Sobre a Terra..." label_selected="Sobre a Terra..." name="button about land"/>
+	</panel>
+	<string name="status_rotate">
+		Arrastar as bandas coloridas para girar o objeto
+	</string>
+	<string name="status_scale">
+		Clicar e arrastar para esticar o lado selecionado
+	</string>
+	<string name="status_move">
+		Arrastar para mover, Shift-arrastar para copiar
+	</string>
+	<string name="status_modifyland">
+		Clicar e reter para modificar a terra
+	</string>
+	<string name="status_camera">
+		Clicar e arrastar para mudar a vista
+	</string>
+	<string name="status_grab">
+		Arrastar para mover objetos, Ctrl para levantar, Ctrl-Shift para girar
+	</string>
+	<string name="status_place">
+		Clicar no mundo para criar, shift-clicar para selecionar
+	</string>
+	<string name="status_selectland">
+		Clicar e arrastar para selecionar a terra
+	</string>
+	<string name="grid_screen_text">
+		Tela
+	</string>
+	<string name="grid_local_text">
+		Local
+	</string>
+	<string name="grid_world_text">
+		Mundo
+	</string>
+	<string name="grid_reference_text">
+		Referência
+	</string>
+	<string name="grid_attachment_text">
+		Anexo
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_top_objects.xml b/indra/newview/skins/default/xui/pt/floater_top_objects.xml
index 1cbe42eb09..694100297d 100644
--- a/indra/newview/skins/default/xui/pt/floater_top_objects.xml
+++ b/indra/newview/skins/default/xui/pt/floater_top_objects.xml
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="top_objects" title="Carregando...">
-	<text name="title_text">
-		Carregando...
-	</text>
-	<scroll_list name="objects_list">
-		<column label="Placar" name="score"/>
-		<column label="Nome" name="name"/>
-		<column label="Proprietário" name="owner"/>
-		<column label="Local" name="location"/>
-		<column label="Tempo" name="time"/>
-		<column label="Hora Mono" name="mono_time"/>
-	</scroll_list>
-	<text name="id_text">
-		ID do Objeto:
-	</text>
-	<button label="Mostrar Avisos" name="show_beacon_btn"/>
-	<text name="obj_name_text">
-		Nome do Objeto:
-	</text>
-	<button label="Filtro" name="filter_object_btn"/>
-	<text name="owner_name_text">
-		Nome do Proprietário:
-	</text>
-	<button label="Filtro" name="filter_owner_btn"/>
-	<button label="Retornar Selecionado" name="return_selected_btn"/>
-	<button label="Retornar Tudo" name="return_all_btn"/>
-	<button label="Desabilitar Selecionado" name="disable_selected_btn"/>
-	<button label="Desabilitar Tudo" name="disable_all_btn"/>
-	<button label="Atualizar" name="refresh_btn"/>
-	<string name="top_scripts_title">
-		Principais Scripts
-	</string>
-	<string name="top_scripts_text">
-		[COUNT] scripts tomando um total de [TIME] ms
-	</string>
-	<string name="scripts_score_label">
-		Tempo
-	</string>
-	<string name="scripts_mono_time_label">
-		Hora Mono
-	</string>
-	<string name="top_colliders_title">
-		Principais Colidentes
-	</string>
-	<string name="top_colliders_text">
-		[COUNT] objetos principais experimentando muitas potenciais colisões
-	</string>
-	<string name="colliders_score_label">
-		Placar
-	</string>
-	<string name="none_descriptor">
-		Nenhum encontrado.
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="top_objects" title="Carregando...">
+	<text name="title_text">
+		Carregando...
+	</text>
+	<scroll_list name="objects_list">
+		<column label="Placar" name="score"/>
+		<column label="Nome" name="name"/>
+		<column label="Proprietário" name="owner"/>
+		<column label="Local" name="location"/>
+		<column label="Tempo" name="time"/>
+		<column label="Hora Mono" name="mono_time"/>
+	</scroll_list>
+	<text name="id_text">
+		ID do Objeto:
+	</text>
+	<button label="Mostrar Avisos" name="show_beacon_btn"/>
+	<text name="obj_name_text">
+		Nome do Objeto:
+	</text>
+	<button label="Filtro" name="filter_object_btn"/>
+	<text name="owner_name_text">
+		Nome do Proprietário:
+	</text>
+	<button label="Filtro" name="filter_owner_btn"/>
+	<button label="Retornar Selecionado" name="return_selected_btn"/>
+	<button label="Retornar Tudo" name="return_all_btn"/>
+	<button label="Desabilitar Selecionado" name="disable_selected_btn"/>
+	<button label="Desabilitar Tudo" name="disable_all_btn"/>
+	<button label="Atualizar" name="refresh_btn"/>
+	<string name="top_scripts_title">
+		Principais Scripts
+	</string>
+	<string name="top_scripts_text">
+		[COUNT] scripts tomando um total de [TIME] ms
+	</string>
+	<string name="scripts_score_label">
+		Tempo
+	</string>
+	<string name="scripts_mono_time_label">
+		Hora Mono
+	</string>
+	<string name="top_colliders_title">
+		Principais Colidentes
+	</string>
+	<string name="top_colliders_text">
+		[COUNT] objetos principais experimentando muitas potenciais colisões
+	</string>
+	<string name="colliders_score_label">
+		Placar
+	</string>
+	<string name="none_descriptor">
+		Nenhum encontrado.
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_tos.xml b/indra/newview/skins/default/xui/pt/floater_tos.xml
index 91c31ccce6..5da34d2de7 100644
--- a/indra/newview/skins/default/xui/pt/floater_tos.xml
+++ b/indra/newview/skins/default/xui/pt/floater_tos.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="modal container" title=" ">
-	<button label="Continuar" label_selected="Continuar" name="Continue"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-	<check_box label="Eu concordo com os Termos do Serviço" name="agree_chk"/>
-	<text name="tos_heading">
-		Por favor, leia os seguintes Termos de Serviço cuidadosamente. Para continuar acessando o Second Life, você precisa aceitar o acordo.
-	</text>
-	<text_editor name="tos_text">
-		TOS_TEXT
-	</text_editor>
-	<string name="real_url">
-		http://secondlife.com/app/tos/
-	</string>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="modal container" title=" ">
+	<button label="Continuar" label_selected="Continuar" name="Continue"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+	<check_box label="Eu concordo com os Termos do Serviço" name="agree_chk"/>
+	<text name="tos_heading">
+		Por favor, leia os seguintes Termos de Serviço cuidadosamente. Para continuar acessando o Second Life, você precisa aceitar o acordo.
+	</text>
+	<text_editor name="tos_text">
+		TOS_TEXT
+	</text_editor>
+	<string name="real_url">
+		http://secondlife.com/app/tos/
+	</string>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_url_entry.xml b/indra/newview/skins/default/xui/pt/floater_url_entry.xml
index 276a51ebee..a4ae5e2e3d 100644
--- a/indra/newview/skins/default/xui/pt/floater_url_entry.xml
+++ b/indra/newview/skins/default/xui/pt/floater_url_entry.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="url_entry" title="">
-	<text name="media_label">
-		URL da Mídia:
-	</text>
-	<button label="OK" name="ok_btn"/>
-	<button label="Cancelar" name="cancel_btn"/>
-	<button label="Limpar" name="clear_btn"/>
-	<text name="loading_label">
-		Carregando..
-	</text>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="url_entry" title="">
+	<text name="media_label">
+		URL da Mídia:
+	</text>
+	<button label="OK" name="ok_btn"/>
+	<button label="Cancelar" name="cancel_btn"/>
+	<button label="Limpar" name="clear_btn"/>
+	<text name="loading_label">
+		Carregando..
+	</text>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_water.xml b/indra/newview/skins/default/xui/pt/floater_water.xml
index d6f261f872..007eb3f6ba 100644
--- a/indra/newview/skins/default/xui/pt/floater_water.xml
+++ b/indra/newview/skins/default/xui/pt/floater_water.xml
@@ -1,85 +1,85 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Water Floater" title="Editor de Água Avançado">
-	<text name="KeyFramePresetsText">
-		Pré-configurações da Água:
-	</text>
-	<button label="Novo" label_selected="Novo" name="WaterNewPreset"/>
-	<button label="Salvar" label_selected="Salvar" name="WaterSavePreset"/>
-	<button label="Deletar" label_selected="Deletar" name="WaterDeletePreset"/>
-	<tab_container name="Water Tabs">
-		<panel label="Configurações" name="Settings">
-			<text name="BHText">
-				Cor da névoa da Água
-			</text>
-			<button label="?" name="WaterFogColorHelp"/>
-			<color_swatch label="" name="WaterFogColor" tool_tip="Clique para abrir o Capturador de Cor"/>
-			<text name="WaterFogDensText">
-				Expoente da Densidade de névoa
-			</text>
-			<button label="?" name="WaterFogDensityHelp"/>
-			<text name="WaterUnderWaterFogModText">
-				Modificador da névoa Subaquática
-			</text>
-			<button label="?" name="WaterUnderWaterFogModHelp"/>
-			<text name="BDensText">
-				Escala da Marola de Reflexão
-			</text>
-			<button label="?" name="WaterNormalScaleHelp"/>
-			<text name="BHText2">
-				1
-			</text>
-			<text name="BHText3">
-				2
-			</text>
-			<text name="BHText4">
-				3
-			</text>
-			<text name="HDText">
-				Escala de Fresnel
-			</text>
-			<button label="?" name="WaterFresnelScaleHelp"/>
-			<text name="FresnelOffsetText">
-				Deslocamento de Fresnel
-			</text>
-			<button label="?" name="WaterFresnelOffsetHelp"/>
-			<text name="DensMultText">
-				Refratar a Escala para Cima
-			</text>
-			<button label="?" name="WaterScaleAboveHelp"/>
-			<text name="WaterScaleBelowText">
-				Refratar a Escala para Baixo
-			</text>
-			<button label="?" name="WaterScaleBelowHelp"/>
-			<text name="MaxAltText">
-				Multiplicador de Difusão
-			</text>
-			<button label="?" name="WaterBlurMultiplierHelp"/>
-		</panel>
-		<panel label="Imagem" name="Waves">
-			<text name="BHText">
-				Direção da Onda Maior
-			</text>
-			<button label="?" name="WaterWave1Help"/>
-			<text name="WaterWave1DirXText">
-				X
-			</text>
-			<text name="WaterWave1DirYText">
-				Y
-			</text>
-			<text name="BHText2">
-				Direção da Onda Pequena
-			</text>
-			<button label="?" name="WaterWave2Help"/>
-			<text name="WaterWave2DirXText">
-				X
-			</text>
-			<text name="WaterWave2DirYText">
-				Y
-			</text>
-			<text name="BHText3">
-				Mapa Normal
-			</text>
-			<button label="?" name="WaterNormalMapHelp"/>
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="Water Floater" title="Editor de Água Avançado">
+	<text name="KeyFramePresetsText">
+		Pré-configurações da Água:
+	</text>
+	<button label="Novo" label_selected="Novo" name="WaterNewPreset"/>
+	<button label="Salvar" label_selected="Salvar" name="WaterSavePreset"/>
+	<button label="Deletar" label_selected="Deletar" name="WaterDeletePreset"/>
+	<tab_container name="Water Tabs">
+		<panel label="Configurações" name="Settings">
+			<text name="BHText">
+				Cor da névoa da Água
+			</text>
+			<button label="?" name="WaterFogColorHelp"/>
+			<color_swatch label="" name="WaterFogColor" tool_tip="Clique para abrir o Capturador de Cor"/>
+			<text name="WaterFogDensText">
+				Expoente da Densidade de névoa
+			</text>
+			<button label="?" name="WaterFogDensityHelp"/>
+			<text name="WaterUnderWaterFogModText">
+				Modificador da névoa Subaquática
+			</text>
+			<button label="?" name="WaterUnderWaterFogModHelp"/>
+			<text name="BDensText">
+				Escala da Marola de Reflexão
+			</text>
+			<button label="?" name="WaterNormalScaleHelp"/>
+			<text name="BHText2">
+				1
+			</text>
+			<text name="BHText3">
+				2
+			</text>
+			<text name="BHText4">
+				3
+			</text>
+			<text name="HDText">
+				Escala de Fresnel
+			</text>
+			<button label="?" name="WaterFresnelScaleHelp"/>
+			<text name="FresnelOffsetText">
+				Deslocamento de Fresnel
+			</text>
+			<button label="?" name="WaterFresnelOffsetHelp"/>
+			<text name="DensMultText">
+				Refratar a Escala para Cima
+			</text>
+			<button label="?" name="WaterScaleAboveHelp"/>
+			<text name="WaterScaleBelowText">
+				Refratar a Escala para Baixo
+			</text>
+			<button label="?" name="WaterScaleBelowHelp"/>
+			<text name="MaxAltText">
+				Multiplicador de Difusão
+			</text>
+			<button label="?" name="WaterBlurMultiplierHelp"/>
+		</panel>
+		<panel label="Imagem" name="Waves">
+			<text name="BHText">
+				Direção da Onda Maior
+			</text>
+			<button label="?" name="WaterWave1Help"/>
+			<text name="WaterWave1DirXText">
+				X
+			</text>
+			<text name="WaterWave1DirYText">
+				Y
+			</text>
+			<text name="BHText2">
+				Direção da Onda Pequena
+			</text>
+			<button label="?" name="WaterWave2Help"/>
+			<text name="WaterWave2DirXText">
+				X
+			</text>
+			<text name="WaterWave2DirYText">
+				Y
+			</text>
+			<text name="BHText3">
+				Mapa Normal
+			</text>
+			<button label="?" name="WaterNormalMapHelp"/>
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_wearable_save_as.xml b/indra/newview/skins/default/xui/pt/floater_wearable_save_as.xml
index f3adc82465..3f08b4b992 100644
--- a/indra/newview/skins/default/xui/pt/floater_wearable_save_as.xml
+++ b/indra/newview/skins/default/xui/pt/floater_wearable_save_as.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="modal container" title=" ">
-	<button label="Salvar" label_selected="Salvar" name="Save"/>
-	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
-	<text length="1" name="Save item as:" type="string">
-		Salvar item como:
-	</text>
-	<line_editor name="name ed">
-		Novo [DESC]
-	</line_editor>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="modal container" title=" ">
+	<button label="Salvar" label_selected="Salvar" name="Save"/>
+	<button label="Cancelar" label_selected="Cancelar" name="Cancel"/>
+	<text length="1" name="Save item as:" type="string">
+		Salvar item como:
+	</text>
+	<line_editor name="name ed">
+		Novo [DESC]
+	</line_editor>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_windlight_options.xml b/indra/newview/skins/default/xui/pt/floater_windlight_options.xml
index ff22a87200..f86775c770 100644
--- a/indra/newview/skins/default/xui/pt/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/pt/floater_windlight_options.xml
@@ -1,186 +1,186 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="WindLight floater" title="Editor de Céu Avançado">
-	<text name="KeyFramePresetsText">
-		Pré-definições de Céu:
-	</text>
-	<button label="Novo" label_selected="Novo" name="WLNewPreset"/>
-	<button label="Salvar" label_selected="Salvar" name="WLSavePreset"/>
-	<button label="Deletar" label_selected="Deletar" name="WLDeletePreset"/>
-	<button label="Editor de Ciclos do Dia" label_selected="Editor de Ciclos do Dia" name="WLDayCycleMenuButton" width="150" left_delta="95" />
-	<tab_container name="WindLight Tabs">
-		<panel label="Atmosfera" name="Atmosphere">
-			<text name="BHText">
-				Horizonte Azul
-			</text>
-			<button label="?" name="WLBlueHorizonHelp"/>
-			<text name="BHText2">
-				R
-			</text>
-			<text name="BHText3">
-				G
-			</text>
-			<text name="BHText4">
-				B
-			</text>
-			<text name="BHText5">
-				I
-			</text>
-			<text name="BDensText">
-				Horizonte da Neblina
-			</text>
-			<button label="?" name="WLHazeHorizonHelp"/>
-			<text name="BDensText2">
-				Densidade de Azul
-			</text>
-			<button label="?" name="WLBlueDensityHelp"/>
-			<text name="BHText6">
-				R
-			</text>
-			<text name="BHText7">
-				G
-			</text>
-			<text name="BHText8">
-				B
-			</text>
-			<text name="BHText9">
-				I
-			</text>
-			<text name="HDText">
-				Densidade da Neblina
-			</text>
-			<button label="?" name="WLHazeDensityHelp"/>
-			<text name="DensMultText">
-				Multiplicador de Densidade
-			</text>
-			<button label="?" name="WLDensityMultHelp"/>
-			<text name="WLDistanceMultText">
-				Multiplicador de Distância
-			</text>
-			<button label="?" name="WLDistanceMultHelp"/>
-			<text name="MaxAltText">
-				Altitude Máxima
-			</text>
-			<button label="?" name="WLMaxAltitudeHelp"/>
-		</panel>
-		<panel label="Iluminação" name="Lighting">
-			<text name="SLCText">
-				Cor do Sol/Lua
-			</text>
-			<button label="?" name="WLSunlightColorHelp"/>
-			<text name="BHText">
-				R
-			</text>
-			<text name="BHText2">
-				G
-			</text>
-			<text name="BHText3">
-				B
-			</text>
-			<text name="BHText4">
-				I
-			</text>
-			<text name="TODText">
-				Posição do Sol/Lua
-			</text>
-			<button label="?" name="WLTimeOfDayHelp"/>
-			<text name="WLAmbientText">
-				Ambiente
-			</text>
-			<button label="?" name="WLAmbientHelp"/>
-			<text name="BHText5">
-				R
-			</text>
-			<text name="BHText6">
-				G
-			</text>
-			<text name="BHText7">
-				B
-			</text>
-			<text name="BHText8">
-				I
-			</text>
-			<text name="WLEastAngleText">
-				Ângulo Leste
-			</text>
-			<button label="?" name="WLEastAngleHelp"/>
-			<text name="SunGlowText">
-				Brilho do Sol
-			</text>
-			<button label="?" name="WLSunGlowHelp"/>
-			<slider label="Foco" name="WLGlowB"/>
-			<slider label="Tamanho" name="WLGlowR"/>
-			<text name="SceneGammaText">
-				Gamma da Cena
-			</text>
-			<button label="?" name="WLSceneGammaHelp"/>
-			<text name="WLStarText">
-				Brilho da Estrela
-			</text>
-			<button label="?" name="WLStarBrightnessHelp"/>
-		</panel>
-		<panel label="Nuvens" name="Clouds">
-			<text name="WLCloudColorText">
-				Cor da Nuvem
-			</text>
-			<button label="?" name="WLCloudColorHelp"/>
-			<text name="BHText">
-				R
-			</text>
-			<text name="BHText2">
-				G
-			</text>
-			<text name="BHText3">
-				B
-			</text>
-			<text name="BHText4">
-				I
-			</text>
-			<text name="WLCloudColorText2">
-				Densidade/ XY da Nuvem
-			</text>
-			<button label="?" name="WLCloudDensityHelp"/>
-			<text name="BHText5">
-				X
-			</text>
-			<text name="BHText6">
-				Y
-			</text>
-			<text name="BHText7">
-				D
-			</text>
-			<text name="WLCloudCoverageText">
-				Cobertura da Nuvem
-			</text>
-			<button label="?" name="WLCloudCoverageHelp"/>
-			<text name="WLCloudScaleText">
-				Escala da Nuvem
-			</text>
-			<button label="?" name="WLCloudScaleHelp"/>
-			<text name="WLCloudDetailText">
-				Detalhe da Nuvem  (XY/Densidade)
-			</text>
-			<button label="?" name="WLCloudDetailHelp"/>
-			<text name="BHText8">
-				X
-			</text>
-			<text name="BHText9">
-				Y
-			</text>
-			<text name="BHText10">
-				D
-			</text>
-			<text name="WLCloudScrollXText">
-				Rolagem X da Nuvem
-			</text>
-			<button label="?" name="WLCloudScrollXHelp"/>
-			<check_box label="Travar" name="WLCloudLockX"/>
-			<text name="WLCloudScrollYText">
-				Rolagem Y da Nuvem
-			</text>
-			<button label="?" name="WLCloudScrollYHelp"/>
-			<check_box label="Travar" name="WLCloudLockY"/>
-			<check_box label="Desenhar Nuvens Clássicas" name="DrawClassicClouds"/>
-			<button label="?" name="WLClassicCloudsHelp"/>
-		</panel>
-	</tab_container>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="WindLight floater" title="Editor de Céu Avançado">
+	<text name="KeyFramePresetsText">
+		Pré-definições de Céu:
+	</text>
+	<button label="Novo" label_selected="Novo" name="WLNewPreset"/>
+	<button label="Salvar" label_selected="Salvar" name="WLSavePreset"/>
+	<button label="Deletar" label_selected="Deletar" name="WLDeletePreset"/>
+	<button label="Editor de Ciclos do Dia" label_selected="Editor de Ciclos do Dia" name="WLDayCycleMenuButton" width="150" left_delta="95" />
+	<tab_container name="WindLight Tabs">
+		<panel label="Atmosfera" name="Atmosphere">
+			<text name="BHText">
+				Horizonte Azul
+			</text>
+			<button label="?" name="WLBlueHorizonHelp"/>
+			<text name="BHText2">
+				R
+			</text>
+			<text name="BHText3">
+				G
+			</text>
+			<text name="BHText4">
+				B
+			</text>
+			<text name="BHText5">
+				I
+			</text>
+			<text name="BDensText">
+				Horizonte da Neblina
+			</text>
+			<button label="?" name="WLHazeHorizonHelp"/>
+			<text name="BDensText2">
+				Densidade de Azul
+			</text>
+			<button label="?" name="WLBlueDensityHelp"/>
+			<text name="BHText6">
+				R
+			</text>
+			<text name="BHText7">
+				G
+			</text>
+			<text name="BHText8">
+				B
+			</text>
+			<text name="BHText9">
+				I
+			</text>
+			<text name="HDText">
+				Densidade da Neblina
+			</text>
+			<button label="?" name="WLHazeDensityHelp"/>
+			<text name="DensMultText">
+				Multiplicador de Densidade
+			</text>
+			<button label="?" name="WLDensityMultHelp"/>
+			<text name="WLDistanceMultText">
+				Multiplicador de Distância
+			</text>
+			<button label="?" name="WLDistanceMultHelp"/>
+			<text name="MaxAltText">
+				Altitude Máxima
+			</text>
+			<button label="?" name="WLMaxAltitudeHelp"/>
+		</panel>
+		<panel label="Iluminação" name="Lighting">
+			<text name="SLCText">
+				Cor do Sol/Lua
+			</text>
+			<button label="?" name="WLSunlightColorHelp"/>
+			<text name="BHText">
+				R
+			</text>
+			<text name="BHText2">
+				G
+			</text>
+			<text name="BHText3">
+				B
+			</text>
+			<text name="BHText4">
+				I
+			</text>
+			<text name="TODText">
+				Posição do Sol/Lua
+			</text>
+			<button label="?" name="WLTimeOfDayHelp"/>
+			<text name="WLAmbientText">
+				Ambiente
+			</text>
+			<button label="?" name="WLAmbientHelp"/>
+			<text name="BHText5">
+				R
+			</text>
+			<text name="BHText6">
+				G
+			</text>
+			<text name="BHText7">
+				B
+			</text>
+			<text name="BHText8">
+				I
+			</text>
+			<text name="WLEastAngleText">
+				Ângulo Leste
+			</text>
+			<button label="?" name="WLEastAngleHelp"/>
+			<text name="SunGlowText">
+				Brilho do Sol
+			</text>
+			<button label="?" name="WLSunGlowHelp"/>
+			<slider label="Foco" name="WLGlowB"/>
+			<slider label="Tamanho" name="WLGlowR"/>
+			<text name="SceneGammaText">
+				Gamma da Cena
+			</text>
+			<button label="?" name="WLSceneGammaHelp"/>
+			<text name="WLStarText">
+				Brilho da Estrela
+			</text>
+			<button label="?" name="WLStarBrightnessHelp"/>
+		</panel>
+		<panel label="Nuvens" name="Clouds">
+			<text name="WLCloudColorText">
+				Cor da Nuvem
+			</text>
+			<button label="?" name="WLCloudColorHelp"/>
+			<text name="BHText">
+				R
+			</text>
+			<text name="BHText2">
+				G
+			</text>
+			<text name="BHText3">
+				B
+			</text>
+			<text name="BHText4">
+				I
+			</text>
+			<text name="WLCloudColorText2">
+				Densidade/ XY da Nuvem
+			</text>
+			<button label="?" name="WLCloudDensityHelp"/>
+			<text name="BHText5">
+				X
+			</text>
+			<text name="BHText6">
+				Y
+			</text>
+			<text name="BHText7">
+				D
+			</text>
+			<text name="WLCloudCoverageText">
+				Cobertura da Nuvem
+			</text>
+			<button label="?" name="WLCloudCoverageHelp"/>
+			<text name="WLCloudScaleText">
+				Escala da Nuvem
+			</text>
+			<button label="?" name="WLCloudScaleHelp"/>
+			<text name="WLCloudDetailText">
+				Detalhe da Nuvem  (XY/Densidade)
+			</text>
+			<button label="?" name="WLCloudDetailHelp"/>
+			<text name="BHText8">
+				X
+			</text>
+			<text name="BHText9">
+				Y
+			</text>
+			<text name="BHText10">
+				D
+			</text>
+			<text name="WLCloudScrollXText">
+				Rolagem X da Nuvem
+			</text>
+			<button label="?" name="WLCloudScrollXHelp"/>
+			<check_box label="Travar" name="WLCloudLockX"/>
+			<text name="WLCloudScrollYText">
+				Rolagem Y da Nuvem
+			</text>
+			<button label="?" name="WLCloudScrollYHelp"/>
+			<check_box label="Travar" name="WLCloudLockY"/>
+			<check_box label="Desenhar Nuvens Clássicas" name="DrawClassicClouds"/>
+			<button label="?" name="WLClassicCloudsHelp"/>
+		</panel>
+	</tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_world_map.xml b/indra/newview/skins/default/xui/pt/floater_world_map.xml
index 4b7371d688..24de146387 100644
--- a/indra/newview/skins/default/xui/pt/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/pt/floater_world_map.xml
@@ -1,63 +1,63 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="worldmap" title="Mapa Mundi">
-	<tab_container name="maptab">
-		<panel label="Objetos" name="objects_mapview"/>
-		<panel label="Terreno" name="terrain_mapview"/>
-	</tab_container>
-	<text name="land_for_sale_label">
-		Terra à venda
-	</text>
-	<text name="auction_label">
-		Leilão
-	</text>
-	<text name="you_label">
-		Você
-	</text>
-	<text name="home_label">
-		Casa
-	</text>
-	<button label="Ir para Casa" label_selected="Ir para casa" name="Go Home" tool_tip="Teletransportar para sua Casa"/>
-	<text name="person_label">
-		Pessoa
-	</text>
-	<text name="infohub_label">
-		Infohub
-	</text>
-	<text name="telehub_label">
-		Telehub
-	</text>
-	<text name="land_for_sale_label2">
-		Terra à Venda
-	</text>
-	<text name="events_label">
-		Eventos
-	</text>
-
-	<combo_box label="Amigos Conectados" name="friend combo" tool_tip="Amigos para mostrar no Mapa">
-		<combo_item name="none_selected">
-			Amigos Conectados
-		</combo_item>
-	</combo_box>
-	<combo_box label="Landmarks" name="landmark combo" tool_tip="Landmark para mostrar no Mapa">
-		<combo_item name="none_selected">
-			Landmarks
-		</combo_item>
-	</combo_box>
-	<line_editor label="Procurar por nome de região" name="location" tool_tip="Digite o nome de uma Região"/>
-	<button label="Procurar" name="DoSearch" tool_tip="Procurar por região"/>
-	<text name="search_label">
-		Resultados da Procura:
-	</text>
-	<text name="location_label">
-		Localização:
-	</text>
-	<spinner name="spin x" tool_tip="Coordenada X da posição mostrada no mapa"/>
-	<spinner name="spin y" tool_tip="Coordenada Y da posição mostrada no mapa"/>
-	<spinner name="spin z" tool_tip="Coordenada Z da posição mostrada no Mapa"/>
-	<button label="Teletransporte" label_selected="Teletransporte" name="Teleport" tool_tip="Teletransportar para a posição selecionada"/>
-	<button label="Mostrar Destino" label_selected="Mostrar Destino" name="Show Destination" tool_tip="Centralizar mapa na posição selecionada"/>
-	<button label="Limpar" label_selected="Limpar" name="Clear" tool_tip="Parar de percorrer"/>
-	<button label="Mostra minha localização" label_selected="Mostra minha localização" name="Show My Location" tool_tip="Centraliza o mapa na posição do seu Avatar"/>
-	<button label="Copiar SLURL para área de transferência" name="copy_slurl" tool_tip="Copia a posição atual como SLURL para ser usada na Web"/>
-	<slider label="Zoom" name="zoom slider"/>
-</floater>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="worldmap" title="Mapa Mundi">
+	<tab_container name="maptab">
+		<panel label="Objetos" name="objects_mapview"/>
+		<panel label="Terreno" name="terrain_mapview"/>
+	</tab_container>
+	<text name="land_for_sale_label">
+		Terra à venda
+	</text>
+	<text name="auction_label">
+		Leilão
+	</text>
+	<text name="you_label">
+		Você
+	</text>
+	<text name="home_label">
+		Casa
+	</text>
+	<button label="Ir para Casa" label_selected="Ir para casa" name="Go Home" tool_tip="Teletransportar para sua Casa"/>
+	<text name="person_label">
+		Pessoa
+	</text>
+	<text name="infohub_label">
+		Infohub
+	</text>
+	<text name="telehub_label">
+		Telehub
+	</text>
+	<text name="land_for_sale_label2">
+		Terra à Venda
+	</text>
+	<text name="events_label">
+		Eventos
+	</text>
+
+	<combo_box label="Amigos Conectados" name="friend combo" tool_tip="Amigos para mostrar no Mapa">
+		<combo_box.item name="none_selected">
+			Amigos Conectados
+		</combo_box.item>
+	</combo_box>
+	<combo_box label="Landmarks" name="landmark combo" tool_tip="Landmark para mostrar no Mapa">
+		<combo_box.item name="none_selected">
+			Landmarks
+		</combo_box.item>
+	</combo_box>
+	<line_editor label="Procurar por nome de região" name="location" tool_tip="Digite o nome de uma Região"/>
+	<button label="Procurar" name="DoSearch" tool_tip="Procurar por região"/>
+	<text name="search_label">
+		Resultados da Procura:
+	</text>
+	<text name="location_label">
+		Localização:
+	</text>
+	<spinner name="spin x" tool_tip="Coordenada X da posição mostrada no mapa"/>
+	<spinner name="spin y" tool_tip="Coordenada Y da posição mostrada no mapa"/>
+	<spinner name="spin z" tool_tip="Coordenada Z da posição mostrada no Mapa"/>
+	<button label="Teletransporte" label_selected="Teletransporte" name="Teleport" tool_tip="Teletransportar para a posição selecionada"/>
+	<button label="Mostrar Destino" label_selected="Mostrar Destino" name="Show Destination" tool_tip="Centralizar mapa na posição selecionada"/>
+	<button label="Limpar" label_selected="Limpar" name="Clear" tool_tip="Parar de percorrer"/>
+	<button label="Mostra minha localização" label_selected="Mostra minha localização" name="Show My Location" tool_tip="Centraliza o mapa na posição do seu Avatar"/>
+	<button label="Copiar SLURL para área de transferência" name="copy_slurl" tool_tip="Copia a posição atual como SLURL para ser usada na Web"/>
+	<slider label="Zoom" name="zoom slider"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/pt/menu_inventory.xml b/indra/newview/skins/default/xui/pt/menu_inventory.xml
index e9913e5a11..4fdafac015 100644
--- a/indra/newview/skins/default/xui/pt/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/pt/menu_inventory.xml
@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu name="Popup">
-	<menu_item_call label="Comprar" name="Task Buy"/>
-	<menu_item_call label="Abrir" name="Task Open"/>
-	<menu_item_call label="Executar" name="Task Play"/>
-	<menu_item_call label="Propriedades" name="Task Properties"/>
-	<menu_item_call label="Renomear" name="Task Rename"/>
-	<menu_item_call label="Apagar" name="Task Remove"/>
-	<menu_item_call label="Limpar Lixeira" name="Empty Trash"/>
-	<menu_item_call label="Limpar Achados e perdidos" name="Empty Lost And Found"/>
-	<menu_item_call label="Nova Pasta" name="New Folder"/>
-	<menu_item_call label="Novo Script" name="New Script"/>
-	<menu_item_call label="Nova Nota" name="New Note"/>
-	<menu_item_call label="Novo Gesto" name="New Gesture"/>
-	<menu label="Nova Roupa" name="New Clothes">
-		<menu_item_call label="Nova Camisa" name="New Shirt"/>
-		<menu_item_call label="Nova Calça" name="New Pants"/>
-		<menu_item_call label="Novos Calçados" name="New Shoes"/>
-		<menu_item_call label="Novas Meias" name="New Socks"/>
-		<menu_item_call label="Nova Jaqueta" name="New Jacket"/>
-		<menu_item_call label="Nova Saia" name="New Skirt"/>
-		<menu_item_call label="Novas Luvas" name="New Gloves"/>
-		<menu_item_call label="Nova Anágua" name="New Undershirt"/>
-		<menu_item_call label="Nova roupa de baixo" name="New Underpants"/>
-	</menu>
-	<menu label="Parte do corpo" name="New Body Parts">
-		<menu_item_call label="Nova forma" name="New Shape"/>
-		<menu_item_call label="Nova pele" name="New Skin"/>
-		<menu_item_call label="Novo cabelo" name="New Hair"/>
-		<menu_item_call label="Novos olhos" name="New Eyes"/>
-	</menu>
-	<menu_item_call label="Teletransporte" name="Landmark Open"/>
-	<menu_item_call label="Abrir" name="Animation Open"/>
-	<menu_item_call label="Abrir" name="Sound Open"/>
-	<menu_item_call label="Remover item" name="Purge Item"/>
-	<menu_item_call label="Restaurar item" name="Restore Item"/>
-	<menu_item_call label="Abrir" name="Open"/>
-	<menu_item_call label="Propriedades" name="Properties"/>
-	<menu_item_call label="Renomear" name="Rename"/>
-	<menu_item_call label="Copy Asset UUID" name="Copy Asset UUID"/>
-	<menu_item_call label="Copiar" name="Copy"/>
-	<menu_item_call label="Colar" name="Paste"/>
-	<menu_item_call label="Apagar" name="Delete"/>
-	<menu_item_call label="Adicionar ao equipamento" name="Add To Outfit"/>
-	<menu_item_call label="Substituir equipamento" name="Replace Outfit"/>
-	<menu_item_call label="Remover os itens" name="Take Off Items"/>
-	<menu_item_call label="Iniciar conversa em conferência" name="Conference Chat Folder"/>
-	<menu_item_call label="Executar" name="Sound Play"/>
-	<menu_item_call label="Sobre as Landmarks" name="Teleport To Landmark"/>
-	<menu_item_call label="Executar in World" name="Animation Play"/>
-	<menu_item_call label="Executar localmente" name="Animation Audition"/>
-	<menu_item_call label="Mandar Mensagem Instantânea" name="Send Instant Message"/>
-	<menu_item_call label="Oferecer teletransporte..." name="Offer Teleport..."/>
-	<menu_item_call label="Iniciar conversa em conferência" name="Conference Chat"/>
-	<menu_item_call label="Ativar" name="Activate"/>
-	<menu_item_call label="Desativar" name="Deactivate"/>
-	<menu_item_call label="Retirar de você" name="Detach From Yourself"/>
-	<menu_item_call label="Vestir" name="Object Wear"/>
-	<menu label="Anexar a" name="Attach To"/>
-	<menu label="Anexar ao HUD" name="Attach To HUD"/>
-	<menu_item_call label="Vestir" name="Wearable Wear"/>
-	<menu_item_call label="Editar" name="Wearable Edit"/>
-	<menu_item_call label="Retirar" name="Take Off"/>
-	<menu_item_call label="--Sem opções--" name="--no options--"/>
-</menu>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<menu name="Popup">
+	<menu_item_call label="Comprar" name="Task Buy"/>
+	<menu_item_call label="Abrir" name="Task Open"/>
+	<menu_item_call label="Executar" name="Task Play"/>
+	<menu_item_call label="Propriedades" name="Task Properties"/>
+	<menu_item_call label="Renomear" name="Task Rename"/>
+	<menu_item_call label="Apagar" name="Task Remove"/>
+	<menu_item_call label="Limpar Lixeira" name="Empty Trash"/>
+	<menu_item_call label="Limpar Achados e perdidos" name="Empty Lost And Found"/>
+	<menu_item_call label="Nova Pasta" name="New Folder"/>
+	<menu_item_call label="Novo Script" name="New Script"/>
+	<menu_item_call label="Nova Nota" name="New Note"/>
+	<menu_item_call label="Novo Gesto" name="New Gesture"/>
+	<menu label="Nova Roupa" name="New Clothes">
+		<menu_item_call label="Nova Camisa" name="New Shirt"/>
+		<menu_item_call label="Nova Calça" name="New Pants"/>
+		<menu_item_call label="Novos Calçados" name="New Shoes"/>
+		<menu_item_call label="Novas Meias" name="New Socks"/>
+		<menu_item_call label="Nova Jaqueta" name="New Jacket"/>
+		<menu_item_call label="Nova Saia" name="New Skirt"/>
+		<menu_item_call label="Novas Luvas" name="New Gloves"/>
+		<menu_item_call label="Nova Anágua" name="New Undershirt"/>
+		<menu_item_call label="Nova roupa de baixo" name="New Underpants"/>
+	</menu>
+	<menu label="Parte do corpo" name="New Body Parts">
+		<menu_item_call label="Nova forma" name="New Shape"/>
+		<menu_item_call label="Nova pele" name="New Skin"/>
+		<menu_item_call label="Novo cabelo" name="New Hair"/>
+		<menu_item_call label="Novos olhos" name="New Eyes"/>
+	</menu>
+	<menu_item_call label="Teletransporte" name="Landmark Open"/>
+	<menu_item_call label="Abrir" name="Animation Open"/>
+	<menu_item_call label="Abrir" name="Sound Open"/>
+	<menu_item_call label="Remover item" name="Purge Item"/>
+	<menu_item_call label="Restaurar item" name="Restore Item"/>
+	<menu_item_call label="Abrir" name="Open"/>
+	<menu_item_call label="Propriedades" name="Properties"/>
+	<menu_item_call label="Renomear" name="Rename"/>
+	<menu_item_call label="Copy Asset UUID" name="Copy Asset UUID"/>
+	<menu_item_call label="Copiar" name="Copy"/>
+	<menu_item_call label="Colar" name="Paste"/>
+	<menu_item_call label="Apagar" name="Delete"/>
+	<menu_item_call label="Adicionar ao equipamento" name="Add To Outfit"/>
+	<menu_item_call label="Substituir equipamento" name="Replace Outfit"/>
+	<menu_item_call label="Remover os itens" name="Take Off Items"/>
+	<menu_item_call label="Iniciar conversa em conferência" name="Conference Chat Folder"/>
+	<menu_item_call label="Executar" name="Sound Play"/>
+	<menu_item_call label="Sobre as Landmarks" name="Teleport To Landmark"/>
+	<menu_item_call label="Executar in World" name="Animation Play"/>
+	<menu_item_call label="Executar localmente" name="Animation Audition"/>
+	<menu_item_call label="Mandar Mensagem Instantânea" name="Send Instant Message"/>
+	<menu_item_call label="Oferecer teletransporte..." name="Offer Teleport..."/>
+	<menu_item_call label="Iniciar conversa em conferência" name="Conference Chat"/>
+	<menu_item_call label="Ativar" name="Activate"/>
+	<menu_item_call label="Desativar" name="Deactivate"/>
+	<menu_item_call label="Retirar de você" name="Detach From Yourself"/>
+	<menu_item_call label="Vestir" name="Object Wear"/>
+	<menu label="Anexar a" name="Attach To"/>
+	<menu label="Anexar ao HUD" name="Attach To HUD"/>
+	<menu_item_call label="Vestir" name="Wearable Wear"/>
+	<menu_item_call label="Editar" name="Wearable Edit"/>
+	<menu_item_call label="Retirar" name="Take Off"/>
+	<menu_item_call label="--Sem opções--" name="--no options--"/>
+</menu>
diff --git a/indra/newview/skins/default/xui/pt/menu_login.xml b/indra/newview/skins/default/xui/pt/menu_login.xml
index 3aeb7483a8..f60946fcce 100644
--- a/indra/newview/skins/default/xui/pt/menu_login.xml
+++ b/indra/newview/skins/default/xui/pt/menu_login.xml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu_bar name="Login Menu">
-	<menu label="Arquivo" name="File">
-		<menu_item_call label="Sair" name="Quit"/>
-	</menu>
-	<menu label="Editar" name="Edit">
-		<menu_item_call label="Preferências..." name="Preferences..."/>
-	</menu>
-	<menu label="Ajuda" name="Help">
-		<menu_item_call label="Ajuda do Second Life" name="Second Life Help"/>
-		<menu_item_call label="Sobre o Second Life..." name="About Second Life..."/>
-	</menu>
-</menu_bar>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<menu_bar name="Login Menu">
+	<menu label="Arquivo" name="File">
+		<menu_item_call label="Sair" name="Quit"/>
+	</menu>
+	<menu label="Editar" name="Edit">
+		<menu_item_call label="Preferências..." name="Preferences..."/>
+	</menu>
+	<menu label="Ajuda" name="Help">
+		<menu_item_call label="Ajuda do Second Life" name="Second Life Help"/>
+		<menu_item_call label="Sobre o Second Life..." name="About Second Life..."/>
+	</menu>
+</menu_bar>
diff --git a/indra/newview/skins/default/xui/pt/menu_slurl.xml b/indra/newview/skins/default/xui/pt/menu_slurl.xml
index e18e776975..67a4b51b61 100644
--- a/indra/newview/skins/default/xui/pt/menu_slurl.xml
+++ b/indra/newview/skins/default/xui/pt/menu_slurl.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu name="Popup">
-	<menu_item_call label="Sobre a URL" name="about_url"/>
-	<menu_item_call label="Teletransporte para a URL" name="teleport_to_url"/>
-	<menu_item_call label="Mostrar no Mapa" name="show_on_map"/>
-</menu>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<menu name="Popup">
+	<menu_item_call label="Sobre a URL" name="about_url"/>
+	<menu_item_call label="Teletransporte para a URL" name="teleport_to_url"/>
+	<menu_item_call label="Mostrar no Mapa" name="show_on_map"/>
+</menu>
diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml
index 229a616f7a..bc4508ecc6 100644
--- a/indra/newview/skins/default/xui/pt/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml
@@ -1,203 +1,203 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu_bar name="Main Menu">
-	<menu label="Arquivo" name="File">
-		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
-		<menu label="Upload" name="upload">
-			<menu_item_call label="Upload de imagem (L$[COST])..." name="Upload Image"/>
-			<menu_item_call label="Upload de som(L$[COST])..." name="Upload Sound"/>
-			<menu_item_call label="Upload de animação (L$[COST])..." name="Upload Animation"/>
-			<menu_item_call label="Upload de Arquivo (L$[COST] por arquivo)..." name="Bulk Upload"/>
-		</menu>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Fechar janela" name="Close Window"/>
-		<menu_item_call label="Fechar todas as janelas" name="Close All Windows"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Salvar textura como..." name="Save Texture As..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Tirar Foto" name="Take Snapshot"/>
-		<menu_item_call label="Salvar Foto no disco" name="Snapshot to Disk"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Sair" name="Quit"/>
-	</menu>
-	<menu label="Editar" name="Edit">
-		<menu_item_call label="Voltar" name="Undo"/>
-		<menu_item_call label="Avançar" name="Redo"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Cortar" name="Cut"/>
-		<menu_item_call label="Copiar" name="Copy"/>
-		<menu_item_call label="Colar" name="Paste"/>
-		<menu_item_call label="Apagar" name="Delete"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Procurar..." name="Search..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Selecionar todos" name="Select All"/>
-		<menu_item_call label="Retirar seleção" name="Deselect"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Duplicar" name="Duplicate"/>
-		<menu_item_separator label="-----------" name="separator5"/>
-		<menu label="Anexar objeto" name="Attach Object"/>
-		<menu label="Desanexar objeto" name="Detach Object"/>
-		<menu label="Tirar a roupa" name="Take Off Clothing">
-			<menu_item_call label="Camiseta" name="Shirt"/>
-			<menu_item_call label="Calças" name="Pants"/>
-			<menu_item_call label="Sapatos" name="Shoes"/>
-			<menu_item_call label="Meias" name="Socks"/>
-			<menu_item_call label="Blusa" name="Jacket"/>
-			<menu_item_call label="Luvas" name="Gloves"/>
-			<menu_item_call label="Anágua" name="Menu Undershirt"/>
-			<menu_item_call label="Roupa de baixo" name="Menu Underpants"/>
-			<menu_item_call label="saia" name="Skirt"/>
-			<menu_item_call label="Toda a roupa" name="All Clothes"/>
-		</menu>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu_item_call label="Gestos..." name="Gestures..."/>
-		<menu_item_call label="Perfil..." name="Profile..."/>
-		<menu_item_call label="Aparência..." name="Appearance..."/>
-		<menu_item_separator label="-----------" name="separator7"/>
-		<menu_item_check label="Amigos..." name="Friends..."/>
-		<menu_item_call label="Grupos..." name="Groups..."/>
-		<menu_item_separator label="-----------" name="separator8"/>
-		<menu_item_call label="Preferências..." name="Preferences..."/>
-	</menu>
-	<menu label="Exibir" name="View">
-		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
-		<menu_item_call label="Visão do mouse" name="Mouselook"/>
-		<menu_item_check label="Construir" name="Build"/>
-		<menu_item_check label="Câmera voadora pelo joystick" name="Joystick Flycam"/>
-		<menu_item_call label="Resetar visão" name="Reset View"/>
-		<menu_item_call label="Olhar para o último movimento" name="Look at Last Chatter"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_check label="Barra de ferramentas" name="Toolbar"/>
-		<menu_item_check label="Conversa local" name="Chat History"/>
-		<menu_item_check label="Comunicar" name="Instant Message"/>
-		<menu_item_check label="Inventário" name="Inventory"/>
-		<menu_item_check label="Falantes Ativos" name="Active Speakers"/>
-		<menu_item_check label="Lista de pessoas que não podem falar com você" name="Mute List"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_check label="Controles de câmera" name="Camera Controls"/>
-		<menu_item_check label="Controles de movimento" name="Movement Controls"/>
-		<menu_item_check label="Mapa do mundo" name="World Map"/>
-		<menu_item_check label="Mini-Mapa" name="Mini-Map"/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_check label="Barra de estatísticas" name="Statistics Bar"/>
-		<menu_item_check label="Linhas de propriedades" name="Property Lines"/>
-		<menu_item_check label="Donos de terrenos" name="Land Owners"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu label="Dicas" name="Hover Tips">
-			<menu_item_check label="Mostrar dicas" name="Show Tips"/>
-			<menu_item_separator label="-----------" name="separator"/>
-			<menu_item_check label="Dicas de terreno" name="Land Tips"/>
-			<menu_item_check label="Dicas de todos os objetos" name="Tips On All Objects"/>
-		</menu>
-		<menu_item_check label="Luz para transparência" name="Highlight Transparent"/>
-		<menu_item_check label="Balizas" name="beacons"/>
-		<menu_item_check label="Esconder partículas" name="Hide Particles"/>
-		<menu_item_check label="Mostrar anexo em HUD" name="Show HUD Attachments"/>
-		<menu_item_separator label="-----------" name="separator5"/>
-		<menu_item_call label="Mais zoom" name="Zoom In"/>
-		<menu_item_call label="Zoom padrão" name="Zoom Default"/>
-		<menu_item_call label="Menos zoom" name="Zoom Out"/>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu_item_call label="Tela cheia" name="Toggle Fullscreen"/>
-		<menu_item_call label="Ajustar o tamanho da UI ao padrão" name="Set UI Size to Default"/>
-	</menu>
-	<menu label="Mundo" name="World">
-		<menu_item_call label="Conversa" name="Chat"/>
-		<menu_item_check label="Sempre Correr" name="Always Run"/>
-		<menu_item_check label="Voar" name="Fly"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Criar Landmark aqui" name="Create Landmark Here"/>
-		<menu_item_call label="Marcar como  casa" name="Set Home to Here"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Teletransportar para casa" name="Teleport Home"/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Deixar ausente" name="Set Away"/>
-		<menu_item_call label="Deixar Ocupado" name="Set Busy"/>
-		<menu_item_call label="Parar todas as animações" name="Stop All Animations"/>
-		<menu_item_call label="Liberar teclas" name="Release Keys"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Histórico de conta..." name="Account History..."/>
-		<menu_item_call label="Gerenciar minha conta..." name="Manage My Account..."/>
-		<menu_item_call label="Comprar L$..." name="Buy and Sell L$..."/>
-		<menu_item_separator label="-----------" name="separator5"/>
-		<menu_item_call label="Meu terreno..." name="My Land..."/>
-		<menu_item_call label="Sobre o terreno..." name="About Land..."/>
-		<menu_item_call label="Comprar terreno..." name="Buy Land..."/>
-		<menu_item_call label="Região/Propriedade..." name="Region/Estate..."/>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu label="Configurações de ambiente" name="Environment Settings">
-			<menu_item_call label="Amanhecer" name="Sunrise"/>
-			<menu_item_call label="Meio-dia" name="Noon"/>
-			<menu_item_call label="Pôr-do-Sol" name="Sunset"/>
-			<menu_item_call label="Meia-noite" name="Midnight"/>
-			<menu_item_call label="Reverter ao padrão da região" name="Revert to Region Default"/>
-			<menu_item_separator label="-----------" name="separator"/>
-			<menu_item_call label="Editor de ambiente" name="Environment Editor"/>
-		</menu>
-	</menu>
-	<menu label="Ferramentas" name="Tools">
-		<menu label="Selecionar ferramenta" name="Select Tool">
-			<menu_item_call label="Foco" name="Focus"/>
-			<menu_item_call label="Mover" name="Move"/>
-			<menu_item_call label="Editar" name="Edit"/>
-			<menu_item_call label="Criar" name="Create"/>
-			<menu_item_call label="Terreno" name="Land"/>
-		</menu>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_check label="Selecionar apenas meus objetos" name="Select Only My Objects"/>
-		<menu_item_check label="Selecionar apenas objetos móveis" name="Select Only Movable Objects"/>
-		<menu_item_check label="Selecionar objetos pela vizinhança" name="Select By Surrounding"/>
-		<menu_item_check label="Mostrar seleções escondidas" name="Show Hidden Selection"/>
-		<menu_item_check label="Mostrar luz radiante para seleção" name="Show Light Radius for Selection"/>
-		<menu_item_check label="Mostrar seleções de feixes" name="Show Selection Beam"/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_check label="Alinhar à grade" name="Snap to Grid"/>
-		<menu_item_call label="Alinhar xy do objeto à grade" name="Snap Object XY to Grid"/>
-		<menu_item_call label="Usar seleção na grade" name="Use Selection for Grid"/>
-		<menu_item_call label="Opções de grade..." name="Grid Options..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_check label="Editar partes unidas" name="Edit Linked Parts"/>
-		<menu_item_call label="Unir" name="Link"/>
-		<menu_item_call label="Desunir" name="Unlink"/>
-		<menu_item_separator label="-----------" name="separator4"/>
-		<menu_item_call label="Foco na seleção" name="Focus on Selection"/>
-		<menu_item_call label="Zoom na Seleção" name="Zoom to Selection"/>
-		<menu_item_call label="Comprar objetos" name="Menu Object Take"/>
-		<menu_item_call label="Pegar cópia" name="Take Copy"/>
-		<menu_item_call label="Salvar objeto de volta ao meu inventário" name="Save Object Back to My Inventory"/>
-		<menu_item_call label="Salvar objeto de volta aos conteúdos do objeto" name="Save Object Back to Object Contents"/>
-		<menu_item_separator label="-----------" name="separator6"/>
-		<menu_item_call label="Mostrar scripts defeituosos/Erros de janela" name="Show Script Warning/Error Window"/>
-		<menu label="Recompilar os scripts na seleção" name="Recompile Scripts in Selection">
-			<menu_item_call label="Mono" name="Mono"/>
-			<menu_item_call label="LSL" name="LSL"/>
-		</menu>
-		<menu_item_call label="Resetar scripts selecionados" name="Reset Scripts in Selection"/>
-		<menu_item_call label="Ajustar scripts para rodar na seleção" name="Set Scripts to Running in Selection"/>
-		<menu_item_call label="Ajustar scripts para não rodar na seleção" name="Set Scripts to Not Running in Selection"/>
-	</menu>
-	<menu label="Ajuda" name="Help">
-		<menu_item_call label="Ajuda Second Life" name="Second Life Help"/>
-		<menu_item_call label="Tutorial" name="Tutorial"/>
-		<menu_item_separator label="-----------" name="separator"/>
-		<menu_item_call label="Blog oficial da Linden..." name="Official Linden Blog..."/>
-		<menu_item_separator label="-----------" name="separator2"/>
-		<menu_item_call label="Portal de Scripts..." name="Scripting Portal..."/>
-		<menu_item_separator label="-----------" name="separator3"/>
-		<menu_item_call label="Reportar Abuso..." name="Report Abuse..."/>
-		<menu_item_call label="Colisões, impulsos e batidas..." name="Bumps, Pushes &amp;amp; Hits..."/>
-		<menu_item_call label="Medidor de Lag" name="Lag Meter"/>
-		<menu_item_separator label="-----------" name="separator7"/>
-		<menu label="Reportando Bug" name="Bug Reporting">
-			<menu_item_call label="Rastreador público de problemas..." name="Public Issue Tracker..."/>
-			<menu_item_call label="Ajuda do rastreador público de problemas..." name="Publc Issue Tracker Help..."/>
-			<menu_item_separator label="-----------" name="separator7"/>
-			<menu_item_call label="Reportando Bug 101..." name="Bug Reporing 101..."/>
-			<menu_item_call label="Questões de Segurança..." name="Security Issues..."/>
-			<menu_item_call label="Wiki de QA ..." name="QA Wiki..."/>
-			<menu_item_separator label="-----------" name="separator9"/>
-			<menu_item_call label="Reportar Bug..." name="Report Bug..."/>
-		</menu>
-		<menu_item_call label="Sobre Second Life..." name="About Second Life..."/>
-	</menu>
-</menu_bar>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<menu_bar name="Main Menu">
+	<menu label="Arquivo" name="File">
+		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
+		<menu label="Upload" name="upload">
+			<menu_item_call label="Upload de imagem (L$[COST])..." name="Upload Image"/>
+			<menu_item_call label="Upload de som(L$[COST])..." name="Upload Sound"/>
+			<menu_item_call label="Upload de animação (L$[COST])..." name="Upload Animation"/>
+			<menu_item_call label="Upload de Arquivo (L$[COST] por arquivo)..." name="Bulk Upload"/>
+		</menu>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Fechar janela" name="Close Window"/>
+		<menu_item_call label="Fechar todas as janelas" name="Close All Windows"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Salvar textura como..." name="Save Texture As..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Tirar Foto" name="Take Snapshot"/>
+		<menu_item_call label="Salvar Foto no disco" name="Snapshot to Disk"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Sair" name="Quit"/>
+	</menu>
+	<menu label="Editar" name="Edit">
+		<menu_item_call label="Voltar" name="Undo"/>
+		<menu_item_call label="Avançar" name="Redo"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Cortar" name="Cut"/>
+		<menu_item_call label="Copiar" name="Copy"/>
+		<menu_item_call label="Colar" name="Paste"/>
+		<menu_item_call label="Apagar" name="Delete"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Procurar..." name="Search..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Selecionar todos" name="Select All"/>
+		<menu_item_call label="Retirar seleção" name="Deselect"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Duplicar" name="Duplicate"/>
+		<menu_item_separator label="-----------" name="separator5"/>
+		<menu label="Anexar objeto" name="Attach Object"/>
+		<menu label="Desanexar objeto" name="Detach Object"/>
+		<menu label="Tirar a roupa" name="Take Off Clothing">
+			<menu_item_call label="Camiseta" name="Shirt"/>
+			<menu_item_call label="Calças" name="Pants"/>
+			<menu_item_call label="Sapatos" name="Shoes"/>
+			<menu_item_call label="Meias" name="Socks"/>
+			<menu_item_call label="Blusa" name="Jacket"/>
+			<menu_item_call label="Luvas" name="Gloves"/>
+			<menu_item_call label="Anágua" name="Menu Undershirt"/>
+			<menu_item_call label="Roupa de baixo" name="Menu Underpants"/>
+			<menu_item_call label="saia" name="Skirt"/>
+			<menu_item_call label="Toda a roupa" name="All Clothes"/>
+		</menu>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu_item_call label="Gestos..." name="Gestures..."/>
+		<menu_item_call label="Perfil..." name="Profile..."/>
+		<menu_item_call label="Aparência..." name="Appearance..."/>
+		<menu_item_separator label="-----------" name="separator7"/>
+		<menu_item_check label="Amigos..." name="Friends..."/>
+		<menu_item_call label="Grupos..." name="Groups..."/>
+		<menu_item_separator label="-----------" name="separator8"/>
+		<menu_item_call label="Preferências..." name="Preferences..."/>
+	</menu>
+	<menu label="Exibir" name="View">
+		<tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
+		<menu_item_call label="Visão do mouse" name="Mouselook"/>
+		<menu_item_check label="Construir" name="Build"/>
+		<menu_item_check label="Câmera voadora pelo joystick" name="Joystick Flycam"/>
+		<menu_item_call label="Resetar visão" name="Reset View"/>
+		<menu_item_call label="Olhar para o último movimento" name="Look at Last Chatter"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_check label="Barra de ferramentas" name="Toolbar"/>
+		<menu_item_check label="Conversa local" name="Chat History"/>
+		<menu_item_check label="Comunicar" name="Instant Message"/>
+		<menu_item_check label="Inventário" name="Inventory"/>
+		<menu_item_check label="Falantes Ativos" name="Active Speakers"/>
+		<menu_item_check label="Lista de pessoas que não podem falar com você" name="Mute List"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_check label="Controles de câmera" name="Camera Controls"/>
+		<menu_item_check label="Controles de movimento" name="Movement Controls"/>
+		<menu_item_check label="Mapa do mundo" name="World Map"/>
+		<menu_item_check label="Mini-Mapa" name="Mini-Map"/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_check label="Barra de estatísticas" name="Statistics Bar"/>
+		<menu_item_check label="Linhas de propriedades" name="Property Lines"/>
+		<menu_item_check label="Donos de terrenos" name="Land Owners"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu label="Dicas" name="Hover Tips">
+			<menu_item_check label="Mostrar dicas" name="Show Tips"/>
+			<menu_item_separator label="-----------" name="separator"/>
+			<menu_item_check label="Dicas de terreno" name="Land Tips"/>
+			<menu_item_check label="Dicas de todos os objetos" name="Tips On All Objects"/>
+		</menu>
+		<menu_item_check label="Luz para transparência" name="Highlight Transparent"/>
+		<menu_item_check label="Balizas" name="beacons"/>
+		<menu_item_check label="Esconder partículas" name="Hide Particles"/>
+		<menu_item_check label="Mostrar anexo em HUD" name="Show HUD Attachments"/>
+		<menu_item_separator label="-----------" name="separator5"/>
+		<menu_item_call label="Mais zoom" name="Zoom In"/>
+		<menu_item_call label="Zoom padrão" name="Zoom Default"/>
+		<menu_item_call label="Menos zoom" name="Zoom Out"/>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu_item_call label="Tela cheia" name="Toggle Fullscreen"/>
+		<menu_item_call label="Ajustar o tamanho da UI ao padrão" name="Set UI Size to Default"/>
+	</menu>
+	<menu label="Mundo" name="World">
+		<menu_item_call label="Conversa" name="Chat"/>
+		<menu_item_check label="Sempre Correr" name="Always Run"/>
+		<menu_item_check label="Voar" name="Fly"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Criar Landmark aqui" name="Create Landmark Here"/>
+		<menu_item_call label="Marcar como  casa" name="Set Home to Here"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Teletransportar para casa" name="Teleport Home"/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Deixar ausente" name="Set Away"/>
+		<menu_item_call label="Deixar Ocupado" name="Set Busy"/>
+		<menu_item_call label="Parar todas as animações" name="Stop All Animations"/>
+		<menu_item_call label="Liberar teclas" name="Release Keys"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Histórico de conta..." name="Account History..."/>
+		<menu_item_call label="Gerenciar minha conta..." name="Manage My Account..."/>
+		<menu_item_call label="Comprar L$..." name="Buy and Sell L$..."/>
+		<menu_item_separator label="-----------" name="separator5"/>
+		<menu_item_call label="Meu terreno..." name="My Land..."/>
+		<menu_item_call label="Sobre o terreno..." name="About Land..."/>
+		<menu_item_call label="Comprar terreno..." name="Buy Land..."/>
+		<menu_item_call label="Região/Propriedade..." name="Region/Estate..."/>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu label="Configurações de ambiente" name="Environment Settings">
+			<menu_item_call label="Amanhecer" name="Sunrise"/>
+			<menu_item_call label="Meio-dia" name="Noon"/>
+			<menu_item_call label="Pôr-do-Sol" name="Sunset"/>
+			<menu_item_call label="Meia-noite" name="Midnight"/>
+			<menu_item_call label="Reverter ao padrão da região" name="Revert to Region Default"/>
+			<menu_item_separator label="-----------" name="separator"/>
+			<menu_item_call label="Editor de ambiente" name="Environment Editor"/>
+		</menu>
+	</menu>
+	<menu label="Ferramentas" name="Tools">
+		<menu label="Selecionar ferramenta" name="Select Tool">
+			<menu_item_call label="Foco" name="Focus"/>
+			<menu_item_call label="Mover" name="Move"/>
+			<menu_item_call label="Editar" name="Edit"/>
+			<menu_item_call label="Criar" name="Create"/>
+			<menu_item_call label="Terreno" name="Land"/>
+		</menu>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_check label="Selecionar apenas meus objetos" name="Select Only My Objects"/>
+		<menu_item_check label="Selecionar apenas objetos móveis" name="Select Only Movable Objects"/>
+		<menu_item_check label="Selecionar objetos pela vizinhança" name="Select By Surrounding"/>
+		<menu_item_check label="Mostrar seleções escondidas" name="Show Hidden Selection"/>
+		<menu_item_check label="Mostrar luz radiante para seleção" name="Show Light Radius for Selection"/>
+		<menu_item_check label="Mostrar seleções de feixes" name="Show Selection Beam"/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_check label="Alinhar à grade" name="Snap to Grid"/>
+		<menu_item_call label="Alinhar xy do objeto à grade" name="Snap Object XY to Grid"/>
+		<menu_item_call label="Usar seleção na grade" name="Use Selection for Grid"/>
+		<menu_item_call label="Opções de grade..." name="Grid Options..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_check label="Editar partes unidas" name="Edit Linked Parts"/>
+		<menu_item_call label="Unir" name="Link"/>
+		<menu_item_call label="Desunir" name="Unlink"/>
+		<menu_item_separator label="-----------" name="separator4"/>
+		<menu_item_call label="Foco na seleção" name="Focus on Selection"/>
+		<menu_item_call label="Zoom na Seleção" name="Zoom to Selection"/>
+		<menu_item_call label="Comprar objetos" name="Menu Object Take"/>
+		<menu_item_call label="Pegar cópia" name="Take Copy"/>
+		<menu_item_call label="Salvar objeto de volta ao meu inventário" name="Save Object Back to My Inventory"/>
+		<menu_item_call label="Salvar objeto de volta aos conteúdos do objeto" name="Save Object Back to Object Contents"/>
+		<menu_item_separator label="-----------" name="separator6"/>
+		<menu_item_call label="Mostrar scripts defeituosos/Erros de janela" name="Show Script Warning/Error Window"/>
+		<menu label="Recompilar os scripts na seleção" name="Recompile Scripts in Selection">
+			<menu_item_call label="Mono" name="Mono"/>
+			<menu_item_call label="LSL" name="LSL"/>
+		</menu>
+		<menu_item_call label="Resetar scripts selecionados" name="Reset Scripts in Selection"/>
+		<menu_item_call label="Ajustar scripts para rodar na seleção" name="Set Scripts to Running in Selection"/>
+		<menu_item_call label="Ajustar scripts para não rodar na seleção" name="Set Scripts to Not Running in Selection"/>
+	</menu>
+	<menu label="Ajuda" name="Help">
+		<menu_item_call label="Ajuda Second Life" name="Second Life Help"/>
+		<menu_item_call label="Tutorial" name="Tutorial"/>
+		<menu_item_separator label="-----------" name="separator"/>
+		<menu_item_call label="Blog oficial da Linden..." name="Official Linden Blog..."/>
+		<menu_item_separator label="-----------" name="separator2"/>
+		<menu_item_call label="Portal de Scripts..." name="Scripting Portal..."/>
+		<menu_item_separator label="-----------" name="separator3"/>
+		<menu_item_call label="Reportar Abuso..." name="Report Abuse..."/>
+		<menu_item_call label="Colisões, impulsos e batidas..." name="Bumps, Pushes &amp;amp; Hits..."/>
+		<menu_item_call label="Medidor de Lag" name="Lag Meter"/>
+		<menu_item_separator label="-----------" name="separator7"/>
+		<menu label="Reportando Bug" name="Bug Reporting">
+			<menu_item_call label="Rastreador público de problemas..." name="Public Issue Tracker..."/>
+			<menu_item_call label="Ajuda do rastreador público de problemas..." name="Publc Issue Tracker Help..."/>
+			<menu_item_separator label="-----------" name="separator7"/>
+			<menu_item_call label="Reportando Bug 101..." name="Bug Reporing 101..."/>
+			<menu_item_call label="Questões de Segurança..." name="Security Issues..."/>
+			<menu_item_call label="Wiki de QA ..." name="QA Wiki..."/>
+			<menu_item_separator label="-----------" name="separator9"/>
+			<menu_item_call label="Reportar Bug..." name="Report Bug..."/>
+		</menu>
+		<menu_item_call label="Sobre Second Life..." name="About Second Life..."/>
+	</menu>
+</menu_bar>
diff --git a/indra/newview/skins/default/xui/pt/mime_types.xml b/indra/newview/skins/default/xui/pt/mime_types.xml
index 7b6225e0f6..f9c0496eea 100644
--- a/indra/newview/skins/default/xui/pt/mime_types.xml
+++ b/indra/newview/skins/default/xui/pt/mime_types.xml
@@ -1,230 +1,230 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<mimetypes name="default">
-	<widgetset name="web">
-		<label name="web_label">
-			Conteúdo da Web
-		</label>
-		<tooltip name="web_tooltip">
-			Esta região possui Conteúdo da Web disponível.
-		</tooltip>
-		<playtip name="web_playtip">
-			Exibir Conteúdo da Web
-		</playtip>
-	</widgetset>
-	<widgetset name="movie">
-		<label name="movie_label">
-			Filme
-		</label>
-		<tooltip name="movie_tooltip">
-			Há um filme disponível para se assistir aqui
-		</tooltip>
-		<playtip name="movie_playtip">
-			Iniciar filme
-		</playtip>
-	</widgetset>
-	<widgetset name="none">
-		<label name="none_label">
-			Sem conteúdo disponível
-		</label>
-		<tooltip name="none_tooltip">
-			Não há mídia disponível aqui.
-		</tooltip>
-	</widgetset>
-	<widgetset name="image">
-		<label name="image_label">
-			Imagem
-		</label>
-		<tooltip name="image_tooltip">
-			Há uma imagem neste local
-		</tooltip>
-		<playtip name="image_playtip">
-			Ver a imagem disponível deste local.
-		</playtip>
-	</widgetset>
-	<widgetset name="audio">
-		<label name="audio_label">
-			Áudio
-		</label>
-		<tooltip name="audio_tooltip">
-			Há um áudio neste local
-		</tooltip>
-		<playtip name="audio_playtip">
-			Iniciar áudio disponível neste local
-		</playtip>
-	</widgetset>
-	<scheme name="rtsp">
-		<label name="rtsp_label">
-			Transmissão em tempo real
-		</label>
-	</scheme>
-	<mimetype name="blank">
-		<label name="blank_label">
-			- Nenhum -
-		</label>
-	</mimetype>
-	<mimetype name="none/none">
-		<label name="none/none_label">
-			- Nenhum - 
-		</label>
-	</mimetype>
-	<mimetype name="audio/*">
-		<label name="audio2_label">
-			Áudio
-		</label>
-	</mimetype>
-	<mimetype name="video/*">
-		<label name="video2_label">
-			Vídeo
-		</label>
-	</mimetype>
-	<mimetype name="image/*">
-		<label name="image2_label">
-			Imagem
-		</label>
-	</mimetype>
-	<mimetype name="video/vnd.secondlife.qt.legacy">
-		<label name="vnd.secondlife.qt.legacy_label">
-			Filme (QuickTime)
-		</label>
-	</mimetype>
-	<mimetype name="application/javascript">
-		<label name="application/javascript_label">
-			Javascript
-		</label>
-	</mimetype>
-	<mimetype name="application/ogg">
-		<label name="application/ogg_label">
-			Áudio/Vídeo Ogg
-		</label>
-	</mimetype>
-	<mimetype name="application/pdf">
-		<label name="application/pdf_label">
-			Documento PDF
-		</label>
-	</mimetype>
-	<mimetype name="application/postscript">
-		<label name="application/postscript_label">
-			Documento Postscript
-		</label>
-	</mimetype>
-	<mimetype name="application/rtf">
-		<label name="application/rtf_label">
-			Rich Text (RTF)
-		</label>
-	</mimetype>
-	<mimetype name="application/smil">
-		<label name="application/smil_label">
-			Synchronized Multimedia Integration Language (SMIL)
-		</label>
-	</mimetype>
-	<mimetype name="application/xhtml+xml">
-		<label name="application/xhtml+xml_label">
-			Página Web (XHTML)
-		</label>
-	</mimetype>
-	<mimetype name="application/x-director">
-		<label name="application/x-director_label">
-			Macromedia Director
-		</label>
-	</mimetype>
-	<mimetype name="application/x-shockwave-flash">
-		<label name="application/x-shockwave-flash_label">
-			Flash
-		</label>
-	</mimetype>
-	<mimetype name="audio/mid">
-		<label name="audio/mid_label">
-			Áudio (MIDI)
-		</label>
-	</mimetype>
-	<mimetype name="audio/mpeg">
-		<label name="audio/mpeg_label">
-			Áudio (MP3)
-		</label>
-	</mimetype>
-	<mimetype name="audio/x-aiff">
-		<label name="audio/x-aiff_label">
-			Áudio (AIFF)
-		</label>
-	</mimetype>
-	<mimetype name="audio/x-wav">
-		<label name="audio/x-wav_label">
-			Áudio (WAV)
-		</label>
-	</mimetype>
-	<mimetype name="image/bmp">
-		<label name="image/bmp_label">
-			Imagem (BMP)
-		</label>
-	</mimetype>
-	<mimetype name="image/gif">
-		<label name="image/gif_label">
-			Imagem (GIF)
-		</label>
-	</mimetype>
-	<mimetype name="image/jpeg">
-		<label name="image/jpeg_label">
-			Imagem (JPEG)
-		</label>
-	</mimetype>
-	<mimetype name="image/png">
-		<label name="image/png_label">
-			Imagem (PNG)
-		</label>
-	</mimetype>
-	<mimetype name="image/svg+xml">
-		<label name="image/svg+xml_label">
-			Imagem (SVG)
-		</label>
-	</mimetype>
-	<mimetype name="image/tiff">
-		<label name="image/tiff_label">
-			Imagem (TIFF)
-		</label>
-	</mimetype>
-	<mimetype name="text/html">
-		<label name="text/html_label">
-			Página Web
-		</label>
-	</mimetype>
-	<mimetype name="text/plain">
-		<label name="text/plain_label">
-			Texto
-		</label>
-	</mimetype>
-	<mimetype name="text/xml">
-		<label name="text/xml_label">
-			XML
-		</label>
-	</mimetype>
-	<mimetype name="video/mpeg">
-		<label name="video/mpeg_label">
-			Filme (MPEG)
-		</label>
-	</mimetype>
-	<mimetype name="video/mp4">
-		<label name="video/mp4_label">
-			Filme (MP4)
-		</label>
-	</mimetype>
-	<mimetype name="video/quicktime">
-		<label name="video/quicktime_label">
-			Filme (QuickTime)
-		</label>
-	</mimetype>
-	<mimetype name="video/x-ms-asf">
-		<label name="video/x-ms-asf_label">
-			Filme (Windows Media ASF)
-		</label>
-	</mimetype>
-	<mimetype name="video/x-ms-wmv">
-		<label name="video/x-ms-wmv_label">
-			Filme (Windows Media WMV)
-		</label>
-	</mimetype>
-	<mimetype name="video/x-msvideo">
-		<label name="video/x-msvideo_label">
-			Filme (AVI)
-		</label>
-	</mimetype>
-</mimetypes>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<mimetypes name="default">
+	<widgetset name="web">
+		<label name="web_label">
+			Conteúdo da Web
+		</label>
+		<tooltip name="web_tooltip">
+			Esta região possui Conteúdo da Web disponível.
+		</tooltip>
+		<playtip name="web_playtip">
+			Exibir Conteúdo da Web
+		</playtip>
+	</widgetset>
+	<widgetset name="movie">
+		<label name="movie_label">
+			Filme
+		</label>
+		<tooltip name="movie_tooltip">
+			Há um filme disponível para se assistir aqui
+		</tooltip>
+		<playtip name="movie_playtip">
+			Iniciar filme
+		</playtip>
+	</widgetset>
+	<widgetset name="none">
+		<label name="none_label">
+			Sem conteúdo disponível
+		</label>
+		<tooltip name="none_tooltip">
+			Não há mídia disponível aqui.
+		</tooltip>
+	</widgetset>
+	<widgetset name="image">
+		<label name="image_label">
+			Imagem
+		</label>
+		<tooltip name="image_tooltip">
+			Há uma imagem neste local
+		</tooltip>
+		<playtip name="image_playtip">
+			Ver a imagem disponível deste local.
+		</playtip>
+	</widgetset>
+	<widgetset name="audio">
+		<label name="audio_label">
+			Áudio
+		</label>
+		<tooltip name="audio_tooltip">
+			Há um áudio neste local
+		</tooltip>
+		<playtip name="audio_playtip">
+			Iniciar áudio disponível neste local
+		</playtip>
+	</widgetset>
+	<scheme name="rtsp">
+		<label name="rtsp_label">
+			Transmissão em tempo real
+		</label>
+	</scheme>
+	<mimetype name="blank">
+		<label name="blank_label">
+			- Nenhum -
+		</label>
+	</mimetype>
+	<mimetype name="none/none">
+		<label name="none/none_label">
+			- Nenhum - 
+		</label>
+	</mimetype>
+	<mimetype name="audio/*">
+		<label name="audio2_label">
+			Áudio
+		</label>
+	</mimetype>
+	<mimetype name="video/*">
+		<label name="video2_label">
+			Vídeo
+		</label>
+	</mimetype>
+	<mimetype name="image/*">
+		<label name="image2_label">
+			Imagem
+		</label>
+	</mimetype>
+	<mimetype name="video/vnd.secondlife.qt.legacy">
+		<label name="vnd.secondlife.qt.legacy_label">
+			Filme (QuickTime)
+		</label>
+	</mimetype>
+	<mimetype name="application/javascript">
+		<label name="application/javascript_label">
+			Javascript
+		</label>
+	</mimetype>
+	<mimetype name="application/ogg">
+		<label name="application/ogg_label">
+			Áudio/Vídeo Ogg
+		</label>
+	</mimetype>
+	<mimetype name="application/pdf">
+		<label name="application/pdf_label">
+			Documento PDF
+		</label>
+	</mimetype>
+	<mimetype name="application/postscript">
+		<label name="application/postscript_label">
+			Documento Postscript
+		</label>
+	</mimetype>
+	<mimetype name="application/rtf">
+		<label name="application/rtf_label">
+			Rich Text (RTF)
+		</label>
+	</mimetype>
+	<mimetype name="application/smil">
+		<label name="application/smil_label">
+			Synchronized Multimedia Integration Language (SMIL)
+		</label>
+	</mimetype>
+	<mimetype name="application/xhtml+xml">
+		<label name="application/xhtml+xml_label">
+			Página Web (XHTML)
+		</label>
+	</mimetype>
+	<mimetype name="application/x-director">
+		<label name="application/x-director_label">
+			Macromedia Director
+		</label>
+	</mimetype>
+	<mimetype name="application/x-shockwave-flash">
+		<label name="application/x-shockwave-flash_label">
+			Flash
+		</label>
+	</mimetype>
+	<mimetype name="audio/mid">
+		<label name="audio/mid_label">
+			Áudio (MIDI)
+		</label>
+	</mimetype>
+	<mimetype name="audio/mpeg">
+		<label name="audio/mpeg_label">
+			Áudio (MP3)
+		</label>
+	</mimetype>
+	<mimetype name="audio/x-aiff">
+		<label name="audio/x-aiff_label">
+			Áudio (AIFF)
+		</label>
+	</mimetype>
+	<mimetype name="audio/x-wav">
+		<label name="audio/x-wav_label">
+			Áudio (WAV)
+		</label>
+	</mimetype>
+	<mimetype name="image/bmp">
+		<label name="image/bmp_label">
+			Imagem (BMP)
+		</label>
+	</mimetype>
+	<mimetype name="image/gif">
+		<label name="image/gif_label">
+			Imagem (GIF)
+		</label>
+	</mimetype>
+	<mimetype name="image/jpeg">
+		<label name="image/jpeg_label">
+			Imagem (JPEG)
+		</label>
+	</mimetype>
+	<mimetype name="image/png">
+		<label name="image/png_label">
+			Imagem (PNG)
+		</label>
+	</mimetype>
+	<mimetype name="image/svg+xml">
+		<label name="image/svg+xml_label">
+			Imagem (SVG)
+		</label>
+	</mimetype>
+	<mimetype name="image/tiff">
+		<label name="image/tiff_label">
+			Imagem (TIFF)
+		</label>
+	</mimetype>
+	<mimetype name="text/html">
+		<label name="text/html_label">
+			Página Web
+		</label>
+	</mimetype>
+	<mimetype name="text/plain">
+		<label name="text/plain_label">
+			Texto
+		</label>
+	</mimetype>
+	<mimetype name="text/xml">
+		<label name="text/xml_label">
+			XML
+		</label>
+	</mimetype>
+	<mimetype name="video/mpeg">
+		<label name="video/mpeg_label">
+			Filme (MPEG)
+		</label>
+	</mimetype>
+	<mimetype name="video/mp4">
+		<label name="video/mp4_label">
+			Filme (MP4)
+		</label>
+	</mimetype>
+	<mimetype name="video/quicktime">
+		<label name="video/quicktime_label">
+			Filme (QuickTime)
+		</label>
+	</mimetype>
+	<mimetype name="video/x-ms-asf">
+		<label name="video/x-ms-asf_label">
+			Filme (Windows Media ASF)
+		</label>
+	</mimetype>
+	<mimetype name="video/x-ms-wmv">
+		<label name="video/x-ms-wmv_label">
+			Filme (Windows Media WMV)
+		</label>
+	</mimetype>
+	<mimetype name="video/x-msvideo">
+		<label name="video/x-msvideo_label">
+			Filme (AVI)
+		</label>
+	</mimetype>
+</mimetypes>
diff --git a/indra/newview/skins/default/xui/pt/panel_audio_device.xml b/indra/newview/skins/default/xui/pt/panel_audio_device.xml
index ab72334f0a..967dc27070 100644
--- a/indra/newview/skins/default/xui/pt/panel_audio_device.xml
+++ b/indra/newview/skins/default/xui/pt/panel_audio_device.xml
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="device_settings">
-	<text name="Audio Devices">
-		Dispositivos de Áudio
-	</text>
-	<text name="Input device (microphone):">
-		Dispositivo de entrada (microfone):
-	</text>
-	<text name="Output device (speakers):">
-		Dispositivo de saída (falantes):
-	</text>
-	<text name="Input level:">
-		Nível de Entrada
-	</text>
-	<text_editor name="voice_intro_text1">
-		Ajuste a barra para controlar o volume de som para os outros residentes. Para testar o nível de entrada, basta falar em seu microfone.
-	</text_editor>
-	<volume_slider name="mic_volume_slider" tool_tip="Altere o volume usando este controle gradual"/>
-	<text name="wait_text">
-		Por Favor aguarde
-	</text>
-	<string name="default_text">
-		Padrão
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="device_settings">
+	<text name="Audio Devices">
+		Dispositivos de Áudio
+	</text>
+	<text name="Input device (microphone):">
+		Dispositivo de entrada (microfone):
+	</text>
+	<text name="Output device (speakers):">
+		Dispositivo de saída (falantes):
+	</text>
+	<text name="Input level:">
+		Nível de Entrada
+	</text>
+	<text_editor name="voice_intro_text1">
+		Ajuste a barra para controlar o volume de som para os outros residentes. Para testar o nível de entrada, basta falar em seu microfone.
+	</text_editor>
+	<volume_slider name="mic_volume_slider" tool_tip="Altere o volume usando este controle gradual"/>
+	<text name="wait_text">
+		Por Favor aguarde
+	</text>
+	<string name="default_text">
+		Padrão
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_friends.xml b/indra/newview/skins/default/xui/pt/panel_friends.xml
index 18aaaf5c70..afd7b79eaa 100644
--- a/indra/newview/skins/default/xui/pt/panel_friends.xml
+++ b/indra/newview/skins/default/xui/pt/panel_friends.xml
@@ -1,20 +1,20 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="friends">
-	<string name="Multiple">
-		Múltiplos amigos...
-	</string>
-	<scroll_list name="friend_list" tool_tip="Aperte shift ou control enquanto clica para selecionar múltiplos amigos">
-		<column name="icon_online_status" tool_tip="Status Online"/>
-		<column label="Nome" name="friend_name" tool_tip="Nome"/>
-		<column name="icon_visible_online" tool_tip="Amigo pode ver quando você está online"/>
-		<column name="icon_visible_map" tool_tip="Amigo pode localizá-lo no mapa"/>
-		<column name="icon_edit_mine" tool_tip="Amigo pode editar, apagar ou pegar seus objetos"/>
-		<column name="icon_edit_theirs" tool_tip="Você pode editar os objetos deste amigo"/>
-	</scroll_list>
-	<button label="MI/Chamar" name="im_btn" tool_tip="Abrir sessão de Mensagem Instantânea"/>
-	<button label="Perfil" name="profile_btn" tool_tip="Mostrar foto, grupos e outras informações"/>
-	<button label="Teletransporte..." name="offer_teleport_btn" tool_tip="Oferecer a este amigo o teletransporte para sua localização atual"/>
-	<button label="Pagar..." name="pay_btn" tool_tip="Dar Linden dólares (L$) a este amigo"/>
-	<button label="Remover..." name="remove_btn" tool_tip="Remover esta pessoa de sua lista de amigos"/>
-	<button label="Adicionar..." name="add_btn" tool_tip="Oferecer amizade a um residente"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="friends">
+	<string name="Multiple">
+		Múltiplos amigos...
+	</string>
+	<scroll_list name="friend_list" tool_tip="Aperte shift ou control enquanto clica para selecionar múltiplos amigos">
+		<column name="icon_online_status" tool_tip="Status Online"/>
+		<column label="Nome" name="friend_name" tool_tip="Nome"/>
+		<column name="icon_visible_online" tool_tip="Amigo pode ver quando você está online"/>
+		<column name="icon_visible_map" tool_tip="Amigo pode localizá-lo no mapa"/>
+		<column name="icon_edit_mine" tool_tip="Amigo pode editar, apagar ou pegar seus objetos"/>
+		<column name="icon_edit_theirs" tool_tip="Você pode editar os objetos deste amigo"/>
+	</scroll_list>
+	<button label="MI/Chamar" name="im_btn" tool_tip="Abrir sessão de Mensagem Instantânea"/>
+	<button label="Perfil" name="profile_btn" tool_tip="Mostrar foto, grupos e outras informações"/>
+	<button label="Teletransporte..." name="offer_teleport_btn" tool_tip="Oferecer a este amigo o teletransporte para sua localização atual"/>
+	<button label="Pagar..." name="pay_btn" tool_tip="Dar Linden dólares (L$) a este amigo"/>
+	<button label="Remover..." name="remove_btn" tool_tip="Remover esta pessoa de sua lista de amigos"/>
+	<button label="Adicionar..." name="add_btn" tool_tip="Oferecer amizade a um residente"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_group_general.xml b/indra/newview/skins/default/xui/pt/panel_group_general.xml
index 193c5ac7d6..9eba44ba61 100644
--- a/indra/newview/skins/default/xui/pt/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/pt/panel_group_general.xml
@@ -1,66 +1,66 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Geral" name="general_tab">
-	<string name="help_text">
-		A aba Geral contém informações gerais sobre este grupo, a lista dos donos e membros visíveis, preferências gerais do grupo e opções dos membros. Passe o mouse sobre as opções para mais ajuda.
-	</string>
-	<string name="group_info_unchanged">
-		Informações gerais do grupo foram modificadas
-	</string>
-	<button label="?" label_selected="?" name="help_button"/>
-	<line_editor label="Digite o nome do seu novo grupo aqui" name="group_name_editor"/>
-	<text name="group_name">
-		Digite o nome do seu novo grupo aqui
-	</text>
-	<text name="prepend_founded_by">
-		Fundado por:
-	</text>
-	<text name="founder_name">
-		(espera)
-	</text>
-	<text name="group_charter_label">
-		Declaração do Grupo
-	</text>
-	<texture_picker label="Insígnia do Grupo" name="insignia" tool_tip="Clique para escolher uma imagem"/>
-	<text_editor name="charter">
-		Declaração do grupo
-	</text_editor>
-	<button label="Unir (L$0)" label_selected="Unir (L$0)" name="join_button"/>
-	<button label="Vista detalhada" label_selected="Vista detalhada" name="info_button"/>
-	<text name="text_owners_and_visible_members">
-		Proprietários &amp; Membros visíveis
-	</text>
-	<text name="text_owners_are_shown_in_bold">
-		(Proprietários são mostrados em negrito )
-	</text>
-	<name_list name="visible_members">
-		<column label="Nome do membro" name="name"/>
-		<column label="Título" name="title"/>
-		<column label="Último login" name="online"/>
-	</name_list>
-	<text name="text_group_preferences">
-		Preferências do Grupo
-	</text>
-	<panel name="preferences_container">
-		<check_box label="Mostre na busca" name="show_in_group_list" tool_tip="Deixe as pessoas verem este grupo nos resultados de busca."/>
-		<check_box label="Adesão aberta" name="open_enrollement" tool_tip="Definir se este grupo permite que novos membros entrem sem serem convidados"/>
-		<check_box label="Taxa de adesão: L$" name="check_enrollment_fee" tool_tip="Define se é necessária uma taxa de adesão para se unir ao grupo."/>
-		<spinner name="spin_enrollment_fee" tool_tip="Os novos membros devem pagar esta taxa para se unir ao grupo quando a Taxa de Adesão está marcada."/>
-
-		<panel name="title_container">
-			<text name="active_title_label">
-				Meu título ativo
-			</text>
-			<combo_box name="active_title" tool_tip="Define o título que aparece em seu avatar quando o grupo estiver ativo."/>
-		</panel>
-		<check_box label="Receber notícias do grupo" name="receive_notices" tool_tip="Define se Você deseja receber notícias deste grupo. Desmarque esta caixa se o grupo está lhe fazendo spam."/>
-		<check_box label="Listar grupo no meu perfil" name="list_groups_in_profile" tool_tip="Define se você deseja listar este grupo no seu Perfil"/>
-	</panel>
-	<string name="incomplete_member_data_str">
-		Recuperando dados do membro
-	</string>
-	<string name="confirm_group_create_str">
-		Criar este grupo irá custar L$100. 
-Você está realmente, realmente, REALMENTE seguro que deseja gastar L$100 para criar este grupo? 
-Esteja consciente de que se ninguém mais se juntar a este grupo dentro de 48 horas, este será dissolvido e o nome não estará disponível para uso futuro.
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Geral" name="general_tab">
+	<string name="help_text">
+		A aba Geral contém informações gerais sobre este grupo, a lista dos donos e membros visíveis, preferências gerais do grupo e opções dos membros. Passe o mouse sobre as opções para mais ajuda.
+	</string>
+	<string name="group_info_unchanged">
+		Informações gerais do grupo foram modificadas
+	</string>
+	<button label="?" label_selected="?" name="help_button"/>
+	<line_editor label="Digite o nome do seu novo grupo aqui" name="group_name_editor"/>
+	<text name="group_name">
+		Digite o nome do seu novo grupo aqui
+	</text>
+	<text name="prepend_founded_by">
+		Fundado por:
+	</text>
+	<text name="founder_name">
+		(espera)
+	</text>
+	<text name="group_charter_label">
+		Declaração do Grupo
+	</text>
+	<texture_picker label="Insígnia do Grupo" name="insignia" tool_tip="Clique para escolher uma imagem"/>
+	<text_editor name="charter">
+		Declaração do grupo
+	</text_editor>
+	<button label="Unir (L$0)" label_selected="Unir (L$0)" name="join_button"/>
+	<button label="Vista detalhada" label_selected="Vista detalhada" name="info_button"/>
+	<text name="text_owners_and_visible_members">
+		Proprietários &amp; Membros visíveis
+	</text>
+	<text name="text_owners_are_shown_in_bold">
+		(Proprietários são mostrados em negrito )
+	</text>
+	<name_list name="visible_members">
+		<column label="Nome do membro" name="name"/>
+		<column label="Título" name="title"/>
+		<column label="Último login" name="online"/>
+	</name_list>
+	<text name="text_group_preferences">
+		Preferências do Grupo
+	</text>
+	<panel name="preferences_container">
+		<check_box label="Mostre na busca" name="show_in_group_list" tool_tip="Deixe as pessoas verem este grupo nos resultados de busca."/>
+		<check_box label="Adesão aberta" name="open_enrollement" tool_tip="Definir se este grupo permite que novos membros entrem sem serem convidados"/>
+		<check_box label="Taxa de adesão: L$" name="check_enrollment_fee" tool_tip="Define se é necessária uma taxa de adesão para se unir ao grupo."/>
+		<spinner name="spin_enrollment_fee" tool_tip="Os novos membros devem pagar esta taxa para se unir ao grupo quando a Taxa de Adesão está marcada."/>
+
+		<panel name="title_container">
+			<text name="active_title_label">
+				Meu título ativo
+			</text>
+			<combo_box name="active_title" tool_tip="Define o título que aparece em seu avatar quando o grupo estiver ativo."/>
+		</panel>
+		<check_box label="Receber notícias do grupo" name="receive_notices" tool_tip="Define se Você deseja receber notícias deste grupo. Desmarque esta caixa se o grupo está lhe fazendo spam."/>
+		<check_box label="Listar grupo no meu perfil" name="list_groups_in_profile" tool_tip="Define se você deseja listar este grupo no seu Perfil"/>
+	</panel>
+	<string name="incomplete_member_data_str">
+		Recuperando dados do membro
+	</string>
+	<string name="confirm_group_create_str">
+		Criar este grupo irá custar L$100. 
+Você está realmente, realmente, REALMENTE seguro que deseja gastar L$100 para criar este grupo? 
+Esteja consciente de que se ninguém mais se juntar a este grupo dentro de 48 horas, este será dissolvido e o nome não estará disponível para uso futuro.
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_group_invite.xml b/indra/newview/skins/default/xui/pt/panel_group_invite.xml
index 5ee59c4772..f34fa1c60e 100644
--- a/indra/newview/skins/default/xui/pt/panel_group_invite.xml
+++ b/indra/newview/skins/default/xui/pt/panel_group_invite.xml
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Convidar um membro" name="invite_panel">
-	<text name="help_text">
-		Você pode selecionar múltiplos residentes
-para convidar ao seu grupo. Clique 
-&apos;Abra o Selecionador de Pessoas&apos; para iniciar.
-	</text>
-	<button label="Abrir selecionador de pessoas" name="add_button" tool_tip=""/>
-	<name_list name="invitee_list" tool_tip="Mantenha apertada a tecla Control e clique nos nomes dos residentes para uma seleção múltipla."/>
-	<button label="Remove Selected from List" name="remove_button" tool_tip="Remove os residentes selecionados acima  da lista de convite."/>
-	<text name="role_text">
-		Escolha que Função atribuir a eles:
-	</text>
-	<combo_box name="role_name" tool_tip="Escolha a partir da lista de Funções autorizadas a você para inclusão de membros."/>
-	<button label="Mandar convites" name="ok_button"/>
-	<button label="Cancelar" name="cancel_button"/>
-	<string name="confirm_invite_owner_str">
-		Você tem certeza de que deseja convidar novo(s) proprietário(s)?  Esta ação é permanente!
-	</string>
-	<string name="loading">
-		(carregando...)
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Convidar um membro" name="invite_panel">
+	<text name="help_text">
+		Você pode selecionar múltiplos residentes
+para convidar ao seu grupo. Clique 
+&apos;Abra o Selecionador de Pessoas&apos; para iniciar.
+	</text>
+	<button label="Abrir selecionador de pessoas" name="add_button" tool_tip=""/>
+	<name_list name="invitee_list" tool_tip="Mantenha apertada a tecla Control e clique nos nomes dos residentes para uma seleção múltipla."/>
+	<button label="Remove Selected from List" name="remove_button" tool_tip="Remove os residentes selecionados acima  da lista de convite."/>
+	<text name="role_text">
+		Escolha que Função atribuir a eles:
+	</text>
+	<combo_box name="role_name" tool_tip="Escolha a partir da lista de Funções autorizadas a você para inclusão de membros."/>
+	<button label="Mandar convites" name="ok_button"/>
+	<button label="Cancelar" name="cancel_button"/>
+	<string name="confirm_invite_owner_str">
+		Você tem certeza de que deseja convidar novo(s) proprietário(s)?  Esta ação é permanente!
+	</string>
+	<string name="loading">
+		(carregando...)
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_group_land_money.xml b/indra/newview/skins/default/xui/pt/panel_group_land_money.xml
index b1d080c0f7..59a8f8f46d 100644
--- a/indra/newview/skins/default/xui/pt/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/pt/panel_group_land_money.xml
@@ -1,74 +1,74 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Terra &amp; L$" name="land_money_tab">
-	<string name="help_text">
-		Lotes pertencentes ao grupo são listados com detalhes de contribuição. Um aviso aparece até que o total de Terras em Uso seja menor ou igual ao Total de Contribuições. As abas de Planejamento, Detalhes e Vendas fornecem informações sobre as finanças do grupo.
-	</string>
-	<button label="?" name="help_button"/>
-	<string name="cant_view_group_land_text">
-		Você não tem permissão para ver as terras pertencentes ao grupo.
-	</string>
-	<string name="cant_view_group_accounting_text">
-		Você não tem permissão para ver as informações sobre as contas do grupo.
-	</string>
-	<string name="loading_txt">
-		Carregando...
-	</string>
-	<text name="group_land_heading">
-		Terra percentente ao grupo
-	</text>
-	<scroll_list name="group_parcel_list">
-		<column label="Nome do Lote" name="name"/>
-		<column label="Região" name="location"/>
-		<column label="Área" name="area"/>
-	</scroll_list>
-	<button label="Mostrar no Mapa" label_selected="Mostrar no Mapa" name="map_button"/>
-	<text name="total_contributed_land_label">
-		Contribuição Total:
-	</text>
-	<text name="total_contributed_land_value">
-		[AREA] m²
-	</text>
-	<text name="total_land_in_use_label">
-		Total de Terra em Uso:
-	</text>
-	<text name="total_land_in_use_value">
-		[AREA] m²
-	</text>
-	<text name="land_available_label">
-		Terra Disponível:
-	</text>
-	<text name="land_available_value">
-		[AREA] m²
-	</text>
-	<text name="your_contribution_label">
-		Sua Contribuição:
-	</text>
-	<string name="land_contrib_error">
-		Não é possível definir sua contribuição para o terreno.
-	</string>
-	<text name="your_contribution_max_value">
-		m² ([AMOUNT] máxima)
-	</text>
-	<text name="group_over_limit_text">
-		Membros do grupo precisam contribuir com mais créditos de Terra para garantir a terra em uso.
-	</text>
-	<text name="group_money_heading">
-		Grupo L$
-	</text>
-	<tab_container name="group_money_tab_container">
-		<panel label="Detalhes" name="group_money_details_tab">
-			<text_editor name="group_money_details_text">
-				Computando...
-			</text_editor>
-			<button label="&lt; Cedo" label_selected="&lt; Cedo" name="earlier_details_button" tool_tip="Voltar no Tempo"/>
-			<button label="Tarde &gt;" label_selected="Tarde &gt;" name="later_details_button" tool_tip="Adiantar o Tempo"/>
-		</panel>
-		<panel label="Vendas" name="group_money_sales_tab">
-			<text_editor name="group_money_sales_text">
-				Computando...
-			</text_editor>
-			<button label="&lt; Mais Cedo" label_selected="&lt; Mais Cedo" name="earlier_sales_button" tool_tip="Voltar no Tempo"/>
-			<button label="Mais Tarde &gt;" label_selected="Mais Tarde &gt;" name="later_sales_button" tool_tip="Adiantar o Tempo"/>
-		</panel>
-	</tab_container>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Terra &amp; L$" name="land_money_tab">
+	<string name="help_text">
+		Lotes pertencentes ao grupo são listados com detalhes de contribuição. Um aviso aparece até que o total de Terras em Uso seja menor ou igual ao Total de Contribuições. As abas de Planejamento, Detalhes e Vendas fornecem informações sobre as finanças do grupo.
+	</string>
+	<button label="?" name="help_button"/>
+	<string name="cant_view_group_land_text">
+		Você não tem permissão para ver as terras pertencentes ao grupo.
+	</string>
+	<string name="cant_view_group_accounting_text">
+		Você não tem permissão para ver as informações sobre as contas do grupo.
+	</string>
+	<string name="loading_txt">
+		Carregando...
+	</string>
+	<text name="group_land_heading">
+		Terra percentente ao grupo
+	</text>
+	<scroll_list name="group_parcel_list">
+		<column label="Nome do Lote" name="name"/>
+		<column label="Região" name="location"/>
+		<column label="Área" name="area"/>
+	</scroll_list>
+	<button label="Mostrar no Mapa" label_selected="Mostrar no Mapa" name="map_button"/>
+	<text name="total_contributed_land_label">
+		Contribuição Total:
+	</text>
+	<text name="total_contributed_land_value">
+		[AREA] m²
+	</text>
+	<text name="total_land_in_use_label">
+		Total de Terra em Uso:
+	</text>
+	<text name="total_land_in_use_value">
+		[AREA] m²
+	</text>
+	<text name="land_available_label">
+		Terra Disponível:
+	</text>
+	<text name="land_available_value">
+		[AREA] m²
+	</text>
+	<text name="your_contribution_label">
+		Sua Contribuição:
+	</text>
+	<string name="land_contrib_error">
+		Não é possível definir sua contribuição para o terreno.
+	</string>
+	<text name="your_contribution_max_value">
+		m² ([AMOUNT] máxima)
+	</text>
+	<text name="group_over_limit_text">
+		Membros do grupo precisam contribuir com mais créditos de Terra para garantir a terra em uso.
+	</text>
+	<text name="group_money_heading">
+		Grupo L$
+	</text>
+	<tab_container name="group_money_tab_container">
+		<panel label="Detalhes" name="group_money_details_tab">
+			<text_editor name="group_money_details_text">
+				Computando...
+			</text_editor>
+			<button label="&lt; Cedo" label_selected="&lt; Cedo" name="earlier_details_button" tool_tip="Voltar no Tempo"/>
+			<button label="Tarde &gt;" label_selected="Tarde &gt;" name="later_details_button" tool_tip="Adiantar o Tempo"/>
+		</panel>
+		<panel label="Vendas" name="group_money_sales_tab">
+			<text_editor name="group_money_sales_text">
+				Computando...
+			</text_editor>
+			<button label="&lt; Mais Cedo" label_selected="&lt; Mais Cedo" name="earlier_sales_button" tool_tip="Voltar no Tempo"/>
+			<button label="Mais Tarde &gt;" label_selected="Mais Tarde &gt;" name="later_sales_button" tool_tip="Adiantar o Tempo"/>
+		</panel>
+	</tab_container>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_group_notices.xml b/indra/newview/skins/default/xui/pt/panel_group_notices.xml
index 79ca749798..1285a24ace 100644
--- a/indra/newview/skins/default/xui/pt/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/pt/panel_group_notices.xml
@@ -1,70 +1,70 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notícias" name="notices_tab">
-	<text name="help_text">
-		As notícias são uma maneira rápida de
-comunicar-se através de um grupo transmitindo uma mensagem e
-entregando um item anexo, opcionalmente. As notícias vão apenas a membros
-do grupo que têm a função habilitada para receber notícias. Você pode desligar
-Notícias na aba Geral.
-	</text>
-	<text name="no_notices_text">
-		Não existem notícias anteriores.
-	</text>
-	<button label="?" label_selected="?" name="help_button"/>
-	<text name="lbl">
-		Arquivo de notícias do grupo
-	</text>
-	<text name="lbl2">
-		As notícias são mantidas por 14 dias. Clique na notícia abaixo que você deseja ver.
-Clique no botão “Atualizar” para verificar se novas notícias foram recebidas.
-Listas de aviso estão limitadas a 200 por grupo, diariamente.
-	</text>
-	<scroll_list name="notice_list">
-		<column label="Assunto" name="subject"/>
-		<column label="Para" name="from"/>
-		<column label="Data" name="date"/>
-	</scroll_list>
-	<text name="notice_list_none_found">
-		Nenhum encontrado.
-	</text>
-	<button label="Criar nova notícia" label_selected="Criar nova notícia" name="create_new_notice"/>
-	<button label="Atualizar" label_selected="Atualizar Lista" name="refresh_notices"/>
-	<panel label="Criar nova notícia" name="panel_create_new_notice">
-		<text name="lbl">
-			Criar uma notícia
-		</text>
-		<text name="lbl2">
-			Você deve colocar um assunto para enviar uma notícia. Você pode
-adicionar um item simples à notícia, arrastando-o do seu
-Inventário para o painel. Itens anexados devem ser copiáveis
-e transferíveis e você não pode mandar uma pasta.
-		</text>
-		<text name="lbl3">
-			Assunto:
-		</text>
-		<text name="lbl4">
-			Mensagem:
-		</text>
-		<text name="lbl5">
-			Anexo:
-		</text>
-		<button label="Remover o anexo" label_selected="Remover o anexo" name="remove_attachment"/>
-		<button label="Enviar notícia" label_selected="Enviar notícia" name="send_notice"/>
-		<panel name="drop_target" tool_tip="Arraste um item do inventário para dentro da caixa de mensagem para enviá-lo com a notícia. Você deve ter permissão para copiar e transferir o objeto, para enviá-lo com a notícia."/>
-	</panel>
-	<panel label="Visualizar Notícia Anterior" name="panel_view_past_notice">
-		<text name="lbl">
-			Notícia arquivada
-		</text>
-		<text name="lbl2">
-			Para enviar uma notícia nova, clique no botão &apos;Criar Nova Notícia&apos; acima.
-		</text>
-		<text name="lbl3">
-			Asunto:
-		</text>
-		<text name="lbl4">
-			Mensagem:
-		</text>
-		<button label="Abrir o anexo" label_selected="Abrir o anexo" name="open_attachment"/>
-	</panel>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Notícias" name="notices_tab">
+	<text name="help_text">
+		As notícias são uma maneira rápida de
+comunicar-se através de um grupo transmitindo uma mensagem e
+entregando um item anexo, opcionalmente. As notícias vão apenas a membros
+do grupo que têm a função habilitada para receber notícias. Você pode desligar
+Notícias na aba Geral.
+	</text>
+	<text name="no_notices_text">
+		Não existem notícias anteriores.
+	</text>
+	<button label="?" label_selected="?" name="help_button"/>
+	<text name="lbl">
+		Arquivo de notícias do grupo
+	</text>
+	<text name="lbl2">
+		As notícias são mantidas por 14 dias. Clique na notícia abaixo que você deseja ver.
+Clique no botão “Atualizar” para verificar se novas notícias foram recebidas.
+Listas de aviso estão limitadas a 200 por grupo, diariamente.
+	</text>
+	<scroll_list name="notice_list">
+		<column label="Assunto" name="subject"/>
+		<column label="Para" name="from"/>
+		<column label="Data" name="date"/>
+	</scroll_list>
+	<text name="notice_list_none_found">
+		Nenhum encontrado.
+	</text>
+	<button label="Criar nova notícia" label_selected="Criar nova notícia" name="create_new_notice"/>
+	<button label="Atualizar" label_selected="Atualizar Lista" name="refresh_notices"/>
+	<panel label="Criar nova notícia" name="panel_create_new_notice">
+		<text name="lbl">
+			Criar uma notícia
+		</text>
+		<text name="lbl2">
+			Você deve colocar um assunto para enviar uma notícia. Você pode
+adicionar um item simples à notícia, arrastando-o do seu
+Inventário para o painel. Itens anexados devem ser copiáveis
+e transferíveis e você não pode mandar uma pasta.
+		</text>
+		<text name="lbl3">
+			Assunto:
+		</text>
+		<text name="lbl4">
+			Mensagem:
+		</text>
+		<text name="lbl5">
+			Anexo:
+		</text>
+		<button label="Remover o anexo" label_selected="Remover o anexo" name="remove_attachment"/>
+		<button label="Enviar notícia" label_selected="Enviar notícia" name="send_notice"/>
+		<panel name="drop_target" tool_tip="Arraste um item do inventário para dentro da caixa de mensagem para enviá-lo com a notícia. Você deve ter permissão para copiar e transferir o objeto, para enviá-lo com a notícia."/>
+	</panel>
+	<panel label="Visualizar Notícia Anterior" name="panel_view_past_notice">
+		<text name="lbl">
+			Notícia arquivada
+		</text>
+		<text name="lbl2">
+			Para enviar uma notícia nova, clique no botão &apos;Criar Nova Notícia&apos; acima.
+		</text>
+		<text name="lbl3">
+			Asunto:
+		</text>
+		<text name="lbl4">
+			Mensagem:
+		</text>
+		<button label="Abrir o anexo" label_selected="Abrir o anexo" name="open_attachment"/>
+	</panel>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_group_roles.xml b/indra/newview/skins/default/xui/pt/panel_group_roles.xml
index 1e414201c5..5371355e9b 100644
--- a/indra/newview/skins/default/xui/pt/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/pt/panel_group_roles.xml
@@ -1,139 +1,139 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Membros e Funções" name="roles_tab">
-	<string name="default_needs_apply_text">
-		Existem alterações não aplicadas na sub-aba atual.
-	</string>
-	<string name="want_apply_text">
-		Você quer submeter essas alterações?
-	</string>
-	<button label="?" name="help_button"/>
-	<panel name="members_header">
-		<text name="static">
-			Membros e Funções
-		</text>
-		<text name="static2">
-			São atribuídas funções com habilidades aos membros do grupo. 
-Estes ajustes podem ser facilmente customizados para uma flexibilidade e organização maiores.
-		</text>
-	</panel>
-	<panel name="roles_header">
-		<text name="static">
-			Funções
-		</text>
-		<text name="role_properties_modifiable">
-			Selecionar uma função abaixo. Você pode modificar o nome, a descrição e o título do membro.
-		</text>
-		<text name="role_properties_not_modifiable">
-			Selecione uma função abaixo para ver suas propriedades, membros e habilidades permitidas.
-		</text>
-		<text name="role_actions_modifiable">
-			Você também pode atribuir habilidades à função.
-		</text>
-		<text name="role_actions_not_modifiable">
-			Você pode ver, mas não pode alterar habilidades atribuídas.
-		</text>
-	</panel>
-	<panel name="actions_header">
-		<text name="static">
-			Habilidades
-		</text>
-		<text name="static2">
-			Você pode ver a descrição de uma habilidade e quais funções e membros podem executar essa habilidade.
-		</text>
-	</panel>
-	<tab_container name="roles_tab_container">
-		<panel label="Membros" name="members_sub_tab" tool_tip="Membros">
-			<button label="Pesquisar" name="search_button"/>
-			<button label="Mostrar todos" name="show_all_button"/>
-			<name_list name="member_list">
-				<column label="Nome do membro" name="name"/>
-				<column label="Tarifa doada" name="donated"/>
-				<column label="Último login" name="online"/>
-			</name_list>
-			<button label="Convidar nova pessoa..." name="member_invite"/>
-			<button label="Ejetar do Grupo" name="member_eject"/>
-			<string name="help_text">
-				Você pode adicionar ou remover as funções designadas aos membros. Selecione vários membros, segurando a tecla Ctrl e clicando em seus nomes.
-			</string>
-		</panel>
-		<panel label="Funções" name="roles_sub_tab">
-			<button label="Busca" name="search_button"/>
-			<button label="Mostrar todos" name="show_all_button"/>
-			<scroll_list name="role_list">
-				<column label="Nome da função" name="name"/>
-				<column label="Título" name="title"/>
-				<column label="Membro" name="members"/>
-			</scroll_list>
-			<button label="Criar nova função..." name="role_create"/>
-			<button label="Apagar função" name="role_delete"/>
-			<string name="help_text">
-				As funções têm um título e uma lista de habilidades
-permitidas que os membros podem executar. Os membros poderão ter um ou mais funções.
- Um grupo poderá ter até 10 funções, incluíndo as funções dos membros e do dono do grupo.
-			</string>
-			<string name="cant_delete_role">
-				As funções &apos;todos&apos; e &apos;donos&apos; são especiais e não podem ser deletadas.
-			</string>
-		</panel>
-		<panel label="Habilidades" name="actions_sub_tab">
-			<button label="Busca" name="search_button"/>
-			<button label="Mostrar todos" name="show_all_button"/>
-			<scroll_list name="action_list" tool_tip="Selecione uma habilidade para ver mais detalhes."/>
-			<string name="help_text">
-				As habilidades permitem que os membros nas funções façam coisas específicas dentro do grupo.
-Há uma grande variedade de habilidades.
-			</string>
-		</panel>
-	</tab_container>
-	<panel name="members_footer">
-		<text name="static">
-			Funções atribuídas
-		</text>
-		<text name="static2">
-			Habilidades permitidas
-		</text>
-		<scroll_list name="member_allowed_actions" tool_tip="Para detalhes de cada habilidade permitida, veja a aba Habilidades."/>
-	</panel>
-	<panel name="roles_footer">
-		<text name="static">
-			Nome
-		</text>
-		<text name="static2">
-			Descrição
-		</text>
-		<line_editor name="role_name">
-			Empregados
-		</line_editor>
-		<text name="static3">
-			Título
-		</text>
-		<line_editor name="role_title">
-			(esperando)
-		</line_editor>
-		<text_editor name="role_description">
-			(esperando)
-		</text_editor>
-		<text name="static4">
-			Membros atribuídos
-		</text>
-		<text name="static5" tool_tip="Uma lista de habilidades que a função selecionada atualmente pode executar.">
-			Habilidades permitidas
-		</text>
-		<check_box label="Membros estão visíveis" name="role_visible_in_list" tool_tip="Selecione se os membros desta função estarão visíveis na aba Diversos, para as pessoas de fora do grupo."/>
-		<scroll_list name="role_allowed_actions" tool_tip="Para ver detalhes de cada habilidade permitida, veja a aba correspondente."/>
-	</panel>
-	<panel name="actions_footer">
-		<text name="static">
-			Descrição
-		</text>
-		<text_editor name="action_description">
-			Essa habilidade permite tirar alguem do grupo. Somente o dono do grupo poderá retirar outro dono do grupo.
-		</text_editor>
-		<text name="static2">
-			Funções com habilidades
-		</text>
-		<text name="static3">
-			Membros com habilidades
-		</text>
-	</panel>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Membros e Funções" name="roles_tab">
+	<string name="default_needs_apply_text">
+		Existem alterações não aplicadas na sub-aba atual.
+	</string>
+	<string name="want_apply_text">
+		Você quer submeter essas alterações?
+	</string>
+	<button label="?" name="help_button"/>
+	<panel name="members_header">
+		<text name="static">
+			Membros e Funções
+		</text>
+		<text name="static2">
+			São atribuídas funções com habilidades aos membros do grupo. 
+Estes ajustes podem ser facilmente customizados para uma flexibilidade e organização maiores.
+		</text>
+	</panel>
+	<panel name="roles_header">
+		<text name="static">
+			Funções
+		</text>
+		<text name="role_properties_modifiable">
+			Selecionar uma função abaixo. Você pode modificar o nome, a descrição e o título do membro.
+		</text>
+		<text name="role_properties_not_modifiable">
+			Selecione uma função abaixo para ver suas propriedades, membros e habilidades permitidas.
+		</text>
+		<text name="role_actions_modifiable">
+			Você também pode atribuir habilidades à função.
+		</text>
+		<text name="role_actions_not_modifiable">
+			Você pode ver, mas não pode alterar habilidades atribuídas.
+		</text>
+	</panel>
+	<panel name="actions_header">
+		<text name="static">
+			Habilidades
+		</text>
+		<text name="static2">
+			Você pode ver a descrição de uma habilidade e quais funções e membros podem executar essa habilidade.
+		</text>
+	</panel>
+	<tab_container name="roles_tab_container">
+		<panel label="Membros" name="members_sub_tab" tool_tip="Membros">
+			<button label="Pesquisar" name="search_button"/>
+			<button label="Mostrar todos" name="show_all_button"/>
+			<name_list name="member_list">
+				<column label="Nome do membro" name="name"/>
+				<column label="Tarifa doada" name="donated"/>
+				<column label="Último login" name="online"/>
+			</name_list>
+			<button label="Convidar nova pessoa..." name="member_invite"/>
+			<button label="Ejetar do Grupo" name="member_eject"/>
+			<string name="help_text">
+				Você pode adicionar ou remover as funções designadas aos membros. Selecione vários membros, segurando a tecla Ctrl e clicando em seus nomes.
+			</string>
+		</panel>
+		<panel label="Funções" name="roles_sub_tab">
+			<button label="Busca" name="search_button"/>
+			<button label="Mostrar todos" name="show_all_button"/>
+			<scroll_list name="role_list">
+				<column label="Nome da função" name="name"/>
+				<column label="Título" name="title"/>
+				<column label="Membro" name="members"/>
+			</scroll_list>
+			<button label="Criar nova função..." name="role_create"/>
+			<button label="Apagar função" name="role_delete"/>
+			<string name="help_text">
+				As funções têm um título e uma lista de habilidades
+permitidas que os membros podem executar. Os membros poderão ter um ou mais funções.
+ Um grupo poderá ter até 10 funções, incluíndo as funções dos membros e do dono do grupo.
+			</string>
+			<string name="cant_delete_role">
+				As funções &apos;todos&apos; e &apos;donos&apos; são especiais e não podem ser deletadas.
+			</string>
+		</panel>
+		<panel label="Habilidades" name="actions_sub_tab">
+			<button label="Busca" name="search_button"/>
+			<button label="Mostrar todos" name="show_all_button"/>
+			<scroll_list name="action_list" tool_tip="Selecione uma habilidade para ver mais detalhes."/>
+			<string name="help_text">
+				As habilidades permitem que os membros nas funções façam coisas específicas dentro do grupo.
+Há uma grande variedade de habilidades.
+			</string>
+		</panel>
+	</tab_container>
+	<panel name="members_footer">
+		<text name="static">
+			Funções atribuídas
+		</text>
+		<text name="static2">
+			Habilidades permitidas
+		</text>
+		<scroll_list name="member_allowed_actions" tool_tip="Para detalhes de cada habilidade permitida, veja a aba Habilidades."/>
+	</panel>
+	<panel name="roles_footer">
+		<text name="static">
+			Nome
+		</text>
+		<text name="static2">
+			Descrição
+		</text>
+		<line_editor name="role_name">
+			Empregados
+		</line_editor>
+		<text name="static3">
+			Título
+		</text>
+		<line_editor name="role_title">
+			(esperando)
+		</line_editor>
+		<text_editor name="role_description">
+			(esperando)
+		</text_editor>
+		<text name="static4">
+			Membros atribuídos
+		</text>
+		<text name="static5" tool_tip="Uma lista de habilidades que a função selecionada atualmente pode executar.">
+			Habilidades permitidas
+		</text>
+		<check_box label="Membros estão visíveis" name="role_visible_in_list" tool_tip="Selecione se os membros desta função estarão visíveis na aba Diversos, para as pessoas de fora do grupo."/>
+		<scroll_list name="role_allowed_actions" tool_tip="Para ver detalhes de cada habilidade permitida, veja a aba correspondente."/>
+	</panel>
+	<panel name="actions_footer">
+		<text name="static">
+			Descrição
+		</text>
+		<text_editor name="action_description">
+			Essa habilidade permite tirar alguem do grupo. Somente o dono do grupo poderá retirar outro dono do grupo.
+		</text_editor>
+		<text name="static2">
+			Funções com habilidades
+		</text>
+		<text name="static3">
+			Membros com habilidades
+		</text>
+	</panel>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_login.xml b/indra/newview/skins/default/xui/pt/panel_login.xml
index 8dc8867e0f..5446875654 100644
--- a/indra/newview/skins/default/xui/pt/panel_login.xml
+++ b/indra/newview/skins/default/xui/pt/panel_login.xml
@@ -1,37 +1,37 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_login">
-	<text name="first_name_text">
-		Primeiro nome:
-	</text>
-	<text name="last_name_text">
-		Sobrenome:
-	</text>
-	<text name="password_text">
-		Senha:
-	</text>
-	<text name="start_location_text">
-		Localização inicial:
-	</text>
-	<combo_box name="start_location_combo">
-		<combo_item name="MyHome">
-			Minha casa
-		</combo_item>
-		<combo_item name="MyLastLocation">
-			Minha última localização
-		</combo_item>
-		<combo_item name="Typeregionname">
-			&lt; Digite o nome da região;
-		</combo_item>
-	</combo_box>
-	<check_box label="Lembrar senha" name="remember_check"/>
-	<button label="Entrar" label_selected="Entrar" name="connect_btn"/>
-	<text name="create_new_account_text">
-		Registrar-se para uma conta
-	</text>
-	<text name="forgot_password_text">
-		Esqueceu seu nome de usuário ou senha?
-	</text>
-	<text name="channel_text">
-		[VERSION]
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="panel_login">
+	<text name="first_name_text">
+		Primeiro nome:
+	</text>
+	<text name="last_name_text">
+		Sobrenome:
+	</text>
+	<text name="password_text">
+		Senha:
+	</text>
+	<text name="start_location_text">
+		Localização inicial:
+	</text>
+	<combo_box name="start_location_combo">
+		<combo_box.item name="MyHome">
+			Minha casa
+		</combo_box.item>
+		<combo_box.item name="MyLastLocation">
+			Minha última localização
+		</combo_box.item>
+		<combo_box.item name="Typeregionname">
+			&lt; Digite o nome da região;
+		</combo_box.item>
+	</combo_box>
+	<check_box label="Lembrar senha" name="remember_check"/>
+	<button label="Entrar" label_selected="Entrar" name="connect_btn"/>
+	<text name="create_new_account_text">
+		Registrar-se para uma conta
+	</text>
+	<text name="forgot_password_text">
+		Esqueceu seu nome de usuário ou senha?
+	</text>
+	<text name="channel_text">
+		[VERSION]
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml
index 4bc81b31cb..8ae635bbae 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml
@@ -1,59 +1,59 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Chat" name="chat">
-	<text length="1" name="text_box" type="string">
-		Tamanho da Fonte 
-do Chat:
-	</text>
-	<radio_group name="chat_font_size">
-		<radio_item name="radio">
-			Pequeno
-		</radio_item>
-		<radio_item name="radio2">
-			Médio
-		</radio_item>
-		<radio_item name="radio3">
-			Grande
-		</radio_item>
-	</radio_group>
-	<text length="1" name="text_box2" type="string">
-		Cor do Chat:
-	</text>
-	<color_swatch label="Você" name="user"/>
-	<color_swatch label="Outros" name="agent"/>
-	<color_swatch label="MI" name="im"/>
-	<color_swatch label="Sistema" name="system"/>
-	<color_swatch label="Erros" name="script_error"/>
-	<color_swatch label="Objetos" name="objects"/>
-	<color_swatch label="Dono" name="owner"/>
-	<color_swatch label="Bolha" name="background"/>
-	<color_swatch label="URLs" name="links"/>
-	<text length="1" name="text_box8" type="string">
-		Erros de Script:
-	</text>
-	<check_box label="Mostrar Erros de Script e avisos como chat comum" name="script_errors_as_chat"/>
-	<text length="1" name="text_box3" type="string">
-		Console do Chat:
-	</text>
-	<spinner label="Ocultar Chat depois" label_width="112" name="fade_chat_time" width="162"/>
-	<text left="310" length="1" name="text_box4" type="string">
-		(segundos)
-	</text>
-	<spinner left="373" name="max_chat_count"/>
-	<text left="435" length="1" name="text_box5" type="string" width="94">
-		(# linhas)
-	</text>
-	<slider label="Opacidade" name="console_opacity"/>
-	<check_box label="Use a largura total da tela (Precisa reiniciar)" name="chat_full_width_check"/>
-	<text length="1" name="text_box6" type="string">
-		Opções do Chat:
-	</text>
-	<check_box label="Feche a barra de conversa após pressionar retornar" name="close_chat_on_return_check"/>
-	<check_box label="Teclas de Setas sempre movem o avatar durante a conversa" name="arrow_keys_move_avatar_check"/>
-	<check_box label="Mostrar a hora na conversa local" name="show_timestamps_check"/>
-	<check_box label="Executar animação digitada quando estiver conversando" name="play_typing_animation"/>
-	<text length="1" name="text_box7" type="string">
-		Chat com bolha:
-	</text>
-	<check_box label="Mostrar bolhas do chat" name="bubble_text_chat"/>
-	<slider label="Opacidade" name="bubble_chat_opacity"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Chat" name="chat">
+	<text length="1" name="text_box" type="string">
+		Tamanho da Fonte 
+do Chat:
+	</text>
+	<radio_group name="chat_font_size">
+		<radio_item name="radio">
+			Pequeno
+		</radio_item>
+		<radio_item name="radio2">
+			Médio
+		</radio_item>
+		<radio_item name="radio3">
+			Grande
+		</radio_item>
+	</radio_group>
+	<text length="1" name="text_box2" type="string">
+		Cor do Chat:
+	</text>
+	<color_swatch label="Você" name="user"/>
+	<color_swatch label="Outros" name="agent"/>
+	<color_swatch label="MI" name="im"/>
+	<color_swatch label="Sistema" name="system"/>
+	<color_swatch label="Erros" name="script_error"/>
+	<color_swatch label="Objetos" name="objects"/>
+	<color_swatch label="Dono" name="owner"/>
+	<color_swatch label="Bolha" name="background"/>
+	<color_swatch label="URLs" name="links"/>
+	<text length="1" name="text_box8" type="string">
+		Erros de Script:
+	</text>
+	<check_box label="Mostrar Erros de Script e avisos como chat comum" name="script_errors_as_chat"/>
+	<text length="1" name="text_box3" type="string">
+		Console do Chat:
+	</text>
+	<spinner label="Ocultar Chat depois" label_width="112" name="fade_chat_time" width="162"/>
+	<text left="310" length="1" name="text_box4" type="string">
+		(segundos)
+	</text>
+	<spinner left="373" name="max_chat_count"/>
+	<text left="435" length="1" name="text_box5" type="string" width="94">
+		(# linhas)
+	</text>
+	<slider label="Opacidade" name="console_opacity"/>
+	<check_box label="Use a largura total da tela (Precisa reiniciar)" name="chat_full_width_check"/>
+	<text length="1" name="text_box6" type="string">
+		Opções do Chat:
+	</text>
+	<check_box label="Feche a barra de conversa após pressionar retornar" name="close_chat_on_return_check"/>
+	<check_box label="Teclas de Setas sempre movem o avatar durante a conversa" name="arrow_keys_move_avatar_check"/>
+	<check_box label="Mostrar a hora na conversa local" name="show_timestamps_check"/>
+	<check_box label="Executar animação digitada quando estiver conversando" name="play_typing_animation"/>
+	<text length="1" name="text_box7" type="string">
+		Chat com bolha:
+	</text>
+	<check_box label="Mostrar bolhas do chat" name="bubble_text_chat"/>
+	<slider label="Opacidade" name="bubble_chat_opacity"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
index 886706ce2d..28361d8ddf 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
@@ -1,114 +1,114 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Geral" name="general_panel">
-	<radio_group name="default_start_location">
-		<radio_item name="MyHome" tool_tip="Como padrão, registrar na minha casa.">
-			Minha Casa
-		</radio_item>
-		<radio_item name="MyLastLocation" tool_tip="Por padrão, registrar na minha última localidade.">
-			Minha Última Localidade
-		</radio_item>
-	</radio_group>
-	<check_box label="Mostrar Posição Inicial na Tela de Login" name="show_location_checkbox"/>
-	<combo_box name="fade_out_combobox" width="166">
-		<combo_item name="Never">
-			Nunca
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Mostrar Temporariamente
-		</combo_item>
-		<combo_item name="Always">
-			Sempre
-		</combo_item>
-	</combo_box>
-	<check_box label="Avatar com Nomes Pequenos" name="small_avatar_names_checkbox"/>
-	<check_box label="Ocultar meu Nome na minha Tela" name="show_my_name_checkbox"/>
-	<text name="group_titles_textbox">
-		Títulos dos Grupos:
-	</text>
-	<check_box label="Ocultar todos os Títulos de Grupos" name="show_all_title_checkbox"/>
-	<check_box label="Ocultar meu Título no Grupo" name="show_my_title_checkbox"/>
-	<color_swatch label="" name="effect_color_swatch" tool_tip="Clique para abrir o seletor de cores"/>
-	<text name="UI Size:">
-		Tamanho da UI:
-	</text>
-	<check_box label="Usar escala independente da resolução" name="ui_auto_scale"/>
-	<spinner label="Tempo para ficar Ausente:" name="afk_timeout_spinner"/>
-	<check_box label="Rotacionar Mini-Mapa" name="rotate_mini_map_checkbox"/>
-	<check_box label="Avisar quando receber ou gastar Linden dollars (L$)" name="notify_money_change_checkbox"/>
-	<check_box label="Usar a paleta de cores padrão do sistema" name="use_system_color_picker_checkbox" tool_tip="Usar a paleta de cores padrão do sistema ao invés de uma feita dentro de Second Life."/>
-	<check_box label="Mostrar o painel de busca na barra sobreposta" name="show_search_panel" tool_tip="Mostrar o painel de busca embutido."/>
-	<text length="1" name="start_location_textbox" type="string">
-		Posição Inicial:
-	</text>
-	<text length="1" name="show_names_textbox" type="string">
-		Mostrar Nomes:
-	</text>
-	<text length="1" name="effects_color_textbox" type="string">
-		Cores para Meus Efeitos:
-	</text>
-	<text length="1" name="seconds_textbox" type="string">
-		segundos
-	</text>
-	<text length="1" name="crash_report_textbox" type="string">
-		Relatórios de Falhas:
-	</text>
-	<text name="language_textbox">
-		Linguagem:
-	</text>
-	<text left_delta="313" length="1" name="language_textbox2" type="string">
-		(Precisa de reinício para efetivar)
-	</text>
-	<string name="region_name_prompt">
-		Digite o nome da Região
-	</string>
-	<combo_box name="crash_behavior_combobox" width="166">
-		<combo_item length="1" name="Askbeforesending" type="string">
-			Perguntar antes de enviar
-		</combo_item>
-		<combo_item length="1" name="Alwayssend" type="string">
-			Sempre enviar
-		</combo_item>
-		<combo_item length="1" name="Neversend" type="string">
-			Nunca Enviar
-		</combo_item>
-	</combo_box>
-	<combo_box name="language_combobox" width="166">
-		<combo_item name="System Default Language">
-			Padrão do Sistema
-		</combo_item>
-		<combo_item name="English">
-			English (Inglês)
-		</combo_item>
-		<combo_item name="Danish">
-			Dansk (Dinamarquês) - Beta
-		</combo_item>
-		<combo_item name="Deutsch(German)">
-			Deutsch (Alemão) - Beta
-		</combo_item>
-		<combo_item name="Spanish">
-			Español (Espanhol) - Beta
-		</combo_item>
-		<combo_item name="French">
-			Français (Francês) - Beta
-		</combo_item>
-		<combo_item name="Hungarian">
-			Magyar (Húngaro) - Beta
-		</combo_item>
-		<combo_item name="Polish">
-			Polski (Polonês) - Beta
-		</combo_item>
-		<combo_item name="Portugese">
-			Português - Beta
-		</combo_item>
-		<combo_item name="Chinese">
-			中文 (简体) (Chinês) - Beta
-		</combo_item>
-		<combo_item name="(Japanese)">
-			日本語 (Japonês) - Beta
-		</combo_item>
-		<combo_item name="(Korean)">
-			한국어 (Coreano) - Beta
-		</combo_item>
-	</combo_box>
-	<check_box label="Compartilhar a linguagem com objetos" name="language_is_public" tool_tip="Isto permite que os objetos no mundo conheçam sua linguagem preferida."/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Geral" name="general_panel">
+	<radio_group name="default_start_location">
+		<radio_item name="MyHome" tool_tip="Como padrão, registrar na minha casa.">
+			Minha Casa
+		</radio_item>
+		<radio_item name="MyLastLocation" tool_tip="Por padrão, registrar na minha última localidade.">
+			Minha Última Localidade
+		</radio_item>
+	</radio_group>
+	<check_box label="Mostrar Posição Inicial na Tela de Login" name="show_location_checkbox"/>
+	<combo_box name="fade_out_combobox" width="166">
+		<combo_item name="Never">
+			Nunca
+		</combo_item>
+		<combo_item name="Show Temporarily">
+			Mostrar Temporariamente
+		</combo_item>
+		<combo_item name="Always">
+			Sempre
+		</combo_item>
+	</combo_box>
+	<check_box label="Avatar com Nomes Pequenos" name="small_avatar_names_checkbox"/>
+	<check_box label="Ocultar meu Nome na minha Tela" name="show_my_name_checkbox"/>
+	<text name="group_titles_textbox">
+		Títulos dos Grupos:
+	</text>
+	<check_box label="Ocultar todos os Títulos de Grupos" name="show_all_title_checkbox"/>
+	<check_box label="Ocultar meu Título no Grupo" name="show_my_title_checkbox"/>
+	<color_swatch label="" name="effect_color_swatch" tool_tip="Clique para abrir o seletor de cores"/>
+	<text name="UI Size:">
+		Tamanho da UI:
+	</text>
+	<check_box label="Usar escala independente da resolução" name="ui_auto_scale"/>
+	<spinner label="Tempo para ficar Ausente:" name="afk_timeout_spinner"/>
+	<check_box label="Rotacionar Mini-Mapa" name="rotate_mini_map_checkbox"/>
+	<check_box label="Avisar quando receber ou gastar Linden dollars (L$)" name="notify_money_change_checkbox"/>
+	<check_box label="Usar a paleta de cores padrão do sistema" name="use_system_color_picker_checkbox" tool_tip="Usar a paleta de cores padrão do sistema ao invés de uma feita dentro de Second Life."/>
+	<check_box label="Mostrar o painel de busca na barra sobreposta" name="show_search_panel" tool_tip="Mostrar o painel de busca embutido."/>
+	<text length="1" name="start_location_textbox" type="string">
+		Posição Inicial:
+	</text>
+	<text length="1" name="show_names_textbox" type="string">
+		Mostrar Nomes:
+	</text>
+	<text length="1" name="effects_color_textbox" type="string">
+		Cores para Meus Efeitos:
+	</text>
+	<text length="1" name="seconds_textbox" type="string">
+		segundos
+	</text>
+	<text length="1" name="crash_report_textbox" type="string">
+		Relatórios de Falhas:
+	</text>
+	<text name="language_textbox">
+		Linguagem:
+	</text>
+	<text left_delta="313" length="1" name="language_textbox2" type="string">
+		(Precisa de reinício para efetivar)
+	</text>
+	<string name="region_name_prompt">
+		Digite o nome da Região
+	</string>
+	<combo_box name="crash_behavior_combobox" width="166">
+		<combo_item length="1" name="Askbeforesending" type="string">
+			Perguntar antes de enviar
+		</combo_item>
+		<combo_item length="1" name="Alwayssend" type="string">
+			Sempre enviar
+		</combo_item>
+		<combo_item length="1" name="Neversend" type="string">
+			Nunca Enviar
+		</combo_item>
+	</combo_box>
+	<combo_box name="language_combobox" width="166">
+		<combo_item name="System Default Language">
+			Padrão do Sistema
+		</combo_item>
+		<combo_item name="English">
+			English (Inglês)
+		</combo_item>
+		<combo_item name="Danish">
+			Dansk (Dinamarquês) - Beta
+		</combo_item>
+		<combo_item name="Deutsch(German)">
+			Deutsch (Alemão) - Beta
+		</combo_item>
+		<combo_item name="Spanish">
+			Español (Espanhol) - Beta
+		</combo_item>
+		<combo_item name="French">
+			Français (Francês) - Beta
+		</combo_item>
+		<combo_item name="Hungarian">
+			Magyar (Húngaro) - Beta
+		</combo_item>
+		<combo_item name="Polish">
+			Polski (Polonês) - Beta
+		</combo_item>
+		<combo_item name="Portugese">
+			Português - Beta
+		</combo_item>
+		<combo_item name="Chinese">
+			中文 (简体) (Chinês) - Beta
+		</combo_item>
+		<combo_item name="(Japanese)">
+			日本語 (Japonês) - Beta
+		</combo_item>
+		<combo_item name="(Korean)">
+			한국어 (Coreano) - Beta
+		</combo_item>
+	</combo_box>
+	<check_box label="Compartilhar a linguagem com objetos" name="language_is_public" tool_tip="Isto permite que os objetos no mundo conheçam sua linguagem preferida."/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml
index fa80310c2b..5833956986 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml
@@ -1,177 +1,177 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Gráficos" name="Display panel">
-	<button label="?" name="GraphicsPreferencesHelpButton"/>
-	<check_box label="Execute Second Life em uma janela" name="windowed mode"/>
-	<text_editor bottom="-56" height="40" name="FullScreenInfo" width="480">
-		Se desmarcado, o visualizador irá exibir em tela inteira quando fizer o acesso.
-	</text_editor>
-	<text name="WindowSizeLabel">
-		Tamanho da Janela:
-	</text>
-	<combo_box name="windowsize combo">
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="720x480">
-			720x480 (NTSC)
-		</combo_item>
-		<combo_item name="768x576">
-			768x576 (PAL)
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-	</combo_box>
-	<text name="DisplayResLabel">
-		Resolução de Display:
-	</text>
-	<text name="AspectRatioLabel1" tool_tip="largura / altura">
-		Relação de Aspecto:
-	</text>
-	<combo_box name="aspect_ratio" tool_tip="largura / altura">
-		<combo_item length="1" name="4:3(StandardCRT)" type="string">
-			4:3 (CRT Padrão)
-		</combo_item>
-		<combo_item length="1" name="5:4(1280x1024LCD)" type="string">
-			5:4 (1280x1024 LCD)
-		</combo_item>
-		<combo_item name="8:5(Widescreen)">
-			8:5 (tela ampla)
-		</combo_item>
-		<combo_item length="1" name="16:9(Widescreen)" type="string">
-			16:9 (tela ampla)
-		</combo_item>
-	</combo_box>
-	<check_box label="Auto-detectar a relação" name="aspect_auto_detect"/>
-	<text name="HigherText">
-		Qualidade e
-	</text>
-	<text name="QualityText">
-		Performance:
-	</text>
-	<text name="FasterText">
-		Mais 
-rápido
-	</text>
-	<text name="ShadersPrefText">
-		Baixo
-	</text>
-	<text name="ShadersPrefText2">
-		Meio
-	</text>
-	<text name="ShadersPrefText3">
-		Alto
-	</text>
-	<text name="ShadersPrefText4">
-		Ultra
-	</text>
-	<text name="HigherText2">
-		Mais alto
-	</text>
-	<text name="QualityText2">
-		Qualidade
-	</text>
-	<check_box label="Padrão" left="395" name="CustomSettings"/>
-	<text name="ShadersText">
-		Sombreadores:
-	</text>
-	<check_box label="Bump de Mapeamento e Brilho" name="BumpShiny"/>
-	<check_box label="Sombreadores básicos" name="BasicShaders" tool_tip="Desabilitar esta opção poderá impedir que alguns drivers de placa de vídeo a travem."/>
-	<check_box label="Sombreadores Atmosféricos" name="WindLightUseAtmosShaders"/>
-	<check_box label="Reflexos de Água" name="Reflections"/>
-	<text name="ReflectionDetailText">
-		Detalhes de Reflexão:
-	</text>
-	<radio_group name="ReflectionDetailRadio">
-		<radio_item name="0">
-			Terreno e Árvores
-		</radio_item>
-		<radio_item name="1">
-			Todos os objetos estáticos
-		</radio_item>
-		<radio_item name="2">
-			Todos os avatares e Objetos
-		</radio_item>
-		<radio_item name="3">
-			Tudo
-		</radio_item>
-	</radio_group>
-	<text name="AvatarRenderingText">
-		Renderização de Avatar:
-	</text>
-	<check_box label="Atributos do Avatar" name="AvatarImpostors"/>
-	<check_box label="Melhoria de Hardware" name="AvatarVertexProgram"/>
-	<check_box label="Vestimenta do Avatar" name="AvatarCloth"/>
-	<text name="DrawDistanceMeterText1">
-		m
-	</text>
-	<text name="DrawDistanceMeterText2">
-		m
-	</text>
-	<slider label="Distancia de desenho:" label_width="146" name="DrawDistance" width="255"/>
-	<slider label="Contador máx. de partículas:" label_width="146" name="MaxParticleCount" width="262"/>
-	<slider label="Qualidade de Pós-processamento:" label_width="146" name="RenderPostProcess" width="223"/>
-	<text name="MeshDetailText">
-		Detalhes de Malha:
-	</text>
-	<slider label="Objetos:" name="ObjectMeshDetail"/>
-	<slider label="Primitivas Flexiveis:" name="FlexibleMeshDetail"/>
-	<slider label="Árvores:" name="TreeMeshDetail"/>
-	<slider label="Avatares:" name="AvatarMeshDetail"/>
-	<slider label="Terreno:" name="TerrainMeshDetail"/>
-	<slider label="Céu:" name="SkyMeshDetail"/>
-	<text name="PostProcessText">
-		Baixo
-	</text>
-	<text name="ObjectMeshDetailText">
-		Baixo
-	</text>
-	<text name="FlexibleMeshDetailText">
-		Baixo
-	</text>
-	<text name="TreeMeshDetailText">
-		Baixo
-	</text>
-	<text name="AvatarMeshDetailText">
-		Baixo
-	</text>
-	<text name="TerrainMeshDetailText">
-		Baixo
-	</text>
-	<text name="SkyMeshDetailText">
-		Baixo
-	</text>
-	<text name="LightingDetailText">
-		Detalhes de Iluminação:
-	</text>
-	<radio_group name="LightingDetailRadio">
-		<radio_item name="SunMoon">
-			Sol e Lua apenas
-		</radio_item>
-		<radio_item name="LocalLights">
-			Luzes locais nas proximidades
-		</radio_item>
-	</radio_group>
-	<text name="TerrainDetailText">
-		Detalhe do Terreno:
-	</text>
-	<radio_group left_delta="45" name="TerrainDetailRadio" width="276">
-		<radio_item name="0">
-			Baixo
-		</radio_item>
-		<radio_item name="2">
-			Alto
-		</radio_item>
-	</radio_group>
-	<button label="Configurações Recomendadas" name="Defaults"/>
-	<button label="Opções de Hardware" label_selected="Opções de Hardware" name="GraphicsHardwareButton"/>
-	<string name="resolution_format">
-		[RES_X] x [RES_Y]
-	</string>
-	<string name="aspect_ratio_text">
-		[NUM]:[DEN]
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Gráficos" name="Display panel">
+	<button label="?" name="GraphicsPreferencesHelpButton"/>
+	<check_box label="Execute Second Life em uma janela" name="windowed mode"/>
+	<text_editor bottom="-56" height="40" name="FullScreenInfo" width="480">
+		Se desmarcado, o visualizador irá exibir em tela inteira quando fizer o acesso.
+	</text_editor>
+	<text name="WindowSizeLabel">
+		Tamanho da Janela:
+	</text>
+	<combo_box name="windowsize combo">
+		<combo_box.item name="640x480">
+			640x480
+		</combo_box.item>
+		<combo_box.item name="800x600">
+			800x600
+		</combo_box.item>
+		<combo_box.item name="720x480">
+			720x480 (NTSC)
+		</combo_box.item>
+		<combo_box.item name="768x576">
+			768x576 (PAL)
+		</combo_box.item>
+		<combo_box.item name="1024x768">
+			1024x768
+		</combo_box.item>
+	</combo_box>
+	<text name="DisplayResLabel">
+		Resolução de Display:
+	</text>
+	<text name="AspectRatioLabel1" tool_tip="largura / altura">
+		Relação de Aspecto:
+	</text>
+	<combo_box name="aspect_ratio" tool_tip="largura / altura">
+		<combo_box.item length="1" name="4:3(StandardCRT)" type="string">
+			4:3 (CRT Padrão)
+		</combo_box.item>
+		<combo_box.item length="1" name="5:4(1280x1024LCD)" type="string">
+			5:4 (1280x1024 LCD)
+		</combo_box.item>
+		<combo_box.item name="8:5(Widescreen)">
+			8:5 (tela ampla)
+		</combo_box.item>
+		<combo_box.item length="1" name="16:9(Widescreen)" type="string">
+			16:9 (tela ampla)
+		</combo_box.item>
+	</combo_box>
+	<check_box label="Auto-detectar a relação" name="aspect_auto_detect"/>
+	<text name="HigherText">
+		Qualidade e
+	</text>
+	<text name="QualityText">
+		Performance:
+	</text>
+	<text name="FasterText">
+		Mais 
+rápido
+	</text>
+	<text name="ShadersPrefText">
+		Baixo
+	</text>
+	<text name="ShadersPrefText2">
+		Meio
+	</text>
+	<text name="ShadersPrefText3">
+		Alto
+	</text>
+	<text name="ShadersPrefText4">
+		Ultra
+	</text>
+	<text name="HigherText2">
+		Mais alto
+	</text>
+	<text name="QualityText2">
+		Qualidade
+	</text>
+	<check_box label="Padrão" left="395" name="CustomSettings"/>
+	<text name="ShadersText">
+		Sombreadores:
+	</text>
+	<check_box label="Bump de Mapeamento e Brilho" name="BumpShiny"/>
+	<check_box label="Sombreadores básicos" name="BasicShaders" tool_tip="Desabilitar esta opção poderá impedir que alguns drivers de placa de vídeo a travem."/>
+	<check_box label="Sombreadores Atmosféricos" name="WindLightUseAtmosShaders"/>
+	<check_box label="Reflexos de Água" name="Reflections"/>
+	<text name="ReflectionDetailText">
+		Detalhes de Reflexão:
+	</text>
+	<radio_group name="ReflectionDetailRadio">
+		<radio_item name="0">
+			Terreno e Árvores
+		</radio_item>
+		<radio_item name="1">
+			Todos os objetos estáticos
+		</radio_item>
+		<radio_item name="2">
+			Todos os avatares e Objetos
+		</radio_item>
+		<radio_item name="3">
+			Tudo
+		</radio_item>
+	</radio_group>
+	<text name="AvatarRenderingText">
+		Renderização de Avatar:
+	</text>
+	<check_box label="Atributos do Avatar" name="AvatarImpostors"/>
+	<check_box label="Melhoria de Hardware" name="AvatarVertexProgram"/>
+	<check_box label="Vestimenta do Avatar" name="AvatarCloth"/>
+	<text name="DrawDistanceMeterText1">
+		m
+	</text>
+	<text name="DrawDistanceMeterText2">
+		m
+	</text>
+	<slider label="Distancia de desenho:" label_width="146" name="DrawDistance" width="255"/>
+	<slider label="Contador máx. de partículas:" label_width="146" name="MaxParticleCount" width="262"/>
+	<slider label="Qualidade de Pós-processamento:" label_width="146" name="RenderPostProcess" width="223"/>
+	<text name="MeshDetailText">
+		Detalhes de Malha:
+	</text>
+	<slider label="Objetos:" name="ObjectMeshDetail"/>
+	<slider label="Primitivas Flexiveis:" name="FlexibleMeshDetail"/>
+	<slider label="Árvores:" name="TreeMeshDetail"/>
+	<slider label="Avatares:" name="AvatarMeshDetail"/>
+	<slider label="Terreno:" name="TerrainMeshDetail"/>
+	<slider label="Céu:" name="SkyMeshDetail"/>
+	<text name="PostProcessText">
+		Baixo
+	</text>
+	<text name="ObjectMeshDetailText">
+		Baixo
+	</text>
+	<text name="FlexibleMeshDetailText">
+		Baixo
+	</text>
+	<text name="TreeMeshDetailText">
+		Baixo
+	</text>
+	<text name="AvatarMeshDetailText">
+		Baixo
+	</text>
+	<text name="TerrainMeshDetailText">
+		Baixo
+	</text>
+	<text name="SkyMeshDetailText">
+		Baixo
+	</text>
+	<text name="LightingDetailText">
+		Detalhes de Iluminação:
+	</text>
+	<radio_group name="LightingDetailRadio">
+		<radio_item name="SunMoon">
+			Sol e Lua apenas
+		</radio_item>
+		<radio_item name="LocalLights">
+			Luzes locais nas proximidades
+		</radio_item>
+	</radio_group>
+	<text name="TerrainDetailText">
+		Detalhe do Terreno:
+	</text>
+	<radio_group left_delta="45" name="TerrainDetailRadio" width="276">
+		<radio_item name="0">
+			Baixo
+		</radio_item>
+		<radio_item name="2">
+			Alto
+		</radio_item>
+	</radio_group>
+	<button label="Configurações Recomendadas" name="Defaults"/>
+	<button label="Opções de Hardware" label_selected="Opções de Hardware" name="GraphicsHardwareButton"/>
+	<string name="resolution_format">
+		[RES_X] x [RES_Y]
+	</string>
+	<string name="aspect_ratio_text">
+		[NUM]:[DEN]
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_region_covenant.xml b/indra/newview/skins/default/xui/pt/panel_region_covenant.xml
index 3ebf80ca68..f70e975bd4 100644
--- a/indra/newview/skins/default/xui/pt/panel_region_covenant.xml
+++ b/indra/newview/skins/default/xui/pt/panel_region_covenant.xml
@@ -1,50 +1,50 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Corretagem" name="Covenant">
-	<text bottom="-25" name="covenant_help_text">
-		As mudanças nas informações de corretagem serão mostradas em todos os lotes da propriedade.
-	</text>
-	<text bottom_delta="-31" name="region_name_lbl">
-		Região:
-	</text>
-	<text name="region_name_text">
-		(desconhecido)
-	</text>
-	<text bottom_delta="-19" name="estate_name_lbl">
-		Propriedade:
-	</text>
-	<text name="estate_name_text">
-		(desconhecido)
-	</text>
-	<text name="covenent_instructions">
-		Arraste e solte um notecard para alterar a corretagem desta propriedade.
-	</text>
-	<button label="?" name="covenant_help"/>
-	<button label="Resetar" name="reset_covenant"/>
-	<text bottom_delta="-19" name="estate_owner_lbl">
-		Dono da propriedade:
-	</text>
-	<text name="estate_owner_text">
-		(desconhecido)
-	</text>
-	<text name="resellable_clause">
-		Terras compradas nesta região podem ou não, ser revendidas.
-	</text>
-	<text name="changeable_clause">
-		Terras compradas nesta região podem ou não, ser unidas ou subdivididas.
-	</text>
-	<text_editor name="covenant_editor">
-		Carregando...
-	</text_editor>
-	<text name="can_resell">
-		Terras compradas na região poderão ser revendidas.
-	</text>
-	<text name="can_not_resell">
-		Terras compradas na região não poderão ser revendidas.
-	</text>
-	<text name="can_change">
-		O terreno comprado nesta região pode ser compartilhado ou subdividido.
-	</text>
-	<text name="can_not_change">
-		O terreno comprado nesta região não pode ser compartilhado ou subdividido.
-	</text>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Corretagem" name="Covenant">
+	<text bottom="-25" name="covenant_help_text">
+		As mudanças nas informações de corretagem serão mostradas em todos os lotes da propriedade.
+	</text>
+	<text bottom_delta="-31" name="region_name_lbl">
+		Região:
+	</text>
+	<text name="region_name_text">
+		(desconhecido)
+	</text>
+	<text bottom_delta="-19" name="estate_name_lbl">
+		Propriedade:
+	</text>
+	<text name="estate_name_text">
+		(desconhecido)
+	</text>
+	<text name="covenent_instructions">
+		Arraste e solte um notecard para alterar a corretagem desta propriedade.
+	</text>
+	<button label="?" name="covenant_help"/>
+	<button label="Resetar" name="reset_covenant"/>
+	<text bottom_delta="-19" name="estate_owner_lbl">
+		Dono da propriedade:
+	</text>
+	<text name="estate_owner_text">
+		(desconhecido)
+	</text>
+	<text name="resellable_clause">
+		Terras compradas nesta região podem ou não, ser revendidas.
+	</text>
+	<text name="changeable_clause">
+		Terras compradas nesta região podem ou não, ser unidas ou subdivididas.
+	</text>
+	<text_editor name="covenant_editor">
+		Carregando...
+	</text_editor>
+	<text name="can_resell">
+		Terras compradas na região poderão ser revendidas.
+	</text>
+	<text name="can_not_resell">
+		Terras compradas na região não poderão ser revendidas.
+	</text>
+	<text name="can_change">
+		O terreno comprado nesta região pode ser compartilhado ou subdividido.
+	</text>
+	<text name="can_not_change">
+		O terreno comprado nesta região não pode ser compartilhado ou subdividido.
+	</text>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_region_debug.xml b/indra/newview/skins/default/xui/pt/panel_region_debug.xml
index 8673f7af84..93c5d27648 100644
--- a/indra/newview/skins/default/xui/pt/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/pt/panel_region_debug.xml
@@ -1,40 +1,40 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Debug" name="Debug">
-	<text name="region_text_lbl">
-		Região:
-	</text>
-	<text name="region_text">
-		desconhecido
-	</text>
-	<check_box label="Desabilitar Scripts" name="disable_scripts_check" tool_tip="Desabilitar todos os scripts nesta região"/>
-	<button label="?" name="disable_scripts_help"/>
-	<check_box label="Desabilitar colisões" name="disable_collisions_check" tool_tip="Desabilitar colisões de não-avatares nessa região"/>
-	<button label="?" name="disable_collisions_help"/>
-	<check_box label="Desabilitar física" name="disable_physics_check" tool_tip="Desabilitar toda a físíca nesta região"/>
-	<button label="?" name="disable_physics_help"/>
-	<button label="Aplicar" name="apply_btn"/>
-	<text name="objret_text_lbl">
-		Retornar objeto
-	</text>
-	<text name="resident_text_lbl">
-		Residente:
-	</text>
-	<line_editor name="target_avatar_name">
-		(nenhum)
-	</line_editor>
-	<button label="Escolher..." name="choose_avatar_btn"/>
-	<text name="options_text_lbl">
-		Opções:
-	</text>
-	<check_box label="Retornar apenas aqueles objetos que contenham scripts" name="return_scripts" tool_tip="Retornar apenas objetos que contenham scripts."/>
-	<check_box label="Retornar apenas aqueles objetos na terra de alguém" name="return_other_land" tool_tip="Retornar apenas objetos que estejam na terra pertencente a alguém"/>
-	<check_box label="Retornar objetos em cada região desta propriedade" name="return_estate_wide" tool_tip="Retornar objetos em todas as regiões que constituem esta propriedade"/>
-	<button label="Retornar" name="return_btn"/>
-	<button label="Pegar os principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos que experimentam as mais potenciais colisões"/>
-	<button label="?" name="top_colliders_help"/>
-	<button label="Pegar Principais Scripts..." name="top_scripts_btn" tool_tip="Lista de objetos gastando mais tempo rodando scripts"/>
-	<button label="?" name="top_scripts_help"/>
-	<button label="Reiniciar a Região" name="restart_btn" tool_tip="Dar 2 minutos de contagem regressiva e reiniciar a região"/>
-	<button label="?" name="restart_help"/>
-	<button label="Atrasar o Reinicio" name="cancel_restart_btn" tool_tip="Atrasar o reinicio da região por uma hora"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Debug" name="Debug">
+	<text name="region_text_lbl">
+		Região:
+	</text>
+	<text name="region_text">
+		desconhecido
+	</text>
+	<check_box label="Desabilitar Scripts" name="disable_scripts_check" tool_tip="Desabilitar todos os scripts nesta região"/>
+	<button label="?" name="disable_scripts_help"/>
+	<check_box label="Desabilitar colisões" name="disable_collisions_check" tool_tip="Desabilitar colisões de não-avatares nessa região"/>
+	<button label="?" name="disable_collisions_help"/>
+	<check_box label="Desabilitar física" name="disable_physics_check" tool_tip="Desabilitar toda a físíca nesta região"/>
+	<button label="?" name="disable_physics_help"/>
+	<button label="Aplicar" name="apply_btn"/>
+	<text name="objret_text_lbl">
+		Retornar objeto
+	</text>
+	<text name="resident_text_lbl">
+		Residente:
+	</text>
+	<line_editor name="target_avatar_name">
+		(nenhum)
+	</line_editor>
+	<button label="Escolher..." name="choose_avatar_btn"/>
+	<text name="options_text_lbl">
+		Opções:
+	</text>
+	<check_box label="Retornar apenas aqueles objetos que contenham scripts" name="return_scripts" tool_tip="Retornar apenas objetos que contenham scripts."/>
+	<check_box label="Retornar apenas aqueles objetos na terra de alguém" name="return_other_land" tool_tip="Retornar apenas objetos que estejam na terra pertencente a alguém"/>
+	<check_box label="Retornar objetos em cada região desta propriedade" name="return_estate_wide" tool_tip="Retornar objetos em todas as regiões que constituem esta propriedade"/>
+	<button label="Retornar" name="return_btn"/>
+	<button label="Pegar os principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos que experimentam as mais potenciais colisões"/>
+	<button label="?" name="top_colliders_help"/>
+	<button label="Pegar Principais Scripts..." name="top_scripts_btn" tool_tip="Lista de objetos gastando mais tempo rodando scripts"/>
+	<button label="?" name="top_scripts_help"/>
+	<button label="Reiniciar a Região" name="restart_btn" tool_tip="Dar 2 minutos de contagem regressiva e reiniciar a região"/>
+	<button label="?" name="restart_help"/>
+	<button label="Atrasar o Reinicio" name="cancel_restart_btn" tool_tip="Atrasar o reinicio da região por uma hora"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_region_estate.xml b/indra/newview/skins/default/xui/pt/panel_region_estate.xml
index 554405b91a..c236b95ca1 100644
--- a/indra/newview/skins/default/xui/pt/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/pt/panel_region_estate.xml
@@ -1,69 +1,69 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Propriedade" name="Estate">
-	<text name="estate_help_text">
-		Mudanças nas definições nesta guia irão afetar
-todas as regiões desta propriedade.
-	</text>
-	<text name="estate_text">
-		Propriedade:
-	</text>
-	<text name="estate_name">
-		(desconhecido)
-	</text>
-	<text name="owner_text">
-		Proprietário:
-	</text>
-	<text name="estate_owner">
-		(desconhecido)
-	</text>
-	<check_box label="Usar Tempo global" name="use_global_time_check"/>
-	<button label="?" name="use_global_time_help"/>
-	<check_box label="Sol fixo" name="fixed_sun_check"/>
-	<button label="?" name="fixed_sun_help"/>
-	<slider label="Fase" name="sun_hour_slider"/>
-	<check_box label="Permitir acesso público" name="externally_visible_check"/>
-	<button label="?" name="externally_visible_help"/>
-	<text name="Only Allow">
-		Acesso restrito a:
-	</text>
-	<check_box label="Residentes com informações de pagamento em arquivo" name="limit_payment" tool_tip="Banir residentes não identificados."/>
-	<check_box label="Adultos com idade verificada" name="limit_age_verified" tool_tip="Banir residentes que não tenham confirmado a sua idade. Ver support.secondlife.com para mais informações."/>
-	<check_box label="Permitir conversa de voz" name="voice_chat_check"/>
-	<button label="?" name="voice_chat_help"/>
-	<check_box label="Permitir Tele-transporte direto" name="allow_direct_teleport"/>
-	<button label="?" name="allow_direct_teleport_help"/>
-	<text name="abuse_email_text">
-		Endereço de email de Abuso:
-	</text>
-	<string name="email_unsupported">
-		Funcionalidade não suportada
-	</string>
-	<button label="?" name="abuse_email_address_help"/>
-	<button label="Aplicar" name="apply_btn"/>
-	<button label="Chutar usuário da propriedade..." name="kick_user_from_estate_btn"/>
-	<button label="Enviar mensagem à Propriedade" name="message_estate_btn"/>
-	<text name="estate_manager_label">
-		Gerentes da propriedade:
-	</text>
-	<button label="?" name="estate_manager_help"/>
-	<button label="Remover..." name="remove_estate_manager_btn"/>
-	<button label="Adicionar..." name="add_estate_manager_btn"/>
-	<text name="allow_resident_label">
-		Residentes permitidos:
-	</text>
-	<button label="?" name="allow_resident_help"/>
-	<button label="Remover..." name="remove_allowed_avatar_btn"/>
-	<button label="Adicionar..." name="add_allowed_avatar_btn"/>
-	<text name="allow_group_label">
-		Grupos permitidos:
-	</text>
-	<button label="?" name="allow_group_help"/>
-	<button label="Remover..." name="remove_allowed_group_btn"/>
-	<button label="Adicionar..." name="add_allowed_group_btn"/>
-	<text name="ban_resident_label">
-		Residentes banidos:
-	</text>
-	<button label="?" name="ban_resident_help"/>
-	<button label="Remover..." name="remove_banned_avatar_btn"/>
-	<button label="Adicionar..." name="add_banned_avatar_btn"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Propriedade" name="Estate">
+	<text name="estate_help_text">
+		Mudanças nas definições nesta guia irão afetar
+todas as regiões desta propriedade.
+	</text>
+	<text name="estate_text">
+		Propriedade:
+	</text>
+	<text name="estate_name">
+		(desconhecido)
+	</text>
+	<text name="owner_text">
+		Proprietário:
+	</text>
+	<text name="estate_owner">
+		(desconhecido)
+	</text>
+	<check_box label="Usar Tempo global" name="use_global_time_check"/>
+	<button label="?" name="use_global_time_help"/>
+	<check_box label="Sol fixo" name="fixed_sun_check"/>
+	<button label="?" name="fixed_sun_help"/>
+	<slider label="Fase" name="sun_hour_slider"/>
+	<check_box label="Permitir acesso público" name="externally_visible_check"/>
+	<button label="?" name="externally_visible_help"/>
+	<text name="Only Allow">
+		Acesso restrito a:
+	</text>
+	<check_box label="Residentes com informações de pagamento em arquivo" name="limit_payment" tool_tip="Banir residentes não identificados."/>
+	<check_box label="Adultos com idade verificada" name="limit_age_verified" tool_tip="Banir residentes que não tenham confirmado a sua idade. Ver support.secondlife.com para mais informações."/>
+	<check_box label="Permitir conversa de voz" name="voice_chat_check"/>
+	<button label="?" name="voice_chat_help"/>
+	<check_box label="Permitir Tele-transporte direto" name="allow_direct_teleport"/>
+	<button label="?" name="allow_direct_teleport_help"/>
+	<text name="abuse_email_text">
+		Endereço de email de Abuso:
+	</text>
+	<string name="email_unsupported">
+		Funcionalidade não suportada
+	</string>
+	<button label="?" name="abuse_email_address_help"/>
+	<button label="Aplicar" name="apply_btn"/>
+	<button label="Chutar usuário da propriedade..." name="kick_user_from_estate_btn"/>
+	<button label="Enviar mensagem à Propriedade" name="message_estate_btn"/>
+	<text name="estate_manager_label">
+		Gerentes da propriedade:
+	</text>
+	<button label="?" name="estate_manager_help"/>
+	<button label="Remover..." name="remove_estate_manager_btn"/>
+	<button label="Adicionar..." name="add_estate_manager_btn"/>
+	<text name="allow_resident_label">
+		Residentes permitidos:
+	</text>
+	<button label="?" name="allow_resident_help"/>
+	<button label="Remover..." name="remove_allowed_avatar_btn"/>
+	<button label="Adicionar..." name="add_allowed_avatar_btn"/>
+	<text name="allow_group_label">
+		Grupos permitidos:
+	</text>
+	<button label="?" name="allow_group_help"/>
+	<button label="Remover..." name="remove_allowed_group_btn"/>
+	<button label="Adicionar..." name="add_allowed_group_btn"/>
+	<text name="ban_resident_label">
+		Residentes banidos:
+	</text>
+	<button label="?" name="ban_resident_help"/>
+	<button label="Remover..." name="remove_banned_avatar_btn"/>
+	<button label="Adicionar..." name="add_banned_avatar_btn"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_region_general.xml b/indra/newview/skins/default/xui/pt/panel_region_general.xml
index c971f82827..c04a5f001e 100644
--- a/indra/newview/skins/default/xui/pt/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/pt/panel_region_general.xml
@@ -1,44 +1,44 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Região" name="General">
-	<text name="region_text_lbl">
-		Região:
-	</text>
-	<text name="region_text">
-		desconhecido
-	</text>
-	<text name="version_channel_text_lbl">
-		Versão:
-	</text>
-	<text name="version_channel_text">
-		desconhecido
-	</text>
-	<check_box label="Bloquear Terraform" name="block_terraform_check"/>
-	<button label="?" name="terraform_help"/>
-	<check_box label="Bloquear Vôo" name="block_fly_check"/>
-	<button label="?" name="fly_help"/>
-	<check_box label="Permitir Dano" name="allow_damage_check"/>
-	<button label="?" name="damage_help"/>
-	<check_box label="Restringir Empurrar" name="restrict_pushobject"/>
-	<button label="?" name="restrict_pushobject_help"/>
-	<check_box label="Permitir Revenda de Terra" name="allow_land_resell_check"/>
-	<button label="?" name="land_resell_help"/>
-	<check_box label="Permitir Unir/Dividir Terra" name="allow_parcel_changes_check"/>
-	<button label="?" name="parcel_changes_help"/>
-	<check_box label="Bloquear Mostrar Terra na Busca" name="block_parcel_search_check" tool_tip="Permitir que as pessoas vejam esta região e seus lotes nos resultados de busca"/>
-	<button label="?" name="parcel_search_help"/>
-	<spinner label="Limit do Agente" name="agent_limit_spin"/>
-	<button label="?" name="agent_limit_help"/>
-	<spinner label="Objeto Bonus" name="object_bonus_spin"/>
-	<button label="?" name="object_bonus_help"/>
-	<text label="Maturidade" name="access_text">
-		Maturidade:
-	</text>
-
-
-	<button label="?" name="access_help"/>
-	<button label="Aplicar" name="apply_btn"/>
-	<button label="Teletransportar um usuário para Casa..." name="kick_btn"/>
-	<button label="Teletransportar Todos os Usuários..." name="kick_all_btn"/>
-	<button label="Enviar Mensagem para a Região..." name="im_btn"/>
-	<button label="Gerenciar Telehub..." name="manage_telehub_btn"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Região" name="General">
+	<text name="region_text_lbl">
+		Região:
+	</text>
+	<text name="region_text">
+		desconhecido
+	</text>
+	<text name="version_channel_text_lbl">
+		Versão:
+	</text>
+	<text name="version_channel_text">
+		desconhecido
+	</text>
+	<check_box label="Bloquear Terraform" name="block_terraform_check"/>
+	<button label="?" name="terraform_help"/>
+	<check_box label="Bloquear Vôo" name="block_fly_check"/>
+	<button label="?" name="fly_help"/>
+	<check_box label="Permitir Dano" name="allow_damage_check"/>
+	<button label="?" name="damage_help"/>
+	<check_box label="Restringir Empurrar" name="restrict_pushobject"/>
+	<button label="?" name="restrict_pushobject_help"/>
+	<check_box label="Permitir Revenda de Terra" name="allow_land_resell_check"/>
+	<button label="?" name="land_resell_help"/>
+	<check_box label="Permitir Unir/Dividir Terra" name="allow_parcel_changes_check"/>
+	<button label="?" name="parcel_changes_help"/>
+	<check_box label="Bloquear Mostrar Terra na Busca" name="block_parcel_search_check" tool_tip="Permitir que as pessoas vejam esta região e seus lotes nos resultados de busca"/>
+	<button label="?" name="parcel_search_help"/>
+	<spinner label="Limit do Agente" name="agent_limit_spin"/>
+	<button label="?" name="agent_limit_help"/>
+	<spinner label="Objeto Bonus" name="object_bonus_spin"/>
+	<button label="?" name="object_bonus_help"/>
+	<text label="Maturidade" name="access_text">
+		Maturidade:
+	</text>
+
+
+	<button label="?" name="access_help"/>
+	<button label="Aplicar" name="apply_btn"/>
+	<button label="Teletransportar um usuário para Casa..." name="kick_btn"/>
+	<button label="Teletransportar Todos os Usuários..." name="kick_all_btn"/>
+	<button label="Enviar Mensagem para a Região..." name="im_btn"/>
+	<button label="Gerenciar Telehub..." name="manage_telehub_btn"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_region_terrain.xml b/indra/newview/skins/default/xui/pt/panel_region_terrain.xml
index ecdd808c4e..9b8fc48fb9 100644
--- a/indra/newview/skins/default/xui/pt/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/pt/panel_region_terrain.xml
@@ -1,27 +1,27 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Terreno" name="Terrain">
-	<text name="region_text_lbl">
-		Região:
-	</text>
-	<text name="region_text">
-		nenhum
-	</text>
-	<spinner label="Altura da água" name="water_height_spin"/>
-	<button label="?" name="water_height_help"/>
-	<spinner label="Limite do aumento do terreno" name="terrain_raise_spin"/>
-	<button label="?" name="terrain_raise_help"/>
-	<spinner label="Limite mais baixo do terreno" name="terrain_lower_spin"/>
-	<button label="?" name="terrain_lower_help"/>
-	<check_box label="Usar o sol da propriedade" name="use_estate_sun_check"/>
-	<button label="?" name="use_estate_sun_help"/>
-	<check_box label="Sol fixo" name="fixed_sun_check"/>
-	<button label="?" name="fixed_sun_help"/>
-	<slider label="Fase" name="sun_hour_slider"/>
-	<button label="Aplicar" name="apply_btn"/>
-	<button label="Download de terreno RAW ..." name="download_raw_btn" tool_tip="Não disponível aos gerentes, somente aos proprietários."/>
-	<button label="?" name="download_raw_help"/>
-	<button label="Upload de terreno RAW..." name="upload_raw_btn" tool_tip="Não disponível aos gerentes, somente aos proprietários."/>
-	<button label="?" name="upload_raw_help"/>
-	<button label="Nivelar o terreno" name="bake_terrain_btn" tool_tip="Ajustar terreno atual como o ponto médio para os limites de aumento/decréscimo"/>
-	<button label="?" name="bake_terrain_help"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Terreno" name="Terrain">
+	<text name="region_text_lbl">
+		Região:
+	</text>
+	<text name="region_text">
+		nenhum
+	</text>
+	<spinner label="Altura da água" name="water_height_spin"/>
+	<button label="?" name="water_height_help"/>
+	<spinner label="Limite do aumento do terreno" name="terrain_raise_spin"/>
+	<button label="?" name="terrain_raise_help"/>
+	<spinner label="Limite mais baixo do terreno" name="terrain_lower_spin"/>
+	<button label="?" name="terrain_lower_help"/>
+	<check_box label="Usar o sol da propriedade" name="use_estate_sun_check"/>
+	<button label="?" name="use_estate_sun_help"/>
+	<check_box label="Sol fixo" name="fixed_sun_check"/>
+	<button label="?" name="fixed_sun_help"/>
+	<slider label="Fase" name="sun_hour_slider"/>
+	<button label="Aplicar" name="apply_btn"/>
+	<button label="Download de terreno RAW ..." name="download_raw_btn" tool_tip="Não disponível aos gerentes, somente aos proprietários."/>
+	<button label="?" name="download_raw_help"/>
+	<button label="Upload de terreno RAW..." name="upload_raw_btn" tool_tip="Não disponível aos gerentes, somente aos proprietários."/>
+	<button label="?" name="upload_raw_help"/>
+	<button label="Nivelar o terreno" name="bake_terrain_btn" tool_tip="Ajustar terreno atual como o ponto médio para os limites de aumento/decréscimo"/>
+	<button label="?" name="bake_terrain_help"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_region_texture.xml b/indra/newview/skins/default/xui/pt/panel_region_texture.xml
index 29de27d54c..8d7bdfe97b 100644
--- a/indra/newview/skins/default/xui/pt/panel_region_texture.xml
+++ b/indra/newview/skins/default/xui/pt/panel_region_texture.xml
@@ -1,57 +1,57 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel label="Texturas de Chão" name="Textures">
-	<text name="region_text_lbl">
-		Região:
-	</text>
-	<text name="region_text">
-		desconhecido
-	</text>
-	<text name="detail_texture_text">
-		Texturas de Terreno (requer 512x512, arquivos 24 bit .tga )
-	</text>
-	<text name="height_text_lbl">
-		1 (baixo)
-	</text>
-	<text name="height_text_lbl2">
-		2
-	</text>
-	<text name="height_text_lbl3">
-		3
-	</text>
-	<text name="height_text_lbl4">
-		4 (alto)
-	</text>
-	<text name="height_text_lbl5">
-		Escalas de Elevação de Terreno
-	</text>
-	<text name="height_text_lbl6">
-		Sudeste
-	</text>
-	<text name="height_text_lbl7">
-		Noroeste
-	</text>
-	<text name="height_text_lbl8">
-		Sudoeste
-	</text>
-	<text name="height_text_lbl9">
-		Noroeste
-	</text>
-	<spinner label="Baixo" name="height_start_spin_0" />
-	<spinner label="Baixo" name="height_start_spin_1" />
-	<spinner label="Baixo" name="height_start_spin_2" />
-	<spinner label="Baixo" name="height_start_spin_3" />
-	<spinner label="Alto" name="height_range_spin_0" />
-	<spinner label="Alto" name="height_range_spin_1" />
-	<spinner label="Alto" name="height_range_spin_2" />
-	<spinner label="Alto" name="height_range_spin_3" />
-	<text name="height_text_lbl10">
-		Estes valores respresentam o tipo de escala para as texturas acima.
-	</text>
-	<text name="height_text_lbl11">
-		Medido em metros, o valor Baixo é a altura máxima da Textura #1,
-	</text>
-	<text name="height_text_lbl12">
-		e o valor Alto é a altura Mínima da Textura #4.
-	</text>
-	<button label="Aplicar" name="apply_btn" />
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel label="Texturas de Chão" name="Textures">
+	<text name="region_text_lbl">
+		Região:
+	</text>
+	<text name="region_text">
+		desconhecido
+	</text>
+	<text name="detail_texture_text">
+		Texturas de Terreno (requer 512x512, arquivos 24 bit .tga )
+	</text>
+	<text name="height_text_lbl">
+		1 (baixo)
+	</text>
+	<text name="height_text_lbl2">
+		2
+	</text>
+	<text name="height_text_lbl3">
+		3
+	</text>
+	<text name="height_text_lbl4">
+		4 (alto)
+	</text>
+	<text name="height_text_lbl5">
+		Escalas de Elevação de Terreno
+	</text>
+	<text name="height_text_lbl6">
+		Sudeste
+	</text>
+	<text name="height_text_lbl7">
+		Noroeste
+	</text>
+	<text name="height_text_lbl8">
+		Sudoeste
+	</text>
+	<text name="height_text_lbl9">
+		Noroeste
+	</text>
+	<spinner label="Baixo" name="height_start_spin_0" />
+	<spinner label="Baixo" name="height_start_spin_1" />
+	<spinner label="Baixo" name="height_start_spin_2" />
+	<spinner label="Baixo" name="height_start_spin_3" />
+	<spinner label="Alto" name="height_range_spin_0" />
+	<spinner label="Alto" name="height_range_spin_1" />
+	<spinner label="Alto" name="height_range_spin_2" />
+	<spinner label="Alto" name="height_range_spin_3" />
+	<text name="height_text_lbl10">
+		Estes valores respresentam o tipo de escala para as texturas acima.
+	</text>
+	<text name="height_text_lbl11">
+		Medido em metros, o valor Baixo é a altura máxima da Textura #1,
+	</text>
+	<text name="height_text_lbl12">
+		e o valor Alto é a altura Mínima da Textura #4.
+	</text>
+	<button label="Aplicar" name="apply_btn" />
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_scrolling_param.xml b/indra/newview/skins/default/xui/pt/panel_scrolling_param.xml
index 7029dd202b..d5b67884c9 100644
--- a/indra/newview/skins/default/xui/pt/panel_scrolling_param.xml
+++ b/indra/newview/skins/default/xui/pt/panel_scrolling_param.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="LLScrollingPanelParam">
-	<text length="1" name="Loading..." type="string">
-		Carregando...
-	</text>
-	<text length="1" name="Loading...2" type="string">
-		Carregando...
-	</text>
-	<slider label="[DESC]" name="param slider"/>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="LLScrollingPanelParam">
+	<text length="1" name="Loading..." type="string">
+		Carregando...
+	</text>
+	<text length="1" name="Loading...2" type="string">
+		Carregando...
+	</text>
+	<slider label="[DESC]" name="param slider"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_status_bar.xml b/indra/newview/skins/default/xui/pt/panel_status_bar.xml
index 1b88913a4e..2a5108b4cb 100644
--- a/indra/newview/skins/default/xui/pt/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/pt/panel_status_bar.xml
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="status">
-	<text length="1" name="ParcelNameText" tool_tip="Nome do pedaço de terra em que você está. Clique Sobre a Terra para informações." type="string">
-		Nome do pedaço de terra vai aqui
-	</text>
-	<text length="1" name="BalanceText" tool_tip="Saldo" type="string">
-		Carregando...
-	</text>
-	<button label="" label_selected="" name="buycurrency" tool_tip="Comprar dinheiro"/>
-	<text length="12" name="TimeText" tool_tip="Hora atual (do Pacífico)" type="string">
-		12:00 AM
-	</text>
-	<string name="StatBarDaysOfWeek">
-		Domingo:Segunda-feira:Terça-feira:Quarta-feira:Quinta-feira:Sexta-feira:Sábado
-	</string>
-	<string name="StatBarMonthsOfYear">
-		Janeiro:Fevereiro:Março:Abril:Maio:Junho:Julho:Agosto:Setembro:Outubro:Novembro:Dezembro
-	</string>
-	<button label="" label_selected="" name="scriptout" tool_tip="Erros e avisos do Script"/>
-	<button label="" label_selected="" name="health" tool_tip="Saúde"/>
-	<text length="1" name="HealthText" tool_tip="Saúde" type="string">
-		100%
-	</text>
-	<button label="" label_selected="" name="no_fly" tool_tip="Não é permitido Voar"/>
-	<button label="" label_selected="" name="no_build" tool_tip="Construir/Rezzar não permitido"/>
-	<button label="" label_selected="" name="no_scripts" tool_tip="Scripts não permitidos"/>
-	<button label="" label_selected="" name="restrictpush" tool_tip="Não Empurrar"/>
-	<button label="" label_selected="" name="status_no_voice" tool_tip="Voz não disponível aqui"/>
-	<button label="" label_selected="" name="buyland" tool_tip="Comprar este lote"/>
-	<line_editor label="Buscar" name="search_editor" tool_tip="Buscar no Second Life"/>
-	<button label="" label_selected="" name="search_btn" tool_tip="Buscar no Second Life"/>
-	<string name="packet_loss_tooltip">
-		Perda de pacote
-	</string>
-	<string name="bandwidth_tooltip">
-		Banda
-	</string>
-</panel>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="status">
+	<text length="1" name="ParcelNameText" tool_tip="Nome do pedaço de terra em que você está. Clique Sobre a Terra para informações." type="string">
+		Nome do pedaço de terra vai aqui
+	</text>
+	<text length="1" name="BalanceText" tool_tip="Saldo" type="string">
+		Carregando...
+	</text>
+	<button label="" label_selected="" name="buycurrency" tool_tip="Comprar dinheiro"/>
+	<text length="12" name="TimeText" tool_tip="Hora atual (do Pacífico)" type="string">
+		12:00 AM
+	</text>
+	<string name="StatBarDaysOfWeek">
+		Domingo:Segunda-feira:Terça-feira:Quarta-feira:Quinta-feira:Sexta-feira:Sábado
+	</string>
+	<string name="StatBarMonthsOfYear">
+		Janeiro:Fevereiro:Março:Abril:Maio:Junho:Julho:Agosto:Setembro:Outubro:Novembro:Dezembro
+	</string>
+	<button label="" label_selected="" name="scriptout" tool_tip="Erros e avisos do Script"/>
+	<button label="" label_selected="" name="health" tool_tip="Saúde"/>
+	<text length="1" name="HealthText" tool_tip="Saúde" type="string">
+		100%
+	</text>
+	<button label="" label_selected="" name="no_fly" tool_tip="Não é permitido Voar"/>
+	<button label="" label_selected="" name="no_build" tool_tip="Construir/Rezzar não permitido"/>
+	<button label="" label_selected="" name="no_scripts" tool_tip="Scripts não permitidos"/>
+	<button label="" label_selected="" name="restrictpush" tool_tip="Não Empurrar"/>
+	<button label="" label_selected="" name="status_no_voice" tool_tip="Voz não disponível aqui"/>
+	<button label="" label_selected="" name="buyland" tool_tip="Comprar este lote"/>
+	<line_editor label="Buscar" name="search_editor" tool_tip="Buscar no Second Life"/>
+	<button label="" label_selected="" name="search_btn" tool_tip="Buscar no Second Life"/>
+	<string name="packet_loss_tooltip">
+		Perda de pacote
+	</string>
+	<string name="bandwidth_tooltip">
+		Banda
+	</string>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/role_actions.xml b/indra/newview/skins/default/xui/pt/role_actions.xml
index 91ca2a4091..8d192d4002 100644
--- a/indra/newview/skins/default/xui/pt/role_actions.xml
+++ b/indra/newview/skins/default/xui/pt/role_actions.xml
@@ -1,186 +1,186 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<role_actions>
-	<action_set
-	     description="Esta habilidades incluem poderes de adicionar ou remover membros do grupo e permitir que novos membros se juntem sem um convite."
-	     name="Membership">
-		<action description="Convidar pessoas para este grupo"
-		     longdescription="Convide pessoas para este grupo usando o botão &apos;Convidar nova pessoa...&apos; em Membros &amp; aba Funções &gt; sub-aba Membros."
-		     name="member invite" />
-		<action description="Expulsar membros deste grupo"
-		     longdescription="Expulse membros deste grupo usando o botão &apos;Expulsar do grupo&apos; em Membros &amp; aba Funções &gt; sub-aba Membros. Um proprietário pode expulsar qualquer um, exceto outro proprietário. Se você não é um proprietário, um membro pode expulsá-lo do grupo se, e somente se, ele apenas tiver a função de todos e não outras funções. Para remover membros de funções, você precisa ter a habilidade &apos;Remover membros de funções&apos;."
-		     name="member eject" />
-		<action
-		     description="Ativar/desativar &apos;Abrir registro&apos; e mudar &apos;Taxa de assinatura&apos;"
-		     longdescription="Ative/desative &apos;Abrir registro&apos; para permitir que novos membros se unam sem um convite, e mude a &apos;Taxa de registro&apos; na seção Preferência de grupo da aba Geral."
-		     name="member options" />
-	</action_set>
-	<action_set
-	     description="Estas habilidades incluem poderes de adicionar, remover e mudar funções do grupo; adicionar e remover membros em funções e designar habilidades a funções."
-	     name="Roles">
-		<action description="Criar novas funções"
-		     longdescription="Crie novas funções em Membros &amp; aba Funções &gt; sub-aba Funções."
-		     name="role create" />
-		<action description="Apagar funções"
-		     longdescription="Apague funções em Membros &amp; aba Funções &gt; sub-aba Funções."
-		     name="role delete" />
-		<action description="Mudar nomes de função, títulos e descrições"
-		     longdescription="Mude o nome de funções, títulos e descrições na parte inferior de Membros &amp; aba Funções &gt; sub-aba Funções após selecionar uma função."
-		     name="role properties" />
-		<action description="Designar membros para a função do designador"
-		     longdescription="Designe membros a funções na seção de funções designadas de Membros &amp; aba Funções &gt; sub-aba Membros. Um membro com este poder pode somente adicionar membros para a função que o designador já possui."
-		     name="role assign member limited" />
-		<action description="Designar membros para qualquer função"
-		     longdescription="Designe membros a qualquer função na seção de funções designadas de Membros &amp; aba Funções &gt; sub-aba Membros. *AVISO* Quaisquer membros em uma função com esta habilidade podem designar a si próprios--e quaisquer outros membros não proprietários--para funções que têm mais poderes do que as atuais, elevando-os a poderes próximos ao do proprietário. Certifique-se de saber o que está fazendo antes de designar esta habilidade."
-		     name="role assign member" />
-		<action description="Remover membros das funções"
-		     longdescription="Remova membros de funções na seção de funções designadas de Membros &amp; aba Funções &gt; sub-aba Membros. Proprietários não podem ser removidos."
-		     name="role remove member" />
-		<action description="Determinar e remover habilidades em funções"
-		     longdescription="Designe e remova habilidades em funções na seção habilidades pertmitidas de Membros &amp; aba Funções &gt; sub-aba Funções. *AVISO* Quaisquer membros em uma função com esta habilidade podem desginar a si próprios--e quaisquer outros membros não proprietários--todas as habilidades, elevando-os a poderes próximos ao do proprietário. Certifique-se de saber o que está fazendo antes de designar esta habilidade."
-		     name="role change actions" />
-	</action_set>
-	<action_set
-	     description="Estas habilidade incluem poderes para modificar esta identidade de grupo, como mudar a visibilidade pública, apresentação e insígnia."
-	     name="Group Identity">
-		<action
-		     description="Mudar apresentação, insígnia, &apos;Publicar na web&apos;, e quais membros estão publicamente visíveis em Informações do Grupo."
-		     longdescription="Mude a apresentação, insígnia, &apos;Publicar na web&apos; e quais membros estão publicamente visíveis em Informações do grupo. É feito na aba Geral."
-		     name="group change identity" />
-	</action_set>
-	<action_set
-	     description="Estas habilidades incluem poderes para transferir, modificar e vender terrenos do grupo. Vá pra a janela Sobre o terreno, clique com o botão direito no terreno e selecione &apos;Sobre o terreno...&apos; ou clique na informação da parcela na barra do menu."
-	     name="Parcel Management">
-		<action description="Transferir  e comprar terreno para o grupo"
-		     longdescription="Transfere e compre terreno para o grupo. É feito em Sobre o terreno &gt; aba Geral."
-		     name="land deed" />
-		<action description="Abandonar terreno para Governador Linden"
-		     longdescription="Abandone terreno para Governador Linden. *AVISO* Qualquer membro em uma função com esta habilidade pode abandonar o terreno pertencente ao grupo em Sobre o terreno &gt; aba Geral, revertendo à posse Linden sem uma venda! Certifique-se de saber o que está fazendo antes de designar esta habilidade."
-		     name="land release" />
-		<action description="Definir terreno para informação de venda"
-		     longdescription="Defina informações de venda para terreno. *AVISO* Qualquer membro em uma função com esta habilidade pode vender terrenos pertencentes ao grupo em Sobre o terreno &gt; aba Geral como quiser! Certifique-se de sabe o que está fazendo antes de designar esta habilidade."
-		     name="land set sale info" />
-		<action description="Subdividir e unir parcelas"
-		     longdescription="Subdivide and join parcels. This is done by right-clicking the ground, &apos;Edit Terrain&apos;, and dragging your mouse on the land to make a selection. To subdivide, select what you want to split and click &apos;Subdivide...&apos;. To join, select two or more contiguous parcels and click &apos;Join...&apos;. "
-		     name="land divide join" />
-	</action_set>
-	<action_set
-	     description="Estas habilidades incluem poderes para mudar o nome da parcelas e configurações de publicação, visibilidade da busca de diretório e ponto de aterrissagem &amp; opções de rota de TP."
-	     name="Parcel Identity">
-		<action
-		     description="Ativar/desativar &apos;Exibir em locais de encontro&apos; e definir categoria"
-		     longdescription="Ativar/desativar &apos;Exibir em locais de encontro&apos; e configurar uma categoria de parcela em Sobre o terreno &gt; aba Opções."
-		     name="land find places" />
-		<action
-		     description="Mudar nome da parcela, descrição, e configurações &apos;Publicar na web&apos;"
-		     longdescription="Mude o nome da parcela, descrição e configurações de &apos;Publicar na web&apos;. É feito em Sobre o terreno &gt; aba Opções."
-		     name="land change identity" />
-		<action description="Definir ponto de aterrissagem e rota de teletransporte"
-		     longdescription="Em uma parcela pertencente ao grupo, membros em uma função com esta habilidade podem definir um ponto de aterrissagem para especificar onde os teletransportes chegam e também definir a rota do teletransporte para um maior controle. É feito em Sobre o terreno &gt; aba Opções."
-		     name="land set landing point" />
-	</action_set>
-	<action_set
-	     description="Estas habilidade incluem poderes que afetam opções de parcela, como &apos;Criar objetos&apos;, &apos;Editar terreno&apos; e música &amp; configurações de mídia."
-	     name="Parcel Settings">
-		<action description="Mudar música &amp; configurações de mídia"
-		     longdescription="Mude streaming de música e configurações de vídeo em Sobre o terreno &gt; aba Mídia."
-		     name="land change media" />
-		<action description="Ativar/desativar &apos;Editar terreno&apos;"
-		     longdescription="Ative/desative &apos;Editar terreno&apos;. *AVISO* Sobre o terreno &gt; aba Opções &gt; Editar terreno permite a qualquer um alterar as formas de seu terreno, substituir e mover plantas Linden. Certifique-se de saber o que está fazendo antes de desginar esta habilidade. A edição de terreno é ativada/desativada em Sobre o terreno &gt; aba Opções."
-		     name="land edit" />
-		<action
-		     description="Ativar/desativar variados Sobre o Terreno &gt; Opções de configuração"
-		     longdescription="Ative/desative &apos;Seguro (sem dano)&apos;, &apos;Voar&apos;, e permita a outros residentes: &apos;Criar objetos&apos;, &apos;Editar terreno&apos;, &apos;Criar pontos de referência&apos;, e &apos;Executar scripts&apos; em um terreno pertencente ao grupo em Sobre o terreno &gt; aba Opções."
-		     name="land options" />
-	</action_set>
-	<action_set
-	     description="Estas habilidades incluem poderes que permitem a membros ultrapassar restrições em parcelas pertencentes ao grupo."
-	     name="Parcel Powers">
-		<action description="Sempre permitir &apos;Editar terreno&apos;"
-		     longdescription="Membros em uma função com esta habilidade podem editar terreno em uma parcela pertencente ao grupo, mesmo se estiver desativada em Sobre o terreno &gt; aba Opções."
-		     name="land allow edit land" />
-		<action description="Sempre permitir &apos;Voar&apos;"
-		     longdescription="Membros em uma função com esta habilidade podem voar sobre uma parcela pertencente ao grupo, mesmo se estiver desativada em Sobre o terreno &gt; aba Opções."
-		     name="land allow fly" />
-		<action description="Sempre permitir &apos;Criar objetos&apos;"
-		     longdescription="Membros em uma função com esta habilidade podem criar objetos em uma parcela pertencente ao grupo, mesmo se estiver desativada em Sobre o terreno &gt; aba Opções."
-		     name="land allow create" />
-		<action description="Sempre permitir &apos;Criar ponto de referência&apos;"
-		     longdescription="Membros em uma função com esta habilidade podem colocar um ponto de referência uma parcela pertencente ao grupo, mesmo se estiver desativada em Sobre o terreno &gt; aba Opções."
-		     name="land allow landmark" />
-		<action description="Permitir &apos;Colocar casa aqui&apos; no terreno do grupo"
-		     longdescription="Membros em uma função com esta habilidade podem usar o menu Mundo &gt; Definir lar aqui em uma parcela do grupo (definir terreno ou transferir para este grupo)."
-		     name="land allow set home" />
-	</action_set>
-	<action_set
-	     description="Estas habilidades incluem poderes de permitir ou restringir acesso a parcelas pertencentes ao grupo, incluindo congelar e expulsar residentes."
-	     name="Parcel Access">
-		<action description="Gerenciar listas de acesso à parcela"
-		     longdescription="Gerencie a lista de acesso à parcela em Sobre o terreno &gt; aba Acesso."
-		     name="land manage allowed" />
-		<action description="Gerenciar lista de banidos da parcela"
-		     longdescription="Gerencie a lista de banidos da parcela em Sobre o terreno &gt; aba Banido."
-		     name="land manage banned" />
-		<action description="Mudar configurações de parcela &apos;Vender passes...&apos;"
-		     longdescription="Mude configurações de &apos;Vender passes...&apos; em Sobre o terreno &gt; aba Acesso."
-		     name="land manage passes" />
-		<action description="Expulsar e congelar residentes nas parcelas"
-		     longdescription="Membros em uma função com esta habilidade podem lidar com um residente indesejado em uma parcela pertencente ao grupo clicando com o botão direitos sobre ele, Mais &gt; e selecionado &apos;Expulsar...&apos; ou &apos;Congelar...&apos;."
-		     name="land admin" />
-	</action_set>
-	<action_set
-	     description="Estas habilidades incluem poderes de permitir a membros retornar objetos e colocar e mover plantas Linden. Útil para que membros organizem a paisagem, porém deve ser usado com cuidado, devido a não ser possível desfazer a mudança dos objetos."
-	     name="Parcel Content">
-		<action description="Retornar objetos que pertencem ao grupo"
-		     longdescription="Retorne objetos em parcelas pertencentes ao grupo que pertencem ao grupo em Sobre o terreno &gt; aba Objetos."
-		     name="land return group owned" />
-		<action description="Retornar objetos definidos para o grupo"
-		     longdescription="Retorne objetos em parcelas pertencentes ao grupo que em Sobre o terrreno &gt; aba Objetos."
-		     name="land return group set" />
-		<action description="Retornar objetos que não pertencem ao grupo"
-		     longdescription="Retorne objetos nas parcelas pertencentes a um grupo que estão sem grupo em em Sobre o terreno &gt; aba Objetos."
-		     name="land return non group" />
-		<action description="Ajardinar usando plantas Linden"
-		     longdescription="A habilidade de ajardinar permite colocar e mover árvores Linden, plantas e gramas. Estes itens podem ser encontrando na Biblioteca de seu inventário &gt; pasta Objetos ou podem ser criados através do botão Construir."
-		     name="land gardening" />
-	</action_set>
-	<action_set
-	     description="These Abilities include powers to deed, modify, and sell group-owned objects. These changes are done in the Edit Tools &gt; General Tab. Right-click an object and Edit to see its settings. "
-	     name="Object Management">
-		<action description="Transferir objetos para o grupo"
-		     longdescription="Transfere objetos para o grupo em Editar ferramentas &gt; aba Geral."
-		     name="object deed" />
-		<action description="Manipular (mover, copiar, modificar) objetos do grupo"
-		     longdescription="Manipule (mover,copiar, modificar) objetos pertencentes ao grupo em Editar Ferramentas &gt; aba Geral."
-		     name="object manipulate" />
-		<action description="Definir objetos pertencentes ao grupo para venda"
-		     longdescription="Defina objetos pertencentes ao grupo para venda em Editar Ferramentas &gt; aba Geral."
-		     name="object set sale" />
-	</action_set>
-	<action_set
-	     description="Estas habilidades incluem poderes que requerem que membros paguem dívidas e recebam dividendos do grupo, e restringem acesso ao histórico de conta do grupo."
-	     name="Accounting">
-		<action description="Pagar débitos e receber dividendos do grupo"
-		     longdescription="Members in a Role with this Ability will automatically pay group liabilities and receive group dividends. This means they will receive a portion of group-owned land sales which are distributed daily, as well as contribute towards things like parcel listing fees. "
-		     name="accounting accountable" />
-	</action_set>
-	<action_set
-	     description="Estas habilidade incluem poderes de permitir enviar, receber e ver avisos de grupo."
-	     name="Notices">
-		<action description="Enviar aviso"
-		     longdescription="Membros em uma função com esta habiliade podem enviar avisos em Informações de grupo &gt; aba Avisos."
-		     name="notices send" />
-		<action description="Receber novos avisos e ver os anteriores"
-		     longdescription="Membros em uma função com esta habilidade podem receber os novos avisos e ver os anteriores em Informações de grupo &gt; aba Avisos."
-		     name="notices receive" />
-	</action_set>
-	<action_set
-	     description="Estas habilidades incluem poderes de permitir a membros definir e votar em propostas e ver histórico de votação."
-	     name="Proposals">
-		<action description="Criar proposta"
-		     longdescription="Membros em uma função com esta habilidade podem criar proposta para serem votadas em Informações de grupo &gt; aba Propostas."
-		     name="proposal start" />
-		<action description="Votar em propostas"
-		     longdescription="Membros em uma função com esta habilidade podem votar em propostas em Informações de grupo &gt; aba Propostas."
-		     name="proposal vote" />
-	</action_set>
-</role_actions>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<role_actions>
+	<action_set
+	     description="Esta habilidades incluem poderes de adicionar ou remover membros do grupo e permitir que novos membros se juntem sem um convite."
+	     name="Membership">
+		<action description="Convidar pessoas para este grupo"
+		     longdescription="Convide pessoas para este grupo usando o botão &apos;Convidar nova pessoa...&apos; em Membros &amp; aba Funções &gt; sub-aba Membros."
+		     name="member invite" />
+		<action description="Expulsar membros deste grupo"
+		     longdescription="Expulse membros deste grupo usando o botão &apos;Expulsar do grupo&apos; em Membros &amp; aba Funções &gt; sub-aba Membros. Um proprietário pode expulsar qualquer um, exceto outro proprietário. Se você não é um proprietário, um membro pode expulsá-lo do grupo se, e somente se, ele apenas tiver a função de todos e não outras funções. Para remover membros de funções, você precisa ter a habilidade &apos;Remover membros de funções&apos;."
+		     name="member eject" />
+		<action
+		     description="Ativar/desativar &apos;Abrir registro&apos; e mudar &apos;Taxa de assinatura&apos;"
+		     longdescription="Ative/desative &apos;Abrir registro&apos; para permitir que novos membros se unam sem um convite, e mude a &apos;Taxa de registro&apos; na seção Preferência de grupo da aba Geral."
+		     name="member options" />
+	</action_set>
+	<action_set
+	     description="Estas habilidades incluem poderes de adicionar, remover e mudar funções do grupo; adicionar e remover membros em funções e designar habilidades a funções."
+	     name="Roles">
+		<action description="Criar novas funções"
+		     longdescription="Crie novas funções em Membros &amp; aba Funções &gt; sub-aba Funções."
+		     name="role create" />
+		<action description="Apagar funções"
+		     longdescription="Apague funções em Membros &amp; aba Funções &gt; sub-aba Funções."
+		     name="role delete" />
+		<action description="Mudar nomes de função, títulos e descrições"
+		     longdescription="Mude o nome de funções, títulos e descrições na parte inferior de Membros &amp; aba Funções &gt; sub-aba Funções após selecionar uma função."
+		     name="role properties" />
+		<action description="Designar membros para a função do designador"
+		     longdescription="Designe membros a funções na seção de funções designadas de Membros &amp; aba Funções &gt; sub-aba Membros. Um membro com este poder pode somente adicionar membros para a função que o designador já possui."
+		     name="role assign member limited" />
+		<action description="Designar membros para qualquer função"
+		     longdescription="Designe membros a qualquer função na seção de funções designadas de Membros &amp; aba Funções &gt; sub-aba Membros. *AVISO* Quaisquer membros em uma função com esta habilidade podem designar a si próprios--e quaisquer outros membros não proprietários--para funções que têm mais poderes do que as atuais, elevando-os a poderes próximos ao do proprietário. Certifique-se de saber o que está fazendo antes de designar esta habilidade."
+		     name="role assign member" />
+		<action description="Remover membros das funções"
+		     longdescription="Remova membros de funções na seção de funções designadas de Membros &amp; aba Funções &gt; sub-aba Membros. Proprietários não podem ser removidos."
+		     name="role remove member" />
+		<action description="Determinar e remover habilidades em funções"
+		     longdescription="Designe e remova habilidades em funções na seção habilidades pertmitidas de Membros &amp; aba Funções &gt; sub-aba Funções. *AVISO* Quaisquer membros em uma função com esta habilidade podem desginar a si próprios--e quaisquer outros membros não proprietários--todas as habilidades, elevando-os a poderes próximos ao do proprietário. Certifique-se de saber o que está fazendo antes de designar esta habilidade."
+		     name="role change actions" />
+	</action_set>
+	<action_set
+	     description="Estas habilidade incluem poderes para modificar esta identidade de grupo, como mudar a visibilidade pública, apresentação e insígnia."
+	     name="Group Identity">
+		<action
+		     description="Mudar apresentação, insígnia, &apos;Publicar na web&apos;, e quais membros estão publicamente visíveis em Informações do Grupo."
+		     longdescription="Mude a apresentação, insígnia, &apos;Publicar na web&apos; e quais membros estão publicamente visíveis em Informações do grupo. É feito na aba Geral."
+		     name="group change identity" />
+	</action_set>
+	<action_set
+	     description="Estas habilidades incluem poderes para transferir, modificar e vender terrenos do grupo. Vá pra a janela Sobre o terreno, clique com o botão direito no terreno e selecione &apos;Sobre o terreno...&apos; ou clique na informação da parcela na barra do menu."
+	     name="Parcel Management">
+		<action description="Transferir  e comprar terreno para o grupo"
+		     longdescription="Transfere e compre terreno para o grupo. É feito em Sobre o terreno &gt; aba Geral."
+		     name="land deed" />
+		<action description="Abandonar terreno para Governador Linden"
+		     longdescription="Abandone terreno para Governador Linden. *AVISO* Qualquer membro em uma função com esta habilidade pode abandonar o terreno pertencente ao grupo em Sobre o terreno &gt; aba Geral, revertendo à posse Linden sem uma venda! Certifique-se de saber o que está fazendo antes de designar esta habilidade."
+		     name="land release" />
+		<action description="Definir terreno para informação de venda"
+		     longdescription="Defina informações de venda para terreno. *AVISO* Qualquer membro em uma função com esta habilidade pode vender terrenos pertencentes ao grupo em Sobre o terreno &gt; aba Geral como quiser! Certifique-se de sabe o que está fazendo antes de designar esta habilidade."
+		     name="land set sale info" />
+		<action description="Subdividir e unir parcelas"
+		     longdescription="Subdivide and join parcels. This is done by right-clicking the ground, &apos;Edit Terrain&apos;, and dragging your mouse on the land to make a selection. To subdivide, select what you want to split and click &apos;Subdivide...&apos;. To join, select two or more contiguous parcels and click &apos;Join...&apos;. "
+		     name="land divide join" />
+	</action_set>
+	<action_set
+	     description="Estas habilidades incluem poderes para mudar o nome da parcelas e configurações de publicação, visibilidade da busca de diretório e ponto de aterrissagem &amp; opções de rota de TP."
+	     name="Parcel Identity">
+		<action
+		     description="Ativar/desativar &apos;Exibir em locais de encontro&apos; e definir categoria"
+		     longdescription="Ativar/desativar &apos;Exibir em locais de encontro&apos; e configurar uma categoria de parcela em Sobre o terreno &gt; aba Opções."
+		     name="land find places" />
+		<action
+		     description="Mudar nome da parcela, descrição, e configurações &apos;Publicar na web&apos;"
+		     longdescription="Mude o nome da parcela, descrição e configurações de &apos;Publicar na web&apos;. É feito em Sobre o terreno &gt; aba Opções."
+		     name="land change identity" />
+		<action description="Definir ponto de aterrissagem e rota de teletransporte"
+		     longdescription="Em uma parcela pertencente ao grupo, membros em uma função com esta habilidade podem definir um ponto de aterrissagem para especificar onde os teletransportes chegam e também definir a rota do teletransporte para um maior controle. É feito em Sobre o terreno &gt; aba Opções."
+		     name="land set landing point" />
+	</action_set>
+	<action_set
+	     description="Estas habilidade incluem poderes que afetam opções de parcela, como &apos;Criar objetos&apos;, &apos;Editar terreno&apos; e música &amp; configurações de mídia."
+	     name="Parcel Settings">
+		<action description="Mudar música &amp; configurações de mídia"
+		     longdescription="Mude streaming de música e configurações de vídeo em Sobre o terreno &gt; aba Mídia."
+		     name="land change media" />
+		<action description="Ativar/desativar &apos;Editar terreno&apos;"
+		     longdescription="Ative/desative &apos;Editar terreno&apos;. *AVISO* Sobre o terreno &gt; aba Opções &gt; Editar terreno permite a qualquer um alterar as formas de seu terreno, substituir e mover plantas Linden. Certifique-se de saber o que está fazendo antes de desginar esta habilidade. A edição de terreno é ativada/desativada em Sobre o terreno &gt; aba Opções."
+		     name="land edit" />
+		<action
+		     description="Ativar/desativar variados Sobre o Terreno &gt; Opções de configuração"
+		     longdescription="Ative/desative &apos;Seguro (sem dano)&apos;, &apos;Voar&apos;, e permita a outros residentes: &apos;Criar objetos&apos;, &apos;Editar terreno&apos;, &apos;Criar pontos de referência&apos;, e &apos;Executar scripts&apos; em um terreno pertencente ao grupo em Sobre o terreno &gt; aba Opções."
+		     name="land options" />
+	</action_set>
+	<action_set
+	     description="Estas habilidades incluem poderes que permitem a membros ultrapassar restrições em parcelas pertencentes ao grupo."
+	     name="Parcel Powers">
+		<action description="Sempre permitir &apos;Editar terreno&apos;"
+		     longdescription="Membros em uma função com esta habilidade podem editar terreno em uma parcela pertencente ao grupo, mesmo se estiver desativada em Sobre o terreno &gt; aba Opções."
+		     name="land allow edit land" />
+		<action description="Sempre permitir &apos;Voar&apos;"
+		     longdescription="Membros em uma função com esta habilidade podem voar sobre uma parcela pertencente ao grupo, mesmo se estiver desativada em Sobre o terreno &gt; aba Opções."
+		     name="land allow fly" />
+		<action description="Sempre permitir &apos;Criar objetos&apos;"
+		     longdescription="Membros em uma função com esta habilidade podem criar objetos em uma parcela pertencente ao grupo, mesmo se estiver desativada em Sobre o terreno &gt; aba Opções."
+		     name="land allow create" />
+		<action description="Sempre permitir &apos;Criar ponto de referência&apos;"
+		     longdescription="Membros em uma função com esta habilidade podem colocar um ponto de referência uma parcela pertencente ao grupo, mesmo se estiver desativada em Sobre o terreno &gt; aba Opções."
+		     name="land allow landmark" />
+		<action description="Permitir &apos;Colocar casa aqui&apos; no terreno do grupo"
+		     longdescription="Membros em uma função com esta habilidade podem usar o menu Mundo &gt; Definir lar aqui em uma parcela do grupo (definir terreno ou transferir para este grupo)."
+		     name="land allow set home" />
+	</action_set>
+	<action_set
+	     description="Estas habilidades incluem poderes de permitir ou restringir acesso a parcelas pertencentes ao grupo, incluindo congelar e expulsar residentes."
+	     name="Parcel Access">
+		<action description="Gerenciar listas de acesso à parcela"
+		     longdescription="Gerencie a lista de acesso à parcela em Sobre o terreno &gt; aba Acesso."
+		     name="land manage allowed" />
+		<action description="Gerenciar lista de banidos da parcela"
+		     longdescription="Gerencie a lista de banidos da parcela em Sobre o terreno &gt; aba Banido."
+		     name="land manage banned" />
+		<action description="Mudar configurações de parcela &apos;Vender passes...&apos;"
+		     longdescription="Mude configurações de &apos;Vender passes...&apos; em Sobre o terreno &gt; aba Acesso."
+		     name="land manage passes" />
+		<action description="Expulsar e congelar residentes nas parcelas"
+		     longdescription="Membros em uma função com esta habilidade podem lidar com um residente indesejado em uma parcela pertencente ao grupo clicando com o botão direitos sobre ele, Mais &gt; e selecionado &apos;Expulsar...&apos; ou &apos;Congelar...&apos;."
+		     name="land admin" />
+	</action_set>
+	<action_set
+	     description="Estas habilidades incluem poderes de permitir a membros retornar objetos e colocar e mover plantas Linden. Útil para que membros organizem a paisagem, porém deve ser usado com cuidado, devido a não ser possível desfazer a mudança dos objetos."
+	     name="Parcel Content">
+		<action description="Retornar objetos que pertencem ao grupo"
+		     longdescription="Retorne objetos em parcelas pertencentes ao grupo que pertencem ao grupo em Sobre o terreno &gt; aba Objetos."
+		     name="land return group owned" />
+		<action description="Retornar objetos definidos para o grupo"
+		     longdescription="Retorne objetos em parcelas pertencentes ao grupo que em Sobre o terrreno &gt; aba Objetos."
+		     name="land return group set" />
+		<action description="Retornar objetos que não pertencem ao grupo"
+		     longdescription="Retorne objetos nas parcelas pertencentes a um grupo que estão sem grupo em em Sobre o terreno &gt; aba Objetos."
+		     name="land return non group" />
+		<action description="Ajardinar usando plantas Linden"
+		     longdescription="A habilidade de ajardinar permite colocar e mover árvores Linden, plantas e gramas. Estes itens podem ser encontrando na Biblioteca de seu inventário &gt; pasta Objetos ou podem ser criados através do botão Construir."
+		     name="land gardening" />
+	</action_set>
+	<action_set
+	     description="These Abilities include powers to deed, modify, and sell group-owned objects. These changes are done in the Edit Tools &gt; General Tab. Right-click an object and Edit to see its settings. "
+	     name="Object Management">
+		<action description="Transferir objetos para o grupo"
+		     longdescription="Transfere objetos para o grupo em Editar ferramentas &gt; aba Geral."
+		     name="object deed" />
+		<action description="Manipular (mover, copiar, modificar) objetos do grupo"
+		     longdescription="Manipule (mover,copiar, modificar) objetos pertencentes ao grupo em Editar Ferramentas &gt; aba Geral."
+		     name="object manipulate" />
+		<action description="Definir objetos pertencentes ao grupo para venda"
+		     longdescription="Defina objetos pertencentes ao grupo para venda em Editar Ferramentas &gt; aba Geral."
+		     name="object set sale" />
+	</action_set>
+	<action_set
+	     description="Estas habilidades incluem poderes que requerem que membros paguem dívidas e recebam dividendos do grupo, e restringem acesso ao histórico de conta do grupo."
+	     name="Accounting">
+		<action description="Pagar débitos e receber dividendos do grupo"
+		     longdescription="Members in a Role with this Ability will automatically pay group liabilities and receive group dividends. This means they will receive a portion of group-owned land sales which are distributed daily, as well as contribute towards things like parcel listing fees. "
+		     name="accounting accountable" />
+	</action_set>
+	<action_set
+	     description="Estas habilidade incluem poderes de permitir enviar, receber e ver avisos de grupo."
+	     name="Notices">
+		<action description="Enviar aviso"
+		     longdescription="Membros em uma função com esta habiliade podem enviar avisos em Informações de grupo &gt; aba Avisos."
+		     name="notices send" />
+		<action description="Receber novos avisos e ver os anteriores"
+		     longdescription="Membros em uma função com esta habilidade podem receber os novos avisos e ver os anteriores em Informações de grupo &gt; aba Avisos."
+		     name="notices receive" />
+	</action_set>
+	<action_set
+	     description="Estas habilidades incluem poderes de permitir a membros definir e votar em propostas e ver histórico de votação."
+	     name="Proposals">
+		<action description="Criar proposta"
+		     longdescription="Membros em uma função com esta habilidade podem criar proposta para serem votadas em Informações de grupo &gt; aba Propostas."
+		     name="proposal start" />
+		<action description="Votar em propostas"
+		     longdescription="Membros em uma função com esta habilidade podem votar em propostas em Informações de grupo &gt; aba Propostas."
+		     name="proposal vote" />
+	</action_set>
+</role_actions>
diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml
index 1995382697..d54b562e59 100644
--- a/indra/newview/skins/default/xui/pt/strings.xml
+++ b/indra/newview/skins/default/xui/pt/strings.xml
@@ -1,421 +1,421 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<!-- This file contains strings that used to be hardcoded in the source.
-     It is only for those strings which don&apos;t belong in a floater.
-     For example, the strings used in avatar chat bubbles, and strings 
-     that are returned from one component and may appear in many places-->
-<strings>
-	<string name="LoginInProgress">
-		Fazendo Login. [APP_NAME] pode parecer congelado. Por favor, aguarde.
-	</string>
-	<string name="LoginAuthenticating">
-		Autenticando
-	</string>
-	<string name="LoginMaintenance">
-		Executando manutenção da conta...
-	</string>
-	<string name="LoginAttempt">
-		Falha na tentativa anterior de login. Fazendo Login, tentativa [NUMBER]
-	</string>
-	<string name="LoginPrecaching">
-		Carregando mundo...
-	</string>
-	<string name="LoginInitializingBrowser">
-		Inicializando navegador embutido...
-	</string>
-	<string name="LoginInitializingMultimedia">
-		Inicializando multimídia...
-	</string>
-	<string name="LoginVerifyingCache">
-		Verificando arquivos no cache (pode levar 60-90 segundos)...
-	</string>
-	<string name="LoginProcessingResponse">
-		Processando Resposta...
-	</string>
-	<string name="LoginInitializingWorld">
-		Inicializando Mundo...
-	</string>
-	<string name="LoginDecodingImages">
-		Decodificando imagens...
-	</string>
-	<string name="LoginInitializingQuicktime">
-		Inicializando o QuickTime...
-	</string>
-	<string name="LoginQuicktimeNotFound">
-		O QuickTime não foi encontrado - incapaz de inicializar.
-	</string>
-	<string name="LoginQuicktimeOK">
-		O QuickTime foi inicializado com sucesso.
-	</string>
-	<string name="LoginWaitingForRegionHandshake">
-		Aguardando o handshake com a região...
-	</string>
-	<string name="LoginConnectingToRegion">
-		Conectando à região...
-	</string>
-	<string name="LoginDownloadingClothing">
-		Baixando roupas...
-	</string>
-	<string name="LoginFailedNoNetwork">
-		Erro de Rede: Não foi possível estabelecer uma conexão. Por favor, verifique sua conexão de rede.
-	</string>
-	<string name="AgentLostConnection">
-		Esta região pode estar passando por problemas. Por favor, verifique sua conexão com a internet.
-	</string>
-	<string name="TooltipPerson">
-		Pessoa
-	</string>
-	<string name="TooltipNoName">
-		(sem nome)
-	</string>
-	<string name="TooltipOwner">
-		Proprietário:
-	</string>
-	<string name="TooltipPublic">
-		Público
-	</string>
-	<string name="TooltipIsGroup">
-		(Grupo)
-	</string>
-	<string name="TooltipFlagScript">
-		Script
-	</string>
-	<string name="TooltipFlagPhysics">
-		Física
-	</string>
-	<string name="TooltipFlagTouch">
-		Toque
-	</string>
-	<string name="TooltipFlagL$">
-		L$
-	</string>
-	<string name="TooltipFlagDropInventory">
-		Dar Inventário
-	</string>
-	<string name="TooltipFlagPhantom">
-		Imaterial
-	</string>
-	<string name="TooltipFlagTemporary">
-		Temporário
-	</string>
-	<string name="TooltipFlagRightClickMenu">
-		(Clique com o botão direito para acessar o menu)
-	</string>
-	<string name="TooltipFreeToCopy">
-		Cópia Permitida
-	</string>
-	<string name="TooltipForSaleL$">
-		À venda: L$[AMOUNT]
-	</string>
-	<string name="TooltipForSaleMsg">
-		À venda: [MESSAGE]
-	</string>
-	<string name="TooltipFlagGroupBuild">
-		Construído por Grupo
-	</string>
-	<string name="TooltipFlagNoBuild">
-		Não é Permitido Construir
-	</string>
-	<string name="TooltipFlagNoEdit">
-		Construído por Grupo
-	</string>
-	<string name="TooltipFlagNotSafe">
-		Não é Seguro
-	</string>
-	<string name="TooltipFlagNoFly">
-		Não é Permitido Voar
-	</string>
-	<string name="TooltipFlagGroupScripts">
-		Scripts de Grupo
-	</string>
-	<string name="TooltipFlagNoScripts">
-		Não são Permitidos Scripts
-	</string>
-	<string name="TooltipLand">
-		Terreno:
-	</string>
-	<string name="TooltipMustSingleDrop">
-		Apenas um item único pode ser arrastado para este local
-	</string>
-	<string name="RetrievingData">
-		Buscando...
-	</string>
-	<string name="ReleaseNotes">
-		Notas de Distribuição
-	</string>
-	<string name="LoadingData">
-		Carregando...
-	</string>
-	<string name="AvatarNameNobody">
-		(ninguém)
-	</string>
-	<string name="AvatarNameWaiting">
-		(aguardando)
-	</string>
-	<string name="AvatarNameHippos">
-		(hippos)
-	</string>
-	<string name="GroupNameNone">
-		(nenhum)
-	</string>
-	<string name="AssetErrorNone">
-		Nenhum erro
-	</string>
-	<string name="AssetErrorRequestFailed">
-		Item pedido falhou
-	</string>
-	<string name="AssetErrorNonexistentFile">
-		Item pedido: arquivo inexistente
-	</string>
-	<string name="AssetErrorNotInDatabase">
-		Item pedido: item não encontrado na base de dados.
-	</string>
-	<string name="AssetErrorEOF">
-		Fim do arquivo
-	</string>
-	<string name="AssetErrorCannotOpenFile">
-		Não é possível abrir arquivo
-	</string>
-	<string name="AssetErrorFileNotFound">
-		Arquivo não encontrado
-	</string>
-	<string name="AssetErrorTCPTimeout">
-		Tempo de transferência de arquivo expirado
-	</string>
-	<string name="AssetErrorCircuitGone">
-		Circuito caiu
-	</string>
-	<string name="AssetErrorUnknownStatus">
-		Status desconhecido
-	</string>
-	<string name="AvatarEditingApparance">
-		(Editando Aparência)
-	</string>
-	<string name="AvatarAway">
-		Distante
-	</string>
-	<string name="AvatarBusy">
-		Ocupado
-	</string>
-	<string name="AvatarMuted">
-		Mudo
-	</string>
-	<string name="anim_express_afraid">
-		Temeroso
-	</string>
-	<string name="anim_express_anger">
-		Bravo
-	</string>
-	<string name="anim_away">
-		Distante
-	</string>
-	<string name="anim_backflip">
-		Virar para trás
-	</string>
-	<string name="anim_express_laugh">
-		Rir segurando a barriga
-	</string>
-	<string name="anim_express_toothsmile">
-		Sorriso largo
-	</string>
-	<string name="anim_blowkiss">
-		Mandar beijo
-	</string>
-	<string name="anim_express_bored">
-		Entediado
-	</string>
-	<string name="anim_bow">
-		Saudar curvando
-	</string>
-	<string name="anim_clap">
-		Aplaudir
-	</string>
-	<string name="anim_courtbow">
-		Saudação formal
-	</string>
-	<string name="anim_express_cry">
-		Chorar
-	</string>
-	<string name="anim_dance1">
-		Dança 1
-	</string>
-	<string name="anim_dance2">
-		Dança 2
-	</string>
-	<string name="anim_dance3">
-		Dança 3
-	</string>
-	<string name="anim_dance4">
-		Dança 4
-	</string>
-	<string name="anim_dance5">
-		Dança 5
-	</string>
-	<string name="anim_dance6">
-		Dança 6
-	</string>
-	<string name="anim_dance7">
-		Dança 7
-	</string>
-	<string name="anim_dance8">
-		Dança 8
-	</string>
-	<string name="anim_express_disdain">
-		Desdém
-	</string>
-	<string name="anim_drink">
-		Beber
-	</string>
-	<string name="anim_express_embarrased">
-		Envergonhado
-	</string>
-	<string name="anim_angry_fingerwag">
-		Negar com o dedo.
-	</string>
-	<string name="anim_fist_pump">
-		Vibrar provocando
-	</string>
-	<string name="anim_yoga_float">
-		Levitar Yoga
-	</string>
-	<string name="anim_express_frown">
-		Careta
-	</string>
-	<string name="anim_impatient">
-		Impaciente
-	</string>
-	<string name="anim_jumpforjoy">
-		Pular de Alegria
-	</string>
-	<string name="anim_kissmybutt">
-		Beije meu Bumbum
-	</string>
-	<string name="anim_express_kiss">
-		Beijar
-	</string>
-	<string name="anim_laugh_short">
-		Rir
-	</string>
-	<string name="anim_musclebeach">
-		Exibir músculos
-	</string>
-	<string name="anim_no_unhappy">
-		Não (descontente)
-	</string>
-	<string name="anim_no_head">
-		Não
-	</string>
-	<string name="anim_nyanya">
-		Nya-nya-nya
-	</string>
-	<string name="anim_punch_onetwo">
-		Soco Um-Dois
-	</string>
-	<string name="anim_express_open_mouth">
-		Abrir a boca
-	</string>
-	<string name="anim_peace">
-		Paz
-	</string>
-	<string name="anim_point_you">
-		Apontar para o outro
-	</string>
-	<string name="anim_point_me">
-		Apontar para si
-	</string>
-	<string name="anim_punch_l">
-		Socar Esquerda
-	</string>
-	<string name="anim_punch_r">
-		Socar Direita
-	</string>
-	<string name="anim_rps_countdown">
-		RPS contar
-	</string>
-	<string name="anim_rps_paper">
-		RPS papel
-	</string>
-	<string name="anim_rps_rock">
-		RPS pedra
-	</string>
-	<string name="anim_rps_scissors">
-		RPS tesoura
-	</string>
-	<string name="anim_express_repulsed">
-		Repulsa
-	</string>
-	<string name="anim_kick_roundhouse_r">
-		Chute giratório
-	</string>
-	<string name="anim_express_sad">
-		Triste
-	</string>
-	<string name="anim_salute">
-		Saúde
-	</string>
-	<string name="anim_shout">
-		Gritar
-	</string>
-	<string name="anim_express_shrug">
-		Encolher ombros
-	</string>
-	<string name="anim_express_smile">
-		Sorrir
-	</string>
-	<string name="anim_smoke_idle">
-		Fumar à toa
-	</string>
-	<string name="anim_smoke_inhale">
-		Inalar Fumaça
-	</string>
-	<string name="anim_smoke_throw_down">
-		Expelir Fumaça
-	</string>
-	<string name="anim_express_surprise">
-		Surpresa
-	</string>
-	<string name="anim_sword_strike_r">
-		Golpe de Espada
-	</string>
-	<string name="anim_angry_tantrum">
-		Enraivecer
-	</string>
-	<string name="anim_express_tongue_out">
-		Mostrar a língua
-	</string>
-	<string name="anim_hello">
-		Onda
-	</string>
-	<string name="anim_whisper">
-		Sussurrar
-	</string>
-	<string name="anim_whistle">
-		Assobiar
-	</string>
-	<string name="anim_express_wink">
-		Piscar
-	</string>
-	<string name="anim_wink_hollywood">
-		Piscar (Hollywood)
-	</string>
-	<string name="anim_express_worry">
-		Preocupar-se
-	</string>
-	<string name="anim_yes_happy">
-		Sim (Feliz)
-	</string>
-	<string name="anim_yes_head">
-		Sim
-	</string>
-	<string name="texture_loading">
-		Carregando...
-	</string>
-	<string name="worldmap_offline">
-		Desconectado
-	</string>
-	<string name="whisper">
-		sussurra:
-	</string>
-	<string name="shout">
-		grita:
-	</string>
-</strings>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!-- This file contains strings that used to be hardcoded in the source.
+     It is only for those strings which don&apos;t belong in a floater.
+     For example, the strings used in avatar chat bubbles, and strings 
+     that are returned from one component and may appear in many places-->
+<strings>
+	<string name="LoginInProgress">
+		Fazendo Login. [APP_NAME] pode parecer congelado. Por favor, aguarde.
+	</string>
+	<string name="LoginAuthenticating">
+		Autenticando
+	</string>
+	<string name="LoginMaintenance">
+		Executando manutenção da conta...
+	</string>
+	<string name="LoginAttempt">
+		Falha na tentativa anterior de login. Fazendo Login, tentativa [NUMBER]
+	</string>
+	<string name="LoginPrecaching">
+		Carregando mundo...
+	</string>
+	<string name="LoginInitializingBrowser">
+		Inicializando navegador embutido...
+	</string>
+	<string name="LoginInitializingMultimedia">
+		Inicializando multimídia...
+	</string>
+	<string name="LoginVerifyingCache">
+		Verificando arquivos no cache (pode levar 60-90 segundos)...
+	</string>
+	<string name="LoginProcessingResponse">
+		Processando Resposta...
+	</string>
+	<string name="LoginInitializingWorld">
+		Inicializando Mundo...
+	</string>
+	<string name="LoginDecodingImages">
+		Decodificando imagens...
+	</string>
+	<string name="LoginInitializingQuicktime">
+		Inicializando o QuickTime...
+	</string>
+	<string name="LoginQuicktimeNotFound">
+		O QuickTime não foi encontrado - incapaz de inicializar.
+	</string>
+	<string name="LoginQuicktimeOK">
+		O QuickTime foi inicializado com sucesso.
+	</string>
+	<string name="LoginWaitingForRegionHandshake">
+		Aguardando o handshake com a região...
+	</string>
+	<string name="LoginConnectingToRegion">
+		Conectando à região...
+	</string>
+	<string name="LoginDownloadingClothing">
+		Baixando roupas...
+	</string>
+	<string name="LoginFailedNoNetwork">
+		Erro de Rede: Não foi possível estabelecer uma conexão. Por favor, verifique sua conexão de rede.
+	</string>
+	<string name="AgentLostConnection">
+		Esta região pode estar passando por problemas. Por favor, verifique sua conexão com a internet.
+	</string>
+	<string name="TooltipPerson">
+		Pessoa
+	</string>
+	<string name="TooltipNoName">
+		(sem nome)
+	</string>
+	<string name="TooltipOwner">
+		Proprietário:
+	</string>
+	<string name="TooltipPublic">
+		Público
+	</string>
+	<string name="TooltipIsGroup">
+		(Grupo)
+	</string>
+	<string name="TooltipFlagScript">
+		Script
+	</string>
+	<string name="TooltipFlagPhysics">
+		Física
+	</string>
+	<string name="TooltipFlagTouch">
+		Toque
+	</string>
+	<string name="TooltipFlagL$">
+		L$
+	</string>
+	<string name="TooltipFlagDropInventory">
+		Dar Inventário
+	</string>
+	<string name="TooltipFlagPhantom">
+		Imaterial
+	</string>
+	<string name="TooltipFlagTemporary">
+		Temporário
+	</string>
+	<string name="TooltipFlagRightClickMenu">
+		(Clique com o botão direito para acessar o menu)
+	</string>
+	<string name="TooltipFreeToCopy">
+		Cópia Permitida
+	</string>
+	<string name="TooltipForSaleL$">
+		À venda: L$[AMOUNT]
+	</string>
+	<string name="TooltipForSaleMsg">
+		À venda: [MESSAGE]
+	</string>
+	<string name="TooltipFlagGroupBuild">
+		Construído por Grupo
+	</string>
+	<string name="TooltipFlagNoBuild">
+		Não é Permitido Construir
+	</string>
+	<string name="TooltipFlagNoEdit">
+		Construído por Grupo
+	</string>
+	<string name="TooltipFlagNotSafe">
+		Não é Seguro
+	</string>
+	<string name="TooltipFlagNoFly">
+		Não é Permitido Voar
+	</string>
+	<string name="TooltipFlagGroupScripts">
+		Scripts de Grupo
+	</string>
+	<string name="TooltipFlagNoScripts">
+		Não são Permitidos Scripts
+	</string>
+	<string name="TooltipLand">
+		Terreno:
+	</string>
+	<string name="TooltipMustSingleDrop">
+		Apenas um item único pode ser arrastado para este local
+	</string>
+	<string name="RetrievingData">
+		Buscando...
+	</string>
+	<string name="ReleaseNotes">
+		Notas de Distribuição
+	</string>
+	<string name="LoadingData">
+		Carregando...
+	</string>
+	<string name="AvatarNameNobody">
+		(ninguém)
+	</string>
+	<string name="AvatarNameWaiting">
+		(aguardando)
+	</string>
+	<string name="AvatarNameHippos">
+		(hippos)
+	</string>
+	<string name="GroupNameNone">
+		(nenhum)
+	</string>
+	<string name="AssetErrorNone">
+		Nenhum erro
+	</string>
+	<string name="AssetErrorRequestFailed">
+		Item pedido falhou
+	</string>
+	<string name="AssetErrorNonexistentFile">
+		Item pedido: arquivo inexistente
+	</string>
+	<string name="AssetErrorNotInDatabase">
+		Item pedido: item não encontrado na base de dados.
+	</string>
+	<string name="AssetErrorEOF">
+		Fim do arquivo
+	</string>
+	<string name="AssetErrorCannotOpenFile">
+		Não é possível abrir arquivo
+	</string>
+	<string name="AssetErrorFileNotFound">
+		Arquivo não encontrado
+	</string>
+	<string name="AssetErrorTCPTimeout">
+		Tempo de transferência de arquivo expirado
+	</string>
+	<string name="AssetErrorCircuitGone">
+		Circuito caiu
+	</string>
+	<string name="AssetErrorUnknownStatus">
+		Status desconhecido
+	</string>
+	<string name="AvatarEditingApparance">
+		(Editando Aparência)
+	</string>
+	<string name="AvatarAway">
+		Distante
+	</string>
+	<string name="AvatarBusy">
+		Ocupado
+	</string>
+	<string name="AvatarMuted">
+		Mudo
+	</string>
+	<string name="anim_express_afraid">
+		Temeroso
+	</string>
+	<string name="anim_express_anger">
+		Bravo
+	</string>
+	<string name="anim_away">
+		Distante
+	</string>
+	<string name="anim_backflip">
+		Virar para trás
+	</string>
+	<string name="anim_express_laugh">
+		Rir segurando a barriga
+	</string>
+	<string name="anim_express_toothsmile">
+		Sorriso largo
+	</string>
+	<string name="anim_blowkiss">
+		Mandar beijo
+	</string>
+	<string name="anim_express_bored">
+		Entediado
+	</string>
+	<string name="anim_bow">
+		Saudar curvando
+	</string>
+	<string name="anim_clap">
+		Aplaudir
+	</string>
+	<string name="anim_courtbow">
+		Saudação formal
+	</string>
+	<string name="anim_express_cry">
+		Chorar
+	</string>
+	<string name="anim_dance1">
+		Dança 1
+	</string>
+	<string name="anim_dance2">
+		Dança 2
+	</string>
+	<string name="anim_dance3">
+		Dança 3
+	</string>
+	<string name="anim_dance4">
+		Dança 4
+	</string>
+	<string name="anim_dance5">
+		Dança 5
+	</string>
+	<string name="anim_dance6">
+		Dança 6
+	</string>
+	<string name="anim_dance7">
+		Dança 7
+	</string>
+	<string name="anim_dance8">
+		Dança 8
+	</string>
+	<string name="anim_express_disdain">
+		Desdém
+	</string>
+	<string name="anim_drink">
+		Beber
+	</string>
+	<string name="anim_express_embarrased">
+		Envergonhado
+	</string>
+	<string name="anim_angry_fingerwag">
+		Negar com o dedo.
+	</string>
+	<string name="anim_fist_pump">
+		Vibrar provocando
+	</string>
+	<string name="anim_yoga_float">
+		Levitar Yoga
+	</string>
+	<string name="anim_express_frown">
+		Careta
+	</string>
+	<string name="anim_impatient">
+		Impaciente
+	</string>
+	<string name="anim_jumpforjoy">
+		Pular de Alegria
+	</string>
+	<string name="anim_kissmybutt">
+		Beije meu Bumbum
+	</string>
+	<string name="anim_express_kiss">
+		Beijar
+	</string>
+	<string name="anim_laugh_short">
+		Rir
+	</string>
+	<string name="anim_musclebeach">
+		Exibir músculos
+	</string>
+	<string name="anim_no_unhappy">
+		Não (descontente)
+	</string>
+	<string name="anim_no_head">
+		Não
+	</string>
+	<string name="anim_nyanya">
+		Nya-nya-nya
+	</string>
+	<string name="anim_punch_onetwo">
+		Soco Um-Dois
+	</string>
+	<string name="anim_express_open_mouth">
+		Abrir a boca
+	</string>
+	<string name="anim_peace">
+		Paz
+	</string>
+	<string name="anim_point_you">
+		Apontar para o outro
+	</string>
+	<string name="anim_point_me">
+		Apontar para si
+	</string>
+	<string name="anim_punch_l">
+		Socar Esquerda
+	</string>
+	<string name="anim_punch_r">
+		Socar Direita
+	</string>
+	<string name="anim_rps_countdown">
+		RPS contar
+	</string>
+	<string name="anim_rps_paper">
+		RPS papel
+	</string>
+	<string name="anim_rps_rock">
+		RPS pedra
+	</string>
+	<string name="anim_rps_scissors">
+		RPS tesoura
+	</string>
+	<string name="anim_express_repulsed">
+		Repulsa
+	</string>
+	<string name="anim_kick_roundhouse_r">
+		Chute giratório
+	</string>
+	<string name="anim_express_sad">
+		Triste
+	</string>
+	<string name="anim_salute">
+		Saúde
+	</string>
+	<string name="anim_shout">
+		Gritar
+	</string>
+	<string name="anim_express_shrug">
+		Encolher ombros
+	</string>
+	<string name="anim_express_smile">
+		Sorrir
+	</string>
+	<string name="anim_smoke_idle">
+		Fumar à toa
+	</string>
+	<string name="anim_smoke_inhale">
+		Inalar Fumaça
+	</string>
+	<string name="anim_smoke_throw_down">
+		Expelir Fumaça
+	</string>
+	<string name="anim_express_surprise">
+		Surpresa
+	</string>
+	<string name="anim_sword_strike_r">
+		Golpe de Espada
+	</string>
+	<string name="anim_angry_tantrum">
+		Enraivecer
+	</string>
+	<string name="anim_express_tongue_out">
+		Mostrar a língua
+	</string>
+	<string name="anim_hello">
+		Onda
+	</string>
+	<string name="anim_whisper">
+		Sussurrar
+	</string>
+	<string name="anim_whistle">
+		Assobiar
+	</string>
+	<string name="anim_express_wink">
+		Piscar
+	</string>
+	<string name="anim_wink_hollywood">
+		Piscar (Hollywood)
+	</string>
+	<string name="anim_express_worry">
+		Preocupar-se
+	</string>
+	<string name="anim_yes_happy">
+		Sim (Feliz)
+	</string>
+	<string name="anim_yes_head">
+		Sim
+	</string>
+	<string name="texture_loading">
+		Carregando...
+	</string>
+	<string name="worldmap_offline">
+		Desconectado
+	</string>
+	<string name="whisper">
+		sussurra:
+	</string>
+	<string name="shout">
+		grita:
+	</string>
+</strings>
diff --git a/indra/newview/skins/default/xui/pt/teleport_strings.xml b/indra/newview/skins/default/xui/pt/teleport_strings.xml
index 788a215454..6eecc45bcf 100644
--- a/indra/newview/skins/default/xui/pt/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/pt/teleport_strings.xml
@@ -1,75 +1,75 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<teleport_messages>
-	<message_set name="errors">
-		<message name="invalid_tport">
-			Problema encontrado ao processar seu pedido de Teletransporte. Você pode tentar reiniciar  antes de tentar teletransportar-se. Se você continuar a receber esta mensagem, por favor verifique a FAQ do Suporte Técnico em: 
-www.secondlife.com/support
-		</message>
-		<message name="invalid_region_handoff">
-			Problema encontrado ao processar a passagem de regiões. Você pode tentar reiniciar antes de tentar atravessar regiões novamente. Se você continuar a receber esta mensagem, por favor verifique a FAQ do Suporte Técnico em:
-www.secondlife.com/support
-		</message>
-		<message name="blocked_tport">
-			Desculpe, teletransportes estão atualmente bloqueados. Tente novamente dentro de alguns instantes. Se você continuar com problemas de teletransporte, por favor tente deslogar e relogar para resolver o problema.
-		</message>
-		<message name="nolandmark_tport">
-			Desculpe, mas o sistema não conseguiu localizar a landmark de destino.
-		</message>
-		<message name="timeout_tport">
-			Desculpe, não foi possível para o sistema executar o teletransporte. Tente novamente dentro de alguns instantes.
-		</message>
-		<message name="noaccess_tport">
-			Desculpe, você não tem acesso ao destino deste teletransporte.
-		</message>
-		<message name="missing_attach_tport">
-			Seu anexos ainda não chegaram. Tente esperar por alguns momentos ou deslogar e logar antes de tentar teleransportar-se novamente.
-		</message>
-		<message name="too_many_uploads_tport">
-			Afluxo nesta região é atualmente tão alto que seu pedido de teletransporte não será possível em tempo oportuno. Por favor, tente novamente em alguns minutos ou vá a uma área menos ocupada.
-		</message>
-		<message name="expired_tport">
-			Desculpe, mas o sistema não conseguiu concluir o seu pedido de teletransporte em tempo hábil. Por favor, tente novamente em alguns minutos.
-		</message>
-		<message name="expired_region_handoff">
-			Desculpe, mas o sistema não pôde concluir a sua travessia de região em tempo hábil. Por favor, tente novamente em alguns minutos.
-		</message>
-		<message name="no_host">
-			Não foi possível encontrar o destino do teletransporte. O destino pode estar temporariamente indisponível ou não existir mais. Por favor, tente novamente em poucos minutos.
-		</message>
-		<message name="no_inventory_host">
-			O sistema de inventário está indisponível no momento.
-		</message>
-	</message_set>
-	<message_set name="progress">
-		<message name="sending_dest">
-			Enviando para o destino.
-		</message>
-		<message name="redirecting">
-			Redirecionando para uma localidade diferente.
-		</message>
-		<message name="relaying">
-			Transferindo para o destino.
-		</message>
-		<message name="sending_home">
-			Enviando solicitação de localização da casa.
-		</message>
-		<message name="sending_landmark">
-			Enviando solicitação de localização de landmark.
-		</message>
-		<message name="completing">
-			Completando teletransporte.
-		</message>
-		<message name="resolving">
-			Identificando destino.
-		</message>
-		<message name="contacting">
-			Contactando nova região.
-		</message>
-		<message name="arriving">
-			Chegando...
-		</message>
-		<message name="requesting">
-			Solicitando teletransporte...
-		</message>
-	</message_set>
-</teleport_messages>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<teleport_messages>
+	<message_set name="errors">
+		<message name="invalid_tport">
+			Problema encontrado ao processar seu pedido de Teletransporte. Você pode tentar reiniciar  antes de tentar teletransportar-se. Se você continuar a receber esta mensagem, por favor verifique a FAQ do Suporte Técnico em: 
+www.secondlife.com/support
+		</message>
+		<message name="invalid_region_handoff">
+			Problema encontrado ao processar a passagem de regiões. Você pode tentar reiniciar antes de tentar atravessar regiões novamente. Se você continuar a receber esta mensagem, por favor verifique a FAQ do Suporte Técnico em:
+www.secondlife.com/support
+		</message>
+		<message name="blocked_tport">
+			Desculpe, teletransportes estão atualmente bloqueados. Tente novamente dentro de alguns instantes. Se você continuar com problemas de teletransporte, por favor tente deslogar e relogar para resolver o problema.
+		</message>
+		<message name="nolandmark_tport">
+			Desculpe, mas o sistema não conseguiu localizar a landmark de destino.
+		</message>
+		<message name="timeout_tport">
+			Desculpe, não foi possível para o sistema executar o teletransporte. Tente novamente dentro de alguns instantes.
+		</message>
+		<message name="noaccess_tport">
+			Desculpe, você não tem acesso ao destino deste teletransporte.
+		</message>
+		<message name="missing_attach_tport">
+			Seu anexos ainda não chegaram. Tente esperar por alguns momentos ou deslogar e logar antes de tentar teleransportar-se novamente.
+		</message>
+		<message name="too_many_uploads_tport">
+			Afluxo nesta região é atualmente tão alto que seu pedido de teletransporte não será possível em tempo oportuno. Por favor, tente novamente em alguns minutos ou vá a uma área menos ocupada.
+		</message>
+		<message name="expired_tport">
+			Desculpe, mas o sistema não conseguiu concluir o seu pedido de teletransporte em tempo hábil. Por favor, tente novamente em alguns minutos.
+		</message>
+		<message name="expired_region_handoff">
+			Desculpe, mas o sistema não pôde concluir a sua travessia de região em tempo hábil. Por favor, tente novamente em alguns minutos.
+		</message>
+		<message name="no_host">
+			Não foi possível encontrar o destino do teletransporte. O destino pode estar temporariamente indisponível ou não existir mais. Por favor, tente novamente em poucos minutos.
+		</message>
+		<message name="no_inventory_host">
+			O sistema de inventário está indisponível no momento.
+		</message>
+	</message_set>
+	<message_set name="progress">
+		<message name="sending_dest">
+			Enviando para o destino.
+		</message>
+		<message name="redirecting">
+			Redirecionando para uma localidade diferente.
+		</message>
+		<message name="relaying">
+			Transferindo para o destino.
+		</message>
+		<message name="sending_home">
+			Enviando solicitação de localização da casa.
+		</message>
+		<message name="sending_landmark">
+			Enviando solicitação de localização de landmark.
+		</message>
+		<message name="completing">
+			Completando teletransporte.
+		</message>
+		<message name="resolving">
+			Identificando destino.
+		</message>
+		<message name="contacting">
+			Contactando nova região.
+		</message>
+		<message name="arriving">
+			Chegando...
+		</message>
+		<message name="requesting">
+			Solicitando teletransporte...
+		</message>
+	</message_set>
+</teleport_messages>
diff --git a/indra/newview/skins/default/xui/pt/xui_version.xml b/indra/newview/skins/default/xui/pt/xui_version.xml
index ee2a0be745..0e777751d3 100644
--- a/indra/newview/skins/default/xui/pt/xui_version.xml
+++ b/indra/newview/skins/default/xui/pt/xui_version.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<xui_version>
-	1.0
-</xui_version>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xui_version>
+	1.0
+</xui_version>
diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index fc18f10e7d..42872d85fb 100644
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -3,59 +3,73 @@
  * @brief LLAgentAccess tests
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
  * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
 #include "../test/lltut.h"
 
 #include "../llagentaccess.h"
 
-#include "llcontrolgroupreader.h"
+#include "llcontrol.h"
 #include "indra_constants.h"
 
 #include <iostream>
 
-class LLControlGroupReader_Test : public LLControlGroupReader
+//----------------------------------------------------------------------------
+// Implementation of enough of LLControlGroup to support the tests:
+
+static U32 test_preferred_maturity = SIM_ACCESS_PG;
+
+LLControlGroup::LLControlGroup(const std::string& name)
+	: LLInstanceTracker<LLControlGroup, std::string>(name)
 {
-public:
-	LLControlGroupReader_Test() : test_preferred_maturity(SIM_ACCESS_PG) {}
-	
-	virtual std::string getString(const std::string& name)
-	{
-		return "";
-	}
-	virtual std::string	getText(const std::string& name)
-	{
-		return "";
-	}
-	virtual BOOL getBOOL(const std::string& name)
-	{
-		return false;
-	}
-	virtual S32	getS32(const std::string& name)
-	{
-		return 0;
-	}
-	virtual F32 getF32(const std::string& name)
-	{
-		return 0;
-	}
-	virtual U32	getU32(const std::string& name)
-	{
-		return test_preferred_maturity;
-	}
-	
-	//--------------------------------------
-	// Everything from here down is test code and not part of the interface
-	void setPreferredMaturity(U32 m)
-	{
-		test_preferred_maturity = m;
-	}
-private:
-	U32 test_preferred_maturity;
-	
-};
+}
 
+LLControlGroup::~LLControlGroup()
+{
+}
+
+// Implementation of just the LLControlGroup methods we requre
+BOOL LLControlGroup::declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist)
+{
+	test_preferred_maturity = initial_val;
+	return true;
+}
+
+void LLControlGroup::setU32(const std::string& name, U32 val)
+{
+	test_preferred_maturity = val;
+}
+
+U32 LLControlGroup::getU32(const std::string& name)
+{
+	return test_preferred_maturity;
+}
+//----------------------------------------------------------------------------
+	
 namespace tut
 {
     struct agentaccess
@@ -69,20 +83,21 @@ namespace tut
 	template<> template<>
 	void agentaccess_object_t::test<1>()
 	{
-		LLControlGroupReader_Test cgr;
+		LLControlGroup cgr("test");
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
 		LLAgentAccess aa(cgr);
 		
-		cgr.setPreferredMaturity(SIM_ACCESS_PG);
+		cgr.setU32("PreferredMaturity", SIM_ACCESS_PG);
 		ensure("1 prefersPG",     aa.prefersPG());
 		ensure("1 prefersMature", !aa.prefersMature());
 		ensure("1 prefersAdult",  !aa.prefersAdult());
 		
-		cgr.setPreferredMaturity(SIM_ACCESS_MATURE);
+		cgr.setU32("PreferredMaturity", SIM_ACCESS_MATURE);
 		ensure("2 prefersPG",     !aa.prefersPG());
 		ensure("2 prefersMature", aa.prefersMature());
 		ensure("2 prefersAdult",  !aa.prefersAdult());
 		
-		cgr.setPreferredMaturity(SIM_ACCESS_ADULT);
+		cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
 		ensure("3 prefersPG",     !aa.prefersPG());
 		ensure("3 prefersMature", aa.prefersMature());
 		ensure("3 prefersAdult",  aa.prefersAdult());
@@ -91,7 +106,8 @@ namespace tut
 	template<> template<>
 	void agentaccess_object_t::test<2>()
 	{
-		LLControlGroupReader_Test cgr;
+		LLControlGroup cgr("test");
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
 		LLAgentAccess aa(cgr);
 		
 		// make sure default is PG
@@ -140,7 +156,8 @@ namespace tut
 	template<> template<>
 	void agentaccess_object_t::test<3>()
 	{
-		LLControlGroupReader_Test cgr;
+		LLControlGroup cgr("test");
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
 		LLAgentAccess aa(cgr);
 		
 		ensure("starts normal", !aa.isGodlike());
@@ -163,7 +180,8 @@ namespace tut
 	template<> template<>
 	void agentaccess_object_t::test<4>()
 	{
-		LLControlGroupReader_Test cgr;
+		LLControlGroup cgr("test");
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
 		LLAgentAccess aa(cgr);
 		
 		ensure("1 pg to start", aa.wantsPGOnly());
@@ -188,12 +206,12 @@ namespace tut
 		ensure("2 mature pref pg", !aa.canAccessMature());
 		ensure("3 mature pref pg", !aa.canAccessAdult());
 		
-		cgr.setPreferredMaturity(SIM_ACCESS_MATURE);
+		cgr.setU32("PreferredMaturity", SIM_ACCESS_MATURE);
 		ensure("1 mature", !aa.wantsPGOnly());
 		ensure("2 mature", aa.canAccessMature());
 		ensure("3 mature", !aa.canAccessAdult());
 		
-		cgr.setPreferredMaturity(SIM_ACCESS_PG);
+		cgr.setU32("PreferredMaturity", SIM_ACCESS_PG);
 		ensure("1 mature pref pg", aa.wantsPGOnly());
 		ensure("2 mature pref pg", !aa.canAccessMature());
 		ensure("3 mature pref pg", !aa.canAccessAdult());
@@ -203,14 +221,14 @@ namespace tut
 		ensure("2 adult pref pg", !aa.canAccessMature());
 		ensure("3 adult pref pg", !aa.canAccessAdult());
 
-		cgr.setPreferredMaturity(SIM_ACCESS_ADULT);
+		cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
 		ensure("1 adult", !aa.wantsPGOnly());
 		ensure("2 adult", aa.canAccessMature());
 		ensure("3 adult", aa.canAccessAdult());
 
 		// make sure that even if pref is high, if access is low we block access
 		// this shouldn't occur in real life but we want to be safe
-		cgr.setPreferredMaturity(SIM_ACCESS_ADULT);
+		cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
 		aa.setMaturity('P');
 		ensure("1 pref adult, actual pg", aa.wantsPGOnly());
 		ensure("2 pref adult, actual pg", !aa.canAccessMature());
@@ -221,7 +239,8 @@ namespace tut
 	template<> template<>
 	void agentaccess_object_t::test<5>()
 	{
-		LLControlGroupReader_Test cgr;
+		LLControlGroup cgr("test");
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
 		LLAgentAccess aa(cgr);
 		
 		ensure("1 transition starts false", !aa.isInTransition());
@@ -229,6 +248,20 @@ namespace tut
 		ensure("2 transition now true", aa.isInTransition());
 	}
 
+	template<> template<>
+	void agentaccess_object_t::test<6>()
+	{
+		LLControlGroup cgr("test");
+		cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
+		LLAgentAccess aa(cgr);
+		
+		cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
+		aa.setMaturity('M');
+		ensure("1 preferred maturity pegged to M when maturity is M", cgr.getU32("PreferredMaturity") == SIM_ACCESS_MATURE);
+		
+		aa.setMaturity('P');
+		ensure("1 preferred maturity pegged to P when maturity is P", cgr.getU32("PreferredMaturity") == SIM_ACCESS_PG);
+	}
 }
 
 
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 599882500c..583dba4fd9 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -84,6 +84,7 @@ class ViewerManifest(LLManifest):
                         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)
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index c8682c8ea7..c74ef06636 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -34,6 +34,7 @@ set(test_SOURCE_FILES
     llblowfish_tut.cpp
     llbuffer_tut.cpp
     lldate_tut.cpp
+    lldoubledispatch_tut.cpp
     llerror_tut.cpp
     llhost_tut.cpp
     llhttpdate_tut.cpp
@@ -64,6 +65,7 @@ set(test_SOURCE_FILES
     lltimestampcache_tut.cpp
     lltiming_tut.cpp
     lltranscode_tut.cpp
+    lltreeiterators_tut.cpp
     lltut.cpp
     lluri_tut.cpp
     lluuidhashmap_tut.cpp
@@ -104,7 +106,7 @@ endif (NOT DARWIN)
 set_source_files_properties(${test_HEADER_FILES}
                             PROPERTIES HEADER_FILE_ONLY TRUE)
 
-list(APPEND test_SOURC_FILES ${test_HEADER_FILES})
+list(APPEND test_SOURCE_FILES ${test_HEADER_FILES})
 
 add_executable(test ${test_SOURCE_FILES})
 
@@ -120,6 +122,8 @@ target_link_libraries(test
     ${APRICONV_LIBRARIES}
     ${PTHREAD_LIBRARY}
     ${WINDOWS_LIBRARIES}
+    ${BOOST_PROGRAM_OPTIONS_LIBRARY}
+    ${BOOST_REGEX_LIBRARY}
     ${DL_LIBRARY}
     )
 
diff --git a/indra/test/lldoubledispatch_tut.cpp b/indra/test/lldoubledispatch_tut.cpp
new file mode 100755
index 0000000000..63ef4d4497
--- /dev/null
+++ b/indra/test/lldoubledispatch_tut.cpp
@@ -0,0 +1,245 @@
+/**
+ * @file   lldoubledispatch_tut.cpp
+ * @author Nat Goodspeed
+ * @date   2008-11-13
+ * @brief  Test for lldoubledispatch.h
+ *
+ * This program tests the DoubleDispatch class, using a variation on the example
+ * from Scott Meyers' "More Effective C++", Item 31.
+ *
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * 
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "lldoubledispatch.h"
+// STL headers
+// std headers
+#include <string>
+#include <iostream>
+#include <typeinfo>
+// external library headers
+// other Linden headers
+#include "lltut.h"
+
+
+/*---------------------------- Class hierarchy -----------------------------*/
+// All objects are GameObjects.
+class GameObject
+{
+public:
+    GameObject(const std::string& name): mName(name) {}
+    virtual ~GameObject() {}
+    virtual std::string stringize() { return std::string(typeid(*this).name()) + " " + mName; }
+
+protected:
+    std::string mName;
+};
+
+// SpaceStation, Asteroid and SpaceShip are peer GameObjects.
+struct SpaceStation: public GameObject
+{
+    SpaceStation(const std::string& name): GameObject(name) {}
+    // Only a dummy SpaceStation is constructed without a name
+    SpaceStation(): GameObject("dummy") {}
+};
+
+struct Asteroid: public GameObject
+{
+    Asteroid(const std::string& name): GameObject(name) {}
+    Asteroid(): GameObject("dummy") {}
+};
+
+struct SpaceShip: public GameObject
+{
+    SpaceShip(const std::string& name): GameObject(name) {}
+    SpaceShip(): GameObject("dummy") {}
+};
+
+// SpaceShip is specialized further into CommercialShip and MilitaryShip.
+struct CommercialShip: public SpaceShip
+{
+    CommercialShip(const std::string& name): SpaceShip(name) {}
+    CommercialShip(): SpaceShip("dummy") {}
+};
+
+struct MilitaryShip: public SpaceShip
+{
+    MilitaryShip(const std::string& name): SpaceShip(name) {}
+    MilitaryShip(): SpaceShip("dummy") {}
+};
+
+/*-------------------------- Collision functions ---------------------------*/
+// This mechanism permits us to overcome a limitation of Meyers' approach:  we
+// can declare the parameter types exactly as we want, rather than having to
+// make them all GameObject& parameters.
+std::string shipAsteroid(SpaceShip& ship, Asteroid& rock)
+{
+//  std::cout << rock.stringize() << " has pulverized " << ship.stringize() << std::endl;
+    return "shipAsteroid";
+}
+
+std::string militaryShipAsteroid(MilitaryShip& ship, Asteroid& rock)
+{
+//  std::cout << rock.stringize() << " has severely damaged " << ship.stringize() << std::endl;
+    return "militaryShipAsteroid";
+}
+
+std::string shipStation(SpaceShip& ship, SpaceStation& dock)
+{
+//  std::cout << ship.stringize() << " has docked at " << dock.stringize() << std::endl;
+    return "shipStation";
+}
+
+std::string asteroidStation(Asteroid& rock, SpaceStation& dock)
+{
+//  std::cout << rock.stringize() << " has damaged " << dock.stringize() << std::endl;
+    return "asteroidStation";
+}
+
+/*------------------------------- Test code --------------------------------*/
+namespace tut
+{
+    struct dispatch_data
+    {
+        dispatch_data():
+            home(new SpaceStation("Terra Station")),
+            obstacle(new Asteroid("Ganymede")),
+            tug(new CommercialShip("Pilotfish")),
+            patrol(new MilitaryShip("Enterprise"))
+        {}
+
+        // Instantiate and populate the DoubleDispatch object.
+        typedef LLDoubleDispatch<std::string, GameObject> DD;
+        DD dispatcher;
+
+        // Instantiate a few GameObjects.  Make sure we refer to them
+        // polymorphically, and don't let them leak.
+        std::auto_ptr<GameObject> home;
+        std::auto_ptr<GameObject> obstacle;
+        std::auto_ptr<GameObject> tug;
+        std::auto_ptr<GameObject> patrol;
+
+        // prototype objects
+        Asteroid dummyAsteroid;
+        SpaceShip dummyShip;
+        MilitaryShip dummyMilitary;
+        CommercialShip dummyCommercial;
+        SpaceStation dummyStation;
+    };
+    typedef test_group<dispatch_data> dispatch_group;
+    typedef dispatch_group::object dispatch_object;
+    tut::dispatch_group ddgr("double dispatch");
+
+    template<> template<>
+    void dispatch_object::test<1>()
+    {
+        // Describe param types using explicit DD::Type objects
+        // (order-sensitive add() variant)
+        dispatcher.add(DD::Type<SpaceShip>(), DD::Type<Asteroid>(), shipAsteroid, true);
+        // naive adding, won't work
+        dispatcher.add(DD::Type<MilitaryShip>(), DD::Type<Asteroid>(), militaryShipAsteroid, true);
+        dispatcher.add(DD::Type<SpaceShip>(), DD::Type<SpaceStation>(), shipStation, true);
+        dispatcher.add(DD::Type<Asteroid>(), DD::Type<SpaceStation>(), asteroidStation, true);
+
+        // Try colliding them.
+        ensure_equals(dispatcher(*home, *tug),        // reverse params, SpaceShip subclass
+                      "shipStation");
+        ensure_equals(dispatcher(*patrol, *home),     // forward params, SpaceShip subclass
+                      "shipStation");
+        ensure_equals(dispatcher(*obstacle, *home),   // forward params
+                      "asteroidStation");
+        ensure_equals(dispatcher(*home, *obstacle),   // reverse params
+                      "asteroidStation");
+        ensure_equals(dispatcher(*tug, *obstacle),    // forward params, SpaceShip subclass
+                      "shipAsteroid");
+        ensure_equals(dispatcher(*obstacle, *patrol), // reverse params, SpaceShip subclass
+                      // won't use militaryShipAsteroid() because it was added
+                      // in wrong order
+                      "shipAsteroid");
+    }
+
+    template<> template<>
+    void dispatch_object::test<2>()
+    {
+        // Describe param types using explicit DD::Type objects
+        // (order-sensitive add() variant)
+        // adding in correct order
+        dispatcher.add(DD::Type<MilitaryShip>(), DD::Type<Asteroid>(), militaryShipAsteroid, true);
+        dispatcher.add(DD::Type<SpaceShip>(), DD::Type<Asteroid>(), shipAsteroid, true);
+        dispatcher.add(DD::Type<SpaceShip>(), DD::Type<SpaceStation>(), shipStation, true);
+        dispatcher.add(DD::Type<Asteroid>(), DD::Type<SpaceStation>(), asteroidStation, true);
+        
+        ensure_equals(dispatcher(*patrol, *obstacle), "militaryShipAsteroid");
+        ensure_equals(dispatcher(*tug, *obstacle), "shipAsteroid");
+    }
+
+    template<> template<>
+    void dispatch_object::test<3>()
+    {
+        // Describe param types with actual prototype instances
+        // (order-insensitive add() variant)
+        dispatcher.add(dummyMilitary, dummyAsteroid, militaryShipAsteroid);
+        dispatcher.add(dummyShip, dummyAsteroid, shipAsteroid);
+        dispatcher.add(dummyShip, dummyStation, shipStation);
+        dispatcher.add(dummyAsteroid, dummyStation, asteroidStation);
+
+        ensure_equals(dispatcher(*patrol, *obstacle), "militaryShipAsteroid");
+        ensure_equals(dispatcher(*tug, *obstacle), "shipAsteroid");
+        ensure_equals(dispatcher(*obstacle, *patrol), "");
+    }
+
+    template<> template<>
+    void dispatch_object::test<4>()
+    {
+        // Describe param types with actual prototype instances
+        // (order-insensitive add() variant)
+        dispatcher.add(dummyShip, dummyAsteroid, shipAsteroid);
+        // Even if we add the militaryShipAsteroid in the wrong order, it
+        // should still work.
+        dispatcher.add(dummyMilitary, dummyAsteroid, militaryShipAsteroid);
+        dispatcher.add(dummyShip, dummyStation, shipStation);
+        dispatcher.add(dummyAsteroid, dummyStation, asteroidStation);
+
+        ensure_equals(dispatcher(*patrol, *obstacle), "militaryShipAsteroid");
+        ensure_equals(dispatcher(*tug, *obstacle), "shipAsteroid");
+    }
+
+    template<> template<>
+    void dispatch_object::test<5>()
+    {
+        dispatcher.add<SpaceShip, Asteroid>(shipAsteroid);
+        dispatcher.add<MilitaryShip, Asteroid>(militaryShipAsteroid);
+        dispatcher.add<SpaceShip, SpaceStation>(shipStation);
+        dispatcher.add<Asteroid, SpaceStation>(asteroidStation);
+
+        ensure_equals(dispatcher(*patrol, *obstacle), "militaryShipAsteroid");
+        ensure_equals(dispatcher(*tug, *obstacle), "shipAsteroid");
+    }
+} // namespace tut
diff --git a/indra/test/llpermissions_tut.cpp b/indra/test/llpermissions_tut.cpp
index 9dbb9642dd..4eadc64b5a 100644
--- a/indra/test/llpermissions_tut.cpp
+++ b/indra/test/llpermissions_tut.cpp
@@ -485,15 +485,8 @@ namespace tut
 	template<> template<>
 	void permission_object_t::test<22>()
 	{
-		LLPermissions perm,perm1;
-		LLUUID creator("abf0d56b-82e5-47a2-a8ad-74741bb2c29e");	
-		LLUUID owner("68edcf47-ccd7-45b8-9f90-1649d7f12806"); 
-		LLUUID lastOwner("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); 
-		LLUUID group("9c8eca51-53d5-42a7-bb58-cef070395db8");		
-		perm.init(creator,owner,lastOwner,group);
-		LLXMLNode* xml_node = perm.exportFileXML();
-		perm1.importXML(xml_node);
-		ensure("exportFileXML()/importXML():failed to export and import the data ", perm1 == perm);	
+		// Deleted LLPermissions::exportFileXML() and LLPermissions::importXML()
+		// because I can't find any non-test code references to it. 2009-05-04 JC
 	}
 
 	template<> template<>
diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp
index 7f8219cdc8..fa5e047513 100644
--- a/indra/test/llsaleinfo_tut.cpp
+++ b/indra/test/llsaleinfo_tut.cpp
@@ -167,19 +167,8 @@ namespace tut
 	template<> template<>
 	void llsaleinfo_test_t::test<4>()
 	{
-// LLXMLNode is teh suck.
-#if 0		
-		S32 sale_price = 23445;
-		LLSaleInfo saleinfo(LLSaleInfo::FS_CONTENTS, sale_price);
-		
-		LLXMLNode* x_node = saleinfo.exportFileXML();
-
-		LLSaleInfo saleinfo1(LLSaleInfo::FS_NOT, 0);
-		
-		saleinfo1.importXML(x_node);
-		ensure_equals("1.importXML() fn failed", saleinfo.getSalePrice(), saleinfo1.getSalePrice());
-		ensure_equals("2.importXML() fn failed", saleinfo.getSaleType(), saleinfo1.getSaleType());
-#endif
+		// Deleted LLSaleInfo::exportFileXML() and LLSaleInfo::importXML()
+		// because I can't find any non-test code references to it. 2009-05-04 JC
 	}
 
 	template<> template<>
diff --git a/indra/test/llscriptresource_tut.cpp b/indra/test/llscriptresource_tut.cpp
index e384c275a3..705fdd16ae 100644
--- a/indra/test/llscriptresource_tut.cpp
+++ b/indra/test/llscriptresource_tut.cpp
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2006-2007, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/test/lltimestampcache_tut.cpp b/indra/test/lltimestampcache_tut.cpp
index 9e0de0fe60..3b102a3366 100644
--- a/indra/test/lltimestampcache_tut.cpp
+++ b/indra/test/lltimestampcache_tut.cpp
@@ -5,7 +5,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -13,12 +13,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/test/lltranscode_tut.cpp b/indra/test/lltranscode_tut.cpp
index 8abf9dc224..eb21979db0 100644
--- a/indra/test/lltranscode_tut.cpp
+++ b/indra/test/lltranscode_tut.cpp
@@ -4,7 +4,7 @@
  *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  * 
- * Copyright (c) 2006-2007, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
  * 
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
diff --git a/indra/test/test.h b/indra/test/test.h
index 16ec4effcf..cee185140c 100644
--- a/indra/test/test.h
+++ b/indra/test/test.h
@@ -13,12 +13,13 @@
  * ("GPL"), unless you have obtained a separate licensing agreement
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  * 
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  * 
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
-- 
cgit v1.2.3


From 65d90e0e8b6a3702f799910eee11a9421e269d3a Mon Sep 17 00:00:00 2001
From: Steven Bennetts <steve@lindenlab.com>
Date: Fri, 8 May 2009 07:49:43 +0000
Subject: Replaced combo_item with combo_box.item and converted contents labels
 into label attributes for all translations.

---
 .../skins/default/xui/da/floater_about_land.xml    |  68 ++----
 .../default/xui/da/floater_animation_preview.xml   | 148 ++++---------
 .../skins/default/xui/da/floater_buy_land.xml      |  12 +-
 .../default/xui/da/floater_hardware_settings.xml   |  20 +-
 .../skins/default/xui/da/floater_image_preview.xml |  40 +---
 .../skins/default/xui/da/floater_report_abuse.xml  | 144 +++---------
 .../skins/default/xui/da/floater_sell_land.xml     |  12 +-
 .../default/xui/da/floater_settings_debug.xml      |   8 +-
 .../skins/default/xui/da/floater_snapshot.xml      |  96 ++------
 .../newview/skins/default/xui/da/floater_tools.xml | 244 ++++++---------------
 .../skins/default/xui/da/floater_world_map.xml     |   8 +-
 indra/newview/skins/default/xui/da/panel_login.xml |  12 +-
 .../default/xui/da/panel_preferences_general.xml   |  72 ++----
 .../default/xui/da/panel_preferences_graphics1.xml |  36 +--
 .../skins/default/xui/de/floater_about_land.xml    |  68 ++----
 .../default/xui/de/floater_animation_preview.xml   | 148 ++++---------
 .../skins/default/xui/de/floater_buy_land.xml      |  12 +-
 .../skins/default/xui/de/floater_god_tools.xml     |  24 +-
 .../default/xui/de/floater_hardware_settings.xml   |  20 +-
 .../skins/default/xui/de/floater_image_preview.xml |  40 +---
 .../skins/default/xui/de/floater_report_abuse.xml  | 144 +++---------
 .../skins/default/xui/de/floater_sell_land.xml     |  12 +-
 .../default/xui/de/floater_settings_debug.xml      |   8 +-
 .../skins/default/xui/de/floater_snapshot.xml      |  96 ++------
 .../newview/skins/default/xui/de/floater_tools.xml | 244 ++++++---------------
 .../skins/default/xui/de/floater_world_map.xml     |   8 +-
 indra/newview/skins/default/xui/de/panel_login.xml |  12 +-
 .../default/xui/de/panel_preferences_graphics1.xml |  36 +--
 .../skins/default/xui/es/floater_about_land.xml    |  68 ++----
 .../default/xui/es/floater_animation_preview.xml   | 148 ++++---------
 .../skins/default/xui/es/floater_buy_land.xml      |  12 +-
 .../skins/default/xui/es/floater_god_tools.xml     |  24 +-
 .../default/xui/es/floater_hardware_settings.xml   |  20 +-
 .../skins/default/xui/es/floater_image_preview.xml |  40 +---
 .../skins/default/xui/es/floater_report_abuse.xml  | 144 +++---------
 .../skins/default/xui/es/floater_sell_land.xml     |  12 +-
 .../default/xui/es/floater_settings_debug.xml      |   8 +-
 .../skins/default/xui/es/floater_snapshot.xml      |  96 ++------
 .../newview/skins/default/xui/es/floater_tools.xml | 244 ++++++---------------
 .../skins/default/xui/es/floater_world_map.xml     |   8 +-
 indra/newview/skins/default/xui/es/panel_login.xml |  12 +-
 .../default/xui/es/panel_preferences_general.xml   |  72 ++----
 .../default/xui/es/panel_preferences_graphics1.xml |  36 +--
 .../skins/default/xui/fr/floater_about_land.xml    |  68 ++----
 .../default/xui/fr/floater_animation_preview.xml   | 148 ++++---------
 .../skins/default/xui/fr/floater_auction.xml       |   8 +-
 .../skins/default/xui/fr/floater_buy_land.xml      |  12 +-
 .../skins/default/xui/fr/floater_god_tools.xml     |  24 +-
 .../default/xui/fr/floater_hardware_settings.xml   |  20 +-
 .../skins/default/xui/fr/floater_image_preview.xml |  40 +---
 .../skins/default/xui/fr/floater_report_abuse.xml  | 144 +++---------
 .../skins/default/xui/fr/floater_sell_land.xml     |  12 +-
 .../default/xui/fr/floater_settings_debug.xml      |   8 +-
 .../skins/default/xui/fr/floater_snapshot.xml      |  96 ++------
 .../newview/skins/default/xui/fr/floater_tools.xml | 232 +++++---------------
 .../skins/default/xui/fr/floater_world_map.xml     |   8 +-
 indra/newview/skins/default/xui/fr/panel_login.xml |  16 +-
 .../default/xui/fr/panel_preferences_general.xml   |  80 ++-----
 .../default/xui/fr/panel_preferences_graphics1.xml |  36 +--
 .../skins/default/xui/it/floater_about_land.xml    |  68 ++----
 .../default/xui/it/floater_animation_preview.xml   | 148 ++++---------
 .../skins/default/xui/it/floater_buy_land.xml      |  12 +-
 .../default/xui/it/floater_hardware_settings.xml   |  20 +-
 .../skins/default/xui/it/floater_image_preview.xml |  40 +---
 .../skins/default/xui/it/floater_report_abuse.xml  | 144 +++---------
 .../skins/default/xui/it/floater_sell_land.xml     |  12 +-
 .../default/xui/it/floater_settings_debug.xml      |   8 +-
 .../skins/default/xui/it/floater_snapshot.xml      |  96 ++------
 .../newview/skins/default/xui/it/floater_tools.xml | 244 ++++++---------------
 .../skins/default/xui/it/floater_world_map.xml     |   8 +-
 indra/newview/skins/default/xui/it/panel_login.xml |  12 +-
 .../default/xui/it/panel_preferences_general.xml   |  72 ++----
 .../default/xui/it/panel_preferences_graphics1.xml |  36 +--
 .../skins/default/xui/ja/floater_about_land.xml    |  68 ++----
 .../default/xui/ja/floater_animation_preview.xml   | 148 ++++---------
 .../skins/default/xui/ja/floater_buy_land.xml      |  12 +-
 .../skins/default/xui/ja/floater_god_tools.xml     |  24 +-
 .../default/xui/ja/floater_hardware_settings.xml   |  20 +-
 .../skins/default/xui/ja/floater_image_preview.xml |  40 +---
 .../skins/default/xui/ja/floater_report_abuse.xml  | 144 +++---------
 .../skins/default/xui/ja/floater_sell_land.xml     |  12 +-
 .../default/xui/ja/floater_settings_debug.xml      |   8 +-
 .../skins/default/xui/ja/floater_snapshot.xml      |  96 ++------
 .../newview/skins/default/xui/ja/floater_tools.xml | 232 +++++---------------
 .../skins/default/xui/ja/floater_world_map.xml     |   8 +-
 indra/newview/skins/default/xui/ja/panel_login.xml |  12 +-
 .../default/xui/ja/panel_preferences_general.xml   |  80 ++-----
 .../default/xui/ja/panel_preferences_graphics1.xml |  36 +--
 .../skins/default/xui/nl/floater_about_land.xml    |  68 ++----
 .../skins/default/xui/nl/floater_buy_land.xml      |  12 +-
 .../skins/default/xui/nl/floater_report_abuse.xml  | 144 +++---------
 .../skins/default/xui/nl/floater_sell_land.xml     |  12 +-
 .../skins/default/xui/nl/floater_snapshot.xml      |  96 ++------
 .../newview/skins/default/xui/nl/floater_tools.xml | 244 ++++++---------------
 .../skins/default/xui/nl/floater_world_map.xml     |   8 +-
 indra/newview/skins/default/xui/nl/panel_login.xml |  12 +-
 .../skins/default/xui/pl/floater_about_land.xml    |  68 ++----
 .../default/xui/pl/floater_animation_preview.xml   | 148 ++++---------
 .../skins/default/xui/pl/floater_buy_land.xml      |  12 +-
 .../skins/default/xui/pl/floater_god_tools.xml     |  24 +-
 .../default/xui/pl/floater_hardware_settings.xml   |  20 +-
 .../skins/default/xui/pl/floater_image_preview.xml |  40 +---
 .../skins/default/xui/pl/floater_report_abuse.xml  | 144 +++---------
 .../skins/default/xui/pl/floater_sell_land.xml     |  12 +-
 .../default/xui/pl/floater_settings_debug.xml      |   8 +-
 .../skins/default/xui/pl/floater_snapshot.xml      |  96 ++------
 .../newview/skins/default/xui/pl/floater_tools.xml | 244 ++++++---------------
 .../skins/default/xui/pl/floater_world_map.xml     |   8 +-
 indra/newview/skins/default/xui/pl/panel_login.xml |  12 +-
 .../default/xui/pl/panel_preferences_graphics1.xml |  36 +--
 .../skins/default/xui/pt/floater_about_land.xml    |  68 ++----
 .../default/xui/pt/floater_animation_preview.xml   | 148 ++++---------
 .../skins/default/xui/pt/floater_buy_land.xml      |  12 +-
 .../skins/default/xui/pt/floater_god_tools.xml     |  24 +-
 .../default/xui/pt/floater_hardware_settings.xml   |  20 +-
 .../skins/default/xui/pt/floater_image_preview.xml |  40 +---
 .../skins/default/xui/pt/floater_report_abuse.xml  | 144 +++---------
 .../skins/default/xui/pt/floater_sell_land.xml     |  12 +-
 .../default/xui/pt/floater_settings_debug.xml      |   8 +-
 .../skins/default/xui/pt/floater_snapshot.xml      |  96 ++------
 .../newview/skins/default/xui/pt/floater_tools.xml | 244 ++++++---------------
 .../skins/default/xui/pt/floater_world_map.xml     |   8 +-
 indra/newview/skins/default/xui/pt/panel_login.xml |  12 +-
 .../default/xui/pt/panel_preferences_general.xml   |  72 ++----
 .../default/xui/pt/panel_preferences_graphics1.xml |  36 +--
 125 files changed, 1990 insertions(+), 5970 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/skins/default/xui/da/floater_about_land.xml b/indra/newview/skins/default/xui/da/floater_about_land.xml
index 70f7690d42..355e8a1d75 100644
--- a/indra/newview/skins/default/xui/da/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/da/floater_about_land.xml
@@ -271,42 +271,18 @@ Gå til &apos;Verden&apos; &gt; &apos;Om land&apos; eller vælg en anden parcel
 			<check_box label="Vis sted i søgning (L$30/uge) i kategorien:" name="ShowDirectoryCheck"
 			     tool_tip="Lad dit parcel blive vist i søge resultaterne" />
 			<combo_box name="land category">
-				<combo_box.item name="AnyCategory">
-					Alle kategorier
-				</combo_box.item>
-				<combo_box.item name="LindenLocation">
-					Linden Location
-				</combo_box.item>
-				<combo_box.item name="Arts&amp;Culture">
-					Kunst &amp; kultur
-				</combo_box.item>
-				<combo_box.item name="Business">
-					Business
-				</combo_box.item>
-				<combo_box.item name="Educational">
-					Uddannelse
-				</combo_box.item>
-				<combo_box.item name="Gaming">
-					Spil
-				</combo_box.item>
-				<combo_box.item name="Hangout">
-					Afslapning
-				</combo_box.item>
-				<combo_box.item name="NewcomerFriendly">
-					Nybegynder venligt
-				</combo_box.item>
-				<combo_box.item name="Parks&amp;Nature">
-					Parker &amp; natur
-				</combo_box.item>
-				<combo_box.item name="Residential">
-					Beboelse
-				</combo_box.item>
-				<combo_box.item name="Shopping">
-					Indkøb
-				</combo_box.item>
-				<combo_box.item name="Other">
-					Andet
-				</combo_box.item>
+				<combo_box.item name="AnyCategory" label="Alle kategorier" />
+				<combo_box.item name="LindenLocation" label="Linden Location" />
+				<combo_box.item name="Arts&amp;Culture" label="Kunst &amp; kultur" />
+				<combo_box.item name="Business" label="Business" />
+				<combo_box.item name="Educational" label="Uddannelse" />
+				<combo_box.item name="Gaming" label="Spil" />
+				<combo_box.item name="Hangout" label="Afslapning" />
+				<combo_box.item name="NewcomerFriendly" label="Nybegynder venligt" />
+				<combo_box.item name="Parks&amp;Nature" label="Parker &amp; natur" />
+				<combo_box.item name="Residential" label="Beboelse" />
+				<combo_box.item name="Shopping" label="Indkøb" />
+				<combo_box.item name="Other" label="Andet" />
 			</combo_box>
 			<button label="?" label_selected="?" name="?" />
 			<check_box name="MatureCheck" />
@@ -328,15 +304,9 @@ Gå til &apos;Verden&apos; &gt; &apos;Om land&apos; eller vælg en anden parcel
 				Teleport valg:
 			</text>
 			<combo_box name="landing type" tool_tip="Vælg hvordan du vil håndtere teleporteringer til dit land.">
-				<combo_box.item length="1" name="Blocked" type="string">
-					Blokeret
-				</combo_box.item>
-				<combo_box.item length="1" name="LandingPoint" type="string">
-					Landingspunkt
-				</combo_box.item>
-				<combo_box.item length="1" name="Anywhere" type="string">
-					Hvor som helst
-				</combo_box.item>
+				<combo_box.item length="1" name="Blocked" type="string" label="Blokeret" />
+				<combo_box.item length="1" name="LandingPoint" type="string" label="Landingspunkt" />
+				<combo_box.item length="1" name="Anywhere" type="string" label="Hvor som helst" />
 			</combo_box>
 			<string name="push_restrict_text">
 				Skub forbudt
@@ -432,12 +402,8 @@ web-siden, efter du klikker på play knappen.)
 			<check_box label="Sælg adgang til:" name="PassCheck"
 			     tool_tip="Tillader midlertidig adgang til denne parcel" />
 			<combo_box name="pass_combo">
-				<combo_box.item name="Anyone">
-					Alle
-				</combo_box.item>
-				<combo_box.item name="Group">
-					Gruppe
-				</combo_box.item>
+				<combo_box.item name="Anyone" label="Alle" />
+				<combo_box.item name="Group" label="Gruppe" />
 			</combo_box>
 			<spinner label="Pris i L$:" name="PriceSpin" />
 			<spinner label="Timers adgang:" name="HoursSpin" />
diff --git a/indra/newview/skins/default/xui/da/floater_animation_preview.xml b/indra/newview/skins/default/xui/da/floater_animation_preview.xml
index 45fa6ca78f..e60292636d 100644
--- a/indra/newview/skins/default/xui/da/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/da/floater_animation_preview.xml
@@ -18,129 +18,55 @@
 	</text>
 	<combo_box label="" name="hand_pose_combo"
 	     tool_tip="Kontrollerer hvad hænderne går i løbet af animationen.">
-		<combo_box.item name="Spread">
-			Spredt
-		</combo_box.item>
-		<combo_box.item name="Relaxed">
-			Afslappet
-		</combo_box.item>
-		<combo_box.item name="PointBoth">
-			Peg begge
-		</combo_box.item>
-		<combo_box.item name="Fist">
-			Knytnæver
-		</combo_box.item>
-		<combo_box.item name="RelaxedLeft">
-			Afslappet venstre
-		</combo_box.item>
-		<combo_box.item name="PointLeft">
-			Peg venstre
-		</combo_box.item>
-		<combo_box.item name="FistLeft">
-			Knytnæve venstre
-		</combo_box.item>
-		<combo_box.item name="RelaxedRight">
-			Afslappet højre
-		</combo_box.item>
-		<combo_box.item name="PointRight">
-			Peg højre
-		</combo_box.item>
-		<combo_box.item name="FistRight">
-			Knytnæve højre
-		</combo_box.item>
-		<combo_box.item name="SaluteRight">
-			Honnør højre
-		</combo_box.item>
-		<combo_box.item name="Typing">
-			Skriver
-		</combo_box.item>
-		<combo_box.item name="PeaceRight">
-			Fredstegn højre
-		</combo_box.item>
+		<combo_box.item name="Spread" label="Spredt" />
+		<combo_box.item name="Relaxed" label="Afslappet" />
+		<combo_box.item name="PointBoth" label="Peg begge" />
+		<combo_box.item name="Fist" label="Knytnæver" />
+		<combo_box.item name="RelaxedLeft" label="Afslappet venstre" />
+		<combo_box.item name="PointLeft" label="Peg venstre" />
+		<combo_box.item name="FistLeft" label="Knytnæve venstre" />
+		<combo_box.item name="RelaxedRight" label="Afslappet højre" />
+		<combo_box.item name="PointRight" label="Peg højre" />
+		<combo_box.item name="FistRight" label="Knytnæve højre" />
+		<combo_box.item name="SaluteRight" label="Honnør højre" />
+		<combo_box.item name="Typing" label="Skriver" />
+		<combo_box.item name="PeaceRight" label="Fredstegn højre" />
 	</combo_box>
 	<text name="emote_label">
 		Ansigtsudtryk
 	</text>
 	<combo_box label="" name="emote_combo"
 	     tool_tip="Angiver hvad ansigtet gør under animationen">
-		<combo_box.item name="[None]">
-			[Intet]
-		</combo_box.item>
-		<combo_box.item name="Aaaaah">
-			Aaaaah
-		</combo_box.item>
-		<combo_box.item name="Afraid">
-			Bange
-		</combo_box.item>
-		<combo_box.item name="Angry">
-			Vred
-		</combo_box.item>
-		<combo_box.item name="BigSmile">
-			Stort smil
-		</combo_box.item>
-		<combo_box.item name="Bored">
-			Keder sig
-		</combo_box.item>
-		<combo_box.item name="Cry">
-			Græder
-		</combo_box.item>
-		<combo_box.item name="Disdain">
-			Forarget
-		</combo_box.item>
-		<combo_box.item name="Embarrassed">
-			Flov
-		</combo_box.item>
-		<combo_box.item name="Frown">
-			Skuler
-		</combo_box.item>
-		<combo_box.item name="Kiss">
-			Kysser
-		</combo_box.item>
-		<combo_box.item name="Laugh">
-			Griner
-		</combo_box.item>
-		<combo_box.item name="Plllppt">
-			Plllppt
-		</combo_box.item>
-		<combo_box.item name="Repulsed">
-			Frastødt
-		</combo_box.item>
-		<combo_box.item name="Sad">
-			Ked af det
-		</combo_box.item>
-		<combo_box.item name="Shrug">
-			Skuldertræk
-		</combo_box.item>
-		<combo_box.item name="Smile">
-			Smiler
-		</combo_box.item>
-		<combo_box.item name="Surprise">
-			Overrasket
-		</combo_box.item>
-		<combo_box.item name="Wink">
-			Blinker
-		</combo_box.item>
-		<combo_box.item name="Worry">
-			Bekymret
-		</combo_box.item>
+		<combo_box.item name="[None]" label="Intet]" />
+		<combo_box.item name="Aaaaah" label="Aaaaah" />
+		<combo_box.item name="Afraid" label="Bange" />
+		<combo_box.item name="Angry" label="Vred" />
+		<combo_box.item name="BigSmile" label="Stort smil" />
+		<combo_box.item name="Bored" label="Keder sig" />
+		<combo_box.item name="Cry" label="Græder" />
+		<combo_box.item name="Disdain" label="Forarget" />
+		<combo_box.item name="Embarrassed" label="Flov" />
+		<combo_box.item name="Frown" label="Skuler" />
+		<combo_box.item name="Kiss" label="Kysser" />
+		<combo_box.item name="Laugh" label="Griner" />
+		<combo_box.item name="Plllppt" label="Plllppt" />
+		<combo_box.item name="Repulsed" label="Frastødt" />
+		<combo_box.item name="Sad" label="Ked af det" />
+		<combo_box.item name="Shrug" label="Skuldertræk" />
+		<combo_box.item name="Smile" label="Smiler" />
+		<combo_box.item name="Surprise" label="Overrasket" />
+		<combo_box.item name="Wink" label="Blinker" />
+		<combo_box.item name="Worry" label="Bekymret" />
 	</combo_box>
 	<text name="preview_label">
 		Vis mens
 	</text>
 	<combo_box label="" name="preview_base_anim"
 	     tool_tip="Se hvordan animation ser ud i forskellige typiske avatar-situationer.">
-		<combo_box.item name="Standing">
-			Står
-		</combo_box.item>
-		<combo_box.item name="Walking">
-			Går
-		</combo_box.item>
-		<combo_box.item name="Sitting">
-			Sidder
-		</combo_box.item>
-		<combo_box.item name="Flying">
-			Flyver
-		</combo_box.item>
+		<combo_box.item name="Standing" label="Står" />
+		<combo_box.item name="Walking" label="Går" />
+		<combo_box.item name="Sitting" label="Sidder" />
+		<combo_box.item name="Flying" label="Flyver" />
 	</combo_box>
 	<spinner label="start (sec)" name="ease_in_time"
 	     tool_tip="Tid i sekunder animationen bruger på at komme i gang." />
diff --git a/indra/newview/skins/default/xui/da/floater_buy_land.xml b/indra/newview/skins/default/xui/da/floater_buy_land.xml
index 6eef76023f..2c5411e26b 100644
--- a/indra/newview/skins/default/xui/da/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/da/floater_buy_land.xml
@@ -66,15 +66,9 @@
 		Kun premium medlemmer kan eje land.
 	</text>
 	<combo_box name="account_level">
-		<combo_box.item name="US$9.95/month,billedmonthly">
-			US$9.95/md, månedlig afregning
-		</combo_box.item>
-		<combo_box.item name="US$7.50/month,billedquarterly">
-			US$7.50/md, kvartalsvis afregning
-		</combo_box.item>
-		<combo_box.item name="US$6.00/month,billedannually">
-			US$6.00/md, årlig afregning
-		</combo_box.item>
+		<combo_box.item name="US$9.95/month,billedmonthly" label="US$9.95/md, månedlig afregning" />
+		<combo_box.item name="US$7.50/month,billedquarterly" label="US$7.50/md, kvartalsvis afregning" />
+		<combo_box.item name="US$6.00/month,billedannually" label="US$6.00/md, årlig afregning" />
 	</combo_box>
 	<text name="land_use_action">
 		Forøg dine månedlige arealanvendelse gebyrer til US $ 40/måned.
diff --git a/indra/newview/skins/default/xui/da/floater_hardware_settings.xml b/indra/newview/skins/default/xui/da/floater_hardware_settings.xml
index c25321d32d..41688ec4f9 100644
--- a/indra/newview/skins/default/xui/da/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/da/floater_hardware_settings.xml
@@ -8,21 +8,11 @@
 		Antialiasing:
 	</text>
 	<combo_box label="Antialiasing" name="fsaa">
-		<combo_item name="FSAADisabled">
-			Slået fra
-		</combo_item>
-		<combo_item name="2x">
-			2x
-		</combo_item>
-		<combo_item name="4x">
-			4x
-		</combo_item>
-		<combo_item name="8x">
-			8x
-		</combo_item>
-		<combo_item name="16x">
-			16x
-		</combo_item>
+		<combo_box.item name="FSAADisabled" label="Slået fra"/>
+		<combo_box.item name="2x" label="2x"/>
+		<combo_box.item name="4x" label="4x"/>
+		<combo_box.item name="8x" label="8x"/>
+		<combo_box.item name="16x" label="16x"/>
 	</combo_box>
 	<spinner label="Gamma:" name="gamma" />
 	<text type="string" length="1" name="(brightness, lower is brighter)">
diff --git a/indra/newview/skins/default/xui/da/floater_image_preview.xml b/indra/newview/skins/default/xui/da/floater_image_preview.xml
index eea9e67685..23218052fc 100644
--- a/indra/newview/skins/default/xui/da/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/da/floater_image_preview.xml
@@ -10,36 +10,16 @@
 		Se billede som:
 	</text>
 	<combo_box label="Tøj type" name="clothing_type_combo">
-		<combo_item name="Image">
-			Billede
-		</combo_item>
-		<combo_item name="Hair">
-			Hår
-		</combo_item>
-		<combo_item name="FemaleHead">
-			Kvinde - hoved
-		</combo_item>
-		<combo_item name="FemaleUpperBody">
-			Kvinde - overkrop
-		</combo_item>
-		<combo_item name="FemaleLowerBody">
-			Kvinde - underkrop
-		</combo_item>
-		<combo_item name="MaleHead">
-			Mand - hoved
-		</combo_item>
-		<combo_item name="MaleUpperBody">
-			Mand - overkrop
-		</combo_item>
-		<combo_item name="MaleLowerBody">
-			Mand - underkrop
-		</combo_item>
-		<combo_item name="Skirt">
-			Nederdel
-		</combo_item>
-		<combo_item name="SculptedPrim">
-			Sculpted prim
-		</combo_item>
+		<combo_box.item name="Image" label="Billede"/>
+		<combo_box.item name="Hair" label="Hår"/>
+		<combo_box.item name="FemaleHead" label="Kvinde - hoved"/>
+		<combo_box.item name="FemaleUpperBody" label="Kvinde - overkrop"/>
+		<combo_box.item name="FemaleLowerBody" label="Kvinde - underkrop"/>
+		<combo_box.item name="MaleHead" label="Mand - hoved"/>
+		<combo_box.item name="MaleUpperBody" label="Mand - overkrop"/>
+		<combo_box.item name="MaleLowerBody" label="Mand - underkrop"/>
+		<combo_box.item name="Skirt" label="Nederdel"/>
+		<combo_box.item name="SculptedPrim" label="Sculpted prim"/>
 	</combo_box>
 	<text name="bad_image_text">
 		Kunne ikke læse billede.
diff --git a/indra/newview/skins/default/xui/da/floater_report_abuse.xml b/indra/newview/skins/default/xui/da/floater_report_abuse.xml
index 64e39da8fe..688aa8adc5 100644
--- a/indra/newview/skins/default/xui/da/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/da/floater_report_abuse.xml
@@ -39,123 +39,51 @@
 	</text>
 	<combo_box name="category_combo"
 	     tool_tip="Kategori -- Vælg en kategori der passer bedst på denne rapport">
-		<combo_item name="Select_category">
-			Vælg kategori
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Alder &gt; Falsk alder
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Alder &gt; Voksen beboer på Teen Second Life
-		</combo_item>
+		<combo_box.item name="Select_category" label="Vælg kategori"/>
+		<combo_box.item name="Age__Age_play" label="Alder &gt; Falsk alder"/>
+		<combo_box.item name="Age__Adult_resident_on_Teen_Second_Life" label="Alder &gt; Voksen beboer på Teen Second Life"/>
 		
 		
 		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Overfald &gt; Kamp sandkasse / Usikkert område
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Overfald &gt; Sikkert område
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Overfald &gt; Sandkasse til våbentest
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Handel &gt; Vare eller ydelse ikke leveret
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Offentliggørelse &gt; Om oplysninger i den virkelige verden
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Offentliggørelse &gt; Fjernaflytning af chat
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Offentliggørelse &gt; Information/chat/IM fra Second Life
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Forstyrrelse af fred &gt; Unfair brug af region ressourcer
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Forstyrrelse af fred &gt; Overdreven brug af objekter med script
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Forstyrrelse af fred &gt; Object affald
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Forstyrring af fred &gt; Gentagen spam
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Forstyrrelse af fred &gt; Uønsket reklame spam
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Bedrageri &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Bedrageri &gt; Land
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Bedrageri &gt; Pyramide spil eller kædebreve
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Bedrageri &gt; US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Chikane &gt; reklame farm / billedeligt spam
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Chikane &gt; Injurier/bagvask enkeltpersoner eller grupper
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Chikane &gt; Hindre bevægelse
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Chikane &gt; Sex chikane
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Chikane &gt; Opfordrer/kræver at andre overtræder licensbetingelser
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Chikane &gt; Verbalt chikane
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Uanstændighed &gt; Meget stødende indhold eller adfærd
-		</combo_item>
+		<combo_box.item name="Assault__Combat_sandbox___unsafe_area" label="Overfald &gt; Kamp sandkasse / Usikkert område"/>
+		<combo_box.item name="Assault__Safe_area" label="Overfald &gt; Sikkert område"/>
+		<combo_box.item name="Assault__Weapons_testing_sandbox" label="Overfald &gt; Sandkasse til våbentest"/>
+		<combo_box.item name="Commerce__Failure_to_deliver_product_or_service" label="Handel &gt; Vare eller ydelse ikke leveret"/>
+		<combo_box.item name="Disclosure__Real_world_information" label="Offentliggørelse &gt; Om oplysninger i den virkelige verden"/>
+		<combo_box.item name="Disclosure__Remotely_monitoring chat" label="Offentliggørelse &gt; Fjernaflytning af chat"/>
+		<combo_box.item name="Disclosure__Second_Life_information_chat_IMs" label="Offentliggørelse &gt; Information/chat/IM fra Second Life"/>
+		<combo_box.item name="Disturbing_the_peace__Unfair_use_of_region_resources" label="Forstyrrelse af fred &gt; Unfair brug af region ressourcer"/>
+		<combo_box.item name="Disturbing_the_peace__Excessive_scripted_objects" label="Forstyrrelse af fred &gt; Overdreven brug af objekter med script"/>
+		<combo_box.item name="Disturbing_the_peace__Object_littering" label="Forstyrrelse af fred &gt; Object affald"/>
+		<combo_box.item name="Disturbing_the_peace__Repetitive_spam" label="Forstyrring af fred &gt; Gentagen spam"/>
+		<combo_box.item name="Disturbing_the_peace__Unwanted_advert_spam" label="Forstyrrelse af fred &gt; Uønsket reklame spam"/>
+		<combo_box.item name="Fraud__L$" label="Bedrageri &gt; L$"/>
+		<combo_box.item name="Fraud__Land" label="Bedrageri &gt; Land"/>
+		<combo_box.item name="Fraud__Pyramid_scheme_or_chain_letter" label="Bedrageri &gt; Pyramide spil eller kædebreve"/>
+		<combo_box.item name="Fraud__US$" label="Bedrageri &gt; US$"/>
+		<combo_box.item name="Harassment__Advert_farms___visual_spam" label="Chikane &gt; reklame farm / billedeligt spam"/>
+		<combo_box.item name="Harassment__Defaming_individuals_or_groups" label="Chikane &gt; Injurier/bagvask enkeltpersoner eller grupper"/>
+		<combo_box.item name="Harassment__Impeding_movement" label="Chikane &gt; Hindre bevægelse"/>
+		<combo_box.item name="Harassment__Sexual_harassment" label="Chikane &gt; Sex chikane"/>
+		<combo_box.item name="Harassment__Solicting_inciting_others_to_violate_ToS" label="Chikane &gt; Opfordrer/kræver at andre overtræder licensbetingelser"/>
+		<combo_box.item name="Harassment__Verbal_abuse" label="Chikane &gt; Verbalt chikane"/>
+		<combo_box.item name="Indecency__Broadly_offensive_content_or_conduct" label="Uanstændighed &gt; Meget stødende indhold eller adfærd"/>
 		
 		
 		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Uanstændighed &gt; Upassende avatar navn
-		</combo_item>
+		<combo_box.item name="Indecency__Inappropriate_avatar_name" label="Uanstændighed &gt; Upassende avatar navn"/>
 		
 		
 		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Krænkelse af intellektuelle ejendomsrettigheder &gt; Indholds fjernelse
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Krænkelse af intellektuelle ejendomsrettigheder &gt; CopyBot eller omgåelse af rettighedsbeskyttelse
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intolerance
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Land &gt; Misbrug af sandkasse resourcer
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Land &gt; Overgreb &gt; Objekter/teksturer
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Land &gt; Overgreb &gt; Partikler
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Land &gt; Overgreb &gt; Træer/planter
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Væddemål/gambling
-		</combo_item>
-		<combo_item name="Other">
-			Andet
-		</combo_item>
+		<combo_box.item name="Intellectual_property_infringement_Content_Removal" label="Krænkelse af intellektuelle ejendomsrettigheder &gt; Indholds fjernelse"/>
+		<combo_box.item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit" label="Krænkelse af intellektuelle ejendomsrettigheder &gt; CopyBot eller omgåelse af rettighedsbeskyttelse"/>
+		<combo_box.item name="Intolerance" label="Intolerance"/>
+		<combo_box.item name="Land__Abuse_of_sandbox_resources" label="Land &gt; Misbrug af sandkasse resourcer"/>
+		<combo_box.item name="Land__Encroachment__Objects_textures" label="Land &gt; Overgreb &gt; Objekter/teksturer"/>
+		<combo_box.item name="Land__Encroachment__Particles" label="Land &gt; Overgreb &gt; Partikler"/>
+		<combo_box.item name="Land__Encroachment__Trees_plants" label="Land &gt; Overgreb &gt; Træer/planter"/>
+		<combo_box.item name="Wagering_gambling" label="Væddemål/gambling"/>
+		<combo_box.item name="Other" label="Andet"/>
 	</combo_box>
 	<text name="abuser_name_title">
 		Udøvers navn:
diff --git a/indra/newview/skins/default/xui/da/floater_sell_land.xml b/indra/newview/skins/default/xui/da/floater_sell_land.xml
index cd3b36cf93..6793af0d2a 100644
--- a/indra/newview/skins/default/xui/da/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/da/floater_sell_land.xml
@@ -34,15 +34,9 @@
 		Vælg om du vil sælge til hvem som helst eller en specifik køber.
 	</text>
 	<combo_box name="sell_to">
-		<combo_box.item name="--selectone--">
-			-- Vælg --
-		</combo_box.item>
-		<combo_box.item name="Anyone">
-			Alle
-		</combo_box.item>
-		<combo_box.item name="Specificuser:">
-			Specifik bruger:
-		</combo_box.item>
+		<combo_box.item name="--selectone--" label="Vælg --" />
+		<combo_box.item name="Anyone" label="Alle" />
+		<combo_box.item name="Specificuser:" label="Specifik bruger:" />
 	</combo_box>
 	<button label="Vælg..." name="sell_to_select_agent" />
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/da/floater_settings_debug.xml b/indra/newview/skins/default/xui/da/floater_settings_debug.xml
index 8fa351c108..60f99deae2 100644
--- a/indra/newview/skins/default/xui/da/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/da/floater_settings_debug.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater name="settings_debug" title="Tekniske indstillinger">
 	<combo_box name="boolean_combo">
-		<combo_box.item name="TRUE">
-			TRUE (Valgt)
-		</combo_box.item>
-		<combo_box.item name="FALSE">
-			FALSE (Fravalgt)
-		</combo_box.item>
+		<combo_box.item name="TRUE" label="TRUE (Valgt)" />
+		<combo_box.item name="FALSE" label="FALSE (Fravalgt)" />
 	</combo_box>
 	<color_swatch label="Farve" name="color_swatch" />
 	<spinner label="x" name="val_spinner_1" />
diff --git a/indra/newview/skins/default/xui/da/floater_snapshot.xml b/indra/newview/skins/default/xui/da/floater_snapshot.xml
index 8fc98220db..df1a124a9f 100644
--- a/indra/newview/skins/default/xui/da/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/da/floater_snapshot.xml
@@ -31,75 +31,33 @@
 		Format
 	</text>
 	<combo_box label="Opløsning" name="postcard_size_combo">
-		<combo_item name="CurrentWindow">
-			Aktuelle vindue
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="Custom">
-			Manuel
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Aktuelle vindue"/>
+		<combo_box.item name="640x480" label="640x480"/>
+		<combo_box.item name="800x600" label="800x600"/>
+		<combo_box.item name="1024x768" label="1024x768"/>
+		<combo_box.item name="Custom" label="Manuel"/>
 	</combo_box>
 	<combo_box label="Opløsning" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
-			Aktuelle vindue
-		</combo_item>
-		<combo_item name="Small(128x128)">
-			Lille (128x128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
-			Medium (256x256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
-			Stor (512x512)
-		</combo_item>
-		<combo_item name="Custom">
-			Manuel
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Aktuelle vindue"/>
+		<combo_box.item name="Small(128x128)" label="Lille (128x128)"/>
+		<combo_box.item name="Medium(256x256)" label="Medium (256x256)"/>
+		<combo_box.item name="Large(512x512)" label="Stor (512x512)"/>
+		<combo_box.item name="Custom" label="Manuel"/>
 	</combo_box>
 	<combo_box label="Opløsning" name="local_size_combo">
-		<combo_item name="CurrentWindow">
-			Aktuelle vindue
-		</combo_item>
-		<combo_item name="320x240">
-			320x240
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="1280x1024">
-			1280x1024
-		</combo_item>
-		<combo_item name="1600x1200">
-			1600x1200
-		</combo_item>
-		<combo_item name="Custom">
-			Manuelt
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Aktuelle vindue"/>
+		<combo_box.item name="320x240" label="320x240"/>
+		<combo_box.item name="640x480" label="640x480"/>
+		<combo_box.item name="800x600" label="800x600"/>
+		<combo_box.item name="1024x768" label="1024x768"/>
+		<combo_box.item name="1280x1024" label="1280x1024"/>
+		<combo_box.item name="1600x1200" label="1600x1200"/>
+		<combo_box.item name="Custom" label="Manuelt"/>
 	</combo_box>
 	<combo_box label="Fil-format" name="local_format_combo">
-		<combo_item name="PNG">
-			PNG
-		</combo_item>
-		<combo_item name="JPEG">
-			JPEG
-		</combo_item>
-		<combo_item name="BMP">
-			BMP
-		</combo_item>
+		<combo_box.item name="PNG" label="PNG"/>
+		<combo_box.item name="JPEG" label="JPEG"/>
+		<combo_box.item name="BMP" label="BMP"/>
 	</combo_box>
 	<spinner label="Bredde" name="snapshot_width" />
 	<spinner label="Højde" name="snapshot_height" />
@@ -109,15 +67,9 @@
 		Benyt:
 	</text>
 	<combo_box label="Billedlag" name="layer_types">
-		<combo_item name="Colors">
-			Farver
-		</combo_item>
-		<combo_item name="Depth">
-			Dybde
-		</combo_item>
-		<combo_item name="ObjectMattes">
-			Materinger
-		</combo_item>
+		<combo_box.item name="Colors" label="Farver"/>
+		<combo_box.item name="Depth" label="Dybde"/>
+		<combo_box.item name="ObjectMattes" label="Materinger"/>
 	</combo_box>
 	<check_box label="Vis brugerflade på foto" name="ui_check" />
 	<check_box label="Vis HUD objekter på foto" name="hud_check" />
diff --git a/indra/newview/skins/default/xui/da/floater_tools.xml b/indra/newview/skins/default/xui/da/floater_tools.xml
index bc15db0e25..918999eedd 100644
--- a/indra/newview/skins/default/xui/da/floater_tools.xml
+++ b/indra/newview/skins/default/xui/da/floater_tools.xml
@@ -20,15 +20,9 @@
 		Lineal:
 	</text>
 	<combo_box name="combobox grid mode">
-		<combo_item name="World">
-			Verden
-		</combo_item>
-		<combo_item name="Local">
-			Lokal
-		</combo_item>
-		<combo_item name="Reference">
-			Reference
-		</combo_item>
+		<combo_box.item name="World" label="Verden"/>
+		<combo_box.item name="Local" label="Lokal"/>
+		<combo_box.item name="Reference" label="Reference"/>
 	</combo_box>
 	<check_box label="Stræk begge sider" name="checkbox uniform" />
 	<check_box label="Stræk teksturer" name="checkbox stretch textures" />
@@ -64,15 +58,9 @@
 	<check_box label="Gør land ujævnt" name="radio noise" />
 	<check_box label="Tilbagefør" name="radio revert" />
 	<combo_box name="combobox brush size">
-		<combo_item name="Small">
-			Lille
-		</combo_item>
-		<combo_item name="Medium">
-			Mellem
-		</combo_item>
-		<combo_item name="Large">
-			Stor
-		</combo_item>
+		<combo_box.item name="Small" label="Lille"/>
+		<combo_box.item name="Medium" label="Mellem"/>
+		<combo_box.item name="Large" label="Stor"/>
 	</combo_box>
 	<text type="string" length="1" name="Strength:">
 		Styrke:
@@ -159,27 +147,13 @@
 				Når der venstreklikkes:
 			</text>
 			<combo_box name="clickaction">
-				<combo_item name="Touch/grab(default)">
-					Rør/tag (standard)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					Sid på objekt
-				</combo_item>
-				<combo_item name="Buyobject">
-					Køb objekt
-				</combo_item>
-				<combo_item name="Payobject">
-					Betal objekt
-				</combo_item>
-				<combo_item name="Open">
-					Åben
-				</combo_item>
-				<combo_item name="Play">
-					Afspil medie på parcel
-				</combo_item>
-				<combo_item name="Opemmedia">
-					Åben media på parcel
-				</combo_item>
+				<combo_box.item name="Touch/grab(default)" label="Rør/tag (standard)"/>
+				<combo_box.item name="Sitonobject" label="Sid på objekt"/>
+				<combo_box.item name="Buyobject" label="Køb objekt"/>
+				<combo_box.item name="Payobject" label="Betal objekt"/>
+				<combo_box.item name="Open" label="Åben"/>
+				<combo_box.item name="Play" label="Afspil medie på parcel"/>
+				<combo_box.item name="Opemmedia" label="Åben media på parcel"/>
 			</combo_box>
 			<text name="B:">
 				B:
@@ -237,56 +211,26 @@
 				Materiale
 			</text>
 			<combo_box name="material">
-				<combo_item name="Stone">
-					Sten
-				</combo_item>
-				<combo_item name="Metal">
-					Metal
-				</combo_item>
-				<combo_item name="Glass">
-					Glas
-				</combo_item>
-				<combo_item name="Wood">
-					Træ
-				</combo_item>
-				<combo_item name="Flesh">
-					Kød
-				</combo_item>
-				<combo_item name="Plastic">
-					Plastik
-				</combo_item>
-				<combo_item name="Rubber">
-					Gummi
-				</combo_item>
+				<combo_box.item name="Stone" label="Sten"/>
+				<combo_box.item name="Metal" label="Metal"/>
+				<combo_box.item name="Glass" label="Glas"/>
+				<combo_box.item name="Wood" label="Træ"/>
+				<combo_box.item name="Flesh" label="Kød"/>
+				<combo_box.item name="Plastic" label="Plastik"/>
+				<combo_box.item name="Rubber" label="Gummi"/>
 			</combo_box>
 			<text name="label basetype">
 				Byggegeometrisk figur
 			</text>
 			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					Terning
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cylinder
-				</combo_item>
-				<combo_item name="Prism">
-					Prisme
-				</combo_item>
-				<combo_item name="Sphere">
-					Spfære
-				</combo_item>
-				<combo_item name="Torus">
-					Kuglering
-				</combo_item>
-				<combo_item name="Tube">
-					Rør
-				</combo_item>
-				<combo_item name="Ring">
-					Ring
-				</combo_item>
-				<combo_item name="Sculpted">
-					Sculpted
-				</combo_item>
+				<combo_box.item name="Box" label="Terning"/>
+				<combo_box.item name="Cylinder" label="Cylinder"/>
+				<combo_box.item name="Prism" label="Prisme"/>
+				<combo_box.item name="Sphere" label="Spfære"/>
+				<combo_box.item name="Torus" label="Kuglering"/>
+				<combo_box.item name="Tube" label="Rør"/>
+				<combo_box.item name="Ring" label="Ring"/>
+				<combo_box.item name="Sculpted" label="Sculpted"/>
 			</combo_box>
 			<text name="text cut">
 				Snit begynd og slut
@@ -303,18 +247,10 @@
 				Form på hul
 			</text>
 			<combo_box name="hole">
-				<combo_item name="Default">
-					Standard
-				</combo_item>
-				<combo_item name="Circle">
-					Cirkel
-				</combo_item>
-				<combo_item name="Square">
-					Firkant
-				</combo_item>
-				<combo_item name="Triangle">
-					Trekant
-				</combo_item>
+				<combo_box.item name="Default" label="Standard"/>
+				<combo_box.item name="Circle" label="Cirkel"/>
+				<combo_box.item name="Square" label="Firkant"/>
+				<combo_box.item name="Triangle" label="Trekant"/>
 			</combo_box>
 			<text name="text twist">
 				Vrid - start og slut
@@ -363,21 +299,11 @@
 				Sting type
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(ingen)
-				</combo_item>
-				<combo_item name="Sphere">
-					Sfære
-				</combo_item>
-				<combo_item name="Torus">
-					Kuglering
-				</combo_item>
-				<combo_item name="Plane">
-					Plan
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cylinder
-				</combo_item>
+				<combo_box.item name="None" label="ingen)"/>
+				<combo_box.item name="Sphere" label="Sfære"/>
+				<combo_box.item name="Torus" label="Kuglering"/>
+				<combo_box.item name="Plane" label="Plan"/>
+				<combo_box.item name="Cylinder" label="Cylinder"/>
 			</combo_box>
 		</panel>
 		<panel label="Features" name="Features">
@@ -421,88 +347,40 @@
 				Afbildning
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					Standard
-				</combo_item>
-				<combo_item name="Planar">
-					Plan
-				</combo_item>
+				<combo_box.item name="Default" label="Standard"/>
+				<combo_box.item name="Planar" label="Plan"/>
 			</combo_box>
 			<text name="label shininess">
 				Blankhed
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					Ingen
-				</combo_item>
-				<combo_item name="Low">
-					Lav
-				</combo_item>
-				<combo_item name="Medium">
-					Mellem
-				</combo_item>
-				<combo_item name="High">
-					Høj
-				</combo_item>
+				<combo_box.item name="None" label="Ingen"/>
+				<combo_box.item name="Low" label="Lav"/>
+				<combo_box.item name="Medium" label="Mellem"/>
+				<combo_box.item name="High" label="Høj"/>
 			</combo_box>
 			<text name="label bumpiness">
 				Struktur
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					Ingen
-				</combo_item>
-				<combo_item name="Brightness">
-					Lysintensitet
-				</combo_item>
-				<combo_item name="Darkness">
-					Mørke
-				</combo_item>
-				<combo_item name="woodgrain">
-					træårer
-				</combo_item>
-				<combo_item name="bark">
-					bark
-				</combo_item>
-				<combo_item name="bricks">
-					mursten
-				</combo_item>
-				<combo_item name="checker">
-					tern
-				</combo_item>
-				<combo_item name="concrete">
-					beton
-				</combo_item>
-				<combo_item name="crustytile">
-					rustik flise
-				</combo_item>
-				<combo_item name="cutstone">
-					Skåret sten
-				</combo_item>
-				<combo_item name="discs">
-					plader
-				</combo_item>
-				<combo_item name="gravel">
-					grus
-				</combo_item>
-				<combo_item name="petridish">
-					petriskål
-				</combo_item>
-				<combo_item name="siding">
-					udvendig beklædning
-				</combo_item>
-				<combo_item name="stonetile">
-					stenflise
-				</combo_item>
-				<combo_item name="stucco">
-					puds
-				</combo_item>
-				<combo_item name="suction">
-					rør
-				</combo_item>
-				<combo_item name="weave">
-					væv
-				</combo_item>
+				<combo_box.item name="None" label="Ingen"/>
+				<combo_box.item name="Brightness" label="Lysintensitet"/>
+				<combo_box.item name="Darkness" label="Mørke"/>
+				<combo_box.item name="woodgrain" label="træårer"/>
+				<combo_box.item name="bark" label="bark"/>
+				<combo_box.item name="bricks" label="mursten"/>
+				<combo_box.item name="checker" label="tern"/>
+				<combo_box.item name="concrete" label="beton"/>
+				<combo_box.item name="crustytile" label="rustik flise"/>
+				<combo_box.item name="cutstone" label="Skåret sten"/>
+				<combo_box.item name="discs" label="plader"/>
+				<combo_box.item name="gravel" label="grus"/>
+				<combo_box.item name="petridish" label="petriskål"/>
+				<combo_box.item name="siding" label="udvendig beklædning"/>
+				<combo_box.item name="stonetile" label="stenflise"/>
+				<combo_box.item name="stucco" label="puds"/>
+				<combo_box.item name="suction" label="rør"/>
+				<combo_box.item name="weave" label="væv"/>
 			</combo_box>
 			<text name="tex scale">
 				Gentagelser pr. overflade
diff --git a/indra/newview/skins/default/xui/da/floater_world_map.xml b/indra/newview/skins/default/xui/da/floater_world_map.xml
index 9d1c799471..c35fd9b2e6 100644
--- a/indra/newview/skins/default/xui/da/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/da/floater_world_map.xml
@@ -42,15 +42,11 @@
 	<check_box label="" name="event_mature_chk" />
 	<combo_box label="Venner online" name="friend combo"
 	     tool_tip="Ven der skal vises på kortet">
-		<combo_box.item name="none_selected">
-			Venner online
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Venner online" />
 	</combo_box>
 	<combo_box label="Landemærker" name="landmark combo"
 	     tool_tip="Landemærke der skal vises på kortet">
-		<combo_box.item name="none_selected">
-			Landemærker
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Landemærker" />
 	</combo_box>
 	<line_editor label="Søg på region navn" name="location"
 	     tool_tip="Skriv navnet på en region" />
diff --git a/indra/newview/skins/default/xui/da/panel_login.xml b/indra/newview/skins/default/xui/da/panel_login.xml
index 308db3d299..6f02778264 100644
--- a/indra/newview/skins/default/xui/da/panel_login.xml
+++ b/indra/newview/skins/default/xui/da/panel_login.xml
@@ -19,15 +19,9 @@
 		Start lokation:
 	</text>
 	<combo_box name="start_location_combo">
-		<combo_box.item name="MyHome">
-			Hjem
-		</combo_box.item>
-		<combo_box.item name="MyLastLocation">
-			Min sidste lokation
-		</combo_box.item>
-		<combo_box.item name="Typeregionname">
-			&lt;Skriv navn på region&gt;
-		</combo_box.item>
+		<combo_box.item name="MyHome" label="Hjem" />
+		<combo_box.item name="MyLastLocation" label="Min sidste lokation" />
+		<combo_box.item name="Typeregionname" label="lt;Skriv navn på region&gt;" />
 	</combo_box>
 	<check_box label="Husk password" name="remember_check" />
 	<button label="Log ind" label_selected="Log ind" name="connect_btn" />
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_general.xml b/indra/newview/skins/default/xui/da/panel_preferences_general.xml
index 74a1ab1d7a..a800002448 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_general.xml
@@ -10,15 +10,9 @@
 	</radio_group>
 	<check_box label="Vis start lokation på login billedet" name="show_location_checkbox" />
 	<combo_box name="fade_out_combobox">
-		<combo_item name="Never">
-			Aldrig
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Vis midlertidigt
-		</combo_item>
-		<combo_item name="Always">
-			Altid
-		</combo_item>
+		<combo_box.item name="Never" label="Aldrig"/>
+		<combo_box.item name="Show Temporarily" label="Vis midlertidigt"/>
+		<combo_box.item name="Always" label="Altid"/>
 	</combo_box>
 	<check_box label="Små avatar navne" name="small_avatar_names_checkbox" />
 	<check_box label="Skjul mit navn på min skærm" name="show_my_name_checkbox" />
@@ -65,53 +59,23 @@
 		&lt;Skriv regions navn&gt;
 	</string>
 	<combo_box name="crash_behavior_combobox">
-		<combo_item type="string" length="1" name="Askbeforesending">
-			Bed om bekræftigelse
-		</combo_item>
-		<combo_item type="string" length="1" name="Alwayssend">
-			Send altid
-		</combo_item>
-		<combo_item type="string" length="1" name="Neversend">
-			Send aldrig
-		</combo_item>
+		<combo_box.item type="string" length="1" name="Askbeforesending" label="Bed om bekræftigelse"/>
+		<combo_box.item type="string" length="1" name="Alwayssend" label="Send altid"/>
+		<combo_box.item type="string" length="1" name="Neversend" label="Send aldrig"/>
 	</combo_box>
 	<combo_box name="language_combobox">
-		<combo_item type="string" length="1" name="System Default Language">
-			System standard
-		</combo_item>
-		<combo_item type="string" length="1" name="English">
-			English (Engelsk)
-		</combo_item>
-		<combo_item type="string" length="1" name="Danish">
-			Dansk - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Deutsch(German)">
-			Deutsch (Tysk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Spanish">
-			Español (Spansk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="French">
-			Français (Fransk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Hungarian">
-			Magyar (Ungarsk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Polish">
-			Polski (Polsk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Portugese">
-			Portugués (Portugisisk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="Chinese">
-			中文 (简体) (Kinesisk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="(Japanese)">
-			日本語 (Japansk) - Beta
-		</combo_item>
-		<combo_item type="string" length="1" name="(Korean)">
-			한국어 (Koreansk) - Beta
-		</combo_item>
+		<combo_box.item type="string" length="1" name="System Default Language" label="System standard"/>
+		<combo_box.item type="string" length="1" name="English" label="English (Engelsk)"/>
+		<combo_box.item type="string" length="1" name="Danish" label="Dansk - Beta"/>
+		<combo_box.item type="string" length="1" name="Deutsch(German)" label="Deutsch (Tysk) - Beta"/>
+		<combo_box.item type="string" length="1" name="Spanish" label="Español (Spansk) - Beta"/>
+		<combo_box.item type="string" length="1" name="French" label="Français (Fransk) - Beta"/>
+		<combo_box.item type="string" length="1" name="Hungarian" label="Magyar (Ungarsk) - Beta"/>
+		<combo_box.item type="string" length="1" name="Polish" label="Polski (Polsk) - Beta"/>
+		<combo_box.item type="string" length="1" name="Portugese" label="Portugués (Portugisisk) - Beta"/>
+		<combo_box.item type="string" length="1" name="Chinese" label="中文 (简体) (Kinesisk) - Beta"/>
+		<combo_box.item type="string" length="1" name="(Japanese)" label="日本語 (Japansk) - Beta"/>
+		<combo_box.item type="string" length="1" name="(Korean)" label="한국어 (Koreansk) - Beta"/>
 	</combo_box>
 	<check_box label="Del sprog med objekter" name="language_is_public"
 	     tool_tip="Dette lader objekter i verden vide hvad dit foretrukne sprog er." />
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
index 8add1304ae..669513d120 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
@@ -9,21 +9,11 @@
 		Opløsning:
 	</text>
 	<combo_box name="windowsize combo">
-		<combo_box.item type="string" length="1" name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="720x480">
-			720x480 (NTSC)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="768x576">
-			768x576 (PAL)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="1024x768">
-			1024x768
-		</combo_box.item>
+		<combo_box.item type="string" length="1" name="640x480" label="640x480" />
+		<combo_box.item type="string" length="1" name="800x600" label="800x600" />
+		<combo_box.item type="string" length="1" name="720x480" label="720x480 (NTSC)" />
+		<combo_box.item type="string" length="1" name="768x576" label="768x576 (PAL)" />
+		<combo_box.item type="string" length="1" name="1024x768" label="1024x768" />
 	</combo_box>
 	<text type="string" length="1" name="DisplayResLabel">
 		Skærm opløsning:
@@ -32,18 +22,10 @@
 		Format:
 	</text>
 	<combo_box name="aspect_ratio" tool_tip="bredde/ højde">
-		<combo_box.item type="string" length="1" name="4:3(StandardCRT)">
-			4:3 (Standard CRT)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)">
-			5:4 (1280x1024 LCD)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="8:5(Widescreen)">
-			8:5 (Widescreen)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="16:9(Widescreen)">
-			16:9 (Widescreen)
-		</combo_box.item>
+		<combo_box.item type="string" length="1" name="4:3(StandardCRT)" label="4:3 (Standard CRT)" />
+		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)" label="5:4 (1280x1024 LCD)" />
+		<combo_box.item type="string" length="1" name="8:5(Widescreen)" label="8:5 (Widescreen)" />
+		<combo_box.item type="string" length="1" name="16:9(Widescreen)" label="16:9 (Widescreen)" />
 	</combo_box>
 	<check_box label="Auto-detect format" name="aspect_auto_detect" />
 	<text type="string" length="1" name="HigherText">
diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml
index c2b22caa20..eec6a76e57 100644
--- a/indra/newview/skins/default/xui/de/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/de/floater_about_land.xml
@@ -254,43 +254,19 @@
 			<check_box label="Kein Stoßen" name="PushRestrictCheck" tool_tip="Verhindert Skripte am Stoßen. Durch Aktivieren dieser Option verhindern Sie störendes Verhalten auf Ihrem Land."/>
 			<check_box label="Ort in Suche anzeigen (30 L$/Woche) unter" name="ShowDirectoryCheck" tool_tip="Diese Parzelle in Suchergebnissen anzeigen."/>
 			<combo_box name="land category" left="266" width="130">
-				<combo_item name="AnyCategory">
-					Alle Kategorien
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Lindenort
-				</combo_item>
+				<combo_box.item name="AnyCategory" label="Alle Kategorien"/>
+				<combo_box.item name="LindenLocation" label="Lindenort"/>
 
-				<combo_item name="Arts&amp;Culture">
-					Kunst und Kultur
-				</combo_item>
-				<combo_item name="Business">
-					Business
-				</combo_item>
-				<combo_item name="Educational">
-					Bildung
-				</combo_item>
-				<combo_item name="Gaming">
-					Spielen
-				</combo_item>
-				<combo_item name="Hangout">
-					Treffpunkt
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Anfängergerecht
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parks und Natur
-				</combo_item>
-				<combo_item name="Residential">
-					Wohngebiet
-				</combo_item>
-				<combo_item name="Shopping">
-					Shopping
-				</combo_item>
-				<combo_item name="Other">
-					Sonstige
-				</combo_item>
+				<combo_box.item name="Arts&amp;Culture" label="Kunst und Kultur"/>
+				<combo_box.item name="Business" label="Business"/>
+				<combo_box.item name="Educational" label="Bildung"/>
+				<combo_box.item name="Gaming" label="Spielen"/>
+				<combo_box.item name="Hangout" label="Treffpunkt"/>
+				<combo_box.item name="NewcomerFriendly" label="Anfängergerecht"/>
+				<combo_box.item name="Parks&amp;Nature" label="Parks und Natur"/>
+				<combo_box.item name="Residential" label="Wohngebiet"/>
+				<combo_box.item name="Shopping" label="Shopping"/>
+				<combo_box.item name="Other" label="Sonstige"/>
 			</combo_box>
 			<button label="?" label_selected="?" name="?"/>
 			<check_box name="MatureCheck" />
@@ -310,15 +286,9 @@
 				Teleport-Route:
 			</text>
 			<combo_box name="landing type" tool_tip="Teleport-Route -- festlegen, wie Teleports auf Ihrem Land gehandhabt werden sollen." >
-				<combo_item name="Blocked">
-					Blockiert
-				</combo_item>
-				<combo_item name="LandingPoint">
-					Landepunkt
-				</combo_item>
-				<combo_item name="Anywhere">
-					Überall
-				</combo_item>
+				<combo_box.item name="Blocked" label="Blockiert"/>
+				<combo_box.item name="LandingPoint" label="Landepunkt"/>
+				<combo_box.item name="Anywhere" label="Überall"/>
 			</combo_box>
 			<string name="push_restrict_text">
 				Kein Stoßen
@@ -403,12 +373,8 @@ Optionen:
 			<check_box label="Gruppenzugang erlauben: [GROUP]" name="GroupCheck" tool_tip="Gruppe im Register „Allgemein“ festlegen."/>
 			<check_box label="Pässe verkaufen an:" name="PassCheck" tool_tip="Ermöglicht befristeten Zugang zu dieser Parzelle"/>
 			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Jeden
-				</combo_item>
-				<combo_item name="Group">
-					Gruppe
-				</combo_item>
+				<combo_box.item name="Anyone" label="Jeden"/>
+				<combo_box.item name="Group" label="Gruppe"/>
 			</combo_box>
 			<spinner label="Preis in L$:" name="PriceSpin"/>
 			<spinner label="Online-Zeit:" name="HoursSpin"/>
diff --git a/indra/newview/skins/default/xui/de/floater_animation_preview.xml b/indra/newview/skins/default/xui/de/floater_animation_preview.xml
index 48df5fd917..fbd03ab3d7 100644
--- a/indra/newview/skins/default/xui/de/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/de/floater_animation_preview.xml
@@ -15,127 +15,53 @@
 		Handhaltung
 	</text>
 	<combo_box label="" name="hand_pose_combo" tool_tip="Steuert während der Animation die Bewegung der Hände.">
-		<combo_box.item name="Spread">
-			Dehnen
-		</combo_box.item>
-		<combo_box.item name="Relaxed">
-			Entspannt
-		</combo_box.item>
-		<combo_box.item name="PointBoth">
-			Beide zeigen
-		</combo_box.item>
-		<combo_box.item name="Fist">
-			Faust
-		</combo_box.item>
-		<combo_box.item name="RelaxedLeft">
-			Links entspannt
-		</combo_box.item>
-		<combo_box.item name="PointLeft">
-			Nach links zeigen
-		</combo_box.item>
-		<combo_box.item name="FistLeft">
-			Linke Faust
-		</combo_box.item>
-		<combo_box.item name="RelaxedRight">
-			Rechts entspannt
-		</combo_box.item>
-		<combo_box.item name="PointRight">
-			Nach rechts zeigen
-		</combo_box.item>
-		<combo_box.item name="FistRight">
-			Rechte Faust
-		</combo_box.item>
-		<combo_box.item name="SaluteRight">
-			Rechts salutieren
-		</combo_box.item>
-		<combo_box.item name="Typing">
-			Tippt
-		</combo_box.item>
-		<combo_box.item name="PeaceRight">
-			Friedensrecht
-		</combo_box.item>
+		<combo_box.item name="Spread" label="Dehnen" />
+		<combo_box.item name="Relaxed" label="Entspannt" />
+		<combo_box.item name="PointBoth" label="Beide zeigen" />
+		<combo_box.item name="Fist" label="Faust" />
+		<combo_box.item name="RelaxedLeft" label="Links entspannt" />
+		<combo_box.item name="PointLeft" label="Nach links zeigen" />
+		<combo_box.item name="FistLeft" label="Linke Faust" />
+		<combo_box.item name="RelaxedRight" label="Rechts entspannt" />
+		<combo_box.item name="PointRight" label="Nach rechts zeigen" />
+		<combo_box.item name="FistRight" label="Rechte Faust" />
+		<combo_box.item name="SaluteRight" label="Rechts salutieren" />
+		<combo_box.item name="Typing" label="Tippt" />
+		<combo_box.item name="PeaceRight" label="Friedensrecht" />
 	</combo_box>
 	<text name="emote_label">
 		Ausdruck
 	</text>
 	<combo_box label="" name="emote_combo" tool_tip="Steuert Gesichtsregungen während der Animation.">
-		<combo_box.item name="[None]">
-			[Keine]
-		</combo_box.item>
-		<combo_box.item name="Aaaaah">
-			Aaaaah
-		</combo_box.item>
-		<combo_box.item name="Afraid">
-			Ängstlich
-		</combo_box.item>
-		<combo_box.item name="Angry">
-			Verärgert
-		</combo_box.item>
-		<combo_box.item name="BigSmile">
-			Grinst
-		</combo_box.item>
-		<combo_box.item name="Bored">
-			Gelangweilt
-		</combo_box.item>
-		<combo_box.item name="Cry">
-			Weinen
-		</combo_box.item>
-		<combo_box.item name="Disdain">
-			Verachten
-		</combo_box.item>
-		<combo_box.item name="Embarrassed">
-			Verlegen
-		</combo_box.item>
-		<combo_box.item name="Frown">
-			Stirnrunzeln
-		</combo_box.item>
-		<combo_box.item name="Kiss">
-			Küssen
-		</combo_box.item>
-		<combo_box.item name="Laugh">
-			Lachen
-		</combo_box.item>
-		<combo_box.item name="Plllppt">
-			Bäääh
-		</combo_box.item>
-		<combo_box.item name="Repulsed">
-			Zurückgestoßen
-		</combo_box.item>
-		<combo_box.item name="Sad">
-			Traurig
-		</combo_box.item>
-		<combo_box.item name="Shrug">
-			Schulterzucken
-		</combo_box.item>
-		<combo_box.item name="Smile">
-			Lächeln
-		</combo_box.item>
-		<combo_box.item name="Surprise">
-			Überraschung
-		</combo_box.item>
-		<combo_box.item name="Wink">
-			Zwinkern
-		</combo_box.item>
-		<combo_box.item name="Worry">
-			Sorgenvoll
-		</combo_box.item>
+		<combo_box.item name="[None]" label="Keine]" />
+		<combo_box.item name="Aaaaah" label="Aaaaah" />
+		<combo_box.item name="Afraid" label="Ängstlich" />
+		<combo_box.item name="Angry" label="Verärgert" />
+		<combo_box.item name="BigSmile" label="Grinst" />
+		<combo_box.item name="Bored" label="Gelangweilt" />
+		<combo_box.item name="Cry" label="Weinen" />
+		<combo_box.item name="Disdain" label="Verachten" />
+		<combo_box.item name="Embarrassed" label="Verlegen" />
+		<combo_box.item name="Frown" label="Stirnrunzeln" />
+		<combo_box.item name="Kiss" label="Küssen" />
+		<combo_box.item name="Laugh" label="Lachen" />
+		<combo_box.item name="Plllppt" label="Bäääh" />
+		<combo_box.item name="Repulsed" label="Zurückgestoßen" />
+		<combo_box.item name="Sad" label="Traurig" />
+		<combo_box.item name="Shrug" label="Schulterzucken" />
+		<combo_box.item name="Smile" label="Lächeln" />
+		<combo_box.item name="Surprise" label="Überraschung" />
+		<combo_box.item name="Wink" label="Zwinkern" />
+		<combo_box.item name="Worry" label="Sorgenvoll" />
 	</combo_box>
 	<text name="preview_label" width="97">
 		Vorschau während:
 	</text>
 	<combo_box label="" left_delta="107" name="preview_base_anim" tool_tip="Hiermit können Sie das Verhalten Ihres Avatars testen, während Ihr Avatar normale Bewegungen ausführt.">
-		<combo_box.item name="Standing">
-			Stehend
-		</combo_box.item>
-		<combo_box.item name="Walking">
-			Geht
-		</combo_box.item>
-		<combo_box.item name="Sitting">
-			Sitzt
-		</combo_box.item>
-		<combo_box.item name="Flying">
-			Fliegend
-		</combo_box.item>
+		<combo_box.item name="Standing" label="Stehend" />
+		<combo_box.item name="Walking" label="Geht" />
+		<combo_box.item name="Sitting" label="Sitzt" />
+		<combo_box.item name="Flying" label="Fliegend" />
 	</combo_box>
 	<spinner label="Eingang glätten (s)" label_width="105" name="ease_in_time" tool_tip="Einblendungsgeschwindigkeit von Animationen (in Sekunden)." width="175"/>
 	<spinner bottom_delta="-20" label="Ausgang glätten (s)" label_width="105" left="10" name="ease_out_time" tool_tip="Ausblendungsgeschwindigkeit von Animationen (in Sekunden)." width="175"/>
diff --git a/indra/newview/skins/default/xui/de/floater_buy_land.xml b/indra/newview/skins/default/xui/de/floater_buy_land.xml
index 0b2f86ed8f..57d573e6fd 100644
--- a/indra/newview/skins/default/xui/de/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/de/floater_buy_land.xml
@@ -66,15 +66,9 @@
 		Landbesitz ist Premium-Mitgliedern vorbehalten.
 	</text>
 	<combo_box name="account_level">
-		<combo_box.item name="US$9.95/month,billedmonthly">
-			9,95 US$/Monat, monatliche Abrechnung
-		</combo_box.item>
-		<combo_box.item name="US$7.50/month,billedquarterly">
-			7,50 US$/Monat, vierteljährliche Abrechnung
-		</combo_box.item>
-		<combo_box.item name="US$6.00/month,billedannually">
-			6,00 US$/Monat, jährliche Abrechnung
-		</combo_box.item>
+		<combo_box.item name="US$9.95/month,billedmonthly" label="9,95 US$/Monat, monatliche Abrechnung" />
+		<combo_box.item name="US$7.50/month,billedquarterly" label="7,50 US$/Monat, vierteljährliche Abrechnung" />
+		<combo_box.item name="US$6.00/month,billedannually" label="6,00 US$/Monat, jährliche Abrechnung" />
 	</combo_box>
 	<text name="land_use_action">
 		Erhöhen Sie Ihre monatlichen Landnutzungsgebühren auf 40 US$/month.
diff --git a/indra/newview/skins/default/xui/de/floater_god_tools.xml b/indra/newview/skins/default/xui/de/floater_god_tools.xml
index 15143f59d3..39c064b265 100644
--- a/indra/newview/skins/default/xui/de/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/de/floater_god_tools.xml
@@ -115,29 +115,17 @@
 				Ziel:
 			</text>
 			<combo_box name="destination">
-				<combo_box.item name="Selection">
-					Auswahl
-				</combo_box.item>
-				<combo_box.item name="AgentRegion">
-					Avatar-Region
-				</combo_box.item>
+				<combo_box.item name="Selection" label="Auswahl" />
+				<combo_box.item name="AgentRegion" label="Avatar-Region" />
 			</combo_box>
 			<text name="Request:">
 				Anfrage:
 			</text>
 			<combo_box name="request">
-				<combo_box.item name="colliders&lt;steps&gt;">
-					Kollisionsobjekte &lt;Schritte&gt;
-				</combo_box.item>
-				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
-					Skripts &lt;Zähler&gt;,&lt;Optionales Muster&gt;
-				</combo_box.item>
-				<combo_box.item name="objects&lt;pattern&gt;">
-					Objekte &lt;Muster&gt;
-				</combo_box.item>
-				<combo_box.item name="rez&lt;asset_id&gt;">
-					&lt;asset_id&gt; erstellen
-				</combo_box.item>
+				<combo_box.item name="colliders&lt;steps&gt;" label="Kollisionsobjekte &lt;Schritte&gt;" />
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;" label="Skripts &lt;Zähler&gt;,&lt;Optionales Muster&gt;" />
+				<combo_box.item name="objects&lt;pattern&gt;" label="Objekte &lt;Muster&gt;" />
+				<combo_box.item name="rez&lt;asset_id&gt;" label="lt;asset_id&gt; erstellen" />
 			</combo_box>
 			<text name="Parameter:">
 				Parameter:
diff --git a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml
index 6642de7e6a..4051776b0d 100644
--- a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml
@@ -8,21 +8,11 @@
 		Antialiasing:
 	</text>
 	<combo_box label="Antialiasing" name="fsaa">
-		<combo_box.item name="FSAADisabled">
-			Deaktiviert
-		</combo_box.item>
-		<combo_box.item name="2x">
-			2x
-		</combo_box.item>
-		<combo_box.item name="4x">
-			4x
-		</combo_box.item>
-		<combo_box.item name="8x">
-			8x
-		</combo_box.item>
-		<combo_box.item name="16x">
-			16x
-		</combo_box.item>
+		<combo_box.item name="FSAADisabled" label="Deaktiviert" />
+		<combo_box.item name="2x" label="2x" />
+		<combo_box.item name="4x" label="4x" />
+		<combo_box.item name="8x" label="8x" />
+		<combo_box.item name="16x" label="16x" />
 	</combo_box>
 	<spinner label="Gamma:" name="gamma" />
 	<text name="(brightness, lower is brighter)">
diff --git a/indra/newview/skins/default/xui/de/floater_image_preview.xml b/indra/newview/skins/default/xui/de/floater_image_preview.xml
index db0930f657..724da83495 100644
--- a/indra/newview/skins/default/xui/de/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/de/floater_image_preview.xml
@@ -10,36 +10,16 @@
 		Bildvorschau als:
 	</text>
 	<combo_box label="Kleidungstyp" name="clothing_type_combo">
-		<combo_box.item name="Image">
-			Bild
-		</combo_box.item>
-		<combo_box.item name="Hair">
-			Haar
-		</combo_box.item>
-		<combo_box.item name="FemaleHead">
-			Kopf (Frau)
-		</combo_box.item>
-		<combo_box.item name="FemaleUpperBody">
-			Oberkörper (Frau)
-		</combo_box.item>
-		<combo_box.item name="FemaleLowerBody">
-			Unterkörper (Frau)
-		</combo_box.item>
-		<combo_box.item name="MaleHead">
-			Kopf (Mann)
-		</combo_box.item>
-		<combo_box.item name="MaleUpperBody">
-			Oberkörper (Mann)
-		</combo_box.item>
-		<combo_box.item name="MaleLowerBody">
-			Unterkörper (Mann)
-		</combo_box.item>
-		<combo_box.item name="Skirt">
-			Rock
-		</combo_box.item>
-		<combo_box.item name="SculptedPrim">
-			Geformtes Primitiv
-		</combo_box.item>
+		<combo_box.item name="Image" label="Bild" />
+		<combo_box.item name="Hair" label="Haar" />
+		<combo_box.item name="FemaleHead" label="Kopf (Frau)" />
+		<combo_box.item name="FemaleUpperBody" label="Oberkörper (Frau)" />
+		<combo_box.item name="FemaleLowerBody" label="Unterkörper (Frau)" />
+		<combo_box.item name="MaleHead" label="Kopf (Mann)" />
+		<combo_box.item name="MaleUpperBody" label="Oberkörper (Mann)" />
+		<combo_box.item name="MaleLowerBody" label="Unterkörper (Mann)" />
+		<combo_box.item name="Skirt" label="Rock" />
+		<combo_box.item name="SculptedPrim" label="Geformtes Primitiv" />
 	</combo_box>
 	<text name="bad_image_text">
 		Bild kann nicht gelesen werden.
diff --git a/indra/newview/skins/default/xui/de/floater_report_abuse.xml b/indra/newview/skins/default/xui/de/floater_report_abuse.xml
index c51a77426c..ca573083fa 100644
--- a/indra/newview/skins/default/xui/de/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/de/floater_report_abuse.xml
@@ -38,123 +38,51 @@ dann auf das Objekt:
 		Hendrerit Vulputate
 	</text>
 	<combo_box name="category_combo" tool_tip="Kategorie -- wählen Sie die Kategorie aus, die am besten auf diesen Bericht zutrifft">
-		<combo_item name="Select_category">
-			Kategorie auswählen
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Alter&gt; Age-Play
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Alter&gt; Erwachsener Einwohner in Teen Second Life
-		</combo_item>
+		<combo_box.item name="Select_category" label="Kategorie auswählen"/>
+		<combo_box.item name="Age__Age_play" label="Alter&gt; Age-Play"/>
+		<combo_box.item name="Age__Adult_resident_on_Teen_Second_Life" label="Alter&gt; Erwachsener Einwohner in Teen Second Life"/>
 		
 		
 		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Angriff&gt; Kampf-Sandbox / unsichere Region
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Angriff&gt; Sichere Region
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Angriff &gt; Sandbox für Waffentest
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Handel &gt; Produkt nicht geliefert oder Dienstleistung nicht erbracht
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Offenlegung &gt; Informationen aus realer Welt
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Offenlegung &gt; Abhören eines Chats aus der Ferne
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Offenlegung &gt; Second Life-Informationen/Chat/IMs
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Ruhestörung &gt; Unfaire Nutzung von Regionsressourcen
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Ruhestörung &gt; Exzessive Nutzung geskripteter Objekte
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Ruhestörung &gt; Wildes Erzeugen von Objekten
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Ruhestörung &gt; Ständige Spam-Wiederholung
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Ruhestörung &gt; Unerwünschte Spam-Werbung
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Betrug &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Betrug&gt; Land
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Betrug &gt; Schneeballsystem oder Kettenbrief
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Betrug &gt; US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Belästigung &gt; Werbefarmen / visueller Spam
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Belästigung &gt; Diffamieren von Einzelpersonen/Gruppen
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Belästigung &gt; Bewegungseinschränkung
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Belästigung &gt; Sexuelle Belästigung
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Belästigung &gt; Anstiften Dritter zur Missachtung der Nutzungsbedingungen
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Belästigung &gt; Beschimpfung
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Unanständigkeit &gt; Anstößige Inhalte oder Handlungen in der Öffentlichkeit
-		</combo_item>
+		<combo_box.item name="Assault__Combat_sandbox___unsafe_area" label="Angriff&gt; Kampf-Sandbox / unsichere Region"/>
+		<combo_box.item name="Assault__Safe_area" label="Angriff&gt; Sichere Region"/>
+		<combo_box.item name="Assault__Weapons_testing_sandbox" label="Angriff &gt; Sandbox für Waffentest"/>
+		<combo_box.item name="Commerce__Failure_to_deliver_product_or_service" label="Handel &gt; Produkt nicht geliefert oder Dienstleistung nicht erbracht"/>
+		<combo_box.item name="Disclosure__Real_world_information" label="Offenlegung &gt; Informationen aus realer Welt"/>
+		<combo_box.item name="Disclosure__Remotely_monitoring chat" label="Offenlegung &gt; Abhören eines Chats aus der Ferne"/>
+		<combo_box.item name="Disclosure__Second_Life_information_chat_IMs" label="Offenlegung &gt; Second Life-Informationen/Chat/IMs"/>
+		<combo_box.item name="Disturbing_the_peace__Unfair_use_of_region_resources" label="Ruhestörung &gt; Unfaire Nutzung von Regionsressourcen"/>
+		<combo_box.item name="Disturbing_the_peace__Excessive_scripted_objects" label="Ruhestörung &gt; Exzessive Nutzung geskripteter Objekte"/>
+		<combo_box.item name="Disturbing_the_peace__Object_littering" label="Ruhestörung &gt; Wildes Erzeugen von Objekten"/>
+		<combo_box.item name="Disturbing_the_peace__Repetitive_spam" label="Ruhestörung &gt; Ständige Spam-Wiederholung"/>
+		<combo_box.item name="Disturbing_the_peace__Unwanted_advert_spam" label="Ruhestörung &gt; Unerwünschte Spam-Werbung"/>
+		<combo_box.item name="Fraud__L$" label="Betrug &gt; L$"/>
+		<combo_box.item name="Fraud__Land" label="Betrug&gt; Land"/>
+		<combo_box.item name="Fraud__Pyramid_scheme_or_chain_letter" label="Betrug &gt; Schneeballsystem oder Kettenbrief"/>
+		<combo_box.item name="Fraud__US$" label="Betrug &gt; US$"/>
+		<combo_box.item name="Harassment__Advert_farms___visual_spam" label="Belästigung &gt; Werbefarmen / visueller Spam"/>
+		<combo_box.item name="Harassment__Defaming_individuals_or_groups" label="Belästigung &gt; Diffamieren von Einzelpersonen/Gruppen"/>
+		<combo_box.item name="Harassment__Impeding_movement" label="Belästigung &gt; Bewegungseinschränkung"/>
+		<combo_box.item name="Harassment__Sexual_harassment" label="Belästigung &gt; Sexuelle Belästigung"/>
+		<combo_box.item name="Harassment__Solicting_inciting_others_to_violate_ToS" label="Belästigung &gt; Anstiften Dritter zur Missachtung der Nutzungsbedingungen"/>
+		<combo_box.item name="Harassment__Verbal_abuse" label="Belästigung &gt; Beschimpfung"/>
+		<combo_box.item name="Indecency__Broadly_offensive_content_or_conduct" label="Unanständigkeit &gt; Anstößige Inhalte oder Handlungen in der Öffentlichkeit"/>
 		
 		
 		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Unanständigkeit &gt; Anstößiger Avatarname
-		</combo_item>
+		<combo_box.item name="Indecency__Inappropriate_avatar_name" label="Unanständigkeit &gt; Anstößiger Avatarname"/>
 		
 		
 		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Urheberrechtsverletzung &gt; Entfernen von Inhalten
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Urheberrechtsverletzung &gt; CopyBot oder Berechtigungs-Exploit
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intoleranz
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Land &gt; Missbrauch der Sandbox-Ressourcen
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Land &gt; Unbefugte Nutzung &gt; Objekte/Texturen
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Land &gt; Unbefugte Nutzung &gt; Partikel
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Land &gt; Unbefugte Nutzung &gt; Bäume/Pflanzen
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Wetten/Glücksspiel
-		</combo_item>
-		<combo_item name="Other">
-			Sonstige
-		</combo_item>
+		<combo_box.item name="Intellectual_property_infringement_Content_Removal" label="Urheberrechtsverletzung &gt; Entfernen von Inhalten"/>
+		<combo_box.item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit" label="Urheberrechtsverletzung &gt; CopyBot oder Berechtigungs-Exploit"/>
+		<combo_box.item name="Intolerance" label="Intoleranz"/>
+		<combo_box.item name="Land__Abuse_of_sandbox_resources" label="Land &gt; Missbrauch der Sandbox-Ressourcen"/>
+		<combo_box.item name="Land__Encroachment__Objects_textures" label="Land &gt; Unbefugte Nutzung &gt; Objekte/Texturen"/>
+		<combo_box.item name="Land__Encroachment__Particles" label="Land &gt; Unbefugte Nutzung &gt; Partikel"/>
+		<combo_box.item name="Land__Encroachment__Trees_plants" label="Land &gt; Unbefugte Nutzung &gt; Bäume/Pflanzen"/>
+		<combo_box.item name="Wagering_gambling" label="Wetten/Glücksspiel"/>
+		<combo_box.item name="Other" label="Sonstige"/>
 	</combo_box>
 	<text name="abuser_name_title">
 		Name des Beschuldigten:
diff --git a/indra/newview/skins/default/xui/de/floater_sell_land.xml b/indra/newview/skins/default/xui/de/floater_sell_land.xml
index e16a44f920..4bbcbe3df9 100644
--- a/indra/newview/skins/default/xui/de/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/de/floater_sell_land.xml
@@ -44,15 +44,9 @@ dieser Parzelle:
 beschränkt ist.
 	</text>
 	<combo_box follows="top|right" height="16" left="72" name="sell_to" bottom_delta="-32" width="140">
-		<combo_box.item name="--selectone--">
-			-- select one --
-		</combo_box.item>
-		<combo_box.item name="Anyone">
-			Jeder
-		</combo_box.item>
-		<combo_box.item name="Specificuser:">
-			Bestimmter Benutzer:
-		</combo_box.item>
+		<combo_box.item name="--selectone--" label="select one --" />
+		<combo_box.item name="Anyone" label="Jeder" />
+		<combo_box.item name="Specificuser:" label="Bestimmter Benutzer:" />
 	</combo_box>
 	<button label="Auswählen..." name="sell_to_select_agent" />
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/de/floater_settings_debug.xml b/indra/newview/skins/default/xui/de/floater_settings_debug.xml
index f34fa8a5be..034cfca017 100644
--- a/indra/newview/skins/default/xui/de/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/de/floater_settings_debug.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater name="settings_debug" title="Debug-Einstellungen">
 	<combo_box name="boolean_combo">
-		<combo_box.item name="TRUE">
-			WAHR
-		</combo_box.item>
-		<combo_box.item name="FALSE">
-			FALSCH
-		</combo_box.item>
+		<combo_box.item name="TRUE" label="WAHR" />
+		<combo_box.item name="FALSE" label="FALSCH" />
 	</combo_box>
 	<color_swatch label="Farbe" name="color_swatch" />
 	<spinner label="x" name="val_spinner_1" />
diff --git a/indra/newview/skins/default/xui/de/floater_snapshot.xml b/indra/newview/skins/default/xui/de/floater_snapshot.xml
index 9b3dd1fc01..ffd59af64a 100644
--- a/indra/newview/skins/default/xui/de/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/de/floater_snapshot.xml
@@ -38,75 +38,33 @@
 		Format
 	</text>
 	<combo_box label="Auflösung" name="postcard_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Aktuelles Fenster
-		</combo_box.item>
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Benutzerdefiniert
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Aktuelles Fenster" />
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="1024x768" label="1024x768" />
+		<combo_box.item name="Custom" label="Benutzerdefiniert" />
 	</combo_box>
 	<combo_box label="Auflösung" name="texture_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Aktuelles Fenster
-		</combo_box.item>
-		<combo_box.item name="Small(128x128)">
-			Klein (128x128)
-		</combo_box.item>
-		<combo_box.item name="Medium(256x256)">
-			Mittel (256x256)
-		</combo_box.item>
-		<combo_box.item name="Large(512x512)">
-			Groß (512x512)
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Benutzerdefiniert
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Aktuelles Fenster" />
+		<combo_box.item name="Small(128x128)" label="Klein (128x128)" />
+		<combo_box.item name="Medium(256x256)" label="Mittel (256x256)" />
+		<combo_box.item name="Large(512x512)" label="Groß (512x512)" />
+		<combo_box.item name="Custom" label="Benutzerdefiniert" />
 	</combo_box>
 	<combo_box label="Auflösung" name="local_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Aktuelles Fenster
-		</combo_box.item>
-		<combo_box.item name="320x240">
-			320x240
-		</combo_box.item>
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
-		<combo_box.item name="1280x1024">
-			1280x1024
-		</combo_box.item>
-		<combo_box.item name="1600x1200">
-			1600x1200
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Benutzerdefiniert
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Aktuelles Fenster" />
+		<combo_box.item name="320x240" label="320x240" />
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="1024x768" label="1024x768" />
+		<combo_box.item name="1280x1024" label="1280x1024" />
+		<combo_box.item name="1600x1200" label="1600x1200" />
+		<combo_box.item name="Custom" label="Benutzerdefiniert" />
 	</combo_box>
 	<combo_box label="Format" name="local_format_combo">
-		<combo_box.item name="PNG">
-			PNG
-		</combo_box.item>
-		<combo_box.item name="JPEG">
-			JPEG
-		</combo_box.item>
-		<combo_box.item name="BMP">
-			BMP
-		</combo_box.item>
+		<combo_box.item name="PNG" label="PNG" />
+		<combo_box.item name="JPEG" label="JPEG" />
+		<combo_box.item name="BMP" label="BMP" />
 	</combo_box>
 	<spinner label="Breite" name="snapshot_width"/>
 	<spinner label="Höhe" name="snapshot_height"/>
@@ -116,15 +74,9 @@
 		Aufnehmen:
 	</text>
 	<combo_box label="Bildlayer" name="layer_types" width="132" left="73">
-		<combo_box.item name="Colors">
-			Farben
-		</combo_box.item>
-		<combo_box.item name="Depth">
-			Tiefe
-		</combo_box.item>
-		<combo_box.item name="ObjectMattes">
-			Objektmasken
-		</combo_box.item>
+		<combo_box.item name="Colors" label="Farben" />
+		<combo_box.item name="Depth" label="Tiefe" />
+		<combo_box.item name="ObjectMattes" label="Objektmasken" />
 	</combo_box>
 	<check_box label="Interface auf Foto anzeigen" name="ui_check"/>
 	<check_box label="HUD-Objekte auf Foto anzeigen" name="hud_check"/>
diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml
index f83d57dc6f..483b8c454b 100644
--- a/indra/newview/skins/default/xui/de/floater_tools.xml
+++ b/indra/newview/skins/default/xui/de/floater_tools.xml
@@ -38,15 +38,9 @@
 		Zum Verschieben ziehen, zum Kopieren Umschalttaste-Ziehen
 	</text>
 	<combo_box name="combobox grid mode">
-		<combo_box.item name="World">
-			Welt
-		</combo_box.item>
-		<combo_box.item name="Local">
-			Lokal
-		</combo_box.item>
-		<combo_box.item name="Reference">
-			Referenz
-		</combo_box.item>
+		<combo_box.item name="World" label="Welt" />
+		<combo_box.item name="Local" label="Lokal" />
+		<combo_box.item name="Reference" label="Referenz" />
 	</combo_box>
 	<button label="" label_selected="" name="ToolCube" tool_tip="Würfel" />
 	<button label="" label_selected="" name="ToolPrism" tool_tip="Prisma" />
@@ -78,15 +72,9 @@
     <radio_item label="Land zurückführen" name="radio revert" />
   </radio_group>
 	<combo_box name="combobox brush size">
-		<combo_box.item name="Small">
-			Klein
-		</combo_box.item>
-		<combo_box.item name="Medium">
-			Mittel
-		</combo_box.item>
-		<combo_box.item name="Large">
-			Groß
-		</combo_box.item>
+		<combo_box.item name="Small" label="Klein" />
+		<combo_box.item name="Medium" label="Mittel" />
+		<combo_box.item name="Large" label="Groß" />
 	</combo_box>
 	<text name="Strength:">
 		Stärke:
@@ -178,27 +166,13 @@
 				Bei Linksklicken:
 			</text>
 			<combo_box name="clickaction" width="178">
-				<combo_box.item name="Touch/grab(default)">
-					Berühren/Greifen (Standard)
-				</combo_box.item>
-				<combo_box.item name="Sitonobject">
-					Auf Objekt sitzen
-				</combo_box.item>
-				<combo_box.item name="Buyobject">
-					Objekt kaufen
-				</combo_box.item>
-				<combo_box.item name="Payobject">
-					Objekt bezahlen
-				</combo_box.item>
-				<combo_box.item name="Open">
-					Öffnen
-				</combo_box.item>
-				<combo_box.item name="Play">
-					Parzellenmedien wiedergeben
-				</combo_box.item>
-				<combo_box.item name="Opemmedia">
-					Parzellenmedien öffnen
-				</combo_box.item>
+				<combo_box.item name="Touch/grab(default)" label="Berühren/Greifen (Standard)" />
+				<combo_box.item name="Sitonobject" label="Auf Objekt sitzen" />
+				<combo_box.item name="Buyobject" label="Objekt kaufen" />
+				<combo_box.item name="Payobject" label="Objekt bezahlen" />
+				<combo_box.item name="Open" label="Öffnen" />
+				<combo_box.item name="Play" label="Parzellenmedien wiedergeben" />
+				<combo_box.item name="Opemmedia" label="Parzellenmedien öffnen" />
 			</combo_box>
 			<text name="B:">
 				B:
@@ -286,56 +260,26 @@
 				Material
 			</text>
 			<combo_box name="material">
-				<combo_box.item name="Stone">
-					Stein
-				</combo_box.item>
-				<combo_box.item name="Metal">
-					Metall
-				</combo_box.item>
-				<combo_box.item name="Glass">
-					Glas
-				</combo_box.item>
-				<combo_box.item name="Wood">
-					Holz
-				</combo_box.item>
-				<combo_box.item name="Flesh">
-					Fleisch
-				</combo_box.item>
-				<combo_box.item name="Plastic">
-					Kunststoff
-				</combo_box.item>
-				<combo_box.item name="Rubber">
-					Gummi
-				</combo_box.item>
+				<combo_box.item name="Stone" label="Stein" />
+				<combo_box.item name="Metal" label="Metall" />
+				<combo_box.item name="Glass" label="Glas" />
+				<combo_box.item name="Wood" label="Holz" />
+				<combo_box.item name="Flesh" label="Fleisch" />
+				<combo_box.item name="Plastic" label="Kunststoff" />
+				<combo_box.item name="Rubber" label="Gummi" />
 			</combo_box>
 			<text left="115" name="label basetype">
 				Bausteintyp
 			</text>
 			<combo_box left="115" name="comboBaseType">
-				<combo_box.item name="Box">
-					Quader
-				</combo_box.item>
-				<combo_box.item name="Cylinder">
-					Zylinder
-				</combo_box.item>
-				<combo_box.item name="Prism">
-					Prisma
-				</combo_box.item>
-				<combo_box.item name="Sphere">
-					Kugel
-				</combo_box.item>
-				<combo_box.item name="Torus">
-					Torus
-				</combo_box.item>
-				<combo_box.item name="Tube">
-					Rohr
-				</combo_box.item>
-				<combo_box.item name="Ring">
-					Ring
-				</combo_box.item>
-				<combo_box.item name="Sculpted">
-					Geformt
-				</combo_box.item>
+				<combo_box.item name="Box" label="Quader" />
+				<combo_box.item name="Cylinder" label="Zylinder" />
+				<combo_box.item name="Prism" label="Prisma" />
+				<combo_box.item name="Sphere" label="Kugel" />
+				<combo_box.item name="Torus" label="Torus" />
+				<combo_box.item name="Tube" label="Rohr" />
+				<combo_box.item name="Ring" label="Ring" />
+				<combo_box.item name="Sculpted" label="Geformt" />
 			</combo_box>
 			<text left="115" name="text cut" width="146">
 				Pfadschnitt Beginn und Ende
@@ -354,18 +298,10 @@
 				Hohlform
 			</text>
 			<combo_box left="115" name="hole">
-				<combo_box.item name="Default">
-					Standard
-				</combo_box.item>
-				<combo_box.item name="Circle">
-					Kreis
-				</combo_box.item>
-				<combo_box.item name="Square">
-					Quadrat
-				</combo_box.item>
-				<combo_box.item name="Triangle">
-					Dreieck
-				</combo_box.item>
+				<combo_box.item name="Default" label="Standard" />
+				<combo_box.item name="Circle" label="Kreis" />
+				<combo_box.item name="Square" label="Quadrat" />
+				<combo_box.item name="Triangle" label="Dreieck" />
 			</combo_box>
 			<text left="115" name="text twist">
 				Torsion
@@ -415,21 +351,11 @@
 				Naht
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_box.item name="None">
-					(keiner)
-				</combo_box.item>
-				<combo_box.item name="Sphere">
-					Kugel
-				</combo_box.item>
-				<combo_box.item name="Torus">
-					Torus
-				</combo_box.item>
-				<combo_box.item name="Plane">
-					Fläche
-				</combo_box.item>
-				<combo_box.item name="Cylinder">
-					Zylinder
-				</combo_box.item>
+				<combo_box.item name="None" label="keiner)" />
+				<combo_box.item name="Sphere" label="Kugel" />
+				<combo_box.item name="Torus" label="Torus" />
+				<combo_box.item name="Plane" label="Fläche" />
+				<combo_box.item name="Cylinder" label="Zylinder" />
 			</combo_box>
 		</panel>
 		<panel label="Eigenschaften" name="Features">
@@ -474,88 +400,40 @@
 				Zuordnung
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_box.item name="Default">
-					Standard
-				</combo_box.item>
-				<combo_box.item name="Planar">
-					Eben
-				</combo_box.item>
+				<combo_box.item name="Default" label="Standard" />
+				<combo_box.item name="Planar" label="Eben" />
 			</combo_box>
 			<text name="label shininess">
 				Glanz
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_box.item name="None">
-					Kein
-				</combo_box.item>
-				<combo_box.item name="Low">
-					Niedrig
-				</combo_box.item>
-				<combo_box.item name="Medium">
-					Mittel
-				</combo_box.item>
-				<combo_box.item name="High">
-					Hoch
-				</combo_box.item>
+				<combo_box.item name="None" label="Kein" />
+				<combo_box.item name="Low" label="Niedrig" />
+				<combo_box.item name="Medium" label="Mittel" />
+				<combo_box.item name="High" label="Hoch" />
 			</combo_box>
 			<text name="label bumpiness">
 				Holprigkeit
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_box.item name="None">
-					Keine
-				</combo_box.item>
-				<combo_box.item name="Brightness">
-					Helligkeit
-				</combo_box.item>
-				<combo_box.item name="Darkness">
-					Dunkelheit
-				</combo_box.item>
-				<combo_box.item name="woodgrain">
-					Holzmaserung
-				</combo_box.item>
-				<combo_box.item name="bark">
-					Rinde
-				</combo_box.item>
-				<combo_box.item name="bricks">
-					Ziegel
-				</combo_box.item>
-				<combo_box.item name="checker">
-					Karo
-				</combo_box.item>
-				<combo_box.item name="concrete">
-					Beton
-				</combo_box.item>
-				<combo_box.item name="crustytile">
-					verkrustete Fliesen
-				</combo_box.item>
-				<combo_box.item name="cutstone">
-					Steinplatten
-				</combo_box.item>
-				<combo_box.item name="discs">
-					Scheiben
-				</combo_box.item>
-				<combo_box.item name="gravel">
-					Kies
-				</combo_box.item>
-				<combo_box.item name="petridish">
-					Petrischale
-				</combo_box.item>
-				<combo_box.item name="siding">
-					Verkleidung
-				</combo_box.item>
-				<combo_box.item name="stonetile">
-					Steinfliesen
-				</combo_box.item>
-				<combo_box.item name="stucco">
-					Stuck
-				</combo_box.item>
-				<combo_box.item name="suction">
-					Saugen
-				</combo_box.item>
-				<combo_box.item name="weave">
-					gewoben
-				</combo_box.item>
+				<combo_box.item name="None" label="Keine" />
+				<combo_box.item name="Brightness" label="Helligkeit" />
+				<combo_box.item name="Darkness" label="Dunkelheit" />
+				<combo_box.item name="woodgrain" label="Holzmaserung" />
+				<combo_box.item name="bark" label="Rinde" />
+				<combo_box.item name="bricks" label="Ziegel" />
+				<combo_box.item name="checker" label="Karo" />
+				<combo_box.item name="concrete" label="Beton" />
+				<combo_box.item name="crustytile" label="verkrustete Fliesen" />
+				<combo_box.item name="cutstone" label="Steinplatten" />
+				<combo_box.item name="discs" label="Scheiben" />
+				<combo_box.item name="gravel" label="Kies" />
+				<combo_box.item name="petridish" label="Petrischale" />
+				<combo_box.item name="siding" label="Verkleidung" />
+				<combo_box.item name="stonetile" label="Steinfliesen" />
+				<combo_box.item name="stucco" label="Stuck" />
+				<combo_box.item name="suction" label="Saugen" />
+				<combo_box.item name="weave" label="gewoben" />
 			</combo_box>
 			<text name="tex scale">
 				Wiederholungen
diff --git a/indra/newview/skins/default/xui/de/floater_world_map.xml b/indra/newview/skins/default/xui/de/floater_world_map.xml
index b937fdda01..52f87fc32b 100644
--- a/indra/newview/skins/default/xui/de/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/de/floater_world_map.xml
@@ -42,14 +42,10 @@
 
 	<check_box label=" " name="event_mature_chk"/>
 	<combo_box label="Online-Freunde" name="friend combo" tool_tip="Freund, der auf Karte angezeigt werden soll">
-		<combo_box.item name="none_selected">
-			Online-Freunde
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Online-Freunde" />
 	</combo_box>
 	<combo_box label="Landmarken" name="landmark combo" tool_tip="Landmarke, die auf Karte angezeigt werden soll">
-		<combo_box.item name="none_selected">
-			Landmarken
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Landmarken" />
 	</combo_box>
 	<line_editor label="Nach Regionsname suchen" name="location" tool_tip="Geben Sie den Namen einer Region ein"/>
 	<button label="Suchen" name="DoSearch" tool_tip="Nach einer Region suchen"/>
diff --git a/indra/newview/skins/default/xui/de/panel_login.xml b/indra/newview/skins/default/xui/de/panel_login.xml
index 5b5a6d8c77..3f459050b1 100644
--- a/indra/newview/skins/default/xui/de/panel_login.xml
+++ b/indra/newview/skins/default/xui/de/panel_login.xml
@@ -13,15 +13,9 @@
 		Startposition:
 	</text>
 	<combo_box name="start_location_combo">
-		<combo_box.item name="MyHome">
-			Mein Heimatort
-		</combo_box.item>
-		<combo_box.item name="MyLastLocation">
-			Mein letzter Standort
-		</combo_box.item>
-		<combo_box.item name="Typeregionname">
-			&lt;Region eingeben&gt;
-		</combo_box.item>
+		<combo_box.item name="MyHome" label="Mein Heimatort" />
+		<combo_box.item name="MyLastLocation" label="Mein letzter Standort" />
+		<combo_box.item name="Typeregionname" label="lt;Region eingeben&gt;" />
 	</combo_box>
 	<check_box label="Kennwort merken" name="remember_check"/>
 	<text name="full_screen_text">
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
index 2276fd8a9d..4717f21a0b 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
@@ -21,21 +21,11 @@
 		Fenstergröße:
 	</text>
 	<combo_box left="115" name="windowsize combo">
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="720x480">
-			720x480 (NTSC)
-		</combo_box.item>
-		<combo_box.item name="768x576">
-			768x576 (PAL)
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="720x480" label="720x480 (NTSC)" />
+		<combo_box.item name="768x576" label="768x576 (PAL)" />
+		<combo_box.item name="1024x768" label="1024x768" />
 	</combo_box>
 	<text name="DisplayResLabel" width="100">
 		Anzeigeauflösung:
@@ -45,18 +35,10 @@
 		Aspektverhältnis:
 	</text>
 	<combo_box left="115" name="aspect_ratio" tool_tip="Breite/Höhe">
-		<combo_box.item type="string" length="1" name="4:3(StandardCRT)">
-			4:3 (Standard-CRT)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)">
-			5:4 (1280x1024 LCD)
-		</combo_box.item>
-		<combo_box.item name="8:5(Widescreen)">
-			8:5 (Widescreen)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="16:9(Widescreen)">
-			16:9 (Widescreen)
-		</combo_box.item>
+		<combo_box.item type="string" length="1" name="4:3(StandardCRT)" label="4:3 (Standard-CRT)" />
+		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)" label="5:4 (1280x1024 LCD)" />
+		<combo_box.item name="8:5(Widescreen)" label="8:5 (Widescreen)" />
+		<combo_box.item type="string" length="1" name="16:9(Widescreen)" label="16:9 (Widescreen)" />
 	</combo_box>
 	<check_box label="Verhältnis automatisch erkennen" left="275" name="aspect_auto_detect" />
 	<text type="string" length="1" name="UI Size:">
diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml
index 526327d28b..93a463e5a6 100644
--- a/indra/newview/skins/default/xui/es/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/es/floater_about_land.xml
@@ -253,43 +253,19 @@ Vaya al menú Mundo &gt; Acerca del terreno o seleccione otra parcela para ver s
 			<check_box label="Sin &apos;empujones&apos;" name="PushRestrictCheck" tool_tip="Previene scripts que empujen. Marcando esta opción prevendrá que en su terreno haya comportamientos destructivos."/>
 			<check_box label="Mostrar la parcela en Buscar (30 L$/semana) en" name="ShowDirectoryCheck" tool_tip="Let people see this parcel in search results"/>
 			<combo_box name="land category">
-				<combo_item name="AnyCategory">
-					Cualquier categoría
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Localización Linden
-				</combo_item>
+				<combo_box.item name="AnyCategory" label="Cualquier categoría"/>
+				<combo_box.item name="LindenLocation" label="Localización Linden"/>
 
-				<combo_item name="Arts&amp;Culture">
-					Arte y Cultura
-				</combo_item>
-				<combo_item name="Business">
-					Negocios
-				</combo_item>
-				<combo_item name="Educational">
-					Educativo
-				</combo_item>
-				<combo_item name="Gaming">
-					Juegos de azar
-				</combo_item>
-				<combo_item name="Hangout">
-					Entretenimiento
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Para recién llegados
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parques y Naturaleza
-				</combo_item>
-				<combo_item name="Residential">
-					Residencial
-				</combo_item>
-				<combo_item name="Shopping">
-					Compras
-				</combo_item>
-				<combo_item name="Other">
-					Otra
-				</combo_item>
+				<combo_box.item name="Arts&amp;Culture" label="Arte y Cultura"/>
+				<combo_box.item name="Business" label="Negocios"/>
+				<combo_box.item name="Educational" label="Educativo"/>
+				<combo_box.item name="Gaming" label="Juegos de azar"/>
+				<combo_box.item name="Hangout" label="Entretenimiento"/>
+				<combo_box.item name="NewcomerFriendly" label="Para recién llegados"/>
+				<combo_box.item name="Parks&amp;Nature" label="Parques y Naturaleza"/>
+				<combo_box.item name="Residential" label="Residencial"/>
+				<combo_box.item name="Shopping" label="Compras"/>
+				<combo_box.item name="Other" label="Otra"/>
 			</combo_box>
 			<button label="?" label_selected="?" name="?"/>
 			<check_box name="MatureCheck" />
@@ -309,15 +285,9 @@ Vaya al menú Mundo &gt; Acerca del terreno o seleccione otra parcela para ver s
 				Punto de teleporte:
 			</text>
 			<combo_box name="landing type" tool_tip="Punto de teleporte: defina cómo manejar en su terreno los teleportes.">
-				<combo_item length="1" name="Blocked" type="string">
-					Bloqueado
-				</combo_item>
-				<combo_item length="1" name="LandingPoint" type="string">
-					Punto de llegada
-				</combo_item>
-				<combo_item length="1" name="Anywhere" type="string">
-					Cualquiera
-				</combo_item>
+				<combo_box.item length="1" name="Blocked" type="string" label="Bloqueado"/>
+				<combo_box.item length="1" name="LandingPoint" type="string" label="Punto de llegada"/>
+				<combo_box.item length="1" name="Anywhere" type="string" label="Cualquiera"/>
 			</combo_box>
 			<string name="push_restrict_text">
 				Sin &apos;empujones&apos;
@@ -402,12 +372,8 @@ los media:
 			<check_box label="Acceso permitido al grupo: [GROUP]" name="GroupCheck" tool_tip="Elija el grupo en la pestaña General."/>
 			<check_box label="Vender pases a:" name="PassCheck" tool_tip="Permitir acceso temporal a esta parcela"/>
 			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Cualquiera
-				</combo_item>
-				<combo_item name="Group">
-					Grupo
-				</combo_item>
+				<combo_box.item name="Anyone" label="Cualquiera"/>
+				<combo_box.item name="Group" label="Grupo"/>
 			</combo_box>
 			<spinner label="Precio en L$:" name="PriceSpin"/>
 			<spinner label="Horas de acceso:" name="HoursSpin"/>
diff --git a/indra/newview/skins/default/xui/es/floater_animation_preview.xml b/indra/newview/skins/default/xui/es/floater_animation_preview.xml
index a5b9847c4f..73ed06d1f7 100644
--- a/indra/newview/skins/default/xui/es/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/es/floater_animation_preview.xml
@@ -14,127 +14,53 @@
 		Posición de las manos
 	</text>
 	<combo_box label="" name="hand_pose_combo" tool_tip="Control de lo que hacen las manos durante la animación.">
-		<combo_item name="Spread">
-			Extendidas
-		</combo_item>
-		<combo_item name="Relaxed">
-			Relajadas
-		</combo_item>
-		<combo_item name="PointBoth">
-			Ambas señalan
-		</combo_item>
-		<combo_item name="Fist">
-			Puño
-		</combo_item>
-		<combo_item name="RelaxedLeft">
-			La izquierda relajada
-		</combo_item>
-		<combo_item name="PointLeft">
-			La izquierda señala
-		</combo_item>
-		<combo_item name="FistLeft">
-			Puño en la izquierda
-		</combo_item>
-		<combo_item name="RelaxedRight">
-			La derecha relajada
-		</combo_item>
-		<combo_item name="PointRight">
-			La derecha señala
-		</combo_item>
-		<combo_item name="FistRight">
-			Puño en la derecha
-		</combo_item>
-		<combo_item name="SaluteRight">
-			La derecha saluda
-		</combo_item>
-		<combo_item name="Typing">
-			Escribiendo
-		</combo_item>
-		<combo_item name="PeaceRight">
-			Paz en la derecha
-		</combo_item>
+		<combo_box.item name="Spread" label="Extendidas"/>
+		<combo_box.item name="Relaxed" label="Relajadas"/>
+		<combo_box.item name="PointBoth" label="Ambas señalan"/>
+		<combo_box.item name="Fist" label="Puño"/>
+		<combo_box.item name="RelaxedLeft" label="La izquierda relajada"/>
+		<combo_box.item name="PointLeft" label="La izquierda señala"/>
+		<combo_box.item name="FistLeft" label="Puño en la izquierda"/>
+		<combo_box.item name="RelaxedRight" label="La derecha relajada"/>
+		<combo_box.item name="PointRight" label="La derecha señala"/>
+		<combo_box.item name="FistRight" label="Puño en la derecha"/>
+		<combo_box.item name="SaluteRight" label="La derecha saluda"/>
+		<combo_box.item name="Typing" label="Escribiendo"/>
+		<combo_box.item name="PeaceRight" label="Paz en la derecha"/>
 	</combo_box>
 	<text name="emote_label">
 		Expresión
 	</text>
 	<combo_box label="" name="emote_combo" tool_tip="Controle qué hace la cara durante la animación.">
-		<combo_item name="[None]">
-			[Nada]
-		</combo_item>
-		<combo_item name="Aaaaah">
-			Aaaaah
-		</combo_item>
-		<combo_item name="Afraid">
-			Con miedo
-		</combo_item>
-		<combo_item name="Angry">
-			Enfadada
-		</combo_item>
-		<combo_item name="BigSmile">
-			Gran sonrisa
-		</combo_item>
-		<combo_item name="Bored">
-			Aburrida
-		</combo_item>
-		<combo_item name="Cry">
-			Llorar
-		</combo_item>
-		<combo_item name="Disdain">
-			Desdén
-		</combo_item>
-		<combo_item name="Embarrassed">
-			Avergonzada
-		</combo_item>
-		<combo_item name="Frown">
-			Fruncir el ceño
-		</combo_item>
-		<combo_item name="Kiss">
-			Besar
-		</combo_item>
-		<combo_item name="Laugh">
-			Reír
-		</combo_item>
-		<combo_item name="Plllppt">
-			Sacar la lengua
-		</combo_item>
-		<combo_item name="Repulsed">
-			Rechazo
-		</combo_item>
-		<combo_item name="Sad">
-			Triste
-		</combo_item>
-		<combo_item name="Shrug">
-			Encogerse de hombros
-		</combo_item>
-		<combo_item name="Smile">
-			Sonrisa
-		</combo_item>
-		<combo_item name="Surprise">
-			Sorpresa
-		</combo_item>
-		<combo_item name="Wink">
-			Guiño
-		</combo_item>
-		<combo_item name="Worry">
-			Preocupación
-		</combo_item>
+		<combo_box.item name="[None]" label="Nada]"/>
+		<combo_box.item name="Aaaaah" label="Aaaaah"/>
+		<combo_box.item name="Afraid" label="Con miedo"/>
+		<combo_box.item name="Angry" label="Enfadada"/>
+		<combo_box.item name="BigSmile" label="Gran sonrisa"/>
+		<combo_box.item name="Bored" label="Aburrida"/>
+		<combo_box.item name="Cry" label="Llorar"/>
+		<combo_box.item name="Disdain" label="Desdén"/>
+		<combo_box.item name="Embarrassed" label="Avergonzada"/>
+		<combo_box.item name="Frown" label="Fruncir el ceño"/>
+		<combo_box.item name="Kiss" label="Besar"/>
+		<combo_box.item name="Laugh" label="Reír"/>
+		<combo_box.item name="Plllppt" label="Sacar la lengua"/>
+		<combo_box.item name="Repulsed" label="Rechazo"/>
+		<combo_box.item name="Sad" label="Triste"/>
+		<combo_box.item name="Shrug" label="Encogerse de hombros"/>
+		<combo_box.item name="Smile" label="Sonrisa"/>
+		<combo_box.item name="Surprise" label="Sorpresa"/>
+		<combo_box.item name="Wink" label="Guiño"/>
+		<combo_box.item name="Worry" label="Preocupación"/>
 	</combo_box>
 	<text name="preview_label">
 		Vista previa mientras
 	</text>
 	<combo_box label="" name="preview_base_anim" tool_tip="Compruebe cómo se comporta su animación a la vez que el avatar realiza acciones comunes.">
-		<combo_item name="Standing">
-			Estar de pie
-		</combo_item>
-		<combo_item name="Walking">
-			Caminar
-		</combo_item>
-		<combo_item name="Sitting">
-			Estar sentado
-		</combo_item>
-		<combo_item name="Flying">
-			Volar
-		</combo_item>
+		<combo_box.item name="Standing" label="Estar de pie"/>
+		<combo_box.item name="Walking" label="Caminar"/>
+		<combo_box.item name="Sitting" label="Estar sentado"/>
+		<combo_box.item name="Flying" label="Volar"/>
 	</combo_box>
 	<spinner label="Combinar (sec)" name="ease_in_time" tool_tip="Tiempo (en segundos) en el que se combinan las animaciones."/>
 	<spinner label="Dejar de combinar (sec)" name="ease_out_time" tool_tip="Tiempo (en segundos) en el que dejan de combinarse las animaciones."/>
diff --git a/indra/newview/skins/default/xui/es/floater_buy_land.xml b/indra/newview/skins/default/xui/es/floater_buy_land.xml
index c5286b1d14..4203bc850c 100644
--- a/indra/newview/skins/default/xui/es/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/es/floater_buy_land.xml
@@ -66,15 +66,9 @@
 		Sólo pueden ser propietarios de terreno los miembros premium.
 	</text>
 	<combo_box name="account_level">
-		<combo_box.item name="US$9.95/month,billedmonthly">
-			9.95 US$/mes, facturados mensualmente
-		</combo_box.item>
-		<combo_box.item name="US$7.50/month,billedquarterly">
-			7.50 US$/mes, facturados cuatrimestralmente
-		</combo_box.item>
-		<combo_box.item name="US$6.00/month,billedannually">
-			6.00 US$/mes, facturados anualmente
-		</combo_box.item>
+		<combo_box.item name="US$9.95/month,billedmonthly" label="9.95 US$/mes, facturados mensualmente" />
+		<combo_box.item name="US$7.50/month,billedquarterly" label="7.50 US$/mes, facturados cuatrimestralmente" />
+		<combo_box.item name="US$6.00/month,billedannually" label="6.00 US$/mes, facturados anualmente" />
 	</combo_box>
 	<text name="land_use_action">
 		Aumenta su cuota mensual por uso de terreno a 40 US$/mes.
diff --git a/indra/newview/skins/default/xui/es/floater_god_tools.xml b/indra/newview/skins/default/xui/es/floater_god_tools.xml
index b429d1ccaf..1ba0b685c6 100644
--- a/indra/newview/skins/default/xui/es/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/es/floater_god_tools.xml
@@ -114,29 +114,17 @@
 				Destino:
 			</text>
 			<combo_box name="destination">
-				<combo_box.item name="Selection">
-					Selección
-				</combo_box.item>
-				<combo_box.item name="AgentRegion">
-					Agente de región
-				</combo_box.item>
+				<combo_box.item name="Selection" label="Selección" />
+				<combo_box.item name="AgentRegion" label="Agente de región" />
 			</combo_box>
 			<text name="Request:">
 				Exigencia:
 			</text>
 			<combo_box name="request">
-				<combo_box.item name="colliders&lt;steps&gt;">
-					colisionadores &lt;pasos&gt;
-				</combo_box.item>
-				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
-					scripts &lt;contar&gt;,&lt;patrón opcional&gt;
-				</combo_box.item>
-				<combo_box.item name="objects&lt;pattern&gt;">
-					objetos &lt;patrón&gt;
-				</combo_box.item>
-				<combo_box.item name="rez&lt;asset_id&gt;">
-					rez &lt;asset_id&gt;
-				</combo_box.item>
+				<combo_box.item name="colliders&lt;steps&gt;" label="colisionadores &lt;pasos&gt;" />
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;" label="scripts &lt;contar&gt;,&lt;patrón opcional&gt;" />
+				<combo_box.item name="objects&lt;pattern&gt;" label="objetos &lt;patrón&gt;" />
+				<combo_box.item name="rez&lt;asset_id&gt;" label="rez &lt;asset_id&gt;" />
 			</combo_box>
 			<text name="Parameter:">
 				Parámetro:
diff --git a/indra/newview/skins/default/xui/es/floater_hardware_settings.xml b/indra/newview/skins/default/xui/es/floater_hardware_settings.xml
index 986c2f117b..197b3a8f39 100644
--- a/indra/newview/skins/default/xui/es/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/es/floater_hardware_settings.xml
@@ -8,21 +8,11 @@
 		Antialiasing:
 	</text>
 	<combo_box label="Antialiasing" name="fsaa">
-		<combo_item name="FSAADisabled">
-			Desactivado
-		</combo_item>
-		<combo_item name="2x">
-			2x
-		</combo_item>
-		<combo_item name="4x">
-			4x
-		</combo_item>
-		<combo_item name="8x">
-			8x
-		</combo_item>
-		<combo_item name="16x">
-			16x
-		</combo_item>
+		<combo_box.item name="FSAADisabled" label="Desactivado"/>
+		<combo_box.item name="2x" label="2x"/>
+		<combo_box.item name="4x" label="4x"/>
+		<combo_box.item name="8x" label="8x"/>
+		<combo_box.item name="16x" label="16x"/>
 	</combo_box>
 	<spinner label="Gamma:" name="gamma"/>
 	<text name="(brightness, lower is brighter)">
diff --git a/indra/newview/skins/default/xui/es/floater_image_preview.xml b/indra/newview/skins/default/xui/es/floater_image_preview.xml
index 8e242d848d..cd036fc050 100644
--- a/indra/newview/skins/default/xui/es/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/es/floater_image_preview.xml
@@ -10,36 +10,16 @@
 		Previsualizar la imagen como:
 	</text>
 	<combo_box label="Tipo de ropa" name="clothing_type_combo">
-		<combo_box.item name="Image">
-			Imagen
-		</combo_box.item>
-		<combo_box.item name="Hair">
-			Pelo
-		</combo_box.item>
-		<combo_box.item name="FemaleHead">
-			Cabeza de mujer
-		</combo_box.item>
-		<combo_box.item name="FemaleUpperBody">
-			Mujer: parte superior del cuerpo
-		</combo_box.item>
-		<combo_box.item name="FemaleLowerBody">
-			Mujer: parte inferior del cuerpo
-		</combo_box.item>
-		<combo_box.item name="MaleHead">
-			Cabeza de varón
-		</combo_box.item>
-		<combo_box.item name="MaleUpperBody">
-			Varón: parte superior del cuerpo
-		</combo_box.item>
-		<combo_box.item name="MaleLowerBody">
-			Varón: parte inferior del cuerpo
-		</combo_box.item>
-		<combo_box.item name="Skirt">
-			Falda
-		</combo_box.item>
-		<combo_item name="SculptedPrim">
-			Prim sculpted
-		</combo_item>
+		<combo_box.item name="Image" label="Imagen" />
+		<combo_box.item name="Hair" label="Pelo" />
+		<combo_box.item name="FemaleHead" label="Cabeza de mujer" />
+		<combo_box.item name="FemaleUpperBody" label="Mujer: parte superior del cuerpo" />
+		<combo_box.item name="FemaleLowerBody" label="Mujer: parte inferior del cuerpo" />
+		<combo_box.item name="MaleHead" label="Cabeza de varón" />
+		<combo_box.item name="MaleUpperBody" label="Varón: parte superior del cuerpo" />
+		<combo_box.item name="MaleLowerBody" label="Varón: parte inferior del cuerpo" />
+		<combo_box.item name="Skirt" label="Falda" />
+		<combo_box.item name="SculptedPrim" label="Prim sculpted"/>
 	</combo_box>
 	<text name="bad_image_text">
 		Imposible leer la imagen.
diff --git a/indra/newview/skins/default/xui/es/floater_report_abuse.xml b/indra/newview/skins/default/xui/es/floater_report_abuse.xml
index 4e1782995c..1d3244524f 100644
--- a/indra/newview/skins/default/xui/es/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/es/floater_report_abuse.xml
@@ -37,123 +37,51 @@
 		Hendrerit Vulputate
 	</text>
 	<combo_box name="category_combo" tool_tip="Categoría -- Elija la categoría que describa mejor esta denuncia">
-		<combo_item name="Select_category">
-			Elegir la categoría
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Edad &gt; Jugar a ser niño
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Edad &gt; Residente adulto en Teen Second Life
-		</combo_item>
+		<combo_box.item name="Select_category" label="Elegir la categoría"/>
+		<combo_box.item name="Age__Age_play" label="Edad &gt; Jugar a ser niño"/>
+		<combo_box.item name="Age__Adult_resident_on_Teen_Second_Life" label="Edad &gt; Residente adulto en Teen Second Life"/>
 		
 		
 		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Ataque &gt; Sandbox de combate / Zona no segura
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Ataque &gt; Zona segura
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Ataque &gt; Sandbox de prueba de armas
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Comercio &gt; Error en la entrega de productos o servicios
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Indiscreción &gt; Información del mundo real
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Indiscreción &gt; Monitorizar a distancia el chat
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Indiscreción &gt; Información Se Second Life, el chat o los MI
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Perturbando la paz &gt; Abuso de los recursos de la región
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Perturbando la paz &gt; Excesivos objetos con script
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Perturbando la paz &gt; Objeto basura
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Perturbando la paz &gt; Spam (mensajes no pedidos) repetitivo
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Perturbando la paz &gt; Publicidad no deseada
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Fraude &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Fraude &gt; Terreno
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Fraude &gt; Esquemas piramidales o cadenas de cartas
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Fraude &gt; US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Acoso &gt; Anuncios múltiples / Spam visual
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Acoso &gt; Difamación de individuos o grupos
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Acoso &gt; Impedir el movimiento
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Acoso &gt; Acoso sexual
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Acoso &gt; Incitar a, o pedir, que otros violen las Condiciones del Servicio
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Acoso &gt; Abuso verbal
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Indecencia &gt; En general, contenido o conducta ofensivos
-		</combo_item>
+		<combo_box.item name="Assault__Combat_sandbox___unsafe_area" label="Ataque &gt; Sandbox de combate / Zona no segura"/>
+		<combo_box.item name="Assault__Safe_area" label="Ataque &gt; Zona segura"/>
+		<combo_box.item name="Assault__Weapons_testing_sandbox" label="Ataque &gt; Sandbox de prueba de armas"/>
+		<combo_box.item name="Commerce__Failure_to_deliver_product_or_service" label="Comercio &gt; Error en la entrega de productos o servicios"/>
+		<combo_box.item name="Disclosure__Real_world_information" label="Indiscreción &gt; Información del mundo real"/>
+		<combo_box.item name="Disclosure__Remotely_monitoring chat" label="Indiscreción &gt; Monitorizar a distancia el chat"/>
+		<combo_box.item name="Disclosure__Second_Life_information_chat_IMs" label="Indiscreción &gt; Información Se Second Life, el chat o los MI"/>
+		<combo_box.item name="Disturbing_the_peace__Unfair_use_of_region_resources" label="Perturbando la paz &gt; Abuso de los recursos de la región"/>
+		<combo_box.item name="Disturbing_the_peace__Excessive_scripted_objects" label="Perturbando la paz &gt; Excesivos objetos con script"/>
+		<combo_box.item name="Disturbing_the_peace__Object_littering" label="Perturbando la paz &gt; Objeto basura"/>
+		<combo_box.item name="Disturbing_the_peace__Repetitive_spam" label="Perturbando la paz &gt; Spam (mensajes no pedidos) repetitivo"/>
+		<combo_box.item name="Disturbing_the_peace__Unwanted_advert_spam" label="Perturbando la paz &gt; Publicidad no deseada"/>
+		<combo_box.item name="Fraud__L$" label="Fraude &gt; L$"/>
+		<combo_box.item name="Fraud__Land" label="Fraude &gt; Terreno"/>
+		<combo_box.item name="Fraud__Pyramid_scheme_or_chain_letter" label="Fraude &gt; Esquemas piramidales o cadenas de cartas"/>
+		<combo_box.item name="Fraud__US$" label="Fraude &gt; US$"/>
+		<combo_box.item name="Harassment__Advert_farms___visual_spam" label="Acoso &gt; Anuncios múltiples / Spam visual"/>
+		<combo_box.item name="Harassment__Defaming_individuals_or_groups" label="Acoso &gt; Difamación de individuos o grupos"/>
+		<combo_box.item name="Harassment__Impeding_movement" label="Acoso &gt; Impedir el movimiento"/>
+		<combo_box.item name="Harassment__Sexual_harassment" label="Acoso &gt; Acoso sexual"/>
+		<combo_box.item name="Harassment__Solicting_inciting_others_to_violate_ToS" label="Acoso &gt; Incitar a, o pedir, que otros violen las Condiciones del Servicio"/>
+		<combo_box.item name="Harassment__Verbal_abuse" label="Acoso &gt; Abuso verbal"/>
+		<combo_box.item name="Indecency__Broadly_offensive_content_or_conduct" label="Indecencia &gt; En general, contenido o conducta ofensivos"/>
 		
 		
 		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Indecencia &gt; Nombre inapropiado del avatar
-		</combo_item>
+		<combo_box.item name="Indecency__Inappropriate_avatar_name" label="Indecencia &gt; Nombre inapropiado del avatar"/>
 		
 		
 		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Infracción de la propiedad intelectual &gt; Eliminación de contenidos
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Infracción de la propiedad intelectual &gt; CopyBot o Exploit (programa malicioso) de permisos
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intolerancia
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Terreno &gt; Abuso de los recursos de un sandbox
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Terreno &gt; Invasión &gt; Objetos/Texturas
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Terreno &gt; Invasión &gt; Partículas
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Terreno &gt; Invasión &gt; Árboles/Plantas
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Apuestas/Juego
-		</combo_item>
-		<combo_item name="Other">
-			Otra
-		</combo_item>
+		<combo_box.item name="Intellectual_property_infringement_Content_Removal" label="Infracción de la propiedad intelectual &gt; Eliminación de contenidos"/>
+		<combo_box.item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit" label="Infracción de la propiedad intelectual &gt; CopyBot o Exploit (programa malicioso) de permisos"/>
+		<combo_box.item name="Intolerance" label="Intolerancia"/>
+		<combo_box.item name="Land__Abuse_of_sandbox_resources" label="Terreno &gt; Abuso de los recursos de un sandbox"/>
+		<combo_box.item name="Land__Encroachment__Objects_textures" label="Terreno &gt; Invasión &gt; Objetos/Texturas"/>
+		<combo_box.item name="Land__Encroachment__Particles" label="Terreno &gt; Invasión &gt; Partículas"/>
+		<combo_box.item name="Land__Encroachment__Trees_plants" label="Terreno &gt; Invasión &gt; Árboles/Plantas"/>
+		<combo_box.item name="Wagering_gambling" label="Apuestas/Juego"/>
+		<combo_box.item name="Other" label="Otra"/>
 	</combo_box>
 	<text name="abuser_name_title">
 		Nombre del infractor:
diff --git a/indra/newview/skins/default/xui/es/floater_sell_land.xml b/indra/newview/skins/default/xui/es/floater_sell_land.xml
index 8d47bad6dc..4127fafc98 100644
--- a/indra/newview/skins/default/xui/es/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/es/floater_sell_land.xml
@@ -34,15 +34,9 @@
 		Elija si venderlo a cualquiera o a un comprador concreto.
 	</text>
 	<combo_box name="sell_to">
-		<combo_box.item name="--selectone--">
-			-- seleccione --
-		</combo_box.item>
-		<combo_box.item name="Anyone">
-			Cualquiera
-		</combo_box.item>
-		<combo_box.item name="Specificuser:">
-			Un usuario concreto:
-		</combo_box.item>
+		<combo_box.item name="--selectone--" label="seleccione --" />
+		<combo_box.item name="Anyone" label="Cualquiera" />
+		<combo_box.item name="Specificuser:" label="Un usuario concreto:" />
 	</combo_box>
 	<button label="Seleccionar..." name="sell_to_select_agent"/>
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/es/floater_settings_debug.xml b/indra/newview/skins/default/xui/es/floater_settings_debug.xml
index 28fb1478d3..b87ee1bffc 100644
--- a/indra/newview/skins/default/xui/es/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/es/floater_settings_debug.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater name="settings_debug" title="Configuración del depurador">
 	<combo_box name="boolean_combo">
-		<combo_box.item name="TRUE">
-			TRUE
-		</combo_box.item>
-		<combo_box.item name="FALSE">
-			FALSE
-		</combo_box.item>
+		<combo_box.item name="TRUE" label="TRUE" />
+		<combo_box.item name="FALSE" label="FALSE" />
 	</combo_box>
 	<color_swatch label="Color" name="color_swatch"/>
 	<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/es/floater_snapshot.xml b/indra/newview/skins/default/xui/es/floater_snapshot.xml
index 0461f996f6..9d60b84688 100644
--- a/indra/newview/skins/default/xui/es/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/es/floater_snapshot.xml
@@ -34,75 +34,33 @@
 		Formato
 	</text>
 	<combo_box label="Resolución" name="postcard_size_combo">
-		<combo_item name="CurrentWindow">
-			Ventana actual
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="Custom">
-			Personalizar
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Ventana actual"/>
+		<combo_box.item name="640x480" label="640x480"/>
+		<combo_box.item name="800x600" label="800x600"/>
+		<combo_box.item name="1024x768" label="1024x768"/>
+		<combo_box.item name="Custom" label="Personalizar"/>
 	</combo_box>
 	<combo_box label="Resolución" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
-			Ventana actual
-		</combo_item>
-		<combo_item name="Small(128x128)">
-			Pequeño (128x128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
-			Medio (256x256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
-			Grande (512x512)
-		</combo_item>
-		<combo_item name="Custom">
-			Personalizar
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Ventana actual"/>
+		<combo_box.item name="Small(128x128)" label="Pequeño (128x128)"/>
+		<combo_box.item name="Medium(256x256)" label="Medio (256x256)"/>
+		<combo_box.item name="Large(512x512)" label="Grande (512x512)"/>
+		<combo_box.item name="Custom" label="Personalizar"/>
 	</combo_box>
 	<combo_box label="Resolución" name="local_size_combo">
-		<combo_item name="CurrentWindow">
-			Ventana actual
-		</combo_item>
-		<combo_item name="320x240">
-			320x240
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="1280x1024">
-			1280x1024
-		</combo_item>
-		<combo_item name="1600x1200">
-			1600x1200
-		</combo_item>
-		<combo_item name="Custom">
-			Personalizar
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Ventana actual"/>
+		<combo_box.item name="320x240" label="320x240"/>
+		<combo_box.item name="640x480" label="640x480"/>
+		<combo_box.item name="800x600" label="800x600"/>
+		<combo_box.item name="1024x768" label="1024x768"/>
+		<combo_box.item name="1280x1024" label="1280x1024"/>
+		<combo_box.item name="1600x1200" label="1600x1200"/>
+		<combo_box.item name="Custom" label="Personalizar"/>
 	</combo_box>
 	<combo_box label="Formato" name="local_format_combo">
-		<combo_item name="PNG">
-			PNG
-		</combo_item>
-		<combo_item name="JPEG">
-			JPEG
-		</combo_item>
-		<combo_item name="BMP">
-			BMP
-		</combo_item>
+		<combo_box.item name="PNG" label="PNG"/>
+		<combo_box.item name="JPEG" label="JPEG"/>
+		<combo_box.item name="BMP" label="BMP"/>
 	</combo_box>
 	<spinner label="Ancho" name="snapshot_width"/>
 	<spinner label="Alto" name="snapshot_height"/>
@@ -112,15 +70,9 @@
 		Captura:
 	</text>
 	<combo_box label="Capas de la imagen" name="layer_types">
-		<combo_item name="Colors">
-			Colores
-		</combo_item>
-		<combo_item name="Depth">
-			Profundidad
-		</combo_item>
-		<combo_item name="ObjectMattes">
-			Bandas negras
-		</combo_item>
+		<combo_box.item name="Colors" label="Colores"/>
+		<combo_box.item name="Depth" label="Profundidad"/>
+		<combo_box.item name="ObjectMattes" label="Bandas negras"/>
 	</combo_box>
 	<check_box label="Incluir la interfaz en la foto" name="ui_check"/>
 	<check_box label="Incluir los HUD en la foto" name="hud_check"/>
diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml
index 0f3a3fd217..3b6bf732be 100644
--- a/indra/newview/skins/default/xui/es/floater_tools.xml
+++ b/indra/newview/skins/default/xui/es/floater_tools.xml
@@ -20,15 +20,9 @@
 		Modo de ajuste:
 	</text>
 	<combo_box name="combobox grid mode">
-		<combo_item name="World">
-			Mundo
-		</combo_item>
-		<combo_item name="Local">
-			Local
-		</combo_item>
-		<combo_item name="Reference">
-			Referencia
-		</combo_item>
+		<combo_box.item name="World" label="Mundo"/>
+		<combo_box.item name="Local" label="Local"/>
+		<combo_box.item name="Reference" label="Referencia"/>
 	</combo_box>
 	<check_box label="Estirar ambos lados" name="checkbox uniform"/>
 	<check_box label="Estirar las texturas" name="checkbox stretch textures"/>
@@ -64,15 +58,9 @@
 	<check_box label="Escarpar el terreno" name="radio noise"/>
 	<check_box label="Restablecer el terreno" name="radio revert"/>
 	<combo_box name="combobox brush size">
-		<combo_item name="Small">
-			Pequeño
-		</combo_item>
-		<combo_item name="Medium">
-			Medio
-		</combo_item>
-		<combo_item name="Large">
-			Grande
-		</combo_item>
+		<combo_box.item name="Small" label="Pequeño"/>
+		<combo_box.item name="Medium" label="Medio"/>
+		<combo_box.item name="Large" label="Grande"/>
 	</combo_box>
 	<text name="Strength:">
 		Fuerza:
@@ -155,27 +143,13 @@
 				Al pulsarlo con el botón izquierdo:
 			</text>
 			<combo_box name="clickaction">
-				<combo_item name="Touch/grab(default)">
-					Tocar/Agarrar (por defecto)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					Sentarse en el objeto
-				</combo_item>
-				<combo_item name="Buyobject">
-					Comprar el objeto
-				</combo_item>
-				<combo_item name="Payobject">
-					Pagar al objeto
-				</combo_item>
-				<combo_item name="Open">
-					Abrirlo
-				</combo_item>
-				<combo_item name="Play">
-					Ejecutar los media de la parcela
-				</combo_item>
-				<combo_item name="Opemmedia">
-					Abrir los media de la parcela
-				</combo_item>
+				<combo_box.item name="Touch/grab(default)" label="Tocar/Agarrar (por defecto)"/>
+				<combo_box.item name="Sitonobject" label="Sentarse en el objeto"/>
+				<combo_box.item name="Buyobject" label="Comprar el objeto"/>
+				<combo_box.item name="Payobject" label="Pagar al objeto"/>
+				<combo_box.item name="Open" label="Abrirlo"/>
+				<combo_box.item name="Play" label="Ejecutar los media de la parcela"/>
+				<combo_box.item name="Opemmedia" label="Abrir los media de la parcela"/>
 			</combo_box>
 			<text name="B:">
 				B:
@@ -259,56 +233,26 @@
 				Material
 			</text>
 			<combo_box name="material">
-				<combo_item name="Stone">
-					Piedra
-				</combo_item>
-				<combo_item name="Metal">
-					Metal
-				</combo_item>
-				<combo_item name="Glass">
-					Vidrio
-				</combo_item>
-				<combo_item name="Wood">
-					Madera
-				</combo_item>
-				<combo_item name="Flesh">
-					Carne
-				</combo_item>
-				<combo_item name="Plastic">
-					Plástico
-				</combo_item>
-				<combo_item name="Rubber">
-					Goma
-				</combo_item>
+				<combo_box.item name="Stone" label="Piedra"/>
+				<combo_box.item name="Metal" label="Metal"/>
+				<combo_box.item name="Glass" label="Vidrio"/>
+				<combo_box.item name="Wood" label="Madera"/>
+				<combo_box.item name="Flesh" label="Carne"/>
+				<combo_box.item name="Plastic" label="Plástico"/>
+				<combo_box.item name="Rubber" label="Goma"/>
 			</combo_box>
 			<text name="label basetype">
 				Tipo de objeto para construir
 			</text>
 			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					Caja
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilindro
-				</combo_item>
-				<combo_item name="Prism">
-					Prisma
-				</combo_item>
-				<combo_item name="Sphere">
-					Esfera
-				</combo_item>
-				<combo_item name="Torus">
-					Toroide
-				</combo_item>
-				<combo_item name="Tube">
-					Tubo
-				</combo_item>
-				<combo_item name="Ring">
-					Cono truncado
-				</combo_item>
-				<combo_item name="Sculpted">
-					Sculpted
-				</combo_item>
+				<combo_box.item name="Box" label="Caja"/>
+				<combo_box.item name="Cylinder" label="Cilindro"/>
+				<combo_box.item name="Prism" label="Prisma"/>
+				<combo_box.item name="Sphere" label="Esfera"/>
+				<combo_box.item name="Torus" label="Toroide"/>
+				<combo_box.item name="Tube" label="Tubo"/>
+				<combo_box.item name="Ring" label="Cono truncado"/>
+				<combo_box.item name="Sculpted" label="Sculpted"/>
 			</combo_box>
 			<text name="text cut">
 				Inicio y Fin del corte
@@ -325,18 +269,10 @@
 				Forma del hueco
 			</text>
 			<combo_box name="hole">
-				<combo_item name="Default">
-					Por defecto
-				</combo_item>
-				<combo_item name="Circle">
-					Círculo
-				</combo_item>
-				<combo_item name="Square">
-					Cuadrado
-				</combo_item>
-				<combo_item name="Triangle">
-					Triángulo
-				</combo_item>
+				<combo_box.item name="Default" label="Por defecto"/>
+				<combo_box.item name="Circle" label="Círculo"/>
+				<combo_box.item name="Square" label="Cuadrado"/>
+				<combo_box.item name="Triangle" label="Triángulo"/>
 			</combo_box>
 			<text name="text twist">
 				Inicio y Fin de la torsión
@@ -382,21 +318,11 @@
 				Tipo de unión
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(ninguna)
-				</combo_item>
-				<combo_item name="Sphere">
-					Esfera
-				</combo_item>
-				<combo_item name="Torus">
-					Toroide
-				</combo_item>
-				<combo_item name="Plane">
-					Plano
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilindro
-				</combo_item>
+				<combo_box.item name="None" label="ninguna)"/>
+				<combo_box.item name="Sphere" label="Esfera"/>
+				<combo_box.item name="Torus" label="Toroide"/>
+				<combo_box.item name="Plane" label="Plano"/>
+				<combo_box.item name="Cylinder" label="Cilindro"/>
 			</combo_box>
 		</panel>
 		<panel label="Características" name="Features">
@@ -438,88 +364,40 @@
 				Detallado
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					Por defecto
-				</combo_item>
-				<combo_item name="Planar">
-					Plano
-				</combo_item>
+				<combo_box.item name="Default" label="Por defecto"/>
+				<combo_box.item name="Planar" label="Plano"/>
 			</combo_box>
 			<text name="label shininess">
 				Brillantez
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					Ninguna
-				</combo_item>
-				<combo_item name="Low">
-					Baja
-				</combo_item>
-				<combo_item name="Medium">
-					Media
-				</combo_item>
-				<combo_item name="High">
-					Alta
-				</combo_item>
+				<combo_box.item name="None" label="Ninguna"/>
+				<combo_box.item name="Low" label="Baja"/>
+				<combo_box.item name="Medium" label="Media"/>
+				<combo_box.item name="High" label="Alta"/>
 			</combo_box>
 			<text name="label bumpiness">
 				Relieve
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					Ninguno
-				</combo_item>
-				<combo_item name="Brightness">
-					Brillo
-				</combo_item>
-				<combo_item name="Darkness">
-					Oscuro
-				</combo_item>
-				<combo_item name="woodgrain">
-					grano de madera
-				</combo_item>
-				<combo_item name="bark">
-					corteza
-				</combo_item>
-				<combo_item name="bricks">
-					ladrillos
-				</combo_item>
-				<combo_item name="checker">
-					cajero
-				</combo_item>
-				<combo_item name="concrete">
-					cemento
-				</combo_item>
-				<combo_item name="crustytile">
-					azulejería
-				</combo_item>
-				<combo_item name="cutstone">
-					piedra cortada
-				</combo_item>
-				<combo_item name="discs">
-					discos
-				</combo_item>
-				<combo_item name="gravel">
-					grava
-				</combo_item>
-				<combo_item name="petridish">
-					placa de Petri
-				</combo_item>
-				<combo_item name="siding">
-					revestimiento
-				</combo_item>
-				<combo_item name="stonetile">
-					baldosa de piedra
-				</combo_item>
-				<combo_item name="stucco">
-					estuco
-				</combo_item>
-				<combo_item name="suction">
-					succión
-				</combo_item>
-				<combo_item name="weave">
-					tejido
-				</combo_item>
+				<combo_box.item name="None" label="Ninguno"/>
+				<combo_box.item name="Brightness" label="Brillo"/>
+				<combo_box.item name="Darkness" label="Oscuro"/>
+				<combo_box.item name="woodgrain" label="grano de madera"/>
+				<combo_box.item name="bark" label="corteza"/>
+				<combo_box.item name="bricks" label="ladrillos"/>
+				<combo_box.item name="checker" label="cajero"/>
+				<combo_box.item name="concrete" label="cemento"/>
+				<combo_box.item name="crustytile" label="azulejería"/>
+				<combo_box.item name="cutstone" label="piedra cortada"/>
+				<combo_box.item name="discs" label="discos"/>
+				<combo_box.item name="gravel" label="grava"/>
+				<combo_box.item name="petridish" label="placa de Petri"/>
+				<combo_box.item name="siding" label="revestimiento"/>
+				<combo_box.item name="stonetile" label="baldosa de piedra"/>
+				<combo_box.item name="stucco" label="estuco"/>
+				<combo_box.item name="suction" label="succión"/>
+				<combo_box.item name="weave" label="tejido"/>
 			</combo_box>
 			<text name="tex scale">
 				Repeticiones por cara
diff --git a/indra/newview/skins/default/xui/es/floater_world_map.xml b/indra/newview/skins/default/xui/es/floater_world_map.xml
index cf1af23479..9893bcfba9 100644
--- a/indra/newview/skins/default/xui/es/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/es/floater_world_map.xml
@@ -41,14 +41,10 @@
 
 	<check_box name="event_mature_chk"/>
 	<combo_box label="Amigos conectados" name="friend combo" tool_tip="Amigo a mostrar en el mapa">
-		<combo_box.item name="none_selected">
-			Amigos conectados
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Amigos conectados" />
 	</combo_box>
 	<combo_box label="Hitos" name="landmark combo" tool_tip="Hito a mostrar en el mapa">
-		<combo_box.item name="none_selected">
-			Hitos
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Hitos" />
 	</combo_box>
 	<line_editor label="Buscar por el nombre de la región" name="location" tool_tip="Escriba el nombre de una región"/>
 	<button label="Buscar" name="DoSearch" tool_tip="Buscar una región"/>
diff --git a/indra/newview/skins/default/xui/es/panel_login.xml b/indra/newview/skins/default/xui/es/panel_login.xml
index 04edcc4faa..8c3d7ae575 100644
--- a/indra/newview/skins/default/xui/es/panel_login.xml
+++ b/indra/newview/skins/default/xui/es/panel_login.xml
@@ -19,15 +19,9 @@
 		Posición inicial:
 	</text>
 	<combo_box name="start_location_combo">
-		<combo_item name="MyHome">
-			Mi Base
-		</combo_item>
-		<combo_item name="MyLastLocation">
-			Mi última posición
-		</combo_item>
-		<combo_item name="Typeregionname">
-			&lt;Escriba el nombre de la Región&gt;
-		</combo_item>
+		<combo_box.item name="MyHome" label="Mi Base"/>
+		<combo_box.item name="MyLastLocation" label="Mi última posición"/>
+		<combo_box.item name="Typeregionname" label="lt;Escriba el nombre de la Región&gt;"/>
 	</combo_box>
 	<check_box label="Recordar la contraseña" name="remember_check"/>
 	<button label="Iniciar sesión" label_selected="Iniciar sesión" name="connect_btn"/>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_general.xml b/indra/newview/skins/default/xui/es/panel_preferences_general.xml
index 173da17f98..62a2959e13 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_general.xml
@@ -10,15 +10,9 @@
 	</radio_group>
 	<check_box label="Ver mi posición inicial en la pantalla de inicio de sesión" name="show_location_checkbox"/>
 	<combo_box name="fade_out_combobox" width="166">
-		<combo_item name="Never">
-			Nunca
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Mostrarlos temporalmente
-		</combo_item>
-		<combo_item name="Always">
-			Siempre
-		</combo_item>
+		<combo_box.item name="Never" label="Nunca"/>
+		<combo_box.item name="Show Temporarily" label="Mostrarlos temporalmente"/>
+		<combo_box.item name="Always" label="Siempre"/>
 	</combo_box>
 	<check_box label="Nombres de avatar en pequeño" name="small_avatar_names_checkbox"/>
 	<check_box label="No ver mi nombre en mi pantalla" name="show_my_name_checkbox"/>
@@ -62,53 +56,23 @@
 		&lt;escriba el nombre de la región&gt;
 	</string>
 	<combo_box name="crash_behavior_combobox" width="166">
-		<combo_item length="1" name="Askbeforesending" type="string">
-			Preguntar antes de enviar
-		</combo_item>
-		<combo_item length="1" name="Alwayssend" type="string">
-			Enviar siempre
-		</combo_item>
-		<combo_item length="1" name="Neversend" type="string">
-			No enviar nunca
-		</combo_item>
+		<combo_box.item length="1" name="Askbeforesending" type="string" label="Preguntar antes de enviar"/>
+		<combo_box.item length="1" name="Alwayssend" type="string" label="Enviar siempre"/>
+		<combo_box.item length="1" name="Neversend" type="string" label="No enviar nunca"/>
 	</combo_box>
 	<combo_box name="language_combobox" width="166">
-		<combo_item name="System Default Language">
-			Predeterminado del sistema
-		</combo_item>
-		<combo_item length="1" name="English" type="string">
-			English (Inglés)
-		</combo_item>
-		<combo_item name="Danish">
-			Dansk (Danés) - Beta
-		</combo_item>
-		<combo_item length="1" name="Deutsch(German)" type="string">
-			Deutsch (Alemán) - Beta
-		</combo_item>
-		<combo_item name="Spanish" type="string">
-			Español - Beta
-		</combo_item>
-		<combo_item length="1" name="French" type="string">
-			Français (Francés) - Beta
-		</combo_item>
-		<combo_item name="Hungarian">
-			Magyar (Húngaro) - Beta
-		</combo_item>
-		<combo_item name="Polish">
-			Polski (Polaco) - Beta
-		</combo_item>
-		<combo_item name="Portugese">
-			Portugués (Portugués) - Beta
-		</combo_item>
-		<combo_item length="1" name="Chinese" type="string">
-			中文 (简体) (Chino) - Beta
-		</combo_item>
-		<combo_item length="1" name="(Japanese)" type="string">
-			日本語 (Japonés) - Beta
-		</combo_item>
-		<combo_item length="1" name="(Korean)" type="string">
-			한국어 (Coreano) - Beta
-		</combo_item>
+		<combo_box.item name="System Default Language" label="Predeterminado del sistema"/>
+		<combo_box.item length="1" name="English" type="string" label="English (Inglés)"/>
+		<combo_box.item name="Danish" label="Dansk (Danés) - Beta"/>
+		<combo_box.item length="1" name="Deutsch(German)" type="string" label="Deutsch (Alemán) - Beta"/>
+		<combo_box.item name="Spanish" type="string" label="Español - Beta"/>
+		<combo_box.item length="1" name="French" type="string" label="Français (Francés) - Beta"/>
+		<combo_box.item name="Hungarian" label="Magyar (Húngaro) - Beta"/>
+		<combo_box.item name="Polish" label="Polski (Polaco) - Beta"/>
+		<combo_box.item name="Portugese" label="Portugués (Portugués) - Beta"/>
+		<combo_box.item length="1" name="Chinese" type="string" label="中文 (简体) (Chino) - Beta"/>
+		<combo_box.item length="1" name="(Japanese)" type="string" label="日本語 (Japonés) - Beta"/>
+		<combo_box.item length="1" name="(Korean)" type="string" label="한국어 (Coreano) - Beta"/>
 	</combo_box>
 	<check_box label="Compartir el idioma con los objetos" name="language_is_public" tool_tip="Hace que los objetos con script del mundo sepan su idioma preferido."/>
 </panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml
index 03eb802117..3965df3697 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml
@@ -9,21 +9,11 @@
 		Tamaño de la ventana:
 	</text>
 	<combo_box name="windowsize combo">
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="720x480">
-			720x480 (NTSC)
-		</combo_item>
-		<combo_item name="768x576">
-			768x576 (PAL)
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
+		<combo_box.item name="640x480" label="640x480"/>
+		<combo_box.item name="800x600" label="800x600"/>
+		<combo_box.item name="720x480" label="720x480 (NTSC)"/>
+		<combo_box.item name="768x576" label="768x576 (PAL)"/>
+		<combo_box.item name="1024x768" label="1024x768"/>
 	</combo_box>
 	<text name="DisplayResLabel">
 		Resolución:
@@ -32,18 +22,10 @@
 		Proporción:
 	</text>
 	<combo_box name="aspect_ratio" tool_tip="ancho / alto">
-		<combo_item length="1" name="4:3(StandardCRT)" type="string">
-			4:3 (Standard CRT)
-		</combo_item>
-		<combo_item length="1" name="5:4(1280x1024LCD)" type="string">
-			5:4 (1280x1024 LCD)
-		</combo_item>
-		<combo_item name="8:5(Widescreen)">
-			8:5 (Widescreen)
-		</combo_item>
-		<combo_item length="1" name="16:9(Widescreen)" type="string">
-			16:9 (Widescreen)
-		</combo_item>
+		<combo_box.item length="1" name="4:3(StandardCRT)" type="string" label="4:3 (Standard CRT)"/>
+		<combo_box.item length="1" name="5:4(1280x1024LCD)" type="string" label="5:4 (1280x1024 LCD)"/>
+		<combo_box.item name="8:5(Widescreen)" label="8:5 (Widescreen)"/>
+		<combo_box.item length="1" name="16:9(Widescreen)" type="string" label="16:9 (Widescreen)"/>
 	</combo_box>
 	<check_box label="Detectar automáticamente la proporción" name="aspect_auto_detect"/>
 	<text name="HigherText">
diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml
index 8212db046f..d48a4ae22a 100644
--- a/indra/newview/skins/default/xui/fr/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml
@@ -260,44 +260,20 @@ Allez dans le menu Monde &gt; À propos du terrain ou sélectionnez une autre pa
 				name="PushRestrictCheck" tool_tip="Empêche l&apos;utilisation de scripts causant des bousculades. Cette option est utile pour empêcher les comportements abusifs sur votre terrain."/>
 			<check_box label="Afficher dans la recherche (30 L$/semaine) sous" name="ShowDirectoryCheck" tool_tip="Afficher la parcelle dans les résultats de recherche" bottom="-160"/>
 			<combo_box name="land category" left="286" width="146" bottom="-160">
-				<combo_item name="AnyCategory">
-					Toutes catégories
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Appartenant aux Lindens
-				</combo_item>
+				<combo_box.item name="AnyCategory" label="Toutes catégories"/>
+				<combo_box.item name="LindenLocation" label="Appartenant aux Lindens"/>
 
 
-				<combo_item name="Arts&amp;Culture">
-					Art et Culture
-				</combo_item>
-				<combo_item name="Business">
-					Affaires
-				</combo_item>
-				<combo_item name="Educational">
-					Éducation
-				</combo_item>
-				<combo_item name="Gaming">
-					Jeux
-				</combo_item>
-				<combo_item name="Hangout">
-					Favoris
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Accueil pour les nouveaux
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parcs et Nature
-				</combo_item>
-				<combo_item name="Residential">
-					Résidentiel
-				</combo_item>
-				<combo_item name="Shopping">
-					Shopping
-				</combo_item>
-				<combo_item name="Other">
-					Autre
-				</combo_item>
+				<combo_box.item name="Arts&amp;Culture" label="Art et Culture"/>
+				<combo_box.item name="Business" label="Affaires"/>
+				<combo_box.item name="Educational" label="Éducation"/>
+				<combo_box.item name="Gaming" label="Jeux"/>
+				<combo_box.item name="Hangout" label="Favoris"/>
+				<combo_box.item name="NewcomerFriendly" label="Accueil pour les nouveaux"/>
+				<combo_box.item name="Parks&amp;Nature" label="Parcs et Nature"/>
+				<combo_box.item name="Residential" label="Résidentiel"/>
+				<combo_box.item name="Shopping" label="Shopping"/>
+				<combo_box.item name="Other" label="Autre"/>
 			</combo_box>
 			<button label="?" label_selected="?" name="?" left="436" bottom="-160"/>
 			<check_box name="MatureCheck" bottom="-180"/>
@@ -317,15 +293,9 @@ Allez dans le menu Monde &gt; À propos du terrain ou sélectionnez une autre pa
 				Règles de téléportation :
 			</text>
 			<combo_box name="landing type" tool_tip="Vous permet de paramétrer les téléportations sur votre terrain." left="140" width="140" bottom="-343">
-				<combo_item length="1" name="Blocked" type="string">
-					Bloqué
-				</combo_item>
-				<combo_item length="1" name="LandingPoint" type="string">
-					Lieu d&apos;arrivée fixe
-				</combo_item>
-				<combo_item length="1" name="Anywhere" type="string">
-					Lieu d&apos;arrivée libre
-				</combo_item>
+				<combo_box.item length="1" name="Blocked" type="string" label="Bloqué"/>
+				<combo_box.item length="1" name="LandingPoint" type="string" label="Lieu d&apos;arrivée fixe"/>
+				<combo_box.item length="1" name="Anywhere" type="string" label="Lieu d&apos;arrivée libre"/>
 			</combo_box>
 			<string name="push_restrict_text">
 				Pas de bousculades
@@ -414,12 +384,8 @@ musique :
 			<check_box label="Autoriser l&apos;accès au groupe : [GROUP]" name="GroupCheck" tool_tip="Définir le groupe à l&apos;onglet Général."/>
 			<check_box label="Vendre des pass à :" name="PassCheck" tool_tip="Autoriser un accès temporaire à cette parcelle"/>
 			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Tout le monde
-				</combo_item>
-				<combo_item name="Group">
-					Groupe
-				</combo_item>
+				<combo_box.item name="Anyone" label="Tout le monde"/>
+				<combo_box.item name="Group" label="Groupe"/>
 			</combo_box>
 			<spinner label="Prix en L$ :" name="PriceSpin"/>
 			<spinner label="Durée en heures :" name="HoursSpin"/>
diff --git a/indra/newview/skins/default/xui/fr/floater_animation_preview.xml b/indra/newview/skins/default/xui/fr/floater_animation_preview.xml
index a1c3ef35b3..af6cb41ba8 100644
--- a/indra/newview/skins/default/xui/fr/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/fr/floater_animation_preview.xml
@@ -11,18 +11,10 @@
 		Prévisualiser pendant
 	</text>
 	<combo_box label="" name="preview_base_anim" tool_tip="Utilisez cette option pour tester votre animation pendant que votre avatar fait des choses banales." left_delta="116" width="124">
-		<combo_box.item name="Standing">
-			Debout
-		</combo_box.item>
-		<combo_box.item name="Walking">
-			En train de marcher
-		</combo_box.item>
-		<combo_box.item name="Sitting">
-			Assis
-		</combo_box.item>
-		<combo_box.item name="Flying">
-			En train de voler
-		</combo_box.item>
+		<combo_box.item name="Standing" label="Debout" />
+		<combo_box.item name="Walking" label="En train de marcher" />
+		<combo_box.item name="Sitting" label="Assis" />
+		<combo_box.item name="Flying" label="En train de voler" />
 	</combo_box>
 	<check_box  left="6" label="Boucle" name="loop_check" tool_tip="Joue cette animation en boucle."/>
 	<spinner left="76" label_width="55" width="105" label="Début (%)" name="loop_in_point" tool_tip="Définit le moment de l&apos;animation où la boucle repart."/>
@@ -31,110 +23,44 @@
 		Mouvement de main
 	</text>
 	<combo_box label="" name="hand_pose_combo" tool_tip="Contrôle le mouvement des mains au cours de l&apos;animation" left_delta="116" width="124">
-		<combo_box.item name="Spread">
-			Doigts écartés
-		</combo_box.item>
-		<combo_box.item name="Relaxed">
-			Détendues
-		</combo_box.item>
-		<combo_box.item name="PointBoth">
-			Pointer (les deux)
-		</combo_box.item>
-		<combo_box.item name="Fist">
-			Poing
-		</combo_box.item>
-		<combo_box.item name="RelaxedLeft">
-			Détendue (gauche)
-		</combo_box.item>
-		<combo_box.item name="PointLeft">
-			Pointer (gauche)
-		</combo_box.item>
-		<combo_box.item name="FistLeft">
-			Poing (gauche)
-		</combo_box.item>
-		<combo_box.item name="RelaxedRight">
-			Détendue (droite)
-		</combo_box.item>
-		<combo_box.item name="PointRight">
-			Pointer (droite)
-		</combo_box.item>
-		<combo_box.item name="FistRight">
-			Poing (droite)
-		</combo_box.item>
-		<combo_box.item name="SaluteRight">
-			Saluer (droite)
-		</combo_box.item>
-		<combo_box.item name="Typing">
-			Taper
-		</combo_box.item>
-		<combo_box.item name="PeaceRight">
-			Paix (main droite)
-		</combo_box.item>
+		<combo_box.item name="Spread" label="Doigts écartés" />
+		<combo_box.item name="Relaxed" label="Détendues" />
+		<combo_box.item name="PointBoth" label="Pointer (les deux)" />
+		<combo_box.item name="Fist" label="Poing" />
+		<combo_box.item name="RelaxedLeft" label="Détendue (gauche)" />
+		<combo_box.item name="PointLeft" label="Pointer (gauche)" />
+		<combo_box.item name="FistLeft" label="Poing (gauche)" />
+		<combo_box.item name="RelaxedRight" label="Détendue (droite)" />
+		<combo_box.item name="PointRight" label="Pointer (droite)" />
+		<combo_box.item name="FistRight" label="Poing (droite)" />
+		<combo_box.item name="SaluteRight" label="Saluer (droite)" />
+		<combo_box.item name="Typing" label="Taper" />
+		<combo_box.item name="PeaceRight" label="Paix (main droite)" />
 	</combo_box>
 	<text name="emote_label">
 		Expression
 	</text>
 	<combo_box label="" name="emote_combo" tool_tip="Contrôle l&apos;expression du visage au cours de l&apos;animation." left_delta="116" width="124">
-		<combo_box.item name="[None]">
-			[None]
-		</combo_box.item>
-		<combo_box.item name="Aaaaah">
-			Aaaaah
-		</combo_box.item>
-		<combo_box.item name="Afraid">
-			Effrayé
-		</combo_box.item>
-		<combo_box.item name="Angry">
-			En colère
-		</combo_box.item>
-		<combo_box.item name="BigSmile">
-			Grand sourire
-		</combo_box.item>
-		<combo_box.item name="Bored">
-			Ennui
-		</combo_box.item>
-		<combo_box.item name="Cry">
-			Pleurer
-		</combo_box.item>
-		<combo_box.item name="Disdain">
-			Mépris
-		</combo_box.item>
-		<combo_box.item name="Embarrassed">
-			Gêne
-		</combo_box.item>
-		<combo_box.item name="Frown">
-			Froncer les sourcils
-		</combo_box.item>
-		<combo_box.item name="Kiss">
-			Embrasser
-		</combo_box.item>
-		<combo_box.item name="Laugh">
-			Rire
-		</combo_box.item>
-		<combo_box.item name="Plllppt">
-			Plllppt
-		</combo_box.item>
-		<combo_box.item name="Repulsed">
-			Dégoût
-		</combo_box.item>
-		<combo_box.item name="Sad">
-			Triste
-		</combo_box.item>
-		<combo_box.item name="Shrug">
-			Hausser les épaules
-		</combo_box.item>
-		<combo_box.item name="Smile">
-			Sourire
-		</combo_box.item>
-		<combo_box.item name="Surprise">
-			Surprise
-		</combo_box.item>
-		<combo_box.item name="Wink">
-			Clin d&apos;œil
-		</combo_box.item>
-		<combo_box.item name="Worry">
-			Soucis
-		</combo_box.item>
+		<combo_box.item name="[None]" label="None]" />
+		<combo_box.item name="Aaaaah" label="Aaaaah" />
+		<combo_box.item name="Afraid" label="Effrayé" />
+		<combo_box.item name="Angry" label="En colère" />
+		<combo_box.item name="BigSmile" label="Grand sourire" />
+		<combo_box.item name="Bored" label="Ennui" />
+		<combo_box.item name="Cry" label="Pleurer" />
+		<combo_box.item name="Disdain" label="Mépris" />
+		<combo_box.item name="Embarrassed" label="Gêne" />
+		<combo_box.item name="Frown" label="Froncer les sourcils" />
+		<combo_box.item name="Kiss" label="Embrasser" />
+		<combo_box.item name="Laugh" label="Rire" />
+		<combo_box.item name="Plllppt" label="Plllppt" />
+		<combo_box.item name="Repulsed" label="Dégoût" />
+		<combo_box.item name="Sad" label="Triste" />
+		<combo_box.item name="Shrug" label="Hausser les épaules" />
+		<combo_box.item name="Smile" label="Sourire" />
+		<combo_box.item name="Surprise" label="Surprise" />
+		<combo_box.item name="Wink" label="Clin d&apos;œil" />
+		<combo_box.item name="Worry" label="Soucis" />
 	</combo_box>
 	<spinner label_width="65" label="Transition &#10;début (s)" name="ease_in_time" tool_tip="Durée (en secondes) pendant laquelle l&apos;animation s&apos;intègre au mouvement."/>
 	<spinner label_width="65" left="160" width="125" label="Transition &#10;fin (s)" name="ease_out_time" tool_tip="Durée (en secondes) pendant laquelle l&apos;animation disparaît du mouvement."/>
diff --git a/indra/newview/skins/default/xui/fr/floater_auction.xml b/indra/newview/skins/default/xui/fr/floater_auction.xml
index 90e70c6094..4bdf9df1be 100644
--- a/indra/newview/skins/default/xui/fr/floater_auction.xml
+++ b/indra/newview/skins/default/xui/fr/floater_auction.xml
@@ -2,12 +2,8 @@
 <floater name="floater_auction" title="Commencer la vente de terrain Linden">
 	<check_box label="Inclure le marquage de sélection jaune" name="fence_check" />
 	<combo_box name="saletype_combo">
-		<combo_box.item name="Auction">
-			Enchères
-		</combo_box.item>
-		<combo_box.item name="FirstLand">
-			Premier terrain
-		</combo_box.item>
+		<combo_box.item name="Auction" label="Enchères" />
+		<combo_box.item name="FirstLand" label="Premier terrain" />
 	</combo_box>
 	<button label="Capture d&apos;écran" label_selected="Capture d&apos;écran"
 	     name="snapshot_btn" width="110" />
diff --git a/indra/newview/skins/default/xui/fr/floater_buy_land.xml b/indra/newview/skins/default/xui/fr/floater_buy_land.xml
index 935df46f14..4741fadc62 100644
--- a/indra/newview/skins/default/xui/fr/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/fr/floater_buy_land.xml
@@ -68,15 +68,9 @@
 		Seuls les membres Premium peuvent posséder du terrain.
 	</text>
 	<combo_box name="account_level">
-		<combo_item name="US$9.95/month,billedmonthly">
-			9,95 US$/mois, facturation mensuelle
-		</combo_item>
-		<combo_item name="US$7.50/month,billedquarterly">
-			7,50 US$/mois, facturation trimestrielle
-		</combo_item>
-		<combo_item name="US$6.00/month,billedannually">
-			6,00 US$/mois, facturation annuelle
-		</combo_item>
+		<combo_box.item name="US$9.95/month,billedmonthly" label="9,95 US$/mois, facturation mensuelle"/>
+		<combo_box.item name="US$7.50/month,billedquarterly" label="7,50 US$/mois, facturation trimestrielle"/>
+		<combo_box.item name="US$6.00/month,billedannually" label="6,00 US$/mois, facturation annuelle"/>
 	</combo_box>
 	<text name="land_use_action" right="430" width="210">
 		Augmentez vos frais d&apos;occupation de terrain à 40 US$/mois.
diff --git a/indra/newview/skins/default/xui/fr/floater_god_tools.xml b/indra/newview/skins/default/xui/fr/floater_god_tools.xml
index ab8b061cd3..5799e1a757 100644
--- a/indra/newview/skins/default/xui/fr/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/fr/floater_god_tools.xml
@@ -78,29 +78,17 @@
 				Destination :
 			</text>
 			<combo_box name="destination">
-				<combo_box.item name="Selection">
-					Sélection
-				</combo_box.item>
-				<combo_box.item name="AgentRegion">
-					Région de l&apos;avatar
-				</combo_box.item>
+				<combo_box.item name="Selection" label="Sélection" />
+				<combo_box.item name="AgentRegion" label="Région de l&apos;avatar" />
 			</combo_box>
 			<text name="Request:">
 				Requête :
 			</text>
 			<combo_box name="request">
-				<combo_box.item name="colliders&lt;steps&gt;">
-					Objets responsables de collisions : étapes
-				</combo_box.item>
-				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
-					Nombre de scripts et schéma optionnel
-				</combo_box.item>
-				<combo_box.item name="objects&lt;pattern&gt;">
-					Schéma des objets
-				</combo_box.item>
-				<combo_box.item name="rez&lt;asset_id&gt;">
-					rezzer &lt;asset_id&gt;
-				</combo_box.item>
+				<combo_box.item name="colliders&lt;steps&gt;" label="Objets responsables de collisions : étapes" />
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;" label="Nombre de scripts et schéma optionnel" />
+				<combo_box.item name="objects&lt;pattern&gt;" label="Schéma des objets" />
+				<combo_box.item name="rez&lt;asset_id&gt;" label="rezzer &lt;asset_id&gt;" />
 			</combo_box>
 			<text name="Parameter:">
 				Paramètre :
diff --git a/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml b/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml
index eb632bc9a8..11d7fc28e9 100644
--- a/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml
@@ -8,21 +8,11 @@
 		Anti-aliasing :
 	</text>
 	<combo_box label="Anti-aliasing" name="fsaa" width="84">
-		<combo_box.item name="FSAADisabled">
-			Désactivé
-		</combo_box.item>
-		<combo_box.item name="2x">
-			2x
-		</combo_box.item>
-		<combo_box.item name="4x">
-			4x
-		</combo_box.item>
-		<combo_box.item name="8x">
-			8x
-		</combo_box.item>
-		<combo_box.item name="16x">
-			16x
-		</combo_box.item>
+		<combo_box.item name="FSAADisabled" label="Désactivé" />
+		<combo_box.item name="2x" label="2x" />
+		<combo_box.item name="4x" label="4x" />
+		<combo_box.item name="8x" label="8x" />
+		<combo_box.item name="16x" label="16x" />
 	</combo_box>
 	<spinner label="Gamma :" name="gamma"/>
 	<text left="217" name="(brightness, lower is brighter)">
diff --git a/indra/newview/skins/default/xui/fr/floater_image_preview.xml b/indra/newview/skins/default/xui/fr/floater_image_preview.xml
index 3af7dc9113..f12c1fee44 100644
--- a/indra/newview/skins/default/xui/fr/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/fr/floater_image_preview.xml
@@ -10,36 +10,16 @@
 		Prévisualiser comme :
 	</text>
 	<combo_box label="Habits" name="clothing_type_combo" left="126" >
-		<combo_box.item name="Image">
-			Image
-		</combo_box.item>
-		<combo_box.item name="Hair">
-			Cheveux
-		</combo_box.item>
-		<combo_box.item name="FemaleHead">
-			Tête de femme
-		</combo_box.item>
-		<combo_box.item name="FemaleUpperBody">
-			Corps de femme (haut)
-		</combo_box.item>
-		<combo_box.item name="FemaleLowerBody">
-			Corps de femme (bas)
-		</combo_box.item>
-		<combo_box.item name="MaleHead">
-			Tête d&apos;homme
-		</combo_box.item>
-		<combo_box.item name="MaleUpperBody">
-			Corps d&apos;homme (haut)
-		</combo_box.item>
-		<combo_box.item name="MaleLowerBody">
-			Corps d&apos;homme (bas)
-		</combo_box.item>
-		<combo_box.item name="Skirt">
-			Jupe
-		</combo_box.item>
-		<combo_box.item name="SculptedPrim">
-			Sculptie
-		</combo_box.item>
+		<combo_box.item name="Image" label="Image" />
+		<combo_box.item name="Hair" label="Cheveux" />
+		<combo_box.item name="FemaleHead" label="Tête de femme" />
+		<combo_box.item name="FemaleUpperBody" label="Corps de femme (haut)" />
+		<combo_box.item name="FemaleLowerBody" label="Corps de femme (bas)" />
+		<combo_box.item name="MaleHead" label="Tête d&apos;homme" />
+		<combo_box.item name="MaleUpperBody" label="Corps d&apos;homme (haut)" />
+		<combo_box.item name="MaleLowerBody" label="Corps d&apos;homme (bas)" />
+		<combo_box.item name="Skirt" label="Jupe" />
+		<combo_box.item name="SculptedPrim" label="Sculptie" />
 	</combo_box>
 	<text name="bad_image_text">
 		Impossible de lire l&apos;image.
diff --git a/indra/newview/skins/default/xui/fr/floater_report_abuse.xml b/indra/newview/skins/default/xui/fr/floater_report_abuse.xml
index 3946219458..0fce7a15cc 100644
--- a/indra/newview/skins/default/xui/fr/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/fr/floater_report_abuse.xml
@@ -37,123 +37,51 @@
 		Hendrerit Vulputate
 	</text>
 	<combo_box name="category_combo" tool_tip="Choisissez la catégorie qui décrit le mieux ce rapport">
-		<combo_item name="Select_category">
-			Sélectionnez une catégorie
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Âge &gt; « Age play »
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Âge &gt; Résident adulte sur Second Life pour adolescents
-		</combo_item>
+		<combo_box.item name="Select_category" label="Sélectionnez une catégorie"/>
+		<combo_box.item name="Age__Age_play" label="Âge &gt; « Age play »"/>
+		<combo_box.item name="Age__Adult_resident_on_Teen_Second_Life" label="Âge &gt; Résident adulte sur Second Life pour adolescents"/>
 		
 		
 		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Assaut &gt; Bac à sable utilisé pour des combats/zone non sécurisée
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Assaut &gt; Zone sécurisée
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Assaut &gt; Bac à sable pour tests d&apos;armes à feu
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Commerce &gt; Incapacité à fournir un produit ou service
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Divulgation &gt; Informations sur la vie réelle
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Divulgation &gt; Écoute d&apos;un chat à distance
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Divulgation &gt; Informations sur Second Life/chat/IM
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Trouble de la paix &gt; Utilisation inadéquate des ressources de la région
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Trouble de la paix &gt; Nombre d&apos;objets scriptés excessif
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Trouble de la paix &gt; Abandon d&apos;objets
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Trouble de la paix &gt; Spam à répétition
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Trouble de la paix &gt; Spam à caractère commercial
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Fraude &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Fraude &gt; Terrain
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Fraude &gt; Vente pyramidale ou lettre-chaîne
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Fraude &gt; US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Harcèlement &gt; Spam visuel
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Harcèlement &gt; Diffamation envers des individus ou des groupes
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Harcèlement &gt; Immobilisation
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Harcèlement &gt;  Harcèlement sexuel
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Harcèlement &gt; Incitation à enfreindre les Conditions d&apos;utilisation
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Harcèlement &gt; Abus verbal
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Indécence &gt; Contenu ou comportement offensifs
-		</combo_item>
+		<combo_box.item name="Assault__Combat_sandbox___unsafe_area" label="Assaut &gt; Bac à sable utilisé pour des combats/zone non sécurisée"/>
+		<combo_box.item name="Assault__Safe_area" label="Assaut &gt; Zone sécurisée"/>
+		<combo_box.item name="Assault__Weapons_testing_sandbox" label="Assaut &gt; Bac à sable pour tests d&apos;armes à feu"/>
+		<combo_box.item name="Commerce__Failure_to_deliver_product_or_service" label="Commerce &gt; Incapacité à fournir un produit ou service"/>
+		<combo_box.item name="Disclosure__Real_world_information" label="Divulgation &gt; Informations sur la vie réelle"/>
+		<combo_box.item name="Disclosure__Remotely_monitoring chat" label="Divulgation &gt; Écoute d&apos;un chat à distance"/>
+		<combo_box.item name="Disclosure__Second_Life_information_chat_IMs" label="Divulgation &gt; Informations sur Second Life/chat/IM"/>
+		<combo_box.item name="Disturbing_the_peace__Unfair_use_of_region_resources" label="Trouble de la paix &gt; Utilisation inadéquate des ressources de la région"/>
+		<combo_box.item name="Disturbing_the_peace__Excessive_scripted_objects" label="Trouble de la paix &gt; Nombre d&apos;objets scriptés excessif"/>
+		<combo_box.item name="Disturbing_the_peace__Object_littering" label="Trouble de la paix &gt; Abandon d&apos;objets"/>
+		<combo_box.item name="Disturbing_the_peace__Repetitive_spam" label="Trouble de la paix &gt; Spam à répétition"/>
+		<combo_box.item name="Disturbing_the_peace__Unwanted_advert_spam" label="Trouble de la paix &gt; Spam à caractère commercial"/>
+		<combo_box.item name="Fraud__L$" label="Fraude &gt; L$"/>
+		<combo_box.item name="Fraud__Land" label="Fraude &gt; Terrain"/>
+		<combo_box.item name="Fraud__Pyramid_scheme_or_chain_letter" label="Fraude &gt; Vente pyramidale ou lettre-chaîne"/>
+		<combo_box.item name="Fraud__US$" label="Fraude &gt; US$"/>
+		<combo_box.item name="Harassment__Advert_farms___visual_spam" label="Harcèlement &gt; Spam visuel"/>
+		<combo_box.item name="Harassment__Defaming_individuals_or_groups" label="Harcèlement &gt; Diffamation envers des individus ou des groupes"/>
+		<combo_box.item name="Harassment__Impeding_movement" label="Harcèlement &gt; Immobilisation"/>
+		<combo_box.item name="Harassment__Sexual_harassment" label="Harcèlement &gt;  Harcèlement sexuel"/>
+		<combo_box.item name="Harassment__Solicting_inciting_others_to_violate_ToS" label="Harcèlement &gt; Incitation à enfreindre les Conditions d&apos;utilisation"/>
+		<combo_box.item name="Harassment__Verbal_abuse" label="Harcèlement &gt; Abus verbal"/>
+		<combo_box.item name="Indecency__Broadly_offensive_content_or_conduct" label="Indécence &gt; Contenu ou comportement offensifs"/>
 		
 		
 		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Indécence &gt; Nom d&apos;avatar inapproprié
-		</combo_item>
+		<combo_box.item name="Indecency__Inappropriate_avatar_name" label="Indécence &gt; Nom d&apos;avatar inapproprié"/>
 		
 		
 		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Violation de droits de propriété intellectuelle &gt; Suppression de contenu
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Violation de droits de propriété intellectuelle &gt; CopyBot ou exploitation abusive des permissions
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intolérance
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Terrain &gt; Utilisation abusive des ressources du bac à sable
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Terrain &gt; Empiètement &gt; Objets/textures
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Terrain &gt; Empiètement &gt; Particules
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Terrain &gt; Empiètement &gt; Arbres/plantes
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Paris/jeux d&apos;argent
-		</combo_item>
-		<combo_item name="Other">
-			Autre
-		</combo_item>
+		<combo_box.item name="Intellectual_property_infringement_Content_Removal" label="Violation de droits de propriété intellectuelle &gt; Suppression de contenu"/>
+		<combo_box.item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit" label="Violation de droits de propriété intellectuelle &gt; CopyBot ou exploitation abusive des permissions"/>
+		<combo_box.item name="Intolerance" label="Intolérance"/>
+		<combo_box.item name="Land__Abuse_of_sandbox_resources" label="Terrain &gt; Utilisation abusive des ressources du bac à sable"/>
+		<combo_box.item name="Land__Encroachment__Objects_textures" label="Terrain &gt; Empiètement &gt; Objets/textures"/>
+		<combo_box.item name="Land__Encroachment__Particles" label="Terrain &gt; Empiètement &gt; Particules"/>
+		<combo_box.item name="Land__Encroachment__Trees_plants" label="Terrain &gt; Empiètement &gt; Arbres/plantes"/>
+		<combo_box.item name="Wagering_gambling" label="Paris/jeux d&apos;argent"/>
+		<combo_box.item name="Other" label="Autre"/>
 	</combo_box>
 	<text name="abuser_name_title">
 		Nom du contrevenant :
diff --git a/indra/newview/skins/default/xui/fr/floater_sell_land.xml b/indra/newview/skins/default/xui/fr/floater_sell_land.xml
index 6c5044da5a..186a278671 100644
--- a/indra/newview/skins/default/xui/fr/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/fr/floater_sell_land.xml
@@ -37,15 +37,9 @@ parcelle :
 spécifique.
 	</text>
 	<combo_box name="sell_to" bottom_delta="-32">
-		<combo_box.item name="--selectone--">
-			-- Sélectionnez --
-		</combo_box.item>
-		<combo_box.item name="Anyone">
-			N&apos;importe qui
-		</combo_box.item>
-		<combo_box.item name="Specificuser:">
-			Acheteur spécifique :
-		</combo_box.item>
+		<combo_box.item name="--selectone--" label="Sélectionnez --" />
+		<combo_box.item name="Anyone" label="N&apos;importe qui" />
+		<combo_box.item name="Specificuser:" label="Acheteur spécifique :" />
 	</combo_box>
 	<button label="Sélectionner..." name="sell_to_select_agent" width="100"/>
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/fr/floater_settings_debug.xml b/indra/newview/skins/default/xui/fr/floater_settings_debug.xml
index 18cf2d7e55..e67b8e2f79 100644
--- a/indra/newview/skins/default/xui/fr/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/fr/floater_settings_debug.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater name="settings_debug" title="Paramétrages du mode Debug">
 	<combo_box name="boolean_combo">
-		<combo_box.item name="TRUE">
-			TRUE
-		</combo_box.item>
-		<combo_box.item name="FALSE">
-			FALSE
-		</combo_box.item>
+		<combo_box.item name="TRUE" label="TRUE" />
+		<combo_box.item name="FALSE" label="FALSE" />
 	</combo_box>
 	<color_swatch label="Couleur" name="color_swatch" width="43" />
 	<spinner label="x" name="val_spinner_1" />
diff --git a/indra/newview/skins/default/xui/fr/floater_snapshot.xml b/indra/newview/skins/default/xui/fr/floater_snapshot.xml
index 63ed77c8b5..e6f9c27e97 100644
--- a/indra/newview/skins/default/xui/fr/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/fr/floater_snapshot.xml
@@ -23,75 +23,33 @@
 		Format
 	</text>
 	<combo_box label="Résolution" name="postcard_size_combo">
-		<combo_box.item name="640x480">
-			640 x 480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800 x 600
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024 x 768
-		</combo_box.item>
-		<combo_box.item name="CurrentWindow">
-			Fenêtre actuelle
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Personnaliser
-		</combo_box.item>
+		<combo_box.item name="640x480" label="640 x 480" />
+		<combo_box.item name="800x600" label="800 x 600" />
+		<combo_box.item name="1024x768" label="1024 x 768" />
+		<combo_box.item name="CurrentWindow" label="Fenêtre actuelle" />
+		<combo_box.item name="Custom" label="Personnaliser" />
 	</combo_box>
 	<combo_box label="Résolution" name="texture_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Fenêtre actuelle
-		</combo_box.item>
-		<combo_box.item name="Small(128x128)">
-			Petite (128 x 128)
-		</combo_box.item>
-		<combo_box.item name="Medium(256x256)">
-			Moyenne (256 x 256)
-		</combo_box.item>
-		<combo_box.item name="Large(512x512)">
-			Grande (512 x 512)
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Personnaliser
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Fenêtre actuelle" />
+		<combo_box.item name="Small(128x128)" label="Petite (128 x 128)" />
+		<combo_box.item name="Medium(256x256)" label="Moyenne (256 x 256)" />
+		<combo_box.item name="Large(512x512)" label="Grande (512 x 512)" />
+		<combo_box.item name="Custom" label="Personnaliser" />
 	</combo_box>
 	<combo_box label="Résolution" name="local_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Fenêtre actuelle
-		</combo_box.item>
-		<combo_box.item name="320x240">
-			320 x 240
-		</combo_box.item>
-		<combo_box.item name="640x480">
-			640 x 480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800 x 600
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024 x 768
-		</combo_box.item>
-		<combo_box.item name="1280x1024">
-			1280 x 1024
-		</combo_box.item>
-		<combo_box.item name="1600x1200">
-			1600 x 1200
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Personnaliser
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Fenêtre actuelle" />
+		<combo_box.item name="320x240" label="320 x 240" />
+		<combo_box.item name="640x480" label="640 x 480" />
+		<combo_box.item name="800x600" label="800 x 600" />
+		<combo_box.item name="1024x768" label="1024 x 768" />
+		<combo_box.item name="1280x1024" label="1280 x 1024" />
+		<combo_box.item name="1600x1200" label="1600 x 1200" />
+		<combo_box.item name="Custom" label="Personnaliser" />
 	</combo_box>
 	<combo_box label="Format" name="local_format_combo">
-		<combo_box.item name="PNG">
-			PNG
-		</combo_box.item>
-		<combo_box.item name="JPEG">
-			JPEG
-		</combo_box.item>
-		<combo_box.item name="BMP">
-			BMP
-		</combo_box.item>
+		<combo_box.item name="PNG" label="PNG" />
+		<combo_box.item name="JPEG" label="JPEG" />
+		<combo_box.item name="BMP" label="BMP" />
 	</combo_box>
 	<spinner label="Largeur" label_width="41" name="snapshot_width" width="101"/>
 	<spinner label="Hauteur" label_width="41" left="121" name="snapshot_height" width="101"/>
@@ -100,15 +58,9 @@
 		Capturer :
 	</text>
 	<combo_box label="Couches de l&apos;image" name="layer_types">
-		<combo_box.item name="Colors">
-			Couleurs
-		</combo_box.item>
-		<combo_box.item name="Depth">
-			Profondeur
-		</combo_box.item>
-		<combo_box.item name="ObjectMattes">
-			Matte des objets
-		</combo_box.item>
+		<combo_box.item name="Colors" label="Couleurs" />
+		<combo_box.item name="Depth" label="Profondeur" />
+		<combo_box.item name="ObjectMattes" label="Matte des objets" />
 	</combo_box>
 	<text name="file_size_label">
 		Taille du fichier : [SIZE] Ko
diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml
index fed4a789ce..a9b7e79ba6 100644
--- a/indra/newview/skins/default/xui/fr/floater_tools.xml
+++ b/indra/newview/skins/default/xui/fr/floater_tools.xml
@@ -20,15 +20,9 @@
 		Axe :
 	</text>
 	<combo_box name="combobox grid mode">
-		<combo_item name="World">
-			Monde
-		</combo_item>
-		<combo_item name="Local">
-			Local
-		</combo_item>
-		<combo_item name="Reference">
-			Référence
-		</combo_item>
+		<combo_box.item name="World" label="Monde"/>
+		<combo_box.item name="Local" label="Local"/>
+		<combo_box.item name="Reference" label="Référence"/>
 	</combo_box>
 	<check_box label="Étirer les deux côtés" name="checkbox uniform"/>
 	<check_box label="Étirer les textures" name="checkbox stretch textures"/>
@@ -151,27 +145,13 @@
 				Action du clic-gauche :
 			</text>
 			<combo_box name="clickaction" width="178">
-				<combo_item name="Touch/grab(default)">
-					Toucher/attraper (défaut)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					S&apos;asseoir sur l&apos;objet
-				</combo_item>
-				<combo_item name="Buyobject">
-					Acheter l&apos;objet
-				</combo_item>
-				<combo_item name="Payobject">
-					Payer l&apos;objet
-				</combo_item>
-				<combo_item name="Open">
-					Ouvrir
-				</combo_item>
-				<combo_item name="Play">
-					Jouer le média de la parcelle
-				</combo_item>
-				<combo_item name="Opemmedia">
-					Ouvrir le média de la parcelle
-				</combo_item>
+				<combo_box.item name="Touch/grab(default)" label="Toucher/attraper (défaut)"/>
+				<combo_box.item name="Sitonobject" label="S&apos;asseoir sur l&apos;objet"/>
+				<combo_box.item name="Buyobject" label="Acheter l&apos;objet"/>
+				<combo_box.item name="Payobject" label="Payer l&apos;objet"/>
+				<combo_box.item name="Open" label="Ouvrir"/>
+				<combo_box.item name="Play" label="Jouer le média de la parcelle"/>
+				<combo_box.item name="Opemmedia" label="Ouvrir le média de la parcelle"/>
 			</combo_box>
 			<text name="B:">
 				B :
@@ -255,56 +235,26 @@
 				Matériau
 			</text>
 			<combo_box name="material">
-				<combo_item name="Stone">
-					Pierre
-				</combo_item>
-				<combo_item name="Metal">
-					Métal
-				</combo_item>
-				<combo_item name="Glass">
-					Verre
-				</combo_item>
-				<combo_item name="Wood">
-					Bois
-				</combo_item>
-				<combo_item name="Flesh">
-					Chair
-				</combo_item>
-				<combo_item name="Plastic">
-					Plastique
-				</combo_item>
-				<combo_item name="Rubber">
-					Caoutchouc
-				</combo_item>
+				<combo_box.item name="Stone" label="Pierre"/>
+				<combo_box.item name="Metal" label="Métal"/>
+				<combo_box.item name="Glass" label="Verre"/>
+				<combo_box.item name="Wood" label="Bois"/>
+				<combo_box.item name="Flesh" label="Chair"/>
+				<combo_box.item name="Plastic" label="Plastique"/>
+				<combo_box.item name="Rubber" label="Caoutchouc"/>
 			</combo_box>
 			<text name="label basetype">
 				Type de construction
 			</text>
 			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					Boîte
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cylindre
-				</combo_item>
-				<combo_item name="Prism">
-					Prisme
-				</combo_item>
-				<combo_item name="Sphere">
-					Sphère
-				</combo_item>
-				<combo_item name="Torus">
-					Tore
-				</combo_item>
-				<combo_item name="Tube">
-					Tube
-				</combo_item>
-				<combo_item name="Ring">
-					Anneau
-				</combo_item>
-				<combo_item name="Sculpted">
-					Sculptie
-				</combo_item>
+				<combo_box.item name="Box" label="Boîte"/>
+				<combo_box.item name="Cylinder" label="Cylindre"/>
+				<combo_box.item name="Prism" label="Prisme"/>
+				<combo_box.item name="Sphere" label="Sphère"/>
+				<combo_box.item name="Torus" label="Tore"/>
+				<combo_box.item name="Tube" label="Tube"/>
+				<combo_box.item name="Ring" label="Anneau"/>
+				<combo_box.item name="Sculpted" label="Sculptie"/>
 			</combo_box>
 			<text name="text cut">
 				Début et fin de découpe du tracé
@@ -321,18 +271,10 @@
 				Forme du creux
 			</text>
 			<combo_box name="hole">
-				<combo_item name="Default">
-					Défaut
-				</combo_item>
-				<combo_item name="Circle">
-					Cercle
-				</combo_item>
-				<combo_item name="Square">
-					Carré
-				</combo_item>
-				<combo_item name="Triangle">
-					Triangle
-				</combo_item>
+				<combo_box.item name="Default" label="Défaut"/>
+				<combo_box.item name="Circle" label="Cercle"/>
+				<combo_box.item name="Square" label="Carré"/>
+				<combo_box.item name="Triangle" label="Triangle"/>
 			</combo_box>
 			<text name="text twist">
 				Début et fin de vrille
@@ -381,21 +323,11 @@
 				Type de raccord
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(aucun)
-				</combo_item>
-				<combo_item name="Sphere">
-					Sphère
-				</combo_item>
-				<combo_item name="Torus">
-					Tore
-				</combo_item>
-				<combo_item name="Plane">
-					Plan
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cylindre
-				</combo_item>
+				<combo_box.item name="None" label="aucun)"/>
+				<combo_box.item name="Sphere" label="Sphère"/>
+				<combo_box.item name="Torus" label="Tore"/>
+				<combo_box.item name="Plane" label="Plan"/>
+				<combo_box.item name="Cylinder" label="Cylindre"/>
 			</combo_box>
 		</panel>
 		<panel label="Attributs" name="Features">
@@ -437,88 +369,40 @@
 				Application
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					Défaut
-				</combo_item>
-				<combo_item name="Planar">
-					Planar
-				</combo_item>
+				<combo_box.item name="Default" label="Défaut"/>
+				<combo_box.item name="Planar" label="Planar"/>
 			</combo_box>
 			<text name="label shininess">
 				Brillance
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					Aucune
-				</combo_item>
-				<combo_item name="Low">
-					Faible
-				</combo_item>
-				<combo_item name="Medium">
-					Moyenne
-				</combo_item>
-				<combo_item name="High">
-					Élevée
-				</combo_item>
+				<combo_box.item name="None" label="Aucune"/>
+				<combo_box.item name="Low" label="Faible"/>
+				<combo_box.item name="Medium" label="Moyenne"/>
+				<combo_box.item name="High" label="Élevée"/>
 			</combo_box>
 			<text name="label bumpiness">
 				Relief
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					Aucun
-				</combo_item>
-				<combo_item name="Brightness">
-					Luminosité
-				</combo_item>
-				<combo_item name="Darkness">
-					Obscurité
-				</combo_item>
-				<combo_item name="woodgrain">
-					Aggloméré
-				</combo_item>
-				<combo_item name="bark">
-					Écorce
-				</combo_item>
-				<combo_item name="bricks">
-					Briques
-				</combo_item>
-				<combo_item name="checker">
-					Damier
-				</combo_item>
-				<combo_item name="concrete">
-					Béton
-				</combo_item>
-				<combo_item name="crustytile">
-					Carrelage
-				</combo_item>
-				<combo_item name="cutstone">
-					Pierre de taille
-				</combo_item>
-				<combo_item name="discs">
-					Disques
-				</combo_item>
-				<combo_item name="gravel">
-					Gravier
-				</combo_item>
-				<combo_item name="petridish">
-					Boîte de Petri
-				</combo_item>
-				<combo_item name="siding">
-					Lattes
-				</combo_item>
-				<combo_item name="stonetile">
-					Carreaux
-				</combo_item>
-				<combo_item name="stucco">
-					Stuc
-				</combo_item>
-				<combo_item name="suction">
-					Ventouses
-				</combo_item>
-				<combo_item name="weave">
-					Tissage
-				</combo_item>
+				<combo_box.item name="None" label="Aucun"/>
+				<combo_box.item name="Brightness" label="Luminosité"/>
+				<combo_box.item name="Darkness" label="Obscurité"/>
+				<combo_box.item name="woodgrain" label="Aggloméré"/>
+				<combo_box.item name="bark" label="Écorce"/>
+				<combo_box.item name="bricks" label="Briques"/>
+				<combo_box.item name="checker" label="Damier"/>
+				<combo_box.item name="concrete" label="Béton"/>
+				<combo_box.item name="crustytile" label="Carrelage"/>
+				<combo_box.item name="cutstone" label="Pierre de taille"/>
+				<combo_box.item name="discs" label="Disques"/>
+				<combo_box.item name="gravel" label="Gravier"/>
+				<combo_box.item name="petridish" label="Boîte de Petri"/>
+				<combo_box.item name="siding" label="Lattes"/>
+				<combo_box.item name="stonetile" label="Carreaux"/>
+				<combo_box.item name="stucco" label="Stuc"/>
+				<combo_box.item name="suction" label="Ventouses"/>
+				<combo_box.item name="weave" label="Tissage"/>
 			</combo_box>
 			<text name="tex scale">
 				Répétitions par face
diff --git a/indra/newview/skins/default/xui/fr/floater_world_map.xml b/indra/newview/skins/default/xui/fr/floater_world_map.xml
index b04390bc13..642a258a6f 100644
--- a/indra/newview/skins/default/xui/fr/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/fr/floater_world_map.xml
@@ -54,15 +54,11 @@
 	<check_box name="event_mature_chk"/>
 	<icon left="973" name="avatar_icon"/>
 	<combo_box label="Amis connectés" name="friend combo" tool_tip="Ami à afficher sur la carte" width="232">
-		<combo_box.item name="none_selected">
-			Amis connectés
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Amis connectés" />
 	</combo_box>
 	<icon left="973" name="landmark_icon"/>
 	<combo_box label="Repères" name="landmark combo" tool_tip="Repère à afficher sur la carte" width="232">
-		<combo_box.item name="none_selected">
-			Repères
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Repères" />
 	</combo_box>
 	<icon left="973" name="location_icon"/>
 	<line_editor label="Rechercher par nom de région" name="location" tool_tip="Saisissez le nom d&apos;une région" width="155"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_login.xml b/indra/newview/skins/default/xui/fr/panel_login.xml
index 821aec65b2..74bbe9c5b6 100644
--- a/indra/newview/skins/default/xui/fr/panel_login.xml
+++ b/indra/newview/skins/default/xui/fr/panel_login.xml
@@ -16,18 +16,10 @@
 		Lieu de départ :
 	</text>
 	<combo_box name="start_location_combo">
-		<combo_box.item name="MyHome">
-			Domicile
-		</combo_box.item>
-		<combo_box.item name="MyLastLocation">
-			Dernier emplacement
-		</combo_box.item>
-		<combo_box.item name="&lt;Typeregionname&gt;">
-			&lt;Choisir région&gt;
-		</combo_box.item>
-		<combo_box.item name="Typeregionname">
-			&lt;Nom de la région&gt;
-		</combo_box.item>
+		<combo_box.item name="MyHome" label="Domicile" />
+		<combo_box.item name="MyLastLocation" label="Dernier emplacement" />
+		<combo_box.item name="&lt;Typeregionname&gt;" label="lt;Choisir région&gt;" />
+		<combo_box.item name="Typeregionname" label="lt;Nom de la région&gt;" />
 	</combo_box>
 	<check_box label="Mémoriser" name="remember_check"/>
 	<text name="full_screen_text">
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_general.xml b/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
index dbb471093e..9ab01b3189 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
@@ -10,15 +10,9 @@
 	</radio_group>
 	<check_box label="Afficher le lieu de départ sur l&apos;écran de connexion" name="show_location_checkbox"/>
 	<combo_box name="fade_out_combobox" width="166">
-		<combo_item name="Never">
-			Jamais
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Afficher temporairement
-		</combo_item>
-		<combo_item name="Always">
-			Toujours
-		</combo_item>
+		<combo_box.item name="Never" label="Jamais"/>
+		<combo_box.item name="Show Temporarily" label="Afficher temporairement"/>
+		<combo_box.item name="Always" label="Toujours"/>
 	</combo_box>
 	<check_box label="Nom des avatars en petit" name="small_avatar_names_checkbox"/>
 	<check_box label="Masquer mon nom sur mon écran" name="show_my_name_checkbox"/>
@@ -61,59 +55,25 @@ de sélection :
 		&lt;Saisissez le nom de la région&gt;
 	</string>
 	<combo_box name="crash_behavior_combobox" width="166">
-		<combo_item length="1" name="Askbeforesending" type="string">
-			Demander avant d&apos;envoyer
-		</combo_item>
-		<combo_item length="1" name="Alwayssend" type="string">
-			Toujours envoyer
-		</combo_item>
-		<combo_item length="1" name="Neversend" type="string">
-			Ne jamais envoyer
-		</combo_item>
+		<combo_box.item length="1" name="Askbeforesending" type="string" label="Demander avant d&apos;envoyer"/>
+		<combo_box.item length="1" name="Alwayssend" type="string" label="Toujours envoyer"/>
+		<combo_box.item length="1" name="Neversend" type="string" label="Ne jamais envoyer"/>
 	</combo_box>
 	<combo_box name="language_combobox" width="166">
-		<combo_item name="System Default Language">
-			Choix par défaut
-		</combo_item>
-		<combo_item length="1" name="English" type="string">
-			English (Anglais)
-		</combo_item>
-		<combo_item length="1" name="Danish" type="string">
-			Dansk (Danois) - Bêta
-		</combo_item>
-		<combo_item length="1" name="Deutsch(German)" type="string">
-			Deutsch (Allemand) - Bêta
-		</combo_item>
-		<combo_item name="Spanish">
-			Español (Espagnol) - Bêta
-		</combo_item>
-		<combo_item name="French">
-			Français - Bêta
-		</combo_item>
-		<combo_item name="Hungarian">
-			Magyar (Hongrois) - Bêta
-		</combo_item>
-		<combo_item name="Polish">
-			Polski (Polonais) - Bêta
-		</combo_item>
-		<combo_item name="Portugese">
-			Portugués (Portugais) - Bêta
-		</combo_item>
-		<combo_item name="Russian">
-			Русский (Russe) - Bêta
-		</combo_item>
-		<combo_item name="Ukrainian">
-			Українська (Ukrainien) - Bêta
-		</combo_item>
-		<combo_item length="1" name="Chinese" type="string">
-			中文 (简体) (Chinois) - Bêta
-		</combo_item>
-		<combo_item length="1" name="(Japanese)" type="string">
-			日本語 (Japonais) - Bêta
-		</combo_item>
-		<combo_item length="1" name="(Korean)" type="string">
-			한국어 (Coréen) - Bêta
-		</combo_item>
+		<combo_box.item name="System Default Language" label="Choix par défaut"/>
+		<combo_box.item length="1" name="English" type="string" label="English (Anglais)"/>
+		<combo_box.item length="1" name="Danish" type="string" label="Dansk (Danois) - Bêta"/>
+		<combo_box.item length="1" name="Deutsch(German)" type="string" label="Deutsch (Allemand) - Bêta"/>
+		<combo_box.item name="Spanish" label="Español (Espagnol) - Bêta"/>
+		<combo_box.item name="French" label="Français - Bêta"/>
+		<combo_box.item name="Hungarian" label="Magyar (Hongrois) - Bêta"/>
+		<combo_box.item name="Polish" label="Polski (Polonais) - Bêta"/>
+		<combo_box.item name="Portugese" label="Portugués (Portugais) - Bêta"/>
+		<combo_box.item name="Russian" label="Русский (Russe) - Bêta"/>
+		<combo_box.item name="Ukrainian" label="Українська (Ukrainien) - Bêta"/>
+		<combo_box.item length="1" name="Chinese" type="string" label="中文 (简体) (Chinois) - Bêta"/>
+		<combo_box.item length="1" name="(Japanese)" type="string" label="日本語 (Japonais) - Bêta"/>
+		<combo_box.item length="1" name="(Korean)" type="string" label="한국어 (Coréen) - Bêta"/>
 	</combo_box>
 	<check_box label="Partager la langue avec les objets" name="language_is_public" tool_tip="Cette option permet de faire connaître aux objets du Monde votre langue favorite."/>
 </panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
index aaf6591f2e..bf75fb58a3 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
@@ -8,21 +8,11 @@
 		Taille de la fenêtre :
 	</text>
 	<combo_box name="windowsize combo">
-		<combo_box.item name="640x480">
-			640 x 480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800 x 600
-		</combo_box.item>
-		<combo_box.item name="720x480">
-			720 x 480 (NTSC)
-		</combo_box.item>
-		<combo_box.item name="768x576">
-			768 x 576 (PAL)
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024 x 768
-		</combo_box.item>
+		<combo_box.item name="640x480" label="640 x 480" />
+		<combo_box.item name="800x600" label="800 x 600" />
+		<combo_box.item name="720x480" label="720 x 480 (NTSC)" />
+		<combo_box.item name="768x576" label="768 x 576 (PAL)" />
+		<combo_box.item name="1024x768" label="1024 x 768" />
 	</combo_box>
 	<text name="DisplayResLabel" width="165">
 		Résolution de l&apos;affichage :
@@ -31,18 +21,10 @@
 		Rapport hauteur/largeur :
 	</text>
 	<combo_box name="aspect_ratio" tool_tip="largeur/hauteur">
-		<combo_box.item length="1" name="4:3(StandardCRT)" type="string">
-			4:3 (Standard CRT)
-		</combo_box.item>
-		<combo_box.item length="1" name="5:4(1280x1024LCD)" type="string">
-			5:4 (1280 x 1024 LCD)
-		</combo_box.item>
-		<combo_box.item name="8:5(Widescreen)">
-			8:5 (écran large)
-		</combo_box.item>
-		<combo_box.item length="1" name="16:9(Widescreen)" type="string">
-			16:9 (plein écran)
-		</combo_box.item>
+		<combo_box.item length="1" name="4:3(StandardCRT)" type="string" label="4:3 (Standard CRT)" />
+		<combo_box.item length="1" name="5:4(1280x1024LCD)" type="string" label="5:4 (1280 x 1024 LCD)" />
+		<combo_box.item name="8:5(Widescreen)" label="8:5 (écran large)" />
+		<combo_box.item length="1" name="16:9(Widescreen)" type="string" label="16:9 (plein écran)" />
 	</combo_box>
 	<text length="1" name="text" type="string">
 		Résolution d&apos;affichage :
diff --git a/indra/newview/skins/default/xui/it/floater_about_land.xml b/indra/newview/skins/default/xui/it/floater_about_land.xml
index 237b2264ec..e266aa2164 100644
--- a/indra/newview/skins/default/xui/it/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/it/floater_about_land.xml
@@ -253,43 +253,19 @@ Vai al menu Mondo &gt; Informazioni sul terreno oppure seleziona un altro appezz
 			<check_box label="Nessuna spinta" name="PushRestrictCheck" tool_tip="Previeni i colpi. Selezionare questa opzione può essere utile per prevenire comportamenti dannosi sul tuo terreno."/>
 			<check_box label="Mostra il luogo nella ricerca (30 L$/week) sotto" name="ShowDirectoryCheck" tool_tip="Lascia che questa terra sia vista dagli altri nei risultati di ricerca"/>
 			<combo_box name="land category">
-				<combo_item name="AnyCategory">
-					Tutte le categorie
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Luogo dei Linden
-				</combo_item>
+				<combo_box.item name="AnyCategory" label="Tutte le categorie"/>
+				<combo_box.item name="LindenLocation" label="Luogo dei Linden"/>
 
-				<combo_item name="Arts&amp;Culture">
-					Arte &amp; Cultura
-				</combo_item>
-				<combo_item name="Business">
-					Affari
-				</combo_item>
-				<combo_item name="Educational">
-					Educazione
-				</combo_item>
-				<combo_item name="Gaming">
-					Gioco
-				</combo_item>
-				<combo_item name="Hangout">
-					Divertimento
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Accoglienza nuovi residenti
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parchi &amp; Natura
-				</combo_item>
-				<combo_item name="Residential">
-					Residenziale
-				</combo_item>
-				<combo_item name="Shopping">
-					Shopping
-				</combo_item>
-				<combo_item name="Other">
-					Altro
-				</combo_item>
+				<combo_box.item name="Arts&amp;Culture" label="Arte &amp; Cultura"/>
+				<combo_box.item name="Business" label="Affari"/>
+				<combo_box.item name="Educational" label="Educazione"/>
+				<combo_box.item name="Gaming" label="Gioco"/>
+				<combo_box.item name="Hangout" label="Divertimento"/>
+				<combo_box.item name="NewcomerFriendly" label="Accoglienza nuovi residenti"/>
+				<combo_box.item name="Parks&amp;Nature" label="Parchi &amp; Natura"/>
+				<combo_box.item name="Residential" label="Residenziale"/>
+				<combo_box.item name="Shopping" label="Shopping"/>
+				<combo_box.item name="Other" label="Altro"/>
 			</combo_box>
 			<button label="?" label_selected="?" name="?"/>
 			<check_box name="MatureCheck" />
@@ -309,15 +285,9 @@ Vai al menu Mondo &gt; Informazioni sul terreno oppure seleziona un altro appezz
 				Rotte dei teleport:
 			</text>
 			<combo_box name="landing type" tool_tip="Rotte dei teleport -- seleziona come vuoi organizzare i teleport nella tua terra.">
-				<combo_item name="Blocked">
-					Bloccati
-				</combo_item>
-				<combo_item name="LandingPoint">
-					Punto di atterraggio
-				</combo_item>
-				<combo_item name="Anywhere">
-					Ovunque
-				</combo_item>
+				<combo_box.item name="Blocked" label="Bloccati"/>
+				<combo_box.item name="LandingPoint" label="Punto di atterraggio"/>
+				<combo_box.item name="Anywhere" label="Ovunque"/>
 			</combo_box>
 			<string name="push_restrict_text">
 				Nessuna spinta
@@ -402,12 +372,8 @@ Media:
 			<check_box label="Permetti accesso al gruppo: [Gruppo]" name="GroupCheck" tool_tip="Imposta il gruppo nel pannello generale."/>
 			<check_box label="Vendi pass a:" name="PassCheck" tool_tip="Permetti in questo terreno l&apos;accesso temporaneo"/>
 			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Chiunque
-				</combo_item>
-				<combo_item name="Group">
-					Gruppo
-				</combo_item>
+				<combo_box.item name="Anyone" label="Chiunque"/>
+				<combo_box.item name="Group" label="Gruppo"/>
 			</combo_box>
 			<spinner label="Prezzo in L$:" name="PriceSpin"/>
 			<spinner label="Ore di accesso:" name="HoursSpin"/>
diff --git a/indra/newview/skins/default/xui/it/floater_animation_preview.xml b/indra/newview/skins/default/xui/it/floater_animation_preview.xml
index c00e04b18f..e72dd4aa20 100644
--- a/indra/newview/skins/default/xui/it/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/it/floater_animation_preview.xml
@@ -14,127 +14,53 @@
 		Postura della mano
 	</text>
 	<combo_box label="" name="hand_pose_combo" tool_tip="Controlla cosa fanno le mani durante l&apos;animazione.">
-		<combo_item name="Spread">
-			Aperte
-		</combo_item>
-		<combo_item name="Relaxed">
-			Rilassate
-		</combo_item>
-		<combo_item name="PointBoth">
-			Entrambe indicano
-		</combo_item>
-		<combo_item name="Fist">
-			Pugno
-		</combo_item>
-		<combo_item name="RelaxedLeft">
-			Sinistra Rilassata
-		</combo_item>
-		<combo_item name="PointLeft">
-			Sinistra Indica
-		</combo_item>
-		<combo_item name="FistLeft">
-			Sinistra a pugno
-		</combo_item>
-		<combo_item name="RelaxedRight">
-			Destra rilassata
-		</combo_item>
-		<combo_item name="PointRight">
-			Destra Indica
-		</combo_item>
-		<combo_item name="FistRight">
-			Destra a Pugno
-		</combo_item>
-		<combo_item name="SaluteRight">
-			Destra Saluta
-		</combo_item>
-		<combo_item name="Typing">
-			Digitano
-		</combo_item>
-		<combo_item name="PeaceRight">
-			Destra &apos;segno di pace&apos;
-		</combo_item>
+		<combo_box.item name="Spread" label="Aperte"/>
+		<combo_box.item name="Relaxed" label="Rilassate"/>
+		<combo_box.item name="PointBoth" label="Entrambe indicano"/>
+		<combo_box.item name="Fist" label="Pugno"/>
+		<combo_box.item name="RelaxedLeft" label="Sinistra Rilassata"/>
+		<combo_box.item name="PointLeft" label="Sinistra Indica"/>
+		<combo_box.item name="FistLeft" label="Sinistra a pugno"/>
+		<combo_box.item name="RelaxedRight" label="Destra rilassata"/>
+		<combo_box.item name="PointRight" label="Destra Indica"/>
+		<combo_box.item name="FistRight" label="Destra a Pugno"/>
+		<combo_box.item name="SaluteRight" label="Destra Saluta"/>
+		<combo_box.item name="Typing" label="Digitano"/>
+		<combo_box.item name="PeaceRight" label="Destra &apos;segno di pace&apos;"/>
 	</combo_box>
 	<text name="emote_label">
 		Espressione
 	</text>
 	<combo_box label="" name="emote_combo" tool_tip="Controlla l&apos;espressione del viso durante l&apos;animazione.">
-		<combo_item name="[None]">
-			[None]
-		</combo_item>
-		<combo_item name="Aaaaah">
-			Aaaaah
-		</combo_item>
-		<combo_item name="Afraid">
-			Paura
-		</combo_item>
-		<combo_item name="Angry">
-			Rabbia
-		</combo_item>
-		<combo_item name="BigSmile">
-			Sorriso Aperto
-		</combo_item>
-		<combo_item name="Bored">
-			Noia
-		</combo_item>
-		<combo_item name="Cry">
-			Pianto
-		</combo_item>
-		<combo_item name="Disdain">
-			Sdegno
-		</combo_item>
-		<combo_item name="Embarrassed">
-			Imbarazzo
-		</combo_item>
-		<combo_item name="Frown">
-			Accigliato
-		</combo_item>
-		<combo_item name="Kiss">
-			Bacio
-		</combo_item>
-		<combo_item name="Laugh">
-			Risata
-		</combo_item>
-		<combo_item name="Plllppt">
-			Linguaccia
-		</combo_item>
-		<combo_item name="Repulsed">
-			Repulsione
-		</combo_item>
-		<combo_item name="Sad">
-			Tristezza
-		</combo_item>
-		<combo_item name="Shrug">
-			Spallucce
-		</combo_item>
-		<combo_item name="Smile">
-			Sorriso
-		</combo_item>
-		<combo_item name="Surprise">
-			Sorpresa
-		</combo_item>
-		<combo_item name="Wink">
-			Ammiccamento
-		</combo_item>
-		<combo_item name="Worry">
-			Preoccupazione
-		</combo_item>
+		<combo_box.item name="[None]" label="None]"/>
+		<combo_box.item name="Aaaaah" label="Aaaaah"/>
+		<combo_box.item name="Afraid" label="Paura"/>
+		<combo_box.item name="Angry" label="Rabbia"/>
+		<combo_box.item name="BigSmile" label="Sorriso Aperto"/>
+		<combo_box.item name="Bored" label="Noia"/>
+		<combo_box.item name="Cry" label="Pianto"/>
+		<combo_box.item name="Disdain" label="Sdegno"/>
+		<combo_box.item name="Embarrassed" label="Imbarazzo"/>
+		<combo_box.item name="Frown" label="Accigliato"/>
+		<combo_box.item name="Kiss" label="Bacio"/>
+		<combo_box.item name="Laugh" label="Risata"/>
+		<combo_box.item name="Plllppt" label="Linguaccia"/>
+		<combo_box.item name="Repulsed" label="Repulsione"/>
+		<combo_box.item name="Sad" label="Tristezza"/>
+		<combo_box.item name="Shrug" label="Spallucce"/>
+		<combo_box.item name="Smile" label="Sorriso"/>
+		<combo_box.item name="Surprise" label="Sorpresa"/>
+		<combo_box.item name="Wink" label="Ammiccamento"/>
+		<combo_box.item name="Worry" label="Preoccupazione"/>
 	</combo_box>
 	<text name="preview_label">
 		Vedi anteprima mentre
 	</text>
 	<combo_box label="" name="preview_base_anim" tool_tip="Da usarsi per controllare il comportamento dell&apos;animazione mentre l&apos;avatar svolge azioni abituali.">
-		<combo_item name="Standing">
-			In piedi
-		</combo_item>
-		<combo_item name="Walking">
-			Passeggia
-		</combo_item>
-		<combo_item name="Sitting">
-			Siede
-		</combo_item>
-		<combo_item name="Flying">
-			Vola
-		</combo_item>
+		<combo_box.item name="Standing" label="In piedi"/>
+		<combo_box.item name="Walking" label="Passeggia"/>
+		<combo_box.item name="Sitting" label="Siede"/>
+		<combo_box.item name="Flying" label="Vola"/>
 	</combo_box>
 	<spinner label="Avvio lento (sec)" name="ease_in_time" tool_tip="Tempo (in secondi) in cui le animazioni iniziano a sfumare."/>
 	<spinner label="Arresto lento (sec)" name="ease_out_time" tool_tip="Tempo (in secondi) in cui le animazioni iniziano a sfumare."/>
diff --git a/indra/newview/skins/default/xui/it/floater_buy_land.xml b/indra/newview/skins/default/xui/it/floater_buy_land.xml
index d5bda5ecc6..b85a776238 100644
--- a/indra/newview/skins/default/xui/it/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/it/floater_buy_land.xml
@@ -66,15 +66,9 @@
 		Solo i membri premium possono possedere terra.
 	</text>
 	<combo_box name="account_level">
-		<combo_item name="US$9.95/month,billedmonthly">
-			9.95 US$/mese, addebitati mensilmente
-		</combo_item>
-		<combo_item name="US$7.50/month,billedquarterly">
-			7.50 US$/mese, addebitati ogni quadrimestre
-		</combo_item>
-		<combo_item name="US$6.00/month,billedannually">
-			6.00 US$/mese, addebitati annualmente
-		</combo_item>
+		<combo_box.item name="US$9.95/month,billedmonthly" label="9.95 US$/mese, addebitati mensilmente"/>
+		<combo_box.item name="US$7.50/month,billedquarterly" label="7.50 US$/mese, addebitati ogni quadrimestre"/>
+		<combo_box.item name="US$6.00/month,billedannually" label="6.00 US$/mese, addebitati annualmente"/>
 	</combo_box>
 	<text name="land_use_action">
 		Aumenta il tasso di pagamento mensile delle tasse d&apos;uso della terra a 40 US$/mese.
diff --git a/indra/newview/skins/default/xui/it/floater_hardware_settings.xml b/indra/newview/skins/default/xui/it/floater_hardware_settings.xml
index b7b47a1fb8..699a6e80ef 100644
--- a/indra/newview/skins/default/xui/it/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/it/floater_hardware_settings.xml
@@ -8,21 +8,11 @@
 		Antialiasing:
 	</text>
 	<combo_box label="Antialiasing" name="fsaa">
-		<combo_item name="FSAADisabled">
-			Disattivato
-		</combo_item>
-		<combo_item name="2x">
-			2x
-		</combo_item>
-		<combo_item name="4x">
-			4x
-		</combo_item>
-		<combo_item name="8x">
-			8x
-		</combo_item>
-		<combo_item name="16x">
-			16x
-		</combo_item>
+		<combo_box.item name="FSAADisabled" label="Disattivato"/>
+		<combo_box.item name="2x" label="2x"/>
+		<combo_box.item name="4x" label="4x"/>
+		<combo_box.item name="8x" label="8x"/>
+		<combo_box.item name="16x" label="16x"/>
 	</combo_box>
 	<spinner label="Gamma:" name="gamma"/>
 	<text name="(brightness, lower is brighter)">
diff --git a/indra/newview/skins/default/xui/it/floater_image_preview.xml b/indra/newview/skins/default/xui/it/floater_image_preview.xml
index dfd4d4356b..a4bacba91f 100644
--- a/indra/newview/skins/default/xui/it/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/it/floater_image_preview.xml
@@ -10,36 +10,16 @@
 		Anteprima dell&apos;immagine come:
 	</text>
 	<combo_box label="Tipo d&apos;abito" name="clothing_type_combo">
-		<combo_item name="Image">
-			Immagine
-		</combo_item>
-		<combo_item name="Hair">
-			Capelli
-		</combo_item>
-		<combo_item name="FemaleHead">
-			Testa femminile
-		</combo_item>
-		<combo_item name="FemaleUpperBody">
-			Corpo femminile superiore
-		</combo_item>
-		<combo_item name="FemaleLowerBody">
-			Corpo femminile inferiore
-		</combo_item>
-		<combo_item name="MaleHead">
-			Testa maschile
-		</combo_item>
-		<combo_item name="MaleUpperBody">
-			Corpo maschile superiore
-		</combo_item>
-		<combo_item name="MaleLowerBody">
-			Corpo maschile inferiore
-		</combo_item>
-		<combo_item name="Skirt">
-			Gonna
-		</combo_item>
-		<combo_item name="SculptedPrim">
-			Oggetto sculpt
-		</combo_item>
+		<combo_box.item name="Image" label="Immagine"/>
+		<combo_box.item name="Hair" label="Capelli"/>
+		<combo_box.item name="FemaleHead" label="Testa femminile"/>
+		<combo_box.item name="FemaleUpperBody" label="Corpo femminile superiore"/>
+		<combo_box.item name="FemaleLowerBody" label="Corpo femminile inferiore"/>
+		<combo_box.item name="MaleHead" label="Testa maschile"/>
+		<combo_box.item name="MaleUpperBody" label="Corpo maschile superiore"/>
+		<combo_box.item name="MaleLowerBody" label="Corpo maschile inferiore"/>
+		<combo_box.item name="Skirt" label="Gonna"/>
+		<combo_box.item name="SculptedPrim" label="Oggetto sculpt"/>
 	</combo_box>
 	<text name="bad_image_text">
 		Non è stato possibile leggere l&apos;immagine.
diff --git a/indra/newview/skins/default/xui/it/floater_report_abuse.xml b/indra/newview/skins/default/xui/it/floater_report_abuse.xml
index addf01667a..74d07d4d4c 100644
--- a/indra/newview/skins/default/xui/it/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/it/floater_report_abuse.xml
@@ -36,123 +36,51 @@
 		Hendrerit Vulputate
 	</text>
 	<combo_box name="category_combo" tool_tip="Categoria -- scegli la categoria che descrive meglio questa segnalazione">
-		<combo_item name="Select_category">
-			Scegli la categoria
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Età &gt; Far finta di essere minore
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Età &gt; Residente adulto nella Teen Second Life
-		</combo_item>
+		<combo_box.item name="Select_category" label="Scegli la categoria"/>
+		<combo_box.item name="Age__Age_play" label="Età &gt; Far finta di essere minore"/>
+		<combo_box.item name="Age__Adult_resident_on_Teen_Second_Life" label="Età &gt; Residente adulto nella Teen Second Life"/>
 		
 		
 		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Assalto &gt; sandbox da combattimento / area pericolosa
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Assalto &gt; Area sicura
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Assalto &gt; Test di armi in sandbox
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Commercio &gt; Problema nella consegna di un prodotto o servizio
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Divulgazione &gt; Informazioni del mondo reale
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Divulgazione &gt; Monitoraggio remoto di chat
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Divulgazione &gt; Informazione/chat/IMs di Second Life
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Disturbo della quiete &gt; Uso sleale delle risorse di una regione
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Disturbo della quiete &gt; Numero eccessivo di oggetti scriptati
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Disturbo della quiete &gt; Oggetti messi a soqquadro
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Disturbo della quiete &gt; Spam continuato
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Disturbo della quiete &gt; Spam pubblicitario non richiesto
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Truffa &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Truffa &gt; Terreno
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Truffa &gt; Multilivello o catena di Sant&apos;Antonio
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Truffa &gt; Dollari US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Molestie &gt; Territori adibiti a pubblicità / spam visivo
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Molestie &gt; Diffamazione di individui o gruppi
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Molestie &gt; Impedimento di movimenti
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Molestie &gt; Molestie sessuali
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Molestie &gt; Sollecitare/incitare altri a violare i Termini di Servizio
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Molestie &gt; Abusi verbali
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Indecenza &gt; Condotta o contenuti largamente offensivi
-		</combo_item>
+		<combo_box.item name="Assault__Combat_sandbox___unsafe_area" label="Assalto &gt; sandbox da combattimento / area pericolosa"/>
+		<combo_box.item name="Assault__Safe_area" label="Assalto &gt; Area sicura"/>
+		<combo_box.item name="Assault__Weapons_testing_sandbox" label="Assalto &gt; Test di armi in sandbox"/>
+		<combo_box.item name="Commerce__Failure_to_deliver_product_or_service" label="Commercio &gt; Problema nella consegna di un prodotto o servizio"/>
+		<combo_box.item name="Disclosure__Real_world_information" label="Divulgazione &gt; Informazioni del mondo reale"/>
+		<combo_box.item name="Disclosure__Remotely_monitoring chat" label="Divulgazione &gt; Monitoraggio remoto di chat"/>
+		<combo_box.item name="Disclosure__Second_Life_information_chat_IMs" label="Divulgazione &gt; Informazione/chat/IMs di Second Life"/>
+		<combo_box.item name="Disturbing_the_peace__Unfair_use_of_region_resources" label="Disturbo della quiete &gt; Uso sleale delle risorse di una regione"/>
+		<combo_box.item name="Disturbing_the_peace__Excessive_scripted_objects" label="Disturbo della quiete &gt; Numero eccessivo di oggetti scriptati"/>
+		<combo_box.item name="Disturbing_the_peace__Object_littering" label="Disturbo della quiete &gt; Oggetti messi a soqquadro"/>
+		<combo_box.item name="Disturbing_the_peace__Repetitive_spam" label="Disturbo della quiete &gt; Spam continuato"/>
+		<combo_box.item name="Disturbing_the_peace__Unwanted_advert_spam" label="Disturbo della quiete &gt; Spam pubblicitario non richiesto"/>
+		<combo_box.item name="Fraud__L$" label="Truffa &gt; L$"/>
+		<combo_box.item name="Fraud__Land" label="Truffa &gt; Terreno"/>
+		<combo_box.item name="Fraud__Pyramid_scheme_or_chain_letter" label="Truffa &gt; Multilivello o catena di Sant&apos;Antonio"/>
+		<combo_box.item name="Fraud__US$" label="Truffa &gt; Dollari US$"/>
+		<combo_box.item name="Harassment__Advert_farms___visual_spam" label="Molestie &gt; Territori adibiti a pubblicità / spam visivo"/>
+		<combo_box.item name="Harassment__Defaming_individuals_or_groups" label="Molestie &gt; Diffamazione di individui o gruppi"/>
+		<combo_box.item name="Harassment__Impeding_movement" label="Molestie &gt; Impedimento di movimenti"/>
+		<combo_box.item name="Harassment__Sexual_harassment" label="Molestie &gt; Molestie sessuali"/>
+		<combo_box.item name="Harassment__Solicting_inciting_others_to_violate_ToS" label="Molestie &gt; Sollecitare/incitare altri a violare i Termini di Servizio"/>
+		<combo_box.item name="Harassment__Verbal_abuse" label="Molestie &gt; Abusi verbali"/>
+		<combo_box.item name="Indecency__Broadly_offensive_content_or_conduct" label="Indecenza &gt; Condotta o contenuti largamente offensivi"/>
 		
 		
 		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Indecenza &gt; Nome di un avatar inappropriato
-		</combo_item>
+		<combo_box.item name="Indecency__Inappropriate_avatar_name" label="Indecenza &gt; Nome di un avatar inappropriato"/>
 		
 		
 		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Violazione della proprietà intellettuale &gt; Rimozione contenuti
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Violazione della proprietà intellettuale &gt; CopyBot o sblocco di permessi
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intolleranza
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Terreno &gt; Abuso delle risorse di una sandbox
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Terreno &gt; Invasione &gt; Oggetti/textures
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Terreno &gt; Invasione &gt; Particelle
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Terreno &gt; Invasione &gt; Alberi/piante
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Chiedere l&apos;elemosina/gioco d&apos;azzardo
-		</combo_item>
-		<combo_item name="Other">
-			Altro
-		</combo_item>
+		<combo_box.item name="Intellectual_property_infringement_Content_Removal" label="Violazione della proprietà intellettuale &gt; Rimozione contenuti"/>
+		<combo_box.item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit" label="Violazione della proprietà intellettuale &gt; CopyBot o sblocco di permessi"/>
+		<combo_box.item name="Intolerance" label="Intolleranza"/>
+		<combo_box.item name="Land__Abuse_of_sandbox_resources" label="Terreno &gt; Abuso delle risorse di una sandbox"/>
+		<combo_box.item name="Land__Encroachment__Objects_textures" label="Terreno &gt; Invasione &gt; Oggetti/textures"/>
+		<combo_box.item name="Land__Encroachment__Particles" label="Terreno &gt; Invasione &gt; Particelle"/>
+		<combo_box.item name="Land__Encroachment__Trees_plants" label="Terreno &gt; Invasione &gt; Alberi/piante"/>
+		<combo_box.item name="Wagering_gambling" label="Chiedere l&apos;elemosina/gioco d&apos;azzardo"/>
+		<combo_box.item name="Other" label="Altro"/>
 	</combo_box>
 	<text name="abuser_name_title">
 		Nome di chi ha commesso l&apos;abuso:
diff --git a/indra/newview/skins/default/xui/it/floater_sell_land.xml b/indra/newview/skins/default/xui/it/floater_sell_land.xml
index d57d88f6f4..01c7fca0e6 100644
--- a/indra/newview/skins/default/xui/it/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/it/floater_sell_land.xml
@@ -34,15 +34,9 @@
 		Scegli se vendere a tutti o ad un compratore in particolare.
 	</text>
 	<combo_box name="sell_to">
-		<combo_item name="--selectone--">
-			-- selezionane uno --
-		</combo_item>
-		<combo_item name="Anyone">
-			Chiunque
-		</combo_item>
-		<combo_item name="Specificuser:">
-			Utente specifico:
-		</combo_item>
+		<combo_box.item name="--selectone--" label="selezionane uno --"/>
+		<combo_box.item name="Anyone" label="Chiunque"/>
+		<combo_box.item name="Specificuser:" label="Utente specifico:"/>
 	</combo_box>
 	<button label="Seleziona..." name="sell_to_select_agent"/>
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/it/floater_settings_debug.xml b/indra/newview/skins/default/xui/it/floater_settings_debug.xml
index 869da40b8d..0f101d8b81 100644
--- a/indra/newview/skins/default/xui/it/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/it/floater_settings_debug.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater name="settings_debug" title="Configurazioni per il debug">
 	<combo_box name="boolean_combo">
-		<combo_item name="TRUE">
-			VERO
-		</combo_item>
-		<combo_item name="FALSE">
-			FALSO
-		</combo_item>
+		<combo_box.item name="TRUE" label="VERO"/>
+		<combo_box.item name="FALSE" label="FALSO"/>
 	</combo_box>
 	<color_swatch label="Colore" name="color_swatch"/>
 	<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/it/floater_snapshot.xml b/indra/newview/skins/default/xui/it/floater_snapshot.xml
index 7729d84fa6..1c24b53cd8 100644
--- a/indra/newview/skins/default/xui/it/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/it/floater_snapshot.xml
@@ -34,75 +34,33 @@
 		Formato
 	</text>
 	<combo_box label="Risoluzione" name="postcard_size_combo">
-		<combo_item name="CurrentWindow">
-			Finestra corrente
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="Custom">
-			Personalizzata
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Finestra corrente"/>
+		<combo_box.item name="640x480" label="640x480"/>
+		<combo_box.item name="800x600" label="800x600"/>
+		<combo_box.item name="1024x768" label="1024x768"/>
+		<combo_box.item name="Custom" label="Personalizzata"/>
 	</combo_box>
 	<combo_box label="Risoluzione" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
-			Finestra corrente
-		</combo_item>
-		<combo_item name="Small(128x128)">
-			Piccola (128x128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
-			Media (256x256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
-			Larga (512x512)
-		</combo_item>
-		<combo_item name="Custom">
-			Personalizzata
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Finestra corrente"/>
+		<combo_box.item name="Small(128x128)" label="Piccola (128x128)"/>
+		<combo_box.item name="Medium(256x256)" label="Media (256x256)"/>
+		<combo_box.item name="Large(512x512)" label="Larga (512x512)"/>
+		<combo_box.item name="Custom" label="Personalizzata"/>
 	</combo_box>
 	<combo_box label="Risoluzione" name="local_size_combo">
-		<combo_item name="CurrentWindow">
-			Finestra corrente
-		</combo_item>
-		<combo_item name="320x240">
-			320x240
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="1280x1024">
-			1280x1024
-		</combo_item>
-		<combo_item name="1600x1200">
-			1600x1200
-		</combo_item>
-		<combo_item name="Custom">
-			Personalizzata
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Finestra corrente"/>
+		<combo_box.item name="320x240" label="320x240"/>
+		<combo_box.item name="640x480" label="640x480"/>
+		<combo_box.item name="800x600" label="800x600"/>
+		<combo_box.item name="1024x768" label="1024x768"/>
+		<combo_box.item name="1280x1024" label="1280x1024"/>
+		<combo_box.item name="1600x1200" label="1600x1200"/>
+		<combo_box.item name="Custom" label="Personalizzata"/>
 	</combo_box>
 	<combo_box label="Formato" name="local_format_combo">
-		<combo_item name="PNG">
-			PNG
-		</combo_item>
-		<combo_item name="JPEG">
-			JPEG
-		</combo_item>
-		<combo_item name="BMP">
-			BMP
-		</combo_item>
+		<combo_box.item name="PNG" label="PNG"/>
+		<combo_box.item name="JPEG" label="JPEG"/>
+		<combo_box.item name="BMP" label="BMP"/>
 	</combo_box>
 	<spinner label="Larghezza" name="snapshot_width"/>
 	<spinner label="Altezza" name="snapshot_height"/>
@@ -112,15 +70,9 @@
 		Fotografa:
 	</text>
 	<combo_box label="Layer dell&apos;immagine" name="layer_types">
-		<combo_item name="Colors">
-			Colori
-		</combo_item>
-		<combo_item name="Depth">
-			Profondità
-		</combo_item>
-		<combo_item name="ObjectMattes">
-			Colori primari degli oggetti
-		</combo_item>
+		<combo_box.item name="Colors" label="Colori"/>
+		<combo_box.item name="Depth" label="Profondità"/>
+		<combo_box.item name="ObjectMattes" label="Colori primari degli oggetti"/>
 	</combo_box>
 	<check_box label="Mostra l&apos;interfaccia nella fotografia" name="ui_check"/>
 	<check_box label="Mostra i dispositivi indossati nella fotografia" name="hud_check"/>
diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml
index 9044dd057d..8bc9e511b5 100644
--- a/indra/newview/skins/default/xui/it/floater_tools.xml
+++ b/indra/newview/skins/default/xui/it/floater_tools.xml
@@ -20,15 +20,9 @@
 		Modalità  regolo di precisione:
 	</text>
 	<combo_box name="combobox grid mode">
-		<combo_item name="World">
-			Globale
-		</combo_item>
-		<combo_item name="Local">
-			Locale
-		</combo_item>
-		<combo_item name="Reference">
-			Riferito a
-		</combo_item>
+		<combo_box.item name="World" label="Globale"/>
+		<combo_box.item name="Local" label="Locale"/>
+		<combo_box.item name="Reference" label="Riferito a"/>
 	</combo_box>
 	<check_box label="Ridimensiona simmetricamente" name="checkbox uniform"/>
 	<check_box label="Ridimensiona le Texture" name="checkbox stretch textures"/>
@@ -64,15 +58,9 @@
 	<check_box label="Corruga il terreno" name="radio noise"/>
 	<check_box label="Ripristina il terreno" name="radio revert"/>
 	<combo_box name="combobox brush size">
-		<combo_item name="Small">
-			Piccolo
-		</combo_item>
-		<combo_item name="Medium">
-			Medio
-		</combo_item>
-		<combo_item name="Large">
-			Grande
-		</combo_item>
+		<combo_box.item name="Small" label="Piccolo"/>
+		<combo_box.item name="Medium" label="Medio"/>
+		<combo_box.item name="Large" label="Grande"/>
 	</combo_box>
 	<text name="Strength:">
 		Pressione:
@@ -155,27 +143,13 @@
 				Se cliccato con il tasto sinistro del mouse
 			</text>
 			<combo_box name="clickaction">
-				<combo_item name="Touch/grab(default)">
-					Tocca/Afferra (default)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					Siediti sull&apos;oggetto
-				</combo_item>
-				<combo_item name="Buyobject">
-					Compra l&apos;oggetto
-				</combo_item>
-				<combo_item name="Payobject">
-					Paga l&apos;oggetto
-				</combo_item>
-				<combo_item name="Open">
-					Apri
-				</combo_item>
-				<combo_item name="Play">
-					Attiva i multimedia del terreno
-				</combo_item>
-				<combo_item name="Opemmedia">
-					Apri i multimedia del terreno
-				</combo_item>
+				<combo_box.item name="Touch/grab(default)" label="Tocca/Afferra (default)"/>
+				<combo_box.item name="Sitonobject" label="Siediti sull&apos;oggetto"/>
+				<combo_box.item name="Buyobject" label="Compra l&apos;oggetto"/>
+				<combo_box.item name="Payobject" label="Paga l&apos;oggetto"/>
+				<combo_box.item name="Open" label="Apri"/>
+				<combo_box.item name="Play" label="Attiva i multimedia del terreno"/>
+				<combo_box.item name="Opemmedia" label="Apri i multimedia del terreno"/>
 			</combo_box>
 			<text name="B:">
 				B:
@@ -259,56 +233,26 @@
 				Materiale
 			</text>
 			<combo_box name="material">
-				<combo_item name="Stone">
-					Pietra
-				</combo_item>
-				<combo_item name="Metal">
-					Metallo
-				</combo_item>
-				<combo_item name="Glass">
-					Vetro
-				</combo_item>
-				<combo_item name="Wood">
-					Legno
-				</combo_item>
-				<combo_item name="Flesh">
-					Carne
-				</combo_item>
-				<combo_item name="Plastic">
-					Plastica
-				</combo_item>
-				<combo_item name="Rubber">
-					Gomma
-				</combo_item>
+				<combo_box.item name="Stone" label="Pietra"/>
+				<combo_box.item name="Metal" label="Metallo"/>
+				<combo_box.item name="Glass" label="Vetro"/>
+				<combo_box.item name="Wood" label="Legno"/>
+				<combo_box.item name="Flesh" label="Carne"/>
+				<combo_box.item name="Plastic" label="Plastica"/>
+				<combo_box.item name="Rubber" label="Gomma"/>
 			</combo_box>
 			<text name="label basetype">
 				Forma di costruzione
 			</text>
 			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					Cubo
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilindro
-				</combo_item>
-				<combo_item name="Prism">
-					Prisma
-				</combo_item>
-				<combo_item name="Sphere">
-					Sfera
-				</combo_item>
-				<combo_item name="Torus">
-					Toro
-				</combo_item>
-				<combo_item name="Tube">
-					Tubo
-				</combo_item>
-				<combo_item name="Ring">
-					Anello
-				</combo_item>
-				<combo_item name="Sculpted">
-					Sculpted
-				</combo_item>
+				<combo_box.item name="Box" label="Cubo"/>
+				<combo_box.item name="Cylinder" label="Cilindro"/>
+				<combo_box.item name="Prism" label="Prisma"/>
+				<combo_box.item name="Sphere" label="Sfera"/>
+				<combo_box.item name="Torus" label="Toro"/>
+				<combo_box.item name="Tube" label="Tubo"/>
+				<combo_box.item name="Ring" label="Anello"/>
+				<combo_box.item name="Sculpted" label="Sculpted"/>
 			</combo_box>
 			<text name="text cut">
 				Linea di taglio Inizio e Fine
@@ -325,18 +269,10 @@
 				Forma del foro
 			</text>
 			<combo_box name="hole">
-				<combo_item name="Default">
-					Default
-				</combo_item>
-				<combo_item name="Circle">
-					Rotondo
-				</combo_item>
-				<combo_item name="Square">
-					Quadrato
-				</combo_item>
-				<combo_item name="Triangle">
-					Triangolare
-				</combo_item>
+				<combo_box.item name="Default" label="Default"/>
+				<combo_box.item name="Circle" label="Rotondo"/>
+				<combo_box.item name="Square" label="Quadrato"/>
+				<combo_box.item name="Triangle" label="Triangolare"/>
 			</combo_box>
 			<text name="text twist">
 				Torsione Inizio e Fine
@@ -382,21 +318,11 @@
 				Tipo di congiunzione
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(nessuna)
-				</combo_item>
-				<combo_item name="Sphere">
-					Sferica
-				</combo_item>
-				<combo_item name="Torus">
-					Toroidale
-				</combo_item>
-				<combo_item name="Plane">
-					Piana
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilindrica
-				</combo_item>
+				<combo_box.item name="None" label="nessuna)"/>
+				<combo_box.item name="Sphere" label="Sferica"/>
+				<combo_box.item name="Torus" label="Toroidale"/>
+				<combo_box.item name="Plane" label="Piana"/>
+				<combo_box.item name="Cylinder" label="Cilindrica"/>
 			</combo_box>
 		</panel>
 		<panel label="Caratteristiche" name="Features">
@@ -438,88 +364,40 @@
 				Applicazione della texture
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					Default
-				</combo_item>
-				<combo_item name="Planar">
-					Planare
-				</combo_item>
+				<combo_box.item name="Default" label="Default"/>
+				<combo_box.item name="Planar" label="Planare"/>
 			</combo_box>
 			<text name="label shininess">
 				Brillantezza
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					Nessuna
-				</combo_item>
-				<combo_item name="Low">
-					Bassa
-				</combo_item>
-				<combo_item name="Medium">
-					Media
-				</combo_item>
-				<combo_item name="High">
-					Alta
-				</combo_item>
+				<combo_box.item name="None" label="Nessuna"/>
+				<combo_box.item name="Low" label="Bassa"/>
+				<combo_box.item name="Medium" label="Media"/>
+				<combo_box.item name="High" label="Alta"/>
 			</combo_box>
 			<text name="label bumpiness">
 				Rilievo
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					Nessuna
-				</combo_item>
-				<combo_item name="Brightness">
-					Luminoso
-				</combo_item>
-				<combo_item name="Darkness">
-					Scuro
-				</combo_item>
-				<combo_item name="woodgrain">
-					Venature del legno
-				</combo_item>
-				<combo_item name="bark">
-					Corteccia
-				</combo_item>
-				<combo_item name="bricks">
-					Mattoni
-				</combo_item>
-				<combo_item name="checker">
-					Scacchi
-				</combo_item>
-				<combo_item name="concrete">
-					Cemento
-				</combo_item>
-				<combo_item name="crustytile">
-					Mattonella incrostata
-				</combo_item>
-				<combo_item name="cutstone">
-					Mosaico in pietra
-				</combo_item>
-				<combo_item name="discs">
-					Dischi
-				</combo_item>
-				<combo_item name="gravel">
-					Ghiaia
-				</combo_item>
-				<combo_item name="petridish">
-					Sassi
-				</combo_item>
-				<combo_item name="siding">
-					Listoni
-				</combo_item>
-				<combo_item name="stonetile">
-					Mattonelle in pietra
-				</combo_item>
-				<combo_item name="stucco">
-					Stucco
-				</combo_item>
-				<combo_item name="suction">
-					Cerchi rialzati
-				</combo_item>
-				<combo_item name="weave">
-					Trama
-				</combo_item>
+				<combo_box.item name="None" label="Nessuna"/>
+				<combo_box.item name="Brightness" label="Luminoso"/>
+				<combo_box.item name="Darkness" label="Scuro"/>
+				<combo_box.item name="woodgrain" label="Venature del legno"/>
+				<combo_box.item name="bark" label="Corteccia"/>
+				<combo_box.item name="bricks" label="Mattoni"/>
+				<combo_box.item name="checker" label="Scacchi"/>
+				<combo_box.item name="concrete" label="Cemento"/>
+				<combo_box.item name="crustytile" label="Mattonella incrostata"/>
+				<combo_box.item name="cutstone" label="Mosaico in pietra"/>
+				<combo_box.item name="discs" label="Dischi"/>
+				<combo_box.item name="gravel" label="Ghiaia"/>
+				<combo_box.item name="petridish" label="Sassi"/>
+				<combo_box.item name="siding" label="Listoni"/>
+				<combo_box.item name="stonetile" label="Mattonelle in pietra"/>
+				<combo_box.item name="stucco" label="Stucco"/>
+				<combo_box.item name="suction" label="Cerchi rialzati"/>
+				<combo_box.item name="weave" label="Trama"/>
 			</combo_box>
 			<text name="tex scale">
 				Ripetizioni per faccia
diff --git a/indra/newview/skins/default/xui/it/floater_world_map.xml b/indra/newview/skins/default/xui/it/floater_world_map.xml
index 461b7c264f..f1074b16b5 100644
--- a/indra/newview/skins/default/xui/it/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/it/floater_world_map.xml
@@ -34,14 +34,10 @@
 	</text>
 
 	<combo_box label="Amici Online" name="friend combo" tool_tip="Amici da mostrare sulla mappa">
-		<combo_item name="none_selected">
-			Amici Online
-		</combo_item>
+		<combo_box.item name="none_selected" label="Amici Online"/>
 	</combo_box>
 	<combo_box label="Landmark" name="landmark combo" tool_tip="Landmarks da mostrare sulla mappa">
-		<combo_item name="none_selected">
-			Landmark
-		</combo_item>
+		<combo_box.item name="none_selected" label="Landmark"/>
 	</combo_box>
 	<line_editor label="Cerca per nome di regione" name="location" tool_tip="Scrivi il nome di una regione"/>
 	<button label="Cerca" name="DoSearch" tool_tip="Cerca regione"/>
diff --git a/indra/newview/skins/default/xui/it/panel_login.xml b/indra/newview/skins/default/xui/it/panel_login.xml
index a289e32b47..58d1c09a4b 100644
--- a/indra/newview/skins/default/xui/it/panel_login.xml
+++ b/indra/newview/skins/default/xui/it/panel_login.xml
@@ -19,15 +19,9 @@
 		Luogo di partenza:
 	</text>
 	<combo_box name="start_location_combo">
-		<combo_item name="MyHome">
-			Casa Mia
-		</combo_item>
-		<combo_item name="MyLastLocation">
-			Ultimo luogo dove sono stato
-		</combo_item>
-		<combo_item name="Typeregionname">
-			&lt;Scrivi la regione di partenza&gt;
-		</combo_item>
+		<combo_box.item name="MyHome" label="Casa Mia"/>
+		<combo_box.item name="MyLastLocation" label="Ultimo luogo dove sono stato"/>
+		<combo_box.item name="Typeregionname" label="lt;Scrivi la regione di partenza&gt;"/>
 	</combo_box>
 	<check_box label="Ricorda password" name="remember_check"/>
 	<button label="Log In" label_selected="Log In" name="connect_btn"/>
diff --git a/indra/newview/skins/default/xui/it/panel_preferences_general.xml b/indra/newview/skins/default/xui/it/panel_preferences_general.xml
index 3b29b5e60a..74f846095d 100644
--- a/indra/newview/skins/default/xui/it/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/it/panel_preferences_general.xml
@@ -10,15 +10,9 @@
 	</radio_group>
 	<check_box label="Mostra il posto di partenza sulla schermata d&apos;inizio" name="show_location_checkbox"/>
 	<combo_box name="fade_out_combobox" width="166">
-		<combo_item name="Never">
-			Mai
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Mostra temporanemente
-		</combo_item>
-		<combo_item name="Always">
-			Sempre
-		</combo_item>
+		<combo_box.item name="Never" label="Mai"/>
+		<combo_box.item name="Show Temporarily" label="Mostra temporanemente"/>
+		<combo_box.item name="Always" label="Sempre"/>
 	</combo_box>
 	<check_box label="Nomi avatar in piccolo" name="small_avatar_names_checkbox"/>
 	<check_box label="Nascondi il mio nome sul mio schermo" name="show_my_name_checkbox"/>
@@ -62,53 +56,23 @@
 		&lt;Scrivi il nome della regione&gt;
 	</string>
 	<combo_box name="crash_behavior_combobox" width="166">
-		<combo_item name="Askbeforesending">
-			Chiedi prima di inviare
-		</combo_item>
-		<combo_item name="Alwayssend">
-			Invia sempre
-		</combo_item>
-		<combo_item name="Neversend">
-			Non inviare mai
-		</combo_item>
+		<combo_box.item name="Askbeforesending" label="Chiedi prima di inviare"/>
+		<combo_box.item name="Alwayssend" label="Invia sempre"/>
+		<combo_box.item name="Neversend" label="Non inviare mai"/>
 	</combo_box>
 	<combo_box name="language_combobox" width="166">
-		<combo_item name="System Default Language">
-			Default di sistema
-		</combo_item>
-		<combo_item name="English">
-			English
-		</combo_item>
-		<combo_item name="Danish">
-			Dansk (Danese) - Beta
-		</combo_item>
-		<combo_item name="Deutsch(German)">
-			Deutsch (Tedesco) - Beta
-		</combo_item>
-		<combo_item name="Spanish">
-			Español (Spagnolo) - Beta
-		</combo_item>
-		<combo_item name="French">
-			Français (Francese) - Beta
-		</combo_item>
-		<combo_item name="Hungarian">
-			Magyar (Ungherese) - Beta
-		</combo_item>
-		<combo_item name="Polish">
-			Polski (Polacco) - Beta
-		</combo_item>
-		<combo_item name="Portugese">
-			Portugués (Portoghese) - Beta
-		</combo_item>
-		<combo_item name="Chinese">
-			中文 (简体) (Cinese) - Beta
-		</combo_item>
-		<combo_item name="(Japanese)">
-			日本語 (Giapponese) - Beta
-		</combo_item>
-		<combo_item name="(Korean)">
-			한국어 (Coreano) - Beta
-		</combo_item>
+		<combo_box.item name="System Default Language" label="Default di sistema"/>
+		<combo_box.item name="English" label="English"/>
+		<combo_box.item name="Danish" label="Dansk (Danese) - Beta"/>
+		<combo_box.item name="Deutsch(German)" label="Deutsch (Tedesco) - Beta"/>
+		<combo_box.item name="Spanish" label="Español (Spagnolo) - Beta"/>
+		<combo_box.item name="French" label="Français (Francese) - Beta"/>
+		<combo_box.item name="Hungarian" label="Magyar (Ungherese) - Beta"/>
+		<combo_box.item name="Polish" label="Polski (Polacco) - Beta"/>
+		<combo_box.item name="Portugese" label="Portugués (Portoghese) - Beta"/>
+		<combo_box.item name="Chinese" label="中文 (简体) (Cinese) - Beta"/>
+		<combo_box.item name="(Japanese)" label="日本語 (Giapponese) - Beta"/>
+		<combo_box.item name="(Korean)" label="한국어 (Coreano) - Beta"/>
 	</combo_box>
 	<check_box label="Condividi la tua lingua con gli oggetti" name="language_is_public" tool_tip="Questo fa in modo che gli oggetti inworld riconoscano la tua lingua."/>
 </panel>
diff --git a/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml
index 4826aafc6a..267a57202f 100644
--- a/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml
@@ -9,21 +9,11 @@
 		Dimensione della finestra:
 	</text>
 	<combo_box name="windowsize combo">
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="720x480">
-			720x480 (NTSC)
-		</combo_item>
-		<combo_item name="768x576">
-			768x576 (PAL)
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
+		<combo_box.item name="640x480" label="640x480"/>
+		<combo_box.item name="800x600" label="800x600"/>
+		<combo_box.item name="720x480" label="720x480 (NTSC)"/>
+		<combo_box.item name="768x576" label="768x576 (PAL)"/>
+		<combo_box.item name="1024x768" label="1024x768"/>
 	</combo_box>
 	<text name="DisplayResLabel">
 		Risoluzione del monitor:
@@ -32,18 +22,10 @@
 		Rapporto di visualizzazione:
 	</text>
 	<combo_box name="aspect_ratio" tool_tip="larghezza/altezza">
-		<combo_item name="4:3(StandardCRT)">
-			4:3 (Monitor Standard)
-		</combo_item>
-		<combo_item name="5:4(1280x1024LCD)">
-			5:4 (1280x1024 LCD)
-		</combo_item>
-		<combo_item name="8:5(Widescreen)">
-			8:5 (Widescreen)
-		</combo_item>
-		<combo_item name="16:9(Widescreen)">
-			16:9 (Widescreen)
-		</combo_item>
+		<combo_box.item name="4:3(StandardCRT)" label="4:3 (Monitor Standard)"/>
+		<combo_box.item name="5:4(1280x1024LCD)" label="5:4 (1280x1024 LCD)"/>
+		<combo_box.item name="8:5(Widescreen)" label="8:5 (Widescreen)"/>
+		<combo_box.item name="16:9(Widescreen)" label="16:9 (Widescreen)"/>
 	</combo_box>
 	<check_box label="Autoconfigurazione" name="aspect_auto_detect"/>
 	<text name="HigherText">
diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml
index d958c35b4b..8cc28cb01f 100644
--- a/indra/newview/skins/default/xui/ja/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml
@@ -256,43 +256,19 @@
 			<check_box label="プッシングを制限" name="PushRestrictCheck" tool_tip="スクリプトによるプッシングを制限します。 このオプションを選択することにより、あなたの土地での破壊的行動を妨げることができます。"/>
 			<check_box label="検索に表示>(週L$30)以下の場所" name="ShowDirectoryCheck" tool_tip="検索結果でこの区画を表示させる"/>
 			<combo_box name="land category">
-				<combo_item name="AnyCategory">
-					全カテゴリー
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Linden所在地
-				</combo_item>
+				<combo_box.item name="AnyCategory" label="全カテゴリー"/>
+				<combo_box.item name="LindenLocation" label="Linden所在地"/>
 
-				<combo_item name="Arts&amp;Culture">
-					アート&amp;カルチャー
-				</combo_item>
-				<combo_item name="Business">
-					ビジネス
-				</combo_item>
-				<combo_item name="Educational">
-					教育的
-				</combo_item>
-				<combo_item name="Gaming">
-					ゲーム
-				</combo_item>
-				<combo_item name="Hangout">
-					たまり場
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					新住人に好意的
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					公園と自然
-				</combo_item>
-				<combo_item name="Residential">
-					住宅用
-				</combo_item>
-				<combo_item name="Shopping">
-					ショッピング
-				</combo_item>
-				<combo_item name="Other">
-					その他
-				</combo_item>
+				<combo_box.item name="Arts&amp;Culture" label="アート&amp;カルチャー"/>
+				<combo_box.item name="Business" label="ビジネス"/>
+				<combo_box.item name="Educational" label="教育的"/>
+				<combo_box.item name="Gaming" label="ゲーム"/>
+				<combo_box.item name="Hangout" label="たまり場"/>
+				<combo_box.item name="NewcomerFriendly" label="新住人に好意的"/>
+				<combo_box.item name="Parks&amp;Nature" label="公園と自然"/>
+				<combo_box.item name="Residential" label="住宅用"/>
+				<combo_box.item name="Shopping" label="ショッピング"/>
+				<combo_box.item name="Other" label="その他"/>
 			</combo_box>
 			<button label="?" label_selected="?" name="?"/>
 			<check_box name="MatureCheck" />
@@ -312,15 +288,9 @@
 				テレポート制限:
 			</text>
 			<combo_box name="landing type" tool_tip="Teleport Routing -- select how to handle teleports onto your land.">
-				<combo_item length="1" name="Blocked" type="string">
-					不可
-				</combo_item>
-				<combo_item length="1" name="LandingPoint" type="string">
-					着地点
-				</combo_item>
-				<combo_item length="1" name="Anywhere" type="string">
-					どこでも
-				</combo_item>
+				<combo_box.item length="1" name="Blocked" type="string" label="不可"/>
+				<combo_box.item length="1" name="LandingPoint" type="string" label="着地点"/>
+				<combo_box.item length="1" name="Anywhere" type="string" label="どこでも"/>
 			</combo_box>
 			<string name="push_restrict_text">
 				プッシングを制限
@@ -405,12 +375,8 @@
 			<check_box label="グループ・アクセスを許可:[GROUP]" name="GroupCheck" tool_tip="[一般]タブで、グループを選択してください。"/>
 			<check_box label="入場許可を販売:" name="PassCheck" tool_tip="この区画への一時的なアクセスを許可"/>
 			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					誰でも
-				</combo_item>
-				<combo_item name="Group">
-					グループ
-				</combo_item>
+				<combo_box.item name="Anyone" label="誰でも"/>
+				<combo_box.item name="Group" label="グループ"/>
 			</combo_box>
 			<spinner label="価格(L$):" name="PriceSpin"/>
 			<spinner label="アクセス時間:" name="HoursSpin"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_animation_preview.xml b/indra/newview/skins/default/xui/ja/floater_animation_preview.xml
index 4673f908c4..b61007d86e 100644
--- a/indra/newview/skins/default/xui/ja/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/ja/floater_animation_preview.xml
@@ -13,18 +13,10 @@
 	</text>
 	<combo_box label="" name="preview_base_anim"
 	     tool_tip="アバターが普通の行動をするときのアニメーションの動きをテストするためにこれを使います。">
-		<combo_box.item name="Standing">
-			立つ
-		</combo_box.item>
-		<combo_box.item name="Walking">
-			歩く
-		</combo_box.item>
-		<combo_box.item name="Sitting">
-			座る
-		</combo_box.item>
-		<combo_box.item name="Flying">
-			飛行
-		</combo_box.item>
+		<combo_box.item name="Standing" label="立つ" />
+		<combo_box.item name="Walking" label="歩く" />
+		<combo_box.item name="Sitting" label="座る" />
+		<combo_box.item name="Flying" label="飛行" />
 	</combo_box>
 	<pad height="7" />
 	<check_box label="ループ" name="loop_check"
@@ -38,111 +30,45 @@
 	</text>
 	<combo_box label="" name="hand_pose_combo"
 	     tool_tip="アニメーションの手の動きをコントロールします。">
-		<combo_box.item name="Spread">
-			広がる
-		</combo_box.item>
-		<combo_box.item name="Relaxed">
-			リラックス
-		</combo_box.item>
-		<combo_box.item name="PointBoth">
-			両方を指す
-		</combo_box.item>
-		<combo_box.item name="Fist">
-			拳
-		</combo_box.item>
-		<combo_box.item name="RelaxedLeft">
-			リラックス左
-		</combo_box.item>
-		<combo_box.item name="PointLeft">
-			左を指す
-		</combo_box.item>
-		<combo_box.item name="FistLeft">
-			拳左
-		</combo_box.item>
-		<combo_box.item name="RelaxedRight">
-			リラックス右
-		</combo_box.item>
-		<combo_box.item name="PointRight">
-			右を指す
-		</combo_box.item>
-		<combo_box.item name="FistRight">
-			拳右
-		</combo_box.item>
-		<combo_box.item name="SaluteRight">
-			敬礼右
-		</combo_box.item>
-		<combo_box.item name="Typing">
-			入力する
-		</combo_box.item>
-		<combo_box.item name="PeaceRight">
-			ピース・サイン右
-		</combo_box.item>
+		<combo_box.item name="Spread" label="広がる" />
+		<combo_box.item name="Relaxed" label="リラックス" />
+		<combo_box.item name="PointBoth" label="両方を指す" />
+		<combo_box.item name="Fist" label="拳" />
+		<combo_box.item name="RelaxedLeft" label="リラックス左" />
+		<combo_box.item name="PointLeft" label="左を指す" />
+		<combo_box.item name="FistLeft" label="拳左" />
+		<combo_box.item name="RelaxedRight" label="リラックス右" />
+		<combo_box.item name="PointRight" label="右を指す" />
+		<combo_box.item name="FistRight" label="拳右" />
+		<combo_box.item name="SaluteRight" label="敬礼右" />
+		<combo_box.item name="Typing" label="入力する" />
+		<combo_box.item name="PeaceRight" label="ピース・サイン右" />
 	</combo_box>
 	<text name="emote_label">
 		表現
 	</text>
 	<combo_box label="" name="emote_combo"
 	     tool_tip="アニメーションの顔を表情をコントロールします。">
-		<combo_box.item name="[None]">
-			[None]
-		</combo_box.item>
-		<combo_box.item name="Aaaaah">
-			アーーーーー
-		</combo_box.item>
-		<combo_box.item name="Afraid">
-			怖れ
-		</combo_box.item>
-		<combo_box.item name="Angry">
-			怒り
-		</combo_box.item>
-		<combo_box.item name="BigSmile">
-			満面の笑み
-		</combo_box.item>
-		<combo_box.item name="Bored">
-			退屈
-		</combo_box.item>
-		<combo_box.item name="Cry">
-			泣く
-		</combo_box.item>
-		<combo_box.item name="Disdain">
-			侮蔑
-		</combo_box.item>
-		<combo_box.item name="Embarrassed">
-			困惑
-		</combo_box.item>
-		<combo_box.item name="Frown">
-			しかめっ面
-		</combo_box.item>
-		<combo_box.item name="Kiss">
-			キス
-		</combo_box.item>
-		<combo_box.item name="Laugh">
-			笑う
-		</combo_box.item>
-		<combo_box.item name="Plllppt">
-			Plllppt
-		</combo_box.item>
-		<combo_box.item name="Repulsed">
-			嫌悪感
-		</combo_box.item>
-		<combo_box.item name="Sad">
-			悲しい
-		</combo_box.item>
-		<combo_box.item name="Shrug">
-			肩をすくめる
-		</combo_box.item>
-		<combo_box.item name="Smile">
-			笑み
-		</combo_box.item>
-		<combo_box.item name="Surprise">
-			驚き
-		</combo_box.item>
-		<combo_box.item name="Wink">
-			ウィンク
-		</combo_box.item>
-		<combo_box.item name="Worry">
-			心配
-		</combo_box.item>
+		<combo_box.item name="[None]" label="None]" />
+		<combo_box.item name="Aaaaah" label="アーーーーー" />
+		<combo_box.item name="Afraid" label="怖れ" />
+		<combo_box.item name="Angry" label="怒り" />
+		<combo_box.item name="BigSmile" label="満面の笑み" />
+		<combo_box.item name="Bored" label="退屈" />
+		<combo_box.item name="Cry" label="泣く" />
+		<combo_box.item name="Disdain" label="侮蔑" />
+		<combo_box.item name="Embarrassed" label="困惑" />
+		<combo_box.item name="Frown" label="しかめっ面" />
+		<combo_box.item name="Kiss" label="キス" />
+		<combo_box.item name="Laugh" label="笑う" />
+		<combo_box.item name="Plllppt" label="Plllppt" />
+		<combo_box.item name="Repulsed" label="嫌悪感" />
+		<combo_box.item name="Sad" label="悲しい" />
+		<combo_box.item name="Shrug" label="肩をすくめる" />
+		<combo_box.item name="Smile" label="笑み" />
+		<combo_box.item name="Surprise" label="驚き" />
+		<combo_box.item name="Wink" label="ウィンク" />
+		<combo_box.item name="Worry" label="心配" />
 	</combo_box>
 	<spinner label="フェーズイン(秒)" name="ease_in_time"
 	     tool_tip="アニメーションのブレンド・イン時間(秒)" />
diff --git a/indra/newview/skins/default/xui/ja/floater_buy_land.xml b/indra/newview/skins/default/xui/ja/floater_buy_land.xml
index 4c3637d6a1..b046b48caa 100644
--- a/indra/newview/skins/default/xui/ja/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/ja/floater_buy_land.xml
@@ -68,15 +68,9 @@
 		土地を保有できるのはプレミアム・メンバーだけです
 	</text>
 	<combo_box name="account_level">
-		<combo_box.item name="US$9.95/month,billedmonthly">
-			月額9.95米ドル、月払い
-		</combo_box.item>
-		<combo_box.item name="US$7.50/month,billedquarterly">
-			月額7.50米ドル、年4回払い
-		</combo_box.item>
-		<combo_box.item name="US$6.00/month,billedannually">
-			月額6.00米ドル、年払い
-		</combo_box.item>
+		<combo_box.item name="US$9.95/month,billedmonthly" label="月額9.95米ドル、月払い" />
+		<combo_box.item name="US$7.50/month,billedquarterly" label="月額7.50米ドル、年4回払い" />
+		<combo_box.item name="US$6.00/month,billedannually" label="月額6.00米ドル、年払い" />
 	</combo_box>
 	<text name="land_use_action">
 		毎月の土地使用料をUS$40に引き上げます
diff --git a/indra/newview/skins/default/xui/ja/floater_god_tools.xml b/indra/newview/skins/default/xui/ja/floater_god_tools.xml
index 8d77542dc0..d822bd4203 100644
--- a/indra/newview/skins/default/xui/ja/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/ja/floater_god_tools.xml
@@ -122,29 +122,17 @@
 				目的地:
 			</text>
 			<combo_box name="destination">
-				<combo_box.item name="Selection">
-					選択
-				</combo_box.item>
-				<combo_box.item name="AgentRegion">
-					エージェント地域
-				</combo_box.item>
+				<combo_box.item name="Selection" label="選択" />
+				<combo_box.item name="AgentRegion" label="エージェント地域" />
 			</combo_box>
 			<text name="Request:">
 				要求:
 			</text>
 			<combo_box name="request">
-				<combo_box.item name="colliders&lt;steps&gt;">
-					コライダー<ステップ>
-				</combo_box.item>
-				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
-					スクリプト<回数>、<オプション・パターン>
-				</combo_box.item>
-				<combo_box.item name="objects&lt;pattern&gt;">
-					オブジェクト<パターン>
-				</combo_box.item>
-				<combo_box.item name="rez&lt;asset_id&gt;">
-					rez &lt;asset_id&gt;
-				</combo_box.item>
+				<combo_box.item name="colliders&lt;steps&gt;" label="コライダー<ステップ>" />
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;" label="スクリプト<回数>、<オプション・パターン>" />
+				<combo_box.item name="objects&lt;pattern&gt;" label="オブジェクト<パターン>" />
+				<combo_box.item name="rez&lt;asset_id&gt;" label="rez &lt;asset_id&gt;" />
 			</combo_box>
 			<text name="Parameter:">
 				パラメーター:
diff --git a/indra/newview/skins/default/xui/ja/floater_hardware_settings.xml b/indra/newview/skins/default/xui/ja/floater_hardware_settings.xml
index f2ff28d5f1..67d105c2a4 100644
--- a/indra/newview/skins/default/xui/ja/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/ja/floater_hardware_settings.xml
@@ -10,21 +10,11 @@
 		アンチエイリアシング:
 	</text>
 	<combo_box label="アンチエイリアシング" name="fsaa">
-		<combo_box.item name="FSAADisabled">
-			無効
-		</combo_box.item>
-		<combo_box.item name="2x">
-			2x
-		</combo_box.item>
-		<combo_box.item name="4x">
-			4x
-		</combo_box.item>
-		<combo_box.item name="8x">
-			8x
-		</combo_box.item>
-		<combo_box.item name="16x">
-			16x
-		</combo_box.item>
+		<combo_box.item name="FSAADisabled" label="無効" />
+		<combo_box.item name="2x" label="2x" />
+		<combo_box.item name="4x" label="4x" />
+		<combo_box.item name="8x" label="8x" />
+		<combo_box.item name="16x" label="16x" />
 	</combo_box>
 	<spinner label="ガンマ:" name="gamma" />
 	<text name="(brightness, lower is brighter)">
diff --git a/indra/newview/skins/default/xui/ja/floater_image_preview.xml b/indra/newview/skins/default/xui/ja/floater_image_preview.xml
index 3244a2f395..fae9c87da4 100644
--- a/indra/newview/skins/default/xui/ja/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/ja/floater_image_preview.xml
@@ -10,36 +10,16 @@
 		イメージのプレビュー:
 	</text>
 	<combo_box label="服の種類" name="clothing_type_combo">
-		<combo_box.item name="Image">
-			画像
-		</combo_box.item>
-		<combo_box.item name="Hair">
-			髪
-		</combo_box.item>
-		<combo_box.item name="FemaleHead">
-			女性の頭
-		</combo_box.item>
-		<combo_box.item name="FemaleUpperBody">
-			女性の上半身
-		</combo_box.item>
-		<combo_box.item name="FemaleLowerBody">
-			女性の下半身
-		</combo_box.item>
-		<combo_box.item name="MaleHead">
-			男性の頭
-		</combo_box.item>
-		<combo_box.item name="MaleUpperBody">
-			男性の上半身
-		</combo_box.item>
-		<combo_box.item name="MaleLowerBody">
-			男性の下半身
-		</combo_box.item>
-		<combo_box.item name="Skirt">
-			スカート
-		</combo_box.item>
-		<combo_box.item name="SculptedPrim">
-			変形されたプリム
-		</combo_box.item>
+		<combo_box.item name="Image" label="画像" />
+		<combo_box.item name="Hair" label="髪" />
+		<combo_box.item name="FemaleHead" label="女性の頭" />
+		<combo_box.item name="FemaleUpperBody" label="女性の上半身" />
+		<combo_box.item name="FemaleLowerBody" label="女性の下半身" />
+		<combo_box.item name="MaleHead" label="男性の頭" />
+		<combo_box.item name="MaleUpperBody" label="男性の上半身" />
+		<combo_box.item name="MaleLowerBody" label="男性の下半身" />
+		<combo_box.item name="Skirt" label="スカート" />
+		<combo_box.item name="SculptedPrim" label="変形されたプリム" />
 	</combo_box>
 	<text name="bad_image_text">
 		イメージを読み取れません。
diff --git a/indra/newview/skins/default/xui/ja/floater_report_abuse.xml b/indra/newview/skins/default/xui/ja/floater_report_abuse.xml
index f2269e429f..885a841127 100644
--- a/indra/newview/skins/default/xui/ja/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/ja/floater_report_abuse.xml
@@ -37,123 +37,51 @@
 		Hendrerit Vulputate
 	</text>
 	<combo_box name="category_combo" tool_tip="カテゴリー -- この報告に最も適したカテゴリーを選択してください">
-		<combo_item name="Select_category">
-			カテゴリーを選択
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			年齢&gt;年齢偽証
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			年齢&gt;成人の住人がTeen Second Life上にいる
-		</combo_item>
+		<combo_box.item name="Select_category" label="カテゴリーを選択"/>
+		<combo_box.item name="Age__Age_play" label="年齢&gt;年齢偽証"/>
+		<combo_box.item name="Age__Adult_resident_on_Teen_Second_Life" label="年齢&gt;成人の住人がTeen Second Life上にいる"/>
 		
 		
 		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			攻撃&gt;コンバット・サンドボックス/危険なエリア
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			攻撃&gt;安全なエリア
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			攻撃&gt;武器テスト用サンドボックス
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			商取引&gt;製品またはサービスの提供が行われない
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			開示 &gt; リアルワールドの情報
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			開示&gt;離れたところからチャットをモニターしている
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			開示&gt;Second Lifeの情報/チャット/IM
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			平穏を乱す行為&gt;地域リソースの使用が不公平
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			平穏を乱す行為&gt;スクリプト・オブジェクトの乱用
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			平穏を乱す行為&gt;オブジェクトの捨て置き
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			平穏を乱す行為&gt;繰り返しスパム
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			平穏を乱す行為&gt;不要な広告スパム
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			詐欺&gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			詐欺&gt;土地
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			詐欺&gt;マルチ商法またはチェーン・メール
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			詐欺&gt; US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			嫌がらせ&gt;広告委託/視覚的なスパム
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			嫌がらせ&gt;個人またはグループの中傷
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			嫌がらせ&gt;移動の妨害
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			嫌がらせ&gt;性的な嫌がらせ
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			嫌がらせ&gt;利用規約(ToS)に違反する行為を行うよう他者を勧誘/扇動
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			嫌がらせ&gt;暴言
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			わいせつ&gt;著しく不快であると見なされるコンテンツまたは行為
-		</combo_item>
+		<combo_box.item name="Assault__Combat_sandbox___unsafe_area" label="攻撃&gt;コンバット・サンドボックス/危険なエリア"/>
+		<combo_box.item name="Assault__Safe_area" label="攻撃&gt;安全なエリア"/>
+		<combo_box.item name="Assault__Weapons_testing_sandbox" label="攻撃&gt;武器テスト用サンドボックス"/>
+		<combo_box.item name="Commerce__Failure_to_deliver_product_or_service" label="商取引&gt;製品またはサービスの提供が行われない"/>
+		<combo_box.item name="Disclosure__Real_world_information" label="開示 &gt; リアルワールドの情報"/>
+		<combo_box.item name="Disclosure__Remotely_monitoring chat" label="開示&gt;離れたところからチャットをモニターしている"/>
+		<combo_box.item name="Disclosure__Second_Life_information_chat_IMs" label="開示&gt;Second Lifeの情報/チャット/IM"/>
+		<combo_box.item name="Disturbing_the_peace__Unfair_use_of_region_resources" label="平穏を乱す行為&gt;地域リソースの使用が不公平"/>
+		<combo_box.item name="Disturbing_the_peace__Excessive_scripted_objects" label="平穏を乱す行為&gt;スクリプト・オブジェクトの乱用"/>
+		<combo_box.item name="Disturbing_the_peace__Object_littering" label="平穏を乱す行為&gt;オブジェクトの捨て置き"/>
+		<combo_box.item name="Disturbing_the_peace__Repetitive_spam" label="平穏を乱す行為&gt;繰り返しスパム"/>
+		<combo_box.item name="Disturbing_the_peace__Unwanted_advert_spam" label="平穏を乱す行為&gt;不要な広告スパム"/>
+		<combo_box.item name="Fraud__L$" label="詐欺&gt; L$"/>
+		<combo_box.item name="Fraud__Land" label="詐欺&gt;土地"/>
+		<combo_box.item name="Fraud__Pyramid_scheme_or_chain_letter" label="詐欺&gt;マルチ商法またはチェーン・メール"/>
+		<combo_box.item name="Fraud__US$" label="詐欺&gt; US$"/>
+		<combo_box.item name="Harassment__Advert_farms___visual_spam" label="嫌がらせ&gt;広告委託/視覚的なスパム"/>
+		<combo_box.item name="Harassment__Defaming_individuals_or_groups" label="嫌がらせ&gt;個人またはグループの中傷"/>
+		<combo_box.item name="Harassment__Impeding_movement" label="嫌がらせ&gt;移動の妨害"/>
+		<combo_box.item name="Harassment__Sexual_harassment" label="嫌がらせ&gt;性的な嫌がらせ"/>
+		<combo_box.item name="Harassment__Solicting_inciting_others_to_violate_ToS" label="嫌がらせ&gt;利用規約(ToS)に違反する行為を行うよう他者を勧誘/扇動"/>
+		<combo_box.item name="Harassment__Verbal_abuse" label="嫌がらせ&gt;暴言"/>
+		<combo_box.item name="Indecency__Broadly_offensive_content_or_conduct" label="わいせつ&gt;著しく不快であると見なされるコンテンツまたは行為"/>
 		
 		
 		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			わいせつ&gt;不適切なアバター名
-		</combo_item>
+		<combo_box.item name="Indecency__Inappropriate_avatar_name" label="わいせつ&gt;不適切なアバター名"/>
 		
 		
 		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			知的財産の侵害 &gt; コンテンツの撤去
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			知的財産の侵害 &gt; コピーBot及び権限の悪用
-		</combo_item>
-		<combo_item name="Intolerance">
-			不寛容
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			土地&gt;サンドボックス・リソースの乱用
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			土地&gt;不法侵入&gt;オブジェクト/テクスチャー
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			土地&gt;不法侵入&gt;パーティクル
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			土地&gt;不法侵入&gt;樹木/植物
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			賭け/ギャンブル
-		</combo_item>
-		<combo_item name="Other">
-			その他
-		</combo_item>
+		<combo_box.item name="Intellectual_property_infringement_Content_Removal" label="知的財産の侵害 &gt; コンテンツの撤去"/>
+		<combo_box.item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit" label="知的財産の侵害 &gt; コピーBot及び権限の悪用"/>
+		<combo_box.item name="Intolerance" label="不寛容"/>
+		<combo_box.item name="Land__Abuse_of_sandbox_resources" label="土地&gt;サンドボックス・リソースの乱用"/>
+		<combo_box.item name="Land__Encroachment__Objects_textures" label="土地&gt;不法侵入&gt;オブジェクト/テクスチャー"/>
+		<combo_box.item name="Land__Encroachment__Particles" label="土地&gt;不法侵入&gt;パーティクル"/>
+		<combo_box.item name="Land__Encroachment__Trees_plants" label="土地&gt;不法侵入&gt;樹木/植物"/>
+		<combo_box.item name="Wagering_gambling" label="賭け/ギャンブル"/>
+		<combo_box.item name="Other" label="その他"/>
 	</combo_box>
 	<text name="abuser_name_title">
 		迷惑ユーザーの名前:
diff --git a/indra/newview/skins/default/xui/ja/floater_sell_land.xml b/indra/newview/skins/default/xui/ja/floater_sell_land.xml
index 3ca55621ac..47fb2e2f9b 100644
--- a/indra/newview/skins/default/xui/ja/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/ja/floater_sell_land.xml
@@ -34,15 +34,9 @@
 		誰にでも販売するか、特定の人にのみ販売するかを選択してください
 	</text>
 	<combo_box name="sell_to">
-		<combo_box.item name="--selectone--">
-			--1つ選択--
-		</combo_box.item>
-		<combo_box.item name="Anyone">
-			誰でも
-		</combo_box.item>
-		<combo_box.item name="Specificuser:">
-			特定ユーザー:
-		</combo_box.item>
+		<combo_box.item name="--selectone--" label="1つ選択--" />
+		<combo_box.item name="Anyone" label="誰でも" />
+		<combo_box.item name="Specificuser:" label="特定ユーザー:" />
 	</combo_box>
 	<button label="選択..." name="sell_to_select_agent" />
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/ja/floater_settings_debug.xml b/indra/newview/skins/default/xui/ja/floater_settings_debug.xml
index 46d949ad81..133a8ce2cd 100644
--- a/indra/newview/skins/default/xui/ja/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/ja/floater_settings_debug.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater name="settings_debug" title="デバッグ設定">
 	<combo_box name="boolean_combo">
-		<combo_box.item name="TRUE">
-			正
-		</combo_box.item>
-		<combo_box.item name="FALSE">
-			誤
-		</combo_box.item>
+		<combo_box.item name="TRUE" label="正" />
+		<combo_box.item name="FALSE" label="誤" />
 	</combo_box>
 	<color_swatch label="色" name="color_swatch" />
 	<spinner label="x" name="val_spinner_1" />
diff --git a/indra/newview/skins/default/xui/ja/floater_snapshot.xml b/indra/newview/skins/default/xui/ja/floater_snapshot.xml
index 91bc489d3b..e389e7304f 100644
--- a/indra/newview/skins/default/xui/ja/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/ja/floater_snapshot.xml
@@ -38,75 +38,33 @@
 		形式
 	</text>
 	<combo_box label="解像度" name="postcard_size_combo">
-		<combo_box.item name="CurrentWindow">
-			現在のウィンドウ
-		</combo_box.item>
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			カスタム
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="現在のウィンドウ" />
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="1024x768" label="1024x768" />
+		<combo_box.item name="Custom" label="カスタム" />
 	</combo_box>
 	<combo_box label="解像度" name="texture_size_combo">
-		<combo_box.item name="CurrentWindow">
-			現在のウィンドウ
-		</combo_box.item>
-		<combo_box.item name="Small(128x128)">
-			小(128x128)
-		</combo_box.item>
-		<combo_box.item name="Medium(256x256)">
-			中(256x256)
-		</combo_box.item>
-		<combo_box.item name="Large(512x512)">
-			大(512x512)
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			カスタム
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="現在のウィンドウ" />
+		<combo_box.item name="Small(128x128)" label="小(128x128)" />
+		<combo_box.item name="Medium(256x256)" label="中(256x256)" />
+		<combo_box.item name="Large(512x512)" label="大(512x512)" />
+		<combo_box.item name="Custom" label="カスタム" />
 	</combo_box>
 	<combo_box label="解像度" name="local_size_combo">
-		<combo_box.item name="CurrentWindow">
-			現在のウィンドウ
-		</combo_box.item>
-		<combo_box.item name="320x240">
-			320x240
-		</combo_box.item>
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
-		<combo_box.item name="1280x1024">
-			1280x1024
-		</combo_box.item>
-		<combo_box.item name="1600x1200">
-			1600x1200
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			カスタム
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="現在のウィンドウ" />
+		<combo_box.item name="320x240" label="320x240" />
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="1024x768" label="1024x768" />
+		<combo_box.item name="1280x1024" label="1280x1024" />
+		<combo_box.item name="1600x1200" label="1600x1200" />
+		<combo_box.item name="Custom" label="カスタム" />
 	</combo_box>
 	<combo_box label="形式" name="local_format_combo">
-		<combo_box.item name="PNG">
-			PNG
-		</combo_box.item>
-		<combo_box.item name="JPEG">
-			JPEG
-		</combo_box.item>
-		<combo_box.item name="BMP">
-			BMP
-		</combo_box.item>
+		<combo_box.item name="PNG" label="PNG" />
+		<combo_box.item name="JPEG" label="JPEG" />
+		<combo_box.item name="BMP" label="BMP" />
 	</combo_box>
 	<spinner label="幅" name="snapshot_width" label_width="25" width="90"/>
 	<spinner label="高さ" name="snapshot_height" label_width="30" left="115" width="90"/>
@@ -116,15 +74,9 @@
 		キャプチャ:
 	</text>
 	<combo_box label="画像レイヤー" name="layer_types">
-		<combo_box.item name="Colors">
-			色
-		</combo_box.item>
-		<combo_box.item name="Depth">
-			深さ
-		</combo_box.item>
-		<combo_box.item name="ObjectMattes">
-			オグジェクトのつや消し
-		</combo_box.item>
+		<combo_box.item name="Colors" label="色" />
+		<combo_box.item name="Depth" label="深さ" />
+		<combo_box.item name="ObjectMattes" label="オグジェクトのつや消し" />
 	</combo_box>
 	<check_box label="インタフェースを表示" name="ui_check"/>
 	<check_box label="HUD オブジェクトを表示" name="hud_check"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml
index 44e585b7b3..a3d01362a3 100644
--- a/indra/newview/skins/default/xui/ja/floater_tools.xml
+++ b/indra/newview/skins/default/xui/ja/floater_tools.xml
@@ -20,15 +20,9 @@
 		ルーラー:
 	</text>
 	<combo_box left_delta="110" name="combobox grid mode" width="60">
-		<combo_item name="World">
-			世界
-		</combo_item>
-		<combo_item name="Local">
-			ローカル
-		</combo_item>
-		<combo_item name="Reference">
-			リファレンス
-		</combo_item>
+		<combo_box.item name="World" label="世界"/>
+		<combo_box.item name="Local" label="ローカル"/>
+		<combo_box.item name="Reference" label="リファレンス"/>
 	</combo_box>
 	<check_box label="両側を引伸ばす" left="116" name="checkbox uniform"/>
 	<check_box label="テクスチャーを引伸ばす" name="checkbox stretch textures"/>
@@ -150,27 +144,13 @@
 				左クリックすると:
 			</text>
 			<combo_box name="clickaction">
-				<combo_item name="Touch/grab(default)">
-					触る/つかむ (デフォルト)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					オブジェクトに座る
-				</combo_item>
-				<combo_item name="Buyobject">
-					オブジェクトを購入
-				</combo_item>
-				<combo_item name="Payobject">
-					オブジェクトへの支払い
-				</combo_item>
-				<combo_item name="Open">
-					開く
-				</combo_item>
-				<combo_item name="Play">
-					区画メディアを再生
-				</combo_item>
-				<combo_item name="Opemmedia">
-					区画メディアを開く
-				</combo_item>
+				<combo_box.item name="Touch/grab(default)" label="触る/つかむ (デフォルト)"/>
+				<combo_box.item name="Sitonobject" label="オブジェクトに座る"/>
+				<combo_box.item name="Buyobject" label="オブジェクトを購入"/>
+				<combo_box.item name="Payobject" label="オブジェクトへの支払い"/>
+				<combo_box.item name="Open" label="開く"/>
+				<combo_box.item name="Play" label="区画メディアを再生"/>
+				<combo_box.item name="Opemmedia" label="区画メディアを開く"/>
 			</combo_box>
 			<text name="B:">
 				B:
@@ -254,56 +234,26 @@
 				素材
 			</text>
 			<combo_box name="material">
-				<combo_item name="Stone">
-					石材
-				</combo_item>
-				<combo_item name="Metal">
-					金属
-				</combo_item>
-				<combo_item name="Glass">
-					ガラス
-				</combo_item>
-				<combo_item name="Wood">
-					木材
-				</combo_item>
-				<combo_item name="Flesh">
-					肌
-				</combo_item>
-				<combo_item name="Plastic">
-					プラスチック
-				</combo_item>
-				<combo_item name="Rubber">
-					ゴム
-				</combo_item>
+				<combo_box.item name="Stone" label="石材"/>
+				<combo_box.item name="Metal" label="金属"/>
+				<combo_box.item name="Glass" label="ガラス"/>
+				<combo_box.item name="Wood" label="木材"/>
+				<combo_box.item name="Flesh" label="肌"/>
+				<combo_box.item name="Plastic" label="プラスチック"/>
+				<combo_box.item name="Rubber" label="ゴム"/>
 			</combo_box>
 			<text name="label basetype">
 				建造物ブロック・タイプ
 			</text>
 			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					ボックス
-				</combo_item>
-				<combo_item name="Cylinder">
-					シリンダー
-				</combo_item>
-				<combo_item name="Prism">
-					プリズム
-				</combo_item>
-				<combo_item name="Sphere">
-					球形
-				</combo_item>
-				<combo_item name="Torus">
-					トーラス
-				</combo_item>
-				<combo_item name="Tube">
-					チューブ
-				</combo_item>
-				<combo_item name="Ring">
-					リング
-				</combo_item>
-				<combo_item name="Sculpted">
-					スカルプト
-				</combo_item>
+				<combo_box.item name="Box" label="ボックス"/>
+				<combo_box.item name="Cylinder" label="シリンダー"/>
+				<combo_box.item name="Prism" label="プリズム"/>
+				<combo_box.item name="Sphere" label="球形"/>
+				<combo_box.item name="Torus" label="トーラス"/>
+				<combo_box.item name="Tube" label="チューブ"/>
+				<combo_box.item name="Ring" label="リング"/>
+				<combo_box.item name="Sculpted" label="スカルプト"/>
 			</combo_box>
 			<text name="text cut">
 				パス・カットの始点と終点
@@ -320,18 +270,10 @@
 				中空(空洞)の形
 			</text>
 			<combo_box name="hole">
-				<combo_item name="Default">
-					デフォルト
-				</combo_item>
-				<combo_item name="Circle">
-					サークル
-				</combo_item>
-				<combo_item name="Square">
-					正方形
-				</combo_item>
-				<combo_item name="Triangle">
-					三角形
-				</combo_item>
+				<combo_box.item name="Default" label="デフォルト"/>
+				<combo_box.item name="Circle" label="サークル"/>
+				<combo_box.item name="Square" label="正方形"/>
+				<combo_box.item name="Triangle" label="三角形"/>
 			</combo_box>
 			<text name="text twist">
 				ひねりの始まりと終わり
@@ -380,21 +322,11 @@
 				縫い目のタイプ
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(なし)
-				</combo_item>
-				<combo_item name="Sphere">
-					球形
-				</combo_item>
-				<combo_item name="Torus">
-					トーラス
-				</combo_item>
-				<combo_item name="Plane">
-					平面
-				</combo_item>
-				<combo_item name="Cylinder">
-					シリンダー
-				</combo_item>
+				<combo_box.item name="None" label="なし)"/>
+				<combo_box.item name="Sphere" label="球形"/>
+				<combo_box.item name="Torus" label="トーラス"/>
+				<combo_box.item name="Plane" label="平面"/>
+				<combo_box.item name="Cylinder" label="シリンダー"/>
 			</combo_box>
 		</panel>
 		<panel label="特徴" name="Features">
@@ -436,88 +368,40 @@
 				マッピング
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					デフォルト
-				</combo_item>
-				<combo_item name="Planar">
-					平面
-				</combo_item>
+				<combo_box.item name="Default" label="デフォルト"/>
+				<combo_box.item name="Planar" label="平面"/>
 			</combo_box>
 			<text name="label shininess">
 				輝き
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					なし
-				</combo_item>
-				<combo_item name="Low">
-					低
-				</combo_item>
-				<combo_item name="Medium">
-					中
-				</combo_item>
-				<combo_item name="High">
-					高
-				</combo_item>
+				<combo_box.item name="None" label="なし"/>
+				<combo_box.item name="Low" label="低"/>
+				<combo_box.item name="Medium" label="中"/>
+				<combo_box.item name="High" label="高"/>
 			</combo_box>
 			<text name="label bumpiness">
 				凹凸
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					なし
-				</combo_item>
-				<combo_item name="Brightness">
-					明るさ
-				</combo_item>
-				<combo_item name="Darkness">
-					暗さ
-				</combo_item>
-				<combo_item name="woodgrain">
-					木目調
-				</combo_item>
-				<combo_item name="bark">
-					木の皮
-				</combo_item>
-				<combo_item name="bricks">
-					レンガ
-				</combo_item>
-				<combo_item name="checker">
-					チェッカー
-				</combo_item>
-				<combo_item name="concrete">
-					コンクリート
-				</combo_item>
-				<combo_item name="crustytile">
-					クラスティ・タイル
-				</combo_item>
-				<combo_item name="cutstone">
-					カットストーン
-				</combo_item>
-				<combo_item name="discs">
-					ディスク
-				</combo_item>
-				<combo_item name="gravel">
-					砂利
-				</combo_item>
-				<combo_item name="petridish">
-					ペトリ
-				</combo_item>
-				<combo_item name="siding">
-					羽目板
-				</combo_item>
-				<combo_item name="stonetile">
-					ストーン・タイル
-				</combo_item>
-				<combo_item name="stucco">
-					しっくい
-				</combo_item>
-				<combo_item name="suction">
-					吸い込み
-				</combo_item>
-				<combo_item name="weave">
-					織目
-				</combo_item>
+				<combo_box.item name="None" label="なし"/>
+				<combo_box.item name="Brightness" label="明るさ"/>
+				<combo_box.item name="Darkness" label="暗さ"/>
+				<combo_box.item name="woodgrain" label="木目調"/>
+				<combo_box.item name="bark" label="木の皮"/>
+				<combo_box.item name="bricks" label="レンガ"/>
+				<combo_box.item name="checker" label="チェッカー"/>
+				<combo_box.item name="concrete" label="コンクリート"/>
+				<combo_box.item name="crustytile" label="クラスティ・タイル"/>
+				<combo_box.item name="cutstone" label="カットストーン"/>
+				<combo_box.item name="discs" label="ディスク"/>
+				<combo_box.item name="gravel" label="砂利"/>
+				<combo_box.item name="petridish" label="ペトリ"/>
+				<combo_box.item name="siding" label="羽目板"/>
+				<combo_box.item name="stonetile" label="ストーン・タイル"/>
+				<combo_box.item name="stucco" label="しっくい"/>
+				<combo_box.item name="suction" label="吸い込み"/>
+				<combo_box.item name="weave" label="織目"/>
 			</combo_box>
 			<text name="tex scale">
 				面ごとに繰り返す
diff --git a/indra/newview/skins/default/xui/ja/floater_world_map.xml b/indra/newview/skins/default/xui/ja/floater_world_map.xml
index 0038f995b4..bc60bda694 100644
--- a/indra/newview/skins/default/xui/ja/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/ja/floater_world_map.xml
@@ -50,15 +50,11 @@
 	<check_box label="" name="event_mature_chk" />
 	<combo_box label="オンラインのフレンド" name="friend combo"
 	     tool_tip="Friend to Show on Map">
-		<combo_box.item name="none_selected">
-			オンラインのフレンド
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="オンラインのフレンド" />
 	</combo_box>
 	<combo_box label="ランドマーク" name="landmark combo"
 	     tool_tip="Landmark to Show on Map">
-		<combo_box.item name="none_selected">
-			ランドマーク
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="ランドマーク" />
 	</combo_box>
 	<line_editor label="地域名で検索" name="location"
 	     tool_tip="地域名を入力してください。" />
diff --git a/indra/newview/skins/default/xui/ja/panel_login.xml b/indra/newview/skins/default/xui/ja/panel_login.xml
index d42d0ddbdf..4f2762de31 100644
--- a/indra/newview/skins/default/xui/ja/panel_login.xml
+++ b/indra/newview/skins/default/xui/ja/panel_login.xml
@@ -15,15 +15,9 @@
 		ログイン位置:
 	</text>
 	<combo_box name="start_location_combo" left_delta="92" width="172">
-		<combo_box.item name="MyHome">
-			自宅(ホーム)
-		</combo_box.item>
-		<combo_box.item name="MyLastLocation">
-			最後にログアウトした場所
-		</combo_box.item>
-		<combo_box.item name="Typeregionname">
-			&lt; 地域の名前入力 &gt;
-		</combo_box.item>
+		<combo_box.item name="MyHome" label="自宅(ホーム)" />
+		<combo_box.item name="MyLastLocation" label="最後にログアウトした場所" />
+		<combo_box.item name="Typeregionname" label="lt; 地域の名前入力 &gt;" />
 	</combo_box>
 	<check_box label="パスワードを記憶" name="remember_check" left_delta="180"/>
 	<text name="full_screen_text">
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_general.xml b/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
index 923e998e55..d7b14608cd 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
@@ -10,15 +10,9 @@
 	</radio_group>
 	<check_box label="ログイン画面にログイン位置を表示" name="show_location_checkbox"/>
 	<combo_box name="fade_out_combobox">
-		<combo_item name="Never">
-			なし
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			一時的に表示
-		</combo_item>
-		<combo_item name="Always">
-			いつも
-		</combo_item>
+		<combo_box.item name="Never" label="なし"/>
+		<combo_box.item name="Show Temporarily" label="一時的に表示"/>
+		<combo_box.item name="Always" label="いつも"/>
 	</combo_box>
 	<check_box label="小さなアバター名" name="small_avatar_names_checkbox"/>
 	<check_box label="画面上で自分の名前を隠す" name="show_my_name_checkbox"/>
@@ -59,59 +53,25 @@
 		&lt;地域の名前入力&gt;
 	</string>
 	<combo_box name="crash_behavior_combobox">
-		<combo_item length="1" name="Askbeforesending" type="string">
-			送る前に確認する
-		</combo_item>
-		<combo_item length="1" name="Alwayssend" type="string">
-			常に送信
-		</combo_item>
-		<combo_item length="1" name="Neversend" type="string">
-			送信しない
-		</combo_item>
+		<combo_box.item length="1" name="Askbeforesending" type="string" label="送る前に確認する"/>
+		<combo_box.item length="1" name="Alwayssend" type="string" label="常に送信"/>
+		<combo_box.item length="1" name="Neversend" type="string" label="送信しない"/>
 	</combo_box>
 	<combo_box name="language_combobox">
-		<combo_item length="1" name="System Default Language" type="string">
-			システム・デフォルト
-		</combo_item>
-		<combo_item length="1" name="English" type="string">
-			English (英語)
-		</combo_item>
-		<combo_item length="1" name="Danish" type="string">
-			Dansk (デンマーク語) – ベータ
-		</combo_item>
-		<combo_item length="1" name="Deutsch(German)" type="string">
-			Deutsch (ドイツ語) – ベータ
-		</combo_item>
-		<combo_item length="1" name="Spanish" type="string">
-			Español (スペイン語) – ベータ
-		</combo_item>
-		<combo_item length="1" name="French" type="string">
-			Français (フランス語) – ベータ
-		</combo_item>
-		<combo_item name="Hungarian">
-			Magyar (ハンガリー語) - ベータ
-		</combo_item>
-		<combo_item name="Polish">
-			Polski (ポーランド語) - ベータ
-		</combo_item>
-		<combo_item length="1" name="Portugese" type="string">
-			Português (ポルトガル語) – ベータ
-		</combo_item>
-		<combo_item name="Russian">
-			Русский (ロシア語) - ベータ
-		</combo_item>
-		<combo_item name="Ukrainian">
-			Українська (ウクライナ語) - ベータ
-		</combo_item>
-		<combo_item length="1" name="Chinese" type="string">
-			中文 (简体) (中国語) - ベータ
-		</combo_item>
-		<combo_item length="1" name="(Japanese)" type="string">
-			日本語 – ベータ
-		</combo_item>
-		<combo_item length="1" name="(Korean)" type="string">
-			한국어 (韓国語) – ベータ
-		</combo_item>
+		<combo_box.item length="1" name="System Default Language" type="string" label="システム・デフォルト"/>
+		<combo_box.item length="1" name="English" type="string" label="English (英語)"/>
+		<combo_box.item length="1" name="Danish" type="string" label="Dansk (デンマーク語) – ベータ"/>
+		<combo_box.item length="1" name="Deutsch(German)" type="string" label="Deutsch (ドイツ語) – ベータ"/>
+		<combo_box.item length="1" name="Spanish" type="string" label="Español (スペイン語) – ベータ"/>
+		<combo_box.item length="1" name="French" type="string" label="Français (フランス語) – ベータ"/>
+		<combo_box.item name="Hungarian" label="Magyar (ハンガリー語) - ベータ"/>
+		<combo_box.item name="Polish" label="Polski (ポーランド語) - ベータ"/>
+		<combo_box.item length="1" name="Portugese" type="string" label="Português (ポルトガル語) – ベータ"/>
+		<combo_box.item name="Russian" label="Русский (ロシア語) - ベータ"/>
+		<combo_box.item name="Ukrainian" label="Українська (ウクライナ語) - ベータ"/>
+		<combo_box.item length="1" name="Chinese" type="string" label="中文 (简体) (中国語) - ベータ"/>
+		<combo_box.item length="1" name="(Japanese)" type="string" label="日本語 – ベータ"/>
+		<combo_box.item length="1" name="(Korean)" type="string" label="한국어 (韓国語) – ベータ"/>
 	</combo_box>
 	<check_box label="言語をオブジェクトと共有" name="language_is_public" tool_tip="優先言語をインワールドのオブジェクトが認識する"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml
index 7a7cf8cb3a..60be45a064 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml
@@ -21,21 +21,11 @@
 		ウィンドウ・サイズ:
 	</text>
 	<combo_box name="windowsize combo">
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="720x480">
-			720x480 (NTSC)
-		</combo_box.item>
-		<combo_box.item name="768x576">
-			768x576 (PAL)
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="720x480" label="720x480 (NTSC)" />
+		<combo_box.item name="768x576" label="768x576 (PAL)" />
+		<combo_box.item name="1024x768" label="1024x768" />
 	</combo_box>
 	<text name="DisplayResLabel">
 		表示解像度:
@@ -44,18 +34,10 @@
 		縦横比:
 	</text>
 	<combo_box name="aspect_ratio" tool_tip="(幅/高さ)">
-		<combo_box.item type="string" length="1" name="4:3(StandardCRT)">
-			4:3(標準CRT)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)">
-			5:4(1280x1024 LCD)
-		</combo_box.item>
-		<combo_box.item name="8:5(Widescreen)">
-			8:5(ワイドスクリ-ン)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="16:9(Widescreen)">
-			16:9(ワイドスクリ-ン)
-		</combo_box.item>
+		<combo_box.item type="string" length="1" name="4:3(StandardCRT)" label="4:3(標準CRT)" />
+		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)" label="5:4(1280x1024 LCD)" />
+		<combo_box.item name="8:5(Widescreen)" label="8:5(ワイドスクリ-ン)" />
+		<combo_box.item type="string" length="1" name="16:9(Widescreen)" label="16:9(ワイドスクリ-ン)" />
 	</combo_box>
 	<check_box label="自動検出率" name="aspect_auto_detect" />
 	<text type="string" length="1" name="UI Size:">
diff --git a/indra/newview/skins/default/xui/nl/floater_about_land.xml b/indra/newview/skins/default/xui/nl/floater_about_land.xml
index 796418da4b..6a11d4e853 100644
--- a/indra/newview/skins/default/xui/nl/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/nl/floater_about_land.xml
@@ -252,43 +252,19 @@
 			<check_box label="Niet duwen" name="PushRestrictCheck" tool_tip="Weerhoudt scripts van duwen. Het aanvinken van deze optie kan handig zijn om storend gedrag op uw land te voorkomen."/>
 			<check_box label="Toon plaats in Zoeken (L$30/week) onder" name="ShowDirectoryCheck" tool_tip="Laat mensen dit perceel zien in zoekresultaten."/>
 			<combo_box name="land category">
-				<combo_item name="AnyCategory">
-					Alle categorieën
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Linden Locatie
-				</combo_item>
+				<combo_box.item name="AnyCategory" label="Alle categorieën"/>
+				<combo_box.item name="LindenLocation" label="Linden Locatie"/>
 
-				<combo_item name="Arts&amp;Culture">
-					Kunst &amp; Cultuur
-				</combo_item>
-				<combo_item name="Business">
-					Zakelijk
-				</combo_item>
-				<combo_item name="Educational">
-					Educatief
-				</combo_item>
-				<combo_item name="Gaming">
-					Spelen
-				</combo_item>
-				<combo_item name="Hangout">
-					Ontmoetingsplaats
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Nieuwkomervriendelijk
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parken &amp; Natuur
-				</combo_item>
-				<combo_item name="Residential">
-					Woongebied
-				</combo_item>
-				<combo_item name="Shopping">
-					Winkelen
-				</combo_item>
-				<combo_item name="Other">
-					Anders
-				</combo_item>
+				<combo_box.item name="Arts&amp;Culture" label="Kunst &amp; Cultuur"/>
+				<combo_box.item name="Business" label="Zakelijk"/>
+				<combo_box.item name="Educational" label="Educatief"/>
+				<combo_box.item name="Gaming" label="Spelen"/>
+				<combo_box.item name="Hangout" label="Ontmoetingsplaats"/>
+				<combo_box.item name="NewcomerFriendly" label="Nieuwkomervriendelijk"/>
+				<combo_box.item name="Parks&amp;Nature" label="Parken &amp; Natuur"/>
+				<combo_box.item name="Residential" label="Woongebied"/>
+				<combo_box.item name="Shopping" label="Winkelen"/>
+				<combo_box.item name="Other" label="Anders"/>
 			</combo_box>
 			<button label="?" label_selected="?" name="?"/>
 			<check_box name="MatureCheck" />
@@ -308,15 +284,9 @@
 				Teleport routering:
 			</text>
 			<combo_box name="landing type" tool_tip="Teleport routering -- selecteer hoe teleports naar uw land moeten worden afgehandeld.">
-				<combo_item name="Blocked">
-					Geblokkeerd
-				</combo_item>
-				<combo_item name="LandingPoint">
-					Landingsplaats
-				</combo_item>
-				<combo_item name="Anywhere">
-					Overal
-				</combo_item>
+				<combo_box.item name="Blocked" label="Geblokkeerd"/>
+				<combo_box.item name="LandingPoint" label="Landingsplaats"/>
+				<combo_box.item name="Anywhere" label="Overal"/>
 			</combo_box>
 			<string name="push_restrict_text">
 				Niet duwen
@@ -398,12 +368,8 @@
 			<check_box label="Groepstoegang toestaan: [GROUP]" name="GroupCheck" tool_tip="Stel de groep in op het tabblad Algemeen"/>
 			<check_box label="Verkoop toegangspassen aan:" name="PassCheck" tool_tip="Tijdelijke toegang tot dit perceel toestaan"/>
 			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Iedereen
-				</combo_item>
-				<combo_item name="Group">
-					Groep
-				</combo_item>
+				<combo_box.item name="Anyone" label="Iedereen"/>
+				<combo_box.item name="Group" label="Groep"/>
 			</combo_box>
 			<spinner label="Prijs in L$:" name="PriceSpin"/>
 			<spinner label="Toegangsuren" name="HoursSpin"/>
diff --git a/indra/newview/skins/default/xui/nl/floater_buy_land.xml b/indra/newview/skins/default/xui/nl/floater_buy_land.xml
index b3bf48c4f4..228d05d6e9 100644
--- a/indra/newview/skins/default/xui/nl/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/nl/floater_buy_land.xml
@@ -66,15 +66,9 @@
 		Alleen premiumleden kunnen land bezitten.
 	</text>
 	<combo_box name="account_level">
-		<combo_item name="US$9.95/month,billedmonthly">
-			US$9.95/maand, gefactureerd per maand
-		</combo_item>
-		<combo_item name="US$7.50/month,billedquarterly">
-			US$7.50/maand, gefactureerd per kwartaal
-		</combo_item>
-		<combo_item name="US$6.00/month,billedannually">
-			US$6.00/maand, gefactureerd per jaar
-		</combo_item>
+		<combo_box.item name="US$9.95/month,billedmonthly" label="US$9.95/maand, gefactureerd per maand"/>
+		<combo_box.item name="US$7.50/month,billedquarterly" label="US$7.50/maand, gefactureerd per kwartaal"/>
+		<combo_box.item name="US$6.00/month,billedannually" label="US$6.00/maand, gefactureerd per jaar"/>
 	</combo_box>
 	<text name="land_use_action">
 		Verhoog uw maandelijkse landgebruikskosten tot US$ 40/maand
diff --git a/indra/newview/skins/default/xui/nl/floater_report_abuse.xml b/indra/newview/skins/default/xui/nl/floater_report_abuse.xml
index 5985bf830b..eefbc6797b 100644
--- a/indra/newview/skins/default/xui/nl/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/nl/floater_report_abuse.xml
@@ -36,123 +36,51 @@
 		Hendrerit Vulputate
 	</text>
 	<combo_box name="category_combo" tool_tip="Categorie -- selecteer de categorie die dit rapport het best beschrijft">
-		<combo_item name="Select_category">
-			Selecteer categorie
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Leeftijd &gt; Leeftijd spelen
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Leeftijd &gt; Volwassen inwoner in Teen Second Life
-		</combo_item>
+		<combo_box.item name="Select_category" label="Selecteer categorie"/>
+		<combo_box.item name="Age__Age_play" label="Leeftijd &gt; Leeftijd spelen"/>
+		<combo_box.item name="Age__Adult_resident_on_Teen_Second_Life" label="Leeftijd &gt; Volwassen inwoner in Teen Second Life"/>
 		
 		
 		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Aanval &gt; Gevechtszandbak / onveilig gebied
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Aanval &gt; Veilig gebied
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Aanval &gt; Zandbak voor het testen van wapens
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Handel &gt; Product of dienst is niet geleverd
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Openbaring &gt; Echte wereld informatie
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Openbaring &gt; Op afstand chat afluisteren
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Openbaring &gt; Second Life informatie/chat/IMs
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Vredebreuk &gt; Oneerlijk gebruik van regiomiddelen
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Vredebreuk &gt; Excessieve gescripte objecten
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Vredebreuk &gt; Objecten laten rondslingeren
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Vredebreuk &gt; Herhaalde spam
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Vredebreuk &gt; Ongewenste reclame-spam
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Fraude &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Fraude &gt; Land
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Fraude &gt; Piramideschema of kettingbrief
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Fraude &gt; US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Intimidatie &gt; Reclameverzamelingen / visuele spam
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Intimidatie &gt; Individuen of groepen in diskrediet brengen
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Intimidatie &gt; Beweging verhinderen
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Intimidatie &gt; Seksuele intimidatie
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Intimidatie &gt; Anderen uitnodigen/aanzetten tot het schenden van de ToS
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Intimidatie &gt; Verbaal misbruik
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Onfatsoenlijkheid &gt; Globaal beledigende inhoud of gedrag
-		</combo_item>
+		<combo_box.item name="Assault__Combat_sandbox___unsafe_area" label="Aanval &gt; Gevechtszandbak / onveilig gebied"/>
+		<combo_box.item name="Assault__Safe_area" label="Aanval &gt; Veilig gebied"/>
+		<combo_box.item name="Assault__Weapons_testing_sandbox" label="Aanval &gt; Zandbak voor het testen van wapens"/>
+		<combo_box.item name="Commerce__Failure_to_deliver_product_or_service" label="Handel &gt; Product of dienst is niet geleverd"/>
+		<combo_box.item name="Disclosure__Real_world_information" label="Openbaring &gt; Echte wereld informatie"/>
+		<combo_box.item name="Disclosure__Remotely_monitoring chat" label="Openbaring &gt; Op afstand chat afluisteren"/>
+		<combo_box.item name="Disclosure__Second_Life_information_chat_IMs" label="Openbaring &gt; Second Life informatie/chat/IMs"/>
+		<combo_box.item name="Disturbing_the_peace__Unfair_use_of_region_resources" label="Vredebreuk &gt; Oneerlijk gebruik van regiomiddelen"/>
+		<combo_box.item name="Disturbing_the_peace__Excessive_scripted_objects" label="Vredebreuk &gt; Excessieve gescripte objecten"/>
+		<combo_box.item name="Disturbing_the_peace__Object_littering" label="Vredebreuk &gt; Objecten laten rondslingeren"/>
+		<combo_box.item name="Disturbing_the_peace__Repetitive_spam" label="Vredebreuk &gt; Herhaalde spam"/>
+		<combo_box.item name="Disturbing_the_peace__Unwanted_advert_spam" label="Vredebreuk &gt; Ongewenste reclame-spam"/>
+		<combo_box.item name="Fraud__L$" label="Fraude &gt; L$"/>
+		<combo_box.item name="Fraud__Land" label="Fraude &gt; Land"/>
+		<combo_box.item name="Fraud__Pyramid_scheme_or_chain_letter" label="Fraude &gt; Piramideschema of kettingbrief"/>
+		<combo_box.item name="Fraud__US$" label="Fraude &gt; US$"/>
+		<combo_box.item name="Harassment__Advert_farms___visual_spam" label="Intimidatie &gt; Reclameverzamelingen / visuele spam"/>
+		<combo_box.item name="Harassment__Defaming_individuals_or_groups" label="Intimidatie &gt; Individuen of groepen in diskrediet brengen"/>
+		<combo_box.item name="Harassment__Impeding_movement" label="Intimidatie &gt; Beweging verhinderen"/>
+		<combo_box.item name="Harassment__Sexual_harassment" label="Intimidatie &gt; Seksuele intimidatie"/>
+		<combo_box.item name="Harassment__Solicting_inciting_others_to_violate_ToS" label="Intimidatie &gt; Anderen uitnodigen/aanzetten tot het schenden van de ToS"/>
+		<combo_box.item name="Harassment__Verbal_abuse" label="Intimidatie &gt; Verbaal misbruik"/>
+		<combo_box.item name="Indecency__Broadly_offensive_content_or_conduct" label="Onfatsoenlijkheid &gt; Globaal beledigende inhoud of gedrag"/>
 		
 		
 		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Onfatsoenlijkheid &gt; Ongepaste avatar naam
-		</combo_item>
+		<combo_box.item name="Indecency__Inappropriate_avatar_name" label="Onfatsoenlijkheid &gt; Ongepaste avatar naam"/>
 		
 		
 		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Inbreuk op intellectueel eigendom &gt; Verwijderen van inhoud
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Inbreuk op intellectueel eigendom &gt; CopyBot of misbruik van permissies
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intolerantie
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Land &gt; Misbruik van zandbakmiddelen
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Land &gt; Indringing &gt; Objecten/texturen
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Land &gt; Indringing &gt; Particles
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Land &gt; Indringing &gt; Bomen/planten
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Weddenschappen/gokken
-		</combo_item>
-		<combo_item name="Other">
-			Anders
-		</combo_item>
+		<combo_box.item name="Intellectual_property_infringement_Content_Removal" label="Inbreuk op intellectueel eigendom &gt; Verwijderen van inhoud"/>
+		<combo_box.item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit" label="Inbreuk op intellectueel eigendom &gt; CopyBot of misbruik van permissies"/>
+		<combo_box.item name="Intolerance" label="Intolerantie"/>
+		<combo_box.item name="Land__Abuse_of_sandbox_resources" label="Land &gt; Misbruik van zandbakmiddelen"/>
+		<combo_box.item name="Land__Encroachment__Objects_textures" label="Land &gt; Indringing &gt; Objecten/texturen"/>
+		<combo_box.item name="Land__Encroachment__Particles" label="Land &gt; Indringing &gt; Particles"/>
+		<combo_box.item name="Land__Encroachment__Trees_plants" label="Land &gt; Indringing &gt; Bomen/planten"/>
+		<combo_box.item name="Wagering_gambling" label="Weddenschappen/gokken"/>
+		<combo_box.item name="Other" label="Anders"/>
 	</combo_box>
 	<text name="abuser_name_title">
 		Misbruikernaam:
diff --git a/indra/newview/skins/default/xui/nl/floater_sell_land.xml b/indra/newview/skins/default/xui/nl/floater_sell_land.xml
index b90869d7e0..e8a65d0845 100644
--- a/indra/newview/skins/default/xui/nl/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/nl/floater_sell_land.xml
@@ -34,15 +34,9 @@
 		Kies of u aan iedereen wil verkopen of een specifieke koper.
 	</text>
 	<combo_box name="sell_to">
-		<combo_item name="--selectone--">
-			-- selecteer een --
-		</combo_item>
-		<combo_item name="Anyone">
-			Iedereen
-		</combo_item>
-		<combo_item name="Specificuser:">
-			Specifieke gebruiker:
-		</combo_item>
+		<combo_box.item name="--selectone--" label="selecteer een --"/>
+		<combo_box.item name="Anyone" label="Iedereen"/>
+		<combo_box.item name="Specificuser:" label="Specifieke gebruiker:"/>
 	</combo_box>
 	<button label="Selecteren..." name="sell_to_select_agent"/>
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/nl/floater_snapshot.xml b/indra/newview/skins/default/xui/nl/floater_snapshot.xml
index e4279bffc4..6e3c71509e 100644
--- a/indra/newview/skins/default/xui/nl/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/nl/floater_snapshot.xml
@@ -34,75 +34,33 @@
 		Formaat
 	</text>
 	<combo_box label="Resolutie" name="postcard_size_combo">
-		<combo_item name="CurrentWindow">
-			Huidig venster
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="Custom">
-			Aangepast
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Huidig venster"/>
+		<combo_box.item name="640x480" label="640x480"/>
+		<combo_box.item name="800x600" label="800x600"/>
+		<combo_box.item name="1024x768" label="1024x768"/>
+		<combo_box.item name="Custom" label="Aangepast"/>
 	</combo_box>
 	<combo_box label="Resolutie" name="texture_size_combo">
-		<combo_item name="CurrentWindow">
-			Huidig venster
-		</combo_item>
-		<combo_item name="Small(128x128)">
-			Klein (128x128)
-		</combo_item>
-		<combo_item name="Medium(256x256)">
-			Middel (256x256)
-		</combo_item>
-		<combo_item name="Large(512x512)">
-			Groot (512x512)
-		</combo_item>
-		<combo_item name="Custom">
-			Aangepast
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Huidig venster"/>
+		<combo_box.item name="Small(128x128)" label="Klein (128x128)"/>
+		<combo_box.item name="Medium(256x256)" label="Middel (256x256)"/>
+		<combo_box.item name="Large(512x512)" label="Groot (512x512)"/>
+		<combo_box.item name="Custom" label="Aangepast"/>
 	</combo_box>
 	<combo_box label="Resolutie" name="local_size_combo">
-		<combo_item name="CurrentWindow">
-			Huidig venster
-		</combo_item>
-		<combo_item name="320x240">
-			320x240
-		</combo_item>
-		<combo_item name="640x480">
-			640x480
-		</combo_item>
-		<combo_item name="800x600">
-			800x600
-		</combo_item>
-		<combo_item name="1024x768">
-			1024x768
-		</combo_item>
-		<combo_item name="1280x1024">
-			1280x1024
-		</combo_item>
-		<combo_item name="1600x1200">
-			1600x1200
-		</combo_item>
-		<combo_item name="Custom">
-			Aangepast
-		</combo_item>
+		<combo_box.item name="CurrentWindow" label="Huidig venster"/>
+		<combo_box.item name="320x240" label="320x240"/>
+		<combo_box.item name="640x480" label="640x480"/>
+		<combo_box.item name="800x600" label="800x600"/>
+		<combo_box.item name="1024x768" label="1024x768"/>
+		<combo_box.item name="1280x1024" label="1280x1024"/>
+		<combo_box.item name="1600x1200" label="1600x1200"/>
+		<combo_box.item name="Custom" label="Aangepast"/>
 	</combo_box>
 	<combo_box label="Formaat" name="local_format_combo">
-		<combo_item name="PNG">
-			PNG
-		</combo_item>
-		<combo_item name="JPEG">
-			JPEG
-		</combo_item>
-		<combo_item name="BMP">
-			BMP
-		</combo_item>
+		<combo_box.item name="PNG" label="PNG"/>
+		<combo_box.item name="JPEG" label="JPEG"/>
+		<combo_box.item name="BMP" label="BMP"/>
 	</combo_box>
 	<spinner label="Breedte" name="snapshot_width"/>
 	<spinner label="Hoogte" name="snapshot_height"/>
@@ -112,15 +70,9 @@
 		Vastleggen:
 	</text>
 	<combo_box label="Afbeeldingslagen" name="layer_types">
-		<combo_item name="Colors">
-			Kleuren
-		</combo_item>
-		<combo_item name="Depth">
-			Diepte
-		</combo_item>
-		<combo_item name="ObjectMattes">
-			Object matheid
-		</combo_item>
+		<combo_box.item name="Colors" label="Kleuren"/>
+		<combo_box.item name="Depth" label="Diepte"/>
+		<combo_box.item name="ObjectMattes" label="Object matheid"/>
 	</combo_box>
 	<check_box label="Toon interface in foto" name="ui_check"/>
 	<check_box label="Toon HUD objecten in foto" name="hud_check"/>
diff --git a/indra/newview/skins/default/xui/nl/floater_tools.xml b/indra/newview/skins/default/xui/nl/floater_tools.xml
index e9acab9dd0..9e542799f0 100644
--- a/indra/newview/skins/default/xui/nl/floater_tools.xml
+++ b/indra/newview/skins/default/xui/nl/floater_tools.xml
@@ -20,15 +20,9 @@
 		Liniaal modus
 	</text>
 	<combo_box name="combobox grid mode">
-		<combo_item name="World">
-			Wereld
-		</combo_item>
-		<combo_item name="Local">
-			Lokaal
-		</combo_item>
-		<combo_item name="Reference">
-			Referentie
-		</combo_item>
+		<combo_box.item name="World" label="Wereld"/>
+		<combo_box.item name="Local" label="Lokaal"/>
+		<combo_box.item name="Reference" label="Referentie"/>
 	</combo_box>
 	<check_box label="Beide zijden uitrekken" name="checkbox uniform"/>
 	<check_box label="Texturen uitrekken" name="checkbox stretch textures"/>
@@ -64,15 +58,9 @@
 	<check_box label="Land opruwen" name="radio noise"/>
 	<check_box label="Herstel land" name="radio revert"/>
 	<combo_box name="combobox brush size">
-		<combo_item name="Small">
-			Klein
-		</combo_item>
-		<combo_item name="Medium">
-			Medium
-		</combo_item>
-		<combo_item name="Large">
-			Groot
-		</combo_item>
+		<combo_box.item name="Small" label="Klein"/>
+		<combo_box.item name="Medium" label="Medium"/>
+		<combo_box.item name="Large" label="Groot"/>
 	</combo_box>
 	<text name="Strength:">
 		Sterkte:
@@ -155,27 +143,13 @@
 				Wanneer links-geklikt:
 			</text>
 			<combo_box name="clickaction">
-				<combo_item name="Touch/grab(default)">
-					Aanraken/pakken (standaard)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					Zit op object
-				</combo_item>
-				<combo_item name="Buyobject">
-					Koop object
-				</combo_item>
-				<combo_item name="Payobject">
-					Betaal object
-				</combo_item>
-				<combo_item name="Open">
-					Open
-				</combo_item>
-				<combo_item name="Play">
-					Perceelmedia afspelen
-				</combo_item>
-				<combo_item name="Opemmedia">
-					Perceelmedia openen
-				</combo_item>
+				<combo_box.item name="Touch/grab(default)" label="Aanraken/pakken (standaard)"/>
+				<combo_box.item name="Sitonobject" label="Zit op object"/>
+				<combo_box.item name="Buyobject" label="Koop object"/>
+				<combo_box.item name="Payobject" label="Betaal object"/>
+				<combo_box.item name="Open" label="Open"/>
+				<combo_box.item name="Play" label="Perceelmedia afspelen"/>
+				<combo_box.item name="Opemmedia" label="Perceelmedia openen"/>
 			</combo_box>
 			<text name="B:">
 				B:
@@ -259,56 +233,26 @@
 				Materiaal
 			</text>
 			<combo_box name="material">
-				<combo_item name="Stone">
-					Steen
-				</combo_item>
-				<combo_item name="Metal">
-					Metaal
-				</combo_item>
-				<combo_item name="Glass">
-					Glas
-				</combo_item>
-				<combo_item name="Wood">
-					Hout
-				</combo_item>
-				<combo_item name="Flesh">
-					Vlees
-				</combo_item>
-				<combo_item name="Plastic">
-					Plastic
-				</combo_item>
-				<combo_item name="Rubber">
-					Rubber
-				</combo_item>
+				<combo_box.item name="Stone" label="Steen"/>
+				<combo_box.item name="Metal" label="Metaal"/>
+				<combo_box.item name="Glass" label="Glas"/>
+				<combo_box.item name="Wood" label="Hout"/>
+				<combo_box.item name="Flesh" label="Vlees"/>
+				<combo_box.item name="Plastic" label="Plastic"/>
+				<combo_box.item name="Rubber" label="Rubber"/>
 			</combo_box>
 			<text name="label basetype">
 				Bouwbloktype
 			</text>
 			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					Kubus
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilinder
-				</combo_item>
-				<combo_item name="Prism">
-					Prisma
-				</combo_item>
-				<combo_item name="Sphere">
-					Bol
-				</combo_item>
-				<combo_item name="Torus">
-					Torus
-				</combo_item>
-				<combo_item name="Tube">
-					Buis
-				</combo_item>
-				<combo_item name="Ring">
-					Ring
-				</combo_item>
-				<combo_item name="Sculpted">
-					Sculpted
-				</combo_item>
+				<combo_box.item name="Box" label="Kubus"/>
+				<combo_box.item name="Cylinder" label="Cilinder"/>
+				<combo_box.item name="Prism" label="Prisma"/>
+				<combo_box.item name="Sphere" label="Bol"/>
+				<combo_box.item name="Torus" label="Torus"/>
+				<combo_box.item name="Tube" label="Buis"/>
+				<combo_box.item name="Ring" label="Ring"/>
+				<combo_box.item name="Sculpted" label="Sculpted"/>
 			</combo_box>
 			<text name="text cut">
 				Uitsnede begin en einde
@@ -325,18 +269,10 @@
 				Holtevorm
 			</text>
 			<combo_box name="hole">
-				<combo_item name="Default">
-					Standaard
-				</combo_item>
-				<combo_item name="Circle">
-					Cirkel
-				</combo_item>
-				<combo_item name="Square">
-					Vierkant
-				</combo_item>
-				<combo_item name="Triangle">
-					Driehoek
-				</combo_item>
+				<combo_box.item name="Default" label="Standaard"/>
+				<combo_box.item name="Circle" label="Cirkel"/>
+				<combo_box.item name="Square" label="Vierkant"/>
+				<combo_box.item name="Triangle" label="Driehoek"/>
 			</combo_box>
 			<text name="text twist">
 				Verdraai begin en einde
@@ -382,21 +318,11 @@
 				Hechtingstype
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(none)
-				</combo_item>
-				<combo_item name="Sphere">
-					Bol
-				</combo_item>
-				<combo_item name="Torus">
-					Torus
-				</combo_item>
-				<combo_item name="Plane">
-					Vlak
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilinder
-				</combo_item>
+				<combo_box.item name="None" label="none)"/>
+				<combo_box.item name="Sphere" label="Bol"/>
+				<combo_box.item name="Torus" label="Torus"/>
+				<combo_box.item name="Plane" label="Vlak"/>
+				<combo_box.item name="Cylinder" label="Cilinder"/>
 			</combo_box>
 		</panel>
 		<panel label="Kenmerken" name="Features">
@@ -438,88 +364,40 @@
 				Mapping
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					Standaard
-				</combo_item>
-				<combo_item name="Planar">
-					Vlak
-				</combo_item>
+				<combo_box.item name="Default" label="Standaard"/>
+				<combo_box.item name="Planar" label="Vlak"/>
 			</combo_box>
 			<text name="label shininess">
 				Glans
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					Geen
-				</combo_item>
-				<combo_item name="Low">
-					Laag
-				</combo_item>
-				<combo_item name="Medium">
-					Middel
-				</combo_item>
-				<combo_item name="High">
-					Hoog
-				</combo_item>
+				<combo_box.item name="None" label="Geen"/>
+				<combo_box.item name="Low" label="Laag"/>
+				<combo_box.item name="Medium" label="Middel"/>
+				<combo_box.item name="High" label="Hoog"/>
 			</combo_box>
 			<text name="label bumpiness">
 				Bumpiness
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					Geen
-				</combo_item>
-				<combo_item name="Brightness">
-					Helderheid
-				</combo_item>
-				<combo_item name="Darkness">
-					Donkerheid
-				</combo_item>
-				<combo_item name="woodgrain">
-					Houtnerf
-				</combo_item>
-				<combo_item name="bark">
-					Schors
-				</combo_item>
-				<combo_item name="bricks">
-					Stenen
-				</combo_item>
-				<combo_item name="checker">
-					Dambord
-				</combo_item>
-				<combo_item name="concrete">
-					Beton
-				</combo_item>
-				<combo_item name="crustytile">
-					gebarsten tegels
-				</combo_item>
-				<combo_item name="cutstone">
-					natuursteen
-				</combo_item>
-				<combo_item name="discs">
-					schijven
-				</combo_item>
-				<combo_item name="gravel">
-					grind
-				</combo_item>
-				<combo_item name="petridish">
-					petrischaal
-				</combo_item>
-				<combo_item name="siding">
-					wandpaneel
-				</combo_item>
-				<combo_item name="stonetile">
-					plavuizen
-				</combo_item>
-				<combo_item name="stucco">
-					stucwerk
-				</combo_item>
-				<combo_item name="suction">
-					zuignappen
-				</combo_item>
-				<combo_item name="weave">
-					weven
-				</combo_item>
+				<combo_box.item name="None" label="Geen"/>
+				<combo_box.item name="Brightness" label="Helderheid"/>
+				<combo_box.item name="Darkness" label="Donkerheid"/>
+				<combo_box.item name="woodgrain" label="Houtnerf"/>
+				<combo_box.item name="bark" label="Schors"/>
+				<combo_box.item name="bricks" label="Stenen"/>
+				<combo_box.item name="checker" label="Dambord"/>
+				<combo_box.item name="concrete" label="Beton"/>
+				<combo_box.item name="crustytile" label="gebarsten tegels"/>
+				<combo_box.item name="cutstone" label="natuursteen"/>
+				<combo_box.item name="discs" label="schijven"/>
+				<combo_box.item name="gravel" label="grind"/>
+				<combo_box.item name="petridish" label="petrischaal"/>
+				<combo_box.item name="siding" label="wandpaneel"/>
+				<combo_box.item name="stonetile" label="plavuizen"/>
+				<combo_box.item name="stucco" label="stucwerk"/>
+				<combo_box.item name="suction" label="zuignappen"/>
+				<combo_box.item name="weave" label="weven"/>
 			</combo_box>
 			<text name="tex scale">
 				Herhalingen per zijde
diff --git a/indra/newview/skins/default/xui/nl/floater_world_map.xml b/indra/newview/skins/default/xui/nl/floater_world_map.xml
index 9ee7cbdf4d..cb2b3277f8 100644
--- a/indra/newview/skins/default/xui/nl/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/nl/floater_world_map.xml
@@ -34,14 +34,10 @@
 	</text>
 
 	<combo_box label="Online vrienden" name="friend combo" tool_tip="Vriend die op kaart getoond wordt">
-		<combo_item name="none_selected">
-			Online vrienden
-		</combo_item>
+		<combo_box.item name="none_selected" label="Online vrienden"/>
 	</combo_box>
 	<combo_box label="Landmarkeringen" name="landmark combo" tool_tip="Landmarkering die op kaart getoond wordt">
-		<combo_item name="none_selected">
-			Landmarkeringen
-		</combo_item>
+		<combo_box.item name="none_selected" label="Landmarkeringen"/>
 	</combo_box>
 	<line_editor label="Zoek op regionaam" name="location" tool_tip="Type de naam van een regio"/>
 	<button label="Zoeken" name="DoSearch" tool_tip="Zoek naar regio"/>
diff --git a/indra/newview/skins/default/xui/nl/panel_login.xml b/indra/newview/skins/default/xui/nl/panel_login.xml
index fef92ca43b..ad56a9c348 100644
--- a/indra/newview/skins/default/xui/nl/panel_login.xml
+++ b/indra/newview/skins/default/xui/nl/panel_login.xml
@@ -19,15 +19,9 @@
 		Start Locatie:
 	</text>
 	<combo_box name="start_location_combo">
-		<combo_item name="MyHome">
-			Mijn Thuis
-		</combo_item>
-		<combo_item name="MyLastLocation">
-			Mijn Laatste Locatie
-		</combo_item>
-		<combo_item name="Typeregionname">
-			&lt; Type regio naam &gt;
-		</combo_item>
+		<combo_box.item name="MyHome" label="Mijn Thuis"/>
+		<combo_box.item name="MyLastLocation" label="Mijn Laatste Locatie"/>
+		<combo_box.item name="Typeregionname" label="lt; Type regio naam &gt;"/>
 	</combo_box>
 	<check_box label="Onthoud wachtwoord" name="remember_check"/>
 	<button label="Inloggen" label_selected="Inloggen" name="connect_btn"/>
diff --git a/indra/newview/skins/default/xui/pl/floater_about_land.xml b/indra/newview/skins/default/xui/pl/floater_about_land.xml
index 0592df1108..c0e053094a 100755
--- a/indra/newview/skins/default/xui/pl/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/pl/floater_about_land.xml
@@ -253,43 +253,19 @@ Idź do Świat &gt; O Posiadłości albo wybierz inną posiadłość żeby pokaz
 			<check_box label="Popychanie niedozwolone" name="PushRestrictCheck" tool_tip="Nie pozwalaj skryptom na popychanie. Wybranie tej opcji może być przydatne do ograniczenia zakłóceń spokoju w Twojej posiadłości."/>
 			<check_box label="Wyświetlaj w wyszukiwarce (30L$/tyg.)" name="ShowDirectoryCheck" tool_tip="Udostępnij ukazywanie się nazwy posiadłości w wyszukiwarce"/>
 			<combo_box name="land category">
-				<combo_item name="AnyCategory">
-					Każda
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Linden Lokacja
-				</combo_item>
+				<combo_box.item name="AnyCategory" label="Każda"/>
+				<combo_box.item name="LindenLocation" label="Linden Lokacja"/>
 
-				<combo_item name="Arts&amp;Culture">
-					Sztuka i Kultura
-				</combo_item>
-				<combo_item name="Business">
-					Biznes
-				</combo_item>
-				<combo_item name="Educational">
-					Edukacyjna
-				</combo_item>
-				<combo_item name="Gaming">
-					Gra
-				</combo_item>
-				<combo_item name="Hangout">
-					Poznawanie ludzi
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Przyjazna dla nowych
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parki i Natura
-				</combo_item>
-				<combo_item name="Residential">
-					Mieszkalna
-				</combo_item>
-				<combo_item name="Shopping">
-					Komercja/Sklepy
-				</combo_item>
-				<combo_item name="Other">
-					Inna
-				</combo_item>
+				<combo_box.item name="Arts&amp;Culture" label="Sztuka i Kultura"/>
+				<combo_box.item name="Business" label="Biznes"/>
+				<combo_box.item name="Educational" label="Edukacyjna"/>
+				<combo_box.item name="Gaming" label="Gra"/>
+				<combo_box.item name="Hangout" label="Poznawanie ludzi"/>
+				<combo_box.item name="NewcomerFriendly" label="Przyjazna dla nowych"/>
+				<combo_box.item name="Parks&amp;Nature" label="Parki i Natura"/>
+				<combo_box.item name="Residential" label="Mieszkalna"/>
+				<combo_box.item name="Shopping" label="Komercja/Sklepy"/>
+				<combo_box.item name="Other" label="Inna"/>
 			</combo_box>
 			<button label="?" label_selected="?" name="?"/>
 			<check_box name="MatureCheck" />
@@ -309,15 +285,9 @@ Idź do Świat &gt; O Posiadłości albo wybierz inną posiadłość żeby pokaz
 				Trasa Teleportacji:
 			</text>
 			<combo_box name="landing type" tool_tip="Trasa Teleportacj-ustaw w jaki sposób będzie sę odbywać proces telportacji w posiadłości.">
-				<combo_item length="1" name="Blocked" type="string">
-					Zablokowana
-				</combo_item>
-				<combo_item length="1" name="LandingPoint" type="string">
-					Punkt Lądowania
-				</combo_item>
-				<combo_item length="1" name="Anywhere" type="string">
-					Gdziekolwiek
-				</combo_item>
+				<combo_box.item length="1" name="Blocked" type="string" label="Zablokowana"/>
+				<combo_box.item length="1" name="LandingPoint" type="string" label="Punkt Lądowania"/>
+				<combo_box.item length="1" name="Anywhere" type="string" label="Gdziekolwiek"/>
 			</combo_box>
 			<string name="push_restrict_text">
 				Popychanie niedozwolone
@@ -403,12 +373,8 @@ Mediów:
 			<check_box label="Udostępnij wejście grupie: [GROUP]" name="GroupCheck" tool_tip="Ustaw grupę w głównej zakładce"/>
 			<check_box label="Sprzedaj wejściówki:" name="PassCheck" tool_tip="Otwórz tymczasowy dostęp do tej posiadłości"/>
 			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Każdemu
-				</combo_item>
-				<combo_item name="Group">
-					Grupie
-				</combo_item>
+				<combo_box.item name="Anyone" label="Każdemu"/>
+				<combo_box.item name="Group" label="Grupie"/>
 			</combo_box>
 			<spinner label="Cena w L$:" name="PriceSpin"/>
 			<spinner label="Ilość godzin dostępu:" name="HoursSpin"/>
diff --git a/indra/newview/skins/default/xui/pl/floater_animation_preview.xml b/indra/newview/skins/default/xui/pl/floater_animation_preview.xml
index 7151f67203..f430651b79 100755
--- a/indra/newview/skins/default/xui/pl/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/pl/floater_animation_preview.xml
@@ -18,129 +18,55 @@
 	</text>
 	<combo_box label="" name="hand_pose_combo"
 	     tool_tip="Kontroluje co robi ręka podczas animacji">
-		<combo_box.item name="Spread">
-			Rozciągaj
-		</combo_box.item>
-		<combo_box.item name="Relaxed">
-			Odpocznij
-		</combo_box.item>
-		<combo_box.item name="PointBoth">
-			Wskazuj
-		</combo_box.item>
-		<combo_box.item name="Fist">
-			Pięść
-		</combo_box.item>
-		<combo_box.item name="RelaxedLeft">
-			Lewa-Odpocznij
-		</combo_box.item>
-		<combo_box.item name="PointLeft">
-			Wskazuj Lewą
-		</combo_box.item>
-		<combo_box.item name="FistLeft">
-			Zaciśnij Lewą
-		</combo_box.item>
-		<combo_box.item name="RelaxedRight">
-			Prawa-Odpocznj
-		</combo_box.item>
-		<combo_box.item name="PointRight">
-			Wskazuj Prawą
-		</combo_box.item>
-		<combo_box.item name="FistRight">
-			Zaciśnij Prawą
-		</combo_box.item>
-		<combo_box.item name="SaluteRight">
-			Salutuj Prawą
-		</combo_box.item>
-		<combo_box.item name="Typing">
-			Pisz
-		</combo_box.item>
-		<combo_box.item name="PeaceRight">
-			Prawa-Pokój
-		</combo_box.item>
+		<combo_box.item name="Spread" label="Rozciągaj" />
+		<combo_box.item name="Relaxed" label="Odpocznij" />
+		<combo_box.item name="PointBoth" label="Wskazuj" />
+		<combo_box.item name="Fist" label="Pięść" />
+		<combo_box.item name="RelaxedLeft" label="Lewa-Odpocznij" />
+		<combo_box.item name="PointLeft" label="Wskazuj Lewą" />
+		<combo_box.item name="FistLeft" label="Zaciśnij Lewą" />
+		<combo_box.item name="RelaxedRight" label="Prawa-Odpocznj" />
+		<combo_box.item name="PointRight" label="Wskazuj Prawą" />
+		<combo_box.item name="FistRight" label="Zaciśnij Prawą" />
+		<combo_box.item name="SaluteRight" label="Salutuj Prawą" />
+		<combo_box.item name="Typing" label="Pisz" />
+		<combo_box.item name="PeaceRight" label="Prawa-Pokój" />
 	</combo_box>
 	<text name="emote_label">
 		Ekspresja
 	</text>
 	<combo_box label="" name="emote_combo"
 	     tool_tip="Kontroluj co wykonuje twarz w czasie animacji">
-		<combo_box.item name="[None]">
-			[Żadne]
-		</combo_box.item>
-		<combo_box.item name="Aaaaah">
-			Aaaaah
-		</combo_box.item>
-		<combo_box.item name="Afraid">
-			Obawa
-		</combo_box.item>
-		<combo_box.item name="Angry">
-			Zlość
-		</combo_box.item>
-		<combo_box.item name="BigSmile">
-			Duży Uśmiech
-		</combo_box.item>
-		<combo_box.item name="Bored">
-			Znudzenie
-		</combo_box.item>
-		<combo_box.item name="Cry">
-			Placz
-		</combo_box.item>
-		<combo_box.item name="Disdain">
-			Wzgarda
-		</combo_box.item>
-		<combo_box.item name="Embarrassed">
-			Zakłopotanie
-		</combo_box.item>
-		<combo_box.item name="Frown">
-			Marszczenie Brwi
-		</combo_box.item>
-		<combo_box.item name="Kiss">
-			Pocałunek
-		</combo_box.item>
-		<combo_box.item name="Laugh">
-			Śmiech
-		</combo_box.item>
-		<combo_box.item name="Plllppt">
-			Plllppt
-		</combo_box.item>
-		<combo_box.item name="Repulsed">
-			Odrzucenie
-		</combo_box.item>
-		<combo_box.item name="Sad">
-			Smutek
-		</combo_box.item>
-		<combo_box.item name="Shrug">
-			Wzruszanie Ramionami
-		</combo_box.item>
-		<combo_box.item name="Smile">
-			Uśmiech
-		</combo_box.item>
-		<combo_box.item name="Surprise">
-			Niespodzianka
-		</combo_box.item>
-		<combo_box.item name="Wink">
-			Mrugnięcie
-		</combo_box.item>
-		<combo_box.item name="Worry">
-			Zmartwienie
-		</combo_box.item>
+		<combo_box.item name="[None]" label="Żadne]" />
+		<combo_box.item name="Aaaaah" label="Aaaaah" />
+		<combo_box.item name="Afraid" label="Obawa" />
+		<combo_box.item name="Angry" label="Zlość" />
+		<combo_box.item name="BigSmile" label="Duży Uśmiech" />
+		<combo_box.item name="Bored" label="Znudzenie" />
+		<combo_box.item name="Cry" label="Placz" />
+		<combo_box.item name="Disdain" label="Wzgarda" />
+		<combo_box.item name="Embarrassed" label="Zakłopotanie" />
+		<combo_box.item name="Frown" label="Marszczenie Brwi" />
+		<combo_box.item name="Kiss" label="Pocałunek" />
+		<combo_box.item name="Laugh" label="Śmiech" />
+		<combo_box.item name="Plllppt" label="Plllppt" />
+		<combo_box.item name="Repulsed" label="Odrzucenie" />
+		<combo_box.item name="Sad" label="Smutek" />
+		<combo_box.item name="Shrug" label="Wzruszanie Ramionami" />
+		<combo_box.item name="Smile" label="Uśmiech" />
+		<combo_box.item name="Surprise" label="Niespodzianka" />
+		<combo_box.item name="Wink" label="Mrugnięcie" />
+		<combo_box.item name="Worry" label="Zmartwienie" />
 	</combo_box>
 	<text name="preview_label">
 		Przeglądaj kiedy
 	</text>
 	<combo_box label="" name="preview_base_anim"
 	     tool_tip="Przetestuj zachowanie animacji kiedy awatar wykonuje normalne czynności">
-		<combo_box.item name="Standing">
-			Stanie
-		</combo_box.item>
-		<combo_box.item name="Walking">
-			Chodzenie
-		</combo_box.item>
-		<combo_box.item name="Sitting">
-			Siedzenie
-		</combo_box.item>
-		<combo_box.item name="Flying">
-			Latanie
-		</combo_box.item>
+		<combo_box.item name="Standing" label="Stanie" />
+		<combo_box.item name="Walking" label="Chodzenie" />
+		<combo_box.item name="Sitting" label="Siedzenie" />
+		<combo_box.item name="Flying" label="Latanie" />
 	</combo_box>
 	<spinner label="Złagodzić w (sekund)" name="ease_in_time"
 	     tool_tip="Ilość Czasu (w sekundach), w których animacje mieszają się" />
diff --git a/indra/newview/skins/default/xui/pl/floater_buy_land.xml b/indra/newview/skins/default/xui/pl/floater_buy_land.xml
index 0225c4bca5..282732cb5b 100755
--- a/indra/newview/skins/default/xui/pl/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/pl/floater_buy_land.xml
@@ -66,15 +66,9 @@
 		Tylko członkowie z kontem Premium mogą mieć Posiadłosci.
 	</text>
 	<combo_box name="account_level">
-		<combo_box.item name="US$9.95/month,billedmonthly">
-			9.95US$/miesiąc, płatne miesięcznie
-		</combo_box.item>
-		<combo_box.item name="US$7.50/month,billedquarterly">
-			7.50US$/miesiąc, płatne kwartalnie
-		</combo_box.item>
-		<combo_box.item name="US$6.00/month,billedannually">
-			6.00US$/miesiąc, płatne rocznie
-		</combo_box.item>
+		<combo_box.item name="US$9.95/month,billedmonthly" label="9.95US$/miesiąc, płatne miesięcznie" />
+		<combo_box.item name="US$7.50/month,billedquarterly" label="7.50US$/miesiąc, płatne kwartalnie" />
+		<combo_box.item name="US$6.00/month,billedannually" label="6.00US$/miesiąc, płatne rocznie" />
 	</combo_box>
 	<text name="land_use_action">
 		Zwiększ opłatę za używanie Posiadłości do 40US$/miesiąc.
diff --git a/indra/newview/skins/default/xui/pl/floater_god_tools.xml b/indra/newview/skins/default/xui/pl/floater_god_tools.xml
index ff997c72cc..64213cbca1 100755
--- a/indra/newview/skins/default/xui/pl/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/pl/floater_god_tools.xml
@@ -79,29 +79,17 @@
 				Cel:
 			</text>
 			<combo_box name="destination">
-				<combo_box.item name="Selection">
-					Selekcja
-				</combo_box.item>
-				<combo_box.item name="AgentRegion">
-					Agent Regionu
-				</combo_box.item>
+				<combo_box.item name="Selection" label="Selekcja" />
+				<combo_box.item name="AgentRegion" label="Agent Regionu" />
 			</combo_box>
 			<text name="Request:">
 				Rządanie:
 			</text>
 			<combo_box name="request">
-				<combo_box.item name="colliders&lt;steps&gt;">
-					kolidery &lt;kroki&gt;
-				</combo_box.item>
-				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
-					skrypty &lt;policz&gt;,&lt;opcjonalnie powtórzenie&gt;
-				</combo_box.item>
-				<combo_box.item name="objects&lt;pattern&gt;">
-					obiekty &lt;powtórzenia&gt;
-				</combo_box.item>
-				<combo_box.item name="rez&lt;asset_id&gt;">
-					rez &lt;asset_id&gt;
-				</combo_box.item>
+				<combo_box.item name="colliders&lt;steps&gt;" label="kolidery &lt;kroki&gt;" />
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;" label="skrypty &lt;policz&gt;,&lt;opcjonalnie powtórzenie&gt;" />
+				<combo_box.item name="objects&lt;pattern&gt;" label="obiekty &lt;powtórzenia&gt;" />
+				<combo_box.item name="rez&lt;asset_id&gt;" label="rez &lt;asset_id&gt;" />
 			</combo_box>
 			<text name="Parameter:">
 				Parameter:
diff --git a/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml b/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml
index e76ad56660..051e9b510d 100755
--- a/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/pl/floater_hardware_settings.xml
@@ -8,21 +8,11 @@
 		Antialiasing:
 	</text>
 	<combo_box label="Antialiasing" name="fsaa" width="84">
-		<combo_box.item name="FSAADisabled">
-			Wyłączone
-		</combo_box.item>
-		<combo_box.item name="2x">
-			2x
-		</combo_box.item>
-		<combo_box.item name="4x">
-			4x
-		</combo_box.item>
-		<combo_box.item name="8x">
-			8x
-		</combo_box.item>
-		<combo_box.item name="16x">
-			16x
-		</combo_box.item>
+		<combo_box.item name="FSAADisabled" label="Wyłączone" />
+		<combo_box.item name="2x" label="2x" />
+		<combo_box.item name="4x" label="4x" />
+		<combo_box.item name="8x" label="8x" />
+		<combo_box.item name="16x" label="16x" />
 	</combo_box>
 	<spinner label="Gamma:" name="gamma" />
 	<text type="string" length="1" name="(brightness, lower is brighter)">
diff --git a/indra/newview/skins/default/xui/pl/floater_image_preview.xml b/indra/newview/skins/default/xui/pl/floater_image_preview.xml
index b0fe49deef..27f898a66b 100755
--- a/indra/newview/skins/default/xui/pl/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/pl/floater_image_preview.xml
@@ -10,36 +10,16 @@
 		Wyświetl obraz jako:
 	</text>
 	<combo_box label="Rodzaj Ubrania" name="clothing_type_combo">
-		<combo_box.item name="Image">
-			Obraz
-		</combo_box.item>
-		<combo_box.item name="Hair">
-			Włosy
-		</combo_box.item>
-		<combo_box.item name="FemaleHead">
-			Damska Głowa
-		</combo_box.item>
-		<combo_box.item name="FemaleUpperBody">
-			Damska Górna Część Ciała
-		</combo_box.item>
-		<combo_box.item name="FemaleLowerBody">
-			Damska Górna Część Ciała
-		</combo_box.item>
-		<combo_box.item name="MaleHead">
-			Męska Głowa
-		</combo_box.item>
-		<combo_box.item name="MaleUpperBody">
-			Męska Górna Część Ciała
-		</combo_box.item>
-		<combo_box.item name="MaleLowerBody">
-			Męska Dolna Część Ciała
-		</combo_box.item>
-		<combo_box.item name="Skirt">
-			Spódnica
-		</combo_box.item>
-		<combo_box.item name="SculptedPrim">
-			Sculpt
-		</combo_box.item>
+		<combo_box.item name="Image" label="Obraz" />
+		<combo_box.item name="Hair" label="Włosy" />
+		<combo_box.item name="FemaleHead" label="Damska Głowa" />
+		<combo_box.item name="FemaleUpperBody" label="Damska Górna Część Ciała" />
+		<combo_box.item name="FemaleLowerBody" label="Damska Górna Część Ciała" />
+		<combo_box.item name="MaleHead" label="Męska Głowa" />
+		<combo_box.item name="MaleUpperBody" label="Męska Górna Część Ciała" />
+		<combo_box.item name="MaleLowerBody" label="Męska Dolna Część Ciała" />
+		<combo_box.item name="Skirt" label="Spódnica" />
+		<combo_box.item name="SculptedPrim" label="Sculpt" />
 	</combo_box>
 	<text name="bad_image_text">
 		Nie można wczytać obrazu.
diff --git a/indra/newview/skins/default/xui/pl/floater_report_abuse.xml b/indra/newview/skins/default/xui/pl/floater_report_abuse.xml
index 5da5ce0dc0..f24eb02886 100755
--- a/indra/newview/skins/default/xui/pl/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/pl/floater_report_abuse.xml
@@ -37,123 +37,51 @@
 		Hendrerit Vulputate
 	</text>
 	<combo_box name="category_combo" tool_tip="Wybór kategorii - wybierz kategorię, której dotyczy raport">
-		<combo_item name="Select_category">
-			Wybierz Kategorię:
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Wiek &gt; Udawanie Nieletniej Osoby
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Wiek &gt; Dorosły Rezydent w Teen Second Life
-		</combo_item>
+		<combo_box.item name="Select_category" label="Wybierz Kategorię:"/>
+		<combo_box.item name="Age__Age_play" label="Wiek &gt; Udawanie Nieletniej Osoby"/>
+		<combo_box.item name="Age__Adult_resident_on_Teen_Second_Life" label="Wiek &gt; Dorosły Rezydent w Teen Second Life"/>
 		
 		
 		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Napaść &gt; Strefa Militarna / Niebezpieczny Obszar
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Napaść &gt; Bezpieczny Obszar
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Napaść &gt; Obszar do Testowania Broni
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Handel &gt; Niedostarczenie Produktu lub Usługi
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Naruszenie Prywatności &gt; Dane Osobiste
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Ujawnienie &gt; Monitorowanie Czatu
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Ujawnienie &gt; Dane z Second Life / Czatu / IM
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Zakłócanie Spokoju &gt; Nieuczciwe Używanie Zasobów Regionu
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Zakłócanie Spokoju &gt; Przesadnie Skryptowane Obiekty
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Zakłócanie Spokoju &gt; Śmiecenie Obiektami
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Zakłócanie Spokoju &gt; Ciągły Spam
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Zakłócanie Spokoju &gt; Nieporządany Spam Reklamowy
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Oszustwo &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Oszustwo &gt; Posiadłości
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Oszustwo &gt; Piramidy albo Listy Łańcuchowe
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Oszustwo &gt; US$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Prześladowanie &gt; Farmy Reklamowe / Wizualny Spam
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Prześladowanie &gt; Zniesławianie Jedostek lub Grup
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Prześladowanie &gt; Ograniczanie Ruchu
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Prześladowanie &gt; Molestowanie Seksualne
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Prześladowanie &gt; Namawianie/Zachęcanie Innych do Łamania Warunków Umowy (ToS)
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Prześladowanie &gt; Znieważanie Słowne
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Nieprzyzwoitość &gt; Obraźliwa Treść lub Postępowanie
-		</combo_item>
+		<combo_box.item name="Assault__Combat_sandbox___unsafe_area" label="Napaść &gt; Strefa Militarna / Niebezpieczny Obszar"/>
+		<combo_box.item name="Assault__Safe_area" label="Napaść &gt; Bezpieczny Obszar"/>
+		<combo_box.item name="Assault__Weapons_testing_sandbox" label="Napaść &gt; Obszar do Testowania Broni"/>
+		<combo_box.item name="Commerce__Failure_to_deliver_product_or_service" label="Handel &gt; Niedostarczenie Produktu lub Usługi"/>
+		<combo_box.item name="Disclosure__Real_world_information" label="Naruszenie Prywatności &gt; Dane Osobiste"/>
+		<combo_box.item name="Disclosure__Remotely_monitoring chat" label="Ujawnienie &gt; Monitorowanie Czatu"/>
+		<combo_box.item name="Disclosure__Second_Life_information_chat_IMs" label="Ujawnienie &gt; Dane z Second Life / Czatu / IM"/>
+		<combo_box.item name="Disturbing_the_peace__Unfair_use_of_region_resources" label="Zakłócanie Spokoju &gt; Nieuczciwe Używanie Zasobów Regionu"/>
+		<combo_box.item name="Disturbing_the_peace__Excessive_scripted_objects" label="Zakłócanie Spokoju &gt; Przesadnie Skryptowane Obiekty"/>
+		<combo_box.item name="Disturbing_the_peace__Object_littering" label="Zakłócanie Spokoju &gt; Śmiecenie Obiektami"/>
+		<combo_box.item name="Disturbing_the_peace__Repetitive_spam" label="Zakłócanie Spokoju &gt; Ciągły Spam"/>
+		<combo_box.item name="Disturbing_the_peace__Unwanted_advert_spam" label="Zakłócanie Spokoju &gt; Nieporządany Spam Reklamowy"/>
+		<combo_box.item name="Fraud__L$" label="Oszustwo &gt; L$"/>
+		<combo_box.item name="Fraud__Land" label="Oszustwo &gt; Posiadłości"/>
+		<combo_box.item name="Fraud__Pyramid_scheme_or_chain_letter" label="Oszustwo &gt; Piramidy albo Listy Łańcuchowe"/>
+		<combo_box.item name="Fraud__US$" label="Oszustwo &gt; US$"/>
+		<combo_box.item name="Harassment__Advert_farms___visual_spam" label="Prześladowanie &gt; Farmy Reklamowe / Wizualny Spam"/>
+		<combo_box.item name="Harassment__Defaming_individuals_or_groups" label="Prześladowanie &gt; Zniesławianie Jedostek lub Grup"/>
+		<combo_box.item name="Harassment__Impeding_movement" label="Prześladowanie &gt; Ograniczanie Ruchu"/>
+		<combo_box.item name="Harassment__Sexual_harassment" label="Prześladowanie &gt; Molestowanie Seksualne"/>
+		<combo_box.item name="Harassment__Solicting_inciting_others_to_violate_ToS" label="Prześladowanie &gt; Namawianie/Zachęcanie Innych do Łamania Warunków Umowy (ToS)"/>
+		<combo_box.item name="Harassment__Verbal_abuse" label="Prześladowanie &gt; Znieważanie Słowne"/>
+		<combo_box.item name="Indecency__Broadly_offensive_content_or_conduct" label="Nieprzyzwoitość &gt; Obraźliwa Treść lub Postępowanie"/>
 		
 		
 		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Nieprzyzwoitość &gt; Niestosowne Imię Awatara
-		</combo_item>
+		<combo_box.item name="Indecency__Inappropriate_avatar_name" label="Nieprzyzwoitość &gt; Niestosowne Imię Awatara"/>
 		
 		
 		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Naruszenie Własności Intelektualnej &gt; Usunięcie Treści
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Naruszenie Własności Intelektualnej &gt; CopyBot albo Nadużycie Przywilejów
-		</combo_item>
-		<combo_item name="Intolerance">
-			Nietolerancja
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Posiadłości &gt; Nadużywanie Piaskownicy
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Posiadłości &gt; Naruszenie &gt; Obiekty/Tekstury
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Posiadłości &gt; Naruszenie &gt; Cząsteczki
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Posiadłości &gt; Naruszenie &gt; Drzewa/Rośliny
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Zakłady/Hazard
-		</combo_item>
-		<combo_item name="Other">
-			Inne
-		</combo_item>
+		<combo_box.item name="Intellectual_property_infringement_Content_Removal" label="Naruszenie Własności Intelektualnej &gt; Usunięcie Treści"/>
+		<combo_box.item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit" label="Naruszenie Własności Intelektualnej &gt; CopyBot albo Nadużycie Przywilejów"/>
+		<combo_box.item name="Intolerance" label="Nietolerancja"/>
+		<combo_box.item name="Land__Abuse_of_sandbox_resources" label="Posiadłości &gt; Nadużywanie Piaskownicy"/>
+		<combo_box.item name="Land__Encroachment__Objects_textures" label="Posiadłości &gt; Naruszenie &gt; Obiekty/Tekstury"/>
+		<combo_box.item name="Land__Encroachment__Particles" label="Posiadłości &gt; Naruszenie &gt; Cząsteczki"/>
+		<combo_box.item name="Land__Encroachment__Trees_plants" label="Posiadłości &gt; Naruszenie &gt; Drzewa/Rośliny"/>
+		<combo_box.item name="Wagering_gambling" label="Zakłady/Hazard"/>
+		<combo_box.item name="Other" label="Inne"/>
 	</combo_box>
 	<text name="abuser_name_title">
 		Dane osobowe:
diff --git a/indra/newview/skins/default/xui/pl/floater_sell_land.xml b/indra/newview/skins/default/xui/pl/floater_sell_land.xml
index 2d42ac3368..89a6be2f6c 100755
--- a/indra/newview/skins/default/xui/pl/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/pl/floater_sell_land.xml
@@ -34,15 +34,9 @@
 		Wybierz sprzedaż dla kogokolwiek albo dla wybranego kupca.
 	</text>
 	<combo_box name="sell_to">
-		<combo_box.item name="--selectone--">
-			-- wybierz --
-		</combo_box.item>
-		<combo_box.item name="Anyone">
-			Ktokolwiek
-		</combo_box.item>
-		<combo_box.item name="Specificuser:">
-			Wybrany kupiec:
-		</combo_box.item>
+		<combo_box.item name="--selectone--" label="wybierz --" />
+		<combo_box.item name="Anyone" label="Ktokolwiek" />
+		<combo_box.item name="Specificuser:" label="Wybrany kupiec:" />
 	</combo_box>
 	<button label="Wybierz..." name="sell_to_select_agent" />
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/pl/floater_settings_debug.xml b/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
index 8c3f9cc056..99fa444a1b 100755
--- a/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater name="settings_debug" title="Ustawienia Usuwania Błędów">
 	<combo_box name="boolean_combo">
-		<combo_box.item name="TRUE">
-			PRAWDA
-		</combo_box.item>
-		<combo_box.item name="FALSE">
-			NIEPRAWDA
-		</combo_box.item>
+		<combo_box.item name="TRUE" label="PRAWDA" />
+		<combo_box.item name="FALSE" label="NIEPRAWDA" />
 	</combo_box>
 	<color_swatch label="Kolor" name="color_swatch"/>
 	<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/pl/floater_snapshot.xml b/indra/newview/skins/default/xui/pl/floater_snapshot.xml
index e707bc797a..b280213575 100755
--- a/indra/newview/skins/default/xui/pl/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/pl/floater_snapshot.xml
@@ -38,75 +38,33 @@
 		Format
 	</text>
 	<combo_box label="Rozdzielczość" name="postcard_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Obecne Okno
-		</combo_box.item>
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Wybierz
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Obecne Okno" />
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="1024x768" label="1024x768" />
+		<combo_box.item name="Custom" label="Wybierz" />
 	</combo_box>
 	<combo_box label="Rozdzielczość" name="texture_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Obecne Okno
-		</combo_box.item>
-		<combo_box.item name="Small(128x128)">
-			Mały (128x128)
-		</combo_box.item>
-		<combo_box.item name="Medium(256x256)">
-			Średni (256x256)
-		</combo_box.item>
-		<combo_box.item name="Large(512x512)">
-			Duży (512x512)
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Wybierz
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Obecne Okno" />
+		<combo_box.item name="Small(128x128)" label="Mały (128x128)" />
+		<combo_box.item name="Medium(256x256)" label="Średni (256x256)" />
+		<combo_box.item name="Large(512x512)" label="Duży (512x512)" />
+		<combo_box.item name="Custom" label="Wybierz" />
 	</combo_box>
 	<combo_box label="Rozdzielczość" name="local_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Obecne Okno
-		</combo_box.item>
-		<combo_box.item name="320x240">
-			320x240
-		</combo_box.item>
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
-		<combo_box.item name="1280x1024">
-			1280x1024
-		</combo_box.item>
-		<combo_box.item name="1600x1200">
-			1600x1200
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Wybierz
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Obecne Okno" />
+		<combo_box.item name="320x240" label="320x240" />
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="1024x768" label="1024x768" />
+		<combo_box.item name="1280x1024" label="1280x1024" />
+		<combo_box.item name="1600x1200" label="1600x1200" />
+		<combo_box.item name="Custom" label="Wybierz" />
 	</combo_box>
 	<combo_box label="Format" name="local_format_combo">
-		<combo_box.item name="PNG">
-			PNG
-		</combo_box.item>
-		<combo_box.item name="JPEG">
-			JPEG
-		</combo_box.item>
-		<combo_box.item name="BMP">
-			BMP
-		</combo_box.item>
+		<combo_box.item name="PNG" label="PNG" />
+		<combo_box.item name="JPEG" label="JPEG" />
+		<combo_box.item name="BMP" label="BMP" />
 	</combo_box>
 	<spinner label="Szer." name="snapshot_width"/>
 	<spinner label="Wys." name="snapshot_height"/>
@@ -116,15 +74,9 @@
 		Zapisz:
 	</text>
 	<combo_box label="Warstwy Obrazu" name="layer_types">
-		<combo_box.item name="Colors">
-			Kolory
-		</combo_box.item>
-		<combo_box.item name="Depth">
-			Głębokość
-		</combo_box.item>
-		<combo_box.item name="ObjectMattes">
-			Obiekty Ślepe
-		</combo_box.item>
+		<combo_box.item name="Colors" label="Kolory" />
+		<combo_box.item name="Depth" label="Głębokość" />
+		<combo_box.item name="ObjectMattes" label="Obiekty Ślepe" />
 	</combo_box>
 	<check_box label="Pokaż interfejs na zdjęciu" name="ui_check"/>
 	<check_box label="Pokaż obiekty HUD na zdjęciu" name="hud_check"/>
diff --git a/indra/newview/skins/default/xui/pl/floater_tools.xml b/indra/newview/skins/default/xui/pl/floater_tools.xml
index 2555186a12..25e1797605 100755
--- a/indra/newview/skins/default/xui/pl/floater_tools.xml
+++ b/indra/newview/skins/default/xui/pl/floater_tools.xml
@@ -31,15 +31,9 @@
 		Linijka:
 	</text>
 	<combo_box name="combobox grid mode">
-		<combo_box.item name="World">
-			Świat
-		</combo_box.item>
-		<combo_box.item name="Local">
-			Lokalna
-		</combo_box.item>
-		<combo_box.item name="Reference">
-			Względna
-		</combo_box.item>
+		<combo_box.item name="World" label="Świat" />
+		<combo_box.item name="Local" label="Lokalna" />
+		<combo_box.item name="Reference" label="Względna" />
 	</combo_box>
 	<check_box label="Rozciągnij 2 Strony" name="checkbox uniform"/>
 	<check_box label="Rozciągnij Teksturę" name="checkbox stretch textures"/>
@@ -80,15 +74,9 @@
     <radio_item label="Cofnięcie modyfikacji" name="radio revert"/>
   </radio_group>
 	<combo_box name="combobox brush size">
-		<combo_box.item name="Small">
-			Małe
-		</combo_box.item>
-		<combo_box.item name="Medium">
-			Średnie
-		</combo_box.item>
-		<combo_box.item name="Large">
-			Duże
-		</combo_box.item>
+		<combo_box.item name="Small" label="Małe" />
+		<combo_box.item name="Medium" label="Średnie" />
+		<combo_box.item name="Large" label="Duże" />
 	</combo_box>
 	<volume_slider name="slider force"/>
 	<text length="1" name="Strength:" type="string">
@@ -176,27 +164,13 @@
 				Lewe Kliknięcie:
 			</text>
 			<combo_box name="clickaction">
-				<combo_box.item name="Touch/grab(default)">
-					Dotknij (domyślne)
-				</combo_box.item>
-				<combo_box.item name="Sitonobject">
-					Usiądź na Obiekcie
-				</combo_box.item>
-				<combo_box.item name="Buyobject">
-					Kup Obiekt
-				</combo_box.item>
-				<combo_box.item name="Payobject">
-					Zapłać Obiektowi
-				</combo_box.item>
-				<combo_box.item name="Open">
-					Otwórz
-				</combo_box.item>
-				<combo_box.item name="Play">
-					Odtwarzaj Media
-				</combo_box.item>
-				<combo_box.item name="Opemmedia">
-					Otwrórz Media
-				</combo_box.item>
+				<combo_box.item name="Touch/grab(default)" label="Dotknij (domyślne)" />
+				<combo_box.item name="Sitonobject" label="Usiądź na Obiekcie" />
+				<combo_box.item name="Buyobject" label="Kup Obiekt" />
+				<combo_box.item name="Payobject" label="Zapłać Obiektowi" />
+				<combo_box.item name="Open" label="Otwórz" />
+				<combo_box.item name="Play" label="Odtwarzaj Media" />
+				<combo_box.item name="Opemmedia" label="Otwrórz Media" />
 			</combo_box>
 			<text name="B:">
 				B:
@@ -281,56 +255,26 @@
 				Materiał
 			</text>
 			<combo_box name="material">
-				<combo_box.item name="Stone">
-					Kamień
-				</combo_box.item>
-				<combo_box.item name="Metal">
-					Metal
-				</combo_box.item>
-				<combo_box.item name="Glass">
-					Szkło
-				</combo_box.item>
-				<combo_box.item name="Wood">
-					Drewno
-				</combo_box.item>
-				<combo_box.item name="Flesh">
-					Ciało
-				</combo_box.item>
-				<combo_box.item name="Plastic">
-					Plastik
-				</combo_box.item>
-				<combo_box.item name="Rubber">
-					Guma
-				</combo_box.item>
+				<combo_box.item name="Stone" label="Kamień" />
+				<combo_box.item name="Metal" label="Metal" />
+				<combo_box.item name="Glass" label="Szkło" />
+				<combo_box.item name="Wood" label="Drewno" />
+				<combo_box.item name="Flesh" label="Ciało" />
+				<combo_box.item name="Plastic" label="Plastik" />
+				<combo_box.item name="Rubber" label="Guma" />
 			</combo_box>
 			<text name="label basetype">
 				Rodzaj Bloku Budowalnego
 			</text>
 			<combo_box name="comboBaseType">
-				<combo_box.item name="Box">
-					Klocek
-				</combo_box.item>
-				<combo_box.item name="Cylinder">
-					Walec
-				</combo_box.item>
-				<combo_box.item name="Prism">
-					Graniastosłup
-				</combo_box.item>
-				<combo_box.item name="Sphere">
-					Kula
-				</combo_box.item>
-				<combo_box.item name="Torus">
-					Torus
-				</combo_box.item>
-				<combo_box.item name="Tube">
-					Rura
-				</combo_box.item>
-				<combo_box.item name="Ring">
-					Pierścień
-				</combo_box.item>
-				<combo_box.item name="Sculpted">
-					Skulpty
-				</combo_box.item>
+				<combo_box.item name="Box" label="Klocek" />
+				<combo_box.item name="Cylinder" label="Walec" />
+				<combo_box.item name="Prism" label="Graniastosłup" />
+				<combo_box.item name="Sphere" label="Kula" />
+				<combo_box.item name="Torus" label="Torus" />
+				<combo_box.item name="Tube" label="Rura" />
+				<combo_box.item name="Ring" label="Pierścień" />
+				<combo_box.item name="Sculpted" label="Skulpty" />
 			</combo_box>
 			<text name="text cut">
 				Wykrój
@@ -349,18 +293,10 @@
 				Kształt Wydrążenia
 			</text>
 			<combo_box name="hole">
-				<combo_box.item name="Default">
-					Domyślny
-				</combo_box.item>
-				<combo_box.item name="Circle">
-					Koło
-				</combo_box.item>
-				<combo_box.item name="Square">
-					Kwadrat
-				</combo_box.item>
-				<combo_box.item name="Triangle">
-					Trójkąt
-				</combo_box.item>
+				<combo_box.item name="Default" label="Domyślny" />
+				<combo_box.item name="Circle" label="Koło" />
+				<combo_box.item name="Square" label="Kwadrat" />
+				<combo_box.item name="Triangle" label="Trójkąt" />
 			</combo_box>
 			<text name="text twist">
 				Skręcenie
@@ -408,21 +344,11 @@
 				Typ Ścięgna
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_box.item name="None">
-					(żadne)
-				</combo_box.item>
-				<combo_box.item name="Sphere">
-					Kula
-				</combo_box.item>
-				<combo_box.item name="Torus">
-					Torus
-				</combo_box.item>
-				<combo_box.item name="Plane">
-					Płaczyzna
-				</combo_box.item>
-				<combo_box.item name="Cylinder">
-					Walec
-				</combo_box.item>
+				<combo_box.item name="None" label="żadne)" />
+				<combo_box.item name="Sphere" label="Kula" />
+				<combo_box.item name="Torus" label="Torus" />
+				<combo_box.item name="Plane" label="Płaczyzna" />
+				<combo_box.item name="Cylinder" label="Walec" />
 			</combo_box>
 		</panel>
 		<!-- Features sub-tab -->
@@ -468,88 +394,40 @@
 				Mapowanie
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_box.item name="Default">
-					Domyślne
-				</combo_box.item>
-				<combo_box.item name="Planar">
-					Planarne
-				</combo_box.item>
+				<combo_box.item name="Default" label="Domyślne" />
+				<combo_box.item name="Planar" label="Planarne" />
 			</combo_box>
 			<text name="label shininess">
 				Połysk
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_box.item name="None">
-					Żadny
-				</combo_box.item>
-				<combo_box.item name="Low">
-					Niski
-				</combo_box.item>
-				<combo_box.item name="Medium">
-					Średni
-				</combo_box.item>
-				<combo_box.item name="High">
-					Wysoki
-				</combo_box.item>
+				<combo_box.item name="None" label="Żadny" />
+				<combo_box.item name="Low" label="Niski" />
+				<combo_box.item name="Medium" label="Średni" />
+				<combo_box.item name="High" label="Wysoki" />
 			</combo_box>
 			<text name="label bumpiness">
 				Powierzchnia
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_box.item name="None">
-					Żadna
-				</combo_box.item>
-				<combo_box.item name="Brightness">
-					Najjaśniejsza
-				</combo_box.item>
-				<combo_box.item name="Darkness">
-					Najciemniejsza
-				</combo_box.item>
-				<combo_box.item name="woodgrain">
-					Drewniano-ziarnista
-				</combo_box.item>
-				<combo_box.item name="bark">
-					Kory Drzewa
-				</combo_box.item>
-				<combo_box.item name="bricks">
-					Cegieł
-				</combo_box.item>
-				<combo_box.item name="checker">
-					Planszy Szachowej
-				</combo_box.item>
-				<combo_box.item name="concrete">
-					Betonu
-				</combo_box.item>
-				<combo_box.item name="crustytile">
-					Płytki/Kafelki
-				</combo_box.item>
-				<combo_box.item name="cutstone">
-					Kamienia
-				</combo_box.item>
-				<combo_box.item name="discs">
-					Dysku CD
-				</combo_box.item>
-				<combo_box.item name="gravel">
-					Żwiru
-				</combo_box.item>
-				<combo_box.item name="petridish">
-					Skamieliny
-				</combo_box.item>
-				<combo_box.item name="siding">
-					Sidingu
-				</combo_box.item>
-				<combo_box.item name="stonetile">
-					Płytki Kamiennej
-				</combo_box.item>
-				<combo_box.item name="stucco">
-					Stucco
-				</combo_box.item>
-				<combo_box.item name="suction">
-					Suction
-				</combo_box.item>
-				<combo_box.item name="weave">
-					Fali
-				</combo_box.item>
+				<combo_box.item name="None" label="Żadna" />
+				<combo_box.item name="Brightness" label="Najjaśniejsza" />
+				<combo_box.item name="Darkness" label="Najciemniejsza" />
+				<combo_box.item name="woodgrain" label="Drewniano-ziarnista" />
+				<combo_box.item name="bark" label="Kory Drzewa" />
+				<combo_box.item name="bricks" label="Cegieł" />
+				<combo_box.item name="checker" label="Planszy Szachowej" />
+				<combo_box.item name="concrete" label="Betonu" />
+				<combo_box.item name="crustytile" label="Płytki/Kafelki" />
+				<combo_box.item name="cutstone" label="Kamienia" />
+				<combo_box.item name="discs" label="Dysku CD" />
+				<combo_box.item name="gravel" label="Żwiru" />
+				<combo_box.item name="petridish" label="Skamieliny" />
+				<combo_box.item name="siding" label="Sidingu" />
+				<combo_box.item name="stonetile" label="Płytki Kamiennej" />
+				<combo_box.item name="stucco" label="Stucco" />
+				<combo_box.item name="suction" label="Suction" />
+				<combo_box.item name="weave" label="Fali" />
 			</combo_box>
 			<text name="tex scale">
 				Ilość powtórzeń
diff --git a/indra/newview/skins/default/xui/pl/floater_world_map.xml b/indra/newview/skins/default/xui/pl/floater_world_map.xml
index f4f5792494..59235e68f3 100755
--- a/indra/newview/skins/default/xui/pl/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/pl/floater_world_map.xml
@@ -41,15 +41,11 @@
 
 	<check_box label="" name="event_mature_chk" />
 	<combo_box label="Dostępni Znajomi" name="friend combo" tool_tip="Znajomi na mapie">
-		<combo_box.item name="none_selected">
-			Dostępni Znajomi
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Dostępni Znajomi" />
 	</combo_box>
 	<combo_box label="Zapisane Miejsca" name="landmark combo"
 	     tool_tip="Zapisane miejsca na mapie">
-		<combo_box.item name="none_selected">
-			Zapisane Miejsca
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Zapisane Miejsca" />
 	</combo_box>
 	<line_editor label="Szukaj po nazwie regionu" name="location"
 	     tool_tip="Wpisz nazwę regionu" />
diff --git a/indra/newview/skins/default/xui/pl/panel_login.xml b/indra/newview/skins/default/xui/pl/panel_login.xml
index 13fcaa25ab..63659cf429 100755
--- a/indra/newview/skins/default/xui/pl/panel_login.xml
+++ b/indra/newview/skins/default/xui/pl/panel_login.xml
@@ -19,15 +19,9 @@
 		Miejsce Startu:
 	</text>
 	<combo_box name="start_location_combo">
-		<combo_box.item name="MyHome">
-			Mój Start
-		</combo_box.item>
-		<combo_box.item name="MyLastLocation">
-			Ostatnie Miejsce
-		</combo_box.item>
-		<combo_box.item name="Typeregionname">
-			&lt;Wpisz Region&gt;
-		</combo_box.item>
+		<combo_box.item name="MyHome" label="Mój Start" />
+		<combo_box.item name="MyLastLocation" label="Ostatnie Miejsce" />
+		<combo_box.item name="Typeregionname" label="lt;Wpisz Region&gt;" />
   </combo_box>
   <check_box label="Zapamiętaj Hasło" name="remember_check" />
   <button label="Połącz" label_selected="Połącz" name="connect_btn" />
diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/pl/panel_preferences_graphics1.xml
index ee63a12bd1..c14d14f2ab 100755
--- a/indra/newview/skins/default/xui/pl/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/pl/panel_preferences_graphics1.xml
@@ -9,21 +9,11 @@
 		Wymiary Okna:
 	</text>
 	<combo_box name="windowsize combo">
-		<combo_box.item type="string" length="1" name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="720x480">
-			720x480 (NTSC)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="768x576">
-			768x576 (PAL)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="1024x768">
-			1024x768
-		</combo_box.item>
+		<combo_box.item type="string" length="1" name="640x480" label="640x480" />
+		<combo_box.item type="string" length="1" name="800x600" label="800x600" />
+		<combo_box.item type="string" length="1" name="720x480" label="720x480 (NTSC)" />
+		<combo_box.item type="string" length="1" name="768x576" label="768x576 (PAL)" />
+		<combo_box.item type="string" length="1" name="1024x768" label="1024x768" />
 	</combo_box>
 	<text type="string" length="1" name="DisplayResLabel">
 		Rozdzielczość:
@@ -32,18 +22,10 @@
 		Proporcje:
 	</text>
 	<combo_box name="aspect_ratio" tool_tip="width / height">
-		<combo_box.item type="string" length="1" name="4:3(StandardCRT)">
-			4:3 (Standardowy CRT)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)">
-			5:4 (1280x1024 LCD)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="8:5(Widescreen)">
-			8:5 (Panoramiczny)
-		</combo_box.item>
-		<combo_box.item type="string" length="1" name="16:9(Widescreen)">
-			16:9 (Panoramiczny)
-		</combo_box.item>
+		<combo_box.item type="string" length="1" name="4:3(StandardCRT)" label="4:3 (Standardowy CRT)" />
+		<combo_box.item type="string" length="1" name="5:4(1280x1024LCD)" label="5:4 (1280x1024 LCD)" />
+		<combo_box.item type="string" length="1" name="8:5(Widescreen)" label="8:5 (Panoramiczny)" />
+		<combo_box.item type="string" length="1" name="16:9(Widescreen)" label="16:9 (Panoramiczny)" />
 	</combo_box>
 	<check_box label="Detekcja proporcji" name="aspect_auto_detect" />
 	<text type="string" length="1" name="HigherText">
diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml
index 3a715aa01f..2cc75432ee 100644
--- a/indra/newview/skins/default/xui/pt/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml
@@ -254,43 +254,19 @@ Vá para o menu Mundo &gt; Sobre a Terra ou selecione outro lote para mostrar se
 			<check_box label="Sem Empurrar" name="PushRestrictCheck" tool_tip="Evita scripts que empurram. A ativação dessa opção pode ser útil para prevenir comportamentos desordeiros na sua terra."/>
 			<check_box label="Mostra o Lugar na Busca (L$30/semana) sob" name="ShowDirectoryCheck" tool_tip="Permitir que as pessoas vejam este terreno nos resultados de busca"/>
 			<combo_box left="276" name="land category" width="146">
-				<combo_item name="AnyCategory">
-					Qualquer Categoria
-				</combo_item>
-				<combo_item name="LindenLocation">
-					Locação Linden
-				</combo_item>
+				<combo_box.item name="AnyCategory" label="Qualquer Categoria"/>
+				<combo_box.item name="LindenLocation" label="Locação Linden"/>
 
-				<combo_item name="Arts&amp;Culture">
-					Artes e Cultura
-				</combo_item>
-				<combo_item name="Business">
-					Negócios
-				</combo_item>
-				<combo_item name="Educational">
-					Educacional
-				</combo_item>
-				<combo_item name="Gaming">
-					Jogo
-				</combo_item>
-				<combo_item name="Hangout">
-					Lazer
-				</combo_item>
-				<combo_item name="NewcomerFriendly">
-					Amigável para novatos
-				</combo_item>
-				<combo_item name="Parks&amp;Nature">
-					Parques e Natureza
-				</combo_item>
-				<combo_item name="Residential">
-					Residencial
-				</combo_item>
-				<combo_item name="Shopping">
-					Compras
-				</combo_item>
-				<combo_item name="Other">
-					Outros
-				</combo_item>
+				<combo_box.item name="Arts&amp;Culture" label="Artes e Cultura"/>
+				<combo_box.item name="Business" label="Negócios"/>
+				<combo_box.item name="Educational" label="Educacional"/>
+				<combo_box.item name="Gaming" label="Jogo"/>
+				<combo_box.item name="Hangout" label="Lazer"/>
+				<combo_box.item name="NewcomerFriendly" label="Amigável para novatos"/>
+				<combo_box.item name="Parks&amp;Nature" label="Parques e Natureza"/>
+				<combo_box.item name="Residential" label="Residencial"/>
+				<combo_box.item name="Shopping" label="Compras"/>
+				<combo_box.item name="Other" label="Outros"/>
 			</combo_box>
 			<button label="?" label_selected="?" left="426" name="?"/>
 			<check_box name="MatureCheck" />
@@ -310,15 +286,9 @@ Vá para o menu Mundo &gt; Sobre a Terra ou selecione outro lote para mostrar se
 				Rota de Tele-transporte:
 			</text>
 			<combo_box left="140" name="landing type" tool_tip="Rota de Teletransporte -- Selecione como tratar os tele-transportes no seu lote." width="140">
-				<combo_item length="1" name="Blocked" type="string">
-					Bloqueado
-				</combo_item>
-				<combo_item length="1" name="LandingPoint" type="string">
-					Ponto de Aterrissagem
-				</combo_item>
-				<combo_item length="1" name="Anywhere" type="string">
-					Qualquer lugar
-				</combo_item>
+				<combo_box.item length="1" name="Blocked" type="string" label="Bloqueado"/>
+				<combo_box.item length="1" name="LandingPoint" type="string" label="Ponto de Aterrissagem"/>
+				<combo_box.item length="1" name="Anywhere" type="string" label="Qualquer lugar"/>
 			</combo_box>
 			<string name="push_restrict_text">
 				Sem Empurrar
@@ -406,12 +376,8 @@ Mídia:
 			<check_box label="Permitir Acesso do Grupo: [GROUP]" name="GroupCheck" tool_tip="Definir grupo na aba Geral."/>
 			<check_box label="Vender passes para:" name="PassCheck" tool_tip="Permite acesso temporário a este terreno"/>
 			<combo_box name="pass_combo">
-				<combo_item name="Anyone">
-					Qualquer um
-				</combo_item>
-				<combo_item name="Group">
-					Grupo
-				</combo_item>
+				<combo_box.item name="Anyone" label="Qualquer um"/>
+				<combo_box.item name="Group" label="Grupo"/>
 			</combo_box>
 			<spinner label="Preço em L$:" name="PriceSpin"/>
 			<spinner label="Horas de Acesso:" name="HoursSpin"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_animation_preview.xml b/indra/newview/skins/default/xui/pt/floater_animation_preview.xml
index 405a6f28a4..f6bc034665 100644
--- a/indra/newview/skins/default/xui/pt/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/pt/floater_animation_preview.xml
@@ -14,127 +14,53 @@
 		Pose de Mão
 	</text>
 	<combo_box label="" name="hand_pose_combo" tool_tip="Controla o que as mãos fazem durante a animação">
-		<combo_box.item name="Spread">
-			Espreguiçar
-		</combo_box.item>
-		<combo_box.item name="Relaxed">
-			Relaxado
-		</combo_box.item>
-		<combo_box.item name="PointBoth">
-			Apontar Ambos
-		</combo_box.item>
-		<combo_box.item name="Fist">
-			Punho
-		</combo_box.item>
-		<combo_box.item name="RelaxedLeft">
-			Relaxado para Esquerda
-		</combo_box.item>
-		<combo_box.item name="PointLeft">
-			Apontar à Esquerda
-		</combo_box.item>
-		<combo_box.item name="FistLeft">
-			Punho Esquerdo
-		</combo_box.item>
-		<combo_box.item name="RelaxedRight">
-			Relaxado para Direita
-		</combo_box.item>
-		<combo_box.item name="PointRight">
-			Apontar à Direita
-		</combo_box.item>
-		<combo_box.item name="FistRight">
-			Punho Direito
-		</combo_box.item>
-		<combo_box.item name="SaluteRight">
-			Saudar à Direita
-		</combo_box.item>
-		<combo_box.item name="Typing">
-			Digitando
-		</combo_box.item>
-		<combo_box.item name="PeaceRight">
-			Pacífico à Direita
-		</combo_box.item>
+		<combo_box.item name="Spread" label="Espreguiçar" />
+		<combo_box.item name="Relaxed" label="Relaxado" />
+		<combo_box.item name="PointBoth" label="Apontar Ambos" />
+		<combo_box.item name="Fist" label="Punho" />
+		<combo_box.item name="RelaxedLeft" label="Relaxado para Esquerda" />
+		<combo_box.item name="PointLeft" label="Apontar à Esquerda" />
+		<combo_box.item name="FistLeft" label="Punho Esquerdo" />
+		<combo_box.item name="RelaxedRight" label="Relaxado para Direita" />
+		<combo_box.item name="PointRight" label="Apontar à Direita" />
+		<combo_box.item name="FistRight" label="Punho Direito" />
+		<combo_box.item name="SaluteRight" label="Saudar à Direita" />
+		<combo_box.item name="Typing" label="Digitando" />
+		<combo_box.item name="PeaceRight" label="Pacífico à Direita" />
 	</combo_box>
 	<text name="emote_label">
 		Expressão
 	</text>
 	<combo_box label="" name="emote_combo" tool_tip="Controla o que a face faz durante a animação.">
-		<combo_box.item name="[None]">
-			[None]
-		</combo_box.item>
-		<combo_box.item name="Aaaaah">
-			Aaaaah
-		</combo_box.item>
-		<combo_box.item name="Afraid">
-			Temeroso
-		</combo_box.item>
-		<combo_box.item name="Angry">
-			Raivoso
-		</combo_box.item>
-		<combo_box.item name="BigSmile">
-			Sorrisão
-		</combo_box.item>
-		<combo_box.item name="Bored">
-			Entediado
-		</combo_box.item>
-		<combo_box.item name="Cry">
-			Chorar
-		</combo_box.item>
-		<combo_box.item name="Disdain">
-			Desprezar
-		</combo_box.item>
-		<combo_box.item name="Embarrassed">
-			Envergonhado
-		</combo_box.item>
-		<combo_box.item name="Frown">
-			Franzir a testa
-		</combo_box.item>
-		<combo_box.item name="Kiss">
-			Beijar
-		</combo_box.item>
-		<combo_box.item name="Laugh">
-			Rir
-		</combo_box.item>
-		<combo_box.item name="Plllppt">
-			Plllppt
-		</combo_box.item>
-		<combo_box.item name="Repulsed">
-			Enojado
-		</combo_box.item>
-		<combo_box.item name="Sad">
-			Triste
-		</combo_box.item>
-		<combo_box.item name="Shrug">
-			Indiferença
-		</combo_box.item>
-		<combo_box.item name="Smile">
-			Sorriso
-		</combo_box.item>
-		<combo_box.item name="Surprise">
-			Surpreso
-		</combo_box.item>
-		<combo_box.item name="Wink">
-			Piscar
-		</combo_box.item>
-		<combo_box.item name="Worry">
-			Preocupado
-		</combo_box.item>
+		<combo_box.item name="[None]" label="None]" />
+		<combo_box.item name="Aaaaah" label="Aaaaah" />
+		<combo_box.item name="Afraid" label="Temeroso" />
+		<combo_box.item name="Angry" label="Raivoso" />
+		<combo_box.item name="BigSmile" label="Sorrisão" />
+		<combo_box.item name="Bored" label="Entediado" />
+		<combo_box.item name="Cry" label="Chorar" />
+		<combo_box.item name="Disdain" label="Desprezar" />
+		<combo_box.item name="Embarrassed" label="Envergonhado" />
+		<combo_box.item name="Frown" label="Franzir a testa" />
+		<combo_box.item name="Kiss" label="Beijar" />
+		<combo_box.item name="Laugh" label="Rir" />
+		<combo_box.item name="Plllppt" label="Plllppt" />
+		<combo_box.item name="Repulsed" label="Enojado" />
+		<combo_box.item name="Sad" label="Triste" />
+		<combo_box.item name="Shrug" label="Indiferença" />
+		<combo_box.item name="Smile" label="Sorriso" />
+		<combo_box.item name="Surprise" label="Surpreso" />
+		<combo_box.item name="Wink" label="Piscar" />
+		<combo_box.item name="Worry" label="Preocupado" />
 	</combo_box>
 	<text name="preview_label">
 		Prever enquanto
 	</text>
 	<combo_box label="" name="preview_base_anim" tool_tip="Use isto para testar o comportamento de sua animação enquanto seu avatar executa ações comuns.">
-		<combo_box.item name="Standing">
-			Parado
-		</combo_box.item>
-		<combo_box.item name="Walking">
-			Andando
-		</combo_box.item>
-		<combo_box.item name="Sitting">
-			Sentando
-		</combo_box.item>
-		<combo_box.item name="Flying">
-			Voando
-		</combo_box.item>
+		<combo_box.item name="Standing" label="Parado" />
+		<combo_box.item name="Walking" label="Andando" />
+		<combo_box.item name="Sitting" label="Sentando" />
+		<combo_box.item name="Flying" label="Voando" />
 	</combo_box>
 	<spinner label="Facilitar a entrada (sec)" name="ease_in_time" tool_tip="Quantidade de tempo (em segundos) para que as animações se mesclem."/>
 	<spinner label="Facilitar a saída (sec)" name="ease_out_time" tool_tip="Quantidade de tempo (em segundos) para que a animações se mesclem."/>
diff --git a/indra/newview/skins/default/xui/pt/floater_buy_land.xml b/indra/newview/skins/default/xui/pt/floater_buy_land.xml
index e9711dc364..396996edb0 100644
--- a/indra/newview/skins/default/xui/pt/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/pt/floater_buy_land.xml
@@ -66,15 +66,9 @@
 		Somente membros Premium podem possuir terra.
 	</text>
 	<combo_box name="account_level">
-		<combo_box.item name="US$9.95/month,billedmonthly">
-			US$9.95/mês, debitado mensalmente
-		</combo_box.item>
-		<combo_box.item name="US$7.50/month,billedquarterly">
-			US$7.50/mês, debitado trimestralmente
-		</combo_box.item>
-		<combo_box.item name="US$6.00/month,billedannually">
-			US$6.00/mês, debitado anualmente
-		</combo_box.item>
+		<combo_box.item name="US$9.95/month,billedmonthly" label="US$9.95/mês, debitado mensalmente" />
+		<combo_box.item name="US$7.50/month,billedquarterly" label="US$7.50/mês, debitado trimestralmente" />
+		<combo_box.item name="US$6.00/month,billedannually" label="US$6.00/mês, debitado anualmente" />
 	</combo_box>
 	<text name="land_use_action">
 		Aumente sua taxa de locação de terra para US$ 40/mês.
diff --git a/indra/newview/skins/default/xui/pt/floater_god_tools.xml b/indra/newview/skins/default/xui/pt/floater_god_tools.xml
index 27dad15215..6b88db1d9c 100644
--- a/indra/newview/skins/default/xui/pt/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/pt/floater_god_tools.xml
@@ -73,29 +73,17 @@
 				Destino:
 			</text>
 			<combo_box name="destination">
-				<combo_box.item name="Selection">
-					Seleção
-				</combo_box.item>
-				<combo_box.item name="AgentRegion">
-					Região do Agente
-				</combo_box.item>
+				<combo_box.item name="Selection" label="Seleção" />
+				<combo_box.item name="AgentRegion" label="Região do Agente" />
 			</combo_box>
 			<text name="Request:">
 				Requisição:
 			</text>
 			<combo_box name="request">
-				<combo_box.item name="colliders&lt;steps&gt;">
-					Passos de Colisão
-				</combo_box.item>
-				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;">
-					Contagem de scripts, padrão opcional
-				</combo_box.item>
-				<combo_box.item name="objects&lt;pattern&gt;">
-					Padrão de Objetos
-				</combo_box.item>
-				<combo_box.item name="rez&lt;asset_id&gt;">
-					rez &lt;asset_id&gt;
-				</combo_box.item>
+				<combo_box.item name="colliders&lt;steps&gt;" label="Passos de Colisão" />
+				<combo_box.item name="scripts&lt;count&gt;,&lt;optionalpattern&gt;" label="Contagem de scripts, padrão opcional" />
+				<combo_box.item name="objects&lt;pattern&gt;" label="Padrão de Objetos" />
+				<combo_box.item name="rez&lt;asset_id&gt;" label="rez &lt;asset_id&gt;" />
 			</combo_box>
 			<text name="Parameter:">
 				Parametro:
diff --git a/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml b/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml
index 10ed0339a3..0f9c1fd487 100644
--- a/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml
@@ -8,21 +8,11 @@
 		Suavização:
 	</text>
 	<combo_box label="Suavização" name="fsaa" width="94">
-		<combo_item name="FSAADisabled">
-			Desabilitado
-		</combo_item>
-		<combo_item name="2x">
-			2x
-		</combo_item>
-		<combo_item name="4x">
-			4x
-		</combo_item>
-		<combo_item name="8x">
-			8x
-		</combo_item>
-		<combo_item name="16x">
-			16x
-		</combo_item>
+		<combo_box.item name="FSAADisabled" label="Desabilitado"/>
+		<combo_box.item name="2x" label="2x"/>
+		<combo_box.item name="4x" label="4x"/>
+		<combo_box.item name="8x" label="8x"/>
+		<combo_box.item name="16x" label="16x"/>
 	</combo_box>
 	<spinner label="Gama:" name="gamma"/>
 	<text name="(brightness, lower is brighter)">
diff --git a/indra/newview/skins/default/xui/pt/floater_image_preview.xml b/indra/newview/skins/default/xui/pt/floater_image_preview.xml
index f1192e860b..b32f153147 100644
--- a/indra/newview/skins/default/xui/pt/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/pt/floater_image_preview.xml
@@ -10,36 +10,16 @@
 		Prévia da Imagem como:
 	</text>
 	<combo_box label="Tipo de Roupas" name="clothing_type_combo">
-		<combo_box.item name="Image">
-			Imagem
-		</combo_box.item>
-		<combo_box.item name="Hair">
-			Cabelo
-		</combo_box.item>
-		<combo_box.item name="FemaleHead">
-			Cabeça Feminina
-		</combo_box.item>
-		<combo_box.item name="FemaleUpperBody">
-			Parte Superior do Corpo Feminino
-		</combo_box.item>
-		<combo_box.item name="FemaleLowerBody">
-			Parte Inferior do Corpo Feminino
-		</combo_box.item>
-		<combo_box.item name="MaleHead">
-			Cabeça Masculina
-		</combo_box.item>
-		<combo_box.item name="MaleUpperBody">
-			Parte Superior do Corpo Masculino
-		</combo_box.item>
-		<combo_box.item name="MaleLowerBody">
-			Parte Inferiro do Corpo Masculino
-		</combo_box.item>
-		<combo_box.item name="Skirt">
-			Saia
-		</combo_box.item>
-		<combo_box.item name="SculptedPrim">
-			Primitiva Esculpida
-		</combo_box.item>
+		<combo_box.item name="Image" label="Imagem" />
+		<combo_box.item name="Hair" label="Cabelo" />
+		<combo_box.item name="FemaleHead" label="Cabeça Feminina" />
+		<combo_box.item name="FemaleUpperBody" label="Parte Superior do Corpo Feminino" />
+		<combo_box.item name="FemaleLowerBody" label="Parte Inferior do Corpo Feminino" />
+		<combo_box.item name="MaleHead" label="Cabeça Masculina" />
+		<combo_box.item name="MaleUpperBody" label="Parte Superior do Corpo Masculino" />
+		<combo_box.item name="MaleLowerBody" label="Parte Inferiro do Corpo Masculino" />
+		<combo_box.item name="Skirt" label="Saia" />
+		<combo_box.item name="SculptedPrim" label="Primitiva Esculpida" />
 	</combo_box>
 	<text name="bad_image_text">
 		Incapaz de ler a imagem.
diff --git a/indra/newview/skins/default/xui/pt/floater_report_abuse.xml b/indra/newview/skins/default/xui/pt/floater_report_abuse.xml
index 9fc694fb6a..f7a9c19d92 100644
--- a/indra/newview/skins/default/xui/pt/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/pt/floater_report_abuse.xml
@@ -36,123 +36,51 @@
 		Hendrerit Vulputate
 	</text>
 	<combo_box name="category_combo" tool_tip="Categoria -- Selecione a categoria que melhor descreve este report">
-		<combo_item name="Select_category">
-			Selecionar categoria
-		</combo_item>
-		<combo_item name="Age__Age_play">
-			Idade &gt; Idade no jogo
-		</combo_item>
-		<combo_item name="Age__Adult_resident_on_Teen_Second_Life">
-			Idade &gt; Residente adulto no Second Life Jovem
-		</combo_item>
+		<combo_box.item name="Select_category" label="Selecionar categoria"/>
+		<combo_box.item name="Age__Age_play" label="Idade &gt; Idade no jogo"/>
+		<combo_box.item name="Age__Adult_resident_on_Teen_Second_Life" label="Idade &gt; Residente adulto no Second Life Jovem"/>
 		
 		
 		
-		<combo_item name="Assault__Combat_sandbox___unsafe_area">
-			Assalto &gt; Sandbox de combate / área não segura
-		</combo_item>
-		<combo_item name="Assault__Safe_area">
-			Assalto &gt; Área segura
-		</combo_item>
-		<combo_item name="Assault__Weapons_testing_sandbox">
-			Assalto &gt; Testando armas em sandbox
-		</combo_item>
-		<combo_item name="Commerce__Failure_to_deliver_product_or_service">
-			Comércio &gt; Falha em enviar produto ou serviço
-		</combo_item>
-		<combo_item name="Disclosure__Real_world_information">
-			Revelar &gt; Informação do mundo real
-		</combo_item>
-		<combo_item name="Disclosure__Remotely_monitoring chat">
-			Revelar &gt; Conversa monitorada remotamente
-		</combo_item>
-		<combo_item name="Disclosure__Second_Life_information_chat_IMs">
-			Revelar &gt; Informação do Second Life/conversa/MIs
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unfair_use_of_region_resources">
-			Distúrbio da paz &gt; Uso injusto dos recursos da região
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Excessive_scripted_objects">
-			Distúrbio da paz  &gt; Objetos com excesso de scripts
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Object_littering">
-			Distúrbio da paz  &gt; Objeto despejando lixo
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Repetitive_spam">
-			Distúrbio da paz &gt; Spam repetitivo
-		</combo_item>
-		<combo_item name="Disturbing_the_peace__Unwanted_advert_spam">
-			Distúrbio da paz &gt; Spam de anúncio indesejado
-		</combo_item>
-		<combo_item name="Fraud__L$">
-			Fraude &gt; L$
-		</combo_item>
-		<combo_item name="Fraud__Land">
-			Fraude &gt; Terra
-		</combo_item>
-		<combo_item name="Fraud__Pyramid_scheme_or_chain_letter">
-			Fraude &gt; Esquema de pirâmide ou cartas encadeadas
-		</combo_item>
-		<combo_item name="Fraud__US$">
-			Fraude &gt; R$
-		</combo_item>
-		<combo_item name="Harassment__Advert_farms___visual_spam">
-			Perturbação &gt; Fazendas de Anúncios / spam visual
-		</combo_item>
-		<combo_item name="Harassment__Defaming_individuals_or_groups">
-			Perturbação &gt; Difamação de indivíduos ou grupos
-		</combo_item>
-		<combo_item name="Harassment__Impeding_movement">
-			Perturbação &gt; Impedindo movimentos
-		</combo_item>
-		<combo_item name="Harassment__Sexual_harassment">
-			Perturbação &gt; Perturbação sexual
-		</combo_item>
-		<combo_item name="Harassment__Solicting_inciting_others_to_violate_ToS">
-			Perturbação &gt; Solicitando/incitando outros a violarem o ToS
-		</combo_item>
-		<combo_item name="Harassment__Verbal_abuse">
-			Perturbação &gt; Abuso verbal
-		</combo_item>
-		<combo_item name="Indecency__Broadly_offensive_content_or_conduct">
-			Indecência &gt; Conteúdo ou conduta amplamente ofensivos
-		</combo_item>
+		<combo_box.item name="Assault__Combat_sandbox___unsafe_area" label="Assalto &gt; Sandbox de combate / área não segura"/>
+		<combo_box.item name="Assault__Safe_area" label="Assalto &gt; Área segura"/>
+		<combo_box.item name="Assault__Weapons_testing_sandbox" label="Assalto &gt; Testando armas em sandbox"/>
+		<combo_box.item name="Commerce__Failure_to_deliver_product_or_service" label="Comércio &gt; Falha em enviar produto ou serviço"/>
+		<combo_box.item name="Disclosure__Real_world_information" label="Revelar &gt; Informação do mundo real"/>
+		<combo_box.item name="Disclosure__Remotely_monitoring chat" label="Revelar &gt; Conversa monitorada remotamente"/>
+		<combo_box.item name="Disclosure__Second_Life_information_chat_IMs" label="Revelar &gt; Informação do Second Life/conversa/MIs"/>
+		<combo_box.item name="Disturbing_the_peace__Unfair_use_of_region_resources" label="Distúrbio da paz &gt; Uso injusto dos recursos da região"/>
+		<combo_box.item name="Disturbing_the_peace__Excessive_scripted_objects" label="Distúrbio da paz  &gt; Objetos com excesso de scripts"/>
+		<combo_box.item name="Disturbing_the_peace__Object_littering" label="Distúrbio da paz  &gt; Objeto despejando lixo"/>
+		<combo_box.item name="Disturbing_the_peace__Repetitive_spam" label="Distúrbio da paz &gt; Spam repetitivo"/>
+		<combo_box.item name="Disturbing_the_peace__Unwanted_advert_spam" label="Distúrbio da paz &gt; Spam de anúncio indesejado"/>
+		<combo_box.item name="Fraud__L$" label="Fraude &gt; L$"/>
+		<combo_box.item name="Fraud__Land" label="Fraude &gt; Terra"/>
+		<combo_box.item name="Fraud__Pyramid_scheme_or_chain_letter" label="Fraude &gt; Esquema de pirâmide ou cartas encadeadas"/>
+		<combo_box.item name="Fraud__US$" label="Fraude &gt; R$"/>
+		<combo_box.item name="Harassment__Advert_farms___visual_spam" label="Perturbação &gt; Fazendas de Anúncios / spam visual"/>
+		<combo_box.item name="Harassment__Defaming_individuals_or_groups" label="Perturbação &gt; Difamação de indivíduos ou grupos"/>
+		<combo_box.item name="Harassment__Impeding_movement" label="Perturbação &gt; Impedindo movimentos"/>
+		<combo_box.item name="Harassment__Sexual_harassment" label="Perturbação &gt; Perturbação sexual"/>
+		<combo_box.item name="Harassment__Solicting_inciting_others_to_violate_ToS" label="Perturbação &gt; Solicitando/incitando outros a violarem o ToS"/>
+		<combo_box.item name="Harassment__Verbal_abuse" label="Perturbação &gt; Abuso verbal"/>
+		<combo_box.item name="Indecency__Broadly_offensive_content_or_conduct" label="Indecência &gt; Conteúdo ou conduta amplamente ofensivos"/>
 		
 		
 		
-		<combo_item name="Indecency__Inappropriate_avatar_name">
-			Indecência &gt; Nome de avatar inapropriado
-		</combo_item>
+		<combo_box.item name="Indecency__Inappropriate_avatar_name" label="Indecência &gt; Nome de avatar inapropriado"/>
 		
 		
 		
-		<combo_item name="Intellectual_property_infringement_Content_Removal">
-			Violação de propriedade intelectual &gt; Remoção de Conteúdo
-		</combo_item>
-		<combo_item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit">
-			Violação de Propriedade intelectual  &gt; Cópia Ilegal ou  Aproveitar-se de Permissões
-		</combo_item>
-		<combo_item name="Intolerance">
-			Intolerância
-		</combo_item>
-		<combo_item name="Land__Abuse_of_sandbox_resources">
-			Terra &gt; Abuso dos recursos da sandbox
-		</combo_item>
-		<combo_item name="Land__Encroachment__Objects_textures">
-			Terra &gt; Invasão &gt; Objetos/texturas
-		</combo_item>
-		<combo_item name="Land__Encroachment__Particles">
-			Terra &gt; Invasão &gt; Partículas
-		</combo_item>
-		<combo_item name="Land__Encroachment__Trees_plants">
-			Terra &gt; Violação &gt; Árvores/plantas
-		</combo_item>
-		<combo_item name="Wagering_gambling">
-			Apostas/jogos de azar
-		</combo_item>
-		<combo_item name="Other">
-			Outro
-		</combo_item>
+		<combo_box.item name="Intellectual_property_infringement_Content_Removal" label="Violação de propriedade intelectual &gt; Remoção de Conteúdo"/>
+		<combo_box.item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit" label="Violação de Propriedade intelectual  &gt; Cópia Ilegal ou  Aproveitar-se de Permissões"/>
+		<combo_box.item name="Intolerance" label="Intolerância"/>
+		<combo_box.item name="Land__Abuse_of_sandbox_resources" label="Terra &gt; Abuso dos recursos da sandbox"/>
+		<combo_box.item name="Land__Encroachment__Objects_textures" label="Terra &gt; Invasão &gt; Objetos/texturas"/>
+		<combo_box.item name="Land__Encroachment__Particles" label="Terra &gt; Invasão &gt; Partículas"/>
+		<combo_box.item name="Land__Encroachment__Trees_plants" label="Terra &gt; Violação &gt; Árvores/plantas"/>
+		<combo_box.item name="Wagering_gambling" label="Apostas/jogos de azar"/>
+		<combo_box.item name="Other" label="Outro"/>
 	</combo_box>
 	<text name="abuser_name_title">
 		Nome do Denunciado:
diff --git a/indra/newview/skins/default/xui/pt/floater_sell_land.xml b/indra/newview/skins/default/xui/pt/floater_sell_land.xml
index c3461b7d52..221145079b 100644
--- a/indra/newview/skins/default/xui/pt/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/pt/floater_sell_land.xml
@@ -34,15 +34,9 @@
 		Escolha se venderá para qualquer um ou para um comprador em particular.
 	</text>
 	<combo_box name="sell_to">
-		<combo_box.item name="--selectone--">
-			-- Selecione um --
-		</combo_box.item>
-		<combo_box.item name="Anyone">
-			Qualquer um
-		</combo_box.item>
-		<combo_box.item name="Specificuser:">
-			Usuário Específico:
-		</combo_box.item>
+		<combo_box.item name="--selectone--" label="Selecione um --" />
+		<combo_box.item name="Anyone" label="Qualquer um" />
+		<combo_box.item name="Specificuser:" label="Usuário Específico:" />
 	</combo_box>
 	<button label="Selecione..." name="sell_to_select_agent"/>
 	<text name="sell_objects_label">
diff --git a/indra/newview/skins/default/xui/pt/floater_settings_debug.xml b/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
index e0c189568a..f7b468bb22 100644
--- a/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater name="settings_debug" title="Configurações de Debug">
 	<combo_box name="boolean_combo">
-		<combo_box.item name="TRUE">
-			VERDADEIRO
-		</combo_box.item>
-		<combo_box.item name="FALSE">
-			FALSO
-		</combo_box.item>
+		<combo_box.item name="TRUE" label="VERDADEIRO" />
+		<combo_box.item name="FALSE" label="FALSO" />
 	</combo_box>
 	<color_swatch label="Cor" name="color_swatch"/>
 	<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_snapshot.xml b/indra/newview/skins/default/xui/pt/floater_snapshot.xml
index 067a4a71f3..641ee332fc 100644
--- a/indra/newview/skins/default/xui/pt/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/pt/floater_snapshot.xml
@@ -38,75 +38,33 @@
 		Formato
 	</text>
 	<combo_box label="Resolução" name="postcard_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Janela Atual
-		</combo_box.item>
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Customizado
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Janela Atual" />
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="1024x768" label="1024x768" />
+		<combo_box.item name="Custom" label="Customizado" />
 	</combo_box>
 	<combo_box label="Resolução" name="texture_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Janela Atual
-		</combo_box.item>
-		<combo_box.item name="Small(128x128)">
-			Pequeno (128x128)
-		</combo_box.item>
-		<combo_box.item name="Medium(256x256)">
-			Médio (256x256)
-		</combo_box.item>
-		<combo_box.item name="Large(512x512)">
-			Grande (512x512)
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Customizado
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Janela Atual" />
+		<combo_box.item name="Small(128x128)" label="Pequeno (128x128)" />
+		<combo_box.item name="Medium(256x256)" label="Médio (256x256)" />
+		<combo_box.item name="Large(512x512)" label="Grande (512x512)" />
+		<combo_box.item name="Custom" label="Customizado" />
 	</combo_box>
 	<combo_box label="Resolução" name="local_size_combo">
-		<combo_box.item name="CurrentWindow">
-			Janela Atual
-		</combo_box.item>
-		<combo_box.item name="320x240">
-			320x240
-		</combo_box.item>
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
-		<combo_box.item name="1280x1024">
-			1280x1024
-		</combo_box.item>
-		<combo_box.item name="1600x1200">
-			1600x1200
-		</combo_box.item>
-		<combo_box.item name="Custom">
-			Customizado
-		</combo_box.item>
+		<combo_box.item name="CurrentWindow" label="Janela Atual" />
+		<combo_box.item name="320x240" label="320x240" />
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="1024x768" label="1024x768" />
+		<combo_box.item name="1280x1024" label="1280x1024" />
+		<combo_box.item name="1600x1200" label="1600x1200" />
+		<combo_box.item name="Custom" label="Customizado" />
 	</combo_box>
 	<combo_box label="Formato" name="local_format_combo">
-		<combo_box.item name="PNG">
-			PNG
-		</combo_box.item>
-		<combo_box.item name="JPEG">
-			JPEG
-		</combo_box.item>
-		<combo_box.item name="BMP">
-			BMP
-		</combo_box.item>
+		<combo_box.item name="PNG" label="PNG" />
+		<combo_box.item name="JPEG" label="JPEG" />
+		<combo_box.item name="BMP" label="BMP" />
 	</combo_box>
 	<spinner label="Largura" name="snapshot_width"/>
 	<spinner label="Altura" name="snapshot_height"/>
@@ -116,15 +74,9 @@
 		Capturar:
 	</text>
 	<combo_box label="Camadas da Imagem" name="layer_types">
-		<combo_box.item name="Colors">
-			Cores
-		</combo_box.item>
-		<combo_box.item name="Depth">
-			Formato
-		</combo_box.item>
-		<combo_box.item name="ObjectMattes">
-			Decoração do Objeto
-		</combo_box.item>
+		<combo_box.item name="Colors" label="Cores" />
+		<combo_box.item name="Depth" label="Formato" />
+		<combo_box.item name="ObjectMattes" label="Decoração do Objeto" />
 	</combo_box>
 	<check_box label="Mostrar interface na Foto" name="ui_check"/>
 	<check_box label="Mostrar Objetos HUD na Foto" name="hud_check"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_tools.xml b/indra/newview/skins/default/xui/pt/floater_tools.xml
index 838c7965ea..d9b1e342d9 100644
--- a/indra/newview/skins/default/xui/pt/floater_tools.xml
+++ b/indra/newview/skins/default/xui/pt/floater_tools.xml
@@ -20,15 +20,9 @@
 		Modo da régua:
 	</text>
 	<combo_box name="combobox grid mode">
-		<combo_item name="World">
-			Mundo
-		</combo_item>
-		<combo_item name="Local">
-			Local
-		</combo_item>
-		<combo_item name="Reference">
-			Referência
-		</combo_item>
+		<combo_box.item name="World" label="Mundo"/>
+		<combo_box.item name="Local" label="Local"/>
+		<combo_box.item name="Reference" label="Referência"/>
 	</combo_box>
 	<check_box label="Esticar ambos os lados" name="checkbox uniform"/>
 	<check_box label="Esticar Texturas" name="checkbox stretch textures"/>
@@ -64,15 +58,9 @@
 	<check_box label="Terreno Rígido" name="radio noise"/>
 	<check_box label="Reverter Terra" name="radio revert"/>
 	<combo_box name="combobox brush size">
-		<combo_item name="Small">
-			Pequeno
-		</combo_item>
-		<combo_item name="Medium">
-			Médio
-		</combo_item>
-		<combo_item name="Large">
-			Grande
-		</combo_item>
+		<combo_box.item name="Small" label="Pequeno"/>
+		<combo_box.item name="Medium" label="Médio"/>
+		<combo_box.item name="Large" label="Grande"/>
 	</combo_box>
 	<text name="Strength:">
 		Força:
@@ -155,27 +143,13 @@
 				Quando clicado com o botão esquerdo:
 			</text>
 			<combo_box name="clickaction">
-				<combo_item name="Touch/grab(default)">
-					Tocar/Pegar (padrão)
-				</combo_item>
-				<combo_item name="Sitonobject">
-					Sentar no objeto
-				</combo_item>
-				<combo_item name="Buyobject">
-					Comprar objeto
-				</combo_item>
-				<combo_item name="Payobject">
-					Pagar Objeto
-				</combo_item>
-				<combo_item name="Open">
-					Abrir
-				</combo_item>
-				<combo_item name="Play">
-					Executar a mídia do lote
-				</combo_item>
-				<combo_item name="Opemmedia">
-					Abrir a mídia do lote
-				</combo_item>
+				<combo_box.item name="Touch/grab(default)" label="Tocar/Pegar (padrão)"/>
+				<combo_box.item name="Sitonobject" label="Sentar no objeto"/>
+				<combo_box.item name="Buyobject" label="Comprar objeto"/>
+				<combo_box.item name="Payobject" label="Pagar Objeto"/>
+				<combo_box.item name="Open" label="Abrir"/>
+				<combo_box.item name="Play" label="Executar a mídia do lote"/>
+				<combo_box.item name="Opemmedia" label="Abrir a mídia do lote"/>
 			</combo_box>
 			<text name="B:">
 				B:
@@ -259,56 +233,26 @@
 				Material
 			</text>
 			<combo_box name="material">
-				<combo_item name="Stone">
-					Pedra
-				</combo_item>
-				<combo_item name="Metal">
-					Metal
-				</combo_item>
-				<combo_item name="Glass">
-					Vidro
-				</combo_item>
-				<combo_item name="Wood">
-					Madeira
-				</combo_item>
-				<combo_item name="Flesh">
-					Carne
-				</combo_item>
-				<combo_item name="Plastic">
-					Plástico
-				</combo_item>
-				<combo_item name="Rubber">
-					Couro
-				</combo_item>
+				<combo_box.item name="Stone" label="Pedra"/>
+				<combo_box.item name="Metal" label="Metal"/>
+				<combo_box.item name="Glass" label="Vidro"/>
+				<combo_box.item name="Wood" label="Madeira"/>
+				<combo_box.item name="Flesh" label="Carne"/>
+				<combo_box.item name="Plastic" label="Plástico"/>
+				<combo_box.item name="Rubber" label="Couro"/>
 			</combo_box>
 			<text name="label basetype">
 				Forma básica
 			</text>
 			<combo_box name="comboBaseType">
-				<combo_item name="Box">
-					Caixa
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilindro
-				</combo_item>
-				<combo_item name="Prism">
-					Prisma
-				</combo_item>
-				<combo_item name="Sphere">
-					Esfera
-				</combo_item>
-				<combo_item name="Torus">
-					Toróide
-				</combo_item>
-				<combo_item name="Tube">
-					Tubo
-				</combo_item>
-				<combo_item name="Ring">
-					Anel
-				</combo_item>
-				<combo_item name="Sculpted">
-					Esculpida
-				</combo_item>
+				<combo_box.item name="Box" label="Caixa"/>
+				<combo_box.item name="Cylinder" label="Cilindro"/>
+				<combo_box.item name="Prism" label="Prisma"/>
+				<combo_box.item name="Sphere" label="Esfera"/>
+				<combo_box.item name="Torus" label="Toróide"/>
+				<combo_box.item name="Tube" label="Tubo"/>
+				<combo_box.item name="Ring" label="Anel"/>
+				<combo_box.item name="Sculpted" label="Esculpida"/>
 			</combo_box>
 			<text name="text cut">
 				Recorte inicial e final
@@ -325,18 +269,10 @@
 				Forma Vazia
 			</text>
 			<combo_box name="hole">
-				<combo_item name="Default">
-					Padrão
-				</combo_item>
-				<combo_item name="Circle">
-					Circulo
-				</combo_item>
-				<combo_item name="Square">
-					Quadrado
-				</combo_item>
-				<combo_item name="Triangle">
-					Triâgulo
-				</combo_item>
+				<combo_box.item name="Default" label="Padrão"/>
+				<combo_box.item name="Circle" label="Circulo"/>
+				<combo_box.item name="Square" label="Quadrado"/>
+				<combo_box.item name="Triangle" label="Triâgulo"/>
 			</combo_box>
 			<text name="text twist">
 				Torcer no Início e final
@@ -382,21 +318,11 @@
 				Tipo costura
 			</text>
 			<combo_box name="sculpt type control">
-				<combo_item name="None">
-					(nenhum)
-				</combo_item>
-				<combo_item name="Sphere">
-					Esfera
-				</combo_item>
-				<combo_item name="Torus">
-					Toróide
-				</combo_item>
-				<combo_item name="Plane">
-					Plano
-				</combo_item>
-				<combo_item name="Cylinder">
-					Cilindro
-				</combo_item>
+				<combo_box.item name="None" label="nenhum)"/>
+				<combo_box.item name="Sphere" label="Esfera"/>
+				<combo_box.item name="Torus" label="Toróide"/>
+				<combo_box.item name="Plane" label="Plano"/>
+				<combo_box.item name="Cylinder" label="Cilindro"/>
 			</combo_box>
 		</panel>
 		<panel label="Recursos" name="Features">
@@ -438,88 +364,40 @@
 				Mapeamento
 			</text>
 			<combo_box name="combobox texgen">
-				<combo_item name="Default">
-					Padrão
-				</combo_item>
-				<combo_item name="Planar">
-					Planar
-				</combo_item>
+				<combo_box.item name="Default" label="Padrão"/>
+				<combo_box.item name="Planar" label="Planar"/>
 			</combo_box>
 			<text name="label shininess">
 				Brilho
 			</text>
 			<combo_box name="combobox shininess">
-				<combo_item name="None">
-					Nenhum
-				</combo_item>
-				<combo_item name="Low">
-					Baixo
-				</combo_item>
-				<combo_item name="Medium">
-					Médio
-				</combo_item>
-				<combo_item name="High">
-					Alto
-				</combo_item>
+				<combo_box.item name="None" label="Nenhum"/>
+				<combo_box.item name="Low" label="Baixo"/>
+				<combo_box.item name="Medium" label="Médio"/>
+				<combo_box.item name="High" label="Alto"/>
 			</combo_box>
 			<text name="label bumpiness">
 				Ondulação
 			</text>
 			<combo_box name="combobox bumpiness">
-				<combo_item name="None">
-					Nenhum
-				</combo_item>
-				<combo_item name="Brightness">
-					Claridade
-				</combo_item>
-				<combo_item name="Darkness">
-					Escuridão
-				</combo_item>
-				<combo_item name="woodgrain">
-					Granulação
-				</combo_item>
-				<combo_item name="bark">
-					casca
-				</combo_item>
-				<combo_item name="bricks">
-					Tijolos
-				</combo_item>
-				<combo_item name="checker">
-					Caixa
-				</combo_item>
-				<combo_item name="concrete">
-					Concreto
-				</combo_item>
-				<combo_item name="crustytile">
-					Encaroçado
-				</combo_item>
-				<combo_item name="cutstone">
-					Pedra Cortante
-				</combo_item>
-				<combo_item name="discs">
-					Discos
-				</combo_item>
-				<combo_item name="gravel">
-					Cascalho
-				</combo_item>
-				<combo_item name="petridish">
-					Pedrisco
-				</combo_item>
-				<combo_item name="siding">
-					Revestimento
-				</combo_item>
-				<combo_item name="stonetile">
-					empedrado
-				</combo_item>
-				<combo_item name="stucco">
-					Grafiato
-				</combo_item>
-				<combo_item name="suction">
-					Sulcos
-				</combo_item>
-				<combo_item name="weave">
-					weave
-				</combo_item>
+				<combo_box.item name="None" label="Nenhum"/>
+				<combo_box.item name="Brightness" label="Claridade"/>
+				<combo_box.item name="Darkness" label="Escuridão"/>
+				<combo_box.item name="woodgrain" label="Granulação"/>
+				<combo_box.item name="bark" label="casca"/>
+				<combo_box.item name="bricks" label="Tijolos"/>
+				<combo_box.item name="checker" label="Caixa"/>
+				<combo_box.item name="concrete" label="Concreto"/>
+				<combo_box.item name="crustytile" label="Encaroçado"/>
+				<combo_box.item name="cutstone" label="Pedra Cortante"/>
+				<combo_box.item name="discs" label="Discos"/>
+				<combo_box.item name="gravel" label="Cascalho"/>
+				<combo_box.item name="petridish" label="Pedrisco"/>
+				<combo_box.item name="siding" label="Revestimento"/>
+				<combo_box.item name="stonetile" label="empedrado"/>
+				<combo_box.item name="stucco" label="Grafiato"/>
+				<combo_box.item name="suction" label="Sulcos"/>
+				<combo_box.item name="weave" label="weave"/>
 			</combo_box>
 			<text name="tex scale">
 				Repetir por Face
diff --git a/indra/newview/skins/default/xui/pt/floater_world_map.xml b/indra/newview/skins/default/xui/pt/floater_world_map.xml
index 24de146387..54ebdf2bb2 100644
--- a/indra/newview/skins/default/xui/pt/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/pt/floater_world_map.xml
@@ -34,14 +34,10 @@
 	</text>
 
 	<combo_box label="Amigos Conectados" name="friend combo" tool_tip="Amigos para mostrar no Mapa">
-		<combo_box.item name="none_selected">
-			Amigos Conectados
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Amigos Conectados" />
 	</combo_box>
 	<combo_box label="Landmarks" name="landmark combo" tool_tip="Landmark para mostrar no Mapa">
-		<combo_box.item name="none_selected">
-			Landmarks
-		</combo_box.item>
+		<combo_box.item name="none_selected" label="Landmarks" />
 	</combo_box>
 	<line_editor label="Procurar por nome de região" name="location" tool_tip="Digite o nome de uma Região"/>
 	<button label="Procurar" name="DoSearch" tool_tip="Procurar por região"/>
diff --git a/indra/newview/skins/default/xui/pt/panel_login.xml b/indra/newview/skins/default/xui/pt/panel_login.xml
index 5446875654..1612974716 100644
--- a/indra/newview/skins/default/xui/pt/panel_login.xml
+++ b/indra/newview/skins/default/xui/pt/panel_login.xml
@@ -13,15 +13,9 @@
 		Localização inicial:
 	</text>
 	<combo_box name="start_location_combo">
-		<combo_box.item name="MyHome">
-			Minha casa
-		</combo_box.item>
-		<combo_box.item name="MyLastLocation">
-			Minha última localização
-		</combo_box.item>
-		<combo_box.item name="Typeregionname">
-			&lt; Digite o nome da região;
-		</combo_box.item>
+		<combo_box.item name="MyHome" label="Minha casa" />
+		<combo_box.item name="MyLastLocation" label="Minha última localização" />
+		<combo_box.item name="Typeregionname" label="lt; Digite o nome da região;" />
 	</combo_box>
 	<check_box label="Lembrar senha" name="remember_check"/>
 	<button label="Entrar" label_selected="Entrar" name="connect_btn"/>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
index 28361d8ddf..4ad795ffc8 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
@@ -10,15 +10,9 @@
 	</radio_group>
 	<check_box label="Mostrar Posição Inicial na Tela de Login" name="show_location_checkbox"/>
 	<combo_box name="fade_out_combobox" width="166">
-		<combo_item name="Never">
-			Nunca
-		</combo_item>
-		<combo_item name="Show Temporarily">
-			Mostrar Temporariamente
-		</combo_item>
-		<combo_item name="Always">
-			Sempre
-		</combo_item>
+		<combo_box.item name="Never" label="Nunca"/>
+		<combo_box.item name="Show Temporarily" label="Mostrar Temporariamente"/>
+		<combo_box.item name="Always" label="Sempre"/>
 	</combo_box>
 	<check_box label="Avatar com Nomes Pequenos" name="small_avatar_names_checkbox"/>
 	<check_box label="Ocultar meu Nome na minha Tela" name="show_my_name_checkbox"/>
@@ -62,53 +56,23 @@
 		Digite o nome da Região
 	</string>
 	<combo_box name="crash_behavior_combobox" width="166">
-		<combo_item length="1" name="Askbeforesending" type="string">
-			Perguntar antes de enviar
-		</combo_item>
-		<combo_item length="1" name="Alwayssend" type="string">
-			Sempre enviar
-		</combo_item>
-		<combo_item length="1" name="Neversend" type="string">
-			Nunca Enviar
-		</combo_item>
+		<combo_box.item length="1" name="Askbeforesending" type="string" label="Perguntar antes de enviar"/>
+		<combo_box.item length="1" name="Alwayssend" type="string" label="Sempre enviar"/>
+		<combo_box.item length="1" name="Neversend" type="string" label="Nunca Enviar"/>
 	</combo_box>
 	<combo_box name="language_combobox" width="166">
-		<combo_item name="System Default Language">
-			Padrão do Sistema
-		</combo_item>
-		<combo_item name="English">
-			English (Inglês)
-		</combo_item>
-		<combo_item name="Danish">
-			Dansk (Dinamarquês) - Beta
-		</combo_item>
-		<combo_item name="Deutsch(German)">
-			Deutsch (Alemão) - Beta
-		</combo_item>
-		<combo_item name="Spanish">
-			Español (Espanhol) - Beta
-		</combo_item>
-		<combo_item name="French">
-			Français (Francês) - Beta
-		</combo_item>
-		<combo_item name="Hungarian">
-			Magyar (Húngaro) - Beta
-		</combo_item>
-		<combo_item name="Polish">
-			Polski (Polonês) - Beta
-		</combo_item>
-		<combo_item name="Portugese">
-			Português - Beta
-		</combo_item>
-		<combo_item name="Chinese">
-			中文 (简体) (Chinês) - Beta
-		</combo_item>
-		<combo_item name="(Japanese)">
-			日本語 (Japonês) - Beta
-		</combo_item>
-		<combo_item name="(Korean)">
-			한국어 (Coreano) - Beta
-		</combo_item>
+		<combo_box.item name="System Default Language" label="Padrão do Sistema"/>
+		<combo_box.item name="English" label="English (Inglês)"/>
+		<combo_box.item name="Danish" label="Dansk (Dinamarquês) - Beta"/>
+		<combo_box.item name="Deutsch(German)" label="Deutsch (Alemão) - Beta"/>
+		<combo_box.item name="Spanish" label="Español (Espanhol) - Beta"/>
+		<combo_box.item name="French" label="Français (Francês) - Beta"/>
+		<combo_box.item name="Hungarian" label="Magyar (Húngaro) - Beta"/>
+		<combo_box.item name="Polish" label="Polski (Polonês) - Beta"/>
+		<combo_box.item name="Portugese" label="Português - Beta"/>
+		<combo_box.item name="Chinese" label="中文 (简体) (Chinês) - Beta"/>
+		<combo_box.item name="(Japanese)" label="日本語 (Japonês) - Beta"/>
+		<combo_box.item name="(Korean)" label="한국어 (Coreano) - Beta"/>
 	</combo_box>
 	<check_box label="Compartilhar a linguagem com objetos" name="language_is_public" tool_tip="Isto permite que os objetos no mundo conheçam sua linguagem preferida."/>
 </panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml
index 5833956986..a14ad6d4de 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml
@@ -9,21 +9,11 @@
 		Tamanho da Janela:
 	</text>
 	<combo_box name="windowsize combo">
-		<combo_box.item name="640x480">
-			640x480
-		</combo_box.item>
-		<combo_box.item name="800x600">
-			800x600
-		</combo_box.item>
-		<combo_box.item name="720x480">
-			720x480 (NTSC)
-		</combo_box.item>
-		<combo_box.item name="768x576">
-			768x576 (PAL)
-		</combo_box.item>
-		<combo_box.item name="1024x768">
-			1024x768
-		</combo_box.item>
+		<combo_box.item name="640x480" label="640x480" />
+		<combo_box.item name="800x600" label="800x600" />
+		<combo_box.item name="720x480" label="720x480 (NTSC)" />
+		<combo_box.item name="768x576" label="768x576 (PAL)" />
+		<combo_box.item name="1024x768" label="1024x768" />
 	</combo_box>
 	<text name="DisplayResLabel">
 		Resolução de Display:
@@ -32,18 +22,10 @@
 		Relação de Aspecto:
 	</text>
 	<combo_box name="aspect_ratio" tool_tip="largura / altura">
-		<combo_box.item length="1" name="4:3(StandardCRT)" type="string">
-			4:3 (CRT Padrão)
-		</combo_box.item>
-		<combo_box.item length="1" name="5:4(1280x1024LCD)" type="string">
-			5:4 (1280x1024 LCD)
-		</combo_box.item>
-		<combo_box.item name="8:5(Widescreen)">
-			8:5 (tela ampla)
-		</combo_box.item>
-		<combo_box.item length="1" name="16:9(Widescreen)" type="string">
-			16:9 (tela ampla)
-		</combo_box.item>
+		<combo_box.item length="1" name="4:3(StandardCRT)" type="string" label="4:3 (CRT Padrão)" />
+		<combo_box.item length="1" name="5:4(1280x1024LCD)" type="string" label="5:4 (1280x1024 LCD)" />
+		<combo_box.item name="8:5(Widescreen)" label="8:5 (tela ampla)" />
+		<combo_box.item length="1" name="16:9(Widescreen)" type="string" label="16:9 (tela ampla)" />
 	</combo_box>
 	<check_box label="Auto-detectar a relação" name="aspect_auto_detect"/>
 	<text name="HigherText">
-- 
cgit v1.2.3


From 5da967dc744f35d5270c7cb0b8b23b993ecda3e1 Mon Sep 17 00:00:00 2001
From: Steven Bennetts <steve@lindenlab.com>
Date: Fri, 8 May 2009 07:58:49 +0000
Subject: merge skinning-7 -r 119501-119577 -> viewer-2.0.0-1  *NOTE: This
 overlaps a little with the skinning-7 -> skinning-8 merge of 119500-119692 --
 James ignore-dead-branch

---
 indra/llui/llui.cpp               |  6 ++---
 indra/llui/llui.h                 |  6 ++---
 indra/llui/lluiimage.h            |  2 +-
 indra/llui/llview.cpp             | 11 +++++++--
 indra/llui/llview.h               | 52 +++++++++++++++++++--------------------
 indra/newview/llfloaterland.cpp   | 18 +++++++-------
 indra/newview/llfloaterurlentry.h |  4 +--
 indra/newview/llnamelistctrl.cpp  |  6 ++---
 indra/newview/llnamelistctrl.h    | 12 ++++++++-
 9 files changed, 67 insertions(+), 50 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index dfe435d2e3..1cb6972370 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -1930,7 +1930,7 @@ LLLocalClipRect::LLLocalClipRect(const LLRect &rect, BOOL enabled)
 
 namespace LLInitParam
 {
-	TypedParam<LLUIColor >::TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLUIColor& value, ParamDescriptor::validation_func_t func)
+	TypedParam<LLUIColor >::TypedParam(BlockDescriptor& descriptor, const char* name, const LLUIColor& value, ParamDescriptor::validation_func_t func)
 	:	super_t(descriptor, name, value, func),
 		red("red"),
 		green("green"),
@@ -1960,7 +1960,7 @@ namespace LLInitParam
 		declare("blue", LLColor4::blue);
 	}
 
-	TypedParam<const LLFontGL*>::TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLFontGL*const value, ParamDescriptor::validation_func_t func)
+	TypedParam<const LLFontGL*>::TypedParam(BlockDescriptor& descriptor, const char* name, const LLFontGL*const value, ParamDescriptor::validation_func_t func)
 	:	super_t(descriptor, name, value, func),
 		name("", std::string("")),
 		size("size", std::string("")),
@@ -1991,7 +1991,7 @@ namespace LLInitParam
 		return mData.mValue;
 	}
 
-	TypedParam<LLRect>::TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLRect& value, ParamDescriptor::validation_func_t func)
+	TypedParam<LLRect>::TypedParam(BlockDescriptor& descriptor, const char* name, const LLRect& value, ParamDescriptor::validation_func_t func)
 	:	super_t(descriptor, name, value, func),
 		left("left"),
 		top("top"),
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index b5a42bce13..18aa1aa143 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -706,7 +706,7 @@ namespace LLInitParam
 						width,
 						height;
 
-		TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLRect& value, ParamDescriptor::validation_func_t func);
+		TypedParam(BlockDescriptor& descriptor, const char* name, const LLRect& value, ParamDescriptor::validation_func_t func);
 
 		LLRect getValueFromBlock() const;
 	};
@@ -729,7 +729,7 @@ namespace LLInitParam
 		Optional<F32> alpha;
 		Optional<std::string> control;
 
-		TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLUIColor& value, ParamDescriptor::validation_func_t func);
+		TypedParam(BlockDescriptor& descriptor, const char* name, const LLUIColor& value, ParamDescriptor::validation_func_t func);
 		LLUIColor getValueFromBlock() const;
 	};
 
@@ -743,7 +743,7 @@ namespace LLInitParam
 		Optional<std::string> size;
 		Optional<std::string> style;
 
-		TypedParam(BlockDescriptor& descriptor, const std::string& name, const LLFontGL* const value, ParamDescriptor::validation_func_t func);
+		TypedParam(BlockDescriptor& descriptor, const char* name, const LLFontGL* const value, ParamDescriptor::validation_func_t func);
 		const LLFontGL* getValueFromBlock() const;
 	};
 
diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h
index cd660a0954..ae43b50172 100644
--- a/indra/llui/lluiimage.h
+++ b/indra/llui/lluiimage.h
@@ -94,7 +94,7 @@ namespace LLInitParam
 	public:
 		Optional<std::string> name;
 
-		TypedParam(BlockDescriptor& descriptor, const std::string& name, super_t::value_assignment_t value, ParamDescriptor::validation_func_t func)
+		TypedParam(BlockDescriptor& descriptor, const char* name, super_t::value_assignment_t value, ParamDescriptor::validation_func_t func)
 		:	super_t(descriptor, name, value, func)
 		{
 		}
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 462fd16b60..536d0c23f8 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -2341,7 +2341,14 @@ void LLView::initFromParams(const LLView::Params& params)
 
 void LLView::parseFollowsFlags(const LLView::Params& params)
 {
-	if (params.follows.string.isProvided())
+	// preserve follows flags set by code if user did not override
+	if (!params.follows.isProvided()) 
+	{
+		return;
+	}
+
+	// interpret either string or bitfield version of follows
+	if (params.follows.string.isChosen())
 	{
 		setFollows(FOLLOWS_NONE);
 
@@ -2378,7 +2385,7 @@ void LLView::parseFollowsFlags(const LLView::Params& params)
 			++token_iter;
 		}
 	}
-	else if (params.follows.flags.isProvided())
+	else if (params.follows.flags.isChosen())
 	{
 		setFollows(params.follows.flags);
 	}
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 69ae7dd993..85e190c7d2 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -154,41 +154,41 @@ public:
 
 	struct Params : public LLInitParam::Block<Params>
 	{
-		Mandatory<std::string>	name;
-
-		Optional<bool>			enabled,
-								visible;
-		Optional<bool>			mouse_opaque;
-		Optional<bool>			use_bounding_rect;
-		Optional<S32>			tab_group,
-								default_tab_group;
-		Optional<std::string>	tool_tip;
-
-		Optional<S32>			sound_flags;
-		Optional<bool>			serializable;
-		Optional<Follows>		follows;
-		Optional<std::string>	hover_cursor;
+		Mandatory<std::string>		name;
+
+		Optional<bool>				enabled,
+									visible;
+		Optional<bool>				mouse_opaque;
+		Optional<bool>				use_bounding_rect;
+		Optional<S32>				tab_group,
+									default_tab_group;
+		Optional<std::string>		tool_tip;
+
+		Optional<S32>				sound_flags;
+		Optional<bool>				serializable;
+		Optional<Follows>			follows;
+		Optional<std::string>		hover_cursor;
 		
 		// font params
 		Optional<const LLFontGL*>	font;
 		Optional<LLFontGL::HAlign>	font_halign;
 		Optional<LLFontGL::VAlign>	font_valign;
 
-		Optional<std::string>	layout;
-		Optional<LLRect>		rect;
-		Optional<S32>			top_delta,
-								bottom_delta,
-								right_delta,
-								left_delta;
-								
-		Optional<bool>			center_horiz,
-								center_vert;
+		Optional<std::string>		layout;
+		Optional<LLRect>			rect;
+		Optional<S32>				top_delta,
+									bottom_delta,
+									right_delta,
+									left_delta;
+									
+		Optional<bool>				center_horiz,
+									center_vert;
 
 		// these are nested attributes for LLLayoutPanel
 		//FIXME: get parent context involved in parsing traversal
-		Deprecated				user_resize,
-								auto_resize,
-								needs_translate;
+		Deprecated					user_resize,
+									auto_resize,
+									needs_translate;
 
 		Params();
 	};
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 1de656144f..347fe45b82 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1462,26 +1462,26 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
 
 		if (is_group_owned)
 		{
-			item_params.cells.add().type("icon").value(self->mIconGroup->getName());
-			item_params.cells.add().value(OWNER_GROUP).font(FONT);
+			item_params.cells.add().type("icon").value(self->mIconGroup->getName()).column("type");
+			item_params.cells.add().value(OWNER_GROUP).font(FONT).column("online_status");
 		}
 		else if (is_online)
 		{
-			item_params.cells.add().type("icon").value(self->mIconAvatarOnline->getName());
-			item_params.cells.add().value(OWNER_ONLINE).font(FONT);
+			item_params.cells.add().type("icon").value(self->mIconAvatarOnline->getName()).column("type");
+			item_params.cells.add().value(OWNER_ONLINE).font(FONT).column("online_status");
 		}
 		else  // offline
 		{
-			item_params.cells.add().type("icon").value(self->mIconAvatarOffline->getName());
-			item_params.cells.add().value(OWNER_OFFLINE).font(FONT);
+			item_params.cells.add().type("icon").value(self->mIconAvatarOffline->getName()).column("type");
+			item_params.cells.add().value(OWNER_OFFLINE).font(FONT).column("online_status");
 		}
 
 		// Placeholder for name.
-		item_params.cells.add().font(FONT);
+		item_params.cells.add().font(FONT).column("name");
 
 		object_count_str = llformat("%d", object_count);
-		item_params.cells.add().value(object_count_str).font(FONT);
-		item_params.cells.add().value(formatted_time((time_t)most_recent_time)).font(FONT);
+		item_params.cells.add().value(object_count_str).font(FONT).column("count");
+		item_params.cells.add().value(formatted_time((time_t)most_recent_time)).font(FONT).column("mostrecent");
 
 		self->mOwnerList->addRow(item_params);
 
diff --git a/indra/newview/llfloaterurlentry.h b/indra/newview/llfloaterurlentry.h
index 6f83c18d07..0aeca823b8 100644
--- a/indra/newview/llfloaterurlentry.h
+++ b/indra/newview/llfloaterurlentry.h
@@ -1,6 +1,6 @@
 /**
- * @file llfloaternamedesc.h
- * @brief LLFloaterNameDesc class definition
+ * @file llfloaterurlentry.h
+ * @brief LLFloaterURLEntry class definition
  *
  * $LicenseInfo:firstyear=2007&license=viewergpl$
  * 
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index eee64b5651..95d787840f 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -54,7 +54,7 @@ void LLNameListCtrl::NameTypeNames::declareValues()
 }
 
 LLNameListCtrl::Params::Params()
-:	name_column("name_column"),
+:	name_column(""),
 	allow_calling_card_drop("allow_calling_card_drop", false)
 {
 	name = "name_list";
@@ -63,8 +63,8 @@ LLNameListCtrl::Params::Params()
 LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p)
 :	LLScrollListCtrl(p),
 	mAllowCallingCardDrop(p.allow_calling_card_drop),
-	mNameColumn(p.name_column),
-	mNameColumnIndex(0)
+	mNameColumn(p.name_column.column_name),
+	mNameColumnIndex(p.name_column.column_index)
 {}
 
 // public
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index 759ea938f9..379cd48a6a 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -66,9 +66,19 @@ public:
 		{}		
 	};
 
+	struct NameColumn : public LLInitParam::Choice<NameColumn>
+	{
+		Option<S32>				column_index;
+		Option<std::string>		column_name;
+		NameColumn()
+		:	column_name("name_column"),
+			column_index("name_column_index", 0)
+		{}
+	};
+
 	struct Params : public LLInitParam::Block<Params, LLScrollListCtrl::Params>
 	{
-		Optional<std::string>	name_column;
+		Optional<NameColumn>	name_column;
 		Optional<bool>	allow_calling_card_drop;
 		Params();
 	};
-- 
cgit v1.2.3


From 3800c0df910c83e987184d541b868168fc2b5bec Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 8 May 2009 21:08:08 +0000
Subject: svn merge -r114679:114681
 svn+ssh://svn.lindenlab.com/svn/linden/branches/event-system/event-system-7
 svn+ssh://svn.lindenlab.com/svn/linden/branches/event-system/event-system-8

---
 indra/llcommon/CMakeLists.txt                     |   9 +
 indra/llcommon/lldependencies.cpp                 |  86 +++
 indra/llcommon/lldependencies.h                   | 779 ++++++++++++++++++++
 indra/llcommon/llerror.cpp                        |  10 +-
 indra/llcommon/llerrorcontrol.h                   |  32 +-
 indra/llcommon/llevent.cpp                        |   2 +
 indra/llcommon/llevent.h                          |   5 +
 indra/llcommon/llevents.cpp                       | 501 +++++++++++++
 indra/llcommon/llevents.h                         | 822 ++++++++++++++++++++++
 indra/llcommon/lllazy.cpp                         |  23 +
 indra/llcommon/lllazy.h                           | 382 ++++++++++
 indra/llcommon/stringize.h                        |  75 ++
 indra/llcommon/tests/lllazy_test.cpp              | 227 ++++++
 indra/llmessage/CMakeLists.txt                    |   6 +-
 indra/llmessage/llcachename.cpp                   |  16 +-
 indra/llmessage/llcachename.h                     |  16 +-
 indra/llmessage/llsdmessage.cpp                   | 150 ++++
 indra/llmessage/llsdmessage.h                     | 146 ++++
 indra/llmessage/tests/llsdmessage_test.cpp        | 113 +++
 indra/llui/llbutton.cpp                           |  16 +-
 indra/llui/llbutton.h                             |  16 +-
 indra/llui/llmenugl.cpp                           |   2 +
 indra/llui/llmenugl.h                             |   8 +-
 indra/llui/llmultislider.h                        |   4 +-
 indra/llui/llmultisliderctrl.cpp                  |   4 +-
 indra/llui/llmultisliderctrl.h                    |   4 +-
 indra/llui/llnotifications.cpp                    |  23 +-
 indra/llui/llnotifications.h                      |  87 +--
 indra/llui/llslider.h                             |   4 +-
 indra/llui/llsliderctrl.cpp                       |   4 +-
 indra/llui/llsliderctrl.h                         |   4 +-
 indra/llui/llui.h                                 |   4 +-
 indra/llui/lluictrl.cpp                           |   4 +-
 indra/llui/lluictrl.h                             |  18 +-
 indra/llui/llview.cpp                             |   2 +
 indra/llxml/CMakeLists.txt                        |   1 -
 indra/llxml/llcontrol.h                           |   8 +-
 indra/newview/CMakeLists.txt                      |   5 +
 indra/newview/llagent.cpp                         | 209 +++---
 indra/newview/llagent.h                           |   4 +-
 indra/newview/llagentlanguage.h                   |   2 +-
 indra/newview/llappviewer.cpp                     |  13 +-
 indra/newview/llcapabilitylistener.cpp            | 183 +++++
 indra/newview/llcapabilitylistener.h              | 113 +++
 indra/newview/llcapabilityprovider.h              |  39 +
 indra/newview/llfloatergroups.cpp                 |   2 +
 indra/newview/llfloatergroups.h                   |   8 +-
 indra/newview/llfolderview.h                      |   2 +-
 indra/newview/llinventorybridge.cpp               |   2 +
 indra/newview/llnetmap.cpp                        |   2 +
 indra/newview/llteleporthistory.h                 |   4 +-
 indra/newview/lltoolpipette.h                     |   4 +-
 indra/newview/llviewerinventory.cpp               |  63 +-
 indra/newview/llviewermedia.cpp                   |   2 +-
 indra/newview/llviewermenu.cpp                    |   3 +-
 indra/newview/llviewermenufile.cpp                |   2 +
 indra/newview/llviewerparcelmgr.cpp               |   4 +-
 indra/newview/llviewerparcelmgr.h                 |  12 +-
 indra/newview/llviewerregion.cpp                  |  33 +-
 indra/newview/llviewerregion.h                    |  26 +-
 indra/newview/llviewerthrottle.cpp                |   2 +
 indra/newview/tests/llcapabilitylistener_test.cpp | 274 ++++++++
 indra/test/CMakeLists.txt                         |   4 +
 indra/test/llevents_tut.cpp                       | 793 +++++++++++++++++++++
 64 files changed, 5122 insertions(+), 301 deletions(-)
 create mode 100644 indra/llcommon/lldependencies.cpp
 create mode 100644 indra/llcommon/lldependencies.h
 create mode 100644 indra/llcommon/llevents.cpp
 create mode 100644 indra/llcommon/llevents.h
 create mode 100644 indra/llcommon/lllazy.cpp
 create mode 100644 indra/llcommon/lllazy.h
 create mode 100644 indra/llcommon/stringize.h
 create mode 100644 indra/llcommon/tests/lllazy_test.cpp
 create mode 100644 indra/llmessage/llsdmessage.cpp
 create mode 100644 indra/llmessage/llsdmessage.h
 create mode 100644 indra/llmessage/tests/llsdmessage_test.cpp
 create mode 100644 indra/newview/llcapabilitylistener.cpp
 create mode 100644 indra/newview/llcapabilitylistener.h
 create mode 100644 indra/newview/llcapabilityprovider.h
 create mode 100644 indra/newview/tests/llcapabilitylistener_test.cpp
 create mode 100644 indra/test/llevents_tut.cpp

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index c4663cc145..694f3d5de8 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -3,6 +3,7 @@
 project(llcommon)
 
 include(00-Common)
+include(LLAddBuildTest)
 include(LLCommon)
 include(Boost)
 
@@ -28,9 +29,11 @@ set(llcommon_SOURCE_FILES
     llcriticaldamp.cpp
     llcursortypes.cpp
     lldate.cpp
+    lldependencies.cpp
     llerror.cpp
     llerrorthread.cpp
     llevent.cpp
+    llevents.cpp
     llfasttimer.cpp
     llfile.cpp
     llfindlocale.cpp
@@ -103,6 +106,7 @@ set(llcommon_HEADER_FILES
     lldarrayptr.h
     lldate.h
     lldefs.h
+    lldependencies.h
     lldepthstack.h
     lldlinked.h
     lldoubledispatch.h
@@ -114,6 +118,7 @@ set(llcommon_HEADER_FILES
     llerrorlegacy.h
     llerrorthread.h
     llevent.h
+    llevents.h
     lleventemitter.h
     llextendedstatus.h
     llfasttimer.h
@@ -129,6 +134,7 @@ set(llcommon_HEADER_FILES
     llindraconfigfile.h
     llinstancetracker.h
     llkeythrottle.h
+    lllazy.h
     lllinkedqueue.h
     llliveappconfig.h
     lllivefile.h
@@ -194,6 +200,7 @@ set(llcommon_HEADER_FILES
     stdenums.h
     stdtypes.h
     string_table.h
+    stringize.h
     timer.h
     timing.h
     u64.h
@@ -214,3 +221,5 @@ target_link_libraries(
     ${BOOST_PROGRAM_OPTIONS_LIBRARY}
     ${BOOST_REGEX_LIBRARY}
     )
+
+ADD_BUILD_TEST(lllazy llcommon)
diff --git a/indra/llcommon/lldependencies.cpp b/indra/llcommon/lldependencies.cpp
new file mode 100644
index 0000000000..ffb5cfbdaa
--- /dev/null
+++ b/indra/llcommon/lldependencies.cpp
@@ -0,0 +1,86 @@
+/**
+ * @file   lldependencies.cpp
+ * @author Nat Goodspeed
+ * @date   2008-09-17
+ * @brief  Implementation for lldependencies.
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "lldependencies.h"
+// STL headers
+#include <map>
+#include <sstream>
+// std headers
+// external library headers
+#include <boost/graph/graph_traits.hpp>  // for boost::graph_traits
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/topological_sort.hpp>
+#include <boost/graph/exception.hpp>
+// other Linden headers
+
+LLDependenciesBase::VertexList LLDependenciesBase::topo_sort(int vertices, const EdgeList& edges) const
+{
+    // Construct a Boost Graph Library graph according to the constraints
+    // we've collected. It seems as though we ought to be able to capture
+    // the uniqueness of vertex keys using a setS of vertices with a
+    // string property -- but I don't yet understand adjacency_list well
+    // enough to get there. All the examples I've seen so far use integers
+    // for vertices.
+    // Define the Graph type. Use a vector for vertices so we can use the
+    // default topological_sort vertex lookup by int index. Use a set for
+    // edges because the same dependency may be stated twice: Node "a" may
+    // specify that it must precede "b", while "b" may also state that it
+    // must follow "a".
+    typedef boost::adjacency_list<boost::setS, boost::vecS, boost::directedS,
+                                  boost::no_property> Graph;
+    // Instantiate the graph. Without vertex properties, we need say no
+    // more about vertices than the total number.
+    Graph g(edges.begin(), edges.end(), vertices);
+    // topo sort
+    typedef boost::graph_traits<Graph>::vertex_descriptor VertexDesc;
+    typedef std::vector<VertexDesc> SortedList;
+    SortedList sorted;
+    // note that it throws not_a_dag if it finds a cycle
+    try
+    {
+        boost::topological_sort(g, std::back_inserter(sorted));
+    }
+    catch (const boost::not_a_dag& e)
+    {
+        // translate to the exception we define
+        std::ostringstream out;
+        out << "LLDependencies cycle: " << e.what() << '\n';
+        // Omit independent nodes: display only those that might contribute to
+        // the cycle.
+        describe(out, false);
+        throw Cycle(out.str());
+    }
+    // A peculiarity of boost::topological_sort() is that it emits results in
+    // REVERSE topological order: to get the result you want, you must
+    // traverse the SortedList using reverse iterators.
+    return VertexList(sorted.rbegin(), sorted.rend());
+}
+
+std::ostream& LLDependenciesBase::describe(std::ostream& out, bool full) const
+{
+    // Should never encounter this base-class implementation; may mean that
+    // the KEY type doesn't have a suitable ostream operator<<().
+    out << "<no description available>";
+    return out;
+}
+
+std::string LLDependenciesBase::describe(bool full) const
+{
+    // Just use the ostream-based describe() on a std::ostringstream. The
+    // implementation is here mostly so that we can avoid #include <sstream>
+    // in the header file.
+    std::ostringstream out;
+    describe(out, full);
+    return out.str();
+}
diff --git a/indra/llcommon/lldependencies.h b/indra/llcommon/lldependencies.h
new file mode 100644
index 0000000000..bd4bd7c96a
--- /dev/null
+++ b/indra/llcommon/lldependencies.h
@@ -0,0 +1,779 @@
+/**
+ * @file   lldependencies.h
+ * @author Nat Goodspeed
+ * @date   2008-09-17
+ * @brief  LLDependencies: a generic mechanism for expressing "b must follow a,
+ *         but precede c"
+ *
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLDEPENDENCIES_H)
+#define LL_LLDEPENDENCIES_H
+
+#include <string>
+#include <vector>
+#include <set>
+#include <map>
+#include <stdexcept>
+#include <iosfwd>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/iterator/indirect_iterator.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/function.hpp>
+#include <boost/bind.hpp>
+
+/*****************************************************************************
+*   Utilities
+*****************************************************************************/
+/**
+ * generic range transformer: given a range acceptable to Boost.Range (e.g. a
+ * standard container, an iterator pair, ...) and a unary function to apply to
+ * each element of the range, make a corresponding range that lazily applies
+ * that function to each element on dereferencing.
+ */
+template<typename FUNCTION, typename RANGE>
+inline
+boost::iterator_range<boost::transform_iterator<FUNCTION,
+                                                typename boost::range_const_iterator<RANGE>::type> >
+make_transform_range(const RANGE& range, FUNCTION function)
+{
+    // shorthand for the iterator type embedded in our return type
+    typedef boost::transform_iterator<FUNCTION, typename boost::range_const_iterator<RANGE>::type>
+        transform_iterator;
+    return boost::make_iterator_range(transform_iterator(boost::begin(range), function),
+                                      transform_iterator(boost::end(range),   function));
+}
+
+/// non-const version of make_transform_range()
+template<typename FUNCTION, typename RANGE>
+inline
+boost::iterator_range<boost::transform_iterator<FUNCTION,
+                                                typename boost::range_iterator<RANGE>::type> >
+make_transform_range(RANGE& range, FUNCTION function)
+{
+    // shorthand for the iterator type embedded in our return type
+    typedef boost::transform_iterator<FUNCTION, typename boost::range_iterator<RANGE>::type>
+        transform_iterator;
+    return boost::make_iterator_range(transform_iterator(boost::begin(range), function),
+                                      transform_iterator(boost::end(range),   function));
+}
+
+/**
+ * From any range compatible with Boost.Range, instantiate any class capable
+ * of accepting an iterator pair.
+ */
+template<class TYPE>
+struct instance_from_range: public TYPE
+{
+    template<typename RANGE>
+    instance_from_range(RANGE range):
+        TYPE(boost::begin(range), boost::end(range))
+    {}
+};
+
+/*****************************************************************************
+*   LLDependencies
+*****************************************************************************/
+/**
+ * LLDependencies components that should not be reinstantiated for each KEY,
+ * NODE specialization
+ */
+class LLDependenciesBase
+{
+public:
+    virtual ~LLDependenciesBase() {}
+
+    /**
+     * Exception thrown by sort() if there's a cycle
+     */
+    struct Cycle: public std::runtime_error
+    {
+        Cycle(const std::string& what): std::runtime_error(what) {}
+    };
+
+    /**
+     * Provide a short description of this LLDependencies instance on the
+     * specified output stream, assuming that its KEY type has an operator<<()
+     * that works with std::ostream.
+     *
+     * Pass @a full as @c false to omit any keys without dependency constraints.
+     */
+    virtual std::ostream& describe(std::ostream& out, bool full=true) const;
+
+    /// describe() to a string
+    virtual std::string describe(bool full=true) const;
+
+protected:
+    typedef std::vector< std::pair<int, int> > EdgeList;
+    typedef std::vector<int> VertexList;
+    VertexList topo_sort(int vertices, const EdgeList& edges) const;
+
+    /**
+     * refpair is specifically intended to capture a pair of references. This
+     * is better than std::pair<T1&, T2&> because some implementations of
+     * std::pair's ctor accept const references to the two types. If the
+     * types are themselves references, this results in an illegal reference-
+     * to-reference.
+     */
+    template<typename T1, typename T2>
+    struct refpair
+    {
+        refpair(T1 value1, T2 value2):
+            first(value1),
+            second(value2)
+        {}
+        T1 first;
+        T2 second;
+    };
+};
+
+/// describe() helper: for most types, report the type as usual
+template<typename T>
+inline
+std::ostream& LLDependencies_describe(std::ostream& out, const T& key)
+{
+    out << key;
+    return out;
+}
+
+/// specialize LLDependencies_describe() for std::string
+template<>
+inline
+std::ostream& LLDependencies_describe(std::ostream& out, const std::string& key)
+{
+    out << '"' << key << '"';
+    return out;
+}
+
+/**
+ * It's reasonable to use LLDependencies in a keys-only way, more or less like
+ * std::set. For that case, the default NODE type is an empty struct.
+ */
+struct LLDependenciesEmpty
+{
+    LLDependenciesEmpty() {}
+    /**
+     * Give it a constructor accepting void* so caller can pass placeholder
+     * values such as NULL or 0 rather than having to write
+     * LLDependenciesEmpty().
+     */
+    LLDependenciesEmpty(void*) {}    
+};
+
+/**
+ * This class manages abstract dependencies between node types of your
+ * choosing. As with a std::map, nodes are copied when add()ed, so the node
+ * type should be relatively lightweight; to manipulate dependencies between
+ * expensive objects, use a pointer type.
+ *
+ * For a given node, you may state the keys of nodes that must precede it
+ * and/or nodes that must follow it. The sort() method will produce an order
+ * that should work, or throw an exception if the constraints are impossible.
+ * We cache results to minimize the cost of repeated sort() calls.
+ */
+template<typename KEY = std::string,
+         typename NODE = LLDependenciesEmpty>
+class LLDependencies: public LLDependenciesBase
+{
+    typedef LLDependencies<KEY, NODE> self_type;
+
+    /**
+     * Internally, we bundle the client's NODE with its before/after keys.
+     */
+    struct DepNode
+    {
+        typedef std::set<KEY> dep_set;
+        DepNode(const NODE& node_, const dep_set& after_, const dep_set& before_):
+            node(node_),
+            after(after_),
+            before(before_)
+        {}
+        NODE node;
+        dep_set after, before;    
+    };
+    typedef std::map<KEY, DepNode> DepNodeMap;
+    typedef typename DepNodeMap::value_type DepNodeMapEntry;
+
+    /// We have various ways to get the dependencies for a given DepNode.
+    /// Rather than having to restate each one for 'after' and 'before'
+    /// separately, pass a dep_selector so we can apply each to either.
+    typedef boost::function<const typename DepNode::dep_set&(const DepNode&)> dep_selector;
+
+public:
+    LLDependencies() {}
+
+    typedef KEY key_type;
+    typedef NODE node_type;
+
+    /// param type used to express lists of other node keys -- note that such
+    /// lists can be initialized with boost::assign::list_of()
+    typedef std::vector<KEY> KeyList;
+
+    /**
+     * Add a new node. State its dependencies on other nodes (which may not
+     * yet have been added) by listing the keys of nodes this new one must
+     * follow, and separately the keys of nodes this new one must precede.
+     *
+     * The node you pass is @em copied into an internal data structure. If you
+     * want to modify the node value after add()ing it, capture the returned
+     * NODE& reference.
+     *
+     * @note
+     * Actual dependency analysis is deferred to the sort() method, so 
+     * you can add an arbitrary number of nodes without incurring analysis
+     * overhead for each. The flip side of this is that add()ing nodes that
+     * define a cycle leaves this object in a state in which sort() will
+     * always throw the Cycle exception.
+     *
+     * Two distinct use cases are anticipated:
+     * * The data used to load this object are completely known at compile
+     * time (e.g. LLEventPump listener names). A Cycle exception represents a
+     * bug which can be corrected by the coder. The program need neither catch
+     * Cycle nor attempt to salvage the state of this object.
+     * * The data are loaded at runtime, therefore the universe of
+     * dependencies cannot be known at compile time. The client code should
+     * catch Cycle.
+     * ** If a Cycle exception indicates fatally-flawed input data, this
+     * object can simply be discarded, possibly with the entire program run.
+     * ** If it is essential to restore this object to a working state, the
+     * simplest workaround is to remove() nodes in LIFO order.
+     * *** It may be useful to add functionality to this class to track the
+     * add() chronology, providing a pop() method to remove the most recently
+     * added node.
+     * *** It may further be useful to add a restore() method which would
+     * pop() until sort() no longer throws Cycle. This method would be
+     * expensive -- but it's not clear that client code could resolve the
+     * problem more cheaply.
+     */
+    NODE& add(const KEY& key, const NODE& node = NODE(),
+              const KeyList& after = KeyList(),
+              const KeyList& before = KeyList())
+    {
+        // Get the passed-in lists as sets for equality comparison
+        typename DepNode::dep_set
+            after_set(after.begin(), after.end()),
+            before_set(before.begin(), before.end());
+        // Try to insert the new node; if it already exists, find the old
+        // node instead.
+        std::pair<typename DepNodeMap::iterator, bool> inserted =
+            mNodes.insert(typename DepNodeMap::value_type(key,
+                                                          DepNode(node, after_set, before_set)));
+        if (! inserted.second)      // bool indicating success of insert()
+        {
+            // We already have a node by this name. Have its dependencies
+            // changed? If the existing node's dependencies are identical, the
+            // result will be unchanged, so we can leave the cache intact.
+            // Regardless of inserted.second, inserted.first is the iterator
+            // to the newly-inserted (or existing) map entry. Of course, that
+            // entry's second is the DepNode of interest.
+            if (inserted.first->second.after  != after_set ||
+                inserted.first->second.before != before_set)
+            {
+                // Dependencies have changed: clear the cached result.
+                mCache.clear();
+                // save the new dependencies
+                inserted.first->second.after  = after_set;
+                inserted.first->second.before = before_set;
+            }
+        }
+        else                        // this node is new
+        {
+            // This will change results.
+            mCache.clear();
+        }
+        return inserted.first->second.node;
+    }
+
+    /// the value of an iterator, showing both KEY and its NODE
+    typedef refpair<const KEY&, NODE&> value_type;
+    /// the value of a const_iterator
+    typedef refpair<const KEY&, const NODE&> const_value_type;
+
+private:
+    // Extract functors
+    static value_type value_extract(DepNodeMapEntry& entry)
+    {
+        return value_type(entry.first, entry.second.node);
+    }
+
+    static const_value_type const_value_extract(const DepNodeMapEntry& entry)
+    {
+        return const_value_type(entry.first, entry.second.node);
+    }
+
+    // All the iterator access methods return iterator ranges just to cut down
+    // on the friggin' boilerplate!!
+
+    /// generic mNodes range method
+    template<typename ITERATOR, typename FUNCTION>
+    boost::iterator_range<ITERATOR> generic_range(FUNCTION function)
+    {
+        return make_transform_range(mNodes, function);
+    }
+
+    /// generic mNodes const range method
+    template<typename ITERATOR, typename FUNCTION>
+    boost::iterator_range<ITERATOR> generic_range(FUNCTION function) const
+    {
+        return make_transform_range(mNodes, function);
+    }
+
+public:
+    /// iterator over value_type entries
+    typedef boost::transform_iterator<boost::function<value_type(DepNodeMapEntry&)>,
+                                      typename DepNodeMap::iterator> iterator;
+    /// range over value_type entries
+    typedef boost::iterator_range<iterator> range;
+
+    /// iterate over value_type <i>in @c KEY order</i> rather than dependency order
+    range get_range()
+    {
+        return generic_range<iterator>(value_extract);
+    }
+
+    /// iterator over const_value_type entries
+    typedef boost::transform_iterator<boost::function<const_value_type(const DepNodeMapEntry&)>,
+                                      typename DepNodeMap::const_iterator> const_iterator;
+    /// range over const_value_type entries
+    typedef boost::iterator_range<const_iterator> const_range;
+
+    /// iterate over const_value_type <i>in @c KEY order</i> rather than dependency order
+    const_range get_range() const
+    {
+        return generic_range<const_iterator>(const_value_extract);
+    }
+
+    /// iterator over stored NODEs
+    typedef boost::transform_iterator<boost::function<NODE&(DepNodeMapEntry&)>,
+                                      typename DepNodeMap::iterator> node_iterator;
+    /// range over stored NODEs
+    typedef boost::iterator_range<node_iterator> node_range;
+
+    /// iterate over NODE <i>in @c KEY order</i> rather than dependency order
+    node_range get_node_range()
+    {
+        // First take a DepNodeMapEntry and extract a reference to its
+        // DepNode, then from that extract a reference to its NODE.
+        return generic_range<node_iterator>(
+            boost::bind<NODE&>(&DepNode::node,
+                               boost::bind<DepNode&>(&DepNodeMapEntry::second, _1)));
+    }
+
+    /// const iterator over stored NODEs
+    typedef boost::transform_iterator<boost::function<const NODE&(const DepNodeMapEntry&)>,
+                                      typename DepNodeMap::const_iterator> const_node_iterator;
+    /// const range over stored NODEs
+    typedef boost::iterator_range<const_node_iterator> const_node_range;
+
+    /// iterate over const NODE <i>in @c KEY order</i> rather than dependency order
+    const_node_range get_node_range() const
+    {
+        // First take a DepNodeMapEntry and extract a reference to its
+        // DepNode, then from that extract a reference to its NODE.
+        return generic_range<const_node_iterator>(
+            boost::bind<const NODE&>(&DepNode::node,
+                                     boost::bind<const DepNode&>(&DepNodeMapEntry::second, _1)));
+    }
+
+    /// const iterator over stored KEYs
+    typedef boost::transform_iterator<boost::function<const KEY&(const DepNodeMapEntry&)>,
+                                      typename DepNodeMap::const_iterator> const_key_iterator;
+    /// const range over stored KEYs
+    typedef boost::iterator_range<const_key_iterator> const_key_range;
+    // We don't provide a non-const iterator over KEYs because they should be
+    // immutable, and in fact our underlying std::map won't give us non-const
+    // references.
+
+    /// iterate over const KEY <i>in @c KEY order</i> rather than dependency order
+    const_key_range get_key_range() const
+    {
+        // From a DepNodeMapEntry, extract a reference to its KEY.
+        return generic_range<const_key_iterator>(
+            boost::bind<const KEY&>(&DepNodeMapEntry::first, _1));
+    }
+
+    /**
+     * Find an existing NODE, or return NULL. We decided to avoid providing a
+     * method analogous to std::map::find(), for a couple of reasons:
+     *
+     * * For a find-by-key, getting back an iterator to the (key, value) pair
+     * is less than useful, since you already have the key in hand.
+     * * For a failed request, comparing to end() is problematic. First, we
+     * provide range accessors, so it's more code to get end(). Second, we
+     * provide a number of different ranges -- quick, to which one's end()
+     * should we compare the iterator returned by find()?
+     *
+     * The returned pointer is solely to allow expressing the not-found
+     * condition. LLDependencies still owns the found NODE.
+     */
+    const NODE* get(const KEY& key) const
+    {
+        typename DepNodeMap::const_iterator found = mNodes.find(key);
+        if (found != mNodes.end())
+        {
+            return &found->second.node;
+        }
+        return NULL;
+    }
+
+    /**
+     * non-const get()
+     */
+    NODE* get(const KEY& key)
+    {
+        // Use const implementation, then cast away const-ness of return
+        return const_cast<NODE*>(const_cast<const self_type*>(this)->get(key));
+    }
+
+    /**
+     * Remove a node with specified key. This operation is the major reason
+     * we rebuild the graph on the fly instead of storing it.
+     */
+    bool remove(const KEY& key)
+    {
+        typename DepNodeMap::iterator found = mNodes.find(key);
+        if (found != mNodes.end())
+        {
+            mNodes.erase(found);
+            return true;
+        }
+        return false;
+    }
+
+private:
+    /// cached list of iterators
+    typedef std::vector<iterator> iterator_list;
+    typedef typename iterator_list::iterator iterator_list_iterator;
+
+public:
+    /**
+     * The return type of the sort() method needs some explanation. Provide a
+     * public typedef to facilitate storing the result.
+     *
+     * * We will prepare mCache by looking up DepNodeMap iterators.
+     * * We want to return a range containing iterators that will walk mCache.
+     * * If we simply stored DepNodeMap iterators and returned
+     * (mCache.begin(), mCache.end()), dereferencing each iterator would
+     * obtain a DepNodeMap iterator.
+     * * We want the caller to loop over @c value_type: pair<KEY, NODE>.
+     * * This requires two transformations:
+     * ** mCache must contain @c LLDependencies::iterator so that
+     * dereferencing each entry will obtain an @c LLDependencies::value_type
+     * rather than a DepNodeMapEntry.
+     * ** We must wrap mCache's iterators in boost::indirect_iterator so that
+     * dereferencing one of our returned iterators will also dereference the
+     * iterator contained in mCache.
+     */
+    typedef boost::iterator_range<boost::indirect_iterator<iterator_list_iterator> > sorted_range;
+    /// for convenience in looping over a sorted_range
+    typedef typename sorted_range::iterator sorted_iterator;
+
+    /**
+     * Once we've loaded in the dependencies of interest, arrange them into an
+     * order that works -- or throw Cycle exception.
+     *
+     * Return an iterator range over (key, node) pairs that traverses them in
+     * the desired order.
+     */
+    sorted_range sort() const
+    {
+        // Changes to mNodes cause us to clear our cache, so empty mCache
+        // means it's invalid and should be recomputed. However, if mNodes is
+        // also empty, then an empty mCache represents a valid order, so don't
+        // bother sorting.
+        if (mCache.empty() && ! mNodes.empty())
+        {
+            // Construct a map of node keys to distinct vertex numbers -- even for
+            // nodes mentioned only in before/after constraints, that haven't yet
+            // been explicitly added. Rely on std::map rejecting a second attempt
+            // to insert the same key. Use the map's size() as the vertex number
+            // to get a distinct value for each successful insertion.
+            typedef std::map<KEY, int> VertexMap;
+            VertexMap vmap;
+            // Nest each of these loops because !@#$%? MSVC warns us that its
+            // former broken behavior has finally been fixed -- and our builds
+            // treat warnings as errors.
+            {
+                for (typename DepNodeMap::const_iterator nmi = mNodes.begin(), nmend = mNodes.end();
+                     nmi != nmend; ++nmi)
+                {
+                    vmap.insert(typename VertexMap::value_type(nmi->first, vmap.size()));
+                    for (typename DepNode::dep_set::const_iterator ai = nmi->second.after.begin(),
+                                                                   aend = nmi->second.after.end();
+                         ai != aend; ++ai)
+                    {
+                        vmap.insert(typename VertexMap::value_type(*ai, vmap.size()));
+                    }
+                    for (typename DepNode::dep_set::const_iterator bi = nmi->second.before.begin(),
+                                                                   bend = nmi->second.before.end();
+                         bi != bend; ++bi)
+                    {
+                        vmap.insert(typename VertexMap::value_type(*bi, vmap.size()));
+                    }
+                }
+            }
+            // Define the edges. For this we must traverse mNodes again, mapping
+            // all the known key dependencies to integer pairs.
+            EdgeList edges;
+            {
+                for (typename DepNodeMap::const_iterator nmi = mNodes.begin(), nmend = mNodes.end();
+                     nmi != nmend; ++nmi)
+                {
+                    int thisnode = vmap[nmi->first];
+                    // after dependencies: build edges from the named node to this one
+                    for (typename DepNode::dep_set::const_iterator ai = nmi->second.after.begin(),
+                                                                   aend = nmi->second.after.end();
+                         ai != aend; ++ai)
+                    {
+                        edges.push_back(EdgeList::value_type(vmap[*ai], thisnode));
+                    }
+                    // before dependencies: build edges from this node to the
+                    // named one
+                    for (typename DepNode::dep_set::const_iterator bi = nmi->second.before.begin(),
+                                                                   bend = nmi->second.before.end();
+                         bi != bend; ++bi)
+                    {
+                        edges.push_back(EdgeList::value_type(thisnode, vmap[*bi]));
+                    }
+                }
+            }
+            // Hide the gory details of our topological sort, since they shouldn't
+            // get reinstantiated for each distinct NODE type.
+            VertexList sorted(topo_sort(vmap.size(), edges));
+            // Build the reverse of vmap to look up the key for each vertex
+            // descriptor. vmap contains exactly one entry for each distinct key,
+            // and we're certain that the associated int values are distinct
+            // indexes. The fact that they're not in order is irrelevant.
+            KeyList vkeys(vmap.size());
+            for (typename VertexMap::const_iterator vmi = vmap.begin(), vmend = vmap.end();
+                 vmi != vmend; ++vmi)
+            {
+                vkeys[vmi->second] = vmi->first;
+            }
+            // Walk the sorted output list, building the result into mCache so
+            // we'll have it next time someone asks.
+            mCache.clear();
+            for (VertexList::const_iterator svi = sorted.begin(), svend = sorted.end();
+                 svi != svend; ++svi)
+            {
+                // We're certain that vkeys[*svi] exists. However, there might not
+                // yet be a corresponding entry in mNodes.
+                self_type* non_const_this(const_cast<self_type*>(this));
+                typename DepNodeMap::iterator found = non_const_this->mNodes.find(vkeys[*svi]);
+                if (found != non_const_this->mNodes.end())
+                {
+                    // Make an iterator of appropriate type.
+                    mCache.push_back(iterator(found, value_extract));
+                }
+            }
+        }
+        // Whether or not we've just recomputed mCache, it should now contain
+        // the results we want. Return a range of indirect_iterators over it
+        // so that dereferencing a returned iterator will dereference the
+        // iterator stored in mCache and directly reference the (key, node)
+        // pair.
+        boost::indirect_iterator<iterator_list_iterator>
+            begin(mCache.begin()),
+            end(mCache.end());
+        return sorted_range(begin, end);
+    }
+
+    /// Override base-class describe() with actual implementation
+    virtual std::ostream& describe(std::ostream& out, bool full=true) const
+    {
+        typename DepNodeMap::const_iterator dmi(mNodes.begin()), dmend(mNodes.end());
+        if (dmi != dmend)
+        {
+            std::string sep;
+            describe(out, sep, *dmi, full);
+            while (++dmi != dmend)
+            {
+                describe(out, sep, *dmi, full);
+            }
+        }
+        return out;
+    }
+
+    /// describe() helper: report a DepNodeEntry
+    static std::ostream& describe(std::ostream& out, std::string& sep,
+                                  const DepNodeMapEntry& entry, bool full)
+    {
+        // If we were asked for a full report, describe every node regardless
+        // of whether it has dependencies. If we were asked to suppress
+        // independent nodes, describe this one if either after or before is
+        // non-empty.
+        if (full || (! entry.second.after.empty()) || (! entry.second.before.empty()))
+        {
+            out << sep;
+            sep = "\n";
+            if (! entry.second.after.empty())
+            {
+                out << "after ";
+                describe(out, entry.second.after);
+                out << " -> ";
+            }
+            LLDependencies_describe(out, entry.first);
+            if (! entry.second.before.empty())
+            {
+                out << " -> before ";
+                describe(out, entry.second.before);
+            }
+        }
+        return out;
+    }
+
+    /// describe() helper: report a dep_set
+    static std::ostream& describe(std::ostream& out, const typename DepNode::dep_set& keys)
+    {
+        out << '(';
+        typename DepNode::dep_set::const_iterator ki(keys.begin()), kend(keys.end());
+        if (ki != kend)
+        {
+            LLDependencies_describe(out, *ki);
+            while (++ki != kend)
+            {
+                out << ", ";
+                LLDependencies_describe(out, *ki);
+            }
+        }
+        out << ')';
+        return out;
+    }
+
+    /// Iterator over the before/after KEYs on which a given NODE depends
+    typedef typename DepNode::dep_set::const_iterator dep_iterator;
+    /// range over the before/after KEYs on which a given NODE depends
+    typedef boost::iterator_range<dep_iterator> dep_range;
+
+    /// dependencies access from key
+    dep_range get_dep_range_from_key(const KEY& key, const dep_selector& selector) const
+    {
+        typename DepNodeMap::const_iterator found = mNodes.find(key);
+        if (found != mNodes.end())
+        {
+            return dep_range(selector(found->second));
+        }
+        // We want to return an empty range. On some platforms a default-
+        // constructed range (e.g. dep_range()) does NOT suffice! The client
+        // is likely to try to iterate from boost::begin(range) to
+        // boost::end(range); yet these iterators might not be valid. Instead
+        // return a range over a valid, empty container.
+        static const typename DepNode::dep_set empty_deps;
+        return dep_range(empty_deps.begin(), empty_deps.end());
+    }
+
+    /// dependencies access from any one of our key-order iterators
+    template<typename ITERATOR>
+    dep_range get_dep_range_from_xform(const ITERATOR& iterator, const dep_selector& selector) const
+    {
+        return dep_range(selector(iterator.base()->second));
+    }
+
+    /// dependencies access from sorted_iterator
+    dep_range get_dep_range_from_sorted(const sorted_iterator& sortiter,
+                                        const dep_selector& selector) const
+    {
+        // sorted_iterator is a boost::indirect_iterator wrapping an mCache
+        // iterator, which we can obtain by sortiter.base(). Deferencing that
+        // gets us an mCache entry, an 'iterator' -- one of our traversal
+        // iterators -- on which we can use get_dep_range_from_xform().
+        return get_dep_range_from_xform(*sortiter.base(), selector);
+    }
+
+    /**
+     * Get a range over the after KEYs stored for the passed KEY or iterator,
+     * in <i>arbitrary order.</i> If you pass a nonexistent KEY, returns empty
+     * range -- same as a KEY with no after KEYs. Detect existence of a KEY
+     * using get() instead.
+     */
+    template<typename KEY_OR_ITER>
+    dep_range get_after_range(const KEY_OR_ITER& key) const;
+
+    /**
+     * Get a range over the before KEYs stored for the passed KEY or iterator,
+     * in <i>arbitrary order.</i> If you pass a nonexistent KEY, returns empty
+     * range -- same as a KEY with no before KEYs. Detect existence of a KEY
+     * using get() instead.
+     */
+    template<typename KEY_OR_ITER>
+    dep_range get_before_range(const KEY_OR_ITER& key) const;
+
+private:
+    DepNodeMap mNodes;
+    mutable iterator_list mCache;
+};
+
+/**
+ * Functor to get a dep_range from a KEY or iterator -- generic case. If the
+ * passed value isn't one of our iterator specializations, assume it's
+ * convertible to the KEY type.
+ */
+template<typename KEY_ITER>
+struct LLDependencies_dep_range_from
+{
+    template<typename KEY, typename NODE, typename SELECTOR>
+    typename LLDependencies<KEY, NODE>::dep_range
+    operator()(const LLDependencies<KEY, NODE>& deps,
+               const KEY_ITER& key,
+               const SELECTOR& selector)
+    {
+        return deps.get_dep_range_from_key(key, selector);
+    }
+};
+
+/// Specialize LLDependencies_dep_range_from for our key-order iterators
+template<typename FUNCTION, typename ITERATOR>
+struct LLDependencies_dep_range_from< boost::transform_iterator<FUNCTION, ITERATOR> >
+{
+    template<typename KEY, typename NODE, typename SELECTOR>
+    typename LLDependencies<KEY, NODE>::dep_range
+    operator()(const LLDependencies<KEY, NODE>& deps,
+               const boost::transform_iterator<FUNCTION, ITERATOR>& iter,
+               const SELECTOR& selector)
+    {
+        return deps.get_dep_range_from_xform(iter, selector);
+    }
+};
+
+/// Specialize LLDependencies_dep_range_from for sorted_iterator
+template<typename BASEITER>
+struct LLDependencies_dep_range_from< boost::indirect_iterator<BASEITER> >
+{
+    template<typename KEY, typename NODE, typename SELECTOR>
+    typename LLDependencies<KEY, NODE>::dep_range
+    operator()(const LLDependencies<KEY, NODE>& deps,
+               const boost::indirect_iterator<BASEITER>& iter,
+               const SELECTOR& selector)
+    {
+        return deps.get_dep_range_from_sorted(iter, selector);
+    }
+};
+
+/// generic get_after_range() implementation
+template<typename KEY, typename NODE>
+template<typename KEY_OR_ITER>
+typename LLDependencies<KEY, NODE>::dep_range
+LLDependencies<KEY, NODE>::get_after_range(const KEY_OR_ITER& key_iter) const
+{
+    return LLDependencies_dep_range_from<KEY_OR_ITER>()(
+        *this,
+        key_iter,
+        boost::bind<const typename DepNode::dep_set&>(&DepNode::after, _1));
+}
+
+/// generic get_before_range() implementation
+template<typename KEY, typename NODE>
+template<typename KEY_OR_ITER>
+typename LLDependencies<KEY, NODE>::dep_range
+LLDependencies<KEY, NODE>::get_before_range(const KEY_OR_ITER& key_iter) const
+{
+    return LLDependencies_dep_range_from<KEY_OR_ITER>()(
+        *this,
+        key_iter,
+        boost::bind<const typename DepNode::dep_set&>(&DepNode::before, _1));
+}
+
+#endif /* ! defined(LL_LLDEPENDENCIES_H) */
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index e8c95d0a76..8aa5b3b62e 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -432,7 +432,7 @@ namespace LLError
 		Settings()
 			:	printLocation(false),
 				defaultLevel(LLError::LEVEL_DEBUG),
-				crashFunction(NULL),
+				crashFunction(),
 				timeFunction(NULL),
 				fileRecorder(NULL),
 				fixedBufferRecorder(NULL),
@@ -600,12 +600,18 @@ namespace LLError
 		s.printLocation = print;
 	}
 
-	void setFatalFunction(FatalFunction f)
+	void setFatalFunction(const FatalFunction& f)
 	{
 		Settings& s = Settings::get();
 		s.crashFunction = f;
 	}
 
+    FatalFunction getFatalFunction()
+    {
+        Settings& s = Settings::get();
+        return s.crashFunction;
+    }
+
 	void setTimeFunction(TimeFunction f)
 	{
 		Settings& s = Settings::get();
diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h
index a55d706d2e..c9424f8a5e 100644
--- a/indra/llcommon/llerrorcontrol.h
+++ b/indra/llcommon/llerrorcontrol.h
@@ -35,7 +35,7 @@
 #define LL_LLERRORCONTROL_H
 
 #include "llerror.h"
-
+#include "boost/function.hpp"
 #include <string>
 
 class LLFixedBuffer;
@@ -83,16 +83,38 @@ namespace LLError
 		Control functions.
 	*/
 
-	typedef void(*FatalFunction)(const std::string& message);
+	typedef boost::function<void(const std::string&)> FatalFunction;
 	void crashAndLoop(const std::string& message);
-		// Default fatal funtion: access null pointer and loops forever
+		// Default fatal function: access null pointer and loops forever
 
-	void setFatalFunction(FatalFunction);
+	void setFatalFunction(const FatalFunction&);
 		// The fatal function will be called when an message of LEVEL_ERROR
 		// is logged.  Note: supressing a LEVEL_ERROR message from being logged
 		// (by, for example, setting a class level to LEVEL_NONE), will keep
 		// the that message from causing the fatal funciton to be invoked.
-		
+
+    FatalFunction getFatalFunction();
+        // Retrieve the previously-set FatalFunction
+
+    /// temporarily override the FatalFunction for the duration of a
+    /// particular scope, e.g. for unit tests
+    class OverrideFatalFunction
+    {
+    public:
+        OverrideFatalFunction(const FatalFunction& func):
+            mPrev(getFatalFunction())
+        {
+            setFatalFunction(func);
+        }
+        ~OverrideFatalFunction()
+        {
+            setFatalFunction(mPrev);
+        }
+
+    private:
+        FatalFunction mPrev;
+    };
+
 	typedef std::string (*TimeFunction)();
 	std::string utcTime();
 	
diff --git a/indra/llcommon/llevent.cpp b/indra/llcommon/llevent.cpp
index 24be6e8b34..f669d0e13f 100644
--- a/indra/llcommon/llevent.cpp
+++ b/indra/llcommon/llevent.cpp
@@ -34,6 +34,8 @@
 
 #include "llevent.h"
 
+using namespace LLOldEvents;
+
 /************************************************
     Events
 ************************************************/
diff --git a/indra/llcommon/llevent.h b/indra/llcommon/llevent.h
index 2b8f276df1..2cc8577219 100644
--- a/indra/llcommon/llevent.h
+++ b/indra/llcommon/llevent.h
@@ -38,6 +38,9 @@
 #include "llpointer.h"
 #include "llthread.h"
 
+namespace LLOldEvents
+{
+
 class LLEventListener;
 class LLEvent;
 class LLEventDispatcher;
@@ -194,4 +197,6 @@ public:
 	LLSD mValue;
 };
 
+} // LLOldEvents
+
 #endif // LL_EVENT_H
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
new file mode 100644
index 0000000000..eb380ba7c8
--- /dev/null
+++ b/indra/llcommon/llevents.cpp
@@ -0,0 +1,501 @@
+/**
+ * @file   llevents.cpp
+ * @author Nat Goodspeed
+ * @date   2008-09-12
+ * @brief  Implementation for llevents.
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+
+#if LL_WINDOWS
+#pragma warning (disable : 4675) // "resolved by ADL" -- just as I want!
+#endif
+
+// associated header
+#include "llevents.h"
+// STL headers
+#include <set>
+#include <sstream>
+#include <algorithm>
+// std headers
+#include <typeinfo>
+#include <cassert>
+#include <cmath>
+#include <cctype>
+// external library headers
+#include <boost/range/iterator_range.hpp>
+#if LL_WINDOWS
+#pragma warning (push)
+#pragma warning (disable : 4701) // compiler thinks might use uninitialized var, but no
+#endif
+#include <boost/lexical_cast.hpp>
+#if LL_WINDOWS
+#pragma warning (pop)
+#endif
+// other Linden headers
+
+/*****************************************************************************
+*   queue_names: specify LLEventPump names that should be instantiated as
+*   LLEventQueue
+*****************************************************************************/
+/**
+ * At present, we recognize particular requested LLEventPump names as needing
+ * LLEventQueues. Later on we'll migrate this information to an external
+ * configuration file.
+ */
+const char* queue_names[] =
+{
+    "placeholder - replace with first real name string"
+};
+
+/*****************************************************************************
+*   If there's a "mainloop" pump, listen on that to flush all LLEventQueues
+*****************************************************************************/
+struct RegisterFlush
+{
+    RegisterFlush():
+        pumps(LLEventPumps::instance()),
+        mainloop(pumps.obtain("mainloop")),
+        name("flushLLEventQueues")
+    {
+        mainloop.listen(name, boost::bind(&RegisterFlush::flush, this, _1));
+    }
+    bool flush(const LLSD&)
+    {
+        pumps.flush();
+        return false;
+    }
+    ~RegisterFlush()
+    {
+        mainloop.stopListening(name);
+    }
+    LLEventPumps& pumps;
+    LLEventPump& mainloop;
+    const std::string name;
+};
+static RegisterFlush registerFlush;
+
+/*****************************************************************************
+*   LLEventPumps
+*****************************************************************************/
+LLEventPumps::LLEventPumps():
+    // Until we migrate this information to an external config file,
+    // initialize mQueueNames from the static queue_names array.
+    mQueueNames(boost::begin(queue_names), boost::end(queue_names))
+{
+}
+
+LLEventPump& LLEventPumps::obtain(const std::string& name)
+{
+    PumpMap::iterator found = mPumpMap.find(name);
+    if (found != mPumpMap.end())
+    {
+        // Here we already have an LLEventPump instance with the requested
+        // name.
+        return *found->second;
+    }
+    // Here we must instantiate an LLEventPump subclass. 
+    LLEventPump* newInstance;
+    // Should this name be an LLEventQueue?
+    PumpNames::const_iterator nfound = mQueueNames.find(name);
+    if (nfound != mQueueNames.end())
+        newInstance = new LLEventQueue(name);
+    else
+        newInstance = new LLEventStream(name);
+    // LLEventPump's constructor implicitly registers each new instance in
+    // mPumpMap. But remember that we instantiated it (in mOurPumps) so we'll
+    // delete it later.
+    mOurPumps.insert(newInstance);
+    return *newInstance;
+}
+
+void LLEventPumps::flush()
+{
+    // Flush every known LLEventPump instance. Leave it up to each instance to
+    // decide what to do with the flush() call.
+    for (PumpMap::iterator pmi = mPumpMap.begin(), pmend = mPumpMap.end(); pmi != pmend; ++pmi)
+    {
+        pmi->second->flush();
+    }
+}
+
+std::string LLEventPumps::registerNew(const LLEventPump& pump, const std::string& name, bool tweak)
+{
+    std::pair<PumpMap::iterator, bool> inserted =
+        mPumpMap.insert(PumpMap::value_type(name, const_cast<LLEventPump*>(&pump)));
+    // If the insert worked, then the name is unique; return that.
+    if (inserted.second)
+        return name;
+    // Here the new entry was NOT inserted, and therefore name isn't unique.
+    // Unless we're permitted to tweak it, that's Bad.
+    if (! tweak)
+    {
+        throw LLEventPump::DupPumpName(std::string("Duplicate LLEventPump name '") + name + "'");
+    }
+    // The passed name isn't unique, but we're permitted to tweak it. Find the
+    // first decimal-integer suffix not already taken. The insert() attempt
+    // above will have set inserted.first to the iterator of the existing
+    // entry by that name. Starting there, walk forward until we reach an
+    // entry that doesn't start with 'name'. For each entry consisting of name
+    // + integer suffix, capture the integer suffix in a set. Use a set
+    // because we're going to encounter string suffixes in the order: name1,
+    // name10, name11, name2, ... Walking those possibilities in that order
+    // isn't convenient to detect the first available "hole."
+    std::set<int> suffixes;
+    PumpMap::iterator pmi(inserted.first), pmend(mPumpMap.end());
+    // We already know inserted.first references the existing entry with
+    // 'name' as the key; skip that one and start with the next.
+    while (++pmi != pmend)
+    {
+        if (pmi->first.substr(0, name.length()) != name)
+        {
+            // Found the first entry beyond the entries starting with 'name':
+            // stop looping.
+            break;
+        }
+        // Here we're looking at an entry that starts with 'name'. Is the rest
+        // of it an integer?
+        // Dubious (?) assumption: in the local character set, decimal digits
+        // are in increasing order such that '9' is the last of them. This
+        // test deals with 'name' values such as 'a', where there might be a
+        // very large number of entries starting with 'a' whose suffixes
+        // aren't integers. A secondary assumption is that digit characters
+        // precede most common name characters (true in ASCII, false in
+        // EBCDIC). The test below is correct either way, but it's worth more
+        // if the assumption holds.
+        if (pmi->first[name.length()] > '9')
+            break;
+        // It should be cheaper to detect that we're not looking at a digit
+        // character -- and therefore the suffix can't possibly be an integer
+        // -- than to attempt the lexical_cast and catch the exception.
+        if (! std::isdigit(pmi->first[name.length()]))
+            continue;
+        // Okay, the first character of the suffix is a digit, it's worth at
+        // least attempting to convert to int.
+        try
+        {
+            suffixes.insert(boost::lexical_cast<int>(pmi->first.substr(name.length())));
+        }
+        catch (const boost::bad_lexical_cast&)
+        {
+            // If the rest of pmi->first isn't an int, just ignore it.
+        }
+    }
+    // Here we've accumulated in 'suffixes' all existing int suffixes of the
+    // entries starting with 'name'. Find the first unused one.
+    int suffix = 1;
+    for ( ; suffixes.find(suffix) != suffixes.end(); ++suffix)
+        ;
+    // Here 'suffix' is not in 'suffixes'. Construct a new name based on that
+    // suffix, insert it and return it.
+    std::ostringstream out;
+    out << name << suffix;
+    return registerNew(pump, out.str(), tweak);
+}
+
+void LLEventPumps::unregister(const LLEventPump& pump)
+{
+    // Remove this instance from mPumpMap
+    PumpMap::iterator found = mPumpMap.find(pump.getName());
+    if (found != mPumpMap.end())
+    {
+        mPumpMap.erase(found);
+    }
+    // If this instance is one we created, also remove it from mOurPumps so we
+    // won't try again to delete it later!
+    PumpSet::iterator psfound = mOurPumps.find(const_cast<LLEventPump*>(&pump));
+    if (psfound != mOurPumps.end())
+    {
+        mOurPumps.erase(psfound);
+    }
+}
+
+LLEventPumps::~LLEventPumps()
+{
+    // On destruction, delete every LLEventPump we instantiated (via
+    // obtain()). CAREFUL: deleting an LLEventPump calls its destructor, which
+    // calls unregister(), which removes that LLEventPump instance from
+    // mOurPumps. So an iterator loop over mOurPumps to delete contained
+    // LLEventPump instances is dangerous! Instead, delete them one at a time
+    // until mOurPumps is empty.
+    while (! mOurPumps.empty())
+    {
+        delete *mOurPumps.begin();
+    }
+}
+
+/*****************************************************************************
+*   LLEventPump
+*****************************************************************************/
+#if LL_WINDOWS
+#pragma warning (push)
+#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
+#endif
+
+LLEventPump::LLEventPump(const std::string& name, bool tweak):
+    // Register every new instance with LLEventPumps
+    mName(LLEventPumps::instance().registerNew(*this, name, tweak)),
+    mEnabled(true)
+{}
+
+#if LL_WINDOWS
+#pragma warning (pop)
+#endif
+
+LLEventPump::~LLEventPump()
+{
+    // Unregister this doomed instance from LLEventPumps
+    LLEventPumps::instance().unregister(*this);
+}
+
+// static data member
+const LLEventPump::NameList LLEventPump::empty;
+
+LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventListener& listener,
+                                         const NameList& after,
+                                         const NameList& before)
+{
+    // Check for duplicate name before connecting listener to mSignal
+    ConnectionMap::const_iterator found = mConnections.find(name);
+    // In some cases the user might disconnect a connection explicitly -- or
+    // might use LLEventTrackable to disconnect implicitly. Either way, we can
+    // end up retaining in mConnections a zombie connection object that's
+    // already been disconnected. Such a connection object can't be
+    // reconnected -- nor, in the case of LLEventTrackable, would we want to
+    // try, since disconnection happens with the destruction of the listener
+    // object. That means it's safe to overwrite a disconnected connection
+    // object with the new one we're attempting. The case we want to prevent
+    // is only when the existing connection object is still connected.
+    if (found != mConnections.end() && found->second.connected())
+    {
+        throw DupListenerName(std::string("Attempt to register duplicate listener name '") + name +
+                              "' on " + typeid(*this).name() + " '" + getName() + "'");
+    }
+    // Okay, name is unique, try to reconcile its dependencies. Specify a new
+    // "node" value that we never use for an mSignal placement; we'll fix it
+    // later.
+    DependencyMap::node_type& newNode = mDeps.add(name, -1.0, after, before);
+    // What if this listener has been added, removed and re-added? In that
+    // case newNode already has a non-negative value because we never remove a
+    // listener from mDeps. But keep processing uniformly anyway in case the
+    // listener was added back with different dependencies. Then mDeps.sort()
+    // would put it in a different position, and the old newNode placement
+    // value would be wrong, so we'd have to reassign it anyway. Trust that
+    // re-adding a listener with the same dependencies is the trivial case for
+    // mDeps.sort(): it can just replay its cache.
+    DependencyMap::sorted_range sorted_range;
+    try
+    {
+        // Can we pick an order that works including this new entry?
+        sorted_range = mDeps.sort();
+    }
+    catch (const DependencyMap::Cycle& e)
+    {
+        // No: the new node's after/before dependencies have made mDeps
+        // unsortable. If we leave the new node in mDeps, it will continue
+        // to screw up all future attempts to sort()! Pull it out.
+        mDeps.remove(name);
+        throw Cycle(std::string("New listener '") + name + "' on " + typeid(*this).name() +
+                    " '" + getName() + "' would cause cycle: " + e.what());
+    }
+    // Walk the list to verify that we haven't changed the order.
+    float previous = 0.0, myprev = 0.0;
+    DependencyMap::sorted_iterator mydmi = sorted_range.end(); // need this visible after loop
+    for (DependencyMap::sorted_iterator dmi = sorted_range.begin();
+         dmi != sorted_range.end(); ++dmi)
+    {
+        // Since we've added the new entry with an invalid placement,
+        // recognize it and skip it.
+        if (dmi->first == name)
+        {
+            // Remember the iterator belonging to our new node, and which
+            // placement value was 'previous' at that point.
+            mydmi = dmi;
+            myprev = previous;
+            continue;
+        }
+        // If the new node has rearranged the existing nodes, we'll find
+        // that their placement values are no longer in increasing order.
+        if (dmi->second < previous)
+        {
+            // This is another scenario in which we'd better back out the
+            // newly-added node from mDeps -- but don't do it yet, we want to
+            // traverse the existing mDeps to report on it!
+            // Describe the change to the order of our listeners. Copy
+            // everything but the newest listener to a vector we can sort to
+            // obtain the old order.
+            typedef std::vector< std::pair<float, std::string> > SortNameList;
+            SortNameList sortnames;
+            for (DependencyMap::sorted_iterator cdmi(sorted_range.begin()), cdmend(sorted_range.end());
+                 cdmi != cdmend; ++cdmi)
+            {
+                if (cdmi->first != name)
+                {
+                    sortnames.push_back(SortNameList::value_type(cdmi->second, cdmi->first));
+                }
+            }
+            std::sort(sortnames.begin(), sortnames.end());
+            std::ostringstream out;
+            out << "New listener '" << name << "' on " << typeid(*this).name() << " '" << getName()
+                << "' would move previous listener '" << dmi->first << "'\nwas: ";
+            SortNameList::const_iterator sni(sortnames.begin()), snend(sortnames.end());
+            if (sni != snend)
+            {
+                out << sni->second;
+                while (++sni != snend)
+                {
+                    out << ", " << sni->second;
+                }
+            }
+            out << "\nnow: ";
+            DependencyMap::sorted_iterator ddmi(sorted_range.begin()), ddmend(sorted_range.end());
+            if (ddmi != ddmend)
+            {
+                out << ddmi->first;
+                while (++ddmi != ddmend)
+                {
+                    out << ", " << ddmi->first;
+                }
+            }
+            // NOW remove the offending listener node.
+            mDeps.remove(name);
+            // Having constructed a description of the order change, inform caller.
+            throw OrderChange(out.str());
+        }
+        // This node becomes the previous one.
+        previous = dmi->second;
+    }
+    // We just got done with a successful mDeps.add(name, ...) call. We'd
+    // better have found 'name' somewhere in that sorted list!
+    assert(mydmi != sorted_range.end());
+    // Four cases:
+    // 0. name is the only entry: placement 1.0
+    // 1. name is the first of several entries: placement (next placement)/2
+    // 2. name is between two other entries: placement (myprev + (next placement))/2
+    // 3. name is the last entry: placement ceil(myprev) + 1.0
+    // Since we've cleverly arranged for myprev to be 0.0 if name is the
+    // first entry, this folds down to two cases. Case 1 is subsumed by
+    // case 2, and case 0 is subsumed by case 3. So we need only handle
+    // cases 2 and 3, which means we need only detect whether name is the
+    // last entry. Increment mydmi to see if there's anything beyond.
+    if (++mydmi != sorted_range.end())
+    {
+        // The new node isn't last. Place it between the previous node and
+        // the successor.
+        newNode = (myprev + mydmi->second)/2.0;
+    }
+    else
+    {
+        // The new node is last. Bump myprev up to the next integer, add
+        // 1.0 and use that.
+        newNode = std::ceil(myprev) + 1.0;
+    }
+    // Now that newNode has a value that places it appropriately in mSignal,
+    // connect it.
+    LLBoundListener bound = mSignal.connect(newNode, listener);
+    mConnections[name] = bound;
+    return bound;
+}
+
+LLBoundListener LLEventPump::getListener(const std::string& name) const
+{
+    ConnectionMap::const_iterator found = mConnections.find(name);
+    if (found != mConnections.end())
+    {
+        return found->second;
+    }
+    // not found, return dummy LLBoundListener
+    return LLBoundListener();
+}
+
+void LLEventPump::stopListening(const std::string& name)
+{
+    ConnectionMap::iterator found = mConnections.find(name);
+    if (found != mConnections.end())
+    {
+        found->second.disconnect();
+        mConnections.erase(found);
+    }
+    // We intentionally do NOT remove this name from mDeps. It may happen that
+    // the same listener with the same name and dependencies will jump on and
+    // off this LLEventPump repeatedly. Keeping a cache of dependencies will
+    // avoid a new dependency sort in such cases.
+}
+
+/*****************************************************************************
+*   LLEventStream
+*****************************************************************************/
+bool LLEventStream::post(const LLSD& event)
+{
+    if (! mEnabled)
+        return false;
+    // Let caller know if any one listener handled the event. This is mostly
+    // useful when using LLEventStream as a listener for an upstream
+    // LLEventPump.
+    return mSignal(event);
+}
+
+/*****************************************************************************
+*   LLEventQueue
+*****************************************************************************/
+bool LLEventQueue::post(const LLSD& event)
+{
+    if (mEnabled)
+    {
+        // Defer sending this event by queueing it until flush()
+        mEventQueue.push_back(event);
+    }
+    // Unconditionally return false. We won't know until flush() whether a
+    // listener claims to have handled the event -- meanwhile, don't block
+    // other listeners.
+    return false;
+}
+
+void LLEventQueue::flush()
+{
+    // Consider the case when a given listener on this LLEventQueue posts yet
+    // another event on the same queue. If we loop over mEventQueue directly,
+    // we'll end up processing all those events during the same flush() call
+    // -- rather like an EventStream. Instead, copy mEventQueue and clear it,
+    // so that any new events posted to this LLEventQueue during flush() will
+    // be processed in the *next* flush() call.
+    EventQueue queue(mEventQueue);
+    mEventQueue.clear();
+    for ( ; ! queue.empty(); queue.pop_front())
+    {
+        mSignal(queue.front());
+    }
+}
+
+/*****************************************************************************
+*   LLListenerOrPumpName
+*****************************************************************************/
+LLListenerOrPumpName::LLListenerOrPumpName(const std::string& pumpname):
+    // Look up the specified pumpname, and bind its post() method as our listener
+    mListener(boost::bind(&LLEventPump::post,
+                          boost::ref(LLEventPumps::instance().obtain(pumpname)),
+                          _1))
+{
+}
+
+LLListenerOrPumpName::LLListenerOrPumpName(const char* pumpname):
+    // Look up the specified pumpname, and bind its post() method as our listener
+    mListener(boost::bind(&LLEventPump::post,
+                          boost::ref(LLEventPumps::instance().obtain(pumpname)),
+                          _1))
+{
+}
+
+bool LLListenerOrPumpName::operator()(const LLSD& event) const
+{
+    if (! mListener)
+    {
+        throw Empty("attempting to call uninitialized");
+    }
+    return (*mListener)(event);
+}
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
new file mode 100644
index 0000000000..2f6515a4cb
--- /dev/null
+++ b/indra/llcommon/llevents.h
@@ -0,0 +1,822 @@
+/**
+ * @file   llevents.h
+ * @author Kent Quirk, Nat Goodspeed
+ * @date   2008-09-11
+ * @brief  This is an implementation of the event system described at
+ *         https://wiki.lindenlab.com/wiki/Viewer:Messaging/Event_System,
+ *         originally introduced in llnotifications.h. It has nothing
+ *         whatsoever to do with the older system in llevent.h.
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLEVENTS_H)
+#define LL_LLEVENTS_H
+
+#include <string>
+#include <map>
+#include <set>
+#include <vector>
+#include <list>
+#include <deque>
+#include <stdexcept>
+#include <boost/signals2.hpp>
+#include <boost/bind.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/utility.hpp>        // noncopyable
+#include <boost/optional/optional.hpp>
+#include <boost/ptr_container/ptr_vector.hpp>
+#include <boost/visit_each.hpp>
+#include <boost/ref.hpp>            // reference_wrapper
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/iteration/local.hpp>
+#include <boost/function.hpp>
+#include <boost/static_assert.hpp>
+#include "llsd.h"
+#include "llsingleton.h"
+#include "lldependencies.h"
+
+// override this to allow binding free functions with more parameters
+#ifndef LLEVENTS_LISTENER_ARITY
+#define LLEVENTS_LISTENER_ARITY 10
+#endif
+
+// hack for testing
+#ifndef testable
+#define testable private
+#endif
+
+/*****************************************************************************
+*   Signal and handler declarations
+*   Using a single handler signature means that we can have a common handler
+*   type, rather than needing a distinct one for each different handler.
+*****************************************************************************/
+
+/**
+ * A boost::signals Combiner that stops the first time a handler returns true
+ * We need this because we want to have our handlers return bool, so that
+ * we have the option to cause a handler to stop further processing. The
+ * default handler fails when the signal returns a value but has no slots.
+ */
+struct LLStopWhenHandled
+{
+    typedef bool result_type;
+
+    template<typename InputIterator>
+    result_type operator()(InputIterator first, InputIterator last) const
+    {
+        for (InputIterator si = first; si != last; ++si)
+		{
+            if (*si)
+			{
+                return true;
+			}
+		}
+        return false;
+    }
+};
+
+/**
+ * We want to have a standard signature for all signals; this way,
+ * we can easily document a protocol for communicating across
+ * dlls and into scripting languages someday.
+ *
+ * We want to return a bool to indicate whether the signal has been
+ * handled and should NOT be passed on to other listeners.
+ * Return true to stop further handling of the signal, and false
+ * to continue.
+ *
+ * We take an LLSD because this way the contents of the signal
+ * are independent of the API used to communicate it.
+ * It is const ref because then there's low cost to pass it;
+ * if you only need to inspect it, it's very cheap.
+ *
+ * @internal
+ * The @c float template parameter indicates that we will internally use @c
+ * float to indicate relative listener order on a given LLStandardSignal.
+ * Don't worry, the @c float values are strictly internal! They are not part
+ * of the interface, for the excellent reason that requiring the caller to
+ * specify a numeric key to establish order means that the caller must know
+ * the universe of possible values. We use LLDependencies for that instead.
+ */
+typedef boost::signals2::signal<bool(const LLSD&), LLStopWhenHandled, float>  LLStandardSignal;
+/// Methods that forward listeners (e.g. constructed with
+/// <tt>boost::bind()</tt>) should accept (const LLEventListener&)
+typedef LLStandardSignal::slot_type LLEventListener;
+/// Result of registering a listener, supports <tt>connected()</tt>,
+/// <tt>disconnect()</tt> and <tt>blocked()</tt>
+typedef boost::signals2::connection LLBoundListener;
+
+/**
+ * A common idiom for event-based code is to accept either a callable --
+ * directly called on completion -- or the string name of an LLEventPump on
+ * which to post the completion event. Specifying a parameter as <tt>const
+ * LLListenerOrPumpName&</tt> allows either.
+ *
+ * Calling a validly-constructed LLListenerOrPumpName, passing the LLSD
+ * 'event' object, either calls the callable or posts the event to the named
+ * LLEventPump.
+ *
+ * A default-constructed LLListenerOrPumpName is 'empty'. (This is useful as
+ * the default value of an optional method parameter.) Calling it throws
+ * LLListenerOrPumpName::Empty. Test for this condition beforehand using
+ * either <tt>if (param)</tt> or <tt>if (! param)</tt>.
+ */
+class LLListenerOrPumpName
+{
+public:
+    /// passing string name of LLEventPump
+    LLListenerOrPumpName(const std::string& pumpname);
+    /// passing string literal (overload so compiler isn't forced to infer
+    /// double conversion)
+    LLListenerOrPumpName(const char* pumpname);
+    /// passing listener -- the "anything else" catch-all case. The type of an
+    /// object constructed by boost::bind() isn't intended to be written out.
+    /// Normally we'd just accept 'const LLEventListener&', but that would
+    /// require double implicit conversion: boost::bind() object to
+    /// LLEventListener, LLEventListener to LLListenerOrPumpName. So use a
+    /// template to forward anything.
+    template<typename T>
+    LLListenerOrPumpName(const T& listener): mListener(listener) {}
+
+    /// for omitted method parameter: uninitialized mListener
+    LLListenerOrPumpName() {}
+
+    /// test for validity
+    operator bool() const { return bool(mListener); }
+    bool operator! () const { return ! mListener; }
+
+    /// explicit accessor
+    const LLEventListener& getListener() const { return *mListener; }
+
+    /// implicit conversion to LLEventListener
+    operator LLEventListener() const { return *mListener; }
+
+    /// allow calling directly
+    bool operator()(const LLSD& event) const;
+
+    /// exception if you try to call when empty
+    struct Empty: public std::runtime_error
+    {
+        Empty(const std::string& what):
+            std::runtime_error(std::string("LLListenerOrPumpName::Empty: ") + what) {}
+    };
+
+private:
+    boost::optional<LLEventListener> mListener;
+};
+
+/*****************************************************************************
+*   LLEventPumps
+*****************************************************************************/
+class LLEventPump;
+
+/**
+ * LLEventPumps is a Singleton manager through which one typically accesses
+ * this subsystem.
+ */
+class LLEventPumps: public LLSingleton<LLEventPumps>
+{
+    friend class LLSingleton<LLEventPumps>;
+public:
+    /**
+     * Find or create an LLEventPump instance with a specific name. We return
+     * a reference so there's no question about ownership. obtain() @em finds
+     * an instance without conferring @em ownership.
+     */
+    LLEventPump& obtain(const std::string& name);
+    /**
+     * Flush all known LLEventPump instances
+     */
+    void flush();
+
+private:
+    friend class LLEventPump;
+    /**
+     * Register a new LLEventPump instance (internal)
+     */
+    std::string registerNew(const LLEventPump&, const std::string& name, bool tweak);
+    /**
+     * Unregister a doomed LLEventPump instance (internal)
+     */
+    void unregister(const LLEventPump&);
+
+private:
+    LLEventPumps();
+    ~LLEventPumps();
+
+testable:
+    // Map of all known LLEventPump instances, whether or not we instantiated
+    // them. We store a plain old LLEventPump* because this map doesn't claim
+    // ownership of the instances. Though the common usage pattern is to
+    // request an instance using obtain(), it's fair to instantiate an
+    // LLEventPump subclass statically, as a class member, on the stack or on
+    // the heap. In such cases, the instantiating party is responsible for its
+    // lifespan.
+    typedef std::map<std::string, LLEventPump*> PumpMap;
+    PumpMap mPumpMap;
+    // Set of all LLEventPumps we instantiated. Membership in this set means
+    // we claim ownership, and will delete them when this LLEventPumps is
+    // destroyed.
+    typedef std::set<LLEventPump*> PumpSet;
+    PumpSet mOurPumps;
+    // LLEventPump names that should be instantiated as LLEventQueue rather
+    // than as LLEventStream
+    typedef std::set<std::string> PumpNames;
+    PumpNames mQueueNames;
+};
+
+/*****************************************************************************
+*   details
+*****************************************************************************/
+namespace LLEventDetail
+{
+    /// Any callable capable of connecting an LLEventListener to an
+    /// LLStandardSignal to produce an LLBoundListener can be mapped to this
+    /// signature.
+    typedef boost::function<LLBoundListener(const LLEventListener&)> ConnectFunc;
+
+    /**
+     * Utility template function to use Visitor appropriately
+     *
+     * @param listener Callable to connect, typically a boost::bind()
+     * expression. This will be visited by Visitor using boost::visit_each().
+     * @param connect_func Callable that will connect() @a listener to an
+     * LLStandardSignal, returning LLBoundListener.
+     */
+    template <typename LISTENER>
+    LLBoundListener visit_and_connect(const LISTENER& listener,
+                                      const ConnectFunc& connect_func);
+} // namespace LLEventDetail
+
+/*****************************************************************************
+*   LLEventPump
+*****************************************************************************/
+/**
+ * LLEventPump is the base class interface through which we access the
+ * concrete subclasses LLEventStream and LLEventQueue.
+ */
+class LLEventPump: boost::noncopyable
+{
+public:
+    /**
+     * Exception thrown by LLEventPump(). You are trying to instantiate an
+     * LLEventPump (subclass) using the same name as some other instance, and
+     * you didn't pass <tt>tweak=true</tt> to permit it to generate a unique
+     * variant.
+     */
+    struct DupPumpName: public std::runtime_error
+    {
+        DupPumpName(const std::string& what):
+            std::runtime_error(std::string("DupPumpName: ") + what) {}
+    };
+
+    /**
+     * Instantiate an LLEventPump (subclass) with the string name by which it
+     * can be found using LLEventPumps::obtain().
+     *
+     * If you pass (or default) @a tweak to @c false, then a duplicate name
+     * will throw DupPumpName. This won't happen if LLEventPumps::obtain()
+     * instantiates the LLEventPump, because obtain() uses find-or-create
+     * logic. It can only happen if you instantiate an LLEventPump in your own
+     * code -- and a collision with the name of some other LLEventPump is
+     * likely to cause much more subtle problems!
+     *
+     * When you hand-instantiate an LLEventPump, consider passing @a tweak as
+     * @c true. This directs LLEventPump() to append a suffix to the passed @a
+     * name to make it unique. You can retrieve the adjusted name by calling
+     * getName() on your new instance.
+     */
+    LLEventPump(const std::string& name, bool tweak=false);
+    virtual ~LLEventPump();
+
+    /// group exceptions thrown by listen(). We use exceptions because these
+    /// particular errors are likely to be coding errors, found and fixed by
+    /// the developer even before preliminary checkin.
+    struct ListenError: public std::runtime_error
+    {
+        ListenError(const std::string& what): std::runtime_error(what) {}
+    };
+    /**
+     * exception thrown by listen(). You are attempting to register a
+     * listener on this LLEventPump using the same listener name as an
+     * already-registered listener.
+     */
+    struct DupListenerName: public ListenError
+    {
+        DupListenerName(const std::string& what):
+            ListenError(std::string("DupListenerName: ") + what)
+        {}
+    };
+    /**
+     * exception thrown by listen(). The order dependencies specified for your
+     * listener are incompatible with existing listeners.
+     *
+     * Consider listener "a" which specifies before "b" and "b" which
+     * specifies before "c". You are now attempting to register "c" before
+     * "a". There is no order that can satisfy all constraints.
+     */
+    struct Cycle: public ListenError
+    {
+        Cycle(const std::string& what): ListenError(std::string("Cycle: ") + what) {}
+    };
+    /**
+     * exception thrown by listen(). This one means that your new listener
+     * would force a change to the order of previously-registered listeners,
+     * and we don't have a good way to implement that.
+     *
+     * Consider listeners "some", "other" and "third". "some" and "other" are
+     * registered earlier without specifying relative order, so "other"
+     * happens to be first. Now you attempt to register "third" after "some"
+     * and before "other". Whoops, that would require swapping "some" and
+     * "other", which we can't do. Instead we throw this exception.
+     *
+     * It may not be possible to change the registration order so we already
+     * know "third"s order requirement by the time we register the second of
+     * "some" and "other". A solution would be to specify that "some" must
+     * come before "other", or equivalently that "other" must come after
+     * "some".
+     */
+    struct OrderChange: public ListenError
+    {
+        OrderChange(const std::string& what): ListenError(std::string("OrderChange: ") + what) {}
+    };
+
+    /// used by listen()
+    typedef std::vector<std::string> NameList;
+    /// convenience placeholder for when you explicitly want to pass an empty
+    /// NameList
+    const static NameList empty;
+
+    /// Get this LLEventPump's name
+    std::string getName() const { return mName; }
+
+    /**
+     * Register a new listener with a unique name. Specify an optional list
+     * of other listener names after which this one must be called, likewise
+     * an optional list of other listener names before which this one must be
+     * called. The other listeners mentioned need not yet be registered
+     * themselves. listen() can throw any ListenError; see ListenError
+     * subclasses.
+     *
+     * If (as is typical) you pass a <tt>boost::bind()</tt> expression,
+     * listen() will inspect the components of that expression. If a bound
+     * object matches any of several cases, the connection will automatically
+     * be disconnected when that object is destroyed.
+     *
+     * * You bind a <tt>boost::weak_ptr</tt>.
+     * * Binding a <tt>boost::shared_ptr</tt> that way would ensure that the
+     *   referenced object would @em never be destroyed, since the @c
+     *   shared_ptr stored in the LLEventPump would remain an outstanding
+     *   reference. Use the weaken() function to convert your @c shared_ptr to
+     *   @c weak_ptr. Because this is easy to forget, binding a @c shared_ptr
+     *   will produce a compile error (@c BOOST_STATIC_ASSERT failure).
+     * * You bind a simple pointer or reference to an object derived from
+     *   <tt>boost::enable_shared_from_this</tt>. (UNDER CONSTRUCTION)
+     * * You bind a simple pointer or reference to an object derived from
+     *   LLEventTrackable. Unlike the cases described above, though, this is
+     *   vulnerable to a couple of cross-thread race conditions, as described
+     *   in the LLEventTrackable documentation.
+     */
+    template <typename LISTENER>
+    LLBoundListener listen(const std::string& name, const LISTENER& listener,
+                           const NameList& after=NameList(),
+                           const NameList& before=NameList())
+    {
+        // Examine listener, using our listen_impl() method to make the
+        // actual connection.
+        // This is why listen() is a template. Conversion from boost::bind()
+        // to LLEventListener performs type erasure, so it's important to look
+        // at the boost::bind object itself before that happens.
+        return LLEventDetail::visit_and_connect(listener,
+                                                boost::bind(&LLEventPump::listen_impl,
+                                                            this,
+                                                            name,
+                                                            _1,
+                                                            after,
+                                                            before));
+    }
+
+    /// Get the LLBoundListener associated with the passed name (dummy
+    /// LLBoundListener if not found)
+    virtual LLBoundListener getListener(const std::string& name) const;
+    /**
+     * Instantiate one of these to block an existing connection:
+     * @code
+     * { // in some local scope
+     *     LLEventPump::Blocker block(someLLBoundListener);
+     *     // code that needs the connection blocked
+     * } // unblock the connection again
+     * @endcode
+     */
+    typedef boost::signals2::shared_connection_block Blocker;
+    /// Unregister a listener by name. Prefer this to
+    /// <tt>getListener(name).disconnect()</tt> because stopListening() also
+    /// forgets this name.
+    virtual void stopListening(const std::string& name);
+    /// Post an event to all listeners. The @c bool return is only meaningful
+    /// if the underlying leaf class is LLEventStream -- beware of relying on
+    /// it too much! Truthfully, we return @c bool mostly to permit chaining
+    /// one LLEventPump as a listener on another.
+    virtual bool post(const LLSD&) = 0;
+    /// Enable/disable: while disabled, silently ignore all post() calls
+    virtual void enable(bool enabled=true) { mEnabled = enabled; }
+    /// query
+    virtual bool enabled() const { return mEnabled; }
+
+private:
+    friend class LLEventPumps;
+    /// flush queued events
+    virtual void flush() {}
+
+private:
+    virtual LLBoundListener listen_impl(const std::string& name, const LLEventListener&,
+                                        const NameList& after,
+                                        const NameList& before);
+    std::string mName;
+
+protected:
+    /// implement the dispatching
+    LLStandardSignal mSignal;
+    /// valve open?
+    bool mEnabled;
+    /// Map of named listeners. This tracks the listeners that actually exist
+    /// at this moment. When we stopListening(), we discard the entry from
+    /// this map.
+    typedef std::map<std::string, boost::signals2::connection> ConnectionMap;
+    ConnectionMap mConnections;
+    typedef LLDependencies<std::string, float> DependencyMap;
+    /// Dependencies between listeners. For each listener, track the float
+    /// used to establish its place in mSignal's order. This caches all the
+    /// listeners that have ever registered; stopListening() does not discard
+    /// the entry from this map. This is to avoid a new dependency sort if the
+    /// same listener with the same dependencies keeps hopping on and off this
+    /// LLEventPump.
+    DependencyMap mDeps;
+};
+
+/*****************************************************************************
+*   LLEventStream
+*****************************************************************************/
+/**
+ * LLEventStream is a thin wrapper around LLStandardSignal. Posting an
+ * event immediately calls all registered listeners.
+ */
+class LLEventStream: public LLEventPump
+{
+public:
+    LLEventStream(const std::string& name, bool tweak=false): LLEventPump(name, tweak) {}
+    virtual ~LLEventStream() {}
+
+    /// Post an event to all listeners
+    virtual bool post(const LLSD& event);
+};
+
+/*****************************************************************************
+*   LLEventQueue
+*****************************************************************************/
+/**
+ * LLEventQueue isa LLEventPump whose post() method defers calling registered
+ * listeners until flush() is called.
+ */
+class LLEventQueue: public LLEventPump
+{
+public:
+    LLEventQueue(const std::string& name, bool tweak=false): LLEventPump(name, tweak) {}
+    virtual ~LLEventQueue() {}
+
+    /// Post an event to all listeners
+    virtual bool post(const LLSD& event);
+
+private:
+    /// flush queued events
+    virtual void flush();
+
+private:
+    typedef std::deque<LLSD> EventQueue;
+    EventQueue mEventQueue;
+};
+
+/*****************************************************************************
+*   LLEventTrackable and underpinnings
+*****************************************************************************/
+/**
+ * LLEventTrackable wraps boost::signals2::trackable, which resembles
+ * boost::trackable. Derive your listener class from LLEventTrackable instead,
+ * and use something like
+ * <tt>LLEventPump::listen(boost::bind(&YourTrackableSubclass::method,
+ * instance, _1))</tt>. This will implicitly disconnect when the object
+ * referenced by @c instance is destroyed.
+ *
+ * @note
+ * LLEventTrackable doesn't address a couple of cases:
+ * * Object destroyed during call
+ *   - You enter a slot call in thread A.
+ *   - Thread B destroys the object, which of course disconnects it from any
+ *     future slot calls.
+ *   - Thread A's call uses 'this', which now refers to a defunct object.
+ *     Undefined behavior results.
+ * * Call during destruction
+ *   - @c MySubclass is derived from LLEventTrackable.
+ *   - @c MySubclass registers one of its own methods using
+ *     <tt>LLEventPump::listen()</tt>.
+ *   - The @c MySubclass object begins destruction. <tt>~MySubclass()</tt>
+ *     runs, destroying state specific to the subclass. (For instance, a
+ *     <tt>Foo*</tt> data member is <tt>delete</tt>d but not zeroed.)
+ *   - The listening method will not be disconnected until
+ *     <tt>~LLEventTrackable()</tt> runs.
+ *   - Before we get there, another thread posts data to the @c LLEventPump
+ *     instance, calling the @c MySubclass method.
+ *   - The method in question relies on valid @c MySubclass state. (For
+ *     instance, it attempts to dereference the <tt>Foo*</tt> pointer that was
+ *     <tt>delete</tt>d but not zeroed.)
+ *   - Undefined behavior results.
+ * If you suspect you may encounter any such scenario, you're better off
+ * managing the lifespan of your object with <tt>boost::shared_ptr</tt>.
+ * Passing <tt>LLEventPump::listen()</tt> a <tt>boost::bind()</tt> expression
+ * involving a <tt>boost::weak_ptr<Foo></tt> is recognized specially, engaging
+ * thread-safe Boost.Signals2 machinery.
+ */
+typedef boost::signals2::trackable LLEventTrackable;
+
+/**
+ * We originally provided a suite of overloaded
+ * LLEventTrackable::listenTo(LLEventPump&, ...) methods that would call
+ * LLEventPump::listen(...) and then pass the returned LLBoundListener to
+ * LLEventTrackable::track(). This was workable but error-prone: the coder
+ * must remember to call listenTo() rather than the more straightforward
+ * listen() method.
+ *
+ * Now we publish only the single canonical listen() method, so there's a
+ * uniform mechanism. Having a single way to do this is good, in that there's
+ * no question in the coder's mind which of several alternatives to choose.
+ *
+ * To support automatic connection management, we use boost::visit_each
+ * (http://www.boost.org/doc/libs/1_37_0/doc/html/boost/visit_each.html) to
+ * inspect each argument of a boost::bind expression. (Although the visit_each
+ * mechanism was first introduced with the original Boost.Signals library, it
+ * was only later documented.)
+ *
+ * Cases:
+ * * At least one of the function's arguments is a boost::weak_ptr<T>. Pass
+ *   the corresponding shared_ptr to slot_type::track(). Ideally that would be
+ *   the object whose method we want to call, but in fact we do the same for
+ *   any weak_ptr we might find among the bound arguments. If we're passing
+ *   our bound method a weak_ptr to some object, wouldn't the destruction of
+ *   that object invalidate the call? So we disconnect automatically when any
+ *   such object is destroyed. This is the mechanism preferred by boost::
+ *   signals2.
+ * * One of the functions's arguments is a boost::shared_ptr<T>. This produces
+ *   a compile error: the bound copy of the shared_ptr stored in the
+ *   boost_bind object stored in the signal object would make the referenced
+ *   T object immortal. We provide a weaken() function. Pass
+ *   weaken(your_shared_ptr) instead. (We can inspect, but not modify, the
+ *   boost::bind object. Otherwise we'd replace the shared_ptr with weak_ptr
+ *   implicitly and just proceed.)
+ * * One of the function's arguments is a plain pointer/reference to an object
+ *   derived from boost::enable_shared_from_this. We assume that this object
+ *   is managed using boost::shared_ptr, so we implicitly extract a shared_ptr
+ *   and track that. (UNDER CONSTRUCTION)
+ * * One of the function's arguments is derived from LLEventTrackable. Pass
+ *   the LLBoundListener to its LLEventTrackable::track(). This is vulnerable
+ *   to a couple different race conditions, as described in LLEventTrackable
+ *   documentation. (NOTE: Now that LLEventTrackable is a typedef for
+ *   boost::signals2::trackable, the Signals2 library handles this itself, so
+ *   our visitor needs no special logic for this case.)
+ * * Any other argument type is irrelevant to automatic connection management.
+ */
+
+namespace LLEventDetail
+{
+    template <typename F>
+    const F& unwrap(const F& f) { return f; }
+
+    template <typename F>
+    const F& unwrap(const boost::reference_wrapper<F>& f) { return f.get(); }
+
+    // Most of the following is lifted from the Boost.Signals use of
+    // visit_each.
+    template<bool Cond> struct truth {};
+
+    /**
+     * boost::visit_each() Visitor, used on a template argument <tt>const F&
+     * f</tt> as follows (see visit_and_connect()):
+     * @code
+     * LLEventListener listener(f);
+     * Visitor visitor(listener); // bind listener so it can track() shared_ptrs
+     * using boost::visit_each;   // allow unqualified visit_each() call for ADL
+     * visit_each(visitor, unwrap(f));
+     * @endcode
+     */
+    class Visitor
+    {
+    public:
+        /**
+         * Visitor binds a reference to LLEventListener so we can track() any
+         * shared_ptrs we find in the argument list.
+         */
+        Visitor(LLEventListener& listener):
+            mListener(listener)
+        {
+        }
+
+        /**
+         * boost::visit_each() calls this method for each component of a
+         * boost::bind() expression.
+         */
+        template <typename T>
+        void operator()(const T& t) const
+        {
+            decode(t, 0);
+        }
+
+    private:
+        // decode() decides between a reference wrapper and anything else
+        // boost::ref() variant
+        template<typename T>
+        void decode(const boost::reference_wrapper<T>& t, int) const
+        {
+//          add_if_trackable(t.get_pointer());
+        }
+
+        // decode() anything else
+        template<typename T>
+        void decode(const T& t, long) const
+        {
+            typedef truth<(boost::is_pointer<T>::value)> is_a_pointer;
+            maybe_get_pointer(t, is_a_pointer());
+        }
+
+        // maybe_get_pointer() decides between a pointer and a non-pointer
+        // plain pointer variant
+        template<typename T>
+        void maybe_get_pointer(const T& t, truth<true>) const
+        {
+//          add_if_trackable(t);
+        }
+
+        // shared_ptr variant
+        template<typename T>
+        void maybe_get_pointer(const boost::shared_ptr<T>& t, truth<false>) const
+        {
+            // If we have a shared_ptr to this object, it doesn't matter
+            // whether the object is derived from LLEventTrackable, so no
+            // further analysis of T is needed.
+//          mListener.track(t);
+
+            // Make this case illegal. Passing a bound shared_ptr to
+            // slot_type::track() is useless, since the bound shared_ptr will
+            // keep the object alive anyway! Force the coder to cast to weak_ptr.
+
+            // Trivial as it is, make the BOOST_STATIC_ASSERT() condition
+            // dependent on template param so the macro is only evaluated if
+            // this method is in fact instantiated, as described here:
+            // http://www.boost.org/doc/libs/1_34_1/doc/html/boost_staticassert.html
+
+            // ATTENTION: Don't bind a shared_ptr<anything> using
+            // LLEventPump::listen(boost::bind()). Doing so captures a copy of
+            // the shared_ptr, making the referenced object effectively
+            // immortal. Use the weaken() function, e.g.:
+            // somepump.listen(boost::bind(...weaken(my_shared_ptr)...));
+            // This lets us automatically disconnect when the referenced
+            // object is destroyed.
+            BOOST_STATIC_ASSERT(sizeof(T) == 0);
+        }
+
+        // weak_ptr variant
+        template<typename T>
+        void maybe_get_pointer(const boost::weak_ptr<T>& t, truth<false>) const
+        {
+            // If we have a weak_ptr to this object, it doesn't matter
+            // whether the object is derived from LLEventTrackable, so no
+            // further analysis of T is needed.
+            mListener.track(t);
+//          std::cout << "Found weak_ptr<" << typeid(T).name() << ">!\n";
+        }
+
+#if 0
+        // reference to anything derived from boost::enable_shared_from_this
+        template <typename T>
+        inline void maybe_get_pointer(const boost::enable_shared_from_this<T>& ct,
+                                      truth<false>) const
+        {
+            // Use the slot_type::track(shared_ptr) mechanism. Cast away
+            // const-ness because (in our code base anyway) it's unusual
+            // to find shared_ptr<const T>.
+            boost::enable_shared_from_this<T>&
+                t(const_cast<boost::enable_shared_from_this<T>&>(ct));
+            std::cout << "Capturing shared_from_this()" << std::endl;
+            boost::shared_ptr<T> sp(t.shared_from_this());
+/*==========================================================================*|
+            std::cout << "Capturing weak_ptr" << std::endl;
+            boost::weak_ptr<T> wp(sp);
+|*==========================================================================*/
+            std::cout << "Tracking shared__ptr" << std::endl;
+            mListener.track(sp);
+        }
+#endif
+
+        // non-pointer variant
+        template<typename T>
+        void maybe_get_pointer(const T& t, truth<false>) const
+        {
+            // Take the address of this object, because the object itself may be
+            // trackable
+//          add_if_trackable(boost::addressof(t));
+        }
+
+/*==========================================================================*|
+        // add_if_trackable() adds LLEventTrackable objects to mTrackables
+        inline void add_if_trackable(const LLEventTrackable* t) const
+        {
+            if (t)
+            {
+            }
+        }
+
+        // pointer to anything not an LLEventTrackable subclass
+        inline void add_if_trackable(const void*) const
+        {
+        }
+
+        // pointer to free function
+        // The following construct uses the preprocessor to generate
+        // add_if_trackable() overloads accepting pointer-to-function taking
+        // 0, 1, ..., LLEVENTS_LISTENER_ARITY parameters of arbitrary type.
+#define BOOST_PP_LOCAL_MACRO(n)                                     \
+        template <typename R                                        \
+                  BOOST_PP_COMMA_IF(n)                              \
+                  BOOST_PP_ENUM_PARAMS(n, typename T)>              \
+        inline void                                                 \
+        add_if_trackable(R (*)(BOOST_PP_ENUM_PARAMS(n, T))) const   \
+        {                                                           \
+        }
+#define BOOST_PP_LOCAL_LIMITS (0, LLEVENTS_LISTENER_ARITY)
+#include BOOST_PP_LOCAL_ITERATE()
+#undef  BOOST_PP_LOCAL_MACRO
+#undef  BOOST_PP_LOCAL_LIMITS
+|*==========================================================================*/
+
+        /// Bind a reference to the LLEventListener to call its track() method.
+        LLEventListener& mListener;
+    };
+
+    /**
+     * Utility template function to use Visitor appropriately
+     *
+     * @param raw_listener Callable to connect, typically a boost::bind()
+     * expression. This will be visited by Visitor using boost::visit_each().
+     * @param connect_funct Callable that will connect() @a raw_listener to an
+     * LLStandardSignal, returning LLBoundListener.
+     */
+    template <typename LISTENER>
+    LLBoundListener visit_and_connect(const LISTENER& raw_listener,
+                                      const ConnectFunc& connect_func)
+    {
+        // Capture the listener
+        LLEventListener listener(raw_listener);
+        // Define our Visitor, binding the listener so we can call
+        // listener.track() if we discover any shared_ptr<Foo>.
+        LLEventDetail::Visitor visitor(listener);
+        // Allow unqualified visit_each() call for ADL
+        using boost::visit_each;
+        // Visit each component of a boost::bind() expression. Pass
+        // 'raw_listener', our template argument, rather than 'listener' from
+        // which type details have been erased. unwrap() comes from
+        // Boost.Signals, in case we were passed a boost::ref().
+        visit_each(visitor, LLEventDetail::unwrap(raw_listener));
+        // Make the connection using passed function. At present, wrapping
+        // this functionality into this function is a bit silly: we don't
+        // really need a visit_and_connect() function any more, just a visit()
+        // function. The definition of this function dates from when, after
+        // visit_each(), after establishing the connection, we had to
+        // postprocess the new connection with the visitor object. That's no
+        // longer necessary.
+        return connect_func(listener);
+    }
+} // namespace LLEventDetail
+
+// Somewhat to my surprise, passing boost::bind(...boost::weak_ptr<T>...) to
+// listen() fails in Boost code trying to instantiate LLEventListener (i.e.
+// LLStandardSignal::slot_type) because the boost::get_pointer() utility function isn't
+// specialized for boost::weak_ptr. This remedies that omission.
+namespace boost
+{
+    template <typename T>
+    T* get_pointer(const weak_ptr<T>& ptr) { return shared_ptr<T>(ptr).get(); }
+}
+
+/// Since we forbid use of listen(boost::bind(...shared_ptr<T>...)), provide an
+/// easy way to cast to the corresponding weak_ptr.
+template <typename T>
+boost::weak_ptr<T> weaken(const boost::shared_ptr<T>& ptr)
+{
+    return boost::weak_ptr<T>(ptr);
+}
+
+#endif /* ! defined(LL_LLEVENTS_H) */
diff --git a/indra/llcommon/lllazy.cpp b/indra/llcommon/lllazy.cpp
new file mode 100644
index 0000000000..215095bc27
--- /dev/null
+++ b/indra/llcommon/lllazy.cpp
@@ -0,0 +1,23 @@
+/**
+ * @file   lllazy.cpp
+ * @author Nat Goodspeed
+ * @date   2009-01-28
+ * @brief  Implementation for lllazy.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "lllazy.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+
+// lllazy.h is presently header-only. This file exists only because our CMake
+// test macro ADD_BUILD_TEST requires it.
+int dummy = 0;
diff --git a/indra/llcommon/lllazy.h b/indra/llcommon/lllazy.h
new file mode 100644
index 0000000000..2240954d98
--- /dev/null
+++ b/indra/llcommon/lllazy.h
@@ -0,0 +1,382 @@
+/**
+ * @file   lllazy.h
+ * @author Nat Goodspeed
+ * @date   2009-01-22
+ * @brief  Lazy instantiation of specified type. Useful in conjunction with
+ *         Michael Feathers's "Extract and Override Getter" ("Working
+ *         Effectively with Legacy Code", p. 352).
+ *
+ * Quoting his synopsis of steps on p.355:
+ *
+ * 1. Identify the object you need a getter for.
+ * 2. Extract all of the logic needed to create the object into a getter.
+ * 3. Replace all uses of the object with calls to the getter, and initialize
+ *    the reference that holds the object to null in all constructors.
+ * 4. Add the first-time logic to the getter so that the object is constructed
+ *    and assigned to the reference whenever the reference is null.
+ * 5. Subclass the class and override the getter to provide an alternative
+ *    object for testing.
+ *
+ * It's the second half of bullet 3 (3b, as it were) that bothers me. I find
+ * it all too easy to imagine adding pointer initializers to all but one
+ * constructor... the one not exercised by my tests. That suggested using
+ * (e.g.) boost::scoped_ptr<MyObject> so you don't have to worry about
+ * destroying it either.
+ *
+ * However, introducing additional machinery allows us to encapsulate bullet 4
+ * as well.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLLAZY_H)
+#define LL_LLLAZY_H
+
+#include <boost/function.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <boost/lambda/construct.hpp>
+#include <stdexcept>
+
+/// LLLazyCommon simply factors out of LLLazy<T> things that don't depend on
+/// its template parameter.
+class LLLazyCommon
+{
+public:
+    /**
+     * This exception is thrown if you try to replace an LLLazy<T>'s factory
+     * (or T* instance) after it already has an instance in hand. Since T
+     * might well be stateful, we can't know the effect of silently discarding
+     * and replacing an existing instance, so we disallow it. This facility is
+     * intended for testing, and in a test scenario we can definitely control
+     * that.
+     */
+    struct InstanceChange: public std::runtime_error
+    {
+        InstanceChange(const std::string& what): std::runtime_error(what) {}
+    };
+
+protected:
+    /**
+     * InstanceChange might be appropriate in a couple of different LLLazy<T>
+     * methods. Factor out the common logic.
+     */
+    template <typename PTR>
+    static void ensureNoInstance(const PTR& ptr)
+    {
+        if (ptr)
+        {
+            // Too late: we've already instantiated the lazy object. We don't
+            // know whether it's stateful or not, so it's not safe to discard
+            // the existing instance in favor of a replacement.
+            throw InstanceChange("Too late to replace LLLazy instance");
+        }
+    }
+};
+
+/**
+ * LLLazy<T> is useful when you have an outer class Outer that you're trying
+ * to bring under unit test, that contains a data member difficult to
+ * instantiate in a test harness. Typically the data member's class Inner has
+ * many thorny dependencies. Feathers generally advocates "Extract and
+ * Override Factory Method" (p. 350). But in C++, you can't call a derived
+ * class override of a virtual method from the derived class constructor,
+ * which limits applicability of "Extract and Override Factory Method." For
+ * such cases Feathers presents "Extract and Override Getter" (p. 352).
+ *
+ * So we'll assume that your class Outer contains a member like this:
+ * @code
+ * Inner mInner;
+ * @endcode
+ *
+ * LLLazy<Inner> can be used to replace this member. You can directly declare:
+ * @code
+ * LLLazy<Inner> mInner;
+ * @endcode
+ * and change references to mInner accordingly.
+ *
+ * (Alternatively, you can add a base class of the form
+ * <tt>LLLazyBase<Inner></tt>. This is discussed further in the LLLazyBase<T>
+ * documentation.)
+ *
+ * LLLazy<T> binds a <tt>boost::scoped_ptr<T></tt> and a factory functor
+ * returning T*. You can either bind that functor explicitly or let it default
+ * to the expression <tt>new T()</tt>.
+ *
+ * As long as LLLazy<T> remains unreferenced, its T remains uninstantiated.
+ * The first time you use get(), <tt>operator*()</tt> or <tt>operator->()</tt>
+ * it will instantiate its T and thereafter behave like a pointer to it.
+ *
+ * Thus, any existing reference to <tt>mInner.member</tt> should be replaced
+ * with <tt>mInner->member</tt>. Any simple reference to @c mInner should be
+ * replaced by <tt>*mInner</tt>.
+ *
+ * (If the original declaration was a pointer initialized in Outer's
+ * constructor, e.g. <tt>Inner* mInner</tt>, so much the better. In that case
+ * you should be able to drop in <tt>LLLazy<Inner></tt> without much change.)
+ *
+ * The support for "Extract and Override Getter" lies in the fact that you can
+ * replace the factory functor -- or provide an explicit T*. Presumably this
+ * is most useful from a test subclass -- which suggests that your @c mInner
+ * member should be @c protected.
+ *
+ * Note that <tt>boost::lambda::new_ptr<T>()</tt> makes a dandy factory
+ * functor, for either the set() method or LLLazy<T>'s constructor. If your T
+ * requires constructor arguments, use an expression more like
+ * <tt>boost::lambda::bind(boost::lambda::new_ptr<T>(), arg1, arg2, ...)</tt>.
+ *
+ * Of course the point of replacing the functor is to substitute a class that,
+ * though referenced as Inner*, is not an Inner; presumably this is a testing
+ * subclass of Inner (e.g. TestInner). Thus your test subclass TestOuter for
+ * the containing class Outer will contain something like this:
+ * @code
+ * class TestOuter: public Outer
+ * {
+ * public:
+ *     TestOuter()
+ *     {
+ *         // mInner must be 'protected' rather than 'private'
+ *         mInner.set(boost::lambda::new_ptr<TestInner>());
+ *     }
+ *     ...
+ * };
+ * @endcode
+ */
+template <typename T>
+class LLLazy: public LLLazyCommon
+{
+public:
+    /// Any nullary functor returning T* will work as a Factory
+    typedef boost::function<T* ()> Factory;
+
+    /// The default LLLazy constructor uses <tt>new T()</tt> as its Factory
+    LLLazy():
+        mFactory(boost::lambda::new_ptr<T>())
+    {}
+
+    /// Bind an explicit Factory functor
+    LLLazy(const Factory& factory):
+        mFactory(factory)
+    {}
+
+    /// Reference T, instantiating it if this is the first access
+    const T& get() const
+    {
+        if (! mInstance)
+        {
+            // use the bound Factory functor
+            mInstance.reset(mFactory());
+        }
+        return *mInstance;
+    }
+
+    /// non-const get()
+    T& get()
+    {
+        return const_cast<T&>(const_cast<const LLLazy<T>*>(this)->get());
+    }
+
+    /// operator*() is equivalent to get()
+    const T& operator*() const { return get(); }
+    /// operator*() is equivalent to get()
+    T& operator*() { return get(); }
+
+    /**
+     * operator->() must return (something resembling) T*. It's tempting to
+     * return the underlying boost::scoped_ptr<T>, but that would require
+     * breaking out the lazy-instantiation logic from get() into a common
+     * private method. Assume the pointer used for operator->() access is very
+     * short-lived.
+     */
+    const T* operator->() const { return &get(); }
+    /// non-const operator->()
+    T* operator->() { return &get(); }
+
+    /// set(Factory). This will throw InstanceChange if mInstance has already
+    /// been set.
+    void set(const Factory& factory)
+    {
+        ensureNoInstance(mInstance);
+        mFactory = factory;
+    }
+
+    /// set(T*). This will throw InstanceChange if mInstance has already been
+    /// set.
+    void set(T* instance)
+    {
+        ensureNoInstance(mInstance);
+        mInstance.reset(instance);
+    }
+
+private:
+    Factory mFactory;
+    // Consider an LLLazy<T> member of a class we're accessing by const
+    // reference. We want to allow even const methods to touch the LLLazy<T>
+    // member. Hence the actual pointer must be mutable because such access
+    // might assign it.
+    mutable boost::scoped_ptr<T> mInstance;
+};
+
+#if (! defined(__GNUC__)) || (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)
+// Not gcc at all, or a gcc more recent than gcc 3.3
+#define GCC33 0
+#else
+#define GCC33 1
+#endif
+
+/**
+ * LLLazyBase<T> wraps LLLazy<T>, giving you an alternative way to replace
+ * <tt>Inner mInner;</tt>. Instead of coding <tt>LLLazy<Inner> mInner</tt>,
+ * you can add LLLazyBase<Inner> to your Outer class's bases, e.g.:
+ * @code
+ * class Outer: public LLLazyBase<Inner>
+ * {
+ *     ...
+ * };
+ * @endcode
+ *
+ * This gives you @c public get() and @c protected set() methods without
+ * having to make your LLLazy<Inner> member @c protected. The tradeoff is that
+ * you must access the wrapped LLLazy<Inner> using get() and set() rather than
+ * with <tt>operator*()</tt> or <tt>operator->()</tt>.
+ *
+ * This mechanism can be used for more than one member, but only if they're of
+ * different types. That is, you can replace:
+ * @code
+ * DifficultClass mDifficult;
+ * AwkwardType    mAwkward;
+ * @endcode
+ * with:
+ * @code
+ * class Outer: public LLLazyBase<DifficultClass>, public LLLazyBase<AwkwardType>
+ * {
+ *     ...
+ * };
+ * @endcode
+ * but for a situation like this:
+ * @code
+ * DifficultClass mMainDifficult, mAuxDifficult;
+ * @endcode
+ * you should directly embed LLLazy<DifficultClass> (q.v.).
+ *
+ * For multiple LLLazyBase bases, e.g. the <tt>LLLazyBase<DifficultClass>,
+ * LLLazyBase<AwkwardType></tt> example above, access the relevant get()/set()
+ * as (e.g.) <tt>LLLazyBase<DifficultClass>::get()</tt>. (This is why you
+ * can't have multiple LLLazyBase<T> of the same T.) For a bit of syntactic
+ * sugar, please see getLazy()/setLazy().
+ */
+template <typename T>
+class LLLazyBase
+{
+public:
+    /// invoke default LLLazy constructor
+    LLLazyBase() {}
+    /// make wrapped LLLazy bind an explicit Factory
+    LLLazyBase(const typename LLLazy<T>::Factory& factory):
+        mInstance(factory)
+    {}
+
+    /// access to LLLazy::get()
+    T& get() { return *mInstance; }
+    /// access to LLLazy::get()
+    const T& get() const { return *mInstance; }
+
+protected:
+    // see getLazy()/setLazy()
+    #if (! GCC33)
+    template <typename T2, class MYCLASS> friend T2& getLazy(MYCLASS* this_);
+    template <typename T2, class MYCLASS> friend const T2& getLazy(const MYCLASS* this_);
+    #else // gcc 3.3
+    template <typename T2, class MYCLASS> friend T2& getLazy(const MYCLASS* this_);
+    #endif // gcc 3.3
+    template <typename T2, class MYCLASS> friend void setLazy(MYCLASS* this_, T2* instance);
+    template <typename T2, class MYCLASS>
+    friend void setLazy(MYCLASS* this_, const typename LLLazy<T2>::Factory& factory);
+
+    /// access to LLLazy::set(Factory)
+    void set(const typename LLLazy<T>::Factory& factory)
+    {
+        mInstance.set(factory);
+    }
+
+    /// access to LLLazy::set(T*)
+    void set(T* instance)
+    {
+        mInstance.set(instance);
+    }
+
+private:
+    LLLazy<T> mInstance;
+};
+
+/**
+ * @name getLazy()/setLazy()
+ * Suppose you have something like the following:
+ * @code
+ * class Outer: public LLLazyBase<DifficultClass>, public LLLazyBase<AwkwardType>
+ * {
+ *     ...
+ * };
+ * @endcode
+ *
+ * Your methods can reference the @c DifficultClass instance using
+ * <tt>LLLazyBase<DifficultClass>::get()</tt>, which is admittedly a bit ugly.
+ * Alternatively, you can write <tt>getLazy<DifficultClass>(this)</tt>, which
+ * is somewhat more straightforward to read.
+ *
+ * Similarly,
+ * @code
+ * LLLazyBase<DifficultClass>::set(new TestDifficultClass());
+ * @endcode
+ * could instead be written:
+ * @code
+ * setLazy<DifficultClass>(this, new TestDifficultClass());
+ * @endcode
+ *
+ * @note
+ * I wanted to provide getLazy() and setLazy() without explicitly passing @c
+ * this. That would imply making them methods on a base class rather than free
+ * functions. But if <tt>LLLazyBase<T></tt> derives normally from (say) @c
+ * LLLazyGrandBase providing those methods, then unqualified getLazy() would
+ * be ambiguous: you'd have to write <tt>LLLazyBase<T>::getLazy<T>()</tt>,
+ * which is even uglier than <tt>LLLazyBase<T>::get()</tt>, and therefore
+ * pointless. You can make the compiler not care which @c LLLazyGrandBase
+ * instance you're talking about by making @c LLLazyGrandBase a @c virtual
+ * base class of @c LLLazyBase. But in that case,
+ * <tt>LLLazyGrandBase::getLazy<T>()</tt> can't access
+ * <tt>LLLazyBase<T>::get()</tt>!
+ *
+ * We want <tt>getLazy<T>()</tt> to access <tt>LLLazyBase<T>::get()</tt> as if
+ * in the lexical context of some subclass method. Ironically, free functions
+ * let us do that better than methods on a @c virtual base class -- but that
+ * implies passing @c this explicitly. So be it.
+ */
+//@{
+#if (! GCC33)
+template <typename T, class MYCLASS>
+T& getLazy(MYCLASS* this_) { return this_->LLLazyBase<T>::get(); }
+template <typename T, class MYCLASS>
+const T& getLazy(const MYCLASS* this_) { return this_->LLLazyBase<T>::get(); }
+#else // gcc 3.3
+// For const-correctness, we really should have two getLazy() variants: one
+// accepting const MYCLASS* and returning const T&, the other accepting
+// non-const MYCLASS* and returning non-const T&. This works fine on the Mac
+// (gcc 4.0.1) and Windows (MSVC 8.0), but fails on our Linux 32-bit Debian
+// Sarge stations (gcc 3.3.5). Since I really don't know how to beat that aging
+// compiler over the head to make it do the right thing, I'm going to have to
+// move forward with the wrong thing: a single getLazy() function that accepts
+// const MYCLASS* and returns non-const T&.
+template <typename T, class MYCLASS>
+T& getLazy(const MYCLASS* this_) { return const_cast<MYCLASS*>(this_)->LLLazyBase<T>::get(); }
+#endif // gcc 3.3
+template <typename T, class MYCLASS>
+void setLazy(MYCLASS* this_, T* instance) { this_->LLLazyBase<T>::set(instance); }
+template <typename T, class MYCLASS>
+void setLazy(MYCLASS* this_, const typename LLLazy<T>::Factory& factory)
+{
+    this_->LLLazyBase<T>::set(factory);
+}
+//@}
+
+#endif /* ! defined(LL_LLLAZY_H) */
diff --git a/indra/llcommon/stringize.h b/indra/llcommon/stringize.h
new file mode 100644
index 0000000000..1b2958020f
--- /dev/null
+++ b/indra/llcommon/stringize.h
@@ -0,0 +1,75 @@
+/**
+ * @file   stringize.h
+ * @author Nat Goodspeed
+ * @date   2008-12-17
+ * @brief  stringize(item) template function and STRINGIZE(expression) macro
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_STRINGIZE_H)
+#define LL_STRINGIZE_H
+
+#include <sstream>
+
+/**
+ * stringize(item) encapsulates an idiom we use constantly, using
+ * operator<<(std::ostringstream&, TYPE) followed by std::ostringstream::str()
+ * to render a string expressing some item.
+ */
+template <typename T>
+std::string stringize(const T& item)
+{
+    std::ostringstream out;
+    out << item;
+    return out.str();
+}
+
+/**
+ * STRINGIZE(item1 << item2 << item3 ...) effectively expands to the
+ * following:
+ * @code
+ * std::ostringstream out;
+ * out << item1 << item2 << item3 ... ;
+ * return out.str();
+ * @endcode
+ */
+#define STRINGIZE(EXPRESSION) (static_cast<std::ostringstream&>(Stringize() << EXPRESSION).str())
+
+/**
+ * Helper class for STRINGIZE() macro. Ideally the body of
+ * STRINGIZE(EXPRESSION) would look something like this:
+ * @code
+ * (std::ostringstream() << EXPRESSION).str()
+ * @endcode
+ * That doesn't work because each of the relevant operator<<() functions
+ * accepts a non-const std::ostream&, to which you can't pass a temp instance
+ * of std::ostringstream. Stringize plays the necessary const tricks to make
+ * the whole thing work.
+ */
+class Stringize
+{
+public:
+    /**
+     * This is the essence of Stringize. The leftmost << operator (the one
+     * coded in the STRINGIZE() macro) engages this operator<<() const method
+     * on the temp Stringize instance. Every other << operator (ones embedded
+     * in EXPRESSION) simply sees the std::ostream& returned by the first one.
+     *
+     * Finally, the STRINGIZE() macro downcasts that std::ostream& to
+     * std::ostringstream&.
+     */
+    template <typename T>
+    std::ostream& operator<<(const T& item) const
+    {
+        mOut << item;
+        return mOut;
+    }
+
+private:
+    mutable std::ostringstream mOut;
+};
+
+#endif /* ! defined(LL_STRINGIZE_H) */
diff --git a/indra/llcommon/tests/lllazy_test.cpp b/indra/llcommon/tests/lllazy_test.cpp
new file mode 100644
index 0000000000..db581d650f
--- /dev/null
+++ b/indra/llcommon/tests/lllazy_test.cpp
@@ -0,0 +1,227 @@
+/**
+ * @file   lllazy_test.cpp
+ * @author Nat Goodspeed
+ * @date   2009-01-28
+ * @brief  Tests of lllazy.h.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "lllazy.h"
+// STL headers
+#include <iostream>
+// std headers
+// external library headers
+#include <boost/lambda/construct.hpp>
+#include <boost/lambda/bind.hpp>
+// other Linden headers
+#include "../test/lltut.h"
+
+namespace bll = boost::lambda;
+
+/*****************************************************************************
+*   Test classes
+*****************************************************************************/
+
+// Let's say that because of its many external dependencies, YuckyFoo is very
+// hard to instantiate in a test harness.
+class YuckyFoo
+{
+public:
+    virtual ~YuckyFoo() {}
+    virtual std::string whoami() const { return "YuckyFoo"; }
+};
+
+// Let's further suppose that YuckyBar is another hard-to-instantiate class.
+class YuckyBar
+{
+public:
+    YuckyBar(const std::string& which):
+        mWhich(which)
+    {}
+    virtual ~YuckyBar() {}
+
+    virtual std::string identity() const { return std::string("YuckyBar(") + mWhich + ")"; }
+
+private:
+    const std::string mWhich;
+};
+
+// Pretend that this class would be tough to test because, up until we started
+// trying to test it, it contained instances of both YuckyFoo and YuckyBar.
+// Now we've refactored so it contains LLLazy<YuckyFoo> and LLLazy<YuckyBar>.
+// More than that, it contains them by virtue of deriving from
+// LLLazyBase<YuckyFoo> and LLLazyBase<YuckyBar>.
+// We postulate two different LLLazyBases because, with only one, you need not
+// specify *which* get()/set() method you're talking about. That's a simpler
+// case.
+class NeedsTesting: public LLLazyBase<YuckyFoo>, public LLLazyBase<YuckyBar>
+{
+public:
+    NeedsTesting():
+        // mYuckyBar("RealYuckyBar")
+        LLLazyBase<YuckyBar>(bll::bind(bll::new_ptr<YuckyBar>(), "RealYuckyBar"))
+    {}
+    virtual ~NeedsTesting() {}
+
+    virtual std::string describe() const
+    {
+        return std::string("NeedsTesting(") + getLazy<YuckyFoo>(this).whoami() + ", " +
+            getLazy<YuckyBar>(this).identity() + ")";
+    }
+
+private:
+    // These instance members were moved to LLLazyBases:
+    // YuckyFoo mYuckyFoo;
+    // YuckyBar mYuckyBar;
+};
+
+// Fake up a test YuckyFoo class
+class TestFoo: public YuckyFoo
+{
+public:
+    virtual std::string whoami() const { return "TestFoo"; }
+};
+
+// and a test YuckyBar
+class TestBar: public YuckyBar
+{
+public:
+    TestBar(const std::string& which): YuckyBar(which) {}
+    virtual std::string identity() const
+    {
+        return std::string("TestBar(") + YuckyBar::identity() + ")";
+    }
+};
+
+// So here's a test subclass of NeedsTesting that uses TestFoo and TestBar
+// instead of YuckyFoo and YuckyBar.
+class TestNeedsTesting: public NeedsTesting
+{
+public:
+    TestNeedsTesting()
+    {
+        // Exercise setLazy(T*)
+        setLazy<YuckyFoo>(this, new TestFoo());
+        // Exercise setLazy(Factory)
+        setLazy<YuckyBar>(this, bll::bind(bll::new_ptr<TestBar>(), "TestYuckyBar"));
+    }
+
+    virtual std::string describe() const
+    {
+        return std::string("TestNeedsTesting(") + NeedsTesting::describe() + ")";
+    }
+
+    void toolate()
+    {
+        setLazy<YuckyFoo>(this, new TestFoo());
+    }
+};
+
+// This class tests having an explicit LLLazy<T> instance as a named member,
+// rather than deriving from LLLazyBase<T>.
+class LazyMember
+{
+public:
+    YuckyFoo& getYuckyFoo() { return *mYuckyFoo; }
+    std::string whoisit() const { return mYuckyFoo->whoami(); }
+
+protected:
+    LLLazy<YuckyFoo> mYuckyFoo;
+};
+
+// This is a test subclass of the above, dynamically replacing the
+// LLLazy<YuckyFoo> member.
+class TestLazyMember: public LazyMember
+{
+public:
+    // use factory setter
+    TestLazyMember()
+    {
+        mYuckyFoo.set(bll::new_ptr<TestFoo>());
+    }
+
+    // use instance setter
+    TestLazyMember(YuckyFoo* instance)
+    {
+        mYuckyFoo.set(instance);
+    }
+};
+
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
+namespace tut
+{
+    struct lllazy_data
+    {
+    };
+    typedef test_group<lllazy_data> lllazy_group;
+    typedef lllazy_group::object lllazy_object;
+    lllazy_group lllazygrp("lllazy");
+
+    template<> template<>
+    void lllazy_object::test<1>()
+    {
+        // Instantiate an official one, just because we can
+        NeedsTesting nt;
+        // and a test one
+        TestNeedsTesting tnt;
+//      std::cout << nt.describe() << '\n';
+        ensure_equals(nt.describe(), "NeedsTesting(YuckyFoo, YuckyBar(RealYuckyBar))");
+//      std::cout << tnt.describe() << '\n';
+        ensure_equals(tnt.describe(),
+                      "TestNeedsTesting(NeedsTesting(TestFoo, TestBar(YuckyBar(TestYuckyBar))))");
+    }
+
+    template<> template<>
+    void lllazy_object::test<2>()
+    {
+        TestNeedsTesting tnt;
+        std::string threw;
+        try
+        {
+            tnt.toolate();
+        }
+        catch (const LLLazyCommon::InstanceChange& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("InstanceChange exception", threw, "replace LLLazy instance");
+    }
+
+    template<> template<>
+    void lllazy_object::test<3>()
+    {
+        {
+            LazyMember lm;
+            // operator*() on-demand instantiation
+            ensure_equals(lm.getYuckyFoo().whoami(), "YuckyFoo");
+        }
+        {
+            LazyMember lm;
+            // operator->() on-demand instantiation
+            ensure_equals(lm.whoisit(), "YuckyFoo");
+        }
+    }
+
+    template<> template<>
+    void lllazy_object::test<4>()
+    {
+        {
+            // factory setter
+            TestLazyMember tlm;
+            ensure_equals(tlm.whoisit(), "TestFoo");
+        }
+        {
+            // instance setter
+            TestLazyMember tlm(new TestFoo());
+            ensure_equals(tlm.whoisit(), "TestFoo");
+        }
+    }
+} // namespace tut
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 0f3e159802..c0f7a4d335 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -3,6 +3,7 @@
 project(llmessage)
 
 include(00-Common)
+include(LLAddBuildTest)
 include(LLCommon)
 include(LLMath)
 include(LLMessage)
@@ -63,6 +64,7 @@ set(llmessage_SOURCE_FILES
     llregionpresenceverifier.cpp
     llsdappservices.cpp
     llsdhttpserver.cpp
+    llsdmessage.cpp
     llsdmessagebuilder.cpp
     llsdmessagereader.cpp
     llsdrpcclient.cpp
@@ -156,6 +158,7 @@ set(llmessage_HEADER_FILES
     llregionpresenceverifier.h
     llsdappservices.h
     llsdhttpserver.h
+    llsdmessage.h
     llsdmessagebuilder.h
     llsdmessagereader.h
     llsdrpcclient.h
@@ -217,5 +220,6 @@ IF (NOT LINUX AND VIEWER)
     #ADD_BUILD_TEST(llhttpclientadapter llmessage)
     ADD_BUILD_TEST(lltrustedmessageservice llmessage)
     ADD_BUILD_TEST(lltemplatemessagedispatcher llmessage)
+    # Don't make llmessage depend on llsdmessage_test because ADD_COMM_BUILD_TEST depends on llmessage!
+    ADD_COMM_BUILD_TEST(llsdmessage "" "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py")
 ENDIF (NOT LINUX AND VIEWER)
-
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 629bd3836d..43abc2953d 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -96,7 +96,7 @@ public:
 	{
 	}
 	
-	boost::signals::connection setCallback(const LLCacheNameCallback& cb)
+	boost::signals2::connection setCallback(const LLCacheNameCallback& cb)
 	{
 		return mSignal.connect(cb);
 	}
@@ -215,7 +215,7 @@ public:
 	Impl(LLMessageSystem* msg);
 	~Impl();
 	
-	boost::signals::connection addPending(const LLUUID& id, const LLCacheNameCallback& callback);
+	boost::signals2::connection addPending(const LLUUID& id, const LLCacheNameCallback& callback);
 	void addPending(const LLUUID& id, const LLHost& host);
 	
 	void processPendingAsks();
@@ -276,10 +276,10 @@ LLCacheName::Impl::~Impl()
 	for_each(mReplyQueue.begin(), mReplyQueue.end(), DeletePointer());
 }
 
-boost::signals::connection LLCacheName::Impl::addPending(const LLUUID& id, const LLCacheNameCallback& callback)
+boost::signals2::connection LLCacheName::Impl::addPending(const LLUUID& id, const LLCacheNameCallback& callback)
 {
 	PendingReply* reply = new PendingReply(id, LLHost());
-	boost::signals::connection res = reply->setCallback(callback);
+	boost::signals2::connection res = reply->setCallback(callback);
 	mReplyQueue.push_back(reply);
 	return res;
 }
@@ -295,7 +295,7 @@ void LLCacheName::setUpstream(const LLHost& upstream_host)
 	impl.mUpstreamHost = upstream_host;
 }
 
-boost::signals::connection LLCacheName::addObserver(const LLCacheNameCallback& callback)
+boost::signals2::connection LLCacheName::addObserver(const LLCacheNameCallback& callback)
 {
 	return impl.mSignal.connect(callback);
 }
@@ -554,9 +554,9 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)
 //  we call it immediately. -Steve
 // NOTE: Even though passing first and last name is a bit of extra overhead, it eliminates the
 //  potential need for any parsing should any code need to handle first and last name independently.
-boost::signals::connection LLCacheName::get(const LLUUID& id, BOOL is_group, const LLCacheNameCallback& callback)
+boost::signals2::connection LLCacheName::get(const LLUUID& id, BOOL is_group, const LLCacheNameCallback& callback)
 {
-	boost::signals::connection res;
+	boost::signals2::connection res;
 	
 	if(id.isNull())
 	{
@@ -600,7 +600,7 @@ boost::signals::connection LLCacheName::get(const LLUUID& id, BOOL is_group, con
 	return res;
 }
 
-boost::signals::connection LLCacheName::get(const LLUUID& id, BOOL is_group, old_callback_t callback, void* user_data)
+boost::signals2::connection LLCacheName::get(const LLUUID& id, BOOL is_group, old_callback_t callback, void* user_data)
 {
 	return get(id, is_group, boost::bind(callback, _1, _2, _3, _4, user_data));
 }
diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h
index 414b6590f6..792f1aeb0a 100644
--- a/indra/llmessage/llcachename.h
+++ b/indra/llmessage/llcachename.h
@@ -34,17 +34,17 @@
 #define LL_LLCACHENAME_H
 
 #include <boost/bind.hpp>
-#include <boost/signals.hpp>
+#include <boost/signals2.hpp>
 
 class LLMessageSystem;
 class LLHost;
 class LLUUID;
 
 
-typedef boost::signal<void (const LLUUID& id,
-							const std::string& first_name,
-							const std::string& last_name,
-							BOOL is_group)> LLCacheNameSignal;
+typedef boost::signals2::signal<void (const LLUUID& id,
+                                      const std::string& first_name,
+                                      const std::string& last_name,
+                                      BOOL is_group)> LLCacheNameSignal;
 typedef LLCacheNameSignal::slot_type LLCacheNameCallback;
 
 // Old callback with user data for compatability
@@ -69,7 +69,7 @@ public:
 	// for simulators, this is the data server
 	void setUpstream(const LLHost& upstream_host);
 
-	boost::signals::connection addObserver(const LLCacheNameCallback& callback);
+	boost::signals2::connection addObserver(const LLCacheNameCallback& callback);
 
 	// janky old format. Remove after a while. Phoenix. 2008-01-30
 	void importFile(LLFILE* fp);
@@ -96,10 +96,10 @@ public:
 	// If the data is currently available, may call the callback immediatly
 	// otherwise, will request the data, and will call the callback when
 	// available.  There is no garuntee the callback will ever be called.
-	boost::signals::connection get(const LLUUID& id, BOOL is_group, const LLCacheNameCallback& callback);
+	boost::signals2::connection get(const LLUUID& id, BOOL is_group, const LLCacheNameCallback& callback);
 	
 	// LEGACY
-	boost::signals::connection get(const LLUUID& id, BOOL is_group, old_callback_t callback, void* user_data);
+	boost::signals2::connection get(const LLUUID& id, BOOL is_group, old_callback_t callback, void* user_data);
 
 	// This method needs to be called from time to time to send out
 	// requests.
diff --git a/indra/llmessage/llsdmessage.cpp b/indra/llmessage/llsdmessage.cpp
new file mode 100644
index 0000000000..f663268466
--- /dev/null
+++ b/indra/llmessage/llsdmessage.cpp
@@ -0,0 +1,150 @@
+/**
+ * @file   llsdmessage.cpp
+ * @author Nat Goodspeed
+ * @date   2008-10-31
+ * @brief  Implementation for llsdmessage.
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if LL_WINDOWS
+#pragma warning (disable : 4675) // "resolved by ADL" -- just as I want!
+#endif
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "llsdmessage.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+#include "llevents.h"
+#include "llsdserialize.h"
+#include "llhttpclient.h"
+#include "llmessageconfig.h"
+#include "llhost.h"
+#include "message.h"
+#include "llsdutil.h"
+
+// Declare a static LLSDMessage instance to ensure that we have a listener as
+// soon as someone tries to post on our canonical LLEventPump name.
+static LLSDMessage httpListener;
+
+LLSDMessage::LLSDMessage():
+    // Instantiating our own local LLEventPump with a string name the
+    // constructor is NOT allowed to tweak is a way of ensuring Singleton
+    // semantics: attempting to instantiate a second LLSDMessage object would
+    // throw LLEventPump::DupPumpName.
+    mEventPump("LLHTTPClient")
+{
+    mEventPump.listen("self", boost::bind(&LLSDMessage::httpListener, this, _1));
+}
+
+bool LLSDMessage::httpListener(const LLSD& request)
+{
+    // Extract what we want from the request object. We do it all up front
+    // partly to document what we expect.
+    LLSD::String url(request["url"]);
+    LLSD payload(request["payload"]);
+    LLSD::String reply(request["reply"]);
+    LLSD::String error(request["error"]);
+    LLSD::Real timeout(request["timeout"]);
+    // If the LLSD doesn't even have a "url" key, we doubt it was intended for
+    // this listener.
+    if (url.empty())
+    {
+        std::ostringstream out;
+        out << "request event without 'url' key to '" << mEventPump.getName() << "'";
+        throw ArgError(out.str());
+    }
+    // Establish default timeout. This test relies on LLSD::asReal() returning
+    // exactly 0.0 for an undef value.
+    if (! timeout)
+    {
+        timeout = HTTP_REQUEST_EXPIRY_SECS;
+    }
+    LLHTTPClient::post(url, payload,
+                       new LLSDMessage::EventResponder(LLEventPumps::instance(),
+                                                       url, "POST", reply, error),
+                       LLSD(),      // headers
+                       timeout);
+    return false;
+}
+
+void LLSDMessage::EventResponder::result(const LLSD& data)
+{
+    // If our caller passed an empty replyPump name, they're not
+    // listening: this is a fire-and-forget message. Don't bother posting
+    // to the pump whose name is "".
+    if (! mReplyPump.empty())
+    {
+        mPumps.obtain(mReplyPump).post(data);
+    }
+    else                            // default success handling
+    {
+        LL_INFOS("LLSDMessage::EventResponder")
+            << "'" << mMessage << "' to '" << mTarget << "' succeeded"
+            << LL_ENDL;
+    }
+}
+
+void LLSDMessage::EventResponder::error(U32 status, const std::string& reason, const LLSD& content)
+{
+    // If our caller passed an empty errorPump name, they're not
+    // listening: "default error handling is acceptable." Only post to an
+    // explicit pump name.
+    if (! mErrorPump.empty())
+    {
+        LLSD info;
+        info["target"]  = mTarget;
+        info["message"] = mMessage;
+        info["status"]  = LLSD::Integer(status);
+        info["reason"]  = reason;
+        info["content"] = content;
+        mPumps.obtain(mErrorPump).post(info);
+    }
+    else                        // default error handling
+    {
+        // convention seems to be to use llinfos, but that seems a bit casual?
+        LL_WARNS("LLSDMessage::EventResponder")
+            << "'" << mMessage << "' to '" << mTarget
+            << "' failed with code " << status << ": " << reason << '\n'
+            << ll_pretty_print_sd(content)
+            << LL_ENDL;
+    }
+}
+
+LLSDMessage::ResponderAdapter::ResponderAdapter(LLHTTPClient::ResponderPtr responder,
+                                                const std::string& name):
+    mResponder(responder),
+    mReplyPump(name + ".reply", true), // tweak name for uniqueness
+    mErrorPump(name + ".error", true)
+{
+    mReplyPump.listen("self", boost::bind(&ResponderAdapter::listener, this, _1, true));
+    mErrorPump.listen("self", boost::bind(&ResponderAdapter::listener, this, _1, false));
+}
+
+bool LLSDMessage::ResponderAdapter::listener(const LLSD& payload, bool success)
+{
+    if (success)
+    {
+        mResponder->result(payload);
+    }
+    else
+    {
+        mResponder->error(payload["status"].asInteger(), payload["reason"], payload["content"]);
+    }
+
+    /*---------------- MUST BE LAST STATEMENT BEFORE RETURN ----------------*/
+    delete this;
+    // Destruction of mResponder will usually implicitly free its referent as well
+    /*------------------------- NOTHING AFTER THIS -------------------------*/
+    return false;
+}
+
+void LLSDMessage::link()
+{
+}
diff --git a/indra/llmessage/llsdmessage.h b/indra/llmessage/llsdmessage.h
new file mode 100644
index 0000000000..8ae9451243
--- /dev/null
+++ b/indra/llmessage/llsdmessage.h
@@ -0,0 +1,146 @@
+/**
+ * @file   llsdmessage.h
+ * @author Nat Goodspeed
+ * @date   2008-10-30
+ * @brief  API intended to unify sending capability, UDP and TCP messages:
+ *         https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLSDMESSAGE_H)
+#define LL_LLSDMESSAGE_H
+
+#include "llerror.h"                // LOG_CLASS()
+#include "llevents.h"               // LLEventPumps
+#include "llhttpclient.h"
+#include <string>
+#include <stdexcept>
+
+class LLSD;
+
+/**
+ * Class managing the messaging API described in
+ * https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes
+ */
+class LLSDMessage
+{
+    LOG_CLASS(LLSDMessage);
+
+public:
+    LLSDMessage();
+
+    /// Exception if you specify arguments badly
+    struct ArgError: public std::runtime_error
+    {
+        ArgError(const std::string& what):
+            std::runtime_error(std::string("ArgError: ") + what) {}
+    };
+
+    /**
+     * The response idiom used by LLSDMessage -- LLEventPump names on which to
+     * post reply or error -- is designed for the case in which your
+     * reply/error handlers are methods on the same class as the method
+     * sending the message. Any state available to the sending method that
+     * must be visible to the reply/error methods can conveniently be stored
+     * on that class itself, if it's not already.
+     *
+     * The LLHTTPClient::Responder idiom requires a separate instance of a
+     * separate class so that it can dispatch to the code of interest by
+     * calling canonical virtual methods. Interesting state must be copied
+     * into that new object. 
+     *
+     * With some trepidation, because existing response code is packaged in
+     * LLHTTPClient::Responder subclasses, we provide this adapter class
+     * <i>for transitional purposes only.</i> Instantiate a new heap
+     * ResponderAdapter with your new LLHTTPClient::ResponderPtr. Pass
+     * ResponderAdapter::getReplyName() and/or getErrorName() in your
+     * LLSDMessage (or LLViewerRegion::getCapAPI()) request event. The
+     * ResponderAdapter will call the appropriate Responder method, then
+     * @c delete itself.
+     */
+    class ResponderAdapter
+    {
+    public:
+        /**
+         * Bind the new LLHTTPClient::Responder subclass instance.
+         *
+         * Passing the constructor a name other than the default is only
+         * interesting if you suspect some usage will lead to an exception or
+         * log message.
+         */
+        ResponderAdapter(LLHTTPClient::ResponderPtr responder,
+                         const std::string& name="ResponderAdapter");
+
+        /// EventPump name on which LLSDMessage should post reply event
+        std::string getReplyName() const { return mReplyPump.getName(); }
+        /// EventPump name on which LLSDMessage should post error event
+        std::string getErrorName() const { return mErrorPump.getName(); }
+
+    private:
+        // We have two different LLEventStreams, though we route them both to
+        // the same listener, so that we can bind an extra flag identifying
+        // which case (reply or error) reached that listener.
+        bool listener(const LLSD&, bool success);
+
+        LLHTTPClient::ResponderPtr mResponder;
+        LLEventStream mReplyPump, mErrorPump;
+    };
+
+    /**
+     * Force our implementation file to be linked with caller. The .cpp file
+     * contains a static instance of this class, which must be linked into the
+     * executable to support the canonical listener. But since the primary
+     * interface to that static instance is via a named LLEventPump rather
+     * than by direct reference, the linker doesn't necessarily perceive the
+     * necessity to bring in the translation unit. Referencing this dummy
+     * method forces the issue.
+     */
+    static void link();
+
+private:
+    friend class LLCapabilityListener;
+    /// Responder used for internal purposes by LLSDMessage and
+    /// LLCapabilityListener. Others should use higher-level APIs.
+    class EventResponder: public LLHTTPClient::Responder
+    {
+    public:
+        /**
+         * LLHTTPClient::Responder that dispatches via named LLEventPump instances.
+         * We bind LLEventPumps, even though it's an LLSingleton, for testability.
+         * We bind the string names of the desired LLEventPump instances rather
+         * than actually obtain()ing them so we only obtain() the one we're going
+         * to use. If the caller doesn't bother to listen() on it, the other pump
+         * may never materialize at all.
+         * @a target and @a message are only to clarify error processing.
+         * For a capability message, @a target should be the region description,
+         * @a message should be the capability name.
+         * For a service with a visible URL, pass the URL as @a target and the HTTP verb
+         * (e.g. "POST") as @a message.
+         */
+        EventResponder(LLEventPumps& pumps,
+                       const std::string& target, const std::string& message,
+                       const std::string& replyPump, const std::string& errorPump):
+            mPumps(pumps),
+            mTarget(target),
+            mMessage(message),
+            mReplyPump(replyPump),
+            mErrorPump(errorPump)
+        {}
+    
+        virtual void result(const LLSD& data);
+        virtual void error(U32 status, const std::string& reason, const LLSD& content);
+    
+    private:
+        LLEventPumps& mPumps;
+        const std::string mTarget, mMessage, mReplyPump, mErrorPump;
+    };
+
+private:
+    bool httpListener(const LLSD&);
+    LLEventStream mEventPump;
+};
+
+#endif /* ! defined(LL_LLSDMESSAGE_H) */
diff --git a/indra/llmessage/tests/llsdmessage_test.cpp b/indra/llmessage/tests/llsdmessage_test.cpp
new file mode 100644
index 0000000000..2957d7cc4f
--- /dev/null
+++ b/indra/llmessage/tests/llsdmessage_test.cpp
@@ -0,0 +1,113 @@
+/**
+ * @file   llsdmessage_tut.cpp
+ * @author Nat Goodspeed
+ * @date   2008-12-22
+ * @brief  Test of llsdmessage.h
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if LL_WINDOWS
+#pragma warning (disable : 4675) // "resolved by ADL" -- just as I want!
+#endif
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "llsdmessage.h"
+// STL headers
+#include <iostream>
+// std headers
+#include <stdexcept>
+// external library headers
+// other Linden headers
+#include "../test/lltut.h"
+#include "llsdserialize.h"
+#include "llevents.h"
+#include "stringize.h"
+#include "llhost.h"
+#include "tests/networkio.h"
+#include "tests/commtest.h"
+
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
+namespace tut
+{
+    struct llsdmessage_data: public commtest_data
+    {
+        LLEventPump& httpPump;
+
+        llsdmessage_data():
+            httpPump(pumps.obtain("LLHTTPClient"))
+        {
+            LLSDMessage::link();
+        }
+    };
+    typedef test_group<llsdmessage_data> llsdmessage_group;
+    typedef llsdmessage_group::object llsdmessage_object;
+    llsdmessage_group llsdmgr("llsdmessage");
+
+    template<> template<>
+    void llsdmessage_object::test<1>()
+    {
+        bool threw = false;
+        // This should fail...
+        try
+        {
+            LLSDMessage localListener;
+        }
+        catch (const LLEventPump::DupPumpName&)
+        {
+            threw = true;
+        }
+        ensure("second LLSDMessage should throw", threw);
+    }
+
+    template<> template<>
+    void llsdmessage_object::test<2>()
+    {
+        LLSD request, body;
+        body["data"] = "yes";
+        request["payload"] = body;
+        request["reply"] = replyPump.getName();
+        request["error"] = errorPump.getName();
+        bool threw = false;
+        try
+        {
+            httpPump.post(request);
+        }
+        catch (const LLSDMessage::ArgError&)
+        {
+            threw = true;
+        }
+        ensure("missing URL", threw);
+    }
+
+    template<> template<>
+    void llsdmessage_object::test<3>()
+    {
+        LLSD request, body;
+        body["data"] = "yes";
+        request["url"] = server + "got-message";
+        request["payload"] = body;
+        request["reply"] = replyPump.getName();
+        request["error"] = errorPump.getName();
+        httpPump.post(request);
+        ensure("got response", netio.pump());
+        ensure("success response", success);
+        ensure_equals(result.asString(), "success");
+
+        body["status"] = 499;
+        body["reason"] = "custom error message";
+        request["url"] = server + "fail";
+        request["payload"] = body;
+        httpPump.post(request);
+        ensure("got response", netio.pump());
+        ensure("failure response", ! success);
+        ensure_equals(result["status"].asInteger(), body["status"].asInteger());
+        ensure_equals(result["reason"].asString(),  body["reason"].asString());
+    }
+} // namespace tut
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 1f6cd6ddf9..cdd364797c 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -240,37 +240,37 @@ void LLButton::onCommit()
 	LLUICtrl::onCommit();
 }
 
-boost::signals::connection LLButton::setClickedCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLButton::setClickedCallback( const commit_signal_t::slot_type& cb )
 {
 	return mCommitSignal.connect(cb);
 }
-boost::signals::connection LLButton::setMouseDownCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLButton::setMouseDownCallback( const commit_signal_t::slot_type& cb )
 {
 	return mMouseDownSignal.connect(cb);
 }
-boost::signals::connection LLButton::setMouseUpCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLButton::setMouseUpCallback( const commit_signal_t::slot_type& cb )
 {
 	return mMouseUpSignal.connect(cb);
 }
-boost::signals::connection LLButton::setHeldDownCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLButton::setHeldDownCallback( const commit_signal_t::slot_type& cb )
 {
 	return mHeldDownSignal.connect(cb);
 }
 
 // *TODO: Deprecate (for backwards compatability only)
-boost::signals::connection LLButton::setClickedCallback( button_callback_t cb, void* data )
+boost::signals2::connection LLButton::setClickedCallback( button_callback_t cb, void* data )
 {
 	return setClickedCallback(boost::bind(cb, data));
 }
-boost::signals::connection LLButton::setMouseDownCallback( button_callback_t cb, void* data )
+boost::signals2::connection LLButton::setMouseDownCallback( button_callback_t cb, void* data )
 {
 	return setMouseDownCallback(boost::bind(cb, data));
 }
-boost::signals::connection LLButton::setMouseUpCallback( button_callback_t cb, void* data )
+boost::signals2::connection LLButton::setMouseUpCallback( button_callback_t cb, void* data )
 {
 	return setMouseUpCallback(boost::bind(cb, data));
 }
-boost::signals::connection LLButton::setHeldDownCallback( button_callback_t cb, void* data )
+boost::signals2::connection LLButton::setHeldDownCallback( button_callback_t cb, void* data )
 {
 	return setHeldDownCallback(boost::bind(cb, data));
 }
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index f146ef9dc2..99f4b94805 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -150,17 +150,17 @@ public:
 	void			setUnselectedLabelColor( const LLColor4& c )		{ mUnselectedLabelColor = c; }
 	void			setSelectedLabelColor( const LLColor4& c )			{ mSelectedLabelColor = c; }
 
-	boost::signals::connection setClickedCallback( const commit_signal_t::slot_type& cb ); // mouse down and up within button
-	boost::signals::connection setMouseDownCallback( const commit_signal_t::slot_type& cb );
-	boost::signals::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); // mouse up, EVEN IF NOT IN BUTTON
+	boost::signals2::connection setClickedCallback( const commit_signal_t::slot_type& cb ); // mouse down and up within button
+	boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb );
+	boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); // mouse up, EVEN IF NOT IN BUTTON
 	// Passes a 'count' parameter in the commit param payload, i.e. param["count"])
-	boost::signals::connection setHeldDownCallback( const commit_signal_t::slot_type& cb ); // Mouse button held down and in button
+	boost::signals2::connection setHeldDownCallback( const commit_signal_t::slot_type& cb ); // Mouse button held down and in button
 	
 	// *TODO: Deprecate (for backwards compatability only)
-	boost::signals::connection setClickedCallback( button_callback_t cb, void* data );
-	boost::signals::connection setMouseDownCallback( button_callback_t cb, void* data );
-	boost::signals::connection setMouseUpCallback( button_callback_t cb, void* data );
-	boost::signals::connection setHeldDownCallback( button_callback_t cb, void* data );
+	boost::signals2::connection setClickedCallback( button_callback_t cb, void* data );
+	boost::signals2::connection setMouseDownCallback( button_callback_t cb, void* data );
+	boost::signals2::connection setMouseUpCallback( button_callback_t cb, void* data );
+	boost::signals2::connection setHeldDownCallback( button_callback_t cb, void* data );
 		
 	void			setHeldDownDelay( F32 seconds, S32 frames = 0)		{ mHeldDownDelay = seconds; mHeldDownFrameDelay = frames; }
 	
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index a3588d9dae..fc2e6e163b 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -65,6 +65,8 @@
 #include <set>
 #include <boost/tokenizer.hpp>
 
+using namespace LLOldEvents;
+
 // static
 LLMenuHolderGL *LLMenuGL::sMenuContainer = NULL;
 
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 3cb76efce0..ffaecc2c15 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -285,12 +285,12 @@ public:
 	
 	//virtual void draw();
 	
-	boost::signals::connection setClickCallback( const commit_signal_t::slot_type& cb )
+	boost::signals2::connection setClickCallback( const commit_signal_t::slot_type& cb )
 	{
 		return setCommitCallback(cb);
 	}
 	
-	boost::signals::connection setEnableCallback( const enable_signal_t::slot_type& cb )
+	boost::signals2::connection setEnableCallback( const enable_signal_t::slot_type& cb )
 	{
 		return mEnableSignal.connect(cb);
 	}
@@ -335,7 +335,7 @@ public:
 	// called to rebuild the draw label
 	virtual void buildDrawLabel( void );
 	
-	boost::signals::connection setCheckCallback( const enable_signal_t::slot_type& cb )
+	boost::signals2::connection setCheckCallback( const enable_signal_t::slot_type& cb )
 	{
 		return mCheckSignal.connect(cb);
 	}
@@ -823,7 +823,7 @@ private:
 
 // *TODO: Eliminate
 // For backwards compatability only; generally just use boost::bind
-class view_listener_t : public boost::signals::trackable
+class view_listener_t : public boost::signals2::trackable
 {
 public:
 	virtual bool handleEvent(const LLSD& userdata) = 0;
diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h
index 9c01b528a7..89d44eaa87 100644
--- a/indra/llui/llmultislider.h
+++ b/indra/llui/llmultislider.h
@@ -78,8 +78,8 @@ public:
 	/*virtual*/ void	setValue(const LLSD& value);
 	/*virtual*/ LLSD	getValue() const		{ return mValue; }
 
-	boost::signals::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
-	boost::signals::connection setMouseUpCallback(	const commit_signal_t::slot_type& cb )   { return mMouseUpSignal.connect(cb); }
+	boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
+	boost::signals2::connection setMouseUpCallback(	const commit_signal_t::slot_type& cb )   { return mMouseUpSignal.connect(cb); }
 
 	bool			findUnusedValue(F32& initVal);
 	const std::string&	addSlider();
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp
index 14584e6df5..bc981a9b57 100644
--- a/indra/llui/llmultisliderctrl.cpp
+++ b/indra/llui/llmultisliderctrl.cpp
@@ -460,12 +460,12 @@ void LLMultiSliderCtrl::setPrecision(S32 precision)
 	updateText();
 }
 
-boost::signals::connection LLMultiSliderCtrl::setSliderMouseDownCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLMultiSliderCtrl::setSliderMouseDownCallback( const commit_signal_t::slot_type& cb )
 {
 	return mMultiSlider->setMouseDownCallback( cb );
 }
 
-boost::signals::connection LLMultiSliderCtrl::setSliderMouseUpCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLMultiSliderCtrl::setSliderMouseUpCallback( const commit_signal_t::slot_type& cb )
 {
 	return mMultiSlider->setMouseUpCallback( cb );
 }
diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h
index 85ba77b7df..4855ed4926 100644
--- a/indra/llui/llmultisliderctrl.h
+++ b/indra/llui/llmultisliderctrl.h
@@ -115,8 +115,8 @@ public:
 	void			setLabelColor(const LLColor4& c)			{ mTextEnabledColor = c; }
 	void			setDisabledLabelColor(const LLColor4& c)	{ mTextDisabledColor = c; }
 
-	boost::signals::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
-	boost::signals::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
+	boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
+	boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
 
 	virtual void	onTabInto();
 
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 34ff21268e..569112aef1 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -685,7 +685,7 @@ std::string LLNotification::getURL() const
 // =========================================================
 // LLNotificationChannel implementation
 // ---
-void LLNotificationChannelBase::connectChanged(const LLStandardSignal::slot_type& slot)
+LLBoundListener LLNotificationChannelBase::connectChangedImpl(const LLEventListener& slot)
 {
 	// when someone wants to connect to a channel, we first throw them
 	// all of the notifications that are already in the channel
@@ -693,23 +693,23 @@ void LLNotificationChannelBase::connectChanged(const LLStandardSignal::slot_type
 	// only about new notifications
 	for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
 	{
-		slot.get_slot_function()(LLSD().insert("sigtype", "load").insert("id", (*it)->id()));
+		slot(LLSD().insert("sigtype", "load").insert("id", (*it)->id()));
 	}
 	// and then connect the signal so that all future notifications will also be
 	// forwarded.
-	mChanged.connect(slot);
+	return mChanged.connect(slot);
 }
 
-void LLNotificationChannelBase::connectPassedFilter(const LLStandardSignal::slot_type& slot)
+LLBoundListener LLNotificationChannelBase::connectPassedFilterImpl(const LLEventListener& slot)
 {
 	// these two filters only fire for notifications added after the current one, because
 	// they don't participate in the hierarchy.
-	mPassedFilter.connect(slot);
+	return mPassedFilter.connect(slot);
 }
 
-void LLNotificationChannelBase::connectFailedFilter(const LLStandardSignal::slot_type& slot)
+LLBoundListener LLNotificationChannelBase::connectFailedFilterImpl(const LLEventListener& slot)
 {
-	mFailedFilter.connect(slot);
+	return mFailedFilter.connect(slot);
 }
 
 // external call, conforms to our standard signature
@@ -867,8 +867,7 @@ mParent(parent)
 	else
 	{
 		LLNotificationChannelPtr p = LLNotifications::instance().getChannel(parent);
-		LLStandardSignal::slot_type f = boost::bind(&LLNotificationChannelBase::updateItem, this, _1);
-		p->connectChanged(f);
+		p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1));
 	}
 }
 
@@ -1065,11 +1064,11 @@ void LLNotifications::createDefaultChannels()
 
 	// connect action methods to these channels
 	LLNotifications::instance().getChannel("Expiration")->
-		connectChanged(boost::bind(&LLNotifications::expirationHandler, this, _1));
+        connectChanged(boost::bind(&LLNotifications::expirationHandler, this, _1));
 	LLNotifications::instance().getChannel("Unique")->
-		connectChanged(boost::bind(&LLNotifications::uniqueHandler, this, _1));
+        connectChanged(boost::bind(&LLNotifications::uniqueHandler, this, _1));
 	LLNotifications::instance().getChannel("Unique")->
-		connectFailedFilter(boost::bind(&LLNotifications::failedUniquenessTest, this, _1));
+        connectFailedFilter(boost::bind(&LLNotifications::failedUniquenessTest, this, _1));
 	LLNotifications::instance().getChannel("Ignore")->
 		connectFailedFilter(&handleIgnoredNotification);
 }
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index de86f5daa2..5c8d146e0c 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -91,13 +91,14 @@
 
 #include <boost/utility.hpp>
 #include <boost/shared_ptr.hpp>
-#include <boost/signal.hpp>
+#include <boost/enable_shared_from_this.hpp>
 #include <boost/type_traits.hpp>
 
 // we want to minimize external dependencies, but this one is important
 #include "llsd.h"
 
 // and we need this to manage the notification callbacks
+#include "llevents.h"
 #include "llfunctorregistry.h"
 #include "llui.h"
 #include "llmemory.h"
@@ -105,36 +106,6 @@
 class LLNotification;
 typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
 
-/*****************************************************************************
-*   Signal and handler declarations
-*   Using a single handler signature means that we can have a common handler
-*   type, rather than needing a distinct one for each different handler.
-*****************************************************************************/
-
-/**
- * A boost::signals Combiner that stops the first time a handler returns true
- * We need this because we want to have our handlers return bool, so that
- * we have the option to cause a handler to stop further processing. The
- * default handler fails when the signal returns a value but has no slots.
- */
-struct LLStopWhenHandled
-{
-    typedef bool result_type;
-
-    template<typename InputIterator>
-    result_type operator()(InputIterator first, InputIterator last) const
-    {
-        for (InputIterator si = first; si != last; ++si)
-		{
-            if (*si)
-			{
-                return true;
-			}
-		}
-        return false;
-    }
-};
-
 	
 typedef enum e_notification_priority
 {
@@ -145,27 +116,11 @@ typedef enum e_notification_priority
 	NOTIFICATION_PRIORITY_CRITICAL
 } ENotificationPriority;
 
-/**
- * We want to have a standard signature for all signals; this way,
- * we can easily document a protocol for communicating across
- * dlls and into scripting languages someday.
- * we want to return a bool to indicate whether the signal has been
- * handled and should NOT be passed on to other listeners.
- * Return true to stop further handling of the signal, and false
- * to continue.
- * We take an LLSD because this way the contents of the signal
- * are independent of the API used to communicate it.
- * It is const ref because then there's low cost to pass it;
- * if you only need to inspect it, it's very cheap.
- */
-
 typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder;
 
 typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;
 typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration;
 
-typedef boost::signal<bool(const LLSD&), LLStopWhenHandled>  LLStandardSignal;
-
 // context data that can be looked up via a notification's payload by the display logic
 // derive from this class to implement specific contexts
 class LLNotificationContext : public LLInstanceTracker<LLNotificationContext, LLUUID>
@@ -713,7 +668,7 @@ typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap;
 // all of the built-in tests should attach to the "Visible" channel
 //
 class LLNotificationChannelBase :
-	public boost::signals::trackable
+	public LLEventTrackable
 {
 	LOG_CLASS(LLNotificationChannelBase);
 public:
@@ -723,15 +678,45 @@ public:
 	virtual ~LLNotificationChannelBase() {}
 	// you can also connect to a Channel, so you can be notified of
 	// changes to this channel
-	virtual void connectChanged(const LLStandardSignal::slot_type& slot);
-	virtual void connectPassedFilter(const LLStandardSignal::slot_type& slot);
-	virtual void connectFailedFilter(const LLStandardSignal::slot_type& slot);
+	template <typename LISTENER>
+    LLBoundListener connectChanged(const LISTENER& slot)
+    {
+        // Examine slot to see if it binds an LLEventTrackable subclass, or a
+        // boost::shared_ptr to something, or a boost::weak_ptr to something.
+        // Call this->connectChangedImpl() to actually connect it.
+        return LLEventDetail::visit_and_connect(slot,
+                                  boost::bind(&LLNotificationChannelBase::connectChangedImpl,
+                                              this,
+                                              _1));
+    }
+    template <typename LISTENER>
+	LLBoundListener connectPassedFilter(const LISTENER& slot)
+    {
+        // see comments in connectChanged()
+        return LLEventDetail::visit_and_connect(slot,
+                                  boost::bind(&LLNotificationChannelBase::connectPassedFilterImpl,
+                                              this,
+                                              _1));
+    }
+    template <typename LISTENER>
+	LLBoundListener connectFailedFilter(const LISTENER& slot)
+    {
+        // see comments in connectChanged()
+        return LLEventDetail::visit_and_connect(slot,
+                                  boost::bind(&LLNotificationChannelBase::connectFailedFilterImpl,
+                                              this,
+                                              _1));
+    }
 
 	// use this when items change or to add a new one
 	bool updateItem(const LLSD& payload);
 	const LLNotificationFilter& getFilter() { return mFilter; }
 
 protected:
+    LLBoundListener connectChangedImpl(const LLEventListener& slot);
+    LLBoundListener connectPassedFilterImpl(const LLEventListener& slot);
+    LLBoundListener connectFailedFilterImpl(const LLEventListener& slot);
+
 	LLNotificationSet mItems;
 	LLStandardSignal mChanged;
 	LLStandardSignal mPassedFilter;
diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h
index 39c55afd8c..dad65fcce0 100644
--- a/indra/llui/llslider.h
+++ b/indra/llui/llslider.h
@@ -67,8 +67,8 @@ public:
 	virtual void	setMinValue(F32 min_value) { LLF32UICtrl::setMinValue(min_value); updateThumbRect(); }
 	virtual void	setMaxValue(F32 max_value) { LLF32UICtrl::setMaxValue(max_value); updateThumbRect(); }
 
-	boost::signals::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
-	boost::signals::connection setMouseUpCallback(	const commit_signal_t::slot_type& cb )   { return mMouseUpSignal.connect(cb); }
+	boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
+	boost::signals2::connection setMouseUpCallback(	const commit_signal_t::slot_type& cb )   { return mMouseUpSignal.connect(cb); }
 
 	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index d5053478a6..2c8aed6196 100644
--- a/indra/llui/llsliderctrl.cpp
+++ b/indra/llui/llsliderctrl.cpp
@@ -375,12 +375,12 @@ void LLSliderCtrl::setPrecision(S32 precision)
 	updateText();
 }
 
-boost::signals::connection LLSliderCtrl::setSliderMouseDownCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLSliderCtrl::setSliderMouseDownCallback( const commit_signal_t::slot_type& cb )
 {
 	return mSlider->setMouseDownCallback( cb );
 }
 
-boost::signals::connection LLSliderCtrl::setSliderMouseUpCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLSliderCtrl::setSliderMouseUpCallback( const commit_signal_t::slot_type& cb )
 {
 	return mSlider->setMouseUpCallback( cb );
 }
diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h
index 0bcb1ccc9b..5bdbbfcbcc 100644
--- a/indra/llui/llsliderctrl.h
+++ b/indra/llui/llsliderctrl.h
@@ -111,8 +111,8 @@ public:
 	void			setLabelColor(const LLColor4& c)			{ mTextEnabledColor = c; }
 	void			setDisabledLabelColor(const LLColor4& c)	{ mTextDisabledColor = c; }
 
-	boost::signals::connection setSliderMouseDownCallback(	const commit_signal_t::slot_type& cb );
-	boost::signals::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
+	boost::signals2::connection setSliderMouseDownCallback(	const commit_signal_t::slot_type& cb );
+	boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
 
 	/*virtual*/ void	onTabInto();
 
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 18aa1aa143..71396e10d9 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -45,7 +45,7 @@
 #include "lluiimage.h"		// *TODO: break this dependency, need to add #include "lluiimage.h" to all widgets that hold an Optional<LLUIImage*> in their paramblocks
 #include "llinitparam.h"
 #include "llregistry.h"
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
 #include "lllazyvalue.h"
 
 // LLUIFactory
@@ -576,7 +576,7 @@ public:
 class LLCallbackRegistry
 {
 public:
-	typedef boost::signal<void()> callback_signal_t;
+	typedef boost::signals2::signal<void()> callback_signal_t;
 	
 	void registerCallback(const callback_signal_t::slot_type& slot)
 	{
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index da0db0424a..99811809a8 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -749,11 +749,11 @@ LLUICtrl* LLUICtrl::getParentUICtrl() const
 }
 
 // *TODO: Deprecate; for backwards compatability only:
-boost::signals::connection LLUICtrl::setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data)
+boost::signals2::connection LLUICtrl::setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data)
 {
 	return setCommitCallback( boost::bind(cb, _1, data));
 }
-boost::signals::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb )
+boost::signals2::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb )
 {
 	return mValidateSignal.connect(boost::bind(cb, _2));
 }
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index e82102d531..6d310dca22 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -74,16 +74,16 @@ protected:
 };
 
 class LLUICtrl
-	: public LLView, public LLFocusableElement, public boost::signals::trackable
+	: public LLView, public LLFocusableElement, public boost::signals2::trackable
 {
 public:
 
 
 	typedef boost::function<void (LLUICtrl* ctrl, const LLSD& param)> commit_callback_t;
-	typedef boost::signal<void (LLUICtrl* ctrl, const LLSD& param)> commit_signal_t;
+	typedef boost::signals2::signal<void (LLUICtrl* ctrl, const LLSD& param)> commit_signal_t;
 	
 	typedef boost::function<bool (LLUICtrl* ctrl, const LLSD& param)> enable_callback_t;
-	typedef boost::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> enable_signal_t;
+	typedef boost::signals2::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> enable_signal_t;
 	
 	struct CallbackParam : public LLInitParam::Block<CallbackParam>
 	{
@@ -217,12 +217,12 @@ public:
 
 	LLUICtrl*		getParentUICtrl() const;
 
-	boost::signals::connection setCommitCallback( const commit_signal_t::slot_type& cb ) { return mCommitSignal.connect(cb); }
-	boost::signals::connection setValidateCallback( const enable_signal_t::slot_type& cb ) { return mValidateSignal.connect(cb); }
+	boost::signals2::connection setCommitCallback( const commit_signal_t::slot_type& cb ) { return mCommitSignal.connect(cb); }
+	boost::signals2::connection setValidateCallback( const enable_signal_t::slot_type& cb ) { return mValidateSignal.connect(cb); }
 	
 	// *TODO: Deprecate; for backwards compatability only:
-	boost::signals::connection setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data);	
-	boost::signals::connection setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb );
+	boost::signals2::connection setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data);	
+	boost::signals2::connection setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb );
 	
 	LLUICtrl* findRootMostFocusRoot();
 
@@ -250,9 +250,9 @@ protected:
     LLViewModelPtr  mViewModel;
 
 	LLControlVariable* mControlVariable;
-	boost::signals::connection mControlConnection;
+	boost::signals2::connection mControlConnection;
 	LLControlVariable* mEnabledControlVariable;
-	boost::signals::connection mEnabledControlConnection;
+	boost::signals2::connection mEnabledControlConnection;
 
 private:
 
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 536d0c23f8..0a28075ed6 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -56,6 +56,8 @@
 #include "lltexteditor.h"
 #include "lltextbox.h"
 
+using namespace LLOldEvents;
+
 BOOL	LLView::sDebugRects = FALSE;
 BOOL	LLView::sDebugKeys = FALSE;
 S32		LLView::sDepth = 0;
diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt
index b1ac85812c..3f7714f505 100644
--- a/indra/llxml/CMakeLists.txt
+++ b/indra/llxml/CMakeLists.txt
@@ -42,6 +42,5 @@ add_library (llxml ${llxml_SOURCE_FILES})
 target_link_libraries( llxml
     llvfs
     llmath
-    ${BOOST_SIGNALS_LIBRARY}
     ${EXPAT_LIBRARIES}
     )
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index 1782c20a7e..0a8e665c55 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -56,7 +56,7 @@
 #endif
 
 #include <boost/bind.hpp>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
 
 #if LL_WINDOWS
 # if (_MSC_VER >= 1300 && _MSC_VER < 1400)
@@ -92,8 +92,8 @@ class LLControlVariable : public LLRefCount, boost::noncopyable
 	friend class LLControlGroup;
 	
 public:
-	typedef boost::signal<bool(LLControlVariable* control, const LLSD&), boost_boolean_combiner> validate_signal_t;
-	typedef boost::signal<void(LLControlVariable* control, const LLSD&)> commit_signal_t;
+	typedef boost::signals2::signal<bool(LLControlVariable* control, const LLSD&), boost_boolean_combiner> validate_signal_t;
+	typedef boost::signals2::signal<void(LLControlVariable* control, const LLSD&)> commit_signal_t;
 
 private:
 	std::string		mName;
@@ -378,7 +378,7 @@ private:
 private:
     T							mCachedValue;
 	eControlType				mType;
-    boost::signals::connection	mConnection;
+    boost::signals2::connection	mConnection;
 };
 
 template <typename T>
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 9533281688..e1f545adb5 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -80,6 +80,7 @@ set(viewer_SOURCE_FILES
     llbox.cpp
     llcallbacklist.cpp
     llcallingcard.cpp
+    llcapabilitylistener.cpp
     llcaphttpsender.cpp
     llchatbar.cpp
     llclassifiedinfo.cpp
@@ -474,6 +475,8 @@ set(viewer_HEADER_FILES
     llbox.h
     llcallbacklist.h
     llcallingcard.h
+    llcapabilitylistener.h
+    llcapabilityprovider.h
     llcaphttpsender.h
     llchatbar.h
     llclassifiedinfo.h
@@ -1385,3 +1388,5 @@ if (INSTALL)
 endif (INSTALL)
 
 ADD_VIEWER_BUILD_TEST(llagentaccess viewer)
+ADD_VIEWER_COMM_BUILD_TEST(llcapabilitylistener viewer 
+  ${CMAKE_CURRENT_SOURCE_DIR}/../llmessage/tests/test_llsdmessage_peer.py)
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 263c2b52bf..f97f9f607f 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -136,6 +136,8 @@
 #include "llviewerjoystick.h"
 #include "llfollowcam.h"
 #include "lltrans.h"
+#include "stringize.h"
+#include "llcapabilitylistener.h"
 
 #include "llnavigationbar.h" //to show/hide navigation bar when changing mouse look state
 
@@ -947,7 +949,7 @@ LLViewerRegion *LLAgent::getRegion() const
 }
 
 
-const LLHost& LLAgent::getRegionHost() const
+LLHost LLAgent::getRegionHost() const
 {
 	if (mRegionp)
 	{
@@ -4699,109 +4701,128 @@ void LLAgent::lookAtLastChat()
 
 const F32 SIT_POINT_EXTENTS = 0.2f;
 
+LLSD ll_sdmap_from_vector3(const LLVector3& vec)
+{
+    LLSD ret;
+    ret["X"] = vec.mV[VX];
+    ret["Y"] = vec.mV[VY];
+    ret["Z"] = vec.mV[VZ];
+    return ret;
+}
+
+LLVector3 ll_vector3_from_sdmap(const LLSD& sd)
+{
+    LLVector3 ret;
+    ret.mV[VX] = F32(sd["X"].asReal());
+    ret.mV[VY] = F32(sd["Y"].asReal());
+    ret.mV[VZ] = F32(sd["Z"].asReal());
+    return ret;
+}
+
 void LLAgent::setStartPosition( U32 location_id )
 {
-  LLViewerObject          *object;
+    LLViewerObject          *object;
 
-  if ( !(gAgentID == LLUUID::null) )
-  {
+    if (gAgentID == LLUUID::null)
+    {
+        return;
+    }
     // we've got an ID for an agent viewerobject
     object = gObjectList.findObject(gAgentID);
-    if (object)
+    if (! object)
     {
-      // we've got the viewer object
-      // Sometimes the agent can be velocity interpolated off of
-      // this simulator.  Clamp it to the region the agent is
-      // in, a little bit in on each side.
-      const F32 INSET = 0.5f; //meters
-      const F32 REGION_WIDTH = LLWorld::getInstance()->getRegionWidthInMeters();
-
-      LLVector3 agent_pos = getPositionAgent();
-      LLVector3 agent_look_at = mFrameAgent.getAtAxis();
-
-      if (mAvatarObject.notNull())
-      {
-	// the z height is at the agent's feet
-	agent_pos.mV[VZ] -= 0.5f * mAvatarObject->mBodySize.mV[VZ];
-      }
-
-      agent_pos.mV[VX] = llclamp( agent_pos.mV[VX], INSET, REGION_WIDTH - INSET );
-      agent_pos.mV[VY] = llclamp( agent_pos.mV[VY], INSET, REGION_WIDTH - INSET );
-
-      // Don't let them go below ground, or too high.
-      agent_pos.mV[VZ] = llclamp( agent_pos.mV[VZ],
-				  mRegionp->getLandHeightRegion( agent_pos ),
-				  LLWorld::getInstance()->getRegionMaxHeight() );
-      // Send the CapReq
-
-      LLSD body;
-
-      std::string url = gAgent.getRegion()->getCapability("HomeLocation");
-      std::ostringstream strBuffer;
-      if( url.empty() )
-      {
-	LLMessageSystem* msg = gMessageSystem;
-	msg->newMessageFast(_PREHASH_SetStartLocationRequest);
-	msg->nextBlockFast( _PREHASH_AgentData);
-	msg->addUUIDFast(_PREHASH_AgentID, getID());
-	msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
-	msg->nextBlockFast( _PREHASH_StartLocationData);
-	// corrected by sim
-	msg->addStringFast(_PREHASH_SimName, "");
-	msg->addU32Fast(_PREHASH_LocationID, location_id);
-	msg->addVector3Fast(_PREHASH_LocationPos, agent_pos);
-	msg->addVector3Fast(_PREHASH_LocationLookAt,mFrameAgent.getAtAxis());
-	
-	// Reliable only helps when setting home location.  Last
-	// location is sent on quit, and we don't have time to ack
-	// the packets.
-	msg->sendReliable(mRegionp->getHost());
-
-	const U32 HOME_INDEX = 1;
-	if( HOME_INDEX == location_id )
-	  {
-	    setHomePosRegion( mRegionp->getHandle(), getPositionAgent() );
-	  }
-      }
-      else
-      {
-	strBuffer << location_id;
-	body["HomeLocation"]["LocationId"] = strBuffer.str();
-
-	strBuffer.str("");
-	strBuffer << agent_pos.mV[VX];
-	body["HomeLocation"]["LocationPos"]["X"] = strBuffer.str();
-
-	strBuffer.str("");
-	strBuffer << agent_pos.mV[VY];
-	body["HomeLocation"]["LocationPos"]["Y"] = strBuffer.str();
-
-	strBuffer.str("");
-	strBuffer << agent_pos.mV[VZ];
-	body["HomeLocation"]["LocationPos"]["Z"] = strBuffer.str();
-
-	strBuffer.str("");
-	strBuffer << agent_look_at.mV[VX];
-	body["HomeLocation"]["LocationLookAt"]["X"] = strBuffer.str();
-
-	strBuffer.str("");
-	strBuffer << agent_look_at.mV[VY];
-	body["HomeLocation"]["LocationLookAt"]["Y"] = strBuffer.str();
-
-	strBuffer.str("");
-	strBuffer << agent_look_at.mV[VZ];
-	body["HomeLocation"]["LocationLookAt"]["Z"] = strBuffer.str();
-
-	LLHTTPClient::post( url, body, new LLHomeLocationResponder() );
-      }
+        llinfos << "setStartPosition - Can't find agent viewerobject id " << gAgentID << llendl;
+        return;
+    }
+    // we've got the viewer object
+    // Sometimes the agent can be velocity interpolated off of
+    // this simulator.  Clamp it to the region the agent is
+    // in, a little bit in on each side.
+    const F32 INSET = 0.5f; //meters
+    const F32 REGION_WIDTH = LLWorld::getInstance()->getRegionWidthInMeters();
+
+    LLVector3 agent_pos = getPositionAgent();
+
+    if (mAvatarObject.notNull())
+    {
+        // the z height is at the agent's feet
+        agent_pos.mV[VZ] -= 0.5f * mAvatarObject->mBodySize.mV[VZ];
     }
-    else
+
+    agent_pos.mV[VX] = llclamp( agent_pos.mV[VX], INSET, REGION_WIDTH - INSET );
+    agent_pos.mV[VY] = llclamp( agent_pos.mV[VY], INSET, REGION_WIDTH - INSET );
+
+    // Don't let them go below ground, or too high.
+    agent_pos.mV[VZ] = llclamp( agent_pos.mV[VZ],
+                                mRegionp->getLandHeightRegion( agent_pos ),
+                                LLWorld::getInstance()->getRegionMaxHeight() );
+    // Send the CapReq
+    LLSD request;
+    LLSD body;
+    LLSD homeLocation;
+
+    homeLocation["LocationId"] = LLSD::Integer(location_id);
+    homeLocation["LocationPos"] = ll_sdmap_from_vector3(agent_pos);
+    homeLocation["LocationLookAt"] = ll_sdmap_from_vector3(mFrameAgent.getAtAxis());
+
+    body["HomeLocation"] = homeLocation;
+
+    // This awkward idiom warrants explanation.
+    // For starters, LLSDMessage::ResponderAdapter is ONLY for testing the new
+    // LLSDMessage functionality with a pre-existing LLHTTPClient::Responder.
+    // In new code, define your reply/error methods on the same class as the
+    // sending method, bind them to local LLEventPump objects and pass those
+    // LLEventPump names in the request LLSD object.
+    // When testing old code, the new LLHomeLocationResponder object
+    // is referenced by an LLHTTPClient::ResponderPtr, so when the
+    // ResponderAdapter is deleted, the LLHomeLocationResponder will be too.
+    // We must trust that the underlying LLHTTPClient code will eventually
+    // fire either the reply callback or the error callback; either will cause
+    // the ResponderAdapter to delete itself.
+    LLSDMessage::ResponderAdapter*
+        adapter(new LLSDMessage::ResponderAdapter(new LLHomeLocationResponder()));
+
+    request["message"] = "HomeLocation";
+    request["payload"] = body;
+    request["reply"]   = adapter->getReplyName();
+    request["error"]   = adapter->getErrorName();
+
+    gAgent.getRegion()->getCapAPI().post(request);
+
+    const U32 HOME_INDEX = 1;
+    if( HOME_INDEX == location_id )
     {
-      llinfos << "setStartPosition - Can't find agent viewerobject id " << gAgentID << llendl;
+        setHomePosRegion( mRegionp->getHandle(), getPositionAgent() );
     }
-  }
 }
 
+struct HomeLocationMapper: public LLCapabilityListener::CapabilityMapper
+{
+    // No reply message expected
+    HomeLocationMapper(): LLCapabilityListener::CapabilityMapper("HomeLocation") {}
+    virtual void buildMessage(LLMessageSystem* msg,
+                              const LLUUID& agentID,
+                              const LLUUID& sessionID,
+                              const std::string& capabilityName,
+                              const LLSD& payload) const
+    {
+        msg->newMessageFast(_PREHASH_SetStartLocationRequest);
+        msg->nextBlockFast( _PREHASH_AgentData);
+        msg->addUUIDFast(_PREHASH_AgentID, agentID);
+        msg->addUUIDFast(_PREHASH_SessionID, sessionID);
+        msg->nextBlockFast( _PREHASH_StartLocationData);
+        // corrected by sim
+        msg->addStringFast(_PREHASH_SimName, "");
+        msg->addU32Fast(_PREHASH_LocationID, payload["HomeLocation"]["LocationId"].asInteger());
+        msg->addVector3Fast(_PREHASH_LocationPos,
+                            ll_vector3_from_sdmap(payload["HomeLocation"]["LocationPos"]));
+        msg->addVector3Fast(_PREHASH_LocationLookAt,
+                            ll_vector3_from_sdmap(payload["HomeLocation"]["LocationLookAt"]));
+    }
+};
+// Need an instance of this class so it will self-register
+static HomeLocationMapper homeLocationMapper;
+
 void LLAgent::requestStopMotion( LLMotion* motion )
 {
 	// Notify all avatars that a motion has stopped.
@@ -5479,7 +5500,7 @@ void update_group_floaters(const LLUUID& group_id)
 		gIMMgr->refresh();
 	}
 
-	gAgent.fireEvent(new LLEvent(&gAgent, "new group"), "");
+	gAgent.fireEvent(new LLOldEvents::LLEvent(&gAgent, "new group"), "");
 }
 
 // static
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 3174357a1a..23ff6cd594 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -119,7 +119,7 @@ inline bool operator==(const LLGroupData &a, const LLGroupData &b)
 
 //
 
-class LLAgent : public LLObservable
+class LLAgent : public LLOldEvents::LLObservable
 {
 	LOG_CLASS(LLAgent);
 	
@@ -176,7 +176,7 @@ public:
 	// Set the home data
 	void			setRegion(LLViewerRegion *regionp);
 	LLViewerRegion	*getRegion() const;
-	const LLHost&	getRegionHost() const;
+	LLHost			getRegionHost() const;
 	std::string		getSLURL() const;
 	
 	void			updateAgentPosition(const F32 dt, const F32 yaw, const S32 mouse_x, const S32 mouse_y);		// call once per frame to update position, angles radians
diff --git a/indra/newview/llagentlanguage.h b/indra/newview/llagentlanguage.h
index e313837883..45348a1e50 100644
--- a/indra/newview/llagentlanguage.h
+++ b/indra/newview/llagentlanguage.h
@@ -36,7 +36,7 @@
 #include "llsingleton.h"	// LLSingleton<>
 #include "llevent.h"
 
-class LLAgentLanguage: public LLSingleton<LLAgentLanguage>, public LLSimpleListener
+class LLAgentLanguage: public LLSingleton<LLAgentLanguage>, public LLOldEvents::LLSimpleListener
 {
  public:
 	LLAgentLanguage();
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a613e6a14b..073b6b85fc 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -96,6 +96,7 @@
 #include "lltexturecache.h"
 #include "lltexturefetch.h"
 #include "llimageworker.h"
+#include "llevents.h"
 
 // The files below handle dependencies from cleanup.
 #include "llkeyframemotion.h"
@@ -841,7 +842,14 @@ bool LLAppViewer::mainLoop()
 	LLTimer debugTime;
 	LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
 	joystick->setNeedsReset(true);
- 	
+
+    LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop"));
+    // As we do not (yet) send data on the mainloop LLEventPump that varies
+    // with each frame, no need to instantiate a new LLSD event object each
+    // time. Obviously, if that changes, just instantiate the LLSD at the
+    // point of posting.
+    LLSD newFrame;
+
 	// Handle messages
 	while (!LLApp::isExiting())
 	{
@@ -884,6 +892,9 @@ bool LLAppViewer::mainLoop()
 				LLFloaterMemLeak::getInstance()->idle() ;				
 			}			
 
+            // canonical per-frame event
+            mainloop.post(newFrame);
+
 			if (!LLApp::isExiting())
 			{
 				pingMainloopTimeout("Main:JoystickKeyboard");
diff --git a/indra/newview/llcapabilitylistener.cpp b/indra/newview/llcapabilitylistener.cpp
new file mode 100644
index 0000000000..3277da8930
--- /dev/null
+++ b/indra/newview/llcapabilitylistener.cpp
@@ -0,0 +1,183 @@
+/**
+ * @file   llcapabilitylistener.cpp
+ * @author Nat Goodspeed
+ * @date   2009-01-07
+ * @brief  Implementation for llcapabilitylistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "llviewerprecompiledheaders.h"
+// associated header
+#include "llcapabilitylistener.h"
+// STL headers
+#include <map>
+// std headers
+// external library headers
+#include <boost/bind.hpp>
+// other Linden headers
+#include "stringize.h"
+#include "llcapabilityprovider.h"
+
+class LLCapabilityListener::CapabilityMappers: public LLSingleton<LLCapabilityListener::CapabilityMappers>
+{
+public:
+    void registerMapper(const LLCapabilityListener::CapabilityMapper*);
+    void unregisterMapper(const LLCapabilityListener::CapabilityMapper*);
+    const LLCapabilityListener::CapabilityMapper* find(const std::string& cap) const;
+
+    struct DupCapMapper: public std::runtime_error
+    {
+        DupCapMapper(const std::string& what):
+            std::runtime_error(std::string("DupCapMapper: ") + what)
+        {}
+    };
+
+private:
+    friend class LLSingleton<LLCapabilityListener::CapabilityMappers>;
+    CapabilityMappers();
+
+    typedef std::map<std::string, const LLCapabilityListener::CapabilityMapper*> CapabilityMap;
+    CapabilityMap mMap;
+};
+
+LLCapabilityListener::LLCapabilityListener(const std::string& name,
+                                           LLMessageSystem* messageSystem,
+                                           const LLCapabilityProvider& provider,
+                                           const LLUUID& agentID,
+                                           const LLUUID& sessionID):
+    mEventPump(name),
+    mMessageSystem(messageSystem),
+    mProvider(provider),
+    mAgentID(agentID),
+    mSessionID(sessionID)
+{
+    mEventPump.listen("self", boost::bind(&LLCapabilityListener::capListener, this, _1));
+}
+
+bool LLCapabilityListener::capListener(const LLSD& request)
+{
+    // Extract what we want from the request object. We do it all up front
+    // partly to document what we expect.
+    LLSD::String cap(request["message"]);
+    LLSD payload(request["payload"]);
+    LLSD::String reply(request["reply"]);
+    LLSD::String error(request["error"]);
+    LLSD::Real timeout(request["timeout"]);
+    // If the LLSD doesn't even have a "message" key, we doubt it was intended
+    // for this listener.
+    if (cap.empty())
+    {
+        LL_ERRS("capListener") << "capability request event without 'message' key to '"
+                               << getCapAPI().getName()
+                               << "' on region\n" << mProvider.getDescription()
+                               << LL_ENDL;
+        return false;               // in case fatal-error function isn't
+    }
+    // Establish default timeout. This test relies on LLSD::asReal() returning
+    // exactly 0.0 for an undef value.
+    if (! timeout)
+    {
+        timeout = HTTP_REQUEST_EXPIRY_SECS;
+    }
+    // Look up the url for the requested capability name.
+    std::string url = mProvider.getCapability(cap);
+    if (! url.empty())
+    {
+        // This capability is supported by the region to which we're talking.
+        LLHTTPClient::post(url, payload,
+                           new LLSDMessage::EventResponder(LLEventPumps::instance(),
+                                                           mProvider.getDescription(),
+                                                           cap, reply, error),
+                           LLSD(),  // headers
+                           timeout);
+    }
+    else
+    {
+        // Capability not supported -- do we have a registered mapper?
+        const CapabilityMapper* mapper = CapabilityMappers::instance().find(cap);
+        if (! mapper)               // capability neither supported nor mapped
+        {
+            LL_ERRS("capListener") << "unsupported capability '" << cap << "' request to '"
+                                   << getCapAPI().getName() << "' on region\n"
+                                   << mProvider.getDescription()
+                                   << LL_ENDL;
+        }
+        else if (! mapper->getReplyName().empty()) // mapper expects reply support
+        {
+            LL_ERRS("capListener") << "Mapper for capability '" << cap
+                                   << "' requires unimplemented support for reply message '"
+                                   << mapper->getReplyName()
+                                   << "' on '" << getCapAPI().getName() << "' on region\n"
+                                   << mProvider.getDescription()
+                                   << LL_ENDL;
+        }
+        else
+        {
+            LL_INFOS("capListener") << "fallback invoked for capability '" << cap
+                                    << "' request to '" << getCapAPI().getName()
+                                    << "' on region\n" << mProvider.getDescription()
+                                    << LL_ENDL;
+            mapper->buildMessage(mMessageSystem, mAgentID, mSessionID, cap, payload);
+            mMessageSystem->sendReliable(mProvider.getHost());
+        }
+    }
+    return false;
+}
+
+LLCapabilityListener::CapabilityMapper::CapabilityMapper(const std::string& cap, const std::string& reply):
+    mCapName(cap),
+    mReplyName(reply)
+{
+    LLCapabilityListener::CapabilityMappers::instance().registerMapper(this);
+}
+
+LLCapabilityListener::CapabilityMapper::~CapabilityMapper()
+{
+    LLCapabilityListener::CapabilityMappers::instance().unregisterMapper(this);
+}
+
+LLSD LLCapabilityListener::CapabilityMapper::readResponse(LLMessageSystem* messageSystem) const
+{
+    return LLSD();
+}
+
+LLCapabilityListener::CapabilityMappers::CapabilityMappers() {}
+
+void LLCapabilityListener::CapabilityMappers::registerMapper(const LLCapabilityListener::CapabilityMapper* mapper)
+{
+    // Try to insert a new map entry by which we can look up the passed mapper
+    // instance.
+    std::pair<CapabilityMap::iterator, bool> inserted =
+        mMap.insert(CapabilityMap::value_type(mapper->getCapName(), mapper));
+    // If we already have a mapper for that name, insert() merely located the
+    // existing iterator and returned false. It is a coding error to try to
+    // register more than one mapper for the same capability name.
+    if (! inserted.second)
+    {
+        throw DupCapMapper(std::string("Duplicate capability name ") + mapper->getCapName());
+    }
+}
+
+void LLCapabilityListener::CapabilityMappers::unregisterMapper(const LLCapabilityListener::CapabilityMapper* mapper)
+{
+    CapabilityMap::iterator found = mMap.find(mapper->getCapName());
+    if (found != mMap.end())
+    {
+        mMap.erase(found);
+    }
+}
+
+const LLCapabilityListener::CapabilityMapper*
+LLCapabilityListener::CapabilityMappers::find(const std::string& cap) const
+{
+    CapabilityMap::const_iterator found = mMap.find(cap);
+    if (found != mMap.end())
+    {
+        return found->second;
+    }
+    return NULL;
+}
diff --git a/indra/newview/llcapabilitylistener.h b/indra/newview/llcapabilitylistener.h
new file mode 100644
index 0000000000..061227e04d
--- /dev/null
+++ b/indra/newview/llcapabilitylistener.h
@@ -0,0 +1,113 @@
+/**
+ * @file   llcapabilitylistener.h
+ * @author Nat Goodspeed
+ * @date   2009-01-07
+ * @brief  Provide an event-based API for capability requests
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLCAPABILITYLISTENER_H)
+#define LL_LLCAPABILITYLISTENER_H
+
+#include "llevents.h"               // LLEventPump
+#include "llsdmessage.h"            // LLSDMessage::ArgError
+#include "llerror.h"                // LOG_CLASS()
+
+class LLCapabilityProvider;
+class LLSD;
+
+class LLCapabilityListener
+{
+    LOG_CLASS(LLCapabilityListener);
+public:
+    LLCapabilityListener(const std::string& name, LLMessageSystem* messageSystem,
+                         const LLCapabilityProvider& provider,
+                         const LLUUID& agentID, const LLUUID& sessionID);
+
+    /// Capability-request exception
+    typedef LLSDMessage::ArgError ArgError;
+    /// Get LLEventPump on which we listen for capability requests
+    /// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities)
+    LLEventPump& getCapAPI() { return mEventPump; }
+
+    /**
+     * Base class for mapping an as-yet-undeployed capability name to a (pair
+     * of) LLMessageSystem message(s). To map a capability name to such
+     * messages, derive a subclass of CapabilityMapper and declare a static
+     * instance in a translation unit known to be loaded. The mapping is not
+     * region-specific. If an LLViewerRegion's capListener() receives a
+     * request for a supported capability, it will use the capability's URL.
+     * If not, it will look for an applicable CapabilityMapper subclass
+     * instance.
+     */
+    class CapabilityMapper
+    {
+    public:
+        /**
+         * Base-class constructor. Typically your subclass constructor will
+         * pass these parameters as literals.
+         * @param cap the capability name handled by this (subclass) instance
+         * @param reply the name of the response LLMessageSystem message. Omit
+         * if the LLMessageSystem message you intend to send doesn't prompt a
+         * reply message, or if you already handle that message in some other
+         * way.
+         */
+        CapabilityMapper(const std::string& cap, const std::string& reply = "");
+        virtual ~CapabilityMapper();
+        /// query the capability name
+        std::string getCapName() const { return mCapName; }
+        /// query the reply message name
+        std::string getReplyName() const { return mReplyName; }
+        /**
+         * Override this method to build the LLMessageSystem message we should
+         * send instead of the requested capability message. DO NOT send that
+         * message: that will be handled by the caller.
+         */
+        virtual void buildMessage(LLMessageSystem* messageSystem,
+                                  const LLUUID& agentID,
+                                  const LLUUID& sessionID,
+                                  const std::string& capabilityName,
+                                  const LLSD& payload) const = 0;
+        /**
+         * Override this method if you pass a non-empty @a reply
+         * LLMessageSystem message name to the constructor: that is, if you
+         * expect to receive an LLMessageSystem message in response to the
+         * message you constructed in buildMessage(). If you don't pass a @a
+         * reply message name, you need not override this method as it won't
+         * be called.
+         *
+         * Using LLMessageSystem message-reading operations, your
+         * readResponse() override should construct and return an LLSD object
+         * of the form you expect to receive from the real implementation of
+         * the capability you intend to invoke, when it finally goes live.
+         */
+        virtual LLSD readResponse(LLMessageSystem* messageSystem) const;
+
+    private:
+        const std::string mCapName;
+        const std::string mReplyName;
+    };
+
+private:
+    /// Bind the LLCapabilityProvider passed to our ctor
+    const LLCapabilityProvider& mProvider;
+
+    /// Post an event to this LLEventPump to invoke a capability message on
+    /// the bound LLCapabilityProvider's server
+    /// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities)
+    LLEventStream mEventPump;
+
+    LLMessageSystem* mMessageSystem;
+    LLUUID mAgentID, mSessionID;
+
+    /// listener to process capability requests
+    bool capListener(const LLSD&);
+
+    /// helper class for capListener()
+    class CapabilityMappers;
+};
+
+#endif /* ! defined(LL_LLCAPABILITYLISTENER_H) */
diff --git a/indra/newview/llcapabilityprovider.h b/indra/newview/llcapabilityprovider.h
new file mode 100644
index 0000000000..0ddb2b6cb9
--- /dev/null
+++ b/indra/newview/llcapabilityprovider.h
@@ -0,0 +1,39 @@
+/**
+ * @file   llcapabilityprovider.h
+ * @author Nat Goodspeed
+ * @date   2009-01-07
+ * @brief  Interface by which to reference (e.g.) LLViewerRegion to obtain a
+ *         capability.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLCAPABILITYPROVIDER_H)
+#define LL_LLCAPABILITYPROVIDER_H
+
+#include "llhost.h"
+#include <string>
+
+/// Interface for obtaining a capability URL, given a capability name
+class LLCapabilityProvider
+{
+public:
+    virtual ~LLCapabilityProvider() {}
+    /**
+     * Get a capability URL, given a capability name. Returns empty string if
+     * no such capability is defined on this provider.
+     */
+    virtual std::string getCapability(const std::string& name) const = 0;
+    /**
+     * Get host to which to send that capability request.
+     */
+    virtual LLHost getHost() const = 0;
+    /**
+     * Describe this LLCapabilityProvider for logging etc.
+     */
+    virtual std::string getDescription() const = 0;
+};
+
+#endif /* ! defined(LL_LLCAPABILITYPROVIDER_H) */
diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp
index 011774fa5e..65035d9b5c 100644
--- a/indra/newview/llfloatergroups.cpp
+++ b/indra/newview/llfloatergroups.cpp
@@ -59,6 +59,8 @@
 #include "llimview.h"
 #include "lltrans.h"
 
+using namespace LLOldEvents;
+
 // static
 std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
 
diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h
index b30d40581f..d3fb405b42 100644
--- a/indra/newview/llfloatergroups.h
+++ b/indra/newview/llfloatergroups.h
@@ -48,7 +48,7 @@
 #include "llfloater.h"
 #include <map>
 #include <boost/function.hpp>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
 
 class LLUICtrl;
 class LLTextBox;
@@ -63,7 +63,7 @@ public:
 	~LLFloaterGroupPicker();
 	
 	// Note: Don't return connection; use boost::bind + boost::signal::trackable to disconnect slots
-	typedef boost::signal<void (LLUUID id)> signal_t;	
+	typedef boost::signals2::signal<void (LLUUID id)> signal_t;	
 	void setSelectGroupCallback(const signal_t::slot_type& cb) { mGroupSelectSignal.connect(cb); }
 	void setPowersMask(U64 powers_mask);
 	BOOL postBuild();
@@ -87,14 +87,14 @@ protected:
 	static instance_map_t sInstances;
 };
 
-class LLPanelGroups : public LLPanel, public LLSimpleListener
+class LLPanelGroups : public LLPanel, public LLOldEvents::LLSimpleListener
 {
 public:
 	LLPanelGroups();
 	virtual ~LLPanelGroups();
 
 	//LLEventListener
-	/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
+	/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
 	
 	// clear the group list, and get a fresh set of info.
 	void reset();
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 1b128d84ee..d8eb9008f0 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -763,7 +763,7 @@ public:
 	void setFilterPermMask(PermissionMask filter_perm_mask) { mFilter.setFilterPermissions(filter_perm_mask); }
 	void setAllowMultiSelect(BOOL allow) { mAllowMultiSelect = allow; }
 	
-	typedef boost::signal<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)> signal_t;	
+	typedef boost::signals2::signal<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)> signal_t;	
 	void setSelectCallback(const signal_t::slot_type& cb) { mSelectSignal.connect(cb); }
 	
 	LLInventoryFilter* getFilter() { return &mFilter; }
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index fe8d1c4844..89f9242b06 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -89,6 +89,8 @@
 #include "llfloateropenobject.h"
 #include "lltrans.h"
 
+using namespace LLOldEvents;
+
 // Helpers
 // bug in busy count inc/dec right now, logic is complex... do we really need it?
 void inc_busy_count()
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 7d18616a13..53c7484e72 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -58,6 +58,8 @@
 
 static LLRegisterWidget<LLNetMap> r1("net_map");
 
+using namespace LLOldEvents;
+
 const F32 MAP_SCALE_MIN = 64;
 const F32 MAP_SCALE_MID = 172;
 const F32 MAP_SCALE_MAX = 512;
diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h
index 631857d7c8..fc061075c9 100644
--- a/indra/newview/llteleporthistory.h
+++ b/indra/newview/llteleporthistory.h
@@ -38,7 +38,7 @@
 #include <vector>
 #include <string>
 #include <boost/function.hpp>
-#include <boost/signals/connection.hpp>
+#include <boost/signals2/connection.hpp>
 
 
 /**
@@ -206,7 +206,7 @@ private:
 	 * Using this connection we get notified when a teleport finishes
 	 * or initial location update occurs.
 	 */
-	boost::signals::connection	mTeleportFinishedConn;
+	boost::signals2::connection	mTeleportFinishedConn;
 };
 
 #endif
diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h
index fcccafe1a4..533e8a7c95 100644
--- a/indra/newview/lltoolpipette.h
+++ b/indra/newview/lltoolpipette.h
@@ -41,7 +41,7 @@
 #include "lltool.h"
 #include "lltextureentry.h"
 #include <boost/function.hpp>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
 
 class LLViewerObject;
 class LLPickInfo;
@@ -59,7 +59,7 @@ public:
 	virtual BOOL	handleToolTip(S32 x, S32 y, std::string& msg, LLRect *sticky_rect_screen);
 
 	// Note: Don't return connection; use boost::bind + boost::signal::trackable to disconnect slots
-	typedef boost::signal<void (const LLTextureEntry& te)> signal_t;
+	typedef boost::signals2::signal<void (const LLTextureEntry& te)> signal_t;
 	void setToolSelectCallback(const signal_t::slot_type& cb) { mSignal.connect(cb); }
 	void setResult(BOOL success, const std::string& msg);
 	
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 52c49dd05d..b1482d5ce4 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -762,56 +762,39 @@ void move_inventory_item(
 	gAgent.sendReliableMessage();
 }
 
-class LLCopyInventoryFromNotecardResponder : public LLHTTPClient::Responder
-{
-public:
-	//If we get back a normal response, handle it here
-	virtual void result(const LLSD& content)
-	{
-		// What do we do here?
-		llinfos << "CopyInventoryFromNotecard request successful." << llendl;
-	}
-
-	//If we get back an error (not found, etc...), handle it here
-	virtual void error(U32 status, const std::string& reason)
-	{
-		llinfos << "LLCopyInventoryFromNotecardResponder::error "
-			<< status << ": " << reason << llendl;
-	}
-};
-
 void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id)
 {
-	LLSD body;
 	LLViewerRegion* viewer_region = NULL;
-	if(object_id.notNull())
-	{
-		LLViewerObject* vo = gObjectList.findObject(object_id);
-		if(vo)
-		{
-			viewer_region = vo->getRegion();
-		}
+    LLViewerObject* vo = NULL;
+	if (object_id.notNull() && (vo = gObjectList.findObject(object_id)) != NULL)
+    {
+        viewer_region = vo->getRegion();
 	}
 
 	// Fallback to the agents region if for some reason the 
 	// object isn't found in the viewer.
-	if(!viewer_region)
+	if (! viewer_region)
 	{
 		viewer_region = gAgent.getRegion();
 	}
 
-	if(viewer_region)
+	if (! viewer_region)
 	{
-		std::string url = viewer_region->getCapability("CopyInventoryFromNotecard");
-		if (!url.empty())
-		{
-			body["notecard-id"] = notecard_inv_id;
-			body["object-id"] = object_id;
-			body["item-id"] = src->getUUID();
-			body["folder-id"] = gInventory.findCategoryUUIDForType(src->getType());
-			body["callback-id"] = (LLSD::Integer)callback_id;
-
-			LLHTTPClient::post(url, body, new LLCopyInventoryFromNotecardResponder());
-		}
-	}
+        LL_WARNS("copy_inventory_from_notecard") << "Can't find region from object_id "
+                                                 << object_id << " or gAgent"
+                                                 << LL_ENDL;
+        return;
+    }
+
+    LLSD request, body;
+    body["notecard-id"] = notecard_inv_id;
+    body["object-id"] = object_id;
+    body["item-id"] = src->getUUID();
+    body["folder-id"] = gInventory.findCategoryUUIDForType(src->getType());
+    body["callback-id"] = (LLSD::Integer)callback_id;
+
+    request["message"] = "CopyInventoryFromNotecard";
+    request["payload"] = body;
+
+    viewer_region->getCapAPI().post(request);
 }
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index c2724b7cdd..1b3fd5d49b 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -46,7 +46,7 @@
 #include "lluuid.h"
 
 #include <boost/bind.hpp>	// for SkinFolder listener
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
 
 
 // Implementation functions not exported into header file
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0abdaff4b6..f70e5ad242 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1,4 +1,4 @@
- /** 
+/** 
  * @file llviewermenu.cpp
  * @brief Builds menus out of items.
  *
@@ -210,6 +210,7 @@
 #include "lltexlayer.h"
 
 using namespace LLVOAvatarDefines;
+using namespace LLOldEvents;
 
 BOOL enable_land_build(void*);
 BOOL enable_object_build(void*);
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 97b121d71d..1352f2c72f 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -71,6 +71,8 @@
 // system libraries
 #include <boost/tokenizer.hpp>
 
+using namespace LLOldEvents;
+
 class LLFileEnableSaveAs : public view_listener_t
 {
 	bool handleEvent(const LLSD& userdata)
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 20723ec360..da9587a359 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -2392,12 +2392,12 @@ LLViewerImage* LLViewerParcelMgr::getPassImage() const
 	return sPassImage;
 }
 
-boost::signals::connection LLViewerParcelMgr::setAgentParcelChangedCallback(parcel_changed_callback_t cb)
+boost::signals2::connection LLViewerParcelMgr::setAgentParcelChangedCallback(parcel_changed_callback_t cb)
 {
 	return mAgentParcelChangedSignal.connect(cb);
 }
 
-boost::signals::connection LLViewerParcelMgr::setTeleportFinishedCallback(parcel_changed_callback_t cb)
+boost::signals2::connection LLViewerParcelMgr::setTeleportFinishedCallback(parcel_changed_callback_t cb)
 {
 	return mTeleportFinishedSignal.connect(cb);
 }
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 2f3583e33b..3426fda636 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -41,8 +41,8 @@
 #include "llui.h"
 
 #include <boost/function.hpp>
-#include <boost/signal.hpp>
-#include <boost/signals/connection.hpp>
+#include <boost/signals2.hpp>
+#include <boost/signals2/connection.hpp>
 
 class LLUUID;
 class LLMessageSystem;
@@ -83,8 +83,8 @@ class LLViewerParcelMgr : public LLSingleton<LLViewerParcelMgr>
 {
 
 public:
-	typedef boost::function<void()> parcel_changed_callback_t;
-	typedef boost::signal  <void()> parcel_changed_signal_t;
+	typedef boost::function        <void()> parcel_changed_callback_t;
+	typedef boost::signals2::signal<void()> parcel_changed_signal_t;
 
 	LLViewerParcelMgr();
 	~LLViewerParcelMgr();
@@ -263,8 +263,8 @@ public:
 	// the agent is banned or not in the allowed group
 	BOOL isCollisionBanned();
 
-	boost::signals::connection setAgentParcelChangedCallback(parcel_changed_callback_t cb);
-	boost::signals::connection setTeleportFinishedCallback(parcel_changed_callback_t cb);
+	boost::signals2::connection setAgentParcelChangedCallback(parcel_changed_callback_t cb);
+	boost::signals2::connection setTeleportFinishedCallback(parcel_changed_callback_t cb);
 	void onTeleportFinished();
 
 	static BOOL isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power);
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 47619919b3..89ebe0cec8 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -66,6 +66,11 @@
 #include "llvoclouds.h"
 #include "llworld.h"
 #include "llspatialpartition.h"
+#include "stringize.h"
+
+#ifdef LL_WINDOWS
+	#pragma warning(disable:4355)
+#endif
 
 // Viewer object cache version, change if object update
 // format changes. JC
@@ -173,7 +178,18 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
 	mCacheEntriesCount(0),
 	mCacheID(),
 	mEventPoll(NULL),
-	mReleaseNotesRequested(FALSE)
+	mReleaseNotesRequested(FALSE),
+    // I'd prefer to set the LLCapabilityListener name to match the region
+    // name -- it's disappointing that's not available at construction time.
+    // We could instead store an LLCapabilityListener*, making
+    // setRegionNameAndZone() replace the instance. Would that pose
+    // consistency problems? Can we even request a capability before calling
+    // setRegionNameAndZone()?
+    // For testability -- the new Michael Feathers paradigm --
+    // LLCapabilityListener binds all the globals it expects to need at
+    // construction time.
+    mCapabilityListener(host.getString(), gMessageSystem, *this,
+                        gAgent.getID(), gAgent.getSessionID())
 {
 	mWidth = region_width_meters;
 	mOriginGlobal = from_region_handle(handle); 
@@ -224,7 +240,6 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
 	mObjectPartition.push_back(new LLBridgePartition());	//PARTITION_BRIDGE
 	mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE
 	mObjectPartition.push_back(NULL);						//PARTITION_NONE
-	
 }
 
 
@@ -770,6 +785,15 @@ std::ostream& operator<<(std::ostream &s, const LLViewerRegion &region)
 	s << "{ ";
 	s << region.mHost;
 	s << " mOriginGlobal = " << region.getOriginGlobal()<< "\n";
+    std::string name(region.getName()), zone(region.getZoning());
+    if (! name.empty())
+    {
+        s << " mName         = " << name << '\n';
+    }
+    if (! zone.empty())
+    {
+        s << " mZoning       = " << zone << '\n';
+    }
 	s << "}";
 	return s;
 }
@@ -1514,3 +1538,8 @@ void LLViewerRegion::showReleaseNotes()
 	LLWeb::loadURL(url);
 	mReleaseNotesRequested = FALSE;
 }
+
+std::string LLViewerRegion::getDescription() const
+{
+    return stringize(*this);
+}
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index f43167f93a..35f374a4c8 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -49,6 +49,8 @@
 #include "lldatapacker.h"
 #include "llvocache.h"
 #include "llweb.h"
+#include "llcapabilityprovider.h"
+#include "llcapabilitylistener.h"
 
 // Surface id's
 #define LAND  1
@@ -66,8 +68,9 @@ class LLSurface;
 class LLVOCache;
 class LLVOCacheEntry;
 class LLSpatialPartition;
+class LLEventPump;
 
-class LLViewerRegion 
+class LLViewerRegion: public LLCapabilityProvider // implements this interface
 {
 public:
 	//MUST MATCH THE ORDER OF DECLARATION IN CONSTRUCTOR
@@ -226,11 +229,19 @@ public:
 	// Get/set named capability URLs for this region.
 	void setSeedCapability(const std::string& url);
 	void setCapability(const std::string& name, const std::string& url);
-	std::string getCapability(const std::string& name) const;
+	// implements LLCapabilityProvider
+    virtual std::string getCapability(const std::string& name) const;
 	static bool isSpecialCapabilityName(const std::string &name);
 	void logActiveCapabilities() const;
 
-	const LLHost	&getHost() const			{ return mHost; }
+    /// Capability-request exception
+    typedef LLCapabilityListener::ArgError ArgError;
+    /// Get LLEventPump on which we listen for capability requests
+    /// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities)
+    LLEventPump& getCapAPI() { return mCapabilityListener.getCapAPI(); }
+
+    /// implements LLCapabilityProvider
+	virtual LLHost	getHost() const				{ return mHost; }
 	const U64 		&getHandle() const 			{ return mHandle; }
 
 	LLSurface		&getLand() const			{ return *mLandp; }
@@ -274,6 +285,8 @@ public:
 	void calculateCameraDistance();
 
 	friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion &region);
+    /// implements LLCapabilityProvider
+    virtual std::string getDescription() const;
 
 	LLSpatialPartition* getSpatialPartition(U32 type);
 public:
@@ -391,6 +404,11 @@ private:
 	
 	LLEventPoll* mEventPoll;
 
+    /// Post an event to this LLCapabilityListener to invoke a capability message on
+    /// this LLViewerRegion's server
+    /// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities)
+    LLCapabilityListener mCapabilityListener;
+
 private:
 	bool	mAlive;					// can become false if circuit disconnects
 
@@ -458,5 +476,3 @@ inline BOOL LLViewerRegion::getReleaseNotesRequested() const
 }
 
 #endif
-
-
diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp
index bf779c427a..73065c5c00 100644
--- a/indra/newview/llviewerthrottle.cpp
+++ b/indra/newview/llviewerthrottle.cpp
@@ -40,6 +40,8 @@
 #include "llviewerstats.h"
 #include "lldatapacker.h"
 
+using namespace LLOldEvents;
+
 // consts
 
 // The viewer is allowed to set the under-the-hood bandwidth to 50%
diff --git a/indra/newview/tests/llcapabilitylistener_test.cpp b/indra/newview/tests/llcapabilitylistener_test.cpp
new file mode 100644
index 0000000000..3c5f6fad2d
--- /dev/null
+++ b/indra/newview/tests/llcapabilitylistener_test.cpp
@@ -0,0 +1,274 @@
+/**
+ * @file   llcapabilitylistener_test.cpp
+ * @author Nat Goodspeed
+ * @date   2008-12-31
+ * @brief  Test for llcapabilitylistener.cpp.
+ * 
+ * $LicenseInfo:firstyear=2008&license=internal$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "../llviewerprecompiledheaders.h"
+// Own header
+#include "../llcapabilitylistener.h"
+// STL headers
+#include <stdexcept>
+#include <map>
+#include <vector>
+// std headers
+// external library headers
+#include "boost/bind.hpp"
+// other Linden headers
+#include "../test/lltut.h"
+#include "../llcapabilityprovider.h"
+#include "lluuid.h"
+#include "llerrorcontrol.h"
+#include "tests/networkio.h"
+#include "tests/commtest.h"
+#include "stringize.h"
+
+#if defined(LL_WINDOWS)
+#pragma warning(disable: 4355)      // using 'this' in base-class ctor initializer expr
+#endif
+
+/*****************************************************************************
+*   TestCapabilityProvider
+*****************************************************************************/
+struct TestCapabilityProvider: public LLCapabilityProvider
+{
+    TestCapabilityProvider(const LLHost& host):
+        mHost(host)
+    {}
+
+    std::string getCapability(const std::string& cap) const
+    {
+        CapMap::const_iterator found = mCaps.find(cap);
+        if (found != mCaps.end())
+            return found->second;
+        // normal LLViewerRegion lookup failure mode
+        return "";
+    }
+    void setCapability(const std::string& cap, const std::string& url)
+    {
+        mCaps[cap] = url;
+    }
+    LLHost getHost() const { return mHost; }
+    std::string getDescription() const { return "TestCapabilityProvider"; }
+
+    LLHost mHost;
+    typedef std::map<std::string, std::string> CapMap;
+    CapMap mCaps;
+};
+
+/*****************************************************************************
+*   Dummy LLMessageSystem methods
+*****************************************************************************/
+/*==========================================================================*|
+// This doesn't work because we're already linking in llmessage.a, and we get
+// duplicate-symbol errors from the linker. Perhaps if I wanted to go through
+// the exercise of providing dummy versions of every single symbol defined in
+// message.o -- maybe some day.
+typedef std::vector< std::pair<std::string, std::string> > StringPairVector;
+StringPairVector call_history;
+
+S32 LLMessageSystem::sendReliable(const LLHost& host)
+{
+    call_history.push_back(StringPairVector::value_type("sendReliable", stringize(host)));
+    return 0;
+}
+|*==========================================================================*/
+
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
+namespace tut
+{
+    struct llcapears_data: public commtest_data
+    {
+        TestCapabilityProvider provider;
+        LLCapabilityListener regionListener;
+        LLEventPump& regionPump;
+
+        llcapears_data():
+            provider(host),
+            regionListener("testCapabilityListener", NULL, provider, LLUUID(), LLUUID()),
+            regionPump(regionListener.getCapAPI())
+        {
+            provider.setCapability("good", server + "capability-test");
+            provider.setCapability("fail", server + "fail");
+        }
+    };
+    typedef test_group<llcapears_data> llcapears_group;
+    typedef llcapears_group::object llcapears_object;
+    llcapears_group llsdmgr("llcapabilitylistener");
+
+    struct CaptureError: public LLError::OverrideFatalFunction
+    {
+        CaptureError():
+            LLError::OverrideFatalFunction(boost::bind(&CaptureError::operator(), this, _1))
+        {
+            LLError::setPrintLocation(false);
+        }
+
+        struct FatalException: public std::runtime_error
+        {
+            FatalException(const std::string& what): std::runtime_error(what) {}
+        };
+
+        void operator()(const std::string& message)
+        {
+            error = message;
+            throw FatalException(message);
+        }
+
+        std::string error;
+    };
+
+    template<> template<>
+    void llcapears_object::test<1>()
+    {
+        LLSD request, body;
+        body["data"] = "yes";
+        request["payload"] = body;
+        request["reply"] = replyPump.getName();
+        request["error"] = errorPump.getName();
+        std::string threw;
+        try
+        {
+            CaptureError capture;
+            regionPump.post(request);
+        }
+        catch (const CaptureError::FatalException& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("missing capability name", threw, "without 'message' key");
+    }
+
+    template<> template<>
+    void llcapears_object::test<2>()
+    {
+        LLSD request, body;
+        body["data"] = "yes";
+        request["message"] = "good";
+        request["payload"] = body;
+        request["reply"] = replyPump.getName();
+        request["error"] = errorPump.getName();
+        regionPump.post(request);
+        ensure("got response", netio.pump());
+        ensure("success response", success);
+        ensure_equals(result.asString(), "success");
+
+        body["status"] = 499;
+        body["reason"] = "custom error message";
+        request["message"] = "fail";
+        request["payload"] = body;
+        regionPump.post(request);
+        ensure("got response", netio.pump());
+        ensure("failure response", ! success);
+        ensure_equals(result["status"].asInteger(), body["status"].asInteger());
+        ensure_equals(result["reason"].asString(),  body["reason"].asString());
+    }
+
+    template<> template<>
+    void llcapears_object::test<3>()
+    {
+        LLSD request, body;
+        body["data"] = "yes";
+        request["message"] = "unknown";
+        request["payload"] = body;
+        request["reply"] = replyPump.getName();
+        request["error"] = errorPump.getName();
+        std::string threw;
+        try
+        {
+            CaptureError capture;
+            regionPump.post(request);
+        }
+        catch (const CaptureError::FatalException& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("bad capability name", threw, "unsupported capability");
+    }
+
+    struct TestMapper: public LLCapabilityListener::CapabilityMapper
+    {
+        // Instantiator gets to specify whether mapper expects a reply.
+        // I'd really like to be able to test CapabilityMapper::buildMessage()
+        // functionality, too, but -- even though LLCapabilityListener accepts
+        // the LLMessageSystem* that it passes to CapabilityMapper --
+        // LLMessageSystem::sendReliable(const LLHost&) isn't virtual, so it's
+        // not helpful to pass a subclass instance. I suspect that making any
+        // LLMessageSystem methods virtual would provoke howls of outrage,
+        // given how heavily it's used. Nor can I just provide a local
+        // definition of LLMessageSystem::sendReliable(const LLHost&) because
+        // we're already linking in the rest of message.o via llmessage.a, and
+        // that produces duplicate-symbol link errors.
+        TestMapper(const std::string& replyMessage = std::string()):
+            LLCapabilityListener::CapabilityMapper("test", replyMessage)
+        {}
+        virtual void buildMessage(LLMessageSystem* msg,
+                                  const LLUUID& agentID,
+                                  const LLUUID& sessionID,
+                                  const std::string& capabilityName,
+                                  const LLSD& payload) const
+        {
+            msg->newMessageFast(_PREHASH_SetStartLocationRequest);
+            msg->nextBlockFast( _PREHASH_AgentData);
+            msg->addUUIDFast(_PREHASH_AgentID, agentID);
+            msg->addUUIDFast(_PREHASH_SessionID, sessionID);
+            msg->nextBlockFast( _PREHASH_StartLocationData);
+            // corrected by sim
+            msg->addStringFast(_PREHASH_SimName, "");
+            msg->addU32Fast(_PREHASH_LocationID, payload["HomeLocation"]["LocationId"].asInteger());
+/*==========================================================================*|
+            msg->addVector3Fast(_PREHASH_LocationPos,
+                                ll_vector3_from_sdmap(payload["HomeLocation"]["LocationPos"]));
+            msg->addVector3Fast(_PREHASH_LocationLookAt,
+                                ll_vector3_from_sdmap(payload["HomeLocation"]["LocationLookAt"]));
+|*==========================================================================*/
+        }
+    };
+
+    template<> template<>
+    void llcapears_object::test<4>()
+    {
+        TestMapper testMapper("WantReply");
+        LLSD request, body;
+        body["data"] = "yes";
+        request["message"] = "test";
+        request["payload"] = body;
+        request["reply"] = replyPump.getName();
+        request["error"] = errorPump.getName();
+        std::string threw;
+        try
+        {
+            CaptureError capture;
+            regionPump.post(request);
+        }
+        catch (const CaptureError::FatalException& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("capability mapper wants reply", threw, "unimplemented support for reply message");
+    }
+
+    template<> template<>
+    void llcapears_object::test<5>()
+    {
+        TestMapper testMapper;
+        std::string threw;
+        try
+        {
+            TestMapper testMapper2;
+        }
+        catch (const std::runtime_error& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("no dup cap mapper", threw, "DupCapMapper");
+    }
+}
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index c74ef06636..88ef15a8d9 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -13,6 +13,7 @@ include(LLXML)
 include(LScript)
 include(Linking)
 include(Tut)
+include(Boost)
 
 include_directories(
     ${LLCOMMON_INCLUDE_DIRS}
@@ -35,7 +36,9 @@ set(test_SOURCE_FILES
     llbuffer_tut.cpp
     lldate_tut.cpp
     lldoubledispatch_tut.cpp
+    lldependencies_tut.cpp
     llerror_tut.cpp
+    llevents_tut.cpp
     llhost_tut.cpp
     llhttpdate_tut.cpp
     llhttpclient_tut.cpp
@@ -73,6 +76,7 @@ set(test_SOURCE_FILES
     math.cpp
     message_tut.cpp
     reflection_tut.cpp
+    stringize_tut.cpp
     test.cpp
     v2math_tut.cpp
     v3color_tut.cpp
diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp
new file mode 100644
index 0000000000..e401f89b22
--- /dev/null
+++ b/indra/test/llevents_tut.cpp
@@ -0,0 +1,793 @@
+/**
+ * @file   llevents_tut.cpp
+ * @author Nat Goodspeed
+ * @date   2008-09-12
+ * @brief  Test of llevents.h
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if LL_WINDOWS
+#pragma warning (disable : 4675) // "resolved by ADL" -- just as I want!
+#endif
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+// UGLY HACK! We want to verify state internal to the classes without
+// providing public accessors.
+#define testable public
+#include "llevents.h"
+#undef testable
+// STL headers
+// std headers
+#include <iostream>
+#include <typeinfo>
+// external library headers
+#include <boost/bind.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/assign/list_of.hpp>
+// other Linden headers
+#include "lltut.h"
+#include "stringize.h"
+
+using boost::assign::list_of;
+
+/*****************************************************************************
+*   test listener class
+*****************************************************************************/
+class Listener;
+std::ostream& operator<<(std::ostream&, const Listener&);
+
+class Listener
+{
+public:
+    Listener(const std::string& name):
+        mName(name)
+    {
+//      std::cout << *this << ": ctor\n";
+    }
+    Listener(const Listener& that):
+        mName(that.mName),
+        mLastEvent(that.mLastEvent)
+    {
+//      std::cout << *this << ": copy\n";
+    }
+    virtual ~Listener()
+    {
+//      std::cout << *this << ": dtor\n";
+    }
+    std::string getName() const { return mName; }
+    bool call(const LLSD& event)
+    {
+//      std::cout << *this << "::call(" << event << ")\n";
+        mLastEvent = event;
+        return false;
+    }
+    bool callstop(const LLSD& event)
+    {
+//      std::cout << *this << "::callstop(" << event << ")\n";
+        mLastEvent = event;
+        return true;
+    }
+    LLSD getLastEvent() const
+    {
+//      std::cout << *this << "::getLastEvent() -> " << mLastEvent << "\n";
+        return mLastEvent;
+    }
+    void reset(const LLSD& to = LLSD())
+    {
+//      std::cout << *this << "::reset(" << to << ")\n";
+        mLastEvent = to;
+    }
+
+private:
+    std::string mName;
+    LLSD mLastEvent;
+};
+
+std::ostream& operator<<(std::ostream& out, const Listener& listener)
+{
+    out << "Listener(" << listener.getName() /* << "@" << &listener */ << ')';
+    return out;
+}
+
+struct Collect
+{
+    bool add(const std::string& bound, const LLSD& event)
+    {
+        result.push_back(bound);
+        return false;
+    }
+    void clear() { result.clear(); }
+    typedef std::vector<std::string> StringList;
+    StringList result;
+};
+
+std::ostream& operator<<(std::ostream& out, const Collect::StringList& strings)
+{
+    out << '(';
+    Collect::StringList::const_iterator begin(strings.begin()), end(strings.end());
+    if (begin != end)
+    {
+        out << '"' << *begin << '"';
+        while (++begin != end)
+        {
+            out << ", \"" << *begin << '"';
+        }
+    }
+    out << ')';
+    return out;
+}
+
+template<typename T>
+T make(const T& value) { return value; }
+
+/*****************************************************************************
+*   tut test group
+*****************************************************************************/
+namespace tut
+{
+    struct events_data
+    {
+        events_data():
+            pumps(LLEventPumps::instance()),
+            listener0("first"),
+            listener1("second")
+        {}
+        LLEventPumps& pumps;
+        Listener listener0;
+        Listener listener1;
+
+        void check_listener(const std::string& desc, const Listener& listener, LLSD::Integer got)
+        {
+            ensure_equals(STRINGIZE(listener << ' ' << desc),
+                          listener.getLastEvent().asInteger(), got);
+        }
+    };
+    typedef test_group<events_data> events_group;
+    typedef events_group::object events_object;
+    tut::events_group evgr("events");
+
+    template<> template<>
+    void events_object::test<1>()
+    {
+        set_test_name("basic operations");
+        // Now there's a static constructor in llevents.cpp that registers on
+        // the "mainloop" pump to call LLEventPumps::flush().
+        // Actually -- having to modify this to track the statically-
+        // constructed pumps in other TUT modules in this giant monolithic test
+        // executable isn't such a hot idea.
+//      ensure_equals("initial pump", pumps.mPumpMap.size(), 1);
+        size_t initial_pumps(pumps.mPumpMap.size());
+        LLEventPump& per_frame(pumps.obtain("per-frame"));
+        ensure_equals("first explicit pump", pumps.mPumpMap.size(), initial_pumps+1);
+        // Verify that per_frame was instantiated as an LLEventStream.
+        ensure("LLEventStream leaf class", dynamic_cast<LLEventStream*>(&per_frame));
+        ensure("enabled", per_frame.enabled());
+        // Trivial test, but posting an event to an EventPump with no
+        // listeners should not blow up. The test is relevant because defining
+        // a boost::signal with a non-void return signature, using the default
+        // combiner, blows up if there are no listeners. This is because the
+        // default combiner is defined to return the value returned by the
+        // last listener, which is meaningless if there were no listeners.
+        per_frame.post(0);
+        // NOTE: boost::bind() saves its arguments by VALUE! If you pass an
+        // object instance rather than a pointer, you'll end up binding to an
+        // internal copy of that instance! Use boost::ref() to capture a
+        // reference instead.
+        LLBoundListener connection = per_frame.listen(listener0.getName(),
+                                                      boost::bind(&Listener::call,
+                                                                  boost::ref(listener0),
+                                                                  _1));
+        ensure("connected", connection.connected());
+        ensure("not blocked", ! connection.blocked());
+        per_frame.post(1);
+        check_listener("received", listener0, 1);
+        { // block the connection
+            LLEventPump::Blocker block(connection);
+            ensure("blocked", connection.blocked());
+            per_frame.post(2);
+            check_listener("not updated", listener0, 1);
+        } // unblock
+        ensure("unblocked", ! connection.blocked());
+        per_frame.post(3);
+        check_listener("unblocked", listener0, 3);
+        LLBoundListener sameConnection = per_frame.getListener(listener0.getName());
+        ensure("still connected", sameConnection.connected());
+        ensure("still not blocked", ! sameConnection.blocked());
+        { // block it again
+            LLEventPump::Blocker block(sameConnection);
+            ensure("re-blocked", sameConnection.blocked());
+            per_frame.post(4);
+            check_listener("re-blocked", listener0, 3);
+        } // unblock
+        bool threw = false;
+        try
+        {
+            per_frame.listen(listener0.getName(), // note bug, dup name
+                             boost::bind(&Listener::call, boost::ref(listener1), _1));
+        }
+        catch (const LLEventPump::DupListenerName& e)
+        {
+            threw = true;
+            ensure_equals(e.what(),
+                          std::string("DupListenerName: "
+                                      "Attempt to register duplicate listener name '") +
+                          listener0.getName() +
+                          "' on " + typeid(per_frame).name() + " '" + per_frame.getName() + "'");
+        }
+        ensure("threw DupListenerName", threw);
+        // do it right this time
+        per_frame.listen(listener1.getName(),
+                         boost::bind(&Listener::call, boost::ref(listener1), _1));
+        per_frame.post(5);
+        check_listener("got", listener0, 5);
+        check_listener("got", listener1, 5);
+        per_frame.enable(false);
+        per_frame.post(6);
+        check_listener("didn't get", listener0, 5);
+        check_listener("didn't get", listener1, 5);
+        per_frame.enable();
+        per_frame.post(7);
+        check_listener("got", listener0, 7);
+        check_listener("got", listener1, 7);
+        per_frame.stopListening(listener0.getName());
+        ensure("disconnected 0", ! connection.connected());
+        ensure("disconnected 1", ! sameConnection.connected());
+        per_frame.post(8);
+        check_listener("disconnected", listener0, 7);
+        check_listener("still connected", listener1, 8);
+        per_frame.stopListening(listener1.getName());
+        per_frame.post(9);
+        check_listener("disconnected", listener1, 8);
+    }
+
+    template<> template<>
+    void events_object::test<2>()
+    {
+        set_test_name("callstop() returning true");
+        LLEventPump& per_frame(pumps.obtain("per-frame"));
+        listener0.reset(0);
+        listener1.reset(0);
+        LLBoundListener bound0 = per_frame.listen(listener0.getName(),
+                                                  boost::bind(&Listener::callstop,
+                                                              boost::ref(listener0),
+                                                              _1));
+        LLBoundListener bound1 = per_frame.listen(listener1.getName(),
+                                                  boost::bind(&Listener::call,
+                                                              boost::ref(listener1),
+                                                              _1),
+                                                  // after listener0
+                                                  make<LLEventPump::NameList>(list_of(listener0.getName())));
+        ensure("enabled", per_frame.enabled());
+        ensure("connected 0", bound0.connected());
+        ensure("unblocked 0", ! bound0.blocked());
+        ensure("connected 1", bound1.connected());
+        ensure("unblocked 1", ! bound1.blocked());
+        per_frame.post(1);
+        check_listener("got", listener0, 1);
+        // Because listener0.callstop() returns true, control never reaches listener1.call().
+        check_listener("got", listener1, 0);
+    }
+
+    bool chainEvents(Listener& someListener, const LLSD& event)
+    {
+        // Make this call so we can watch for side effects for test purposes.
+        someListener.call(event);
+        // This function represents a recursive event chain -- or some other
+        // scenario in which an event handler raises additional events.
+        int value = event.asInteger();
+        if (value)
+        {
+            LLEventPumps::instance().obtain("login").post(value - 1);
+        }
+        return false;
+    }
+
+    template<> template<>
+    void events_object::test<3>()
+    {
+        set_test_name("LLEventQueue delayed action");
+        // This access is NOT legal usage: we can do it only because we're
+        // hacking private for test purposes. Normally we'd either compile in
+        // a particular name, or (later) edit a config file.
+        pumps.mQueueNames.insert("login");
+        LLEventPump& login(pumps.obtain("login"));
+        // The "mainloop" pump is special: posting on that implicitly calls
+        // LLEventPumps::flush(), which in turn should flush our "login"
+        // LLEventQueue.
+        LLEventPump& mainloop(pumps.obtain("mainloop"));
+        ensure("LLEventQueue leaf class", dynamic_cast<LLEventQueue*>(&login));
+        login.listen(listener0.getName(), boost::bind(&Listener::call, boost::ref(listener0), _1));
+        listener0.reset(0);
+        login.post(1);
+        check_listener("waiting for queued event", listener0, 0);
+        mainloop.post(LLSD());
+        check_listener("got queued event", listener0, 1);
+        login.stopListening(listener0.getName());
+        // Verify that when an event handler posts a new event on the same
+        // LLEventQueue, it doesn't get processed in the same flush() call --
+        // it waits until the next flush() call.
+        listener0.reset(17);
+        login.listen("chainEvents", boost::bind(chainEvents, boost::ref(listener0), _1));
+        login.post(1);
+        check_listener("chainEvents(1) not yet called", listener0, 17);
+        mainloop.post(LLSD());
+        check_listener("chainEvents(1) called", listener0, 1);
+        mainloop.post(LLSD());
+        check_listener("chainEvents(0) called", listener0, 0);
+        mainloop.post(LLSD());
+        check_listener("chainEvents(-1) not called", listener0, 0);
+        login.stopListening("chainEvents");
+    }
+
+    template<> template<>
+    void events_object::test<4>()
+    {
+        set_test_name("explicitly-instantiated LLEventStream");
+        // Explicitly instantiate an LLEventStream, and verify that it
+        // self-registers with LLEventPumps
+        size_t registered = pumps.mPumpMap.size();
+        size_t owned = pumps.mOurPumps.size();
+        LLEventPump* localInstance;
+        {
+            LLEventStream myEventStream("stream");
+            localInstance = &myEventStream;
+            LLEventPump& stream(pumps.obtain("stream"));
+            ensure("found named LLEventStream instance", &stream == localInstance);
+            ensure_equals("registered new instance", pumps.mPumpMap.size(), registered + 1);
+            ensure_equals("explicit instance not owned", pumps.mOurPumps.size(), owned);
+        } // destroy myEventStream -- should unregister
+        ensure_equals("destroyed instance unregistered", pumps.mPumpMap.size(), registered);
+        ensure_equals("destroyed instance not owned", pumps.mOurPumps.size(), owned);
+        LLEventPump& stream(pumps.obtain("stream"));
+        ensure("new LLEventStream instance", &stream != localInstance);
+        ensure_equals("obtain()ed instance registered", pumps.mPumpMap.size(), registered + 1);
+        ensure_equals("obtain()ed instance owned", pumps.mOurPumps.size(), owned + 1);
+    }
+
+    template<> template<>
+    void events_object::test<5>()
+    {
+        set_test_name("stopListening()");
+        LLEventPump& login(pumps.obtain("login"));
+        login.listen(listener0.getName(), boost::bind(&Listener::call, boost::ref(listener0), _1));
+        login.stopListening(listener0.getName());
+        // should not throw because stopListening() should have removed name
+        login.listen(listener0.getName(),
+                     boost::bind(&Listener::callstop, boost::ref(listener0), _1));
+        LLBoundListener wrong = login.getListener("bogus");
+        ensure("bogus connection disconnected", ! wrong.connected());
+        ensure("bogus connection blocked", wrong.blocked());
+    }
+
+    template<> template<>
+    void events_object::test<6>()
+    {
+        set_test_name("chaining LLEventPump instances");
+        LLEventPump& upstream(pumps.obtain("upstream"));
+        // One potentially-useful construct is to chain LLEventPumps together.
+        // Among other things, this allows you to turn subsets of listeners on
+        // and off in groups.
+        LLEventPump& filter0(pumps.obtain("filter0"));
+        LLEventPump& filter1(pumps.obtain("filter1"));
+        upstream.listen(filter0.getName(),
+                        boost::bind(&LLEventPump::post, boost::ref(filter0), _1));
+        upstream.listen(filter1.getName(),
+                        boost::bind(&LLEventPump::post, boost::ref(filter1), _1));
+        filter0.listen(listener0.getName(),
+                       boost::bind(&Listener::call, boost::ref(listener0), _1));
+        filter1.listen(listener1.getName(),
+                       boost::bind(&Listener::call, boost::ref(listener1), _1));
+        listener0.reset(0);
+        listener1.reset(0);
+        upstream.post(1);
+        check_listener("got unfiltered", listener0, 1);
+        check_listener("got unfiltered", listener1, 1);
+        filter0.enable(false);
+        upstream.post(2);
+        check_listener("didn't get filtered", listener0, 1);
+        check_listener("got filtered", listener1, 2);
+    }
+
+    template<> template<>
+    void events_object::test<7>()
+    {
+        set_test_name("listener dependency order");
+        typedef LLEventPump::NameList NameList;
+        typedef Collect::StringList StringList;
+        LLEventPump& button(pumps.obtain("button"));
+        Collect collector;
+        button.listen("Mary",
+                      boost::bind(&Collect::add, boost::ref(collector), "Mary", _1),
+                      // state that "Mary" must come after "checked"
+                      make<NameList>(list_of("checked")));
+        button.listen("checked",
+                      boost::bind(&Collect::add, boost::ref(collector), "checked", _1),
+                      // "checked" must come after "spot"
+                      make<NameList>(list_of("spot")));
+        button.listen("spot",
+                      boost::bind(&Collect::add, boost::ref(collector), "spot", _1));
+        button.post(1);
+        ensure_equals(collector.result, make<StringList>(list_of("spot")("checked")("Mary")));
+        collector.clear();
+        button.stopListening("Mary");
+        button.listen("Mary",
+                      boost::bind(&Collect::add, boost::ref(collector), "Mary", _1),
+                      LLEventPump::empty, // no after dependencies
+                      // now "Mary" must come before "spot"
+                      make<NameList>(list_of("spot")));
+        button.post(2);
+        ensure_equals(collector.result, make<StringList>(list_of("Mary")("spot")("checked")));
+        collector.clear();
+        button.stopListening("spot");
+        std::string threw;
+        try
+        {
+            button.listen("spot",
+                          boost::bind(&Collect::add, boost::ref(collector), "spot", _1),
+                          // after "Mary" and "checked" -- whoops!
+                          make<NameList>(list_of("Mary")("checked")));
+        }
+        catch (const LLEventPump::Cycle& e)
+        {
+            threw = e.what();
+//          std::cout << "Caught: " << e.what() << '\n';
+        }
+        // Obviously the specific wording of the exception text can
+        // change; go ahead and change the test to match.
+        // Establish that it contains:
+        // - the name and runtime type of the LLEventPump
+        ensure_contains("LLEventPump type", threw, typeid(button).name());
+        ensure_contains("LLEventPump name", threw, "'button'");
+        // - the name of the new listener that caused the problem
+        ensure_contains("new listener name", threw, "'spot'");
+        // - a synopsis of the problematic dependencies.
+        ensure_contains("cyclic dependencies", threw,
+                        "\"Mary\" -> before (\"spot\")");
+        ensure_contains("cyclic dependencies", threw,
+                        "after (\"spot\") -> \"checked\"");
+        ensure_contains("cyclic dependencies", threw,
+                        "after (\"Mary\", \"checked\") -> \"spot\"");
+        button.listen("yellow",
+                      boost::bind(&Collect::add, boost::ref(collector), "yellow", _1),
+                      make<NameList>(list_of("checked")));
+        button.listen("shoelaces",
+                      boost::bind(&Collect::add, boost::ref(collector), "shoelaces", _1),
+                      make<NameList>(list_of("checked")));
+        button.post(3);
+        ensure_equals(collector.result, make<StringList>(list_of("Mary")("checked")("yellow")("shoelaces")));
+        collector.clear();
+        threw.clear();
+        try
+        {
+            button.listen("of",
+                          boost::bind(&Collect::add, boost::ref(collector), "of", _1),
+                          make<NameList>(list_of("shoelaces")),
+                          make<NameList>(list_of("yellow")));
+        }
+        catch (const LLEventPump::OrderChange& e)
+        {
+            threw = e.what();
+//          std::cout << "Caught: " << e.what() << '\n';
+        }
+        // Same remarks about the specific wording of the exception. Just
+        // ensure that it contains enough information to clarify the
+        // problem and what must be done to resolve it.
+        ensure_contains("LLEventPump type", threw, typeid(button).name());
+        ensure_contains("LLEventPump name", threw, "'button'");
+        ensure_contains("new listener name", threw, "'of'");
+        ensure_contains("prev listener name", threw, "'yellow'");
+        ensure_contains("old order", threw, "was: Mary, checked, yellow, shoelaces");
+        ensure_contains("new order", threw, "now: Mary, checked, shoelaces, of, yellow");
+        button.post(4);
+        ensure_equals(collector.result, make<StringList>(list_of("Mary")("checked")("yellow")("shoelaces")));
+    }
+
+    template<> template<>
+    void events_object::test<8>()
+    {
+        set_test_name("tweaked and untweaked LLEventPump instance names");
+        {   // nested scope
+            // Hand-instantiate an LLEventStream...
+            LLEventStream bob("bob");
+            bool threw = false;
+            try
+            {
+                // then another with a duplicate name.
+                LLEventStream bob2("bob");
+            }
+            catch (const LLEventPump::DupPumpName& /*e*/)
+            {
+                threw = true;
+//              std::cout << "Caught: " << e.what() << '\n';
+            }
+            ensure("Caught DupPumpName", threw);
+        }   // delete first 'bob'
+        LLEventStream bob("bob");   // should work, previous one unregistered
+        LLEventStream bob1("bob", true); // allowed to tweak name
+        ensure_equals("tweaked LLEventStream name", bob1.getName(), "bob1");
+        std::vector< boost::shared_ptr<LLEventStream> > streams;
+        for (int i = 2; i <= 10; ++i)
+        {
+            streams.push_back(boost::shared_ptr<LLEventStream>(new LLEventStream("bob", true)));
+        }
+        ensure_equals("last tweaked LLEventStream name", streams.back()->getName(), "bob10");
+    }
+
+    // Define a function that accepts an LLListenerOrPumpName
+    void eventSource(const LLListenerOrPumpName& listener)
+    {
+        // Pretend that some time has elapsed. Call listener immediately.
+        listener(17);
+    }
+
+    template<> template<>
+    void events_object::test<9>()
+    {
+        set_test_name("LLListenerOrPumpName");
+        // Passing a boost::bind() expression to LLListenerOrPumpName
+        listener0.reset(0);
+        eventSource(boost::bind(&Listener::call, boost::ref(listener0), _1));
+        check_listener("got by listener", listener0, 17);
+        // Passing a string LLEventPump name to LLListenerOrPumpName
+        listener0.reset(0);
+        LLEventStream random("random");
+        random.listen(listener0.getName(), boost::bind(&Listener::call, boost::ref(listener0), _1));
+        eventSource("random");
+        check_listener("got by pump name", listener0, 17);
+        bool threw = false;
+        try
+        {
+            LLListenerOrPumpName empty;
+            empty(17);
+        }
+        catch (const LLListenerOrPumpName::Empty&)
+        {
+            threw = true;
+        }
+        ensure("threw Empty", threw);
+    }
+
+    class TempListener: public Listener
+    {
+    public:
+        TempListener(const std::string& name, bool& liveFlag):
+            Listener(name),
+            mLiveFlag(liveFlag)
+        {
+            mLiveFlag = true;
+        }
+
+        virtual ~TempListener()
+        {
+            mLiveFlag = false;
+        }
+
+    private:
+        bool& mLiveFlag;
+    };
+
+    template<> template<>
+    void events_object::test<10>()
+    {
+        set_test_name("listen(boost::bind(...TempListener...))");
+        // listen() can't do anything about a plain TempListener instance:
+        // it's not managed with shared_ptr, nor is it an LLEventTrackable subclass
+        bool live = false;
+        LLEventPump& heaptest(pumps.obtain("heaptest"));
+        LLBoundListener connection;
+        {
+            TempListener tempListener("temp", live);
+            ensure("TempListener constructed", live);
+            connection = heaptest.listen(tempListener.getName(),
+                                         boost::bind(&Listener::call,
+                                                     boost::ref(tempListener),
+                                                     _1));
+            heaptest.post(1);
+            check_listener("received", tempListener, 1);
+        } // presumably this will make newListener go away?
+        // verify that
+        ensure("TempListener destroyed", ! live);
+        // This is the case against which we can't defend. Don't even try to
+        // post to heaptest -- that would engage Undefined Behavior.
+        // Cautiously inspect connection...
+        ensure("misleadingly connected", connection.connected());
+        // then disconnect by hand.
+        heaptest.stopListening("temp");
+    }
+
+    template<> template<>
+    void events_object::test<11>()
+    {
+        set_test_name("listen(boost::bind(...weak_ptr...))");
+        // listen() detecting weak_ptr<TempListener> in boost::bind() object
+        bool live = false;
+        LLEventPump& heaptest(pumps.obtain("heaptest"));
+        LLBoundListener connection;
+        ensure("default state", ! connection.connected());
+        {
+            boost::shared_ptr<TempListener> newListener(new TempListener("heap", live));
+            newListener->reset();
+            ensure("TempListener constructed", live);
+            connection = heaptest.listen(newListener->getName(),
+                                         boost::bind(&Listener::call, weaken(newListener), _1));
+            ensure("new connection", connection.connected());
+            heaptest.post(1);
+            check_listener("received", *newListener, 1);
+        } // presumably this will make newListener go away?
+        // verify that
+        ensure("TempListener destroyed", ! live);
+        ensure("implicit disconnect", ! connection.connected());
+        // now just make sure we don't blow up trying to access a freed object!
+        heaptest.post(2);
+    }
+
+    template<> template<>
+    void events_object::test<12>()
+    {
+        set_test_name("listen(boost::bind(...shared_ptr...))");
+/*==========================================================================*|
+        // DISABLED because I've made this case produce a compile error.
+        // Following the error leads the disappointed dev to a comment
+        // instructing her to use the weaken() function to bind a weak_ptr<T>
+        // instead of binding a shared_ptr<T>, and explaining why. I know of
+        // no way to use TUT to code a repeatable test in which the expected
+        // outcome is a compile error. The interested reader is invited to
+        // uncomment this block and build to see for herself.
+
+        // listen() detecting shared_ptr<TempListener> in boost::bind() object
+        bool live = false;
+        LLEventPump& heaptest(pumps.obtain("heaptest"));
+        LLBoundListener connection;
+        std::string listenerName("heap");
+        ensure("default state", ! connection.connected());
+        {
+            boost::shared_ptr<TempListener> newListener(new TempListener(listenerName, live));
+            ensure_equals("use_count", newListener.use_count(), 1);
+            newListener->reset();
+            ensure("TempListener constructed", live);
+            connection = heaptest.listen(newListener->getName(),
+                                         boost::bind(&Listener::call, newListener, _1));
+            ensure("new connection", connection.connected());
+            ensure_equals("use_count", newListener.use_count(), 2);
+            heaptest.post(1);
+            check_listener("received", *newListener, 1);
+        } // this should make newListener go away...
+        // Unfortunately, the fact that we've bound a shared_ptr by value into
+        // our LLEventPump means that copy will keep the referenced object alive.
+        ensure("TempListener still alive", live);
+        ensure("still connected", connection.connected());
+        // disconnecting explicitly should delete the TempListener...
+        heaptest.stopListening(listenerName);
+#if 0   // however, in my experience, it does not. I don't know why not.
+        // Ah: on 2009-02-19, Frank Mori Hess, author of the Boost.Signals2
+        // library, stated on the boost-users mailing list:
+        // http://www.nabble.com/Re%3A--signals2--review--The-review-of-the-signals2-library-(formerly-thread_safe_signals)-begins-today%2C-Nov-1st-p22102367.html
+        // "It will get destroyed eventually. The signal cleans up its slot
+        // list little by little during connect/invoke. It doesn't immediately
+        // remove disconnected slots from the slot list since other threads
+        // might be using the same slot list concurrently. It might be
+        // possible to make it immediately reset the shared_ptr owning the
+        // slot though, leaving an empty shared_ptr in the slot list, since
+        // that wouldn't invalidate any iterators."
+        ensure("TempListener destroyed", ! live);
+        ensure("implicit disconnect", ! connection.connected());
+#endif  // 0
+        // now just make sure we don't blow up trying to access a freed object!
+        heaptest.post(2);
+|*==========================================================================*/
+    }
+
+    class TempTrackableListener: public TempListener, public LLEventTrackable
+    {
+    public:
+        TempTrackableListener(const std::string& name, bool& liveFlag):
+            TempListener(name, liveFlag)
+        {}
+    };
+
+    template<> template<>
+    void events_object::test<13>()
+    {
+        set_test_name("listen(boost::bind(...TempTrackableListener ref...))");
+        bool live = false;
+        LLEventPump& heaptest(pumps.obtain("heaptest"));
+        LLBoundListener connection;
+        {
+            TempTrackableListener tempListener("temp", live);
+            ensure("TempTrackableListener constructed", live);
+            connection = heaptest.listen(tempListener.getName(),
+                                         boost::bind(&TempTrackableListener::call,
+                                                     boost::ref(tempListener), _1));
+            heaptest.post(1);
+            check_listener("received", tempListener, 1);
+        } // presumably this will make tempListener go away?
+        // verify that
+        ensure("TempTrackableListener destroyed", ! live);
+        ensure("implicit disconnect", ! connection.connected());
+        // now just make sure we don't blow up trying to access a freed object!
+        heaptest.post(2);
+    }
+
+    template<> template<>
+    void events_object::test<14>()
+    {
+        set_test_name("listen(boost::bind(...TempTrackableListener pointer...))");
+        bool live = false;
+        LLEventPump& heaptest(pumps.obtain("heaptest"));
+        LLBoundListener connection;
+        {
+            TempTrackableListener* newListener(new TempTrackableListener("temp", live));
+            ensure("TempTrackableListener constructed", live);
+            connection = heaptest.listen(newListener->getName(),
+                                         boost::bind(&TempTrackableListener::call,
+                                                     newListener, _1));
+            heaptest.post(1);
+            check_listener("received", *newListener, 1);
+            // explicitly destroy newListener
+            delete newListener;
+        }
+        // verify that
+        ensure("TempTrackableListener destroyed", ! live);
+        ensure("implicit disconnect", ! connection.connected());
+        // now just make sure we don't blow up trying to access a freed object!
+        heaptest.post(2);
+    }
+
+    class TempSharedListener: public TempListener,
+                              public boost::enable_shared_from_this<TempSharedListener>
+    {
+    public:
+        TempSharedListener(const std::string& name, bool& liveFlag):
+            TempListener(name, liveFlag)
+        {}
+    };
+
+    template<> template<>
+    void events_object::test<15>()
+    {
+        set_test_name("listen(boost::bind(...TempSharedListener ref...))");
+#if 0
+        bool live = false;
+        LLEventPump& heaptest(pumps.obtain("heaptest"));
+        LLBoundListener connection;
+        {
+            // We MUST have at least one shared_ptr to an
+            // enable_shared_from_this subclass object before
+            // shared_from_this() can work.
+            boost::shared_ptr<TempSharedListener>
+                tempListener(new TempSharedListener("temp", live));
+            ensure("TempSharedListener constructed", live);
+            // However, we're not passing either the shared_ptr or its
+            // corresponding weak_ptr -- instead, we're passing a reference to
+            // the TempSharedListener.
+/*==========================================================================*|
+            std::cout << "Capturing const ref" << std::endl;
+            const boost::enable_shared_from_this<TempSharedListener>& cref(*tempListener);
+            std::cout << "Capturing const ptr" << std::endl;
+            const boost::enable_shared_from_this<TempSharedListener>* cp(&cref);
+            std::cout << "Capturing non-const ptr" << std::endl;
+            boost::enable_shared_from_this<TempSharedListener>* p(const_cast<boost::enable_shared_from_this<TempSharedListener>*>(cp));
+            std::cout << "Capturing shared_from_this()" << std::endl;
+            boost::shared_ptr<TempSharedListener> sp(p->shared_from_this());
+            std::cout << "Capturing weak_ptr" << std::endl;
+            boost::weak_ptr<TempSharedListener> wp(weaken(sp));
+            std::cout << "Binding weak_ptr" << std::endl;
+|*==========================================================================*/
+            connection = heaptest.listen(tempListener->getName(),
+                                         boost::bind(&TempSharedListener::call, *tempListener, _1));
+            heaptest.post(1);
+            check_listener("received", *tempListener, 1);
+        } // presumably this will make tempListener go away?
+        // verify that
+        ensure("TempSharedListener destroyed", ! live);
+        ensure("implicit disconnect", ! connection.connected());
+        // now just make sure we don't blow up trying to access a freed object!
+        heaptest.post(2);
+#endif // 0
+    }
+} // namespace tut
-- 
cgit v1.2.3


From dc934629919bdcaea72c78e5291263914fb958ec Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 11 May 2009 20:05:46 +0000
Subject: svn merge -r113003:119136
 svn+ssh://svn.lindenlab.com/svn/linden/branches/login-api/login-api-2
 svn+ssh://svn.lindenlab.com/svn/linden/branches/login-api/login-api-3

---
 indra/CMakeLists.txt                               |   1 +
 indra/cmake/LLAddBuildTest.cmake                   |   7 +-
 indra/cmake/LLLogin.cmake                          |   7 +
 indra/cmake/Pth.cmake                              |  21 +
 indra/llcommon/CMakeLists.txt                      |   6 +
 indra/llcommon/lleventcoro.cpp                     | 118 +++++
 indra/llcommon/lleventcoro.h                       | 542 +++++++++++++++++++++
 indra/llcommon/lleventfilter.cpp                   | 149 ++++++
 indra/llcommon/lleventfilter.h                     | 186 +++++++
 indra/llcommon/llevents.cpp                        |   7 +
 indra/llcommon/llevents.h                          | 122 +++--
 indra/llcommon/llsdutil.cpp                        | 263 ++++++++++
 indra/llcommon/llsdutil.h                          |  55 +++
 indra/llcommon/tests/listener.h                    | 139 ++++++
 indra/llcommon/tests/lleventfilter_test.cpp        | 276 +++++++++++
 indra/llcommon/tests/wrapllerrs.h                  |  56 +++
 indra/llmessage/CMakeLists.txt                     |   3 +
 indra/llmessage/llares.cpp                         |   8 +-
 indra/llmessage/llares.h                           |  12 +
 indra/llmessage/llareslistener.cpp                 | 108 ++++
 indra/llmessage/llareslistener.h                   |  47 ++
 indra/llmessage/tests/llareslistener_test.cpp      | 194 ++++++++
 indra/llmessage/tests/test_llsdmessage_peer.py     |  30 +-
 indra/llmessage/tests/testrunner.py                |  53 ++
 indra/newview/CMakeLists.txt                       |  13 +-
 indra/newview/llappviewer.cpp                      |   4 -
 indra/newview/llappviewer.h                        |   4 -
 indra/newview/llclassifiedinfo.cpp                 |  36 +-
 indra/newview/llclassifiedinfo.h                   |   3 +-
 indra/newview/lleventinfo.cpp                      |  36 +-
 indra/newview/lleventinfo.h                        |   3 +-
 indra/newview/lleventnotifier.cpp                  |  79 ++-
 indra/newview/lleventnotifier.h                    |   5 +-
 indra/newview/llfloatertos.cpp                     |  40 +-
 indra/newview/llfloatertos.h                       |  12 +-
 indra/newview/llinventorymodel.cpp                 | 205 ++++----
 indra/newview/llinventorymodel.h                   |   6 +-
 indra/newview/lllogininstance.cpp                  | 532 ++++++++++++++++++++
 indra/newview/lllogininstance.h                    |  95 ++++
 indra/newview/llpanellogin.cpp                     |   2 +-
 indra/newview/llstartup.h                          |   6 -
 indra/newview/llviewermenu.cpp                     |   1 -
 indra/newview/llviewernetwork.cpp                  |   6 +
 indra/newview/llviewernetwork.h                    |   4 +
 indra/newview/llxmlrpclistener.cpp                 | 494 +++++++++++++++++++
 indra/newview/llxmlrpclistener.h                   |  35 ++
 indra/newview/llxmlrpctransaction.cpp              |  13 +
 indra/newview/tests/llcapabilitylistener_test.cpp  |  36 +-
 indra/newview/tests/llxmlrpclistener_test.cpp      | 230 +++++++++
 indra/newview/tests/test_llxmlrpc_peer.py          |  59 +++
 indra/test/llevents_tut.cpp                        | 133 +----
 indra/test/llsdutil_tut.cpp                        | 180 ++++++-
 indra/test/lltut.cpp                               |  12 +-
 indra/test/lltut.h                                 |   3 +
 indra/test/test.cpp                                |  19 +-
 indra/viewer_components/CMakeLists.txt             |   1 +
 indra/viewer_components/login/CMakeLists.txt       |  43 ++
 indra/viewer_components/login/lllogin.cpp          | 383 +++++++++++++++
 indra/viewer_components/login/lllogin.h            | 133 +++++
 .../viewer_components/login/tests/lllogin_test.cpp | 382 +++++++++++++++
 60 files changed, 5163 insertions(+), 495 deletions(-)
 create mode 100644 indra/cmake/LLLogin.cmake
 create mode 100644 indra/cmake/Pth.cmake
 create mode 100644 indra/llcommon/lleventcoro.cpp
 create mode 100644 indra/llcommon/lleventcoro.h
 create mode 100644 indra/llcommon/lleventfilter.cpp
 create mode 100644 indra/llcommon/lleventfilter.h
 create mode 100644 indra/llcommon/tests/listener.h
 create mode 100644 indra/llcommon/tests/lleventfilter_test.cpp
 create mode 100644 indra/llcommon/tests/wrapllerrs.h
 create mode 100644 indra/llmessage/llareslistener.cpp
 create mode 100644 indra/llmessage/llareslistener.h
 create mode 100644 indra/llmessage/tests/llareslistener_test.cpp
 create mode 100644 indra/llmessage/tests/testrunner.py
 create mode 100644 indra/newview/lllogininstance.cpp
 create mode 100644 indra/newview/lllogininstance.h
 create mode 100644 indra/newview/llxmlrpclistener.cpp
 create mode 100644 indra/newview/llxmlrpclistener.h
 create mode 100644 indra/newview/tests/llxmlrpclistener_test.cpp
 create mode 100644 indra/newview/tests/test_llxmlrpc_peer.py
 create mode 100644 indra/viewer_components/CMakeLists.txt
 create mode 100644 indra/viewer_components/login/CMakeLists.txt
 create mode 100644 indra/viewer_components/login/lllogin.cpp
 create mode 100644 indra/viewer_components/login/lllogin.h
 create mode 100644 indra/viewer_components/login/tests/lllogin_test.cpp

(limited to 'indra')

diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index c285bcae4b..e8e05f727b 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -64,6 +64,7 @@ add_custom_target(viewer)
 if (VIEWER)
   add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
   add_subdirectory(${LIBS_OPEN_PREFIX}llui)
+  add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
 
   if (LINUX)
     add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index b19eebe1fe..6eeff45afe 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -1,6 +1,7 @@
 # -*- cmake -*-
 
 INCLUDE(APR)
+INCLUDE(Pth)
 INCLUDE(LLMath)
 
 MACRO(ADD_BUILD_TEST_NO_COMMON name parent)
@@ -36,6 +37,7 @@ MACRO(ADD_BUILD_TEST name parent)
             ${APR_LIBRARIES}
             ${PTHREAD_LIBRARY}
             ${WINDOWS_LIBRARIES}
+            ${PTH_LIBRARIES}
             )
         SET(basic_source_files
             ${name}.cpp
@@ -89,10 +91,13 @@ MACRO(ADD_BUILD_TEST_INTERNAL name parent libraries source_files)
     GET_TARGET_PROPERTY(TEST_EXE ${name}_test LOCATION)
     SET(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}_test_ok.txt)
 
+    SET(run_needs ${name}_test)
+
     IF ("${wrapper}" STREQUAL "")
       SET(TEST_CMD ${TEST_EXE} --touch=${TEST_OUTPUT} --sourcedir=${CMAKE_CURRENT_SOURCE_DIR})
     ELSE ("${wrapper}" STREQUAL "")
       SET(TEST_CMD ${PYTHON_EXECUTABLE} ${wrapper} ${TEST_EXE} --touch=${TEST_OUTPUT} --sourcedir=${CMAKE_CURRENT_SOURCE_DIR})
+      SET(run_needs ${run_needs} ${wrapper})
     ENDIF ("${wrapper}" STREQUAL "")
 
     #MESSAGE(STATUS "ADD_BUILD_TEST_INTERNAL ${name} test_cmd  = ${TEST_CMD}")
@@ -107,7 +112,7 @@ MACRO(ADD_BUILD_TEST_INTERNAL name parent libraries source_files)
     ADD_CUSTOM_COMMAND(
         OUTPUT ${TEST_OUTPUT}
         COMMAND ${TEST_SCRIPT_CMD}
-        DEPENDS ${name}_test
+        DEPENDS ${run_needs}
         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         )
 
diff --git a/indra/cmake/LLLogin.cmake b/indra/cmake/LLLogin.cmake
new file mode 100644
index 0000000000..47d171876a
--- /dev/null
+++ b/indra/cmake/LLLogin.cmake
@@ -0,0 +1,7 @@
+# -*- cmake -*-
+
+set(LLLOGIN_INCLUDE_DIRS
+    ${LIBS_OPEN_DIR}/viewer_components/login
+    )
+
+set(LLLOGIN_LIBRARIES lllogin)
diff --git a/indra/cmake/Pth.cmake b/indra/cmake/Pth.cmake
new file mode 100644
index 0000000000..a28f6ec696
--- /dev/null
+++ b/indra/cmake/Pth.cmake
@@ -0,0 +1,21 @@
+# -*- cmake -*-
+include(Prebuilt)
+
+set(PTH_FIND_QUIETLY ON)
+set(PTH_FIND_REQUIRED ON)
+
+if (STANDALONE)
+#  ?? How would I construct FindPTH.cmake? This file was cloned from
+#  CURL.cmake, which uses include(FindCURL), but there's no FindCURL.cmake?
+#  include(FindPTH)
+else (STANDALONE)
+  # This library is only needed to support Boost.Coroutine, and only on Mac.
+  if (DARWIN)
+    use_prebuilt_binary(pth)
+    set(PTH_LIBRARIES pth)
+    set(PTH_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+  else (DARWIN)
+    set(PTH_LIBRARIES)
+    set(PTH_INCLUDE_DIRS)
+  endif (DARWIN)
+endif (STANDALONE)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 694f3d5de8..d3d75f78df 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -33,6 +33,8 @@ set(llcommon_SOURCE_FILES
     llerror.cpp
     llerrorthread.cpp
     llevent.cpp
+    lleventcoro.cpp
+    lleventfilter.cpp
     llevents.cpp
     llfasttimer.cpp
     llfile.cpp
@@ -118,6 +120,8 @@ set(llcommon_HEADER_FILES
     llerrorlegacy.h
     llerrorthread.h
     llevent.h
+    lleventcoro.h
+    lleventfilter.h
     llevents.h
     lleventemitter.h
     llextendedstatus.h
@@ -223,3 +227,5 @@ target_link_libraries(
     )
 
 ADD_BUILD_TEST(lllazy llcommon)
+ADD_BUILD_TEST(lleventfilter llcommon)
+ADD_BUILD_TEST(coroutine llcommon)
diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp
new file mode 100644
index 0000000000..cea5a1eda3
--- /dev/null
+++ b/indra/llcommon/lleventcoro.cpp
@@ -0,0 +1,118 @@
+/**
+ * @file   lleventcoro.cpp
+ * @author Nat Goodspeed
+ * @date   2009-04-29
+ * @brief  Implementation for lleventcoro.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "lleventcoro.h"
+// STL headers
+#include <map>
+// std headers
+// external library headers
+// other Linden headers
+#include "llsdserialize.h"
+#include "llerror.h"
+
+std::string LLEventDetail::listenerNameForCoro(const void* self)
+{
+    typedef std::map<const void*, std::string> MapType;
+    static MapType memo;
+    MapType::const_iterator found = memo.find(self);
+    if (found != memo.end())
+    {
+        // this coroutine instance has called us before, reuse same name
+        return found->second;
+    }
+    // this is the first time we've been called for this coroutine instance
+    std::string name(LLEventPump::inventName("coro"));
+    memo[self] = name;
+    return name;
+}
+
+void LLEventDetail::storeToLLSDPath(LLSD& dest, const LLSD& rawPath, const LLSD& value)
+{
+    if (rawPath.isUndefined())
+    {
+        // no-op case
+        return;
+    }
+
+    // Arrange to treat rawPath uniformly as an array. If it's not already an
+    // array, store it as the only entry in one.
+    LLSD path;
+    if (rawPath.isArray())
+    {
+        path = rawPath;
+    }
+    else
+    {
+        path.append(rawPath);
+    }
+
+    // Need to indicate a current destination -- but that current destination
+    // needs to change as we step through the path array. Where normally we'd
+    // use an LLSD& to capture a subscripted LLSD lvalue, this time we must
+    // instead use a pointer -- since it must be reassigned.
+    LLSD* pdest = &dest;
+
+    // Now loop through that array
+    for (LLSD::Integer i = 0; i < path.size(); ++i)
+    {
+        if (path[i].isString())
+        {
+            // *pdest is an LLSD map
+            pdest = &((*pdest)[path[i].asString()]);
+        }
+        else if (path[i].isInteger())
+        {
+            // *pdest is an LLSD array
+            pdest = &((*pdest)[path[i].asInteger()]);
+        }
+        else
+        {
+            // What do we do with Real or Array or Map or ...?
+            // As it's a coder error -- not a user error -- rub the coder's
+            // face in it so it gets fixed.
+            LL_ERRS("lleventcoro") << "storeToLLSDPath(" << dest << ", " << rawPath << ", " << value
+                                   << "): path[" << i << "] bad type " << path[i].type() << LL_ENDL;
+        }
+    }
+
+    // Here *pdest is where we should store value.
+    *pdest = value;
+}
+
+LLSD errorException(const LLEventWithID& result, const std::string& desc)
+{
+    // If the result arrived on the error pump (pump 1), instead of
+    // returning it, deliver it via exception.
+    if (result.second)
+    {
+        throw LLErrorEvent(desc, result.first);
+    }
+    // That way, our caller knows a simple return must be from the reply
+    // pump (pump 0).
+    return result.first;
+}
+
+LLSD errorLog(const LLEventWithID& result, const std::string& desc)
+{
+    // If the result arrived on the error pump (pump 1), log it as a fatal
+    // error.
+    if (result.second)
+    {
+        LL_ERRS("errorLog") << desc << ":" << std::endl;
+        LLSDSerialize::toPrettyXML(result.first, LL_CONT);
+        LL_CONT << LL_ENDL;
+    }
+    // A simple return must therefore be from the reply pump (pump 0).
+    return result.first;
+}
diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h
new file mode 100644
index 0000000000..7232d1780f
--- /dev/null
+++ b/indra/llcommon/lleventcoro.h
@@ -0,0 +1,542 @@
+/**
+ * @file   lleventcoro.h
+ * @author Nat Goodspeed
+ * @date   2009-04-29
+ * @brief  Utilities to interface between coroutines and events.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLEVENTCORO_H)
+#define LL_LLEVENTCORO_H
+
+#include <boost/coroutine/coroutine.hpp>
+#include <boost/coroutine/future.hpp>
+#include <boost/optional.hpp>
+#include <string>
+#include <stdexcept>
+#include "llevents.h"
+#include "llerror.h"
+
+/**
+ * Like LLListenerOrPumpName, this is a class intended for parameter lists:
+ * accept a <tt>const LLEventPumpOrPumpName&</tt> and you can accept either an
+ * <tt>LLEventPump&</tt> or its string name. For a single parameter that could
+ * be either, it's not hard to overload the function -- but as soon as you
+ * want to accept two such parameters, this is cheaper than four overloads.
+ */
+class LLEventPumpOrPumpName
+{
+public:
+    /// Pass an actual LLEventPump&
+    LLEventPumpOrPumpName(LLEventPump& pump):
+        mPump(pump)
+    {}
+    /// Pass the string name of an LLEventPump
+    LLEventPumpOrPumpName(const std::string& pumpname):
+        mPump(LLEventPumps::instance().obtain(pumpname))
+    {}
+    /// Pass string constant name of an LLEventPump. This override must be
+    /// explicit, since otherwise passing <tt>const char*</tt> to a function
+    /// accepting <tt>const LLEventPumpOrPumpName&</tt> would require two
+    /// different implicit conversions: <tt>const char*</tt> -> <tt>const
+    /// std::string&</tt> -> <tt>const LLEventPumpOrPumpName&</tt>.
+    LLEventPumpOrPumpName(const char* pumpname):
+        mPump(LLEventPumps::instance().obtain(pumpname))
+    {}
+    /// Unspecified: "I choose not to identify an LLEventPump."
+    LLEventPumpOrPumpName() {}
+    operator LLEventPump& () const { return *mPump; }
+    LLEventPump& getPump() const { return *mPump; }
+    operator bool() const { return mPump; }
+    bool operator!() const { return ! mPump; }
+
+private:
+    boost::optional<LLEventPump&> mPump;
+};
+
+/// This is an adapter for a signature like void LISTENER(const LLSD&), which
+/// isn't a valid LLEventPump listener: such listeners should return bool.
+template <typename LISTENER>
+class LLVoidListener
+{
+public:
+    LLVoidListener(const LISTENER& listener):
+        mListener(listener)
+    {}
+    bool operator()(const LLSD& event)
+    {
+        mListener(event);
+        // don't swallow the event, let other listeners see it
+        return false;
+    }
+private:
+    LISTENER mListener;
+};
+
+/// LLVoidListener helper function to infer the type of the LISTENER
+template <typename LISTENER>
+LLVoidListener<LISTENER> voidlistener(const LISTENER& listener)
+{
+    return LLVoidListener<LISTENER>(listener);
+}
+
+namespace LLEventDetail
+{
+    /**
+     * waitForEventOn() permits a coroutine to temporarily listen on an
+     * LLEventPump any number of times. We don't really want to have to ask
+     * the caller to label each such call with a distinct string; the whole
+     * point of waitForEventOn() is to present a nice sequential interface to
+     * the underlying LLEventPump-with-named-listeners machinery. So we'll use
+     * LLEventPump::inventName() to generate a distinct name for each
+     * temporary listener. On the other hand, because a given coroutine might
+     * call waitForEventOn() any number of times, we don't really want to
+     * consume an arbitrary number of generated inventName()s: that namespace,
+     * though large, is nonetheless finite. So we memoize an invented name for
+     * each distinct coroutine instance (each different 'self' object). We
+     * can't know the type of 'self', because it depends on the coroutine
+     * body's signature. So we cast its address to void*, looking for distinct
+     * pointer values. Yes, that means that an early coroutine could cache a
+     * value here, then be destroyed, only to be supplanted by a later
+     * coroutine (of the same or different type), and we'll end up
+     * "recognizing" the second one and reusing the listener name -- but
+     * that's okay, since it won't collide with any listener name used by the
+     * earlier coroutine since that earlier coroutine no longer exists.
+     */
+    std::string listenerNameForCoro(const void* self);
+
+    /**
+     * Implement behavior described for postAndWait()'s @a replyPumpNamePath
+     * parameter:
+     *
+     * * If <tt>path.isUndefined()</tt>, do nothing.
+     * * If <tt>path.isString()</tt>, @a dest is an LLSD map: store @a value
+     *   into <tt>dest[path.asString()]</tt>.
+     * * If <tt>path.isInteger()</tt>, @a dest is an LLSD array: store @a
+     *   value into <tt>dest[path.asInteger()]</tt>.
+     * * If <tt>path.isArray()</tt>, iteratively apply the rules above to step
+     *   down through the structure of @a dest. The last array entry in @a
+     *   path specifies the entry in the lowest-level structure in @a dest
+     *   into which to store @a value.
+     *
+     * @note
+     * In the degenerate case in which @a path is an empty array, @a dest will
+     * @em become @a value rather than @em containing it.
+     */
+    void storeToLLSDPath(LLSD& dest, const LLSD& path, const LLSD& value);
+} // namespace LLEventDetail
+
+/**
+ * Post specified LLSD event on the specified LLEventPump, then wait for a
+ * response on specified other LLEventPump. This is more than mere
+ * convenience: the difference between this function and the sequence
+ * @code
+ * requestPump.post(myEvent);
+ * LLSD reply = waitForEventOn(self, replyPump);
+ * @endcode
+ * is that the sequence above fails if the reply is posted immediately on
+ * @a replyPump, that is, before <tt>requestPump.post()</tt> returns. In the
+ * sequence above, the running coroutine isn't even listening on @a replyPump
+ * until <tt>requestPump.post()</tt> returns and @c waitForEventOn() is
+ * entered. Therefore, the coroutine completely misses an immediate reply
+ * event, making it wait indefinitely.
+ *
+ * By contrast, postAndWait() listens on the @a replyPump @em before posting
+ * the specified LLSD event on the specified @a requestPump.
+ *
+ * @param self The @c self object passed into a coroutine
+ * @param event LLSD data to be posted on @a requestPump
+ * @param requestPump an LLEventPump on which to post @a event. Pass either
+ * the LLEventPump& or its string name. However, if you pass a
+ * default-constructed @c LLEventPumpOrPumpName, we skip the post() call.
+ * @param replyPump an LLEventPump on which postAndWait() will listen for a
+ * reply. Pass either the LLEventPump& or its string name. The calling
+ * coroutine will wait until that reply arrives. (If you're concerned about a
+ * reply that might not arrive, please see also LLEventTimeout.)
+ * @param replyPumpNamePath specifies the location within @a event in which to
+ * store <tt>replyPump.getName()</tt>. This is a strictly optional convenience
+ * feature; obviously you can store the name in @a event "by hand" if desired.
+ * @a replyPumpNamePath can be specified in any of four forms:
+ * * @c isUndefined() (default-constructed LLSD object): do nothing. This is
+ *   the default behavior if you omit @a replyPumpNamePath.
+ * * @c isInteger(): @a event is an array. Store <tt>replyPump.getName()</tt>
+ *   in <tt>event[replyPumpNamePath.asInteger()]</tt>.
+ * * @c isString(): @a event is a map. Store <tt>replyPump.getName()</tt> in
+ *   <tt>event[replyPumpNamePath.asString()]</tt>.
+ * * @c isArray(): @a event has several levels of structure, e.g. map of
+ *   maps, array of arrays, array of maps, map of arrays, ... Store
+ *   <tt>replyPump.getName()</tt> in
+ *   <tt>event[replyPumpNamePath[0]][replyPumpNamePath[1]]...</tt> In other
+ *   words, examine each array entry in @a replyPumpNamePath in turn. If it's an
+ *   <tt>LLSD::String</tt>, the current level of @a event is a map; step down to
+ *   that map entry. If it's an <tt>LLSD::Integer</tt>, the current level of @a
+ *   event is an array; step down to that array entry. The last array entry in
+ *   @a replyPumpNamePath specifies the entry in the lowest-level structure in
+ *   @a event into which to store <tt>replyPump.getName()</tt>.
+ */
+template <typename SELF>
+LLSD postAndWait(SELF& self, const LLSD& event, const LLEventPumpOrPumpName& requestPump,
+                 const LLEventPumpOrPumpName& replyPump, const LLSD& replyPumpNamePath=LLSD())
+{
+    // declare the future
+    boost::coroutines::future<LLSD> future(self);
+    // make a callback that will assign a value to the future, and listen on
+    // the specified LLEventPump with that callback
+    std::string listenerName(LLEventDetail::listenerNameForCoro(&self));
+    LLTempBoundListener connection(
+        replyPump.getPump().listen(listenerName,
+                                   voidlistener(boost::coroutines::make_callback(future))));
+    // skip the "post" part if requestPump is default-constructed
+    if (requestPump)
+    {
+        // If replyPumpNamePath is non-empty, store the replyPump name in the
+        // request event.
+        LLSD modevent(event);
+        LLEventDetail::storeToLLSDPath(modevent, replyPumpNamePath, replyPump.getPump().getName());
+        LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << listenerName
+                                 << " posting to " << requestPump.getPump().getName()
+                                 << ": " << modevent << LL_ENDL;
+        requestPump.getPump().post(modevent);
+    }
+    LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << listenerName
+                             << " about to wait on LLEventPump " << replyPump.getPump().getName()
+                             << LL_ENDL;
+    // trying to dereference ("resolve") the future makes us wait for it
+    LLSD value(*future);
+    LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << listenerName
+                             << " resuming with " << value << LL_ENDL;
+    // returning should disconnect the connection
+    return value;
+}
+
+/// Wait for the next event on the specified LLEventPump. Pass either the
+/// LLEventPump& or its string name.
+template <typename SELF>
+LLSD waitForEventOn(SELF& self, const LLEventPumpOrPumpName& pump)
+{
+    // This is now a convenience wrapper for postAndWait().
+    return postAndWait(self, LLSD(), LLEventPumpOrPumpName(), pump);
+}
+
+/// return type for two-pump variant of waitForEventOn()
+typedef std::pair<LLSD, int> LLEventWithID;
+
+namespace LLEventDetail
+{
+    /**
+     * This helper is specifically for the two-pump version of waitForEventOn().
+     * We use a single future object, but we want to listen on two pumps with it.
+     * Since we must still adapt from (the callable constructed by)
+     * boost::coroutines::make_callback() (void return) to provide an event
+     * listener (bool return), we've adapted LLVoidListener for the purpose. The
+     * basic idea is that we construct a distinct instance of WaitForEventOnHelper
+     * -- binding different instance data -- for each of the pumps. Then, when a
+     * pump delivers an LLSD value to either WaitForEventOnHelper, it can combine
+     * that LLSD with its discriminator to feed the future object.
+     */
+    template <typename LISTENER>
+    class WaitForEventOnHelper
+    {
+    public:
+        WaitForEventOnHelper(const LISTENER& listener, int discriminator):
+            mListener(listener),
+            mDiscrim(discriminator)
+        {}
+        // this signature is required for an LLEventPump listener
+        bool operator()(const LLSD& event)
+        {
+            // our future object is defined to accept LLEventWithID
+            mListener(LLEventWithID(event, mDiscrim));
+            // don't swallow the event, let other listeners see it
+            return false;
+        }
+    private:
+        LISTENER mListener;
+        const int mDiscrim;
+    };
+
+    /// WaitForEventOnHelper type-inference helper
+    template <typename LISTENER>
+    WaitForEventOnHelper<LISTENER> wfeoh(const LISTENER& listener, int discriminator)
+    {
+        return WaitForEventOnHelper<LISTENER>(listener, discriminator);
+    }
+} // namespace LLEventDetail
+
+/**
+ * This function waits for a reply on either of two specified LLEventPumps.
+ * Otherwise, it closely resembles postAndWait(); please see the documentation
+ * for that function for detailed parameter info.
+ *
+ * While we could have implemented the single-pump variant in terms of this
+ * one, there's enough added complexity here to make it worthwhile to give the
+ * single-pump variant its own straightforward implementation. Conversely,
+ * though we could use preprocessor logic to generate n-pump overloads up to
+ * BOOST_COROUTINE_WAIT_MAX, we don't foresee a use case. This two-pump
+ * overload exists because certain event APIs are defined in terms of a reply
+ * LLEventPump and an error LLEventPump.
+ *
+ * The LLEventWithID return value provides not only the received event, but
+ * the index of the pump on which it arrived (0 or 1).
+ *
+ * @note
+ * I'd have preferred to overload the name postAndWait() for both signatures.
+ * But consider the following ambiguous call:
+ * @code
+ * postAndWait(self, LLSD(), requestPump, replyPump, "someString");
+ * @endcode
+ * "someString" could be converted to either LLSD (@a replyPumpNamePath for
+ * the single-pump function) or LLEventOrPumpName (@a replyPump1 for two-pump
+ * function).
+ *
+ * It seems less burdensome to write postAndWait2() than to write either
+ * LLSD("someString") or LLEventOrPumpName("someString").
+ */
+template <typename SELF>
+LLEventWithID postAndWait2(SELF& self, const LLSD& event,
+                           const LLEventPumpOrPumpName& requestPump,
+                           const LLEventPumpOrPumpName& replyPump0,
+                           const LLEventPumpOrPumpName& replyPump1,
+                           const LLSD& replyPump0NamePath=LLSD(),
+                           const LLSD& replyPump1NamePath=LLSD())
+{
+    // declare the future
+    boost::coroutines::future<LLEventWithID> future(self);
+    // either callback will assign a value to this future; listen on
+    // each specified LLEventPump with a callback
+    std::string name(LLEventDetail::listenerNameForCoro(&self));
+    LLTempBoundListener connection0(
+        replyPump0.getPump().listen(name + "a",
+                               LLEventDetail::wfeoh(boost::coroutines::make_callback(future), 0)));
+    LLTempBoundListener connection1(
+        replyPump1.getPump().listen(name + "b",
+                               LLEventDetail::wfeoh(boost::coroutines::make_callback(future), 1)));
+    // skip the "post" part if requestPump is default-constructed
+    if (requestPump)
+    {
+        // If either replyPumpNamePath is non-empty, store the corresponding
+        // replyPump name in the request event.
+        LLSD modevent(event);
+        LLEventDetail::storeToLLSDPath(modevent, replyPump0NamePath,
+                                       replyPump0.getPump().getName());
+        LLEventDetail::storeToLLSDPath(modevent, replyPump1NamePath,
+                                       replyPump1.getPump().getName());
+        LL_DEBUGS("lleventcoro") << "postAndWait2(): coroutine " << name
+                                 << " posting to " << requestPump.getPump().getName()
+                                 << ": " << modevent << LL_ENDL;
+        requestPump.getPump().post(modevent);
+    }
+    LL_DEBUGS("lleventcoro") << "postAndWait2(): coroutine " << name
+                             << " about to wait on LLEventPumps " << replyPump0.getPump().getName()
+                             << ", " << replyPump1.getPump().getName() << LL_ENDL;
+    // trying to dereference ("resolve") the future makes us wait for it
+    LLEventWithID value(*future);
+    LL_DEBUGS("lleventcoro") << "postAndWait(): coroutine " << name
+                             << " resuming with (" << value.first << ", " << value.second << ")"
+                             << LL_ENDL;
+    // returning should disconnect both connections
+    return value;
+}
+
+/**
+ * Wait for the next event on either of two specified LLEventPumps.
+ */
+template <typename SELF>
+LLEventWithID
+waitForEventOn(SELF& self,
+               const LLEventPumpOrPumpName& pump0, const LLEventPumpOrPumpName& pump1)
+{
+    // This is now a convenience wrapper for postAndWait2().
+    return postAndWait2(self, LLSD(), LLEventPumpOrPumpName(), pump0, pump1);
+}
+
+/**
+ * Helper for the two-pump variant of waitForEventOn(), e.g.:
+ *
+ * @code
+ * LLSD reply = errorException(waitForEventOn(self, replyPump, errorPump),
+ *                             "error response from login.cgi");
+ * @endcode
+ *
+ * Examines an LLEventWithID, assuming that the second pump (pump 1) is
+ * listening for an error indication. If the incoming data arrived on pump 1,
+ * throw an LLErrorEvent exception. If the incoming data arrived on pump 0,
+ * just return it. Since a normal return can only be from pump 0, we no longer
+ * need the LLEventWithID's discriminator int; we can just return the LLSD.
+ *
+ * @note I'm not worried about introducing the (fairly generic) name
+ * errorException() into global namespace, because how many other overloads of
+ * the same name are going to accept an LLEventWithID parameter?
+ */
+LLSD errorException(const LLEventWithID& result, const std::string& desc);
+
+/**
+ * Exception thrown by errorException(). We don't call this LLEventError
+ * because it's not an error in event processing: rather, this exception
+ * announces an event that bears error information (for some other API).
+ */
+class LLErrorEvent: public std::runtime_error
+{
+public:
+    LLErrorEvent(const std::string& what, const LLSD& data):
+        std::runtime_error(what),
+        mData(data)
+    {}
+    virtual ~LLErrorEvent() throw() {}
+
+    LLSD getData() const { return mData; }
+
+private:
+    LLSD mData;
+};
+
+/**
+ * Like errorException(), save that this trips a fatal error using LL_ERRS
+ * rather than throwing an exception.
+ */
+LLSD errorLog(const LLEventWithID& result, const std::string& desc);
+
+/**
+ * Certain event APIs require the name of an LLEventPump on which they should
+ * post results. While it works to invent a distinct name and let
+ * LLEventPumps::obtain() instantiate the LLEventPump as a "named singleton,"
+ * in a certain sense it's more robust to instantiate a local LLEventPump and
+ * provide its name instead. This class packages the following idiom:
+ *
+ * 1. Instantiate a local LLCoroEventPump, with an optional name prefix.
+ * 2. Provide its actual name to the event API in question as the name of the
+ *    reply LLEventPump.
+ * 3. Initiate the request to the event API.
+ * 4. Call your LLEventTempStream's wait() method to wait for the reply.
+ * 5. Let the LLCoroEventPump go out of scope.
+ */
+class LLCoroEventPump
+{
+public:
+    LLCoroEventPump(const std::string& name="coro"):
+        mPump(name, true)           // allow tweaking the pump instance name
+    {}
+    /// It's typical to request the LLEventPump name to direct an event API to
+    /// send its response to this pump.
+    std::string getName() const { return mPump.getName(); }
+    /// Less typically, we'd request the pump itself for some reason.
+    LLEventPump& getPump() { return mPump; }
+
+    /**
+     * Wait for an event on this LLEventPump.
+     *
+     * @note
+     * The other major usage pattern we considered was to bind @c self at
+     * LLCoroEventPump construction time, which would avoid passing the
+     * parameter to each wait() call. But if we were going to bind @c self as
+     * a class member, we'd need to specify a class template parameter
+     * indicating its type. The big advantage of passing it to the wait() call
+     * is that the type can be implicit.
+     */
+    template <typename SELF>
+    LLSD wait(SELF& self)
+    {
+        return waitForEventOn(self, mPump);
+    }
+
+    template <typename SELF>
+    LLSD postAndWait(SELF& self, const LLSD& event, const LLEventPumpOrPumpName& requestPump,
+                     const LLSD& replyPumpNamePath=LLSD())
+    {
+        return ::postAndWait(self, event, requestPump, mPump, replyPumpNamePath);
+    }
+
+private:
+    LLEventStream mPump;
+};
+
+/**
+ * Other event APIs require the names of two different LLEventPumps: one for
+ * success response, the other for error response. Extend LLCoroEventPump
+ * for the two-pump use case.
+ */
+class LLCoroEventPumps
+{
+public:
+    LLCoroEventPumps(const std::string& name="coro",
+                     const std::string& suff0="Reply",
+                     const std::string& suff1="Error"):
+        mPump0(name + suff0, true),   // allow tweaking the pump instance name
+        mPump1(name + suff1, true)
+    {}
+    /// request pump 0's name
+    std::string getName0() const { return mPump0.getName(); }
+    /// request pump 1's name
+    std::string getName1() const { return mPump1.getName(); }
+    /// request both names
+    std::pair<std::string, std::string> getNames() const
+    {
+        return std::pair<std::string, std::string>(mPump0.getName(), mPump1.getName());
+    }
+
+    /// request pump 0
+    LLEventPump& getPump0() { return mPump0; }
+    /// request pump 1
+    LLEventPump& getPump1() { return mPump1; }
+
+    /// waitForEventOn(self, either of our two LLEventPumps)
+    template <typename SELF>
+    LLEventWithID wait(SELF& self)
+    {
+        return waitForEventOn(self, mPump0, mPump1);
+    }
+
+    /// errorException(wait(self))
+    template <typename SELF>
+    LLSD waitWithException(SELF& self)
+    {
+        return errorException(wait(self), std::string("Error event on ") + getName1());
+    }
+
+    /// errorLog(wait(self))
+    template <typename SELF>
+    LLSD waitWithLog(SELF& self)
+    {
+        return errorLog(wait(self), std::string("Error event on ") + getName1());
+    }
+
+    template <typename SELF>
+    LLEventWithID postAndWait(SELF& self, const LLSD& event,
+                              const LLEventPumpOrPumpName& requestPump,
+                              const LLSD& replyPump0NamePath=LLSD(),
+                              const LLSD& replyPump1NamePath=LLSD())
+    {
+        return postAndWait2(self, event, requestPump, mPump0, mPump1,
+                            replyPump0NamePath, replyPump1NamePath);
+    }
+
+    template <typename SELF>
+    LLSD postAndWaitWithException(SELF& self, const LLSD& event,
+                                  const LLEventPumpOrPumpName& requestPump,
+                                  const LLSD& replyPump0NamePath=LLSD(),
+                                  const LLSD& replyPump1NamePath=LLSD())
+    {
+        return errorException(postAndWait(self, event, requestPump,
+                                          replyPump0NamePath, replyPump1NamePath),
+                              std::string("Error event on ") + getName1());
+    }
+
+    template <typename SELF>
+    LLSD postAndWaitWithLog(SELF& self, const LLSD& event,
+                            const LLEventPumpOrPumpName& requestPump,
+                            const LLSD& replyPump0NamePath=LLSD(),
+                            const LLSD& replyPump1NamePath=LLSD())
+    {
+        return errorLog(postAndWait(self, event, requestPump,
+                                    replyPump0NamePath, replyPump1NamePath),
+                        std::string("Error event on ") + getName1());
+    }
+
+private:
+    LLEventStream mPump0, mPump1;
+};
+
+#endif /* ! defined(LL_LLEVENTCORO_H) */
diff --git a/indra/llcommon/lleventfilter.cpp b/indra/llcommon/lleventfilter.cpp
new file mode 100644
index 0000000000..74133781be
--- /dev/null
+++ b/indra/llcommon/lleventfilter.cpp
@@ -0,0 +1,149 @@
+/**
+ * @file   lleventfilter.cpp
+ * @author Nat Goodspeed
+ * @date   2009-03-05
+ * @brief  Implementation for lleventfilter.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "lleventfilter.h"
+// STL headers
+// std headers
+// external library headers
+#include <boost/bind.hpp>
+// other Linden headers
+#include "llerror.h"                // LL_ERRS
+#include "llsdutil.h"               // llsd_matches()
+
+LLEventFilter::LLEventFilter(LLEventPump& source, const std::string& name, bool tweak):
+    LLEventStream(name, tweak)
+{
+    source.listen(getName(), boost::bind(&LLEventFilter::post, this, _1));
+}
+
+LLEventMatching::LLEventMatching(const LLSD& pattern):
+    LLEventFilter("matching"),
+    mPattern(pattern)
+{
+}
+
+LLEventMatching::LLEventMatching(LLEventPump& source, const LLSD& pattern):
+    LLEventFilter(source, "matching"),
+    mPattern(pattern)
+{
+}
+
+bool LLEventMatching::post(const LLSD& event)
+{
+    if (! llsd_matches(mPattern, event).empty())
+        return false;
+
+    return LLEventStream::post(event);
+}
+
+LLEventTimeoutBase::LLEventTimeoutBase():
+    LLEventFilter("timeout")
+{
+}
+
+LLEventTimeoutBase::LLEventTimeoutBase(LLEventPump& source):
+    LLEventFilter(source, "timeout")
+{
+}
+
+void LLEventTimeoutBase::actionAfter(F32 seconds, const Action& action)
+{
+    setCountdown(seconds);
+    mAction = action;
+    if (! mMainloop.connected())
+    {
+        LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop"));
+        mMainloop = mainloop.listen(getName(), boost::bind(&LLEventTimeoutBase::tick, this, _1));
+    }
+}
+
+class ErrorAfter
+{
+public:
+    ErrorAfter(const std::string& message): mMessage(message) {}
+
+    void operator()()
+    {
+        LL_ERRS("LLEventTimeout") << mMessage << LL_ENDL;
+    }
+
+private:
+    std::string mMessage;
+};
+
+void LLEventTimeoutBase::errorAfter(F32 seconds, const std::string& message)
+{
+    actionAfter(seconds, ErrorAfter(message));
+}
+
+class EventAfter
+{
+public:
+    EventAfter(LLEventPump& pump, const LLSD& event):
+        mPump(pump),
+        mEvent(event)
+    {}
+
+    void operator()()
+    {
+        mPump.post(mEvent);
+    }
+
+private:
+    LLEventPump& mPump;
+    LLSD mEvent;
+};
+
+void LLEventTimeoutBase::eventAfter(F32 seconds, const LLSD& event)
+{
+    actionAfter(seconds, EventAfter(*this, event));
+}
+
+bool LLEventTimeoutBase::post(const LLSD& event)
+{
+    cancel();
+    return LLEventStream::post(event);
+}
+
+void LLEventTimeoutBase::cancel()
+{
+    mMainloop.disconnect();
+}
+
+bool LLEventTimeoutBase::tick(const LLSD&)
+{
+    if (countdownElapsed())
+    {
+        cancel();
+        mAction();
+    }
+    return false;                   // show event to other listeners
+}
+
+LLEventTimeout::LLEventTimeout() {}
+
+LLEventTimeout::LLEventTimeout(LLEventPump& source):
+    LLEventTimeoutBase(source)
+{
+}
+
+void LLEventTimeout::setCountdown(F32 seconds)
+{
+    mTimer.setTimerExpirySec(seconds);
+}
+
+bool LLEventTimeout::countdownElapsed() const
+{
+    return mTimer.hasExpired();
+}
diff --git a/indra/llcommon/lleventfilter.h b/indra/llcommon/lleventfilter.h
new file mode 100644
index 0000000000..fe1a631c6b
--- /dev/null
+++ b/indra/llcommon/lleventfilter.h
@@ -0,0 +1,186 @@
+/**
+ * @file   lleventfilter.h
+ * @author Nat Goodspeed
+ * @date   2009-03-05
+ * @brief  Define LLEventFilter: LLEventStream subclass with conditions
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLEVENTFILTER_H)
+#define LL_LLEVENTFILTER_H
+
+#include "llevents.h"
+#include "stdtypes.h"
+#include "lltimer.h"
+#include <boost/function.hpp>
+
+/**
+ * Generic base class
+ */
+class LLEventFilter: public LLEventStream
+{
+public:
+    /// construct a standalone LLEventFilter
+    LLEventFilter(const std::string& name="filter", bool tweak=true):
+        LLEventStream(name, tweak)
+    {}
+    /// construct LLEventFilter and connect it to the specified LLEventPump
+    LLEventFilter(LLEventPump& source, const std::string& name="filter", bool tweak=true);
+
+    /// Post an event to all listeners
+    virtual bool post(const LLSD& event) = 0;
+};
+
+/**
+ * Pass through only events matching a specified pattern
+ */
+class LLEventMatching: public LLEventFilter
+{
+public:
+    /// Pass an LLSD map with keys and values the incoming event must match
+    LLEventMatching(const LLSD& pattern);
+    /// instantiate and connect
+    LLEventMatching(LLEventPump& source, const LLSD& pattern);
+
+    /// Only pass through events matching the pattern
+    virtual bool post(const LLSD& event);
+
+private:
+    LLSD mPattern;
+};
+
+/**
+ * Wait for an event to be posted. If no such event arrives within a specified
+ * time, take a specified action. See LLEventTimeout for production
+ * implementation.
+ *
+ * @NOTE This is an abstract base class so that, for testing, we can use an
+ * alternate "timer" that doesn't actually consume real time.
+ */
+class LLEventTimeoutBase: public LLEventFilter
+{
+public:
+    /// construct standalone
+    LLEventTimeoutBase();
+    /// construct and connect
+    LLEventTimeoutBase(LLEventPump& source);
+
+    /// Callable, can be constructed with boost::bind()
+    typedef boost::function<void()> Action;
+
+    /**
+     * Start countdown timer for the specified number of @a seconds. Forward
+     * all events. If any event arrives before timer expires, cancel timer. If
+     * no event arrives before timer expires, take specified @a action.
+     *
+     * This is a one-shot timer. Once it has either expired or been canceled,
+     * it is inert until another call to actionAfter().
+     *
+     * Calling actionAfter() while an existing timer is running cheaply
+     * replaces that original timer. Thus, a valid use case is to detect
+     * idleness of some event source by calling actionAfter() on each new
+     * event. A rapid sequence of events will keep the timer from expiring;
+     * the first gap in events longer than the specified timer will fire the
+     * specified Action.
+     *
+     * Any post() call cancels the timer. To be satisfied with only a
+     * particular event, chain on an LLEventMatching that only passes such
+     * events:
+     *
+     * @code
+     * event                                                 ultimate
+     * source ---> LLEventMatching ---> LLEventTimeout  ---> listener
+     * @endcode
+     *
+     * @NOTE
+     * The implementation relies on frequent events on the LLEventPump named
+     * "mainloop".
+     */
+    void actionAfter(F32 seconds, const Action& action);
+
+    /**
+     * Like actionAfter(), but where the desired Action is LL_ERRS
+     * termination. Pass the timeout time and the desired LL_ERRS @a message.
+     *
+     * This method is useful when, for instance, some async API guarantees an
+     * event, whether success or failure, within a stated time window.
+     * Instantiate an LLEventTimeout listening to that API and call
+     * errorAfter() on each async request with a timeout comfortably longer
+     * than the API's time guarantee (much longer than the anticipated
+     * "mainloop" granularity).
+     *
+     * Then if the async API breaks its promise, the program terminates with
+     * the specified LL_ERRS @a message. The client of the async API can
+     * therefore assume the guarantee is upheld.
+     *
+     * @NOTE
+     * errorAfter() is implemented in terms of actionAfter(), so all remarks
+     * about calling actionAfter() also apply to errorAfter().
+     */
+    void errorAfter(F32 seconds, const std::string& message);
+
+    /**
+     * Like actionAfter(), but where the desired Action is a particular event
+     * for all listeners. Pass the timeout time and the desired @a event data.
+     * 
+     * Suppose the timeout should only be satisfied by a particular event, but
+     * the ultimate listener must see all other incoming events as well, plus
+     * the timeout @a event if any:
+     * 
+     * @code
+     * some        LLEventMatching                           LLEventMatching
+     * event  ---> for particular  ---> LLEventTimeout  ---> for timeout
+     * source      event                                     event \
+     *       \                                                      \ ultimate
+     *        `-----------------------------------------------------> listener
+     * @endcode
+     * 
+     * Since a given listener can listen on more than one LLEventPump, we can
+     * set things up so it sees the set union of events from LLEventTimeout
+     * and the original event source. However, as LLEventTimeout passes
+     * through all incoming events, the "particular event" that satisfies the
+     * left LLEventMatching would reach the ultimate listener twice. So we add
+     * an LLEventMatching that only passes timeout events.
+     *
+     * @NOTE
+     * eventAfter() is implemented in terms of actionAfter(), so all remarks
+     * about calling actionAfter() also apply to eventAfter().
+     */
+    void eventAfter(F32 seconds, const LLSD& event);
+
+    /// Pass event through, canceling the countdown timer
+    virtual bool post(const LLSD& event);
+
+    /// Cancel timer without event
+    void cancel();
+
+protected:
+    virtual void setCountdown(F32 seconds) = 0;
+    virtual bool countdownElapsed() const = 0;
+
+private:
+    bool tick(const LLSD&);
+
+    LLBoundListener mMainloop;
+    Action mAction;
+};
+
+/// Production implementation of LLEventTimoutBase
+class LLEventTimeout: public LLEventTimeoutBase
+{
+public:
+    LLEventTimeout();
+    LLEventTimeout(LLEventPump& source);
+
+protected:
+    virtual void setCountdown(F32 seconds);
+    virtual bool countdownElapsed() const;
+
+private:
+    LLTimer mTimer;
+};
+
+#endif /* ! defined(LL_LLEVENTFILTER_H) */
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index eb380ba7c8..7e3c6964dc 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -38,6 +38,7 @@
 #pragma warning (pop)
 #endif
 // other Linden headers
+#include "stringize.h"
 
 /*****************************************************************************
 *   queue_names: specify LLEventPump names that should be instantiated as
@@ -256,6 +257,12 @@ LLEventPump::~LLEventPump()
 // static data member
 const LLEventPump::NameList LLEventPump::empty;
 
+std::string LLEventPump::inventName(const std::string& pfx)
+{
+    static long suffix = 0;
+    return STRINGIZE(pfx << suffix++);
+}
+
 LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventListener& listener,
                                          const NameList& after,
                                          const NameList& before)
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 2f6515a4cb..20061f09c6 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -19,7 +19,6 @@
 #include <map>
 #include <set>
 #include <vector>
-#include <list>
 #include <deque>
 #include <stdexcept>
 #include <boost/signals2.hpp>
@@ -28,13 +27,9 @@
 #include <boost/enable_shared_from_this.hpp>
 #include <boost/utility.hpp>        // noncopyable
 #include <boost/optional/optional.hpp>
-#include <boost/ptr_container/ptr_vector.hpp>
 #include <boost/visit_each.hpp>
 #include <boost/ref.hpp>            // reference_wrapper
 #include <boost/type_traits/is_pointer.hpp>
-#include <boost/utility/addressof.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/iteration/local.hpp>
 #include <boost/function.hpp>
 #include <boost/static_assert.hpp>
 #include "llsd.h"
@@ -111,6 +106,9 @@ typedef LLStandardSignal::slot_type LLEventListener;
 /// Result of registering a listener, supports <tt>connected()</tt>,
 /// <tt>disconnect()</tt> and <tt>blocked()</tt>
 typedef boost::signals2::connection LLBoundListener;
+/// Storing an LLBoundListener in LLTempBoundListener will disconnect the
+/// referenced listener when the LLTempBoundListener instance is destroyed.
+typedef boost::signals2::scoped_connection LLTempBoundListener;
 
 /**
  * A common idiom for event-based code is to accept either a callable --
@@ -254,14 +252,62 @@ namespace LLEventDetail
                                       const ConnectFunc& connect_func);
 } // namespace LLEventDetail
 
+/*****************************************************************************
+*   LLEventTrackable
+*****************************************************************************/
+/**
+ * LLEventTrackable wraps boost::signals2::trackable, which resembles
+ * boost::trackable. Derive your listener class from LLEventTrackable instead,
+ * and use something like
+ * <tt>LLEventPump::listen(boost::bind(&YourTrackableSubclass::method,
+ * instance, _1))</tt>. This will implicitly disconnect when the object
+ * referenced by @c instance is destroyed.
+ *
+ * @note
+ * LLEventTrackable doesn't address a couple of cases:
+ * * Object destroyed during call
+ *   - You enter a slot call in thread A.
+ *   - Thread B destroys the object, which of course disconnects it from any
+ *     future slot calls.
+ *   - Thread A's call uses 'this', which now refers to a defunct object.
+ *     Undefined behavior results.
+ * * Call during destruction
+ *   - @c MySubclass is derived from LLEventTrackable.
+ *   - @c MySubclass registers one of its own methods using
+ *     <tt>LLEventPump::listen()</tt>.
+ *   - The @c MySubclass object begins destruction. <tt>~MySubclass()</tt>
+ *     runs, destroying state specific to the subclass. (For instance, a
+ *     <tt>Foo*</tt> data member is <tt>delete</tt>d but not zeroed.)
+ *   - The listening method will not be disconnected until
+ *     <tt>~LLEventTrackable()</tt> runs.
+ *   - Before we get there, another thread posts data to the @c LLEventPump
+ *     instance, calling the @c MySubclass method.
+ *   - The method in question relies on valid @c MySubclass state. (For
+ *     instance, it attempts to dereference the <tt>Foo*</tt> pointer that was
+ *     <tt>delete</tt>d but not zeroed.)
+ *   - Undefined behavior results.
+ * If you suspect you may encounter any such scenario, you're better off
+ * managing the lifespan of your object with <tt>boost::shared_ptr</tt>.
+ * Passing <tt>LLEventPump::listen()</tt> a <tt>boost::bind()</tt> expression
+ * involving a <tt>boost::weak_ptr<Foo></tt> is recognized specially, engaging
+ * thread-safe Boost.Signals2 machinery.
+ */
+typedef boost::signals2::trackable LLEventTrackable;
+
 /*****************************************************************************
 *   LLEventPump
 *****************************************************************************/
 /**
  * LLEventPump is the base class interface through which we access the
  * concrete subclasses LLEventStream and LLEventQueue.
+ *
+ * @NOTE
+ * LLEventPump derives from LLEventTrackable so that when you "chain"
+ * LLEventPump instances together, they will automatically disconnect on
+ * destruction. Please see LLEventTrackable documentation for situations in
+ * which this may be perilous across threads.
  */
-class LLEventPump: boost::noncopyable
+class LLEventPump: public LLEventTrackable
 {
 public:
     /**
@@ -364,10 +410,22 @@ public:
      * themselves. listen() can throw any ListenError; see ListenError
      * subclasses.
      *
-     * If (as is typical) you pass a <tt>boost::bind()</tt> expression,
-     * listen() will inspect the components of that expression. If a bound
-     * object matches any of several cases, the connection will automatically
-     * be disconnected when that object is destroyed.
+     * The listener name must be unique among active listeners for this
+     * LLEventPump, else you get DupListenerName. If you don't care to invent
+     * a name yourself, use inventName(). (I was tempted to recognize e.g. ""
+     * and internally generate a distinct name for that case. But that would
+     * handle badly the scenario in which you want to add, remove, re-add,
+     * etc. the same listener: each new listen() call would necessarily
+     * perform a new dependency sort. Assuming you specify the same
+     * after/before lists each time, using inventName() when you first
+     * instantiate your listener, then passing the same name on each listen()
+     * call, allows us to optimize away the second and subsequent dependency
+     * sorts.
+     *
+     * If (as is typical) you pass a <tt>boost::bind()</tt> expression as @a
+     * listener, listen() will inspect the components of that expression. If a
+     * bound object matches any of several cases, the connection will
+     * automatically be disconnected when that object is destroyed.
      *
      * * You bind a <tt>boost::weak_ptr</tt>.
      * * Binding a <tt>boost::shared_ptr</tt> that way would ensure that the
@@ -429,6 +487,9 @@ public:
     /// query
     virtual bool enabled() const { return mEnabled; }
 
+    /// Generate a distinct name for a listener -- see listen()
+    static std::string inventName(const std::string& pfx="listener");
+
 private:
     friend class LLEventPumps;
     /// flush queued events
@@ -503,47 +564,8 @@ private:
 };
 
 /*****************************************************************************
-*   LLEventTrackable and underpinnings
+*   Underpinnings
 *****************************************************************************/
-/**
- * LLEventTrackable wraps boost::signals2::trackable, which resembles
- * boost::trackable. Derive your listener class from LLEventTrackable instead,
- * and use something like
- * <tt>LLEventPump::listen(boost::bind(&YourTrackableSubclass::method,
- * instance, _1))</tt>. This will implicitly disconnect when the object
- * referenced by @c instance is destroyed.
- *
- * @note
- * LLEventTrackable doesn't address a couple of cases:
- * * Object destroyed during call
- *   - You enter a slot call in thread A.
- *   - Thread B destroys the object, which of course disconnects it from any
- *     future slot calls.
- *   - Thread A's call uses 'this', which now refers to a defunct object.
- *     Undefined behavior results.
- * * Call during destruction
- *   - @c MySubclass is derived from LLEventTrackable.
- *   - @c MySubclass registers one of its own methods using
- *     <tt>LLEventPump::listen()</tt>.
- *   - The @c MySubclass object begins destruction. <tt>~MySubclass()</tt>
- *     runs, destroying state specific to the subclass. (For instance, a
- *     <tt>Foo*</tt> data member is <tt>delete</tt>d but not zeroed.)
- *   - The listening method will not be disconnected until
- *     <tt>~LLEventTrackable()</tt> runs.
- *   - Before we get there, another thread posts data to the @c LLEventPump
- *     instance, calling the @c MySubclass method.
- *   - The method in question relies on valid @c MySubclass state. (For
- *     instance, it attempts to dereference the <tt>Foo*</tt> pointer that was
- *     <tt>delete</tt>d but not zeroed.)
- *   - Undefined behavior results.
- * If you suspect you may encounter any such scenario, you're better off
- * managing the lifespan of your object with <tt>boost::shared_ptr</tt>.
- * Passing <tt>LLEventPump::listen()</tt> a <tt>boost::bind()</tt> expression
- * involving a <tt>boost::weak_ptr<Foo></tt> is recognized specially, engaging
- * thread-safe Boost.Signals2 machinery.
- */
-typedef boost::signals2::trackable LLEventTrackable;
-
 /**
  * We originally provided a suite of overloaded
  * LLEventTrackable::listenTo(LLEventPump&, ...) methods that would call
diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index 0202a033c3..643720cebe 100644
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
@@ -46,6 +46,11 @@
 #endif
 
 #include "llsdserialize.h"
+#include "stringize.h"
+
+#include <map>
+#include <set>
+#include <boost/range.hpp>
 
 // U32
 LLSD ll_sd_from_U32(const U32 val)
@@ -313,3 +318,261 @@ BOOL compare_llsd_with_template(
 
 	return TRUE;
 }
+
+/*****************************************************************************
+*   Helpers for llsd_matches()
+*****************************************************************************/
+// raw data used for LLSD::Type lookup
+struct Data
+{
+    LLSD::Type type;
+    const char* name;
+} typedata[] =
+{
+#define def(type) { LLSD::type, #type + 4 }
+    def(TypeUndefined),
+    def(TypeBoolean),
+    def(TypeInteger),
+    def(TypeReal),
+    def(TypeString),
+    def(TypeUUID),
+    def(TypeDate),
+    def(TypeURI),
+    def(TypeBinary),
+    def(TypeMap),
+    def(TypeArray)
+#undef  def
+};
+
+// LLSD::Type lookup class into which we load the above static data
+class TypeLookup
+{
+    typedef std::map<LLSD::Type, std::string> MapType;
+
+public:
+    TypeLookup()
+    {
+        for (const Data *di(boost::begin(typedata)), *dend(boost::end(typedata)); di != dend; ++di)
+        {
+            mMap[di->type] = di->name;
+        }
+    }
+
+    std::string lookup(LLSD::Type type) const
+    {
+        MapType::const_iterator found = mMap.find(type);
+        if (found != mMap.end())
+        {
+            return found->second;
+        }
+        return STRINGIZE("<unknown LLSD type " << type << ">");
+    }
+
+private:
+    MapType mMap;
+};
+
+// static instance of the lookup class
+static const TypeLookup sTypes;
+
+// describe a mismatch; phrasing may want tweaking
+const std::string op(" required instead of ");
+
+// llsd_matches() wants to identify specifically where in a complex prototype
+// structure the mismatch occurred. This entails passing a prefix string,
+// empty for the top-level call. If the prototype contains an array of maps,
+// and the mismatch occurs in the second map in a key 'foo', we want to
+// decorate the returned string with: "[1]['foo']: etc." On the other hand, we
+// want to omit the entire prefix -- including colon -- if the mismatch is at
+// top level. This helper accepts the (possibly empty) recursively-accumulated
+// prefix string, returning either empty or the original string with colon
+// appended.
+static std::string colon(const std::string& pfx)
+{
+    if (pfx.empty())
+        return pfx;
+    return pfx + ": ";
+}
+
+// param type for match_types
+typedef std::vector<LLSD::Type> TypeVector;
+
+// The scalar cases in llsd_matches() use this helper. In most cases, we can
+// accept not only the exact type specified in the prototype, but also other
+// types convertible to the expected type. That implies looping over an array
+// of such types. If the actual type doesn't match any of them, we want to
+// provide a list of acceptable conversions as well as the exact type, e.g.:
+// "Integer (or Boolean, Real, String) required instead of UUID". Both the
+// implementation and the calling logic are simplified by separating out the
+// expected type from the convertible types.
+static std::string match_types(LLSD::Type expect, // prototype.type()
+                               const TypeVector& accept, // types convertible to that type
+                               LLSD::Type actual,        // type we're checking
+                               const std::string& pfx)   // as for llsd_matches
+{
+    // Trivial case: if the actual type is exactly what we expect, we're good.
+    if (actual == expect)
+        return "";
+
+    // For the rest of the logic, build up a suitable error string as we go so
+    // we only have to make a single pass over the list of acceptable types.
+    // If we detect success along the way, we'll simply discard the partial
+    // error string.
+    std::ostringstream out;
+    out << colon(pfx) << sTypes.lookup(expect);
+
+    // If there are any convertible types, append that list.
+    if (! accept.empty())
+    {
+        out << " (";
+        const char* sep = "or ";
+        for (TypeVector::const_iterator ai(accept.begin()), aend(accept.end());
+             ai != aend; ++ai, sep = ", ")
+        {
+            // Don't forget to return success if we match any of those types...
+            if (actual == *ai)
+                return "";
+            out << sep << sTypes.lookup(*ai);
+        }
+        out << ')';
+    }
+    // If we got this far, it's because 'actual' was not one of the acceptable
+    // types, so we must return an error. 'out' already contains colon(pfx)
+    // and the formatted list of acceptable types, so just append the mismatch
+    // phrase and the actual type.
+    out << op << sTypes.lookup(actual);
+    return out.str();
+}
+
+// see docstring in .h file
+std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::string& pfx)
+{
+    // An undefined prototype means that any data is valid.
+    // An undefined slot in an array or map prototype means that any data
+    // may fill that slot.
+    if (prototype.isUndefined())
+        return "";
+    // A prototype array must match a data array with at least as many
+    // entries. Moreover, every prototype entry must match the
+    // corresponding data entry.
+    if (prototype.isArray())
+    {
+        if (! data.isArray())
+        {
+            return STRINGIZE(colon(pfx) << "Array" << op << sTypes.lookup(data.type()));
+        }
+        if (data.size() < prototype.size())
+        {
+            return STRINGIZE(colon(pfx) << "Array size " << prototype.size() << op
+                             << "Array size " << data.size());
+        }
+        for (LLSD::Integer i = 0; i < prototype.size(); ++i)
+        {
+            std::string match(llsd_matches(prototype[i], data[i], STRINGIZE('[' << i << ']')));
+            if (! match.empty())
+            {
+                return match;
+            }
+        }
+        return "";
+    }
+    // A prototype map must match a data map. Every key in the prototype
+    // must have a corresponding key in the data map; every value in the
+    // prototype must match the corresponding key's value in the data.
+    if (prototype.isMap())
+    {
+        if (! data.isMap())
+        {
+            return STRINGIZE(colon(pfx) << "Map" << op << sTypes.lookup(data.type()));
+        }
+        // If there are a number of keys missing from the data, it would be
+        // frustrating to a coder to discover them one at a time, with a big
+        // build each time. Enumerate all missing keys.
+        std::ostringstream out;
+        out << colon(pfx);
+        const char* init = "Map missing keys: ";
+        const char* sep = init;
+        for (LLSD::map_const_iterator mi = prototype.beginMap(); mi != prototype.endMap(); ++mi)
+        {
+            if (! data.has(mi->first))
+            {
+                out << sep << mi->first;
+                sep = ", ";
+            }
+        }
+        // So... are we missing any keys?
+        if (sep != init)
+        {
+            return out.str();
+        }
+        // Good, the data block contains all the keys required by the
+        // prototype. Now match the prototype entries.
+        for (LLSD::map_const_iterator mi2 = prototype.beginMap(); mi2 != prototype.endMap(); ++mi2)
+        {
+            std::string match(llsd_matches(mi2->second, data[mi2->first],
+                                           STRINGIZE("['" << mi2->first << "']")));
+            if (! match.empty())
+            {
+                return match;
+            }
+        }
+        return "";
+    }
+    // A String prototype can match String, Boolean, Integer, Real, UUID,
+    // Date and URI, because any of these can be converted to String.
+    if (prototype.isString())
+    {
+        static LLSD::Type accept[] =
+        {
+            LLSD::TypeBoolean,
+            LLSD::TypeInteger,
+            LLSD::TypeReal,
+            LLSD::TypeUUID,
+            LLSD::TypeDate,
+            LLSD::TypeURI
+        };
+        return match_types(prototype.type(),
+                           TypeVector(boost::begin(accept), boost::end(accept)),
+                           data.type(),
+                           pfx);
+    }
+    // Boolean, Integer, Real match each other or String. TBD: ensure that
+    // a String value is numeric.
+    if (prototype.isBoolean() || prototype.isInteger() || prototype.isReal())
+    {
+        static LLSD::Type all[] =
+        {
+            LLSD::TypeBoolean,
+            LLSD::TypeInteger,
+            LLSD::TypeReal,
+            LLSD::TypeString
+        };
+        // Funny business: shuffle the set of acceptable types to include all
+        // but the prototype's type. Get the acceptable types in a set.
+        std::set<LLSD::Type> rest(boost::begin(all), boost::end(all));
+        // Remove the prototype's type because we pass that separately.
+        rest.erase(prototype.type());
+        return match_types(prototype.type(),
+                           TypeVector(rest.begin(), rest.end()),
+                           data.type(),
+                           pfx);
+    }
+    // UUID, Date and URI match themselves or String.
+    if (prototype.isUUID() || prototype.isDate() || prototype.isURI())
+    {
+        static LLSD::Type accept[] =
+        {
+            LLSD::TypeString
+        };
+        return match_types(prototype.type(),
+                           TypeVector(boost::begin(accept), boost::end(accept)),
+                           data.type(),
+                           pfx);
+    }
+    // We don't yet know the conversion semantics associated with any new LLSD
+    // data type that might be added, so until we've been extended to handle
+    // them, assume it's strict: the new type matches only itself. (This is
+    // true of Binary, which is why we don't handle that case separately.) Too
+    // bad LLSD doesn't define isConvertible(Type to, Type from).
+    return match_types(prototype.type(), TypeVector(), data.type(), pfx);
+}
diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h
index 501600f1d9..0752f8aff1 100644
--- a/indra/llcommon/llsdutil.h
+++ b/indra/llcommon/llsdutil.h
@@ -104,6 +104,61 @@ BOOL compare_llsd_with_template(
 	const LLSD& template_llsd,
 	LLSD& resultant_llsd);
 
+/**
+ * Recursively determine whether a given LLSD data block "matches" another
+ * LLSD prototype. The returned string is empty() on success, non-empty() on
+ * mismatch.
+ *
+ * This function tests structure (types) rather than data values. It is
+ * intended for when a consumer expects an LLSD block with a particular
+ * structure, and must succinctly detect whether the arriving block is
+ * well-formed. For instance, a test of the form:
+ * @code
+ * if (! (data.has("request") && data.has("target") && data.has("modifier") ...))
+ * @endcode
+ * could instead be expressed by initializing a prototype LLSD map with the
+ * required keys and writing:
+ * @code
+ * if (! llsd_matches(prototype, data).empty())
+ * @endcode
+ *
+ * A non-empty return value is an error-message fragment intended to indicate
+ * to (English-speaking) developers where in the prototype structure the
+ * mismatch occurred.
+ *
+ * * If a slot in the prototype isUndefined(), then anything is valid at that
+ *   place in the real object. (Passing prototype == LLSD() matches anything
+ *   at all.)
+ * * An array in the prototype must match a data array at least that large.
+ *   (Additional entries in the data array are ignored.) Every isDefined()
+ *   entry in the prototype array must match the corresponding entry in the
+ *   data array.
+ * * A map in the prototype must match a map in the data. Every key in the
+ *   prototype map must match a corresponding key in the data map. (Additional
+ *   keys in the data map are ignored.) Every isDefined() value in the
+ *   prototype map must match the corresponding key's value in the data map.
+ * * Scalar values in the prototype are tested for @em type rather than value.
+ *   For instance, a String in the prototype matches any String at all. In
+ *   effect, storing an Integer at a particular place in the prototype asserts
+ *   that the caller intends to apply asInteger() to the corresponding slot in
+ *   the data.
+ * * A String in the prototype matches String, Boolean, Integer, Real, UUID,
+ *   Date and URI, because asString() applied to any of these produces a
+ *   meaningful result.
+ * * Similarly, a Boolean, Integer or Real in the prototype can match any of
+ *   Boolean, Integer or Real in the data -- or even String.
+ * * UUID matches UUID or String.
+ * * Date matches Date or String.
+ * * URI matches URI or String.
+ * * Binary in the prototype matches only Binary in the data.
+ *
+ * @TODO: when a Boolean, Integer or Real in the prototype matches a String in
+ * the data, we should examine the String @em value to ensure it can be
+ * meaningfully converted to the requested type. The same goes for UUID, Date
+ * and URI.
+ */
+std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::string& pfx="");
+
 // Simple function to copy data out of input & output iterators if
 // there is no need for casting.
 template<typename Input> LLSD llsd_copy_array(Input iter, Input end)
diff --git a/indra/llcommon/tests/listener.h b/indra/llcommon/tests/listener.h
new file mode 100644
index 0000000000..fa12f944ef
--- /dev/null
+++ b/indra/llcommon/tests/listener.h
@@ -0,0 +1,139 @@
+/**
+ * @file   listener.h
+ * @author Nat Goodspeed
+ * @date   2009-03-06
+ * @brief  Useful for tests of the LLEventPump family of classes
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LISTENER_H)
+#define LL_LISTENER_H
+
+#include "llsd.h"
+#include <iostream>
+
+/*****************************************************************************
+*   test listener class
+*****************************************************************************/
+class Listener;
+std::ostream& operator<<(std::ostream&, const Listener&);
+
+/// Bear in mind that this is strictly for testing
+class Listener
+{
+public:
+    /// Every Listener is instantiated with a name
+    Listener(const std::string& name):
+        mName(name)
+    {
+//      std::cout << *this << ": ctor\n";
+    }
+/*==========================================================================*|
+    // These methods are only useful when trying to track Listener instance
+    // lifespan
+    Listener(const Listener& that):
+        mName(that.mName),
+        mLastEvent(that.mLastEvent)
+    {
+        std::cout << *this << ": copy\n";
+    }
+    virtual ~Listener()
+    {
+        std::cout << *this << ": dtor\n";
+    }
+|*==========================================================================*/
+    /// You can request the name
+    std::string getName() const { return mName; }
+    /// This is a typical listener method that returns 'false' when done,
+    /// allowing subsequent listeners on the LLEventPump to process the
+    /// incoming event.
+    bool call(const LLSD& event)
+    {
+//      std::cout << *this << "::call(" << event << ")\n";
+        mLastEvent = event;
+        return false;
+    }
+    /// This is an alternate listener that returns 'true' when done, which
+    /// stops processing of the incoming event.
+    bool callstop(const LLSD& event)
+    {
+//      std::cout << *this << "::callstop(" << event << ")\n";
+        mLastEvent = event;
+        return true;
+    }
+    /// ListenMethod can represent either call() or callstop().
+    typedef bool (Listener::*ListenMethod)(const LLSD&);
+    /**
+     * This helper method is only because our test code makes so many
+     * repetitive listen() calls to ListenerMethods. In real code, you should
+     * call LLEventPump::listen() directly so it can examine the specific
+     * object you pass to boost::bind().
+     */
+    LLBoundListener listenTo(LLEventPump& pump,
+                             ListenMethod method=&Listener::call,
+                             const LLEventPump::NameList& after=LLEventPump::empty,
+                             const LLEventPump::NameList& before=LLEventPump::empty)
+    {
+        return pump.listen(getName(), boost::bind(method, this, _1), after, before);
+    }
+    /// Both call() and callstop() set mLastEvent. Retrieve it.
+    LLSD getLastEvent() const
+    {
+//      std::cout << *this << "::getLastEvent() -> " << mLastEvent << "\n";
+        return mLastEvent;
+    }
+    /// Reset mLastEvent to a known state.
+    void reset(const LLSD& to = LLSD())
+    {
+//      std::cout << *this << "::reset(" << to << ")\n";
+        mLastEvent = to;
+    }
+
+private:
+    std::string mName;
+    LLSD mLastEvent;
+};
+
+std::ostream& operator<<(std::ostream& out, const Listener& listener)
+{
+    out << "Listener(" << listener.getName() /* << "@" << &listener */ << ')';
+    return out;
+}
+
+/**
+ * This class tests the relative order in which various listeners on a given
+ * LLEventPump are called. Each listen() call binds a particular string, which
+ * we collect for later examination. The actual event is ignored.
+ */
+struct Collect
+{
+    bool add(const std::string& bound, const LLSD& event)
+    {
+        result.push_back(bound);
+        return false;
+    }
+    void clear() { result.clear(); }
+    typedef std::vector<std::string> StringList;
+    StringList result;
+};
+
+std::ostream& operator<<(std::ostream& out, const Collect::StringList& strings)
+{
+    out << '(';
+    Collect::StringList::const_iterator begin(strings.begin()), end(strings.end());
+    if (begin != end)
+    {
+        out << '"' << *begin << '"';
+        while (++begin != end)
+        {
+            out << ", \"" << *begin << '"';
+        }
+    }
+    out << ')';
+    return out;
+}
+
+#endif /* ! defined(LL_LISTENER_H) */
diff --git a/indra/llcommon/tests/lleventfilter_test.cpp b/indra/llcommon/tests/lleventfilter_test.cpp
new file mode 100644
index 0000000000..28b909298e
--- /dev/null
+++ b/indra/llcommon/tests/lleventfilter_test.cpp
@@ -0,0 +1,276 @@
+/**
+ * @file   lleventfilter_test.cpp
+ * @author Nat Goodspeed
+ * @date   2009-03-06
+ * @brief  Test for lleventfilter.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "lleventfilter.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+#include "../test/lltut.h"
+#include "stringize.h"
+#include "listener.h"
+#include "tests/wrapllerrs.h"
+
+/*****************************************************************************
+*   Test classes
+*****************************************************************************/
+// Strictly speaking, we're testing LLEventTimeoutBase rather than the
+// production LLEventTimeout (using LLTimer) because we don't want every test
+// run to pause for some number of seconds until we reach a real timeout. But
+// as we've carefully put all functionality except actual LLTimer calls into
+// LLEventTimeoutBase, that should suffice. We're not not not trying to test
+// LLTimer here.
+class TestEventTimeout: public LLEventTimeoutBase
+{
+public:
+    TestEventTimeout():
+        mElapsed(true)
+    {}
+    TestEventTimeout(LLEventPump& source):
+        LLEventTimeoutBase(source),
+        mElapsed(true)
+    {}
+
+    // test hook
+    void forceTimeout(bool timeout=true) { mElapsed = timeout; }
+
+protected:
+    virtual void setCountdown(F32 seconds) { mElapsed = false; }
+    virtual bool countdownElapsed() const { return mElapsed; }
+
+private:
+    bool mElapsed;
+};
+
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
+namespace tut
+{
+    struct filter_data
+    {
+        // The resemblance between this test data and that in llevents_tut.cpp
+        // is not coincidental.
+        filter_data():
+            pumps(LLEventPumps::instance()),
+            mainloop(pumps.obtain("mainloop")),
+            listener0("first"),
+            listener1("second")
+        {}
+        LLEventPumps& pumps;
+        LLEventPump& mainloop;
+        Listener listener0;
+        Listener listener1;
+
+        void check_listener(const std::string& desc, const Listener& listener, const LLSD& got)
+        {
+            ensure_equals(STRINGIZE(listener << ' ' << desc),
+                          listener.getLastEvent(), got);
+        }
+    };
+    typedef test_group<filter_data> filter_group;
+    typedef filter_group::object filter_object;
+    filter_group filtergrp("lleventfilter");
+
+    template<> template<>
+    void filter_object::test<1>()
+    {
+        set_test_name("LLEventMatching");
+        LLEventPump& driver(pumps.obtain("driver"));
+        listener0.reset(0);
+        // Listener isn't derived from LLEventTrackable specifically to test
+        // various connection-management mechanisms. But that means we have a
+        // couple of transient Listener objects, one of which is listening to
+        // a persistent LLEventPump. Capture those connections in local
+        // LLTempBoundListener instances so they'll disconnect
+        // on destruction.
+        LLTempBoundListener temp1(
+            listener0.listenTo(driver));
+        // Construct a pattern LLSD: desired Event must have a key "foo"
+        // containing string "bar"
+        LLEventMatching filter(driver, LLSD().insert("foo", "bar"));
+        listener1.reset(0);
+        LLTempBoundListener temp2(
+            listener1.listenTo(filter));
+        driver.post(1);
+        check_listener("direct", listener0, LLSD(1));
+        check_listener("filtered", listener1, LLSD(0));
+        // Okay, construct an LLSD map matching the pattern
+        LLSD data;
+        data["foo"] = "bar";
+        data["random"] = 17;
+        driver.post(data);
+        check_listener("direct", listener0, data);
+        check_listener("filtered", listener1, data);
+    }
+
+    template<> template<>
+    void filter_object::test<2>()
+    {
+        set_test_name("LLEventTimeout::actionAfter()");
+        LLEventPump& driver(pumps.obtain("driver"));
+        TestEventTimeout filter(driver);
+        listener0.reset(0);
+        LLTempBoundListener temp1(
+            listener0.listenTo(filter));
+        // Use listener1.call() as the Action for actionAfter(), since it
+        // already provides a way to sense the call
+        listener1.reset(0);
+        // driver --> filter --> listener0
+        filter.actionAfter(20,
+                           boost::bind(&Listener::call, boost::ref(listener1), LLSD("timeout")));
+        // Okay, (fake) timer is ticking. 'filter' can only sense the timer
+        // when we pump mainloop. Do that right now to take the logic path
+        // before either the anticipated event arrives or the timer expires.
+        mainloop.post(17);
+        check_listener("no timeout 1", listener1, LLSD(0));
+        // Expected event arrives...
+        driver.post(1);
+        check_listener("event passed thru", listener0, LLSD(1));
+        // Should have canceled the timer. Verify that by asserting that the
+        // time has expired, then pumping mainloop again.
+        filter.forceTimeout();
+        mainloop.post(17);
+        check_listener("no timeout 2", listener1, LLSD(0));
+        // Verify chained actionAfter() calls, that is, that a second
+        // actionAfter() resets the timer established by the first
+        // actionAfter().
+        filter.actionAfter(20,
+                           boost::bind(&Listener::call, boost::ref(listener1), LLSD("timeout")));
+        // Since our TestEventTimeout class isn't actually manipulating time
+        // (quantities of seconds), only a bool "elapsed" flag, sense that by
+        // forcing the flag between actionAfter() calls.
+        filter.forceTimeout();
+        // Pumping mainloop here would result in a timeout (as we'll verify
+        // below). This state simulates a ticking timer that has not yet timed
+        // out. But now, before a mainloop event lets 'filter' recognize
+        // timeout on the previous actionAfter() call, pretend we're pushing
+        // that timeout farther into the future.
+        filter.actionAfter(20,
+                           boost::bind(&Listener::call, boost::ref(listener1), LLSD("timeout")));
+        // Look ma, no timeout!
+        mainloop.post(17);
+        check_listener("no timeout 3", listener1, LLSD(0));
+        // Now let the updated actionAfter() timer expire.
+        filter.forceTimeout();
+        // Notice the timeout.
+        mainloop.post(17);
+        check_listener("timeout", listener1, LLSD("timeout"));
+        // Timing out cancels the timer. Verify that.
+        listener1.reset(0);
+        filter.forceTimeout();
+        mainloop.post(17);
+        check_listener("no timeout 4", listener1, LLSD(0));
+        // Reset the timer and then cancel() it.
+        filter.actionAfter(20,
+                           boost::bind(&Listener::call, boost::ref(listener1), LLSD("timeout")));
+        // neither expired nor satisified
+        mainloop.post(17);
+        check_listener("no timeout 5", listener1, LLSD(0));
+        // cancel
+        filter.cancel();
+        // timeout!
+        filter.forceTimeout();
+        mainloop.post(17);
+        check_listener("no timeout 6", listener1, LLSD(0));
+    }
+
+    template<> template<>
+    void filter_object::test<3>()
+    {
+        set_test_name("LLEventTimeout::eventAfter()");
+        LLEventPump& driver(pumps.obtain("driver"));
+        TestEventTimeout filter(driver);
+        listener0.reset(0);
+        LLTempBoundListener temp1(
+            listener0.listenTo(filter));
+        filter.eventAfter(20, LLSD("timeout"));
+        // Okay, (fake) timer is ticking. 'filter' can only sense the timer
+        // when we pump mainloop. Do that right now to take the logic path
+        // before either the anticipated event arrives or the timer expires.
+        mainloop.post(17);
+        check_listener("no timeout 1", listener0, LLSD(0));
+        // Expected event arrives...
+        driver.post(1);
+        check_listener("event passed thru", listener0, LLSD(1));
+        // Should have canceled the timer. Verify that by asserting that the
+        // time has expired, then pumping mainloop again.
+        filter.forceTimeout();
+        mainloop.post(17);
+        check_listener("no timeout 2", listener0, LLSD(1));
+        // Set timer again.
+        filter.eventAfter(20, LLSD("timeout"));
+        // Now let the timer expire.
+        filter.forceTimeout();
+        // Notice the timeout.
+        mainloop.post(17);
+        check_listener("timeout", listener0, LLSD("timeout"));
+        // Timing out cancels the timer. Verify that.
+        listener0.reset(0);
+        filter.forceTimeout();
+        mainloop.post(17);
+        check_listener("no timeout 3", listener0, LLSD(0));
+    }
+
+    template<> template<>
+    void filter_object::test<4>()
+    {
+        set_test_name("LLEventTimeout::errorAfter()");
+        WrapLL_ERRS capture;
+        LLEventPump& driver(pumps.obtain("driver"));
+        TestEventTimeout filter(driver);
+        listener0.reset(0);
+        LLTempBoundListener temp1(
+            listener0.listenTo(filter));
+        filter.errorAfter(20, "timeout");
+        // Okay, (fake) timer is ticking. 'filter' can only sense the timer
+        // when we pump mainloop. Do that right now to take the logic path
+        // before either the anticipated event arrives or the timer expires.
+        mainloop.post(17);
+        check_listener("no timeout 1", listener0, LLSD(0));
+        // Expected event arrives...
+        driver.post(1);
+        check_listener("event passed thru", listener0, LLSD(1));
+        // Should have canceled the timer. Verify that by asserting that the
+        // time has expired, then pumping mainloop again.
+        filter.forceTimeout();
+        mainloop.post(17);
+        check_listener("no timeout 2", listener0, LLSD(1));
+        // Set timer again.
+        filter.errorAfter(20, "timeout");
+        // Now let the timer expire.
+        filter.forceTimeout();
+        // Notice the timeout.
+        std::string threw;
+        try
+        {
+            mainloop.post(17);
+        }
+        catch (const WrapLL_ERRS::FatalException& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("errorAfter() timeout exception", threw, "timeout");
+        // Timing out cancels the timer. Verify that.
+        listener0.reset(0);
+        filter.forceTimeout();
+        mainloop.post(17);
+        check_listener("no timeout 3", listener0, LLSD(0));
+    }
+} // namespace tut
+
+/*****************************************************************************
+*   Link dependencies
+*****************************************************************************/
+#include "llsdutil.cpp"
diff --git a/indra/llcommon/tests/wrapllerrs.h b/indra/llcommon/tests/wrapllerrs.h
new file mode 100644
index 0000000000..1001ebc466
--- /dev/null
+++ b/indra/llcommon/tests/wrapllerrs.h
@@ -0,0 +1,56 @@
+/**
+ * @file   wrapllerrs.h
+ * @author Nat Goodspeed
+ * @date   2009-03-11
+ * @brief  Define a class useful for unit tests that engage llerrs (LL_ERRS) functionality
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_WRAPLLERRS_H)
+#define LL_WRAPLLERRS_H
+
+#include "llerrorcontrol.h"
+
+struct WrapLL_ERRS
+{
+    WrapLL_ERRS():
+        // Resetting Settings discards the default Recorder that writes to
+        // stderr. Otherwise, expected llerrs (LL_ERRS) messages clutter the
+        // console output of successful tests, potentially confusing things.
+        mPriorErrorSettings(LLError::saveAndResetSettings()),
+        // Save shutdown function called by LL_ERRS
+        mPriorFatal(LLError::getFatalFunction())
+    {
+        // Make LL_ERRS call our own operator() method
+        LLError::setFatalFunction(boost::bind(&WrapLL_ERRS::operator(), this, _1));
+    }
+
+    ~WrapLL_ERRS()
+    {
+        LLError::setFatalFunction(mPriorFatal);
+        LLError::restoreSettings(mPriorErrorSettings);
+    }
+
+    struct FatalException: public std::runtime_error
+    {
+        FatalException(const std::string& what): std::runtime_error(what) {}
+    };
+
+    void operator()(const std::string& message)
+    {
+        // Save message for later in case consumer wants to sense the result directly
+        error = message;
+        // Also throw an appropriate exception since calling code is likely to
+        // assume that control won't continue beyond LL_ERRS.
+        throw FatalException(message);
+    }
+
+    std::string error;
+    LLError::Settings* mPriorErrorSettings;
+    LLError::FatalFunction mPriorFatal;
+};
+
+#endif /* ! defined(LL_WRAPLLERRS_H) */
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index c0f7a4d335..99bd98dfc1 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -22,6 +22,7 @@ include_directories(
 
 set(llmessage_SOURCE_FILES
     llares.cpp
+    llareslistener.cpp
     llassetstorage.cpp
     llblowfishcipher.cpp
     llbuffer.cpp
@@ -104,6 +105,7 @@ set(llmessage_HEADER_FILES
     CMakeLists.txt
 
     llares.h
+    llareslistener.h
     llassetstorage.h
     llblowfishcipher.h
     llbuffer.h
@@ -222,4 +224,5 @@ IF (NOT LINUX AND VIEWER)
     ADD_BUILD_TEST(lltemplatemessagedispatcher llmessage)
     # Don't make llmessage depend on llsdmessage_test because ADD_COMM_BUILD_TEST depends on llmessage!
     ADD_COMM_BUILD_TEST(llsdmessage "" "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py")
+    ADD_BUILD_TEST(llareslistener llmessage)
 ENDIF (NOT LINUX AND VIEWER)
diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp
index fe37fe8142..acbf51d75c 100644
--- a/indra/llmessage/llares.cpp
+++ b/indra/llmessage/llares.cpp
@@ -33,6 +33,7 @@
  */
 
 #include "linden_common.h"
+#include "llares.h"
 
 #include <ares_dns.h>
 #include <ares_version.h>
@@ -42,9 +43,10 @@
 #include "apr_poll.h"
 
 #include "llapr.h"
-#include "llares.h"
+#include "llareslistener.h"
 
 #if defined(LL_WINDOWS)
+#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
 # define ns_c_in 1
 # define NS_HFIXEDSZ     12      /* #/bytes of fixed data in header */
 # define NS_QFIXEDSZ     4       /* #/bytes of fixed data in query */
@@ -102,7 +104,9 @@ void LLAres::QueryResponder::queryError(int code)
 }
 
 LLAres::LLAres() :
-chan_(NULL), mInitSuccess(false)
+    chan_(NULL),
+    mInitSuccess(false),
+    mListener(new LLAresListener("LLAres", this))
 {
 	if (ares_init(&chan_) != ARES_SUCCESS)
 	{
diff --git a/indra/llmessage/llares.h b/indra/llmessage/llares.h
index c709a08499..78febcd560 100644
--- a/indra/llmessage/llares.h
+++ b/indra/llmessage/llares.h
@@ -36,7 +36,13 @@
 #define LL_LLARES_H
 
 #ifdef LL_WINDOWS
+// ares.h is broken on windows in that it depends on types defined in ws2tcpip.h
+// we need to include them first to work around it, but the headers issue warnings
+# pragma warning(push)
+# pragma warning(disable:4996)
+# include <winsock2.h>
 # include <ws2tcpip.h>
+# pragma warning(pop)
 #endif
 
 #ifdef LL_STANDALONE
@@ -49,7 +55,10 @@
 #include "llrefcount.h"
 #include "lluri.h"
 
+#include <boost/shared_ptr.hpp>
+
 class LLQueryResponder;
+class LLAresListener;
 
 /**
  * @brief Supported DNS RR types.
@@ -444,6 +453,9 @@ public:
 protected:
 	ares_channel chan_;
 	bool mInitSuccess;
+    // boost::scoped_ptr would actually fit the requirement better, but it
+    // can't handle incomplete types as boost::shared_ptr can.
+    boost::shared_ptr<LLAresListener> mListener;
 };
 	
 /**
diff --git a/indra/llmessage/llareslistener.cpp b/indra/llmessage/llareslistener.cpp
new file mode 100644
index 0000000000..8e1176cdd9
--- /dev/null
+++ b/indra/llmessage/llareslistener.cpp
@@ -0,0 +1,108 @@
+/**
+ * @file   llareslistener.cpp
+ * @author Nat Goodspeed
+ * @date   2009-03-18
+ * @brief  Implementation for llareslistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if LL_WINDOWS
+#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
+#endif
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "llareslistener.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+#include "llares.h"
+#include "llerror.h"
+#include "llevents.h"
+
+LLAresListener::LLAresListener(const std::string& pumpname, LLAres* llares):
+    mAres(llares),
+    mBoundListener(LLEventPumps::instance().
+                   obtain(pumpname).
+                   listen("LLAresListener", boost::bind(&LLAresListener::process, this, _1)))
+{
+    mDispatch["rewriteURI"] = boost::bind(&LLAresListener::rewriteURI, this, _1);
+}
+
+bool LLAresListener::process(const LLSD& command)
+{
+    const std::string op(command["op"]);
+    // Look up the requested operation.
+    DispatchMap::const_iterator found = mDispatch.find(op);
+    if (found == mDispatch.end())
+    {
+        // There's no feedback other than our own reply. If somebody asks
+        // for an operation that's not supported (perhaps because of a
+        // typo?), unless we holler loudly, the request will be silently
+        // ignored. Throwing a tantrum on such errors will hopefully make
+        // this product more robust.
+        LL_ERRS("LLAresListener") << "Unsupported request " << op << LL_ENDL;
+        return false;
+    }
+    // Having found the operation, call it.
+    found->second(command);
+    // Conventional LLEventPump listener return
+    return false;
+}
+
+/// This UriRewriteResponder subclass packages returned URIs as an LLSD
+/// array to send back to the requester.
+class UriRewriteResponder: public LLAres::UriRewriteResponder
+{
+public:
+    /// Specify the event pump name on which to send the reply
+    UriRewriteResponder(const std::string& pumpname):
+        mPumpName(pumpname)
+    {}
+
+    /// Called by base class with results. This is called in both the
+    /// success and error cases. On error, the calling logic passes the
+    /// original URI.
+    virtual void rewriteResult(const std::vector<std::string>& uris)
+    {
+        LLSD result;
+        for (std::vector<std::string>::const_iterator ui(uris.begin()), uend(uris.end());
+             ui != uend; ++ui)
+        {
+            result.append(*ui);
+        }
+        LLEventPumps::instance().obtain(mPumpName).post(result);
+    }
+
+private:
+    const std::string mPumpName;
+};
+
+void LLAresListener::rewriteURI(const LLSD& data)
+{
+    const std::string uri(data["uri"]);
+    const std::string reply(data["reply"]);
+    // Validate that the request is well-formed
+    if (uri.empty() || reply.empty())
+    {
+        LL_ERRS("LLAresListener") << "rewriteURI request missing";
+        std::string separator;
+        if (uri.empty())
+        {
+            LL_CONT << " 'uri'";
+            separator = " and";
+        }
+        if (reply.empty())
+        {
+            LL_CONT << separator << " 'reply'";
+        }
+        LL_CONT << LL_ENDL;
+    }
+    // Looks as though we have what we need; issue the request
+    mAres->rewriteURI(uri, new UriRewriteResponder(reply));
+}
diff --git a/indra/llmessage/llareslistener.h b/indra/llmessage/llareslistener.h
new file mode 100644
index 0000000000..8835440c5d
--- /dev/null
+++ b/indra/llmessage/llareslistener.h
@@ -0,0 +1,47 @@
+/**
+ * @file   llareslistener.h
+ * @author Nat Goodspeed
+ * @date   2009-03-18
+ * @brief  LLEventPump API for LLAres. This header doesn't actually define the
+ *         API; the API is defined by the pump name on which this class
+ *         listens, and by the expected content of LLSD it receives.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLARESLISTENER_H)
+#define LL_LLARESLISTENER_H
+
+#include <string>
+#include <map>
+#include <boost/function.hpp>
+#include "llevents.h"
+
+class LLAres;
+class LLSD;
+
+/// Listen on an LLEventPump with specified name for LLAres request events.
+class LLAresListener
+{
+public:
+    /// Specify the pump name on which to listen, and bind the LLAres instance
+    /// to use (e.g. gAres)
+    LLAresListener(const std::string& pumpname, LLAres* llares);
+
+    /// Handle request events on the event pump specified at construction time
+    bool process(const LLSD& command);
+
+private:
+    /// command["op"] == "rewriteURI" 
+    void rewriteURI(const LLSD& data);
+
+    typedef boost::function<void(const LLSD&)> Callable;
+    typedef std::map<std::string, Callable> DispatchMap;
+    DispatchMap mDispatch;
+    LLTempBoundListener mBoundListener;
+    LLAres* mAres;
+};
+
+#endif /* ! defined(LL_LLARESLISTENER_H) */
diff --git a/indra/llmessage/tests/llareslistener_test.cpp b/indra/llmessage/tests/llareslistener_test.cpp
new file mode 100644
index 0000000000..b8306d0fd9
--- /dev/null
+++ b/indra/llmessage/tests/llareslistener_test.cpp
@@ -0,0 +1,194 @@
+/**
+ * @file   llareslistener_test.cpp
+ * @author Mark Palange
+ * @date   2009-02-26
+ * @brief  Tests of llareslistener.h.
+ * 
+ * $LicenseInfo:firstyear=2009&license=internal$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if LL_WINDOWS
+#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
+#endif
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "../llareslistener.h"
+// STL headers
+#include <iostream>
+// std headers
+// external library headers
+#include <boost/bind.hpp>
+
+// other Linden headers
+#include "llsd.h"
+#include "llares.h"
+#include "../test/lltut.h"
+#include "llevents.h"
+#include "tests/wrapllerrs.h"
+
+/*****************************************************************************
+*   Dummy stuff
+*****************************************************************************/
+LLAres::LLAres():
+    // Simulate this much of the real LLAres constructor: we need an
+    // LLAresListener instance.
+    mListener(new LLAresListener("LLAres", this))
+{}
+LLAres::~LLAres() {}
+void LLAres::rewriteURI(const std::string &uri,
+					LLAres::UriRewriteResponder *resp)
+{
+	// This is the only LLAres method I chose to implement.
+	// The effect is that LLAres returns immediately with
+	// a result that is equal to the input uri.
+	std::vector<std::string> result;
+	result.push_back(uri);
+	resp->rewriteResult(result);
+}
+
+LLAres::QueryResponder::~QueryResponder() {}
+void LLAres::QueryResponder::queryError(int) {}
+void LLAres::QueryResponder::queryResult(char const*, size_t) {}
+LLQueryResponder::LLQueryResponder() {}
+void LLQueryResponder::queryResult(char const*, size_t) {}
+void LLQueryResponder::querySuccess() {}
+void LLAres::UriRewriteResponder::queryError(int) {}
+void LLAres::UriRewriteResponder::querySuccess() {}
+void LLAres::UriRewriteResponder::rewriteResult(const std::vector<std::string>& uris) {}
+
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
+namespace tut
+{
+    struct data
+    {
+        LLAres dummyAres;
+    };
+    typedef test_group<data> llareslistener_group;
+    typedef llareslistener_group::object object;
+    llareslistener_group llareslistenergrp("llareslistener");
+
+	struct ResponseCallback
+	{
+		std::vector<std::string> mURIs;
+		bool operator()(const LLSD& response)
+		{
+            mURIs.clear();
+            for (LLSD::array_const_iterator ri(response.beginArray()), rend(response.endArray());
+                 ri != rend; ++ri)
+            {
+                mURIs.push_back(*ri);
+            }
+            return false;
+		}
+	};
+
+    template<> template<>
+    void object::test<1>()
+    {
+        set_test_name("test event");
+		// Tests the success and failure cases, since they both use 
+		// the same code paths in the LLAres responder.
+		ResponseCallback response;
+        std::string pumpname("trigger");
+        // Since we're asking LLEventPumps to obtain() the pump by the desired
+        // name, it will persist beyond the current scope, so ensure we
+        // disconnect from it when 'response' goes away.
+        LLTempBoundListener temp(
+            LLEventPumps::instance().obtain(pumpname).listen("rewriteURIresponse",
+                                                             boost::bind(&ResponseCallback::operator(), &response, _1)));
+        // Now build an LLSD request that will direct its response events to
+        // that pump.
+		const std::string testURI("login.bar.com");
+        LLSD request;
+        request["op"] = "rewriteURI";
+        request["uri"] = testURI;
+        request["reply"] = pumpname;
+        LLEventPumps::instance().obtain("LLAres").post(request);
+		ensure_equals(response.mURIs.size(), 1);
+		ensure_equals(response.mURIs.front(), testURI); 
+	}
+
+    template<> template<>
+    void object::test<2>()
+    {
+        set_test_name("bad op");
+        WrapLL_ERRS capture;
+        LLSD request;
+        request["op"] = "foo";
+        std::string threw;
+        try
+        {
+            LLEventPumps::instance().obtain("LLAres").post(request);
+        }
+        catch (const WrapLL_ERRS::FatalException& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("LLAresListener bad op", threw, "Unsupported");
+    }
+
+    template<> template<>
+    void object::test<3>()
+    {
+        set_test_name("bad rewriteURI request");
+        WrapLL_ERRS capture;
+        LLSD request;
+        request["op"] = "rewriteURI";
+        std::string threw;
+        try
+        {
+            LLEventPumps::instance().obtain("LLAres").post(request);
+        }
+        catch (const WrapLL_ERRS::FatalException& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("LLAresListener bad op", threw, "missing 'uri' and 'reply'");
+    }
+
+    template<> template<>
+    void object::test<4>()
+    {
+        set_test_name("bad rewriteURI request");
+        WrapLL_ERRS capture;
+        LLSD request;
+        request["op"] = "rewriteURI";
+        request["reply"] = "nonexistent";
+        std::string threw;
+        try
+        {
+            LLEventPumps::instance().obtain("LLAres").post(request);
+        }
+        catch (const WrapLL_ERRS::FatalException& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("LLAresListener bad op", threw, "missing 'uri'");
+    }
+
+    template<> template<>
+    void object::test<5>()
+    {
+        set_test_name("bad rewriteURI request");
+        WrapLL_ERRS capture;
+        LLSD request;
+        request["op"] = "rewriteURI";
+        request["uri"] = "foo.bar.com";
+        std::string threw;
+        try
+        {
+            LLEventPumps::instance().obtain("LLAres").post(request);
+        }
+        catch (const WrapLL_ERRS::FatalException& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("LLAresListener bad op", threw, "missing 'reply'");
+    }
+}
diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py
index e62f20912b..86d5761b1b 100644
--- a/indra/llmessage/tests/test_llsdmessage_peer.py
+++ b/indra/llmessage/tests/test_llsdmessage_peer.py
@@ -16,16 +16,12 @@ import os
 import sys
 from threading import Thread
 from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
+
 mydir = os.path.dirname(__file__)       # expected to be .../indra/llmessage/tests/
 sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python"))
 from indra.util.fastest_elementtree import parse as xml_parse
 from indra.base import llsd
-
-def debug(*args):
-    sys.stdout.writelines(args)
-    sys.stdout.flush()
-# comment out the line below to enable debug output
-debug = lambda *args: None
+from testrunner import run, debug
 
 class TestHTTPRequestHandler(BaseHTTPRequestHandler):
     """This subclass of BaseHTTPRequestHandler is to receive and echo
@@ -106,25 +102,5 @@ class TestHTTPServer(Thread):
         debug("Starting HTTP server...\n")
         httpd.serve_forever()
 
-def main(*args):
-    # Start HTTP server thread. Note that this and all other comm server
-    # threads should be daemon threads: we'll let them run "forever,"
-    # confident that the whole process will terminate when the main thread
-    # terminates, which will be when the test executable child process
-    # terminates.
-    httpThread = TestHTTPServer(name="httpd")
-    httpThread.setDaemon(True)
-    httpThread.start()
-    # choice of os.spawnv():
-    # - [v vs. l] pass a list of args vs. individual arguments,
-    # - [no p] don't use the PATH because we specifically want to invoke the
-    #   executable passed as our first arg,
-    # - [no e] child should inherit this process's environment.
-    debug("Running %s...\n" % (" ".join(args)))
-    sys.stdout.flush()
-    rc = os.spawnv(os.P_WAIT, args[0], args)
-    debug("%s returned %s\n" % (args[0], rc))
-    return rc
-
 if __name__ == "__main__":
-    sys.exit(main(*sys.argv[1:]))
+    sys.exit(run(server=TestHTTPServer(name="httpd"), *sys.argv[1:]))
diff --git a/indra/llmessage/tests/testrunner.py b/indra/llmessage/tests/testrunner.py
new file mode 100644
index 0000000000..3b9c3a7a19
--- /dev/null
+++ b/indra/llmessage/tests/testrunner.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+"""\
+@file   testrunner.py
+@author Nat Goodspeed
+@date   2009-03-20
+@brief  Utilities for writing wrapper scripts for ADD_COMM_BUILD_TEST unit tests
+
+$LicenseInfo:firstyear=2009&license=viewergpl$
+Copyright (c) 2009, Linden Research, Inc.
+$/LicenseInfo$
+"""
+
+import os
+import sys
+
+def debug(*args):
+    sys.stdout.writelines(args)
+    sys.stdout.flush()
+# comment out the line below to enable debug output
+debug = lambda *args: None
+
+def run(*args, **kwds):
+    """All positional arguments collectively form a command line, executed as
+    a synchronous child process.
+    In addition, pass server=new_thread_instance as an explicit keyword (to
+    differentiate it from an additional command-line argument).
+    new_thread_instance should be an instantiated but not yet started Thread
+    subclass instance, e.g.:
+    run("python", "-c", 'print "Hello, world!"', server=TestHTTPServer(name="httpd"))
+    """
+    # If there's no server= keyword arg, don't start a server thread: simply
+    # run a child process.
+    try:
+        thread = kwds.pop("server")
+    except KeyError:
+        pass
+    else:
+        # Start server thread. Note that this and all other comm server
+        # threads should be daemon threads: we'll let them run "forever,"
+        # confident that the whole process will terminate when the main thread
+        # terminates, which will be when the child process terminates.
+        thread.setDaemon(True)
+        thread.start()
+    # choice of os.spawnv():
+    # - [v vs. l] pass a list of args vs. individual arguments,
+    # - [no p] don't use the PATH because we specifically want to invoke the
+    #   executable passed as our first arg,
+    # - [no e] child should inherit this process's environment.
+    debug("Running %s...\n" % (" ".join(args)))
+    sys.stdout.flush()
+    rc = os.spawnv(os.P_WAIT, args[0], args)
+    debug("%s returned %s\n" % (args[0], rc))
+    return rc
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index e1f545adb5..5d79dfbc3e 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -37,6 +37,7 @@ include(UI)
 include(UnixInstall)
 include(LLKDU)
 include(ViewerMiscLibs)
+include(LLLogin)
 
 if (WINDOWS)
     include(CopyWinLibs)
@@ -61,6 +62,7 @@ include_directories(
     ${LLXML_INCLUDE_DIRS}
     ${LSCRIPT_INCLUDE_DIRS}
     ${LSCRIPT_INCLUDE_DIRS}/lscript_compile
+    ${LLLOGIN_INCLUDE_DIRS}
     )
 
 set(viewer_SOURCE_FILES
@@ -231,6 +233,7 @@ set(viewer_SOURCE_FILES
     lllocationinputctrl.cpp
     lllogchat.cpp
     llloginhandler.cpp
+    lllogininstance.cpp
     llmanip.cpp
     llmaniprotate.cpp
     llmanipscale.cpp
@@ -315,7 +318,6 @@ set(viewer_SOURCE_FILES
     llslurl.cpp
     llspatialpartition.cpp
     llsprite.cpp
-    llsrv.cpp
     llstartup.cpp
     llstatusbar.cpp
     llstylemap.cpp
@@ -353,7 +355,6 @@ set(viewer_SOURCE_FILES
     llurlhistory.cpp
     llurlsimstring.cpp
     llurlwhitelist.cpp
-    lluserauth.cpp
     llvectorperfoptions.cpp
     llviewchildren.cpp
     llviewerassetstorage.cpp
@@ -432,6 +433,7 @@ set(viewer_SOURCE_FILES
     llworld.cpp
     llworldmap.cpp
     llworldmapview.cpp
+    llxmlrpclistener.cpp
     llxmlrpctransaction.cpp
     noise.cpp
     pipeline.cpp
@@ -627,6 +629,7 @@ set(viewer_HEADER_FILES
     lllocationinputctrl.h
     lllogchat.h
     llloginhandler.h
+    lllogininstance.h
     llmanip.h
     llmaniprotate.h
     llmanipscale.h
@@ -712,7 +715,6 @@ set(viewer_HEADER_FILES
     llslurl.h
     llspatialpartition.h
     llsprite.h
-    llsrv.h
     llstartup.h
     llstatusbar.h
     llstylemap.h
@@ -752,7 +754,6 @@ set(viewer_HEADER_FILES
     llurlhistory.h
     llurlsimstring.h
     llurlwhitelist.h
-    lluserauth.h
     llvectorperfoptions.h
     llviewchildren.h
     llviewerassetstorage.h
@@ -832,6 +833,7 @@ set(viewer_HEADER_FILES
     llworld.h
     llworldmap.h
     llworldmapview.h
+    llxmlrpclistener.h
     llxmlrpctransaction.h
     macmain.h
     noise.h
@@ -1266,6 +1268,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
     ${WINDOWS_LIBRARIES}
     ${XMLRPCEPI_LIBRARIES}
     ${ELFIO_LIBRARIES}
+    ${LLLOGIN_LIBRARIES}
     )
 
 build_version(viewer)
@@ -1390,3 +1393,5 @@ endif (INSTALL)
 ADD_VIEWER_BUILD_TEST(llagentaccess viewer)
 ADD_VIEWER_COMM_BUILD_TEST(llcapabilitylistener viewer 
   ${CMAKE_CURRENT_SOURCE_DIR}/../llmessage/tests/test_llsdmessage_peer.py)
+ADD_VIEWER_COMM_BUILD_TEST(llxmlrpclistener viewer
+  ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llxmlrpc_peer.py)
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 073b6b85fc..455e987da0 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -142,7 +142,6 @@
 #include "llfolderview.h"
 #include "lltoolbar.h"
 #include "llagentpilot.h"
-#include "llsrv.h"
 #include "llvovolume.h"
 #include "llflexibleobject.h" 
 #include "llvosurfacepatch.h"
@@ -204,9 +203,6 @@ BOOL gAllowTapTapHoldRun = TRUE;
 BOOL gShowObjectUpdates = FALSE;
 BOOL gUseQuickTime = TRUE;
 
-BOOL gAcceptTOS = FALSE;
-BOOL gAcceptCriticalMessage = FALSE;
-
 eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL;
 
 LLSD gDebugInfo;
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 536abfae58..a7f1594d0e 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -258,10 +258,6 @@ extern LLSD gDebugInfo;
 extern BOOL	gAllowTapTapHoldRun;
 extern BOOL	gShowObjectUpdates;
 
-extern BOOL gAcceptTOS;
-extern BOOL gAcceptCriticalMessage;
-
-
 typedef enum 
 {
 	LAST_EXEC_NORMAL = 0,
diff --git a/indra/newview/llclassifiedinfo.cpp b/indra/newview/llclassifiedinfo.cpp
index 5cf1579d0e..5fcafbeca6 100644
--- a/indra/newview/llclassifiedinfo.cpp
+++ b/indra/newview/llclassifiedinfo.cpp
@@ -38,35 +38,19 @@
 LLClassifiedInfo::cat_map LLClassifiedInfo::sCategories;
 
 // static
-void LLClassifiedInfo::loadCategories(LLUserAuth::options_t classified_options)
+void LLClassifiedInfo::loadCategories(const LLSD& options)
 {
-	LLUserAuth::options_t::iterator resp_it;
-	for (resp_it = classified_options.begin(); 
-		 resp_it != classified_options.end(); 
-		 ++resp_it)
+	for(LLSD::array_const_iterator resp_it = options.beginArray(),
+		end = options.endArray(); resp_it != end; ++resp_it)
 	{
-		const LLUserAuth::response_t& response = *resp_it;
-
-		LLUserAuth::response_t::const_iterator option_it;
-
-		S32 cat_id = 0;
-		option_it = response.find("category_id");
-		if (option_it != response.end())
+		LLSD name = (*resp_it)["category_name"];
+		if(name.isDefined())
 		{
-			cat_id = atoi(option_it->second.c_str());
+			LLSD id = (*resp_it)["category_id"];
+			if(id.isDefined())
+			{
+				LLClassifiedInfo::sCategories[id.asInteger()] = name.asString();
+			}
 		}
-		else
-		{
-			continue;
-		}
-
-		// Add the category id/name pair
-		option_it = response.find("category_name");
-		if (option_it != response.end())
-		{
-			LLClassifiedInfo::sCategories[cat_id] = option_it->second;
-		}
-
 	}
-
 }
diff --git a/indra/newview/llclassifiedinfo.h b/indra/newview/llclassifiedinfo.h
index cc5a6bf28f..37134c7e5b 100644
--- a/indra/newview/llclassifiedinfo.h
+++ b/indra/newview/llclassifiedinfo.h
@@ -37,7 +37,6 @@
 
 #include "v3dmath.h"
 #include "lluuid.h"
-#include "lluserauth.h"
 
 class LLMessageSystem;
 
@@ -46,7 +45,7 @@ class LLClassifiedInfo
 public:
 	LLClassifiedInfo() {}
 
-	static void loadCategories(LLUserAuth::options_t event_options);
+	static void loadCategories(const LLSD& options);
 
 	typedef std::map<U32, std::string> cat_map;
 	static	cat_map sCategories;
diff --git a/indra/newview/lleventinfo.cpp b/indra/newview/lleventinfo.cpp
index d4175b6c84..9be45d18fb 100644
--- a/indra/newview/lleventinfo.cpp
+++ b/indra/newview/lleventinfo.cpp
@@ -87,35 +87,19 @@ void LLEventInfo::unpack(LLMessageSystem *msg)
 }
 
 // static
-void LLEventInfo::loadCategories(LLUserAuth::options_t event_options)
+void LLEventInfo::loadCategories(const LLSD& options)
 {
-	LLUserAuth::options_t::iterator resp_it;
-	for (resp_it = event_options.begin(); 
-		 resp_it != event_options.end(); 
-		 ++resp_it)
+	for(LLSD::array_const_iterator resp_it = options.beginArray(),
+		end = options.endArray(); resp_it != end; ++resp_it)
 	{
-		const LLUserAuth::response_t& response = *resp_it;
-
-		LLUserAuth::response_t::const_iterator option_it;
-
-		S32 cat_id = 0;
-		option_it = response.find("category_id");
-		if (option_it != response.end())
+		LLSD name = (*resp_it)["category_name"];
+		if(name.isDefined())
 		{
-			cat_id = atoi(option_it->second.c_str());
+			LLSD id = (*resp_it)["category_id"];
+			if(id.isDefined())
+			{
+				LLEventInfo::sCategories[id.asInteger()] = name.asString();
+			}
 		}
-		else
-		{
-			continue;
-		}
-
-		// Add the category id/name pair
-		option_it = response.find("category_name");
-		if (option_it != response.end())
-		{
-			LLEventInfo::sCategories[cat_id] = option_it->second;
-		}
-
 	}
-
 }
diff --git a/indra/newview/lleventinfo.h b/indra/newview/lleventinfo.h
index 880517a9f4..493c659983 100644
--- a/indra/newview/lleventinfo.h
+++ b/indra/newview/lleventinfo.h
@@ -37,7 +37,6 @@
 
 #include "v3dmath.h"
 #include "lluuid.h"
-#include "lluserauth.h"
 
 class LLMessageSystem;
 
@@ -48,7 +47,7 @@ public:
 
 	void unpack(LLMessageSystem *msg);
 
-	static void loadCategories(LLUserAuth::options_t event_options);
+	static void loadCategories(const LLSD& options);
 
 public:
 	std::string mName;
diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp
index c0fe327815..e54d78de2e 100644
--- a/indra/newview/lleventnotifier.cpp
+++ b/indra/newview/lleventnotifier.cpp
@@ -95,18 +95,16 @@ void LLEventNotifier::update()
 	}
 }
 
-void LLEventNotifier::load(const LLUserAuth::options_t& event_options)
+void LLEventNotifier::load(const LLSD& event_options)
 {
-	LLUserAuth::options_t::const_iterator resp_it;
-	for (resp_it = event_options.begin(); 
-		 resp_it != event_options.end(); 
-		 ++resp_it)
+	for(LLSD::array_const_iterator resp_it = event_options.beginArray(),
+		end = event_options.endArray(); resp_it != end; ++resp_it)
 	{
-		const LLUserAuth::response_t& response = *resp_it;
+		LLSD response = *resp_it;
 
 		LLEventNotification *new_enp = new LLEventNotification();
 
-		if (!new_enp->load(response))
+		if(!new_enp->load(response))
 		{
 			delete new_enp;
 			continue;
@@ -207,49 +205,46 @@ bool LLEventNotification::handleResponse(const LLSD& notification, const LLSD& r
 	return false;
 }
 
-BOOL LLEventNotification::load(const LLUserAuth::response_t &response)
+BOOL LLEventNotification::load(const LLSD& response)
 {
-
-	LLUserAuth::response_t::const_iterator option_it;
 	BOOL event_ok = TRUE;
-	option_it = response.find("event_id");
-	if (option_it != response.end())
+	LLSD option = response.get("event_id");
+	if (option.isDefined())
 	{
-		mEventID = atoi(option_it->second.c_str());
+		mEventID = option.asInteger();
 	}
 	else
 	{
 		event_ok = FALSE;
 	}
 
-	option_it = response.find("event_name");
-	if (option_it != response.end())
+	option = response.get("event_name");
+	if (option.isDefined())
 	{
-		llinfos << "Event: " << option_it->second << llendl;
-		mEventName = option_it->second;
+		llinfos << "Event: " << option.asString() << llendl;
+		mEventName = option.asString();
 	}
 	else
 	{
 		event_ok = FALSE;
 	}
 
-
-	option_it = response.find("event_date");
-	if (option_it != response.end())
+	option = response.get("event_date");
+	if (option.isDefined())
 	{
-		llinfos << "EventDate: " << option_it->second << llendl;
-		mEventDateStr = option_it->second;
+		llinfos << "EventDate: " << option.asString() << llendl;
+		mEventDateStr = option.asString();
 	}
 	else
 	{
 		event_ok = FALSE;
 	}
 
-	option_it = response.find("event_date_ut");
-	if (option_it != response.end())
+	option = response.get("event_date_ut");
+	if (option.isDefined())
 	{
-		llinfos << "EventDate: " << option_it->second << llendl;
-		mEventDate = strtoul(option_it->second.c_str(), NULL, 10);
+		llinfos << "EventDate: " << option.asString() << llendl;
+		mEventDate = strtoul(option.asString().c_str(), NULL, 10);
 	}
 	else
 	{
@@ -261,44 +256,44 @@ BOOL LLEventNotification::load(const LLUserAuth::response_t &response)
 	S32 x_region = 0;
 	S32 y_region = 0;
 
-	option_it = response.find("grid_x");
-	if (option_it != response.end())
+	option = response.get("grid_x");
+	if (option.isDefined())
 	{
-		llinfos << "GridX: " << option_it->second << llendl;
-		grid_x= atoi(option_it->second.c_str());
+		llinfos << "GridX: " << option.asInteger() << llendl;
+		grid_x= option.asInteger();
 	}
 	else
 	{
 		event_ok = FALSE;
 	}
 
-	option_it = response.find("grid_y");
-	if (option_it != response.end())
+	option = response.get("grid_y");
+	if (option.isDefined())
 	{
-		llinfos << "GridY: " << option_it->second << llendl;
-		grid_y = atoi(option_it->second.c_str());
+		llinfos << "GridY: " << option.asInteger() << llendl;
+		grid_y = option.asInteger();
 	}
 	else
 	{
 		event_ok = FALSE;
 	}
 
-	option_it = response.find("x_region");
-	if (option_it != response.end())
+	option = response.get("x_region");
+	if (option.isDefined())
 	{
-		llinfos << "RegionX: " << option_it->second << llendl;
-		x_region = atoi(option_it->second.c_str());
+		llinfos << "RegionX: " << option.asInteger() << llendl;
+		x_region = option.asInteger();
 	}
 	else
 	{
 		event_ok = FALSE;
 	}
 
-	option_it = response.find("y_region");
-	if (option_it != response.end())
+	option = response.get("y_region");
+	if (option.isDefined())
 	{
-		llinfos << "RegionY: " << option_it->second << llendl;
-		y_region = atoi(option_it->second.c_str());
+		llinfos << "RegionY: " << option.asInteger() << llendl;
+		y_region = option.asInteger();
 	}
 	else
 	{
diff --git a/indra/newview/lleventnotifier.h b/indra/newview/lleventnotifier.h
index feb734948c..6fdde87646 100644
--- a/indra/newview/lleventnotifier.h
+++ b/indra/newview/lleventnotifier.h
@@ -34,7 +34,6 @@
 #define LL_LLEVENTNOTIFIER_H
 
 #include "llframetimer.h"
-#include "lluserauth.h"
 #include "v3dmath.h"
 
 class LLEventInfo;
@@ -49,7 +48,7 @@ public:
 
 	void update();	// Notify the user of the event if it's coming up
 
-	void load(const LLUserAuth::options_t& event_options);	// In the format that it comes in from LLUserAuth
+	void load(const LLSD& event_options);	// In the format that it comes in from login
 	void add(LLEventInfo &event_info);	// Add a new notification for an event
 	void remove(U32 event_id);
 
@@ -69,7 +68,7 @@ public:
 	LLEventNotification();
 	virtual ~LLEventNotification();
 
-	BOOL load(const LLUserAuth::response_t &en);		// In the format it comes in from LLUserAuth
+	BOOL load(const LLSD& en);		// In the format it comes in from login
 	BOOL load(const LLEventInfo &event_info);		// From existing event_info on the viewer.
 	//void setEventID(const U32 event_id);
 	//void setEventName(std::string &event_name);
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 764a6a3498..c79e96a5e5 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -36,8 +36,6 @@
 
 // viewer includes
 #include "llagent.h"
-#include "llappviewer.h"
-#include "llstartup.h"
 #include "llviewerstats.h"
 #include "llviewertexteditor.h"
 #include "llviewerwindow.h"
@@ -58,11 +56,13 @@
 LLFloaterTOS* LLFloaterTOS::sInstance = NULL;
 
 // static
-LLFloaterTOS* LLFloaterTOS::show(ETOSType type, const std::string & message)
+LLFloaterTOS* LLFloaterTOS::show(ETOSType type, 
+								 const std::string & message, 
+								 const YesNoCallback& callback)
 {
 	if( !LLFloaterTOS::sInstance )
 	{
-		LLFloaterTOS::sInstance = new LLFloaterTOS(type, message);
+		LLFloaterTOS::sInstance = new LLFloaterTOS(type, message, callback);
 	}
 
 	if (type == TOS_TOS)
@@ -78,12 +78,15 @@ LLFloaterTOS* LLFloaterTOS::show(ETOSType type, const std::string & message)
 }
 
 
-LLFloaterTOS::LLFloaterTOS(ETOSType type, const std::string & message)
+LLFloaterTOS::LLFloaterTOS(ETOSType type, 
+						   const std::string & message, 
+						   const YesNoCallback& callback)
 :	LLModalDialog( std::string(" "), 100, 100 ),
 	mType(type),
 	mMessage(message),
 	mWebBrowserWindowId( 0 ),
-	mLoadCompleteCount( 0 )
+	mLoadCompleteCount( 0 ),
+	mCallback(callback)
 {
 }
 
@@ -235,25 +238,12 @@ void LLFloaterTOS::onContinue( void* userdata )
 {
 	LLFloaterTOS* self = (LLFloaterTOS*) userdata;
 	llinfos << "User agrees with TOS." << llendl;
-	if (self->mType == TOS_TOS)
-	{
-		gAcceptTOS = TRUE;
-	}
-	else
-	{
-		gAcceptCriticalMessage = TRUE;
-	}
 
-	// Testing TOS dialog
-	#if ! LL_RELEASE_FOR_DOWNLOAD		
-	if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT )
+	if(self->mCallback)
 	{
-		LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+		self->mCallback(true);
 	}
-	else 
-	#endif
 
-	LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );			// Go back and finish authentication
 	self->closeFloater(); // destroys this object
 }
 
@@ -262,8 +252,12 @@ void LLFloaterTOS::onCancel( void* userdata )
 {
 	LLFloaterTOS* self = (LLFloaterTOS*) userdata;
 	llinfos << "User disagrees with TOS." << llendl;
-	LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done);
-	LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+
+	if(self->mCallback)
+	{
+		self->mCallback(false);
+	}
+
 	self->mLoadCompleteCount = 0;  // reset counter for next time we come to TOS
 	self->closeFloater(); // destroys this object
 }
diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h
index dbec3ff8b6..67d2f0ceec 100644
--- a/indra/newview/llfloatertos.h
+++ b/indra/newview/llfloatertos.h
@@ -36,6 +36,7 @@
 #include "llmodaldialog.h"
 #include "llassetstorage.h"
 #include "llwebbrowserctrl.h"
+#include <boost/function.hpp>
 
 class LLButton;
 class LLRadioGroup;
@@ -57,8 +58,12 @@ public:
 		TOS_CRITICAL_MESSAGE = 1
 	};
 
+	typedef boost::function<void(bool)> YesNoCallback;
+
 	// Asset_id is overwritten with LLUUID::null when agree is clicked.
-	static LLFloaterTOS* show(ETOSType type, const std::string & message);
+	static LLFloaterTOS* show(ETOSType type, 
+							  const std::string & message, 
+							  const YesNoCallback& callback);
 
 	BOOL postBuild();
 	
@@ -74,13 +79,16 @@ public:
 
 private:
 	// Asset_id is overwritten with LLUUID::null when agree is clicked.
-	LLFloaterTOS(ETOSType type, const std::string & message);
+	LLFloaterTOS(ETOSType type, 
+				 const std::string & message, 
+				 const YesNoCallback& callback);
 
 private:
 	ETOSType		mType;
 	std::string		mMessage;
 	int				mWebBrowserWindowId;
 	int				mLoadCompleteCount;
+	YesNoCallback	mCallback;
 
 	static LLFloaterTOS* sInstance;
 };
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 1176bf8735..4e2bb3e2e9 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1876,63 +1876,56 @@ bool LLInventoryModel::isCategoryComplete(const LLUUID& cat_id) const
 }
 
 bool LLInventoryModel::loadSkeleton(
-	const LLInventoryModel::options_t& options,
+	const LLSD& options,
 	const LLUUID& owner_id)
 {
 	lldebugs << "importing inventory skeleton for " << owner_id << llendl;
 
 	typedef std::set<LLPointer<LLViewerInventoryCategory>, InventoryIDPtrLess> cat_set_t;
 	cat_set_t temp_cats;
+	bool rv = true;
 
-	update_map_t child_counts;
+	for(LLSD::array_const_iterator it = options.beginArray(),
+		end = options.endArray(); it != end; ++it)
+	{
+		LLSD name = (*it)["name"];
+		LLSD folder_id = (*it)["folder_id"];
+		LLSD parent_id = (*it)["parent_id"];
+		LLSD version = (*it)["version"];
+		if(name.isDefined()
+			&& folder_id.isDefined()
+			&& parent_id.isDefined()
+			&& version.isDefined()
+			&& folder_id.asUUID().notNull() // if an id is null, it locks the viewer.
+			) 		
+		{
+			LLPointer<LLViewerInventoryCategory> cat = new LLViewerInventoryCategory(owner_id);
+			cat->rename(name.asString());
+			cat->setUUID(folder_id.asUUID());
+			cat->setParent(parent_id.asUUID());
 
-	LLUUID id;
-	LLAssetType::EType preferred_type;
-	bool rv = true;
-	for(options_t::const_iterator it = options.begin(); it < options.end(); ++it)
-	{
-		LLPointer<LLViewerInventoryCategory> cat = new LLViewerInventoryCategory(owner_id);
-		response_t::const_iterator no_response = (*it).end();
-		response_t::const_iterator skel;
-		skel = (*it).find("name");
-		if(skel == no_response) goto clean_cat;
-		cat->rename(std::string((*skel).second));
-		skel = (*it).find("folder_id");
-		if(skel == no_response) goto clean_cat;
-		id.set((*skel).second);
-		// if an id is null, it locks the viewer.
-		if(id.isNull()) goto clean_cat;
-		cat->setUUID(id);
-		skel = (*it).find("parent_id");
-		if(skel == no_response) goto clean_cat;
-		id.set((*skel).second);
-		cat->setParent(id);
-		skel = (*it).find("type_default");
-		if(skel == no_response)
-		{
-			preferred_type = LLAssetType::AT_NONE;
+			LLAssetType::EType preferred_type = LLAssetType::AT_NONE;
+			LLSD type_default = (*it)["type_default"];
+			if(type_default.isDefined())
+			{
+				preferred_type = (LLAssetType::EType)type_default.asInteger();
+			}
+			cat->setPreferredType(preferred_type);
+			cat->setVersion(version.asInteger());
+			temp_cats.insert(cat);
 		}
 		else
 		{
-			S32 t = atoi((*skel).second.c_str());
-			preferred_type = (LLAssetType::EType)t;
+			llwarns << "Unable to import near " << name.asString() << llendl;
+			rv = false;
 		}
-		cat->setPreferredType(preferred_type);
-		skel = (*it).find("version");
-		if(skel == no_response) goto clean_cat;
-		cat->setVersion(atoi((*skel).second.c_str()));
-		temp_cats.insert(cat);
-		continue;
-	clean_cat:
-		llwarns << "Unable to import near " << cat->getName() << llendl;
-		rv = false;
-		//delete cat; // automatic when cat is reasigned or destroyed
 	}
 
 	S32 cached_category_count = 0;
 	S32 cached_item_count = 0;
 	if(!temp_cats.empty())
 	{
+		update_map_t child_counts;
 		cat_array_t categories;
 		item_array_t items;
 		std::string owner_id_str;
@@ -1961,6 +1954,7 @@ bool LLInventoryModel::loadSkeleton(
 				llinfos << "Unable to gunzip " << gzip_filename << llendl;
 			}
 		}
+
 		if(loadFromFile(inventory_filename, categories, items))
 		{
 			// We were able to find a cache of files. So, use what we
@@ -2085,85 +2079,84 @@ bool LLInventoryModel::loadSkeleton(
 	return rv;
 }
 
-bool LLInventoryModel::loadMeat(
-	const LLInventoryModel::options_t& options, const LLUUID& owner_id)
+bool LLInventoryModel::loadMeat(const LLSD& options, const LLUUID& owner_id)
 {
 	llinfos << "importing inventory for " << owner_id << llendl;
-	LLPermissions default_perm;
-	default_perm.init(LLUUID::null, owner_id, LLUUID::null, LLUUID::null);
-	LLPointer<LLViewerInventoryItem> item;
-	LLUUID id;
-	LLAssetType::EType type;
-	LLInventoryType::EType inv_type;
 	bool rv = true;
-	for(options_t::const_iterator it = options.begin(); it < options.end(); ++it)
-	{
-		item = new LLViewerInventoryItem;
-		response_t::const_iterator no_response = (*it).end();
-		response_t::const_iterator meat;
-		meat = (*it).find("name");
-		if(meat == no_response) goto clean_item;
-		item->rename(std::string((*meat).second));
-		meat = (*it).find("item_id");
-		if(meat == no_response) goto clean_item;
-		id.set((*meat).second);
-		item->setUUID(id);
-		meat = (*it).find("parent_id");
-		if(meat == no_response) goto clean_item;
-		id.set((*meat).second);
-		item->setParent(id);
-		meat = (*it).find("type");
-		if(meat == no_response) goto clean_item;
-		type = (LLAssetType::EType)atoi((*meat).second.c_str());
-		item->setType(type);
-		meat = (*it).find("inv_type");
-		if(meat != no_response)
-		{
-			inv_type = (LLInventoryType::EType)atoi((*meat).second.c_str());
-			item->setInventoryType(inv_type);
-		}
-		meat = (*it).find("data_id");
-		if(meat == no_response) goto clean_item;
-		id.set((*meat).second);
-		if(LLAssetType::AT_CALLINGCARD == type)
-		{
-			LLPermissions perm;
-			perm.init(id, owner_id, LLUUID::null, LLUUID::null);
-			item->setPermissions(perm);
-		}
-		else
+	for(LLSD::array_const_iterator it = options.beginArray(),
+		end = options.endArray(); it != end; ++it)
+	{
+		LLSD name = (*it)["name"];
+		LLSD item_id = (*it)["item_id"];
+		LLSD parent_id = (*it)["parent_id"];
+		LLSD asset_type = (*it)["type"];
+		LLSD data_id = (*it)["data_id"];
+		if(name.isDefined() 
+			&& item_id.isDefined()
+			&& parent_id.isDefined()
+			&& asset_type.isDefined()
+			&& data_id.isDefined())
 		{
-			meat = (*it).find("perm_mask");
-			if(meat != no_response)
+			LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem;
+			item->rename(name.asString());
+			item->setUUID(item_id.asUUID());
+			item->setParent(parent_id.asUUID());
+			LLAssetType::EType type = (LLAssetType::EType)asset_type.asInteger();
+			item->setType(type);
+
+			LLSD llsd_inv_type = (*it)["inv_type"];
+			if(llsd_inv_type.isDefined())
 			{
-				PermissionMask perm_mask = atoi((*meat).second.c_str());
-				default_perm.initMasks(
-					perm_mask, perm_mask, perm_mask, perm_mask, perm_mask);
+				LLInventoryType::EType inv_type = (LLInventoryType::EType)llsd_inv_type.asInteger();
+				item->setInventoryType(inv_type);
+			}
+
+			if(LLAssetType::AT_CALLINGCARD == type)
+			{
+				LLPermissions perm;
+				perm.init(data_id.asUUID(), owner_id, LLUUID::null, LLUUID::null);
+				item->setPermissions(perm);
 			}
 			else
 			{
-				default_perm.initMasks(
-					PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE);
+				LLPermissions default_perm;
+				default_perm.init(LLUUID::null, owner_id, LLUUID::null, LLUUID::null);
+				LLSD llsd_perm_mask = (*it)["perm_mask"];
+				if(llsd_perm_mask.isDefined())
+				{
+					PermissionMask perm_mask = llsd_perm_mask.asInteger();
+					default_perm.initMasks(
+						perm_mask, perm_mask, perm_mask, perm_mask, perm_mask);
+				}
+				else
+				{
+					default_perm.initMasks(
+						PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE);
+				}
+				item->setPermissions(default_perm);
+				item->setAssetUUID(data_id.asUUID());
 			}
-			item->setPermissions(default_perm);
-			item->setAssetUUID(id);
-		}
-		meat = (*it).find("flags");
-		if(meat != no_response)
-		{
-			item->setFlags(strtoul((*meat).second.c_str(), NULL, 0));
+
+			LLSD flags = (*it)["flags"];
+			if(flags.isDefined())
+			{
+				// Not sure how well LLSD.asInteger() maps to 
+				// unsigned long - using strtoul()
+				item->setFlags(strtoul(flags.asString().c_str(), NULL, 0));
+			}
+
+			LLSD time = (*it)["time"];
+			if(time.isDefined())
+			{
+				item->setCreationDate(time.asInteger());
+			}
+			addItem(item);
 		}
-		meat = (*it).find("time");
-		if(meat != no_response)
+		else
 		{
-			item->setCreationDate(atoi((*meat).second.c_str()));
+			llwarns << "Unable to import near " << name.asString() << llendl;
+			rv = false;
 		}
-		addItem(item);
-		continue;
-	clean_item:
-		llwarns << "Unable to import near " << item->getName() << llendl;
-		rv = false;
-		//delete item; // automatic when item is reassigned or destroyed
 	}
 	return rv;
 }
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index d73fef7207..fcb3cc737a 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -314,10 +314,8 @@ public:
 
 	// methods to load up inventory skeleton & meat. These are used
 	// during authentication. return true if everything parsed.
-	typedef std::map<std::string, std::string> response_t;
-	typedef std::vector<response_t> options_t;
-	bool loadSkeleton(const options_t& options, const LLUUID& owner_id);
-	bool loadMeat(const options_t& options, const LLUUID& owner_id);
+	bool loadSkeleton(const LLSD& options, const LLUUID& owner_id);
+	bool loadMeat(const LLSD& options, const LLUUID& owner_id);
 
 	// This is a brute force method to rebuild the entire parent-child
 	// relations.
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
new file mode 100644
index 0000000000..388bf38d61
--- /dev/null
+++ b/indra/newview/lllogininstance.cpp
@@ -0,0 +1,532 @@
+/** 
+ * @file lllogininstance.cpp
+ * @brief Viewer's host for a login connection.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "lllogininstance.h"
+
+// llcommon
+#include "llevents.h"
+#include "llmd5.h"
+#include "stringize.h"
+
+// llmessage (!)
+#include "llfiltersd2xmlrpc.h" // for xml_escape_string()
+
+// login
+#include "lllogin.h"
+
+// newview
+#include "llviewernetwork.h"
+#include "llappviewer.h" // Wish I didn't have to, but...
+#include "llviewercontrol.h"
+#include "llurlsimstring.h"
+#include "llfloatertos.h"
+#include "llwindow.h"
+
+std::string construct_start_string();
+
+LLLoginInstance::LLLoginInstance() :
+	mLoginModule(new LLLogin()),
+	mLoginState("offline"),
+	mUserInteraction(true),
+	mSkipOptionalUpdate(false),
+	mAttemptComplete(false),
+	mTransferRate(0.0f)
+{
+	mLoginModule->getEventPump().listen("lllogininstance", 
+		boost::bind(&LLLoginInstance::handleLoginEvent, this, _1));
+}
+
+LLLoginInstance::~LLLoginInstance()
+{
+}
+
+
+void LLLoginInstance::connect(const LLSD& credentials)
+{
+	std::vector<std::string> uris;
+	LLViewerLogin::getInstance()->getLoginURIs(uris);
+	connect(uris.front(), credentials);
+}
+
+void LLLoginInstance::connect(const std::string& uri, const LLSD& credentials)
+{
+	constructAuthParams(credentials);
+	mLoginModule->connect(uri, mRequestData);
+}
+
+void LLLoginInstance::reconnect()
+{
+	// Sort of like connect, only using the pre-existing
+	// request params.
+	std::vector<std::string> uris;
+	LLViewerLogin::getInstance()->getLoginURIs(uris);
+	mLoginModule->connect(uris.front(), mRequestData);
+}
+
+void LLLoginInstance::disconnect()
+{
+	mRequestData.clear();
+	mLoginModule->disconnect();
+}
+
+LLSD LLLoginInstance::getResponse() 
+{
+	return mResponseData; 
+}
+
+void LLLoginInstance::constructAuthParams(const LLSD& credentials)
+{
+	// Set up auth request options.
+//#define LL_MINIMIAL_REQUESTED_OPTIONS
+	LLSD requested_options;
+	// *Note: this is where gUserAuth used to be created.
+	requested_options.append("inventory-root");
+	requested_options.append("inventory-skeleton");
+	//requested_options.append("inventory-meat");
+	//requested_options.append("inventory-skel-targets");
+#if (!defined LL_MINIMIAL_REQUESTED_OPTIONS)
+	if(FALSE == gSavedSettings.getBOOL("NoInventoryLibrary"))
+	{
+		requested_options.append("inventory-lib-root");
+		requested_options.append("inventory-lib-owner");
+		requested_options.append("inventory-skel-lib");
+	//	requested_options.append("inventory-meat-lib");
+	}
+
+	requested_options.append("initial-outfit");
+	requested_options.append("gestures");
+	requested_options.append("event_categories");
+	requested_options.append("event_notifications");
+	requested_options.append("classified_categories");
+	//requested_options.append("inventory-targets");
+	requested_options.append("buddy-list");
+	requested_options.append("ui-config");
+#endif
+	requested_options.append("tutorial_setting");
+	requested_options.append("login-flags");
+	requested_options.append("global-textures");
+	if(gSavedSettings.getBOOL("ConnectAsGod"))
+	{
+		gSavedSettings.setBOOL("UseDebugMenus", TRUE);
+		requested_options.append("god-connect");
+	}
+
+	char hashed_mac_string[MD5HEX_STR_SIZE];		/* Flawfinder: ignore */
+	LLMD5 hashed_mac;
+	hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES );
+	hashed_mac.finalize();
+	hashed_mac.hex_digest(hashed_mac_string);
+
+	// prepend "$1$" to the password to indicate its the md5'd version.
+	std::string dpasswd("$1$");
+	dpasswd.append(credentials["passwd"].asString());
+
+	// (re)initialize the request params with creds.
+	LLSD request_params(credentials);
+	request_params["passwd"] = dpasswd;
+	request_params["start"] = construct_start_string();
+	request_params["skipoptional"] = mSkipOptionalUpdate;
+	request_params["agree_to_tos"] = false; // Always false here. Set true in 
+	request_params["read_critical"] = false; // handleTOSResponse
+	request_params["last_exec_event"] = gLastExecEvent;
+	request_params["mac"] = hashed_mac_string;
+	request_params["version"] = gCurrentVersion; // Includes channel name
+	request_params["channel"] = gSavedSettings.getString("VersionChannelName");
+	request_params["id0"] = LLAppViewer::instance()->getSerialNumber();
+
+	mRequestData["method"] = "login_to_simulator";
+	mRequestData["params"] = request_params;
+	mRequestData["options"] = requested_options;
+}
+
+bool LLLoginInstance::handleLoginEvent(const LLSD& event)
+{
+	std::cout << "LoginListener called!: \n";
+	std::cout << event << "\n";
+
+	if(!(event.has("state") && event.has("progress")))
+	{
+		llerrs << "Unknown message from LLLogin!" << llendl;
+	}
+
+	mLoginState = event["state"].asString();
+	mResponseData = event["data"];
+	
+	if(event.has("transfer_rate"))
+	{
+		mTransferRate = event["transfer_rate"].asReal();
+	}
+
+	if(mLoginState == "offline")
+	{
+		handleLoginFailure(event);
+	}
+	else if(mLoginState == "online")
+	{
+		handleLoginSuccess(event);
+	}
+
+	return false;
+}
+
+bool LLLoginInstance::handleLoginFailure(const LLSD& event)
+{
+	// Login has failed. 
+	// Figure out why and respond...
+	LLSD response = event["data"];
+	std::string reason_response = response["reason"].asString();
+	std::string message_response = response["message"].asString();
+	if(mUserInteraction)
+	{
+		// For the cases of critical message or TOS agreement,
+		// start the TOS dialog. The dialog response will be handled
+		// by the LLLoginInstance::handleTOSResponse() callback.
+		// The callback intiates the login attempt next step, either 
+		// to reconnect or to end the attempt in failure.
+		if(reason_response == "tos")
+		{
+			LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
+											message_response,
+											boost::bind(&LLLoginInstance::handleTOSResponse, 
+														this, _1, "agree_to_tos")
+											);
+			tos_dialog->startModal();
+		}
+		else if(reason_response == "critical")
+		{
+			LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
+											message_response,
+											boost::bind(&LLLoginInstance::handleTOSResponse, 
+														this, _1, "read_critical")
+											);
+			tos_dialog->startModal();
+		}
+		else if(reason_response == "update" || gSavedSettings.getBOOL("ForceMandatoryUpdate"))
+		{
+			gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE);
+			updateApp(true, message_response);
+		}
+		else if(reason_response == "optional")
+		{
+			updateApp(false, message_response);
+		}
+		else
+		{	
+			attemptComplete();
+		}	
+	}
+	else // no user interaction
+	{
+		attemptComplete();
+	}
+
+	return false;
+}
+
+bool LLLoginInstance::handleLoginSuccess(const LLSD& event)
+{
+	LLSD response = event["data"];
+	std::string message_response = response["message"].asString();
+	if(gSavedSettings.getBOOL("ForceMandatoryUpdate"))
+	{
+		// Testing update...
+		gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE);
+		// Don't confuse startup by leaving login "online".
+		mLoginModule->disconnect(); 
+		updateApp(true, message_response);
+	}
+	else
+	{
+		attemptComplete();
+	}
+	return false;
+}
+
+void LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
+{
+	if(accepted)
+	{	
+		// Set the request data to true and retry login.
+		mRequestData[key] = true; 
+		reconnect();
+	}
+	else
+	{
+		attemptComplete();
+	}
+}
+
+
+void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
+{
+	// store off config state, as we might quit soon
+	gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);	
+
+	std::ostringstream message;
+
+	//*TODO:translate
+	std::string msg;
+	if (!auth_msg.empty())
+	{
+		msg = "(" + auth_msg + ") \n";
+	}
+
+	LLSD args;
+	args["MESSAGE"] = msg;
+	
+	LLSD payload;
+	payload["mandatory"] = mandatory;
+
+/*
+ We're constructing one of the following 6 strings here:
+	 "DownloadWindowsMandatory"
+	 "DownloadWindowsReleaseForDownload"
+	 "DownloadWindows"
+	 "DownloadMacMandatory"
+	 "DownloadMacReleaseForDownload"
+	 "DownloadMac"
+ 
+ I've called them out explicitly in this comment so that they can be grepped for.
+ 
+ Also, we assume that if we're not Windows we're Mac. If we ever intend to support 
+ Linux with autoupdate, this should be an explicit #elif LL_DARWIN, but 
+ we'd rather deliver the wrong message than no message, so until Linux is supported
+ we'll leave it alone.
+ */
+	std::string notification_name = "Download";
+	
+#if LL_WINDOWS
+	notification_name += "Windows";
+#else
+	notification_name += "Mac";
+#endif
+	
+	if (mandatory)
+	{
+		notification_name += "Mandatory";
+	}
+	else
+	{
+#if LL_RELEASE_FOR_DOWNLOAD
+		notification_name += "ReleaseForDownload";
+#endif
+	}
+	
+	LLNotifications::instance().add(notification_name, args, payload, 
+		boost::bind(&LLLoginInstance::updateDialogCallback, this, _1, _2));
+}
+
+bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD& response)
+{
+	S32 option = LLNotification::getSelectedOption(notification, response);
+	std::string update_exe_path;
+	bool mandatory = notification["payload"]["mandatory"].asBoolean();
+
+#if !LL_RELEASE_FOR_DOWNLOAD
+	if (option == 2)
+	{
+		// This condition attempts to skip the 
+		// update if using a dev build.
+		// The relog probably won't work if the 
+		// update is mandatory. :)
+
+	    // *REMOVE:Mani - Saving for reference...
+		//LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); 
+		mSkipOptionalUpdate = true;
+		reconnect();
+		return false;
+	}
+#endif
+
+	if (option == 1)
+	{
+		// ...user doesn't want to do it
+		if (mandatory)
+		{
+			// Mandatory update, user chose to not to update...
+			// The login attemp is complete, startup should 
+			// quit when detecting this.
+			attemptComplete();
+
+			// *REMOVE:Mani - Saving for reference...
+			//LLAppViewer::instance()->forceQuit();
+			// // Bump them back to the login screen.
+			// //reset_login();
+		}
+		else
+		{
+			// Optional update, user chose to skip
+			mSkipOptionalUpdate = true;
+			reconnect();
+		}
+		return false;
+	}
+	
+	LLSD query_map = LLSD::emptyMap();
+	// *TODO place os string in a global constant
+#if LL_WINDOWS  
+	query_map["os"] = "win";
+#elif LL_DARWIN
+	query_map["os"] = "mac";
+#elif LL_LINUX
+	query_map["os"] = "lnx";
+#elif LL_SOLARIS
+	query_map["os"] = "sol";
+#endif
+	// *TODO change userserver to be grid on both viewer and sim, since
+	// userserver no longer exists.
+	query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel();
+	query_map["channel"] = gSavedSettings.getString("VersionChannelName");
+	// *TODO constantize this guy
+	LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map);
+	
+	if(LLAppViewer::sUpdaterInfo)
+	{
+		delete LLAppViewer::sUpdaterInfo;
+	}
+	LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ;
+	
+#if LL_WINDOWS
+	LLAppViewer::sUpdaterInfo->mUpdateExePath = gDirUtilp->getTempFilename();
+	if (LLAppViewer::sUpdaterInfo->mUpdateExePath.empty())
+	{
+		delete LLAppViewer::sUpdaterInfo ;
+		LLAppViewer::sUpdaterInfo = NULL ;
+
+		// We're hosed, bail
+		LL_WARNS("AppInit") << "LLDir::getTempFilename() failed" << LL_ENDL;
+
+		attemptComplete();
+		// *REMOVE:Mani - Saving for reference...
+		// LLAppViewer::instance()->forceQuit();
+		return false;
+	}
+
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += ".exe";
+
+	std::string updater_source = gDirUtilp->getAppRODataDir();
+	updater_source += gDirUtilp->getDirDelimiter();
+	updater_source += "updater.exe";
+
+	LL_DEBUGS("AppInit") << "Calling CopyFile source: " << updater_source
+			<< " dest: " << LLAppViewer::sUpdaterInfo->mUpdateExePath
+			<< LL_ENDL;
+
+
+	if (!CopyFileA(updater_source.c_str(), LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), FALSE))
+	{
+		delete LLAppViewer::sUpdaterInfo ;
+		LLAppViewer::sUpdaterInfo = NULL ;
+
+		LL_WARNS("AppInit") << "Unable to copy the updater!" << LL_ENDL;
+		attemptComplete();
+		// *REMOVE:Mani - Saving for reference...
+		// LLAppViewer::instance()->forceQuit();
+		return false;
+	}
+
+	// if a sim name was passed in via command line parameter (typically through a SLURL)
+	if ( LLURLSimString::sInstance.mSimString.length() )
+	{
+		// record the location to start at next time
+		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
+	};
+
+	LLAppViewer::sUpdaterInfo->mParams << "-url \"" << update_url.asString() << "\"";
+
+	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << " " << LLAppViewer::sUpdaterInfo->mParams.str() << LL_ENDL;
+
+	//Explicitly remove the marker file, otherwise we pass the lock onto the child process and things get weird.
+	LLAppViewer::instance()->removeMarkerFile(); // In case updater fails
+
+	// *NOTE:Mani The updater is spawned as the last thing before the WinMain exit.
+	// see LLAppViewerWin32.cpp
+	
+#elif LL_DARWIN
+	// if a sim name was passed in via command line parameter (typically through a SLURL)
+	if ( LLURLSimString::sInstance.mSimString.length() )
+	{
+		// record the location to start at next time
+		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
+	};
+	
+	LLAppViewer::sUpdaterInfo->mUpdateExePath = "'";
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += gDirUtilp->getAppRODataDir();
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += "/mac-updater.app/Contents/MacOS/mac-updater' -url \"";
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += update_url.asString();
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -name \"";
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += LLAppViewer::instance()->getSecondLifeTitle();
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" &";
+
+	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << LL_ENDL;
+
+	// Run the auto-updater.
+	system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
+
+#elif LL_LINUX || LL_SOLARIS
+	OSMessageBox("Automatic updating is not yet implemented for Linux.\n"
+		"Please download the latest version from www.secondlife.com.",
+		LLStringUtil::null, OSMB_OK);
+#endif
+
+	// *REMOVE:Mani - Saving for reference...
+	// LLAppViewer::instance()->forceQuit();
+
+	return false;
+}
+
+std::string construct_start_string()
+{
+	std::string start;
+	if (LLURLSimString::parse())
+	{
+		// a startup URL was specified
+		std::string unescaped_start = 
+			STRINGIZE(  "uri:" 
+						<< LLURLSimString::sInstance.mSimName << "&" 
+						<< LLURLSimString::sInstance.mX << "&" 
+						<< LLURLSimString::sInstance.mY << "&" 
+						<< LLURLSimString::sInstance.mZ);
+		start = xml_escape_string(unescaped_start);
+	}
+	else if (gSavedSettings.getBOOL("LoginLastLocation"))
+	{
+		start = "last";
+	}
+	else
+	{
+		start = "home";
+	}
+	return start;
+}
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
new file mode 100644
index 0000000000..da70fec40e
--- /dev/null
+++ b/indra/newview/lllogininstance.h
@@ -0,0 +1,95 @@
+/** 
+ * @file lllogininstance.h
+ * @brief A host for the viewer's login connection.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLLOGININSTANCE_H
+#define LL_LLLOGININSTANCE_H
+
+#include <boost/scoped_ptr.hpp>
+class LLLogin;
+
+// This class hosts the login module and is used to 
+// negotiate user authentication attempts.
+class LLLoginInstance : public LLSingleton<LLLoginInstance>
+{
+public:
+	LLLoginInstance();
+	~LLLoginInstance();
+
+	void connect(const LLSD& credential); // Connect to the current grid choice.
+	void connect(const std::string& uri, const LLSD& credential);	// Connect to the given uri.
+	void reconnect(); // reconnect using the current credentials.
+	void disconnect();
+
+	// Set whether this class will drive user interaction.
+	// If not, login failures like 'need tos agreement' will 
+	// end the login attempt.
+	void setUserInteraction(bool state) { mUserInteraction = state; } 
+	bool getUserInteraction() { return mUserInteraction; }
+
+	// Whether to tell login to skip optional update request.
+	// False by default.
+	void setSkipOptionalUpdate(bool state) { mSkipOptionalUpdate = state; }
+	
+	bool authFailure() { return mAttemptComplete && mLoginState == "offline"; }
+	bool authSuccess() { return mAttemptComplete && mLoginState == "online"; }
+
+	const std::string& getLoginState() { return mLoginState; }
+	LLSD getResponse(const std::string& key) { return getResponse()[key]; }
+	LLSD getResponse();
+
+	// Only valid when authSuccess == true.
+	const F64 getLastTransferRateBPS() { return mTransferRate; }
+
+private:
+	void constructAuthParams(const LLSD& credentials); 
+	void updateApp(bool mandatory, const std::string& message);
+	bool updateDialogCallback(const LLSD& notification, const LLSD& response);
+
+	bool handleLoginEvent(const LLSD& event);
+	bool handleLoginFailure(const LLSD& event);
+	bool handleLoginSuccess(const LLSD& event);
+
+	void handleTOSResponse(bool v, const std::string& key);
+
+	void attemptComplete() { mAttemptComplete = true; } // In the future an event?
+
+	boost::scoped_ptr<LLLogin> mLoginModule;
+	std::string mLoginState;
+	LLSD mRequestData;
+	LLSD mResponseData;
+	bool mUserInteraction; 
+	bool mSkipOptionalUpdate;
+	bool mAttemptComplete;
+	F64 mTransferRate;
+};
+
+#endif
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 671d3264bb..06c78a93da 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -434,7 +434,7 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask)
 	if ( KEY_F2 == key )
 	{
 		llinfos << "Spawning floater TOS window" << llendl;
-		LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,"");
+		LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,"", NULL);
 		tos_dialog->startModal();
 		return TRUE;
 	}
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 93701800e9..5e89030a01 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -50,11 +50,7 @@ typedef enum {
 	STATE_LOGIN_SHOW,				// Show login screen
 	STATE_LOGIN_WAIT,				// Wait for user input at login screen
 	STATE_LOGIN_CLEANUP,			// Get rid of login screen and start login
-	STATE_UPDATE_CHECK,				// Wait for user at a dialog box (updates, term-of-service, etc)
 	STATE_LOGIN_AUTH_INIT,			// Start login to SL servers
-	STATE_LOGIN_AUTHENTICATE,		// Do authentication voodoo
-	STATE_LOGIN_NO_DATA_YET,		// Waiting for authentication replies to start
-	STATE_LOGIN_DOWNLOADING,		// Waiting for authentication replies to download
 	STATE_LOGIN_PROCESS_RESPONSE,	// Check authentication reply
 	STATE_WORLD_INIT,				// Start building the world
 	STATE_MULTIMEDIA_INIT,			// Init the rest of multimedia library
@@ -75,8 +71,6 @@ typedef enum {
 // exported symbols
 extern bool gAgentMovementCompleted;
 extern LLPointer<LLImageGL> gStartImageGL;
-extern std::string gInitialOutfit;
-extern std::string gInitialOutfitGender;	// "male" or "female"
 
 class LLStartUp
 {
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index f70e5ad242..5647b6889b 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -177,7 +177,6 @@
 #include "lltrans.h"
 #include "lluictrlfactory.h"
 #include "lluploaddialog.h"
-#include "lluserauth.h"
 #include "lluuid.h"
 #include "llviewercamera.h"
 #include "llviewergenericmessage.h"
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 918b15ef09..801c46035a 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -35,6 +35,8 @@
 
 #include "llviewernetwork.h"
 #include "llviewercontrol.h"
+#include "llevents.h"
+#include "lllogin.h"
 
 struct LLGridData
 {
@@ -155,6 +157,10 @@ LLViewerLogin::LLViewerLogin() :
 {
 }
 
+ LLViewerLogin::~LLViewerLogin() 
+ {
+ }
+
 void LLViewerLogin::setGridChoice(EGridInfo grid)
 {	
 	if(grid < 0 || grid >= GRID_INFO_COUNT)
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index 4001ed05c1..edae6dc47b 100644
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -34,7 +34,10 @@
 #ifndef LL_LLVIEWERNETWORK_H
 #define LL_LLVIEWERNETWORK_H
 
+#include <boost/scoped_ptr.hpp>
+
 class LLHost;
+class LLLogin;
 
 enum EGridInfo
 {
@@ -74,6 +77,7 @@ class LLViewerLogin : public LLSingleton<LLViewerLogin>
 {
 public:
 	LLViewerLogin();
+	~LLViewerLogin();
 
 	void setGridChoice(EGridInfo grid);
 	void setGridChoice(const std::string& grid_name);
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
new file mode 100644
index 0000000000..2821e6c59f
--- /dev/null
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -0,0 +1,494 @@
+/**
+ * @file   llxmlrpclistener.cpp
+ * @author Nat Goodspeed
+ * @date   2009-03-18
+ * @brief  Implementation for llxmlrpclistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+
+// Precompiled header
+#include "llviewerprecompiledheaders.h"
+// associated header
+#include "llxmlrpclistener.h"
+// STL headers
+#include <map>
+#include <set>
+// std headers
+// external library headers
+#include <boost/scoped_ptr.hpp>
+#include <boost/range.hpp>          // boost::begin(), boost::end()
+// 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
+
+template <typename STATUS>
+class StatusMapperBase
+{
+    typedef std::map<STATUS, std::string> MapType;
+
+public:
+    StatusMapperBase(const std::string& desc):
+        mDesc(desc)
+    {}
+
+    std::string lookup(STATUS status) const
+    {
+        typename MapType::const_iterator found = mMap.find(status);
+        if (found != mMap.end())
+        {
+            return found->second;
+        }
+        return STRINGIZE("<unknown " << mDesc << " " << status << ">");
+    }
+
+protected:
+    std::string mDesc;
+    MapType mMap;
+};
+
+class StatusMapper: public StatusMapperBase<LLXMLRPCTransaction::Status>
+{
+public:
+    StatusMapper(): StatusMapperBase<LLXMLRPCTransaction::Status>("Status")
+    {
+		mMap[LLXMLRPCTransaction::StatusNotStarted]  = "NotStarted";
+		mMap[LLXMLRPCTransaction::StatusStarted]     = "Started";
+		mMap[LLXMLRPCTransaction::StatusDownloading] = "Downloading";
+		mMap[LLXMLRPCTransaction::StatusComplete]    = "Complete";
+		mMap[LLXMLRPCTransaction::StatusCURLError]   = "CURLError";
+		mMap[LLXMLRPCTransaction::StatusXMLRPCError] = "XMLRPCError";
+		mMap[LLXMLRPCTransaction::StatusOtherError]  = "OtherError";
+    }
+};
+
+static const StatusMapper sStatusMapper;
+
+class CURLcodeMapper: public StatusMapperBase<CURLcode>
+{
+public:
+    CURLcodeMapper(): StatusMapperBase<CURLcode>("CURLcode")
+    {
+        // from curl.h
+// skip the "CURLE_" prefix for each of these strings
+#define def(sym) (mMap[sym] = #sym + 6)
+        def(CURLE_OK);
+        def(CURLE_UNSUPPORTED_PROTOCOL);    /* 1 */
+        def(CURLE_FAILED_INIT);             /* 2 */
+        def(CURLE_URL_MALFORMAT);           /* 3 */
+        def(CURLE_URL_MALFORMAT_USER);      /* 4 - NOT USED */
+        def(CURLE_COULDNT_RESOLVE_PROXY);   /* 5 */
+        def(CURLE_COULDNT_RESOLVE_HOST);    /* 6 */
+        def(CURLE_COULDNT_CONNECT);         /* 7 */
+        def(CURLE_FTP_WEIRD_SERVER_REPLY);  /* 8 */
+        def(CURLE_FTP_ACCESS_DENIED);       /* 9 a service was denied by the FTP server
+                                          due to lack of access - when login fails
+                                          this is not returned. */
+        def(CURLE_FTP_USER_PASSWORD_INCORRECT); /* 10 - NOT USED */
+        def(CURLE_FTP_WEIRD_PASS_REPLY);    /* 11 */
+        def(CURLE_FTP_WEIRD_USER_REPLY);    /* 12 */
+        def(CURLE_FTP_WEIRD_PASV_REPLY);    /* 13 */
+        def(CURLE_FTP_WEIRD_227_FORMAT);    /* 14 */
+        def(CURLE_FTP_CANT_GET_HOST);       /* 15 */
+        def(CURLE_FTP_CANT_RECONNECT);      /* 16 */
+        def(CURLE_FTP_COULDNT_SET_BINARY);  /* 17 */
+        def(CURLE_PARTIAL_FILE);            /* 18 */
+        def(CURLE_FTP_COULDNT_RETR_FILE);   /* 19 */
+        def(CURLE_FTP_WRITE_ERROR);         /* 20 */
+        def(CURLE_FTP_QUOTE_ERROR);         /* 21 */
+        def(CURLE_HTTP_RETURNED_ERROR);     /* 22 */
+        def(CURLE_WRITE_ERROR);             /* 23 */
+        def(CURLE_MALFORMAT_USER);          /* 24 - NOT USED */
+        def(CURLE_UPLOAD_FAILED);           /* 25 - failed upload "command" */
+        def(CURLE_READ_ERROR);              /* 26 - could open/read from file */
+        def(CURLE_OUT_OF_MEMORY);           /* 27 */
+        /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
+                 instead of a memory allocation error if CURL_DOES_CONVERSIONS
+                 is defined
+        */
+        def(CURLE_OPERATION_TIMEOUTED);     /* 28 - the timeout time was reached */
+        def(CURLE_FTP_COULDNT_SET_ASCII);   /* 29 - TYPE A failed */
+        def(CURLE_FTP_PORT_FAILED);         /* 30 - FTP PORT operation failed */
+        def(CURLE_FTP_COULDNT_USE_REST);    /* 31 - the REST command failed */
+        def(CURLE_FTP_COULDNT_GET_SIZE);    /* 32 - the SIZE command failed */
+        def(CURLE_HTTP_RANGE_ERROR);        /* 33 - RANGE "command" didn't work */
+        def(CURLE_HTTP_POST_ERROR);         /* 34 */
+        def(CURLE_SSL_CONNECT_ERROR);       /* 35 - wrong when connecting with SSL */
+        def(CURLE_BAD_DOWNLOAD_RESUME);     /* 36 - couldn't resume download */
+        def(CURLE_FILE_COULDNT_READ_FILE);  /* 37 */
+        def(CURLE_LDAP_CANNOT_BIND);        /* 38 */
+        def(CURLE_LDAP_SEARCH_FAILED);      /* 39 */
+        def(CURLE_LIBRARY_NOT_FOUND);       /* 40 */
+        def(CURLE_FUNCTION_NOT_FOUND);      /* 41 */
+        def(CURLE_ABORTED_BY_CALLBACK);     /* 42 */
+        def(CURLE_BAD_FUNCTION_ARGUMENT);   /* 43 */
+        def(CURLE_BAD_CALLING_ORDER);       /* 44 - NOT USED */
+        def(CURLE_INTERFACE_FAILED);        /* 45 - CURLOPT_INTERFACE failed */
+        def(CURLE_BAD_PASSWORD_ENTERED);    /* 46 - NOT USED */
+        def(CURLE_TOO_MANY_REDIRECTS );     /* 47 - catch endless re-direct loops */
+        def(CURLE_UNKNOWN_TELNET_OPTION);   /* 48 - User specified an unknown option */
+        def(CURLE_TELNET_OPTION_SYNTAX );   /* 49 - Malformed telnet option */
+        def(CURLE_OBSOLETE);                /* 50 - NOT USED */
+        def(CURLE_SSL_PEER_CERTIFICATE);    /* 51 - peer's certificate wasn't ok */
+        def(CURLE_GOT_NOTHING);             /* 52 - when this is a specific error */
+        def(CURLE_SSL_ENGINE_NOTFOUND);     /* 53 - SSL crypto engine not found */
+        def(CURLE_SSL_ENGINE_SETFAILED);    /* 54 - can not set SSL crypto engine as
+                                          default */
+        def(CURLE_SEND_ERROR);              /* 55 - failed sending network data */
+        def(CURLE_RECV_ERROR);              /* 56 - failure in receiving network data */
+        def(CURLE_SHARE_IN_USE);            /* 57 - share is in use */
+        def(CURLE_SSL_CERTPROBLEM);         /* 58 - problem with the local certificate */
+        def(CURLE_SSL_CIPHER);              /* 59 - couldn't use specified cipher */
+        def(CURLE_SSL_CACERT);              /* 60 - problem with the CA cert (path?) */
+        def(CURLE_BAD_CONTENT_ENCODING);    /* 61 - Unrecognized transfer encoding */
+        def(CURLE_LDAP_INVALID_URL);        /* 62 - Invalid LDAP URL */
+        def(CURLE_FILESIZE_EXCEEDED);       /* 63 - Maximum file size exceeded */
+        def(CURLE_FTP_SSL_FAILED);          /* 64 - Requested FTP SSL level failed */
+        def(CURLE_SEND_FAIL_REWIND);        /* 65 - Sending the data requires a rewind
+                                          that failed */
+        def(CURLE_SSL_ENGINE_INITFAILED);   /* 66 - failed to initialise ENGINE */
+        def(CURLE_LOGIN_DENIED);            /* 67 - user); password or similar was not
+                                          accepted and we failed to login */
+        def(CURLE_TFTP_NOTFOUND);           /* 68 - file not found on server */
+        def(CURLE_TFTP_PERM);               /* 69 - permission problem on server */
+        def(CURLE_TFTP_DISKFULL);           /* 70 - out of disk space on server */
+        def(CURLE_TFTP_ILLEGAL);            /* 71 - Illegal TFTP operation */
+        def(CURLE_TFTP_UNKNOWNID);          /* 72 - Unknown transfer ID */
+        def(CURLE_TFTP_EXISTS);             /* 73 - File already exists */
+        def(CURLE_TFTP_NOSUCHUSER);         /* 74 - No such user */
+        def(CURLE_CONV_FAILED);             /* 75 - conversion failed */
+        def(CURLE_CONV_REQD);               /* 76 - caller must register conversion
+                                          callbacks using curl_easy_setopt options
+                                          CURLOPT_CONV_FROM_NETWORK_FUNCTION);
+                                          CURLOPT_CONV_TO_NETWORK_FUNCTION); and
+                                          CURLOPT_CONV_FROM_UTF8_FUNCTION */
+        def(CURLE_SSL_CACERT_BADFILE);      /* 77 - could not load CACERT file); missing
+                                          or wrong format */
+        def(CURLE_REMOTE_FILE_NOT_FOUND);   /* 78 - remote file not found */
+        def(CURLE_SSH);                     /* 79 - error from the SSH layer); somewhat
+                                          generic so the error message will be of
+                                          interest when this has happened */
+
+        def(CURLE_SSL_SHUTDOWN_FAILED);     /* 80 - Failed to shut down the SSL
+                                          connection */
+#undef  def
+    }
+};
+
+static const CURLcodeMapper sCURLcodeMapper;
+
+LLXMLRPCListener::LLXMLRPCListener(const std::string& pumpname):
+    mBoundListener(LLEventPumps::instance().
+                   obtain(pumpname).
+                   listen("LLXMLRPCListener", boost::bind(&LLXMLRPCListener::process, this, _1)))
+{
+}
+
+/**
+ * Capture an outstanding LLXMLRPCTransaction and poll it periodically until
+ * done.
+ *
+ * The sequence is:
+ * # Instantiate Poller, which instantiates, populates and initiates an
+ *   LLXMLRPCTransaction. Poller self-registers on the LLEventPump named
+ *   "mainloop".
+ * # "mainloop" is conventionally pumped once per frame. On each such call,
+ *   Poller checks its LLXMLRPCTransaction for completion.
+ * # When the LLXMLRPCTransaction completes, Poller collects results (if any)
+ *   and sends notification.
+ * # The tricky part: Poller frees itself (and thus its LLXMLRPCTransaction)
+ *   when done. The only external reference to it is the connection to the
+ *   "mainloop" LLEventPump.
+ */
+class Poller
+{
+public:
+    /// Validate the passed request for required fields, then use it to
+    /// populate an XMLRPC_REQUEST and an associated LLXMLRPCTransaction. Send
+    /// the request.
+    Poller(const LLSD& command):
+        mUri(command["uri"]),
+        mMethod(command["method"]),
+        mReplyPump(command["reply"])
+    {
+        // LL_ERRS if any of these are missing
+        const char* required[] = { "uri", "method", "reply" };
+        // optional: "options" (array of string)
+        // Validate the request
+        std::set<std::string> missing;
+        for (const char** ri = boost::begin(required); ri != boost::end(required); ++ri)
+        {
+            // If the command does not contain this required entry, add it to 'missing'.
+            if (! command.has(*ri))
+            {
+                missing.insert(*ri);
+            }
+        }
+        if (! missing.empty())
+        {
+            LL_ERRS("LLXMLRPCListener") << mMethod << " request missing params: ";
+            const char* separator = "";
+            for (std::set<std::string>::const_iterator mi(missing.begin()), mend(missing.end());
+                 mi != mend; ++mi)
+            {
+                LL_CONT << separator << *mi;
+                separator = ", ";
+            }
+            LL_CONT << LL_ENDL;
+        }
+
+        // Build the XMLRPC request.
+        XMLRPC_REQUEST request = XMLRPC_RequestNew();
+        XMLRPC_RequestSetMethodName(request, mMethod.c_str());
+        XMLRPC_RequestSetRequestType(request, xmlrpc_request_call);
+        XMLRPC_VALUE xparams = XMLRPC_CreateVector(NULL, xmlrpc_vector_struct);
+        LLSD params(command["params"]);
+        if (params.isMap())
+        {
+            for (LLSD::map_const_iterator pi(params.beginMap()), pend(params.endMap());
+                 pi != pend; ++pi)
+            {
+                std::string name(pi->first);
+                LLSD param(pi->second);
+                if (param.isString())
+                {
+                    XMLRPC_VectorAppendString(xparams, name.c_str(), param.asString().c_str(), 0);
+                }
+                else if (param.isInteger() || param.isBoolean())
+                {
+                    XMLRPC_VectorAppendInt(xparams, name.c_str(), param.asInteger());
+                }
+                else if (param.isReal())
+                {
+                    XMLRPC_VectorAppendDouble(xparams, name.c_str(), param.asReal());
+                }
+                else
+                {
+                    LL_ERRS("LLXMLRPCListener") << mMethod << " request param "
+                                                << name << " has unknown type: " << param << LL_ENDL;
+                }
+            }
+        }
+        LLSD options(command["options"]);
+        if (options.isArray())
+        {
+            XMLRPC_VALUE xoptions = XMLRPC_CreateVector("options", xmlrpc_vector_array);
+            for (LLSD::array_const_iterator oi(options.beginArray()), oend(options.endArray());
+                 oi != oend; ++oi)
+            {
+                XMLRPC_VectorAppendString(xoptions, NULL, oi->asString().c_str(), 0);
+            }
+            XMLRPC_AddValueToVector(xparams, xoptions);
+        }
+        XMLRPC_RequestSetData(request, xparams);
+
+        mTransaction.reset(new LLXMLRPCTransaction(mUri, request));
+		mPreviousStatus = mTransaction->status(NULL);
+
+        // Free the XMLRPC_REQUEST object and the attached data values.
+        XMLRPC_RequestFree(request, 1);
+
+        // Now ensure that we get regular callbacks to poll for completion.
+        mBoundListener =
+            LLEventPumps::instance().
+            obtain("mainloop").
+            listen(LLEventPump::inventName(), boost::bind(&Poller::poll, this, _1));
+
+        LL_INFOS("LLXMLRPCListener") << mMethod << " request sent to " << mUri << LL_ENDL;
+    }
+
+    /// called by "mainloop" LLEventPump
+    bool poll(const LLSD&)
+    {
+        bool done = mTransaction->process();
+
+        CURLcode curlcode;
+        LLXMLRPCTransaction::Status status;
+        {
+            // LLXMLRPCTransaction::status() is defined to accept int* rather
+            // than CURLcode*. I don't feel the urge to fix the signature, but
+            // we want a CURLcode rather than an int. So fetch it as a local
+            // int, but then assign to a CURLcode for the remainder of this
+            // method.
+            int curlint;
+            status = mTransaction->status(&curlint);
+            curlcode = CURLcode(curlint);
+        }
+
+        LLSD data;
+        data["status"] = sStatusMapper.lookup(status);
+        data["errorcode"] = sCURLcodeMapper.lookup(curlcode);
+        data["error"] = "";
+        data["transfer_rate"] = 0.0;
+        LLEventPump& replyPump(LLEventPumps::instance().obtain(mReplyPump));
+		if (! done)
+        {
+            // Not done yet, carry on.
+			if (status == LLXMLRPCTransaction::StatusDownloading
+				&& status != mPreviousStatus)
+			{
+				// If a response has been received, send the 
+				// 'downloading' status if it hasn't been sent.
+				replyPump.post(data);
+			}
+
+			mPreviousStatus = status;
+            return false;
+        }
+
+        // Here the transaction is complete. Check status.
+        data["error"] = mTransaction->statusMessage();
+		data["transfer_rate"] = mTransaction->transferRate();
+        LL_INFOS("LLXMLRPCListener") << mMethod << " result from " << mUri << ": status "
+                                     << data["status"].asString() << ", errorcode "
+                                     << data["errorcode"].asString()
+                                     << " (" << data["error"].asString() << ")"
+                                     << LL_ENDL;
+        // In addition to CURLE_OK, LLUserAuth distinguishes different error
+        // values of 'curlcode':
+        // CURLE_COULDNT_RESOLVE_HOST,
+        // CURLE_SSL_PEER_CERTIFICATE,
+        // CURLE_SSL_CACERT,
+        // CURLE_SSL_CONNECT_ERROR.
+        // Given 'message', need we care?
+        if (status == LLXMLRPCTransaction::StatusComplete)
+        {
+            // Success! Parse data.
+            std::string status_string(data["status"]);
+            data["responses"] = parseResponse(status_string);
+            data["status"] = status_string;
+        }
+
+        // whether successful or not, send reply on requested LLEventPump
+        replyPump.post(data);
+
+        // Because mTransaction is a boost::scoped_ptr, deleting this object
+        // frees our LLXMLRPCTransaction object.
+        // Because mBoundListener is an LLTempBoundListener, deleting this
+        // object disconnects it from "mainloop".
+        // *** MUST BE LAST ***
+        delete this;
+        return false;
+    }
+
+private:
+    /// Derived from LLUserAuth::parseResponse() and parseOptionInto()
+    LLSD parseResponse(std::string& status_string)
+    {
+        // Extract every member into data["responses"] (a map of string
+        // values).
+        XMLRPC_REQUEST response = mTransaction->response();
+        if (! response)
+        {
+            LL_DEBUGS("LLXMLRPCListener") << "No response" << LL_ENDL;
+            return LLSD();
+        }
+
+        XMLRPC_VALUE param = XMLRPC_RequestGetData(response);
+        if (! param)
+        {
+            LL_DEBUGS("LLXMLRPCListener") << "Response contains no data" << LL_ENDL;
+            return LLSD();
+        }
+
+        // Now, parse everything
+        return parseValues(status_string, "", param);
+    }
+
+    /**
+     * Parse key/value pairs from a given XMLRPC_VALUE into an LLSD map.
+     * @param key_pfx Used to describe a given key in log messages. At top
+     * level, pass "". When parsing an options array, pass the top-level key
+     * name of the array plus the index of the array entry; to this we'll
+     * append the subkey of interest.
+     * @param param XMLRPC_VALUE iterator. At top level, pass
+     * XMLRPC_RequestGetData(XMLRPC_REQUEST).
+     */
+    LLSD parseValues(std::string& status_string, const std::string& key_pfx, XMLRPC_VALUE param)
+    {
+        LLSD responses;
+        for (XMLRPC_VALUE current = XMLRPC_VectorRewind(param); current;
+             current = XMLRPC_VectorNext(param))
+        {
+            std::string key(XMLRPC_GetValueID(current));
+            LL_DEBUGS("LLXMLRPCListener") << "key: " << key_pfx << key << LL_ENDL;
+            XMLRPC_VALUE_TYPE_EASY type = XMLRPC_GetValueTypeEasy(current);
+            if (xmlrpc_type_string == type)
+            {
+                LLSD::String val(XMLRPC_GetValueString(current));
+                LL_DEBUGS("LLXMLRPCListener") << "val: " << val << LL_ENDL;
+                responses.insert(key, val);
+            }
+            else if (xmlrpc_type_int == type)
+            {
+                LLSD::Integer val(XMLRPC_GetValueInt(current));
+                LL_DEBUGS("LLXMLRPCListener") << "val: " << val << LL_ENDL;
+                responses.insert(key, val);
+            }
+            else if (xmlrpc_type_double == type)
+            {
+                LLSD::Real val(XMLRPC_GetValueDouble(current));
+                LL_DEBUGS("LLXMLRPCListener") << "val: " << val << LL_ENDL;
+                responses.insert(key, val);
+            }
+            else if (xmlrpc_type_array == type)
+            {
+                // We expect this to be an array of submaps. Walk the array,
+                // recursively parsing each submap and collecting them.
+                LLSD array;
+                int i = 0;          // for descriptive purposes
+                for (XMLRPC_VALUE row = XMLRPC_VectorRewind(current); row;
+                     row = XMLRPC_VectorNext(current), ++i)
+                {
+                    // Recursive call. For the lower-level key_pfx, if 'key'
+                    // is "foo", pass "foo[0]:", then "foo[1]:", etc. In the
+                    // nested call, a subkey "bar" will then be logged as
+                    // "foo[0]:bar", and so forth.
+                    // Parse the scalar subkey/value pairs from this array
+                    // entry into a temp submap. Collect such submaps in 'array'.
+                    array.append(parseValues(status_string,
+                                             STRINGIZE(key_pfx << key << '[' << i << "]:"),
+                                             row));
+                }
+                // Having collected an 'array' of 'submap's, insert that whole
+                // 'array' as the value of this 'key'.
+                responses.insert(key, array);
+            }
+            else
+            {
+                // whoops - unrecognized type
+                LL_WARNS("LLXMLRPCListener") << "Unhandled xmlrpc type " << type << " for key "
+                                             << key_pfx << key << LL_ENDL;
+                responses.insert(key, STRINGIZE("<bad XMLRPC type " << type << '>'));
+                status_string = "BadType";
+            }
+        }
+        return responses;
+    }
+
+    const std::string mUri;
+    const std::string mMethod;
+    const std::string mReplyPump;
+    LLTempBoundListener mBoundListener;
+    boost::scoped_ptr<LLXMLRPCTransaction> mTransaction;
+	LLXMLRPCTransaction::Status mPreviousStatus; // To detect state changes.
+};
+
+bool LLXMLRPCListener::process(const LLSD& command)
+{
+    // Allocate a new heap Poller, but do not save a pointer to it. Poller
+    // will check its own status and free itself on completion of the request.
+    (new Poller(command));
+    // conventional event listener return
+    return false;
+}
diff --git a/indra/newview/llxmlrpclistener.h b/indra/newview/llxmlrpclistener.h
new file mode 100644
index 0000000000..120c2b329b
--- /dev/null
+++ b/indra/newview/llxmlrpclistener.h
@@ -0,0 +1,35 @@
+/**
+ * @file   llxmlrpclistener.h
+ * @author Nat Goodspeed
+ * @date   2009-03-18
+ * @brief  LLEventPump API for LLXMLRPCTransaction. This header doesn't
+ *         actually define the API; the API is defined by the pump name on
+ *         which this class listens, and by the expected content of LLSD it
+ *         receives.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLXMLRPCLISTENER_H)
+#define LL_LLXMLRPCLISTENER_H
+
+#include "llevents.h"
+
+/// Listen on an LLEventPump with specified name for LLXMLRPCTransaction
+/// request events.
+class LLXMLRPCListener
+{
+public:
+    /// Specify the pump name on which to listen
+    LLXMLRPCListener(const std::string& pumpname);
+
+    /// Handle request events on the event pump specified at construction time
+    bool process(const LLSD& command);
+
+private:
+    LLTempBoundListener mBoundListener;
+};
+
+#endif /* ! defined(LL_LLXMLRPCLISTENER_H) */
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index a2fd0f0d9c..0e1beb377f 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -33,6 +33,7 @@
 #include "llviewerprecompiledheaders.h"
 
 #include "llxmlrpctransaction.h"
+#include "llxmlrpclistener.h"
 
 #include "llcurl.h"
 #include "llviewercontrol.h"
@@ -42,6 +43,13 @@
 
 #include "llappviewer.h"
 
+// Static instance of LLXMLRPCListener declared here so that every time we
+// bring in this code, we instantiate a listener. If we put the static
+// instance of LLXMLRPCListener into llxmlrpclistener.cpp, the linker would
+// simply omit llxmlrpclistener.o, and shouting on the LLEventPump would do
+// nothing.
+static LLXMLRPCListener listener("LLXMLRPCTransaction");
+
 LLXMLRPCValue LLXMLRPCValue::operator[](const char* id) const
 {
 	return LLXMLRPCValue(XMLRPC_VectorGetValueWithID(mV, id));
@@ -213,6 +221,11 @@ LLXMLRPCTransaction::Impl::Impl(const std::string& uri,
 	XMLRPC_RequestSetData(request, params.getValue());
 	
 	init(request, useGzip);
+    // DEV-28398: without this XMLRPC_RequestFree() call, it looks as though
+    // the 'request' object is simply leaked. It's less clear to me whether we
+    // should also ask to free request value data (second param 1), since the
+    // data come from 'params'.
+    XMLRPC_RequestFree(request, 1);
 }
 
 
diff --git a/indra/newview/tests/llcapabilitylistener_test.cpp b/indra/newview/tests/llcapabilitylistener_test.cpp
index 3c5f6fad2d..90cc867852 100644
--- a/indra/newview/tests/llcapabilitylistener_test.cpp
+++ b/indra/newview/tests/llcapabilitylistener_test.cpp
@@ -24,9 +24,9 @@
 #include "../test/lltut.h"
 #include "../llcapabilityprovider.h"
 #include "lluuid.h"
-#include "llerrorcontrol.h"
 #include "tests/networkio.h"
 #include "tests/commtest.h"
+#include "tests/wrapllerrs.h"
 #include "stringize.h"
 
 #if defined(LL_WINDOWS)
@@ -104,28 +104,6 @@ namespace tut
     typedef llcapears_group::object llcapears_object;
     llcapears_group llsdmgr("llcapabilitylistener");
 
-    struct CaptureError: public LLError::OverrideFatalFunction
-    {
-        CaptureError():
-            LLError::OverrideFatalFunction(boost::bind(&CaptureError::operator(), this, _1))
-        {
-            LLError::setPrintLocation(false);
-        }
-
-        struct FatalException: public std::runtime_error
-        {
-            FatalException(const std::string& what): std::runtime_error(what) {}
-        };
-
-        void operator()(const std::string& message)
-        {
-            error = message;
-            throw FatalException(message);
-        }
-
-        std::string error;
-    };
-
     template<> template<>
     void llcapears_object::test<1>()
     {
@@ -137,10 +115,10 @@ namespace tut
         std::string threw;
         try
         {
-            CaptureError capture;
+            WrapLL_ERRS capture;
             regionPump.post(request);
         }
-        catch (const CaptureError::FatalException& e)
+        catch (const WrapLL_ERRS::FatalException& e)
         {
             threw = e.what();
         }
@@ -184,10 +162,10 @@ namespace tut
         std::string threw;
         try
         {
-            CaptureError capture;
+            WrapLL_ERRS capture;
             regionPump.post(request);
         }
-        catch (const CaptureError::FatalException& e)
+        catch (const WrapLL_ERRS::FatalException& e)
         {
             threw = e.what();
         }
@@ -246,10 +224,10 @@ namespace tut
         std::string threw;
         try
         {
-            CaptureError capture;
+            WrapLL_ERRS capture;
             regionPump.post(request);
         }
-        catch (const CaptureError::FatalException& e)
+        catch (const WrapLL_ERRS::FatalException& e)
         {
             threw = e.what();
         }
diff --git a/indra/newview/tests/llxmlrpclistener_test.cpp b/indra/newview/tests/llxmlrpclistener_test.cpp
new file mode 100644
index 0000000000..0c1ee42ffc
--- /dev/null
+++ b/indra/newview/tests/llxmlrpclistener_test.cpp
@@ -0,0 +1,230 @@
+/*
+ * @file   llxmlrpclistener_test.cpp
+ * @author Nat Goodspeed
+ * @date   2009-03-20
+ * @brief  Test for llxmlrpclistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=internal$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "../llviewerprecompiledheaders.h"
+// associated header
+#include "../llxmlrpclistener.h"
+// STL headers
+#include <iomanip>
+// std headers
+// external library headers
+// other Linden headers
+#include "../test/lltut.h"
+#include "../llxmlrpctransaction.h"
+#include "llevents.h"
+#include "lleventfilter.h"
+#include "llsd.h"
+#include "llcontrol.h"
+#include "tests/wrapllerrs.h"
+
+LLControlGroup gSavedSettings;
+
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
+namespace tut
+{
+    struct data
+    {
+        data():
+            pumps(LLEventPumps::instance()),
+            uri("http://127.0.0.1:8000")
+        {
+            // These variables are required by machinery used by
+            // LLXMLRPCTransaction. The values reflect reality for this test
+            // executable; hopefully these values are correct.
+            gSavedSettings.declareBOOL("BrowserProxyEnabled", FALSE, "", FALSE); // don't persist
+            gSavedSettings.declareBOOL("NoVerifySSLCert", TRUE, "", FALSE); // don't persist
+        }
+
+        // LLEventPump listener signature
+        bool captureReply(const LLSD& r)
+        {
+            reply = r;
+            return false;
+        }
+
+        LLSD reply;
+        LLEventPumps& pumps;
+        std::string uri;
+    };
+    typedef test_group<data> llxmlrpclistener_group;
+    typedef llxmlrpclistener_group::object object;
+    llxmlrpclistener_group llxmlrpclistenergrp("llxmlrpclistener");
+
+    template<> template<>
+    void object::test<1>()
+    {
+        set_test_name("request validation");
+        WrapLL_ERRS capture;
+        LLSD request;
+        request["uri"] = uri;
+        std::string threw;
+        try
+        {
+            pumps.obtain("LLXMLRPCTransaction").post(request);
+        }
+        catch (const WrapLL_ERRS::FatalException& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("threw exception", threw, "missing params");
+        ensure_contains("identified missing", threw, "method");
+        ensure_contains("identified missing", threw, "reply");
+    }
+
+    template<> template<>
+    void object::test<2>()
+    {
+        set_test_name("param types validation");
+        WrapLL_ERRS capture;
+        LLSD request;
+        request["uri"] = uri;
+        request["method"] = "hello";
+        request["reply"] = "reply";
+        LLSD& params(request["params"]);
+        params["who"]["specifically"] = "world"; // LLXMLRPCListener only handles scalar params
+        std::string threw;
+        try
+        {
+            pumps.obtain("LLXMLRPCTransaction").post(request);
+        }
+        catch (const WrapLL_ERRS::FatalException& e)
+        {
+            threw = e.what();
+        }
+        ensure_contains("threw exception", threw, "unknown type");
+    }
+
+    template<> template<>
+    void object::test<3>()
+    {
+        set_test_name("success case");
+        LLSD request;
+        request["uri"] = uri;
+        request["method"] = "hello";
+        request["reply"] = "reply";
+        LLSD& params(request["params"]);
+        params["who"] = "world";
+        // Set up a timeout filter so we don't spin forever waiting.
+        LLEventTimeout watchdog;
+        // Connect the timeout filter to the reply pump.
+        LLTempBoundListener temp(
+            pumps.obtain("reply").
+            listen("watchdog", boost::bind(&LLEventTimeout::post, boost::ref(watchdog), _1)));
+        // Now connect our target listener to the timeout filter.
+        watchdog.listen("captureReply", boost::bind(&data::captureReply, this, _1));
+        // Kick off the request...
+        reply.clear();
+        pumps.obtain("LLXMLRPCTransaction").post(request);
+        // Set the timer
+        F32 timeout(10);
+        watchdog.eventAfter(timeout, LLSD().insert("timeout", 0));
+        // and pump "mainloop" until we get something, whether from
+        // LLXMLRPCListener or from the watchdog filter.
+        LLTimer timer;
+        F32 start = timer.getElapsedTimeF32();
+        LLEventPump& mainloop(pumps.obtain("mainloop"));
+        while (reply.isUndefined())
+        {
+            mainloop.post(LLSD());
+        }
+        ensure("timeout works", (timer.getElapsedTimeF32() - start) < (timeout + 1));
+        ensure_equals(reply["responses"]["hi_there"].asString(), "Hello, world!");
+    }
+
+    template<> template<>
+    void object::test<4>()
+    {
+        set_test_name("bogus method");
+        LLSD request;
+        request["uri"] = uri;
+        request["method"] = "goodbye";
+        request["reply"] = "reply";
+        LLSD& params(request["params"]);
+        params["who"] = "world";
+        // Set up a timeout filter so we don't spin forever waiting.
+        LLEventTimeout watchdog;
+        // Connect the timeout filter to the reply pump.
+        LLTempBoundListener temp(
+            pumps.obtain("reply").
+            listen("watchdog", boost::bind(&LLEventTimeout::post, boost::ref(watchdog), _1)));
+        // Now connect our target listener to the timeout filter.
+        watchdog.listen("captureReply", boost::bind(&data::captureReply, this, _1));
+        // Kick off the request...
+        reply.clear();
+        pumps.obtain("LLXMLRPCTransaction").post(request);
+        // Set the timer
+        F32 timeout(10);
+        watchdog.eventAfter(timeout, LLSD().insert("timeout", 0));
+        // and pump "mainloop" until we get something, whether from
+        // LLXMLRPCListener or from the watchdog filter.
+        LLTimer timer;
+        F32 start = timer.getElapsedTimeF32();
+        LLEventPump& mainloop(pumps.obtain("mainloop"));
+        while (reply.isUndefined())
+        {
+            mainloop.post(LLSD());
+        }
+        ensure("timeout works", (timer.getElapsedTimeF32() - start) < (timeout + 1));
+        ensure_equals("XMLRPC error", reply["status"].asString(), "XMLRPCError");
+    }
+
+    template<> template<>
+    void object::test<5>()
+    {
+        set_test_name("bad type");
+        LLSD request;
+        request["uri"] = uri;
+        request["method"] = "getdict";
+        request["reply"] = "reply";
+        (void)request["params"];
+        // Set up a timeout filter so we don't spin forever waiting.
+        LLEventTimeout watchdog;
+        // Connect the timeout filter to the reply pump.
+        LLTempBoundListener temp(
+            pumps.obtain("reply").
+            listen("watchdog", boost::bind(&LLEventTimeout::post, boost::ref(watchdog), _1)));
+        // Now connect our target listener to the timeout filter.
+        watchdog.listen("captureReply", boost::bind(&data::captureReply, this, _1));
+        // Kick off the request...
+        reply.clear();
+        pumps.obtain("LLXMLRPCTransaction").post(request);
+        // Set the timer
+        F32 timeout(10);
+        watchdog.eventAfter(timeout, LLSD().insert("timeout", 0));
+        // and pump "mainloop" until we get something, whether from
+        // LLXMLRPCListener or from the watchdog filter.
+        LLTimer timer;
+        F32 start = timer.getElapsedTimeF32();
+        LLEventPump& mainloop(pumps.obtain("mainloop"));
+        while (reply.isUndefined())
+        {
+            mainloop.post(LLSD());
+        }
+        ensure("timeout works", (timer.getElapsedTimeF32() - start) < (timeout + 1));
+        ensure_equals(reply["status"].asString(), "BadType");
+        ensure_contains("bad type", reply["responses"]["nested_dict"].asString(), "bad XMLRPC type");
+    }
+} // namespace tut
+
+/*****************************************************************************
+*   Resolve link errors: use real machinery here, since we intend to exchange
+*   actual XML with a peer process.
+*****************************************************************************/
+// Including llxmlrpctransaction.cpp drags in the static LLXMLRPCListener
+// instantiated there. That's why it works to post requests to the LLEventPump
+// named "LLXMLRPCTransaction".
+#include "../llxmlrpctransaction.cpp"
+#include "llcontrol.cpp"
+#include "llxmltree.cpp"
+#include "llxmlparser.cpp"
diff --git a/indra/newview/tests/test_llxmlrpc_peer.py b/indra/newview/tests/test_llxmlrpc_peer.py
new file mode 100644
index 0000000000..cb8f7d26c4
--- /dev/null
+++ b/indra/newview/tests/test_llxmlrpc_peer.py
@@ -0,0 +1,59 @@
+#!/usr/bin/python
+"""\
+@file   test_llxmlrpc_peer.py
+@author Nat Goodspeed
+@date   2008-10-09
+@brief  This script asynchronously runs the executable (with args) specified on
+        the command line, returning its result code. While that executable is
+        running, we provide dummy local services for use by C++ tests.
+
+$LicenseInfo:firstyear=2008&license=viewergpl$
+Copyright (c) 2008, Linden Research, Inc.
+$/LicenseInfo$
+"""
+
+import os
+import sys
+from threading import Thread
+from SimpleXMLRPCServer import SimpleXMLRPCServer
+
+mydir = os.path.dirname(__file__)       # expected to be .../indra/newview/tests/
+sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python"))
+sys.path.insert(1, os.path.join(mydir, os.pardir, os.pardir, "llmessage", "tests"))
+from testrunner import run, debug
+
+class TestServer(SimpleXMLRPCServer):
+    def _dispatch(self, method, params):
+        try:
+            func = getattr(self, method)
+        except AttributeError:
+            raise Exception('method "%s" is not supported' % method)
+        else:
+            # LLXMLRPCListener constructs XMLRPC parameters that arrive as a
+            # 1-tuple containing a dict.
+            return func(**(params[0]))
+
+    def hello(self, who):
+        # LLXMLRPCListener expects a dict return.
+        return {"hi_there": "Hello, %s!" % who}
+
+    def getdict(self):
+        return dict(nested_dict=dict(a=17, b=5))
+
+    def log_request(self, code, size=None):
+        # For present purposes, we don't want the request splattered onto
+        # stderr, as it would upset devs watching the test run
+        pass
+
+    def log_error(self, format, *args):
+        # Suppress error output as well
+        pass
+
+class ServerRunner(Thread):
+    def run(self):
+        server = TestServer(('127.0.0.1', 8000))
+        debug("Starting XMLRPC server...\n")
+        server.serve_forever()
+
+if __name__ == "__main__":
+    sys.exit(run(server=ServerRunner(name="xmlrpc"), *sys.argv[1:]))
diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp
index e401f89b22..31130c3c79 100644
--- a/indra/test/llevents_tut.cpp
+++ b/indra/test/llevents_tut.cpp
@@ -32,96 +32,10 @@
 // other Linden headers
 #include "lltut.h"
 #include "stringize.h"
+#include "tests/listener.h"
 
 using boost::assign::list_of;
 
-/*****************************************************************************
-*   test listener class
-*****************************************************************************/
-class Listener;
-std::ostream& operator<<(std::ostream&, const Listener&);
-
-class Listener
-{
-public:
-    Listener(const std::string& name):
-        mName(name)
-    {
-//      std::cout << *this << ": ctor\n";
-    }
-    Listener(const Listener& that):
-        mName(that.mName),
-        mLastEvent(that.mLastEvent)
-    {
-//      std::cout << *this << ": copy\n";
-    }
-    virtual ~Listener()
-    {
-//      std::cout << *this << ": dtor\n";
-    }
-    std::string getName() const { return mName; }
-    bool call(const LLSD& event)
-    {
-//      std::cout << *this << "::call(" << event << ")\n";
-        mLastEvent = event;
-        return false;
-    }
-    bool callstop(const LLSD& event)
-    {
-//      std::cout << *this << "::callstop(" << event << ")\n";
-        mLastEvent = event;
-        return true;
-    }
-    LLSD getLastEvent() const
-    {
-//      std::cout << *this << "::getLastEvent() -> " << mLastEvent << "\n";
-        return mLastEvent;
-    }
-    void reset(const LLSD& to = LLSD())
-    {
-//      std::cout << *this << "::reset(" << to << ")\n";
-        mLastEvent = to;
-    }
-
-private:
-    std::string mName;
-    LLSD mLastEvent;
-};
-
-std::ostream& operator<<(std::ostream& out, const Listener& listener)
-{
-    out << "Listener(" << listener.getName() /* << "@" << &listener */ << ')';
-    return out;
-}
-
-struct Collect
-{
-    bool add(const std::string& bound, const LLSD& event)
-    {
-        result.push_back(bound);
-        return false;
-    }
-    void clear() { result.clear(); }
-    typedef std::vector<std::string> StringList;
-    StringList result;
-};
-
-std::ostream& operator<<(std::ostream& out, const Collect::StringList& strings)
-{
-    out << '(';
-    Collect::StringList::const_iterator begin(strings.begin()), end(strings.end());
-    if (begin != end)
-    {
-        out << '"' << *begin << '"';
-        while (++begin != end)
-        {
-            out << ", \"" << *begin << '"';
-        }
-    }
-    out << ')';
-    return out;
-}
-
 template<typename T>
 T make(const T& value) { return value; }
 
@@ -174,14 +88,7 @@ namespace tut
         // default combiner is defined to return the value returned by the
         // last listener, which is meaningless if there were no listeners.
         per_frame.post(0);
-        // NOTE: boost::bind() saves its arguments by VALUE! If you pass an
-        // object instance rather than a pointer, you'll end up binding to an
-        // internal copy of that instance! Use boost::ref() to capture a
-        // reference instead.
-        LLBoundListener connection = per_frame.listen(listener0.getName(),
-                                                      boost::bind(&Listener::call,
-                                                                  boost::ref(listener0),
-                                                                  _1));
+        LLBoundListener connection = listener0.listenTo(per_frame);
         ensure("connected", connection.connected());
         ensure("not blocked", ! connection.blocked());
         per_frame.post(1);
@@ -207,6 +114,10 @@ namespace tut
         bool threw = false;
         try
         {
+            // NOTE: boost::bind() saves its arguments by VALUE! If you pass
+            // an object instance rather than a pointer, you'll end up binding
+            // to an internal copy of that instance! Use boost::ref() to
+            // capture a reference instead.
             per_frame.listen(listener0.getName(), // note bug, dup name
                              boost::bind(&Listener::call, boost::ref(listener1), _1));
         }
@@ -221,8 +132,7 @@ namespace tut
         }
         ensure("threw DupListenerName", threw);
         // do it right this time
-        per_frame.listen(listener1.getName(),
-                         boost::bind(&Listener::call, boost::ref(listener1), _1));
+        listener1.listenTo(per_frame);
         per_frame.post(5);
         check_listener("got", listener0, 5);
         check_listener("got", listener1, 5);
@@ -252,16 +162,10 @@ namespace tut
         LLEventPump& per_frame(pumps.obtain("per-frame"));
         listener0.reset(0);
         listener1.reset(0);
-        LLBoundListener bound0 = per_frame.listen(listener0.getName(),
-                                                  boost::bind(&Listener::callstop,
-                                                              boost::ref(listener0),
-                                                              _1));
-        LLBoundListener bound1 = per_frame.listen(listener1.getName(),
-                                                  boost::bind(&Listener::call,
-                                                              boost::ref(listener1),
-                                                              _1),
-                                                  // after listener0
-                                                  make<LLEventPump::NameList>(list_of(listener0.getName())));
+        LLBoundListener bound0 = listener0.listenTo(per_frame, &Listener::callstop);
+        LLBoundListener bound1 = listener1.listenTo(per_frame, &Listener::call,
+                                                    // after listener0
+                                                    make<LLEventPump::NameList>(list_of(listener0.getName())));
         ensure("enabled", per_frame.enabled());
         ensure("connected 0", bound0.connected());
         ensure("unblocked 0", ! bound0.blocked());
@@ -301,7 +205,7 @@ namespace tut
         // LLEventQueue.
         LLEventPump& mainloop(pumps.obtain("mainloop"));
         ensure("LLEventQueue leaf class", dynamic_cast<LLEventQueue*>(&login));
-        login.listen(listener0.getName(), boost::bind(&Listener::call, boost::ref(listener0), _1));
+        listener0.listenTo(login);
         listener0.reset(0);
         login.post(1);
         check_listener("waiting for queued event", listener0, 0);
@@ -354,11 +258,10 @@ namespace tut
     {
         set_test_name("stopListening()");
         LLEventPump& login(pumps.obtain("login"));
-        login.listen(listener0.getName(), boost::bind(&Listener::call, boost::ref(listener0), _1));
+        listener0.listenTo(login);
         login.stopListening(listener0.getName());
         // should not throw because stopListening() should have removed name
-        login.listen(listener0.getName(),
-                     boost::bind(&Listener::callstop, boost::ref(listener0), _1));
+        listener0.listenTo(login, &Listener::callstop);
         LLBoundListener wrong = login.getListener("bogus");
         ensure("bogus connection disconnected", ! wrong.connected());
         ensure("bogus connection blocked", wrong.blocked());
@@ -378,10 +281,8 @@ namespace tut
                         boost::bind(&LLEventPump::post, boost::ref(filter0), _1));
         upstream.listen(filter1.getName(),
                         boost::bind(&LLEventPump::post, boost::ref(filter1), _1));
-        filter0.listen(listener0.getName(),
-                       boost::bind(&Listener::call, boost::ref(listener0), _1));
-        filter1.listen(listener1.getName(),
-                       boost::bind(&Listener::call, boost::ref(listener1), _1));
+        listener0.listenTo(filter0);
+        listener1.listenTo(filter1);
         listener0.reset(0);
         listener1.reset(0);
         upstream.post(1);
@@ -536,7 +437,7 @@ namespace tut
         // Passing a string LLEventPump name to LLListenerOrPumpName
         listener0.reset(0);
         LLEventStream random("random");
-        random.listen(listener0.getName(), boost::bind(&Listener::call, boost::ref(listener0), _1));
+        listener0.listenTo(random);
         eventSource("random");
         check_listener("got by pump name", listener0, 17);
         bool threw = false;
diff --git a/indra/test/llsdutil_tut.cpp b/indra/test/llsdutil_tut.cpp
index 0c4bbc2e62..093a29652c 100644
--- a/indra/test/llsdutil_tut.cpp
+++ b/indra/test/llsdutil_tut.cpp
@@ -44,12 +44,40 @@
 #include "v4math.h"
 #include "llquaternion.h"
 #include "llsdutil.h"
-
+#include <set>
+#include <boost/range.hpp>
 
 namespace tut
 {
 	struct llsdutil_data
 	{
+        void test_matches(const std::string& proto_key, const LLSD& possibles,
+                          const char** begin, const char** end)
+        {
+            std::set<std::string> succeed(begin, end);
+            LLSD prototype(possibles[proto_key]);
+            for (LLSD::map_const_iterator pi(possibles.beginMap()), pend(possibles.endMap());
+                 pi != pend; ++pi)
+            {
+                std::string match(llsd_matches(prototype, pi->second));
+                std::set<std::string>::const_iterator found = succeed.find(pi->first);
+                if (found != succeed.end())
+                {
+                    // This test is supposed to succeed. Comparing to the
+                    // empty string ensures that if the test fails, it will
+                    // display the string received so we can tell what failed.
+                    ensure_equals("match", match, "");
+                }
+                else
+                {
+                    // This test is supposed to fail. If we get a false match,
+                    // the string 'match' will be empty, which doesn't tell us
+                    // much about which case went awry. So construct a more
+                    // detailed description string.
+                    ensure(proto_key + " shouldn't match " + pi->first, ! match.empty());
+                }
+            }
+        }
 	};
 	typedef test_group<llsdutil_data> llsdutil_test;;
 	typedef llsdutil_test::object llsdutil_object;
@@ -159,4 +187,154 @@ namespace tut
 		LLSD sd1 = ll_sd_from_color4(c1);
 		ensure_equals("sd -> LLColor4 -> sd", sd, sd1);
 	}
+
+    template<> template<>
+    void llsdutil_object::test<9>()
+    {
+        set_test_name("llsd_matches");
+
+        // for this test, construct a map of all possible LLSD types
+        LLSD map;
+        map.insert("empty",     LLSD());
+        map.insert("Boolean",   LLSD::Boolean());
+        map.insert("Integer",   LLSD::Integer(0));
+        map.insert("Real",      LLSD::Real(0.0));
+        map.insert("String",    LLSD::String("bah"));
+        map.insert("NumString", LLSD::String("1"));
+        map.insert("UUID",      LLSD::UUID());
+        map.insert("Date",      LLSD::Date());
+        map.insert("URI",       LLSD::URI());
+        map.insert("Binary",    LLSD::Binary());
+        map.insert("Map",       LLSD().insert("foo", LLSD()));
+        // array can't be constructed on the fly
+        LLSD array;
+        array.append(LLSD());
+        map.insert("Array",     array);
+
+        // These iterators are declared outside our various for loops to avoid
+        // fatal MSVC warning: "I used to be broken, but I'm all better now!"
+        LLSD::map_const_iterator mi(map.beginMap()), mend(map.endMap());
+
+        // empty prototype matches anything
+        for (mi = map.beginMap(); mi != mend; ++mi)
+        {
+            ensure_equals(std::string("empty matches ") + mi->first, llsd_matches(LLSD(), mi->second), "");
+        }
+
+        LLSD proto_array, data_array;
+        for (int i = 0; i < 3; ++i)
+        {
+            proto_array.append(LLSD());
+            data_array.append(LLSD());
+        }
+
+        // prototype array matches only array
+        for (mi = map.beginMap(); mi != mend; ++mi)
+        {
+            ensure(std::string("array doesn't match ") + mi->first,
+                   ! llsd_matches(proto_array, mi->second).empty());
+        }
+
+        // data array must be at least as long as prototype array
+        proto_array.append(LLSD());
+        ensure_equals("data array too short", llsd_matches(proto_array, data_array),
+                      "Array size 4 required instead of Array size 3");
+        data_array.append(LLSD());
+        ensure_equals("data array just right", llsd_matches(proto_array, data_array), "");
+        data_array.append(LLSD());
+        ensure_equals("data array longer", llsd_matches(proto_array, data_array), "");
+
+        // array element matching
+        data_array[0] = LLSD::String();
+        ensure_equals("undefined prototype array entry", llsd_matches(proto_array, data_array), "");
+        proto_array[0] = LLSD::Binary();
+        ensure_equals("scalar prototype array entry", llsd_matches(proto_array, data_array),
+                      "[0]: Binary required instead of String");
+        data_array[0] = LLSD::Binary();
+        ensure_equals("matching prototype array entry", llsd_matches(proto_array, data_array), "");
+
+        // build a coupla maps
+        LLSD proto_map, data_map;
+        data_map["got"] = LLSD();
+        data_map["found"] = LLSD();
+        for (LLSD::map_const_iterator dmi(data_map.beginMap()), dmend(data_map.endMap());
+             dmi != dmend; ++dmi)
+        {
+            proto_map[dmi->first] = dmi->second;
+        }
+        proto_map["foo"] = LLSD();
+        proto_map["bar"] = LLSD();
+
+        // prototype map matches only map
+        for (mi = map.beginMap(); mi != mend; ++mi)
+        {
+            ensure(std::string("map doesn't match ") + mi->first,
+                   ! llsd_matches(proto_map, mi->second).empty());
+        }
+
+        // data map must contain all keys in prototype map
+        std::string error(llsd_matches(proto_map, data_map));
+        ensure_contains("missing keys", error, "missing keys");
+        ensure_contains("missing foo", error, "foo");
+        ensure_contains("missing bar", error, "bar");
+        ensure_does_not_contain("found found", error, "found");
+        ensure_does_not_contain("got got", error, "got");
+        data_map["bar"] = LLSD();
+        error = llsd_matches(proto_map, data_map);
+        ensure_contains("missing foo", error, "foo");
+        ensure_does_not_contain("got bar", error, "bar");
+        data_map["foo"] = LLSD();
+        ensure_equals("data map just right", llsd_matches(proto_map, data_map), "");
+        data_map["extra"] = LLSD();
+        ensure_equals("data map with extra", llsd_matches(proto_map, data_map), "");
+
+        // map element matching
+        data_map["foo"] = LLSD::String();
+        ensure_equals("undefined prototype map entry", llsd_matches(proto_map, data_map), "");
+        proto_map["foo"] = LLSD::Binary();
+        ensure_equals("scalar prototype map entry", llsd_matches(proto_map, data_map),
+                      "['foo']: Binary required instead of String");
+        data_map["foo"] = LLSD::Binary();
+        ensure_equals("matching prototype map entry", llsd_matches(proto_map, data_map), "");
+
+        // String
+        {
+            static const char* matches[] = { "String", "NumString", "Boolean", "Integer",
+                                             "Real", "UUID", "Date", "URI" };
+            test_matches("String", map, boost::begin(matches), boost::end(matches));
+        }
+
+        // Boolean, Integer, Real
+        static const char* numerics[] = { "Boolean", "Integer", "Real" };
+        for (const char **ni = boost::begin(numerics), **nend = boost::end(numerics);
+             ni != nend; ++ni)
+        {
+            static const char* matches[] = { "Boolean", "Integer", "Real", "String", "NumString" };
+            test_matches(*ni, map, boost::begin(matches), boost::end(matches));
+        }
+
+        // UUID
+        {
+            static const char* matches[] = { "UUID", "String", "NumString" };
+            test_matches("UUID", map, boost::begin(matches), boost::end(matches));
+        }
+
+        // Date
+        {
+            static const char* matches[] = { "Date", "String", "NumString" };
+            test_matches("Date", map, boost::begin(matches), boost::end(matches));
+        }
+
+        // URI
+        {
+            static const char* matches[] = { "URI", "String", "NumString" };
+            test_matches("URI", map, boost::begin(matches), boost::end(matches));
+        }
+
+        // Binary
+        {
+            static const char* matches[] = { "Binary" };
+            test_matches("Binary", map, boost::begin(matches), boost::end(matches));
+        }
+    }
 }
diff --git a/indra/test/lltut.cpp b/indra/test/lltut.cpp
index 201e174f9c..e4e0de1ff1 100644
--- a/indra/test/lltut.cpp
+++ b/indra/test/lltut.cpp
@@ -76,9 +76,13 @@ namespace tut
 
 	void ensure_equals(const char* m, const LLSD& actual,
 		const LLSD& expected)
+    {
+        ensure_equals(std::string(m), actual, expected);
+    }
+
+	void ensure_equals(const std::string& msg, const LLSD& actual,
+		const LLSD& expected)
 	{
-		const std::string& msg = m ? m : "";
-		
 		ensure_equals(msg + " type", actual.type(), expected.type());
 		switch (actual.type())
 		{
@@ -128,7 +132,7 @@ namespace tut
 				{
 					ensure_equals(msg + " map keys", 
 						actual_iter->first, expected_iter->first);
-					ensure_equals((msg + "[" + actual_iter->first + "]").c_str(),
+					ensure_equals(msg + "[" + actual_iter->first + "]",
 						actual_iter->second, expected_iter->second);
 					++actual_iter;
 					++expected_iter;
@@ -141,7 +145,7 @@ namespace tut
 				
 				for(int i = 0; i < actual.size(); ++i)
 				{
-					ensure_equals((msg + llformat("[%d]", i)).c_str(),
+					ensure_equals(msg + llformat("[%d]", i),
 						actual[i], expected[i]);
 				}
 				return;
diff --git a/indra/test/lltut.h b/indra/test/lltut.h
index 47ea9d3f9e..ba3791cbd4 100644
--- a/indra/test/lltut.h
+++ b/indra/test/lltut.h
@@ -121,6 +121,9 @@ namespace tut
 
 	void ensure_equals(const char* msg,
 		const LLSD& actual, const LLSD& expected);
+
+	void ensure_equals(const std::string& msg,
+		const LLSD& actual, const LLSD& expected);
 	
 	void ensure_starts_with(const std::string& msg,
 		const std::string& actual, const std::string& expectedStart);
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index ba81c6e49e..0ba5758e15 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -64,13 +64,14 @@ namespace tut
 class LLTestCallback : public tut::callback
 {
 public:
-	LLTestCallback(bool verbose_mode, std::ostream *stream) :
+	LLTestCallback(bool verbose_mode, std::ostream *stream, bool wait) :
 		mVerboseMode(verbose_mode),
 		mTotalTests(0),
 		mPassedTests(0),
 		mFailedTests(0),
 		mSkippedTests(0),
-		mStream(stream)
+		mStream(stream),
+        mWaitAtExit(wait)
 	{
 	}
 
@@ -137,6 +138,11 @@ public:
 		}
 		run_completed_(std::cout);
 
+        if(mWaitAtExit) {
+            std::cerr << "Waiting for input before exiting..." << std::endl;
+	        std::cin.get();
+        }
+
 		if (mFailedTests > 0)
 		{
 			exit(1);
@@ -176,6 +182,7 @@ protected:
 	int mFailedTests;
 	int mSkippedTests;
 	std::ostream *mStream;
+    bool mWaitAtExit;
 };
 
 static const apr_getopt_option_t TEST_CL_OPTIONS[] =
@@ -328,7 +335,7 @@ int main(int argc, char **argv)
 	}
 
 	// run the tests
-	LLTestCallback callback(verbose_mode, output);
+	LLTestCallback callback(verbose_mode, output, wait_at_exit);
 	tut::runner.get().set_callback(&callback);
 	
 	if(test_group.empty())
@@ -339,12 +346,6 @@ int main(int argc, char **argv)
 	{
 		tut::runner.get().run_tests(test_group);
 	}
-
-	if (wait_at_exit)
-	{
-		std::cerr << "Waiting for input before exiting..." << std::endl;
-		std::cin.get();
-	}
 	
 	if (output)
 	{
diff --git a/indra/viewer_components/CMakeLists.txt b/indra/viewer_components/CMakeLists.txt
new file mode 100644
index 0000000000..d5eea0d0b0
--- /dev/null
+++ b/indra/viewer_components/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(login)
diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt
new file mode 100644
index 0000000000..434b58f5c7
--- /dev/null
+++ b/indra/viewer_components/login/CMakeLists.txt
@@ -0,0 +1,43 @@
+project(login)
+
+include(00-Common)
+include(LLCommon)
+include(LLMath)
+include(LLXML)
+include(Pth)
+
+include_directories(
+    ${LLCOMMON_INCLUDE_DIRS}
+    ${LLMATH_INCLUDE_DIRS}
+    ${LLXML_INCLUDE_DIRS}
+    ${PTH_INCLUDE_DIRS}
+    )
+
+set(login_SOURCE_FILES
+    lllogin.cpp
+    )
+
+set(login_HEADER_FILES
+    lllogin.h
+    )
+
+set_source_files_properties(${login_HEADER_FILES}
+                            PROPERTIES HEADER_FILE_ONLY TRUE)
+
+list(APPEND 
+    login_SOURCE_FILES 
+    ${login_HEADER_FILES} 
+    )
+
+add_library(lllogin 
+            ${login_SOURCE_FILES}
+            )
+
+target_link_libraries(lllogin
+    ${LLCOMMON_LIBRARIES}
+    ${LLMATH_LIBRARIES}
+    ${LLXML_LIBRARIES}
+    ${PTH_LIBRARIES}
+    )
+
+ADD_BUILD_TEST(lllogin lllogin "")
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
new file mode 100644
index 0000000000..7f2b27e64c
--- /dev/null
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -0,0 +1,383 @@
+/** 
+ * @file lllogin.cpp
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include <boost/coroutine/coroutine.hpp>
+#include "linden_common.h"
+#include "llsd.h"
+#include "llsdutil.h"
+
+/*==========================================================================*|
+#ifdef LL_WINDOWS
+	// non-virtual destructor warning, boost::statechart does this intentionally.
+	#pragma warning (disable : 4265) 
+#endif
+|*==========================================================================*/
+
+#include "lllogin.h"
+
+#include <boost/bind.hpp>
+#include <boost/scoped_ptr.hpp>
+
+#include "llevents.h"
+#include "lleventfilter.h"
+#include "lleventcoro.h"
+
+//*********************
+// LLLogin
+// *NOTE:Mani - Is this Impl needed now that the state machine runs the show?
+class LLLogin::Impl
+{
+public:
+    Impl():
+		mPump("login", true) // Create the module's event pump with a tweaked (unique) name.
+    {
+        mValidAuthResponse["status"]        = LLSD();
+        mValidAuthResponse["errorcode"]     = LLSD();
+        mValidAuthResponse["error"]         = LLSD();
+        mValidAuthResponse["transfer_rate"] = LLSD();
+    }
+
+    void connect(const std::string& uri, const LLSD& credentials);
+    void disconnect();
+	LLEventPump& getEventPump() { return mPump; }
+
+private:
+	void sendProgressEvent(const std::string& desc, const LLSD& data = LLSD::emptyMap())
+	{
+		LLSD status_data;
+		status_data["state"] = desc;
+		status_data["progress"] = 0.0f;
+
+		if(mAuthResponse.has("transfer_rate"))
+		{
+			status_data["transfer_rate"] = mAuthResponse["transfer_rate"];
+		}
+
+		if(data.size() != 0)
+		{
+			status_data["data"] = data;
+		}
+
+		mPump.post(status_data);
+	}
+
+    LLSD validateResponse(const std::string& pumpName, const LLSD& response)
+    {
+        // Validate the response. If we don't recognize it, things
+        // could get ugly.
+        std::string mismatch(llsd_matches(mValidAuthResponse, response));
+        if (! mismatch.empty())
+        {
+            LL_ERRS("LLLogin") << "Received unrecognized event (" << mismatch << ") on "
+                               << pumpName << "pump: " << response
+                               << LL_ENDL;
+            return LLSD();
+        }
+
+        return response;
+    }
+
+    typedef boost::coroutines::coroutine<void(const std::string&, const LLSD&)> coroutine_type;
+
+    void login_(coroutine_type::self& self, const std::string& uri, const LLSD& credentials);
+
+    boost::scoped_ptr<coroutine_type> mCoro;
+    LLEventStream mPump;
+	LLSD mAuthResponse, mValidAuthResponse;
+};
+
+void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials)
+{
+    // If there's a previous coroutine instance, and that instance is still
+    // active, destroying the instance will terminate the coroutine by
+    // throwing an exception, thus unwinding the stack and destroying all
+    // local objects. It should (!) all Just Work. Nonetheless, it would be
+    // strange, so make a note of it.
+    if (mCoro && *mCoro)
+    {
+        LL_WARNS("LLLogin") << "Previous login attempt interrupted by new request" << LL_ENDL;
+    }
+
+    // Construct a coroutine that will run our login_() method; placeholders
+    // forward the params from the (*mCoro)(etc.) call below. Using scoped_ptr
+    // ensures that if mCoro was already pointing to a previous instance, that
+    // old instance will be destroyed as noted above.
+    mCoro.reset(new coroutine_type(boost::bind(&Impl::login_, this, _1, _2, _3)));
+    // Run the coroutine until its first wait; at that point, return here.
+    (*mCoro)(std::nothrow, uri, credentials);
+    std::cout << "Here I am\n";
+}
+
+void LLLogin::Impl::login_(coroutine_type::self& self,
+                           const std::string& uri, const LLSD& credentials)
+{
+    // Mimicking previous behavior, every time the OldSchoolLogin state
+    // machine arrived in the Offline state, it would send a progress
+    // announcement.
+    sendProgressEvent("offline", mAuthResponse["responses"]);
+    // Arriving in SRVRequest state
+    LLEventStream replyPump("reply", true);
+    // Should be an array of one or more uri strings.
+    LLSD rewrittenURIs;
+    {
+        LLEventTimeout filter(replyPump);
+        sendProgressEvent("srvrequest");
+
+        // Request SRV record.
+        LL_INFOS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL;
+
+        // *NOTE:Mani - Completely arbitrary timeout value for SRV request.
+        filter.errorAfter(5, "SRV Request timed out!");
+
+        // Make request
+        LLSD request;
+        request["op"] = "rewriteURI";
+        request["uri"] = uri;
+        request["reply"] = replyPump.getName();
+        rewrittenURIs = postAndWait(self, request, "LLAres", filter);
+    } // we no longer need the filter
+
+    LLEventPump& xmlrpcPump(LLEventPumps::instance().obtain("LLXMLRPCTransaction"));
+
+    // Loop through the rewrittenURIs, counting attempts along the way.
+    // Because of possible redirect responses, we may make more than one
+    // attempt per rewrittenURIs entry.
+    LLSD::Integer attempts = 0;
+    for (LLSD::array_const_iterator urit(rewrittenURIs.beginArray()),
+             urend(rewrittenURIs.endArray());
+         urit != urend; ++urit)
+    {
+        LLSD request(credentials);
+        request["reply"] = replyPump.getName();
+        request["uri"] = *urit;
+        std::string status;
+
+        // Loop back to here if login attempt redirects to a different
+        // request["uri"]
+        for (;;)
+        {
+            ++attempts;
+            LLSD progress_data;
+            progress_data["attempt"] = attempts;
+            progress_data["request"] = request;
+            sendProgressEvent("authenticating", progress_data);
+
+            // We expect zero or more "Downloading" status events, followed by
+            // exactly one event with some other status. Use postAndWait() the
+            // first time, because -- at least in unit-test land -- it's
+            // possible for the reply to arrive before the post() call
+            // returns. Subsequent responses, of course, must be awaited
+            // without posting again.
+            for (mAuthResponse = validateResponse(replyPump.getName(),
+                                     postAndWait(self, request, xmlrpcPump, replyPump, "reply"));
+                 mAuthResponse["status"].asString() == "Downloading";
+                 mAuthResponse = validateResponse(replyPump.getName(),
+                                     waitForEventOn(self, replyPump)))
+            {
+                // Still Downloading -- send progress update.
+                sendProgressEvent("downloading");
+            }
+            status = mAuthResponse["status"].asString();
+
+            // Okay, we've received our final status event for this
+            // request. Unless we got a redirect response, break the retry
+            // loop for the current rewrittenURIs entry.
+            if (! (status == "Complete" &&
+                   mAuthResponse["responses"]["login"].asString() == "indeterminate"))
+            {
+                break;
+            }
+
+            // Here the login service at the current URI is redirecting us
+            // to some other URI ("indeterminate" -- why not "redirect"?).
+            // The response should contain another uri to try, with its
+            // own auth method.
+            request["uri"] = mAuthResponse["next_url"];
+            request["method"] = mAuthResponse["next_method"];
+        } // loop back to try the redirected URI
+
+        // Here we're done with redirects for the current rewrittenURIs
+        // entry.
+        if (status == "Complete")
+        {
+            // StatusComplete does not imply auth success. Check the
+            // actual outcome of the request. We've already handled the
+            // "indeterminate" case in the loop above.
+            sendProgressEvent((mAuthResponse["responses"]["login"].asString() == "true")?
+                              "online" : "offline",
+                              mAuthResponse["responses"]);
+            return;             // Done!
+        }
+        // If we don't recognize status at all, trouble
+        if (! (status == "CURLError"
+               || status == "XMLRPCError"
+               || status == "OtherError"))
+        {
+            LL_ERRS("LLLogin") << "Unexpected status from " << xmlrpcPump.getName() << " pump: "
+                               << mAuthResponse << LL_ENDL;
+            return;
+        }
+
+        // Here status IS one of the errors tested above.
+    } // Retry if there are any more rewrittenURIs.
+
+    // Here we got through all the rewrittenURIs without succeeding. Tell
+    // caller this didn't work out so well. Of course, the only failure data
+    // we can reasonably show are from the last of the rewrittenURIs.
+    sendProgressEvent("offline", mAuthResponse["responses"]);
+}
+
+void LLLogin::Impl::disconnect()
+{
+    sendProgressEvent("offline", mAuthResponse["responses"]);
+}
+
+//*********************
+// LLLogin
+LLLogin::LLLogin() :
+	mImpl(new LLLogin::Impl())
+{
+}
+
+LLLogin::~LLLogin()
+{
+}
+
+void LLLogin::connect(const std::string& uri, const LLSD& credentials)
+{
+	mImpl->connect(uri, credentials);
+}
+
+
+void LLLogin::disconnect()
+{
+	mImpl->disconnect();
+}
+
+LLEventPump& LLLogin::getEventPump()
+{
+	return mImpl->getEventPump();
+}
+
+// The following is the list of important functions that happen in the 
+// current login process that we want to move to this login module.
+
+// The list associates to event with the original idle_startup() 'STATE'.
+
+// Rewrite URIs
+ // State_LOGIN_AUTH_INIT
+// Given a vector of login uris (usually just one), perform a dns lookup for the 
+// SRV record from each URI. I think this is used to distribute login requests to 
+// a single URI to multiple hosts.
+// This is currently a synchronous action. (See LLSRV::rewriteURI() implementation)
+// On dns lookup error the output uris == the input uris.
+//
+// Input: A vector of login uris
+// Output: A vector of login uris
+//
+// Code:
+// std::vector<std::string> uris;
+// LLViewerLogin::getInstance()->getLoginURIs(uris);
+// std::vector<std::string>::const_iterator iter, end;
+// for (iter = uris.begin(), end = uris.end(); iter != end; ++iter)
+// {
+//	std::vector<std::string> rewritten;
+//	rewritten = LLSRV::rewriteURI(*iter);
+//	sAuthUris.insert(sAuthUris.end(),
+//					 rewritten.begin(), rewritten.end());
+// }
+// sAuthUriNum = 0;
+
+// Authenticate 
+// STATE_LOGIN_AUTHENTICATE
+// Connect to the login server, presumably login.cgi, requesting the login 
+// and a slew of related initial connection information.
+// This is an asynch action. The final response, whether success or error
+// is handled by STATE_LOGIN_PROCESS_REPONSE.
+// There is no immediate error or output from this call.
+// 
+// Input: 
+//  URI
+//  Credentials (first, last, password)
+//  Start location
+//  Bool Flags:
+//    skip optional update
+//    accept terms of service
+//    accept critical message
+//  Last exec event. (crash state of previous session)
+//  requested optional data (inventory skel, initial outfit, etc.)
+//  local mac address
+//  viewer serial no. (md5 checksum?)
+
+//sAuthUriNum = llclamp(sAuthUriNum, 0, (S32)sAuthUris.size()-1);
+//LLUserAuth::getInstance()->authenticate(
+//	sAuthUris[sAuthUriNum],
+//	auth_method,
+//	firstname,
+//	lastname,			
+//	password, // web_login_key,
+//	start.str(),
+//	gSkipOptionalUpdate,
+//	gAcceptTOS,
+//	gAcceptCriticalMessage,
+//	gLastExecEvent,
+//	requested_options,
+//	hashed_mac_string,
+//	LLAppViewer::instance()->getSerialNumber());
+
+//
+// Download the Response
+// STATE_LOGIN_NO_REPONSE_YET and STATE_LOGIN_DOWNLOADING
+// I had assumed that this was default behavior of the message system. However...
+// During login, the message system is checked only by these two states in idle_startup().
+// I guess this avoids the overhead of checking network messages for those login states
+// that don't need to do so, but geez!
+// There are two states to do this one function just to update the login
+// status text from 'Logging In...' to 'Downloading...'
+// 
+
+//
+// Handle Login Response
+// STATE_LOGIN_PROCESS_RESPONSE
+// 
+// This state handle the result of the request to login. There is a metric ton of
+// code in this case. This state will transition to:
+// STATE_WORLD_INIT, on success.
+// STATE_AUTHENTICATE, on failure.
+// STATE_UPDATE_CHECK, to handle user during login interaction like TOS display.
+//
+// Much of the code in this case belongs on the viewer side of the fence and not in login. 
+// Login should probably return with a couple of events, success and failure.
+// Failure conditions can be specified in the events data pacet to allow the viewer 
+// to re-engauge login as is appropriate. (Or should there be multiple failure messages?)
+// Success is returned with the data requested from the login. According to OGP specs 
+// there may be intermediate steps before reaching this result in future login 
+// implementations.
diff --git a/indra/viewer_components/login/lllogin.h b/indra/viewer_components/login/lllogin.h
new file mode 100644
index 0000000000..0598b4e457
--- /dev/null
+++ b/indra/viewer_components/login/lllogin.h
@@ -0,0 +1,133 @@
+/** 
+ * @file lllogin.h
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLLOGIN_H
+#define LL_LLLOGIN_H
+
+#include <boost/scoped_ptr.hpp>
+
+class LLSD;
+class LLEventPump;
+
+/**
+ * @class LLLogin
+ * @brief Class to encapsulate the action and state of grid login.
+ */
+class LLLogin
+{
+public:
+	LLLogin();
+	~LLLogin();
+
+	/** 
+	 * Make a connection to a grid.
+	 * @param uri The 'well known and published' authentication URL.
+	 * @param credentials LLSD data that contians the credentials.
+	 * *NOTE:Mani The credential data can vary depending upon the authentication
+	 * method used. The current interface matches the values passed to
+	 * the XMLRPC login request.
+	 {
+		method			:	string, 
+		first			:	string,
+		last			:	string,
+		passwd			:	string,
+		start			:	string,
+		skipoptional	:	bool,
+		agree_to_tos	:	bool,
+		read_critical	:	bool,
+		last_exec_event	:	int,
+		version			:	string,
+		channel			:	string,
+		mac				:	string,
+		id0				:	string,
+		options			:   [ strings ]
+	 }
+	 
+	 */
+	void connect(const std::string& uri, const LLSD& credentials);
+	
+    /** 
+	 * Disconnect from a the current connection.
+	 */
+	void disconnect();
+
+    /** 
+	 * Retrieve the event pump from this login class.
+	 */
+	LLEventPump& getEventPump();
+
+	/*
+	Event API
+
+	LLLogin will issue multiple events to it pump to indicate the 
+	progression of states through login. The most important 
+	states are "offline" and "online" which indicate auth failure 
+	and auth success respectively.
+
+	pump: login (tweaked)
+	These are the events posted to the 'login' 
+	event pump from the login module.
+	{
+		state		:	string, // See below for the list of states.
+		progress	:   real // for progress bar.
+		data		:   LLSD // Dependent upon state.
+	}
+	
+	States for method 'login_to_simulator'
+	offline - set initially state and upon failure. data is the server response.
+	srvrequest - upon uri rewrite request. no data.
+	authenticating - upon auth request. data, 'attempt' number and 'request' llsd.
+	downloading - upon ack from auth server, before completion. no data
+	online - upon auth success. data is server response.
+
+
+	Dependencies:
+	pump: LLAres 
+	LLLogin makes a request for a SRV record from the uri provided by the connect method.
+	The following event pump should exist to service that request.
+	pump name: LLAres
+	request = {
+		op : "rewriteURI"
+		uri : string
+		reply : string
+
+	pump: LLXMLRPCListener
+	The request merely passes the credentials LLSD along, with one additional 
+	member, 'reply', which is the string name of the event pump to reply on. 
+	
+	*/
+
+private:
+	class Impl;
+	boost::scoped_ptr<Impl> mImpl;
+};
+
+#endif // LL_LLLOGIN_H
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
new file mode 100644
index 0000000000..07c9db1099
--- /dev/null
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -0,0 +1,382 @@
+/**
+ * @file   llviewerlogin_test.cpp
+ * @author Mark Palange
+ * @date   2009-02-26
+ * @brief  Tests of lllazy.h.
+ * 
+ * $LicenseInfo:firstyear=2009&license=internal$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "../lllogin.h"
+// STL headers
+// std headers
+#include <iostream>
+// external library headers
+// other Linden headers
+#include "llsd.h"
+#include "../../../test/lltut.h"
+#include "llevents.h"
+
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
+// This is a listener to receive results from lllogin.
+class LoginListener
+{
+	std::string mName;
+	LLSD mLastEvent;
+public:
+	LoginListener(const std::string& name) : 
+		mName(name)
+	{}
+
+	bool call(const LLSD& event)
+	{
+		std::cout << "LoginListener called!: " << event << std::endl;
+		mLastEvent = event;
+		return false;
+	}
+
+    LLBoundListener listenTo(LLEventPump& pump)
+    {
+        return pump.listen(mName, boost::bind(&LoginListener::call, this, _1));
+	}
+
+	const LLSD& lastEvent() { return mLastEvent; }
+};
+
+class LLAresListener
+{
+	std::string mName;
+	LLSD mEvent;
+	bool mImmediateResponse;
+	bool mMultipleURIResponse;
+	
+public:
+	LLAresListener(const std::string& name, 
+				   bool i = false,
+				   bool m = false
+				   ) : 
+		mName(name),
+		mImmediateResponse(i),
+		mMultipleURIResponse(m)
+	{}
+
+	bool handle_event(const LLSD& event)
+	{
+		std::cout << "LLAresListener called!: " << event << std::endl;
+		mEvent = event;
+		if(mImmediateResponse)
+		{
+			sendReply();
+		}
+		return false;
+	}
+
+	void sendReply()
+	{
+		if(mEvent["op"].asString() == "rewriteURI")
+		{
+			LLSD result;
+			if(mMultipleURIResponse)
+			{
+				result.append(LLSD("login.foo.com"));
+			}
+			result.append(mEvent["uri"]);
+			LLEventPumps::instance().obtain(mEvent["reply"]).post(result);
+		}
+	}
+
+	LLBoundListener listenTo(LLEventPump& pump)
+    {
+        return pump.listen(mName, boost::bind(&LLAresListener::handle_event, this, _1));
+	}
+};
+
+class LLXMLRPCListener
+{
+	std::string mName;
+	LLSD mEvent;
+	bool mImmediateResponse;
+	LLSD mResponse;
+
+public:
+	LLXMLRPCListener(const std::string& name, 
+					 bool i = false,
+					 const LLSD& response = LLSD()
+					 ) : 
+		mName(name),
+		mImmediateResponse(i),
+		mResponse(response)
+	{
+		if(mResponse.isUndefined())
+		{
+			mResponse["status"] = "Complete"; // StatusComplete
+			mResponse["errorcode"] = 0;
+			mResponse["error"] = "dummy response";
+			mResponse["transfer_rate"] = 0;
+			mResponse["responses"]["login"] = true;
+		}
+	}
+
+	void setResponse(const LLSD& r) 
+	{ 
+		mResponse = r; 
+	}
+
+	bool handle_event(const LLSD& event)
+	{
+		std::cout << "LLXMLRPCListener called!: " << event << std::endl;
+		mEvent = event;
+		if(mImmediateResponse)
+		{
+			sendReply();
+		}
+		return false;
+	}
+
+	void sendReply()
+	{
+		LLEventPumps::instance().obtain(mEvent["reply"]).post(mResponse);
+	}
+
+	LLBoundListener listenTo(LLEventPump& pump)
+    {
+        return pump.listen(mName, boost::bind(&LLXMLRPCListener::handle_event, this, _1));
+	}
+};
+
+namespace tut
+{
+    struct llviewerlogin_data
+    {
+		llviewerlogin_data() :
+            pumps(LLEventPumps::instance())
+		{}
+		LLEventPumps& pumps;
+	};
+
+    typedef test_group<llviewerlogin_data> llviewerlogin_group;
+    typedef llviewerlogin_group::object llviewerlogin_object;
+    llviewerlogin_group llviewerlogingrp("llviewerlogin");
+
+    template<> template<>
+    void llviewerlogin_object::test<1>()
+    {
+		// Testing login with immediate repsonses from Ares and XMLPRC
+		// The response from both requests will come before the post request exits.
+		// This tests an edge case of the login state handling.
+		LLEventStream llaresPump("LLAres"); // Dummy LLAres pump.
+		LLEventStream xmlrpcPump("LLXMLRPCTransaction"); // Dummy XMLRPC pump
+
+		bool respond_immediately = true;
+		// Have 'dummy ares' repsond immediately. 
+		LLAresListener dummyLLAres("dummy_llares", respond_immediately);
+		dummyLLAres.listenTo(llaresPump);
+
+		// Have dummy XMLRPC respond immediately.
+		LLXMLRPCListener dummyXMLRPC("dummy_xmlrpc", respond_immediately);
+		dummyXMLRPC.listenTo(xmlrpcPump);
+
+		LLLogin login;
+
+		LoginListener listener("test_ear");
+		listener.listenTo(login.getEventPump());
+
+		LLSD credentials;
+		credentials["first"] = "foo";
+		credentials["last"] = "bar";
+		credentials["passwd"] = "secret";
+
+		login.connect("login.bar.com", credentials);
+
+		ensure_equals("Online state", listener.lastEvent()["state"].asString(), "online");
+	}
+
+    template<> template<>
+    void llviewerlogin_object::test<2>()
+    {
+		// Tests a successful login in with delayed responses. 
+		// Also includes 'failure' that cause the login module
+		// To re-attempt connection, once from a basic failure
+		// and once from the 'indeterminate' response.
+
+		set_test_name("LLLogin multiple srv uris w/ success");
+
+		// Testing normal login procedure.
+		LLEventStream llaresPump("LLAres"); // Dummy LLAres pump.
+		LLEventStream xmlrpcPump("LLXMLRPCTransaction"); // Dummy XMLRPC pump
+
+		bool respond_immediately = false;
+		bool multiple_addresses = true;
+		LLAresListener dummyLLAres("dummy_llares", respond_immediately, multiple_addresses);
+		dummyLLAres.listenTo(llaresPump);
+
+		LLXMLRPCListener dummyXMLRPC("dummy_xmlrpc");
+		dummyXMLRPC.listenTo(xmlrpcPump);
+
+		LLLogin login;
+
+		LoginListener listener("test_ear");
+		listener.listenTo(login.getEventPump());
+
+		LLSD credentials;
+		credentials["first"] = "foo";
+		credentials["last"] = "bar";
+		credentials["passwd"] = "secret";
+
+		login.connect("login.bar.com", credentials);
+
+		ensure_equals("SRV state", listener.lastEvent()["state"].asString(), "srvrequest"); 
+
+		dummyLLAres.sendReply();
+
+		// Test Authenticating State prior to first response.
+		ensure_equals("Auth state 1", listener.lastEvent()["state"].asString(), "authenticating"); 
+		ensure_equals("Attempt 1", listener.lastEvent()["data"]["attempt"].asInteger(), 1); 
+		ensure_equals("URI 1", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.foo.com"); 
+
+		// First send emulated LLXMLRPCListener failure,
+		// this should return login to the authenticating step and increase the attempt 
+		// count.
+		LLSD data;
+		data["status"] = "OtherError"; 
+		data["errorcode"] = 0;
+		data["error"] = "dummy response";
+		data["transfer_rate"] = 0;
+		dummyXMLRPC.setResponse(data);
+		dummyXMLRPC.sendReply();
+
+		ensure_equals("Fail back to authenticate 1", listener.lastEvent()["state"].asString(), "authenticating"); 
+		ensure_equals("Attempt 2", listener.lastEvent()["data"]["attempt"].asInteger(), 2); 
+		ensure_equals("URI 2", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.bar.com"); 
+
+		// Now send the 'indeterminate' response.
+		data.clear();
+		data["status"] = "Complete"; // StatusComplete
+		data["errorcode"] = 0;
+		data["error"] = "dummy response";
+		data["transfer_rate"] = 0;
+		data["responses"]["login"] = "indeterminate";
+		data["next_url"] = "login.indeterminate.com";			
+		data["next_method"] = "test_login_method"; 			
+		dummyXMLRPC.setResponse(data);
+		dummyXMLRPC.sendReply();
+
+		ensure_equals("Fail back to authenticate 2", listener.lastEvent()["state"].asString(), "authenticating"); 
+		ensure_equals("Attempt 3", listener.lastEvent()["data"]["attempt"].asInteger(), 3); 
+		ensure_equals("URI 3", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.indeterminate.com"); 
+
+		// Finally let the auth succeed.
+		data.clear();
+		data["status"] = "Complete"; // StatusComplete
+		data["errorcode"] = 0;
+		data["error"] = "dummy response";
+		data["transfer_rate"] = 0;
+		data["responses"]["login"] = "true";
+		dummyXMLRPC.setResponse(data);
+		dummyXMLRPC.sendReply();
+
+		ensure_equals("Success state", listener.lastEvent()["state"].asString(), "online");
+
+		login.disconnect();
+
+		ensure_equals("Disconnected state", listener.lastEvent()["state"].asString(), "offline");
+	}
+
+    template<> template<>
+    void llviewerlogin_object::test<3>()
+    {
+		// Test completed response, that fails to login.
+		set_test_name("LLLogin valid response, failure (eg. bad credentials)");
+
+		// Testing normal login procedure.
+		LLEventStream llaresPump("LLAres"); // Dummy LLAres pump.
+		LLEventStream xmlrpcPump("LLXMLRPCTransaction"); // Dummy XMLRPC pump
+
+		LLAresListener dummyLLAres("dummy_llares");
+		dummyLLAres.listenTo(llaresPump);
+
+		LLXMLRPCListener dummyXMLRPC("dummy_xmlrpc");
+		dummyXMLRPC.listenTo(xmlrpcPump);
+
+		LLLogin login;
+		LoginListener listener("test_ear");
+		listener.listenTo(login.getEventPump());
+
+		LLSD credentials;
+		credentials["first"] = "who";
+		credentials["last"] = "what";
+		credentials["passwd"] = "badpasswd";
+
+		login.connect("login.bar.com", credentials);
+
+		ensure_equals("SRV state", listener.lastEvent()["state"].asString(), "srvrequest"); 
+
+		dummyLLAres.sendReply();
+
+		ensure_equals("Auth state", listener.lastEvent()["state"].asString(), "authenticating"); 
+
+		// Send the failed auth request reponse
+		LLSD data;
+		data["status"] = "Complete";
+		data["errorcode"] = 0;
+		data["error"] = "dummy response";
+		data["transfer_rate"] = 0;
+		data["responses"]["login"] = "false";
+		dummyXMLRPC.setResponse(data);
+		dummyXMLRPC.sendReply();
+
+		ensure_equals("Failed to offline", listener.lastEvent()["state"].asString(), "offline");
+	}
+
+    template<> template<>
+    void llviewerlogin_object::test<4>()
+    {
+		// Test incomplete response, that end the attempt.
+		set_test_name("LLLogin valid response, failure (eg. bad credentials)");
+
+		// Testing normal login procedure.
+		LLEventStream llaresPump("LLAres"); // Dummy LLAres pump.
+		LLEventStream xmlrpcPump("LLXMLRPCTransaction"); // Dummy XMLRPC pump
+
+		LLAresListener dummyLLAres("dummy_llares");
+		dummyLLAres.listenTo(llaresPump);
+
+		LLXMLRPCListener dummyXMLRPC("dummy_xmlrpc");
+		dummyXMLRPC.listenTo(xmlrpcPump);
+
+		LLLogin login;
+		LoginListener listener("test_ear");
+		listener.listenTo(login.getEventPump());
+
+		LLSD credentials;
+		credentials["first"] = "these";
+		credentials["last"] = "don't";
+		credentials["passwd"] = "matter";
+
+		login.connect("login.bar.com", credentials);
+
+		ensure_equals("SRV state", listener.lastEvent()["state"].asString(), "srvrequest"); 
+
+		dummyLLAres.sendReply();
+
+		ensure_equals("Auth state", listener.lastEvent()["state"].asString(), "authenticating"); 
+
+		// Send the failed auth request reponse
+		LLSD data;
+		data["status"] = "OtherError";
+		data["errorcode"] = 0;
+		data["error"] = "dummy response";
+		data["transfer_rate"] = 0;
+		dummyXMLRPC.setResponse(data);
+		dummyXMLRPC.sendReply();
+
+		ensure_equals("Failed to offline", listener.lastEvent()["state"].asString(), "offline");
+	}
+}
-- 
cgit v1.2.3


From a087bbeda3229745cb625fbd1106438572dfee4a Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 13 May 2009 23:31:47 +0000
Subject: Any static instance of an STL container introduces
 static-initializer-order bugs. Use internal, informal singleton pattern to
 work around that.

---
 indra/llcommon/llinstancetracker.h | 54 +++++++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 18 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h
index 11f4063a1d..21d16e9ef7 100644
--- a/indra/llcommon/llinstancetracker.h
+++ b/indra/llcommon/llinstancetracker.h
@@ -39,9 +39,9 @@
 #include "string_table.h"
 #include <boost/utility.hpp>
 
-// This mix-in class adds support for tracking all instances of the specificed class parameter T
+// This mix-in class adds support for tracking all instances of the specified class parameter T
 // The (optional) key associates a value of type KEY with a given instance of T, for quick lookup
-// If KEY is not provided, then instances are stored in a simple list
+// If KEY is not provided, then instances are stored in a simple set
 template<typename T, typename KEY = T*>
 class LLInstanceTracker : boost::noncopyable
 {
@@ -49,11 +49,11 @@ public:
 	typedef typename std::map<KEY, T*>::iterator instance_iter;
 	typedef typename std::map<KEY, T*>::const_iterator instance_const_iter;
 
-	static T* getInstance(const KEY& k) { instance_iter found = sInstances.find(k); return (found == sInstances.end()) ? NULL : found->second; }
+	static T* getInstance(const KEY& k) { instance_iter found = getMap().find(k); return (found == getMap().end()) ? NULL : found->second; }
 
-	static instance_iter beginInstances() { return sInstances.begin(); }
-	static instance_iter endInstances() { return sInstances.end(); }
-	static S32 instanceCount() { return sInstances.size(); }
+	static instance_iter beginInstances() { return getMap().begin(); }
+	static instance_iter endInstances() { return getMap().end(); }
+	static S32 instanceCount() { return getMap().size(); }
 protected:
 	LLInstanceTracker(KEY key) { add(key); }
 	virtual ~LLInstanceTracker() { remove(); }
@@ -64,14 +64,23 @@ private:
 	void add(KEY key) 
 	{ 
 		mKey = key; 
-		sInstances[key] = static_cast<T*>(this); 
+		getMap()[key] = static_cast<T*>(this); 
 	}
-	void remove() { sInstances.erase(mKey); }
+	void remove() { getMap().erase(mKey); }
+
+    static std::map<KEY, T*>& getMap()
+    {
+        if (! sInstances)
+        {
+            sInstances = new std::map<KEY, T*>;
+        }
+        return *sInstances;
+    }
 
 private:
 
 	KEY mKey;
-	static std::map<KEY, T*> sInstances;
+	static std::map<KEY, T*>* sInstances;
 };
 
 template<typename T>
@@ -81,20 +90,29 @@ public:
 	typedef typename std::set<T*>::iterator instance_iter;
 	typedef typename std::set<T*>::const_iterator instance_const_iter;
 
-	static instance_iter instancesBegin() { return sInstances.begin(); }
-	static instance_iter instancesEnd() { return sInstances.end(); }
-	static S32 instanceCount() { return sInstances.size(); }
+	static instance_iter instancesBegin() { return getSet().begin(); }
+	static instance_iter instancesEnd() { return getSet().end(); }
+	static S32 instanceCount() { return getSet().size(); }
 
 protected:
-	LLInstanceTracker() { sInstances.insert(static_cast<T*>(this)); }
-	virtual ~LLInstanceTracker() { sInstances.erase(static_cast<T*>(this)); }
+	LLInstanceTracker() { getSet().insert(static_cast<T*>(this)); }
+	virtual ~LLInstanceTracker() { getSet().erase(static_cast<T*>(this)); }
+
+	LLInstanceTracker(const LLInstanceTracker& other) { getSet().insert(static_cast<T*>(this)); }
 
-	LLInstanceTracker(const LLInstanceTracker& other) { sInstances.insert(static_cast<T*>(this)); }
+    static std::set<T*>& getSet()   // called after getReady() but before go()
+    {
+        if (! sInstances)
+        {
+            sInstances = new std::set<T*>;
+        }
+        return *sInstances;
+    }
 
-	static std::set<T*> sInstances;
+	static std::set<T*>* sInstances;
 };
 
-template <typename T, typename KEY> std::map<KEY, T*> LLInstanceTracker<T, KEY>::sInstances;
-template <typename T> std::set<T*> LLInstanceTracker<T, T*>::sInstances;
+template <typename T, typename KEY> std::map<KEY, T*>* LLInstanceTracker<T, KEY>::sInstances = NULL;
+template <typename T> std::set<T*>* LLInstanceTracker<T, T*>::sInstances = NULL;
 
 #endif
-- 
cgit v1.2.3


From 3975de991d2afa2ed903ac28bcc91246dfb22c20 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 13 May 2009 23:35:42 +0000
Subject: svn merge -r113003:119136
 svn+ssh://svn.lindenlab.com/svn/linden/branches/login-api/login-api-2
 svn+ssh://svn.lindenlab.com/svn/linden/branches/login-api/login-api-3
 (finish)

---
 indra/llcommon/CMakeLists.txt                 |    2 +-
 indra/llcommon/tests/lleventcoro_test.cpp     |  827 +++++++++++++++
 indra/newview/lllogininstance.cpp             |   14 +-
 indra/newview/llstartup.cpp                   | 1368 ++++++++-----------------
 indra/newview/tests/llxmlrpclistener_test.cpp |    2 +-
 5 files changed, 1281 insertions(+), 932 deletions(-)
 create mode 100644 indra/llcommon/tests/lleventcoro_test.cpp

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index d3d75f78df..62476fd59d 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -228,4 +228,4 @@ target_link_libraries(
 
 ADD_BUILD_TEST(lllazy llcommon)
 ADD_BUILD_TEST(lleventfilter llcommon)
-ADD_BUILD_TEST(coroutine llcommon)
+ADD_BUILD_TEST(lleventcoro llcommon)
diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp
new file mode 100644
index 0000000000..cd39ac4df3
--- /dev/null
+++ b/indra/llcommon/tests/lleventcoro_test.cpp
@@ -0,0 +1,827 @@
+/**
+ * @file   coroutine_test.cpp
+ * @author Nat Goodspeed
+ * @date   2009-04-22
+ * @brief  Test for coroutine.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+/*****************************************************************************/
+//  test<1>() is cloned from a Boost.Coroutine example program whose copyright
+//  info is reproduced here:
+/*---------------------------------------------------------------------------*/
+//  Copyright (c) 2006, Giovanni P. Deretta
+//
+//  This code may be used under either of the following two licences:
+//
+//  Permission is hereby granted, free of charge, to any person obtaining a copy 
+//  of this software and associated documentation files (the "Software"), to deal 
+//  in the Software without restriction, including without limitation the rights 
+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
+//  copies of the Software, and to permit persons to whom the Software is 
+//  furnished to do so, subject to the following conditions:
+//
+//  The above copyright notice and this permission notice shall be included in 
+//  all copies or substantial portions of the Software.
+//
+//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
+//  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
+//  THE SOFTWARE. OF SUCH DAMAGE.
+//
+//  Or:
+//
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+/*****************************************************************************/
+
+// On some platforms, Boost.Coroutine must #define magic symbols before
+// #including platform-API headers. Naturally, that's ineffective unless the
+// Boost.Coroutine #include is the *first* #include of the platform header.
+// That means that client code must generally #include Boost.Coroutine headers
+// before anything else.
+#include <boost/coroutine/coroutine.hpp>
+// Normally, lleventcoro.h obviates future.hpp. We only include this because
+// we implement a "by hand" test of future functionality.
+#include <boost/coroutine/future.hpp>
+#include <boost/bind.hpp>
+#include <boost/range.hpp>
+#include <iostream>
+#include <string>
+
+#include "../test/lltut.h"
+#include "llsd.h"
+#include "llevents.h"
+#include "tests/wrapllerrs.h"
+#include "stringize.h"
+#include "lleventcoro.h"
+
+/*****************************************************************************
+*   Debugging stuff
+*****************************************************************************/
+// This class is intended to illuminate entry to a given block, exit from the
+// same block and checkpoints along the way. It also provides a convenient
+// place to turn std::cout output on and off.
+class Debug
+{
+public:
+    Debug(const std::string& block):
+        mBlock(block)
+    {
+        (*this)("entry");
+    }
+
+    ~Debug()
+    {
+        (*this)("exit");
+    }
+
+    void operator()(const std::string& status)
+    {
+//      std::cout << mBlock << ' ' << status << std::endl;
+    }
+
+private:
+    const std::string mBlock;
+};
+
+// It's often convenient to use the name of the enclosing function as the name
+// of the Debug block.
+#define DEBUG Debug debug(__FUNCTION__)
+
+// These BEGIN/END macros are specifically for debugging output -- please
+// don't assume you must use such for coroutines in general! They only help to
+// make control flow (as well as exception exits) explicit.
+#define BEGIN                                   \
+{                                               \
+    DEBUG;                                      \
+    try
+
+#define END                                             \
+    catch (...)                                         \
+    {                                                   \
+/*      std::cout << "*** exceptional " << std::flush; */    \
+        throw;                                          \
+    }                                                   \
+}
+
+/*****************************************************************************
+*   from the banana.cpp example program borrowed for test<1>()
+*****************************************************************************/
+namespace coroutines = boost::coroutines;
+using coroutines::coroutine;
+
+template<typename Iter>
+bool match(Iter first, Iter last, std::string match) {
+  std::string::iterator i = match.begin();
+  i != match.end();
+  for(; (first != last) && (i != match.end()); ++i) {
+    if (*first != *i)
+      return false;
+    ++first;
+  }
+  return i == match.end();
+}
+
+template<typename BidirectionalIterator> 
+BidirectionalIterator 
+match_substring(BidirectionalIterator begin, 
+		BidirectionalIterator end, 
+		std::string xmatch,
+		BOOST_DEDUCED_TYPENAME coroutine<BidirectionalIterator(void)>::self& self) { 
+  BidirectionalIterator begin_ = begin;
+  for(; begin != end; ++begin) 
+    if(match(begin, end, xmatch)) {
+      self.yield(begin);
+    }
+  return end;
+} 
+
+typedef coroutine<std::string::iterator(void)> match_coroutine_type;
+
+/*****************************************************************************
+*   Test helpers
+*****************************************************************************/
+// I suspect this will be typical of coroutines used in Linden software
+typedef boost::coroutines::coroutine<void()> coroutine_type;
+
+/// Simulate an event API whose response is immediate: sent on receipt of the
+/// initial request, rather than after some delay. This is the case that
+/// distinguishes postAndWait() from calling post(), then calling
+/// waitForEventOn().
+class ImmediateAPI
+{
+public:
+    ImmediateAPI():
+        mPump("immediate", true)
+    {
+        mPump.listen("API", boost::bind(&ImmediateAPI::operator(), this, _1));
+    }
+
+    LLEventPump& getPump() { return mPump; }
+
+    // Invoke this with an LLSD map containing:
+    // ["value"]: Integer value. We will reply with ["value"] + 1.
+    // ["reply"]: Name of LLEventPump on which to send success response.
+    // ["error"]: Name of LLEventPump on which to send error response.
+    // ["fail"]: Presence of this key selects ["error"], else ["success"] as
+    // the name of the pump on which to send the response.
+    bool operator()(const LLSD& event) const
+    {
+        LLSD::Integer value(event["value"]);
+        LLSD::String replyPumpName(event.has("fail")? "error" : "reply");
+        LLEventPumps::instance().obtain(event[replyPumpName]).post(value + 1);
+        return false;
+    }
+
+private:
+    LLEventStream mPump;
+};
+
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
+namespace tut
+{
+    struct coroutine_data
+    {
+        // Define coroutine bodies as methods here so they can use ensure*()
+
+        void explicit_wait(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                // ... do whatever preliminary stuff must happen ...
+
+                // declare the future
+                boost::coroutines::future<LLSD> future(self);
+                // tell the future what to wait for
+                LLTempBoundListener connection(
+                    LLEventPumps::instance().obtain("source").listen("coro", voidlistener(boost::coroutines::make_callback(future))));
+                ensure("Not yet", ! future);
+                // attempting to dereference ("resolve") the future causes the calling
+                // coroutine to wait for it
+                debug("about to wait");
+                result = *future;
+                ensure("Got it", future);
+            }
+            END
+        }
+
+        void waitForEventOn1(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                result = waitForEventOn(self, "source");
+            }
+            END
+        }
+
+        void waitForEventOn2(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLEventWithID pair = waitForEventOn(self, "reply", "error");
+                result = pair.first;
+                which  = pair.second;
+                debug(STRINGIZE("result = " << result << ", which = " << which));
+            }
+            END
+        }
+
+        void postAndWait1(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                result = postAndWait(self,
+                                     LLSD().insert("value", 17), // request event
+                                     immediateAPI.getPump(),     // requestPump
+                                     "reply1",                   // replyPump
+                                     "reply");                   // request["reply"] = name
+            }
+            END
+        }
+
+        void postAndWait2(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLEventWithID pair = ::postAndWait2(self,
+                                                    LLSD().insert("value", 18),
+                                                    immediateAPI.getPump(),
+                                                    "reply2",
+                                                    "error2",
+                                                    "reply",
+                                                    "error");
+                result = pair.first;
+                which  = pair.second;
+                debug(STRINGIZE("result = " << result << ", which = " << which));
+            }
+            END
+        }
+
+        void postAndWait2_1(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLEventWithID pair = ::postAndWait2(self,
+                                                    LLSD().insert("value", 18).insert("fail", LLSD()),
+                                                    immediateAPI.getPump(),
+                                                    "reply2",
+                                                    "error2",
+                                                    "reply",
+                                                    "error");
+                result = pair.first;
+                which  = pair.second;
+                debug(STRINGIZE("result = " << result << ", which = " << which));
+            }
+            END
+        }
+
+        void coroPump(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPump waiter;
+                replyName = waiter.getName();
+                result = waiter.wait(self);
+            }
+            END
+        }
+
+        void coroPumpPost(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPump waiter;
+                result = waiter.postAndWait(self, LLSD().insert("value", 17),
+                                            immediateAPI.getPump(), "reply");
+            }
+            END
+        }
+
+        void coroPumps(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                replyName = waiter.getName0();
+                errorName = waiter.getName1();
+                LLEventWithID pair(waiter.wait(self));
+                result = pair.first;
+                which  = pair.second;
+            }
+            END
+        }
+
+        void coroPumpsNoEx(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                replyName = waiter.getName0();
+                errorName = waiter.getName1();
+                result = waiter.waitWithException(self);
+            }
+            END
+        }
+
+        void coroPumpsEx(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                replyName = waiter.getName0();
+                errorName = waiter.getName1();
+                try
+                {
+                    result = waiter.waitWithException(self);
+                    debug("no exception");
+                }
+                catch (const LLErrorEvent& e)
+                {
+                    debug(STRINGIZE("exception " << e.what()));
+                    errordata = e.getData();
+                }
+            }
+            END
+        }
+
+        void coroPumpsNoLog(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                replyName = waiter.getName0();
+                errorName = waiter.getName1();
+                result = waiter.waitWithLog(self);
+            }
+            END
+        }
+
+        void coroPumpsLog(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                replyName = waiter.getName0();
+                errorName = waiter.getName1();
+                WrapLL_ERRS capture;
+                try
+                {
+                    result = waiter.waitWithLog(self);
+                    debug("no exception");
+                }
+                catch (const WrapLL_ERRS::FatalException& e)
+                {
+                    debug(STRINGIZE("exception " << e.what()));
+                    threw = e.what();
+                }
+            }
+            END
+        }
+
+        void coroPumpsPost(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                LLEventWithID pair(waiter.postAndWait(self, LLSD().insert("value", 23),
+                                                      immediateAPI.getPump(), "reply", "error"));
+                result = pair.first;
+                which  = pair.second;
+            }
+            END
+        }
+
+        void coroPumpsPost_1(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                LLEventWithID pair(
+                    waiter.postAndWait(self, LLSD().insert("value", 23).insert("fail", LLSD()),
+                                       immediateAPI.getPump(), "reply", "error"));
+                result = pair.first;
+                which  = pair.second;
+            }
+            END
+        }
+
+        void coroPumpsPostNoEx(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                result = waiter.postAndWaitWithException(self, LLSD().insert("value", 8),
+                                                         immediateAPI.getPump(), "reply", "error");
+            }
+            END
+        }
+
+        void coroPumpsPostEx(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                try
+                {
+                    result = waiter.postAndWaitWithException(self,
+                        LLSD().insert("value", 9).insert("fail", LLSD()),
+                        immediateAPI.getPump(), "reply", "error");
+                    debug("no exception");
+                }
+                catch (const LLErrorEvent& e)
+                {
+                    debug(STRINGIZE("exception " << e.what()));
+                    errordata = e.getData();
+                }
+            }
+            END
+        }
+
+        void coroPumpsPostNoLog(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                result = waiter.postAndWaitWithLog(self, LLSD().insert("value", 30),
+                                                   immediateAPI.getPump(), "reply", "error");
+            }
+            END
+        }
+
+        void coroPumpsPostLog(coroutine_type::self& self)
+        {
+            BEGIN
+            {
+                LLCoroEventPumps waiter;
+                WrapLL_ERRS capture;
+                try
+                {
+                    result = waiter.postAndWaitWithLog(self,
+                        LLSD().insert("value", 31).insert("fail", LLSD()),
+                        immediateAPI.getPump(), "reply", "error");
+                    debug("no exception");
+                }
+                catch (const WrapLL_ERRS::FatalException& e)
+                {
+                    debug(STRINGIZE("exception " << e.what()));
+                    threw = e.what();
+                }
+            }
+            END
+        }
+
+        void ensure_done(coroutine_type& coro)
+        {
+            ensure("coroutine complete", ! coro);
+        }
+
+        ImmediateAPI immediateAPI;
+        std::string replyName, errorName, threw;
+        LLSD result, errordata;
+        int which;
+    };
+    typedef test_group<coroutine_data> coroutine_group;
+    typedef coroutine_group::object object;
+    coroutine_group coroutinegrp("coroutine");
+
+    template<> template<>
+    void object::test<1>()
+    {
+        set_test_name("From banana.cpp example program in Boost.Coroutine distro");
+        std::string buffer = "banananana"; 
+        std::string match = "nana"; 
+        std::string::iterator begin = buffer.begin();
+        std::string::iterator end = buffer.end();
+
+#if defined(BOOST_CORO_POSIX_IMPL)
+//      std::cout << "Using Boost.Coroutine " << BOOST_CORO_POSIX_IMPL << '\n';
+#else
+//      std::cout << "Using non-Posix Boost.Coroutine implementation" << std::endl;
+#endif
+
+        typedef std::string::iterator signature(std::string::iterator, 
+                                                std::string::iterator, 
+                                                std::string,
+                                                match_coroutine_type::self&);
+
+        coroutine<std::string::iterator(void)> matcher
+            (boost::bind(static_cast<signature*>(match_substring), 
+                         begin, 
+                         end, 
+                         match, 
+                         _1)); 
+
+        std::string::iterator i = matcher();
+/*==========================================================================*|
+        while(matcher && i != buffer.end()) {
+            std::cout <<"Match at: "<< std::distance(buffer.begin(), i)<<'\n'; 
+            i = matcher();
+        }
+|*==========================================================================*/
+        size_t matches[] = { 2, 4, 6 };
+        for (size_t *mi(boost::begin(matches)), *mend(boost::end(matches));
+             mi != mend; ++mi, i = matcher())
+        {
+            ensure("more", matcher);
+            ensure("found", i != buffer.end());
+            ensure_equals("value", std::distance(buffer.begin(), i), *mi);
+        }
+        ensure("done", ! matcher);
+    }
+
+    template<> template<>
+    void object::test<2>()
+    {
+        set_test_name("explicit_wait");
+        DEBUG;
+
+        // Construct the coroutine instance that will run explicit_wait.
+        // Pass the ctor a callable that accepts the coroutine_type::self
+        // param passed by the library.
+        coroutine_type coro(boost::bind(&coroutine_data::explicit_wait, this, _1));
+        // Start the coroutine
+        coro(std::nothrow);
+        // When the coroutine waits for the event pump, it returns here.
+        debug("about to send");
+        // Satisfy the wait.
+        LLEventPumps::instance().obtain("source").post("received");
+        // Now wait for the coroutine to complete.
+        ensure_done(coro);
+        // ensure the coroutine ran and woke up again with the intended result
+        ensure_equals(result.asString(), "received");
+    }
+
+    template<> template<>
+    void object::test<3>()
+    {
+        set_test_name("waitForEventOn1");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::waitForEventOn1, this, _1));
+        coro(std::nothrow);
+        debug("about to send");
+        LLEventPumps::instance().obtain("source").post("received");
+        debug("back from send");
+        ensure_done(coro);
+        ensure_equals(result.asString(), "received");
+    }
+
+    template<> template<>
+    void object::test<4>()
+    {
+        set_test_name("waitForEventOn2 reply");
+        {
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::waitForEventOn2, this, _1));
+        coro(std::nothrow);
+        debug("about to send");
+        LLEventPumps::instance().obtain("reply").post("received");
+        debug("back from send");
+        ensure_done(coro);
+        }
+        ensure_equals(result.asString(), "received");
+        ensure_equals("which pump", which, 0);
+    }
+
+    template<> template<>
+    void object::test<5>()
+    {
+        set_test_name("waitForEventOn2 error");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::waitForEventOn2, this, _1));
+        coro(std::nothrow);
+        debug("about to send");
+        LLEventPumps::instance().obtain("error").post("badness");
+        debug("back from send");
+        ensure_done(coro);
+        ensure_equals(result.asString(), "badness");
+        ensure_equals("which pump", which, 1);
+    }
+
+    template<> template<>
+    void object::test<6>()
+    {
+        set_test_name("coroPump");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPump, this, _1));
+        coro(std::nothrow);
+        debug("about to send");
+        LLEventPumps::instance().obtain(replyName).post("received");
+        debug("back from send");
+        ensure_done(coro);
+        ensure_equals(result.asString(), "received");
+    }
+
+    template<> template<>
+    void object::test<7>()
+    {
+        set_test_name("coroPumps reply");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumps, this, _1));
+        coro(std::nothrow);
+        debug("about to send");
+        LLEventPumps::instance().obtain(replyName).post("received");
+        debug("back from send");
+        ensure_done(coro);
+        ensure_equals(result.asString(), "received");
+        ensure_equals("which pump", which, 0);
+    }
+
+    template<> template<>
+    void object::test<8>()
+    {
+        set_test_name("coroPumps error");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumps, this, _1));
+        coro(std::nothrow);
+        debug("about to send");
+        LLEventPumps::instance().obtain(errorName).post("badness");
+        debug("back from send");
+        ensure_done(coro);
+        ensure_equals(result.asString(), "badness");
+        ensure_equals("which pump", which, 1);
+    }
+
+    template<> template<>
+    void object::test<9>()
+    {
+        set_test_name("coroPumpsNoEx");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpsNoEx, this, _1));
+        coro(std::nothrow);
+        debug("about to send");
+        LLEventPumps::instance().obtain(replyName).post("received");
+        debug("back from send");
+        ensure_done(coro);
+        ensure_equals(result.asString(), "received");
+    }
+
+    template<> template<>
+    void object::test<10>()
+    {
+        set_test_name("coroPumpsEx");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpsEx, this, _1));
+        coro(std::nothrow);
+        debug("about to send");
+        LLEventPumps::instance().obtain(errorName).post("badness");
+        debug("back from send");
+        ensure_done(coro);
+        ensure("no result", result.isUndefined());
+        ensure_equals("got error", errordata.asString(), "badness");
+    }
+
+    template<> template<>
+    void object::test<11>()
+    {
+        set_test_name("coroPumpsNoLog");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpsNoLog, this, _1));
+        coro(std::nothrow);
+        debug("about to send");
+        LLEventPumps::instance().obtain(replyName).post("received");
+        debug("back from send");
+        ensure_done(coro);
+        ensure_equals(result.asString(), "received");
+    }
+
+    template<> template<>
+    void object::test<12>()
+    {
+        set_test_name("coroPumpsLog");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpsLog, this, _1));
+        coro(std::nothrow);
+        debug("about to send");
+        LLEventPumps::instance().obtain(errorName).post("badness");
+        debug("back from send");
+        ensure_done(coro);
+        ensure("no result", result.isUndefined());
+        ensure_contains("got error", threw, "badness");
+    }
+
+    template<> template<>
+    void object::test<13>()
+    {
+        set_test_name("postAndWait1");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::postAndWait1, this, _1));
+        coro(std::nothrow);
+        ensure_done(coro);
+        ensure_equals(result.asInteger(), 18);
+    }
+
+    template<> template<>
+    void object::test<14>()
+    {
+        set_test_name("postAndWait2");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::postAndWait2, this, _1));
+        coro(std::nothrow);
+        ensure_done(coro);
+        ensure_equals(result.asInteger(), 19);
+        ensure_equals(which, 0);
+    }
+
+    template<> template<>
+    void object::test<15>()
+    {
+        set_test_name("postAndWait2_1");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::postAndWait2_1, this, _1));
+        coro(std::nothrow);
+        ensure_done(coro);
+        ensure_equals(result.asInteger(), 19);
+        ensure_equals(which, 1);
+    }
+
+    template<> template<>
+    void object::test<16>()
+    {
+        set_test_name("coroPumpPost");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpPost, this, _1));
+        coro(std::nothrow);
+        ensure_done(coro);
+        ensure_equals(result.asInteger(), 18);
+    }
+
+    template<> template<>
+    void object::test<17>()
+    {
+        set_test_name("coroPumpsPost reply");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPost, this, _1));
+        coro(std::nothrow);
+        ensure_done(coro);
+        ensure_equals(result.asInteger(), 24);
+        ensure_equals("which pump", which, 0);
+    }
+
+    template<> template<>
+    void object::test<18>()
+    {
+        set_test_name("coroPumpsPost error");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPost_1, this, _1));
+        coro(std::nothrow);
+        ensure_done(coro);
+        ensure_equals(result.asInteger(), 24);
+        ensure_equals("which pump", which, 1);
+    }
+
+    template<> template<>
+    void object::test<19>()
+    {
+        set_test_name("coroPumpsPostNoEx");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPostNoEx, this, _1));
+        coro(std::nothrow);
+        ensure_done(coro);
+        ensure_equals(result.asInteger(), 9);
+    }
+
+    template<> template<>
+    void object::test<20>()
+    {
+        set_test_name("coroPumpsPostEx");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPostEx, this, _1));
+        coro(std::nothrow);
+        ensure_done(coro);
+        ensure("no result", result.isUndefined());
+        ensure_equals("got error", errordata.asInteger(), 10);
+    }
+
+    template<> template<>
+    void object::test<21>()
+    {
+        set_test_name("coroPumpsPostNoLog");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPostNoLog, this, _1));
+        coro(std::nothrow);
+        ensure_done(coro);
+        ensure_equals(result.asInteger(), 31);
+    }
+
+    template<> template<>
+    void object::test<22>()
+    {
+        set_test_name("coroPumpsPostLog");
+        DEBUG;
+        coroutine_type coro(boost::bind(&coroutine_data::coroPumpsPostLog, this, _1));
+        coro(std::nothrow);
+        ensure_done(coro);
+        ensure("no result", result.isUndefined());
+        ensure_contains("got error", threw, "32");
+    }
+} // namespace tut
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 388bf38d61..606f145d3b 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -292,10 +292,9 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
 {
 	// store off config state, as we might quit soon
 	gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);	
+	gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE);
 
 	std::ostringstream message;
-
-	//*TODO:translate
 	std::string msg;
 	if (!auth_msg.empty())
 	{
@@ -409,6 +408,7 @@ bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD&
 	query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel();
 	query_map["channel"] = gSavedSettings.getString("VersionChannelName");
 	// *TODO constantize this guy
+	// *NOTE: This URL is also used in win_setup/lldownloader.cpp
 	LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map);
 	
 	if(LLAppViewer::sUpdaterInfo)
@@ -495,9 +495,7 @@ bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD&
 	system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
 
 #elif LL_LINUX || LL_SOLARIS
-	OSMessageBox("Automatic updating is not yet implemented for Linux.\n"
-		"Please download the latest version from www.secondlife.com.",
-		LLStringUtil::null, OSMB_OK);
+	OSMessageBox(LLTrans::getString("MBNoAutoUpdate"), LLStringUtil::null, OSMB_OK);
 #endif
 
 	// *REMOVE:Mani - Saving for reference...
@@ -520,13 +518,9 @@ std::string construct_start_string()
 						<< LLURLSimString::sInstance.mZ);
 		start = xml_escape_string(unescaped_start);
 	}
-	else if (gSavedSettings.getBOOL("LoginLastLocation"))
-	{
-		start = "last";
-	}
 	else
 	{
-		start = "home";
+		start = gSavedSettings.getString("LoginLocation");
 	}
 	return start;
 }
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 4cf94b5bc4..eddc23b0c4 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -55,7 +55,6 @@
 #include "llviewercontrol.h"
 #include "lldir.h"
 #include "llerrorcontrol.h"
-#include "llfiltersd2xmlrpc.h"
 #include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "llhttpsender.h"
@@ -102,7 +101,6 @@
 #include "llfloaterhud.h"
 #include "llfloaterland.h"
 #include "llfloatertopobjects.h"
-#include "llfloatertos.h"
 #include "llfloaterworldmap.h"
 #include "llgesturemgr.h"
 #include "llgroupmgr.h"
@@ -114,6 +112,7 @@
 #include "llinventoryview.h"
 #include "llkeyboard.h"
 #include "llloginhandler.h"			// gLoginHandler, SLURL support
+#include "lllogininstance.h" // Host the login module.
 #include "llpanellogin.h"
 #include "llprefsim.h"
 #include "llmutelist.h"
@@ -134,7 +133,6 @@
 #include "llsecondlifeurls.h"
 #include "llselectmgr.h"
 #include "llsky.h"
-#include "llsrv.h"
 #include "llstatview.h"
 #include "lltrans.h"
 #include "llstatusbar.h"		// sendMoneyBalanceRequest(), owns L$ balance
@@ -147,7 +145,6 @@
 #include "llurlsimstring.h"
 #include "llurlhistory.h"
 #include "llurlwhitelist.h"
-#include "lluserauth.h"
 #include "llvieweraudio.h"
 #include "llviewerassetstorage.h"
 #include "llviewercamera.h"
@@ -188,6 +185,8 @@
 #include "llwearable.h"
 #include "llinventorybridge.h"
 
+#include "lllogin.h"
+
 #if LL_LIBXUL_ENABLED
 #include "llmozlib.h"
 #endif // LL_LIBXUL_ENABLED
@@ -201,12 +200,12 @@
 // exported globals
 //
 bool gAgentMovementCompleted = false;
-std::string gInitialOutfit;
-std::string gInitialOutfitGender;
 
 std::string SCREEN_HOME_FILENAME = "screen_home.bmp";
 std::string SCREEN_LAST_FILENAME = "screen_last.bmp";
 
+LLPointer<LLImageGL> gStartImageGL;
+
 //
 // Imported globals
 //
@@ -216,12 +215,6 @@ extern S32 gStartImageHeight;
 //
 // local globals
 //
-
-LLPointer<LLImageGL> gStartImageGL;
-
-static LLHost gAgentSimHost;
-static BOOL gSkipOptionalUpdate = FALSE;
-
 static bool gGotUseCircuitCodeAck = false;
 static std::string sInitialOutfit;
 static std::string sInitialOutfitGender;	// "male" or "female"
@@ -230,6 +223,17 @@ static bool gUseCircuitCallbackCalled = false;
 
 EStartupState LLStartUp::gStartupState = STATE_FIRST;
 
+// *NOTE:Mani - to reconcile with giab changes...
+static std::string gFirstname;
+static std::string gLastname;
+static std::string gPassword;
+
+static U64 gFirstSimHandle = 0;
+static LLHost gFirstSim;
+static std::string gFirstSimSeedCap;
+static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
+static std::string gAgentStartLocation = "safe";
+
 
 //
 // local function declaration
@@ -242,8 +246,6 @@ void show_first_run_dialog();
 bool first_run_dialog_callback(const LLSD& notification, const LLSD& response);
 void set_startup_status(const F32 frac, const std::string& string, const std::string& msg);
 bool login_alert_status(const LLSD& notification, const LLSD& response);
-void update_app(BOOL mandatory, const std::string& message);
-bool update_dialog_callback(const LLSD& notification, const LLSD& response);
 void login_packet_failed(void**, S32 result);
 void use_circuit_callback(void**, S32 result);
 void register_viewer_callbacks(LLMessageSystem* msg);
@@ -253,6 +255,7 @@ void init_start_screen(S32 location_id);
 void release_start_screen();
 void reset_login();
 void apply_udp_blacklist(const std::string& csv);
+bool process_login_success_response();
 
 void callback_cache_name(const LLUUID& id, const std::string& firstname, const std::string& lastname, BOOL is_group)
 {
@@ -309,9 +312,6 @@ void update_texture_fetch()
 	gImageList.updateImages(0.10f);
 }
 
-static std::vector<std::string> sAuthUris;
-static S32 sAuthUriNum = -1;
-
 // Returns false to skip other idle processing. Should only return
 // true when all initialization done.
 bool idle_startup()
@@ -330,23 +330,11 @@ bool idle_startup()
 	// auth/transform loop will do.
 	static F32 progress = 0.10f;
 
-	static std::string auth_method;
 	static std::string auth_desc;
 	static std::string auth_message;
-	static std::string firstname;
-	static std::string lastname;
-	static LLUUID web_login_key;
-	static std::string password;
-	static std::vector<const char*> requested_options;
-
-	static U64 first_sim_handle = 0;
-	static LLHost first_sim;
-	static std::string first_sim_seed_cap;
 
 	static LLVector3 initial_sun_direction(1.f, 0.f, 0.f);
 	static LLVector3 agent_start_position_region(10.f, 10.f, 10.f);		// default for when no space server
-	static LLVector3 agent_start_look_at(1.0f, 0.f, 0.f);
-	static std::string agent_start_location = "safe";
 
 	// last location by default
 	static S32  agent_location_id = START_LOCATION_ID_LAST;
@@ -354,7 +342,7 @@ bool idle_startup()
 
 	static bool show_connect_box = true;
 
-	static bool stipend_since_login = false;
+	//static bool stipend_since_login = false;
 
 	// HACK: These are things from the main loop that usually aren't done
 	// until initialization is complete, but need to be done here for things
@@ -375,12 +363,7 @@ bool idle_startup()
 
 	LLStringUtil::setLocale (LLTrans::getString(system));
 
-	if (gNoRender)
-	{
-		// HACK, skip optional updates if you're running drones
-		gSkipOptionalUpdate = TRUE;
-	}
-	else
+	if (!gNoRender)
 	{
 		// Update images?
 		gImageList.updateImages(0.01f);
@@ -675,24 +658,23 @@ bool idle_startup()
 			|| !gLoginHandler.getWebLoginKey().isNull() )
 		{
 			// We have at least some login information on a SLURL
-			firstname = gLoginHandler.getFirstName();
-			lastname = gLoginHandler.getLastName();
-			web_login_key = gLoginHandler.getWebLoginKey();
+			gFirstname = gLoginHandler.getFirstName();
+			gLastname = gLoginHandler.getLastName();
 
 			// Show the login screen if we don't have everything
 			show_connect_box = 
-				firstname.empty() || lastname.empty() || web_login_key.isNull();
+				gFirstname.empty() || gLastname.empty();
 		}
         else if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3)
         {
             LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo");
-			firstname = cmd_line_login[0].asString();
-			lastname = cmd_line_login[1].asString();
+			gFirstname = cmd_line_login[0].asString();
+			gLastname = cmd_line_login[1].asString();
 
 			LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str());
 			char md5pass[33];               /* Flawfinder: ignore */
 			pass.hex_digest(md5pass);
-			password = md5pass;
+			gPassword = md5pass;
 			
 #ifdef USE_VIEWER_AUTH
 			show_connect_box = true;
@@ -703,9 +685,9 @@ bool idle_startup()
         }
 		else if (gSavedSettings.getBOOL("AutoLogin"))
 		{
-			firstname = gSavedSettings.getString("FirstName");
-			lastname = gSavedSettings.getString("LastName");
-			password = LLStartUp::loadPasswordFromDisk();
+			gFirstname = gSavedSettings.getString("FirstName");
+			gLastname = gSavedSettings.getString("LastName");
+			gPassword = LLStartUp::loadPasswordFromDisk();
 			gSavedSettings.setBOOL("RememberPassword", TRUE);
 			
 #ifdef USE_VIEWER_AUTH
@@ -718,9 +700,9 @@ bool idle_startup()
 		{
 			// if not automatically logging in, display login dialog
 			// a valid grid is selected
-			firstname = gSavedSettings.getString("FirstName");
-			lastname = gSavedSettings.getString("LastName");
-			password = LLStartUp::loadPasswordFromDisk();
+			gFirstname = gSavedSettings.getString("FirstName");
+			gLastname = gSavedSettings.getString("LastName");
+			gPassword = LLStartUp::loadPasswordFromDisk();
 			show_connect_box = true;
 		}
 
@@ -757,7 +739,7 @@ bool idle_startup()
 			// Load all the name information out of the login view
 			// NOTE: Hits "Attempted getFields with no login view shown" warning, since we don't
 			// show the login view until login_show() is called below.  
-			// LLPanelLogin::getFields(firstname, lastname, password);
+			// LLPanelLogin::getFields(gFirstname, gLastname, gPassword);
 
 			if (gNoRender)
 			{
@@ -769,7 +751,7 @@ bool idle_startup()
 			// Show the login dialog
 			login_show();
 			// connect dialog is already shown, so fill in the names
-			LLPanelLogin::setFields( firstname, lastname, password);
+			LLPanelLogin::setFields( gFirstname, gLastname, gPassword);
 
 			LLPanelLogin::giveFocus();
 
@@ -826,37 +808,29 @@ bool idle_startup()
 
 	if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState())
 	{
-		//reset the values that could have come in from a slurl
-		if (!gLoginHandler.getWebLoginKey().isNull())
-		{
-			firstname = gLoginHandler.getFirstName();
-			lastname = gLoginHandler.getLastName();
-			web_login_key = gLoginHandler.getWebLoginKey();
-		}
-				
 		if (show_connect_box)
 		{
 			// TODO if not use viewer auth
 			// Load all the name information out of the login view
-			LLPanelLogin::getFields(&firstname, &lastname, &password);
+			LLPanelLogin::getFields(&gFirstname, &gLastname, &gPassword);
 			// end TODO
 	 
 			// HACK: Try to make not jump on login
 			gKeyboard->resetKeys();
 		}
 
-		if (!firstname.empty() && !lastname.empty())
+		if (!gFirstname.empty() && !gLastname.empty())
 		{
-			gSavedSettings.setString("FirstName", firstname);
-			gSavedSettings.setString("LastName", lastname);
+			gSavedSettings.setString("FirstName", gFirstname);
+			gSavedSettings.setString("LastName", gLastname);
 
-			LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << LL_ENDL;
-			gDebugInfo["LoginName"] = firstname + " " + lastname;	
+			LL_INFOS("AppInit") << "Attempting login as: " << gFirstname << " " << gLastname << LL_ENDL;
+			gDebugInfo["LoginName"] = gFirstname + " " + gLastname;	
 		}
 
 		// create necessary directories
 		// *FIX: these mkdir's should error check
-		gDirUtilp->setLindenUserDir(firstname, lastname);
+		gDirUtilp->setLindenUserDir(gFirstname, gLastname);
     	LLFile::mkdir(gDirUtilp->getLindenUserDir());
 
         // Set PerAccountSettingsFile to the default value.
@@ -887,7 +861,7 @@ bool idle_startup()
 			gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath"));		
 		}
 		
-		gDirUtilp->setPerAccountChatLogsDir(firstname, lastname);
+		gDirUtilp->setPerAccountChatLogsDir(gFirstname, gLastname);
 
 		LLFile::mkdir(gDirUtilp->getChatLogsDir());
 		LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir());
@@ -908,13 +882,6 @@ bool idle_startup()
 
 		if (show_connect_box)
 		{
-			if ( LLPanelLogin::isGridComboDirty() )
-			{
-				// User picked a grid from the popup, so clear the 
-				// stored uris and they will be reacquired from the grid choice.
-				sAuthUris.clear();
-			}
-			
 			std::string location;
 			LLPanelLogin::getLocation( location );
 			LLURLSimString::setString( location );
@@ -944,7 +911,7 @@ bool idle_startup()
 			agent_location_id = START_LOCATION_ID_URL;
 
 			// doesn't really matter what location_which is, since
-			// agent_start_look_at will be overwritten when the
+			// gAgentStartLookAt will be overwritten when the
 			// UserLoginLocationReply arrives
 			location_which = START_LOCATION_ID_LAST;
 		}
@@ -977,594 +944,115 @@ bool idle_startup()
 
 		gVFS->pokeFiles();
 
-		// skipping over STATE_UPDATE_CHECK because that just waits for input
 		LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
 
 		return FALSE;
 	}
 
-	if (STATE_UPDATE_CHECK == LLStartUp::getStartupState())
-	{
-		// wait for user to give input via dialog box
-		return FALSE;
-	}
-
 	if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState())
 	{
-//#define LL_MINIMIAL_REQUESTED_OPTIONS
 		gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel();
 
-		// *Note: this is where gUserAuth used to be created.
-		requested_options.clear();
-		requested_options.push_back("inventory-root");
-		requested_options.push_back("inventory-skeleton");
-		//requested_options.push_back("inventory-meat");
-		//requested_options.push_back("inventory-skel-targets");
-#if (!defined LL_MINIMIAL_REQUESTED_OPTIONS)
-		if(FALSE == gSavedSettings.getBOOL("NoInventoryLibrary"))
-		{
-			requested_options.push_back("inventory-lib-root");
-			requested_options.push_back("inventory-lib-owner");
-			requested_options.push_back("inventory-skel-lib");
-		//	requested_options.push_back("inventory-meat-lib");
-		}
-
-		requested_options.push_back("initial-outfit");
-		requested_options.push_back("gestures");
-		requested_options.push_back("event_categories");
-		requested_options.push_back("event_notifications");
-		requested_options.push_back("classified_categories");
-		//requested_options.push_back("inventory-targets");
-		requested_options.push_back("buddy-list");
-		requested_options.push_back("ui-config");
-#endif
-		requested_options.push_back("tutorial_setting");
-		requested_options.push_back("login-flags");
-		requested_options.push_back("global-textures");
-		if(gSavedSettings.getBOOL("ConnectAsGod"))
-		{
-			gSavedSettings.setBOOL("UseDebugMenus", TRUE);
-			requested_options.push_back("god-connect");
-		}
-		std::vector<std::string> uris;
-		LLViewerLogin::getInstance()->getLoginURIs(uris);
-		std::vector<std::string>::const_iterator iter, end;
-		for (iter = uris.begin(), end = uris.end(); iter != end; ++iter)
-		{
-			std::vector<std::string> rewritten;
-			rewritten = LLSRV::rewriteURI(*iter);
-			sAuthUris.insert(sAuthUris.end(),
-							 rewritten.begin(), rewritten.end());
-		}
-		sAuthUriNum = 0;
-		auth_method = "login_to_simulator";
-		
+		// Update progress status and the display loop.
 		auth_desc = LLTrans::getString("LoginInProgress");
-		LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
-	}
-
-	if (STATE_LOGIN_AUTHENTICATE == LLStartUp::getStartupState())
-	{
-		LL_DEBUGS("AppInit") << "STATE_LOGIN_AUTHENTICATE" << LL_ENDL;
 		set_startup_status(progress, auth_desc, auth_message);
 		progress += 0.02f;
 		display_startup();
-		
-		std::stringstream start;
-		if (LLURLSimString::parse())
-		{
-			// a startup URL was specified
-			std::stringstream unescaped_start;
-			unescaped_start << "uri:" 
-							<< LLURLSimString::sInstance.mSimName << "&" 
-							<< LLURLSimString::sInstance.mX << "&" 
-							<< LLURLSimString::sInstance.mY << "&" 
-							<< LLURLSimString::sInstance.mZ;
-			start << xml_escape_string(unescaped_start.str());
-			
-		}
-		else
-		{
-			start << gSavedSettings.getString("LoginLocation");
-		}
-
-		char hashed_mac_string[MD5HEX_STR_SIZE];		/* Flawfinder: ignore */
-		LLMD5 hashed_mac;
-		hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES );
-		hashed_mac.finalize();
-		hashed_mac.hex_digest(hashed_mac_string);
-
-		// TODO if statement here to use web_login_key
-		sAuthUriNum = llclamp(sAuthUriNum, 0, (S32)sAuthUris.size()-1);
-		LLUserAuth::getInstance()->authenticate(
-			sAuthUris[sAuthUriNum],
-			auth_method,
-			firstname,
-			lastname,			
-			password, // web_login_key,
-			start.str(),
-			gSkipOptionalUpdate,
-			gAcceptTOS,
-			gAcceptCriticalMessage,
-			gLastExecEvent,
-			requested_options,
-			hashed_mac_string,
-			LLAppViewer::instance()->getSerialNumber());
-
-		// reset globals
-		gAcceptTOS = FALSE;
-		gAcceptCriticalMessage = FALSE;
-		LLStartUp::setStartupState( STATE_LOGIN_NO_DATA_YET );
-		return FALSE;
-	}
 
-	if(STATE_LOGIN_NO_DATA_YET == LLStartUp::getStartupState())
-	{
-		LL_DEBUGS("AppInit") << "STATE_LOGIN_NO_DATA_YET" << LL_ENDL;
-		// If we get here we have gotten past the potential stall
-		// in curl, so take "may appear frozen" out of progress bar. JC
-		auth_desc = LLTrans::getString("LoginInProgressNoFrozen");
-		set_startup_status(progress, auth_desc, auth_message);
-		// Process messages to keep from dropping circuit.
-		LLMessageSystem* msg = gMessageSystem;
-		while (msg->checkAllMessages(gFrameCount, gServicePump))
+		// Setting initial values...
+		if(gNoRender)
 		{
+			// HACK, skip optional updates if you're running drones
+			LLLoginInstance::getInstance()->setSkipOptionalUpdate(true);
 		}
-		msg->processAcks();
-		LLUserAuth::UserAuthcode error = LLUserAuth::getInstance()->authResponse();
-		if(LLUserAuth::E_NO_RESPONSE_YET == error)
-		{
-			LL_DEBUGS("AppInit") << "waiting..." << LL_ENDL;
-			return FALSE;
-		}
-		LLStartUp::setStartupState( STATE_LOGIN_DOWNLOADING );
-		progress += 0.01f;
-		set_startup_status(progress, auth_desc, auth_message);
-		return FALSE;
-	}
 
-	if(STATE_LOGIN_DOWNLOADING == LLStartUp::getStartupState())
-	{
-		LL_DEBUGS("AppInit") << "STATE_LOGIN_DOWNLOADING" << LL_ENDL;
-		// Process messages to keep from dropping circuit.
-		LLMessageSystem* msg = gMessageSystem;
-		while (msg->checkAllMessages(gFrameCount, gServicePump))
-		{
-		}
-		msg->processAcks();
-		LLUserAuth::UserAuthcode error = LLUserAuth::getInstance()->authResponse();
-		if(LLUserAuth::E_DOWNLOADING == error)
-		{
-			LL_DEBUGS("AppInit") << "downloading..." << LL_ENDL;
-			return FALSE;
-		}
+		LLLoginInstance::getInstance()->setUserInteraction(show_connect_box);
+
+		// This call to LLLoginInstance::connect() starts the 
+		// authentication process.
+		LLSD credentials;
+		credentials["first"] = gFirstname;
+		credentials["last"] = gLastname;
+		credentials["passwd"] = gPassword;
+		LLLoginInstance::getInstance()->connect(credentials);
+
 		LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE );
-		progress += 0.01f;
-		set_startup_status(progress, LLTrans::getString("LoginProcessingResponse"), auth_message);
 		return FALSE;
 	}
 
-	if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState())
+	if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState()) 
 	{
-		LL_DEBUGS("AppInit") << "STATE_LOGIN_PROCESS_RESPONSE" << LL_ENDL;
+		bool transitionBackToLoginPanel = false;
 		std::ostringstream emsg;
-		bool quit = false;
-		bool update = false;
-		std::string login_response;
-		std::string reason_response;
-		std::string message_response;
-		bool successful_login = false;
-		LLUserAuth::UserAuthcode error = LLUserAuth::getInstance()->authResponse();
-		// reset globals
-		gAcceptTOS = FALSE;
-		gAcceptCriticalMessage = FALSE;
-		switch(error)
-		{
-		case LLUserAuth::E_OK:
-			login_response = LLUserAuth::getInstance()->getResponse("login");
-			if(login_response == "true")
-			{
-				// Yay, login!
-				successful_login = true;
-			}
-			else if(login_response == "indeterminate")
+		if(LLLoginInstance::getInstance()->authFailure())
+		{
+			// Still have error conditions that may need some 
+			// sort of handling.
+			emsg << "Login failed.\n";
+			std::string reason_response = LLLoginInstance::getInstance()->getResponse("reason");
+			std::string message_response = LLLoginInstance::getInstance()->getResponse("message");
+	
+			if(!message_response.empty())
 			{
-				LL_INFOS("AppInit") << "Indeterminate login..." << LL_ENDL;
-				sAuthUris = LLSRV::rewriteURI(LLUserAuth::getInstance()->getResponse("next_url"));
-				sAuthUriNum = 0;
-				auth_method = LLUserAuth::getInstance()->getResponse("next_method");
-				auth_message = LLUserAuth::getInstance()->getResponse("message");
-				if(auth_method.substr(0, 5) == "login")
+				// XUI: fix translation for strings returned during login
+				// We need a generic table for translations
+				std::string big_reason = LLAgent::sTeleportErrorMessages[ message_response ];
+				if ( big_reason.size() == 0 )
 				{
-					auth_desc.assign(LLTrans::getString("LoginAuthenticating"));
+					emsg << message_response;
 				}
 				else
 				{
-					auth_desc.assign(LLTrans::getString("LoginMaintenance"));
-				}
-				// ignoring the duration & options array for now.
-				// Go back to authenticate.
-				LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
-				return FALSE;
-			}
-			else
-			{
-				emsg << "Login failed.\n";
-				reason_response = LLUserAuth::getInstance()->getResponse("reason");
-				message_response = LLUserAuth::getInstance()->getResponse("message");
-
-				if (!message_response.empty())
-				{
-					// XUI: fix translation for strings returned during login
-					// We need a generic table for translations
-					std::string big_reason = LLAgent::sTeleportErrorMessages[ message_response ];
-					if ( big_reason.size() == 0 )
-					{
-						emsg << message_response;
-					}
-					else
-					{
-						emsg << big_reason;
-					}
-				}
-
-				if(reason_response == "tos")
-				{
-					if (show_connect_box)
-					{
-						LL_DEBUGS("AppInit") << "Need tos agreement" << LL_ENDL;
-						LLStartUp::setStartupState( STATE_UPDATE_CHECK );
-						LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
-																	message_response);
-						tos_dialog->startModal();
-						// LLFloaterTOS deletes itself.
-						return false;
-					}
-					else
-					{
-						quit = true;
-					}
-				}
-				if(reason_response == "critical")
-				{
-					if (show_connect_box)
-					{
-						LL_DEBUGS("AppInit") << "Need critical message" << LL_ENDL;
-						LLStartUp::setStartupState( STATE_UPDATE_CHECK );
-						LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
-																	message_response);
-						tos_dialog->startModal();
-						// LLFloaterTOS deletes itself.
-						return false;
-					}
-					else
-					{
-						quit = true;
-					}
-				}
-				if(reason_response == "key")
-				{
-					// Couldn't login because user/password is wrong
-					// Clear the password
-					password = "";
-				}
-				if(reason_response == "update")
-				{
-					auth_message = LLUserAuth::getInstance()->getResponse("message");
-					update = true;
-				}
-				if(reason_response == "optional")
-				{
-					LL_DEBUGS("AppInit") << "Login got optional update" << LL_ENDL;
-					auth_message = LLUserAuth::getInstance()->getResponse("message");
-					if (show_connect_box)
-					{
-						update_app(FALSE, auth_message);
-						LLStartUp::setStartupState( STATE_UPDATE_CHECK );
-						gSkipOptionalUpdate = TRUE;
-						return false;
-					}
+					emsg << big_reason;
 				}
 			}
-			break;
-		case LLUserAuth::E_COULDNT_RESOLVE_HOST:
-		case LLUserAuth::E_SSL_PEER_CERTIFICATE:
-		case LLUserAuth::E_UNHANDLED_ERROR:
-		case LLUserAuth::E_SSL_CACERT:
-		case LLUserAuth::E_SSL_CONNECT_ERROR:
-		default:
-			if (sAuthUriNum >= (int) sAuthUris.size() - 1)
-			{
-				emsg << "Unable to connect to " << LLAppViewer::instance()->getSecondLifeTitle() << ".\n";
-				emsg << LLUserAuth::getInstance()->errorMessage();
-			} else {
-				sAuthUriNum++;
-				std::ostringstream s;
-				LLStringUtil::format_map_t args;
-				args["[NUMBER]"] = llformat("%d", sAuthUriNum + 1);
-				auth_desc = LLTrans::getString("LoginAttempt", args);
-				LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
-				return FALSE;
-			}
-			break;
-		}
-
-		if (update || gSavedSettings.getBOOL("ForceMandatoryUpdate"))
-		{
-			gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE);
-			update_app(TRUE, auth_message);
-			LLStartUp::setStartupState( STATE_UPDATE_CHECK );
-			return false;
-		}
-
-		// Version update and we're not showing the dialog
-		if(quit)
-		{
-			LLUserAuth::getInstance()->reset();
-			LLAppViewer::instance()->forceQuit();
-			return false;
-		}
 
-		if(successful_login)
-		{
-			std::string text;
-			text = LLUserAuth::getInstance()->getResponse("udp_blacklist");
-			if(!text.empty())
-			{
-				apply_udp_blacklist(text);
-			}
-
-			// unpack login data needed by the application
-			text = LLUserAuth::getInstance()->getResponse("agent_id");
-			if(!text.empty()) gAgentID.set(text);
-			gDebugInfo["AgentID"] = text;
-			
-			text = LLUserAuth::getInstance()->getResponse("session_id");
-			if(!text.empty()) gAgentSessionID.set(text);
-			gDebugInfo["SessionID"] = text;
-			
-			text = LLUserAuth::getInstance()->getResponse("secure_session_id");
-			if(!text.empty()) gAgent.mSecureSessionID.set(text);
-
-			text = LLUserAuth::getInstance()->getResponse("first_name");
-			if(!text.empty()) 
+			if(reason_response == "key")
 			{
-				// Remove quotes from string.  Login.cgi sends these to force
-				// names that look like numbers into strings.
-				firstname.assign(text);
-				LLStringUtil::replaceChar(firstname, '"', ' ');
-				LLStringUtil::trim(firstname);
+				// Couldn't login because user/password is wrong
+				// Clear the password
+				gPassword = "";
 			}
-			text = LLUserAuth::getInstance()->getResponse("last_name");
-			if(!text.empty()) lastname.assign(text);
-			gSavedSettings.setString("FirstName", firstname);
-			gSavedSettings.setString("LastName", lastname);
 
-			if (gSavedSettings.getBOOL("RememberPassword"))
+			if(reason_response == "update" 
+				|| reason_response == "optional")
 			{
-				// Successful login means the password is valid, so save it.
-				LLStartUp::savePasswordToDisk(password);
+				// In the case of a needed update, quit.
+				// Its either downloading or declined.
+				// If optional was skipped this case shouldn't 
+				// be reached.
+				LLLoginInstance::getInstance()->disconnect();
+				LLAppViewer::instance()->forceQuit();
 			}
 			else
 			{
-				// Don't leave password from previous session sitting around
-				// during this login session.
-				LLStartUp::deletePasswordFromDisk();
-			}
-
-			// this is their actual ability to access content
-			text = LLUserAuth::getInstance()->getResponse("agent_access_max");
-			if (!text.empty())
-			{
-				// agent_access can be 'A', 'M', and 'PG'.
-				gAgent.setMaturity(text[0]);
-			}
-			
-			// this is the value of their preference setting for that content
-			// which will always be <= agent_access_max
-			text = LLUserAuth::getInstance()->getResponse("agent_region_access");
-			if (!text.empty())
-			{
-				int preferredMaturity = LLAgent::convertTextToMaturity(text[0]);
-				gSavedSettings.setU32("PreferredMaturity", preferredMaturity);
-			}
-			// During the AO transition, this flag will be true. Then the flag will
-			// go away. After the AO transition, this code and all the code that
-			// uses it can be deleted.
-			text = LLUserAuth::getInstance()->getResponse("ao_transition");
-			if (!text.empty())
-			{
-				if (text == "1")
-				{
-					gAgent.setAOTransition();
-				}
-			}
-
-			text = LLUserAuth::getInstance()->getResponse("start_location");
-			if(!text.empty()) agent_start_location.assign(text);
-			text = LLUserAuth::getInstance()->getResponse("circuit_code");
-			if(!text.empty())
-			{
-				gMessageSystem->mOurCircuitCode = strtoul(text.c_str(), NULL, 10);
-			}
-			std::string sim_ip_str = LLUserAuth::getInstance()->getResponse("sim_ip");
-			std::string sim_port_str = LLUserAuth::getInstance()->getResponse("sim_port");
-			if(!sim_ip_str.empty() && !sim_port_str.empty())
-			{
-				U32 sim_port = strtoul(sim_port_str.c_str(), NULL, 10);
-				first_sim.set(sim_ip_str, sim_port);
-				if (first_sim.isOk())
-				{
-					gMessageSystem->enableCircuit(first_sim, TRUE);
-				}
-			}
-			std::string region_x_str = LLUserAuth::getInstance()->getResponse("region_x");
-			std::string region_y_str = LLUserAuth::getInstance()->getResponse("region_y");
-			if(!region_x_str.empty() && !region_y_str.empty())
-			{
-				U32 region_x = strtoul(region_x_str.c_str(), NULL, 10);
-				U32 region_y = strtoul(region_y_str.c_str(), NULL, 10);
-				first_sim_handle = to_region_handle(region_x, region_y);
-			}
-			
-			const std::string look_at_str = LLUserAuth::getInstance()->getResponse("look_at");
-			if (!look_at_str.empty())
-			{
-				size_t len = look_at_str.size();
-				LLMemoryStream mstr((U8*)look_at_str.c_str(), len);
-				LLSD sd = LLSDSerialize::fromNotation(mstr, len);
-				agent_start_look_at = ll_vector3_from_sd(sd);
-			}
-
-			text = LLUserAuth::getInstance()->getResponse("seed_capability");
-			if (!text.empty()) first_sim_seed_cap = text;
-						
-			text = LLUserAuth::getInstance()->getResponse("seconds_since_epoch");
-			if(!text.empty())
-			{
-				U32 server_utc_time = strtoul(text.c_str(), NULL, 10);
-				if(server_utc_time)
-				{
-					time_t now = time(NULL);
-					gUTCOffset = (server_utc_time - now);
-				}
-			}
-
-			std::string home_location = LLUserAuth::getInstance()->getResponse("home");
-			if(!home_location.empty())
-			{
-				size_t len = home_location.size();
-				LLMemoryStream mstr((U8*)home_location.c_str(), len);
-				LLSD sd = LLSDSerialize::fromNotation(mstr, len);
-				S32 region_x = sd["region_handle"][0].asInteger();
-				S32 region_y = sd["region_handle"][1].asInteger();
-				U64 region_handle = to_region_handle(region_x, region_y);
-				LLVector3 position = ll_vector3_from_sd(sd["position"]);
-				gAgent.setHomePosRegion(region_handle, position);
-			}
-
-			gAgent.mMOTD.assign(LLUserAuth::getInstance()->getResponse("message"));
-			LLUserAuth::options_t options;
-			if(LLUserAuth::getInstance()->getOptions("inventory-root", options))
-			{
-				LLUserAuth::response_t::iterator it;
-				it = options[0].find("folder_id");
-				if(it != options[0].end())
-				{
-					gAgent.mInventoryRootID.set((*it).second);
-					//gInventory.mock(gAgent.getInventoryRootID());
-				}
-			}
-
-			options.clear();
-			if(LLUserAuth::getInstance()->getOptions("login-flags", options))
-			{
-				LLUserAuth::response_t::iterator it;
-				LLUserAuth::response_t::iterator no_flag = options[0].end();
-				it = options[0].find("ever_logged_in");
-				if(it != no_flag)
-				{
-					if((*it).second == "N") gAgent.setFirstLogin(TRUE);
-					else gAgent.setFirstLogin(FALSE);
-				}
-				it = options[0].find("stipend_since_login");
-				if(it != no_flag)
-				{
-					if((*it).second == "Y") stipend_since_login = true;
-				}
-				it = options[0].find("gendered");
-				if(it != no_flag)
-				{
-					if((*it).second == "Y") gAgent.setGenderChosen(TRUE);
-				}
-				it = options[0].find("daylight_savings");
-				if(it != no_flag)
-				{
-					if((*it).second == "Y")  gPacificDaylightTime = TRUE;
-					else gPacificDaylightTime = FALSE;
-				}
-
-				//setup map of datetime strings to codes and slt & local time offset from utc
-				LLStringOps::setupDatetimeInfo (gPacificDaylightTime);
+				transitionBackToLoginPanel = true;
 			}
-			options.clear();
-			if (LLUserAuth::getInstance()->getOptions("initial-outfit", options)
-				&& !options.empty())
-			{
-				LLUserAuth::response_t::iterator it;
-				LLUserAuth::response_t::iterator it_end = options[0].end();
-				it = options[0].find("folder_name");
-				if(it != it_end)
-				{
-					// Initial outfit is a folder in your inventory,
-					// must be an exact folder-name match.
-					sInitialOutfit = (*it).second;
-				}
-				it = options[0].find("gender");
-				if (it != it_end)
-				{
-					sInitialOutfitGender = (*it).second;
-				}
-			}
-
-			options.clear();
-			if(LLUserAuth::getInstance()->getOptions("global-textures", options))
-			{
-				// Extract sun and moon texture IDs.  These are used
-				// in the LLVOSky constructor, but I can't figure out
-				// how to pass them in.  JC
-				LLUserAuth::response_t::iterator it;
-				LLUserAuth::response_t::iterator no_texture = options[0].end();
-				it = options[0].find("sun_texture_id");
-				if(it != no_texture)
-				{
-					gSunTextureID.set((*it).second);
-				}
-				it = options[0].find("moon_texture_id");
-				if(it != no_texture)
-				{
-					gMoonTextureID.set((*it).second);
-				}
-				it = options[0].find("cloud_texture_id");
-				if(it != no_texture)
-				{
-					gCloudTextureID.set((*it).second);
-				}
-			}
-
-
-			// JC: gesture loading done below, when we have an asset system
-			// in place.  Don't delete/clear user_credentials until then.
-
-			if(gAgentID.notNull()
-			   && gAgentSessionID.notNull()
-			   && gMessageSystem->mOurCircuitCode
-			   && first_sim.isOk()
-			   && gAgent.mInventoryRootID.notNull())
+		}
+		else if(LLLoginInstance::getInstance()->authSuccess())
+		{
+			if(process_login_success_response())
 			{
-				LLStartUp::setStartupState( STATE_WORLD_INIT );
+				// Pass the user information to the voice chat server interface.
+				gVoiceClient->userAuthorized(gFirstname, gLastname, gAgentID);
+				LLStartUp::setStartupState( STATE_WORLD_INIT);
 			}
 			else
 			{
-				if (gNoRender)
-				{
-					LL_WARNS("AppInit") << "Bad login - missing return values" << LL_ENDL;
-					LL_WARNS("AppInit") << emsg << LL_ENDL;
-					exit(0);
-				}
-				// Bounce back to the login screen.
-				LLSD args;
-				args["ERROR_MESSAGE"] = emsg.str();
-				LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
-				reset_login();
-				gSavedSettings.setBOOL("AutoLogin", FALSE);
-				show_connect_box = true;
+				transitionBackToLoginPanel = false;
 			}
-			
-			// Pass the user information to the voice chat server interface.
-			gVoiceClient->userAuthorized(firstname, lastname, gAgentID);
 		}
-		else // if(successful_login)
+		else
+		{
+			// Still waiting for response.
+			// *TODO:Mani - Actually check for login progress.
+			// If we get here we have gotten past the potential stall
+			// in curl, so take "may appear frozen" out of progress bar. JC
+			auth_desc = LLTrans::getString("LoginInProgressNoFrozen");
+			set_startup_status(progress, auth_desc, auth_message);
+		}
+
+		if(transitionBackToLoginPanel)
 		{
 			if (gNoRender)
 			{
@@ -1572,11 +1060,12 @@ bool idle_startup()
 				LL_WARNS("AppInit") << emsg << LL_ENDL;
 				exit(0);
 			}
+
 			// Bounce back to the login screen.
 			LLSD args;
 			args["ERROR_MESSAGE"] = emsg.str();
 			LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
-			reset_login();
+			reset_login(); // calls LLStartUp::setStartupState( STATE_LOGIN_SHOW );
 			gSavedSettings.setBOOL("AutoLogin", FALSE);
 			show_connect_box = true;
 		}
@@ -1640,14 +1129,14 @@ bool idle_startup()
 		// This is necessary because creating objects before this is set will result in a
 		// bad mPositionAgent cache.
 
-		gAgent.initOriginGlobal(from_region_handle(first_sim_handle));
+		gAgent.initOriginGlobal(from_region_handle(gFirstSimHandle));
 
-		LLWorld::getInstance()->addRegion(first_sim_handle, first_sim);
+		LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim);
 
-		LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(first_sim_handle);
+		LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(gFirstSimHandle);
 		LL_INFOS("AppInit") << "Adding initial simulator " << regionp->getOriginGlobal() << LL_ENDL;
 		
-		regionp->setSeedCapability(first_sim_seed_cap);
+		regionp->setSeedCapability(gFirstSimSeedCap);
 		LL_DEBUGS("AppInit") << "Waiting for seed grant ...." << LL_ENDL;
 		
 		// Set agent's initial region to be the one we just created.
@@ -1818,7 +1307,7 @@ bool idle_startup()
 		// the coordinates handed to us to fit in the local region.
 
 		gAgent.setPositionAgent(agent_start_position_region);
-		gAgent.resetAxes(agent_start_look_at);
+		gAgent.resetAxes(gAgentStartLookAt);
 		gAgent.stopCameraAnimation();
 		gAgent.resetCamera();
 
@@ -1857,18 +1346,18 @@ bool idle_startup()
 			LL_WARNS("AppInit") << "Attempting to connect to simulator with a zero circuit code!" << LL_ENDL;
 		}
 
-		gUseCircuitCallbackCalled = FALSE;
+		gUseCircuitCallbackCalled = false;
 
-		msg->enableCircuit(first_sim, TRUE);
+		msg->enableCircuit(gFirstSim, TRUE);
 		// now, use the circuit info to tell simulator about us!
-		LL_INFOS("AppInit") << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << LL_ENDL;
+		LL_INFOS("AppInit") << "viewer: UserLoginLocationReply() Enabling " << gFirstSim << " with code " << msg->mOurCircuitCode << LL_ENDL;
 		msg->newMessageFast(_PREHASH_UseCircuitCode);
 		msg->nextBlockFast(_PREHASH_CircuitCode);
 		msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode);
 		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
 		msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
 		msg->sendReliable(
-			first_sim,
+			gFirstSim,
 			MAX_TIMEOUT_COUNT,
 			FALSE,
 			TIMEOUT_SECONDS,
@@ -1979,122 +1468,113 @@ bool idle_startup()
 		LLAgentLanguage::update();
 
 		// unpack thin inventory
-		LLUserAuth::options_t options;
-		options.clear();
+		LLSD response = LLLoginInstance::getInstance()->getResponse();
 		//bool dump_buffer = false;
-		
-		if(LLUserAuth::getInstance()->getOptions("inventory-lib-root", options)
-			&& !options.empty())
+
+		LLSD inv_lib_root = response["inventory-lib-root"];
+		if(inv_lib_root.isDefined())
 		{
 			// should only be one
-			LLUserAuth::response_t::iterator it;
-			it = options[0].find("folder_id");
-			if(it != options[0].end())
+			LLSD id = inv_lib_root[0]["folder_id"];
+			if(id.isDefined())
 			{
-				gInventoryLibraryRoot.set((*it).second);
+				gInventoryLibraryRoot = id.asUUID();
 			}
 		}
- 		options.clear();
-		if(LLUserAuth::getInstance()->getOptions("inventory-lib-owner", options)
-			&& !options.empty())
+ 		
+		LLSD inv_lib_owner = response["inventory-lib-owner"];
+		if(inv_lib_owner.isDefined())
 		{
 			// should only be one
-			LLUserAuth::response_t::iterator it;
-			it = options[0].find("agent_id");
-			if(it != options[0].end())
+			LLSD id = inv_lib_owner[0]["agent_id"];
+			if(id.isDefined())
 			{
-				gInventoryLibraryOwner.set((*it).second);
+				gInventoryLibraryOwner = id.asUUID();
 			}
 		}
- 		options.clear();
- 		if(LLUserAuth::getInstance()->getOptions("inventory-skel-lib", options)
-			&& gInventoryLibraryOwner.notNull())
+
+		LLSD inv_skel_lib = response["inventory-skel-lib"];
+ 		if(inv_skel_lib.isDefined() && gInventoryLibraryOwner.notNull())
  		{
- 			if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner))
+ 			if(!gInventory.loadSkeleton(inv_skel_lib, gInventoryLibraryOwner))
  			{
  				LL_WARNS("AppInit") << "Problem loading inventory-skel-lib" << LL_ENDL;
  			}
  		}
- 		options.clear();
- 		if(LLUserAuth::getInstance()->getOptions("inventory-skeleton", options))
+
+		LLSD inv_skeleton = response["inventory-skeleton"];
+ 		if(inv_skeleton.isDefined())
  		{
- 			if(!gInventory.loadSkeleton(options, gAgent.getID()))
+ 			if(!gInventory.loadSkeleton(inv_skeleton, gAgent.getID()))
  			{
  				LL_WARNS("AppInit") << "Problem loading inventory-skel-targets" << LL_ENDL;
  			}
  		}
 
-		options.clear();
- 		if(LLUserAuth::getInstance()->getOptions("buddy-list", options))
+		LLSD buddy_list = response["buddy-list"];
+ 		if(buddy_list.isDefined())
  		{
-			LLUserAuth::options_t::iterator it = options.begin();
-			LLUserAuth::options_t::iterator end = options.end();
 			LLAvatarTracker::buddy_map_t list;
 			LLUUID agent_id;
 			S32 has_rights = 0, given_rights = 0;
-			for (; it != end; ++it)
+			for(LLSD::array_const_iterator it = buddy_list.beginArray(),
+				end = buddy_list.endArray(); it != end; ++it)
 			{
-				LLUserAuth::response_t::const_iterator option_it;
-				option_it = (*it).find("buddy_id");
-				if(option_it != (*it).end())
+				LLSD buddy_id = (*it)["buddy_id"];
+				if(buddy_id.isDefined())
 				{
-					agent_id.set((*option_it).second);
+					agent_id = buddy_id.asUUID();
 				}
-				option_it = (*it).find("buddy_rights_has");
-				if(option_it != (*it).end())
+
+				LLSD buddy_rights_has = (*it)["buddy_rights_has"];
+				if(buddy_rights_has.isDefined())
 				{
-					has_rights = atoi((*option_it).second.c_str());
+					has_rights = buddy_rights_has.asInteger();
 				}
-				option_it = (*it).find("buddy_rights_given");
-				if(option_it != (*it).end())
+
+				LLSD buddy_rights_given = (*it)["buddy_rights_given"];
+				if(buddy_rights_given.isDefined())
 				{
-					given_rights = atoi((*option_it).second.c_str());
+					given_rights = buddy_rights_given.asInteger();
 				}
+
 				list[agent_id] = new LLRelationship(given_rights, has_rights, false);
 			}
 			LLAvatarTracker::instance().addBuddyList(list);
  		}
 
-		options.clear();
- 		if(LLUserAuth::getInstance()->getOptions("ui-config", options))
+		LLSD ui_config = response["ui-config"];
+ 		if(ui_config.isDefined())
  		{
-			LLUserAuth::options_t::iterator it = options.begin();
-			LLUserAuth::options_t::iterator end = options.end();
-			for (; it != end; ++it)
+			for(LLSD::array_const_iterator it = ui_config.beginArray(),
+				end = ui_config.endArray(); it != end; ++it)
 			{
-				LLUserAuth::response_t::const_iterator option_it;
-				option_it = (*it).find("allow_first_life");
-				if(option_it != (*it).end())
+				LLSD allow_first_life = (*it)["allow_first_life"];
+				if(allow_first_life.asString() == "Y")
 				{
-					if (option_it->second == "Y")
-					{
-						LLPanelAvatar::sAllowFirstLife = TRUE;
-					}
+					LLPanelAvatar::sAllowFirstLife = TRUE;
 				}
 			}
  		}
-		options.clear();
+
 		bool show_hud = false;
-		if(LLUserAuth::getInstance()->getOptions("tutorial_setting", options))
+		LLSD tutorial_setting = response["tutorial_setting"];
+		if(tutorial_setting.isDefined())
 		{
-			LLUserAuth::options_t::iterator it = options.begin();
-			LLUserAuth::options_t::iterator end = options.end();
-			for (; it != end; ++it)
+			for(LLSD::array_const_iterator it = tutorial_setting.beginArray(),
+				end = tutorial_setting.endArray(); it != end; ++it)
 			{
-				LLUserAuth::response_t::const_iterator option_it;
-				option_it = (*it).find("tutorial_url");
-				if(option_it != (*it).end())
+				LLSD tutorial_url = (*it)["tutorial_url"];
+				if(tutorial_url.isDefined())
 				{
 					// Tutorial floater will append language code
-					gSavedSettings.setString("TutorialURL", option_it->second);
+					gSavedSettings.setString("TutorialURL", tutorial_url.asString());
 				}
-				option_it = (*it).find("use_tutorial");
-				if(option_it != (*it).end())
+				
+				LLSD use_tutorial = (*it)["use_tutorial"];
+				if(use_tutorial.asString() == "true")
 				{
-					if (option_it->second == "true")
-					{
-						show_hud = true;
-					}
+					show_hud = true;
 				}
 			}
 		}
@@ -2107,19 +1587,22 @@ bool idle_startup()
 			LLFloaterHUD::showHUD();
 		}
 
-		options.clear();
-		if(LLUserAuth::getInstance()->getOptions("event_categories", options))
+		LLSD event_categories = response["event_categories"];
+		if(event_categories.isDefined())
 		{
-			LLEventInfo::loadCategories(options);
+			LLEventInfo::loadCategories(event_categories);
 		}
-		if(LLUserAuth::getInstance()->getOptions("event_notifications", options))
+
+		LLSD event_notifications = response["event_notifications"];
+		if(event_notifications.isDefined())
 		{
-			gEventNotifier.load(options);
+			gEventNotifier.load(event_notifications);
 		}
-		options.clear();
-		if(LLUserAuth::getInstance()->getOptions("classified_categories", options))
+
+		LLSD classified_categories = response["classified_categories"];
+		if(classified_categories.isDefined())
 		{
-			LLClassifiedInfo::loadCategories(options);
+			LLClassifiedInfo::loadCategories(classified_categories);
 		}
 
 
@@ -2176,7 +1659,7 @@ bool idle_startup()
 			// This is actually a pessimistic computation, because TCP may not have enough
 			// time to ramp up on the (small) default inventory file to truly measure max
 			// bandwidth. JC
-			F64 rate_bps = LLUserAuth::getInstance()->getLastTransferRateBPS();
+			F64 rate_bps = LLLoginInstance::getInstance()->getLastTransferRateBPS();
 			const F32 FAST_RATE_BPS = 600.f * 1024.f;
 			const F32 FASTER_RATE_BPS = 750.f * 1024.f;
 			F32 max_bandwidth = gViewerThrottle.getMaxBandwidth();
@@ -2223,34 +1706,20 @@ bool idle_startup()
 			// JC: Initialize "active" gestures.  This may also trigger
 			// many gesture downloads, if this is the user's first
 			// time on this machine or -purge has been run.
-			LLUserAuth::options_t gesture_options;
-			if (LLUserAuth::getInstance()->getOptions("gestures", gesture_options))
+			LLSD gesture_options 
+				= LLLoginInstance::getInstance()->getResponse("gestures");
+			if (gesture_options.isDefined())
 			{
 				LL_DEBUGS("AppInit") << "Gesture Manager loading " << gesture_options.size()
 					<< LL_ENDL;
 				std::vector<LLUUID> item_ids;
-				LLUserAuth::options_t::iterator resp_it;
-				for (resp_it = gesture_options.begin();
-					 resp_it != gesture_options.end();
-					 ++resp_it)
+				for(LLSD::array_const_iterator resp_it = gesture_options.beginArray(),
+					end = gesture_options.endArray(); resp_it != end; ++resp_it)
 				{
-					const LLUserAuth::response_t& response = *resp_it;
-					LLUUID item_id;
-					LLUUID asset_id;
-					LLUserAuth::response_t::const_iterator option_it;
-
-					option_it = response.find("item_id");
-					if (option_it != response.end())
-					{
-						const std::string& uuid_string = (*option_it).second;
-						item_id.set(uuid_string);
-					}
-					option_it = response.find("asset_id");
-					if (option_it != response.end())
-					{
-						const std::string& uuid_string = (*option_it).second;
-						asset_id.set(uuid_string);
-					}
+					// If the id is not specifed in the LLSD,
+					// the LLSD operator[]() will return a null LLUUID. 
+					LLUUID item_id = (*resp_it)["item_id"];
+					LLUUID asset_id = (*resp_it)["asset_id"];
 
 					if (item_id.notNull() && asset_id.notNull())
 					{
@@ -2306,8 +1775,8 @@ bool idle_startup()
 		if (!gAgent.isFirstLogin())
 		{
 			bool url_ok = LLURLSimString::sInstance.parse();
-			if ((url_ok && agent_start_location == "url") ||
-				(!url_ok && ((agent_start_location == gSavedSettings.getString("LoginLocation")))))
+			if ((url_ok && gAgentStartLocation == "url") ||
+				(!url_ok && ((gAgentStartLocation == gSavedSettings.getString("LoginLocation")))))
 			{
 				// Start location is OK
 				// Disabled code to restore camera location and focus if logging in to default location
@@ -2518,8 +1987,10 @@ bool idle_startup()
 		// then the data is cached for the viewer's lifetime)
 		LLProductInfoRequestManager::instance();
 		
+		// *FIX:Mani - What do I do here?
+		// Need we really clear the Auth response data?
 		// Clean up the userauth stuff.
-		LLUserAuth::getInstance()->reset();
+		// LLUserAuth::getInstance()->reset();
 
 		LLStartUp::setStartupState( STATE_STARTED );
 
@@ -2804,194 +2275,6 @@ bool login_alert_status(const LLSD& notification, const LLSD& response)
 	return false;
 }
 
-void update_app(BOOL mandatory, const std::string& auth_msg)
-{
-	// store off config state, as we might quit soon
-	gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);	
-	gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE);
-	std::ostringstream message;
-
-	std::string msg;
-	if (!auth_msg.empty())
-	{
-		msg = "("+ auth_msg + ") \n";
-	}
-
-	LLSD args;
-	args["MESSAGE"] = msg;
-	
-	LLSD payload;
-	payload["mandatory"] = mandatory;
-
-/*
- We're constructing one of the following 6 strings here:
-	 "DownloadWindowsMandatory"
-	 "DownloadWindowsReleaseForDownload"
-	 "DownloadWindows"
-	 "DownloadMacMandatory"
-	 "DownloadMacReleaseForDownload"
-	 "DownloadMac"
- 
- I've called them out explicitly in this comment so that they can be grepped for.
- 
- Also, we assume that if we're not Windows we're Mac. If we ever intend to support 
- Linux with autoupdate, this should be an explicit #elif LL_DARWIN, but 
- we'd rather deliver the wrong message than no message, so until Linux is supported
- we'll leave it alone.
- */
-	std::string notification_name = "Download";
-	
-#if LL_WINDOWS
-	notification_name += "Windows";
-#else
-	notification_name += "Mac";
-#endif
-	
-	if (mandatory)
-	{
-		notification_name += "Mandatory";
-	}
-	else
-	{
-#if LL_RELEASE_FOR_DOWNLOAD
-		notification_name += "ReleaseForDownload";
-#endif
-	}
-	
-	LLNotifications::instance().add(notification_name, args, payload, update_dialog_callback);
-	
-}
-
-bool update_dialog_callback(const LLSD& notification, const LLSD& response)
-{
-	S32 option = LLNotification::getSelectedOption(notification, response);
-	std::string update_exe_path;
-	bool mandatory = notification["payload"]["mandatory"].asBoolean();
-
-#if !LL_RELEASE_FOR_DOWNLOAD
-	if (option == 2)
-	{
-		LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); 
-		return false;
-	}
-#endif
-
-	if (option == 1)
-	{
-		// ...user doesn't want to do it
-		if (mandatory)
-		{
-			LLAppViewer::instance()->forceQuit();
-			// Bump them back to the login screen.
-			//reset_login();
-		}
-		else
-		{
-			LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
-		}
-		return false;
-	}
-	
-	LLSD query_map = LLSD::emptyMap();
-	// *TODO place os string in a global constant
-#if LL_WINDOWS  
-	query_map["os"] = "win";
-#elif LL_DARWIN
-	query_map["os"] = "mac";
-#elif LL_LINUX
-	query_map["os"] = "lnx";
-#elif LL_SOLARIS
-	query_map["os"] = "sol";
-#endif
-	// *TODO change userserver to be grid on both viewer and sim, since
-	// userserver no longer exists.
-	query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel();
-	query_map["channel"] = gSavedSettings.getString("VersionChannelName");
-	// *TODO constantize this guy
-	// *NOTE: This URL is also used in win_setup/lldownloader.cpp
-	LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map);
-	
-	if(LLAppViewer::sUpdaterInfo)
-	{
-		delete LLAppViewer::sUpdaterInfo ;
-	}
-	LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ;
-	
-#if LL_WINDOWS
-	LLAppViewer::sUpdaterInfo->mUpdateExePath = gDirUtilp->getTempFilename();
-	if (LLAppViewer::sUpdaterInfo->mUpdateExePath.empty())
-	{
-		delete LLAppViewer::sUpdaterInfo ;
-		LLAppViewer::sUpdaterInfo = NULL ;
-
-		// We're hosed, bail
-		LL_WARNS("AppInit") << "LLDir::getTempFilename() failed" << LL_ENDL;
-		LLAppViewer::instance()->forceQuit();
-		return false;
-	}
-
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += ".exe";
-
-	std::string updater_source = gDirUtilp->getAppRODataDir();
-	updater_source += gDirUtilp->getDirDelimiter();
-	updater_source += "updater.exe";
-
-	LL_DEBUGS("AppInit") << "Calling CopyFile source: " << updater_source
-			<< " dest: " << LLAppViewer::sUpdaterInfo->mUpdateExePath
-			<< LL_ENDL;
-
-
-	if (!CopyFileA(updater_source.c_str(), LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), FALSE))
-	{
-		delete LLAppViewer::sUpdaterInfo ;
-		LLAppViewer::sUpdaterInfo = NULL ;
-
-		LL_WARNS("AppInit") << "Unable to copy the updater!" << LL_ENDL;
-		LLAppViewer::instance()->forceQuit();
-		return false;
-	}
-
-	// if a sim name was passed in via command line parameter (typically through a SLURL)
-	if ( LLURLSimString::sInstance.mSimString.length() )
-	{
-		// record the location to start at next time
-		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
-	};
-
-	LLAppViewer::sUpdaterInfo->mParams << "-url \"" << update_url.asString() << "\"";
-
-	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << " " << LLAppViewer::sUpdaterInfo->mParams.str() << LL_ENDL;
-
-	//Explicitly remove the marker file, otherwise we pass the lock onto the child process and things get weird.
-	LLAppViewer::instance()->removeMarkerFile(); // In case updater fails
-	
-#elif LL_DARWIN
-	// if a sim name was passed in via command line parameter (typically through a SLURL)
-	if ( LLURLSimString::sInstance.mSimString.length() )
-	{
-		// record the location to start at next time
-		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
-	};
-	
-	LLAppViewer::sUpdaterInfo->mUpdateExePath = "'";
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += gDirUtilp->getAppRODataDir();
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += "/mac-updater.app/Contents/MacOS/mac-updater' -url \"";
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += update_url.asString();
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -name \"";
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += LLAppViewer::instance()->getSecondLifeTitle();
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" &";
-
-	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << LL_ENDL;
-
-	// Run the auto-updater.
-	system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
-
-#elif LL_LINUX || LL_SOLARIS
-	OSMessageBox(LLTrans::getString("MBNoAutoUpdate"), LLStringUtil::null, OSMB_OK);
-#endif
-	LLAppViewer::instance()->forceQuit();
-	return false;
-}
 
 void use_circuit_callback(void**, S32 result)
 {
@@ -3348,11 +2631,7 @@ std::string LLStartUp::startupStateToString(EStartupState state)
 		RTNENUM( STATE_LOGIN_SHOW );
 		RTNENUM( STATE_LOGIN_WAIT );
 		RTNENUM( STATE_LOGIN_CLEANUP );
-		RTNENUM( STATE_UPDATE_CHECK );
 		RTNENUM( STATE_LOGIN_AUTH_INIT );
-		RTNENUM( STATE_LOGIN_AUTHENTICATE );
-		RTNENUM( STATE_LOGIN_NO_DATA_YET );
-		RTNENUM( STATE_LOGIN_DOWNLOADING );
 		RTNENUM( STATE_LOGIN_PROCESS_RESPONSE );
 		RTNENUM( STATE_WORLD_INIT );
 		RTNENUM( STATE_SEED_GRANTED_WAIT );
@@ -3493,3 +2772,252 @@ void apply_udp_blacklist(const std::string& csv)
 	
 }
 
+bool process_login_success_response()
+{
+	LLSD response = LLLoginInstance::getInstance()->getResponse();
+
+	std::string text(response["udp_blacklist"]);
+	if(!text.empty())
+	{
+		apply_udp_blacklist(text);
+	}
+
+	// unpack login data needed by the application
+	text = response["agent_id"].asString();
+	if(!text.empty()) gAgentID.set(text);
+	gDebugInfo["AgentID"] = text;
+	
+	text = response["session_id"].asString();
+	if(!text.empty()) gAgentSessionID.set(text);
+	gDebugInfo["SessionID"] = text;
+	
+	text = response["secure_session_id"].asString();
+	if(!text.empty()) gAgent.mSecureSessionID.set(text);
+
+	text = response["first_name"].asString();
+	if(!text.empty()) 
+	{
+		// Remove quotes from string.  Login.cgi sends these to force
+		// names that look like numbers into strings.
+		gFirstname.assign(text);
+		LLStringUtil::replaceChar(gFirstname, '"', ' ');
+		LLStringUtil::trim(gFirstname);
+	}
+	text = response["last_name"].asString();
+	if(!text.empty()) 
+	{
+		gLastname.assign(text);
+	}
+	gSavedSettings.setString("FirstName", gFirstname);
+	gSavedSettings.setString("LastName", gLastname);
+
+	if (gSavedSettings.getBOOL("RememberPassword"))
+	{
+		// Successful login means the password is valid, so save it.
+		LLStartUp::savePasswordToDisk(gPassword);
+	}
+	else
+	{
+		// Don't leave password from previous session sitting around
+		// during this login session.
+		LLStartUp::deletePasswordFromDisk();
+	}
+
+	// this is their actual ability to access content
+	text = response["agent_access_max"].asString();
+	if (!text.empty())
+	{
+		// agent_access can be 'A', 'M', and 'PG'.
+		gAgent.setMaturity(text[0]);
+	}
+	
+	// this is the value of their preference setting for that content
+	// which will always be <= agent_access_max
+	text = response["agent_region_access"].asString();
+	if (!text.empty())
+	{
+		int preferredMaturity = LLAgent::convertTextToMaturity(text[0]);
+		gSavedSettings.setU32("PreferredMaturity", preferredMaturity);
+	}
+	// During the AO transition, this flag will be true. Then the flag will
+	// go away. After the AO transition, this code and all the code that
+	// uses it can be deleted.
+	text = response["ao_transition"].asString();
+	if (!text.empty())
+	{
+		if (text == "1")
+		{
+			gAgent.setAOTransition();
+		}
+	}
+
+	text = response["start_location"].asString();
+	if(!text.empty()) 
+	{
+		gAgentStartLocation.assign(text);
+	}
+
+	text = response["circuit_code"].asString();
+	if(!text.empty())
+	{
+		gMessageSystem->mOurCircuitCode = strtoul(text.c_str(), NULL, 10);
+	}
+	std::string sim_ip_str = response["sim_ip"];
+	std::string sim_port_str = response["sim_port"];
+	if(!sim_ip_str.empty() && !sim_port_str.empty())
+	{
+		U32 sim_port = strtoul(sim_port_str.c_str(), NULL, 10);
+		gFirstSim.set(sim_ip_str, sim_port);
+		if (gFirstSim.isOk())
+		{
+			gMessageSystem->enableCircuit(gFirstSim, TRUE);
+		}
+	}
+	std::string region_x_str = response["region_x"];
+	std::string region_y_str = response["region_y"];
+	if(!region_x_str.empty() && !region_y_str.empty())
+	{
+		U32 region_x = strtoul(region_x_str.c_str(), NULL, 10);
+		U32 region_y = strtoul(region_y_str.c_str(), NULL, 10);
+		gFirstSimHandle = to_region_handle(region_x, region_y);
+	}
+	
+	const std::string look_at_str = response["look_at"];
+	if (!look_at_str.empty())
+	{
+		size_t len = look_at_str.size();
+		LLMemoryStream mstr((U8*)look_at_str.c_str(), len);
+		LLSD sd = LLSDSerialize::fromNotation(mstr, len);
+		gAgentStartLookAt = ll_vector3_from_sd(sd);
+	}
+
+	text = response["seed_capability"].asString();
+	if (!text.empty()) gFirstSimSeedCap = text;
+				
+	text = response["seconds_since_epoch"].asString();
+	if(!text.empty())
+	{
+		U32 server_utc_time = strtoul(text.c_str(), NULL, 10);
+		if(server_utc_time)
+		{
+			time_t now = time(NULL);
+			gUTCOffset = (server_utc_time - now);
+		}
+	}
+
+	std::string home_location = response["home"];
+	if(!home_location.empty())
+	{
+		size_t len = home_location.size();
+		LLMemoryStream mstr((U8*)home_location.c_str(), len);
+		LLSD sd = LLSDSerialize::fromNotation(mstr, len);
+		S32 region_x = sd["region_handle"][0].asInteger();
+		S32 region_y = sd["region_handle"][1].asInteger();
+		U64 region_handle = to_region_handle(region_x, region_y);
+		LLVector3 position = ll_vector3_from_sd(sd["position"]);
+		gAgent.setHomePosRegion(region_handle, position);
+	}
+
+	gAgent.mMOTD.assign(response["message"]);
+
+	// Options...
+	// Each 'option' is an array of submaps. 
+	// It appears that we only ever use the first element of the array.
+	LLUUID inv_root_folder_id = response["inventory-root"][0]["folder_id"];
+	if(inv_root_folder_id.notNull())
+	{
+		gAgent.mInventoryRootID = inv_root_folder_id;
+		//gInventory.mock(gAgent.getInventoryRootID());
+	}
+
+	LLSD login_flags = response["login-flags"][0];
+	if(login_flags.size())
+	{
+		std::string flag = login_flags["ever_logged_in"];
+		if(!flag.empty())
+		{
+			gAgent.setFirstLogin((flag == "N") ? TRUE : FALSE);
+		}
+
+		/*  Flag is currently ignored by the viewer.
+		flag = login_flags["stipend_since_login"];
+		if(flag == "Y") 
+		{
+			stipend_since_login = true;
+		}
+		*/
+
+		flag = login_flags["gendered"].asString();
+		if(flag == "Y")
+		{
+			gAgent.setGenderChosen(TRUE);
+		}
+		
+		flag = login_flags["daylight_savings"].asString();
+		if(flag == "Y")
+		{
+			gPacificDaylightTime  = (flag == "Y") ? TRUE : FALSE;
+		}
+
+		//setup map of datetime strings to codes and slt & local time offset from utc
+		LLStringOps::setupDatetimeInfo (gPacificDaylightTime);
+	}
+
+	LLSD initial_outfit = response["initial-outfit"][0];
+	if(initial_outfit.size())
+	{
+		std::string flag = initial_outfit["folder_name"];
+		if(!flag.empty())
+		{
+			// Initial outfit is a folder in your inventory,
+			// must be an exact folder-name match.
+			sInitialOutfit = flag;
+		}
+
+		flag = initial_outfit["gender"].asString();
+		if(!flag.empty())
+		{
+			sInitialOutfitGender = flag;
+		}
+	}
+
+	LLSD global_textures = response["global-textures"][0];
+	if(global_textures.size())
+	{
+		// Extract sun and moon texture IDs.  These are used
+		// in the LLVOSky constructor, but I can't figure out
+		// how to pass them in.  JC
+		LLUUID id = global_textures["sun_texture_id"];
+		if(id.notNull())
+		{
+			gSunTextureID = id;
+		}
+
+		id = global_textures["moon_texture_id"];
+		if(id.notNull())
+		{
+			gMoonTextureID = id;
+		}
+
+		id = global_textures["cloud_texture_id"];
+		if(id.notNull())
+		{
+			gCloudTextureID = id;
+		}
+	}
+
+
+	bool success = false;
+	// JC: gesture loading done below, when we have an asset system
+	// in place.  Don't delete/clear user_credentials until then.
+	if(gAgentID.notNull()
+	   && gAgentSessionID.notNull()
+	   && gMessageSystem->mOurCircuitCode
+	   && gFirstSim.isOk()
+	   && gAgent.mInventoryRootID.notNull())
+	{
+		success = true;
+	}
+
+	return success;
+}
diff --git a/indra/newview/tests/llxmlrpclistener_test.cpp b/indra/newview/tests/llxmlrpclistener_test.cpp
index 0c1ee42ffc..c94ba0a3e8 100644
--- a/indra/newview/tests/llxmlrpclistener_test.cpp
+++ b/indra/newview/tests/llxmlrpclistener_test.cpp
@@ -26,7 +26,7 @@
 #include "llcontrol.h"
 #include "tests/wrapllerrs.h"
 
-LLControlGroup gSavedSettings;
+LLControlGroup gSavedSettings("Global");
 
 /*****************************************************************************
 *   TUT
-- 
cgit v1.2.3


From cb5918df31cadc790d9259a024ab670b2998563b Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 14 May 2009 20:50:50 +0000
Subject: Remove silly std::cout debugging output

---
 indra/viewer_components/login/lllogin.cpp | 1 -
 1 file changed, 1 deletion(-)

(limited to 'indra')

diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 7f2b27e64c..87e3811f42 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -133,7 +133,6 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials)
     mCoro.reset(new coroutine_type(boost::bind(&Impl::login_, this, _1, _2, _3)));
     // Run the coroutine until its first wait; at that point, return here.
     (*mCoro)(std::nothrow, uri, credentials);
-    std::cout << "Here I am\n";
 }
 
 void LLLogin::Impl::login_(coroutine_type::self& self,
-- 
cgit v1.2.3


From 01d390825a5d9ba37715b80cd0aa7aede022dcec Mon Sep 17 00:00:00 2001
From: Brad Kittenbrink <brad@lindenlab.com>
Date: Fri, 22 May 2009 23:27:16 +0000
Subject: DEV-27646 dll linkage for login module. Ok, finally got this to a
 point where it doesn't break the build and I can check in. llcommon can be
 built as a shared library (disabled but can be enabled with cmake cache var
 LLCOMMON_LINK_SHARED.

reviewed by Mani on tuesday (I still need to get his suggested changes
re-reviewed)
---
 indra/cmake/LLCommon.cmake                         |  5 ++
 indra/llcommon/CMakeLists.txt                      | 10 ++-
 indra/llcommon/linden_common.h                     |  8 +-
 indra/llcommon/llapr.h                             | 22 +++---
 indra/llcommon/llassettype.h                       |  2 +-
 indra/llcommon/llbase32.h                          |  4 +-
 indra/llcommon/llbase64.h                          |  4 +-
 indra/llcommon/llcommon.h                          |  2 +-
 indra/llcommon/llcrc.h                             |  2 +-
 indra/llcommon/llcriticaldamp.h                    |  2 +-
 indra/llcommon/llcursortypes.h                     |  2 +-
 indra/llcommon/lldate.h                            |  2 +-
 indra/llcommon/llerror.h                           |  8 +-
 indra/llcommon/llerrorcontrol.h                    | 48 ++++++------
 indra/llcommon/llerrorthread.h                     |  2 +-
 indra/llcommon/llevent.h                           | 20 ++---
 indra/llcommon/lleventcoro.h                       | 12 +--
 indra/llcommon/lleventfilter.h                     |  6 +-
 indra/llcommon/llevents.h                          | 12 +--
 indra/llcommon/llfasttimer.h                       |  4 +-
 indra/llcommon/llfile.h                            | 14 ++--
 indra/llcommon/llfindlocale.h                      |  4 +-
 indra/llcommon/llfixedbuffer.h                     |  2 +-
 indra/llcommon/llformat.h                          |  2 +-
 indra/llcommon/llframetimer.h                      |  2 +-
 indra/llcommon/llheartbeat.h                       |  2 +-
 indra/llcommon/llliveappconfig.h                   |  2 +-
 indra/llcommon/lllivefile.h                        |  2 +-
 indra/llcommon/lllog.h                             |  4 +-
 indra/llcommon/llmd5.h                             |  2 +-
 indra/llcommon/llmemory.h                          |  2 +-
 indra/llcommon/llmemorystream.h                    |  4 +-
 indra/llcommon/llmetrics.h                         |  4 +-
 indra/llcommon/llmortician.h                       |  2 +-
 indra/llcommon/llpreprocessor.h                    | 41 +++++++---
 indra/llcommon/llqueuedthread.h                    |  7 +-
 indra/llcommon/llrand.h                            | 12 +--
 indra/llcommon/llrefcount.h                        |  4 +-
 indra/llcommon/llrun.h                             |  6 +-
 indra/llcommon/llsd.h                              |  4 +-
 indra/llcommon/llsdserialize.h                     | 18 ++---
 indra/llcommon/llsdutil.h                          | 58 ++++-----------
 indra/llcommon/llsecondlifeurls.h                  | 30 ++++----
 indra/llcommon/llsimplehash.h                      |  2 +-
 indra/llcommon/llstat.h                            | 16 ++--
 indra/llcommon/llstreamtools.h                     | 36 ++++-----
 indra/llcommon/llstring.h                          | 87 ++++++++++++----------
 indra/llcommon/llstringtable.h                     |  8 +-
 indra/llcommon/llsys.h                             | 18 ++---
 indra/llcommon/llthread.h                          | 16 ++--
 indra/llcommon/lltimer.h                           | 28 +++----
 indra/llcommon/lluri.h                             |  8 +-
 indra/llcommon/lluuid.h                            |  8 +-
 indra/llcommon/llworkerthread.h                    |  4 +-
 indra/llcommon/metaclass.h                         |  8 +-
 indra/llcommon/metaproperty.h                      |  6 +-
 indra/llcommon/reflective.h                        |  4 +-
 indra/llcommon/tests/lleventcoro_test.cpp          |  3 +
 indra/llcommon/timing.h                            |  3 +-
 indra/llcommon/u64.h                               | 10 +--
 indra/llinventory/llparcel.cpp                     |  2 +-
 indra/llmath/CMakeLists.txt                        |  1 +
 indra/llmath/llsdutil_math.cpp                     |  2 +-
 indra/llmath/llsdutil_math.h                       | 70 +++++++++++++++++
 indra/llmessage/llinstantmessage.cpp               |  2 +-
 indra/llmessage/llpartdata.cpp                     |  2 +
 indra/llmessage/llregionpresenceverifier.cpp       |  2 +
 indra/llmessage/llsdmessagebuilder.cpp             |  1 +
 indra/llmessage/llsdmessagereader.cpp              |  1 +
 indra/llprimitive/llprimitive.cpp                  |  2 +-
 indra/llprimitive/lltextureentry.cpp               |  2 +-
 indra/llrender/llgl.cpp                            |  2 -
 indra/llui/llfunctorregistry.cpp                   |  1 +
 indra/lscript/lscript_execute/llscriptresource.cpp |  2 +
 indra/newview/llfeaturemanager.cpp                 |  6 +-
 indra/newview/llfloaterabout.cpp                   |  2 -
 indra/newview/llimview.cpp                         |  2 +-
 indra/newview/llpanelplace.cpp                     |  1 +
 indra/newview/llstartup.cpp                        |  2 +-
 indra/newview/llviewerparcelmgr.cpp                |  1 +
 indra/newview/tests/llagentaccess_test.cpp         |  2 +
 indra/test/llsdmessagebuilder_tut.cpp              |  1 +
 indra/test/llsdmessagereader_tut.cpp               |  1 +
 indra/test/llsdutil_tut.cpp                        |  1 +
 84 files changed, 435 insertions(+), 346 deletions(-)
 create mode 100644 indra/llmath/llsdutil_math.h

(limited to 'indra')

diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 410766e4f9..e9e3784e69 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -13,3 +13,8 @@ set(LLCOMMON_INCLUDE_DIRS
     )
 
 set(LLCOMMON_LIBRARIES llcommon)
+
+set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
+if(LLCOMMON_LINK_SHARED)
+    add_definitions(-DLL_COMMON_LINK_SHARED=1)
+endif(LLCOMMON_LINK_SHARED)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 62476fd59d..71ec6cb8e4 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -5,6 +5,7 @@ project(llcommon)
 include(00-Common)
 include(LLAddBuildTest)
 include(LLCommon)
+include(Linking)
 include(Boost)
 
 include_directories(
@@ -215,13 +216,20 @@ set_source_files_properties(${llcommon_HEADER_FILES}
 
 list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
 
-add_library (llcommon ${llcommon_SOURCE_FILES})
+if(LLCOMMON_LINK_SHARED)
+    add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
+    add_definitions(-DLL_COMMON_BUILD=1)
+else(LLCOMMON_LINK_SHARED)
+    add_library (llcommon ${llcommon_SOURCE_FILES})
+endif(LLCOMMON_LINK_SHARED)
+
 target_link_libraries(
     llcommon
     ${APRUTIL_LIBRARIES}
     ${APR_LIBRARIES}
     ${EXPAT_LIBRARIES}
     ${ZLIB_LIBRARIES}
+    ${WINDOWS_LIBRARIES}
     ${BOOST_PROGRAM_OPTIONS_LIBRARY}
     ${BOOST_REGEX_LIBRARY}
     )
diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h
index 9adf24a492..d0ab5e969f 100644
--- a/indra/llcommon/linden_common.h
+++ b/indra/llcommon/linden_common.h
@@ -72,13 +72,7 @@
 #ifdef LL_WINDOWS
 // Reenable warnings we disabled above
 #pragma warning (3 : 4702) // unreachable code, we like level 3, not 4
-// level 4 warnings that we need to disable:
-#pragma warning (disable : 4100) // unreferenced formal parameter
-#pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) )
-#pragma warning (disable : 4244) // possible loss of data on conversions
-#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
-#pragma warning (disable : 4512) // assignment operator could not be generated
-#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) )
+// moved msvc warnings to llpreprocessor.h  *TODO - delete this comment after merge conflicts are unlikely -brad
 #endif	//	LL_WINDOWS
 
 // Linden only libs in alpha-order other than stdtypes.h
diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index 44ad2dd50f..5bd4b8a0f0 100644
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -48,24 +48,24 @@
 #include "apr_atomic.h"
 #include "llstring.h"
 
-extern apr_thread_mutex_t* gLogMutexp;
+extern LL_COMMON_API apr_thread_mutex_t* gLogMutexp;
 
 /** 
  * @brief initialize the common apr constructs -- apr itself, the
  * global pool, and a mutex.
  */
-void ll_init_apr();
+void LL_COMMON_API ll_init_apr();
 
 /** 
  * @brief Cleanup those common apr constructs.
  */
-void ll_cleanup_apr();
+void LL_COMMON_API ll_cleanup_apr();
 
 //
 //LL apr_pool
 //manage apr_pool_t, destroy allocated apr_pool in the destruction function.
 //
-class LLAPRPool
+class LL_COMMON_API LLAPRPool
 {
 public:
 	LLAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE) ;
@@ -91,7 +91,7 @@ protected:
 //which clears memory automatically.
 //so it can not hold static data or data after memory is cleared
 //
-class LLVolatileAPRPool : public LLAPRPool
+class LL_COMMON_API LLVolatileAPRPool : public LLAPRPool
 {
 public:
 	LLVolatileAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE);
@@ -117,7 +117,7 @@ private:
  * destructor handles the unlock. Instances of this class are
  * <b>not</b> thread safe.
  */
-class LLScopedLock : private boost::noncopyable
+class LL_COMMON_API LLScopedLock : private boost::noncopyable
 {
 public:
 	/**
@@ -148,7 +148,7 @@ protected:
 	apr_thread_mutex_t* mMutex;
 };
 
-template <typename Type> class LLAtomic32
+template <typename Type> class LL_COMMON_API LLAtomic32
 {
 public:
 	LLAtomic32<Type>() {};
@@ -191,7 +191,7 @@ typedef LLAtomic32<S32> LLAtomicS32;
 //      1, a temperary pool passed to an APRFile function, which is used within this function and only once.
 //      2, a global pool.
 //
-class LLAPRFile
+class LL_COMMON_API LLAPRFile
 {
 private:
 	apr_file_t* mFile ;
@@ -249,10 +249,10 @@ public:
  * APR_SUCCESS.
  * @return Returns <code>true</code> if status is an error condition.
  */
-bool ll_apr_warn_status(apr_status_t status);
+bool LL_COMMON_API ll_apr_warn_status(apr_status_t status);
 
-void ll_apr_assert_status(apr_status_t status);
+void LL_COMMON_API ll_apr_assert_status(apr_status_t status);
 
-extern "C" apr_pool_t* gAPRPoolp; // Global APR memory pool
+extern "C" LL_COMMON_API apr_pool_t* gAPRPoolp; // Global APR memory pool
 
 #endif // LL_LLAPR_H
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index 0ee4ae2821..f9df6ddd92 100644
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -37,7 +37,7 @@
 
 #include "stdenums.h" 	// for EDragAndDropType
 
-class LLAssetType
+class LL_COMMON_API LLAssetType
 {
 public:
 	enum EType
diff --git a/indra/llcommon/llbase32.h b/indra/llcommon/llbase32.h
index 63a93e11ab..0697f7b8e2 100644
--- a/indra/llcommon/llbase32.h
+++ b/indra/llcommon/llbase32.h
@@ -32,9 +32,9 @@
  */
 
 #ifndef LLBASE32_H
-#define LLBASE32_h
+#define LLBASE32_H
 
-class LLBase32
+class LL_COMMON_API LLBase32
 {
 public:
 	static std::string encode(const U8* input, size_t input_size);
diff --git a/indra/llcommon/llbase64.h b/indra/llcommon/llbase64.h
index 58414bba8b..c48fea2478 100644
--- a/indra/llcommon/llbase64.h
+++ b/indra/llcommon/llbase64.h
@@ -32,9 +32,9 @@
  */
 
 #ifndef LLBASE64_H
-#define LLBASE64_h
+#define LLBASE64_H
 
-class LLBase64
+class LL_COMMON_API LLBase64
 {
 public:
 	static std::string encode(const U8* input, size_t input_size);
diff --git a/indra/llcommon/llcommon.h b/indra/llcommon/llcommon.h
index a1808e8a6c..b36471f9f8 100644
--- a/indra/llcommon/llcommon.h
+++ b/indra/llcommon/llcommon.h
@@ -37,7 +37,7 @@
 #include "lltimer.h"
 #include "llfile.h"
 
-class LLCommon
+class LL_COMMON_API LLCommon
 {
 public:
 	static void initClass();
diff --git a/indra/llcommon/llcrc.h b/indra/llcommon/llcrc.h
index 27fae7d269..74369062cc 100644
--- a/indra/llcommon/llcrc.h
+++ b/indra/llcommon/llcrc.h
@@ -50,7 +50,7 @@
 //  llinfos << "File crc: " << crc.getCRC() << llendl;
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-class LLCRC
+class LL_COMMON_API LLCRC
 {
 protected:
 	U32 mCurrent;
diff --git a/indra/llcommon/llcriticaldamp.h b/indra/llcommon/llcriticaldamp.h
index ad98284a6c..1ea5914b5b 100644
--- a/indra/llcommon/llcriticaldamp.h
+++ b/indra/llcommon/llcriticaldamp.h
@@ -38,7 +38,7 @@
 
 #include "llframetimer.h"
 
-class LLCriticalDamp 
+class LL_COMMON_API LLCriticalDamp 
 {
 public:
 	LLCriticalDamp();
diff --git a/indra/llcommon/llcursortypes.h b/indra/llcommon/llcursortypes.h
index bea70351b7..836ecc3c04 100644
--- a/indra/llcommon/llcursortypes.h
+++ b/indra/llcommon/llcursortypes.h
@@ -77,6 +77,6 @@ enum ECursorType {
 	UI_CURSOR_COUNT			// Number of elements in this enum (NOT a cursor)
 };
 
-ECursorType getCursorFromString(const std::string& cursor_string);
+LL_COMMON_API ECursorType getCursorFromString(const std::string& cursor_string);
 
 #endif // LL_LLCURSORTYPES_H
diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h
index 29a9030b6d..c096d7ddd5 100644
--- a/indra/llcommon/lldate.h
+++ b/indra/llcommon/lldate.h
@@ -46,7 +46,7 @@
  *
  * The date class represents a point in time after epoch - 1970-01-01.
  */
-class LLDate
+class LL_COMMON_API LLDate
 {
 public:
 	/** 
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 6794be4904..6ccdf2174b 100644
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -129,9 +129,9 @@ namespace LLError
 		They are not intended for general use.
 	*/
 	
-	class CallSite;
+	class LL_COMMON_API CallSite;
 	
-	class Log
+	class LL_COMMON_API Log
 	{
 	public:
 		static bool shouldLog(CallSite&);
@@ -140,7 +140,7 @@ namespace LLError
 		static void flush(std::ostringstream*, const CallSite&);
 	};
 	
-	class CallSite
+	class LL_COMMON_API CallSite
 	{
 		// Represents a specific place in the code where a message is logged
 		// This is public because it is used by the macros below.  It is not
@@ -189,7 +189,7 @@ namespace LLError
 	//LLCallStacks is designed not to be thread-safe.
    //so try not to use it in multiple parallel threads at same time.
    //Used in a single thread at a time is fine.
-   class LLCallStacks
+   class LL_COMMON_API LLCallStacks
    {
    private:
        static char**  sBuffer ;
diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h
index c9424f8a5e..1a559ed7e0 100644
--- a/indra/llcommon/llerrorcontrol.h
+++ b/indra/llcommon/llerrorcontrol.h
@@ -52,12 +52,12 @@ class LLSD;
 
 namespace LLError
 {
-	void initForServer(const std::string& identity);
+	LL_COMMON_API void initForServer(const std::string& identity);
 		// resets all logging settings to defaults needed by server processes
 		// logs to stderr, syslog, and windows debug log
 		// the identity string is used for in the syslog
 
-	void initForApplication(const std::string& dir);
+	LL_COMMON_API void initForApplication(const std::string& dir);
 		// resets all logging settings to defaults needed by applicaitons
 		// logs to stderr and windows debug log
 		// sets up log configuration from the file logcontrol.xml in dir
@@ -68,13 +68,13 @@ namespace LLError
 		Setting a level means log messages at that level or above.
 	*/
 	
-	void setPrintLocation(bool);
-	void setDefaultLevel(LLError::ELevel);
-	void setFunctionLevel(const std::string& function_name, LLError::ELevel);
-	void setClassLevel(const std::string& class_name, LLError::ELevel);
-	void setFileLevel(const std::string& file_name, LLError::ELevel);
+	LL_COMMON_API void setPrintLocation(bool);
+	LL_COMMON_API void setDefaultLevel(LLError::ELevel);
+	LL_COMMON_API void setFunctionLevel(const std::string& function_name, LLError::ELevel);
+	LL_COMMON_API void setClassLevel(const std::string& class_name, LLError::ELevel);
+	LL_COMMON_API void setFileLevel(const std::string& file_name, LLError::ELevel);
 	
-	void configure(const LLSD&);
+	LL_COMMON_API void configure(const LLSD&);
 		// the LLSD can configure all of the settings
 		// usually read automatically from the live errorlog.xml file
 
@@ -84,21 +84,21 @@ namespace LLError
 	*/
 
 	typedef boost::function<void(const std::string&)> FatalFunction;
-	void crashAndLoop(const std::string& message);
+	LL_COMMON_API void crashAndLoop(const std::string& message);
 		// Default fatal function: access null pointer and loops forever
 
-	void setFatalFunction(const FatalFunction&);
+	LL_COMMON_API void setFatalFunction(const FatalFunction&);
 		// The fatal function will be called when an message of LEVEL_ERROR
 		// is logged.  Note: supressing a LEVEL_ERROR message from being logged
 		// (by, for example, setting a class level to LEVEL_NONE), will keep
 		// the that message from causing the fatal funciton to be invoked.
 
-    FatalFunction getFatalFunction();
+    LL_COMMON_API FatalFunction getFatalFunction();
         // Retrieve the previously-set FatalFunction
 
     /// temporarily override the FatalFunction for the duration of a
     /// particular scope, e.g. for unit tests
-    class OverrideFatalFunction
+    class LL_COMMON_API OverrideFatalFunction
     {
     public:
         OverrideFatalFunction(const FatalFunction& func):
@@ -116,15 +116,15 @@ namespace LLError
     };
 
 	typedef std::string (*TimeFunction)();
-	std::string utcTime();
+	LL_COMMON_API std::string utcTime();
 	
-	void setTimeFunction(TimeFunction);
+	LL_COMMON_API void setTimeFunction(TimeFunction);
 		// The function is use to return the current time, formatted for
 		// display by those error recorders that want the time included.
 
 
 
-	class Recorder
+	class LL_COMMON_API Recorder
 	{
 		// An object that handles the actual output or error messages.
 	public:
@@ -138,17 +138,17 @@ namespace LLError
 			// included in the text of the message
 	};
 	
-	void addRecorder(Recorder*);
-	void removeRecorder(Recorder*);
+	LL_COMMON_API void addRecorder(Recorder*);
+	LL_COMMON_API void removeRecorder(Recorder*);
 		// each error message is passed to each recorder via recordMessage()
 	
-	void logToFile(const std::string& filename);
-	void logToFixedBuffer(LLFixedBuffer*);
+	LL_COMMON_API void logToFile(const std::string& filename);
+	LL_COMMON_API void logToFixedBuffer(LLFixedBuffer*);
 		// Utilities to add recorders for logging to a file or a fixed buffer
 		// A second call to the same function will remove the logger added
 		// with the first.
 		// Passing the empty string or NULL to just removes any prior.
-	std::string logFileName();
+	LL_COMMON_API std::string logFileName();
 		// returns name of current logging file, empty string if none
 
 
@@ -157,11 +157,11 @@ namespace LLError
 	*/
 
 	class Settings;
-	Settings* saveAndResetSettings();
-	void restoreSettings(Settings *);
+	LL_COMMON_API Settings* saveAndResetSettings();
+	LL_COMMON_API void restoreSettings(Settings *);
 		
-	std::string abbreviateFile(const std::string& filePath);
-	int shouldLogCallCount();
+	LL_COMMON_API std::string abbreviateFile(const std::string& filePath);
+	LL_COMMON_API int shouldLogCallCount();
 	
 };
 
diff --git a/indra/llcommon/llerrorthread.h b/indra/llcommon/llerrorthread.h
index f1d6ffc34f..3121d29675 100644
--- a/indra/llcommon/llerrorthread.h
+++ b/indra/llcommon/llerrorthread.h
@@ -35,7 +35,7 @@
 
 #include "llthread.h"
 
-class LLErrorThread : public LLThread
+class LL_COMMON_API LLErrorThread : public LLThread
 {
 public:
 	LLErrorThread();
diff --git a/indra/llcommon/llevent.h b/indra/llcommon/llevent.h
index 2cc8577219..192cb84fea 100644
--- a/indra/llcommon/llevent.h
+++ b/indra/llcommon/llevent.h
@@ -41,13 +41,13 @@
 namespace LLOldEvents
 {
 
-class LLEventListener;
-class LLEvent;
-class LLEventDispatcher;
-class LLObservable;
+class LL_COMMON_API LLEventListener;
+class LL_COMMON_API LLEvent;
+class LL_COMMON_API LLEventDispatcher;
+class LL_COMMON_API LLObservable;
 
 // Abstract event. All events derive from LLEvent
-class LLEvent : public LLThreadSafeRefCount
+class LL_COMMON_API LLEvent : public LLThreadSafeRefCount
 {
 protected:
 	virtual ~LLEvent();
@@ -75,7 +75,7 @@ private:
 };
 
 // Abstract listener. All listeners derive from LLEventListener
-class LLEventListener : public LLThreadSafeRefCount
+class LL_COMMON_API LLEventListener : public LLThreadSafeRefCount
 {
 protected:
 	virtual ~LLEventListener();
@@ -92,7 +92,7 @@ public:
 };
 
 // A listener which tracks references to it and cleans up when it's deallocated
-class LLSimpleListener : public LLEventListener
+class LL_COMMON_API LLSimpleListener : public LLEventListener
 {
 public:
 	void clearDispatchers();
@@ -104,7 +104,7 @@ protected:
 	std::vector<LLEventDispatcher *> mDispatchers;
 };
 
-class LLObservable; // defined below
+class LL_COMMON_API LLObservable; // defined below
 
 // A structure which stores a Listener and its metadata
 struct LLListenerEntry
@@ -117,7 +117,7 @@ struct LLListenerEntry
 // Base class for a dispatcher - an object which listens
 // to events being fired and relays them to their
 // appropriate destinations.
-class LLEventDispatcher : public LLThreadSafeRefCount
+class LL_COMMON_API LLEventDispatcher : public LLThreadSafeRefCount
 {
 protected:
 	virtual ~LLEventDispatcher();
@@ -160,7 +160,7 @@ private:
 // In order for this class to work properly, it needs
 // an instance of an LLEventDispatcher to route events to their
 // listeners.
-class LLObservable
+class LL_COMMON_API LLObservable
 {
 public:
 	// Initialize with the default Dispatcher
diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h
index 7232d1780f..5726ea0f65 100644
--- a/indra/llcommon/lleventcoro.h
+++ b/indra/llcommon/lleventcoro.h
@@ -106,7 +106,7 @@ namespace LLEventDetail
      * that's okay, since it won't collide with any listener name used by the
      * earlier coroutine since that earlier coroutine no longer exists.
      */
-    std::string listenerNameForCoro(const void* self);
+    LL_COMMON_API std::string listenerNameForCoro(const void* self);
 
     /**
      * Implement behavior described for postAndWait()'s @a replyPumpNamePath
@@ -126,7 +126,7 @@ namespace LLEventDetail
      * In the degenerate case in which @a path is an empty array, @a dest will
      * @em become @a value rather than @em containing it.
      */
-    void storeToLLSDPath(LLSD& dest, const LLSD& path, const LLSD& value);
+    LL_COMMON_API void storeToLLSDPath(LLSD& dest, const LLSD& path, const LLSD& value);
 } // namespace LLEventDetail
 
 /**
@@ -378,7 +378,7 @@ LLSD errorException(const LLEventWithID& result, const std::string& desc);
  * because it's not an error in event processing: rather, this exception
  * announces an event that bears error information (for some other API).
  */
-class LLErrorEvent: public std::runtime_error
+class LL_COMMON_API LLErrorEvent: public std::runtime_error
 {
 public:
     LLErrorEvent(const std::string& what, const LLSD& data):
@@ -397,7 +397,7 @@ private:
  * Like errorException(), save that this trips a fatal error using LL_ERRS
  * rather than throwing an exception.
  */
-LLSD errorLog(const LLEventWithID& result, const std::string& desc);
+LL_COMMON_API LLSD errorLog(const LLEventWithID& result, const std::string& desc);
 
 /**
  * Certain event APIs require the name of an LLEventPump on which they should
@@ -413,7 +413,7 @@ LLSD errorLog(const LLEventWithID& result, const std::string& desc);
  * 4. Call your LLEventTempStream's wait() method to wait for the reply.
  * 5. Let the LLCoroEventPump go out of scope.
  */
-class LLCoroEventPump
+class LL_COMMON_API LLCoroEventPump
 {
 public:
     LLCoroEventPump(const std::string& name="coro"):
@@ -458,7 +458,7 @@ private:
  * success response, the other for error response. Extend LLCoroEventPump
  * for the two-pump use case.
  */
-class LLCoroEventPumps
+class LL_COMMON_API LLCoroEventPumps
 {
 public:
     LLCoroEventPumps(const std::string& name="coro",
diff --git a/indra/llcommon/lleventfilter.h b/indra/llcommon/lleventfilter.h
index fe1a631c6b..89f0c7ea43 100644
--- a/indra/llcommon/lleventfilter.h
+++ b/indra/llcommon/lleventfilter.h
@@ -20,7 +20,7 @@
 /**
  * Generic base class
  */
-class LLEventFilter: public LLEventStream
+class LL_COMMON_API LLEventFilter: public LLEventStream
 {
 public:
     /// construct a standalone LLEventFilter
@@ -60,7 +60,7 @@ private:
  * @NOTE This is an abstract base class so that, for testing, we can use an
  * alternate "timer" that doesn't actually consume real time.
  */
-class LLEventTimeoutBase: public LLEventFilter
+class LL_COMMON_API LLEventTimeoutBase: public LLEventFilter
 {
 public:
     /// construct standalone
@@ -169,7 +169,7 @@ private:
 };
 
 /// Production implementation of LLEventTimoutBase
-class LLEventTimeout: public LLEventTimeoutBase
+class LL_COMMON_API LLEventTimeout: public LLEventTimeoutBase
 {
 public:
     LLEventTimeout();
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 20061f09c6..e84d9a50ee 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -125,7 +125,7 @@ typedef boost::signals2::scoped_connection LLTempBoundListener;
  * LLListenerOrPumpName::Empty. Test for this condition beforehand using
  * either <tt>if (param)</tt> or <tt>if (! param)</tt>.
  */
-class LLListenerOrPumpName
+class LL_COMMON_API LLListenerOrPumpName
 {
 public:
     /// passing string name of LLEventPump
@@ -172,13 +172,13 @@ private:
 /*****************************************************************************
 *   LLEventPumps
 *****************************************************************************/
-class LLEventPump;
+class LL_COMMON_API LLEventPump;
 
 /**
  * LLEventPumps is a Singleton manager through which one typically accesses
  * this subsystem.
  */
-class LLEventPumps: public LLSingleton<LLEventPumps>
+class LL_COMMON_API LLEventPumps: public LLSingleton<LLEventPumps>
 {
     friend class LLSingleton<LLEventPumps>;
 public:
@@ -307,7 +307,7 @@ typedef boost::signals2::trackable LLEventTrackable;
  * destruction. Please see LLEventTrackable documentation for situations in
  * which this may be perilous across threads.
  */
-class LLEventPump: public LLEventTrackable
+class LL_COMMON_API LLEventPump: public LLEventTrackable
 {
 public:
     /**
@@ -528,7 +528,7 @@ protected:
  * LLEventStream is a thin wrapper around LLStandardSignal. Posting an
  * event immediately calls all registered listeners.
  */
-class LLEventStream: public LLEventPump
+class LL_COMMON_API LLEventStream: public LLEventPump
 {
 public:
     LLEventStream(const std::string& name, bool tweak=false): LLEventPump(name, tweak) {}
@@ -545,7 +545,7 @@ public:
  * LLEventQueue isa LLEventPump whose post() method defers calling registered
  * listeners until flush() is called.
  */
-class LLEventQueue: public LLEventPump
+class LL_COMMON_API LLEventQueue: public LLEventPump
 {
 public:
     LLEventQueue(const std::string& name, bool tweak=false): LLEventPump(name, tweak) {}
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h
index 94b51119e4..f2dae09fdf 100644
--- a/indra/llcommon/llfasttimer.h
+++ b/indra/llcommon/llfasttimer.h
@@ -35,9 +35,9 @@
 
 #define FAST_TIMER_ON 1
 
-U64 get_cpu_clock_count();
+U64 LL_COMMON_API get_cpu_clock_count();
 
-class LLFastTimer
+class LL_COMMON_API LLFastTimer
 {
 public:
 	enum EFastTimerType
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index c6092f7b9c..fea5d3ed2b 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -70,7 +70,7 @@ typedef struct stat		llstat;
 
 #include "llstring.h" // safe char* -> std::string conversion
 
-class	LLFile
+class LL_COMMON_API LLFile
 {
 public:
 	// All these functions take UTF8 path/filenames.
@@ -95,7 +95,7 @@ public:
 
 #if USE_LLFILESTREAMS
 
-class	llifstream	:	public	std::basic_istream < char , std::char_traits < char > >
+class LL_COMMON_API llifstream	:	public	std::basic_istream < char , std::char_traits < char > >
 {
 	// input stream associated with a C stream
 public:
@@ -136,7 +136,7 @@ private:
 };
 
 
-class	llofstream	:	public	std::basic_ostream< char , std::char_traits < char > >
+class LL_COMMON_API llofstream	:	public	std::basic_ostream< char , std::char_traits < char > >
 {
 public:
 	typedef std::basic_ostream< char , std::char_traits < char > > _Myt;
@@ -185,7 +185,7 @@ private:
 //#define	llifstream	std::ifstream
 //#define	llofstream	std::ofstream
 
-class	llifstream	:	public	std::ifstream
+class LL_COMMON_API llifstream	:	public	std::ifstream
 {
 public:
 	llifstream() : std::ifstream()
@@ -203,7 +203,7 @@ public:
 };
 
 
-class	llofstream	:	public	std::ofstream
+class LL_COMMON_API llofstream	:	public	std::ofstream
 {
 public:
 	llofstream() : std::ofstream()
@@ -231,7 +231,7 @@ public:
  * and should only be used for config files and the like -- not in a
  * loop.
  */
-std::streamsize llifstream_size(llifstream& fstr);
-std::streamsize llofstream_size(llofstream& fstr);
+std::streamsize LL_COMMON_API llifstream_size(llifstream& fstr);
+std::streamsize LL_COMMON_API llofstream_size(llofstream& fstr);
 
 #endif // not LL_LLFILE_H
diff --git a/indra/llcommon/llfindlocale.h b/indra/llcommon/llfindlocale.h
index f17c7740f3..b812a065db 100644
--- a/indra/llcommon/llfindlocale.h
+++ b/indra/llcommon/llfindlocale.h
@@ -59,8 +59,8 @@ typedef enum {
 /* This allocates/fills in a FL_Locale structure with pointers to
    strings (which should be treated as static), or NULL for inappropriate /
    undetected fields. */
-FL_Success FL_FindLocale(FL_Locale **locale, FL_Domain domain);
+LL_COMMON_API FL_Success FL_FindLocale(FL_Locale **locale, FL_Domain domain);
 /* This should be used to free the struct written by FL_FindLocale */
-void FL_FreeLocale(FL_Locale **locale);
+LL_COMMON_API void FL_FreeLocale(FL_Locale **locale);
 
 #endif /*__findlocale_h_*/
diff --git a/indra/llcommon/llfixedbuffer.h b/indra/llcommon/llfixedbuffer.h
index 992a024df1..51d0701736 100644
--- a/indra/llcommon/llfixedbuffer.h
+++ b/indra/llcommon/llfixedbuffer.h
@@ -41,7 +41,7 @@
 
 // Fixed size buffer for console output and other things.
 
-class LLFixedBuffer
+class LL_COMMON_API LLFixedBuffer
 {
 public:
 	LLFixedBuffer(const U32 max_lines = 20);
diff --git a/indra/llcommon/llformat.h b/indra/llcommon/llformat.h
index 44c62d9710..dc64edb26d 100644
--- a/indra/llcommon/llformat.h
+++ b/indra/llcommon/llformat.h
@@ -40,6 +40,6 @@
 // *NOTE: buffer limited to 1024, (but vsnprintf prevents overrun)
 // should perhaps be replaced with boost::format.
 
-std::string llformat(const char *fmt, ...);
+std::string LL_COMMON_API llformat(const char *fmt, ...);
 
 #endif // LL_LLFORMAT_H
diff --git a/indra/llcommon/llframetimer.h b/indra/llcommon/llframetimer.h
index 8f51272af2..be2d9b0703 100644
--- a/indra/llcommon/llframetimer.h
+++ b/indra/llcommon/llframetimer.h
@@ -43,7 +43,7 @@
 #include "lltimer.h"
 #include "timing.h"
 
-class LLFrameTimer 
+class LL_COMMON_API LLFrameTimer 
 {
 public:
 	LLFrameTimer() : mStartTime( sFrameTime ), mExpiry(0), mStarted(TRUE) {}
diff --git a/indra/llcommon/llheartbeat.h b/indra/llcommon/llheartbeat.h
index fecb5b1e54..6f7026970f 100644
--- a/indra/llcommon/llheartbeat.h
+++ b/indra/llcommon/llheartbeat.h
@@ -40,7 +40,7 @@
 // Note: Win32 does not support the heartbeat/smackdown system;
 //   heartbeat-delivery turns into a no-op there.
 
-class LLHeartbeat
+class LL_COMMON_API LLHeartbeat
 {
 public:
 	// secs_between_heartbeat: after a heartbeat is successfully delivered,
diff --git a/indra/llcommon/llliveappconfig.h b/indra/llcommon/llliveappconfig.h
index 55d84a4778..3251a7c50e 100644
--- a/indra/llcommon/llliveappconfig.h
+++ b/indra/llcommon/llliveappconfig.h
@@ -37,7 +37,7 @@
 
 class LLApp;
 
-class LLLiveAppConfig : public LLLiveFile
+class LL_COMMON_API LLLiveAppConfig : public LLLiveFile
 {
 public:
 	// To use this, instantiate a LLLiveAppConfig object inside your main loop.
diff --git a/indra/llcommon/lllivefile.h b/indra/llcommon/lllivefile.h
index a3a9cf49ab..a6f9996767 100644
--- a/indra/llcommon/lllivefile.h
+++ b/indra/llcommon/lllivefile.h
@@ -36,7 +36,7 @@
 const F32 configFileRefreshRate = 5.0; // seconds
 
 
-class LLLiveFile
+class LL_COMMON_API LLLiveFile
 {
 public:
 	LLLiveFile(const std::string &filename, const F32 refresh_period = 5.f);
diff --git a/indra/llcommon/lllog.h b/indra/llcommon/lllog.h
index 7ac6c8aa42..b0ec570c01 100644
--- a/indra/llcommon/lllog.h
+++ b/indra/llcommon/lllog.h
@@ -39,9 +39,9 @@
 
 class LLLogImpl;
 class LLApp;
-class LLSD;
+class LL_COMMON_API LLSD;
 
-class LLLog
+class LL_COMMON_API LLLog
 {
 public:
 	LLLog(LLApp* app);
diff --git a/indra/llcommon/llmd5.h b/indra/llcommon/llmd5.h
index d8bca03e4e..df9d7324ab 100644
--- a/indra/llcommon/llmd5.h
+++ b/indra/llcommon/llmd5.h
@@ -80,7 +80,7 @@ const int MD5RAW_BYTES = 16;
 const int MD5HEX_STR_SIZE = 33;  // char hex[MD5HEX_STR_SIZE]; with null
 const int MD5HEX_STR_BYTES = 32; // message system fixed size
 
-class LLMD5 {
+class LL_COMMON_API LLMD5 {
 // first, some types:
   typedef unsigned       int uint4; // assumes integer is 4 words long
   typedef unsigned short int uint2; // assumes short integer is 2 words long
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index a72e58034b..2c356db965 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -38,7 +38,7 @@ extern S32 gTotalDAlloc;
 extern S32 gTotalDAUse;
 extern S32 gDACount;
 
-class LLMemory
+class LL_COMMON_API LLMemory
 {
 public:
 	static void initClass();
diff --git a/indra/llcommon/llmemorystream.h b/indra/llcommon/llmemorystream.h
index f3486324c5..fa0f5d22f2 100644
--- a/indra/llcommon/llmemorystream.h
+++ b/indra/llcommon/llmemorystream.h
@@ -52,7 +52,7 @@
  * be careful to always pass in a valid memory location that exists
  * for at least as long as this streambuf.
  */
-class LLMemoryStreamBuf : public std::streambuf
+class LL_COMMON_API LLMemoryStreamBuf : public std::streambuf
 {
 public:
 	LLMemoryStreamBuf(const U8* start, S32 length);
@@ -74,7 +74,7 @@ protected:
  * be careful to always pass in a valid memory location that exists
  * for at least as long as this streambuf.
  */
-class LLMemoryStream : public std::istream
+class LL_COMMON_API LLMemoryStream : public std::istream
 {
 public:
 	LLMemoryStream(const U8* start, S32 length);
diff --git a/indra/llcommon/llmetrics.h b/indra/llcommon/llmetrics.h
index 1d91e8c8a2..11e10a5a2e 100644
--- a/indra/llcommon/llmetrics.h
+++ b/indra/llcommon/llmetrics.h
@@ -36,9 +36,9 @@
 #define LL_LLMETRICS_H
 
 class LLMetricsImpl;
-class LLSD;
+class LL_COMMON_API LLSD;
 
-class LLMetrics
+class LL_COMMON_API LLMetrics
 {
 public:
 	LLMetrics();
diff --git a/indra/llcommon/llmortician.h b/indra/llcommon/llmortician.h
index fcda3df58e..27bd8cd9b5 100644
--- a/indra/llcommon/llmortician.h
+++ b/indra/llcommon/llmortician.h
@@ -35,7 +35,7 @@
 
 #include "stdtypes.h"
 
-class LLMortician 
+class LL_COMMON_API LLMortician 
 {
 public:
 	LLMortician() { mIsDead = FALSE; }
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 2e4fd4787a..5ff7814997 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -93,17 +93,6 @@
 #endif
 
 
-// Deal with the differeneces on Windows
-#if LL_MSVC
-namespace snprintf_hack
-{
-	int snprintf(char *str, size_t size, const char *format, ...);
-}
-
-// #define snprintf safe_snprintf		/* Flawfinder: ignore */
-using snprintf_hack::snprintf;
-#endif	// LL_MSVC
-
 // Static linking with apr on windows needs to be declared.
 #ifdef LL_WINDOWS
 #ifndef APR_DECLARE_STATIC
@@ -133,6 +122,36 @@ using snprintf_hack::snprintf;
 #pragma warning( disable : 4503 )	// 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.
 #pragma warning( disable : 4800 )	// 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
 #pragma warning( disable : 4996 )	// warning: deprecated
+
+// level 4 warnings that we need to disable:
+#pragma warning (disable : 4100) // unreferenced formal parameter
+#pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) )
+#pragma warning (disable : 4244) // possible loss of data on conversions
+#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
+#pragma warning (disable : 4512) // assignment operator could not be generated
+#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) )
+
+#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
+#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
 #endif	//	LL_MSVC
 
+#if LL_WINDOWS
+#define LL_DLLEXPORT __declspec(dllexport)
+#define LL_DLLIMPORT __declspec(dllimport)
+#else
+#define LL_DLLEXPORT
+#define LL_DLLIMPORT
+#endif // LL_WINDOWS
+
+
+#if LL_COMMON_LINK_SHARED
+# if LL_COMMON_BUILD
+#   define LL_COMMON_API LL_DLLEXPORT
+# else //LL_COMMON_BUILD
+#   define LL_COMMON_API LL_DLLIMPORT
+# endif //LL_COMMON_BUILD
+#else // LL_COMMON_LINK_SHARED
+# define LL_COMMON_API
+#endif // LL_COMMON_LINK_SHARED
+
 #endif	//	not LL_LINDEN_PREPROCESSOR_H
diff --git a/indra/llcommon/llqueuedthread.h b/indra/llcommon/llqueuedthread.h
index 3ba43e1e07..b3cde22b40 100644
--- a/indra/llcommon/llqueuedthread.h
+++ b/indra/llcommon/llqueuedthread.h
@@ -47,7 +47,7 @@
 // Note: ~LLQueuedThread is O(N) N=# of queued threads, assumed to be small
 //   It is assumed that LLQueuedThreads are rarely created/destroyed.
 
-class LLQueuedThread : public LLThread
+class LL_COMMON_API LLQueuedThread : public LLThread
 {
 	//------------------------------------------------------------------------
 public:
@@ -80,7 +80,7 @@ public:
 	//------------------------------------------------------------------------
 public:
 
-	class QueuedRequest : public LLSimpleHashEntry<handle_t>
+	class LL_COMMON_API QueuedRequest : public LLSimpleHashEntry<handle_t>
 	{
 		friend class LLQueuedThread;
 		
@@ -148,6 +148,9 @@ protected:
 		}
 	};
 
+    template class LL_COMMON_API std::set<QueuedRequest*, queued_request_less>;
+
+
 	//------------------------------------------------------------------------
 	
 public:
diff --git a/indra/llcommon/llrand.h b/indra/llcommon/llrand.h
index d12597bb53..30fec9b982 100644
--- a/indra/llcommon/llrand.h
+++ b/indra/llcommon/llrand.h
@@ -65,32 +65,32 @@
 /**
  *@brief Generate a float from [0, RAND_MAX).
  */
-S32 ll_rand();
+S32 LL_COMMON_API ll_rand();
 
 /**
  *@brief Generate a float from [0, val) or (val, 0].
  */
-S32 ll_rand(S32 val);
+S32 LL_COMMON_API ll_rand(S32 val);
 
 /**
  *@brief Generate a float from [0, 1.0).
  */
-F32 ll_frand();
+F32 LL_COMMON_API ll_frand();
 
 /**
  *@brief Generate a float from [0, val) or (val, 0].
  */
-F32 ll_frand(F32 val);
+F32 LL_COMMON_API ll_frand(F32 val);
 
 /**
  *@brief Generate a double from [0, 1.0).
  */
-F64 ll_drand();
+F64 LL_COMMON_API ll_drand();
 
 /**
  *@brief Generate a double from [0, val) or (val, 0].
  */
-F64 ll_drand(F64 val);
+F64 LL_COMMON_API ll_drand(F64 val);
 
 /**
  * @brief typedefs for good boost lagged fibonacci.
diff --git a/indra/llcommon/llrefcount.h b/indra/llcommon/llrefcount.h
index 540a18b8a0..5f102509fd 100644
--- a/indra/llcommon/llrefcount.h
+++ b/indra/llcommon/llrefcount.h
@@ -37,9 +37,9 @@
 // see llthread.h for LLThreadSafeRefCount
 //----------------------------------------------------------------------------
 
-class LLRefCount
+class LL_COMMON_API LLRefCount
 {
-protected:
+private:
 	LLRefCount(const LLRefCount&); // not implemented
 private:
 	LLRefCount&operator=(const LLRefCount&); // not implemented
diff --git a/indra/llcommon/llrun.h b/indra/llcommon/llrun.h
index 77b23d9051..afe65fd734 100644
--- a/indra/llcommon/llrun.h
+++ b/indra/llcommon/llrun.h
@@ -38,7 +38,7 @@
 #include <vector>
 #include <boost/shared_ptr.hpp>
 
-class LLRunnable;
+class LL_COMMON_API LLRunnable;
 
 /** 
  * @class LLRunner
@@ -48,7 +48,7 @@ class LLRunnable;
  * which are scheduled to run on a repeating or one time basis.
  * @see LLRunnable
  */
-class LLRunner
+class LL_COMMON_API LLRunner
 {
 public:
 	/**
@@ -149,7 +149,7 @@ protected:
  * something useful.
  * @see LLRunner
  */
-class LLRunnable
+class LL_COMMON_API LLRunnable
 {
 public:
 	LLRunnable();
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index d2845a3757..552bb57498 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -89,7 +89,7 @@
 	@nosubgrouping
 */
 
-class LLSD
+class LL_COMMON_API LLSD
 {
 public:
 		LLSD();		///< initially Undefined
@@ -387,7 +387,7 @@ struct llsd_select_string : public std::unary_function<LLSD, LLSD::String>
 	}
 };
 
-std::ostream& operator<<(std::ostream& s, const LLSD& llsd);
+LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLSD& llsd);
 
 /** QUESTIONS & TO DOS
 	- Would Binary be more convenient as usigned char* buffer semantics?
diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h
index 7463d1e5dd..4b32f0afcd 100644
--- a/indra/llcommon/llsdserialize.h
+++ b/indra/llcommon/llsdserialize.h
@@ -44,7 +44,7 @@
  * @class LLSDParser
  * @brief Abstract base class for LLSD parsers.
  */
-class LLSDParser : public LLRefCount
+class LL_COMMON_API LLSDParser : public LLRefCount
 {
 protected:
 	/** 
@@ -221,7 +221,7 @@ protected:
  * @class LLSDNotationParser
  * @brief Parser which handles the original notation format for LLSD.
  */
-class LLSDNotationParser : public LLSDParser
+class LL_COMMON_API LLSDNotationParser : public LLSDParser
 {
 protected:
 	/** 
@@ -294,7 +294,7 @@ private:
  * @class LLSDXMLParser
  * @brief Parser which handles XML format LLSD.
  */
-class LLSDXMLParser : public LLSDParser
+class LL_COMMON_API LLSDXMLParser : public LLSDParser
 {
 protected:
 	/** 
@@ -342,7 +342,7 @@ private:
  * @class LLSDBinaryParser
  * @brief Parser which handles binary formatted LLSD.
  */
-class LLSDBinaryParser : public LLSDParser
+class LL_COMMON_API LLSDBinaryParser : public LLSDParser
 {
 protected:
 	/** 
@@ -407,7 +407,7 @@ private:
  * @class LLSDFormatter
  * @brief Abstract base class for formatting LLSD.
  */
-class LLSDFormatter : public LLRefCount
+class LL_COMMON_API LLSDFormatter : public LLRefCount
 {
 protected:
 	/** 
@@ -479,7 +479,7 @@ protected:
  * @class LLSDNotationFormatter
  * @brief Formatter which outputs the original notation format for LLSD.
  */
-class LLSDNotationFormatter : public LLSDFormatter
+class LL_COMMON_API LLSDNotationFormatter : public LLSDFormatter
 {
 protected:
 	/** 
@@ -520,7 +520,7 @@ public:
  * @class LLSDXMLFormatter
  * @brief Formatter which outputs the LLSD as XML.
  */
-class LLSDXMLFormatter : public LLSDFormatter
+class LL_COMMON_API LLSDXMLFormatter : public LLSDFormatter
 {
 protected:
 	/** 
@@ -588,7 +588,7 @@ protected:
  * Map: '{' + 4 byte integer size  every(key + value) + '}'<br>
  *  map keys are serialized as 'k' + 4 byte integer size + string
  */
-class LLSDBinaryFormatter : public LLSDFormatter
+class LL_COMMON_API LLSDBinaryFormatter : public LLSDFormatter
 {
 protected:
 	/** 
@@ -677,7 +677,7 @@ typedef LLSDOStreamer<LLSDXMLFormatter>			LLSDXMLStreamer;
  * @class LLSDSerialize
  * @brief Serializer / deserializer for the various LLSD formats
  */
-class LLSDSerialize
+class LL_COMMON_API LLSDSerialize
 {
 public:
 	enum ELLSD_Serialize
diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h
index 0752f8aff1..a4175be450 100644
--- a/indra/llcommon/llsdutil.h
+++ b/indra/llcommon/llsdutil.h
@@ -35,62 +35,32 @@
 #ifndef LL_LLSDUTIL_H
 #define LL_LLSDUTIL_H
 
-#include "llsd.h"
-
-// vector3
-class LLVector3;
-LLSD ll_sd_from_vector3(const LLVector3& vec);
-LLVector3 ll_vector3_from_sd(const LLSD& sd, S32 start_index = 0);
-
-// vector4
-class LLVector4;
-LLSD ll_sd_from_vector4(const LLVector4& vec);
-LLVector4 ll_vector4_from_sd(const LLSD& sd, S32 start_index = 0);
-
-// vector3d (double)
-class LLVector3d;
-LLSD ll_sd_from_vector3d(const LLVector3d& vec);
-LLVector3d ll_vector3d_from_sd(const LLSD& sd, S32 start_index = 0);
-
-// vector2
-class LLVector2;
-LLSD ll_sd_from_vector2(const LLVector2& vec);
-LLVector2 ll_vector2_from_sd(const LLSD& sd);
-
-// Quaternion
-class LLQuaternion;
-LLSD ll_sd_from_quaternion(const LLQuaternion& quat);
-LLQuaternion ll_quaternion_from_sd(const LLSD& sd);
-
-// color4
-class LLColor4;
-LLSD ll_sd_from_color4(const LLColor4& c);
-LLColor4 ll_color4_from_sd(const LLSD& sd);
+class LL_COMMON_API LLSD;
 
 // U32
-LLSD ll_sd_from_U32(const U32);
-U32 ll_U32_from_sd(const LLSD& sd);
+LL_COMMON_API LLSD ll_sd_from_U32(const U32);
+LL_COMMON_API U32 ll_U32_from_sd(const LLSD& sd);
 
 // U64
-LLSD ll_sd_from_U64(const U64);
-U64 ll_U64_from_sd(const LLSD& sd);
+LL_COMMON_API LLSD ll_sd_from_U64(const U64);
+LL_COMMON_API U64 ll_U64_from_sd(const LLSD& sd);
 
 // IP Address
-LLSD ll_sd_from_ipaddr(const U32);
-U32 ll_ipaddr_from_sd(const LLSD& sd);
+LL_COMMON_API LLSD ll_sd_from_ipaddr(const U32);
+LL_COMMON_API U32 ll_ipaddr_from_sd(const LLSD& sd);
 
 // Binary to string
-LLSD ll_string_from_binary(const LLSD& sd);
+LL_COMMON_API LLSD ll_string_from_binary(const LLSD& sd);
 
 //String to binary
-LLSD ll_binary_from_string(const LLSD& sd);
+LL_COMMON_API LLSD ll_binary_from_string(const LLSD& sd);
 
 // Serializes sd to static buffer and returns pointer, useful for gdb debugging.
-char* ll_print_sd(const LLSD& sd);
+LL_COMMON_API char* ll_print_sd(const LLSD& sd);
 
 // Serializes sd to static buffer and returns pointer, using "pretty printing" mode.
-char* ll_pretty_print_sd_ptr(const LLSD* sd);
-char* ll_pretty_print_sd(const LLSD& sd);
+LL_COMMON_API char* ll_pretty_print_sd_ptr(const LLSD* sd);
+LL_COMMON_API char* ll_pretty_print_sd(const LLSD& sd);
 
 //compares the structure of an LLSD to a template LLSD and stores the
 //"valid" values in a 3rd LLSD. Default values
@@ -99,7 +69,7 @@ char* ll_pretty_print_sd(const LLSD& sd);
 //Returns false if the test is of same type but values differ in type
 //Otherwise, returns true
 
-BOOL compare_llsd_with_template(
+LL_COMMON_API BOOL compare_llsd_with_template(
 	const LLSD& llsd_to_test,
 	const LLSD& template_llsd,
 	LLSD& resultant_llsd);
@@ -157,7 +127,7 @@ BOOL compare_llsd_with_template(
  * meaningfully converted to the requested type. The same goes for UUID, Date
  * and URI.
  */
-std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::string& pfx="");
+LL_COMMON_API std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::string& pfx="");
 
 // Simple function to copy data out of input & output iterators if
 // there is no need for casting.
diff --git a/indra/llcommon/llsecondlifeurls.h b/indra/llcommon/llsecondlifeurls.h
index a2e5f0b9c6..bd2f9f7604 100644
--- a/indra/llcommon/llsecondlifeurls.h
+++ b/indra/llcommon/llsecondlifeurls.h
@@ -34,49 +34,49 @@
 #define LL_LLSECONDLIFEURLS_H
 /*
 // Account registration web page
-extern const std::string CREATE_ACCOUNT_URL;
+LL_COMMON_API extern const std::string CREATE_ACCOUNT_URL;
 
 // Manage Account
-extern const std::string MANAGE_ACCOUNT;
+LL_COMMON_API extern const std::string MANAGE_ACCOUNT;
 
-extern const std::string AUCTION_URL; 
+LL_COMMON_API extern const std::string AUCTION_URL; 
 
-extern const std::string EVENTS_URL;
+LL_COMMON_API extern const std::string EVENTS_URL;
 */
 // Tier up to a new land level.
-extern const std::string TIER_UP_URL;
+LL_COMMON_API extern const std::string TIER_UP_URL;
 
 
 // Tier up to a new land level.
-extern const std::string LAND_URL;
+LL_COMMON_API extern const std::string LAND_URL;
 
 // How to get DirectX 9
-extern const std::string DIRECTX_9_URL;
+LL_COMMON_API extern const std::string DIRECTX_9_URL;
 
 /*
 // Upgrade from basic membership to premium membership
-extern const std::string UPGRADE_TO_PREMIUM_URL;
+LL_COMMON_API extern const std::string UPGRADE_TO_PREMIUM_URL;
 
 
 // Out of date VIA chipset
-extern const std::string VIA_URL;
+LL_COMMON_API extern const std::string VIA_URL;
 
 // Support URL
-extern const std::string SUPPORT_URL;
+LL_COMMON_API extern const std::string SUPPORT_URL;
 
 // Linden Blogs page
-extern const std::string BLOGS_URL;
+LL_COMMON_API extern const std::string BLOGS_URL;
 
 // Currency page
-extern const std::string BUY_CURRENCY_URL;
+LL_COMMON_API extern const std::string BUY_CURRENCY_URL;
 
 // LSL script wiki
-extern const std::string LSL_DOC_URL;
+LL_COMMON_API extern const std::string LSL_DOC_URL;
 
 // SL KnowledgeBase page
-extern const std::string SL_KB_URL;
+LL_COMMON_API extern const std::string SL_KB_URL;
 
 // Release Notes Redirect URL for Server and Viewer
-extern const std::string RELEASE_NOTES_BASE_URL;
+LL_COMMON_API extern const std::string RELEASE_NOTES_BASE_URL;
 */
 #endif
diff --git a/indra/llcommon/llsimplehash.h b/indra/llcommon/llsimplehash.h
index 0ba2a3014c..5df93b646e 100644
--- a/indra/llcommon/llsimplehash.h
+++ b/indra/llcommon/llsimplehash.h
@@ -64,7 +64,7 @@ public:
 };
 
 template <typename HASH_KEY_TYPE, int TABLE_SIZE>
-class LLSimpleHash
+class LL_COMMON_API LLSimpleHash
 {
 public:
 	LLSimpleHash()
diff --git a/indra/llcommon/llstat.h b/indra/llcommon/llstat.h
index bad18f46a0..5d77215beb 100644
--- a/indra/llcommon/llstat.h
+++ b/indra/llcommon/llstat.h
@@ -40,7 +40,7 @@
 #include "llframetimer.h"
 #include "llfile.h"
 
-class	LLSD;
+class	LL_COMMON_API LLSD;
 
 // Set this if longer stats are needed
 #define ENABLE_LONG_TIME_STATS	0
@@ -52,7 +52,7 @@ class	LLSD;
 // amounts of time with very low memory cost.
 //
 
-class LLStatAccum
+class LL_COMMON_API LLStatAccum
 {
 protected:
 	LLStatAccum(bool use_frame_timer);
@@ -116,7 +116,7 @@ public:
 	F64 	mLastSampleValue;
 };
 
-class LLStatMeasure : public LLStatAccum
+class LL_COMMON_API LLStatMeasure : public LLStatAccum
 	// gathers statistics about things that are measured
 	// ex.: tempature, time dilation
 {
@@ -131,7 +131,7 @@ public:
 };
 
 
-class LLStatRate : public LLStatAccum
+class LL_COMMON_API LLStatRate : public LLStatAccum
 	// gathers statistics about things that can be counted over time
 	// ex.: LSL instructions executed, messages sent, simulator frames completed
 	// renders it in terms of rate of thing per second
@@ -147,7 +147,7 @@ public:
 };
 
 
-class LLStatTime : public LLStatAccum
+class LL_COMMON_API LLStatTime : public LLStatAccum
 	// gathers statistics about time spent in a block of code
 	// measure average duration per second in the block
 {
@@ -178,7 +178,7 @@ private:
 
 
 // Use this class on the stack to record statistics about an area of code
-class LLPerfBlock
+class LL_COMMON_API LLPerfBlock
 {
 public:
     struct StatEntry
@@ -220,7 +220,7 @@ private:
 
 // ----------------------------------------------------------------------------
 
-class LLPerfStats
+class LL_COMMON_API LLPerfStats
 {
 public:
     LLPerfStats(const std::string& process_name = "unknown", S32 process_pid = 0);
@@ -256,7 +256,7 @@ private:
 };
 
 // ----------------------------------------------------------------------------
-class LLStat
+class LL_COMMON_API LLStat
 {
 private:
 	typedef std::multimap<std::string, LLStat*> stat_map_t;
diff --git a/indra/llcommon/llstreamtools.h b/indra/llcommon/llstreamtools.h
index a6dc4d51e2..f64e761409 100644
--- a/indra/llcommon/llstreamtools.h
+++ b/indra/llcommon/llstreamtools.h
@@ -39,23 +39,23 @@
 // unless specifed otherwise these all return input_stream.good()
 
 // skips spaces and tabs
-bool skip_whitespace(std::istream& input_stream);
+LL_COMMON_API bool skip_whitespace(std::istream& input_stream);
 
 // skips whitespace and newlines
-bool skip_emptyspace(std::istream& input_stream);
+LL_COMMON_API bool skip_emptyspace(std::istream& input_stream);
 
 // skips emptyspace and lines that start with a #
-bool skip_comments_and_emptyspace(std::istream& input_stream);
+LL_COMMON_API bool skip_comments_and_emptyspace(std::istream& input_stream);
 
 // skips to character after next newline
-bool skip_line(std::istream& input_stream);
+LL_COMMON_API bool skip_line(std::istream& input_stream);
 
 // skips to beginning of next non-emptyspace
-bool skip_to_next_word(std::istream& input_stream);
+LL_COMMON_API bool skip_to_next_word(std::istream& input_stream);
 
 // skips to character after the end of next keyword 
 // a 'keyword' is defined as the first word on a line
-bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream);
+LL_COMMON_API bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream);
 
 // skip_to_start_of_next_keyword() is disabled -- might tickle corruption bug 
 // in windows iostream
@@ -65,14 +65,14 @@ bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream
 
 // characters are pulled out of input_stream and appended to output_string
 // returns result of input_stream.good() after characters are pulled
-bool get_word(std::string& output_string, std::istream& input_stream);
-bool get_line(std::string& output_string, std::istream& input_stream);
+LL_COMMON_API bool get_word(std::string& output_string, std::istream& input_stream);
+LL_COMMON_API bool get_line(std::string& output_string, std::istream& input_stream);
 
 // characters are pulled out of input_stream (up to a max of 'n')
 // and appended to output_string 
 // returns result of input_stream.good() after characters are pulled
-bool get_word(std::string& output_string, std::istream& input_stream, int n);
-bool get_line(std::string& output_string, std::istream& input_stream, int n);
+LL_COMMON_API bool get_word(std::string& output_string, std::istream& input_stream, int n);
+LL_COMMON_API bool get_line(std::string& output_string, std::istream& input_stream, int n);
 
 // unget_line() is disabled -- might tickle corruption bug in windows iostream
 //// backs up the input_stream by line_size + 1 characters
@@ -82,28 +82,28 @@ bool get_line(std::string& output_string, std::istream& input_stream, int n);
 
 // removes the last char in 'line' if it matches 'c'
 // returns true if removed last char
-bool remove_last_char(char c, std::string& line);
+LL_COMMON_API bool remove_last_char(char c, std::string& line);
 
 // replaces escaped characters with the correct characters from left to right
 // "\\" ---> '\\' 
 // "\n" ---> '\n' 
-void unescape_string(std::string& line);
+LL_COMMON_API void unescape_string(std::string& line);
 
 // replaces unescaped characters with expanded equivalents from left to right
 // '\\' ---> "\\" 
 // '\n' ---> "\n" 
-void escape_string(std::string& line);
+LL_COMMON_API void escape_string(std::string& line);
 
 // replaces each '\n' character with ' '
-void replace_newlines_with_whitespace(std::string& line);
+LL_COMMON_API void replace_newlines_with_whitespace(std::string& line);
 
 // erases any double-quote characters in line
-void remove_double_quotes(std::string& line);
+LL_COMMON_API void remove_double_quotes(std::string& line);
 
 // the 'keyword' is defined as the first word on a line
 // the 'value' is everything after the keyword on the same line
 // starting at the first non-whitespace and ending right before the newline
-void get_keyword_and_value(std::string& keyword, 
+LL_COMMON_API void get_keyword_and_value(std::string& keyword, 
 						   std::string& value, 
 						   const std::string& line);
 
@@ -111,13 +111,13 @@ void get_keyword_and_value(std::string& keyword,
 // read anymore or until we hit the count.  Some istream
 // implimentations have a max that they will read.
 // Returns the number of bytes read.
-std::streamsize fullread(
+LL_COMMON_API std::streamsize fullread(
 	std::istream& istr,
 	char* buf,
 	std::streamsize requested);
 
 
-std::istream& operator>>(std::istream& str, const char *tocheck);
+LL_COMMON_API std::istream& operator>>(std::istream& str, const char *tocheck);
 
 #endif
 
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 1aba001353..da1900eadf 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -147,7 +147,7 @@ struct char_traits<U16>
 };
 #endif
 
-class LLStringOps
+class LL_COMMON_API LLStringOps
 {
 private:
 	static long sltOffset;
@@ -194,13 +194,13 @@ public:
  * @brief Return a string constructed from in without crashing if the
  * pointer is NULL.
  */
-std::string ll_safe_string(const char* in);
-std::string ll_safe_string(const char* in, S32 maxlen);
+LL_COMMON_API std::string ll_safe_string(const char* in);
+LL_COMMON_API std::string ll_safe_string(const char* in, S32 maxlen);
 
 
 // Allowing assignments from non-strings into format_map_t is apparently
 // *really* error-prone, so subclass std::string with just basic c'tors.
-class LLFormatMapString
+class LL_COMMON_API LLFormatMapString
 {
 public:
 	LLFormatMapString() {};
@@ -375,7 +375,7 @@ inline std::string chop_tail_copy(
  * @brief This translates a nybble stored as a hex value from 0-f back
  * to a nybble in the low order bits of the return byte.
  */
-U8 hex_as_nybble(char hex);
+LL_COMMON_API U8 hex_as_nybble(char hex);
 
 /**
  * @brief read the contents of a file into a string.
@@ -386,8 +386,8 @@ U8 hex_as_nybble(char hex);
  * @param filename The full name of the file to read.
  * @return Returns true on success. If false, str is unmodified.
  */
-bool _read_file_into_string(std::string& str, const std::string& filename);
-bool iswindividual(llwchar elem);
+LL_COMMON_API bool _read_file_into_string(std::string& str, const std::string& filename);
+LL_COMMON_API bool iswindividual(llwchar elem);
 
 /**
  * Unicode support
@@ -396,52 +396,52 @@ bool iswindividual(llwchar elem);
 // Make the incoming string a utf8 string. Replaces any unknown glyph
 // with the UNKOWN_CHARACTER. Once any unknown glph is found, the rest
 // of the data may not be recovered.
-std::string rawstr_to_utf8(const std::string& raw);
+LL_COMMON_API std::string rawstr_to_utf8(const std::string& raw);
 
 //
 // We should never use UTF16 except when communicating with Win32!
 //
 typedef std::basic_string<U16> llutf16string;
 
-LLWString utf16str_to_wstring(const llutf16string &utf16str, S32 len);
-LLWString utf16str_to_wstring(const llutf16string &utf16str);
+LL_COMMON_API LLWString utf16str_to_wstring(const llutf16string &utf16str, S32 len);
+LL_COMMON_API LLWString utf16str_to_wstring(const llutf16string &utf16str);
 
-llutf16string wstring_to_utf16str(const LLWString &utf32str, S32 len);
-llutf16string wstring_to_utf16str(const LLWString &utf32str);
+LL_COMMON_API llutf16string wstring_to_utf16str(const LLWString &utf32str, S32 len);
+LL_COMMON_API llutf16string wstring_to_utf16str(const LLWString &utf32str);
 
-llutf16string utf8str_to_utf16str ( const std::string& utf8str, S32 len);
-llutf16string utf8str_to_utf16str ( const std::string& utf8str );
+LL_COMMON_API llutf16string utf8str_to_utf16str ( const std::string& utf8str, S32 len);
+LL_COMMON_API llutf16string utf8str_to_utf16str ( const std::string& utf8str );
 
-LLWString utf8str_to_wstring(const std::string &utf8str, S32 len);
-LLWString utf8str_to_wstring(const std::string &utf8str);
+LL_COMMON_API LLWString utf8str_to_wstring(const std::string &utf8str, S32 len);
+LL_COMMON_API LLWString utf8str_to_wstring(const std::string &utf8str);
 // Same function, better name. JC
 inline LLWString utf8string_to_wstring(const std::string& utf8_string) { return utf8str_to_wstring(utf8_string); }
 
 //
-S32 wchar_to_utf8chars(llwchar inchar, char* outchars);
+LL_COMMON_API S32 wchar_to_utf8chars(llwchar inchar, char* outchars);
 
-std::string wstring_to_utf8str(const LLWString &utf32str, S32 len);
-std::string wstring_to_utf8str(const LLWString &utf32str);
+LL_COMMON_API std::string wstring_to_utf8str(const LLWString &utf32str, S32 len);
+LL_COMMON_API std::string wstring_to_utf8str(const LLWString &utf32str);
 
-std::string utf16str_to_utf8str(const llutf16string &utf16str, S32 len);
-std::string utf16str_to_utf8str(const llutf16string &utf16str);
+LL_COMMON_API std::string utf16str_to_utf8str(const llutf16string &utf16str, S32 len);
+LL_COMMON_API std::string utf16str_to_utf8str(const llutf16string &utf16str);
 
 // Length of this UTF32 string in bytes when transformed to UTF8
-S32 wstring_utf8_length(const LLWString& wstr); 
+LL_COMMON_API S32 wstring_utf8_length(const LLWString& wstr); 
 
 // Length in bytes of this wide char in a UTF8 string
-S32 wchar_utf8_length(const llwchar wc); 
+LL_COMMON_API S32 wchar_utf8_length(const llwchar wc); 
 
-std::string utf8str_tolower(const std::string& utf8str);
+LL_COMMON_API std::string utf8str_tolower(const std::string& utf8str);
 
 // Length in llwchar (UTF-32) of the first len units (16 bits) of the given UTF-16 string.
-S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len);
+LL_COMMON_API S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len);
 
 // Length in utf16string (UTF-16) of wlen wchars beginning at woffset.
-S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen);
+LL_COMMON_API S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen);
 
 // Length in wstring (i.e., llwchar count) of a part of a wstring specified by utf16 length (i.e., utf16 units.)
-S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL);
+LL_COMMON_API S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL);
 
 /**
  * @brief Properly truncate a utf8 string to a maximum byte count.
@@ -453,11 +453,11 @@ S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset
  * @param max_len The maximum number of bytes in the return value.
  * @return Returns a valid utf8 string with byte count <= max_len.
  */
-std::string utf8str_truncate(const std::string& utf8str, const S32 max_len);
+LL_COMMON_API std::string utf8str_truncate(const std::string& utf8str, const S32 max_len);
 
-std::string utf8str_trim(const std::string& utf8str);
+LL_COMMON_API std::string utf8str_trim(const std::string& utf8str);
 
-S32 utf8str_compare_insensitive(
+LL_COMMON_API S32 utf8str_compare_insensitive(
 	const std::string& lhs,
 	const std::string& rhs);
 
@@ -468,17 +468,17 @@ S32 utf8str_compare_insensitive(
  * @param target_char The wchar to be replaced
  * @param replace_char The wchar which is written on replace
  */
-std::string utf8str_substChar(
+LL_COMMON_API std::string utf8str_substChar(
 	const std::string& utf8str,
 	const llwchar target_char,
 	const llwchar replace_char);
 
-std::string utf8str_makeASCII(const std::string& utf8str);
+LL_COMMON_API std::string utf8str_makeASCII(const std::string& utf8str);
 
 // Hack - used for evil notecards.
-std::string mbcsstring_makeASCII(const std::string& str); 
+LL_COMMON_API std::string mbcsstring_makeASCII(const std::string& str); 
 
-std::string utf8str_removeCRLF(const std::string& utf8str);
+LL_COMMON_API std::string utf8str_removeCRLF(const std::string& utf8str);
 
 
 #if LL_WINDOWS
@@ -503,14 +503,21 @@ std::string utf8str_removeCRLF(const std::string& utf8str);
  * formatted string.
  *
  */
-int safe_snprintf(char* str, size_t size, const char* format, ...);
+
+// Deal with the differeneces on Windows
+namespace snprintf_hack
+{
+	LL_COMMON_API int snprintf(char *str, size_t size, const char *format, ...);
+}
+
+using snprintf_hack::snprintf;
 
 /**
  * @brief Convert a wide string to std::string
  *
  * This replaces the unsafe W2A macro from ATL.
  */
-std::string ll_convert_wide_to_string(const wchar_t* in);
+LL_COMMON_API std::string ll_convert_wide_to_string(const wchar_t* in);
 
 //@}
 #endif // LL_WINDOWS
@@ -533,7 +540,7 @@ namespace LLStringFn
 	 * with zero non-printable characters.
 	 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
 	 */
-	void replace_nonprintable_in_ascii(
+	LL_COMMON_API void replace_nonprintable_in_ascii(
 		std::basic_string<char>& string,
 		char replacement);
 
@@ -547,7 +554,7 @@ namespace LLStringFn
 	 * with zero non-printable characters and zero pipe characters.
 	 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
 	 */
-	void replace_nonprintable_and_pipe_in_ascii(std::basic_string<char>& str,
+	LL_COMMON_API void replace_nonprintable_and_pipe_in_ascii(std::basic_string<char>& str,
 									   char replacement);
 
 
@@ -556,7 +563,7 @@ namespace LLStringFn
 	 * Returns a copy of the string with those characters removed.
 	 * Works with US ASCII and UTF-8 encoded strings.  JC
 	 */
-	std::string strip_invalid_xml(const std::string& input);
+	LL_COMMON_API std::string strip_invalid_xml(const std::string& input);
 
 
 	/**
@@ -567,7 +574,7 @@ namespace LLStringFn
 	 * with zero non-printable characters.
 	 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
 	 */
-	void replace_ascii_controlchars(
+	LL_COMMON_API void replace_ascii_controlchars(
 		std::basic_string<char>& string,
 		char replacement);
 }
diff --git a/indra/llcommon/llstringtable.h b/indra/llcommon/llstringtable.h
index 4492063275..b13b016396 100644
--- a/indra/llcommon/llstringtable.h
+++ b/indra/llcommon/llstringtable.h
@@ -56,7 +56,7 @@
 
 const U32 MAX_STRINGS_LENGTH = 256;
 
-class LLStringTableEntry
+class LL_COMMON_API LLStringTableEntry
 {
 public:
 	LLStringTableEntry(const char *str)
@@ -81,7 +81,7 @@ public:
 	S32  mCount;
 };
 
-class LLStringTable
+class LL_COMMON_API LLStringTable
 {
 public:
 	LLStringTable(int tablesize);
@@ -115,7 +115,7 @@ public:
 #endif	
 };
 
-extern LLStringTable gStringTable;
+extern LL_COMMON_API LLStringTable gStringTable;
 
 //============================================================================
 
@@ -125,7 +125,7 @@ extern LLStringTable gStringTable;
 
 typedef const std::string* LLStdStringHandle;
 
-class LLStdStringTable
+class LL_COMMON_API LLStdStringTable
 {
 public:
 	LLStdStringTable(S32 tablesize = 0)
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h
index 03f48ca018..c2c45bec9a 100644
--- a/indra/llcommon/llsys.h
+++ b/indra/llcommon/llsys.h
@@ -45,7 +45,7 @@
 #include <iosfwd>
 #include <string>
 
-class LLOSInfo
+class LL_COMMON_API LLOSInfo
 {
 public:
 	LLOSInfo();
@@ -70,7 +70,7 @@ private:
 };
 
 
-class LLCPUInfo
+class LL_COMMON_API LLCPUInfo
 {
 public:
 	LLCPUInfo();	
@@ -99,7 +99,7 @@ private:
 //
 //	CLASS		LLMemoryInfo
 
-class LLMemoryInfo
+class LL_COMMON_API LLMemoryInfo
 
 /*!	@brief		Class to query the memory subsystem
 
@@ -123,15 +123,15 @@ public:
 };
 
 
-std::ostream& operator<<(std::ostream& s, const LLOSInfo& info);
-std::ostream& operator<<(std::ostream& s, const LLCPUInfo& info);
-std::ostream& operator<<(std::ostream& s, const LLMemoryInfo& info);
+LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLOSInfo& info);
+LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCPUInfo& info);
+LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLMemoryInfo& info);
 
 // gunzip srcfile into dstfile.  Returns FALSE on error.
-BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile);
+BOOL LL_COMMON_API gunzip_file(const std::string& srcfile, const std::string& dstfile);
 // gzip srcfile into dstfile.  Returns FALSE on error.
-BOOL gzip_file(const std::string& srcfile, const std::string& dstfile);
+BOOL LL_COMMON_API gzip_file(const std::string& srcfile, const std::string& dstfile);
 
-extern LLCPUInfo gSysCPU;
+extern LL_COMMON_API LLCPUInfo gSysCPU;
 
 #endif // LL_LLSYS_H
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index f25339f48d..e6bf95aaa9 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -38,11 +38,11 @@
 
 #include "apr_thread_cond.h"
 
-class LLThread;
-class LLMutex;
-class LLCondition;
+class LL_COMMON_API LLThread;
+class LL_COMMON_API LLMutex;
+class LL_COMMON_API LLCondition;
 
-class LLThread
+class LL_COMMON_API LLThread
 {
 public:
 	typedef enum e_thread_status
@@ -130,7 +130,7 @@ protected:
 
 //============================================================================
 
-class LLMutex
+class LL_COMMON_API LLMutex
 {
 public:
 	LLMutex(apr_pool_t *apr_poolp); // NULL pool constructs a new pool for the mutex
@@ -147,7 +147,7 @@ protected:
 };
 
 // Actually a condition/mutex pair (since each condition needs to be associated with a mutex).
-class LLCondition : public LLMutex
+class LL_COMMON_API LLCondition : public LLMutex
 {
 public:
 	LLCondition(apr_pool_t *apr_poolp); // Defaults to global pool, could use the thread pool as well.
@@ -194,7 +194,7 @@ void LLThread::unlockData()
 
 // see llmemory.h for LLPointer<> definition
 
-class LLThreadSafeRefCount
+class LL_COMMON_API LLThreadSafeRefCount
 {
 public:
 	static void initThreadSafeRefCount(); // creates sMutex
@@ -246,7 +246,7 @@ private:
 
 // Simple responder for self destructing callbacks
 // Pure virtual class
-class LLResponder : public LLThreadSafeRefCount
+class LL_COMMON_API LLResponder : public LLThreadSafeRefCount
 {
 protected:
 	virtual ~LLResponder();
diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h
index 0319bec45b..d009c0f5f7 100644
--- a/indra/llcommon/lltimer.h
+++ b/indra/llcommon/lltimer.h
@@ -55,7 +55,7 @@ const U32	USEC_PER_HOUR	= USEC_PER_MIN * MIN_PER_HOUR;
 const U32	SEC_PER_HOUR	= SEC_PER_MIN * MIN_PER_HOUR;
 const F64 	SEC_PER_USEC 	= 1.0 / (F64) USEC_PER_SEC;
 
-class LLTimer 
+class LL_COMMON_API LLTimer 
 {
 public:
 	static LLTimer *sTimer;				// global timer
@@ -114,17 +114,17 @@ public:
 //
 // Various functions for initializing/accessing clock and timing stuff.  Don't use these without REALLY knowing how they work.
 //
-U64 get_clock_count();
-F64 calc_clock_frequency(U32 msecs);
-void update_clock_frequencies();
+LL_COMMON_API U64 get_clock_count();
+LL_COMMON_API F64 calc_clock_frequency(U32 msecs);
+LL_COMMON_API void update_clock_frequencies();
 
 // Sleep for milliseconds
-void ms_sleep(U32 ms);
-U32 micro_sleep(U64 us, U32 max_yields = 0xFFFFFFFF);
+LL_COMMON_API void ms_sleep(U32 ms);
+LL_COMMON_API U32 micro_sleep(U64 us, U32 max_yields = 0xFFFFFFFF);
 
 // Returns the correct UTC time in seconds, like time(NULL).
 // Useful on the viewer, which may have its local clock set wrong.
-time_t time_corrected();
+LL_COMMON_API time_t time_corrected();
 
 static inline time_t time_min()
 {
@@ -155,24 +155,24 @@ static inline time_t time_max()
 }
 
 // Correction factor used by time_corrected() above.
-extern S32 gUTCOffset;
+extern LL_COMMON_API S32 gUTCOffset;
 
 // Is the current computer (in its current time zone)
 // observing daylight savings time?
-BOOL is_daylight_savings();
+LL_COMMON_API BOOL is_daylight_savings();
 
 // Converts internal "struct tm" time buffer to Pacific Standard/Daylight Time
 // Usage:
 // S32 utc_time;
 // utc_time = time_corrected();
 // struct tm* internal_time = utc_to_pacific_time(utc_time, gDaylight);
-struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_daylight_time);
+LL_COMMON_API struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_daylight_time);
 
-void microsecondsToTimecodeString(U64 current_time, std::string& tcstring);
-void secondsToTimecodeString(F32 current_time, std::string& tcstring);
+LL_COMMON_API void microsecondsToTimecodeString(U64 current_time, std::string& tcstring);
+LL_COMMON_API void secondsToTimecodeString(F32 current_time, std::string& tcstring);
 
 // class for scheduling a function to be called at a given frequency (approximate, inprecise)
-class LLEventTimer : protected LLInstanceTracker<LLEventTimer>
+class LL_COMMON_API LLEventTimer : protected LLInstanceTracker<LLEventTimer>
 {
 public:
 	LLEventTimer(F32 period);	// period is the amount of time between each call to tick() in seconds
@@ -190,4 +190,6 @@ protected:
 	F32 mPeriod;
 };
 
+U64 LL_COMMON_API totalTime();					// Returns current system time in microseconds
+
 #endif
diff --git a/indra/llcommon/lluri.h b/indra/llcommon/lluri.h
index 156d80b97e..a35598ffe5 100644
--- a/indra/llcommon/lluri.h
+++ b/indra/llcommon/lluri.h
@@ -37,9 +37,9 @@
 
 #include <string>
 
-class LLSD;
-class LLUUID;
-class LLApp;
+class LL_COMMON_API LLSD;
+class LL_COMMON_API LLUUID;
+class LL_COMMON_API LLApp;
 
 /** 
  *
@@ -47,7 +47,7 @@ class LLApp;
  * See: http://www.ietf.org/rfc/rfc3986.txt
  *
  */
-class LLURI
+class LL_COMMON_API LLURI
 {
 public:
   LLURI();
diff --git a/indra/llcommon/lluuid.h b/indra/llcommon/lluuid.h
index 4b32138a06..68e403fd4f 100644
--- a/indra/llcommon/lluuid.h
+++ b/indra/llcommon/lluuid.h
@@ -47,7 +47,7 @@ struct uuid_time_t {
 	U32 low;
 		};
 
-class LLUUID
+class LL_COMMON_API LLUUID
 {
 public:
 	//
@@ -106,8 +106,8 @@ public:
 	LLUUID combine(const LLUUID& other) const;
 	void combine(const LLUUID& other, LLUUID& result) const;  
 
-	friend std::ostream&	 operator<<(std::ostream& s, const LLUUID &uuid);
-	friend std::istream&	 operator>>(std::istream& s, LLUUID &uuid);
+	friend LL_COMMON_API std::ostream&	 operator<<(std::ostream& s, const LLUUID &uuid);
+	friend LL_COMMON_API std::istream&	 operator>>(std::istream& s, LLUUID &uuid);
 
 	void toString(char *out) const;		// Does not allocate memory, needs 36 characters (including \0)
 	void toString(std::string& out) const;
@@ -323,7 +323,7 @@ typedef std::set<LLUUID, lluuid_less> uuid_list_t;
  */
 typedef LLUUID LLAssetID;
 
-class LLTransactionID : public LLUUID
+class LL_COMMON_API LLTransactionID : public LLUUID
 {
 public:
 	LLTransactionID() : LLUUID() { }
diff --git a/indra/llcommon/llworkerthread.h b/indra/llcommon/llworkerthread.h
index 19407f4463..a12bd52a64 100644
--- a/indra/llcommon/llworkerthread.h
+++ b/indra/llcommon/llworkerthread.h
@@ -50,7 +50,7 @@ class LLWorkerClass;
 // Note: ~LLWorkerThread is O(N) N=# of worker threads, assumed to be small
 //   It is assumed that LLWorkerThreads are rarely created/destroyed.
 
-class LLWorkerThread : public LLQueuedThread
+class LL_COMMON_API LLWorkerThread : public LLQueuedThread
 {
 public:
 	class WorkRequest : public LLQueuedThread::QueuedRequest
@@ -113,7 +113,7 @@ public:
 // Only one background task can be active at a time (per instance).
 //  i.e. don't call addWork() if haveWork() returns true
 
-class LLWorkerClass
+class LL_COMMON_API LLWorkerClass
 {
 	friend class LLWorkerThread;
 	friend class LLWorkerThread::WorkRequest;
diff --git a/indra/llcommon/metaclass.h b/indra/llcommon/metaclass.h
index cc10f1675f..8b93e0d6d5 100644
--- a/indra/llcommon/metaclass.h
+++ b/indra/llcommon/metaclass.h
@@ -40,10 +40,10 @@
 
 #include "stdtypes.h"
 
-class LLReflective;
-class LLMetaProperty;
-class LLMetaMethod;
-class LLMetaClass
+class LL_COMMON_API LLReflective;
+class LL_COMMON_API LLMetaProperty;
+class LL_COMMON_API LLMetaMethod;
+class LL_COMMON_API LLMetaClass
 {
 public:
 
diff --git a/indra/llcommon/metaproperty.h b/indra/llcommon/metaproperty.h
index e5ac35907c..96e1b314a4 100644
--- a/indra/llcommon/metaproperty.h
+++ b/indra/llcommon/metaproperty.h
@@ -39,9 +39,9 @@
 #include "llsd.h"
 #include "reflective.h"
 
-class LLMetaClass;
-class LLReflective;
-class LLMetaProperty
+class LL_COMMON_API LLMetaClass;
+class LL_COMMON_API LLReflective;
+class LL_COMMON_API LLMetaProperty
 {
 public:
 	LLMetaProperty(const std::string& name, const LLMetaClass& object_class);
diff --git a/indra/llcommon/reflective.h b/indra/llcommon/reflective.h
index e2c18ebc6d..541712538b 100644
--- a/indra/llcommon/reflective.h
+++ b/indra/llcommon/reflective.h
@@ -35,8 +35,8 @@
 #ifndef LL_REFLECTIVE_H
 #define LL_REFLECTIVE_H
 
-class LLMetaClass;
-class LLReflective
+class LL_COMMON_API LLMetaClass;
+class LL_COMMON_API LLReflective
 {
 public:
 	LLReflective();
diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp
index cd39ac4df3..695b1ca9f4 100644
--- a/indra/llcommon/tests/lleventcoro_test.cpp
+++ b/indra/llcommon/tests/lleventcoro_test.cpp
@@ -53,6 +53,9 @@
 #include <boost/coroutine/future.hpp>
 #include <boost/bind.hpp>
 #include <boost/range.hpp>
+
+#include "linden_common.h"
+
 #include <iostream>
 #include <string>
 
diff --git a/indra/llcommon/timing.h b/indra/llcommon/timing.h
index 2b9f60adad..140ce1fcaa 100644
--- a/indra/llcommon/timing.h
+++ b/indra/llcommon/timing.h
@@ -43,7 +43,6 @@ const F32 SEC_TO_MICROSEC = 1000000.f;
 const U64 SEC_TO_MICROSEC_U64 = 1000000;
 const U32 SEC_PER_DAY = 86400;
 
-// This is just a stub, implementation in lltimer.cpp.  This file will be deprecated in the future.
-U64 totalTime();					// Returns current system time in microseconds
+// functionality has been moved lltimer.{cpp,h}.  This file will be deprecated in the future.
 
 #endif
diff --git a/indra/llcommon/u64.h b/indra/llcommon/u64.h
index 09a6b3e18d..eb51131e94 100644
--- a/indra/llcommon/u64.h
+++ b/indra/llcommon/u64.h
@@ -39,14 +39,14 @@
  * @param str The string to parse.
  * @return Returns the first U64 value found in the string or 0 on failure.
  */
-U64 str_to_U64(const std::string& str);
+LL_COMMON_API U64 str_to_U64(const std::string& str);
 
 /**
  * @brief Given a U64 value, return a printable representation.
  * @param value The U64 to turn into a printable character array.
  * @return Returns the result string.
  */
-std::string U64_to_str(U64 value);
+LL_COMMON_API std::string U64_to_str(U64 value);
 
 /**
  * @brief Given a U64 value, return a printable representation.
@@ -65,16 +65,16 @@ std::string U64_to_str(U64 value);
  * @param result_size The size of the buffer allocated. Use U64_BUF.
  * @return Returns the result pointer.
  */
-char* U64_to_str(U64 value, char* result, S32 result_size);
+LL_COMMON_API char* U64_to_str(U64 value, char* result, S32 result_size);
 
 /**
  * @brief Convert a U64 to the closest F64 value.
  */
-F64 U64_to_F64(const U64 value);
+LL_COMMON_API F64 U64_to_F64(const U64 value);
 
 /**
  * @brief Helper function to wrap strtoull() which is not available on windows.
  */
-U64 llstrtou64(const char* str, char** end, S32 base);
+LL_COMMON_API U64 llstrtou64(const char* str, char** end, S32 base);
 
 #endif
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index 60ebc44a3e..bd8c0d58e5 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -43,7 +43,7 @@
 #include "llsdutil.h"
 #include "lltransactiontypes.h"
 #include "lltransactionflags.h"
-#include "llsdutil.h"
+#include "llsdutil_math.h"
 #include "message.h"
 #include "u64.h"
 
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt
index 6a329fabb6..f84cdf1563 100644
--- a/indra/llmath/CMakeLists.txt
+++ b/indra/llmath/CMakeLists.txt
@@ -60,6 +60,7 @@ set(llmath_HEADER_FILES
     llv4vector3.h
     llvolume.h
     llvolumemgr.h
+    llsdutil_math.h
     m3math.h
     m4math.h
     raytrace.h
diff --git a/indra/llmath/llsdutil_math.cpp b/indra/llmath/llsdutil_math.cpp
index c5176681ce..1bd12ae513 100644
--- a/indra/llmath/llsdutil_math.cpp
+++ b/indra/llmath/llsdutil_math.cpp
@@ -34,7 +34,7 @@
 
 #include "linden_common.h"
 
-#include "llsdutil.h"
+#include "llsdutil_math.h"
 
 #include "v3math.h"
 #include "v4math.h"
diff --git a/indra/llmath/llsdutil_math.h b/indra/llmath/llsdutil_math.h
new file mode 100644
index 0000000000..121f4b746a
--- /dev/null
+++ b/indra/llmath/llsdutil_math.h
@@ -0,0 +1,70 @@
+/** 
+ * @file llsdutil_math.h
+ * @author Brad
+ * @date 2009-05-19
+ * @brief Utility classes, functions, etc, for using structured data with math classes.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSDUTIL_MATH_H
+#define LL_LLSDUTIL_MATH_H
+
+class LL_COMMON_API LLSD;
+
+// vector3
+class LLVector3;
+LLSD ll_sd_from_vector3(const LLVector3& vec);
+LLVector3 ll_vector3_from_sd(const LLSD& sd, S32 start_index = 0);
+
+// vector4
+class LLVector4;
+LLSD ll_sd_from_vector4(const LLVector4& vec);
+LLVector4 ll_vector4_from_sd(const LLSD& sd, S32 start_index = 0);
+
+// vector3d (double)
+class LLVector3d;
+LLSD ll_sd_from_vector3d(const LLVector3d& vec);
+LLVector3d ll_vector3d_from_sd(const LLSD& sd, S32 start_index = 0);
+
+// vector2
+class LLVector2;
+LLSD ll_sd_from_vector2(const LLVector2& vec);
+LLVector2 ll_vector2_from_sd(const LLSD& sd);
+
+// Quaternion
+class LLQuaternion;
+LLSD ll_sd_from_quaternion(const LLQuaternion& quat);
+LLQuaternion ll_quaternion_from_sd(const LLSD& sd);
+
+// color4
+class LLColor4;
+LLSD ll_sd_from_color4(const LLColor4& c);
+LLColor4 ll_color4_from_sd(const LLSD& sd);
+
+#endif // LL_LLSDUTIL_MATH_H
diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp
index aa64232e42..e41b332e7b 100644
--- a/indra/llmessage/llinstantmessage.cpp
+++ b/indra/llmessage/llinstantmessage.cpp
@@ -40,7 +40,7 @@
 #include "lluuid.h"
 #include "llsd.h"
 #include "llsdserialize.h"
-#include "llsdutil.h"
+#include "llsdutil_math.h"
 #include "llpointer.h"
 #include "message.h"
 
diff --git a/indra/llmessage/llpartdata.cpp b/indra/llmessage/llpartdata.cpp
index 485bc6aa44..9376cde7b5 100644
--- a/indra/llmessage/llpartdata.cpp
+++ b/indra/llmessage/llpartdata.cpp
@@ -39,6 +39,8 @@
 #include "v4coloru.h"
 
 #include "llsdutil.h"
+#include "llsdutil_math.h"
+
 
 
 const S32 PS_PART_DATA_BLOCK_SIZE = 4 + 2 + 4 + 4 + 2 + 2; // 18
diff --git a/indra/llmessage/llregionpresenceverifier.cpp b/indra/llmessage/llregionpresenceverifier.cpp
index 0527d5cb8d..e6be4af07b 100644
--- a/indra/llmessage/llregionpresenceverifier.cpp
+++ b/indra/llmessage/llregionpresenceverifier.cpp
@@ -30,6 +30,8 @@
  * $/LicenseInfo$
  */
 
+#include "linden_common.h"
+
 #include "llregionpresenceverifier.h"
 #include "llhttpclientinterface.h"
 #include <sstream>
diff --git a/indra/llmessage/llsdmessagebuilder.cpp b/indra/llmessage/llsdmessagebuilder.cpp
index 21937f022f..6e41b03895 100755
--- a/indra/llmessage/llsdmessagebuilder.cpp
+++ b/indra/llmessage/llsdmessagebuilder.cpp
@@ -37,6 +37,7 @@
 #include "llmessagetemplate.h"
 #include "llquaternion.h"
 #include "llsdutil.h"
+#include "llsdutil_math.h"
 #include "llsdserialize.h"
 #include "u64.h"
 #include "v3dmath.h"
diff --git a/indra/llmessage/llsdmessagereader.cpp b/indra/llmessage/llsdmessagereader.cpp
index e699ec9e28..845a12d23b 100755
--- a/indra/llmessage/llsdmessagereader.cpp
+++ b/indra/llmessage/llsdmessagereader.cpp
@@ -38,6 +38,7 @@
 #include "llsdmessagebuilder.h"
 #include "llsdutil.h"
 
+#include "llsdutil_math.h"
 #include "v3math.h"
 #include "v4math.h"
 #include "v3dmath.h"
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 13facc0d58..a0fcecfe5f 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -43,7 +43,7 @@
 #include "llvolumemgr.h"
 #include "llstring.h"
 #include "lldatapacker.h"
-#include "llsdutil.h"
+#include "llsdutil_math.h"
 #include "llprimtexturelist.h"
 
 /**
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index 3bcd831142..2736d54cc8 100644
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
@@ -33,7 +33,7 @@
 #include "linden_common.h"
 
 #include "lltextureentry.h"
-#include "llsdutil.h"
+#include "llsdutil_math.h"
 
 const U8 DEFAULT_BUMP_CODE = 0;  // no bump or shininess
 
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 61194c4ecf..f39e88f483 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -547,8 +547,6 @@ void LLGLManager::shutdownGL()
 // these are used to turn software blending on. They appear in the Debug/Avatar menu
 // presence of vertex skinning/blending or vertex programs will set these to FALSE by default.
 
-extern LLCPUInfo gSysCPU;
-
 void LLGLManager::initExtensions()
 {
 #if LL_MESA_HEADLESS
diff --git a/indra/llui/llfunctorregistry.cpp b/indra/llui/llfunctorregistry.cpp
index 0c5b1655b1..5f9644f258 100644
--- a/indra/llui/llfunctorregistry.cpp
+++ b/indra/llui/llfunctorregistry.cpp
@@ -31,6 +31,7 @@
  * $/LicenseInfo$
  **/
 
+#include "linden_common.h"
 #include "llfunctorregistry.h"
 
 // This is a default functor always resident in the system.
diff --git a/indra/lscript/lscript_execute/llscriptresource.cpp b/indra/lscript/lscript_execute/llscriptresource.cpp
index 6c4776c2e4..cd3696ab3f 100644
--- a/indra/lscript/lscript_execute/llscriptresource.cpp
+++ b/indra/lscript/lscript_execute/llscriptresource.cpp
@@ -30,6 +30,8 @@
  * $/LicenseInfo$
  */
 
+#include "linden_common.h"
+
 #include "llscriptresource.h"
 #include "llerror.h"
 
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 35613b7c34..e863be40e1 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -44,6 +44,7 @@
 #include "llgl.h"
 #include "llsecondlifeurls.h"
 
+#include "llappviewer.h"
 #include "llviewercontrol.h"
 #include "llworld.h"
 #include "lldrawpoolterrain.h"
@@ -58,11 +59,6 @@
 #include "lldxhardware.h"
 #endif
 
-//
-// externs
-//
-extern LLMemoryInfo gSysMemory;
-extern LLCPUInfo gSysCPU;
 
 #if LL_DARWIN
 const char FEATURE_TABLE_FILENAME[] = "featuretable_mac.txt";
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 9b5d322ba6..356ecff236 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -61,8 +61,6 @@
 #include "llmediamanager.h"
 
 
-extern LLCPUInfo gSysCPU;
-extern LLMemoryInfo gSysMemory;
 extern U32 gPacketsIn;
 
 static std::string get_viewer_release_notes_url();
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 26ce5c5ac4..9e3bc76c9c 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -40,7 +40,7 @@
 #include "llerror.h"
 #include "llbutton.h"
 #include "llhttpclient.h"
-#include "llsdutil.h"
+#include "llsdutil_math.h"
 #include "llstring.h"
 #include "lluictrlfactory.h"
 
diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp
index 227faaa584..ee194ee7e8 100644
--- a/indra/newview/llpanelplace.cpp
+++ b/indra/newview/llpanelplace.cpp
@@ -59,6 +59,7 @@
 //#include "llviewermenu.h"	// create_landmark()
 #include "llweb.h"
 #include "llsdutil.h"
+#include "llsdutil_math.h"
 
 //static
 std::list<LLPanelPlace*> LLPanelPlace::sAllPanels;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index eddc23b0c4..41568217c0 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -70,7 +70,7 @@
 #include "llregionhandle.h"
 #include "llsd.h"
 #include "llsdserialize.h"
-#include "llsdutil.h"
+#include "llsdutil_math.h"
 #include "llsecondlifeurls.h"
 #include "llstring.h"
 #include "lluserrelations.h"
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index da9587a359..224ccf41b6 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -58,6 +58,7 @@
 #include "llparcelselection.h"
 #include "llresmgr.h"
 #include "llsdutil.h"
+#include "llsdutil_math.h"
 #include "llstatusbar.h"
 #include "llui.h"
 #include "llviewerimage.h"
diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index 42872d85fb..e08193f785 100644
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -29,6 +29,8 @@
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
+
+#include "linden_common.h"
 #include "../test/lltut.h"
 
 #include "../llagentaccess.h"
diff --git a/indra/test/llsdmessagebuilder_tut.cpp b/indra/test/llsdmessagebuilder_tut.cpp
index 27ab127772..9edb915703 100755
--- a/indra/test/llsdmessagebuilder_tut.cpp
+++ b/indra/test/llsdmessagebuilder_tut.cpp
@@ -44,6 +44,7 @@
 #include "v3dmath.h"
 #include "v3math.h"
 #include "v4math.h"
+#include "llsdutil.cpp"
 #include "llsdutil_math.cpp"
 #include "lltemplatemessagebuilder.h"
 
diff --git a/indra/test/llsdmessagereader_tut.cpp b/indra/test/llsdmessagereader_tut.cpp
index 36cfe5ebfc..f11e148cca 100755
--- a/indra/test/llsdmessagereader_tut.cpp
+++ b/indra/test/llsdmessagereader_tut.cpp
@@ -42,6 +42,7 @@
 #include "message.h"
 #include "llsdmessagereader.h"
 #include "llsdutil.h"
+#include "llsdutil_math.h"
 
 namespace tut
 {	
diff --git a/indra/test/llsdutil_tut.cpp b/indra/test/llsdutil_tut.cpp
index 093a29652c..35ab80e791 100644
--- a/indra/test/llsdutil_tut.cpp
+++ b/indra/test/llsdutil_tut.cpp
@@ -44,6 +44,7 @@
 #include "v4math.h"
 #include "llquaternion.h"
 #include "llsdutil.h"
+#include "llsdutil_math.h"
 #include <set>
 #include <boost/range.hpp>
 
-- 
cgit v1.2.3


From a81c084debb4075f36bacd59cbe332c2f0548d50 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 26 May 2009 22:36:38 +0000
Subject: Add llsd_equals(), a function whose absence sorely puzzles me

---
 indra/llcommon/llsdutil.cpp | 92 +++++++++++++++++++++++++++++++++++++++++++++
 indra/llcommon/llsdutil.h   |  3 ++
 indra/test/llsdutil_tut.cpp | 58 +++++++++++++++++++++++++++-
 3 files changed, 151 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index 643720cebe..c8d8030e87 100644
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
@@ -576,3 +576,95 @@ std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::str
     // bad LLSD doesn't define isConvertible(Type to, Type from).
     return match_types(prototype.type(), TypeVector(), data.type(), pfx);
 }
+
+bool llsd_equals(const LLSD& lhs, const LLSD& rhs)
+{
+    // We're comparing strict equality of LLSD representation rather than
+    // performing any conversions. So if the types aren't equal, the LLSD
+    // values aren't equal.
+    if (lhs.type() != rhs.type())
+    {
+        return false;
+    }
+
+    // Here we know both types are equal. Now compare values.
+    switch (lhs.type())
+    {
+    case LLSD::TypeUndefined:
+        // Both are TypeUndefined. There's nothing more to know.
+        return true;
+
+#define COMPARE_SCALAR(type)                                    \
+    case LLSD::Type##type:                                      \
+        /* LLSD::URI has operator!=() but not operator==() */   \
+        /* rely on the optimizer for all others */              \
+        return (! (lhs.as##type() != rhs.as##type()))
+
+    COMPARE_SCALAR(Boolean);
+    COMPARE_SCALAR(Integer);
+    // The usual caveats about comparing floating-point numbers apply. This is
+    // only useful when we expect identical bit representation for a given
+    // Real value, e.g. for integer-valued Reals.
+    COMPARE_SCALAR(Real);
+    COMPARE_SCALAR(String);
+    COMPARE_SCALAR(UUID);
+    COMPARE_SCALAR(Date);
+    COMPARE_SCALAR(URI);
+    COMPARE_SCALAR(Binary);
+
+#undef COMPARE_SCALAR
+
+    case LLSD::TypeArray:
+    {
+        LLSD::array_const_iterator
+            lai(lhs.beginArray()), laend(lhs.endArray()),
+            rai(rhs.beginArray()), raend(rhs.endArray());
+        // Compare array elements, walking the two arrays in parallel.
+        for ( ; lai != laend && rai != raend; ++lai, ++rai)
+        {
+            // If any one array element is unequal, the arrays are unequal.
+            if (! llsd_equals(*lai, *rai))
+                return false;
+        }
+        // Here we've reached the end of one or the other array. They're equal
+        // only if they're BOTH at end: that is, if they have equal length too.
+        return (lai == laend && rai == raend);
+    }
+
+    case LLSD::TypeMap:
+    {
+        // Build a set of all rhs keys.
+        std::set<LLSD::String> rhskeys;
+        for (LLSD::map_const_iterator rmi(rhs.beginMap()), rmend(rhs.endMap());
+             rmi != rmend; ++rmi)
+        {
+            rhskeys.insert(rmi->first);
+        }
+        // Now walk all the lhs keys.
+        for (LLSD::map_const_iterator lmi(lhs.beginMap()), lmend(lhs.endMap());
+             lmi != lmend; ++lmi)
+        {
+            // Try to erase this lhs key from the set of rhs keys. If rhs has
+            // no such key, the maps are unequal. erase(key) returns count of
+            // items erased.
+            if (rhskeys.erase(lmi->first) != 1)
+                return false;
+            // Both maps have the current key. Compare values.
+            if (! llsd_equals(lmi->second, rhs[lmi->first]))
+                return false;
+        }
+        // We've now established that all the lhs keys have equal values in
+        // both maps. The maps are equal unless rhs contains a superset of
+        // those keys.
+        return rhskeys.empty();
+    }
+
+    default:
+        // We expect that every possible type() value is specifically handled
+        // above. Failing to extend this switch to support a new LLSD type is
+        // an error that must be brought to the coder's attention.
+        LL_ERRS("llsd_equals") << "llsd_equals(" << lhs << ", " << rhs << "): "
+            "unknown type " << lhs.type() << LL_ENDL;
+        return false;               // pacify the compiler
+    }
+}
diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h
index a4175be450..31d219da52 100644
--- a/indra/llcommon/llsdutil.h
+++ b/indra/llcommon/llsdutil.h
@@ -129,6 +129,9 @@ LL_COMMON_API BOOL compare_llsd_with_template(
  */
 LL_COMMON_API std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::string& pfx="");
 
+/// Deep equality
+bool llsd_equals(const LLSD& lhs, const LLSD& rhs);
+
 // Simple function to copy data out of input & output iterators if
 // there is no need for casting.
 template<typename Input> LLSD llsd_copy_array(Input iter, Input end)
diff --git a/indra/test/llsdutil_tut.cpp b/indra/test/llsdutil_tut.cpp
index 35ab80e791..d125bb0005 100644
--- a/indra/test/llsdutil_tut.cpp
+++ b/indra/test/llsdutil_tut.cpp
@@ -45,6 +45,7 @@
 #include "llquaternion.h"
 #include "llsdutil.h"
 #include "llsdutil_math.h"
+#include "stringize.h"
 #include <set>
 #include <boost/range.hpp>
 
@@ -207,14 +208,16 @@ namespace tut
         map.insert("URI",       LLSD::URI());
         map.insert("Binary",    LLSD::Binary());
         map.insert("Map",       LLSD().insert("foo", LLSD()));
-        // array can't be constructed on the fly
+        // Only an empty array can be constructed on the fly
         LLSD array;
         array.append(LLSD());
         map.insert("Array",     array);
 
         // These iterators are declared outside our various for loops to avoid
         // fatal MSVC warning: "I used to be broken, but I'm all better now!"
-        LLSD::map_const_iterator mi(map.beginMap()), mend(map.endMap());
+        LLSD::map_const_iterator mi, mend(map.endMap());
+
+        /*-------------------------- llsd_matches --------------------------*/
 
         // empty prototype matches anything
         for (mi = map.beginMap(); mi != mend; ++mi)
@@ -337,5 +340,56 @@ namespace tut
             static const char* matches[] = { "Binary" };
             test_matches("Binary", map, boost::begin(matches), boost::end(matches));
         }
+
+        /*-------------------------- llsd_equals ---------------------------*/
+
+        // Cross-product of each LLSD type with every other
+        for (LLSD::map_const_iterator lmi(map.beginMap()), lmend(map.endMap());
+             lmi != lmend; ++lmi)
+        {
+            for (LLSD::map_const_iterator rmi(map.beginMap()), rmend(map.endMap());
+                 rmi != rmend; ++rmi)
+            {
+                // Name this test based on the map keys naming the types of
+                // interest, e.g "String::Integer".
+                // We expect the values (xmi->second) to be equal if and only
+                // if the type names (xmi->first) are equal.
+                ensure(STRINGIZE(lmi->first << "::" << rmi->first),
+                       bool(lmi->first == rmi->first) ==
+                       bool(llsd_equals(lmi->second, rmi->second)));
+            }
+        }
+
+        // Array cases
+        LLSD rarray;
+        rarray.append(1.0);
+        rarray.append(2);
+        rarray.append("3");
+        LLSD larray(rarray);
+        ensure("llsd_equals(equal arrays)", llsd_equals(larray, rarray));
+        rarray[2] = "4";
+        ensure("llsd_equals(different [2])", ! llsd_equals(larray, rarray));
+        rarray = larray;
+        rarray.append(LLSD::Date());
+        ensure("llsd_equals(longer right array)", ! llsd_equals(larray, rarray));
+        rarray = larray;
+        rarray.erase(2);
+        ensure("llsd_equals(shorter right array)", ! llsd_equals(larray, rarray));
+
+        // Map cases
+        LLSD rmap;
+        rmap["San Francisco"] = 65;
+        rmap["Phoenix"] = 92;
+        rmap["Boston"] = 77;
+        LLSD lmap(rmap);
+        ensure("llsd_equals(equal maps)", llsd_equals(lmap, rmap));
+        rmap["Boston"] = 80;
+        ensure("llsd_equals(different [\"Boston\"])", ! llsd_equals(lmap, rmap));
+        rmap = lmap;
+        rmap["Atlanta"] = 95;
+        ensure("llsd_equals(superset right map)", ! llsd_equals(lmap, rmap));
+        rmap = lmap;
+        lmap["Seattle"] = 72;
+        ensure("llsd_equals(superset left map)", ! llsd_equals(lmap, rmap));
     }
 }
-- 
cgit v1.2.3


From 46e7bd31cd6a16ebce71007200bc5776caf12168 Mon Sep 17 00:00:00 2001
From: Brad Kittenbrink <brad@lindenlab.com>
Date: Wed, 27 May 2009 17:41:57 +0000
Subject: Fix for mac build errors following r121524 commit for DEV-27646.

---
 indra/llcommon/llqueuedthread.h |  2 --
 indra/llcommon/llsdserialize.h  | 10 ++++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llqueuedthread.h b/indra/llcommon/llqueuedthread.h
index b3cde22b40..8bfa5632a1 100644
--- a/indra/llcommon/llqueuedthread.h
+++ b/indra/llcommon/llqueuedthread.h
@@ -148,8 +148,6 @@ protected:
 		}
 	};
 
-    template class LL_COMMON_API std::set<QueuedRequest*, queued_request_less>;
-
 
 	//------------------------------------------------------------------------
 	
diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h
index 4b32f0afcd..2f2b292189 100644
--- a/indra/llcommon/llsdserialize.h
+++ b/indra/llcommon/llsdserialize.h
@@ -638,9 +638,14 @@ protected:
  *	params << "[{'version':i1}," << LLSDOStreamer<LLSDNotationFormatter>(sd)
  *    << "]";
  *  </code>
+ *
+ * *NOTE - formerly this class inherited from its template parameter Formatter,
+ * but all insnatiations passed in LLRefCount subclasses.  This conflicted with
+ * the auto allocation intended for this class template (demonstrated in the
+ * example above).  -brad
  */
 template <class Formatter>
-class LLSDOStreamer : public Formatter
+class LLSDOStreamer
 {
 public:
 	/** 
@@ -661,7 +666,8 @@ public:
 		std::ostream& str,
 		const LLSDOStreamer<Formatter>& formatter)
 	{
-		formatter.format(formatter.mSD, str, formatter.mOptions);
+		LLPointer<Formatter> f = new Formatter;
+		f->format(formatter.mSD, str, formatter.mOptions);
 		return str;
 	}
 
-- 
cgit v1.2.3


From 657f8e45faf77b4c53b0d178b83cf2071744ee90 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 27 May 2009 21:16:21 +0000
Subject: Fix minor Mac build breakage (missing #include)

---
 indra/llcommon/lluuid.h | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra')

diff --git a/indra/llcommon/lluuid.h b/indra/llcommon/lluuid.h
index 68e403fd4f..c78fb12018 100644
--- a/indra/llcommon/lluuid.h
+++ b/indra/llcommon/lluuid.h
@@ -35,6 +35,7 @@
 #include <iostream>
 #include <set>
 #include "stdtypes.h"
+#include "llpreprocessor.h"
 
 const S32 UUID_BYTES = 16;
 const S32 UUID_WORDS = 4;
-- 
cgit v1.2.3


From f910157c1662dedb9791efc1439ff09f1f3efbf8 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 27 May 2009 21:17:22 +0000
Subject: DEV-31979: Introduce LLReqID, a class to help individual event API
 listeners implement the ["reqid"] convention. This convention dictates that a
 response LLSD from each such API should contain a ["reqid"] key whose value
 echoes the ["reqid"] value, if any, in the request LLSD. Add LLReqID support
 to LLAresListener's "rewriteURI" service, LLSDMessage, LLCapabilityListener
 and LLXMLRPCListener.

---
 indra/llcommon/llevents.cpp                   | 25 +++++++++
 indra/llcommon/llevents.h                     | 81 +++++++++++++++++++++++++++
 indra/llmessage/llareslistener.cpp            | 39 ++++++-------
 indra/llmessage/llsdmessage.cpp               |  7 ++-
 indra/llmessage/llsdmessage.h                 |  3 +
 indra/llmessage/tests/llareslistener_test.cpp | 12 +++-
 indra/newview/llcapabilitylistener.cpp        |  1 +
 indra/newview/llxmlrpclistener.cpp            |  4 +-
 8 files changed, 147 insertions(+), 25 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 7e3c6964dc..c2fa79a524 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -39,6 +39,8 @@
 #endif
 // other Linden headers
 #include "stringize.h"
+#include "llerror.h"
+#include "llsdutil.h"
 
 /*****************************************************************************
 *   queue_names: specify LLEventPump names that should be instantiated as
@@ -506,3 +508,26 @@ bool LLListenerOrPumpName::operator()(const LLSD& event) const
     }
     return (*mListener)(event);
 }
+
+void LLReqID::stamp(LLSD& response) const
+{
+    if (! (response.isUndefined() || response.isMap()))
+    {
+        // If 'response' was previously completely empty, it's okay to
+        // turn it into a map. If it was already a map, then it should be
+        // okay to add a key. But if it was anything else (e.g. a scalar),
+        // assigning a ["reqid"] key will DISCARD the previous value,
+        // replacing it with a map. That would be Bad.
+        LL_INFOS("LLReqID") << "stamp(" << mReqid << ") leaving non-map response unmodified: "
+                            << response << LL_ENDL;
+        return;
+    }
+    LLSD oldReqid(response["reqid"]);
+    if (! (oldReqid.isUndefined() || llsd_equals(oldReqid, mReqid)))
+    {
+        LL_INFOS("LLReqID") << "stamp(" << mReqid << ") preserving existing [\"reqid\"] value "
+                            << oldReqid << " in response: " << response << LL_ENDL;
+        return;
+    }
+    response["reqid"] = mReqid;
+}
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index e84d9a50ee..73a35af035 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -563,6 +563,87 @@ private:
     EventQueue mEventQueue;
 };
 
+/*****************************************************************************
+*   LLReqID
+*****************************************************************************/
+/**
+ * This class helps the implementer of a given event API to honor the
+ * ["reqid"] convention. By this convention, each event API stamps into its
+ * response LLSD a ["reqid"] key whose value echoes the ["reqid"] value, if
+ * any, from the corresponding request.
+ *
+ * This supports an (atypical, but occasionally necessary) use case in which
+ * two or more asynchronous requests are multiplexed onto the same ["reply"]
+ * LLEventPump. Since the response events could arrive in arbitrary order, the
+ * caller must be able to demux them. It does so by matching the ["reqid"]
+ * value in each response with the ["reqid"] value in the corresponding
+ * request.
+ *
+ * It is the caller's responsibility to ensure distinct ["reqid"] values for
+ * that case. Though LLSD::UUID is guaranteed to work, it might be overkill:
+ * the "namespace" of unique ["reqid"] values is simply the set of requests
+ * specifying the same ["reply"] LLEventPump name.
+ *
+ * Making a given event API echo the request's ["reqid"] into the response is
+ * nearly trivial. This helper is mostly for mnemonic purposes, to serve as a
+ * place to put these comments. We hope that each time a coder implements a
+ * new event API based on some existing one, s/he will say, "Huh, what's an
+ * LLReqID?" and look up this material.
+ *
+ * The hardest part about the convention is deciding where to store the
+ * ["reqid"] value. Ironically, LLReqID can't help with that: you must store
+ * an LLReqID instance in whatever storage will persist until the reply is
+ * sent. For example, if the request ultimately ends up using a Responder
+ * subclass, storing an LLReqID instance in the Responder works.
+ *
+ * @note
+ * The @em implementer of an event API must honor the ["reqid"] convention.
+ * However, the @em caller of an event API need only use it if s/he is sharing
+ * the same ["reply"] LLEventPump for two or more asynchronous event API
+ * requests.
+ *
+ * In most cases, it's far easier for the caller to instantiate a local
+ * LLEventStream and pass its name to the event API in question. Then it's
+ * perfectly reasonable not to set a ["reqid"] key in the request, ignoring
+ * the @c isUndefined() ["reqid"] value in the response.
+ */
+class LLReqID
+{
+public:
+    /**
+     * If you have the request in hand at the time you instantiate the
+     * LLReqID, pass that request to extract its ["reqid"].
+     */
+    LLReqID(const LLSD& request):
+        mReqid(request["reqid"])
+    {}
+    /// If you don't yet have the request, use setFrom() later.
+    LLReqID() {}
+
+    /// Extract and store the ["reqid"] value from an incoming request.
+    void setFrom(const LLSD& request)
+    {
+        mReqid = request["reqid"];
+    }
+
+    /// Set ["reqid"] key into a pending response LLSD object.
+    void stamp(LLSD& response) const;
+
+    /// Make a whole new response LLSD object with our ["reqid"].
+    LLSD makeResponse() const
+    {
+        LLSD response;
+        stamp(response);
+        return response;
+    }
+
+    /// Not really sure of a use case for this accessor...
+    LLSD getReqID() const { return mReqid; }
+
+private:
+    LLSD mReqid;
+};
+
 /*****************************************************************************
 *   Underpinnings
 *****************************************************************************/
diff --git a/indra/llmessage/llareslistener.cpp b/indra/llmessage/llareslistener.cpp
index 8e1176cdd9..4bf375069d 100644
--- a/indra/llmessage/llareslistener.cpp
+++ b/indra/llmessage/llareslistener.cpp
@@ -24,6 +24,7 @@
 #include "llares.h"
 #include "llerror.h"
 #include "llevents.h"
+#include "llsdutil.h"
 
 LLAresListener::LLAresListener(const std::string& pumpname, LLAres* llares):
     mAres(llares),
@@ -31,6 +32,8 @@ LLAresListener::LLAresListener(const std::string& pumpname, LLAres* llares):
                    obtain(pumpname).
                    listen("LLAresListener", boost::bind(&LLAresListener::process, this, _1)))
 {
+    // Insert an entry into our mDispatch map for every method we want to be
+    // able to invoke via this event API.
     mDispatch["rewriteURI"] = boost::bind(&LLAresListener::rewriteURI, this, _1);
 }
 
@@ -60,9 +63,13 @@ bool LLAresListener::process(const LLSD& command)
 class UriRewriteResponder: public LLAres::UriRewriteResponder
 {
 public:
-    /// Specify the event pump name on which to send the reply
-    UriRewriteResponder(const std::string& pumpname):
-        mPumpName(pumpname)
+    /**
+     * Specify the request, containing the event pump name on which to send
+     * the reply.
+     */
+    UriRewriteResponder(const LLSD& request):
+        mReqID(request),
+        mPumpName(request["reply"])
     {}
 
     /// Called by base class with results. This is called in both the
@@ -76,33 +83,27 @@ public:
         {
             result.append(*ui);
         }
+        // This call knows enough to avoid trying to insert a map key into an
+        // LLSD array. It's there so that if, for any reason, we ever decide
+        // to change the response from array to map, it will Just Start Working.
+        mReqID.stamp(result);
         LLEventPumps::instance().obtain(mPumpName).post(result);
     }
 
 private:
+    LLReqID mReqID;
     const std::string mPumpName;
 };
 
 void LLAresListener::rewriteURI(const LLSD& data)
 {
-    const std::string uri(data["uri"]);
-    const std::string reply(data["reply"]);
+    static LLSD required(LLSD().insert("uri", LLSD()).insert("reply", LLSD()));
     // Validate that the request is well-formed
-    if (uri.empty() || reply.empty())
+    std::string mismatch(llsd_matches(required, data));
+    if (! mismatch.empty())
     {
-        LL_ERRS("LLAresListener") << "rewriteURI request missing";
-        std::string separator;
-        if (uri.empty())
-        {
-            LL_CONT << " 'uri'";
-            separator = " and";
-        }
-        if (reply.empty())
-        {
-            LL_CONT << separator << " 'reply'";
-        }
-        LL_CONT << LL_ENDL;
+        LL_ERRS("LLAresListener") << "bad rewriteURI request: " << mismatch << LL_ENDL;
     }
     // Looks as though we have what we need; issue the request
-    mAres->rewriteURI(uri, new UriRewriteResponder(reply));
+    mAres->rewriteURI(data["uri"], new UriRewriteResponder(data));
 }
diff --git a/indra/llmessage/llsdmessage.cpp b/indra/llmessage/llsdmessage.cpp
index f663268466..ad6b8284aa 100644
--- a/indra/llmessage/llsdmessage.cpp
+++ b/indra/llmessage/llsdmessage.cpp
@@ -68,6 +68,7 @@ bool LLSDMessage::httpListener(const LLSD& request)
     }
     LLHTTPClient::post(url, payload,
                        new LLSDMessage::EventResponder(LLEventPumps::instance(),
+                                                       request,
                                                        url, "POST", reply, error),
                        LLSD(),      // headers
                        timeout);
@@ -81,7 +82,9 @@ void LLSDMessage::EventResponder::result(const LLSD& data)
     // to the pump whose name is "".
     if (! mReplyPump.empty())
     {
-        mPumps.obtain(mReplyPump).post(data);
+        LLSD response(data);
+        mReqID.stamp(response);
+        mPumps.obtain(mReplyPump).post(response);
     }
     else                            // default success handling
     {
@@ -98,7 +101,7 @@ void LLSDMessage::EventResponder::error(U32 status, const std::string& reason, c
     // explicit pump name.
     if (! mErrorPump.empty())
     {
-        LLSD info;
+        LLSD info(mReqID.makeResponse());
         info["target"]  = mTarget;
         info["message"] = mMessage;
         info["status"]  = LLSD::Integer(status);
diff --git a/indra/llmessage/llsdmessage.h b/indra/llmessage/llsdmessage.h
index 8ae9451243..672da6d3a6 100644
--- a/indra/llmessage/llsdmessage.h
+++ b/indra/llmessage/llsdmessage.h
@@ -121,9 +121,11 @@ private:
          * (e.g. "POST") as @a message.
          */
         EventResponder(LLEventPumps& pumps,
+                       const LLSD& request,
                        const std::string& target, const std::string& message,
                        const std::string& replyPump, const std::string& errorPump):
             mPumps(pumps),
+            mReqID(request),
             mTarget(target),
             mMessage(message),
             mReplyPump(replyPump),
@@ -135,6 +137,7 @@ private:
     
     private:
         LLEventPumps& mPumps;
+        LLReqID mReqID;
         const std::string mTarget, mMessage, mReplyPump, mErrorPump;
     };
 
diff --git a/indra/llmessage/tests/llareslistener_test.cpp b/indra/llmessage/tests/llareslistener_test.cpp
index b8306d0fd9..215a3806f8 100644
--- a/indra/llmessage/tests/llareslistener_test.cpp
+++ b/indra/llmessage/tests/llareslistener_test.cpp
@@ -149,7 +149,9 @@ namespace tut
         {
             threw = e.what();
         }
-        ensure_contains("LLAresListener bad op", threw, "missing 'uri' and 'reply'");
+        ensure_contains("LLAresListener bad req", threw, "missing");
+        ensure_contains("LLAresListener bad req", threw, "reply");
+        ensure_contains("LLAresListener bad req", threw, "uri");
     }
 
     template<> template<>
@@ -169,7 +171,9 @@ namespace tut
         {
             threw = e.what();
         }
-        ensure_contains("LLAresListener bad op", threw, "missing 'uri'");
+        ensure_contains("LLAresListener bad req", threw, "missing");
+        ensure_contains("LLAresListener bad req", threw, "uri");
+        ensure_does_not_contain("LLAresListener bad req", threw, "reply");
     }
 
     template<> template<>
@@ -189,6 +193,8 @@ namespace tut
         {
             threw = e.what();
         }
-        ensure_contains("LLAresListener bad op", threw, "missing 'reply'");
+        ensure_contains("LLAresListener bad req", threw, "missing");
+        ensure_contains("LLAresListener bad req", threw, "reply");
+        ensure_does_not_contain("LLAresListener bad req", threw, "uri");
     }
 }
diff --git a/indra/newview/llcapabilitylistener.cpp b/indra/newview/llcapabilitylistener.cpp
index 3277da8930..0a41ad614e 100644
--- a/indra/newview/llcapabilitylistener.cpp
+++ b/indra/newview/llcapabilitylistener.cpp
@@ -90,6 +90,7 @@ bool LLCapabilityListener::capListener(const LLSD& request)
         // This capability is supported by the region to which we're talking.
         LLHTTPClient::post(url, payload,
                            new LLSDMessage::EventResponder(LLEventPumps::instance(),
+                                                           request,
                                                            mProvider.getDescription(),
                                                            cap, reply, error),
                            LLSD(),  // headers
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index 2821e6c59f..71e2427c99 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -217,6 +217,7 @@ public:
     /// populate an XMLRPC_REQUEST and an associated LLXMLRPCTransaction. Send
     /// the request.
     Poller(const LLSD& command):
+        mReqID(command),
         mUri(command["uri"]),
         mMethod(command["method"]),
         mReplyPump(command["reply"])
@@ -325,7 +326,7 @@ public:
             curlcode = CURLcode(curlint);
         }
 
-        LLSD data;
+        LLSD data(mReqID.makeResponse());
         data["status"] = sStatusMapper.lookup(status);
         data["errorcode"] = sCURLcodeMapper.lookup(curlcode);
         data["error"] = "";
@@ -476,6 +477,7 @@ private:
         return responses;
     }
 
+    const LLReqID mReqID;
     const std::string mUri;
     const std::string mMethod;
     const std::string mReplyPump;
-- 
cgit v1.2.3


From c607752a9dc17aaf2405ef36a78773d1a6400944 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 28 May 2009 21:25:58 +0000
Subject: DEV-32777: ensure that stack objects listening on persistent
 LLEventPumps get properly disconnected when destroyed. Break out Debug class
 and associated macros from lleventcoro_test.cpp into test/debug.h. Add Debug
 output to lllogin_test.

---
 indra/llcommon/tests/lleventcoro_test.cpp          | 50 +---------------
 indra/test/CMakeLists.txt                          |  1 +
 indra/test/debug.h                                 | 68 ++++++++++++++++++++++
 .../viewer_components/login/tests/lllogin_test.cpp | 57 +++++++++++++-----
 4 files changed, 114 insertions(+), 62 deletions(-)
 create mode 100644 indra/test/debug.h

(limited to 'indra')

diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp
index 695b1ca9f4..3a2cda7735 100644
--- a/indra/llcommon/tests/lleventcoro_test.cpp
+++ b/indra/llcommon/tests/lleventcoro_test.cpp
@@ -65,55 +65,7 @@
 #include "tests/wrapllerrs.h"
 #include "stringize.h"
 #include "lleventcoro.h"
-
-/*****************************************************************************
-*   Debugging stuff
-*****************************************************************************/
-// This class is intended to illuminate entry to a given block, exit from the
-// same block and checkpoints along the way. It also provides a convenient
-// place to turn std::cout output on and off.
-class Debug
-{
-public:
-    Debug(const std::string& block):
-        mBlock(block)
-    {
-        (*this)("entry");
-    }
-
-    ~Debug()
-    {
-        (*this)("exit");
-    }
-
-    void operator()(const std::string& status)
-    {
-//      std::cout << mBlock << ' ' << status << std::endl;
-    }
-
-private:
-    const std::string mBlock;
-};
-
-// It's often convenient to use the name of the enclosing function as the name
-// of the Debug block.
-#define DEBUG Debug debug(__FUNCTION__)
-
-// These BEGIN/END macros are specifically for debugging output -- please
-// don't assume you must use such for coroutines in general! They only help to
-// make control flow (as well as exception exits) explicit.
-#define BEGIN                                   \
-{                                               \
-    DEBUG;                                      \
-    try
-
-#define END                                             \
-    catch (...)                                         \
-    {                                                   \
-/*      std::cout << "*** exceptional " << std::flush; */    \
-        throw;                                          \
-    }                                                   \
-}
+#include "../test/debug.h"
 
 /*****************************************************************************
 *   from the banana.cpp example program borrowed for test<1>()
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 88ef15a8d9..02dd01e1b0 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -90,6 +90,7 @@ set(test_SOURCE_FILES
 set(test_HEADER_FILES
     CMakeLists.txt
 
+    debug.h
     llpipeutil.h
     llsdtraits.h
     lltut.h
diff --git a/indra/test/debug.h b/indra/test/debug.h
new file mode 100644
index 0000000000..a00659d880
--- /dev/null
+++ b/indra/test/debug.h
@@ -0,0 +1,68 @@
+/**
+ * @file   debug.h
+ * @author Nat Goodspeed
+ * @date   2009-05-28
+ * @brief  Debug output for unit test code
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_DEBUG_H)
+#define LL_DEBUG_H
+
+#include <iostream>
+
+/*****************************************************************************
+*   Debugging stuff
+*****************************************************************************/
+// This class is intended to illuminate entry to a given block, exit from the
+// same block and checkpoints along the way. It also provides a convenient
+// place to turn std::cout output on and off.
+class Debug
+{
+public:
+    Debug(const std::string& block):
+        mBlock(block)
+    {
+        (*this)("entry");
+    }
+
+    ~Debug()
+    {
+        (*this)("exit");
+    }
+
+    void operator()(const std::string& status)
+    {
+#if defined(DEBUG_ON)
+        std::cout << mBlock << ' ' << status << std::endl;
+#endif
+    }
+
+private:
+    const std::string mBlock;
+};
+
+// It's often convenient to use the name of the enclosing function as the name
+// of the Debug block.
+#define DEBUG Debug debug(__FUNCTION__)
+
+// These BEGIN/END macros are specifically for debugging output -- please
+// don't assume you must use such for coroutines in general! They only help to
+// make control flow (as well as exception exits) explicit.
+#define BEGIN                                   \
+{                                               \
+    DEBUG;                                      \
+    try
+
+#define END                                     \
+    catch (...)                                 \
+    {                                           \
+        debug("*** exceptional ");              \
+        throw;                                  \
+    }                                           \
+}
+
+#endif /* ! defined(LL_DEBUG_H) */
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index 07c9db1099..b9fe59c0a6 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -1,8 +1,8 @@
 /**
- * @file   llviewerlogin_test.cpp
+ * @file   lllogin_test.cpp
  * @author Mark Palange
  * @date   2009-02-26
- * @brief  Tests of lllazy.h.
+ * @brief  Tests of lllogin.cpp.
  * 
  * $LicenseInfo:firstyear=2009&license=internal$
  * Copyright (c) 2009, Linden Research, Inc.
@@ -20,24 +20,29 @@
 // other Linden headers
 #include "llsd.h"
 #include "../../../test/lltut.h"
+//#define DEBUG_ON
+#include "../../../test/debug.h"
 #include "llevents.h"
+#include "stringize.h"
 
 /*****************************************************************************
-*   TUT
+*   Helper classes
 *****************************************************************************/
 // This is a listener to receive results from lllogin.
-class LoginListener
+class LoginListener: public LLEventTrackable
 {
 	std::string mName;
 	LLSD mLastEvent;
+    Debug mDebug;
 public:
 	LoginListener(const std::string& name) : 
-		mName(name)
+		mName(name),
+        mDebug(stringize(*this))
 	{}
 
 	bool call(const LLSD& event)
 	{
-		std::cout << "LoginListener called!: " << event << std::endl;
+		mDebug(STRINGIZE("LoginListener called!: " << event));
 		mLastEvent = event;
 		return false;
 	}
@@ -47,15 +52,21 @@ public:
         return pump.listen(mName, boost::bind(&LoginListener::call, this, _1));
 	}
 
-	const LLSD& lastEvent() { return mLastEvent; }
+	LLSD lastEvent() { return mLastEvent; }
+
+    friend std::ostream& operator<<(std::ostream& out, const LoginListener& listener)
+    {
+        return out << "LoginListener(" << listener.mName << ')';
+    }
 };
 
-class LLAresListener
+class LLAresListener: public LLEventTrackable
 {
 	std::string mName;
 	LLSD mEvent;
 	bool mImmediateResponse;
 	bool mMultipleURIResponse;
+    Debug mDebug;
 	
 public:
 	LLAresListener(const std::string& name, 
@@ -64,12 +75,13 @@ public:
 				   ) : 
 		mName(name),
 		mImmediateResponse(i),
-		mMultipleURIResponse(m)
+		mMultipleURIResponse(m),
+        mDebug(stringize(*this))
 	{}
 
 	bool handle_event(const LLSD& event)
 	{
-		std::cout << "LLAresListener called!: " << event << std::endl;
+		mDebug(STRINGIZE("LLAresListener called!: " << event));
 		mEvent = event;
 		if(mImmediateResponse)
 		{
@@ -96,14 +108,20 @@ public:
     {
         return pump.listen(mName, boost::bind(&LLAresListener::handle_event, this, _1));
 	}
+
+    friend std::ostream& operator<<(std::ostream& out, const LLAresListener& listener)
+    {
+        return out << "LLAresListener(" << listener.mName << ')';
+    }
 };
 
-class LLXMLRPCListener
+class LLXMLRPCListener: public LLEventTrackable
 {
 	std::string mName;
 	LLSD mEvent;
 	bool mImmediateResponse;
 	LLSD mResponse;
+    Debug mDebug;
 
 public:
 	LLXMLRPCListener(const std::string& name, 
@@ -112,7 +130,8 @@ public:
 					 ) : 
 		mName(name),
 		mImmediateResponse(i),
-		mResponse(response)
+		mResponse(response),
+        mDebug(stringize(*this))
 	{
 		if(mResponse.isUndefined())
 		{
@@ -131,7 +150,7 @@ public:
 
 	bool handle_event(const LLSD& event)
 	{
-		std::cout << "LLXMLRPCListener called!: " << event << std::endl;
+		mDebug(STRINGIZE("LLXMLRPCListener called!: " << event));
 		mEvent = event;
 		if(mImmediateResponse)
 		{
@@ -149,8 +168,16 @@ public:
     {
         return pump.listen(mName, boost::bind(&LLXMLRPCListener::handle_event, this, _1));
 	}
+
+    friend std::ostream& operator<<(std::ostream& out, const LLXMLRPCListener& listener)
+    {
+        return out << "LLXMLRPCListener(" << listener.mName << ')';
+    }
 };
 
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
 namespace tut
 {
     struct llviewerlogin_data
@@ -168,6 +195,7 @@ namespace tut
     template<> template<>
     void llviewerlogin_object::test<1>()
     {
+        DEBUG;
 		// Testing login with immediate repsonses from Ares and XMLPRC
 		// The response from both requests will come before the post request exits.
 		// This tests an edge case of the login state handling.
@@ -201,6 +229,7 @@ namespace tut
     template<> template<>
     void llviewerlogin_object::test<2>()
     {
+        DEBUG;
 		// Tests a successful login in with delayed responses. 
 		// Also includes 'failure' that cause the login module
 		// To re-attempt connection, once from a basic failure
@@ -292,6 +321,7 @@ namespace tut
     template<> template<>
     void llviewerlogin_object::test<3>()
     {
+        DEBUG;
 		// Test completed response, that fails to login.
 		set_test_name("LLLogin valid response, failure (eg. bad credentials)");
 
@@ -338,6 +368,7 @@ namespace tut
     template<> template<>
     void llviewerlogin_object::test<4>()
     {
+        DEBUG;
 		// Test incomplete response, that end the attempt.
 		set_test_name("LLLogin valid response, failure (eg. bad credentials)");
 
-- 
cgit v1.2.3


From 7915162b96e329c6ee5487a7931d6779c78b92a7 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 28 May 2009 22:53:21 +0000
Subject: DEV-31892: rev 119315 got lost somewhere along the way?! Reapplying.

---
 indra/viewer_components/login/lllogin.cpp | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'indra')

diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 87e3811f42..26b950b618 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -138,10 +138,6 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials)
 void LLLogin::Impl::login_(coroutine_type::self& self,
                            const std::string& uri, const LLSD& credentials)
 {
-    // Mimicking previous behavior, every time the OldSchoolLogin state
-    // machine arrived in the Offline state, it would send a progress
-    // announcement.
-    sendProgressEvent("offline", mAuthResponse["responses"]);
     // Arriving in SRVRequest state
     LLEventStream replyPump("reply", true);
     // Should be an array of one or more uri strings.
-- 
cgit v1.2.3


From 7fe359b293db531e7ff82ef606cfa4c5c826b656 Mon Sep 17 00:00:00 2001
From: Brad Kittenbrink <brad@lindenlab.com>
Date: Fri, 29 May 2009 01:34:21 +0000
Subject: Added new LL_COMMON_API dll export declaration for new llsd_equals
 function.

---
 indra/llcommon/llsdutil.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h
index 31d219da52..8cb459d81b 100644
--- a/indra/llcommon/llsdutil.h
+++ b/indra/llcommon/llsdutil.h
@@ -130,7 +130,7 @@ LL_COMMON_API BOOL compare_llsd_with_template(
 LL_COMMON_API std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::string& pfx="");
 
 /// Deep equality
-bool llsd_equals(const LLSD& lhs, const LLSD& rhs);
+LL_COMMON_API bool llsd_equals(const LLSD& lhs, const LLSD& rhs);
 
 // Simple function to copy data out of input & output iterators if
 // there is no need for casting.
-- 
cgit v1.2.3


From 285613b892f41d0c72c03b8551dd003f61a5f2be Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 3 Jun 2009 21:38:21 +0000
Subject: DEV-32777: Introduce LLCoros, an LLSingleton registry of named
 coroutine instances. LLCoros::launch() intends to address three issues: -
 ownership of coroutine instance - cleanup of coroutine instance when it
 terminates - central place to twiddle MSVC optimizations to bypass DEV-32777
 crash. Initially coded on Mac; will address the third bullet on Windows.
 Adapt listenerNameForCoro() to consult LLCoros::getName() if applicable.
 Change LLLogin::Impl::connect() to use LLCoros::launch(). LLCoros::getName()
 relies on patch to boost::coroutines::coroutine::self to introduce get_id().

---
 indra/llcommon/CMakeLists.txt             |   2 +
 indra/llcommon/llcoros.cpp                | 107 ++++++++++++++++
 indra/llcommon/llcoros.h                  | 205 ++++++++++++++++++++++++++++++
 indra/llcommon/lleventcoro.cpp            |  19 ++-
 indra/llcommon/lleventcoro.h              |  13 +-
 indra/viewer_components/login/lllogin.cpp |  28 ++--
 6 files changed, 348 insertions(+), 26 deletions(-)
 create mode 100644 indra/llcommon/llcoros.cpp
 create mode 100644 indra/llcommon/llcoros.h

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 71ec6cb8e4..bbfadbb344 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -26,6 +26,7 @@ set(llcommon_SOURCE_FILES
     llbase32.cpp
     llbase64.cpp
     llcommon.cpp
+    llcoros.cpp
     llcrc.cpp
     llcriticaldamp.cpp
     llcursortypes.cpp
@@ -102,6 +103,7 @@ set(llcommon_HEADER_FILES
     llchat.h
     llclickaction.h
     llcommon.h
+    llcoros.h
     llcrc.h
     llcriticaldamp.h
     llcursortypes.h
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp
new file mode 100644
index 0000000000..6fa6ae8f1a
--- /dev/null
+++ b/indra/llcommon/llcoros.cpp
@@ -0,0 +1,107 @@
+/**
+ * @file   llcoros.cpp
+ * @author Nat Goodspeed
+ * @date   2009-06-03
+ * @brief  Implementation for llcoros.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "llcoros.h"
+// STL headers
+// std headers
+// external library headers
+#include <boost/bind.hpp>
+// other Linden headers
+#include "llevents.h"
+#include "llerror.h"
+#include "stringize.h"
+
+LLCoros::LLCoros()
+{
+    // Register our cleanup() method for "mainloop" ticks
+    LLEventPumps::instance().obtain("mainloop").listen(
+        "LLCoros", boost::bind(&LLCoros::cleanup, this, _1));
+}
+
+bool LLCoros::cleanup(const LLSD&)
+{
+    // Walk the mCoros map, checking and removing completed coroutines.
+    for (CoroMap::iterator mi(mCoros.begin()), mend(mCoros.end()); mi != mend; )
+    {
+        // Has this coroutine exited (normal return, exception, exit() call)
+        // since last tick?
+        if (mi->second->exited())
+        {
+            LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL;
+            // The erase() call will invalidate its passed iterator value --
+            // so increment mi FIRST -- but pass its original value to
+            // erase(). This is what postincrement is all about.
+            mCoros.erase(mi++);
+        }
+        else
+        {
+            // Still live, just skip this entry as if incrementing at the top
+            // of the loop as usual.
+            ++mi;
+        }
+    }
+    return false;
+}
+
+std::string LLCoros::generateDistinctName(const std::string& prefix) const
+{
+    // Allowing empty name would make getName()'s not-found return ambiguous.
+    if (prefix.empty())
+    {
+        LL_ERRS("LLCoros") << "LLCoros::launch(): pass non-empty name string" << LL_ENDL;
+    }
+
+    // If the specified name isn't already in the map, just use that.
+    std::string name(prefix);
+
+    // Find the lowest numeric suffix that doesn't collide with an existing
+    // entry. Start with 2 just to make it more intuitive for any interested
+    // parties: e.g. "joe", "joe2", "joe3"...
+    for (int i = 2; ; name = STRINGIZE(prefix << i++))
+    {
+        if (mCoros.find(name) == mCoros.end())
+        {
+            LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL;
+            return name;
+        }
+    }
+}
+
+bool LLCoros::kill(const std::string& name)
+{
+    CoroMap::iterator found = mCoros.find(name);
+    if (found == mCoros.end())
+    {
+        return false;
+    }
+    // Because this is a boost::ptr_map, erasing the map entry also destroys
+    // the referenced heap object, in this case an LLCoro. That will destroy
+    // the contained boost::coroutine object, which will terminate the coroutine.
+    mCoros.erase(found);
+    return true;
+}
+
+std::string LLCoros::getNameByID(const void* self_id) const
+{
+    // Walk the existing coroutines, looking for one from which the 'self_id'
+    // passed to us comes.
+    for (CoroMap::const_iterator mi(mCoros.begin()), mend(mCoros.end()); mi != mend; ++mi)
+    {
+        if (mi->second->owns_self_id(self_id))
+        {
+            return mi->first;
+        }
+    }
+    return "";
+}
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h
new file mode 100644
index 0000000000..dfbe76932c
--- /dev/null
+++ b/indra/llcommon/llcoros.h
@@ -0,0 +1,205 @@
+/**
+ * @file   llcoros.h
+ * @author Nat Goodspeed
+ * @date   2009-06-02
+ * @brief  Manage running boost::coroutine instances
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLCOROS_H)
+#define LL_LLCOROS_H
+
+#include <boost/coroutine/coroutine.hpp>
+#include "llsingleton.h"
+#include <boost/ptr_container/ptr_map.hpp>
+#include <string>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/iteration/local.hpp>
+#include <stdexcept>
+
+/// Base class for each coroutine
+struct LLCoroBase
+{
+    LLCoroBase() {}
+    virtual ~LLCoroBase() {}
+
+    virtual bool exited() const = 0;
+    template <typename COROUTINE_SELF>
+    bool owns_self(const COROUTINE_SELF& self) const
+    {
+        return owns_self_id(self.get_id());
+    }
+
+    virtual bool owns_self_id(const void* self_id) const = 0;
+};
+
+/// Template subclass to accommodate different boost::coroutine signatures
+template <typename COROUTINE>
+struct LLCoro: public LLCoroBase
+{
+    template <typename CALLABLE>
+    LLCoro(const CALLABLE& callable):
+        mCoro(callable)
+    {}
+
+    virtual bool exited() const { return mCoro.exited(); }
+
+    COROUTINE mCoro;
+
+    virtual bool owns_self_id(const void* self_id) const
+    {
+        namespace coro_private = boost::coroutines::detail;
+        return static_cast<void*>(coro_private::coroutine_accessor::get_impl(const_cast<COROUTINE&>(mCoro)).get())
+            == self_id;
+    }
+};
+
+/**
+ * Registry of named Boost.Coroutine instances
+ *
+ * The Boost.Coroutine library supports the general case of a coroutine accepting
+ * arbitrary parameters and yielding multiple (sets of) results. For such use
+ * cases, it's natural for the invoking code to retain the coroutine instance:
+ * the consumer repeatedly calls back into the coroutine until it yields its
+ * next result.
+ *
+ * Our typical coroutine usage is a bit different, though. For us, coroutines
+ * provide an alternative to the @c Responder pattern. Our typical coroutine
+ * has @c void return, invoked in fire-and-forget mode: the handler for some
+ * user gesture launches the coroutine and promptly returns to the main loop.
+ * The coroutine initiates some action that will take multiple frames (e.g. a
+ * capability request), waits for its result, processes it and silently steals
+ * away.
+ *
+ * This usage poses two (related) problems:
+ *
+ * # Who should own the coroutine instance? If it's simply local to the
+ *   handler code that launches it, return from the handler will destroy the
+ *   coroutine object, terminating the coroutine.
+ * # Once the coroutine terminates, in whatever way, who's responsible for
+ *   cleaning up the coroutine object?
+ *
+ * LLCoros is a Singleton collection of currently-active coroutine instances.
+ * Each has a name. You ask LLCoros to launch a new coroutine with a suggested
+ * name prefix; from your prefix it generates a distinct name, registers the
+ * new coroutine and returns the actual name.
+ *
+ * The name can be used to kill off the coroutine prematurely, if needed. It
+ * can also provide diagnostic info: we can look up the name of the
+ * currently-running coroutine.
+ *
+ * Finally, the next frame ("mainloop" event) after the coroutine terminates,
+ * LLCoros will notice its demise and destroy it.
+ */
+class LLCoros: public LLSingleton<LLCoros>
+{
+public:
+    /*------------------------------ launch() ------------------------------*/
+    /**
+     * Create and start running a new coroutine with specified name. The name
+     * string you pass is a suggestion; it will be tweaked for uniqueness. The
+     * actual name is returned to you.
+     *
+     * Usage looks like this, for (e.g.) two coroutine parameters:
+     * @code
+     * typedef boost::coroutines::coroutine<void(const std::string&, const LLSD&)> coro_type;
+     * std::string name = LLCoros::instance().launch<coro_type>(
+     *    "mycoro", boost::bind(&MyClass::method, this, _1, _2, _3),
+     *    "somestring", LLSD(17));
+     * @endcode
+     *
+     * In other words, you must specify:
+     *
+     * * the desired <tt>boost::coroutines::coroutine</tt> type, to whose
+     *   signature the initial <tt>coro_type::self&</tt> parameter is
+     *   implicitly added
+     * * the suggested name string for the new coroutine instance
+     * * the callable to be run, e.g. <tt>boost::bind()</tt> expression for a
+     *   class method -- not forgetting to add _1 for the
+     *   <tt>coro_type::self&</tt> parameter
+     * * the actual parameters to be passed to that callable after the
+     *   implicit <tt>coro_type::self&</tt> parameter
+     *
+     * launch() tweaks the suggested name so it won't collide with any
+     * existing coroutine instance, creates the coroutine instance, registers
+     * it with the tweaked name and runs it until its first wait. At that
+     * point it returns the tweaked name.
+     *
+     * Use of a typedef for the coroutine type is recommended, because you
+     * must restate it for the callable's first parameter.
+     *
+     * @note
+     * launch() only accepts const-reference parameters. Once we can assume
+     * C++0x features on every platform, we'll have so-called "perfect
+     * forwarding" and variadic templates and other such ponies, and can
+     * support an arbitrary number of truly arbitrary parameter types. But for
+     * now, we'll stick with const reference params. N.B. Passing a non-const
+     * reference to a local variable into a coroutine seems like a @em really
+     * bad idea: the local variable will be destroyed during the lifetime of
+     * the coroutine.
+     */
+    // Use the preprocessor to generate launch() overloads accepting 0, 1,
+    // ..., BOOST_COROUTINE_ARG_MAX const ref params of arbitrary type.
+#define BOOST_PP_LOCAL_MACRO(n)                                         \
+    template <typename COROUTINE, typename CALLABLE                     \
+              BOOST_PP_COMMA_IF(n)                                      \
+              BOOST_PP_ENUM_PARAMS(n, typename T)>                      \
+    std::string launch(const std::string& prefix, const CALLABLE& callable \
+                       BOOST_PP_COMMA_IF(n)                             \
+                       BOOST_PP_ENUM_BINARY_PARAMS(n, const T, & p))    \
+    {                                                                   \
+        std::string name(generateDistinctName(prefix));                 \
+        LLCoro<COROUTINE>* ptr = new LLCoro<COROUTINE>(callable);       \
+        mCoros.insert(name, ptr);                                       \
+        /* Run the coroutine until its first wait, then return here */  \
+        ptr->mCoro(std::nothrow                                         \
+                   BOOST_PP_COMMA_IF(n)                                 \
+                   BOOST_PP_ENUM_PARAMS(n, p));                         \
+        return name;                                                    \
+    }
+
+#define BOOST_PP_LOCAL_LIMITS (0, BOOST_COROUTINE_ARG_MAX)
+#include BOOST_PP_LOCAL_ITERATE()
+#undef BOOST_PP_LOCAL_MACRO
+#undef BOOST_PP_LOCAL_LIMITS
+    /*----------------------- end of launch() family -----------------------*/
+
+    /**
+     * Abort a running coroutine by name. Normally, when a coroutine either
+     * runs to completion or terminates with an exception, LLCoros quietly
+     * cleans it up. This is for use only when you must explicitly interrupt
+     * one prematurely. Returns @c true if the specified name was found and
+     * still running at the time.
+     */
+    bool kill(const std::string& name);
+
+    /**
+     * From within a coroutine, pass its @c self object to look up the
+     * (tweaked) name string by which this coroutine is registered. Returns
+     * the empty string if not found (e.g. if the coroutine was launched by
+     * hand rather than using LLCoros::launch()).
+     */
+    template <typename COROUTINE_SELF>
+    std::string getName(const COROUTINE_SELF& self) const
+    {
+        return getNameByID(self.get_id());
+    }
+
+    /// getName() by self.get_id()
+    std::string getNameByID(const void* self_id) const;
+
+private:
+    friend class LLSingleton<LLCoros>;
+    LLCoros();
+    std::string generateDistinctName(const std::string& prefix) const;
+    bool cleanup(const LLSD&);
+
+    typedef boost::ptr_map<std::string, LLCoroBase> CoroMap;
+    CoroMap mCoros;
+};
+
+#endif /* ! defined(LL_LLCOROS_H) */
diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp
index cea5a1eda3..d598f1cc4a 100644
--- a/indra/llcommon/lleventcoro.cpp
+++ b/indra/llcommon/lleventcoro.cpp
@@ -20,20 +20,31 @@
 // other Linden headers
 #include "llsdserialize.h"
 #include "llerror.h"
+#include "llcoros.h"
 
-std::string LLEventDetail::listenerNameForCoro(const void* self)
+std::string LLEventDetail::listenerNameForCoroImpl(const void* self_id)
 {
+    // First, if this coroutine was launched by LLCoros::launch(), find that name.
+    std::string name(LLCoros::instance().getNameByID(self_id));
+    if (! name.empty())
+    {
+        return name;
+    }
+    // Apparently this coroutine wasn't launched by LLCoros::launch(). Check
+    // whether we have a memo for this self_id.
     typedef std::map<const void*, std::string> MapType;
     static MapType memo;
-    MapType::const_iterator found = memo.find(self);
+    MapType::const_iterator found = memo.find(self_id);
     if (found != memo.end())
     {
         // this coroutine instance has called us before, reuse same name
         return found->second;
     }
     // this is the first time we've been called for this coroutine instance
-    std::string name(LLEventPump::inventName("coro"));
-    memo[self] = name;
+    name = LLEventPump::inventName("coro");
+    memo[self_id] = name;
+    LL_INFOS("LLEventCoro") << "listenerNameForCoroImpl(" << self_id << "): inventing coro name '"
+                            << name << "'" << LL_ENDL;
     return name;
 }
 
diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h
index 5726ea0f65..c6d9de171d 100644
--- a/indra/llcommon/lleventcoro.h
+++ b/indra/llcommon/lleventcoro.h
@@ -106,7 +106,14 @@ namespace LLEventDetail
      * that's okay, since it won't collide with any listener name used by the
      * earlier coroutine since that earlier coroutine no longer exists.
      */
-    LL_COMMON_API std::string listenerNameForCoro(const void* self);
+    template <typename COROUTINE_SELF>
+    std::string listenerNameForCoro(COROUTINE_SELF& self)
+    {
+        return listenerNameForCoroImpl(self.get_id());
+    }
+
+    /// Implementation for listenerNameForCoro()
+    LL_COMMON_API std::string listenerNameForCoroImpl(const void* self_id);
 
     /**
      * Implement behavior described for postAndWait()'s @a replyPumpNamePath
@@ -185,7 +192,7 @@ LLSD postAndWait(SELF& self, const LLSD& event, const LLEventPumpOrPumpName& req
     boost::coroutines::future<LLSD> future(self);
     // make a callback that will assign a value to the future, and listen on
     // the specified LLEventPump with that callback
-    std::string listenerName(LLEventDetail::listenerNameForCoro(&self));
+    std::string listenerName(LLEventDetail::listenerNameForCoro(self));
     LLTempBoundListener connection(
         replyPump.getPump().listen(listenerName,
                                    voidlistener(boost::coroutines::make_callback(future))));
@@ -307,7 +314,7 @@ LLEventWithID postAndWait2(SELF& self, const LLSD& event,
     boost::coroutines::future<LLEventWithID> future(self);
     // either callback will assign a value to this future; listen on
     // each specified LLEventPump with a callback
-    std::string name(LLEventDetail::listenerNameForCoro(&self));
+    std::string name(LLEventDetail::listenerNameForCoro(self));
     LLTempBoundListener connection0(
         replyPump0.getPump().listen(name + "a",
                                LLEventDetail::wfeoh(boost::coroutines::make_callback(future), 0)));
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 26b950b618..575a709761 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -44,8 +44,8 @@
 #include "lllogin.h"
 
 #include <boost/bind.hpp>
-#include <boost/scoped_ptr.hpp>
 
+#include "llcoros.h"
 #include "llevents.h"
 #include "lleventfilter.h"
 #include "lleventcoro.h"
@@ -109,35 +109,25 @@ private:
 
     void login_(coroutine_type::self& self, const std::string& uri, const LLSD& credentials);
 
-    boost::scoped_ptr<coroutine_type> mCoro;
     LLEventStream mPump;
 	LLSD mAuthResponse, mValidAuthResponse;
 };
 
 void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials)
 {
-    // If there's a previous coroutine instance, and that instance is still
-    // active, destroying the instance will terminate the coroutine by
-    // throwing an exception, thus unwinding the stack and destroying all
-    // local objects. It should (!) all Just Work. Nonetheless, it would be
-    // strange, so make a note of it.
-    if (mCoro && *mCoro)
-    {
-        LL_WARNS("LLLogin") << "Previous login attempt interrupted by new request" << LL_ENDL;
-    }
-
-    // Construct a coroutine that will run our login_() method; placeholders
-    // forward the params from the (*mCoro)(etc.) call below. Using scoped_ptr
-    // ensures that if mCoro was already pointing to a previous instance, that
-    // old instance will be destroyed as noted above.
-    mCoro.reset(new coroutine_type(boost::bind(&Impl::login_, this, _1, _2, _3)));
-    // Run the coroutine until its first wait; at that point, return here.
-    (*mCoro)(std::nothrow, uri, credentials);
+    // Launch a coroutine with our login_() method; placeholders forward the
+    // params. Run the coroutine until its first wait; at that point, return
+    // here.
+    std::string coroname = 
+        LLCoros::instance().launch<coroutine_type>("LLLogin::Impl::login_",
+                                                   boost::bind(&Impl::login_, this, _1, _2, _3),
+                                                   uri, credentials);
 }
 
 void LLLogin::Impl::login_(coroutine_type::self& self,
                            const std::string& uri, const LLSD& credentials)
 {
+    LL_INFOS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) << LL_ENDL;
     // Arriving in SRVRequest state
     LLEventStream replyPump("reply", true);
     // Should be an array of one or more uri strings.
-- 
cgit v1.2.3


From 46291bf740f3eacd7030a64b319cce94551c8447 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 4 Jun 2009 01:59:31 +0000
Subject: DEV-32777: Make coroutine's top-level function accept value params,
 not reference params.

---
 indra/viewer_components/login/lllogin.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 575a709761..c6ed98c6b6 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -105,9 +105,12 @@ private:
         return response;
     }
 
-    typedef boost::coroutines::coroutine<void(const std::string&, const LLSD&)> coroutine_type;
+    typedef boost::coroutines::coroutine<void(std::string, LLSD)> coroutine_type;
 
-    void login_(coroutine_type::self& self, const std::string& uri, const LLSD& credentials);
+    // In a coroutine's top-level function args, do NOT NOT NOT accept
+    // references (const or otherwise) to anything but the self argument! Pass
+    // by value only!
+    void login_(coroutine_type::self& self, std::string uri, LLSD credentials);
 
     LLEventStream mPump;
 	LLSD mAuthResponse, mValidAuthResponse;
@@ -124,8 +127,7 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials)
                                                    uri, credentials);
 }
 
-void LLLogin::Impl::login_(coroutine_type::self& self,
-                           const std::string& uri, const LLSD& credentials)
+void LLLogin::Impl::login_(coroutine_type::self& self, std::string uri, LLSD credentials)
 {
     LL_INFOS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) << LL_ENDL;
     // Arriving in SRVRequest state
-- 
cgit v1.2.3


From a3d54c48c6366a8a38e20a5aacd90bbc39018512 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 4 Jun 2009 02:37:59 +0000
Subject: DEV-32777: When launching login coroutine, instead of binding _2, _3
 placeholders and then asking Boost.Coroutine to pass parameters to them,
 simply bind the desired values.

---
 indra/viewer_components/login/lllogin.cpp | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index c6ed98c6b6..92384a1c5b 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -118,18 +118,17 @@ private:
 
 void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials)
 {
-    // Launch a coroutine with our login_() method; placeholders forward the
-    // params. Run the coroutine until its first wait; at that point, return
-    // here.
+    // Launch a coroutine with our login_() method. Run the coroutine until
+    // its first wait; at that point, return here.
     std::string coroname = 
         LLCoros::instance().launch<coroutine_type>("LLLogin::Impl::login_",
-                                                   boost::bind(&Impl::login_, this, _1, _2, _3),
-                                                   uri, credentials);
+                                                   boost::bind(&Impl::login_, this, _1, uri, credentials));
 }
 
 void LLLogin::Impl::login_(coroutine_type::self& self, std::string uri, LLSD credentials)
 {
-    LL_INFOS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self) << LL_ENDL;
+    LL_INFOS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self)
+                        << " with uri '" << uri << "', credentials " << credentials << LL_ENDL;
     // Arriving in SRVRequest state
     LLEventStream replyPump("reply", true);
     // Should be an array of one or more uri strings.
-- 
cgit v1.2.3


From 820d4a20d1b9c9a3e562b925ba59a6addcffa558 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 4 Jun 2009 16:01:40 +0000
Subject: DEV-32777: Use a canonical boost::coroutines::coroutine signature,
 relying on boost::bind() to pass any other coroutine arguments. This allows
 us to remove the LLCoroBase and LLCoro constructs, directly storing a
 coroutine object in our ptr_map. It also allows us to remove the multiple
 launch() overloads for multiple arguments. Finally, it lets us move most
 launch() functionality into a non-template method.

---
 indra/llcommon/llcoros.cpp                |  17 +++-
 indra/llcommon/llcoros.h                  | 136 +++++++++---------------------
 indra/viewer_components/login/lllogin.cpp |  10 +--
 3 files changed, 58 insertions(+), 105 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp
index 6fa6ae8f1a..5d23e1d284 100644
--- a/indra/llcommon/llcoros.cpp
+++ b/indra/llcommon/llcoros.cpp
@@ -54,6 +54,15 @@ bool LLCoros::cleanup(const LLSD&)
     return false;
 }
 
+std::string LLCoros::launchImpl(const std::string& prefix, coro* newCoro)
+{
+    std::string name(generateDistinctName(prefix));
+    mCoros.insert(name, newCoro);
+    /* Run the coroutine until its first wait, then return here */
+    (*newCoro)(std::nothrow);
+    return name;
+}
+
 std::string LLCoros::generateDistinctName(const std::string& prefix) const
 {
     // Allowing empty name would make getName()'s not-found return ambiguous.
@@ -86,8 +95,8 @@ bool LLCoros::kill(const std::string& name)
         return false;
     }
     // Because this is a boost::ptr_map, erasing the map entry also destroys
-    // the referenced heap object, in this case an LLCoro. That will destroy
-    // the contained boost::coroutine object, which will terminate the coroutine.
+    // the referenced heap object, in this case the boost::coroutine object,
+    // which will terminate the coroutine.
     mCoros.erase(found);
     return true;
 }
@@ -98,7 +107,9 @@ std::string LLCoros::getNameByID(const void* self_id) const
     // passed to us comes.
     for (CoroMap::const_iterator mi(mCoros.begin()), mend(mCoros.end()); mi != mend; ++mi)
     {
-        if (mi->second->owns_self_id(self_id))
+        namespace coro_private = boost::coroutines::detail;
+        if (static_cast<void*>(coro_private::coroutine_accessor::get_impl(const_cast<coro&>(*mi->second)).get())
+            == self_id)
         {
             return mi->first;
         }
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h
index dfbe76932c..6b07ba4105 100644
--- a/indra/llcommon/llcoros.h
+++ b/indra/llcommon/llcoros.h
@@ -21,53 +21,16 @@
 #include <boost/preprocessor/iteration/local.hpp>
 #include <stdexcept>
 
-/// Base class for each coroutine
-struct LLCoroBase
-{
-    LLCoroBase() {}
-    virtual ~LLCoroBase() {}
-
-    virtual bool exited() const = 0;
-    template <typename COROUTINE_SELF>
-    bool owns_self(const COROUTINE_SELF& self) const
-    {
-        return owns_self_id(self.get_id());
-    }
-
-    virtual bool owns_self_id(const void* self_id) const = 0;
-};
-
-/// Template subclass to accommodate different boost::coroutine signatures
-template <typename COROUTINE>
-struct LLCoro: public LLCoroBase
-{
-    template <typename CALLABLE>
-    LLCoro(const CALLABLE& callable):
-        mCoro(callable)
-    {}
-
-    virtual bool exited() const { return mCoro.exited(); }
-
-    COROUTINE mCoro;
-
-    virtual bool owns_self_id(const void* self_id) const
-    {
-        namespace coro_private = boost::coroutines::detail;
-        return static_cast<void*>(coro_private::coroutine_accessor::get_impl(const_cast<COROUTINE&>(mCoro)).get())
-            == self_id;
-    }
-};
-
 /**
  * Registry of named Boost.Coroutine instances
  *
- * The Boost.Coroutine library supports the general case of a coroutine accepting
- * arbitrary parameters and yielding multiple (sets of) results. For such use
- * cases, it's natural for the invoking code to retain the coroutine instance:
- * the consumer repeatedly calls back into the coroutine until it yields its
- * next result.
+ * The Boost.Coroutine library supports the general case of a coroutine
+ * accepting arbitrary parameters and yielding multiple (sets of) results. For
+ * such use cases, it's natural for the invoking code to retain the coroutine
+ * instance: the consumer repeatedly calls into the coroutine, perhaps passing
+ * new parameter values, prompting it to yield its next result.
  *
- * Our typical coroutine usage is a bit different, though. For us, coroutines
+ * Our typical coroutine usage is different, though. For us, coroutines
  * provide an alternative to the @c Responder pattern. Our typical coroutine
  * has @c void return, invoked in fire-and-forget mode: the handler for some
  * user gesture launches the coroutine and promptly returns to the main loop.
@@ -98,7 +61,11 @@ struct LLCoro: public LLCoroBase
 class LLCoros: public LLSingleton<LLCoros>
 {
 public:
-    /*------------------------------ launch() ------------------------------*/
+    /// Canonical boost::coroutines::coroutine signature we use
+    typedef boost::coroutines::coroutine<void()> coro;
+    /// Canonical 'self' type
+    typedef coro::self self;
+
     /**
      * Create and start running a new coroutine with specified name. The name
      * string you pass is a suggestion; it will be tweaked for uniqueness. The
@@ -106,68 +73,44 @@ public:
      *
      * Usage looks like this, for (e.g.) two coroutine parameters:
      * @code
-     * typedef boost::coroutines::coroutine<void(const std::string&, const LLSD&)> coro_type;
-     * std::string name = LLCoros::instance().launch<coro_type>(
-     *    "mycoro", boost::bind(&MyClass::method, this, _1, _2, _3),
-     *    "somestring", LLSD(17));
+     * class MyClass
+     * {
+     * public:
+     *     ...
+     *     // Do NOT NOT NOT accept reference params other than 'self'!
+     *     // Pass by value only!
+     *     void myCoroutineMethod(LLCoros::self& self, std::string, LLSD);
+     *     ...
+     * };
+     * ...
+     * std::string name = LLCoros::instance().launch(
+     *    "mycoro", boost::bind(&MyClass::myCoroutineMethod, this, _1,
+     *                          "somestring", LLSD(17));
      * @endcode
      *
-     * In other words, you must specify:
+     * Your function/method must accept LLCoros::self& as its first parameter.
+     * It can accept any other parameters you want -- but ONLY BY VALUE!
+     * Other reference parameters are a BAD IDEA! You Have Been Warned. See
+     * DEV-32777 comments for an explanation.
      *
-     * * the desired <tt>boost::coroutines::coroutine</tt> type, to whose
-     *   signature the initial <tt>coro_type::self&</tt> parameter is
-     *   implicitly added
-     * * the suggested name string for the new coroutine instance
-     * * the callable to be run, e.g. <tt>boost::bind()</tt> expression for a
-     *   class method -- not forgetting to add _1 for the
-     *   <tt>coro_type::self&</tt> parameter
-     * * the actual parameters to be passed to that callable after the
-     *   implicit <tt>coro_type::self&</tt> parameter
+     * Pass a callable that accepts the single LLCoros::self& parameter. It
+     * may work to pass a free function whose only parameter is 'self'; for
+     * all other cases use boost::bind(). Of course, for a non-static class
+     * method, the first parameter must be the class instance. Use the
+     * placeholder _1 for the 'self' parameter. Any other parameters should be
+     * passed via the bind() expression.
      *
      * launch() tweaks the suggested name so it won't collide with any
      * existing coroutine instance, creates the coroutine instance, registers
      * it with the tweaked name and runs it until its first wait. At that
      * point it returns the tweaked name.
-     *
-     * Use of a typedef for the coroutine type is recommended, because you
-     * must restate it for the callable's first parameter.
-     *
-     * @note
-     * launch() only accepts const-reference parameters. Once we can assume
-     * C++0x features on every platform, we'll have so-called "perfect
-     * forwarding" and variadic templates and other such ponies, and can
-     * support an arbitrary number of truly arbitrary parameter types. But for
-     * now, we'll stick with const reference params. N.B. Passing a non-const
-     * reference to a local variable into a coroutine seems like a @em really
-     * bad idea: the local variable will be destroyed during the lifetime of
-     * the coroutine.
      */
-    // Use the preprocessor to generate launch() overloads accepting 0, 1,
-    // ..., BOOST_COROUTINE_ARG_MAX const ref params of arbitrary type.
-#define BOOST_PP_LOCAL_MACRO(n)                                         \
-    template <typename COROUTINE, typename CALLABLE                     \
-              BOOST_PP_COMMA_IF(n)                                      \
-              BOOST_PP_ENUM_PARAMS(n, typename T)>                      \
-    std::string launch(const std::string& prefix, const CALLABLE& callable \
-                       BOOST_PP_COMMA_IF(n)                             \
-                       BOOST_PP_ENUM_BINARY_PARAMS(n, const T, & p))    \
-    {                                                                   \
-        std::string name(generateDistinctName(prefix));                 \
-        LLCoro<COROUTINE>* ptr = new LLCoro<COROUTINE>(callable);       \
-        mCoros.insert(name, ptr);                                       \
-        /* Run the coroutine until its first wait, then return here */  \
-        ptr->mCoro(std::nothrow                                         \
-                   BOOST_PP_COMMA_IF(n)                                 \
-                   BOOST_PP_ENUM_PARAMS(n, p));                         \
-        return name;                                                    \
+    template <typename CALLABLE>
+    std::string launch(const std::string& prefix, const CALLABLE& callable)
+    {
+        return launchImpl(prefix, new coro(callable));
     }
 
-#define BOOST_PP_LOCAL_LIMITS (0, BOOST_COROUTINE_ARG_MAX)
-#include BOOST_PP_LOCAL_ITERATE()
-#undef BOOST_PP_LOCAL_MACRO
-#undef BOOST_PP_LOCAL_LIMITS
-    /*----------------------- end of launch() family -----------------------*/
-
     /**
      * Abort a running coroutine by name. Normally, when a coroutine either
      * runs to completion or terminates with an exception, LLCoros quietly
@@ -195,10 +138,11 @@ public:
 private:
     friend class LLSingleton<LLCoros>;
     LLCoros();
+    std::string launchImpl(const std::string& prefix, coro* newCoro);
     std::string generateDistinctName(const std::string& prefix) const;
     bool cleanup(const LLSD&);
 
-    typedef boost::ptr_map<std::string, LLCoroBase> CoroMap;
+    typedef boost::ptr_map<std::string, coro> CoroMap;
     CoroMap mCoros;
 };
 
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 92384a1c5b..c0d35f31d3 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -105,12 +105,10 @@ private:
         return response;
     }
 
-    typedef boost::coroutines::coroutine<void(std::string, LLSD)> coroutine_type;
-
     // In a coroutine's top-level function args, do NOT NOT NOT accept
     // references (const or otherwise) to anything but the self argument! Pass
     // by value only!
-    void login_(coroutine_type::self& self, std::string uri, LLSD credentials);
+    void login_(LLCoros::self& self, std::string uri, LLSD credentials);
 
     LLEventStream mPump;
 	LLSD mAuthResponse, mValidAuthResponse;
@@ -121,11 +119,11 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& credentials)
     // Launch a coroutine with our login_() method. Run the coroutine until
     // its first wait; at that point, return here.
     std::string coroname = 
-        LLCoros::instance().launch<coroutine_type>("LLLogin::Impl::login_",
-                                                   boost::bind(&Impl::login_, this, _1, uri, credentials));
+        LLCoros::instance().launch("LLLogin::Impl::login_",
+                                   boost::bind(&Impl::login_, this, _1, uri, credentials));
 }
 
-void LLLogin::Impl::login_(coroutine_type::self& self, std::string uri, LLSD credentials)
+void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credentials)
 {
     LL_INFOS("LLLogin") << "Entering coroutine " << LLCoros::instance().getName(self)
                         << " with uri '" << uri << "', credentials " << credentials << LL_ENDL;
-- 
cgit v1.2.3


From 050d2db0f805d799c59349253262b648aa8f70b2 Mon Sep 17 00:00:00 2001
From: Brad Kittenbrink <brad@lindenlab.com>
Date: Wed, 10 Jun 2009 00:00:03 +0000
Subject: Added LLAPRSockStream class and associated LLAPRSockStreambuf class
 for DEV-31978 viewer event host socket module.

reviewed by palmer+nat+mani.
---
 indra/llcommon/CMakeLists.txt |  3 ++
 indra/llcommon/stringize.h    | 73 ++++++++++++++++++++++++++-----------------
 2 files changed, 47 insertions(+), 29 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index bbfadbb344..e920475f54 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -22,6 +22,7 @@ include_directories(
 set(llcommon_SOURCE_FILES
     llapp.cpp
     llapr.cpp
+    llaprsockstream.cpp
     llassettype.cpp
     llbase32.cpp
     llbase64.cpp
@@ -94,6 +95,7 @@ set(llcommon_HEADER_FILES
     llagentconstants.h
     llapp.h
     llapr.h
+    llaprsockstream.h
     llassettype.h
     llassoclist.h
     llavatarconstants.h
@@ -236,6 +238,7 @@ target_link_libraries(
     ${BOOST_REGEX_LIBRARY}
     )
 
+ADD_BUILD_TEST(llaprsockstream llcommon)
 ADD_BUILD_TEST(lllazy llcommon)
 ADD_BUILD_TEST(lleventfilter llcommon)
 ADD_BUILD_TEST(lleventcoro llcommon)
diff --git a/indra/llcommon/stringize.h b/indra/llcommon/stringize.h
index 1b2958020f..6399547f5e 100644
--- a/indra/llcommon/stringize.h
+++ b/indra/llcommon/stringize.h
@@ -13,6 +13,7 @@
 #define LL_STRINGIZE_H
 
 #include <sstream>
+#include <boost/lambda/lambda.hpp>
 
 /**
  * stringize(item) encapsulates an idiom we use constantly, using
@@ -27,6 +28,17 @@ std::string stringize(const T& item)
     return out.str();
 }
 
+/**
+ * stringize_f(functor)
+ */
+template <typename Functor>
+std::string stringize_f(Functor const & f)
+{
+    std::ostringstream out;
+    f(out);
+    return out.str();
+}
+
 /**
  * STRINGIZE(item1 << item2 << item3 ...) effectively expands to the
  * following:
@@ -36,40 +48,43 @@ std::string stringize(const T& item)
  * return out.str();
  * @endcode
  */
-#define STRINGIZE(EXPRESSION) (static_cast<std::ostringstream&>(Stringize() << EXPRESSION).str())
+#define STRINGIZE(EXPRESSION) (stringize_f(boost::lambda::_1 << EXPRESSION))
+
 
 /**
- * Helper class for STRINGIZE() macro. Ideally the body of
- * STRINGIZE(EXPRESSION) would look something like this:
+ * destringize(str)
+ * defined for symmetry with stringize
+ * *NOTE - this has distinct behavior from boost::lexical_cast<T> regarding
+ * leading/trailing whitespace and handling of bad_lexical_cast exceptions
+ */
+template <typename T>
+T destringize(std::string const & str)
+{
+	T val;
+    std::istringstream in(str);
+	in >> val;
+    return val;
+}
+
+/**
+ * destringize_f(str, functor)
+ */
+template <typename Functor>
+void destringize_f(std::string const & str, Functor const & f)
+{
+    std::istringstream in(str);
+    f(in);
+}
+
+/**
+ * DESTRINGIZE(str, item1 >> item2 >> item3 ...) effectively expands to the
+ * following:
  * @code
- * (std::ostringstream() << EXPRESSION).str()
+ * std::istringstream in(str);
+ * in >> item1 >> item2 >> item3 ... ;
  * @endcode
- * That doesn't work because each of the relevant operator<<() functions
- * accepts a non-const std::ostream&, to which you can't pass a temp instance
- * of std::ostringstream. Stringize plays the necessary const tricks to make
- * the whole thing work.
  */
-class Stringize
-{
-public:
-    /**
-     * This is the essence of Stringize. The leftmost << operator (the one
-     * coded in the STRINGIZE() macro) engages this operator<<() const method
-     * on the temp Stringize instance. Every other << operator (ones embedded
-     * in EXPRESSION) simply sees the std::ostream& returned by the first one.
-     *
-     * Finally, the STRINGIZE() macro downcasts that std::ostream& to
-     * std::ostringstream&.
-     */
-    template <typename T>
-    std::ostream& operator<<(const T& item) const
-    {
-        mOut << item;
-        return mOut;
-    }
+#define DESTRINGIZE(STR, EXPRESSION) (destringize_f((STR), (boost::lambda::_1 >> EXPRESSION)))
 
-private:
-    mutable std::ostringstream mOut;
-};
 
 #endif /* ! defined(LL_STRINGIZE_H) */
-- 
cgit v1.2.3


From ad40d64b0e421a6ab9546f1c721117a3bff754cb Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 17 Jun 2009 15:13:48 +0000
Subject: DEV-32777: tip won't even build on Windows without pacifying MSVC
 warning

---
 indra/viewer_components/login/tests/lllogin_test.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra')

diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index b9fe59c0a6..e43065d49f 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -9,6 +9,10 @@
  * $/LicenseInfo$
  */
 
+#if LL_WINDOWS
+#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
+#endif
+
 // Precompiled header
 #include "linden_common.h"
 // associated header
-- 
cgit v1.2.3


From 8a8edfd98c7fced23f4c1f8dd5e4f65e1cadfce8 Mon Sep 17 00:00:00 2001
From: Brad Kittenbrink <brad@lindenlab.com>
Date: Thu, 18 Jun 2009 23:42:51 +0000
Subject: First pieces of event host module (DEV-31978). Basically implements
 the spec nat decribed in the jira. Test coverage isn't yet complete though.

mostly paired with nat.
---
 indra/viewer_components/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra')

diff --git a/indra/viewer_components/CMakeLists.txt b/indra/viewer_components/CMakeLists.txt
index d5eea0d0b0..60b459b78a 100644
--- a/indra/viewer_components/CMakeLists.txt
+++ b/indra/viewer_components/CMakeLists.txt
@@ -1 +1,2 @@
 add_subdirectory(login)
+add_subdirectory(eventhost)
-- 
cgit v1.2.3


From dc3833f31b8a20220ddb1775e1625c016c397435 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 19 Jun 2009 00:17:30 +0000
Subject: DEV-31980: extract dispatch-by-string-name logic from LLAresListener
 to new LLEventDispatcher and LLDispatchListener classes. See LLAresListener
 for example usage.

---
 indra/llcommon/CMakeLists.txt                 |   2 +
 indra/llcommon/lleventdispatcher.cpp          | 123 ++++++++++++++++++++++++++
 indra/llcommon/lleventdispatcher.h            | 108 ++++++++++++++++++++++
 indra/llmessage/llareslistener.cpp            |  46 ++--------
 indra/llmessage/llareslistener.h              |  14 +--
 indra/llmessage/tests/llareslistener_test.cpp |   2 +-
 6 files changed, 242 insertions(+), 53 deletions(-)
 create mode 100644 indra/llcommon/lleventdispatcher.cpp
 create mode 100644 indra/llcommon/lleventdispatcher.h

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index e920475f54..88acb70b8a 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -37,6 +37,7 @@ set(llcommon_SOURCE_FILES
     llerrorthread.cpp
     llevent.cpp
     lleventcoro.cpp
+    lleventdispatcher.cpp
     lleventfilter.cpp
     llevents.cpp
     llfasttimer.cpp
@@ -126,6 +127,7 @@ set(llcommon_HEADER_FILES
     llerrorthread.h
     llevent.h
     lleventcoro.h
+    lleventdispatcher.h
     lleventfilter.h
     llevents.h
     lleventemitter.h
diff --git a/indra/llcommon/lleventdispatcher.cpp b/indra/llcommon/lleventdispatcher.cpp
new file mode 100644
index 0000000000..2dbd59b156
--- /dev/null
+++ b/indra/llcommon/lleventdispatcher.cpp
@@ -0,0 +1,123 @@
+/**
+ * @file   lleventdispatcher.cpp
+ * @author Nat Goodspeed
+ * @date   2009-06-18
+ * @brief  Implementation for lleventdispatcher.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if LL_WINDOWS
+#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
+#endif
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "lleventdispatcher.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+#include "llevents.h"
+#include "llerror.h"
+#include "llsdutil.h"
+
+LLEventDispatcher::LLEventDispatcher(const std::string& desc, const std::string& key):
+    mDesc(desc),
+    mKey(key)
+{
+}
+
+LLEventDispatcher::~LLEventDispatcher()
+{
+}
+
+/// Register a callable by name
+void LLEventDispatcher::add(const std::string& name, const Callable& callable, const LLSD& required)
+{
+    mDispatch[name] = DispatchMap::mapped_type(callable, required);
+}
+
+void LLEventDispatcher::addFail(const std::string& name, const std::string& classname) const
+{
+    LL_ERRS("LLEventDispatcher") << "LLEventDispatcher(" << mDesc << ")::add(" << name
+                                 << "): " << classname << " is not a subclass "
+                                 << "of LLEventDispatcher" << LL_ENDL;
+}
+
+/// Unregister a callable
+bool LLEventDispatcher::remove(const std::string& name)
+{
+    DispatchMap::iterator found = mDispatch.find(name);
+    if (found == mDispatch.end())
+    {
+        return false;
+    }
+    mDispatch.erase(found);
+    return true;
+}
+
+/// Call a registered callable with an explicitly-specified name. If no
+/// such callable exists, die with LL_ERRS.
+void LLEventDispatcher::operator()(const std::string& name, const LLSD& event) const
+{
+    if (! attemptCall(name, event))
+    {
+        LL_ERRS("LLEventDispatcher") << "LLEventDispatcher(" << mDesc << "): '" << name
+                                     << "' not found" << LL_ENDL;
+    }
+}
+
+/// Extract the @a key value from the incoming @a event, and call the
+/// callable whose name is specified by that map @a key. If no such
+/// callable exists, die with LL_ERRS.
+void LLEventDispatcher::operator()(const LLSD& event) const
+{
+    // This could/should be implemented in terms of the two-arg overload.
+    // However -- we can produce a more informative error message.
+    std::string name(event[mKey]);
+    if (! attemptCall(name, event))
+    {
+        LL_ERRS("LLEventDispatcher") << "LLEventDispatcher(" << mDesc << "): bad " << mKey
+                                     << " value '" << name << "'" << LL_ENDL;
+    }
+}
+
+bool LLEventDispatcher::attemptCall(const std::string& name, const LLSD& event) const
+{
+    DispatchMap::const_iterator found = mDispatch.find(name);
+    if (found == mDispatch.end())
+    {
+        // The reason we only return false, leaving it up to our caller to die
+        // with LL_ERRS, is that different callers have different amounts of
+        // available information.
+        return false;
+    }
+    // Found the name, so it's plausible to even attempt the call. But first,
+    // validate the syntax of the event itself.
+    std::string mismatch(llsd_matches(found->second.second, event));
+    if (! mismatch.empty())
+    {
+        LL_ERRS("LLEventDispatcher") << "LLEventDispatcher(" << mDesc << ") calling '" << name
+                                     << "': bad request: " << mismatch << LL_ENDL;
+    }
+    // Event syntax looks good, go for it!
+    (found->second.first)(event);
+    return true;                    // tell caller we were able to call
+}
+
+LLDispatchListener::LLDispatchListener(const std::string& pumpname, const std::string& key):
+    LLEventDispatcher(pumpname, key),
+    mPump(pumpname, true),          // allow tweaking for uniqueness
+    mBoundListener(mPump.listen("self", boost::bind(&LLDispatchListener::process, this, _1)))
+{
+}
+
+bool LLDispatchListener::process(const LLSD& event)
+{
+    (*this)(event);
+    return false;
+}
diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h
new file mode 100644
index 0000000000..d75055fd6f
--- /dev/null
+++ b/indra/llcommon/lleventdispatcher.h
@@ -0,0 +1,108 @@
+/**
+ * @file   lleventdispatcher.h
+ * @author Nat Goodspeed
+ * @date   2009-06-18
+ * @brief  Central mechanism for dispatching events by string name. This is
+ *         useful when you have a single LLEventPump listener on which you can
+ *         request different operations, vs. instantiating a different
+ *         LLEventPump for each such operation.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLEVENTDISPATCHER_H)
+#define LL_LLEVENTDISPATCHER_H
+
+#include <string>
+#include <map>
+#include <boost/function.hpp>
+#include <boost/bind.hpp>
+#include <typeinfo>
+#include "llevents.h"
+
+class LLSD;
+
+/**
+ * Given an LLSD map, examine a string-valued key and call a corresponding
+ * callable. This class is designed to be contained by an LLEventPump
+ * listener class that will register some of its own methods, though any
+ * callable can be used.
+ */
+class LLEventDispatcher
+{
+public:
+    LLEventDispatcher(const std::string& desc, const std::string& key);
+    virtual ~LLEventDispatcher();
+
+    /// Accept any C++ callable, typically a boost::bind() expression
+    typedef boost::function<void(const LLSD&)> Callable;
+
+    /// Register a @a callable by @a name. The optional @a required parameter
+    /// is used to validate the structure of each incoming event (see
+    /// llsd_matches()).
+    void add(const std::string& name, const Callable& callable, const LLSD& required=LLSD());
+
+    /// Special case: a subclass of this class can register a @a method
+    /// without explicitly specifying the <tt>boost::bind()</tt> expression.
+    /// The optional @a required parameter is used to validate the structure
+    /// of each incoming event (see llsd_matches()).
+    template <class CLASS>
+    void add(const std::string& name, void (CLASS::*method)(const LLSD&),
+             const LLSD& required=LLSD())
+    {
+        CLASS* downcast = dynamic_cast<CLASS*>(this);
+        if (! downcast)
+        {
+            addFail(name, typeid(CLASS).name());
+        }
+        else
+        {
+            add(name, boost::bind(method, downcast, _1), required);
+        }
+    }
+
+    /// Unregister a callable
+    bool remove(const std::string& name);
+
+    /// Call a registered callable with an explicitly-specified name. If no
+    /// such callable exists, die with LL_ERRS. If the @a event fails to match
+    /// the @a required prototype specified at add() time, die with LL_ERRS.
+    void operator()(const std::string& name, const LLSD& event) const;
+
+    /// Extract the @a key value from the incoming @a event, and call the
+    /// callable whose name is specified by that map @a key. If no such
+    /// callable exists, die with LL_ERRS. If the @a event fails to match the
+    /// @a required prototype specified at add() time, die with LL_ERRS.
+    void operator()(const LLSD& event) const;
+
+private:
+    void addFail(const std::string& name, const std::string& classname) const;
+    /// try to dispatch, return @c true if success
+    bool attemptCall(const std::string& name, const LLSD& event) const;
+
+    std::string mDesc, mKey;
+    typedef std::map<std::string, std::pair<Callable, LLSD> > DispatchMap;
+    DispatchMap mDispatch;
+};
+
+/**
+ * Bundle an LLEventPump and a listener with an LLEventDispatcher. A class
+ * that contains (or derives from) LLDispatchListener need only specify the
+ * LLEventPump name and dispatch key, and add() its methods. Incoming events
+ * will automatically be dispatched.
+ */
+class LLDispatchListener: public LLEventDispatcher
+{
+public:
+    LLDispatchListener(const std::string& pumpname, const std::string& key);
+
+private:
+    bool process(const LLSD& event);
+
+    LLEventStream mPump;
+    LLTempBoundListener mBoundListener;
+};
+
+#endif /* ! defined(LL_LLEVENTDISPATCHER_H) */
diff --git a/indra/llmessage/llareslistener.cpp b/indra/llmessage/llareslistener.cpp
index 4bf375069d..a8beb8cbde 100644
--- a/indra/llmessage/llareslistener.cpp
+++ b/indra/llmessage/llareslistener.cpp
@@ -9,10 +9,6 @@
  * $/LicenseInfo$
  */
 
-#if LL_WINDOWS
-#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
-#endif
-
 // Precompiled header
 #include "linden_common.h"
 // associated header
@@ -27,35 +23,13 @@
 #include "llsdutil.h"
 
 LLAresListener::LLAresListener(const std::string& pumpname, LLAres* llares):
-    mAres(llares),
-    mBoundListener(LLEventPumps::instance().
-                   obtain(pumpname).
-                   listen("LLAresListener", boost::bind(&LLAresListener::process, this, _1)))
-{
-    // Insert an entry into our mDispatch map for every method we want to be
-    // able to invoke via this event API.
-    mDispatch["rewriteURI"] = boost::bind(&LLAresListener::rewriteURI, this, _1);
-}
-
-bool LLAresListener::process(const LLSD& command)
+    LLDispatchListener(pumpname, "op"),
+    mAres(llares)
 {
-    const std::string op(command["op"]);
-    // Look up the requested operation.
-    DispatchMap::const_iterator found = mDispatch.find(op);
-    if (found == mDispatch.end())
-    {
-        // There's no feedback other than our own reply. If somebody asks
-        // for an operation that's not supported (perhaps because of a
-        // typo?), unless we holler loudly, the request will be silently
-        // ignored. Throwing a tantrum on such errors will hopefully make
-        // this product more robust.
-        LL_ERRS("LLAresListener") << "Unsupported request " << op << LL_ENDL;
-        return false;
-    }
-    // Having found the operation, call it.
-    found->second(command);
-    // Conventional LLEventPump listener return
-    return false;
+    // add() every method we want to be able to invoke via this event API.
+    // Optional third parameter validates expected LLSD request structure.
+    add("rewriteURI", &LLAresListener::rewriteURI,
+        LLSD().insert("uri", LLSD()).insert("reply", LLSD()));
 }
 
 /// This UriRewriteResponder subclass packages returned URIs as an LLSD
@@ -97,13 +71,5 @@ private:
 
 void LLAresListener::rewriteURI(const LLSD& data)
 {
-    static LLSD required(LLSD().insert("uri", LLSD()).insert("reply", LLSD()));
-    // Validate that the request is well-formed
-    std::string mismatch(llsd_matches(required, data));
-    if (! mismatch.empty())
-    {
-        LL_ERRS("LLAresListener") << "bad rewriteURI request: " << mismatch << LL_ENDL;
-    }
-    // Looks as though we have what we need; issue the request
     mAres->rewriteURI(data["uri"], new UriRewriteResponder(data));
 }
diff --git a/indra/llmessage/llareslistener.h b/indra/llmessage/llareslistener.h
index 8835440c5d..bf093b3d3d 100644
--- a/indra/llmessage/llareslistener.h
+++ b/indra/llmessage/llareslistener.h
@@ -14,33 +14,23 @@
 #if ! defined(LL_LLARESLISTENER_H)
 #define LL_LLARESLISTENER_H
 
-#include <string>
-#include <map>
-#include <boost/function.hpp>
-#include "llevents.h"
+#include "lleventdispatcher.h"
 
 class LLAres;
 class LLSD;
 
 /// Listen on an LLEventPump with specified name for LLAres request events.
-class LLAresListener
+class LLAresListener: public LLDispatchListener
 {
 public:
     /// Specify the pump name on which to listen, and bind the LLAres instance
     /// to use (e.g. gAres)
     LLAresListener(const std::string& pumpname, LLAres* llares);
 
-    /// Handle request events on the event pump specified at construction time
-    bool process(const LLSD& command);
-
 private:
     /// command["op"] == "rewriteURI" 
     void rewriteURI(const LLSD& data);
 
-    typedef boost::function<void(const LLSD&)> Callable;
-    typedef std::map<std::string, Callable> DispatchMap;
-    DispatchMap mDispatch;
-    LLTempBoundListener mBoundListener;
     LLAres* mAres;
 };
 
diff --git a/indra/llmessage/tests/llareslistener_test.cpp b/indra/llmessage/tests/llareslistener_test.cpp
index 215a3806f8..ac4886ccf4 100644
--- a/indra/llmessage/tests/llareslistener_test.cpp
+++ b/indra/llmessage/tests/llareslistener_test.cpp
@@ -130,7 +130,7 @@ namespace tut
         {
             threw = e.what();
         }
-        ensure_contains("LLAresListener bad op", threw, "Unsupported");
+        ensure_contains("LLAresListener bad op", threw, "bad");
     }
 
     template<> template<>
-- 
cgit v1.2.3


From 5d7992d249936ea2d1c7465d4fdbddd5e2bb9f43 Mon Sep 17 00:00:00 2001
From: Bryan O'Sullivan <bos@lindenlab.com>
Date: Mon, 22 Jun 2009 16:05:57 -0700
Subject: Switch to new unit test infrastructure

---
 indra/viewer_components/login/CMakeLists.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt
index 434b58f5c7..e052d133cf 100644
--- a/indra/viewer_components/login/CMakeLists.txt
+++ b/indra/viewer_components/login/CMakeLists.txt
@@ -1,6 +1,9 @@
+# -*- cmake -*-
+
 project(login)
 
 include(00-Common)
+include(LLAddBuildTest)
 include(LLCommon)
 include(LLMath)
 include(LLXML)
@@ -40,4 +43,7 @@ target_link_libraries(lllogin
     ${PTH_LIBRARIES}
     )
 
-ADD_BUILD_TEST(lllogin lllogin "")
+SET(lllogin_TEST_SOURCE_FILES
+    lllogin.cpp
+    )
+LL_ADD_PROJECT_UNIT_TESTS(lllogin "${lllogin_TEST_SOURCE_FILES}")
-- 
cgit v1.2.3


From fae273975bc811d9c8c7b67df44653f483fe22f6 Mon Sep 17 00:00:00 2001
From: "palange@becane.lindenlab.com" <palange@becane.lindenlab.com>
Date: Tue, 23 Jun 2009 11:29:55 -0700
Subject: Fixed an "ADD_BUILD_TEST" leftover from the initial merge.

---
 indra/llmessage/CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 29e7aed898..73140e60e4 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -223,11 +223,11 @@ IF (NOT LINUX AND VIEWER)
       # llhttpclientadapter.cpp
       lltrustedmessageservice.cpp
       lltemplatemessagedispatcher.cpp
+      # Commented out - see rationale at bottom of newview's build file + poppy 2009-06-05
+      # Don't make llmessage depend on llsdmessage_test because ADD_COMM_BUILD_TEST depends on llmessage!
+      # ADD_COMM_BUILD_TEST(llsdmessage "" "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py")
+	  # llareslistener.cpp
       )
     LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}")
     
-    # Commented out - see rationale at bottom of newview's build file + poppy 2009-06-05
-    # Don't make llmessage depend on llsdmessage_test because ADD_COMM_BUILD_TEST depends on llmessage!
-    # ADD_COMM_BUILD_TEST(llsdmessage "" "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py")
-    ADD_BUILD_TEST(llareslistener llmessage)
 ENDIF (NOT LINUX AND VIEWER)
-- 
cgit v1.2.3


From d4330d33964bb5888b5f1eb3ec389b03dadd826d Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 23 Jun 2009 20:20:01 +0000
Subject: QAR-1619: fix Linux-only missing #include (Linux-only reference to
 LLTrans)

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

(limited to 'indra')

diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 606f145d3b..22497ed291 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -52,6 +52,9 @@
 #include "llurlsimstring.h"
 #include "llfloatertos.h"
 #include "llwindow.h"
+#if LL_LINUX || LL_SOLARIS
+#include "lltrans.h"
+#endif
 
 std::string construct_start_string();
 
-- 
cgit v1.2.3


From 91667335ceca625a3bfeb1fdcf20cc2dc51c981d Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 23 Jun 2009 21:31:09 +0000
Subject: QAR-1619: For some reason the LLWindowMesaHeadless constructor
 omitted the LLWindowCallbacks* parameter passed by its consumer and required
 by the base-class LLWindow constructor.

---
 indra/llwindow/llwindowmesaheadless.cpp | 5 +++--
 indra/llwindow/llwindowmesaheadless.h   | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/llwindow/llwindowmesaheadless.cpp b/indra/llwindow/llwindowmesaheadless.cpp
index c1f9d2095e..48736d9207 100644
--- a/indra/llwindow/llwindowmesaheadless.cpp
+++ b/indra/llwindow/llwindowmesaheadless.cpp
@@ -44,10 +44,11 @@ U16 *gMesaBuffer = NULL;
 //
 // LLWindowMesaHeadless
 //
-LLWindowMesaHeadless::LLWindowMesaHeadless(const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
+LLWindowMesaHeadless::LLWindowMesaHeadless(LLWindowCallbacks* callbacks,
+                                           const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
 							 U32 flags,  BOOL fullscreen, BOOL clearBg,
 							 BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth)
-	: LLWindow(fullscreen, flags)
+	: LLWindow(callbacks, fullscreen, flags)
 {
 	if (use_gl)
 	{
diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h
index ab562d9ffe..46b62b914c 100644
--- a/indra/llwindow/llwindowmesaheadless.h
+++ b/indra/llwindow/llwindowmesaheadless.h
@@ -98,7 +98,8 @@ public:
 	/*virtual*/ void *getPlatformWindow() { return 0; };
 	/*virtual*/ void bringToFront() {};
 	
-	LLWindowMesaHeadless(const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
+	LLWindowMesaHeadless(LLWindowCallbacks* callbacks,
+                         const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
 				  U32 flags,  BOOL fullscreen, BOOL clearBg,
 				  BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
 	~LLWindowMesaHeadless();
-- 
cgit v1.2.3


From 07a05e2c0a14bb54ace65d63b55ebc8bb2a4efee Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 23 Jun 2009 18:16:57 -0400
Subject: Incomplete attempt to clean up Mercurial branch build

---
 indra/llcommon/llevents.h          | 203 ++++++++++++++++++++++++++---------
 indra/llmessage/CMakeLists.txt     |   2 +-
 indra/newview/llappviewer.cpp      |   2 +-
 indra/newview/llinventorybridge.h  | 159 ----------------------------
 indra/newview/llinventorymodel.cpp | 210 ++++++++++++++++++-------------------
 indra/newview/llpanelplaceinfo.cpp |   1 +
 6 files changed, 259 insertions(+), 318 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 2f6515a4cb..c5a27ab68e 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -19,7 +19,6 @@
 #include <map>
 #include <set>
 #include <vector>
-#include <list>
 #include <deque>
 #include <stdexcept>
 #include <boost/signals2.hpp>
@@ -28,13 +27,9 @@
 #include <boost/enable_shared_from_this.hpp>
 #include <boost/utility.hpp>        // noncopyable
 #include <boost/optional/optional.hpp>
-#include <boost/ptr_container/ptr_vector.hpp>
 #include <boost/visit_each.hpp>
 #include <boost/ref.hpp>            // reference_wrapper
 #include <boost/type_traits/is_pointer.hpp>
-#include <boost/utility/addressof.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/iteration/local.hpp>
 #include <boost/function.hpp>
 #include <boost/static_assert.hpp>
 #include "llsd.h"
@@ -111,6 +106,9 @@ typedef LLStandardSignal::slot_type LLEventListener;
 /// Result of registering a listener, supports <tt>connected()</tt>,
 /// <tt>disconnect()</tt> and <tt>blocked()</tt>
 typedef boost::signals2::connection LLBoundListener;
+/// Storing an LLBoundListener in LLTempBoundListener will disconnect the
+/// referenced listener when the LLTempBoundListener instance is destroyed.
+typedef boost::signals2::scoped_connection LLTempBoundListener;
 
 /**
  * A common idiom for event-based code is to accept either a callable --
@@ -127,7 +125,7 @@ typedef boost::signals2::connection LLBoundListener;
  * LLListenerOrPumpName::Empty. Test for this condition beforehand using
  * either <tt>if (param)</tt> or <tt>if (! param)</tt>.
  */
-class LLListenerOrPumpName
+class LL_COMMON_API LLListenerOrPumpName
 {
 public:
     /// passing string name of LLEventPump
@@ -174,13 +172,13 @@ private:
 /*****************************************************************************
 *   LLEventPumps
 *****************************************************************************/
-class LLEventPump;
+class LL_COMMON_API LLEventPump;
 
 /**
  * LLEventPumps is a Singleton manager through which one typically accesses
  * this subsystem.
  */
-class LLEventPumps: public LLSingleton<LLEventPumps>
+class LL_COMMON_API LLEventPumps: public LLSingleton<LLEventPumps>
 {
     friend class LLSingleton<LLEventPumps>;
 public:
@@ -254,14 +252,62 @@ namespace LLEventDetail
                                       const ConnectFunc& connect_func);
 } // namespace LLEventDetail
 
+/*****************************************************************************
+*   LLEventTrackable
+*****************************************************************************/
+/**
+ * LLEventTrackable wraps boost::signals2::trackable, which resembles
+ * boost::trackable. Derive your listener class from LLEventTrackable instead,
+ * and use something like
+ * <tt>LLEventPump::listen(boost::bind(&YourTrackableSubclass::method,
+ * instance, _1))</tt>. This will implicitly disconnect when the object
+ * referenced by @c instance is destroyed.
+ *
+ * @note
+ * LLEventTrackable doesn't address a couple of cases:
+ * * Object destroyed during call
+ *   - You enter a slot call in thread A.
+ *   - Thread B destroys the object, which of course disconnects it from any
+ *     future slot calls.
+ *   - Thread A's call uses 'this', which now refers to a defunct object.
+ *     Undefined behavior results.
+ * * Call during destruction
+ *   - @c MySubclass is derived from LLEventTrackable.
+ *   - @c MySubclass registers one of its own methods using
+ *     <tt>LLEventPump::listen()</tt>.
+ *   - The @c MySubclass object begins destruction. <tt>~MySubclass()</tt>
+ *     runs, destroying state specific to the subclass. (For instance, a
+ *     <tt>Foo*</tt> data member is <tt>delete</tt>d but not zeroed.)
+ *   - The listening method will not be disconnected until
+ *     <tt>~LLEventTrackable()</tt> runs.
+ *   - Before we get there, another thread posts data to the @c LLEventPump
+ *     instance, calling the @c MySubclass method.
+ *   - The method in question relies on valid @c MySubclass state. (For
+ *     instance, it attempts to dereference the <tt>Foo*</tt> pointer that was
+ *     <tt>delete</tt>d but not zeroed.)
+ *   - Undefined behavior results.
+ * If you suspect you may encounter any such scenario, you're better off
+ * managing the lifespan of your object with <tt>boost::shared_ptr</tt>.
+ * Passing <tt>LLEventPump::listen()</tt> a <tt>boost::bind()</tt> expression
+ * involving a <tt>boost::weak_ptr<Foo></tt> is recognized specially, engaging
+ * thread-safe Boost.Signals2 machinery.
+ */
+typedef boost::signals2::trackable LLEventTrackable;
+
 /*****************************************************************************
 *   LLEventPump
 *****************************************************************************/
 /**
  * LLEventPump is the base class interface through which we access the
  * concrete subclasses LLEventStream and LLEventQueue.
+ *
+ * @NOTE
+ * LLEventPump derives from LLEventTrackable so that when you "chain"
+ * LLEventPump instances together, they will automatically disconnect on
+ * destruction. Please see LLEventTrackable documentation for situations in
+ * which this may be perilous across threads.
  */
-class LLEventPump: boost::noncopyable
+class LL_COMMON_API LLEventPump: public LLEventTrackable
 {
 public:
     /**
@@ -364,10 +410,22 @@ public:
      * themselves. listen() can throw any ListenError; see ListenError
      * subclasses.
      *
-     * If (as is typical) you pass a <tt>boost::bind()</tt> expression,
-     * listen() will inspect the components of that expression. If a bound
-     * object matches any of several cases, the connection will automatically
-     * be disconnected when that object is destroyed.
+     * The listener name must be unique among active listeners for this
+     * LLEventPump, else you get DupListenerName. If you don't care to invent
+     * a name yourself, use inventName(). (I was tempted to recognize e.g. ""
+     * and internally generate a distinct name for that case. But that would
+     * handle badly the scenario in which you want to add, remove, re-add,
+     * etc. the same listener: each new listen() call would necessarily
+     * perform a new dependency sort. Assuming you specify the same
+     * after/before lists each time, using inventName() when you first
+     * instantiate your listener, then passing the same name on each listen()
+     * call, allows us to optimize away the second and subsequent dependency
+     * sorts.
+     *
+     * If (as is typical) you pass a <tt>boost::bind()</tt> expression as @a
+     * listener, listen() will inspect the components of that expression. If a
+     * bound object matches any of several cases, the connection will
+     * automatically be disconnected when that object is destroyed.
      *
      * * You bind a <tt>boost::weak_ptr</tt>.
      * * Binding a <tt>boost::shared_ptr</tt> that way would ensure that the
@@ -429,6 +487,9 @@ public:
     /// query
     virtual bool enabled() const { return mEnabled; }
 
+    /// Generate a distinct name for a listener -- see listen()
+    static std::string inventName(const std::string& pfx="listener");
+
 private:
     friend class LLEventPumps;
     /// flush queued events
@@ -467,7 +528,7 @@ protected:
  * LLEventStream is a thin wrapper around LLStandardSignal. Posting an
  * event immediately calls all registered listeners.
  */
-class LLEventStream: public LLEventPump
+class LL_COMMON_API LLEventStream: public LLEventPump
 {
 public:
     LLEventStream(const std::string& name, bool tweak=false): LLEventPump(name, tweak) {}
@@ -484,7 +545,7 @@ public:
  * LLEventQueue isa LLEventPump whose post() method defers calling registered
  * listeners until flush() is called.
  */
-class LLEventQueue: public LLEventPump
+class LL_COMMON_API LLEventQueue: public LLEventPump
 {
 public:
     LLEventQueue(const std::string& name, bool tweak=false): LLEventPump(name, tweak) {}
@@ -503,47 +564,89 @@ private:
 };
 
 /*****************************************************************************
-*   LLEventTrackable and underpinnings
+*   LLReqID
 *****************************************************************************/
 /**
- * LLEventTrackable wraps boost::signals2::trackable, which resembles
- * boost::trackable. Derive your listener class from LLEventTrackable instead,
- * and use something like
- * <tt>LLEventPump::listen(boost::bind(&YourTrackableSubclass::method,
- * instance, _1))</tt>. This will implicitly disconnect when the object
- * referenced by @c instance is destroyed.
+ * This class helps the implementer of a given event API to honor the
+ * ["reqid"] convention. By this convention, each event API stamps into its
+ * response LLSD a ["reqid"] key whose value echoes the ["reqid"] value, if
+ * any, from the corresponding request.
+ *
+ * This supports an (atypical, but occasionally necessary) use case in which
+ * two or more asynchronous requests are multiplexed onto the same ["reply"]
+ * LLEventPump. Since the response events could arrive in arbitrary order, the
+ * caller must be able to demux them. It does so by matching the ["reqid"]
+ * value in each response with the ["reqid"] value in the corresponding
+ * request.
+ *
+ * It is the caller's responsibility to ensure distinct ["reqid"] values for
+ * that case. Though LLSD::UUID is guaranteed to work, it might be overkill:
+ * the "namespace" of unique ["reqid"] values is simply the set of requests
+ * specifying the same ["reply"] LLEventPump name.
+ *
+ * Making a given event API echo the request's ["reqid"] into the response is
+ * nearly trivial. This helper is mostly for mnemonic purposes, to serve as a
+ * place to put these comments. We hope that each time a coder implements a
+ * new event API based on some existing one, s/he will say, "Huh, what's an
+ * LLReqID?" and look up this material.
+ *
+ * The hardest part about the convention is deciding where to store the
+ * ["reqid"] value. Ironically, LLReqID can't help with that: you must store
+ * an LLReqID instance in whatever storage will persist until the reply is
+ * sent. For example, if the request ultimately ends up using a Responder
+ * subclass, storing an LLReqID instance in the Responder works.
  *
  * @note
- * LLEventTrackable doesn't address a couple of cases:
- * * Object destroyed during call
- *   - You enter a slot call in thread A.
- *   - Thread B destroys the object, which of course disconnects it from any
- *     future slot calls.
- *   - Thread A's call uses 'this', which now refers to a defunct object.
- *     Undefined behavior results.
- * * Call during destruction
- *   - @c MySubclass is derived from LLEventTrackable.
- *   - @c MySubclass registers one of its own methods using
- *     <tt>LLEventPump::listen()</tt>.
- *   - The @c MySubclass object begins destruction. <tt>~MySubclass()</tt>
- *     runs, destroying state specific to the subclass. (For instance, a
- *     <tt>Foo*</tt> data member is <tt>delete</tt>d but not zeroed.)
- *   - The listening method will not be disconnected until
- *     <tt>~LLEventTrackable()</tt> runs.
- *   - Before we get there, another thread posts data to the @c LLEventPump
- *     instance, calling the @c MySubclass method.
- *   - The method in question relies on valid @c MySubclass state. (For
- *     instance, it attempts to dereference the <tt>Foo*</tt> pointer that was
- *     <tt>delete</tt>d but not zeroed.)
- *   - Undefined behavior results.
- * If you suspect you may encounter any such scenario, you're better off
- * managing the lifespan of your object with <tt>boost::shared_ptr</tt>.
- * Passing <tt>LLEventPump::listen()</tt> a <tt>boost::bind()</tt> expression
- * involving a <tt>boost::weak_ptr<Foo></tt> is recognized specially, engaging
- * thread-safe Boost.Signals2 machinery.
+ * The @em implementer of an event API must honor the ["reqid"] convention.
+ * However, the @em caller of an event API need only use it if s/he is sharing
+ * the same ["reply"] LLEventPump for two or more asynchronous event API
+ * requests.
+ *
+ * In most cases, it's far easier for the caller to instantiate a local
+ * LLEventStream and pass its name to the event API in question. Then it's
+ * perfectly reasonable not to set a ["reqid"] key in the request, ignoring
+ * the @c isUndefined() ["reqid"] value in the response.
  */
-typedef boost::signals2::trackable LLEventTrackable;
+class LLReqID
+{
+public:
+    /**
+     * If you have the request in hand at the time you instantiate the
+     * LLReqID, pass that request to extract its ["reqid"].
+ */
+    LLReqID(const LLSD& request):
+        mReqid(request["reqid"])
+    {}
+    /// If you don't yet have the request, use setFrom() later.
+    LLReqID() {}
+
+    /// Extract and store the ["reqid"] value from an incoming request.
+    void setFrom(const LLSD& request)
+    {
+        mReqid = request["reqid"];
+    }
+
+    /// Set ["reqid"] key into a pending response LLSD object.
+    void stamp(LLSD& response) const;
+
+    /// Make a whole new response LLSD object with our ["reqid"].
+    LLSD makeResponse() const
+    {
+        LLSD response;
+        stamp(response);
+        return response;
+    }
 
+    /// Not really sure of a use case for this accessor...
+    LLSD getReqID() const { return mReqid; }
+
+private:
+    LLSD mReqid;
+};
+
+/*****************************************************************************
+*   Underpinnings
+*****************************************************************************/
 /**
  * We originally provided a suite of overloaded
  * LLEventTrackable::listenTo(LLEventPump&, ...) methods that would call
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 29e7aed898..35e6f9d640 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -229,5 +229,5 @@ IF (NOT LINUX AND VIEWER)
     # Commented out - see rationale at bottom of newview's build file + poppy 2009-06-05
     # Don't make llmessage depend on llsdmessage_test because ADD_COMM_BUILD_TEST depends on llmessage!
     # ADD_COMM_BUILD_TEST(llsdmessage "" "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py")
-    ADD_BUILD_TEST(llareslistener llmessage)
+#    ADD_BUILD_TEST(llareslistener llmessage)
 ENDIF (NOT LINUX AND VIEWER)
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 48cb3babfa..3fc3c8e382 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3652,7 +3652,7 @@ void LLAppViewer::idleShutdown()
 	if (!saved_teleport_history)
 	{
 		saved_teleport_history = true;
-		LLTeleportHistory::getInstance()->save();
+		LLTeleportHistory::getInstance()->dump();
 		LLLocationHistory::getInstance()->save(); // *TODO: find a better place for doing this
 		return;
 	}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index b55a6a658b..3958f7e9c2 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -562,165 +562,6 @@ protected:
 	EWearableType  mWearableType;
 };
 
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLInvFVBridgeAction (& it's derived classes)
-//
-// This is an implementation class to be able to 
-// perform action to view inventory items.
-//
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLInvFVBridgeAction
-{
-public:
-	// This method is a convenience function which creates the correct
-	// type of bridge action based on some basic information
-	static LLInvFVBridgeAction* createAction(LLAssetType::EType asset_type,
-									   const LLUUID& uuid,LLInventoryModel* model);
-
-	static void		doAction(LLAssetType::EType asset_type,
-									   const LLUUID& uuid,LLInventoryModel* model);
-
-	virtual void	doIt() {  };
-	virtual ~LLInvFVBridgeAction(){}//need this because of warning on OSX
-protected:
-	LLInvFVBridgeAction(const LLUUID& id,LLInventoryModel* model):mUUID(id),mModel(model){}
-
-	LLViewerInventoryItem* getItem() const;
-protected:
-	const LLUUID& mUUID;	// item id
-	LLInventoryModel* mModel;
-
-};
-
-
-
-class LLTextureBridgeAction: public LLInvFVBridgeAction
-{
-	friend class LLInvFVBridgeAction;
-public:
-	virtual void	doIt() ;
-	virtual ~LLTextureBridgeAction(){}
-protected:
-	LLTextureBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
-
-};
-
-
-class LLSoundBridgeAction: public LLInvFVBridgeAction
-{
-	friend class LLInvFVBridgeAction;
-public:
-	virtual void	doIt() ;
-	virtual ~LLSoundBridgeAction(){}
-protected:
-	LLSoundBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
-
-};
-
-
-class LLLandmarkBridgeAction: public LLInvFVBridgeAction
-{
-	friend class LLInvFVBridgeAction;
-public:
-	virtual void	doIt() ;
-	virtual ~LLLandmarkBridgeAction(){}
-protected:
-	LLLandmarkBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
-
-};
-
-
-class LLCallingCardBridgeAction: public LLInvFVBridgeAction
-{
-	friend class LLInvFVBridgeAction;
-public:
-	virtual void	doIt() ;
-	virtual ~LLCallingCardBridgeAction(){}
-protected:
-	LLCallingCardBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
-
-};
-
-
-class LLNotecardBridgeAction: public LLInvFVBridgeAction
-{
-	friend class LLInvFVBridgeAction;
-public:
-	virtual void	doIt() ;
-	virtual ~LLNotecardBridgeAction(){}
-protected:
-	LLNotecardBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
-
-};
-
-
-class LLGestureBridgeAction: public LLInvFVBridgeAction
-{
-	friend class LLInvFVBridgeAction;
-public:
-	virtual void	doIt() ;
-	virtual ~LLGestureBridgeAction(){}
-protected:
-	LLGestureBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
-
-};
-
-
-class LLAnimationBridgeAction: public LLInvFVBridgeAction
-{
-	friend class LLInvFVBridgeAction;
-public:
-	virtual void	doIt() ;
-	virtual ~LLAnimationBridgeAction(){}
-protected:
-	LLAnimationBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
-
-};
-
-
-class LLObjectBridgeAction: public LLInvFVBridgeAction
-{
-	friend class LLInvFVBridgeAction;
-public:
-	virtual void	doIt() ;
-	virtual ~LLObjectBridgeAction(){}
-protected:
-	LLObjectBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
-
-};
-
-
-class LLLSLTextBridgeAction: public LLInvFVBridgeAction
-{
-	friend class LLInvFVBridgeAction;
-public:
-	virtual void	doIt() ;
-	virtual ~LLLSLTextBridgeAction(){}
-protected:
-	LLLSLTextBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
-
-};
-
-
-class LLWearableBridgeAction: public LLInvFVBridgeAction
-{
-	friend class LLInvFVBridgeAction;
-public:
-	virtual void	doIt();
-	virtual ~LLWearableBridgeAction(){}
-protected:
-	LLWearableBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){}
-
-
-	BOOL isInTrash() const;
-	// return true if the item is in agent inventory. if false, it
-	// must be lost or in the inventory library.
-	BOOL isAgentInventory() const;
-
-	void wearOnAvatar();
-
-};
-
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLInvFVBridgeAction (& it's derived classes)
 //
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 9177d51d5c..bac02e30bf 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1844,7 +1844,7 @@ bool LLInventoryModel::isCategoryComplete(const LLUUID& cat_id) const
 }
 
 bool LLInventoryModel::loadSkeleton(
-	const LLInventoryModel::options_t& options,
+	const LLSD& options,
 	const LLUUID& owner_id)
 {
 	lldebugs << "importing inventory skeleton for " << owner_id << llendl;
@@ -1857,44 +1857,41 @@ bool LLInventoryModel::loadSkeleton(
 	LLUUID id;
 	LLAssetType::EType preferred_type;
 	bool rv = true;
-	for(options_t::const_iterator it = options.begin(); it < options.end(); ++it)
-	{
-		LLPointer<LLViewerInventoryCategory> cat = new LLViewerInventoryCategory(owner_id);
-		response_t::const_iterator no_response = (*it).end();
-		response_t::const_iterator skel;
-		skel = (*it).find("name");
-		if(skel == no_response) goto clean_cat;
-		cat->rename(std::string((*skel).second));
-		skel = (*it).find("folder_id");
-		if(skel == no_response) goto clean_cat;
-		id.set((*skel).second);
-		// if an id is null, it locks the viewer.
-		if(id.isNull()) goto clean_cat;
-		cat->setUUID(id);
-		skel = (*it).find("parent_id");
-		if(skel == no_response) goto clean_cat;
-		id.set((*skel).second);
-		cat->setParent(id);
-		skel = (*it).find("type_default");
-		if(skel == no_response)
-		{
-			preferred_type = LLAssetType::AT_NONE;
+
+	for(LLSD::array_const_iterator it = options.beginArray(),
+		end = options.endArray(); it != end; ++it)
+	{
+		LLSD name = (*it)["name"];
+		LLSD folder_id = (*it)["folder_id"];
+		LLSD parent_id = (*it)["parent_id"];
+		LLSD version = (*it)["version"];
+		if(name.isDefined()
+			&& folder_id.isDefined()
+			&& parent_id.isDefined()
+			&& version.isDefined()
+			&& folder_id.asUUID().notNull() // if an id is null, it locks the viewer.
+			) 		
+		{
+			LLPointer<LLViewerInventoryCategory> cat = new LLViewerInventoryCategory(owner_id);
+			cat->rename(name.asString());
+			cat->setUUID(folder_id.asUUID());
+			cat->setParent(parent_id.asUUID());
+
+			LLAssetType::EType preferred_type = LLAssetType::AT_NONE;
+			LLSD type_default = (*it)["type_default"];
+			if(type_default.isDefined())
+            {
+				preferred_type = (LLAssetType::EType)type_default.asInteger();
+            }
+            cat->setPreferredType(preferred_type);
+			cat->setVersion(version.asInteger());
+            temp_cats.insert(cat);
 		}
 		else
 		{
-			S32 t = atoi((*skel).second.c_str());
-			preferred_type = (LLAssetType::EType)t;
+			llwarns << "Unable to import near " << name.asString() << llendl;
+            rv = false;
 		}
-		cat->setPreferredType(preferred_type);
-		skel = (*it).find("version");
-		if(skel == no_response) goto clean_cat;
-		cat->setVersion(atoi((*skel).second.c_str()));
-		temp_cats.insert(cat);
-		continue;
-	clean_cat:
-		llwarns << "Unable to import near " << cat->getName() << llendl;
-		rv = false;
-		//delete cat; // automatic when cat is reasigned or destroyed
 	}
 
 	S32 cached_category_count = 0;
@@ -2053,85 +2050,84 @@ bool LLInventoryModel::loadSkeleton(
 	return rv;
 }
 
-bool LLInventoryModel::loadMeat(
-	const LLInventoryModel::options_t& options, const LLUUID& owner_id)
+bool LLInventoryModel::loadMeat(const LLSD& options, const LLUUID& owner_id)
 {
 	llinfos << "importing inventory for " << owner_id << llendl;
-	LLPermissions default_perm;
-	default_perm.init(LLUUID::null, owner_id, LLUUID::null, LLUUID::null);
-	LLPointer<LLViewerInventoryItem> item;
-	LLUUID id;
-	LLAssetType::EType type;
-	LLInventoryType::EType inv_type;
 	bool rv = true;
-	for(options_t::const_iterator it = options.begin(); it < options.end(); ++it)
-	{
-		item = new LLViewerInventoryItem;
-		response_t::const_iterator no_response = (*it).end();
-		response_t::const_iterator meat;
-		meat = (*it).find("name");
-		if(meat == no_response) goto clean_item;
-		item->rename(std::string((*meat).second));
-		meat = (*it).find("item_id");
-		if(meat == no_response) goto clean_item;
-		id.set((*meat).second);
-		item->setUUID(id);
-		meat = (*it).find("parent_id");
-		if(meat == no_response) goto clean_item;
-		id.set((*meat).second);
-		item->setParent(id);
-		meat = (*it).find("type");
-		if(meat == no_response) goto clean_item;
-		type = (LLAssetType::EType)atoi((*meat).second.c_str());
-		item->setType(type);
-		meat = (*it).find("inv_type");
-		if(meat != no_response)
-		{
-			inv_type = (LLInventoryType::EType)atoi((*meat).second.c_str());
-			item->setInventoryType(inv_type);
-		}
-		meat = (*it).find("data_id");
-		if(meat == no_response) goto clean_item;
-		id.set((*meat).second);
-		if(LLAssetType::AT_CALLINGCARD == type)
-		{
-			LLPermissions perm;
-			perm.init(id, owner_id, LLUUID::null, LLUUID::null);
-			item->setPermissions(perm);
-		}
-		else
-		{
-			meat = (*it).find("perm_mask");
-			if(meat != no_response)
-			{
-				PermissionMask perm_mask = atoi((*meat).second.c_str());
-				default_perm.initMasks(
+	for(LLSD::array_const_iterator it = options.beginArray(),
+		end = options.endArray(); it != end; ++it)
+	{
+		LLSD name = (*it)["name"];
+		LLSD item_id = (*it)["item_id"];
+		LLSD parent_id = (*it)["parent_id"];
+		LLSD asset_type = (*it)["type"];
+		LLSD data_id = (*it)["data_id"];
+		if(name.isDefined() 
+			&& item_id.isDefined()
+			&& parent_id.isDefined()
+			&& asset_type.isDefined()
+			&& data_id.isDefined())
+		{
+			LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem;
+			item->rename(name.asString());
+			item->setUUID(item_id.asUUID());
+			item->setParent(parent_id.asUUID());
+			LLAssetType::EType type = (LLAssetType::EType)asset_type.asInteger();
+            item->setType(type);
+
+			LLSD llsd_inv_type = (*it)["inv_type"];
+			if(llsd_inv_type.isDefined())
+            {
+				LLInventoryType::EType inv_type = (LLInventoryType::EType)llsd_inv_type.asInteger();
+                item->setInventoryType(inv_type);
+            }
+
+            if(LLAssetType::AT_CALLINGCARD == type)
+            {
+                LLPermissions perm;
+				perm.init(data_id.asUUID(), owner_id, LLUUID::null, LLUUID::null);
+                item->setPermissions(perm);
+            }
+            else
+            {
+				LLPermissions default_perm;
+				default_perm.init(LLUUID::null, owner_id, LLUUID::null, LLUUID::null);
+				LLSD llsd_perm_mask = (*it)["perm_mask"];
+				if(llsd_perm_mask.isDefined())
+                {
+					PermissionMask perm_mask = llsd_perm_mask.asInteger();
+                    default_perm.initMasks(
 					perm_mask, perm_mask, perm_mask, perm_mask, perm_mask);
-			}
-			else
-			{
-				default_perm.initMasks(
-					PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE);
-			}
-			item->setPermissions(default_perm);
-			item->setAssetUUID(id);
-		}
-		meat = (*it).find("flags");
-		if(meat != no_response)
-		{
-			item->setFlags(strtoul((*meat).second.c_str(), NULL, 0));
+                }
+                else
+                {
+                    default_perm.initMasks(
+                        PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE);
+                }
+                item->setPermissions(default_perm);
+				item->setAssetUUID(data_id.asUUID());
+            }
+
+			LLSD flags = (*it)["flags"];
+			if(flags.isDefined())
+            {
+				// Not sure how well LLSD.asInteger() maps to 
+				// unsigned long - using strtoul()
+				item->setFlags(strtoul(flags.asString().c_str(), NULL, 0));
+            }
+
+			LLSD time = (*it)["time"];
+			if(time.isDefined())
+            {
+				item->setCreationDate(time.asInteger());
+            }
+            addItem(item);
 		}
-		meat = (*it).find("time");
-		if(meat != no_response)
+		else
 		{
-			item->setCreationDate(atoi((*meat).second.c_str()));
+			llwarns << "Unable to import near " << name.asString() << llendl;
+            rv = false;
 		}
-		addItem(item);
-		continue;
-	clean_item:
-		llwarns << "Unable to import near " << item->getName() << llendl;
-		rv = false;
-		//delete item; // automatic when item is reassigned or destroyed
 	}
 	return rv;
 }
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 3ed93e5598..951c223668 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -61,6 +61,7 @@
 #include "lluictrlfactory.h"
 #include "llweb.h"
 #include "llsdutil.h"
+#include "llsdutil_math.h"
 
 static LLRegisterPanelClassWrapper<LLPanelPlaceInfo> t_places("panel_landmark_info");
 
-- 
cgit v1.2.3


From ad1ecb126bfc19dc7c32fb87e82a1fe45782413f Mon Sep 17 00:00:00 2001
From: Mark Palange <palange@lindenlab.com>
Date: Wed, 24 Jun 2009 00:54:30 +0000
Subject: QAR-1619 Fixing linux build error re: llui_libtest linkage

---
 indra/integration_tests/llui_libtest/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt
index 71a47f1475..7e90d37647 100644
--- a/indra/integration_tests/llui_libtest/CMakeLists.txt
+++ b/indra/integration_tests/llui_libtest/CMakeLists.txt
@@ -1,5 +1,7 @@
 # -*- cmake -*-
 
+if (VIEWER)
+
 project (llui_libtest)
 
 include(00-Common)
@@ -88,7 +90,6 @@ if (WINDOWS)
         )
 endif (WINDOWS)
 
-if (VIEWER)
     # Ensure people working on the viewer don't break this library
     # *NOTE: This could be removed, or only built by Parabuild, if the build
     # and link times become too long. JC
-- 
cgit v1.2.3


From 9b86d4c12f5f29d0bca5354d4e1ac6b5c828a327 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 23 Jun 2009 17:58:51 -0700
Subject: Removed conflict markers (ie. <<<<<<<) in llmessage/CMakeLists.txt
 Copied snprintf declaration in llstring from login-api-3

---
 indra/llcommon/llstring.h      | 9 ++++++++-
 indra/llmessage/CMakeLists.txt | 9 +--------
 2 files changed, 9 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 91b706a5be..813e2656ae 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -521,7 +521,14 @@ std::string utf8str_removeCRLF(const std::string& utf8str);
  * formatted string.
  *
  */
-int safe_snprintf(char* str, size_t size, const char* format, ...);
+
+// Deal with the differeneces on Windows
+namespace snprintf_hack
+{
+	LL_COMMON_API int snprintf(char *str, size_t size, const char *format, ...);
+}
+
+using snprintf_hack::snprintf;
 
 /**
  * @brief Convert a wide string to std::string
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 3fa6454255..67a171dde6 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -229,12 +229,5 @@ IF (NOT LINUX AND VIEWER)
 	  # llareslistener.cpp
       )
     LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}")
-    
-<<<<<<< local
-    # Commented out - see rationale at bottom of newview's build file + poppy 2009-06-05
-    # Don't make llmessage depend on llsdmessage_test because ADD_COMM_BUILD_TEST depends on llmessage!
-    # ADD_COMM_BUILD_TEST(llsdmessage "" "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py")
-#    ADD_BUILD_TEST(llareslistener llmessage)
-=======
->>>>>>> other
+
 ENDIF (NOT LINUX AND VIEWER)
-- 
cgit v1.2.3


From 33c230b46d17a2064994991763643a239e12e2c2 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 23 Jun 2009 18:29:59 -0700
Subject: A few more merge error fixes.

---
 indra/newview/llinventorymodel.cpp  | 24 ++++++++++--------------
 indra/newview/llpanellogin.cpp      |  2 +-
 indra/newview/llviewerparcelmgr.cpp |  3 ++-
 3 files changed, 13 insertions(+), 16 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index bac02e30bf..3ee529aedf 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1851,11 +1851,6 @@ bool LLInventoryModel::loadSkeleton(
 
 	typedef std::set<LLPointer<LLViewerInventoryCategory>, InventoryIDPtrLess> cat_set_t;
 	cat_set_t temp_cats;
-
-	update_map_t child_counts;
-
-	LLUUID id;
-	LLAssetType::EType preferred_type;
 	bool rv = true;
 
 	for(LLSD::array_const_iterator it = options.beginArray(),
@@ -1898,6 +1893,7 @@ bool LLInventoryModel::loadSkeleton(
 	S32 cached_item_count = 0;
 	if(!temp_cats.empty())
 	{
+		update_map_t child_counts;
 		cat_array_t categories;
 		item_array_t items;
 		std::string owner_id_str;
@@ -2096,15 +2092,15 @@ bool LLInventoryModel::loadMeat(const LLSD& options, const LLUUID& owner_id)
 				if(llsd_perm_mask.isDefined())
                 {
 					PermissionMask perm_mask = llsd_perm_mask.asInteger();
-                    default_perm.initMasks(
-					perm_mask, perm_mask, perm_mask, perm_mask, perm_mask);
-                }
-                else
-                {
-                    default_perm.initMasks(
-                        PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE);
-                }
-                item->setPermissions(default_perm);
+					default_perm.initMasks(
+						perm_mask, perm_mask, perm_mask, perm_mask, perm_mask);
+				}
+				else
+				{
+					default_perm.initMasks(
+						PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE);
+				}
+				item->setPermissions(default_perm);
 				item->setAssetUUID(data_id.asUUID());
             }
 
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 75df49e5e3..9afb8468ef 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -432,7 +432,7 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask)
 	if ( KEY_F2 == key )
 	{
 		llinfos << "Spawning floater TOS window" << llendl;
-		LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,"");
+		LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,"", 0);
 		tos_dialog->startModal();
 		return TRUE;
 	}
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index bcb3853106..f314de8cfe 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1,4 +1,4 @@
-/** 
+llvi/** 
  * @file llviewerparcelmgr.cpp
  * @brief Viewer-side representation of owned land
  *
@@ -58,6 +58,7 @@
 #include "llparcelselection.h"
 #include "llresmgr.h"
 #include "llsdutil.h"
+#include "llsdutil_math.h"
 #include "llstatusbar.h"
 #include "llui.h"
 #include "llviewerimage.h"
-- 
cgit v1.2.3


From da46eb9e7e0f6e069e7fc06176849d213876bfe3 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 24 Jun 2009 01:54:57 +0000
Subject: DEV-31980: Extend LLEventDispatcher to handle const as well as
 non-const methods. Introduce LLAppViewerListener based on LLDispatchListener,
 instantiate a static one in llappviewer.cpp. Initial implementation only
 supports ["op"] == "requestQuit".

---
 indra/llcommon/lleventdispatcher.h    | 131 +++++++++++++++++++++++++++++-----
 indra/newview/CMakeLists.txt          |   2 +
 indra/newview/llappviewer.cpp         |   3 +
 indra/newview/llappviewerlistener.cpp |  33 +++++++++
 indra/newview/llappviewerlistener.h   |  34 +++++++++
 5 files changed, 187 insertions(+), 16 deletions(-)
 create mode 100644 indra/newview/llappviewerlistener.cpp
 create mode 100644 indra/newview/llappviewerlistener.h

(limited to 'indra')

diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h
index d75055fd6f..e43d967ed4 100644
--- a/indra/llcommon/lleventdispatcher.h
+++ b/indra/llcommon/lleventdispatcher.h
@@ -23,6 +23,40 @@
 #include "llevents.h"
 
 class LLSD;
+/*==========================================================================*|
+class LLEventDispatcher;
+
+namespace LLEventDetail
+{
+    /// For a given call to add(), decide whether we're being passed an
+    /// unbound member function pointer or a plain callable.
+    /// Default case.
+    template <typename CALLABLE>
+    struct AddCallable
+    {
+        void operator()(LLEventDispatcher& disp, const std::string& name,
+                        const CALLABLE& callable, const LLSD& required);
+    };
+
+    /// Unbound member function pointer
+    template <class CLASS>
+    struct AddCallable<void (CLASS::*)(const LLSD&)>
+    {
+        typedef void (CLASS::*Method)(const LLSD&);
+        void operator()(LLEventDispatcher& disp, const std::string& name,
+                        Method method, const LLSD& required);
+    };
+
+    /// Unbound const member function pointer
+    template <class CLASS>
+    struct AddCallable<void (CLASS::*)(const LLSD&) const>
+    {
+        typedef void (CLASS::*Method)(const LLSD&) const;
+        void operator()(LLEventDispatcher& disp, const std::string& name,
+                        Method method, const LLSD& required);
+    };
+}
+|*==========================================================================*/
 
 /**
  * Given an LLSD map, examine a string-valued key and call a corresponding
@@ -39,28 +73,36 @@ public:
     /// Accept any C++ callable, typically a boost::bind() expression
     typedef boost::function<void(const LLSD&)> Callable;
 
-    /// Register a @a callable by @a name. The optional @a required parameter
-    /// is used to validate the structure of each incoming event (see
-    /// llsd_matches()).
+    /**
+     * Register a @a callable by @a name. The optional @a required parameter
+     * is used to validate the structure of each incoming event (see
+     * llsd_matches()).
+     */
     void add(const std::string& name, const Callable& callable, const LLSD& required=LLSD());
+/*==========================================================================*|
+    {
+        LLEventDetail::AddCallable<CALLABLE>()(*this, name, callable, required);
+    }
+|*==========================================================================*/
 
-    /// Special case: a subclass of this class can register a @a method
-    /// without explicitly specifying the <tt>boost::bind()</tt> expression.
-    /// The optional @a required parameter is used to validate the structure
-    /// of each incoming event (see llsd_matches()).
+    /**
+     * Special case: a subclass of this class can pass an unbound member
+     * function pointer without explicitly specifying the
+     * <tt>boost::bind()</tt> expression.
+     */
     template <class CLASS>
     void add(const std::string& name, void (CLASS::*method)(const LLSD&),
              const LLSD& required=LLSD())
     {
-        CLASS* downcast = dynamic_cast<CLASS*>(this);
-        if (! downcast)
-        {
-            addFail(name, typeid(CLASS).name());
-        }
-        else
-        {
-            add(name, boost::bind(method, downcast, _1), required);
-        }
+        addMethod<CLASS>(name, method, required);
+    }
+
+    /// Overload for both const and non-const methods
+    template <class CLASS>
+    void add(const std::string& name, void (CLASS::*method)(const LLSD&) const,
+             const LLSD& required=LLSD())
+    {
+        addMethod<CLASS>(name, method, required);
     }
 
     /// Unregister a callable
@@ -78,6 +120,19 @@ public:
     void operator()(const LLSD& event) const;
 
 private:
+    template <class CLASS, typename METHOD>
+    void addMethod(const std::string& name, const METHOD& method, const LLSD& required)
+    {
+        CLASS* downcast = dynamic_cast<CLASS*>(this);
+        if (! downcast)
+        {
+            addFail(name, typeid(CLASS).name());
+        }
+        else
+        {
+            add(name, boost::bind(method, downcast, _1), required);
+        }
+    }
     void addFail(const std::string& name, const std::string& classname) const;
     /// try to dispatch, return @c true if success
     bool attemptCall(const std::string& name, const LLSD& event) const;
@@ -87,6 +142,50 @@ private:
     DispatchMap mDispatch;
 };
 
+/*==========================================================================*|
+/// Have to implement these template specialization methods after
+/// LLEventDispatcher so they can use its methods
+template <typename CALLABLE>
+void LLEventDetail::AddCallable<CALLABLE>::operator()(
+    LLEventDispatcher& disp, const std::string& name, const CALLABLE& callable, const LLSD& required)
+{
+    disp.addImpl(name, callable, required);
+}
+
+template <class CLASS>
+void LLEventDetail::AddCallable<void (CLASS::*)(const LLSD&)>::operator()(
+    LLEventDispatcher& disp, const std::string& name, const Method& method, const LLSD& required)
+{
+    CLASS* downcast = dynamic_cast<CLASS*>(&disp);
+    if (! downcast)
+    {
+        disp.addFail(name, typeid(CLASS).name());
+    }
+    else
+    {
+        disp.addImpl(name, boost::bind(method, downcast, _1), required);
+    }
+}
+
+/// Have to overload for both const and non-const methods
+template <class CLASS>
+void LLEventDetail::AddCallable<void (CLASS::*)(const LLSD&) const>::operator()(
+    LLEventDispatcher& disp, const std::string& name, const Method& method, const LLSD& required)
+{
+    // I am severely bummed that I have, as yet, found no way short of a
+    // macro to avoid replicating the (admittedly brief) body of this overload.
+    CLASS* downcast = dynamic_cast<CLASS*>(&disp);
+    if (! downcast)
+    {
+        disp.addFail(name, typeid(CLASS).name());
+    }
+    else
+    {
+        disp.addImpl(name, boost::bind(method, downcast, _1), required);
+    }
+}
+|*==========================================================================*/
+
 /**
  * Bundle an LLEventPump and a listener with an LLEventDispatcher. A class
  * that contains (or derives from) LLDispatchListener need only specify the
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 5d79dfbc3e..29031418b8 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -73,6 +73,7 @@ set(viewer_SOURCE_FILES
     llagentpilot.cpp
     llanimstatelabels.cpp
     llappviewer.cpp
+    llappviewerlistener.cpp
     llassetuploadresponders.cpp
     llassetuploadqueue.cpp
     llaudiosourcevo.cpp
@@ -468,6 +469,7 @@ set(viewer_HEADER_FILES
     llanimstatelabels.h
     llappearance.h
     llappviewer.h
+    llappviewerlistener.h
     llassetuploadresponders.h
     llassetuploadqueue.h
     llaudiosourcevo.h
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 455e987da0..a3b41b4ace 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -177,7 +177,10 @@
 //----------------------------------------------------------------------------
 // llviewernetwork.h
 #include "llviewernetwork.h"
+// define a self-registering event API object
+#include "llappviewerlistener.h"
 
+static LLAppViewerListener sAppViewerListener("LLAppViewer", LLAppViewer::instance());
 
 ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor
 //
diff --git a/indra/newview/llappviewerlistener.cpp b/indra/newview/llappviewerlistener.cpp
new file mode 100644
index 0000000000..a8c98b17a7
--- /dev/null
+++ b/indra/newview/llappviewerlistener.cpp
@@ -0,0 +1,33 @@
+/**
+ * @file   llappviewerlistener.cpp
+ * @author Nat Goodspeed
+ * @date   2009-06-23
+ * @brief  Implementation for llappviewerlistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "llviewerprecompiledheaders.h"
+// associated header
+#include "llappviewerlistener.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+#include "llappviewer.h"
+
+LLAppViewerListener::LLAppViewerListener(const std::string& pumpname, LLAppViewer* llappviewer):
+    LLDispatchListener(pumpname, "op"),
+    mAppViewer(llappviewer)
+{
+    // add() every method we want to be able to invoke via this event API.
+    add("requestQuit", &LLAppViewerListener::requestQuit);
+}
+
+void LLAppViewerListener::requestQuit(const LLSD& event) const
+{
+    mAppViewer->requestQuit();
+}
diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h
new file mode 100644
index 0000000000..ab17dd1d90
--- /dev/null
+++ b/indra/newview/llappviewerlistener.h
@@ -0,0 +1,34 @@
+/**
+ * @file   llappviewerlistener.h
+ * @author Nat Goodspeed
+ * @date   2009-06-18
+ * @brief  Wrap subset of LLAppViewer API in event API
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLAPPVIEWERLISTENER_H)
+#define LL_LLAPPVIEWERLISTENER_H
+
+#include "lleventdispatcher.h"
+
+class LLAppViewer;
+class LLSD;
+
+/// Listen on an LLEventPump with specified name for LLAppViewer request events.
+class LLAppViewerListener: public LLDispatchListener
+{
+public:
+    /// Specify the pump name on which to listen, and bind the LLAppViewer
+    /// instance to use (e.g. LLAppViewer::instance()).
+    LLAppViewerListener(const std::string& pumpname, LLAppViewer* llappviewer);
+
+private:
+    void requestQuit(const LLSD& event) const;
+
+    LLAppViewer* mAppViewer;
+};
+
+#endif /* ! defined(LL_LLAPPVIEWERLISTENER_H) */
-- 
cgit v1.2.3


From 7e84d9125e471c7289b448d060cb0276be2d3824 Mon Sep 17 00:00:00 2001
From: Christian Goetze <cg@lindenlab.com>
Date: Wed, 24 Jun 2009 15:13:53 +0000
Subject: Fix Mac Build

---
 indra/develop.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/develop.py b/indra/develop.py
index f4143eb65c..7d0aec4a4a 100755
--- a/indra/develop.py
+++ b/indra/develop.py
@@ -444,8 +444,7 @@ class DarwinSetup(UnixSetup):
             targets = ' '.join(['-target ' + repr(t) for t in targets])
         else:
             targets = ''
-        cmd = ('xcodebuild -parallelizeTargets '
-               '-configuration %s %s %s' %
+        cmd = ('xcodebuild -configuration %s %s %s' %
                (self.build_type, ' '.join(opts), targets))
         for d in self.build_dirs():
             try:
-- 
cgit v1.2.3


From 70d99b2528acb3bc503d3ac799e42d52515b6260 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 24 Jun 2009 16:25:33 +0000
Subject: DEV-31980: remove cruft from lleventdispatcher.h

---
 indra/llcommon/lleventdispatcher.h | 83 --------------------------------------
 1 file changed, 83 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h
index e43d967ed4..4da0a01c69 100644
--- a/indra/llcommon/lleventdispatcher.h
+++ b/indra/llcommon/lleventdispatcher.h
@@ -23,40 +23,6 @@
 #include "llevents.h"
 
 class LLSD;
-/*==========================================================================*|
-class LLEventDispatcher;
-
-namespace LLEventDetail
-{
-    /// For a given call to add(), decide whether we're being passed an
-    /// unbound member function pointer or a plain callable.
-    /// Default case.
-    template <typename CALLABLE>
-    struct AddCallable
-    {
-        void operator()(LLEventDispatcher& disp, const std::string& name,
-                        const CALLABLE& callable, const LLSD& required);
-    };
-
-    /// Unbound member function pointer
-    template <class CLASS>
-    struct AddCallable<void (CLASS::*)(const LLSD&)>
-    {
-        typedef void (CLASS::*Method)(const LLSD&);
-        void operator()(LLEventDispatcher& disp, const std::string& name,
-                        Method method, const LLSD& required);
-    };
-
-    /// Unbound const member function pointer
-    template <class CLASS>
-    struct AddCallable<void (CLASS::*)(const LLSD&) const>
-    {
-        typedef void (CLASS::*Method)(const LLSD&) const;
-        void operator()(LLEventDispatcher& disp, const std::string& name,
-                        Method method, const LLSD& required);
-    };
-}
-|*==========================================================================*/
 
 /**
  * Given an LLSD map, examine a string-valued key and call a corresponding
@@ -79,11 +45,6 @@ public:
      * llsd_matches()).
      */
     void add(const std::string& name, const Callable& callable, const LLSD& required=LLSD());
-/*==========================================================================*|
-    {
-        LLEventDetail::AddCallable<CALLABLE>()(*this, name, callable, required);
-    }
-|*==========================================================================*/
 
     /**
      * Special case: a subclass of this class can pass an unbound member
@@ -142,50 +103,6 @@ private:
     DispatchMap mDispatch;
 };
 
-/*==========================================================================*|
-/// Have to implement these template specialization methods after
-/// LLEventDispatcher so they can use its methods
-template <typename CALLABLE>
-void LLEventDetail::AddCallable<CALLABLE>::operator()(
-    LLEventDispatcher& disp, const std::string& name, const CALLABLE& callable, const LLSD& required)
-{
-    disp.addImpl(name, callable, required);
-}
-
-template <class CLASS>
-void LLEventDetail::AddCallable<void (CLASS::*)(const LLSD&)>::operator()(
-    LLEventDispatcher& disp, const std::string& name, const Method& method, const LLSD& required)
-{
-    CLASS* downcast = dynamic_cast<CLASS*>(&disp);
-    if (! downcast)
-    {
-        disp.addFail(name, typeid(CLASS).name());
-    }
-    else
-    {
-        disp.addImpl(name, boost::bind(method, downcast, _1), required);
-    }
-}
-
-/// Have to overload for both const and non-const methods
-template <class CLASS>
-void LLEventDetail::AddCallable<void (CLASS::*)(const LLSD&) const>::operator()(
-    LLEventDispatcher& disp, const std::string& name, const Method& method, const LLSD& required)
-{
-    // I am severely bummed that I have, as yet, found no way short of a
-    // macro to avoid replicating the (admittedly brief) body of this overload.
-    CLASS* downcast = dynamic_cast<CLASS*>(&disp);
-    if (! downcast)
-    {
-        disp.addFail(name, typeid(CLASS).name());
-    }
-    else
-    {
-        disp.addImpl(name, boost::bind(method, downcast, _1), required);
-    }
-}
-|*==========================================================================*/
-
 /**
  * Bundle an LLEventPump and a listener with an LLEventDispatcher. A class
  * that contains (or derives from) LLDispatchListener need only specify the
-- 
cgit v1.2.3


From ba292920f082d43fb504ba4c5c89e2ad01146246 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Wed, 24 Jun 2009 17:24:16 -0700
Subject: Commiting merged llstartup.cpp, again?

---
 indra/newview/llstartup.cpp | 1348 ++++++++++++++-----------------------------
 1 file changed, 443 insertions(+), 905 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index d287f25181..0e5cb5905b 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -55,7 +55,6 @@
 #include "llcachename.h"
 #include "lldir.h"
 #include "llerrorcontrol.h"
-#include "llfiltersd2xmlrpc.h"
 #include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "llhttpsender.h"
@@ -65,10 +64,11 @@
 #include "llmemorystream.h"
 #include "llmessageconfig.h"
 #include "llmoveview.h"
+#include "llteleporthistory.h"
 #include "llregionhandle.h"
 #include "llsd.h"
 #include "llsdserialize.h"
-#include "llsdutil.h"
+#include "llsdutil_math.h"
 #include "llsecondlifeurls.h"
 #include "llstring.h"
 #include "lluserrelations.h"
@@ -103,7 +103,6 @@
 #include "llfloaterland.h"
 #include "llfloaterpreference.h"
 #include "llfloatertopobjects.h"
-#include "llfloatertos.h"
 #include "llfloaterworldmap.h"
 #include "llgesturemgr.h"
 #include "llgroupmgr.h"
@@ -116,6 +115,7 @@
 #include "llinventoryview.h"
 #include "llkeyboard.h"
 #include "llloginhandler.h"			// gLoginHandler, SLURL support
+#include "lllogininstance.h" // Host the login module.
 #include "llpanellogin.h"
 #include "llmutelist.h"
 #include "llnotify.h"
@@ -135,7 +135,6 @@
 #include "llsecondlifeurls.h"
 #include "llselectmgr.h"
 #include "llsky.h"
-#include "llsrv.h"
 #include "llstatview.h"
 #include "lltrans.h"
 #include "llstatusbar.h"		// sendMoneyBalanceRequest(), owns L$ balance
@@ -148,7 +147,6 @@
 #include "llurlsimstring.h"
 #include "llurlhistory.h"
 #include "llurlwhitelist.h"
-#include "lluserauth.h"
 #include "llvieweraudio.h"
 #include "llviewerassetstorage.h"
 #include "llviewercamera.h"
@@ -190,6 +188,8 @@
 #include "llwearable.h"
 #include "llinventorybridge.h"
 
+#include "lllogin.h"
+
 #if LL_LIBXUL_ENABLED
 #include "llmozlib.h"
 #endif // LL_LIBXUL_ENABLED
@@ -203,12 +203,12 @@
 // exported globals
 //
 bool gAgentMovementCompleted = false;
-std::string gInitialOutfit;
-std::string gInitialOutfitGender;
 
 std::string SCREEN_HOME_FILENAME = "screen_home.bmp";
 std::string SCREEN_LAST_FILENAME = "screen_last.bmp";
 
+LLPointer<LLImageGL> gStartImageGL;
+
 //
 // Imported globals
 //
@@ -218,12 +218,6 @@ extern S32 gStartImageHeight;
 //
 // local globals
 //
-
-LLPointer<LLImageGL> gStartImageGL;
-
-static LLHost gAgentSimHost;
-static BOOL gSkipOptionalUpdate = FALSE;
-
 static bool gGotUseCircuitCodeAck = false;
 static std::string sInitialOutfit;
 static std::string sInitialOutfitGender;	// "male" or "female"
@@ -232,6 +226,17 @@ static bool gUseCircuitCallbackCalled = false;
 
 EStartupState LLStartUp::gStartupState = STATE_FIRST;
 
+// *NOTE:Mani - to reconcile with giab changes...
+static std::string gFirstname;
+static std::string gLastname;
+static std::string gPassword;
+
+static U64 gFirstSimHandle = 0;
+static LLHost gFirstSim;
+static std::string gFirstSimSeedCap;
+static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
+static std::string gAgentStartLocation = "safe";
+
 
 //
 // local function declaration
@@ -244,8 +249,6 @@ void show_first_run_dialog();
 bool first_run_dialog_callback(const LLSD& notification, const LLSD& response);
 void set_startup_status(const F32 frac, const std::string& string, const std::string& msg);
 bool login_alert_status(const LLSD& notification, const LLSD& response);
-void update_app(BOOL mandatory, const std::string& message);
-bool update_dialog_callback(const LLSD& notification, const LLSD& response);
 void login_packet_failed(void**, S32 result);
 void use_circuit_callback(void**, S32 result);
 void register_viewer_callbacks(LLMessageSystem* msg);
@@ -255,6 +258,7 @@ void init_start_screen(S32 location_id);
 void release_start_screen();
 void reset_login();
 void apply_udp_blacklist(const std::string& csv);
+bool process_login_success_response();
 
 void callback_cache_name(const LLUUID& id, const std::string& firstname, const std::string& lastname, BOOL is_group)
 {
@@ -311,9 +315,6 @@ void update_texture_fetch()
 	gImageList.updateImages(0.10f);
 }
 
-static std::vector<std::string> sAuthUris;
-static S32 sAuthUriNum = -1;
-
 // Returns false to skip other idle processing. Should only return
 // true when all initialization done.
 bool idle_startup()
@@ -332,23 +333,11 @@ bool idle_startup()
 	// auth/transform loop will do.
 	static F32 progress = 0.10f;
 
-	static std::string auth_method;
 	static std::string auth_desc;
 	static std::string auth_message;
-	static std::string firstname;
-	static std::string lastname;
-	static LLUUID web_login_key;
-	static std::string password;
-	static std::vector<const char*> requested_options;
-
-	static U64 first_sim_handle = 0;
-	static LLHost first_sim;
-	static std::string first_sim_seed_cap;
 
 	static LLVector3 initial_sun_direction(1.f, 0.f, 0.f);
 	static LLVector3 agent_start_position_region(10.f, 10.f, 10.f);		// default for when no space server
-	static LLVector3 agent_start_look_at(1.0f, 0.f, 0.f);
-	static std::string agent_start_location = "safe";
 
 	// last location by default
 	static S32  agent_location_id = START_LOCATION_ID_LAST;
@@ -356,7 +345,7 @@ bool idle_startup()
 
 	static bool show_connect_box = true;
 
-	static bool stipend_since_login = false;
+	//static bool stipend_since_login = false;
 
 	// HACK: These are things from the main loop that usually aren't done
 	// until initialization is complete, but need to be done here for things
@@ -377,12 +366,7 @@ bool idle_startup()
 
 	LLStringUtil::setLocale (LLTrans::getString(system));
 
-	if (gNoRender)
-	{
-		// HACK, skip optional updates if you're running drones
-		gSkipOptionalUpdate = TRUE;
-	}
-	else
+	if (!gNoRender)
 	{
 		// Update images?
 		gImageList.updateImages(0.01f);
@@ -677,24 +661,23 @@ bool idle_startup()
 			|| !gLoginHandler.getWebLoginKey().isNull() )
 		{
 			// We have at least some login information on a SLURL
-			firstname = gLoginHandler.getFirstName();
-			lastname = gLoginHandler.getLastName();
-			web_login_key = gLoginHandler.getWebLoginKey();
+			gFirstname = gLoginHandler.getFirstName();
+			gLastname = gLoginHandler.getLastName();
 
 			// Show the login screen if we don't have everything
 			show_connect_box = 
-				firstname.empty() || lastname.empty() || web_login_key.isNull();
+				gFirstname.empty() || gLastname.empty();
 		}
         else if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3)
         {
             LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo");
-			firstname = cmd_line_login[0].asString();
-			lastname = cmd_line_login[1].asString();
+			gFirstname = cmd_line_login[0].asString();
+			gLastname = cmd_line_login[1].asString();
 
 			LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str());
 			char md5pass[33];               /* Flawfinder: ignore */
 			pass.hex_digest(md5pass);
-			password = md5pass;
+			gPassword = md5pass;
 			
 #ifdef USE_VIEWER_AUTH
 			show_connect_box = true;
@@ -705,9 +688,9 @@ bool idle_startup()
         }
 		else if (gSavedSettings.getBOOL("AutoLogin"))
 		{
-			firstname = gSavedSettings.getString("FirstName");
-			lastname = gSavedSettings.getString("LastName");
-			password = LLStartUp::loadPasswordFromDisk();
+			gFirstname = gSavedSettings.getString("FirstName");
+			gLastname = gSavedSettings.getString("LastName");
+			gPassword = LLStartUp::loadPasswordFromDisk();
 			gSavedSettings.setBOOL("RememberPassword", TRUE);
 			
 #ifdef USE_VIEWER_AUTH
@@ -720,9 +703,9 @@ bool idle_startup()
 		{
 			// if not automatically logging in, display login dialog
 			// a valid grid is selected
-			firstname = gSavedSettings.getString("FirstName");
-			lastname = gSavedSettings.getString("LastName");
-			password = LLStartUp::loadPasswordFromDisk();
+			gFirstname = gSavedSettings.getString("FirstName");
+			gLastname = gSavedSettings.getString("LastName");
+			gPassword = LLStartUp::loadPasswordFromDisk();
 			show_connect_box = true;
 		}
 
@@ -759,7 +742,7 @@ bool idle_startup()
 			// Load all the name information out of the login view
 			// NOTE: Hits "Attempted getFields with no login view shown" warning, since we don't
 			// show the login view until login_show() is called below.  
-			// LLPanelLogin::getFields(firstname, lastname, password);
+			// LLPanelLogin::getFields(gFirstname, gLastname, gPassword);
 
 			if (gNoRender)
 			{
@@ -771,7 +754,7 @@ bool idle_startup()
 			// Show the login dialog
 			login_show();
 			// connect dialog is already shown, so fill in the names
-			LLPanelLogin::setFields( firstname, lastname, password);
+			LLPanelLogin::setFields( gFirstname, gLastname, gPassword);
 
 			LLPanelLogin::giveFocus();
 
@@ -828,37 +811,29 @@ bool idle_startup()
 
 	if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState())
 	{
-		//reset the values that could have come in from a slurl
-		if (!gLoginHandler.getWebLoginKey().isNull())
-		{
-			firstname = gLoginHandler.getFirstName();
-			lastname = gLoginHandler.getLastName();
-			web_login_key = gLoginHandler.getWebLoginKey();
-		}
-				
 		if (show_connect_box)
 		{
 			// TODO if not use viewer auth
 			// Load all the name information out of the login view
-			LLPanelLogin::getFields(&firstname, &lastname, &password);
+			LLPanelLogin::getFields(&gFirstname, &gLastname, &gPassword);
 			// end TODO
 	 
 			// HACK: Try to make not jump on login
 			gKeyboard->resetKeys();
 		}
 
-		if (!firstname.empty() && !lastname.empty())
+		if (!gFirstname.empty() && !gLastname.empty())
 		{
-			gSavedSettings.setString("FirstName", firstname);
-			gSavedSettings.setString("LastName", lastname);
+			gSavedSettings.setString("FirstName", gFirstname);
+			gSavedSettings.setString("LastName", gLastname);
 
-			LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << LL_ENDL;
-			gDebugInfo["LoginName"] = firstname + " " + lastname;	
+			LL_INFOS("AppInit") << "Attempting login as: " << gFirstname << " " << gLastname << LL_ENDL;
+			gDebugInfo["LoginName"] = gFirstname + " " + gLastname;	
 		}
 
 		// create necessary directories
 		// *FIX: these mkdir's should error check
-		gDirUtilp->setLindenUserDir(firstname, lastname);
+		gDirUtilp->setLindenUserDir(gFirstname, gLastname);
     	LLFile::mkdir(gDirUtilp->getLindenUserDir());
 
 		LLLocationHistory::getInstance()->load();
@@ -891,7 +866,7 @@ bool idle_startup()
 			gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath"));		
 		}
 		
-		gDirUtilp->setPerAccountChatLogsDir(firstname, lastname);
+		gDirUtilp->setPerAccountChatLogsDir(gFirstname, gLastname);
 
 		LLFile::mkdir(gDirUtilp->getChatLogsDir());
 		LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir());
@@ -912,13 +887,6 @@ bool idle_startup()
 
 		if (show_connect_box)
 		{
-			if ( LLPanelLogin::isGridComboDirty() )
-			{
-				// User picked a grid from the popup, so clear the 
-				// stored uris and they will be reacquired from the grid choice.
-				sAuthUris.clear();
-			}
-			
 			std::string location;
 			LLPanelLogin::getLocation( location );
 			LLURLSimString::setString( location );
@@ -948,7 +916,7 @@ bool idle_startup()
 			agent_location_id = START_LOCATION_ID_URL;
 
 			// doesn't really matter what location_which is, since
-			// agent_start_look_at will be overwritten when the
+			// gAgentStartLookAt will be overwritten when the
 			// UserLoginLocationReply arrives
 			location_which = START_LOCATION_ID_LAST;
 		}
@@ -981,594 +949,118 @@ bool idle_startup()
 
 		gVFS->pokeFiles();
 
-		// skipping over STATE_UPDATE_CHECK because that just waits for input
 		LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
 
 		return FALSE;
 	}
 
-	if (STATE_UPDATE_CHECK == LLStartUp::getStartupState())
-	{
-		// wait for user to give input via dialog box
-		return FALSE;
-	}
-
 	if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState())
 	{
-//#define LL_MINIMIAL_REQUESTED_OPTIONS
 		gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel();
 
-		// *Note: this is where gUserAuth used to be created.
-		requested_options.clear();
-		requested_options.push_back("inventory-root");
-		requested_options.push_back("inventory-skeleton");
-		//requested_options.push_back("inventory-meat");
-		//requested_options.push_back("inventory-skel-targets");
-#if (!defined LL_MINIMIAL_REQUESTED_OPTIONS)
-		if(FALSE == gSavedSettings.getBOOL("NoInventoryLibrary"))
-		{
-			requested_options.push_back("inventory-lib-root");
-			requested_options.push_back("inventory-lib-owner");
-			requested_options.push_back("inventory-skel-lib");
-		//	requested_options.push_back("inventory-meat-lib");
-		}
-
-		requested_options.push_back("initial-outfit");
-		requested_options.push_back("gestures");
-		requested_options.push_back("event_categories");
-		requested_options.push_back("event_notifications");
-		requested_options.push_back("classified_categories");
-		//requested_options.push_back("inventory-targets");
-		requested_options.push_back("buddy-list");
-		requested_options.push_back("ui-config");
-#endif
-		requested_options.push_back("tutorial_setting");
-		requested_options.push_back("login-flags");
-		requested_options.push_back("global-textures");
-		if(gSavedSettings.getBOOL("ConnectAsGod"))
-		{
-			gSavedSettings.setBOOL("UseDebugMenus", TRUE);
-			requested_options.push_back("god-connect");
-		}
-		std::vector<std::string> uris;
-		LLViewerLogin::getInstance()->getLoginURIs(uris);
-		std::vector<std::string>::const_iterator iter, end;
-		for (iter = uris.begin(), end = uris.end(); iter != end; ++iter)
-		{
-			std::vector<std::string> rewritten;
-			rewritten = LLSRV::rewriteURI(*iter);
-			sAuthUris.insert(sAuthUris.end(),
-							 rewritten.begin(), rewritten.end());
-		}
-		sAuthUriNum = 0;
-		auth_method = "login_to_simulator";
-		
+		// Update progress status and the display loop.
 		auth_desc = LLTrans::getString("LoginInProgress");
-		LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
-	}
-
-	if (STATE_LOGIN_AUTHENTICATE == LLStartUp::getStartupState())
-	{
-		LL_DEBUGS("AppInit") << "STATE_LOGIN_AUTHENTICATE" << LL_ENDL;
 		set_startup_status(progress, auth_desc, auth_message);
 		progress += 0.02f;
 		display_startup();
-		
-		std::stringstream start;
-		if (LLURLSimString::parse())
-		{
-			// a startup URL was specified
-			std::stringstream unescaped_start;
-			unescaped_start << "uri:" 
-							<< LLURLSimString::sInstance.mSimName << "&" 
-							<< LLURLSimString::sInstance.mX << "&" 
-							<< LLURLSimString::sInstance.mY << "&" 
-							<< LLURLSimString::sInstance.mZ;
-			start << xml_escape_string(unescaped_start.str());
-			
-		}
-		else
-		{
-			start << gSavedSettings.getString("LoginLocation");
-		}
-
-		char hashed_mac_string[MD5HEX_STR_SIZE];		/* Flawfinder: ignore */
-		LLMD5 hashed_mac;
-		hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES );
-		hashed_mac.finalize();
-		hashed_mac.hex_digest(hashed_mac_string);
-
-		// TODO if statement here to use web_login_key
-		sAuthUriNum = llclamp(sAuthUriNum, 0, (S32)sAuthUris.size()-1);
-		LLUserAuth::getInstance()->authenticate(
-			sAuthUris[sAuthUriNum],
-			auth_method,
-			firstname,
-			lastname,			
-			password, // web_login_key,
-			start.str(),
-			gSkipOptionalUpdate,
-			gAcceptTOS,
-			gAcceptCriticalMessage,
-			gLastExecEvent,
-			requested_options,
-			hashed_mac_string,
-			LLAppViewer::instance()->getSerialNumber());
-
-		// reset globals
-		gAcceptTOS = FALSE;
-		gAcceptCriticalMessage = FALSE;
-		LLStartUp::setStartupState( STATE_LOGIN_NO_DATA_YET );
-		return FALSE;
-	}
 
-	if(STATE_LOGIN_NO_DATA_YET == LLStartUp::getStartupState())
-	{
-		LL_DEBUGS("AppInit") << "STATE_LOGIN_NO_DATA_YET" << LL_ENDL;
-		// If we get here we have gotten past the potential stall
-		// in curl, so take "may appear frozen" out of progress bar. JC
-		auth_desc = LLTrans::getString("LoginInProgressNoFrozen");
-		set_startup_status(progress, auth_desc, auth_message);
-		// Process messages to keep from dropping circuit.
-		LLMessageSystem* msg = gMessageSystem;
-		while (msg->checkAllMessages(gFrameCount, gServicePump))
+		// Setting initial values...
+		if(gNoRender)
 		{
+			// HACK, skip optional updates if you're running drones
+			LLLoginInstance::getInstance()->setSkipOptionalUpdate(true);
 		}
-		msg->processAcks();
-		LLUserAuth::UserAuthcode error = LLUserAuth::getInstance()->authResponse();
-		if(LLUserAuth::E_NO_RESPONSE_YET == error)
-		{
-			LL_DEBUGS("AppInit") << "waiting..." << LL_ENDL;
-			return FALSE;
-		}
-		LLStartUp::setStartupState( STATE_LOGIN_DOWNLOADING );
-		progress += 0.01f;
-		set_startup_status(progress, auth_desc, auth_message);
-		return FALSE;
-	}
 
-	if(STATE_LOGIN_DOWNLOADING == LLStartUp::getStartupState())
-	{
-		LL_DEBUGS("AppInit") << "STATE_LOGIN_DOWNLOADING" << LL_ENDL;
-		// Process messages to keep from dropping circuit.
-		LLMessageSystem* msg = gMessageSystem;
-		while (msg->checkAllMessages(gFrameCount, gServicePump))
-		{
-		}
-		msg->processAcks();
-		LLUserAuth::UserAuthcode error = LLUserAuth::getInstance()->authResponse();
-		if(LLUserAuth::E_DOWNLOADING == error)
-		{
-			LL_DEBUGS("AppInit") << "downloading..." << LL_ENDL;
-			return FALSE;
-		}
+		LLLoginInstance::getInstance()->setUserInteraction(show_connect_box);
+
+		// This call to LLLoginInstance::connect() starts the 
+		// authentication process.
+		LLSD credentials;
+		credentials["first"] = gFirstname;
+		credentials["last"] = gLastname;
+		credentials["passwd"] = gPassword;
+		LLLoginInstance::getInstance()->connect(credentials);
+
 		LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE );
-		progress += 0.01f;
-		set_startup_status(progress, LLTrans::getString("LoginProcessingResponse"), auth_message);
 		return FALSE;
 	}
 
-	if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState())
+	if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState()) 
 	{
-		LL_DEBUGS("AppInit") << "STATE_LOGIN_PROCESS_RESPONSE" << LL_ENDL;
+		bool transitionBackToLoginPanel = false;
 		std::ostringstream emsg;
-		bool quit = false;
-		bool update = false;
-		std::string login_response;
-		std::string reason_response;
-		std::string message_response;
-		bool successful_login = false;
-		LLUserAuth::UserAuthcode error = LLUserAuth::getInstance()->authResponse();
-		// reset globals
-		gAcceptTOS = FALSE;
-		gAcceptCriticalMessage = FALSE;
-		switch(error)
-		{
-		case LLUserAuth::E_OK:
-			login_response = LLUserAuth::getInstance()->getResponse("login");
-			if(login_response == "true")
-			{
-				// Yay, login!
-				successful_login = true;
-			}
-			else if(login_response == "indeterminate")
+		if(LLLoginInstance::getInstance()->authFailure())
+		{
+			// Still have error conditions that may need some 
+			// sort of handling.
+			emsg << "Login failed.\n";
+			std::string reason_response = LLLoginInstance::getInstance()->getResponse("reason");
+			std::string message_response = LLLoginInstance::getInstance()->getResponse("message");
+	
+			if(!message_response.empty())
 			{
-				LL_INFOS("AppInit") << "Indeterminate login..." << LL_ENDL;
-				sAuthUris = LLSRV::rewriteURI(LLUserAuth::getInstance()->getResponse("next_url"));
-				sAuthUriNum = 0;
-				auth_method = LLUserAuth::getInstance()->getResponse("next_method");
-				auth_message = LLUserAuth::getInstance()->getResponse("message");
-				if(auth_method.substr(0, 5) == "login")
+				// XUI: fix translation for strings returned during login
+				// We need a generic table for translations
+				std::string big_reason = LLAgent::sTeleportErrorMessages[ message_response ];
+				if ( big_reason.size() == 0 )
 				{
-					auth_desc.assign(LLTrans::getString("LoginAuthenticating"));
+					emsg << message_response;
 				}
 				else
 				{
-					auth_desc.assign(LLTrans::getString("LoginMaintenance"));
-				}
-				// ignoring the duration & options array for now.
-				// Go back to authenticate.
-				LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
-				return FALSE;
-			}
-			else
-			{
-				emsg << "Login failed.\n";
-				reason_response = LLUserAuth::getInstance()->getResponse("reason");
-				message_response = LLUserAuth::getInstance()->getResponse("message");
-
-				if (!message_response.empty())
-				{
-					// XUI: fix translation for strings returned during login
-					// We need a generic table for translations
-					std::string big_reason = LLAgent::sTeleportErrorMessages[ message_response ];
-					if ( big_reason.size() == 0 )
-					{
-						emsg << message_response;
-					}
-					else
-					{
-						emsg << big_reason;
-					}
-				}
-
-				if(reason_response == "tos")
-				{
-					if (show_connect_box)
-					{
-						LL_DEBUGS("AppInit") << "Need tos agreement" << LL_ENDL;
-						LLStartUp::setStartupState( STATE_UPDATE_CHECK );
-						LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
-																	message_response);
-						tos_dialog->startModal();
-						// LLFloaterTOS deletes itself.
-						return false;
-					}
-					else
-					{
-						quit = true;
-					}
-				}
-				if(reason_response == "critical")
-				{
-					if (show_connect_box)
-					{
-						LL_DEBUGS("AppInit") << "Need critical message" << LL_ENDL;
-						LLStartUp::setStartupState( STATE_UPDATE_CHECK );
-						LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
-																	message_response);
-						tos_dialog->startModal();
-						// LLFloaterTOS deletes itself.
-						return false;
-					}
-					else
-					{
-						quit = true;
-					}
-				}
-				if(reason_response == "key")
-				{
-					// Couldn't login because user/password is wrong
-					// Clear the password
-					password = "";
-				}
-				if(reason_response == "update")
-				{
-					auth_message = LLUserAuth::getInstance()->getResponse("message");
-					update = true;
-				}
-				if(reason_response == "optional")
-				{
-					LL_DEBUGS("AppInit") << "Login got optional update" << LL_ENDL;
-					auth_message = LLUserAuth::getInstance()->getResponse("message");
-					if (show_connect_box)
-					{
-						update_app(FALSE, auth_message);
-						LLStartUp::setStartupState( STATE_UPDATE_CHECK );
-						gSkipOptionalUpdate = TRUE;
-						return false;
-					}
+					emsg << big_reason;
 				}
 			}
-			break;
-		case LLUserAuth::E_COULDNT_RESOLVE_HOST:
-		case LLUserAuth::E_SSL_PEER_CERTIFICATE:
-		case LLUserAuth::E_UNHANDLED_ERROR:
-		case LLUserAuth::E_SSL_CACERT:
-		case LLUserAuth::E_SSL_CONNECT_ERROR:
-		default:
-			if (sAuthUriNum >= (int) sAuthUris.size() - 1)
-			{
-				emsg << "Unable to connect to " << LLAppViewer::instance()->getSecondLifeTitle() << ".\n";
-				emsg << LLUserAuth::getInstance()->errorMessage();
-			} else {
-				sAuthUriNum++;
-				std::ostringstream s;
-				LLStringUtil::format_map_t args;
-				args["[NUMBER]"] = llformat("%d", sAuthUriNum + 1);
-				auth_desc = LLTrans::getString("LoginAttempt", args);
-				LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
-				return FALSE;
-			}
-			break;
-		}
-
-		if (update || gSavedSettings.getBOOL("ForceMandatoryUpdate"))
-		{
-			gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE);
-			update_app(TRUE, auth_message);
-			LLStartUp::setStartupState( STATE_UPDATE_CHECK );
-			return false;
-		}
-
-		// Version update and we're not showing the dialog
-		if(quit)
-		{
-			LLUserAuth::getInstance()->reset();
-			LLAppViewer::instance()->forceQuit();
-			return false;
-		}
 
-		if(successful_login)
-		{
-			std::string text;
-			text = LLUserAuth::getInstance()->getResponse("udp_blacklist");
-			if(!text.empty())
-			{
-				apply_udp_blacklist(text);
-			}
-
-			// unpack login data needed by the application
-			text = LLUserAuth::getInstance()->getResponse("agent_id");
-			if(!text.empty()) gAgentID.set(text);
-			gDebugInfo["AgentID"] = text;
-			
-			text = LLUserAuth::getInstance()->getResponse("session_id");
-			if(!text.empty()) gAgentSessionID.set(text);
-			gDebugInfo["SessionID"] = text;
-			
-			text = LLUserAuth::getInstance()->getResponse("secure_session_id");
-			if(!text.empty()) gAgent.mSecureSessionID.set(text);
-
-			text = LLUserAuth::getInstance()->getResponse("first_name");
-			if(!text.empty()) 
+			if(reason_response == "key")
 			{
-				// Remove quotes from string.  Login.cgi sends these to force
-				// names that look like numbers into strings.
-				firstname.assign(text);
-				LLStringUtil::replaceChar(firstname, '"', ' ');
-				LLStringUtil::trim(firstname);
+				// Couldn't login because user/password is wrong
+				// Clear the password
+				gPassword = "";
 			}
-			text = LLUserAuth::getInstance()->getResponse("last_name");
-			if(!text.empty()) lastname.assign(text);
-			gSavedSettings.setString("FirstName", firstname);
-			gSavedSettings.setString("LastName", lastname);
 
-			if (gSavedSettings.getBOOL("RememberPassword"))
+			if(reason_response == "update" 
+				|| reason_response == "optional")
 			{
-				// Successful login means the password is valid, so save it.
-				LLStartUp::savePasswordToDisk(password);
+				// In the case of a needed update, quit.
+				// Its either downloading or declined.
+				// If optional was skipped this case shouldn't 
+				// be reached.
+				LLLoginInstance::getInstance()->disconnect();
+				LLAppViewer::instance()->forceQuit();
 			}
 			else
 			{
-				// Don't leave password from previous session sitting around
-				// during this login session.
-				LLStartUp::deletePasswordFromDisk();
-			}
-
-			// this is their actual ability to access content
-			text = LLUserAuth::getInstance()->getResponse("agent_access_max");
-			if (!text.empty())
-			{
-				// agent_access can be 'A', 'M', and 'PG'.
-				gAgent.setMaturity(text[0]);
-			}
-			
-			// this is the value of their preference setting for that content
-			// which will always be <= agent_access_max
-			text = LLUserAuth::getInstance()->getResponse("agent_region_access");
-			if (!text.empty())
-			{
-				int preferredMaturity = LLAgent::convertTextToMaturity(text[0]);
-				gSavedSettings.setU32("PreferredMaturity", preferredMaturity);
-			}
-			// During the AO transition, this flag will be true. Then the flag will
-			// go away. After the AO transition, this code and all the code that
-			// uses it can be deleted.
-			text = LLUserAuth::getInstance()->getResponse("ao_transition");
-			if (!text.empty())
-			{
-				if (text == "1")
-				{
-					gAgent.setAOTransition();
-				}
-			}
-
-			text = LLUserAuth::getInstance()->getResponse("start_location");
-			if(!text.empty()) agent_start_location.assign(text);
-			text = LLUserAuth::getInstance()->getResponse("circuit_code");
-			if(!text.empty())
-			{
-				gMessageSystem->mOurCircuitCode = strtoul(text.c_str(), NULL, 10);
-			}
-			std::string sim_ip_str = LLUserAuth::getInstance()->getResponse("sim_ip");
-			std::string sim_port_str = LLUserAuth::getInstance()->getResponse("sim_port");
-			if(!sim_ip_str.empty() && !sim_port_str.empty())
-			{
-				U32 sim_port = strtoul(sim_port_str.c_str(), NULL, 10);
-				first_sim.set(sim_ip_str, sim_port);
-				if (first_sim.isOk())
-				{
-					gMessageSystem->enableCircuit(first_sim, TRUE);
-				}
-			}
-			std::string region_x_str = LLUserAuth::getInstance()->getResponse("region_x");
-			std::string region_y_str = LLUserAuth::getInstance()->getResponse("region_y");
-			if(!region_x_str.empty() && !region_y_str.empty())
-			{
-				U32 region_x = strtoul(region_x_str.c_str(), NULL, 10);
-				U32 region_y = strtoul(region_y_str.c_str(), NULL, 10);
-				first_sim_handle = to_region_handle(region_x, region_y);
-			}
-			
-			const std::string look_at_str = LLUserAuth::getInstance()->getResponse("look_at");
-			if (!look_at_str.empty())
-			{
-				size_t len = look_at_str.size();
-				LLMemoryStream mstr((U8*)look_at_str.c_str(), len);
-				LLSD sd = LLSDSerialize::fromNotation(mstr, len);
-				agent_start_look_at = ll_vector3_from_sd(sd);
-			}
-
-			text = LLUserAuth::getInstance()->getResponse("seed_capability");
-			if (!text.empty()) first_sim_seed_cap = text;
-						
-			text = LLUserAuth::getInstance()->getResponse("seconds_since_epoch");
-			if(!text.empty())
-			{
-				U32 server_utc_time = strtoul(text.c_str(), NULL, 10);
-				if(server_utc_time)
-				{
-					time_t now = time(NULL);
-					gUTCOffset = (server_utc_time - now);
-				}
-			}
-
-			std::string home_location = LLUserAuth::getInstance()->getResponse("home");
-			if(!home_location.empty())
-			{
-				size_t len = home_location.size();
-				LLMemoryStream mstr((U8*)home_location.c_str(), len);
-				LLSD sd = LLSDSerialize::fromNotation(mstr, len);
-				S32 region_x = sd["region_handle"][0].asInteger();
-				S32 region_y = sd["region_handle"][1].asInteger();
-				U64 region_handle = to_region_handle(region_x, region_y);
-				LLVector3 position = ll_vector3_from_sd(sd["position"]);
-				gAgent.setHomePosRegion(region_handle, position);
-			}
-
-			gAgent.mMOTD.assign(LLUserAuth::getInstance()->getResponse("message"));
-			LLUserAuth::options_t options;
-			if(LLUserAuth::getInstance()->getOptions("inventory-root", options))
-			{
-				LLUserAuth::response_t::iterator it;
-				it = options[0].find("folder_id");
-				if(it != options[0].end())
-				{
-					gAgent.getInventoryRootID().set((*it).second);
-					//gInventory.mock(gAgent.getInventoryRootID());
-				}
-			}
-
-			options.clear();
-			if(LLUserAuth::getInstance()->getOptions("login-flags", options))
-			{
-				LLUserAuth::response_t::iterator it;
-				LLUserAuth::response_t::iterator no_flag = options[0].end();
-				it = options[0].find("ever_logged_in");
-				if(it != no_flag)
-				{
-					if((*it).second == "N") gAgent.setFirstLogin(TRUE);
-					else gAgent.setFirstLogin(FALSE);
-				}
-				it = options[0].find("stipend_since_login");
-				if(it != no_flag)
-				{
-					if((*it).second == "Y") stipend_since_login = true;
-				}
-				it = options[0].find("gendered");
-				if(it != no_flag)
-				{
-					if((*it).second == "Y") gAgent.setGenderChosen(TRUE);
-				}
-				it = options[0].find("daylight_savings");
-				if(it != no_flag)
-				{
-					if((*it).second == "Y")  gPacificDaylightTime = TRUE;
-					else gPacificDaylightTime = FALSE;
-				}
+				transitionBackToLoginPanel = true;
 
 				//setup map of datetime strings to codes and slt & local time offset from utc
 				LLStringOps::setupDatetimeInfo (gPacificDaylightTime);
 			}
-			options.clear();
-			if (LLUserAuth::getInstance()->getOptions("initial-outfit", options)
-				&& !options.empty())
-			{
-				LLUserAuth::response_t::iterator it;
-				LLUserAuth::response_t::iterator it_end = options[0].end();
-				it = options[0].find("folder_name");
-				if(it != it_end)
-				{
-					// Initial outfit is a folder in your inventory,
-					// must be an exact folder-name match.
-					sInitialOutfit = (*it).second;
-				}
-				it = options[0].find("gender");
-				if (it != it_end)
-				{
-					sInitialOutfitGender = (*it).second;
-				}
-			}
-
-			options.clear();
-			if(LLUserAuth::getInstance()->getOptions("global-textures", options))
-			{
-				// Extract sun and moon texture IDs.  These are used
-				// in the LLVOSky constructor, but I can't figure out
-				// how to pass them in.  JC
-				LLUserAuth::response_t::iterator it;
-				LLUserAuth::response_t::iterator no_texture = options[0].end();
-				it = options[0].find("sun_texture_id");
-				if(it != no_texture)
-				{
-					gSunTextureID.set((*it).second);
-				}
-				it = options[0].find("moon_texture_id");
-				if(it != no_texture)
-				{
-					gMoonTextureID.set((*it).second);
-				}
-				it = options[0].find("cloud_texture_id");
-				if(it != no_texture)
-				{
-					gCloudTextureID.set((*it).second);
-				}
-			}
-
-
-			// JC: gesture loading done below, when we have an asset system
-			// in place.  Don't delete/clear user_credentials until then.
-
-			if(gAgentID.notNull()
-			   && gAgentSessionID.notNull()
-			   && gMessageSystem->mOurCircuitCode
-			   && first_sim.isOk()
-			   && gAgent.getInventoryRootID().notNull())
+		}
+		else if(LLLoginInstance::getInstance()->authSuccess())
+		{
+			if(process_login_success_response())
 			{
-				LLStartUp::setStartupState( STATE_WORLD_INIT );
+				// Pass the user information to the voice chat server interface.
+				gVoiceClient->userAuthorized(gFirstname, gLastname, gAgentID);
+				LLStartUp::setStartupState( STATE_WORLD_INIT);
 			}
 			else
 			{
-				if (gNoRender)
-				{
-					LL_WARNS("AppInit") << "Bad login - missing return values" << LL_ENDL;
-					LL_WARNS("AppInit") << emsg << LL_ENDL;
-					exit(0);
-				}
-				// Bounce back to the login screen.
-				LLSD args;
-				args["ERROR_MESSAGE"] = emsg.str();
-				LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
-				reset_login();
-				gSavedSettings.setBOOL("AutoLogin", FALSE);
-				show_connect_box = true;
+				transitionBackToLoginPanel = false;
 			}
-			
-			// Pass the user information to the voice chat server interface.
-			gVoiceClient->userAuthorized(firstname, lastname, gAgentID);
 		}
-		else // if(successful_login)
+		else
+		{
+			// Still waiting for response.
+			// *TODO:Mani - Actually check for login progress.
+			// If we get here we have gotten past the potential stall
+			// in curl, so take "may appear frozen" out of progress bar. JC
+			auth_desc = LLTrans::getString("LoginInProgressNoFrozen");
+			set_startup_status(progress, auth_desc, auth_message);
+		}
+
+		if(transitionBackToLoginPanel)
 		{
 			if (gNoRender)
 			{
@@ -1576,11 +1068,12 @@ bool idle_startup()
 				LL_WARNS("AppInit") << emsg << LL_ENDL;
 				exit(0);
 			}
+
 			// Bounce back to the login screen.
 			LLSD args;
 			args["ERROR_MESSAGE"] = emsg.str();
 			LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
-			reset_login();
+			reset_login(); // calls LLStartUp::setStartupState( STATE_LOGIN_SHOW );
 			gSavedSettings.setBOOL("AutoLogin", FALSE);
 			show_connect_box = true;
 		}
@@ -1622,6 +1115,7 @@ bool idle_startup()
 		LLWaterParamManager::initClass();
 
 		LLViewerObject::initVOClasses();
+		LLWearable::initClass();
 
 		// Initialize all our tools.  Must be done after saved settings loaded.
 		// NOTE: This also is where gToolMgr used to be instantiated before being turned into a singleton.
@@ -1643,14 +1137,14 @@ bool idle_startup()
 		// This is necessary because creating objects before this is set will result in a
 		// bad mPositionAgent cache.
 
-		gAgent.initOriginGlobal(from_region_handle(first_sim_handle));
+		gAgent.initOriginGlobal(from_region_handle(gFirstSimHandle));
 
-		LLWorld::getInstance()->addRegion(first_sim_handle, first_sim);
+		LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim);
 
-		LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(first_sim_handle);
+		LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(gFirstSimHandle);
 		LL_INFOS("AppInit") << "Adding initial simulator " << regionp->getOriginGlobal() << LL_ENDL;
 		
-		regionp->setSeedCapability(first_sim_seed_cap);
+		regionp->setSeedCapability(gFirstSimSeedCap);
 		LL_DEBUGS("AppInit") << "Waiting for seed grant ...." << LL_ENDL;
 		
 		// Set agent's initial region to be the one we just created.
@@ -1810,7 +1304,7 @@ bool idle_startup()
 		// the coordinates handed to us to fit in the local region.
 
 		gAgent.setPositionAgent(agent_start_position_region);
-		gAgent.resetAxes(agent_start_look_at);
+		gAgent.resetAxes(gAgentStartLookAt);
 		gAgent.stopCameraAnimation();
 		gAgent.resetCamera();
 
@@ -1849,18 +1343,18 @@ bool idle_startup()
 			LL_WARNS("AppInit") << "Attempting to connect to simulator with a zero circuit code!" << LL_ENDL;
 		}
 
-		gUseCircuitCallbackCalled = FALSE;
+		gUseCircuitCallbackCalled = false;
 
-		msg->enableCircuit(first_sim, TRUE);
+		msg->enableCircuit(gFirstSim, TRUE);
 		// now, use the circuit info to tell simulator about us!
-		LL_INFOS("AppInit") << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << LL_ENDL;
+		LL_INFOS("AppInit") << "viewer: UserLoginLocationReply() Enabling " << gFirstSim << " with code " << msg->mOurCircuitCode << LL_ENDL;
 		msg->newMessageFast(_PREHASH_UseCircuitCode);
 		msg->nextBlockFast(_PREHASH_CircuitCode);
 		msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode);
 		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
 		msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
 		msg->sendReliable(
-			first_sim,
+			gFirstSim,
 			MAX_TIMEOUT_COUNT,
 			FALSE,
 			TIMEOUT_SECONDS,
@@ -1971,77 +1465,76 @@ bool idle_startup()
 		LLAgentLanguage::update();
 
 		// unpack thin inventory
-		LLUserAuth::options_t options;
-		options.clear();
+		LLSD response = LLLoginInstance::getInstance()->getResponse();
 		//bool dump_buffer = false;
-		
-		if(LLUserAuth::getInstance()->getOptions("inventory-lib-root", options)
-			&& !options.empty())
+
+		LLSD inv_lib_root = response["inventory-lib-root"];
+		if(inv_lib_root.isDefined())
 		{
 			// should only be one
-			LLUserAuth::response_t::iterator it;
-			it = options[0].find("folder_id");
-			if(it != options[0].end())
+			LLSD id = inv_lib_root[0]["folder_id"];
+			if(id.isDefined())
 			{
-				gInventoryLibraryRoot.set((*it).second);
+				gInventoryLibraryRoot = id.asUUID();
 			}
 		}
- 		options.clear();
-		if(LLUserAuth::getInstance()->getOptions("inventory-lib-owner", options)
-			&& !options.empty())
+ 		
+		LLSD inv_lib_owner = response["inventory-lib-owner"];
+		if(inv_lib_owner.isDefined())
 		{
 			// should only be one
-			LLUserAuth::response_t::iterator it;
-			it = options[0].find("agent_id");
-			if(it != options[0].end())
+			LLSD id = inv_lib_owner[0]["agent_id"];
+			if(id.isDefined())
 			{
-				gInventoryLibraryOwner.set((*it).second);
+				gInventoryLibraryOwner = id.asUUID();
 			}
 		}
- 		options.clear();
- 		if(LLUserAuth::getInstance()->getOptions("inventory-skel-lib", options)
-			&& gInventoryLibraryOwner.notNull())
+
+		LLSD inv_skel_lib = response["inventory-skel-lib"];
+ 		if(inv_skel_lib.isDefined() && gInventoryLibraryOwner.notNull())
  		{
- 			if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner))
+ 			if(!gInventory.loadSkeleton(inv_skel_lib, gInventoryLibraryOwner))
  			{
  				LL_WARNS("AppInit") << "Problem loading inventory-skel-lib" << LL_ENDL;
  			}
  		}
- 		options.clear();
- 		if(LLUserAuth::getInstance()->getOptions("inventory-skeleton", options))
+
+		LLSD inv_skeleton = response["inventory-skeleton"];
+ 		if(inv_skeleton.isDefined())
  		{
- 			if(!gInventory.loadSkeleton(options, gAgent.getID()))
+ 			if(!gInventory.loadSkeleton(inv_skeleton, gAgent.getID()))
  			{
  				LL_WARNS("AppInit") << "Problem loading inventory-skel-targets" << LL_ENDL;
  			}
  		}
 
-		options.clear();
- 		if(LLUserAuth::getInstance()->getOptions("buddy-list", options))
+		LLSD buddy_list = response["buddy-list"];
+ 		if(buddy_list.isDefined())
  		{
-			LLUserAuth::options_t::iterator it = options.begin();
-			LLUserAuth::options_t::iterator end = options.end();
 			LLAvatarTracker::buddy_map_t list;
 			LLUUID agent_id;
 			S32 has_rights = 0, given_rights = 0;
-			for (; it != end; ++it)
+			for(LLSD::array_const_iterator it = buddy_list.beginArray(),
+				end = buddy_list.endArray(); it != end; ++it)
 			{
-				LLUserAuth::response_t::const_iterator option_it;
-				option_it = (*it).find("buddy_id");
-				if(option_it != (*it).end())
+				LLSD buddy_id = (*it)["buddy_id"];
+				if(buddy_id.isDefined())
 				{
-					agent_id.set((*option_it).second);
+					agent_id = buddy_id.asUUID();
 				}
-				option_it = (*it).find("buddy_rights_has");
-				if(option_it != (*it).end())
+
+				LLSD buddy_rights_has = (*it)["buddy_rights_has"];
+				if(buddy_rights_has.isDefined())
 				{
-					has_rights = atoi((*option_it).second.c_str());
+					has_rights = buddy_rights_has.asInteger();
 				}
-				option_it = (*it).find("buddy_rights_given");
-				if(option_it != (*it).end())
+
+				LLSD buddy_rights_given = (*it)["buddy_rights_given"];
+				if(buddy_rights_given.isDefined())
 				{
-					given_rights = atoi((*option_it).second.c_str());
+					given_rights = buddy_rights_given.asInteger();
 				}
+
 				list[agent_id] = new LLRelationship(given_rights, has_rights, false);
 			}
 			LLAvatarTracker::instance().addBuddyList(list);
@@ -2050,26 +1543,23 @@ bool idle_startup()
 		options.clear();
 
 		bool show_hud = false;
-		if(LLUserAuth::getInstance()->getOptions("tutorial_setting", options))
+		LLSD tutorial_setting = response["tutorial_setting"];
+		if(tutorial_setting.isDefined())
 		{
-			LLUserAuth::options_t::iterator it = options.begin();
-			LLUserAuth::options_t::iterator end = options.end();
-			for (; it != end; ++it)
+			for(LLSD::array_const_iterator it = tutorial_setting.beginArray(),
+				end = tutorial_setting.endArray(); it != end; ++it)
 			{
-				LLUserAuth::response_t::const_iterator option_it;
-				option_it = (*it).find("tutorial_url");
-				if(option_it != (*it).end())
+				LLSD tutorial_url = (*it)["tutorial_url"];
+				if(tutorial_url.isDefined())
 				{
 					// Tutorial floater will append language code
-					gSavedSettings.setString("TutorialURL", option_it->second);
+					gSavedSettings.setString("TutorialURL", tutorial_url.asString());
 				}
-				option_it = (*it).find("use_tutorial");
-				if(option_it != (*it).end())
+				
+				LLSD use_tutorial = (*it)["use_tutorial"];
+				if(use_tutorial.asString() == "true")
 				{
-					if (option_it->second == "true")
-					{
-						show_hud = true;
-					}
+					show_hud = true;
 				}
 			}
 		}
@@ -2082,19 +1572,22 @@ bool idle_startup()
 			LLFloaterHUD::showHUD();
 		}
 
-		options.clear();
-		if(LLUserAuth::getInstance()->getOptions("event_categories", options))
+		LLSD event_categories = response["event_categories"];
+		if(event_categories.isDefined())
 		{
-			LLEventInfo::loadCategories(options);
+			LLEventInfo::loadCategories(event_categories);
 		}
-		if(LLUserAuth::getInstance()->getOptions("event_notifications", options))
+
+		LLSD event_notifications = response["event_notifications"];
+		if(event_notifications.isDefined())
 		{
-			gEventNotifier.load(options);
+			gEventNotifier.load(event_notifications);
 		}
-		options.clear();
-		if(LLUserAuth::getInstance()->getOptions("classified_categories", options))
+
+		LLSD classified_categories = response["classified_categories"];
+		if(classified_categories.isDefined())
 		{
-			LLClassifiedInfo::loadCategories(options);
+			LLClassifiedInfo::loadCategories(classified_categories);
 		}
 
 
@@ -2151,7 +1644,7 @@ bool idle_startup()
 			// This is actually a pessimistic computation, because TCP may not have enough
 			// time to ramp up on the (small) default inventory file to truly measure max
 			// bandwidth. JC
-			F64 rate_bps = LLUserAuth::getInstance()->getLastTransferRateBPS();
+			F64 rate_bps = LLLoginInstance::getInstance()->getLastTransferRateBPS();
 			const F32 FAST_RATE_BPS = 600.f * 1024.f;
 			const F32 FASTER_RATE_BPS = 750.f * 1024.f;
 			F32 max_bandwidth = gViewerThrottle.getMaxBandwidth();
@@ -2198,34 +1691,20 @@ bool idle_startup()
 			// JC: Initialize "active" gestures.  This may also trigger
 			// many gesture downloads, if this is the user's first
 			// time on this machine or -purge has been run.
-			LLUserAuth::options_t gesture_options;
-			if (LLUserAuth::getInstance()->getOptions("gestures", gesture_options))
+			LLSD gesture_options 
+				= LLLoginInstance::getInstance()->getResponse("gestures");
+			if (gesture_options.isDefined())
 			{
 				LL_DEBUGS("AppInit") << "Gesture Manager loading " << gesture_options.size()
 					<< LL_ENDL;
 				std::vector<LLUUID> item_ids;
-				LLUserAuth::options_t::iterator resp_it;
-				for (resp_it = gesture_options.begin();
-					 resp_it != gesture_options.end();
-					 ++resp_it)
+				for(LLSD::array_const_iterator resp_it = gesture_options.beginArray(),
+					end = gesture_options.endArray(); resp_it != end; ++resp_it)
 				{
-					const LLUserAuth::response_t& response = *resp_it;
-					LLUUID item_id;
-					LLUUID asset_id;
-					LLUserAuth::response_t::const_iterator option_it;
-
-					option_it = response.find("item_id");
-					if (option_it != response.end())
-					{
-						const std::string& uuid_string = (*option_it).second;
-						item_id.set(uuid_string);
-					}
-					option_it = response.find("asset_id");
-					if (option_it != response.end())
-					{
-						const std::string& uuid_string = (*option_it).second;
-						asset_id.set(uuid_string);
-					}
+					// If the id is not specifed in the LLSD,
+					// the LLSD operator[]() will return a null LLUUID. 
+					LLUUID item_id = (*resp_it)["item_id"];
+					LLUUID asset_id = (*resp_it)["asset_id"];
 
 					if (item_id.notNull() && asset_id.notNull())
 					{
@@ -2281,8 +1760,8 @@ bool idle_startup()
 		if (!gAgent.isFirstLogin())
 		{
 			bool url_ok = LLURLSimString::sInstance.parse();
-			if ((url_ok && agent_start_location == "url") ||
-				(!url_ok && ((agent_start_location == gSavedSettings.getString("LoginLocation")))))
+			if ((url_ok && gAgentStartLocation == "url") ||
+				(!url_ok && ((gAgentStartLocation == gSavedSettings.getString("LoginLocation")))))
 			{
 				// Start location is OK
 				// Disabled code to restore camera location and focus if logging in to default location
@@ -2493,8 +1972,10 @@ bool idle_startup()
 		// then the data is cached for the viewer's lifetime)
 		LLProductInfoRequestManager::instance();
 		
+		// *FIX:Mani - What do I do here?
+		// Need we really clear the Auth response data?
 		// Clean up the userauth stuff.
-		LLUserAuth::getInstance()->reset();
+		// LLUserAuth::getInstance()->reset();
 
 		LLStartUp::setStartupState( STATE_STARTED );
 
@@ -2782,194 +2263,6 @@ bool login_alert_status(const LLSD& notification, const LLSD& response)
 	return false;
 }
 
-void update_app(BOOL mandatory, const std::string& auth_msg)
-{
-	// store off config state, as we might quit soon
-	gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);	
-	gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE);
-	std::ostringstream message;
-
-	std::string msg;
-	if (!auth_msg.empty())
-	{
-		msg = "("+ auth_msg + ") \n";
-	}
-
-	LLSD args;
-	args["MESSAGE"] = msg;
-	
-	LLSD payload;
-	payload["mandatory"] = mandatory;
-
-/*
- We're constructing one of the following 6 strings here:
-	 "DownloadWindowsMandatory"
-	 "DownloadWindowsReleaseForDownload"
-	 "DownloadWindows"
-	 "DownloadMacMandatory"
-	 "DownloadMacReleaseForDownload"
-	 "DownloadMac"
- 
- I've called them out explicitly in this comment so that they can be grepped for.
- 
- Also, we assume that if we're not Windows we're Mac. If we ever intend to support 
- Linux with autoupdate, this should be an explicit #elif LL_DARWIN, but 
- we'd rather deliver the wrong message than no message, so until Linux is supported
- we'll leave it alone.
- */
-	std::string notification_name = "Download";
-	
-#if LL_WINDOWS
-	notification_name += "Windows";
-#else
-	notification_name += "Mac";
-#endif
-	
-	if (mandatory)
-	{
-		notification_name += "Mandatory";
-	}
-	else
-	{
-#if LL_RELEASE_FOR_DOWNLOAD
-		notification_name += "ReleaseForDownload";
-#endif
-	}
-	
-	LLNotifications::instance().add(notification_name, args, payload, update_dialog_callback);
-	
-}
-
-bool update_dialog_callback(const LLSD& notification, const LLSD& response)
-{
-	S32 option = LLNotification::getSelectedOption(notification, response);
-	std::string update_exe_path;
-	bool mandatory = notification["payload"]["mandatory"].asBoolean();
-
-#if !LL_RELEASE_FOR_DOWNLOAD
-	if (option == 2)
-	{
-		LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); 
-		return false;
-	}
-#endif
-
-	if (option == 1)
-	{
-		// ...user doesn't want to do it
-		if (mandatory)
-		{
-			LLAppViewer::instance()->forceQuit();
-			// Bump them back to the login screen.
-			//reset_login();
-		}
-		else
-		{
-			LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
-		}
-		return false;
-	}
-	
-	LLSD query_map = LLSD::emptyMap();
-	// *TODO place os string in a global constant
-#if LL_WINDOWS  
-	query_map["os"] = "win";
-#elif LL_DARWIN
-	query_map["os"] = "mac";
-#elif LL_LINUX
-	query_map["os"] = "lnx";
-#elif LL_SOLARIS
-	query_map["os"] = "sol";
-#endif
-	// *TODO change userserver to be grid on both viewer and sim, since
-	// userserver no longer exists.
-	query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel();
-	query_map["channel"] = gSavedSettings.getString("VersionChannelName");
-	// *TODO constantize this guy
-	// *NOTE: This URL is also used in win_setup/lldownloader.cpp
-	LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map);
-	
-	if(LLAppViewer::sUpdaterInfo)
-	{
-		delete LLAppViewer::sUpdaterInfo ;
-	}
-	LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ;
-	
-#if LL_WINDOWS
-	LLAppViewer::sUpdaterInfo->mUpdateExePath = gDirUtilp->getTempFilename();
-	if (LLAppViewer::sUpdaterInfo->mUpdateExePath.empty())
-	{
-		delete LLAppViewer::sUpdaterInfo ;
-		LLAppViewer::sUpdaterInfo = NULL ;
-
-		// We're hosed, bail
-		LL_WARNS("AppInit") << "LLDir::getTempFilename() failed" << LL_ENDL;
-		LLAppViewer::instance()->forceQuit();
-		return false;
-	}
-
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += ".exe";
-
-	std::string updater_source = gDirUtilp->getAppRODataDir();
-	updater_source += gDirUtilp->getDirDelimiter();
-	updater_source += "updater.exe";
-
-	LL_DEBUGS("AppInit") << "Calling CopyFile source: " << updater_source
-			<< " dest: " << LLAppViewer::sUpdaterInfo->mUpdateExePath
-			<< LL_ENDL;
-
-
-	if (!CopyFileA(updater_source.c_str(), LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), FALSE))
-	{
-		delete LLAppViewer::sUpdaterInfo ;
-		LLAppViewer::sUpdaterInfo = NULL ;
-
-		LL_WARNS("AppInit") << "Unable to copy the updater!" << LL_ENDL;
-		LLAppViewer::instance()->forceQuit();
-		return false;
-	}
-
-	// if a sim name was passed in via command line parameter (typically through a SLURL)
-	if ( LLURLSimString::sInstance.mSimString.length() )
-	{
-		// record the location to start at next time
-		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
-	};
-
-	LLAppViewer::sUpdaterInfo->mParams << "-url \"" << update_url.asString() << "\"";
-
-	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << " " << LLAppViewer::sUpdaterInfo->mParams.str() << LL_ENDL;
-
-	//Explicitly remove the marker file, otherwise we pass the lock onto the child process and things get weird.
-	LLAppViewer::instance()->removeMarkerFile(); // In case updater fails
-	
-#elif LL_DARWIN
-	// if a sim name was passed in via command line parameter (typically through a SLURL)
-	if ( LLURLSimString::sInstance.mSimString.length() )
-	{
-		// record the location to start at next time
-		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
-	};
-	
-	LLAppViewer::sUpdaterInfo->mUpdateExePath = "'";
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += gDirUtilp->getAppRODataDir();
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += "/mac-updater.app/Contents/MacOS/mac-updater' -url \"";
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += update_url.asString();
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -name \"";
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += LLAppViewer::instance()->getSecondLifeTitle();
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" &";
-
-	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << LL_ENDL;
-
-	// Run the auto-updater.
-	system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
-
-#elif LL_LINUX || LL_SOLARIS
-	OSMessageBox(LLTrans::getString("MBNoAutoUpdate"), LLStringUtil::null, OSMB_OK);
-#endif
-	LLAppViewer::instance()->forceQuit();
-	return false;
-}
 
 void use_circuit_callback(void**, S32 result)
 {
@@ -3326,11 +2619,7 @@ std::string LLStartUp::startupStateToString(EStartupState state)
 		RTNENUM( STATE_LOGIN_SHOW );
 		RTNENUM( STATE_LOGIN_WAIT );
 		RTNENUM( STATE_LOGIN_CLEANUP );
-		RTNENUM( STATE_UPDATE_CHECK );
 		RTNENUM( STATE_LOGIN_AUTH_INIT );
-		RTNENUM( STATE_LOGIN_AUTHENTICATE );
-		RTNENUM( STATE_LOGIN_NO_DATA_YET );
-		RTNENUM( STATE_LOGIN_DOWNLOADING );
 		RTNENUM( STATE_LOGIN_PROCESS_RESPONSE );
 		RTNENUM( STATE_WORLD_INIT );
 		RTNENUM( STATE_SEED_GRANTED_WAIT );
@@ -3471,3 +2760,252 @@ void apply_udp_blacklist(const std::string& csv)
 	
 }
 
+bool process_login_success_response()
+{
+	LLSD response = LLLoginInstance::getInstance()->getResponse();
+
+	std::string text(response["udp_blacklist"]);
+	if(!text.empty())
+	{
+		apply_udp_blacklist(text);
+	}
+
+	// unpack login data needed by the application
+	text = response["agent_id"].asString();
+	if(!text.empty()) gAgentID.set(text);
+	gDebugInfo["AgentID"] = text;
+	
+	text = response["session_id"].asString();
+	if(!text.empty()) gAgentSessionID.set(text);
+	gDebugInfo["SessionID"] = text;
+	
+	text = response["secure_session_id"].asString();
+	if(!text.empty()) gAgent.mSecureSessionID.set(text);
+
+	text = response["first_name"].asString();
+	if(!text.empty()) 
+	{
+		// Remove quotes from string.  Login.cgi sends these to force
+		// names that look like numbers into strings.
+		gFirstname.assign(text);
+		LLStringUtil::replaceChar(gFirstname, '"', ' ');
+		LLStringUtil::trim(gFirstname);
+	}
+	text = response["last_name"].asString();
+	if(!text.empty()) 
+	{
+		gLastname.assign(text);
+	}
+	gSavedSettings.setString("FirstName", gFirstname);
+	gSavedSettings.setString("LastName", gLastname);
+
+	if (gSavedSettings.getBOOL("RememberPassword"))
+	{
+		// Successful login means the password is valid, so save it.
+		LLStartUp::savePasswordToDisk(gPassword);
+	}
+	else
+	{
+		// Don't leave password from previous session sitting around
+		// during this login session.
+		LLStartUp::deletePasswordFromDisk();
+	}
+
+	// this is their actual ability to access content
+	text = response["agent_access_max"].asString();
+	if (!text.empty())
+	{
+		// agent_access can be 'A', 'M', and 'PG'.
+		gAgent.setMaturity(text[0]);
+	}
+	
+	// this is the value of their preference setting for that content
+	// which will always be <= agent_access_max
+	text = response["agent_region_access"].asString();
+	if (!text.empty())
+	{
+		int preferredMaturity = LLAgent::convertTextToMaturity(text[0]);
+		gSavedSettings.setU32("PreferredMaturity", preferredMaturity);
+	}
+	// During the AO transition, this flag will be true. Then the flag will
+	// go away. After the AO transition, this code and all the code that
+	// uses it can be deleted.
+	text = response["ao_transition"].asString();
+	if (!text.empty())
+	{
+		if (text == "1")
+		{
+			gAgent.setAOTransition();
+		}
+	}
+
+	text = response["start_location"].asString();
+	if(!text.empty()) 
+	{
+		gAgentStartLocation.assign(text);
+	}
+
+	text = response["circuit_code"].asString();
+	if(!text.empty())
+	{
+		gMessageSystem->mOurCircuitCode = strtoul(text.c_str(), NULL, 10);
+	}
+	std::string sim_ip_str = response["sim_ip"];
+	std::string sim_port_str = response["sim_port"];
+	if(!sim_ip_str.empty() && !sim_port_str.empty())
+	{
+		U32 sim_port = strtoul(sim_port_str.c_str(), NULL, 10);
+		gFirstSim.set(sim_ip_str, sim_port);
+		if (gFirstSim.isOk())
+		{
+			gMessageSystem->enableCircuit(gFirstSim, TRUE);
+		}
+	}
+	std::string region_x_str = response["region_x"];
+	std::string region_y_str = response["region_y"];
+	if(!region_x_str.empty() && !region_y_str.empty())
+	{
+		U32 region_x = strtoul(region_x_str.c_str(), NULL, 10);
+		U32 region_y = strtoul(region_y_str.c_str(), NULL, 10);
+		gFirstSimHandle = to_region_handle(region_x, region_y);
+	}
+	
+	const std::string look_at_str = response["look_at"];
+	if (!look_at_str.empty())
+	{
+		size_t len = look_at_str.size();
+		LLMemoryStream mstr((U8*)look_at_str.c_str(), len);
+		LLSD sd = LLSDSerialize::fromNotation(mstr, len);
+		gAgentStartLookAt = ll_vector3_from_sd(sd);
+	}
+
+	text = response["seed_capability"].asString();
+	if (!text.empty()) gFirstSimSeedCap = text;
+				
+	text = response["seconds_since_epoch"].asString();
+	if(!text.empty())
+	{
+		U32 server_utc_time = strtoul(text.c_str(), NULL, 10);
+		if(server_utc_time)
+		{
+			time_t now = time(NULL);
+			gUTCOffset = (server_utc_time - now);
+		}
+	}
+
+	std::string home_location = response["home"];
+	if(!home_location.empty())
+	{
+		size_t len = home_location.size();
+		LLMemoryStream mstr((U8*)home_location.c_str(), len);
+		LLSD sd = LLSDSerialize::fromNotation(mstr, len);
+		S32 region_x = sd["region_handle"][0].asInteger();
+		S32 region_y = sd["region_handle"][1].asInteger();
+		U64 region_handle = to_region_handle(region_x, region_y);
+		LLVector3 position = ll_vector3_from_sd(sd["position"]);
+		gAgent.setHomePosRegion(region_handle, position);
+	}
+
+	gAgent.mMOTD.assign(response["message"]);
+
+	// Options...
+	// Each 'option' is an array of submaps. 
+	// It appears that we only ever use the first element of the array.
+	LLUUID inv_root_folder_id = response["inventory-root"][0]["folder_id"];
+	if(inv_root_folder_id.notNull())
+	{
+		gAgent.mInventoryRootID = inv_root_folder_id;
+		//gInventory.mock(gAgent.getInventoryRootID());
+	}
+
+	LLSD login_flags = response["login-flags"][0];
+	if(login_flags.size())
+	{
+		std::string flag = login_flags["ever_logged_in"];
+		if(!flag.empty())
+		{
+			gAgent.setFirstLogin((flag == "N") ? TRUE : FALSE);
+		}
+
+		/*  Flag is currently ignored by the viewer.
+		flag = login_flags["stipend_since_login"];
+		if(flag == "Y") 
+		{
+			stipend_since_login = true;
+		}
+		*/
+
+		flag = login_flags["gendered"].asString();
+		if(flag == "Y")
+		{
+			gAgent.setGenderChosen(TRUE);
+		}
+		
+		flag = login_flags["daylight_savings"].asString();
+		if(flag == "Y")
+		{
+			gPacificDaylightTime  = (flag == "Y") ? TRUE : FALSE;
+		}
+
+		//setup map of datetime strings to codes and slt & local time offset from utc
+		LLStringOps::setupDatetimeInfo (gPacificDaylightTime);
+	}
+
+	LLSD initial_outfit = response["initial-outfit"][0];
+	if(initial_outfit.size())
+	{
+		std::string flag = initial_outfit["folder_name"];
+		if(!flag.empty())
+		{
+			// Initial outfit is a folder in your inventory,
+			// must be an exact folder-name match.
+			sInitialOutfit = flag;
+		}
+
+		flag = initial_outfit["gender"].asString();
+		if(!flag.empty())
+		{
+			sInitialOutfitGender = flag;
+		}
+	}
+
+	LLSD global_textures = response["global-textures"][0];
+	if(global_textures.size())
+	{
+		// Extract sun and moon texture IDs.  These are used
+		// in the LLVOSky constructor, but I can't figure out
+		// how to pass them in.  JC
+		LLUUID id = global_textures["sun_texture_id"];
+		if(id.notNull())
+		{
+			gSunTextureID = id;
+		}
+
+		id = global_textures["moon_texture_id"];
+		if(id.notNull())
+		{
+			gMoonTextureID = id;
+		}
+
+		id = global_textures["cloud_texture_id"];
+		if(id.notNull())
+		{
+			gCloudTextureID = id;
+		}
+	}
+
+
+	bool success = false;
+	// JC: gesture loading done below, when we have an asset system
+	// in place.  Don't delete/clear user_credentials until then.
+	if(gAgentID.notNull()
+	   && gAgentSessionID.notNull()
+	   && gMessageSystem->mOurCircuitCode
+	   && gFirstSim.isOk()
+	   && gAgent.mInventoryRootID.notNull())
+	{
+		success = true;
+	}
+
+	return success;
+}
-- 
cgit v1.2.3


From fc9912070b847a7c4a45a94562bde23b5210b3cd Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Wed, 24 Jun 2009 18:19:23 -0700
Subject: two more llstartup.cpp merge issues.

---
 indra/newview/llstartup.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 0e5cb5905b..f0f056652a 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1115,7 +1115,6 @@ bool idle_startup()
 		LLWaterParamManager::initClass();
 
 		LLViewerObject::initVOClasses();
-		LLWearable::initClass();
 
 		// Initialize all our tools.  Must be done after saved settings loaded.
 		// NOTE: This also is where gToolMgr used to be instantiated before being turned into a singleton.
@@ -1540,8 +1539,6 @@ bool idle_startup()
 			LLAvatarTracker::instance().addBuddyList(list);
  		}
 
-		options.clear();
-
 		bool show_hud = false;
 		LLSD tutorial_setting = response["tutorial_setting"];
 		if(tutorial_setting.isDefined())
@@ -2914,7 +2911,7 @@ bool process_login_success_response()
 	LLUUID inv_root_folder_id = response["inventory-root"][0]["folder_id"];
 	if(inv_root_folder_id.notNull())
 	{
-		gAgent.mInventoryRootID = inv_root_folder_id;
+		gAgent.getInventoryRootID() = inv_root_folder_id;
 		//gInventory.mock(gAgent.getInventoryRootID());
 	}
 
@@ -3002,7 +2999,7 @@ bool process_login_success_response()
 	   && gAgentSessionID.notNull()
 	   && gMessageSystem->mOurCircuitCode
 	   && gFirstSim.isOk()
-	   && gAgent.mInventoryRootID.notNull())
+	   && gAgent.getInventoryRootID().notNull())
 	{
 		success = true;
 	}
-- 
cgit v1.2.3


From 0bfef92889b224bf8c57a591107a8d49167b09ea Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 24 Jun 2009 22:42:59 -0400
Subject: Mercurial build: minor tweaks to fix some Mac build errors

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

(limited to 'indra')

diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index f314de8cfe..1b669dbaf6 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1,4 +1,4 @@
-llvi/** 
+/** 
  * @file llviewerparcelmgr.cpp
  * @brief Viewer-side representation of owned land
  *
-- 
cgit v1.2.3


From c5368c63680af040b63185d5fb6926195de84d59 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 25 Jun 2009 09:49:24 -0400
Subject: Fix remaining Mac build errors

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

(limited to 'indra')

diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt
index e052d133cf..fb65779eb7 100644
--- a/indra/viewer_components/login/CMakeLists.txt
+++ b/indra/viewer_components/login/CMakeLists.txt
@@ -46,4 +46,11 @@ target_link_libraries(lllogin
 SET(lllogin_TEST_SOURCE_FILES
     lllogin.cpp
     )
+
+set_source_files_properties(
+  lllogin.cpp
+  PROPERTIES
+    LL_TEST_ADDITIONAL_LIBRARIES "${PTH_LIBRARIES}"
+  )
+
 LL_ADD_PROJECT_UNIT_TESTS(lllogin "${lllogin_TEST_SOURCE_FILES}")
-- 
cgit v1.2.3


From 6da0725c3b75c24855537df877672595de8e56e6 Mon Sep 17 00:00:00 2001
From: brad <brad@lindenlab.com>
Date: Fri, 26 Jun 2009 15:10:53 -0400
Subject: Moved LLAPRSockStream out of llcommon into eventhost module so I can
 reenable its tests in the new world order.

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

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index ecb6c283db..4ba74ab837 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -24,7 +24,6 @@ set(llcommon_SOURCE_FILES
     llallocator_heap_profile.cpp
     llapp.cpp
     llapr.cpp
-    llaprsockstream.cpp
     llassettype.cpp
     llbase32.cpp
     llbase64.cpp
@@ -102,7 +101,6 @@ set(llcommon_HEADER_FILES
     llagentconstants.h
     llapp.h
     llapr.h
-    llaprsockstream.h
     llassettype.h
     llassoclist.h
     llavatarconstants.h
-- 
cgit v1.2.3


From db7b4bb3f8905518b303e371d61fdc3aabd7b9be Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Mon, 29 Jun 2009 16:02:36 -0400
Subject: Fix for mismatched cmake if/endif pairs in llwindow/CMakeLists.txt

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

(limited to 'indra')

diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index b80080e458..beaf5c3488 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -64,7 +64,7 @@ if (NOT LINUX OR VIEWER)
       ${UI_LIBRARIES}     # for GTK
       ${SDL_LIBRARY}
       )
-endif (VIEWER)
+endif (NOT LINUX OR VIEWER)
 
 if (DARWIN)
   list(APPEND llwindow_SOURCE_FILES
@@ -96,7 +96,7 @@ if (LINUX AND VIEWER)
        llkeyboardsdl.h
        llwindowsdl.h
        )
-endif (LINUX)
+endif (LINUX AND VIEWER)
 
 if (WINDOWS)
   list(APPEND llwindow_SOURCE_FILES
-- 
cgit v1.2.3


From 726ac3ed0f70900edbeeacece866a21ff90534d4 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 30 Jun 2009 11:52:00 -0400
Subject: Fixes to let llcommon build as a .dylib.  It depends on PTH library.

---
 indra/llcommon/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 4ba74ab837..06a295b410 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -7,11 +7,13 @@ include(LLAddBuildTest)
 include(LLCommon)
 include(Linking)
 include(Boost)
+include (Pth)
 
 include_directories(
     ${EXPAT_INCLUDE_DIRS}
     ${LLCOMMON_INCLUDE_DIRS}
     ${ZLIB_INCLUDE_DIRS}
+    ${PTH_INCLUDE_DIRS}
     )
 
 # add_executable(lltreeiterators lltreeiterators.cpp)
@@ -245,6 +247,7 @@ target_link_libraries(
     ${WINDOWS_LIBRARIES}
     ${BOOST_PROGRAM_OPTIONS_LIBRARY}
     ${BOOST_REGEX_LIBRARY}
+    ${PTH_LIBRARIES}
     )
 
 include(LLAddBuildTest)
-- 
cgit v1.2.3


From a14a19e33ac2a28b640ebbad514e9829f999a5f3 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 30 Jun 2009 12:08:24 -0400
Subject: Added a new setSetting listener.

---
 indra/newview/llappviewerlistener.cpp | 13 +++++++++++++
 indra/newview/llappviewerlistener.h   |  1 +
 2 files changed, 14 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llappviewerlistener.cpp b/indra/newview/llappviewerlistener.cpp
index a8c98b17a7..befebae88e 100644
--- a/indra/newview/llappviewerlistener.cpp
+++ b/indra/newview/llappviewerlistener.cpp
@@ -18,6 +18,7 @@
 // external library headers
 // other Linden headers
 #include "llappviewer.h"
+#include "llviewercontrol.h"
 
 LLAppViewerListener::LLAppViewerListener(const std::string& pumpname, LLAppViewer* llappviewer):
     LLDispatchListener(pumpname, "op"),
@@ -25,9 +26,21 @@ LLAppViewerListener::LLAppViewerListener(const std::string& pumpname, LLAppViewe
 {
     // add() every method we want to be able to invoke via this event API.
     add("requestQuit", &LLAppViewerListener::requestQuit);
+    add("setSetting", &LLAppViewerListener::setSetting);
 }
 
 void LLAppViewerListener::requestQuit(const LLSD& event) const
 {
     mAppViewer->requestQuit();
 }
+
+void LLAppViewerListener::setSetting(const LLSD & event) const
+{
+	std::string control_name = event["name"].asString();
+	if (gSavedSettings.controlExists(control_name))
+	{
+		LLControlVariable* control = gSavedSettings.getControl(control_name);
+
+		control->set(event["value"]);
+	}
+}
diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h
index ab17dd1d90..ff63b69c13 100644
--- a/indra/newview/llappviewerlistener.h
+++ b/indra/newview/llappviewerlistener.h
@@ -27,6 +27,7 @@ public:
 
 private:
     void requestQuit(const LLSD& event) const;
+    void setSetting(const LLSD & event) const;
 
     LLAppViewer* mAppViewer;
 };
-- 
cgit v1.2.3


From df9a52cd2e7e43214343afe55c6af7e696afc92c Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 30 Jun 2009 12:08:43 -0400
Subject: Added loading of evenhost module to viewer.

---
 indra/newview/app_settings/settings.xml | 11 +++++++
 indra/newview/llappviewer.cpp           | 51 +++++++++++++++++++++++++++++++++
 indra/newview/llappviewer.h             |  2 ++
 3 files changed, 64 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index afa7f707f1..71878d02db 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5123,6 +5123,17 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
+    <key>QAModeEventHostPort</key>
+    <map>
+      <key>Comment</key>
+      <string>Enable Testing Features.</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>S32</string>
+      <key>Value</key>
+      <integer>-1</integer>
+    </map>
     <key>QuietSnapshotsToDisk</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f9e6db52c3..b61e75f60d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -93,6 +93,10 @@
 #   include <sys/file.h> // For initMarkerFile support
 #endif
 
+#include "llapr.h"
+#include "apr_dso.h"
+#include <boost/lexical_cast.hpp>
+
 #include "llnotify.h"
 #include "llviewerkeyboard.h"
 #include "lllfsthread.h"
@@ -860,6 +864,11 @@ bool LLAppViewer::init()
 
 	LLViewerJoystick::getInstance()->init(false);
 
+	if (gSavedSettings.getBOOL("QAMode") && gSavedSettings.getS32("QAModeEventHostPort") > 0)
+	{
+		loadEventHostModule(gSavedSettings.getS32("QAModeEventHostPort"));
+	}
+	
 	return true;
 }
 
@@ -4085,3 +4094,45 @@ void LLAppViewer::handleLoginComplete()
 	}
 	writeDebugInfo();
 }
+
+// *TODO - generalize this and move DSO wrangling to a helper class -brad
+void LLAppViewer::loadEventHostModule(S32 listen_port) const
+{
+	std::string dso_name("liblleventhost");
+
+#if LL_WINDOWS
+	dso_name += ".dll";
+#elif LL_DARWIN
+	dso_name += ".dylib";
+#else
+	dso_name += ".so";
+#endif
+
+	std::string dso_path = gDirUtilp->findFile(dso_name,
+		gDirUtilp->getAppRODataDir(),
+		gDirUtilp->getExecutableDir());
+
+	apr_dso_handle_t * eventhost_dso_handle = NULL;
+	apr_pool_t * eventhost_dso_memory_pool = NULL;
+
+	//attempt to load the shared library
+	apr_pool_create(&eventhost_dso_memory_pool, NULL);
+	apr_status_t rv = apr_dso_load(&eventhost_dso_handle,
+		dso_path.c_str(),
+		eventhost_dso_memory_pool);
+	ll_apr_assert_status(rv);
+	llassert_always(eventhost_dso_handle != NULL);
+
+	int (*ll_plugin_start_func)(char const * const *, char const * const *) = NULL;
+	rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_start_func, eventhost_dso_handle, "ll_plugin_start");
+
+	ll_apr_assert_status(rv);
+	llassert_always(ll_plugin_start_func != NULL);
+
+	std::string port_text = boost::lexical_cast<std::string>(listen_port);
+	std::vector<char const *> args;
+	args.push_back("-L");
+	args.push_back(port_text.c_str());
+
+	ll_plugin_start_func(&args[0], &args[0] + args.size());
+}
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 540c878543..1227ab470f 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -204,6 +204,8 @@ private:
     void sendLogoutRequest();
     void disconnectViewer();
 
+	void loadEventHostModule(S32 listen_port) const;
+	
 	// *FIX: the app viewer class should be some sort of singleton, no?
 	// Perhaps its child class is the singleton and this should be an abstract base.
 	static LLAppViewer* sInstance; 
-- 
cgit v1.2.3


From 7c1742ec7d626ff34084624729b338f9abc58686 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 30 Jun 2009 19:12:39 -0400
Subject: Added hack for fetching eventlet in place of svn:externals.

---
 indra/cmake/Externals.cmake            | 34 ++++++++++++++++++++++++++++++++++
 indra/cmake/FindSVN.cmake              | 34 ++++++++++++++++++++++++++++++++++
 indra/viewer_components/CMakeLists.txt |  7 +++++++
 3 files changed, 75 insertions(+)
 create mode 100644 indra/cmake/Externals.cmake
 create mode 100644 indra/cmake/FindSVN.cmake

(limited to 'indra')

diff --git a/indra/cmake/Externals.cmake b/indra/cmake/Externals.cmake
new file mode 100644
index 0000000000..26f3b56049
--- /dev/null
+++ b/indra/cmake/Externals.cmake
@@ -0,0 +1,34 @@
+# -*- cmake -*-
+
+include(Python)
+include(FindSVN)
+
+macro (use_svn_external _binary _path _url _rev)
+  if (NOT STANDALONE)
+    if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed)
+      if(SVN_FOUND)
+        if(DEBUG_EXTERNALS)
+          message("cd ${_path} && ${SVN_EXECUTABLE} checkout -r ${_rev} ${_url} ${_binary}")
+        endif(DEBUG_EXTERNALS)
+        execute_process(COMMAND ${SVN_EXECUTABLE}
+          checkout
+          -r ${_rev}
+          ${_url}
+          ${_binary}
+          WORKING_DIRECTORY ${_path}
+          RESULT_VARIABLE ${_binary}_installed
+          )
+      else(SVN_FOUND)
+        message(FATAL_ERROR "Failed to find SVN_EXECUTABLE")
+      endif(SVN_FOUND)
+      file(WRITE ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${${_binary}_installed}")
+    else(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed)
+      set(${_binary}_installed 0)
+    endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed)
+    if(NOT ${_binary}_installed EQUAL 0)
+      message(FATAL_ERROR
+              "Failed to download or unpack prebuilt '${_binary}'."
+              " Process returned ${${_binary}_installed}.")
+    endif (NOT ${_binary}_installed EQUAL 0)
+  endif (NOT STANDALONE)
+endmacro (use_svn_external _binary _path _url _rev)
diff --git a/indra/cmake/FindSVN.cmake b/indra/cmake/FindSVN.cmake
new file mode 100644
index 0000000000..3322be4ca9
--- /dev/null
+++ b/indra/cmake/FindSVN.cmake
@@ -0,0 +1,34 @@
+# -*- cmake -*-
+#
+# Find the svn executable for exporting old svn:externals.
+#
+# Input variables:
+#   SVN_FIND_REQUIRED - set this if configuration should fail without scp
+#
+# Output variables:
+#
+#   SVN_FOUND - set if svn was found
+#   SVN_EXECUTABLE - path to svn executable
+#   SVN_BATCH_FLAG - how to put svn into batch mode
+
+
+SET(SVN_EXECUTABLE)
+FIND_PROGRAM(SVN_EXECUTABLE NAMES svn svn.exe)
+
+IF (SVN_EXECUTABLE)
+  SET(SVN_FOUND ON)
+ELSE (SVN_EXECUTABLE)
+  SET(SVN_FOUND OFF)
+ENDIF (SVN_EXECUTABLE)
+
+IF (SVN_FOUND)
+  GET_FILENAME_COMPONENT(_svn_name ${SVN_EXECUTABLE} NAME_WE)
+  SET(SVN_BATCH_FLAG --non-interactive)
+ELSE (SVN_FOUND)
+  IF (SVN_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "Could not find svn executable")
+  ENDIF (SVN_FIND_REQUIRED)
+ENDIF (SVN_FOUND)
+
+MARK_AS_ADVANCED(SVN_EXECUTABLE SVN_FOUND SVN_BATCH_FLAG)
+
diff --git a/indra/viewer_components/CMakeLists.txt b/indra/viewer_components/CMakeLists.txt
index 60b459b78a..b3e07c527c 100644
--- a/indra/viewer_components/CMakeLists.txt
+++ b/indra/viewer_components/CMakeLists.txt
@@ -1,2 +1,9 @@
+# -*- cmake -*-
+
+include(Externals)
+
 add_subdirectory(login)
 add_subdirectory(eventhost)
+
+use_svn_external(eventlet ${CMAKE_CURRENT_SOURCE_DIR}/../lib/python/ http://svn.secondlife.com/svn/eventlet/trunk/eventlet 164)
+
-- 
cgit v1.2.3


From ca798b4fb243fbd85f71ea1b384181dd07ab6f66 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 1 Jul 2009 13:35:28 -0400
Subject: DEV-31980: provide a way to retrieve LLDispatchListener's tweaked
 LLEventPump name

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

(limited to 'indra')

diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h
index 4da0a01c69..ffc2f3eb00 100644
--- a/indra/llcommon/lleventdispatcher.h
+++ b/indra/llcommon/lleventdispatcher.h
@@ -114,6 +114,8 @@ class LLDispatchListener: public LLEventDispatcher
 public:
     LLDispatchListener(const std::string& pumpname, const std::string& key);
 
+    std::string getPumpName() const { return mPump.getName(); }
+
 private:
     bool process(const LLSD& event);
 
-- 
cgit v1.2.3


From dc93fe6cc68115dd280881c0896fa3f0e8d46f2c Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 1 Jul 2009 13:42:15 -0400
Subject: DEV-31980: Wrap LLViewerWindow::saveSnapshot() with an event API. Add
 LLViewerWindowListener per Incremental_Viewer_Automation/Event_API. Add
 LLViewerWindowListener pointer to LLViewerWindow, and initialize in ctor. Add
 llviewerwindowlistener.{h,cpp} to newview/CMakeLists.txt.

---
 indra/newview/CMakeLists.txt             |  2 +
 indra/newview/llviewerwindow.cpp         |  8 +++-
 indra/newview/llviewerwindow.h           |  4 ++
 indra/newview/llviewerwindowlistener.cpp | 78 ++++++++++++++++++++++++++++++++
 indra/newview/llviewerwindowlistener.h   | 34 ++++++++++++++
 5 files changed, 125 insertions(+), 1 deletion(-)
 create mode 100644 indra/newview/llviewerwindowlistener.cpp
 create mode 100644 indra/newview/llviewerwindowlistener.h

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 20c59faae0..53a59031ed 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -415,6 +415,7 @@ set(viewer_SOURCE_FILES
     llviewerthrottle.cpp
     llviewervisualparam.cpp
     llviewerwindow.cpp
+    llviewerwindowlistener.cpp
     llvlcomposition.cpp
     llvlmanager.cpp
     llvoavatar.cpp
@@ -835,6 +836,7 @@ set(viewer_HEADER_FILES
     llviewerthrottle.h
     llviewervisualparam.h
     llviewerwindow.h
+    llviewerwindowlistener.h
     llvlcomposition.h
     llvlmanager.h
     llvoavatar.h
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 5c9f8af216..dcd37d85da 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -30,6 +30,10 @@
  * $/LicenseInfo$
  */
 
+#if defined(LL_WINDOWS)
+#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
+#endif
+
 #include "llviewerprecompiledheaders.h"
 
 // system library includes
@@ -189,6 +193,7 @@
 #include "llfloaternotificationsconsole.h"
 
 #include "llnearbychathistory.h"
+#include "llviewerwindowlistener.h"
 
 #if LL_WINDOWS
 #include <tchar.h> // For Unicode conversion methods
@@ -1262,7 +1267,8 @@ LLViewerWindow::LLViewerWindow(
 	mResDirty(false),
 	mStatesDirty(false),
 	mIsFullscreenChecked(false),
-	mCurrResolutionIndex(0)
+	mCurrResolutionIndex(0),
+    mViewerWindowListener(new LLViewerWindowListener("LLViewerWindow", this))
 {
 	LLNotificationChannel::buildChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert"));
 	LLNotificationChannel::buildChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal"));
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index eae1bf0343..b729889631 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -50,6 +50,7 @@
 #include "llnotifications.h"
 #include "llmousehandler.h"
 #include "llcursortypes.h"
+#include <boost/scoped_ptr.hpp>
 
 class LLView;
 class LLViewerObject;
@@ -62,6 +63,7 @@ class LLImageRaw;
 class LLHUDIcon;
 class LLWindow;
 class LLRootView;
+class LLViewerWindowListener;
 
 #define PICK_HALF_WIDTH 5
 #define PICK_DIAMETER (2 * PICK_HALF_WIDTH + 1)
@@ -450,6 +452,8 @@ protected:
 	bool			mIsFullscreenChecked; // Did the user check the fullscreen checkbox in the display settings
 	U32			mCurrResolutionIndex;
 
+    boost::scoped_ptr<LLViewerWindowListener> mViewerWindowListener;
+
 protected:
 	static std::string sSnapshotBaseName;
 	static std::string sSnapshotDir;
diff --git a/indra/newview/llviewerwindowlistener.cpp b/indra/newview/llviewerwindowlistener.cpp
new file mode 100644
index 0000000000..ad90b1d2ab
--- /dev/null
+++ b/indra/newview/llviewerwindowlistener.cpp
@@ -0,0 +1,78 @@
+/**
+ * @file   llviewerwindowlistener.cpp
+ * @author Nat Goodspeed
+ * @date   2009-06-30
+ * @brief  Implementation for llviewerwindowlistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "llviewerprecompiledheaders.h"
+// associated header
+#include "llviewerwindowlistener.h"
+// STL headers
+#include <map>
+// std headers
+// external library headers
+// other Linden headers
+#include "llviewerwindow.h"
+
+LLViewerWindowListener::LLViewerWindowListener(const std::string& pumpname, LLViewerWindow* llviewerwindow):
+    LLDispatchListener(pumpname, "op"),
+    mViewerWindow(llviewerwindow)
+{
+    // add() every method we want to be able to invoke via this event API.
+    LLSD saveSnapshotArgs;
+    saveSnapshotArgs["filename"] = LLSD::String();
+    saveSnapshotArgs["reply"] = LLSD::String();
+    // The following are optional, so don't build them into required prototype.
+//  saveSnapshotArgs["width"] = LLSD::Integer();
+//  saveSnapshotArgs["height"] = LLSD::Integer();
+//  saveSnapshotArgs["showui"] = LLSD::Boolean();
+//  saveSnapshotArgs["rebuild"] = LLSD::Boolean();
+//  saveSnapshotArgs["type"] = LLSD::String();
+    add("saveSnapshot", &LLViewerWindowListener::saveSnapshot, saveSnapshotArgs);
+}
+
+void LLViewerWindowListener::saveSnapshot(const LLSD& event) const
+{
+    LLReqID reqid(event);
+    typedef std::map<LLSD::String, LLViewerWindow::ESnapshotType> TypeMap;
+    TypeMap types;
+#define tp(name) types[#name] = LLViewerWindow::SNAPSHOT_TYPE_##name
+    tp(COLOR);
+    tp(DEPTH);
+    tp(OBJECT_ID);
+#undef  tp
+    // Our add() call should ensure that the incoming LLSD does in fact
+    // contain our required arguments. Deal with the optional ones.
+    S32 width (mViewerWindow->getWindowDisplayWidth());
+    S32 height(mViewerWindow->getWindowDisplayHeight());
+    if (event.has("width"))
+        width = event["width"].asInteger();
+    if (event.has("height"))
+        height = event["height"].asInteger();
+    // showui defaults to true, requiring special treatment
+    bool showui = true;
+    if (event.has("showui"))
+        showui = event["showui"].asBoolean();
+    bool rebuild(event["rebuild"]); // defaults to false
+    LLViewerWindow::ESnapshotType type(LLViewerWindow::SNAPSHOT_TYPE_COLOR);
+    if (event.has("type"))
+    {
+        TypeMap::const_iterator found = types.find(event["type"]);
+        if (found == types.end())
+        {
+            LL_ERRS("LLViewerWindowListener") << "LLViewerWindowListener::saveSnapshot(): "
+                                              << "unrecognized type " << event["type"] << LL_ENDL;
+        }
+        type = found->second;
+    }
+    bool ok = mViewerWindow->saveSnapshot(event["filename"], width, height, showui, rebuild, type);
+    LLSD response(reqid.makeResponse());
+    response["ok"] = ok;
+    LLEventPumps::instance().obtain(event["reply"]).post(response);
+}
diff --git a/indra/newview/llviewerwindowlistener.h b/indra/newview/llviewerwindowlistener.h
new file mode 100644
index 0000000000..f756a5310f
--- /dev/null
+++ b/indra/newview/llviewerwindowlistener.h
@@ -0,0 +1,34 @@
+/**
+ * @file   llviewerwindowlistener.h
+ * @author Nat Goodspeed
+ * @date   2009-06-30
+ * @brief  Event API for subset of LLViewerWindow methods
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLVIEWERWINDOWLISTENER_H)
+#define LL_LLVIEWERWINDOWLISTENER_H
+
+#include "lleventdispatcher.h"
+
+class LLViewerWindow;
+class LLSD;
+
+/// Listen on an LLEventPump with specified name for LLViewerWindow request events.
+class LLViewerWindowListener: public LLDispatchListener
+{
+public:
+    /// Specify the pump name on which to listen, and bind the LLViewerWindow
+    /// instance to use (e.g. gViewerWindow).
+    LLViewerWindowListener(const std::string& pumpname, LLViewerWindow* llviewerwindow);
+
+private:
+    void saveSnapshot(const LLSD& event) const;
+
+    LLViewerWindow* mViewerWindow;
+};
+
+#endif /* ! defined(LL_LLVIEWERWINDOWLISTENER_H) */
-- 
cgit v1.2.3


From b082b5c9de83733f3d702a35ce60e6c0f61f7dc1 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 1 Jul 2009 18:47:48 -0400
Subject: Backed out setSetting listener: changeset 3c9127748425

---
 indra/newview/llappviewerlistener.cpp | 13 -------------
 indra/newview/llappviewerlistener.h   |  1 -
 2 files changed, 14 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewerlistener.cpp b/indra/newview/llappviewerlistener.cpp
index befebae88e..a8c98b17a7 100644
--- a/indra/newview/llappviewerlistener.cpp
+++ b/indra/newview/llappviewerlistener.cpp
@@ -18,7 +18,6 @@
 // external library headers
 // other Linden headers
 #include "llappviewer.h"
-#include "llviewercontrol.h"
 
 LLAppViewerListener::LLAppViewerListener(const std::string& pumpname, LLAppViewer* llappviewer):
     LLDispatchListener(pumpname, "op"),
@@ -26,21 +25,9 @@ LLAppViewerListener::LLAppViewerListener(const std::string& pumpname, LLAppViewe
 {
     // add() every method we want to be able to invoke via this event API.
     add("requestQuit", &LLAppViewerListener::requestQuit);
-    add("setSetting", &LLAppViewerListener::setSetting);
 }
 
 void LLAppViewerListener::requestQuit(const LLSD& event) const
 {
     mAppViewer->requestQuit();
 }
-
-void LLAppViewerListener::setSetting(const LLSD & event) const
-{
-	std::string control_name = event["name"].asString();
-	if (gSavedSettings.controlExists(control_name))
-	{
-		LLControlVariable* control = gSavedSettings.getControl(control_name);
-
-		control->set(event["value"]);
-	}
-}
diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h
index ff63b69c13..ab17dd1d90 100644
--- a/indra/newview/llappviewerlistener.h
+++ b/indra/newview/llappviewerlistener.h
@@ -27,7 +27,6 @@ public:
 
 private:
     void requestQuit(const LLSD& event) const;
-    void setSetting(const LLSD & event) const;
 
     LLAppViewer* mAppViewer;
 };
-- 
cgit v1.2.3


From f94d959e84cdcc552f6f5a39ee08a85c1e52d858 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 1 Jul 2009 19:02:42 -0400
Subject: Fixups for windows llcommon dll linkage errors that got dropped in
 the merge up to viewer-2.0.0-3

---
 indra/llcommon/llallocator.h       |  126 +-
 indra/llcommon/llapr.h             |  518 +++----
 indra/llcommon/llassettype.h       |  374 ++---
 indra/llcommon/llcoros.h           |  298 ++--
 indra/llcommon/lleventdispatcher.h |  248 +--
 indra/llcommon/llevents.h          | 1850 +++++++++++-----------
 indra/llcommon/llfasttimer.h       |  704 ++++-----
 indra/llcommon/llmemory.h          |  130 +-
 indra/llcommon/llmemtype.h         |  496 +++---
 indra/llcommon/llstacktrace.cpp    |  283 ++--
 indra/llcommon/llstacktrace.h      |   88 +-
 indra/llcommon/llstring.h          | 2946 ++++++++++++++++++------------------
 indra/newview/llfloaterabout.cpp   |  563 ++++---
 13 files changed, 4312 insertions(+), 4312 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llallocator.h b/indra/llcommon/llallocator.h
index 2b70fee0b8..0d6f18c5d4 100644
--- a/indra/llcommon/llallocator.h
+++ b/indra/llcommon/llallocator.h
@@ -1,63 +1,63 @@
-/** 
- * @file llallocator.h
- * @brief Declaration of the LLAllocator class.
- *
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * 
- * Copyright (c) 2009-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLALLOCATOR_H
-#define LL_LLALLOCATOR_H
-
-#include <string>
-
-#include "llmemtype.h"
-#include "llallocator_heap_profile.h"
-
-class LLAllocator {
-    friend class LLMemoryView;
-    friend class LLMemType;
-
-private:
-	static void pushMemType(S32 type);
-	static S32 popMemType();
-
-public:
-    void setProfilingEnabled(bool should_enable);
-
-    static bool isProfiling();
-
-    LLAllocatorHeapProfile const & getProfile();
-
-private:
-    std::string getRawProfile();
-
-private:
-    LLAllocatorHeapProfile mProf;
-};
-
-#endif // LL_LLALLOCATOR_H
+/** 
+ * @file llallocator.h
+ * @brief Declaration of the LLAllocator class.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLALLOCATOR_H
+#define LL_LLALLOCATOR_H
+
+#include <string>
+
+#include "llmemtype.h"
+#include "llallocator_heap_profile.h"
+
+class LL_COMMON_API LLAllocator {
+    friend class LLMemoryView;
+    friend class LLMemType;
+
+private:
+	static void pushMemType(S32 type);
+	static S32 popMemType();
+
+public:
+    void setProfilingEnabled(bool should_enable);
+
+    static bool isProfiling();
+
+    LLAllocatorHeapProfile const & getProfile();
+
+private:
+    std::string getRawProfile();
+
+private:
+    LLAllocatorHeapProfile mProf;
+};
+
+#endif // LL_LLALLOCATOR_H
diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index e13b3734f9..f968eabc18 100644
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -1,259 +1,259 @@
-/** 
- * @file llapr.h
- * @author Phoenix
- * @date 2004-11-28
- * @brief Helper functions for using the apache portable runtime library.
- *
- * $LicenseInfo:firstyear=2004&license=viewergpl$
- * 
- * Copyright (c) 2004-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLAPR_H
-#define LL_LLAPR_H
-
-#if LL_LINUX || LL_SOLARIS
-#include <sys/param.h>  // Need PATH_MAX in APR headers...
-#endif
-
-#include <boost/noncopyable.hpp>
-
-#include "apr_thread_proc.h"
-#include "apr_thread_mutex.h"
-#include "apr_getopt.h"
-#include "apr_signal.h"
-#include "apr_atomic.h"
-#include "llstring.h"
-
-extern LL_COMMON_API apr_thread_mutex_t* gLogMutexp;
-extern apr_thread_mutex_t* gCallStacksLogMutexp;
-
-/** 
- * @brief initialize the common apr constructs -- apr itself, the
- * global pool, and a mutex.
- */
-void LL_COMMON_API ll_init_apr();
-
-/** 
- * @brief Cleanup those common apr constructs.
- */
-void LL_COMMON_API ll_cleanup_apr();
-
-//
-//LL apr_pool
-//manage apr_pool_t, destroy allocated apr_pool in the destruction function.
-//
-class LL_COMMON_API LLAPRPool
-{
-public:
-	LLAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE) ;
-	~LLAPRPool() ;
-
-	apr_pool_t* getAPRPool() ;
-	apr_status_t getStatus() {return mStatus ; }
-
-protected:
-	void releaseAPRPool() ;
-	void createAPRPool() ;
-
-protected:
-	apr_pool_t*  mPool ;              //pointing to an apr_pool
-	apr_pool_t*  mParent ;			  //parent pool
-	apr_size_t   mMaxSize ;           //max size of mPool, mPool should return memory to system if allocated memory beyond this limit. However it seems not to work.
-	apr_status_t mStatus ;            //status when creating the pool
-	BOOL         mReleasePoolFlag ;   //if set, mPool is destroyed when LLAPRPool is deleted. default value is true.
-};
-
-//
-//volatile LL apr_pool
-//which clears memory automatically.
-//so it can not hold static data or data after memory is cleared
-//
-class LL_COMMON_API LLVolatileAPRPool : public LLAPRPool
-{
-public:
-	LLVolatileAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE);
-	~LLVolatileAPRPool(){}
-
-	apr_pool_t* getVolatileAPRPool() ;
-	
-	void        clearVolatileAPRPool() ;
-
-	BOOL        isFull() ;
-	BOOL        isEmpty() {return !mNumActiveRef ;}
-private:
-	S32 mNumActiveRef ; //number of active pointers pointing to the apr_pool.
-	S32 mNumTotalRef ;  //number of total pointers pointing to the apr_pool since last creating.   
-} ;
-
-/** 
- * @class LLScopedLock
- * @brief Small class to help lock and unlock mutexes.
- *
- * This class is used to have a stack level lock once you already have
- * an apr mutex handy. The constructor handles the lock, and the
- * destructor handles the unlock. Instances of this class are
- * <b>not</b> thread safe.
- */
-class LL_COMMON_API LLScopedLock : private boost::noncopyable
-{
-public:
-	/**
-	 * @brief Constructor which accepts a mutex, and locks it.
-	 *
-	 * @param mutex An allocated APR mutex. If you pass in NULL,
-	 * this wrapper will not lock.
-	 */
-	LLScopedLock(apr_thread_mutex_t* mutex);
-
-	/**
-	 * @brief Destructor which unlocks the mutex if still locked.
-	 */
-	~LLScopedLock();
-
-	/** 
-	 * @brief Check lock.
-	 */
-	bool isLocked() const { return mLocked; }
-
-	/** 
-	 * @brief This method unlocks the mutex.
-	 */
-	void unlock();
-
-protected:
-	bool mLocked;
-	apr_thread_mutex_t* mMutex;
-};
-
-template <typename Type> class LL_COMMON_API LLAtomic32
-{
-public:
-	LLAtomic32<Type>() {};
-	LLAtomic32<Type>(Type x) {apr_atomic_set32(&mData, apr_uint32_t(x)); };
-	~LLAtomic32<Type>() {};
-
-	operator const Type() { apr_uint32_t data = apr_atomic_read32(&mData); return Type(data); }
-	Type operator =(const Type& x) { apr_atomic_set32(&mData, apr_uint32_t(x)); return Type(mData); }
-	void operator -=(Type x) { apr_atomic_sub32(&mData, apr_uint32_t(x)); }
-	void operator +=(Type x) { apr_atomic_add32(&mData, apr_uint32_t(x)); }
-	Type operator ++(int) { return apr_atomic_inc32(&mData); } // Type++
-	Type operator --(int) { return apr_atomic_dec32(&mData); } // Type--
-	
-private:
-	apr_uint32_t mData;
-};
-
-typedef LLAtomic32<U32> LLAtomicU32;
-typedef LLAtomic32<S32> LLAtomicS32;
-
-// File IO convenience functions.
-// Returns NULL if the file fails to openm sets *sizep to file size of not NULL
-// abbreviated flags
-#define LL_APR_R (APR_READ) // "r"
-#define LL_APR_W (APR_CREATE|APR_TRUNCATE|APR_WRITE) // "w"
-#define LL_APR_RB (APR_READ|APR_BINARY) // "rb"
-#define LL_APR_WB (APR_CREATE|APR_TRUNCATE|APR_WRITE|APR_BINARY) // "wb"
-#define LL_APR_RPB (APR_READ|APR_WRITE|APR_BINARY) // "r+b"
-#define LL_APR_WPB (APR_CREATE|APR_TRUNCATE|APR_READ|APR_WRITE|APR_BINARY) // "w+b"
-
-//
-//apr_file manager
-//which: 1)only keeps one file open;
-//       2)closes the open file in the destruction function
-//       3)informs the apr_pool to clean the memory when the file is closed.
-//Note: please close an open file at the earliest convenience. 
-//      especially do not put some time-costly operations between open() and close().
-//      otherwise it might lock the APRFilePool.
-//there are two different apr_pools the APRFile can use:
-//      1, a temperary pool passed to an APRFile function, which is used within this function and only once.
-//      2, a global pool.
-//
-class LL_COMMON_API LLAPRFile
-{
-private:
-	apr_file_t* mFile ;
-	LLVolatileAPRPool *mCurrentFilePoolp ; //currently in use apr_pool, could be one of them: sAPRFilePoolp, or a temp pool. 
-
-public:
-	LLAPRFile() ;
-	~LLAPRFile() ;
-
-	apr_status_t open(LLVolatileAPRPool* pool, const std::string& filename, apr_int32_t flags, S32* sizep = NULL);
-	apr_status_t open(const std::string& filename, apr_int32_t flags, apr_pool_t* pool = NULL, S32* sizep = NULL);
-	apr_status_t close() ;
-
-	// Returns actual offset, -1 if seek fails
-	S32 seek(apr_seek_where_t where, S32 offset);
-	apr_status_t eof() { return apr_file_eof(mFile);}
-
-	// Returns bytes read/written, 0 if read/write fails:
-	S32 read(void* buf, S32 nbytes);
-	S32 write(const void* buf, S32 nbytes);
-	
-	apr_file_t* getFileHandle() {return mFile;}	
-
-private:
-	apr_pool_t* getAPRFilePool(apr_pool_t* pool) ;
-
-//
-//*******************************************************************************************************************************
-//static components
-//
-public:
-	static LLVolatileAPRPool *sAPRFilePoolp ; //a global apr_pool for APRFile, which is used only when local pool does not exist.
-
-private:
-	static apr_file_t* open(const std::string& filename, LLVolatileAPRPool* pool, apr_int32_t flags);
-	static apr_status_t close(apr_file_t* file, LLVolatileAPRPool* pool) ;
-	static S32 seek(apr_file_t* file, apr_seek_where_t where, S32 offset);
-public:
-	// returns false if failure:
-	static bool remove(const std::string& filename, LLVolatileAPRPool* pool = NULL);
-	static bool rename(const std::string& filename, const std::string& newname, LLVolatileAPRPool* pool = NULL);
-	static bool isExist(const std::string& filename, LLVolatileAPRPool* pool = NULL, apr_int32_t flags = APR_READ);
-	static S32 size(const std::string& filename, LLVolatileAPRPool* pool = NULL);
-	static bool makeDir(const std::string& dirname, LLVolatileAPRPool* pool = NULL);
-	static bool removeDir(const std::string& dirname, LLVolatileAPRPool* pool = NULL);
-
-	// Returns bytes read/written, 0 if read/write fails:
-	static S32 readEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool = NULL);	
-	static S32 writeEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool = NULL);	
-//*******************************************************************************************************************************
-};
-
-/**
- * @brief Function which approprately logs error or remains quiet on
- * APR_SUCCESS.
- * @return Returns <code>true</code> if status is an error condition.
- */
-bool LL_COMMON_API ll_apr_warn_status(apr_status_t status);
-
-void LL_COMMON_API ll_apr_assert_status(apr_status_t status);
-
-extern "C" LL_COMMON_API apr_pool_t* gAPRPoolp; // Global APR memory pool
-
-#endif // LL_LLAPR_H
+/** 
+ * @file llapr.h
+ * @author Phoenix
+ * @date 2004-11-28
+ * @brief Helper functions for using the apache portable runtime library.
+ *
+ * $LicenseInfo:firstyear=2004&license=viewergpl$
+ * 
+ * Copyright (c) 2004-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLAPR_H
+#define LL_LLAPR_H
+
+#if LL_LINUX || LL_SOLARIS
+#include <sys/param.h>  // Need PATH_MAX in APR headers...
+#endif
+
+#include <boost/noncopyable.hpp>
+
+#include "apr_thread_proc.h"
+#include "apr_thread_mutex.h"
+#include "apr_getopt.h"
+#include "apr_signal.h"
+#include "apr_atomic.h"
+#include "llstring.h"
+
+extern LL_COMMON_API apr_thread_mutex_t* gLogMutexp;
+extern apr_thread_mutex_t* gCallStacksLogMutexp;
+
+/** 
+ * @brief initialize the common apr constructs -- apr itself, the
+ * global pool, and a mutex.
+ */
+void LL_COMMON_API ll_init_apr();
+
+/** 
+ * @brief Cleanup those common apr constructs.
+ */
+void LL_COMMON_API ll_cleanup_apr();
+
+//
+//LL apr_pool
+//manage apr_pool_t, destroy allocated apr_pool in the destruction function.
+//
+class LL_COMMON_API LLAPRPool
+{
+public:
+	LLAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE) ;
+	~LLAPRPool() ;
+
+	apr_pool_t* getAPRPool() ;
+	apr_status_t getStatus() {return mStatus ; }
+
+protected:
+	void releaseAPRPool() ;
+	void createAPRPool() ;
+
+protected:
+	apr_pool_t*  mPool ;              //pointing to an apr_pool
+	apr_pool_t*  mParent ;			  //parent pool
+	apr_size_t   mMaxSize ;           //max size of mPool, mPool should return memory to system if allocated memory beyond this limit. However it seems not to work.
+	apr_status_t mStatus ;            //status when creating the pool
+	BOOL         mReleasePoolFlag ;   //if set, mPool is destroyed when LLAPRPool is deleted. default value is true.
+};
+
+//
+//volatile LL apr_pool
+//which clears memory automatically.
+//so it can not hold static data or data after memory is cleared
+//
+class LL_COMMON_API LLVolatileAPRPool : public LLAPRPool
+{
+public:
+	LLVolatileAPRPool(apr_pool_t *parent = NULL, apr_size_t size = 0, BOOL releasePoolFlag = TRUE);
+	~LLVolatileAPRPool(){}
+
+	apr_pool_t* getVolatileAPRPool() ;
+	
+	void        clearVolatileAPRPool() ;
+
+	BOOL        isFull() ;
+	BOOL        isEmpty() {return !mNumActiveRef ;}
+private:
+	S32 mNumActiveRef ; //number of active pointers pointing to the apr_pool.
+	S32 mNumTotalRef ;  //number of total pointers pointing to the apr_pool since last creating.   
+} ;
+
+/** 
+ * @class LLScopedLock
+ * @brief Small class to help lock and unlock mutexes.
+ *
+ * This class is used to have a stack level lock once you already have
+ * an apr mutex handy. The constructor handles the lock, and the
+ * destructor handles the unlock. Instances of this class are
+ * <b>not</b> thread safe.
+ */
+class LL_COMMON_API LLScopedLock : private boost::noncopyable
+{
+public:
+	/**
+	 * @brief Constructor which accepts a mutex, and locks it.
+	 *
+	 * @param mutex An allocated APR mutex. If you pass in NULL,
+	 * this wrapper will not lock.
+	 */
+	LLScopedLock(apr_thread_mutex_t* mutex);
+
+	/**
+	 * @brief Destructor which unlocks the mutex if still locked.
+	 */
+	~LLScopedLock();
+
+	/** 
+	 * @brief Check lock.
+	 */
+	bool isLocked() const { return mLocked; }
+
+	/** 
+	 * @brief This method unlocks the mutex.
+	 */
+	void unlock();
+
+protected:
+	bool mLocked;
+	apr_thread_mutex_t* mMutex;
+};
+
+template <typename Type> class LLAtomic32
+{
+public:
+	LLAtomic32<Type>() {};
+	LLAtomic32<Type>(Type x) {apr_atomic_set32(&mData, apr_uint32_t(x)); };
+	~LLAtomic32<Type>() {};
+
+	operator const Type() { apr_uint32_t data = apr_atomic_read32(&mData); return Type(data); }
+	Type operator =(const Type& x) { apr_atomic_set32(&mData, apr_uint32_t(x)); return Type(mData); }
+	void operator -=(Type x) { apr_atomic_sub32(&mData, apr_uint32_t(x)); }
+	void operator +=(Type x) { apr_atomic_add32(&mData, apr_uint32_t(x)); }
+	Type operator ++(int) { return apr_atomic_inc32(&mData); } // Type++
+	Type operator --(int) { return apr_atomic_dec32(&mData); } // Type--
+	
+private:
+	apr_uint32_t mData;
+};
+
+typedef LL_COMMON_API LLAtomic32<U32> LLAtomicU32;
+typedef LL_COMMON_API LLAtomic32<S32> LLAtomicS32;
+
+// File IO convenience functions.
+// Returns NULL if the file fails to openm sets *sizep to file size of not NULL
+// abbreviated flags
+#define LL_APR_R (APR_READ) // "r"
+#define LL_APR_W (APR_CREATE|APR_TRUNCATE|APR_WRITE) // "w"
+#define LL_APR_RB (APR_READ|APR_BINARY) // "rb"
+#define LL_APR_WB (APR_CREATE|APR_TRUNCATE|APR_WRITE|APR_BINARY) // "wb"
+#define LL_APR_RPB (APR_READ|APR_WRITE|APR_BINARY) // "r+b"
+#define LL_APR_WPB (APR_CREATE|APR_TRUNCATE|APR_READ|APR_WRITE|APR_BINARY) // "w+b"
+
+//
+//apr_file manager
+//which: 1)only keeps one file open;
+//       2)closes the open file in the destruction function
+//       3)informs the apr_pool to clean the memory when the file is closed.
+//Note: please close an open file at the earliest convenience. 
+//      especially do not put some time-costly operations between open() and close().
+//      otherwise it might lock the APRFilePool.
+//there are two different apr_pools the APRFile can use:
+//      1, a temperary pool passed to an APRFile function, which is used within this function and only once.
+//      2, a global pool.
+//
+class LL_COMMON_API LLAPRFile
+{
+private:
+	apr_file_t* mFile ;
+	LLVolatileAPRPool *mCurrentFilePoolp ; //currently in use apr_pool, could be one of them: sAPRFilePoolp, or a temp pool. 
+
+public:
+	LLAPRFile() ;
+	~LLAPRFile() ;
+
+	apr_status_t open(LLVolatileAPRPool* pool, const std::string& filename, apr_int32_t flags, S32* sizep = NULL);
+	apr_status_t open(const std::string& filename, apr_int32_t flags, apr_pool_t* pool = NULL, S32* sizep = NULL);
+	apr_status_t close() ;
+
+	// Returns actual offset, -1 if seek fails
+	S32 seek(apr_seek_where_t where, S32 offset);
+	apr_status_t eof() { return apr_file_eof(mFile);}
+
+	// Returns bytes read/written, 0 if read/write fails:
+	S32 read(void* buf, S32 nbytes);
+	S32 write(const void* buf, S32 nbytes);
+	
+	apr_file_t* getFileHandle() {return mFile;}	
+
+private:
+	apr_pool_t* getAPRFilePool(apr_pool_t* pool) ;
+
+//
+//*******************************************************************************************************************************
+//static components
+//
+public:
+	static LLVolatileAPRPool *sAPRFilePoolp ; //a global apr_pool for APRFile, which is used only when local pool does not exist.
+
+private:
+	static apr_file_t* open(const std::string& filename, LLVolatileAPRPool* pool, apr_int32_t flags);
+	static apr_status_t close(apr_file_t* file, LLVolatileAPRPool* pool) ;
+	static S32 seek(apr_file_t* file, apr_seek_where_t where, S32 offset);
+public:
+	// returns false if failure:
+	static bool remove(const std::string& filename, LLVolatileAPRPool* pool = NULL);
+	static bool rename(const std::string& filename, const std::string& newname, LLVolatileAPRPool* pool = NULL);
+	static bool isExist(const std::string& filename, LLVolatileAPRPool* pool = NULL, apr_int32_t flags = APR_READ);
+	static S32 size(const std::string& filename, LLVolatileAPRPool* pool = NULL);
+	static bool makeDir(const std::string& dirname, LLVolatileAPRPool* pool = NULL);
+	static bool removeDir(const std::string& dirname, LLVolatileAPRPool* pool = NULL);
+
+	// Returns bytes read/written, 0 if read/write fails:
+	static S32 readEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool = NULL);	
+	static S32 writeEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool = NULL);	
+//*******************************************************************************************************************************
+};
+
+/**
+ * @brief Function which approprately logs error or remains quiet on
+ * APR_SUCCESS.
+ * @return Returns <code>true</code> if status is an error condition.
+ */
+bool LL_COMMON_API ll_apr_warn_status(apr_status_t status);
+
+void LL_COMMON_API ll_apr_assert_status(apr_status_t status);
+
+extern "C" LL_COMMON_API apr_pool_t* gAPRPoolp; // Global APR memory pool
+
+#endif // LL_LLAPR_H
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index 353bd57bb9..8d524f1e28 100644
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -1,187 +1,187 @@
-/** 
- * @file llassettype.h
- * @brief Declaration of LLAssetType.
- *
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- * 
- * Copyright (c) 2001-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLASSETTYPE_H
-#define LL_LLASSETTYPE_H
-
-#include <string>
-
-#include "stdenums.h" 	// for EDragAndDropType
-
-class LLAssetType
-{
-public:
-	enum EType
-	{
-		AT_TEXTURE = 0,
-			// Used for painting the faces of geometry.
-			// Stored in typical j2c stream format.
-
-		AT_SOUND = 1, 
-			// Used to fill the aural spectrum.
-
-		AT_CALLINGCARD = 2,
-		    // Links instant message access to the user on the card.
-			// : E.G. A card for yourself, for linden support, for
-			// : the guy you were talking to in the coliseum.
-
-		AT_LANDMARK = 3,
-			// Links to places in the world with location and a screen shot or image saved.
-			// : E.G. Home, linden headquarters, the coliseum, destinations where 
-			// : we want to increase traffic.
-
-		AT_SCRIPT = 4,
-			// Valid scripts that can be attached to an object.
-			// : E.G. Open a door, jump into the air.
-
-		AT_CLOTHING = 5,
-			// A collection of textures and parameters that can be worn by an avatar.
-
-		AT_OBJECT = 6,
-			// Any combination of textures, sounds, and scripts that are
-			// associated with a fixed piece of geometry.
-			// : E.G. A hot tub, a house with working door.
-
-		AT_NOTECARD = 7,
-			// Just text.
-
-		AT_CATEGORY = 8,
-			// Holds a collection of inventory items.
-			// It's treated as an item in the inventory and therefore needs a type.
-
-		AT_ROOT_CATEGORY = 9,
-			// A user's root inventory category.
-			// We decided to expose it visually, so it seems logical to fold
-			// it into the asset types.
-
-		AT_LSL_TEXT = 10,
-		AT_LSL_BYTECODE = 11,
-			// The LSL is the scripting language. 
-			// We've split it into a text and bytecode representation.
-		
-		AT_TEXTURE_TGA = 12,
-			// Uncompressed TGA texture.
-
-		AT_BODYPART = 13,
-			// A collection of textures and parameters that can be worn by an avatar.
-
-		AT_TRASH = 14,
-			// Only to be used as a marker for a category preferred type. 
-			// Using this, we can throw things in the trash before completely deleting.
-
-		AT_SNAPSHOT_CATEGORY = 15,
-			// A marker for a folder meant for snapshots. 
-			// No actual assets will be snapshots, though if there were, you
-			// could interpret them as textures.
-
-		AT_LOST_AND_FOUND = 16,
-			// Used to stuff lost&found items into.
-
-		AT_SOUND_WAV = 17,
-			// Uncompressed sound.
-
-		AT_IMAGE_TGA = 18,
-			// Uncompressed image, non-square.
-			// Not appropriate for use as a texture.
-
-		AT_IMAGE_JPEG = 19,
-			// Compressed image, non-square.
-			// Not appropriate for use as a texture.
-
-		AT_ANIMATION = 20,
-			// Animation.
-
-		AT_GESTURE = 21,
-			// Gesture, sequence of animations, sounds, chat, wait steps.
-
-		AT_SIMSTATE = 22,
-			// Simstate file.
-	
-		AT_FAVORITE = 23,
-			// favorite items
-
-		AT_LINK = 24,
-			// Inventory symbolic link
-
-		AT_LINK_FOLDER = 25,
-			// Inventory folder link
-
-		AT_COUNT = 26,
-
-			// +************************************************+
-			// |  TO ADD AN ELEMENT TO THIS ENUM:               |
-			// +************************************************+
-			// | 1. INSERT BEFORE AT_COUNT                      |
-			// | 2. INCREMENT AT_COUNT BY 1                     |
-			// | 3. ADD TO LLAssetDictionary in llassettype.cpp |
-			// +************************************************+
-
-		AT_NONE = -1
-	};
-
-	// machine transation between type and strings
-	static EType lookup(const char* name); // safe conversion to std::string, *TODO: deprecate
-	static EType 				lookup(const std::string& type_name);
-	static const char*			lookup(EType asset_type);
-
-	// translation from a type to a human readable form.
-	static EType 				lookupHumanReadable(const char* desc_name); // safe conversion to std::string, *TODO: deprecate
-	static EType 				lookupHumanReadable(const std::string& readable_name);
-	static const char*			lookupHumanReadable(EType asset_type);
-
-	static const char*  		lookupCategoryName(EType asset_type);
-
-	// Generate a good default description. You may want to add a verb
-	// or agent name after this depending on your application.
-	static void 				generateDescriptionFor(LLAssetType::EType asset_type,
-													   std::string& description);
-
-	static EType 				getType(const std::string& desc_name);
-	static const std::string&	getDesc(EType asset_type);
-	static EDragAndDropType   	lookupDragAndDropType(EType asset_type);
-	static bool 				lookupCanLink(EType asset_type);
-	static bool 				lookupIsLinkType(EType asset_type);
-
-	/* TODO: Change return types from "const char *" to "const std::string &".
-	This is fairly straightforward, but requires changing some calls to use .c_str().
-	e.g.:
-	-	fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType));
-	+	fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType).c_str());
-	*/
-	
-private:
-	// don't instantiate or derive one of these objects
-	LLAssetType() {}
-	~LLAssetType() {}
-};
-
-#endif // LL_LLASSETTYPE_H
+/** 
+ * @file llassettype.h
+ * @brief Declaration of LLAssetType.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLASSETTYPE_H
+#define LL_LLASSETTYPE_H
+
+#include <string>
+
+#include "stdenums.h" 	// for EDragAndDropType
+
+class LL_COMMON_API LLAssetType
+{
+public:
+	enum EType
+	{
+		AT_TEXTURE = 0,
+			// Used for painting the faces of geometry.
+			// Stored in typical j2c stream format.
+
+		AT_SOUND = 1, 
+			// Used to fill the aural spectrum.
+
+		AT_CALLINGCARD = 2,
+		    // Links instant message access to the user on the card.
+			// : E.G. A card for yourself, for linden support, for
+			// : the guy you were talking to in the coliseum.
+
+		AT_LANDMARK = 3,
+			// Links to places in the world with location and a screen shot or image saved.
+			// : E.G. Home, linden headquarters, the coliseum, destinations where 
+			// : we want to increase traffic.
+
+		AT_SCRIPT = 4,
+			// Valid scripts that can be attached to an object.
+			// : E.G. Open a door, jump into the air.
+
+		AT_CLOTHING = 5,
+			// A collection of textures and parameters that can be worn by an avatar.
+
+		AT_OBJECT = 6,
+			// Any combination of textures, sounds, and scripts that are
+			// associated with a fixed piece of geometry.
+			// : E.G. A hot tub, a house with working door.
+
+		AT_NOTECARD = 7,
+			// Just text.
+
+		AT_CATEGORY = 8,
+			// Holds a collection of inventory items.
+			// It's treated as an item in the inventory and therefore needs a type.
+
+		AT_ROOT_CATEGORY = 9,
+			// A user's root inventory category.
+			// We decided to expose it visually, so it seems logical to fold
+			// it into the asset types.
+
+		AT_LSL_TEXT = 10,
+		AT_LSL_BYTECODE = 11,
+			// The LSL is the scripting language. 
+			// We've split it into a text and bytecode representation.
+		
+		AT_TEXTURE_TGA = 12,
+			// Uncompressed TGA texture.
+
+		AT_BODYPART = 13,
+			// A collection of textures and parameters that can be worn by an avatar.
+
+		AT_TRASH = 14,
+			// Only to be used as a marker for a category preferred type. 
+			// Using this, we can throw things in the trash before completely deleting.
+
+		AT_SNAPSHOT_CATEGORY = 15,
+			// A marker for a folder meant for snapshots. 
+			// No actual assets will be snapshots, though if there were, you
+			// could interpret them as textures.
+
+		AT_LOST_AND_FOUND = 16,
+			// Used to stuff lost&found items into.
+
+		AT_SOUND_WAV = 17,
+			// Uncompressed sound.
+
+		AT_IMAGE_TGA = 18,
+			// Uncompressed image, non-square.
+			// Not appropriate for use as a texture.
+
+		AT_IMAGE_JPEG = 19,
+			// Compressed image, non-square.
+			// Not appropriate for use as a texture.
+
+		AT_ANIMATION = 20,
+			// Animation.
+
+		AT_GESTURE = 21,
+			// Gesture, sequence of animations, sounds, chat, wait steps.
+
+		AT_SIMSTATE = 22,
+			// Simstate file.
+	
+		AT_FAVORITE = 23,
+			// favorite items
+
+		AT_LINK = 24,
+			// Inventory symbolic link
+
+		AT_LINK_FOLDER = 25,
+			// Inventory folder link
+
+		AT_COUNT = 26,
+
+			// +************************************************+
+			// |  TO ADD AN ELEMENT TO THIS ENUM:               |
+			// +************************************************+
+			// | 1. INSERT BEFORE AT_COUNT                      |
+			// | 2. INCREMENT AT_COUNT BY 1                     |
+			// | 3. ADD TO LLAssetDictionary in llassettype.cpp |
+			// +************************************************+
+
+		AT_NONE = -1
+	};
+
+	// machine transation between type and strings
+	static EType lookup(const char* name); // safe conversion to std::string, *TODO: deprecate
+	static EType 				lookup(const std::string& type_name);
+	static const char*			lookup(EType asset_type);
+
+	// translation from a type to a human readable form.
+	static EType 				lookupHumanReadable(const char* desc_name); // safe conversion to std::string, *TODO: deprecate
+	static EType 				lookupHumanReadable(const std::string& readable_name);
+	static const char*			lookupHumanReadable(EType asset_type);
+
+	static const char*  		lookupCategoryName(EType asset_type);
+
+	// Generate a good default description. You may want to add a verb
+	// or agent name after this depending on your application.
+	static void 				generateDescriptionFor(LLAssetType::EType asset_type,
+													   std::string& description);
+
+	static EType 				getType(const std::string& desc_name);
+	static const std::string&	getDesc(EType asset_type);
+	static EDragAndDropType   	lookupDragAndDropType(EType asset_type);
+	static bool 				lookupCanLink(EType asset_type);
+	static bool 				lookupIsLinkType(EType asset_type);
+
+	/* TODO: Change return types from "const char *" to "const std::string &".
+	This is fairly straightforward, but requires changing some calls to use .c_str().
+	e.g.:
+	-	fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType));
+	+	fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType).c_str());
+	*/
+	
+private:
+	// don't instantiate or derive one of these objects
+	LLAssetType() {}
+	~LLAssetType() {}
+};
+
+#endif // LL_LLASSETTYPE_H
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h
index 6b07ba4105..6c5fa5af6d 100644
--- a/indra/llcommon/llcoros.h
+++ b/indra/llcommon/llcoros.h
@@ -1,149 +1,149 @@
-/**
- * @file   llcoros.h
- * @author Nat Goodspeed
- * @date   2009-06-02
- * @brief  Manage running boost::coroutine instances
- * 
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
- * $/LicenseInfo$
- */
-
-#if ! defined(LL_LLCOROS_H)
-#define LL_LLCOROS_H
-
-#include <boost/coroutine/coroutine.hpp>
-#include "llsingleton.h"
-#include <boost/ptr_container/ptr_map.hpp>
-#include <string>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/iteration/local.hpp>
-#include <stdexcept>
-
-/**
- * Registry of named Boost.Coroutine instances
- *
- * The Boost.Coroutine library supports the general case of a coroutine
- * accepting arbitrary parameters and yielding multiple (sets of) results. For
- * such use cases, it's natural for the invoking code to retain the coroutine
- * instance: the consumer repeatedly calls into the coroutine, perhaps passing
- * new parameter values, prompting it to yield its next result.
- *
- * Our typical coroutine usage is different, though. For us, coroutines
- * provide an alternative to the @c Responder pattern. Our typical coroutine
- * has @c void return, invoked in fire-and-forget mode: the handler for some
- * user gesture launches the coroutine and promptly returns to the main loop.
- * The coroutine initiates some action that will take multiple frames (e.g. a
- * capability request), waits for its result, processes it and silently steals
- * away.
- *
- * This usage poses two (related) problems:
- *
- * # Who should own the coroutine instance? If it's simply local to the
- *   handler code that launches it, return from the handler will destroy the
- *   coroutine object, terminating the coroutine.
- * # Once the coroutine terminates, in whatever way, who's responsible for
- *   cleaning up the coroutine object?
- *
- * LLCoros is a Singleton collection of currently-active coroutine instances.
- * Each has a name. You ask LLCoros to launch a new coroutine with a suggested
- * name prefix; from your prefix it generates a distinct name, registers the
- * new coroutine and returns the actual name.
- *
- * The name can be used to kill off the coroutine prematurely, if needed. It
- * can also provide diagnostic info: we can look up the name of the
- * currently-running coroutine.
- *
- * Finally, the next frame ("mainloop" event) after the coroutine terminates,
- * LLCoros will notice its demise and destroy it.
- */
-class LLCoros: public LLSingleton<LLCoros>
-{
-public:
-    /// Canonical boost::coroutines::coroutine signature we use
-    typedef boost::coroutines::coroutine<void()> coro;
-    /// Canonical 'self' type
-    typedef coro::self self;
-
-    /**
-     * Create and start running a new coroutine with specified name. The name
-     * string you pass is a suggestion; it will be tweaked for uniqueness. The
-     * actual name is returned to you.
-     *
-     * Usage looks like this, for (e.g.) two coroutine parameters:
-     * @code
-     * class MyClass
-     * {
-     * public:
-     *     ...
-     *     // Do NOT NOT NOT accept reference params other than 'self'!
-     *     // Pass by value only!
-     *     void myCoroutineMethod(LLCoros::self& self, std::string, LLSD);
-     *     ...
-     * };
-     * ...
-     * std::string name = LLCoros::instance().launch(
-     *    "mycoro", boost::bind(&MyClass::myCoroutineMethod, this, _1,
-     *                          "somestring", LLSD(17));
-     * @endcode
-     *
-     * Your function/method must accept LLCoros::self& as its first parameter.
-     * It can accept any other parameters you want -- but ONLY BY VALUE!
-     * Other reference parameters are a BAD IDEA! You Have Been Warned. See
-     * DEV-32777 comments for an explanation.
-     *
-     * Pass a callable that accepts the single LLCoros::self& parameter. It
-     * may work to pass a free function whose only parameter is 'self'; for
-     * all other cases use boost::bind(). Of course, for a non-static class
-     * method, the first parameter must be the class instance. Use the
-     * placeholder _1 for the 'self' parameter. Any other parameters should be
-     * passed via the bind() expression.
-     *
-     * launch() tweaks the suggested name so it won't collide with any
-     * existing coroutine instance, creates the coroutine instance, registers
-     * it with the tweaked name and runs it until its first wait. At that
-     * point it returns the tweaked name.
-     */
-    template <typename CALLABLE>
-    std::string launch(const std::string& prefix, const CALLABLE& callable)
-    {
-        return launchImpl(prefix, new coro(callable));
-    }
-
-    /**
-     * Abort a running coroutine by name. Normally, when a coroutine either
-     * runs to completion or terminates with an exception, LLCoros quietly
-     * cleans it up. This is for use only when you must explicitly interrupt
-     * one prematurely. Returns @c true if the specified name was found and
-     * still running at the time.
-     */
-    bool kill(const std::string& name);
-
-    /**
-     * From within a coroutine, pass its @c self object to look up the
-     * (tweaked) name string by which this coroutine is registered. Returns
-     * the empty string if not found (e.g. if the coroutine was launched by
-     * hand rather than using LLCoros::launch()).
-     */
-    template <typename COROUTINE_SELF>
-    std::string getName(const COROUTINE_SELF& self) const
-    {
-        return getNameByID(self.get_id());
-    }
-
-    /// getName() by self.get_id()
-    std::string getNameByID(const void* self_id) const;
-
-private:
-    friend class LLSingleton<LLCoros>;
-    LLCoros();
-    std::string launchImpl(const std::string& prefix, coro* newCoro);
-    std::string generateDistinctName(const std::string& prefix) const;
-    bool cleanup(const LLSD&);
-
-    typedef boost::ptr_map<std::string, coro> CoroMap;
-    CoroMap mCoros;
-};
-
-#endif /* ! defined(LL_LLCOROS_H) */
+/**
+ * @file   llcoros.h
+ * @author Nat Goodspeed
+ * @date   2009-06-02
+ * @brief  Manage running boost::coroutine instances
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLCOROS_H)
+#define LL_LLCOROS_H
+
+#include <boost/coroutine/coroutine.hpp>
+#include "llsingleton.h"
+#include <boost/ptr_container/ptr_map.hpp>
+#include <string>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/iteration/local.hpp>
+#include <stdexcept>
+
+/**
+ * Registry of named Boost.Coroutine instances
+ *
+ * The Boost.Coroutine library supports the general case of a coroutine
+ * accepting arbitrary parameters and yielding multiple (sets of) results. For
+ * such use cases, it's natural for the invoking code to retain the coroutine
+ * instance: the consumer repeatedly calls into the coroutine, perhaps passing
+ * new parameter values, prompting it to yield its next result.
+ *
+ * Our typical coroutine usage is different, though. For us, coroutines
+ * provide an alternative to the @c Responder pattern. Our typical coroutine
+ * has @c void return, invoked in fire-and-forget mode: the handler for some
+ * user gesture launches the coroutine and promptly returns to the main loop.
+ * The coroutine initiates some action that will take multiple frames (e.g. a
+ * capability request), waits for its result, processes it and silently steals
+ * away.
+ *
+ * This usage poses two (related) problems:
+ *
+ * # Who should own the coroutine instance? If it's simply local to the
+ *   handler code that launches it, return from the handler will destroy the
+ *   coroutine object, terminating the coroutine.
+ * # Once the coroutine terminates, in whatever way, who's responsible for
+ *   cleaning up the coroutine object?
+ *
+ * LLCoros is a Singleton collection of currently-active coroutine instances.
+ * Each has a name. You ask LLCoros to launch a new coroutine with a suggested
+ * name prefix; from your prefix it generates a distinct name, registers the
+ * new coroutine and returns the actual name.
+ *
+ * The name can be used to kill off the coroutine prematurely, if needed. It
+ * can also provide diagnostic info: we can look up the name of the
+ * currently-running coroutine.
+ *
+ * Finally, the next frame ("mainloop" event) after the coroutine terminates,
+ * LLCoros will notice its demise and destroy it.
+ */
+class LL_COMMON_API LLCoros: public LLSingleton<LLCoros>
+{
+public:
+    /// Canonical boost::coroutines::coroutine signature we use
+    typedef boost::coroutines::coroutine<void()> coro;
+    /// Canonical 'self' type
+    typedef coro::self self;
+
+    /**
+     * Create and start running a new coroutine with specified name. The name
+     * string you pass is a suggestion; it will be tweaked for uniqueness. The
+     * actual name is returned to you.
+     *
+     * Usage looks like this, for (e.g.) two coroutine parameters:
+     * @code
+     * class MyClass
+     * {
+     * public:
+     *     ...
+     *     // Do NOT NOT NOT accept reference params other than 'self'!
+     *     // Pass by value only!
+     *     void myCoroutineMethod(LLCoros::self& self, std::string, LLSD);
+     *     ...
+     * };
+     * ...
+     * std::string name = LLCoros::instance().launch(
+     *    "mycoro", boost::bind(&MyClass::myCoroutineMethod, this, _1,
+     *                          "somestring", LLSD(17));
+     * @endcode
+     *
+     * Your function/method must accept LLCoros::self& as its first parameter.
+     * It can accept any other parameters you want -- but ONLY BY VALUE!
+     * Other reference parameters are a BAD IDEA! You Have Been Warned. See
+     * DEV-32777 comments for an explanation.
+     *
+     * Pass a callable that accepts the single LLCoros::self& parameter. It
+     * may work to pass a free function whose only parameter is 'self'; for
+     * all other cases use boost::bind(). Of course, for a non-static class
+     * method, the first parameter must be the class instance. Use the
+     * placeholder _1 for the 'self' parameter. Any other parameters should be
+     * passed via the bind() expression.
+     *
+     * launch() tweaks the suggested name so it won't collide with any
+     * existing coroutine instance, creates the coroutine instance, registers
+     * it with the tweaked name and runs it until its first wait. At that
+     * point it returns the tweaked name.
+     */
+    template <typename CALLABLE>
+    std::string launch(const std::string& prefix, const CALLABLE& callable)
+    {
+        return launchImpl(prefix, new coro(callable));
+    }
+
+    /**
+     * Abort a running coroutine by name. Normally, when a coroutine either
+     * runs to completion or terminates with an exception, LLCoros quietly
+     * cleans it up. This is for use only when you must explicitly interrupt
+     * one prematurely. Returns @c true if the specified name was found and
+     * still running at the time.
+     */
+    bool kill(const std::string& name);
+
+    /**
+     * From within a coroutine, pass its @c self object to look up the
+     * (tweaked) name string by which this coroutine is registered. Returns
+     * the empty string if not found (e.g. if the coroutine was launched by
+     * hand rather than using LLCoros::launch()).
+     */
+    template <typename COROUTINE_SELF>
+    std::string getName(const COROUTINE_SELF& self) const
+    {
+        return getNameByID(self.get_id());
+    }
+
+    /// getName() by self.get_id()
+    std::string getNameByID(const void* self_id) const;
+
+private:
+    friend class LLSingleton<LLCoros>;
+    LLCoros();
+    std::string launchImpl(const std::string& prefix, coro* newCoro);
+    std::string generateDistinctName(const std::string& prefix) const;
+    bool cleanup(const LLSD&);
+
+    typedef boost::ptr_map<std::string, coro> CoroMap;
+    CoroMap mCoros;
+};
+
+#endif /* ! defined(LL_LLCOROS_H) */
diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h
index 4da0a01c69..155fe0648f 100644
--- a/indra/llcommon/lleventdispatcher.h
+++ b/indra/llcommon/lleventdispatcher.h
@@ -1,124 +1,124 @@
-/**
- * @file   lleventdispatcher.h
- * @author Nat Goodspeed
- * @date   2009-06-18
- * @brief  Central mechanism for dispatching events by string name. This is
- *         useful when you have a single LLEventPump listener on which you can
- *         request different operations, vs. instantiating a different
- *         LLEventPump for each such operation.
- * 
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
- * $/LicenseInfo$
- */
-
-#if ! defined(LL_LLEVENTDISPATCHER_H)
-#define LL_LLEVENTDISPATCHER_H
-
-#include <string>
-#include <map>
-#include <boost/function.hpp>
-#include <boost/bind.hpp>
-#include <typeinfo>
-#include "llevents.h"
-
-class LLSD;
-
-/**
- * Given an LLSD map, examine a string-valued key and call a corresponding
- * callable. This class is designed to be contained by an LLEventPump
- * listener class that will register some of its own methods, though any
- * callable can be used.
- */
-class LLEventDispatcher
-{
-public:
-    LLEventDispatcher(const std::string& desc, const std::string& key);
-    virtual ~LLEventDispatcher();
-
-    /// Accept any C++ callable, typically a boost::bind() expression
-    typedef boost::function<void(const LLSD&)> Callable;
-
-    /**
-     * Register a @a callable by @a name. The optional @a required parameter
-     * is used to validate the structure of each incoming event (see
-     * llsd_matches()).
-     */
-    void add(const std::string& name, const Callable& callable, const LLSD& required=LLSD());
-
-    /**
-     * Special case: a subclass of this class can pass an unbound member
-     * function pointer without explicitly specifying the
-     * <tt>boost::bind()</tt> expression.
-     */
-    template <class CLASS>
-    void add(const std::string& name, void (CLASS::*method)(const LLSD&),
-             const LLSD& required=LLSD())
-    {
-        addMethod<CLASS>(name, method, required);
-    }
-
-    /// Overload for both const and non-const methods
-    template <class CLASS>
-    void add(const std::string& name, void (CLASS::*method)(const LLSD&) const,
-             const LLSD& required=LLSD())
-    {
-        addMethod<CLASS>(name, method, required);
-    }
-
-    /// Unregister a callable
-    bool remove(const std::string& name);
-
-    /// Call a registered callable with an explicitly-specified name. If no
-    /// such callable exists, die with LL_ERRS. If the @a event fails to match
-    /// the @a required prototype specified at add() time, die with LL_ERRS.
-    void operator()(const std::string& name, const LLSD& event) const;
-
-    /// Extract the @a key value from the incoming @a event, and call the
-    /// callable whose name is specified by that map @a key. If no such
-    /// callable exists, die with LL_ERRS. If the @a event fails to match the
-    /// @a required prototype specified at add() time, die with LL_ERRS.
-    void operator()(const LLSD& event) const;
-
-private:
-    template <class CLASS, typename METHOD>
-    void addMethod(const std::string& name, const METHOD& method, const LLSD& required)
-    {
-        CLASS* downcast = dynamic_cast<CLASS*>(this);
-        if (! downcast)
-        {
-            addFail(name, typeid(CLASS).name());
-        }
-        else
-        {
-            add(name, boost::bind(method, downcast, _1), required);
-        }
-    }
-    void addFail(const std::string& name, const std::string& classname) const;
-    /// try to dispatch, return @c true if success
-    bool attemptCall(const std::string& name, const LLSD& event) const;
-
-    std::string mDesc, mKey;
-    typedef std::map<std::string, std::pair<Callable, LLSD> > DispatchMap;
-    DispatchMap mDispatch;
-};
-
-/**
- * Bundle an LLEventPump and a listener with an LLEventDispatcher. A class
- * that contains (or derives from) LLDispatchListener need only specify the
- * LLEventPump name and dispatch key, and add() its methods. Incoming events
- * will automatically be dispatched.
- */
-class LLDispatchListener: public LLEventDispatcher
-{
-public:
-    LLDispatchListener(const std::string& pumpname, const std::string& key);
-
-private:
-    bool process(const LLSD& event);
-
-    LLEventStream mPump;
-    LLTempBoundListener mBoundListener;
-};
-
-#endif /* ! defined(LL_LLEVENTDISPATCHER_H) */
+/**
+ * @file   lleventdispatcher.h
+ * @author Nat Goodspeed
+ * @date   2009-06-18
+ * @brief  Central mechanism for dispatching events by string name. This is
+ *         useful when you have a single LLEventPump listener on which you can
+ *         request different operations, vs. instantiating a different
+ *         LLEventPump for each such operation.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLEVENTDISPATCHER_H)
+#define LL_LLEVENTDISPATCHER_H
+
+#include <string>
+#include <map>
+#include <boost/function.hpp>
+#include <boost/bind.hpp>
+#include <typeinfo>
+#include "llevents.h"
+
+class LLSD;
+
+/**
+ * Given an LLSD map, examine a string-valued key and call a corresponding
+ * callable. This class is designed to be contained by an LLEventPump
+ * listener class that will register some of its own methods, though any
+ * callable can be used.
+ */
+class LL_COMMON_API LLEventDispatcher
+{
+public:
+    LLEventDispatcher(const std::string& desc, const std::string& key);
+    virtual ~LLEventDispatcher();
+
+    /// Accept any C++ callable, typically a boost::bind() expression
+    typedef boost::function<void(const LLSD&)> Callable;
+
+    /**
+     * Register a @a callable by @a name. The optional @a required parameter
+     * is used to validate the structure of each incoming event (see
+     * llsd_matches()).
+     */
+    void add(const std::string& name, const Callable& callable, const LLSD& required=LLSD());
+
+    /**
+     * Special case: a subclass of this class can pass an unbound member
+     * function pointer without explicitly specifying the
+     * <tt>boost::bind()</tt> expression.
+     */
+    template <class CLASS>
+    void add(const std::string& name, void (CLASS::*method)(const LLSD&),
+             const LLSD& required=LLSD())
+    {
+        addMethod<CLASS>(name, method, required);
+    }
+
+    /// Overload for both const and non-const methods
+    template <class CLASS>
+    void add(const std::string& name, void (CLASS::*method)(const LLSD&) const,
+             const LLSD& required=LLSD())
+    {
+        addMethod<CLASS>(name, method, required);
+    }
+
+    /// Unregister a callable
+    bool remove(const std::string& name);
+
+    /// Call a registered callable with an explicitly-specified name. If no
+    /// such callable exists, die with LL_ERRS. If the @a event fails to match
+    /// the @a required prototype specified at add() time, die with LL_ERRS.
+    void operator()(const std::string& name, const LLSD& event) const;
+
+    /// Extract the @a key value from the incoming @a event, and call the
+    /// callable whose name is specified by that map @a key. If no such
+    /// callable exists, die with LL_ERRS. If the @a event fails to match the
+    /// @a required prototype specified at add() time, die with LL_ERRS.
+    void operator()(const LLSD& event) const;
+
+private:
+    template <class CLASS, typename METHOD>
+    void addMethod(const std::string& name, const METHOD& method, const LLSD& required)
+    {
+        CLASS* downcast = dynamic_cast<CLASS*>(this);
+        if (! downcast)
+        {
+            addFail(name, typeid(CLASS).name());
+        }
+        else
+        {
+            add(name, boost::bind(method, downcast, _1), required);
+        }
+    }
+    void addFail(const std::string& name, const std::string& classname) const;
+    /// try to dispatch, return @c true if success
+    bool attemptCall(const std::string& name, const LLSD& event) const;
+
+    std::string mDesc, mKey;
+    typedef std::map<std::string, std::pair<Callable, LLSD> > DispatchMap;
+    DispatchMap mDispatch;
+};
+
+/**
+ * Bundle an LLEventPump and a listener with an LLEventDispatcher. A class
+ * that contains (or derives from) LLDispatchListener need only specify the
+ * LLEventPump name and dispatch key, and add() its methods. Incoming events
+ * will automatically be dispatched.
+ */
+class LL_COMMON_API LLDispatchListener: public LLEventDispatcher
+{
+public:
+    LLDispatchListener(const std::string& pumpname, const std::string& key);
+
+private:
+    bool process(const LLSD& event);
+
+    LLEventStream mPump;
+    LLTempBoundListener mBoundListener;
+};
+
+#endif /* ! defined(LL_LLEVENTDISPATCHER_H) */
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index c5a27ab68e..8ebffc008f 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -1,925 +1,925 @@
-/**
- * @file   llevents.h
- * @author Kent Quirk, Nat Goodspeed
- * @date   2008-09-11
- * @brief  This is an implementation of the event system described at
- *         https://wiki.lindenlab.com/wiki/Viewer:Messaging/Event_System,
- *         originally introduced in llnotifications.h. It has nothing
- *         whatsoever to do with the older system in llevent.h.
- * 
- * $LicenseInfo:firstyear=2008&license=viewergpl$
- * Copyright (c) 2008, Linden Research, Inc.
- * $/LicenseInfo$
- */
-
-#if ! defined(LL_LLEVENTS_H)
-#define LL_LLEVENTS_H
-
-#include <string>
-#include <map>
-#include <set>
-#include <vector>
-#include <deque>
-#include <stdexcept>
-#include <boost/signals2.hpp>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/utility.hpp>        // noncopyable
-#include <boost/optional/optional.hpp>
-#include <boost/visit_each.hpp>
-#include <boost/ref.hpp>            // reference_wrapper
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/function.hpp>
-#include <boost/static_assert.hpp>
-#include "llsd.h"
-#include "llsingleton.h"
-#include "lldependencies.h"
-
-// override this to allow binding free functions with more parameters
-#ifndef LLEVENTS_LISTENER_ARITY
-#define LLEVENTS_LISTENER_ARITY 10
-#endif
-
-// hack for testing
-#ifndef testable
-#define testable private
-#endif
-
-/*****************************************************************************
-*   Signal and handler declarations
-*   Using a single handler signature means that we can have a common handler
-*   type, rather than needing a distinct one for each different handler.
-*****************************************************************************/
-
-/**
- * A boost::signals Combiner that stops the first time a handler returns true
- * We need this because we want to have our handlers return bool, so that
- * we have the option to cause a handler to stop further processing. The
- * default handler fails when the signal returns a value but has no slots.
- */
-struct LLStopWhenHandled
-{
-    typedef bool result_type;
-
-    template<typename InputIterator>
-    result_type operator()(InputIterator first, InputIterator last) const
-    {
-        for (InputIterator si = first; si != last; ++si)
-		{
-            if (*si)
-			{
-                return true;
-			}
-		}
-        return false;
-    }
-};
-
-/**
- * We want to have a standard signature for all signals; this way,
- * we can easily document a protocol for communicating across
- * dlls and into scripting languages someday.
- *
- * We want to return a bool to indicate whether the signal has been
- * handled and should NOT be passed on to other listeners.
- * Return true to stop further handling of the signal, and false
- * to continue.
- *
- * We take an LLSD because this way the contents of the signal
- * are independent of the API used to communicate it.
- * It is const ref because then there's low cost to pass it;
- * if you only need to inspect it, it's very cheap.
- *
- * @internal
- * The @c float template parameter indicates that we will internally use @c
- * float to indicate relative listener order on a given LLStandardSignal.
- * Don't worry, the @c float values are strictly internal! They are not part
- * of the interface, for the excellent reason that requiring the caller to
- * specify a numeric key to establish order means that the caller must know
- * the universe of possible values. We use LLDependencies for that instead.
- */
-typedef boost::signals2::signal<bool(const LLSD&), LLStopWhenHandled, float>  LLStandardSignal;
-/// Methods that forward listeners (e.g. constructed with
-/// <tt>boost::bind()</tt>) should accept (const LLEventListener&)
-typedef LLStandardSignal::slot_type LLEventListener;
-/// Result of registering a listener, supports <tt>connected()</tt>,
-/// <tt>disconnect()</tt> and <tt>blocked()</tt>
-typedef boost::signals2::connection LLBoundListener;
-/// Storing an LLBoundListener in LLTempBoundListener will disconnect the
-/// referenced listener when the LLTempBoundListener instance is destroyed.
-typedef boost::signals2::scoped_connection LLTempBoundListener;
-
-/**
- * A common idiom for event-based code is to accept either a callable --
- * directly called on completion -- or the string name of an LLEventPump on
- * which to post the completion event. Specifying a parameter as <tt>const
- * LLListenerOrPumpName&</tt> allows either.
- *
- * Calling a validly-constructed LLListenerOrPumpName, passing the LLSD
- * 'event' object, either calls the callable or posts the event to the named
- * LLEventPump.
- *
- * A default-constructed LLListenerOrPumpName is 'empty'. (This is useful as
- * the default value of an optional method parameter.) Calling it throws
- * LLListenerOrPumpName::Empty. Test for this condition beforehand using
- * either <tt>if (param)</tt> or <tt>if (! param)</tt>.
- */
-class LL_COMMON_API LLListenerOrPumpName
-{
-public:
-    /// passing string name of LLEventPump
-    LLListenerOrPumpName(const std::string& pumpname);
-    /// passing string literal (overload so compiler isn't forced to infer
-    /// double conversion)
-    LLListenerOrPumpName(const char* pumpname);
-    /// passing listener -- the "anything else" catch-all case. The type of an
-    /// object constructed by boost::bind() isn't intended to be written out.
-    /// Normally we'd just accept 'const LLEventListener&', but that would
-    /// require double implicit conversion: boost::bind() object to
-    /// LLEventListener, LLEventListener to LLListenerOrPumpName. So use a
-    /// template to forward anything.
-    template<typename T>
-    LLListenerOrPumpName(const T& listener): mListener(listener) {}
-
-    /// for omitted method parameter: uninitialized mListener
-    LLListenerOrPumpName() {}
-
-    /// test for validity
-    operator bool() const { return bool(mListener); }
-    bool operator! () const { return ! mListener; }
-
-    /// explicit accessor
-    const LLEventListener& getListener() const { return *mListener; }
-
-    /// implicit conversion to LLEventListener
-    operator LLEventListener() const { return *mListener; }
-
-    /// allow calling directly
-    bool operator()(const LLSD& event) const;
-
-    /// exception if you try to call when empty
-    struct Empty: public std::runtime_error
-    {
-        Empty(const std::string& what):
-            std::runtime_error(std::string("LLListenerOrPumpName::Empty: ") + what) {}
-    };
-
-private:
-    boost::optional<LLEventListener> mListener;
-};
-
-/*****************************************************************************
-*   LLEventPumps
-*****************************************************************************/
-class LL_COMMON_API LLEventPump;
-
-/**
- * LLEventPumps is a Singleton manager through which one typically accesses
- * this subsystem.
- */
-class LL_COMMON_API LLEventPumps: public LLSingleton<LLEventPumps>
-{
-    friend class LLSingleton<LLEventPumps>;
-public:
-    /**
-     * Find or create an LLEventPump instance with a specific name. We return
-     * a reference so there's no question about ownership. obtain() @em finds
-     * an instance without conferring @em ownership.
-     */
-    LLEventPump& obtain(const std::string& name);
-    /**
-     * Flush all known LLEventPump instances
-     */
-    void flush();
-
-private:
-    friend class LLEventPump;
-    /**
-     * Register a new LLEventPump instance (internal)
-     */
-    std::string registerNew(const LLEventPump&, const std::string& name, bool tweak);
-    /**
-     * Unregister a doomed LLEventPump instance (internal)
-     */
-    void unregister(const LLEventPump&);
-
-private:
-    LLEventPumps();
-    ~LLEventPumps();
-
-testable:
-    // Map of all known LLEventPump instances, whether or not we instantiated
-    // them. We store a plain old LLEventPump* because this map doesn't claim
-    // ownership of the instances. Though the common usage pattern is to
-    // request an instance using obtain(), it's fair to instantiate an
-    // LLEventPump subclass statically, as a class member, on the stack or on
-    // the heap. In such cases, the instantiating party is responsible for its
-    // lifespan.
-    typedef std::map<std::string, LLEventPump*> PumpMap;
-    PumpMap mPumpMap;
-    // Set of all LLEventPumps we instantiated. Membership in this set means
-    // we claim ownership, and will delete them when this LLEventPumps is
-    // destroyed.
-    typedef std::set<LLEventPump*> PumpSet;
-    PumpSet mOurPumps;
-    // LLEventPump names that should be instantiated as LLEventQueue rather
-    // than as LLEventStream
-    typedef std::set<std::string> PumpNames;
-    PumpNames mQueueNames;
-};
-
-/*****************************************************************************
-*   details
-*****************************************************************************/
-namespace LLEventDetail
-{
-    /// Any callable capable of connecting an LLEventListener to an
-    /// LLStandardSignal to produce an LLBoundListener can be mapped to this
-    /// signature.
-    typedef boost::function<LLBoundListener(const LLEventListener&)> ConnectFunc;
-
-    /**
-     * Utility template function to use Visitor appropriately
-     *
-     * @param listener Callable to connect, typically a boost::bind()
-     * expression. This will be visited by Visitor using boost::visit_each().
-     * @param connect_func Callable that will connect() @a listener to an
-     * LLStandardSignal, returning LLBoundListener.
-     */
-    template <typename LISTENER>
-    LLBoundListener visit_and_connect(const LISTENER& listener,
-                                      const ConnectFunc& connect_func);
-} // namespace LLEventDetail
-
-/*****************************************************************************
-*   LLEventTrackable
-*****************************************************************************/
-/**
- * LLEventTrackable wraps boost::signals2::trackable, which resembles
- * boost::trackable. Derive your listener class from LLEventTrackable instead,
- * and use something like
- * <tt>LLEventPump::listen(boost::bind(&YourTrackableSubclass::method,
- * instance, _1))</tt>. This will implicitly disconnect when the object
- * referenced by @c instance is destroyed.
- *
- * @note
- * LLEventTrackable doesn't address a couple of cases:
- * * Object destroyed during call
- *   - You enter a slot call in thread A.
- *   - Thread B destroys the object, which of course disconnects it from any
- *     future slot calls.
- *   - Thread A's call uses 'this', which now refers to a defunct object.
- *     Undefined behavior results.
- * * Call during destruction
- *   - @c MySubclass is derived from LLEventTrackable.
- *   - @c MySubclass registers one of its own methods using
- *     <tt>LLEventPump::listen()</tt>.
- *   - The @c MySubclass object begins destruction. <tt>~MySubclass()</tt>
- *     runs, destroying state specific to the subclass. (For instance, a
- *     <tt>Foo*</tt> data member is <tt>delete</tt>d but not zeroed.)
- *   - The listening method will not be disconnected until
- *     <tt>~LLEventTrackable()</tt> runs.
- *   - Before we get there, another thread posts data to the @c LLEventPump
- *     instance, calling the @c MySubclass method.
- *   - The method in question relies on valid @c MySubclass state. (For
- *     instance, it attempts to dereference the <tt>Foo*</tt> pointer that was
- *     <tt>delete</tt>d but not zeroed.)
- *   - Undefined behavior results.
- * If you suspect you may encounter any such scenario, you're better off
- * managing the lifespan of your object with <tt>boost::shared_ptr</tt>.
- * Passing <tt>LLEventPump::listen()</tt> a <tt>boost::bind()</tt> expression
- * involving a <tt>boost::weak_ptr<Foo></tt> is recognized specially, engaging
- * thread-safe Boost.Signals2 machinery.
- */
-typedef boost::signals2::trackable LLEventTrackable;
-
-/*****************************************************************************
-*   LLEventPump
-*****************************************************************************/
-/**
- * LLEventPump is the base class interface through which we access the
- * concrete subclasses LLEventStream and LLEventQueue.
- *
- * @NOTE
- * LLEventPump derives from LLEventTrackable so that when you "chain"
- * LLEventPump instances together, they will automatically disconnect on
- * destruction. Please see LLEventTrackable documentation for situations in
- * which this may be perilous across threads.
- */
-class LL_COMMON_API LLEventPump: public LLEventTrackable
-{
-public:
-    /**
-     * Exception thrown by LLEventPump(). You are trying to instantiate an
-     * LLEventPump (subclass) using the same name as some other instance, and
-     * you didn't pass <tt>tweak=true</tt> to permit it to generate a unique
-     * variant.
-     */
-    struct DupPumpName: public std::runtime_error
-    {
-        DupPumpName(const std::string& what):
-            std::runtime_error(std::string("DupPumpName: ") + what) {}
-    };
-
-    /**
-     * Instantiate an LLEventPump (subclass) with the string name by which it
-     * can be found using LLEventPumps::obtain().
-     *
-     * If you pass (or default) @a tweak to @c false, then a duplicate name
-     * will throw DupPumpName. This won't happen if LLEventPumps::obtain()
-     * instantiates the LLEventPump, because obtain() uses find-or-create
-     * logic. It can only happen if you instantiate an LLEventPump in your own
-     * code -- and a collision with the name of some other LLEventPump is
-     * likely to cause much more subtle problems!
-     *
-     * When you hand-instantiate an LLEventPump, consider passing @a tweak as
-     * @c true. This directs LLEventPump() to append a suffix to the passed @a
-     * name to make it unique. You can retrieve the adjusted name by calling
-     * getName() on your new instance.
-     */
-    LLEventPump(const std::string& name, bool tweak=false);
-    virtual ~LLEventPump();
-
-    /// group exceptions thrown by listen(). We use exceptions because these
-    /// particular errors are likely to be coding errors, found and fixed by
-    /// the developer even before preliminary checkin.
-    struct ListenError: public std::runtime_error
-    {
-        ListenError(const std::string& what): std::runtime_error(what) {}
-    };
-    /**
-     * exception thrown by listen(). You are attempting to register a
-     * listener on this LLEventPump using the same listener name as an
-     * already-registered listener.
-     */
-    struct DupListenerName: public ListenError
-    {
-        DupListenerName(const std::string& what):
-            ListenError(std::string("DupListenerName: ") + what)
-        {}
-    };
-    /**
-     * exception thrown by listen(). The order dependencies specified for your
-     * listener are incompatible with existing listeners.
-     *
-     * Consider listener "a" which specifies before "b" and "b" which
-     * specifies before "c". You are now attempting to register "c" before
-     * "a". There is no order that can satisfy all constraints.
-     */
-    struct Cycle: public ListenError
-    {
-        Cycle(const std::string& what): ListenError(std::string("Cycle: ") + what) {}
-    };
-    /**
-     * exception thrown by listen(). This one means that your new listener
-     * would force a change to the order of previously-registered listeners,
-     * and we don't have a good way to implement that.
-     *
-     * Consider listeners "some", "other" and "third". "some" and "other" are
-     * registered earlier without specifying relative order, so "other"
-     * happens to be first. Now you attempt to register "third" after "some"
-     * and before "other". Whoops, that would require swapping "some" and
-     * "other", which we can't do. Instead we throw this exception.
-     *
-     * It may not be possible to change the registration order so we already
-     * know "third"s order requirement by the time we register the second of
-     * "some" and "other". A solution would be to specify that "some" must
-     * come before "other", or equivalently that "other" must come after
-     * "some".
-     */
-    struct OrderChange: public ListenError
-    {
-        OrderChange(const std::string& what): ListenError(std::string("OrderChange: ") + what) {}
-    };
-
-    /// used by listen()
-    typedef std::vector<std::string> NameList;
-    /// convenience placeholder for when you explicitly want to pass an empty
-    /// NameList
-    const static NameList empty;
-
-    /// Get this LLEventPump's name
-    std::string getName() const { return mName; }
-
-    /**
-     * Register a new listener with a unique name. Specify an optional list
-     * of other listener names after which this one must be called, likewise
-     * an optional list of other listener names before which this one must be
-     * called. The other listeners mentioned need not yet be registered
-     * themselves. listen() can throw any ListenError; see ListenError
-     * subclasses.
-     *
-     * The listener name must be unique among active listeners for this
-     * LLEventPump, else you get DupListenerName. If you don't care to invent
-     * a name yourself, use inventName(). (I was tempted to recognize e.g. ""
-     * and internally generate a distinct name for that case. But that would
-     * handle badly the scenario in which you want to add, remove, re-add,
-     * etc. the same listener: each new listen() call would necessarily
-     * perform a new dependency sort. Assuming you specify the same
-     * after/before lists each time, using inventName() when you first
-     * instantiate your listener, then passing the same name on each listen()
-     * call, allows us to optimize away the second and subsequent dependency
-     * sorts.
-     *
-     * If (as is typical) you pass a <tt>boost::bind()</tt> expression as @a
-     * listener, listen() will inspect the components of that expression. If a
-     * bound object matches any of several cases, the connection will
-     * automatically be disconnected when that object is destroyed.
-     *
-     * * You bind a <tt>boost::weak_ptr</tt>.
-     * * Binding a <tt>boost::shared_ptr</tt> that way would ensure that the
-     *   referenced object would @em never be destroyed, since the @c
-     *   shared_ptr stored in the LLEventPump would remain an outstanding
-     *   reference. Use the weaken() function to convert your @c shared_ptr to
-     *   @c weak_ptr. Because this is easy to forget, binding a @c shared_ptr
-     *   will produce a compile error (@c BOOST_STATIC_ASSERT failure).
-     * * You bind a simple pointer or reference to an object derived from
-     *   <tt>boost::enable_shared_from_this</tt>. (UNDER CONSTRUCTION)
-     * * You bind a simple pointer or reference to an object derived from
-     *   LLEventTrackable. Unlike the cases described above, though, this is
-     *   vulnerable to a couple of cross-thread race conditions, as described
-     *   in the LLEventTrackable documentation.
-     */
-    template <typename LISTENER>
-    LLBoundListener listen(const std::string& name, const LISTENER& listener,
-                           const NameList& after=NameList(),
-                           const NameList& before=NameList())
-    {
-        // Examine listener, using our listen_impl() method to make the
-        // actual connection.
-        // This is why listen() is a template. Conversion from boost::bind()
-        // to LLEventListener performs type erasure, so it's important to look
-        // at the boost::bind object itself before that happens.
-        return LLEventDetail::visit_and_connect(listener,
-                                                boost::bind(&LLEventPump::listen_impl,
-                                                            this,
-                                                            name,
-                                                            _1,
-                                                            after,
-                                                            before));
-    }
-
-    /// Get the LLBoundListener associated with the passed name (dummy
-    /// LLBoundListener if not found)
-    virtual LLBoundListener getListener(const std::string& name) const;
-    /**
-     * Instantiate one of these to block an existing connection:
-     * @code
-     * { // in some local scope
-     *     LLEventPump::Blocker block(someLLBoundListener);
-     *     // code that needs the connection blocked
-     * } // unblock the connection again
-     * @endcode
-     */
-    typedef boost::signals2::shared_connection_block Blocker;
-    /// Unregister a listener by name. Prefer this to
-    /// <tt>getListener(name).disconnect()</tt> because stopListening() also
-    /// forgets this name.
-    virtual void stopListening(const std::string& name);
-    /// Post an event to all listeners. The @c bool return is only meaningful
-    /// if the underlying leaf class is LLEventStream -- beware of relying on
-    /// it too much! Truthfully, we return @c bool mostly to permit chaining
-    /// one LLEventPump as a listener on another.
-    virtual bool post(const LLSD&) = 0;
-    /// Enable/disable: while disabled, silently ignore all post() calls
-    virtual void enable(bool enabled=true) { mEnabled = enabled; }
-    /// query
-    virtual bool enabled() const { return mEnabled; }
-
-    /// Generate a distinct name for a listener -- see listen()
-    static std::string inventName(const std::string& pfx="listener");
-
-private:
-    friend class LLEventPumps;
-    /// flush queued events
-    virtual void flush() {}
-
-private:
-    virtual LLBoundListener listen_impl(const std::string& name, const LLEventListener&,
-                                        const NameList& after,
-                                        const NameList& before);
-    std::string mName;
-
-protected:
-    /// implement the dispatching
-    LLStandardSignal mSignal;
-    /// valve open?
-    bool mEnabled;
-    /// Map of named listeners. This tracks the listeners that actually exist
-    /// at this moment. When we stopListening(), we discard the entry from
-    /// this map.
-    typedef std::map<std::string, boost::signals2::connection> ConnectionMap;
-    ConnectionMap mConnections;
-    typedef LLDependencies<std::string, float> DependencyMap;
-    /// Dependencies between listeners. For each listener, track the float
-    /// used to establish its place in mSignal's order. This caches all the
-    /// listeners that have ever registered; stopListening() does not discard
-    /// the entry from this map. This is to avoid a new dependency sort if the
-    /// same listener with the same dependencies keeps hopping on and off this
-    /// LLEventPump.
-    DependencyMap mDeps;
-};
-
-/*****************************************************************************
-*   LLEventStream
-*****************************************************************************/
-/**
- * LLEventStream is a thin wrapper around LLStandardSignal. Posting an
- * event immediately calls all registered listeners.
- */
-class LL_COMMON_API LLEventStream: public LLEventPump
-{
-public:
-    LLEventStream(const std::string& name, bool tweak=false): LLEventPump(name, tweak) {}
-    virtual ~LLEventStream() {}
-
-    /// Post an event to all listeners
-    virtual bool post(const LLSD& event);
-};
-
-/*****************************************************************************
-*   LLEventQueue
-*****************************************************************************/
-/**
- * LLEventQueue isa LLEventPump whose post() method defers calling registered
- * listeners until flush() is called.
- */
-class LL_COMMON_API LLEventQueue: public LLEventPump
-{
-public:
-    LLEventQueue(const std::string& name, bool tweak=false): LLEventPump(name, tweak) {}
-    virtual ~LLEventQueue() {}
-
-    /// Post an event to all listeners
-    virtual bool post(const LLSD& event);
-
-private:
-    /// flush queued events
-    virtual void flush();
-
-private:
-    typedef std::deque<LLSD> EventQueue;
-    EventQueue mEventQueue;
-};
-
-/*****************************************************************************
-*   LLReqID
-*****************************************************************************/
-/**
- * This class helps the implementer of a given event API to honor the
- * ["reqid"] convention. By this convention, each event API stamps into its
- * response LLSD a ["reqid"] key whose value echoes the ["reqid"] value, if
- * any, from the corresponding request.
- *
- * This supports an (atypical, but occasionally necessary) use case in which
- * two or more asynchronous requests are multiplexed onto the same ["reply"]
- * LLEventPump. Since the response events could arrive in arbitrary order, the
- * caller must be able to demux them. It does so by matching the ["reqid"]
- * value in each response with the ["reqid"] value in the corresponding
- * request.
- *
- * It is the caller's responsibility to ensure distinct ["reqid"] values for
- * that case. Though LLSD::UUID is guaranteed to work, it might be overkill:
- * the "namespace" of unique ["reqid"] values is simply the set of requests
- * specifying the same ["reply"] LLEventPump name.
- *
- * Making a given event API echo the request's ["reqid"] into the response is
- * nearly trivial. This helper is mostly for mnemonic purposes, to serve as a
- * place to put these comments. We hope that each time a coder implements a
- * new event API based on some existing one, s/he will say, "Huh, what's an
- * LLReqID?" and look up this material.
- *
- * The hardest part about the convention is deciding where to store the
- * ["reqid"] value. Ironically, LLReqID can't help with that: you must store
- * an LLReqID instance in whatever storage will persist until the reply is
- * sent. For example, if the request ultimately ends up using a Responder
- * subclass, storing an LLReqID instance in the Responder works.
- *
- * @note
- * The @em implementer of an event API must honor the ["reqid"] convention.
- * However, the @em caller of an event API need only use it if s/he is sharing
- * the same ["reply"] LLEventPump for two or more asynchronous event API
- * requests.
- *
- * In most cases, it's far easier for the caller to instantiate a local
- * LLEventStream and pass its name to the event API in question. Then it's
- * perfectly reasonable not to set a ["reqid"] key in the request, ignoring
- * the @c isUndefined() ["reqid"] value in the response.
- */
-class LLReqID
-{
-public:
-    /**
-     * If you have the request in hand at the time you instantiate the
-     * LLReqID, pass that request to extract its ["reqid"].
- */
-    LLReqID(const LLSD& request):
-        mReqid(request["reqid"])
-    {}
-    /// If you don't yet have the request, use setFrom() later.
-    LLReqID() {}
-
-    /// Extract and store the ["reqid"] value from an incoming request.
-    void setFrom(const LLSD& request)
-    {
-        mReqid = request["reqid"];
-    }
-
-    /// Set ["reqid"] key into a pending response LLSD object.
-    void stamp(LLSD& response) const;
-
-    /// Make a whole new response LLSD object with our ["reqid"].
-    LLSD makeResponse() const
-    {
-        LLSD response;
-        stamp(response);
-        return response;
-    }
-
-    /// Not really sure of a use case for this accessor...
-    LLSD getReqID() const { return mReqid; }
-
-private:
-    LLSD mReqid;
-};
-
-/*****************************************************************************
-*   Underpinnings
-*****************************************************************************/
-/**
- * We originally provided a suite of overloaded
- * LLEventTrackable::listenTo(LLEventPump&, ...) methods that would call
- * LLEventPump::listen(...) and then pass the returned LLBoundListener to
- * LLEventTrackable::track(). This was workable but error-prone: the coder
- * must remember to call listenTo() rather than the more straightforward
- * listen() method.
- *
- * Now we publish only the single canonical listen() method, so there's a
- * uniform mechanism. Having a single way to do this is good, in that there's
- * no question in the coder's mind which of several alternatives to choose.
- *
- * To support automatic connection management, we use boost::visit_each
- * (http://www.boost.org/doc/libs/1_37_0/doc/html/boost/visit_each.html) to
- * inspect each argument of a boost::bind expression. (Although the visit_each
- * mechanism was first introduced with the original Boost.Signals library, it
- * was only later documented.)
- *
- * Cases:
- * * At least one of the function's arguments is a boost::weak_ptr<T>. Pass
- *   the corresponding shared_ptr to slot_type::track(). Ideally that would be
- *   the object whose method we want to call, but in fact we do the same for
- *   any weak_ptr we might find among the bound arguments. If we're passing
- *   our bound method a weak_ptr to some object, wouldn't the destruction of
- *   that object invalidate the call? So we disconnect automatically when any
- *   such object is destroyed. This is the mechanism preferred by boost::
- *   signals2.
- * * One of the functions's arguments is a boost::shared_ptr<T>. This produces
- *   a compile error: the bound copy of the shared_ptr stored in the
- *   boost_bind object stored in the signal object would make the referenced
- *   T object immortal. We provide a weaken() function. Pass
- *   weaken(your_shared_ptr) instead. (We can inspect, but not modify, the
- *   boost::bind object. Otherwise we'd replace the shared_ptr with weak_ptr
- *   implicitly and just proceed.)
- * * One of the function's arguments is a plain pointer/reference to an object
- *   derived from boost::enable_shared_from_this. We assume that this object
- *   is managed using boost::shared_ptr, so we implicitly extract a shared_ptr
- *   and track that. (UNDER CONSTRUCTION)
- * * One of the function's arguments is derived from LLEventTrackable. Pass
- *   the LLBoundListener to its LLEventTrackable::track(). This is vulnerable
- *   to a couple different race conditions, as described in LLEventTrackable
- *   documentation. (NOTE: Now that LLEventTrackable is a typedef for
- *   boost::signals2::trackable, the Signals2 library handles this itself, so
- *   our visitor needs no special logic for this case.)
- * * Any other argument type is irrelevant to automatic connection management.
- */
-
-namespace LLEventDetail
-{
-    template <typename F>
-    const F& unwrap(const F& f) { return f; }
-
-    template <typename F>
-    const F& unwrap(const boost::reference_wrapper<F>& f) { return f.get(); }
-
-    // Most of the following is lifted from the Boost.Signals use of
-    // visit_each.
-    template<bool Cond> struct truth {};
-
-    /**
-     * boost::visit_each() Visitor, used on a template argument <tt>const F&
-     * f</tt> as follows (see visit_and_connect()):
-     * @code
-     * LLEventListener listener(f);
-     * Visitor visitor(listener); // bind listener so it can track() shared_ptrs
-     * using boost::visit_each;   // allow unqualified visit_each() call for ADL
-     * visit_each(visitor, unwrap(f));
-     * @endcode
-     */
-    class Visitor
-    {
-    public:
-        /**
-         * Visitor binds a reference to LLEventListener so we can track() any
-         * shared_ptrs we find in the argument list.
-         */
-        Visitor(LLEventListener& listener):
-            mListener(listener)
-        {
-        }
-
-        /**
-         * boost::visit_each() calls this method for each component of a
-         * boost::bind() expression.
-         */
-        template <typename T>
-        void operator()(const T& t) const
-        {
-            decode(t, 0);
-        }
-
-    private:
-        // decode() decides between a reference wrapper and anything else
-        // boost::ref() variant
-        template<typename T>
-        void decode(const boost::reference_wrapper<T>& t, int) const
-        {
-//          add_if_trackable(t.get_pointer());
-        }
-
-        // decode() anything else
-        template<typename T>
-        void decode(const T& t, long) const
-        {
-            typedef truth<(boost::is_pointer<T>::value)> is_a_pointer;
-            maybe_get_pointer(t, is_a_pointer());
-        }
-
-        // maybe_get_pointer() decides between a pointer and a non-pointer
-        // plain pointer variant
-        template<typename T>
-        void maybe_get_pointer(const T& t, truth<true>) const
-        {
-//          add_if_trackable(t);
-        }
-
-        // shared_ptr variant
-        template<typename T>
-        void maybe_get_pointer(const boost::shared_ptr<T>& t, truth<false>) const
-        {
-            // If we have a shared_ptr to this object, it doesn't matter
-            // whether the object is derived from LLEventTrackable, so no
-            // further analysis of T is needed.
-//          mListener.track(t);
-
-            // Make this case illegal. Passing a bound shared_ptr to
-            // slot_type::track() is useless, since the bound shared_ptr will
-            // keep the object alive anyway! Force the coder to cast to weak_ptr.
-
-            // Trivial as it is, make the BOOST_STATIC_ASSERT() condition
-            // dependent on template param so the macro is only evaluated if
-            // this method is in fact instantiated, as described here:
-            // http://www.boost.org/doc/libs/1_34_1/doc/html/boost_staticassert.html
-
-            // ATTENTION: Don't bind a shared_ptr<anything> using
-            // LLEventPump::listen(boost::bind()). Doing so captures a copy of
-            // the shared_ptr, making the referenced object effectively
-            // immortal. Use the weaken() function, e.g.:
-            // somepump.listen(boost::bind(...weaken(my_shared_ptr)...));
-            // This lets us automatically disconnect when the referenced
-            // object is destroyed.
-            BOOST_STATIC_ASSERT(sizeof(T) == 0);
-        }
-
-        // weak_ptr variant
-        template<typename T>
-        void maybe_get_pointer(const boost::weak_ptr<T>& t, truth<false>) const
-        {
-            // If we have a weak_ptr to this object, it doesn't matter
-            // whether the object is derived from LLEventTrackable, so no
-            // further analysis of T is needed.
-            mListener.track(t);
-//          std::cout << "Found weak_ptr<" << typeid(T).name() << ">!\n";
-        }
-
-#if 0
-        // reference to anything derived from boost::enable_shared_from_this
-        template <typename T>
-        inline void maybe_get_pointer(const boost::enable_shared_from_this<T>& ct,
-                                      truth<false>) const
-        {
-            // Use the slot_type::track(shared_ptr) mechanism. Cast away
-            // const-ness because (in our code base anyway) it's unusual
-            // to find shared_ptr<const T>.
-            boost::enable_shared_from_this<T>&
-                t(const_cast<boost::enable_shared_from_this<T>&>(ct));
-            std::cout << "Capturing shared_from_this()" << std::endl;
-            boost::shared_ptr<T> sp(t.shared_from_this());
-/*==========================================================================*|
-            std::cout << "Capturing weak_ptr" << std::endl;
-            boost::weak_ptr<T> wp(sp);
-|*==========================================================================*/
-            std::cout << "Tracking shared__ptr" << std::endl;
-            mListener.track(sp);
-        }
-#endif
-
-        // non-pointer variant
-        template<typename T>
-        void maybe_get_pointer(const T& t, truth<false>) const
-        {
-            // Take the address of this object, because the object itself may be
-            // trackable
-//          add_if_trackable(boost::addressof(t));
-        }
-
-/*==========================================================================*|
-        // add_if_trackable() adds LLEventTrackable objects to mTrackables
-        inline void add_if_trackable(const LLEventTrackable* t) const
-        {
-            if (t)
-            {
-            }
-        }
-
-        // pointer to anything not an LLEventTrackable subclass
-        inline void add_if_trackable(const void*) const
-        {
-        }
-
-        // pointer to free function
-        // The following construct uses the preprocessor to generate
-        // add_if_trackable() overloads accepting pointer-to-function taking
-        // 0, 1, ..., LLEVENTS_LISTENER_ARITY parameters of arbitrary type.
-#define BOOST_PP_LOCAL_MACRO(n)                                     \
-        template <typename R                                        \
-                  BOOST_PP_COMMA_IF(n)                              \
-                  BOOST_PP_ENUM_PARAMS(n, typename T)>              \
-        inline void                                                 \
-        add_if_trackable(R (*)(BOOST_PP_ENUM_PARAMS(n, T))) const   \
-        {                                                           \
-        }
-#define BOOST_PP_LOCAL_LIMITS (0, LLEVENTS_LISTENER_ARITY)
-#include BOOST_PP_LOCAL_ITERATE()
-#undef  BOOST_PP_LOCAL_MACRO
-#undef  BOOST_PP_LOCAL_LIMITS
-|*==========================================================================*/
-
-        /// Bind a reference to the LLEventListener to call its track() method.
-        LLEventListener& mListener;
-    };
-
-    /**
-     * Utility template function to use Visitor appropriately
-     *
-     * @param raw_listener Callable to connect, typically a boost::bind()
-     * expression. This will be visited by Visitor using boost::visit_each().
-     * @param connect_funct Callable that will connect() @a raw_listener to an
-     * LLStandardSignal, returning LLBoundListener.
-     */
-    template <typename LISTENER>
-    LLBoundListener visit_and_connect(const LISTENER& raw_listener,
-                                      const ConnectFunc& connect_func)
-    {
-        // Capture the listener
-        LLEventListener listener(raw_listener);
-        // Define our Visitor, binding the listener so we can call
-        // listener.track() if we discover any shared_ptr<Foo>.
-        LLEventDetail::Visitor visitor(listener);
-        // Allow unqualified visit_each() call for ADL
-        using boost::visit_each;
-        // Visit each component of a boost::bind() expression. Pass
-        // 'raw_listener', our template argument, rather than 'listener' from
-        // which type details have been erased. unwrap() comes from
-        // Boost.Signals, in case we were passed a boost::ref().
-        visit_each(visitor, LLEventDetail::unwrap(raw_listener));
-        // Make the connection using passed function. At present, wrapping
-        // this functionality into this function is a bit silly: we don't
-        // really need a visit_and_connect() function any more, just a visit()
-        // function. The definition of this function dates from when, after
-        // visit_each(), after establishing the connection, we had to
-        // postprocess the new connection with the visitor object. That's no
-        // longer necessary.
-        return connect_func(listener);
-    }
-} // namespace LLEventDetail
-
-// Somewhat to my surprise, passing boost::bind(...boost::weak_ptr<T>...) to
-// listen() fails in Boost code trying to instantiate LLEventListener (i.e.
-// LLStandardSignal::slot_type) because the boost::get_pointer() utility function isn't
-// specialized for boost::weak_ptr. This remedies that omission.
-namespace boost
-{
-    template <typename T>
-    T* get_pointer(const weak_ptr<T>& ptr) { return shared_ptr<T>(ptr).get(); }
-}
-
-/// Since we forbid use of listen(boost::bind(...shared_ptr<T>...)), provide an
-/// easy way to cast to the corresponding weak_ptr.
-template <typename T>
-boost::weak_ptr<T> weaken(const boost::shared_ptr<T>& ptr)
-{
-    return boost::weak_ptr<T>(ptr);
-}
-
-#endif /* ! defined(LL_LLEVENTS_H) */
+/**
+ * @file   llevents.h
+ * @author Kent Quirk, Nat Goodspeed
+ * @date   2008-09-11
+ * @brief  This is an implementation of the event system described at
+ *         https://wiki.lindenlab.com/wiki/Viewer:Messaging/Event_System,
+ *         originally introduced in llnotifications.h. It has nothing
+ *         whatsoever to do with the older system in llevent.h.
+ * 
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLEVENTS_H)
+#define LL_LLEVENTS_H
+
+#include <string>
+#include <map>
+#include <set>
+#include <vector>
+#include <deque>
+#include <stdexcept>
+#include <boost/signals2.hpp>
+#include <boost/bind.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/utility.hpp>        // noncopyable
+#include <boost/optional/optional.hpp>
+#include <boost/visit_each.hpp>
+#include <boost/ref.hpp>            // reference_wrapper
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/function.hpp>
+#include <boost/static_assert.hpp>
+#include "llsd.h"
+#include "llsingleton.h"
+#include "lldependencies.h"
+
+// override this to allow binding free functions with more parameters
+#ifndef LLEVENTS_LISTENER_ARITY
+#define LLEVENTS_LISTENER_ARITY 10
+#endif
+
+// hack for testing
+#ifndef testable
+#define testable private
+#endif
+
+/*****************************************************************************
+*   Signal and handler declarations
+*   Using a single handler signature means that we can have a common handler
+*   type, rather than needing a distinct one for each different handler.
+*****************************************************************************/
+
+/**
+ * A boost::signals Combiner that stops the first time a handler returns true
+ * We need this because we want to have our handlers return bool, so that
+ * we have the option to cause a handler to stop further processing. The
+ * default handler fails when the signal returns a value but has no slots.
+ */
+struct LLStopWhenHandled
+{
+    typedef bool result_type;
+
+    template<typename InputIterator>
+    result_type operator()(InputIterator first, InputIterator last) const
+    {
+        for (InputIterator si = first; si != last; ++si)
+		{
+            if (*si)
+			{
+                return true;
+			}
+		}
+        return false;
+    }
+};
+
+/**
+ * We want to have a standard signature for all signals; this way,
+ * we can easily document a protocol for communicating across
+ * dlls and into scripting languages someday.
+ *
+ * We want to return a bool to indicate whether the signal has been
+ * handled and should NOT be passed on to other listeners.
+ * Return true to stop further handling of the signal, and false
+ * to continue.
+ *
+ * We take an LLSD because this way the contents of the signal
+ * are independent of the API used to communicate it.
+ * It is const ref because then there's low cost to pass it;
+ * if you only need to inspect it, it's very cheap.
+ *
+ * @internal
+ * The @c float template parameter indicates that we will internally use @c
+ * float to indicate relative listener order on a given LLStandardSignal.
+ * Don't worry, the @c float values are strictly internal! They are not part
+ * of the interface, for the excellent reason that requiring the caller to
+ * specify a numeric key to establish order means that the caller must know
+ * the universe of possible values. We use LLDependencies for that instead.
+ */
+typedef boost::signals2::signal<bool(const LLSD&), LLStopWhenHandled, float>  LLStandardSignal;
+/// Methods that forward listeners (e.g. constructed with
+/// <tt>boost::bind()</tt>) should accept (const LLEventListener&)
+typedef LLStandardSignal::slot_type LLEventListener;
+/// Result of registering a listener, supports <tt>connected()</tt>,
+/// <tt>disconnect()</tt> and <tt>blocked()</tt>
+typedef boost::signals2::connection LLBoundListener;
+/// Storing an LLBoundListener in LLTempBoundListener will disconnect the
+/// referenced listener when the LLTempBoundListener instance is destroyed.
+typedef boost::signals2::scoped_connection LLTempBoundListener;
+
+/**
+ * A common idiom for event-based code is to accept either a callable --
+ * directly called on completion -- or the string name of an LLEventPump on
+ * which to post the completion event. Specifying a parameter as <tt>const
+ * LLListenerOrPumpName&</tt> allows either.
+ *
+ * Calling a validly-constructed LLListenerOrPumpName, passing the LLSD
+ * 'event' object, either calls the callable or posts the event to the named
+ * LLEventPump.
+ *
+ * A default-constructed LLListenerOrPumpName is 'empty'. (This is useful as
+ * the default value of an optional method parameter.) Calling it throws
+ * LLListenerOrPumpName::Empty. Test for this condition beforehand using
+ * either <tt>if (param)</tt> or <tt>if (! param)</tt>.
+ */
+class LL_COMMON_API LLListenerOrPumpName
+{
+public:
+    /// passing string name of LLEventPump
+    LLListenerOrPumpName(const std::string& pumpname);
+    /// passing string literal (overload so compiler isn't forced to infer
+    /// double conversion)
+    LLListenerOrPumpName(const char* pumpname);
+    /// passing listener -- the "anything else" catch-all case. The type of an
+    /// object constructed by boost::bind() isn't intended to be written out.
+    /// Normally we'd just accept 'const LLEventListener&', but that would
+    /// require double implicit conversion: boost::bind() object to
+    /// LLEventListener, LLEventListener to LLListenerOrPumpName. So use a
+    /// template to forward anything.
+    template<typename T>
+    LLListenerOrPumpName(const T& listener): mListener(listener) {}
+
+    /// for omitted method parameter: uninitialized mListener
+    LLListenerOrPumpName() {}
+
+    /// test for validity
+    operator bool() const { return bool(mListener); }
+    bool operator! () const { return ! mListener; }
+
+    /// explicit accessor
+    const LLEventListener& getListener() const { return *mListener; }
+
+    /// implicit conversion to LLEventListener
+    operator LLEventListener() const { return *mListener; }
+
+    /// allow calling directly
+    bool operator()(const LLSD& event) const;
+
+    /// exception if you try to call when empty
+    struct Empty: public std::runtime_error
+    {
+        Empty(const std::string& what):
+            std::runtime_error(std::string("LLListenerOrPumpName::Empty: ") + what) {}
+    };
+
+private:
+    boost::optional<LLEventListener> mListener;
+};
+
+/*****************************************************************************
+*   LLEventPumps
+*****************************************************************************/
+class LL_COMMON_API LLEventPump;
+
+/**
+ * LLEventPumps is a Singleton manager through which one typically accesses
+ * this subsystem.
+ */
+class LL_COMMON_API LLEventPumps: public LLSingleton<LLEventPumps>
+{
+    friend class LLSingleton<LLEventPumps>;
+public:
+    /**
+     * Find or create an LLEventPump instance with a specific name. We return
+     * a reference so there's no question about ownership. obtain() @em finds
+     * an instance without conferring @em ownership.
+     */
+    LLEventPump& obtain(const std::string& name);
+    /**
+     * Flush all known LLEventPump instances
+     */
+    void flush();
+
+private:
+    friend class LLEventPump;
+    /**
+     * Register a new LLEventPump instance (internal)
+     */
+    std::string registerNew(const LLEventPump&, const std::string& name, bool tweak);
+    /**
+     * Unregister a doomed LLEventPump instance (internal)
+     */
+    void unregister(const LLEventPump&);
+
+private:
+    LLEventPumps();
+    ~LLEventPumps();
+
+testable:
+    // Map of all known LLEventPump instances, whether or not we instantiated
+    // them. We store a plain old LLEventPump* because this map doesn't claim
+    // ownership of the instances. Though the common usage pattern is to
+    // request an instance using obtain(), it's fair to instantiate an
+    // LLEventPump subclass statically, as a class member, on the stack or on
+    // the heap. In such cases, the instantiating party is responsible for its
+    // lifespan.
+    typedef std::map<std::string, LLEventPump*> PumpMap;
+    PumpMap mPumpMap;
+    // Set of all LLEventPumps we instantiated. Membership in this set means
+    // we claim ownership, and will delete them when this LLEventPumps is
+    // destroyed.
+    typedef std::set<LLEventPump*> PumpSet;
+    PumpSet mOurPumps;
+    // LLEventPump names that should be instantiated as LLEventQueue rather
+    // than as LLEventStream
+    typedef std::set<std::string> PumpNames;
+    PumpNames mQueueNames;
+};
+
+/*****************************************************************************
+*   details
+*****************************************************************************/
+namespace LLEventDetail
+{
+    /// Any callable capable of connecting an LLEventListener to an
+    /// LLStandardSignal to produce an LLBoundListener can be mapped to this
+    /// signature.
+    typedef boost::function<LLBoundListener(const LLEventListener&)> ConnectFunc;
+
+    /**
+     * Utility template function to use Visitor appropriately
+     *
+     * @param listener Callable to connect, typically a boost::bind()
+     * expression. This will be visited by Visitor using boost::visit_each().
+     * @param connect_func Callable that will connect() @a listener to an
+     * LLStandardSignal, returning LLBoundListener.
+     */
+    template <typename LISTENER>
+    LLBoundListener visit_and_connect(const LISTENER& listener,
+                                      const ConnectFunc& connect_func);
+} // namespace LLEventDetail
+
+/*****************************************************************************
+*   LLEventTrackable
+*****************************************************************************/
+/**
+ * LLEventTrackable wraps boost::signals2::trackable, which resembles
+ * boost::trackable. Derive your listener class from LLEventTrackable instead,
+ * and use something like
+ * <tt>LLEventPump::listen(boost::bind(&YourTrackableSubclass::method,
+ * instance, _1))</tt>. This will implicitly disconnect when the object
+ * referenced by @c instance is destroyed.
+ *
+ * @note
+ * LLEventTrackable doesn't address a couple of cases:
+ * * Object destroyed during call
+ *   - You enter a slot call in thread A.
+ *   - Thread B destroys the object, which of course disconnects it from any
+ *     future slot calls.
+ *   - Thread A's call uses 'this', which now refers to a defunct object.
+ *     Undefined behavior results.
+ * * Call during destruction
+ *   - @c MySubclass is derived from LLEventTrackable.
+ *   - @c MySubclass registers one of its own methods using
+ *     <tt>LLEventPump::listen()</tt>.
+ *   - The @c MySubclass object begins destruction. <tt>~MySubclass()</tt>
+ *     runs, destroying state specific to the subclass. (For instance, a
+ *     <tt>Foo*</tt> data member is <tt>delete</tt>d but not zeroed.)
+ *   - The listening method will not be disconnected until
+ *     <tt>~LLEventTrackable()</tt> runs.
+ *   - Before we get there, another thread posts data to the @c LLEventPump
+ *     instance, calling the @c MySubclass method.
+ *   - The method in question relies on valid @c MySubclass state. (For
+ *     instance, it attempts to dereference the <tt>Foo*</tt> pointer that was
+ *     <tt>delete</tt>d but not zeroed.)
+ *   - Undefined behavior results.
+ * If you suspect you may encounter any such scenario, you're better off
+ * managing the lifespan of your object with <tt>boost::shared_ptr</tt>.
+ * Passing <tt>LLEventPump::listen()</tt> a <tt>boost::bind()</tt> expression
+ * involving a <tt>boost::weak_ptr<Foo></tt> is recognized specially, engaging
+ * thread-safe Boost.Signals2 machinery.
+ */
+typedef boost::signals2::trackable LLEventTrackable;
+
+/*****************************************************************************
+*   LLEventPump
+*****************************************************************************/
+/**
+ * LLEventPump is the base class interface through which we access the
+ * concrete subclasses LLEventStream and LLEventQueue.
+ *
+ * @NOTE
+ * LLEventPump derives from LLEventTrackable so that when you "chain"
+ * LLEventPump instances together, they will automatically disconnect on
+ * destruction. Please see LLEventTrackable documentation for situations in
+ * which this may be perilous across threads.
+ */
+class LL_COMMON_API LLEventPump: public LLEventTrackable
+{
+public:
+    /**
+     * Exception thrown by LLEventPump(). You are trying to instantiate an
+     * LLEventPump (subclass) using the same name as some other instance, and
+     * you didn't pass <tt>tweak=true</tt> to permit it to generate a unique
+     * variant.
+     */
+    struct DupPumpName: public std::runtime_error
+    {
+        DupPumpName(const std::string& what):
+            std::runtime_error(std::string("DupPumpName: ") + what) {}
+    };
+
+    /**
+     * Instantiate an LLEventPump (subclass) with the string name by which it
+     * can be found using LLEventPumps::obtain().
+     *
+     * If you pass (or default) @a tweak to @c false, then a duplicate name
+     * will throw DupPumpName. This won't happen if LLEventPumps::obtain()
+     * instantiates the LLEventPump, because obtain() uses find-or-create
+     * logic. It can only happen if you instantiate an LLEventPump in your own
+     * code -- and a collision with the name of some other LLEventPump is
+     * likely to cause much more subtle problems!
+     *
+     * When you hand-instantiate an LLEventPump, consider passing @a tweak as
+     * @c true. This directs LLEventPump() to append a suffix to the passed @a
+     * name to make it unique. You can retrieve the adjusted name by calling
+     * getName() on your new instance.
+     */
+    LLEventPump(const std::string& name, bool tweak=false);
+    virtual ~LLEventPump();
+
+    /// group exceptions thrown by listen(). We use exceptions because these
+    /// particular errors are likely to be coding errors, found and fixed by
+    /// the developer even before preliminary checkin.
+    struct ListenError: public std::runtime_error
+    {
+        ListenError(const std::string& what): std::runtime_error(what) {}
+    };
+    /**
+     * exception thrown by listen(). You are attempting to register a
+     * listener on this LLEventPump using the same listener name as an
+     * already-registered listener.
+     */
+    struct DupListenerName: public ListenError
+    {
+        DupListenerName(const std::string& what):
+            ListenError(std::string("DupListenerName: ") + what)
+        {}
+    };
+    /**
+     * exception thrown by listen(). The order dependencies specified for your
+     * listener are incompatible with existing listeners.
+     *
+     * Consider listener "a" which specifies before "b" and "b" which
+     * specifies before "c". You are now attempting to register "c" before
+     * "a". There is no order that can satisfy all constraints.
+     */
+    struct Cycle: public ListenError
+    {
+        Cycle(const std::string& what): ListenError(std::string("Cycle: ") + what) {}
+    };
+    /**
+     * exception thrown by listen(). This one means that your new listener
+     * would force a change to the order of previously-registered listeners,
+     * and we don't have a good way to implement that.
+     *
+     * Consider listeners "some", "other" and "third". "some" and "other" are
+     * registered earlier without specifying relative order, so "other"
+     * happens to be first. Now you attempt to register "third" after "some"
+     * and before "other". Whoops, that would require swapping "some" and
+     * "other", which we can't do. Instead we throw this exception.
+     *
+     * It may not be possible to change the registration order so we already
+     * know "third"s order requirement by the time we register the second of
+     * "some" and "other". A solution would be to specify that "some" must
+     * come before "other", or equivalently that "other" must come after
+     * "some".
+     */
+    struct OrderChange: public ListenError
+    {
+        OrderChange(const std::string& what): ListenError(std::string("OrderChange: ") + what) {}
+    };
+
+    /// used by listen()
+    typedef std::vector<std::string> NameList;
+    /// convenience placeholder for when you explicitly want to pass an empty
+    /// NameList
+    const static NameList empty;
+
+    /// Get this LLEventPump's name
+    std::string getName() const { return mName; }
+
+    /**
+     * Register a new listener with a unique name. Specify an optional list
+     * of other listener names after which this one must be called, likewise
+     * an optional list of other listener names before which this one must be
+     * called. The other listeners mentioned need not yet be registered
+     * themselves. listen() can throw any ListenError; see ListenError
+     * subclasses.
+     *
+     * The listener name must be unique among active listeners for this
+     * LLEventPump, else you get DupListenerName. If you don't care to invent
+     * a name yourself, use inventName(). (I was tempted to recognize e.g. ""
+     * and internally generate a distinct name for that case. But that would
+     * handle badly the scenario in which you want to add, remove, re-add,
+     * etc. the same listener: each new listen() call would necessarily
+     * perform a new dependency sort. Assuming you specify the same
+     * after/before lists each time, using inventName() when you first
+     * instantiate your listener, then passing the same name on each listen()
+     * call, allows us to optimize away the second and subsequent dependency
+     * sorts.
+     *
+     * If (as is typical) you pass a <tt>boost::bind()</tt> expression as @a
+     * listener, listen() will inspect the components of that expression. If a
+     * bound object matches any of several cases, the connection will
+     * automatically be disconnected when that object is destroyed.
+     *
+     * * You bind a <tt>boost::weak_ptr</tt>.
+     * * Binding a <tt>boost::shared_ptr</tt> that way would ensure that the
+     *   referenced object would @em never be destroyed, since the @c
+     *   shared_ptr stored in the LLEventPump would remain an outstanding
+     *   reference. Use the weaken() function to convert your @c shared_ptr to
+     *   @c weak_ptr. Because this is easy to forget, binding a @c shared_ptr
+     *   will produce a compile error (@c BOOST_STATIC_ASSERT failure).
+     * * You bind a simple pointer or reference to an object derived from
+     *   <tt>boost::enable_shared_from_this</tt>. (UNDER CONSTRUCTION)
+     * * You bind a simple pointer or reference to an object derived from
+     *   LLEventTrackable. Unlike the cases described above, though, this is
+     *   vulnerable to a couple of cross-thread race conditions, as described
+     *   in the LLEventTrackable documentation.
+     */
+    template <typename LISTENER>
+    LLBoundListener listen(const std::string& name, const LISTENER& listener,
+                           const NameList& after=NameList(),
+                           const NameList& before=NameList())
+    {
+        // Examine listener, using our listen_impl() method to make the
+        // actual connection.
+        // This is why listen() is a template. Conversion from boost::bind()
+        // to LLEventListener performs type erasure, so it's important to look
+        // at the boost::bind object itself before that happens.
+        return LLEventDetail::visit_and_connect(listener,
+                                                boost::bind(&LLEventPump::listen_impl,
+                                                            this,
+                                                            name,
+                                                            _1,
+                                                            after,
+                                                            before));
+    }
+
+    /// Get the LLBoundListener associated with the passed name (dummy
+    /// LLBoundListener if not found)
+    virtual LLBoundListener getListener(const std::string& name) const;
+    /**
+     * Instantiate one of these to block an existing connection:
+     * @code
+     * { // in some local scope
+     *     LLEventPump::Blocker block(someLLBoundListener);
+     *     // code that needs the connection blocked
+     * } // unblock the connection again
+     * @endcode
+     */
+    typedef boost::signals2::shared_connection_block Blocker;
+    /// Unregister a listener by name. Prefer this to
+    /// <tt>getListener(name).disconnect()</tt> because stopListening() also
+    /// forgets this name.
+    virtual void stopListening(const std::string& name);
+    /// Post an event to all listeners. The @c bool return is only meaningful
+    /// if the underlying leaf class is LLEventStream -- beware of relying on
+    /// it too much! Truthfully, we return @c bool mostly to permit chaining
+    /// one LLEventPump as a listener on another.
+    virtual bool post(const LLSD&) = 0;
+    /// Enable/disable: while disabled, silently ignore all post() calls
+    virtual void enable(bool enabled=true) { mEnabled = enabled; }
+    /// query
+    virtual bool enabled() const { return mEnabled; }
+
+    /// Generate a distinct name for a listener -- see listen()
+    static std::string inventName(const std::string& pfx="listener");
+
+private:
+    friend class LLEventPumps;
+    /// flush queued events
+    virtual void flush() {}
+
+private:
+    virtual LLBoundListener listen_impl(const std::string& name, const LLEventListener&,
+                                        const NameList& after,
+                                        const NameList& before);
+    std::string mName;
+
+protected:
+    /// implement the dispatching
+    LLStandardSignal mSignal;
+    /// valve open?
+    bool mEnabled;
+    /// Map of named listeners. This tracks the listeners that actually exist
+    /// at this moment. When we stopListening(), we discard the entry from
+    /// this map.
+    typedef std::map<std::string, boost::signals2::connection> ConnectionMap;
+    ConnectionMap mConnections;
+    typedef LLDependencies<std::string, float> DependencyMap;
+    /// Dependencies between listeners. For each listener, track the float
+    /// used to establish its place in mSignal's order. This caches all the
+    /// listeners that have ever registered; stopListening() does not discard
+    /// the entry from this map. This is to avoid a new dependency sort if the
+    /// same listener with the same dependencies keeps hopping on and off this
+    /// LLEventPump.
+    DependencyMap mDeps;
+};
+
+/*****************************************************************************
+*   LLEventStream
+*****************************************************************************/
+/**
+ * LLEventStream is a thin wrapper around LLStandardSignal. Posting an
+ * event immediately calls all registered listeners.
+ */
+class LL_COMMON_API LLEventStream: public LLEventPump
+{
+public:
+    LLEventStream(const std::string& name, bool tweak=false): LLEventPump(name, tweak) {}
+    virtual ~LLEventStream() {}
+
+    /// Post an event to all listeners
+    virtual bool post(const LLSD& event);
+};
+
+/*****************************************************************************
+*   LLEventQueue
+*****************************************************************************/
+/**
+ * LLEventQueue isa LLEventPump whose post() method defers calling registered
+ * listeners until flush() is called.
+ */
+class LL_COMMON_API LLEventQueue: public LLEventPump
+{
+public:
+    LLEventQueue(const std::string& name, bool tweak=false): LLEventPump(name, tweak) {}
+    virtual ~LLEventQueue() {}
+
+    /// Post an event to all listeners
+    virtual bool post(const LLSD& event);
+
+private:
+    /// flush queued events
+    virtual void flush();
+
+private:
+    typedef std::deque<LLSD> EventQueue;
+    EventQueue mEventQueue;
+};
+
+/*****************************************************************************
+*   LLReqID
+*****************************************************************************/
+/**
+ * This class helps the implementer of a given event API to honor the
+ * ["reqid"] convention. By this convention, each event API stamps into its
+ * response LLSD a ["reqid"] key whose value echoes the ["reqid"] value, if
+ * any, from the corresponding request.
+ *
+ * This supports an (atypical, but occasionally necessary) use case in which
+ * two or more asynchronous requests are multiplexed onto the same ["reply"]
+ * LLEventPump. Since the response events could arrive in arbitrary order, the
+ * caller must be able to demux them. It does so by matching the ["reqid"]
+ * value in each response with the ["reqid"] value in the corresponding
+ * request.
+ *
+ * It is the caller's responsibility to ensure distinct ["reqid"] values for
+ * that case. Though LLSD::UUID is guaranteed to work, it might be overkill:
+ * the "namespace" of unique ["reqid"] values is simply the set of requests
+ * specifying the same ["reply"] LLEventPump name.
+ *
+ * Making a given event API echo the request's ["reqid"] into the response is
+ * nearly trivial. This helper is mostly for mnemonic purposes, to serve as a
+ * place to put these comments. We hope that each time a coder implements a
+ * new event API based on some existing one, s/he will say, "Huh, what's an
+ * LLReqID?" and look up this material.
+ *
+ * The hardest part about the convention is deciding where to store the
+ * ["reqid"] value. Ironically, LLReqID can't help with that: you must store
+ * an LLReqID instance in whatever storage will persist until the reply is
+ * sent. For example, if the request ultimately ends up using a Responder
+ * subclass, storing an LLReqID instance in the Responder works.
+ *
+ * @note
+ * The @em implementer of an event API must honor the ["reqid"] convention.
+ * However, the @em caller of an event API need only use it if s/he is sharing
+ * the same ["reply"] LLEventPump for two or more asynchronous event API
+ * requests.
+ *
+ * In most cases, it's far easier for the caller to instantiate a local
+ * LLEventStream and pass its name to the event API in question. Then it's
+ * perfectly reasonable not to set a ["reqid"] key in the request, ignoring
+ * the @c isUndefined() ["reqid"] value in the response.
+ */
+class LL_COMMON_API LLReqID
+{
+public:
+    /**
+     * If you have the request in hand at the time you instantiate the
+     * LLReqID, pass that request to extract its ["reqid"].
+ */
+    LLReqID(const LLSD& request):
+        mReqid(request["reqid"])
+    {}
+    /// If you don't yet have the request, use setFrom() later.
+    LLReqID() {}
+
+    /// Extract and store the ["reqid"] value from an incoming request.
+    void setFrom(const LLSD& request)
+    {
+        mReqid = request["reqid"];
+    }
+
+    /// Set ["reqid"] key into a pending response LLSD object.
+    void stamp(LLSD& response) const;
+
+    /// Make a whole new response LLSD object with our ["reqid"].
+    LLSD makeResponse() const
+    {
+        LLSD response;
+        stamp(response);
+        return response;
+    }
+
+    /// Not really sure of a use case for this accessor...
+    LLSD getReqID() const { return mReqid; }
+
+private:
+    LLSD mReqid;
+};
+
+/*****************************************************************************
+*   Underpinnings
+*****************************************************************************/
+/**
+ * We originally provided a suite of overloaded
+ * LLEventTrackable::listenTo(LLEventPump&, ...) methods that would call
+ * LLEventPump::listen(...) and then pass the returned LLBoundListener to
+ * LLEventTrackable::track(). This was workable but error-prone: the coder
+ * must remember to call listenTo() rather than the more straightforward
+ * listen() method.
+ *
+ * Now we publish only the single canonical listen() method, so there's a
+ * uniform mechanism. Having a single way to do this is good, in that there's
+ * no question in the coder's mind which of several alternatives to choose.
+ *
+ * To support automatic connection management, we use boost::visit_each
+ * (http://www.boost.org/doc/libs/1_37_0/doc/html/boost/visit_each.html) to
+ * inspect each argument of a boost::bind expression. (Although the visit_each
+ * mechanism was first introduced with the original Boost.Signals library, it
+ * was only later documented.)
+ *
+ * Cases:
+ * * At least one of the function's arguments is a boost::weak_ptr<T>. Pass
+ *   the corresponding shared_ptr to slot_type::track(). Ideally that would be
+ *   the object whose method we want to call, but in fact we do the same for
+ *   any weak_ptr we might find among the bound arguments. If we're passing
+ *   our bound method a weak_ptr to some object, wouldn't the destruction of
+ *   that object invalidate the call? So we disconnect automatically when any
+ *   such object is destroyed. This is the mechanism preferred by boost::
+ *   signals2.
+ * * One of the functions's arguments is a boost::shared_ptr<T>. This produces
+ *   a compile error: the bound copy of the shared_ptr stored in the
+ *   boost_bind object stored in the signal object would make the referenced
+ *   T object immortal. We provide a weaken() function. Pass
+ *   weaken(your_shared_ptr) instead. (We can inspect, but not modify, the
+ *   boost::bind object. Otherwise we'd replace the shared_ptr with weak_ptr
+ *   implicitly and just proceed.)
+ * * One of the function's arguments is a plain pointer/reference to an object
+ *   derived from boost::enable_shared_from_this. We assume that this object
+ *   is managed using boost::shared_ptr, so we implicitly extract a shared_ptr
+ *   and track that. (UNDER CONSTRUCTION)
+ * * One of the function's arguments is derived from LLEventTrackable. Pass
+ *   the LLBoundListener to its LLEventTrackable::track(). This is vulnerable
+ *   to a couple different race conditions, as described in LLEventTrackable
+ *   documentation. (NOTE: Now that LLEventTrackable is a typedef for
+ *   boost::signals2::trackable, the Signals2 library handles this itself, so
+ *   our visitor needs no special logic for this case.)
+ * * Any other argument type is irrelevant to automatic connection management.
+ */
+
+namespace LLEventDetail
+{
+    template <typename F>
+    const F& unwrap(const F& f) { return f; }
+
+    template <typename F>
+    const F& unwrap(const boost::reference_wrapper<F>& f) { return f.get(); }
+
+    // Most of the following is lifted from the Boost.Signals use of
+    // visit_each.
+    template<bool Cond> struct truth {};
+
+    /**
+     * boost::visit_each() Visitor, used on a template argument <tt>const F&
+     * f</tt> as follows (see visit_and_connect()):
+     * @code
+     * LLEventListener listener(f);
+     * Visitor visitor(listener); // bind listener so it can track() shared_ptrs
+     * using boost::visit_each;   // allow unqualified visit_each() call for ADL
+     * visit_each(visitor, unwrap(f));
+     * @endcode
+     */
+    class Visitor
+    {
+    public:
+        /**
+         * Visitor binds a reference to LLEventListener so we can track() any
+         * shared_ptrs we find in the argument list.
+         */
+        Visitor(LLEventListener& listener):
+            mListener(listener)
+        {
+        }
+
+        /**
+         * boost::visit_each() calls this method for each component of a
+         * boost::bind() expression.
+         */
+        template <typename T>
+        void operator()(const T& t) const
+        {
+            decode(t, 0);
+        }
+
+    private:
+        // decode() decides between a reference wrapper and anything else
+        // boost::ref() variant
+        template<typename T>
+        void decode(const boost::reference_wrapper<T>& t, int) const
+        {
+//          add_if_trackable(t.get_pointer());
+        }
+
+        // decode() anything else
+        template<typename T>
+        void decode(const T& t, long) const
+        {
+            typedef truth<(boost::is_pointer<T>::value)> is_a_pointer;
+            maybe_get_pointer(t, is_a_pointer());
+        }
+
+        // maybe_get_pointer() decides between a pointer and a non-pointer
+        // plain pointer variant
+        template<typename T>
+        void maybe_get_pointer(const T& t, truth<true>) const
+        {
+//          add_if_trackable(t);
+        }
+
+        // shared_ptr variant
+        template<typename T>
+        void maybe_get_pointer(const boost::shared_ptr<T>& t, truth<false>) const
+        {
+            // If we have a shared_ptr to this object, it doesn't matter
+            // whether the object is derived from LLEventTrackable, so no
+            // further analysis of T is needed.
+//          mListener.track(t);
+
+            // Make this case illegal. Passing a bound shared_ptr to
+            // slot_type::track() is useless, since the bound shared_ptr will
+            // keep the object alive anyway! Force the coder to cast to weak_ptr.
+
+            // Trivial as it is, make the BOOST_STATIC_ASSERT() condition
+            // dependent on template param so the macro is only evaluated if
+            // this method is in fact instantiated, as described here:
+            // http://www.boost.org/doc/libs/1_34_1/doc/html/boost_staticassert.html
+
+            // ATTENTION: Don't bind a shared_ptr<anything> using
+            // LLEventPump::listen(boost::bind()). Doing so captures a copy of
+            // the shared_ptr, making the referenced object effectively
+            // immortal. Use the weaken() function, e.g.:
+            // somepump.listen(boost::bind(...weaken(my_shared_ptr)...));
+            // This lets us automatically disconnect when the referenced
+            // object is destroyed.
+            BOOST_STATIC_ASSERT(sizeof(T) == 0);
+        }
+
+        // weak_ptr variant
+        template<typename T>
+        void maybe_get_pointer(const boost::weak_ptr<T>& t, truth<false>) const
+        {
+            // If we have a weak_ptr to this object, it doesn't matter
+            // whether the object is derived from LLEventTrackable, so no
+            // further analysis of T is needed.
+            mListener.track(t);
+//          std::cout << "Found weak_ptr<" << typeid(T).name() << ">!\n";
+        }
+
+#if 0
+        // reference to anything derived from boost::enable_shared_from_this
+        template <typename T>
+        inline void maybe_get_pointer(const boost::enable_shared_from_this<T>& ct,
+                                      truth<false>) const
+        {
+            // Use the slot_type::track(shared_ptr) mechanism. Cast away
+            // const-ness because (in our code base anyway) it's unusual
+            // to find shared_ptr<const T>.
+            boost::enable_shared_from_this<T>&
+                t(const_cast<boost::enable_shared_from_this<T>&>(ct));
+            std::cout << "Capturing shared_from_this()" << std::endl;
+            boost::shared_ptr<T> sp(t.shared_from_this());
+/*==========================================================================*|
+            std::cout << "Capturing weak_ptr" << std::endl;
+            boost::weak_ptr<T> wp(sp);
+|*==========================================================================*/
+            std::cout << "Tracking shared__ptr" << std::endl;
+            mListener.track(sp);
+        }
+#endif
+
+        // non-pointer variant
+        template<typename T>
+        void maybe_get_pointer(const T& t, truth<false>) const
+        {
+            // Take the address of this object, because the object itself may be
+            // trackable
+//          add_if_trackable(boost::addressof(t));
+        }
+
+/*==========================================================================*|
+        // add_if_trackable() adds LLEventTrackable objects to mTrackables
+        inline void add_if_trackable(const LLEventTrackable* t) const
+        {
+            if (t)
+            {
+            }
+        }
+
+        // pointer to anything not an LLEventTrackable subclass
+        inline void add_if_trackable(const void*) const
+        {
+        }
+
+        // pointer to free function
+        // The following construct uses the preprocessor to generate
+        // add_if_trackable() overloads accepting pointer-to-function taking
+        // 0, 1, ..., LLEVENTS_LISTENER_ARITY parameters of arbitrary type.
+#define BOOST_PP_LOCAL_MACRO(n)                                     \
+        template <typename R                                        \
+                  BOOST_PP_COMMA_IF(n)                              \
+                  BOOST_PP_ENUM_PARAMS(n, typename T)>              \
+        inline void                                                 \
+        add_if_trackable(R (*)(BOOST_PP_ENUM_PARAMS(n, T))) const   \
+        {                                                           \
+        }
+#define BOOST_PP_LOCAL_LIMITS (0, LLEVENTS_LISTENER_ARITY)
+#include BOOST_PP_LOCAL_ITERATE()
+#undef  BOOST_PP_LOCAL_MACRO
+#undef  BOOST_PP_LOCAL_LIMITS
+|*==========================================================================*/
+
+        /// Bind a reference to the LLEventListener to call its track() method.
+        LLEventListener& mListener;
+    };
+
+    /**
+     * Utility template function to use Visitor appropriately
+     *
+     * @param raw_listener Callable to connect, typically a boost::bind()
+     * expression. This will be visited by Visitor using boost::visit_each().
+     * @param connect_funct Callable that will connect() @a raw_listener to an
+     * LLStandardSignal, returning LLBoundListener.
+     */
+    template <typename LISTENER>
+    LLBoundListener visit_and_connect(const LISTENER& raw_listener,
+                                      const ConnectFunc& connect_func)
+    {
+        // Capture the listener
+        LLEventListener listener(raw_listener);
+        // Define our Visitor, binding the listener so we can call
+        // listener.track() if we discover any shared_ptr<Foo>.
+        LLEventDetail::Visitor visitor(listener);
+        // Allow unqualified visit_each() call for ADL
+        using boost::visit_each;
+        // Visit each component of a boost::bind() expression. Pass
+        // 'raw_listener', our template argument, rather than 'listener' from
+        // which type details have been erased. unwrap() comes from
+        // Boost.Signals, in case we were passed a boost::ref().
+        visit_each(visitor, LLEventDetail::unwrap(raw_listener));
+        // Make the connection using passed function. At present, wrapping
+        // this functionality into this function is a bit silly: we don't
+        // really need a visit_and_connect() function any more, just a visit()
+        // function. The definition of this function dates from when, after
+        // visit_each(), after establishing the connection, we had to
+        // postprocess the new connection with the visitor object. That's no
+        // longer necessary.
+        return connect_func(listener);
+    }
+} // namespace LLEventDetail
+
+// Somewhat to my surprise, passing boost::bind(...boost::weak_ptr<T>...) to
+// listen() fails in Boost code trying to instantiate LLEventListener (i.e.
+// LLStandardSignal::slot_type) because the boost::get_pointer() utility function isn't
+// specialized for boost::weak_ptr. This remedies that omission.
+namespace boost
+{
+    template <typename T>
+    T* get_pointer(const weak_ptr<T>& ptr) { return shared_ptr<T>(ptr).get(); }
+}
+
+/// Since we forbid use of listen(boost::bind(...shared_ptr<T>...)), provide an
+/// easy way to cast to the corresponding weak_ptr.
+template <typename T>
+boost::weak_ptr<T> weaken(const boost::shared_ptr<T>& ptr)
+{
+    return boost::weak_ptr<T>(ptr);
+}
+
+#endif /* ! defined(LL_LLEVENTS_H) */
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h
index 612068b202..0488585fd4 100644
--- a/indra/llcommon/llfasttimer.h
+++ b/indra/llcommon/llfasttimer.h
@@ -1,352 +1,352 @@
-/** 
- * @file llfasttimer.h
- * @brief Declaration of a fast timer.
- *
- * $LicenseInfo:firstyear=2004&license=viewergpl$
- * 
- * Copyright (c) 2004-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#ifndef LL_FASTTIMER_H
-#define LL_FASTTIMER_H
-
-#include "llinstancetracker.h"
-
-#define FAST_TIMER_ON 1
-
-U64 get_cpu_clock_count();
-
-class LLMutex;
-
-#include <queue>
-#include "llsd.h"
-
-
-class LLFastTimer
-{
-public:
-	// stores a "named" timer instance to be reused via multiple LLFastTimer stack instances
-	class NamedTimer 
-	:	public LLInstanceTracker<NamedTimer>
-	{
-	public:
-		~NamedTimer();
-
-		enum { HISTORY_NUM = 60 };
-
-		const std::string& getName() { return mName; }
-		NamedTimer* getParent() { return mParent; }
-		void setParent(NamedTimer* parent);
-		S32 getDepth();
-		std::string getToolTip(S32 history_index = -1);
-
-		typedef std::vector<NamedTimer*>::const_iterator child_const_iter;
-		child_const_iter beginChildren();
-		child_const_iter endChildren();
-		std::vector<NamedTimer*>& getChildren();
-
-		void setCollapsed(bool collapsed) { mCollapsed = collapsed; }
-		bool getCollapsed() { return mCollapsed; }
-
-		U64 getCountAverage() { return mCountAverage; }
-		U64 getCallAverage() { return mCallAverage; }
-
-		U64 getHistoricalCount(S32 history_index = 0);
-		U64 getHistoricalCalls(S32 history_index = 0);
-
-		static NamedTimer& getRootNamedTimer();
-
-		struct FrameState
-		{
-			FrameState(NamedTimer* timerp);
-
-			U64 		mSelfTimeCounter;
-			U64			mLastStartTime;		// most recent time when this timer was started
-			U32 		mCalls;
-			FrameState*	mParent;		// info for caller timer
-			FrameState*	mLastCaller;	// used to bootstrap tree construction
-			NamedTimer*	mTimer;
-			U16			mActiveCount;	// number of timers with this ID active on stack
-			bool		mMoveUpTree;	// needs to be moved up the tree of timers at the end of frame
-		};
-
-		FrameState& getFrameStateFast() const
-		{
-			return (*sTimerInfos)[mFrameStateIndex];
-		}
-
-		S32 getFrameStateIndex() const { return mFrameStateIndex; }
-
-		FrameState& getFrameState() const;
-
-
-	private: 
-		friend class LLFastTimer;
-		friend class NamedTimerFactory;
-
-		//
-		// methods
-		//
-		NamedTimer(const std::string& name);
-		// recursive call to gather total time from children
-		static void accumulateTimings();
-
-		// called once per frame by LLFastTimer
-		static void processFrame();
-
-		static void buildHierarchy();
-		static void resetFrame();
-		static void reset();
-
-		typedef std::vector<FrameState> info_list_t;
-		static info_list_t& getFrameStateList();
-		static void createFrameStateList(); // must call before any call to getFrameStateList()
-		
-		//
-		// members
-		//
-		S32			mFrameStateIndex;
-
-		std::string	mName;
-
-		U64 		mTotalTimeCounter;
-
-		U64 		mCountAverage;
-		U64			mCallAverage;
-
-		U64*		mCountHistory;
-		U64*		mCallHistory;
-
-		// tree structure
-		NamedTimer*					mParent;				// NamedTimer of caller(parent)
-		std::vector<NamedTimer*>	mChildren;
-		bool						mCollapsed;				// don't show children
-		bool						mNeedsSorting;			// sort children whenever child added
-
-		static info_list_t* sTimerInfos;
-	};
-
-	// used to statically declare a new named timer
-	class DeclareTimer
-	{
-	public:
-		DeclareTimer(const std::string& name, bool open);
-		DeclareTimer(const std::string& name);
-
-		// convertable to NamedTimer::FrameState for convenient usage of LLFastTimer(declared_timer)
-		operator NamedTimer::FrameState&() { return mNamedTimer.getFrameStateFast(); }
-	private:
-		NamedTimer& mNamedTimer;
-	};
-
-	static DeclareTimer FTM_ARRANGE;
-	static DeclareTimer FTM_ATTACHMENT_UPDATE;
-	static DeclareTimer FTM_AUDIO_UPDATE;
-	static DeclareTimer FTM_AUTO_SELECT;
-	static DeclareTimer FTM_AVATAR_UPDATE;
-	static DeclareTimer FTM_CLEANUP;
-	static DeclareTimer FTM_CLIENT_COPY;
-	static DeclareTimer FTM_CREATE_OBJECT;
-	static DeclareTimer FTM_CULL;
-	static DeclareTimer FTM_CULL_REBOUND;
-	static DeclareTimer FTM_FILTER;
-	static DeclareTimer FTM_FLEXIBLE_UPDATE;
-	static DeclareTimer FTM_FRAME;
-	static DeclareTimer FTM_FRUSTUM_CULL;
-	static DeclareTimer FTM_GEN_FLEX;
-	static DeclareTimer FTM_GEN_TRIANGLES;
-	static DeclareTimer FTM_GEN_VOLUME;
-	static DeclareTimer FTM_GEO_SKY;
-	static DeclareTimer FTM_GEO_UPDATE;
-	static DeclareTimer FTM_HUD_EFFECTS;
-	static DeclareTimer FTM_HUD_UPDATE;
-	static DeclareTimer FTM_IDLE;
-	static DeclareTimer FTM_IDLE_CB;
-	static DeclareTimer FTM_IDLE_NETWORK;
-	static DeclareTimer FTM_IMAGE_CREATE;
-	static DeclareTimer FTM_IMAGE_MARK_DIRTY;
-	static DeclareTimer FTM_IMAGE_UPDATE;
-	static DeclareTimer FTM_INVENTORY;
-	static DeclareTimer FTM_JOINT_UPDATE;
-	static DeclareTimer FTM_KEYHANDLER;
-	static DeclareTimer FTM_LOAD_AVATAR;
-	static DeclareTimer FTM_LOD_UPDATE;
-	static DeclareTimer FTM_MESSAGES;
-	static DeclareTimer FTM_MOUSEHANDLER;
-	static DeclareTimer FTM_NETWORK;
-	static DeclareTimer FTM_OBJECTLIST_UPDATE;
-	static DeclareTimer FTM_OCCLUSION_READBACK;
-	static DeclareTimer FTM_OCTREE_BALANCE;
-	static DeclareTimer FTM_PICK;
-	static DeclareTimer FTM_PIPELINE;
-	static DeclareTimer FTM_POOLRENDER;
-	static DeclareTimer FTM_POOLS;
-	static DeclareTimer FTM_PROCESS_IMAGES;
-	static DeclareTimer FTM_PROCESS_MESSAGES;
-	static DeclareTimer FTM_PROCESS_OBJECTS;
-	static DeclareTimer FTM_PUMP;
-	static DeclareTimer FTM_REBUILD_GRASS_VB;
-	static DeclareTimer FTM_REBUILD_PARTICLE_VB;
-	static DeclareTimer FTM_REBUILD_TERRAIN_VB;
-	static DeclareTimer FTM_REBUILD_VBO;
-	static DeclareTimer FTM_REBUILD_VOLUME_VB;
-	static DeclareTimer FTM_REFRESH;
-	static DeclareTimer FTM_REGION_UPDATE;
-	static DeclareTimer FTM_RENDER;
-	static DeclareTimer FTM_RENDER_ALPHA;
-	static DeclareTimer FTM_RENDER_BLOOM;
-	static DeclareTimer FTM_RENDER_BLOOM_FBO;
-	static DeclareTimer FTM_RENDER_BUMP;
-	static DeclareTimer FTM_RENDER_CHARACTERS;
-	static DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE;
-	static DeclareTimer FTM_RENDER_FONTS;
-	static DeclareTimer FTM_RENDER_FULLBRIGHT;
-	static DeclareTimer FTM_RENDER_GEOMETRY;
-	static DeclareTimer FTM_RENDER_GLOW;
-	static DeclareTimer FTM_RENDER_GRASS;
-	static DeclareTimer FTM_RENDER_INVISIBLE;
-	static DeclareTimer FTM_RENDER_OCCLUSION;
-	static DeclareTimer FTM_RENDER_SHINY;
-	static DeclareTimer FTM_RENDER_SIMPLE;
-	static DeclareTimer FTM_RENDER_TERRAIN;
-	static DeclareTimer FTM_RENDER_TREES;
-	static DeclareTimer FTM_RENDER_UI;
-	static DeclareTimer FTM_RENDER_WATER;
-	static DeclareTimer FTM_RENDER_WL_SKY;
-	static DeclareTimer FTM_RESET_DRAWORDER;
-	static DeclareTimer FTM_SHADOW_ALPHA;
-	static DeclareTimer FTM_SHADOW_AVATAR;
-	static DeclareTimer FTM_SHADOW_RENDER;
-	static DeclareTimer FTM_SHADOW_SIMPLE;
-	static DeclareTimer FTM_SHADOW_TERRAIN;
-	static DeclareTimer FTM_SHADOW_TREE;
-	static DeclareTimer FTM_SIMULATE_PARTICLES;
-	static DeclareTimer FTM_SLEEP;
-	static DeclareTimer FTM_SORT;
-	static DeclareTimer FTM_STATESORT;
-	static DeclareTimer FTM_STATESORT_DRAWABLE;
-	static DeclareTimer FTM_STATESORT_POSTSORT;
-	static DeclareTimer FTM_SWAP;
-	static DeclareTimer FTM_TEMP1;
-	static DeclareTimer FTM_TEMP2;
-	static DeclareTimer FTM_TEMP3;
-	static DeclareTimer FTM_TEMP4;
-	static DeclareTimer FTM_TEMP5;
-	static DeclareTimer FTM_TEMP6;
-	static DeclareTimer FTM_TEMP7;
-	static DeclareTimer FTM_TEMP8;
-	static DeclareTimer FTM_UPDATE_ANIMATION;
-	static DeclareTimer FTM_UPDATE_AVATAR;
-	static DeclareTimer FTM_UPDATE_CLOUDS;
-	static DeclareTimer FTM_UPDATE_GRASS;
-	static DeclareTimer FTM_UPDATE_MOVE;
-	static DeclareTimer FTM_UPDATE_PARTICLES;
-	static DeclareTimer FTM_UPDATE_PRIMITIVES;
-	static DeclareTimer FTM_UPDATE_SKY;
-	static DeclareTimer FTM_UPDATE_TERRAIN;
-	static DeclareTimer FTM_UPDATE_TEXTURES;
-	static DeclareTimer FTM_UPDATE_TREE;
-	static DeclareTimer FTM_UPDATE_WATER;
-	static DeclareTimer FTM_UPDATE_WLPARAM;
-	static DeclareTimer FTM_VFILE_WAIT;
-	static DeclareTimer FTM_WORLD_UPDATE;
-
-public:
-	enum RootTimerMarker { ROOT };
-	
-	static LLMutex* sLogLock;
-	static std::queue<LLSD> sLogQueue;
-	static BOOL sLog;
-	static BOOL sMetricLog;
-
-	LLFastTimer(RootTimerMarker);
-
-	LLFastTimer(NamedTimer::FrameState& timer)
-	:	mFrameState(&timer)
-	{
-		NamedTimer::FrameState* frame_state = mFrameState;
-		frame_state->mLastStartTime = get_cpu_clock_count();
-		mStartSelfTime = frame_state->mLastStartTime;
-
-		frame_state->mActiveCount++;
-		frame_state->mCalls++;
-		// keep current parent as long as it is active when we are
-		frame_state->mMoveUpTree |= (frame_state->mParent->mActiveCount == 0);
-	
-		mLastTimer = sCurTimer;
-		sCurTimer = this;
-	}
-
-	~LLFastTimer()
-	{
-#if FAST_TIMER_ON
-		NamedTimer::FrameState* frame_state = mFrameState;
-		U64 cur_time = get_cpu_clock_count();
-		frame_state->mSelfTimeCounter += cur_time - mStartSelfTime;
-
-		frame_state->mActiveCount--;
-		LLFastTimer* last_timer = mLastTimer;
-		sCurTimer = last_timer;
-
-		// store last caller to bootstrap tree creation
-		frame_state->mLastCaller = last_timer->mFrameState;
-
-		// we are only tracking self time, so subtract our total time delta from parents
-		U64 total_time = cur_time - frame_state->mLastStartTime;
-		last_timer->mStartSelfTime += total_time;
-#endif
-	}
-
-
-	// call this once a frame to reset timers
-	static void nextFrame();
-
-	// call this to reset timer hierarchy, averages, etc.
-	static void reset();
-
-	static U64 countsPerSecond();
-	static S32 getLastFrameIndex() { return sLastFrameIndex; }
-	static S32 getCurFrameIndex() { return sCurFrameIndex; }
-
-	static void writeLog(std::ostream& os);
-
-public:
-	static bool 		sPauseHistory;
-	static bool 		sResetHistory;
-	
-private:
-	typedef std::vector<LLFastTimer*> timer_stack_t;
-	static LLFastTimer*		sCurTimer;
-	static S32				sCurFrameIndex;
-	static S32				sLastFrameIndex;
-
-	static F64				sCPUClockFrequency;
-	U64						mStartSelfTime;	// start time + time of all child timers
-	NamedTimer::FrameState*	mFrameState;
-	LLFastTimer*			mLastTimer;
-};
-
-#endif // LL_LLFASTTIMER_H
+/** 
+ * @file llfasttimer.h
+ * @brief Declaration of a fast timer.
+ *
+ * $LicenseInfo:firstyear=2004&license=viewergpl$
+ * 
+ * Copyright (c) 2004-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_FASTTIMER_H
+#define LL_FASTTIMER_H
+
+#include "llinstancetracker.h"
+
+#define FAST_TIMER_ON 1
+
+LL_COMMON_API U64 get_cpu_clock_count();
+
+class LLMutex;
+
+#include <queue>
+#include "llsd.h"
+
+
+class LL_COMMON_API LLFastTimer
+{
+public:
+	// stores a "named" timer instance to be reused via multiple LLFastTimer stack instances
+	class LL_COMMON_API NamedTimer 
+	:	public LLInstanceTracker<NamedTimer>
+	{
+	public:
+		~NamedTimer();
+
+		enum { HISTORY_NUM = 60 };
+
+		const std::string& getName() { return mName; }
+		NamedTimer* getParent() { return mParent; }
+		void setParent(NamedTimer* parent);
+		S32 getDepth();
+		std::string getToolTip(S32 history_index = -1);
+
+		typedef std::vector<NamedTimer*>::const_iterator child_const_iter;
+		child_const_iter beginChildren();
+		child_const_iter endChildren();
+		std::vector<NamedTimer*>& getChildren();
+
+		void setCollapsed(bool collapsed) { mCollapsed = collapsed; }
+		bool getCollapsed() { return mCollapsed; }
+
+		U64 getCountAverage() { return mCountAverage; }
+		U64 getCallAverage() { return mCallAverage; }
+
+		U64 getHistoricalCount(S32 history_index = 0);
+		U64 getHistoricalCalls(S32 history_index = 0);
+
+		static NamedTimer& getRootNamedTimer();
+
+		struct FrameState
+		{
+			FrameState(NamedTimer* timerp);
+
+			U64 		mSelfTimeCounter;
+			U64			mLastStartTime;		// most recent time when this timer was started
+			U32 		mCalls;
+			FrameState*	mParent;		// info for caller timer
+			FrameState*	mLastCaller;	// used to bootstrap tree construction
+			NamedTimer*	mTimer;
+			U16			mActiveCount;	// number of timers with this ID active on stack
+			bool		mMoveUpTree;	// needs to be moved up the tree of timers at the end of frame
+		};
+
+		FrameState& getFrameStateFast() const
+		{
+			return (*sTimerInfos)[mFrameStateIndex];
+		}
+
+		S32 getFrameStateIndex() const { return mFrameStateIndex; }
+
+		FrameState& getFrameState() const;
+
+
+	private: 
+		friend class LLFastTimer;
+		friend class NamedTimerFactory;
+
+		//
+		// methods
+		//
+		NamedTimer(const std::string& name);
+		// recursive call to gather total time from children
+		static void accumulateTimings();
+
+		// called once per frame by LLFastTimer
+		static void processFrame();
+
+		static void buildHierarchy();
+		static void resetFrame();
+		static void reset();
+
+		typedef std::vector<FrameState> info_list_t;
+		static info_list_t& getFrameStateList();
+		static void createFrameStateList(); // must call before any call to getFrameStateList()
+		
+		//
+		// members
+		//
+		S32			mFrameStateIndex;
+
+		std::string	mName;
+
+		U64 		mTotalTimeCounter;
+
+		U64 		mCountAverage;
+		U64			mCallAverage;
+
+		U64*		mCountHistory;
+		U64*		mCallHistory;
+
+		// tree structure
+		NamedTimer*					mParent;				// NamedTimer of caller(parent)
+		std::vector<NamedTimer*>	mChildren;
+		bool						mCollapsed;				// don't show children
+		bool						mNeedsSorting;			// sort children whenever child added
+
+		static info_list_t* sTimerInfos;
+	};
+
+	// used to statically declare a new named timer
+	class LL_COMMON_API DeclareTimer
+	{
+	public:
+		DeclareTimer(const std::string& name, bool open);
+		DeclareTimer(const std::string& name);
+
+		// convertable to NamedTimer::FrameState for convenient usage of LLFastTimer(declared_timer)
+		operator NamedTimer::FrameState&() { return mNamedTimer.getFrameStateFast(); }
+	private:
+		NamedTimer& mNamedTimer;
+	};
+
+	static DeclareTimer FTM_ARRANGE;
+	static DeclareTimer FTM_ATTACHMENT_UPDATE;
+	static DeclareTimer FTM_AUDIO_UPDATE;
+	static DeclareTimer FTM_AUTO_SELECT;
+	static DeclareTimer FTM_AVATAR_UPDATE;
+	static DeclareTimer FTM_CLEANUP;
+	static DeclareTimer FTM_CLIENT_COPY;
+	static DeclareTimer FTM_CREATE_OBJECT;
+	static DeclareTimer FTM_CULL;
+	static DeclareTimer FTM_CULL_REBOUND;
+	static DeclareTimer FTM_FILTER;
+	static DeclareTimer FTM_FLEXIBLE_UPDATE;
+	static DeclareTimer FTM_FRAME;
+	static DeclareTimer FTM_FRUSTUM_CULL;
+	static DeclareTimer FTM_GEN_FLEX;
+	static DeclareTimer FTM_GEN_TRIANGLES;
+	static DeclareTimer FTM_GEN_VOLUME;
+	static DeclareTimer FTM_GEO_SKY;
+	static DeclareTimer FTM_GEO_UPDATE;
+	static DeclareTimer FTM_HUD_EFFECTS;
+	static DeclareTimer FTM_HUD_UPDATE;
+	static DeclareTimer FTM_IDLE;
+	static DeclareTimer FTM_IDLE_CB;
+	static DeclareTimer FTM_IDLE_NETWORK;
+	static DeclareTimer FTM_IMAGE_CREATE;
+	static DeclareTimer FTM_IMAGE_MARK_DIRTY;
+	static DeclareTimer FTM_IMAGE_UPDATE;
+	static DeclareTimer FTM_INVENTORY;
+	static DeclareTimer FTM_JOINT_UPDATE;
+	static DeclareTimer FTM_KEYHANDLER;
+	static DeclareTimer FTM_LOAD_AVATAR;
+	static DeclareTimer FTM_LOD_UPDATE;
+	static DeclareTimer FTM_MESSAGES;
+	static DeclareTimer FTM_MOUSEHANDLER;
+	static DeclareTimer FTM_NETWORK;
+	static DeclareTimer FTM_OBJECTLIST_UPDATE;
+	static DeclareTimer FTM_OCCLUSION_READBACK;
+	static DeclareTimer FTM_OCTREE_BALANCE;
+	static DeclareTimer FTM_PICK;
+	static DeclareTimer FTM_PIPELINE;
+	static DeclareTimer FTM_POOLRENDER;
+	static DeclareTimer FTM_POOLS;
+	static DeclareTimer FTM_PROCESS_IMAGES;
+	static DeclareTimer FTM_PROCESS_MESSAGES;
+	static DeclareTimer FTM_PROCESS_OBJECTS;
+	static DeclareTimer FTM_PUMP;
+	static DeclareTimer FTM_REBUILD_GRASS_VB;
+	static DeclareTimer FTM_REBUILD_PARTICLE_VB;
+	static DeclareTimer FTM_REBUILD_TERRAIN_VB;
+	static DeclareTimer FTM_REBUILD_VBO;
+	static DeclareTimer FTM_REBUILD_VOLUME_VB;
+	static DeclareTimer FTM_REFRESH;
+	static DeclareTimer FTM_REGION_UPDATE;
+	static DeclareTimer FTM_RENDER;
+	static DeclareTimer FTM_RENDER_ALPHA;
+	static DeclareTimer FTM_RENDER_BLOOM;
+	static DeclareTimer FTM_RENDER_BLOOM_FBO;
+	static DeclareTimer FTM_RENDER_BUMP;
+	static DeclareTimer FTM_RENDER_CHARACTERS;
+	static DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE;
+	static DeclareTimer FTM_RENDER_FONTS;
+	static DeclareTimer FTM_RENDER_FULLBRIGHT;
+	static DeclareTimer FTM_RENDER_GEOMETRY;
+	static DeclareTimer FTM_RENDER_GLOW;
+	static DeclareTimer FTM_RENDER_GRASS;
+	static DeclareTimer FTM_RENDER_INVISIBLE;
+	static DeclareTimer FTM_RENDER_OCCLUSION;
+	static DeclareTimer FTM_RENDER_SHINY;
+	static DeclareTimer FTM_RENDER_SIMPLE;
+	static DeclareTimer FTM_RENDER_TERRAIN;
+	static DeclareTimer FTM_RENDER_TREES;
+	static DeclareTimer FTM_RENDER_UI;
+	static DeclareTimer FTM_RENDER_WATER;
+	static DeclareTimer FTM_RENDER_WL_SKY;
+	static DeclareTimer FTM_RESET_DRAWORDER;
+	static DeclareTimer FTM_SHADOW_ALPHA;
+	static DeclareTimer FTM_SHADOW_AVATAR;
+	static DeclareTimer FTM_SHADOW_RENDER;
+	static DeclareTimer FTM_SHADOW_SIMPLE;
+	static DeclareTimer FTM_SHADOW_TERRAIN;
+	static DeclareTimer FTM_SHADOW_TREE;
+	static DeclareTimer FTM_SIMULATE_PARTICLES;
+	static DeclareTimer FTM_SLEEP;
+	static DeclareTimer FTM_SORT;
+	static DeclareTimer FTM_STATESORT;
+	static DeclareTimer FTM_STATESORT_DRAWABLE;
+	static DeclareTimer FTM_STATESORT_POSTSORT;
+	static DeclareTimer FTM_SWAP;
+	static DeclareTimer FTM_TEMP1;
+	static DeclareTimer FTM_TEMP2;
+	static DeclareTimer FTM_TEMP3;
+	static DeclareTimer FTM_TEMP4;
+	static DeclareTimer FTM_TEMP5;
+	static DeclareTimer FTM_TEMP6;
+	static DeclareTimer FTM_TEMP7;
+	static DeclareTimer FTM_TEMP8;
+	static DeclareTimer FTM_UPDATE_ANIMATION;
+	static DeclareTimer FTM_UPDATE_AVATAR;
+	static DeclareTimer FTM_UPDATE_CLOUDS;
+	static DeclareTimer FTM_UPDATE_GRASS;
+	static DeclareTimer FTM_UPDATE_MOVE;
+	static DeclareTimer FTM_UPDATE_PARTICLES;
+	static DeclareTimer FTM_UPDATE_PRIMITIVES;
+	static DeclareTimer FTM_UPDATE_SKY;
+	static DeclareTimer FTM_UPDATE_TERRAIN;
+	static DeclareTimer FTM_UPDATE_TEXTURES;
+	static DeclareTimer FTM_UPDATE_TREE;
+	static DeclareTimer FTM_UPDATE_WATER;
+	static DeclareTimer FTM_UPDATE_WLPARAM;
+	static DeclareTimer FTM_VFILE_WAIT;
+	static DeclareTimer FTM_WORLD_UPDATE;
+
+public:
+	enum RootTimerMarker { ROOT };
+	
+	static LLMutex* sLogLock;
+	static std::queue<LLSD> sLogQueue;
+	static BOOL sLog;
+	static BOOL sMetricLog;
+
+	LLFastTimer(RootTimerMarker);
+
+	LLFastTimer(NamedTimer::FrameState& timer)
+	:	mFrameState(&timer)
+	{
+		NamedTimer::FrameState* frame_state = mFrameState;
+		frame_state->mLastStartTime = get_cpu_clock_count();
+		mStartSelfTime = frame_state->mLastStartTime;
+
+		frame_state->mActiveCount++;
+		frame_state->mCalls++;
+		// keep current parent as long as it is active when we are
+		frame_state->mMoveUpTree |= (frame_state->mParent->mActiveCount == 0);
+	
+		mLastTimer = sCurTimer;
+		sCurTimer = this;
+	}
+
+	~LLFastTimer()
+	{
+#if FAST_TIMER_ON
+		NamedTimer::FrameState* frame_state = mFrameState;
+		U64 cur_time = get_cpu_clock_count();
+		frame_state->mSelfTimeCounter += cur_time - mStartSelfTime;
+
+		frame_state->mActiveCount--;
+		LLFastTimer* last_timer = mLastTimer;
+		sCurTimer = last_timer;
+
+		// store last caller to bootstrap tree creation
+		frame_state->mLastCaller = last_timer->mFrameState;
+
+		// we are only tracking self time, so subtract our total time delta from parents
+		U64 total_time = cur_time - frame_state->mLastStartTime;
+		last_timer->mStartSelfTime += total_time;
+#endif
+	}
+
+
+	// call this once a frame to reset timers
+	static void nextFrame();
+
+	// call this to reset timer hierarchy, averages, etc.
+	static void reset();
+
+	static U64 countsPerSecond();
+	static S32 getLastFrameIndex() { return sLastFrameIndex; }
+	static S32 getCurFrameIndex() { return sCurFrameIndex; }
+
+	static void writeLog(std::ostream& os);
+
+public:
+	static bool 		sPauseHistory;
+	static bool 		sResetHistory;
+	
+private:
+	typedef std::vector<LLFastTimer*> timer_stack_t;
+	static LLFastTimer*		sCurTimer;
+	static S32				sCurFrameIndex;
+	static S32				sLastFrameIndex;
+
+	static F64				sCPUClockFrequency;
+	U64						mStartSelfTime;	// start time + time of all child timers
+	NamedTimer::FrameState*	mFrameState;
+	LLFastTimer*			mLastTimer;
+};
+
+#endif // LL_LLFASTTIMER_H
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index f41da37ba6..09f19532b7 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -1,65 +1,65 @@
-/** 
- * @file llmemory.h
- * @brief Memory allocation/deallocation header-stuff goes here.
- *
- * $LicenseInfo:firstyear=2002&license=viewergpl$
- * 
- * Copyright (c) 2002-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-#ifndef LLMEMORY_H
-#define LLMEMORY_H
-
-
-
-extern S32 gTotalDAlloc;
-extern S32 gTotalDAUse;
-extern S32 gDACount;
-
-extern void* ll_allocate (size_t size);
-extern void ll_release (void *p);
-
-class LLMemory
-{
-public:
-	static void initClass();
-	static void cleanupClass();
-	static void freeReserve();
-	// Return the resident set size of the current process, in bytes.
-	// Return value is zero if not known.
-	static U64 getCurrentRSS();
-private:
-	static char* reserveMem;
-};
-
-// LLRefCount moved to llrefcount.h
-
-// LLPointer moved to llpointer.h
-
-// LLSafeHandle moved to llsafehandle.h
-
-// LLSingleton moved to llsingleton.h
-
-#endif
+/** 
+ * @file llmemory.h
+ * @brief Memory allocation/deallocation header-stuff goes here.
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ * 
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#ifndef LLMEMORY_H
+#define LLMEMORY_H
+
+
+
+extern S32 gTotalDAlloc;
+extern S32 gTotalDAUse;
+extern S32 gDACount;
+
+extern void* ll_allocate (size_t size);
+extern void ll_release (void *p);
+
+class LL_COMMON_API LLMemory
+{
+public:
+	static void initClass();
+	static void cleanupClass();
+	static void freeReserve();
+	// Return the resident set size of the current process, in bytes.
+	// Return value is zero if not known.
+	static U64 getCurrentRSS();
+private:
+	static char* reserveMem;
+};
+
+// LLRefCount moved to llrefcount.h
+
+// LLPointer moved to llpointer.h
+
+// LLSafeHandle moved to llsafehandle.h
+
+// LLSingleton moved to llsingleton.h
+
+#endif
diff --git a/indra/llcommon/llmemtype.h b/indra/llcommon/llmemtype.h
index 12310fcdb4..5952a3a7c5 100644
--- a/indra/llcommon/llmemtype.h
+++ b/indra/llcommon/llmemtype.h
@@ -1,248 +1,248 @@
-/** 
- * @file llmemtype.h
- * @brief Runtime memory usage debugging utilities.
- *
- * $LicenseInfo:firstyear=2005&license=viewergpl$
- * 
- * Copyright (c) 2005-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#ifndef LL_MEMTYPE_H
-#define LL_MEMTYPE_H
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
-//----------------------------------------------------------------------------
-
-#include "linden_common.h"
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-// WARNING: Never commit with MEM_TRACK_MEM == 1
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-#define MEM_TRACK_MEM (0 && LL_WINDOWS)
-
-#include <vector>
-
-#define MEM_TYPE_NEW(T)
-
-class LLMemType
-{
-public:
-
-	// class we'll initialize all instances of as
-	// static members of MemType.  Then use
-	// to construct any new mem type.
-	class DeclareMemType
-	{
-	public:
-		DeclareMemType(char const * st);
-		~DeclareMemType();
-	
-		S32 mID;
-		char const * mName;
-		
-		// array so we can map an index ID to Name
-		static std::vector<char const *> mNameList;
-	};
-
-	LLMemType(DeclareMemType& dt);
-	~LLMemType();
-
-	static char const * getNameFromID(S32 id);
-
-	static DeclareMemType MTYPE_INIT;
-	static DeclareMemType MTYPE_STARTUP;
-	static DeclareMemType MTYPE_MAIN;
-	static DeclareMemType MTYPE_FRAME;
-
-	static DeclareMemType MTYPE_GATHER_INPUT;
-	static DeclareMemType MTYPE_JOY_KEY;
-
-	static DeclareMemType MTYPE_IDLE;
-	static DeclareMemType MTYPE_IDLE_PUMP;
-	static DeclareMemType MTYPE_IDLE_NETWORK;
-	static DeclareMemType MTYPE_IDLE_UPDATE_REGIONS;
-	static DeclareMemType MTYPE_IDLE_UPDATE_VIEWER_REGION;
-	static DeclareMemType MTYPE_IDLE_UPDATE_SURFACE;
-	static DeclareMemType MTYPE_IDLE_UPDATE_PARCEL_OVERLAY;
-	static DeclareMemType MTYPE_IDLE_AUDIO;
-
-	static DeclareMemType MTYPE_CACHE_PROCESS_PENDING;
-	static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_ASKS;
-	static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_REPLIES;
-
-	static DeclareMemType MTYPE_MESSAGE_CHECK_ALL;
-	static DeclareMemType MTYPE_MESSAGE_PROCESS_ACKS;
-
-	static DeclareMemType MTYPE_RENDER;
-	static DeclareMemType MTYPE_SLEEP;
-
-	static DeclareMemType MTYPE_NETWORK;
-	static DeclareMemType MTYPE_PHYSICS;
-	static DeclareMemType MTYPE_INTERESTLIST;
-
-	static DeclareMemType MTYPE_IMAGEBASE;
-	static DeclareMemType MTYPE_IMAGERAW;
-	static DeclareMemType MTYPE_IMAGEFORMATTED;
-	
-	static DeclareMemType MTYPE_APPFMTIMAGE;
-	static DeclareMemType MTYPE_APPRAWIMAGE;
-	static DeclareMemType MTYPE_APPAUXRAWIMAGE;
-	
-	static DeclareMemType MTYPE_DRAWABLE;
-	
-	static DeclareMemType MTYPE_OBJECT;
-	static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE;
-	static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE_CORE;
-
-	static DeclareMemType MTYPE_DISPLAY;
-	static DeclareMemType MTYPE_DISPLAY_UPDATE;
-	static DeclareMemType MTYPE_DISPLAY_UPDATE_CAMERA;
-	static DeclareMemType MTYPE_DISPLAY_UPDATE_GEOM;
-	static DeclareMemType MTYPE_DISPLAY_SWAP;
-	static DeclareMemType MTYPE_DISPLAY_UPDATE_HUD;
-	static DeclareMemType MTYPE_DISPLAY_GEN_REFLECTION;
-	static DeclareMemType MTYPE_DISPLAY_IMAGE_UPDATE;
-	static DeclareMemType MTYPE_DISPLAY_STATE_SORT;
-	static DeclareMemType MTYPE_DISPLAY_SKY;
-	static DeclareMemType MTYPE_DISPLAY_RENDER_GEOM;
-	static DeclareMemType MTYPE_DISPLAY_RENDER_FLUSH;
-	static DeclareMemType MTYPE_DISPLAY_RENDER_UI;
-	static DeclareMemType MTYPE_DISPLAY_RENDER_ATTACHMENTS;
-
-	static DeclareMemType MTYPE_VERTEX_DATA;
-	static DeclareMemType MTYPE_VERTEX_CONSTRUCTOR;
-	static DeclareMemType MTYPE_VERTEX_DESTRUCTOR;
-	static DeclareMemType MTYPE_VERTEX_CREATE_VERTICES;
-	static DeclareMemType MTYPE_VERTEX_CREATE_INDICES;
-	static DeclareMemType MTYPE_VERTEX_DESTROY_BUFFER;	
-	static DeclareMemType MTYPE_VERTEX_DESTROY_INDICES;
-	static DeclareMemType MTYPE_VERTEX_UPDATE_VERTS;
-	static DeclareMemType MTYPE_VERTEX_UPDATE_INDICES;
-	static DeclareMemType MTYPE_VERTEX_ALLOCATE_BUFFER;
-	static DeclareMemType MTYPE_VERTEX_RESIZE_BUFFER;
-	static DeclareMemType MTYPE_VERTEX_MAP_BUFFER;
-	static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_VERTICES;
-	static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_INDICES;
-	static DeclareMemType MTYPE_VERTEX_UNMAP_BUFFER;
-	static DeclareMemType MTYPE_VERTEX_SET_STRIDE;
-	static DeclareMemType MTYPE_VERTEX_SET_BUFFER;
-	static DeclareMemType MTYPE_VERTEX_SETUP_VERTEX_BUFFER;
-	static DeclareMemType MTYPE_VERTEX_CLEANUP_CLASS;
-
-	static DeclareMemType MTYPE_SPACE_PARTITION;
-
-	static DeclareMemType MTYPE_PIPELINE;
-	static DeclareMemType MTYPE_PIPELINE_INIT;
-	static DeclareMemType MTYPE_PIPELINE_CREATE_BUFFERS;
-	static DeclareMemType MTYPE_PIPELINE_RESTORE_GL;
-	static DeclareMemType MTYPE_PIPELINE_UNLOAD_SHADERS;
-	static DeclareMemType MTYPE_PIPELINE_LIGHTING_DETAIL;
-	static DeclareMemType MTYPE_PIPELINE_GET_POOL_TYPE;
-	static DeclareMemType MTYPE_PIPELINE_ADD_POOL;
-	static DeclareMemType MTYPE_PIPELINE_ALLOCATE_DRAWABLE;
-	static DeclareMemType MTYPE_PIPELINE_ADD_OBJECT;
-	static DeclareMemType MTYPE_PIPELINE_CREATE_OBJECTS;
-	static DeclareMemType MTYPE_PIPELINE_UPDATE_MOVE;
-	static DeclareMemType MTYPE_PIPELINE_UPDATE_GEOM;
-	static DeclareMemType MTYPE_PIPELINE_MARK_VISIBLE;
-	static DeclareMemType MTYPE_PIPELINE_MARK_MOVED;
-	static DeclareMemType MTYPE_PIPELINE_MARK_SHIFT;
-	static DeclareMemType MTYPE_PIPELINE_SHIFT_OBJECTS;
-	static DeclareMemType MTYPE_PIPELINE_MARK_TEXTURED;
-	static DeclareMemType MTYPE_PIPELINE_MARK_REBUILD;
-	static DeclareMemType MTYPE_PIPELINE_UPDATE_CULL;
-	static DeclareMemType MTYPE_PIPELINE_STATE_SORT;
-	static DeclareMemType MTYPE_PIPELINE_POST_SORT;
-	
-	static DeclareMemType MTYPE_PIPELINE_RENDER_HUD_ELS;
-	static DeclareMemType MTYPE_PIPELINE_RENDER_HL;
-	static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM;
-	static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED;
-	static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_POST_DEF;
-	static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_SHADOW;
-	static DeclareMemType MTYPE_PIPELINE_RENDER_SELECT;
-	static DeclareMemType MTYPE_PIPELINE_REBUILD_POOLS;
-	static DeclareMemType MTYPE_PIPELINE_QUICK_LOOKUP;
-	static DeclareMemType MTYPE_PIPELINE_RENDER_OBJECTS;
-	static DeclareMemType MTYPE_PIPELINE_GENERATE_IMPOSTOR;
-	static DeclareMemType MTYPE_PIPELINE_RENDER_BLOOM;
-
-	static DeclareMemType MTYPE_UPKEEP_POOLS;
-
-	static DeclareMemType MTYPE_AVATAR;
-	static DeclareMemType MTYPE_AVATAR_MESH;
-	static DeclareMemType MTYPE_PARTICLES;
-	static DeclareMemType MTYPE_REGIONS;
-
-	static DeclareMemType MTYPE_INVENTORY;
-	static DeclareMemType MTYPE_INVENTORY_DRAW;
-	static DeclareMemType MTYPE_INVENTORY_BUILD_NEW_VIEWS;
-	static DeclareMemType MTYPE_INVENTORY_DO_FOLDER;
-	static DeclareMemType MTYPE_INVENTORY_POST_BUILD;
-	static DeclareMemType MTYPE_INVENTORY_FROM_XML;
-	static DeclareMemType MTYPE_INVENTORY_CREATE_NEW_ITEM;
-	static DeclareMemType MTYPE_INVENTORY_VIEW_INIT;
-	static DeclareMemType MTYPE_INVENTORY_VIEW_SHOW;
-	static DeclareMemType MTYPE_INVENTORY_VIEW_TOGGLE;
-
-	static DeclareMemType MTYPE_ANIMATION;
-	static DeclareMemType MTYPE_VOLUME;
-	static DeclareMemType MTYPE_PRIMITIVE;
-	
-	static DeclareMemType MTYPE_SCRIPT;
-	static DeclareMemType MTYPE_SCRIPT_RUN;
-	static DeclareMemType MTYPE_SCRIPT_BYTECODE;
-	
-	static DeclareMemType MTYPE_IO_PUMP;
-	static DeclareMemType MTYPE_IO_TCP;
-	static DeclareMemType MTYPE_IO_BUFFER;
-	static DeclareMemType MTYPE_IO_HTTP_SERVER;
-	static DeclareMemType MTYPE_IO_SD_SERVER;
-	static DeclareMemType MTYPE_IO_SD_CLIENT;
-	static DeclareMemType MTYPE_IO_URL_REQUEST;
-
-	static DeclareMemType MTYPE_DIRECTX_INIT;
-
-	static DeclareMemType MTYPE_TEMP1;
-	static DeclareMemType MTYPE_TEMP2;
-	static DeclareMemType MTYPE_TEMP3;
-	static DeclareMemType MTYPE_TEMP4;
-	static DeclareMemType MTYPE_TEMP5;
-	static DeclareMemType MTYPE_TEMP6;
-	static DeclareMemType MTYPE_TEMP7;
-	static DeclareMemType MTYPE_TEMP8;
-	static DeclareMemType MTYPE_TEMP9;
-
-	static DeclareMemType MTYPE_OTHER; // Special; used by display code
-
-	S32 mTypeIndex;
-};
-
-//----------------------------------------------------------------------------
-
-#endif
-
+/** 
+ * @file llmemtype.h
+ * @brief Runtime memory usage debugging utilities.
+ *
+ * $LicenseInfo:firstyear=2005&license=viewergpl$
+ * 
+ * Copyright (c) 2005-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_MEMTYPE_H
+#define LL_MEMTYPE_H
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+
+#include "linden_common.h"
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// WARNING: Never commit with MEM_TRACK_MEM == 1
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+#define MEM_TRACK_MEM (0 && LL_WINDOWS)
+
+#include <vector>
+
+#define MEM_TYPE_NEW(T)
+
+class LL_COMMON_API LLMemType
+{
+public:
+
+	// class we'll initialize all instances of as
+	// static members of MemType.  Then use
+	// to construct any new mem type.
+	class LL_COMMON_API DeclareMemType
+	{
+	public:
+		DeclareMemType(char const * st);
+		~DeclareMemType();
+	
+		S32 mID;
+		char const * mName;
+		
+		// array so we can map an index ID to Name
+		static std::vector<char const *> mNameList;
+	};
+
+	LLMemType(DeclareMemType& dt);
+	~LLMemType();
+
+	static char const * getNameFromID(S32 id);
+
+	static DeclareMemType MTYPE_INIT;
+	static DeclareMemType MTYPE_STARTUP;
+	static DeclareMemType MTYPE_MAIN;
+	static DeclareMemType MTYPE_FRAME;
+
+	static DeclareMemType MTYPE_GATHER_INPUT;
+	static DeclareMemType MTYPE_JOY_KEY;
+
+	static DeclareMemType MTYPE_IDLE;
+	static DeclareMemType MTYPE_IDLE_PUMP;
+	static DeclareMemType MTYPE_IDLE_NETWORK;
+	static DeclareMemType MTYPE_IDLE_UPDATE_REGIONS;
+	static DeclareMemType MTYPE_IDLE_UPDATE_VIEWER_REGION;
+	static DeclareMemType MTYPE_IDLE_UPDATE_SURFACE;
+	static DeclareMemType MTYPE_IDLE_UPDATE_PARCEL_OVERLAY;
+	static DeclareMemType MTYPE_IDLE_AUDIO;
+
+	static DeclareMemType MTYPE_CACHE_PROCESS_PENDING;
+	static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_ASKS;
+	static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_REPLIES;
+
+	static DeclareMemType MTYPE_MESSAGE_CHECK_ALL;
+	static DeclareMemType MTYPE_MESSAGE_PROCESS_ACKS;
+
+	static DeclareMemType MTYPE_RENDER;
+	static DeclareMemType MTYPE_SLEEP;
+
+	static DeclareMemType MTYPE_NETWORK;
+	static DeclareMemType MTYPE_PHYSICS;
+	static DeclareMemType MTYPE_INTERESTLIST;
+
+	static DeclareMemType MTYPE_IMAGEBASE;
+	static DeclareMemType MTYPE_IMAGERAW;
+	static DeclareMemType MTYPE_IMAGEFORMATTED;
+	
+	static DeclareMemType MTYPE_APPFMTIMAGE;
+	static DeclareMemType MTYPE_APPRAWIMAGE;
+	static DeclareMemType MTYPE_APPAUXRAWIMAGE;
+	
+	static DeclareMemType MTYPE_DRAWABLE;
+	
+	static DeclareMemType MTYPE_OBJECT;
+	static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE;
+	static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE_CORE;
+
+	static DeclareMemType MTYPE_DISPLAY;
+	static DeclareMemType MTYPE_DISPLAY_UPDATE;
+	static DeclareMemType MTYPE_DISPLAY_UPDATE_CAMERA;
+	static DeclareMemType MTYPE_DISPLAY_UPDATE_GEOM;
+	static DeclareMemType MTYPE_DISPLAY_SWAP;
+	static DeclareMemType MTYPE_DISPLAY_UPDATE_HUD;
+	static DeclareMemType MTYPE_DISPLAY_GEN_REFLECTION;
+	static DeclareMemType MTYPE_DISPLAY_IMAGE_UPDATE;
+	static DeclareMemType MTYPE_DISPLAY_STATE_SORT;
+	static DeclareMemType MTYPE_DISPLAY_SKY;
+	static DeclareMemType MTYPE_DISPLAY_RENDER_GEOM;
+	static DeclareMemType MTYPE_DISPLAY_RENDER_FLUSH;
+	static DeclareMemType MTYPE_DISPLAY_RENDER_UI;
+	static DeclareMemType MTYPE_DISPLAY_RENDER_ATTACHMENTS;
+
+	static DeclareMemType MTYPE_VERTEX_DATA;
+	static DeclareMemType MTYPE_VERTEX_CONSTRUCTOR;
+	static DeclareMemType MTYPE_VERTEX_DESTRUCTOR;
+	static DeclareMemType MTYPE_VERTEX_CREATE_VERTICES;
+	static DeclareMemType MTYPE_VERTEX_CREATE_INDICES;
+	static DeclareMemType MTYPE_VERTEX_DESTROY_BUFFER;	
+	static DeclareMemType MTYPE_VERTEX_DESTROY_INDICES;
+	static DeclareMemType MTYPE_VERTEX_UPDATE_VERTS;
+	static DeclareMemType MTYPE_VERTEX_UPDATE_INDICES;
+	static DeclareMemType MTYPE_VERTEX_ALLOCATE_BUFFER;
+	static DeclareMemType MTYPE_VERTEX_RESIZE_BUFFER;
+	static DeclareMemType MTYPE_VERTEX_MAP_BUFFER;
+	static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_VERTICES;
+	static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_INDICES;
+	static DeclareMemType MTYPE_VERTEX_UNMAP_BUFFER;
+	static DeclareMemType MTYPE_VERTEX_SET_STRIDE;
+	static DeclareMemType MTYPE_VERTEX_SET_BUFFER;
+	static DeclareMemType MTYPE_VERTEX_SETUP_VERTEX_BUFFER;
+	static DeclareMemType MTYPE_VERTEX_CLEANUP_CLASS;
+
+	static DeclareMemType MTYPE_SPACE_PARTITION;
+
+	static DeclareMemType MTYPE_PIPELINE;
+	static DeclareMemType MTYPE_PIPELINE_INIT;
+	static DeclareMemType MTYPE_PIPELINE_CREATE_BUFFERS;
+	static DeclareMemType MTYPE_PIPELINE_RESTORE_GL;
+	static DeclareMemType MTYPE_PIPELINE_UNLOAD_SHADERS;
+	static DeclareMemType MTYPE_PIPELINE_LIGHTING_DETAIL;
+	static DeclareMemType MTYPE_PIPELINE_GET_POOL_TYPE;
+	static DeclareMemType MTYPE_PIPELINE_ADD_POOL;
+	static DeclareMemType MTYPE_PIPELINE_ALLOCATE_DRAWABLE;
+	static DeclareMemType MTYPE_PIPELINE_ADD_OBJECT;
+	static DeclareMemType MTYPE_PIPELINE_CREATE_OBJECTS;
+	static DeclareMemType MTYPE_PIPELINE_UPDATE_MOVE;
+	static DeclareMemType MTYPE_PIPELINE_UPDATE_GEOM;
+	static DeclareMemType MTYPE_PIPELINE_MARK_VISIBLE;
+	static DeclareMemType MTYPE_PIPELINE_MARK_MOVED;
+	static DeclareMemType MTYPE_PIPELINE_MARK_SHIFT;
+	static DeclareMemType MTYPE_PIPELINE_SHIFT_OBJECTS;
+	static DeclareMemType MTYPE_PIPELINE_MARK_TEXTURED;
+	static DeclareMemType MTYPE_PIPELINE_MARK_REBUILD;
+	static DeclareMemType MTYPE_PIPELINE_UPDATE_CULL;
+	static DeclareMemType MTYPE_PIPELINE_STATE_SORT;
+	static DeclareMemType MTYPE_PIPELINE_POST_SORT;
+	
+	static DeclareMemType MTYPE_PIPELINE_RENDER_HUD_ELS;
+	static DeclareMemType MTYPE_PIPELINE_RENDER_HL;
+	static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM;
+	static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED;
+	static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_POST_DEF;
+	static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_SHADOW;
+	static DeclareMemType MTYPE_PIPELINE_RENDER_SELECT;
+	static DeclareMemType MTYPE_PIPELINE_REBUILD_POOLS;
+	static DeclareMemType MTYPE_PIPELINE_QUICK_LOOKUP;
+	static DeclareMemType MTYPE_PIPELINE_RENDER_OBJECTS;
+	static DeclareMemType MTYPE_PIPELINE_GENERATE_IMPOSTOR;
+	static DeclareMemType MTYPE_PIPELINE_RENDER_BLOOM;
+
+	static DeclareMemType MTYPE_UPKEEP_POOLS;
+
+	static DeclareMemType MTYPE_AVATAR;
+	static DeclareMemType MTYPE_AVATAR_MESH;
+	static DeclareMemType MTYPE_PARTICLES;
+	static DeclareMemType MTYPE_REGIONS;
+
+	static DeclareMemType MTYPE_INVENTORY;
+	static DeclareMemType MTYPE_INVENTORY_DRAW;
+	static DeclareMemType MTYPE_INVENTORY_BUILD_NEW_VIEWS;
+	static DeclareMemType MTYPE_INVENTORY_DO_FOLDER;
+	static DeclareMemType MTYPE_INVENTORY_POST_BUILD;
+	static DeclareMemType MTYPE_INVENTORY_FROM_XML;
+	static DeclareMemType MTYPE_INVENTORY_CREATE_NEW_ITEM;
+	static DeclareMemType MTYPE_INVENTORY_VIEW_INIT;
+	static DeclareMemType MTYPE_INVENTORY_VIEW_SHOW;
+	static DeclareMemType MTYPE_INVENTORY_VIEW_TOGGLE;
+
+	static DeclareMemType MTYPE_ANIMATION;
+	static DeclareMemType MTYPE_VOLUME;
+	static DeclareMemType MTYPE_PRIMITIVE;
+	
+	static DeclareMemType MTYPE_SCRIPT;
+	static DeclareMemType MTYPE_SCRIPT_RUN;
+	static DeclareMemType MTYPE_SCRIPT_BYTECODE;
+	
+	static DeclareMemType MTYPE_IO_PUMP;
+	static DeclareMemType MTYPE_IO_TCP;
+	static DeclareMemType MTYPE_IO_BUFFER;
+	static DeclareMemType MTYPE_IO_HTTP_SERVER;
+	static DeclareMemType MTYPE_IO_SD_SERVER;
+	static DeclareMemType MTYPE_IO_SD_CLIENT;
+	static DeclareMemType MTYPE_IO_URL_REQUEST;
+
+	static DeclareMemType MTYPE_DIRECTX_INIT;
+
+	static DeclareMemType MTYPE_TEMP1;
+	static DeclareMemType MTYPE_TEMP2;
+	static DeclareMemType MTYPE_TEMP3;
+	static DeclareMemType MTYPE_TEMP4;
+	static DeclareMemType MTYPE_TEMP5;
+	static DeclareMemType MTYPE_TEMP6;
+	static DeclareMemType MTYPE_TEMP7;
+	static DeclareMemType MTYPE_TEMP8;
+	static DeclareMemType MTYPE_TEMP9;
+
+	static DeclareMemType MTYPE_OTHER; // Special; used by display code
+
+	S32 mTypeIndex;
+};
+
+//----------------------------------------------------------------------------
+
+#endif
+
diff --git a/indra/llcommon/llstacktrace.cpp b/indra/llcommon/llstacktrace.cpp
index 4be91b5b11..3cb074257b 100644
--- a/indra/llcommon/llstacktrace.cpp
+++ b/indra/llcommon/llstacktrace.cpp
@@ -1,141 +1,142 @@
-/** 
- * @file llstacktrace.cpp
- * @brief stack tracing functionality
- *
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- * 
- * Copyright (c) 2001-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#include "llstacktrace.h"
-
-#ifdef LL_WINDOWS
-
-#include <iostream>
-#include <sstream>
-
-#include "windows.h"
-#include "Dbghelp.h"
-
-typedef USHORT NTAPI RtlCaptureStackBackTrace_Function(
-    IN ULONG frames_to_skip,
-    IN ULONG frames_to_capture,
-    OUT PVOID *backtrace,
-    OUT PULONG backtrace_hash);
-
-static RtlCaptureStackBackTrace_Function* const RtlCaptureStackBackTrace_fn =
-   (RtlCaptureStackBackTrace_Function*)
-   GetProcAddress(GetModuleHandleA("ntdll.dll"), "RtlCaptureStackBackTrace");
-
-bool ll_get_stack_trace(std::vector<std::string>& lines)
-{
-	const S32 MAX_STACK_DEPTH = 32;
-	const S32 STRING_NAME_LENGTH = 200;
-	const S32 FRAME_SKIP = 2;
-	static BOOL symbolsLoaded = false;
-	static BOOL firstCall = true;
-
-	HANDLE hProc = GetCurrentProcess();
-
-	// load the symbols if they're not loaded
-	if(!symbolsLoaded && firstCall)
-	{
-		symbolsLoaded = SymInitialize(hProc, NULL, true);
-		firstCall = false;
-	}
-
-	// if loaded, get the call stack
-	if(symbolsLoaded)
-	{
-		// create the frames to hold the addresses
-		void* frames[MAX_STACK_DEPTH];
-		memset(frames, 0, sizeof(void*)*MAX_STACK_DEPTH);
-		S32 depth = 0;
-
-		// get the addresses
-		depth = RtlCaptureStackBackTrace_fn(FRAME_SKIP, MAX_STACK_DEPTH, frames, NULL);
-
-		IMAGEHLP_LINE64 line;
-		memset(&line, 0, sizeof(IMAGEHLP_LINE64));
-		line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
-
-		// create something to hold address info
-		PIMAGEHLP_SYMBOL64 pSym;
-		pSym = (PIMAGEHLP_SYMBOL64)malloc(sizeof(IMAGEHLP_SYMBOL64) + STRING_NAME_LENGTH);
-		memset(pSym, 0, sizeof(IMAGEHLP_SYMBOL64) + STRING_NAME_LENGTH);
-		pSym->MaxNameLength = STRING_NAME_LENGTH;
-		pSym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64);
-
-		// get address info for each address frame
-		// and store
-		for(S32 i=0; i < depth; i++)
-		{
-			std::stringstream stack_line;
-			BOOL ret;
-
-			DWORD64 addr = (DWORD64)frames[i];
-			ret = SymGetSymFromAddr64(hProc, addr, 0, pSym);
-			if(ret)
-			{
-				stack_line << pSym->Name << " ";
-			}
-
-			DWORD dummy;
-			ret = SymGetLineFromAddr64(hProc, addr, &dummy, &line);
-			if(ret)
-			{
-				std::string file_name = line.FileName;
-				std::string::size_type index = file_name.rfind("\\");
-				stack_line << file_name.substr(index + 1, file_name.size()) << ":" << line.LineNumber; 
-			}
-
-			lines.push_back(stack_line.str());
-		}
-		
-		free(pSym);
-
-		// TODO: figure out a way to cleanup symbol loading
-		// Not hugely necessary, however.
-		//SymCleanup(hProc);
-		return true;
-	}
-	else
-	{
-		lines.push_back("Stack Trace Failed.  PDB symbol info not loaded");
-	}
-
-	return false;
-}
-
-#else
-
-bool ll_get_stack_trace(std::vector<std::string>& lines)
-{
-	return false;
-}
-
-#endif
-
+/** 
+ * @file llstacktrace.cpp
+ * @brief stack tracing functionality
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+#include "llstacktrace.h"
+
+#ifdef LL_WINDOWS
+
+#include <iostream>
+#include <sstream>
+
+#include "windows.h"
+#include "Dbghelp.h"
+
+typedef USHORT NTAPI RtlCaptureStackBackTrace_Function(
+    IN ULONG frames_to_skip,
+    IN ULONG frames_to_capture,
+    OUT PVOID *backtrace,
+    OUT PULONG backtrace_hash);
+
+static RtlCaptureStackBackTrace_Function* const RtlCaptureStackBackTrace_fn =
+   (RtlCaptureStackBackTrace_Function*)
+   GetProcAddress(GetModuleHandleA("ntdll.dll"), "RtlCaptureStackBackTrace");
+
+bool ll_get_stack_trace(std::vector<std::string>& lines)
+{
+	const S32 MAX_STACK_DEPTH = 32;
+	const S32 STRING_NAME_LENGTH = 200;
+	const S32 FRAME_SKIP = 2;
+	static BOOL symbolsLoaded = false;
+	static BOOL firstCall = true;
+
+	HANDLE hProc = GetCurrentProcess();
+
+	// load the symbols if they're not loaded
+	if(!symbolsLoaded && firstCall)
+	{
+		symbolsLoaded = SymInitialize(hProc, NULL, true);
+		firstCall = false;
+	}
+
+	// if loaded, get the call stack
+	if(symbolsLoaded)
+	{
+		// create the frames to hold the addresses
+		void* frames[MAX_STACK_DEPTH];
+		memset(frames, 0, sizeof(void*)*MAX_STACK_DEPTH);
+		S32 depth = 0;
+
+		// get the addresses
+		depth = RtlCaptureStackBackTrace_fn(FRAME_SKIP, MAX_STACK_DEPTH, frames, NULL);
+
+		IMAGEHLP_LINE64 line;
+		memset(&line, 0, sizeof(IMAGEHLP_LINE64));
+		line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
+
+		// create something to hold address info
+		PIMAGEHLP_SYMBOL64 pSym;
+		pSym = (PIMAGEHLP_SYMBOL64)malloc(sizeof(IMAGEHLP_SYMBOL64) + STRING_NAME_LENGTH);
+		memset(pSym, 0, sizeof(IMAGEHLP_SYMBOL64) + STRING_NAME_LENGTH);
+		pSym->MaxNameLength = STRING_NAME_LENGTH;
+		pSym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64);
+
+		// get address info for each address frame
+		// and store
+		for(S32 i=0; i < depth; i++)
+		{
+			std::stringstream stack_line;
+			BOOL ret;
+
+			DWORD64 addr = (DWORD64)frames[i];
+			ret = SymGetSymFromAddr64(hProc, addr, 0, pSym);
+			if(ret)
+			{
+				stack_line << pSym->Name << " ";
+			}
+
+			DWORD dummy;
+			ret = SymGetLineFromAddr64(hProc, addr, &dummy, &line);
+			if(ret)
+			{
+				std::string file_name = line.FileName;
+				std::string::size_type index = file_name.rfind("\\");
+				stack_line << file_name.substr(index + 1, file_name.size()) << ":" << line.LineNumber; 
+			}
+
+			lines.push_back(stack_line.str());
+		}
+		
+		free(pSym);
+
+		// TODO: figure out a way to cleanup symbol loading
+		// Not hugely necessary, however.
+		//SymCleanup(hProc);
+		return true;
+	}
+	else
+	{
+		lines.push_back("Stack Trace Failed.  PDB symbol info not loaded");
+	}
+
+	return false;
+}
+
+#else
+
+bool ll_get_stack_trace(std::vector<std::string>& lines)
+{
+	return false;
+}
+
+#endif
+
diff --git a/indra/llcommon/llstacktrace.h b/indra/llcommon/llstacktrace.h
index 609b934a97..b84b1aa6ad 100644
--- a/indra/llcommon/llstacktrace.h
+++ b/indra/llcommon/llstacktrace.h
@@ -1,44 +1,44 @@
-/** 
- * @file llstacktrace.h
- * @brief stack trace functions
- *
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- * 
- * Copyright (c) 2001-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-
-#ifndef LL_LLSTACKTRACE_H
-#define LL_LLSTACKTRACE_H
-
-#include "stdtypes.h"
-#include <vector>
-#include <string>
-
-bool ll_get_stack_trace(std::vector<std::string>& lines);
-
-#endif
-
+/** 
+ * @file llstacktrace.h
+ * @brief stack trace functions
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+
+#ifndef LL_LLSTACKTRACE_H
+#define LL_LLSTACKTRACE_H
+
+#include "stdtypes.h"
+#include <vector>
+#include <string>
+
+LL_COMMON_API bool ll_get_stack_trace(std::vector<std::string>& lines);
+
+#endif
+
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 813e2656ae..eb36dafee3 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -1,527 +1,527 @@
-/** 
- * @file llstring.h
- * @brief String utility functions and std::string class.
- *
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- * 
- * Copyright (c) 2001-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLSTRING_H
-#define LL_LLSTRING_H
-
-#include <string>
-#include <locale>
-#include <iomanip>
-#include <boost/regex.hpp>
-#include "llsd.h"
-
-#if LL_LINUX || LL_SOLARIS
-#include <wctype.h>
-#include <wchar.h>
-#endif
-
-#include <string.h>
-
-#if LL_SOLARIS
-// stricmp and strnicmp do not exist on Solaris:
-#define stricmp strcasecmp
-#define strnicmp strncasecmp
-#endif
-
-const char LL_UNKNOWN_CHAR = '?';
-
-#if LL_DARWIN || LL_LINUX || LL_SOLARIS
-// Template specialization of char_traits for U16s. Only necessary on Mac and Linux (exists on Windows already)
-#include <cstring>
-
-namespace std
-{
-template<>
-struct char_traits<U16>
-{
-	typedef U16 		char_type;
-	typedef int 	    int_type;
-	typedef streampos 	pos_type;
-	typedef streamoff 	off_type;
-	typedef mbstate_t 	state_type;
-	
-	static void 
-		assign(char_type& __c1, const char_type& __c2)
-	{ __c1 = __c2; }
-	
-	static bool 
-		eq(const char_type& __c1, const char_type& __c2)
-	{ return __c1 == __c2; }
-	
-	static bool 
-		lt(const char_type& __c1, const char_type& __c2)
-	{ return __c1 < __c2; }
-	
-	static int 
-		compare(const char_type* __s1, const char_type* __s2, size_t __n)
-	{ return memcmp(__s1, __s2, __n * sizeof(char_type)); }
-	
-	static size_t
-		length(const char_type* __s)
-	{
-		const char_type *cur_char = __s;
-		while (*cur_char != 0)
-		{
-			++cur_char;
-		}
-		return cur_char - __s;
-	}
-	
-	static const char_type* 
-		find(const char_type* __s, size_t __n, const char_type& __a)
-	{ return static_cast<const char_type*>(memchr(__s, __a, __n * sizeof(char_type))); }
-	
-	static char_type* 
-		move(char_type* __s1, const char_type* __s2, size_t __n)
-	{ return static_cast<char_type*>(memmove(__s1, __s2, __n * sizeof(char_type))); }
-	
-	static char_type* 
-		copy(char_type* __s1, const char_type* __s2, size_t __n)
-	{  return static_cast<char_type*>(memcpy(__s1, __s2, __n * sizeof(char_type))); }	/* Flawfinder: ignore */
-	
-	static char_type* 
-		assign(char_type* __s, size_t __n, char_type __a)
-	{ 
-		// This isn't right.
-		//return static_cast<char_type*>(memset(__s, __a, __n * sizeof(char_type))); 
-		
-		// I don't think there's a standard 'memset' for 16-bit values.
-		// Do this the old-fashioned way.
-		
-		size_t __i;
-		for(__i = 0; __i < __n; __i++)
-		{
-			__s[__i] = __a;
-		}
-		return __s; 
-	}
-	
-	static char_type 
-		to_char_type(const int_type& __c)
-	{ return static_cast<char_type>(__c); }
-	
-	static int_type 
-		to_int_type(const char_type& __c)
-	{ return static_cast<int_type>(__c); }
-	
-	static bool 
-		eq_int_type(const int_type& __c1, const int_type& __c2)
-	{ return __c1 == __c2; }
-	
-	static int_type 
-		eof() { return static_cast<int_type>(EOF); }
-	
-	static int_type 
-		not_eof(const int_type& __c)
-      { return (__c == eof()) ? 0 : __c; }
-  };
-};
-#endif
-
-class LLStringOps
-{
-private:
-	static long sltOffset;
-	static long localTimeOffset;
-	static bool daylightSavings;
-	static std::map<std::string, std::string> datetimeToCodes;
-
-public:
-	static char toUpper(char elem) { return toupper((unsigned char)elem); }
-	static llwchar toUpper(llwchar elem) { return towupper(elem); }
-	
-	static char toLower(char elem) { return tolower((unsigned char)elem); }
-	static llwchar toLower(llwchar elem) { return towlower(elem); }
-
-	static bool isSpace(char elem) { return isspace((unsigned char)elem) != 0; }
-	static bool isSpace(llwchar elem) { return iswspace(elem) != 0; }
-
-	static bool isUpper(char elem) { return isupper((unsigned char)elem) != 0; }
-	static bool isUpper(llwchar elem) { return iswupper(elem) != 0; }
-
-	static bool isLower(char elem) { return islower((unsigned char)elem) != 0; }
-	static bool isLower(llwchar elem) { return iswlower(elem) != 0; }
-
-	static bool isDigit(char a) { return isdigit((unsigned char)a) != 0; }
-	static bool isDigit(llwchar a) { return iswdigit(a) != 0; }
-
-	static bool isPunct(char a) { return ispunct((unsigned char)a) != 0; }
-	static bool isPunct(llwchar a) { return iswpunct(a) != 0; }
-
-	static bool isAlnum(char a) { return isalnum((unsigned char)a) != 0; }
-	static bool isAlnum(llwchar a) { return iswalnum(a) != 0; }
-
-	static S32	collate(const char* a, const char* b) { return strcoll(a, b); }
-	static S32	collate(const llwchar* a, const llwchar* b);
-
-	static void setupDatetimeInfo (bool daylight);
-	static long getSltOffset (void) {return sltOffset;}
-	static long getLocalTimeOffset (void) {return localTimeOffset;}
-	static bool getDaylightSavings (void) {return daylightSavings;}
-	static std::string getDatetimeCode (std::string key);
-};
-
-/**
- * @brief Return a string constructed from in without crashing if the
- * pointer is NULL.
- */
-std::string ll_safe_string(const char* in);
-std::string ll_safe_string(const char* in, S32 maxlen);
-
-
-// Allowing assignments from non-strings into format_map_t is apparently
-// *really* error-prone, so subclass std::string with just basic c'tors.
-class LLFormatMapString
-{
-public:
-	LLFormatMapString() {};
-	LLFormatMapString(const char* s) : mString(ll_safe_string(s)) {};
-	LLFormatMapString(const std::string& s) : mString(s) {};
-	operator std::string() const { return mString; }
-	bool operator<(const LLFormatMapString& rhs) const { return mString < rhs.mString; }
-	std::size_t length() const { return mString.length(); }
-	
-private:
-	std::string mString;
-};
-
-template <class T>
-class LLStringUtilBase
-{
-private:
-	static std::string sLocale;
-
-public:
-	typedef typename std::basic_string<T>::size_type size_type;
-	
-public:
-	/////////////////////////////////////////////////////////////////////////////////////////
-	// Static Utility functions that operate on std::strings
-
-	static std::basic_string<T> null;
-	
-	typedef std::map<LLFormatMapString, LLFormatMapString> format_map_t;
-	static void getTokens (std::basic_string<T> input, std::vector<std::basic_string<T> >& tokens);
-	static void formatNumber(std::basic_string<T>& numStr, std::basic_string<T> decimals);
-	static bool formatDatetime(std::basic_string<T>& replacement, std::basic_string<T> token, std::basic_string<T> param, const LLSD& substitutions);
-	static S32 format(std::basic_string<T>& s, const LLSD& substitutions);
-	static S32 format(std::basic_string<T>& s, const format_map_t& fmt_map);
-	static bool simpleReplacement(std::basic_string<T>& replacement, std::basic_string<T> token, const LLSD& substitutions);
-	static void setLocale (std::string inLocale) {sLocale = inLocale;};
-	static std::string getLocale (void) {return sLocale;};
-	
-	static bool isValidIndex(const std::basic_string<T>& string, size_type i)
-	{
-		return !string.empty() && (0 <= i) && (i <= string.size());
-	}
-
-	static void	trimHead(std::basic_string<T>& string);
-	static void	trimTail(std::basic_string<T>& string);
-	static void	trim(std::basic_string<T>& string)	{ trimHead(string); trimTail(string); }
-	static void truncate(std::basic_string<T>& string, size_type count);
-
-	static void	toUpper(std::basic_string<T>& string);
-	static void	toLower(std::basic_string<T>& string);
-	
-	// True if this is the head of s.
-	static BOOL	isHead( const std::basic_string<T>& string, const T* s ); 
-
-	/**
-	 * @brief Returns true if string starts with substr
-	 *
-	 * If etither string or substr are empty, this method returns false.
-	 */
-	static bool startsWith(
-		const std::basic_string<T>& string,
-		const std::basic_string<T>& substr);
-
-	/**
-	 * @brief Returns true if string ends in substr
-	 *
-	 * If etither string or substr are empty, this method returns false.
-	 */
-	static bool endsWith(
-		const std::basic_string<T>& string,
-		const std::basic_string<T>& substr);
-
-	static void	addCRLF(std::basic_string<T>& string);
-	static void	removeCRLF(std::basic_string<T>& string);
-
-	static void	replaceTabsWithSpaces( std::basic_string<T>& string, size_type spaces_per_tab );
-	static void	replaceNonstandardASCII( std::basic_string<T>& string, T replacement );
-	static void	replaceChar( std::basic_string<T>& string, T target, T replacement );
-
-	static BOOL	containsNonprintable(const std::basic_string<T>& string);
-	static void	stripNonprintable(std::basic_string<T>& string);
-
-	/**
-	 * @brief Unsafe way to make ascii characters. You should probably
-	 * only call this when interacting with the host operating system.
-	 * The 1 byte std::string does not work correctly.
-	 * The 2 and 4 byte std::string probably work, so LLWStringUtil::_makeASCII
-	 * should work.
-	 */
-	static void _makeASCII(std::basic_string<T>& string);
-
-	// Conversion to other data types
-	static BOOL	convertToBOOL(const std::basic_string<T>& string, BOOL& value);
-	static BOOL	convertToU8(const std::basic_string<T>& string, U8& value);
-	static BOOL	convertToS8(const std::basic_string<T>& string, S8& value);
-	static BOOL	convertToS16(const std::basic_string<T>& string, S16& value);
-	static BOOL	convertToU16(const std::basic_string<T>& string, U16& value);
-	static BOOL	convertToU32(const std::basic_string<T>& string, U32& value);
-	static BOOL	convertToS32(const std::basic_string<T>& string, S32& value);
-	static BOOL	convertToF32(const std::basic_string<T>& string, F32& value);
-	static BOOL	convertToF64(const std::basic_string<T>& string, F64& value);
-
-	/////////////////////////////////////////////////////////////////////////////////////////
-	// Utility functions for working with char*'s and strings
-
-	// Like strcmp but also handles empty strings. Uses
-	// current locale.
-	static S32		compareStrings(const T* lhs, const T* rhs);
-	static S32		compareStrings(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs);
-	
-	// case insensitive version of above. Uses current locale on
-	// Win32, and falls back to a non-locale aware comparison on
-	// Linux.
-	static S32		compareInsensitive(const T* lhs, const T* rhs);
-	static S32		compareInsensitive(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs);
-
-	// Case sensitive comparison with good handling of numbers.  Does not use current locale.
-	// a.k.a. strdictcmp()
-	static S32		compareDict(const std::basic_string<T>& a, const std::basic_string<T>& b);
-
-	// Case *in*sensitive comparison with good handling of numbers.  Does not use current locale.
-	// a.k.a. strdictcmp()
-	static S32		compareDictInsensitive(const std::basic_string<T>& a, const std::basic_string<T>& b);
-
-	// Puts compareDict() in a form appropriate for LL container classes to use for sorting.
-	static BOOL		precedesDict( const std::basic_string<T>& a, const std::basic_string<T>& b );
-
-	// A replacement for strncpy.
-	// If the dst buffer is dst_size bytes long or more, ensures that dst is null terminated and holds
-	// up to dst_size-1 characters of src.
-	static void		copy(T* dst, const T* src, size_type dst_size);
-	
-	// Copies src into dst at a given offset.  
-	static void		copyInto(std::basic_string<T>& dst, const std::basic_string<T>& src, size_type offset);
-	
-#ifdef _DEBUG	
-	static void		testHarness();
-#endif
-
-};
-
-template<class T> std::basic_string<T> LLStringUtilBase<T>::null;
-template<class T> std::string LLStringUtilBase<T>::sLocale;
-
-typedef LLStringUtilBase<char> LLStringUtil;
-typedef LLStringUtilBase<llwchar> LLWStringUtil;
-typedef std::basic_string<llwchar> LLWString;
-
-//@ Use this where we want to disallow input in the form of "foo"
-//  This is used to catch places where english text is embedded in the code
-//  instead of in a translatable XUI file.
-class LLStringExplicit : public std::string
-{
-public:
-	explicit LLStringExplicit(const char* s) : std::string(s) {}
-	LLStringExplicit(const std::string& s) : std::string(s) {}
-	LLStringExplicit(const std::string& s, size_type pos, size_type n = std::string::npos) : std::string(s, pos, n) {}
-};
-
-struct LLDictionaryLess
-{
-public:
-	bool operator()(const std::string& a, const std::string& b)
-	{
-		return (LLStringUtil::precedesDict(a, b) ? true : false);
-	}
-};
-
-
-/**
- * Simple support functions
- */
-
-/**
- * @brief chop off the trailing characters in a string.
- *
- * This function works on bytes rather than glyphs, so this will
- * incorrectly truncate non-single byte strings.
- * Use utf8str_truncate() for utf8 strings
- * @return a copy of in string minus the trailing count bytes.
- */
-inline std::string chop_tail_copy(
-	const std::string& in,
-	std::string::size_type count)
-{
-	return std::string(in, 0, in.length() - count);
-}
-
-/**
- * @brief This translates a nybble stored as a hex value from 0-f back
- * to a nybble in the low order bits of the return byte.
- */
-U8 hex_as_nybble(char hex);
-
-/**
- * @brief read the contents of a file into a string.
- *
- * Since this function has no concept of character encoding, most
- * anything you do with this method ill-advised. Please avoid.
- * @param str [out] The string which will have.
- * @param filename The full name of the file to read.
- * @return Returns true on success. If false, str is unmodified.
- */
-bool _read_file_into_string(std::string& str, const std::string& filename);
-bool iswindividual(llwchar elem);
-
-/**
- * Unicode support
- */
-
-// Make the incoming string a utf8 string. Replaces any unknown glyph
-// with the UNKOWN_CHARACTER. Once any unknown glph is found, the rest
-// of the data may not be recovered.
-std::string rawstr_to_utf8(const std::string& raw);
-
-//
-// We should never use UTF16 except when communicating with Win32!
-//
-typedef std::basic_string<U16> llutf16string;
-
-LLWString utf16str_to_wstring(const llutf16string &utf16str, S32 len);
-LLWString utf16str_to_wstring(const llutf16string &utf16str);
-
-llutf16string wstring_to_utf16str(const LLWString &utf32str, S32 len);
-llutf16string wstring_to_utf16str(const LLWString &utf32str);
-
-llutf16string utf8str_to_utf16str ( const std::string& utf8str, S32 len);
-llutf16string utf8str_to_utf16str ( const std::string& utf8str );
-
-LLWString utf8str_to_wstring(const std::string &utf8str, S32 len);
-LLWString utf8str_to_wstring(const std::string &utf8str);
-// Same function, better name. JC
-inline LLWString utf8string_to_wstring(const std::string& utf8_string) { return utf8str_to_wstring(utf8_string); }
-
-//
-S32 wchar_to_utf8chars(llwchar inchar, char* outchars);
-
-std::string wstring_to_utf8str(const LLWString &utf32str, S32 len);
-std::string wstring_to_utf8str(const LLWString &utf32str);
-
-std::string utf16str_to_utf8str(const llutf16string &utf16str, S32 len);
-std::string utf16str_to_utf8str(const llutf16string &utf16str);
-
-// Length of this UTF32 string in bytes when transformed to UTF8
-S32 wstring_utf8_length(const LLWString& wstr); 
-
-// Length in bytes of this wide char in a UTF8 string
-S32 wchar_utf8_length(const llwchar wc); 
-
-std::string utf8str_tolower(const std::string& utf8str);
-
-// Length in llwchar (UTF-32) of the first len units (16 bits) of the given UTF-16 string.
-S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len);
-
-// Length in utf16string (UTF-16) of wlen wchars beginning at woffset.
-S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen);
-
-// Length in wstring (i.e., llwchar count) of a part of a wstring specified by utf16 length (i.e., utf16 units.)
-S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL);
-
-/**
- * @brief Properly truncate a utf8 string to a maximum byte count.
- * 
- * The returned string may be less than max_len if the truncation
- * happens in the middle of a glyph. If max_len is longer than the
- * string passed in, the return value == utf8str.
- * @param utf8str A valid utf8 string to truncate.
- * @param max_len The maximum number of bytes in the return value.
- * @return Returns a valid utf8 string with byte count <= max_len.
- */
-std::string utf8str_truncate(const std::string& utf8str, const S32 max_len);
-
-std::string utf8str_trim(const std::string& utf8str);
-
-S32 utf8str_compare_insensitive(
-	const std::string& lhs,
-	const std::string& rhs);
-
-/**
- * @brief Replace all occurences of target_char with replace_char
- *
- * @param utf8str A utf8 string to process.
- * @param target_char The wchar to be replaced
- * @param replace_char The wchar which is written on replace
- */
-std::string utf8str_substChar(
-	const std::string& utf8str,
-	const llwchar target_char,
-	const llwchar replace_char);
-
-std::string utf8str_makeASCII(const std::string& utf8str);
-
-// Hack - used for evil notecards.
-std::string mbcsstring_makeASCII(const std::string& str); 
-
-std::string utf8str_removeCRLF(const std::string& utf8str);
-
-
-#if LL_WINDOWS
-/* @name Windows string helpers
- */
-//@{
-
-/**
- * @brief Implementation the expected snprintf interface.
- *
- * If the size of the passed in buffer is not large enough to hold the string,
- * two bad things happen:
- * 1. resulting formatted string is NOT null terminated
- * 2. Depending on the platform, the return value could be a) the required
- *    size of the buffer to copy the entire formatted string or b) -1.
- *    On Windows with VS.Net 2003, it returns -1 e.g. 
- *
- * safe_snprintf always adds a NULL terminator so that the caller does not
- * need to check for return value or need to add the NULL terminator.
- * It does not, however change the return value - to let the caller know
- * that the passed in buffer size was not large enough to hold the
- * formatted string.
- *
- */
-
+/** 
+ * @file llstring.h
+ * @brief String utility functions and std::string class.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSTRING_H
+#define LL_LLSTRING_H
+
+#include <string>
+#include <locale>
+#include <iomanip>
+#include <boost/regex.hpp>
+#include "llsd.h"
+
+#if LL_LINUX || LL_SOLARIS
+#include <wctype.h>
+#include <wchar.h>
+#endif
+
+#include <string.h>
+
+#if LL_SOLARIS
+// stricmp and strnicmp do not exist on Solaris:
+#define stricmp strcasecmp
+#define strnicmp strncasecmp
+#endif
+
+const char LL_UNKNOWN_CHAR = '?';
+
+#if LL_DARWIN || LL_LINUX || LL_SOLARIS
+// Template specialization of char_traits for U16s. Only necessary on Mac and Linux (exists on Windows already)
+#include <cstring>
+
+namespace std
+{
+template<>
+struct char_traits<U16>
+{
+	typedef U16 		char_type;
+	typedef int 	    int_type;
+	typedef streampos 	pos_type;
+	typedef streamoff 	off_type;
+	typedef mbstate_t 	state_type;
+	
+	static void 
+		assign(char_type& __c1, const char_type& __c2)
+	{ __c1 = __c2; }
+	
+	static bool 
+		eq(const char_type& __c1, const char_type& __c2)
+	{ return __c1 == __c2; }
+	
+	static bool 
+		lt(const char_type& __c1, const char_type& __c2)
+	{ return __c1 < __c2; }
+	
+	static int 
+		compare(const char_type* __s1, const char_type* __s2, size_t __n)
+	{ return memcmp(__s1, __s2, __n * sizeof(char_type)); }
+	
+	static size_t
+		length(const char_type* __s)
+	{
+		const char_type *cur_char = __s;
+		while (*cur_char != 0)
+		{
+			++cur_char;
+		}
+		return cur_char - __s;
+	}
+	
+	static const char_type* 
+		find(const char_type* __s, size_t __n, const char_type& __a)
+	{ return static_cast<const char_type*>(memchr(__s, __a, __n * sizeof(char_type))); }
+	
+	static char_type* 
+		move(char_type* __s1, const char_type* __s2, size_t __n)
+	{ return static_cast<char_type*>(memmove(__s1, __s2, __n * sizeof(char_type))); }
+	
+	static char_type* 
+		copy(char_type* __s1, const char_type* __s2, size_t __n)
+	{  return static_cast<char_type*>(memcpy(__s1, __s2, __n * sizeof(char_type))); }	/* Flawfinder: ignore */
+	
+	static char_type* 
+		assign(char_type* __s, size_t __n, char_type __a)
+	{ 
+		// This isn't right.
+		//return static_cast<char_type*>(memset(__s, __a, __n * sizeof(char_type))); 
+		
+		// I don't think there's a standard 'memset' for 16-bit values.
+		// Do this the old-fashioned way.
+		
+		size_t __i;
+		for(__i = 0; __i < __n; __i++)
+		{
+			__s[__i] = __a;
+		}
+		return __s; 
+	}
+	
+	static char_type 
+		to_char_type(const int_type& __c)
+	{ return static_cast<char_type>(__c); }
+	
+	static int_type 
+		to_int_type(const char_type& __c)
+	{ return static_cast<int_type>(__c); }
+	
+	static bool 
+		eq_int_type(const int_type& __c1, const int_type& __c2)
+	{ return __c1 == __c2; }
+	
+	static int_type 
+		eof() { return static_cast<int_type>(EOF); }
+	
+	static int_type 
+		not_eof(const int_type& __c)
+      { return (__c == eof()) ? 0 : __c; }
+  };
+};
+#endif
+
+class LL_COMMON_API LLStringOps
+{
+private:
+	static long sltOffset;
+	static long localTimeOffset;
+	static bool daylightSavings;
+	static std::map<std::string, std::string> datetimeToCodes;
+
+public:
+	static char toUpper(char elem) { return toupper((unsigned char)elem); }
+	static llwchar toUpper(llwchar elem) { return towupper(elem); }
+	
+	static char toLower(char elem) { return tolower((unsigned char)elem); }
+	static llwchar toLower(llwchar elem) { return towlower(elem); }
+
+	static bool isSpace(char elem) { return isspace((unsigned char)elem) != 0; }
+	static bool isSpace(llwchar elem) { return iswspace(elem) != 0; }
+
+	static bool isUpper(char elem) { return isupper((unsigned char)elem) != 0; }
+	static bool isUpper(llwchar elem) { return iswupper(elem) != 0; }
+
+	static bool isLower(char elem) { return islower((unsigned char)elem) != 0; }
+	static bool isLower(llwchar elem) { return iswlower(elem) != 0; }
+
+	static bool isDigit(char a) { return isdigit((unsigned char)a) != 0; }
+	static bool isDigit(llwchar a) { return iswdigit(a) != 0; }
+
+	static bool isPunct(char a) { return ispunct((unsigned char)a) != 0; }
+	static bool isPunct(llwchar a) { return iswpunct(a) != 0; }
+
+	static bool isAlnum(char a) { return isalnum((unsigned char)a) != 0; }
+	static bool isAlnum(llwchar a) { return iswalnum(a) != 0; }
+
+	static S32	collate(const char* a, const char* b) { return strcoll(a, b); }
+	static S32	collate(const llwchar* a, const llwchar* b);
+
+	static void setupDatetimeInfo (bool daylight);
+	static long getSltOffset (void) {return sltOffset;}
+	static long getLocalTimeOffset (void) {return localTimeOffset;}
+	static bool getDaylightSavings (void) {return daylightSavings;}
+	static std::string getDatetimeCode (std::string key);
+};
+
+/**
+ * @brief Return a string constructed from in without crashing if the
+ * pointer is NULL.
+ */
+LL_COMMON_API std::string ll_safe_string(const char* in);
+LL_COMMON_API std::string ll_safe_string(const char* in, S32 maxlen);
+
+
+// Allowing assignments from non-strings into format_map_t is apparently
+// *really* error-prone, so subclass std::string with just basic c'tors.
+class LLFormatMapString
+{
+public:
+	LLFormatMapString() {};
+	LLFormatMapString(const char* s) : mString(ll_safe_string(s)) {};
+	LLFormatMapString(const std::string& s) : mString(s) {};
+	operator std::string() const { return mString; }
+	bool operator<(const LLFormatMapString& rhs) const { return mString < rhs.mString; }
+	std::size_t length() const { return mString.length(); }
+	
+private:
+	std::string mString;
+};
+
+template <class T>
+class LLStringUtilBase
+{
+private:
+	static std::string sLocale;
+
+public:
+	typedef typename std::basic_string<T>::size_type size_type;
+	
+public:
+	/////////////////////////////////////////////////////////////////////////////////////////
+	// Static Utility functions that operate on std::strings
+
+	static std::basic_string<T> null;
+	
+	typedef std::map<LLFormatMapString, LLFormatMapString> format_map_t;
+	static void getTokens (std::basic_string<T> input, std::vector<std::basic_string<T> >& tokens);
+	static void formatNumber(std::basic_string<T>& numStr, std::basic_string<T> decimals);
+	static bool formatDatetime(std::basic_string<T>& replacement, std::basic_string<T> token, std::basic_string<T> param, const LLSD& substitutions);
+	static S32 format(std::basic_string<T>& s, const LLSD& substitutions);
+	static S32 format(std::basic_string<T>& s, const format_map_t& fmt_map);
+	static bool simpleReplacement(std::basic_string<T>& replacement, std::basic_string<T> token, const LLSD& substitutions);
+	static void setLocale (std::string inLocale) {sLocale = inLocale;};
+	static std::string getLocale (void) {return sLocale;};
+	
+	static bool isValidIndex(const std::basic_string<T>& string, size_type i)
+	{
+		return !string.empty() && (0 <= i) && (i <= string.size());
+	}
+
+	static void	trimHead(std::basic_string<T>& string);
+	static void	trimTail(std::basic_string<T>& string);
+	static void	trim(std::basic_string<T>& string)	{ trimHead(string); trimTail(string); }
+	static void truncate(std::basic_string<T>& string, size_type count);
+
+	static void	toUpper(std::basic_string<T>& string);
+	static void	toLower(std::basic_string<T>& string);
+	
+	// True if this is the head of s.
+	static BOOL	isHead( const std::basic_string<T>& string, const T* s ); 
+
+	/**
+	 * @brief Returns true if string starts with substr
+	 *
+	 * If etither string or substr are empty, this method returns false.
+	 */
+	static bool startsWith(
+		const std::basic_string<T>& string,
+		const std::basic_string<T>& substr);
+
+	/**
+	 * @brief Returns true if string ends in substr
+	 *
+	 * If etither string or substr are empty, this method returns false.
+	 */
+	static bool endsWith(
+		const std::basic_string<T>& string,
+		const std::basic_string<T>& substr);
+
+	static void	addCRLF(std::basic_string<T>& string);
+	static void	removeCRLF(std::basic_string<T>& string);
+
+	static void	replaceTabsWithSpaces( std::basic_string<T>& string, size_type spaces_per_tab );
+	static void	replaceNonstandardASCII( std::basic_string<T>& string, T replacement );
+	static void	replaceChar( std::basic_string<T>& string, T target, T replacement );
+
+	static BOOL	containsNonprintable(const std::basic_string<T>& string);
+	static void	stripNonprintable(std::basic_string<T>& string);
+
+	/**
+	 * @brief Unsafe way to make ascii characters. You should probably
+	 * only call this when interacting with the host operating system.
+	 * The 1 byte std::string does not work correctly.
+	 * The 2 and 4 byte std::string probably work, so LLWStringUtil::_makeASCII
+	 * should work.
+	 */
+	static void _makeASCII(std::basic_string<T>& string);
+
+	// Conversion to other data types
+	static BOOL	convertToBOOL(const std::basic_string<T>& string, BOOL& value);
+	static BOOL	convertToU8(const std::basic_string<T>& string, U8& value);
+	static BOOL	convertToS8(const std::basic_string<T>& string, S8& value);
+	static BOOL	convertToS16(const std::basic_string<T>& string, S16& value);
+	static BOOL	convertToU16(const std::basic_string<T>& string, U16& value);
+	static BOOL	convertToU32(const std::basic_string<T>& string, U32& value);
+	static BOOL	convertToS32(const std::basic_string<T>& string, S32& value);
+	static BOOL	convertToF32(const std::basic_string<T>& string, F32& value);
+	static BOOL	convertToF64(const std::basic_string<T>& string, F64& value);
+
+	/////////////////////////////////////////////////////////////////////////////////////////
+	// Utility functions for working with char*'s and strings
+
+	// Like strcmp but also handles empty strings. Uses
+	// current locale.
+	static S32		compareStrings(const T* lhs, const T* rhs);
+	static S32		compareStrings(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs);
+	
+	// case insensitive version of above. Uses current locale on
+	// Win32, and falls back to a non-locale aware comparison on
+	// Linux.
+	static S32		compareInsensitive(const T* lhs, const T* rhs);
+	static S32		compareInsensitive(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs);
+
+	// Case sensitive comparison with good handling of numbers.  Does not use current locale.
+	// a.k.a. strdictcmp()
+	static S32		compareDict(const std::basic_string<T>& a, const std::basic_string<T>& b);
+
+	// Case *in*sensitive comparison with good handling of numbers.  Does not use current locale.
+	// a.k.a. strdictcmp()
+	static S32		compareDictInsensitive(const std::basic_string<T>& a, const std::basic_string<T>& b);
+
+	// Puts compareDict() in a form appropriate for LL container classes to use for sorting.
+	static BOOL		precedesDict( const std::basic_string<T>& a, const std::basic_string<T>& b );
+
+	// A replacement for strncpy.
+	// If the dst buffer is dst_size bytes long or more, ensures that dst is null terminated and holds
+	// up to dst_size-1 characters of src.
+	static void		copy(T* dst, const T* src, size_type dst_size);
+	
+	// Copies src into dst at a given offset.  
+	static void		copyInto(std::basic_string<T>& dst, const std::basic_string<T>& src, size_type offset);
+	
+#ifdef _DEBUG	
+	static void		testHarness();
+#endif
+
+};
+
+template<class T> std::basic_string<T> LLStringUtilBase<T>::null;
+template<class T> std::string LLStringUtilBase<T>::sLocale;
+
+typedef LL_COMMON_API LLStringUtilBase<char> LLStringUtil;
+typedef LL_COMMON_API LLStringUtilBase<llwchar> LLWStringUtil;
+typedef LL_COMMON_API std::basic_string<llwchar> LLWString;
+
+//@ Use this where we want to disallow input in the form of "foo"
+//  This is used to catch places where english text is embedded in the code
+//  instead of in a translatable XUI file.
+class LLStringExplicit : public std::string
+{
+public:
+	explicit LLStringExplicit(const char* s) : std::string(s) {}
+	LLStringExplicit(const std::string& s) : std::string(s) {}
+	LLStringExplicit(const std::string& s, size_type pos, size_type n = std::string::npos) : std::string(s, pos, n) {}
+};
+
+struct LLDictionaryLess
+{
+public:
+	bool operator()(const std::string& a, const std::string& b)
+	{
+		return (LLStringUtil::precedesDict(a, b) ? true : false);
+	}
+};
+
+
+/**
+ * Simple support functions
+ */
+
+/**
+ * @brief chop off the trailing characters in a string.
+ *
+ * This function works on bytes rather than glyphs, so this will
+ * incorrectly truncate non-single byte strings.
+ * Use utf8str_truncate() for utf8 strings
+ * @return a copy of in string minus the trailing count bytes.
+ */
+inline std::string chop_tail_copy(
+	const std::string& in,
+	std::string::size_type count)
+{
+	return std::string(in, 0, in.length() - count);
+}
+
+/**
+ * @brief This translates a nybble stored as a hex value from 0-f back
+ * to a nybble in the low order bits of the return byte.
+ */
+LL_COMMON_API U8 hex_as_nybble(char hex);
+
+/**
+ * @brief read the contents of a file into a string.
+ *
+ * Since this function has no concept of character encoding, most
+ * anything you do with this method ill-advised. Please avoid.
+ * @param str [out] The string which will have.
+ * @param filename The full name of the file to read.
+ * @return Returns true on success. If false, str is unmodified.
+ */
+LL_COMMON_API bool _read_file_into_string(std::string& str, const std::string& filename);
+LL_COMMON_API bool iswindividual(llwchar elem);
+
+/**
+ * Unicode support
+ */
+
+// Make the incoming string a utf8 string. Replaces any unknown glyph
+// with the UNKOWN_CHARACTER. Once any unknown glph is found, the rest
+// of the data may not be recovered.
+LL_COMMON_API std::string rawstr_to_utf8(const std::string& raw);
+
+//
+// We should never use UTF16 except when communicating with Win32!
+//
+typedef LL_COMMON_API std::basic_string<U16> llutf16string;
+
+LL_COMMON_API LLWString utf16str_to_wstring(const llutf16string &utf16str, S32 len);
+LL_COMMON_API LLWString utf16str_to_wstring(const llutf16string &utf16str);
+
+LL_COMMON_API llutf16string wstring_to_utf16str(const LLWString &utf32str, S32 len);
+LL_COMMON_API llutf16string wstring_to_utf16str(const LLWString &utf32str);
+
+LL_COMMON_API llutf16string utf8str_to_utf16str ( const std::string& utf8str, S32 len);
+LL_COMMON_API llutf16string utf8str_to_utf16str ( const std::string& utf8str );
+
+LL_COMMON_API LLWString utf8str_to_wstring(const std::string &utf8str, S32 len);
+LL_COMMON_API LLWString utf8str_to_wstring(const std::string &utf8str);
+// Same function, better name. JC
+inline LLWString utf8string_to_wstring(const std::string& utf8_string) { return utf8str_to_wstring(utf8_string); }
+
+//
+LL_COMMON_API S32 wchar_to_utf8chars(llwchar inchar, char* outchars);
+
+LL_COMMON_API std::string wstring_to_utf8str(const LLWString &utf32str, S32 len);
+LL_COMMON_API std::string wstring_to_utf8str(const LLWString &utf32str);
+
+LL_COMMON_API std::string utf16str_to_utf8str(const llutf16string &utf16str, S32 len);
+LL_COMMON_API std::string utf16str_to_utf8str(const llutf16string &utf16str);
+
+// Length of this UTF32 string in bytes when transformed to UTF8
+LL_COMMON_API S32 wstring_utf8_length(const LLWString& wstr); 
+
+// Length in bytes of this wide char in a UTF8 string
+LL_COMMON_API S32 wchar_utf8_length(const llwchar wc); 
+
+LL_COMMON_API std::string utf8str_tolower(const std::string& utf8str);
+
+// Length in llwchar (UTF-32) of the first len units (16 bits) of the given UTF-16 string.
+LL_COMMON_API S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len);
+
+// Length in utf16string (UTF-16) of wlen wchars beginning at woffset.
+LL_COMMON_API S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen);
+
+// Length in wstring (i.e., llwchar count) of a part of a wstring specified by utf16 length (i.e., utf16 units.)
+LL_COMMON_API S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL);
+
+/**
+ * @brief Properly truncate a utf8 string to a maximum byte count.
+ * 
+ * The returned string may be less than max_len if the truncation
+ * happens in the middle of a glyph. If max_len is longer than the
+ * string passed in, the return value == utf8str.
+ * @param utf8str A valid utf8 string to truncate.
+ * @param max_len The maximum number of bytes in the return value.
+ * @return Returns a valid utf8 string with byte count <= max_len.
+ */
+LL_COMMON_API std::string utf8str_truncate(const std::string& utf8str, const S32 max_len);
+
+LL_COMMON_API std::string utf8str_trim(const std::string& utf8str);
+
+LL_COMMON_API S32 utf8str_compare_insensitive(
+	const std::string& lhs,
+	const std::string& rhs);
+
+/**
+ * @brief Replace all occurences of target_char with replace_char
+ *
+ * @param utf8str A utf8 string to process.
+ * @param target_char The wchar to be replaced
+ * @param replace_char The wchar which is written on replace
+ */
+LL_COMMON_API std::string utf8str_substChar(
+	const std::string& utf8str,
+	const llwchar target_char,
+	const llwchar replace_char);
+
+LL_COMMON_API std::string utf8str_makeASCII(const std::string& utf8str);
+
+// Hack - used for evil notecards.
+LL_COMMON_API std::string mbcsstring_makeASCII(const std::string& str); 
+
+LL_COMMON_API std::string utf8str_removeCRLF(const std::string& utf8str);
+
+
+#if LL_WINDOWS
+/* @name Windows string helpers
+ */
+//@{
+
+/**
+ * @brief Implementation the expected snprintf interface.
+ *
+ * If the size of the passed in buffer is not large enough to hold the string,
+ * two bad things happen:
+ * 1. resulting formatted string is NOT null terminated
+ * 2. Depending on the platform, the return value could be a) the required
+ *    size of the buffer to copy the entire formatted string or b) -1.
+ *    On Windows with VS.Net 2003, it returns -1 e.g. 
+ *
+ * safe_snprintf always adds a NULL terminator so that the caller does not
+ * need to check for return value or need to add the NULL terminator.
+ * It does not, however change the return value - to let the caller know
+ * that the passed in buffer size was not large enough to hold the
+ * formatted string.
+ *
+ */
+
 // Deal with the differeneces on Windows
 namespace snprintf_hack
 {
@@ -529,952 +529,952 @@ namespace snprintf_hack
 }
 
 using snprintf_hack::snprintf;
-
-/**
- * @brief Convert a wide string to std::string
- *
- * This replaces the unsafe W2A macro from ATL.
- */
-std::string ll_convert_wide_to_string(const wchar_t* in);
-
-//@}
-#endif // LL_WINDOWS
-
-/**
- * Many of the 'strip' and 'replace' methods of LLStringUtilBase need
- * specialization to work with the signed char type.
- * Sadly, it is not possible (AFAIK) to specialize a single method of
- * a template class.
- * That stuff should go here.
- */
-namespace LLStringFn
-{
-	/**
-	 * @brief Replace all non-printable characters with replacement in
-	 * string.
-	 * NOTE - this will zap non-ascii
-	 *
-	 * @param [in,out] string the to modify. out value is the string
-	 * with zero non-printable characters.
-	 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
-	 */
-	void replace_nonprintable_in_ascii(
-		std::basic_string<char>& string,
-		char replacement);
-
-
-	/**
-	 * @brief Replace all non-printable characters and pipe characters
-	 * with replacement in a string.
-	 * NOTE - this will zap non-ascii
-	 *
-	 * @param [in,out] the string to modify. out value is the string
-	 * with zero non-printable characters and zero pipe characters.
-	 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
-	 */
-	void replace_nonprintable_and_pipe_in_ascii(std::basic_string<char>& str,
-									   char replacement);
-
-
-	/**
-	 * @brief Remove all characters that are not allowed in XML 1.0.
-	 * Returns a copy of the string with those characters removed.
-	 * Works with US ASCII and UTF-8 encoded strings.  JC
-	 */
-	std::string strip_invalid_xml(const std::string& input);
-
-
-	/**
-	 * @brief Replace all control characters (0 <= c < 0x20) with replacement in
-	 * string.   This is safe for utf-8
-	 *
-	 * @param [in,out] string the to modify. out value is the string
-	 * with zero non-printable characters.
-	 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
-	 */
-	void replace_ascii_controlchars(
-		std::basic_string<char>& string,
-		char replacement);
-}
-
-////////////////////////////////////////////////////////////
-
-//static
-template<class T>
-void LLStringUtilBase<T>::getTokens (std::basic_string<T> input, std::vector<std::basic_string<T> >& tokens)
-{
-	const std::basic_string<T> delims (",");
-	std::basic_string<T> currToken;
-	size_type begIdx, endIdx;
-
-	begIdx = input.find_first_not_of (delims);
-	while (begIdx != std::basic_string<T>::npos)
-	{
-		endIdx = input.find_first_of (delims, begIdx);
-		if (endIdx == std::basic_string<T>::npos)
-		{
-			endIdx = input.length();
-		}
-
-		currToken = input.substr(begIdx, endIdx - begIdx);
-		trim (currToken);
-		tokens.push_back(currToken);
-		begIdx = input.find_first_not_of (delims, endIdx);
-	}
-}
-
-// static
-template<class T> 
-S32 LLStringUtilBase<T>::format(std::basic_string<T>& s, const format_map_t& fmt_map)
-{
-	LLSD llsdMap;
-
-	for (format_map_t::const_iterator iter = fmt_map.begin();
-		 iter != fmt_map.end();
-		 ++iter)
-	{
-		llsdMap[iter->first] = iter->second;
-	}
-
-	return format (s, llsdMap);
-}
-
-//static
-template<class T>
-S32 LLStringUtilBase<T>::format(std::basic_string<T>& s, const LLSD& substitutions)
-{
-	S32 res = 0;
-
-	if (!substitutions.isMap()) 
-	{
-		return res;
-	}
-
-	std::basic_ostringstream<T> output;
-	// match strings like [NAME,number,3]
-	const boost::regex key("\\[((\\s)*([0-9_A-Za-z]+)((\\s)*,(\\s)*[0-9_A-Za-z\\s]*){0,2}(\\s)*)]");
-
-
-	typename std::basic_string<T>::const_iterator start = s.begin();
-	typename std::basic_string<T>::const_iterator end = s.end();
-	boost::smatch match;
-	
-
-	while (boost::regex_search(start, end, match, key, boost::match_default))
-	{
-		bool found_replacement = false;
-		std::vector<std::basic_string<T> > tokens;
-		std::basic_string<T> replacement;
-
-		getTokens (std::basic_string<T>(match[1].first, match[1].second), tokens);
-
-		if (tokens.size() == 1)
-		{
-			found_replacement = simpleReplacement (replacement, tokens[0], substitutions);
-		}
-		else if (tokens[1] == "number")
-		{
-			std::basic_string<T> param = "0";
-
-			if (tokens.size() > 2) param = tokens[2];
-			found_replacement = simpleReplacement (replacement, tokens[0], substitutions);
-			if (found_replacement) formatNumber (replacement, param);
-		}
-		else if (tokens[1] == "datetime")
-		{
-			std::basic_string<T> param;
-			if (tokens.size() > 2) param = tokens[2];
-
-			found_replacement = formatDatetime (replacement, tokens[0], param, substitutions);
-		}
-
-		if (found_replacement)
-		{
-			output << std::basic_string<T>(start, match[0].first) << replacement;
-			res++;
-		}
-		else
-		{
-			// we had no replacement, so leave the string we searched for so that it gets noticed by QA
-			// "hello [NAME_NOT_FOUND]" is output
-			output << std::basic_string<T>(start, match[0].second);
-		}
-		
-		// update search position 
-		start = match[0].second; 
-	}
-	// send the remainder of the string (with no further matches for bracketed names)
-	output << std::basic_string<T>(start, end);
-	s = output.str();
-	return res;
-}
-
-// static
-template<class T>
-bool LLStringUtilBase<T>::simpleReplacement(std::basic_string<T> &replacement, std::basic_string<T> token, const LLSD &substitutions)
-{
-	// see if we have a replacement for the bracketed string (without the brackets)
-	// test first using has() because if we just look up with operator[] we get back an
-	// empty string even if the value is missing. We want to distinguish between 
-	// missing replacements and deliberately empty replacement strings.
-	if (substitutions.has(token))
-	{
-		replacement = substitutions[token].asString();
-		return true;
-	}
-	// if not, see if there's one WITH brackets
-	else if (substitutions.has(std::basic_string<T>("[" + token + "]")))
-	{
-		replacement = substitutions[std::basic_string<T>("[" + token + "]")].asString();
-		return true;
-	}
-
-	return false;
-}
-
-// static
-template<class T>
-void LLStringUtilBase<T>::formatNumber(std::basic_string<T>& numStr, std::basic_string<T> decimals)
-{
-	typedef typename std::basic_string<T>::size_type string_size_type_t;
-	std::basic_stringstream<T> strStream;
-	S32 intDecimals = 0;
-
-	convertToS32 (decimals, intDecimals);
-	if (!sLocale.empty())
-	{
-		strStream.imbue (std::locale(sLocale.c_str()));
-	}
-
-	if (!intDecimals)
-	{
-		S32 intStr;
-
-		if (convertToS32(numStr, intStr))
-		{
-			strStream << intStr;
-			numStr = strStream.str();
-		}
-	}
-	else
-	{
-		F32 floatStr;
-
-		if (convertToF32(numStr, floatStr))
-		{
-			strStream << std::fixed << std::showpoint << std::setprecision(intDecimals) << floatStr;
-			numStr = strStream.str();
-		}
-	}
-}
-
-// static
-template<class T>
-bool LLStringUtilBase<T>::formatDatetime(std::basic_string<T>& replacement, std::basic_string<T> token,
-										 std::basic_string<T> param, const LLSD& substitutions)
-{
-	S32 secFromEpoch = (long) substitutions["datetime"].asInteger();
-
-	if (param == "local")   // local
-	{
-		secFromEpoch -= LLStringOps::getLocalTimeOffset();
-	}
-	else if (param != "utc") // slt
-	{
-		secFromEpoch -= LLStringOps::getSltOffset();
-	}
-		
-	// if never fell into those two ifs above, param must be utc
-	if (secFromEpoch < 0) secFromEpoch = 0;
-
-	LLDate * datetime = new LLDate((F64)secFromEpoch);
-	std::string code = LLStringOps::getDatetimeCode (token);
-
-	// special case to handle timezone
-	if (code == "%Z") {
-		if (param == "utc") replacement = "GMT";
-		else if (param != "local") replacement = LLStringOps::getDaylightSavings()? "PDT" : "PST";
-		return true;
-	}
-
-	replacement = datetime->toHTTPDateString(code);
-	if (code.empty())
-	{
-		return false;
-	}
-	else
-	{
-		return true;
-	}
-}
-
-// static
-template<class T> 
-S32 LLStringUtilBase<T>::compareStrings(const T* lhs, const T* rhs)
-{	
-	S32 result;
-	if( lhs == rhs )
-	{
-		result = 0;
-	}
-	else
-	if ( !lhs || !lhs[0] )
-	{
-		result = ((!rhs || !rhs[0]) ? 0 : 1);
-	}
-	else
-	if ( !rhs || !rhs[0])
-	{
-		result = -1;
-	}
-	else
-	{
-		result = LLStringOps::collate(lhs, rhs);
-	}
-	return result;
-}
-
-//static 
-template<class T> 
-S32 LLStringUtilBase<T>::compareStrings(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs)
-{
-	return LLStringOps::collate(lhs.c_str(), rhs.c_str());
-}
-
-// static
-template<class T> 
-S32 LLStringUtilBase<T>::compareInsensitive(const T* lhs, const T* rhs )
-{
-	S32 result;
-	if( lhs == rhs )
-	{
-		result = 0;
-	}
-	else
-	if ( !lhs || !lhs[0] )
-	{
-		result = ((!rhs || !rhs[0]) ? 0 : 1);
-	}
-	else
-	if ( !rhs || !rhs[0] )
-	{
-		result = -1;
-	}
-	else
-	{
-		std::basic_string<T> lhs_string(lhs);
-		std::basic_string<T> rhs_string(rhs);
-		LLStringUtilBase<T>::toUpper(lhs_string);
-		LLStringUtilBase<T>::toUpper(rhs_string);
-		result = LLStringOps::collate(lhs_string.c_str(), rhs_string.c_str());
-	}
-	return result;
-}
-
-//static 
-template<class T> 
-S32 LLStringUtilBase<T>::compareInsensitive(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs)
-{
-	std::basic_string<T> lhs_string(lhs);
-	std::basic_string<T> rhs_string(rhs);
-	LLStringUtilBase<T>::toUpper(lhs_string);
-	LLStringUtilBase<T>::toUpper(rhs_string);
-	return LLStringOps::collate(lhs_string.c_str(), rhs_string.c_str());
-}
-
-// Case sensitive comparison with good handling of numbers.  Does not use current locale.
-// a.k.a. strdictcmp()
-
-//static 
-template<class T>
-S32 LLStringUtilBase<T>::compareDict(const std::basic_string<T>& astr, const std::basic_string<T>& bstr)
-{
-	const T* a = astr.c_str();
-	const T* b = bstr.c_str();
-	T ca, cb;
-	S32 ai, bi, cnt = 0;
-	S32 bias = 0;
-
-	ca = *(a++);
-	cb = *(b++);
-	while( ca && cb ){
-		if( bias==0 ){
-			if( LLStringOps::isUpper(ca) ){ ca = LLStringOps::toLower(ca); bias--; }
-			if( LLStringOps::isUpper(cb) ){ cb = LLStringOps::toLower(cb); bias++; }
-		}else{
-			if( LLStringOps::isUpper(ca) ){ ca = LLStringOps::toLower(ca); }
-			if( LLStringOps::isUpper(cb) ){ cb = LLStringOps::toLower(cb); }
-		}
-		if( LLStringOps::isDigit(ca) ){
-			if( cnt-->0 ){
-				if( cb!=ca ) break;
-			}else{
-				if( !LLStringOps::isDigit(cb) ) break;
-				for(ai=0; LLStringOps::isDigit(a[ai]); ai++);
-				for(bi=0; LLStringOps::isDigit(b[bi]); bi++);
-				if( ai<bi ){ ca=0; break; }
-				if( bi<ai ){ cb=0; break; }
-				if( ca!=cb ) break;
-				cnt = ai;
-			}
-		}else if( ca!=cb ){   break;
-		}
-		ca = *(a++);
-		cb = *(b++);
-	}
-	if( ca==cb ) ca += bias;
-	return ca-cb;
-}
-
-// static
-template<class T>
-S32 LLStringUtilBase<T>::compareDictInsensitive(const std::basic_string<T>& astr, const std::basic_string<T>& bstr)
-{
-	const T* a = astr.c_str();
-	const T* b = bstr.c_str();
-	T ca, cb;
-	S32 ai, bi, cnt = 0;
-
-	ca = *(a++);
-	cb = *(b++);
-	while( ca && cb ){
-		if( LLStringOps::isUpper(ca) ){ ca = LLStringOps::toLower(ca); }
-		if( LLStringOps::isUpper(cb) ){ cb = LLStringOps::toLower(cb); }
-		if( LLStringOps::isDigit(ca) ){
-			if( cnt-->0 ){
-				if( cb!=ca ) break;
-			}else{
-				if( !LLStringOps::isDigit(cb) ) break;
-				for(ai=0; LLStringOps::isDigit(a[ai]); ai++);
-				for(bi=0; LLStringOps::isDigit(b[bi]); bi++);
-				if( ai<bi ){ ca=0; break; }
-				if( bi<ai ){ cb=0; break; }
-				if( ca!=cb ) break;
-				cnt = ai;
-			}
-		}else if( ca!=cb ){   break;
-		}
-		ca = *(a++);
-		cb = *(b++);
-	}
-	return ca-cb;
-}
-
-// Puts compareDict() in a form appropriate for LL container classes to use for sorting.
-// static 
-template<class T> 
-BOOL LLStringUtilBase<T>::precedesDict( const std::basic_string<T>& a, const std::basic_string<T>& b )
-{
-	if( a.size() && b.size() )
-	{
-		return (LLStringUtilBase<T>::compareDict(a.c_str(), b.c_str()) < 0);
-	}
-	else
-	{
-		return (!b.empty());
-	}
-}
-
-//static
-template<class T> 
-void LLStringUtilBase<T>::toUpper(std::basic_string<T>& string)	
-{ 
-	if( !string.empty() )
-	{ 
-		std::transform(
-			string.begin(),
-			string.end(),
-			string.begin(),
-			(T(*)(T)) &LLStringOps::toUpper);
-	}
-}
-
-//static
-template<class T> 
-void LLStringUtilBase<T>::toLower(std::basic_string<T>& string)
-{ 
-	if( !string.empty() )
-	{ 
-		std::transform(
-			string.begin(),
-			string.end(),
-			string.begin(),
-			(T(*)(T)) &LLStringOps::toLower);
-	}
-}
-
-//static
-template<class T> 
-void LLStringUtilBase<T>::trimHead(std::basic_string<T>& string)
-{			
-	if( !string.empty() )
-	{
-		size_type i = 0;
-		while( i < string.length() && LLStringOps::isSpace( string[i] ) )
-		{
-			i++;
-		}
-		string.erase(0, i);
-	}
-}
-
-//static
-template<class T> 
-void LLStringUtilBase<T>::trimTail(std::basic_string<T>& string)
-{			
-	if( string.size() )
-	{
-		size_type len = string.length();
-		size_type i = len;
-		while( i > 0 && LLStringOps::isSpace( string[i-1] ) )
-		{
-			i--;
-		}
-
-		string.erase( i, len - i );
-	}
-}
-
-
-// Replace line feeds with carriage return-line feed pairs.
-//static
-template<class T>
-void LLStringUtilBase<T>::addCRLF(std::basic_string<T>& string)
-{
-	const T LF = 10;
-	const T CR = 13;
-
-	// Count the number of line feeds
-	size_type count = 0;
-	size_type len = string.size();
-	size_type i;
-	for( i = 0; i < len; i++ )
-	{
-		if( string[i] == LF )
-		{
-			count++;
-		}
-	}
-
-	// Insert a carriage return before each line feed
-	if( count )
-	{
-		size_type size = len + count;
-		T *t = new T[size];
-		size_type j = 0;
-		for( i = 0; i < len; ++i )
-		{
-			if( string[i] == LF )
-			{
-				t[j] = CR;
-				++j;
-			}
-			t[j] = string[i];
-			++j;
-		}
-
-		string.assign(t, size);
-	}
-}
-
-// Remove all carriage returns
-//static
-template<class T> 
-void LLStringUtilBase<T>::removeCRLF(std::basic_string<T>& string)
-{
-	const T CR = 13;
-
-	size_type cr_count = 0;
-	size_type len = string.size();
-	size_type i;
-	for( i = 0; i < len - cr_count; i++ )
-	{
-		if( string[i+cr_count] == CR )
-		{
-			cr_count++;
-		}
-
-		string[i] = string[i+cr_count];
-	}
-	string.erase(i, cr_count);
-}
-
-//static
-template<class T> 
-void LLStringUtilBase<T>::replaceChar( std::basic_string<T>& string, T target, T replacement )
-{
-	size_type found_pos = 0;
-	for (found_pos = string.find(target, found_pos); 
-		found_pos != std::basic_string<T>::npos; 
-		found_pos = string.find(target, found_pos))
-	{
-		string[found_pos] = replacement;
-	}
-}
-
-//static
-template<class T> 
-void LLStringUtilBase<T>::replaceNonstandardASCII( std::basic_string<T>& string, T replacement )
-{
-	const char LF = 10;
-	const S8 MIN = 32;
-//	const S8 MAX = 127;
-
-	size_type len = string.size();
-	for( size_type i = 0; i < len; i++ )
-	{
-		// No need to test MAX < mText[i] because we treat mText[i] as a signed char,
-		// which has a max value of 127.
-		if( ( S8(string[i]) < MIN ) && (string[i] != LF) )
-		{
-			string[i] = replacement;
-		}
-	}
-}
-
-//static
-template<class T> 
-void LLStringUtilBase<T>::replaceTabsWithSpaces( std::basic_string<T>& str, size_type spaces_per_tab )
-{
-	const T TAB = '\t';
-	const T SPACE = ' ';
-
-	std::basic_string<T> out_str;
-	// Replace tabs with spaces
-	for (size_type i = 0; i < str.length(); i++)
-	{
-		if (str[i] == TAB)
-		{
-			for (size_type j = 0; j < spaces_per_tab; j++)
-				out_str += SPACE;
-		}
-		else
-		{
-			out_str += str[i];
-		}
-	}
-	str = out_str;
-}
-
-//static
-template<class T> 
-BOOL LLStringUtilBase<T>::containsNonprintable(const std::basic_string<T>& string)
-{
-	const char MIN = 32;
-	BOOL rv = FALSE;
-	for (size_type i = 0; i < string.size(); i++)
-	{
-		if(string[i] < MIN)
-		{
-			rv = TRUE;
-			break;
-		}
-	}
-	return rv;
-}
-
-//static
-template<class T> 
-void LLStringUtilBase<T>::stripNonprintable(std::basic_string<T>& string)
-{
-	const char MIN = 32;
-	size_type j = 0;
-	if (string.empty())
-	{
-		return;
-	}
-	char* c_string = new char[string.size() + 1];
-	if(c_string == NULL)
-	{
-		return;
-	}
-	strcpy(c_string, string.c_str());	/*Flawfinder: ignore*/
-	char* write_head = &c_string[0];
-	for (size_type i = 0; i < string.size(); i++)
-	{
-		char* read_head = &string[i];
-		write_head = &c_string[j];
-		if(!(*read_head < MIN))
-		{
-			*write_head = *read_head;
-			++j;
-		}
-	}
-	c_string[j]= '\0';
-	string = c_string;
-	delete []c_string;
-}
-
-template<class T> 
-void LLStringUtilBase<T>::_makeASCII(std::basic_string<T>& string)
-{
-	// Replace non-ASCII chars with LL_UNKNOWN_CHAR
-	for (size_type i = 0; i < string.length(); i++)
-	{
-		if (string[i] > 0x7f)
-		{
-			string[i] = LL_UNKNOWN_CHAR;
-		}
-	}
-}
-
-// static
-template<class T> 
-void LLStringUtilBase<T>::copy( T* dst, const T* src, size_type dst_size )
-{
-	if( dst_size > 0 )
-	{
-		size_type min_len = 0;
-		if( src )
-		{
-			min_len = llmin( dst_size - 1, strlen( src ) );  /* Flawfinder: ignore */
-			memcpy(dst, src, min_len * sizeof(T));		/* Flawfinder: ignore */
-		}
-		dst[min_len] = '\0';
-	}
-}
-
-// static
-template<class T> 
-void LLStringUtilBase<T>::copyInto(std::basic_string<T>& dst, const std::basic_string<T>& src, size_type offset)
-{
-	if ( offset == dst.length() )
-	{
-		// special case - append to end of string and avoid expensive
-		// (when strings are large) string manipulations
-		dst += src;
-	}
-	else
-	{
-		std::basic_string<T> tail = dst.substr(offset);
-
-		dst = dst.substr(0, offset);
-		dst += src;
-		dst += tail;
-	};
-}
-
-// True if this is the head of s.
-//static
-template<class T> 
-BOOL LLStringUtilBase<T>::isHead( const std::basic_string<T>& string, const T* s ) 
-{ 
-	if( string.empty() )
-	{
-		// Early exit
-		return FALSE;
-	}
-	else
-	{
-		return (strncmp( s, string.c_str(), string.size() ) == 0);
-	}
-}
-
-// static
-template<class T> 
-bool LLStringUtilBase<T>::startsWith(
-	const std::basic_string<T>& string,
-	const std::basic_string<T>& substr)
-{
-	if(string.empty() || (substr.empty())) return false;
-	if(0 == string.find(substr)) return true;
-	return false;
-}
-
-// static
-template<class T> 
-bool LLStringUtilBase<T>::endsWith(
-	const std::basic_string<T>& string,
-	const std::basic_string<T>& substr)
-{
-	if(string.empty() || (substr.empty())) return false;
-	std::string::size_type idx = string.rfind(substr);
-	if(std::string::npos == idx) return false;
-	return (idx == (string.size() - substr.size()));
-}
-
-
-template<class T> 
-BOOL LLStringUtilBase<T>::convertToBOOL(const std::basic_string<T>& string, BOOL& value)
-{
-	if( string.empty() )
-	{
-		return FALSE;
-	}
-
-	std::basic_string<T> temp( string );
-	trim(temp);
-	if( 
-		(temp == "1") || 
-		(temp == "T") || 
-		(temp == "t") || 
-		(temp == "TRUE") || 
-		(temp == "true") || 
-		(temp == "True") )
-	{
-		value = TRUE;
-		return TRUE;
-	}
-	else
-	if( 
-		(temp == "0") || 
-		(temp == "F") || 
-		(temp == "f") || 
-		(temp == "FALSE") || 
-		(temp == "false") || 
-		(temp == "False") )
-	{
-		value = FALSE;
-		return TRUE;
-	}
-
-	return FALSE;
-}
-
-template<class T> 
-BOOL LLStringUtilBase<T>::convertToU8(const std::basic_string<T>& string, U8& value) 
-{
-	S32 value32 = 0;
-	BOOL success = convertToS32(string, value32);
-	if( success && (U8_MIN <= value32) && (value32 <= U8_MAX) )
-	{
-		value = (U8) value32;
-		return TRUE;
-	}
-	return FALSE;
-}
-
-template<class T> 
-BOOL LLStringUtilBase<T>::convertToS8(const std::basic_string<T>& string, S8& value) 
-{
-	S32 value32 = 0;
-	BOOL success = convertToS32(string, value32);
-	if( success && (S8_MIN <= value32) && (value32 <= S8_MAX) )
-	{
-		value = (S8) value32;
-		return TRUE;
-	}
-	return FALSE;
-}
-
-template<class T> 
-BOOL LLStringUtilBase<T>::convertToS16(const std::basic_string<T>& string, S16& value) 
-{
-	S32 value32 = 0;
-	BOOL success = convertToS32(string, value32);
-	if( success && (S16_MIN <= value32) && (value32 <= S16_MAX) )
-	{
-		value = (S16) value32;
-		return TRUE;
-	}
-	return FALSE;
-}
-
-template<class T> 
-BOOL LLStringUtilBase<T>::convertToU16(const std::basic_string<T>& string, U16& value) 
-{
-	S32 value32 = 0;
-	BOOL success = convertToS32(string, value32);
-	if( success && (U16_MIN <= value32) && (value32 <= U16_MAX) )
-	{
-		value = (U16) value32;
-		return TRUE;
-	}
-	return FALSE;
-}
-
-template<class T> 
-BOOL LLStringUtilBase<T>::convertToU32(const std::basic_string<T>& string, U32& value) 
-{
-	if( string.empty() )
-	{
-		return FALSE;
-	}
-
-	std::basic_string<T> temp( string );
-	trim(temp);
-	U32 v;
-	std::basic_istringstream<T> i_stream((std::basic_string<T>)temp);
-	if(i_stream >> v)
-	{
-		value = v;
-		return TRUE;
-	}
-	return FALSE;
-}
-
-template<class T> 
-BOOL LLStringUtilBase<T>::convertToS32(const std::basic_string<T>& string, S32& value) 
-{
-	if( string.empty() )
-	{
-		return FALSE;
-	}
-
-	std::basic_string<T> temp( string );
-	trim(temp);
-	S32 v;
-	std::basic_istringstream<T> i_stream((std::basic_string<T>)temp);
-	if(i_stream >> v)
-	{
-		//TODO: figure out overflow and underflow reporting here
-		//if((LONG_MAX == v) || (LONG_MIN == v))
-		//{
-		//	// Underflow or overflow
-		//	return FALSE;
-		//}
-
-		value = v;
-		return TRUE;
-	}
-	return FALSE;
-}
-
-template<class T> 
-BOOL LLStringUtilBase<T>::convertToF32(const std::basic_string<T>& string, F32& value) 
-{
-	F64 value64 = 0.0;
-	BOOL success = convertToF64(string, value64);
-	if( success && (-F32_MAX <= value64) && (value64 <= F32_MAX) )
-	{
-		value = (F32) value64;
-		return TRUE;
-	}
-	return FALSE;
-}
-
-template<class T> 
-BOOL LLStringUtilBase<T>::convertToF64(const std::basic_string<T>& string, F64& value)
-{
-	if( string.empty() )
-	{
-		return FALSE;
-	}
-
-	std::basic_string<T> temp( string );
-	trim(temp);
-	F64 v;
-	std::basic_istringstream<T> i_stream((std::basic_string<T>)temp);
-	if(i_stream >> v)
-	{
-		//TODO: figure out overflow and underflow reporting here
-		//if( ((-HUGE_VAL == v) || (HUGE_VAL == v))) )
-		//{
-		//	// Underflow or overflow
-		//	return FALSE;
-		//}
-
-		value = v;
-		return TRUE;
-	}
-	return FALSE;
-}
-
-template<class T> 
-void LLStringUtilBase<T>::truncate(std::basic_string<T>& string, size_type count)
-{
-	size_type cur_size = string.size();
-	string.resize(count < cur_size ? count : cur_size);
-}
-
-#endif  // LL_STRING_H
+
+/**
+ * @brief Convert a wide string to std::string
+ *
+ * This replaces the unsafe W2A macro from ATL.
+ */
+LL_COMMON_API std::string ll_convert_wide_to_string(const wchar_t* in);
+
+//@}
+#endif // LL_WINDOWS
+
+/**
+ * Many of the 'strip' and 'replace' methods of LLStringUtilBase need
+ * specialization to work with the signed char type.
+ * Sadly, it is not possible (AFAIK) to specialize a single method of
+ * a template class.
+ * That stuff should go here.
+ */
+namespace LLStringFn
+{
+	/**
+	 * @brief Replace all non-printable characters with replacement in
+	 * string.
+	 * NOTE - this will zap non-ascii
+	 *
+	 * @param [in,out] string the to modify. out value is the string
+	 * with zero non-printable characters.
+	 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
+	 */
+	LL_COMMON_API void replace_nonprintable_in_ascii(
+		std::basic_string<char>& string,
+		char replacement);
+
+
+	/**
+	 * @brief Replace all non-printable characters and pipe characters
+	 * with replacement in a string.
+	 * NOTE - this will zap non-ascii
+	 *
+	 * @param [in,out] the string to modify. out value is the string
+	 * with zero non-printable characters and zero pipe characters.
+	 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
+	 */
+	LL_COMMON_API void replace_nonprintable_and_pipe_in_ascii(std::basic_string<char>& str,
+									   char replacement);
+
+
+	/**
+	 * @brief Remove all characters that are not allowed in XML 1.0.
+	 * Returns a copy of the string with those characters removed.
+	 * Works with US ASCII and UTF-8 encoded strings.  JC
+	 */
+	LL_COMMON_API std::string strip_invalid_xml(const std::string& input);
+
+
+	/**
+	 * @brief Replace all control characters (0 <= c < 0x20) with replacement in
+	 * string.   This is safe for utf-8
+	 *
+	 * @param [in,out] string the to modify. out value is the string
+	 * with zero non-printable characters.
+	 * @param The replacement character. use LL_UNKNOWN_CHAR if unsure.
+	 */
+	LL_COMMON_API void replace_ascii_controlchars(
+		std::basic_string<char>& string,
+		char replacement);
+}
+
+////////////////////////////////////////////////////////////
+
+//static
+template<class T>
+void LLStringUtilBase<T>::getTokens (std::basic_string<T> input, std::vector<std::basic_string<T> >& tokens)
+{
+	const std::basic_string<T> delims (",");
+	std::basic_string<T> currToken;
+	size_type begIdx, endIdx;
+
+	begIdx = input.find_first_not_of (delims);
+	while (begIdx != std::basic_string<T>::npos)
+	{
+		endIdx = input.find_first_of (delims, begIdx);
+		if (endIdx == std::basic_string<T>::npos)
+		{
+			endIdx = input.length();
+		}
+
+		currToken = input.substr(begIdx, endIdx - begIdx);
+		trim (currToken);
+		tokens.push_back(currToken);
+		begIdx = input.find_first_not_of (delims, endIdx);
+	}
+}
+
+// static
+template<class T> 
+S32 LLStringUtilBase<T>::format(std::basic_string<T>& s, const format_map_t& fmt_map)
+{
+	LLSD llsdMap;
+
+	for (format_map_t::const_iterator iter = fmt_map.begin();
+		 iter != fmt_map.end();
+		 ++iter)
+	{
+		llsdMap[iter->first] = iter->second;
+	}
+
+	return format (s, llsdMap);
+}
+
+//static
+template<class T>
+S32 LLStringUtilBase<T>::format(std::basic_string<T>& s, const LLSD& substitutions)
+{
+	S32 res = 0;
+
+	if (!substitutions.isMap()) 
+	{
+		return res;
+	}
+
+	std::basic_ostringstream<T> output;
+	// match strings like [NAME,number,3]
+	const boost::regex key("\\[((\\s)*([0-9_A-Za-z]+)((\\s)*,(\\s)*[0-9_A-Za-z\\s]*){0,2}(\\s)*)]");
+
+
+	typename std::basic_string<T>::const_iterator start = s.begin();
+	typename std::basic_string<T>::const_iterator end = s.end();
+	boost::smatch match;
+	
+
+	while (boost::regex_search(start, end, match, key, boost::match_default))
+	{
+		bool found_replacement = false;
+		std::vector<std::basic_string<T> > tokens;
+		std::basic_string<T> replacement;
+
+		getTokens (std::basic_string<T>(match[1].first, match[1].second), tokens);
+
+		if (tokens.size() == 1)
+		{
+			found_replacement = simpleReplacement (replacement, tokens[0], substitutions);
+		}
+		else if (tokens[1] == "number")
+		{
+			std::basic_string<T> param = "0";
+
+			if (tokens.size() > 2) param = tokens[2];
+			found_replacement = simpleReplacement (replacement, tokens[0], substitutions);
+			if (found_replacement) formatNumber (replacement, param);
+		}
+		else if (tokens[1] == "datetime")
+		{
+			std::basic_string<T> param;
+			if (tokens.size() > 2) param = tokens[2];
+
+			found_replacement = formatDatetime (replacement, tokens[0], param, substitutions);
+		}
+
+		if (found_replacement)
+		{
+			output << std::basic_string<T>(start, match[0].first) << replacement;
+			res++;
+		}
+		else
+		{
+			// we had no replacement, so leave the string we searched for so that it gets noticed by QA
+			// "hello [NAME_NOT_FOUND]" is output
+			output << std::basic_string<T>(start, match[0].second);
+		}
+		
+		// update search position 
+		start = match[0].second; 
+	}
+	// send the remainder of the string (with no further matches for bracketed names)
+	output << std::basic_string<T>(start, end);
+	s = output.str();
+	return res;
+}
+
+// static
+template<class T>
+bool LLStringUtilBase<T>::simpleReplacement(std::basic_string<T> &replacement, std::basic_string<T> token, const LLSD &substitutions)
+{
+	// see if we have a replacement for the bracketed string (without the brackets)
+	// test first using has() because if we just look up with operator[] we get back an
+	// empty string even if the value is missing. We want to distinguish between 
+	// missing replacements and deliberately empty replacement strings.
+	if (substitutions.has(token))
+	{
+		replacement = substitutions[token].asString();
+		return true;
+	}
+	// if not, see if there's one WITH brackets
+	else if (substitutions.has(std::basic_string<T>("[" + token + "]")))
+	{
+		replacement = substitutions[std::basic_string<T>("[" + token + "]")].asString();
+		return true;
+	}
+
+	return false;
+}
+
+// static
+template<class T>
+void LLStringUtilBase<T>::formatNumber(std::basic_string<T>& numStr, std::basic_string<T> decimals)
+{
+	typedef typename std::basic_string<T>::size_type string_size_type_t;
+	std::basic_stringstream<T> strStream;
+	S32 intDecimals = 0;
+
+	convertToS32 (decimals, intDecimals);
+	if (!sLocale.empty())
+	{
+		strStream.imbue (std::locale(sLocale.c_str()));
+	}
+
+	if (!intDecimals)
+	{
+		S32 intStr;
+
+		if (convertToS32(numStr, intStr))
+		{
+			strStream << intStr;
+			numStr = strStream.str();
+		}
+	}
+	else
+	{
+		F32 floatStr;
+
+		if (convertToF32(numStr, floatStr))
+		{
+			strStream << std::fixed << std::showpoint << std::setprecision(intDecimals) << floatStr;
+			numStr = strStream.str();
+		}
+	}
+}
+
+// static
+template<class T>
+bool LLStringUtilBase<T>::formatDatetime(std::basic_string<T>& replacement, std::basic_string<T> token,
+										 std::basic_string<T> param, const LLSD& substitutions)
+{
+	S32 secFromEpoch = (long) substitutions["datetime"].asInteger();
+
+	if (param == "local")   // local
+	{
+		secFromEpoch -= LLStringOps::getLocalTimeOffset();
+	}
+	else if (param != "utc") // slt
+	{
+		secFromEpoch -= LLStringOps::getSltOffset();
+	}
+		
+	// if never fell into those two ifs above, param must be utc
+	if (secFromEpoch < 0) secFromEpoch = 0;
+
+	LLDate * datetime = new LLDate((F64)secFromEpoch);
+	std::string code = LLStringOps::getDatetimeCode (token);
+
+	// special case to handle timezone
+	if (code == "%Z") {
+		if (param == "utc") replacement = "GMT";
+		else if (param != "local") replacement = LLStringOps::getDaylightSavings()? "PDT" : "PST";
+		return true;
+	}
+
+	replacement = datetime->toHTTPDateString(code);
+	if (code.empty())
+	{
+		return false;
+	}
+	else
+	{
+		return true;
+	}
+}
+
+// static
+template<class T> 
+S32 LLStringUtilBase<T>::compareStrings(const T* lhs, const T* rhs)
+{	
+	S32 result;
+	if( lhs == rhs )
+	{
+		result = 0;
+	}
+	else
+	if ( !lhs || !lhs[0] )
+	{
+		result = ((!rhs || !rhs[0]) ? 0 : 1);
+	}
+	else
+	if ( !rhs || !rhs[0])
+	{
+		result = -1;
+	}
+	else
+	{
+		result = LLStringOps::collate(lhs, rhs);
+	}
+	return result;
+}
+
+//static 
+template<class T> 
+S32 LLStringUtilBase<T>::compareStrings(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs)
+{
+	return LLStringOps::collate(lhs.c_str(), rhs.c_str());
+}
+
+// static
+template<class T> 
+S32 LLStringUtilBase<T>::compareInsensitive(const T* lhs, const T* rhs )
+{
+	S32 result;
+	if( lhs == rhs )
+	{
+		result = 0;
+	}
+	else
+	if ( !lhs || !lhs[0] )
+	{
+		result = ((!rhs || !rhs[0]) ? 0 : 1);
+	}
+	else
+	if ( !rhs || !rhs[0] )
+	{
+		result = -1;
+	}
+	else
+	{
+		std::basic_string<T> lhs_string(lhs);
+		std::basic_string<T> rhs_string(rhs);
+		LLStringUtilBase<T>::toUpper(lhs_string);
+		LLStringUtilBase<T>::toUpper(rhs_string);
+		result = LLStringOps::collate(lhs_string.c_str(), rhs_string.c_str());
+	}
+	return result;
+}
+
+//static 
+template<class T> 
+S32 LLStringUtilBase<T>::compareInsensitive(const std::basic_string<T>& lhs, const std::basic_string<T>& rhs)
+{
+	std::basic_string<T> lhs_string(lhs);
+	std::basic_string<T> rhs_string(rhs);
+	LLStringUtilBase<T>::toUpper(lhs_string);
+	LLStringUtilBase<T>::toUpper(rhs_string);
+	return LLStringOps::collate(lhs_string.c_str(), rhs_string.c_str());
+}
+
+// Case sensitive comparison with good handling of numbers.  Does not use current locale.
+// a.k.a. strdictcmp()
+
+//static 
+template<class T>
+S32 LLStringUtilBase<T>::compareDict(const std::basic_string<T>& astr, const std::basic_string<T>& bstr)
+{
+	const T* a = astr.c_str();
+	const T* b = bstr.c_str();
+	T ca, cb;
+	S32 ai, bi, cnt = 0;
+	S32 bias = 0;
+
+	ca = *(a++);
+	cb = *(b++);
+	while( ca && cb ){
+		if( bias==0 ){
+			if( LLStringOps::isUpper(ca) ){ ca = LLStringOps::toLower(ca); bias--; }
+			if( LLStringOps::isUpper(cb) ){ cb = LLStringOps::toLower(cb); bias++; }
+		}else{
+			if( LLStringOps::isUpper(ca) ){ ca = LLStringOps::toLower(ca); }
+			if( LLStringOps::isUpper(cb) ){ cb = LLStringOps::toLower(cb); }
+		}
+		if( LLStringOps::isDigit(ca) ){
+			if( cnt-->0 ){
+				if( cb!=ca ) break;
+			}else{
+				if( !LLStringOps::isDigit(cb) ) break;
+				for(ai=0; LLStringOps::isDigit(a[ai]); ai++);
+				for(bi=0; LLStringOps::isDigit(b[bi]); bi++);
+				if( ai<bi ){ ca=0; break; }
+				if( bi<ai ){ cb=0; break; }
+				if( ca!=cb ) break;
+				cnt = ai;
+			}
+		}else if( ca!=cb ){   break;
+		}
+		ca = *(a++);
+		cb = *(b++);
+	}
+	if( ca==cb ) ca += bias;
+	return ca-cb;
+}
+
+// static
+template<class T>
+S32 LLStringUtilBase<T>::compareDictInsensitive(const std::basic_string<T>& astr, const std::basic_string<T>& bstr)
+{
+	const T* a = astr.c_str();
+	const T* b = bstr.c_str();
+	T ca, cb;
+	S32 ai, bi, cnt = 0;
+
+	ca = *(a++);
+	cb = *(b++);
+	while( ca && cb ){
+		if( LLStringOps::isUpper(ca) ){ ca = LLStringOps::toLower(ca); }
+		if( LLStringOps::isUpper(cb) ){ cb = LLStringOps::toLower(cb); }
+		if( LLStringOps::isDigit(ca) ){
+			if( cnt-->0 ){
+				if( cb!=ca ) break;
+			}else{
+				if( !LLStringOps::isDigit(cb) ) break;
+				for(ai=0; LLStringOps::isDigit(a[ai]); ai++);
+				for(bi=0; LLStringOps::isDigit(b[bi]); bi++);
+				if( ai<bi ){ ca=0; break; }
+				if( bi<ai ){ cb=0; break; }
+				if( ca!=cb ) break;
+				cnt = ai;
+			}
+		}else if( ca!=cb ){   break;
+		}
+		ca = *(a++);
+		cb = *(b++);
+	}
+	return ca-cb;
+}
+
+// Puts compareDict() in a form appropriate for LL container classes to use for sorting.
+// static 
+template<class T> 
+BOOL LLStringUtilBase<T>::precedesDict( const std::basic_string<T>& a, const std::basic_string<T>& b )
+{
+	if( a.size() && b.size() )
+	{
+		return (LLStringUtilBase<T>::compareDict(a.c_str(), b.c_str()) < 0);
+	}
+	else
+	{
+		return (!b.empty());
+	}
+}
+
+//static
+template<class T> 
+void LLStringUtilBase<T>::toUpper(std::basic_string<T>& string)	
+{ 
+	if( !string.empty() )
+	{ 
+		std::transform(
+			string.begin(),
+			string.end(),
+			string.begin(),
+			(T(*)(T)) &LLStringOps::toUpper);
+	}
+}
+
+//static
+template<class T> 
+void LLStringUtilBase<T>::toLower(std::basic_string<T>& string)
+{ 
+	if( !string.empty() )
+	{ 
+		std::transform(
+			string.begin(),
+			string.end(),
+			string.begin(),
+			(T(*)(T)) &LLStringOps::toLower);
+	}
+}
+
+//static
+template<class T> 
+void LLStringUtilBase<T>::trimHead(std::basic_string<T>& string)
+{			
+	if( !string.empty() )
+	{
+		size_type i = 0;
+		while( i < string.length() && LLStringOps::isSpace( string[i] ) )
+		{
+			i++;
+		}
+		string.erase(0, i);
+	}
+}
+
+//static
+template<class T> 
+void LLStringUtilBase<T>::trimTail(std::basic_string<T>& string)
+{			
+	if( string.size() )
+	{
+		size_type len = string.length();
+		size_type i = len;
+		while( i > 0 && LLStringOps::isSpace( string[i-1] ) )
+		{
+			i--;
+		}
+
+		string.erase( i, len - i );
+	}
+}
+
+
+// Replace line feeds with carriage return-line feed pairs.
+//static
+template<class T>
+void LLStringUtilBase<T>::addCRLF(std::basic_string<T>& string)
+{
+	const T LF = 10;
+	const T CR = 13;
+
+	// Count the number of line feeds
+	size_type count = 0;
+	size_type len = string.size();
+	size_type i;
+	for( i = 0; i < len; i++ )
+	{
+		if( string[i] == LF )
+		{
+			count++;
+		}
+	}
+
+	// Insert a carriage return before each line feed
+	if( count )
+	{
+		size_type size = len + count;
+		T *t = new T[size];
+		size_type j = 0;
+		for( i = 0; i < len; ++i )
+		{
+			if( string[i] == LF )
+			{
+				t[j] = CR;
+				++j;
+			}
+			t[j] = string[i];
+			++j;
+		}
+
+		string.assign(t, size);
+	}
+}
+
+// Remove all carriage returns
+//static
+template<class T> 
+void LLStringUtilBase<T>::removeCRLF(std::basic_string<T>& string)
+{
+	const T CR = 13;
+
+	size_type cr_count = 0;
+	size_type len = string.size();
+	size_type i;
+	for( i = 0; i < len - cr_count; i++ )
+	{
+		if( string[i+cr_count] == CR )
+		{
+			cr_count++;
+		}
+
+		string[i] = string[i+cr_count];
+	}
+	string.erase(i, cr_count);
+}
+
+//static
+template<class T> 
+void LLStringUtilBase<T>::replaceChar( std::basic_string<T>& string, T target, T replacement )
+{
+	size_type found_pos = 0;
+	for (found_pos = string.find(target, found_pos); 
+		found_pos != std::basic_string<T>::npos; 
+		found_pos = string.find(target, found_pos))
+	{
+		string[found_pos] = replacement;
+	}
+}
+
+//static
+template<class T> 
+void LLStringUtilBase<T>::replaceNonstandardASCII( std::basic_string<T>& string, T replacement )
+{
+	const char LF = 10;
+	const S8 MIN = 32;
+//	const S8 MAX = 127;
+
+	size_type len = string.size();
+	for( size_type i = 0; i < len; i++ )
+	{
+		// No need to test MAX < mText[i] because we treat mText[i] as a signed char,
+		// which has a max value of 127.
+		if( ( S8(string[i]) < MIN ) && (string[i] != LF) )
+		{
+			string[i] = replacement;
+		}
+	}
+}
+
+//static
+template<class T> 
+void LLStringUtilBase<T>::replaceTabsWithSpaces( std::basic_string<T>& str, size_type spaces_per_tab )
+{
+	const T TAB = '\t';
+	const T SPACE = ' ';
+
+	std::basic_string<T> out_str;
+	// Replace tabs with spaces
+	for (size_type i = 0; i < str.length(); i++)
+	{
+		if (str[i] == TAB)
+		{
+			for (size_type j = 0; j < spaces_per_tab; j++)
+				out_str += SPACE;
+		}
+		else
+		{
+			out_str += str[i];
+		}
+	}
+	str = out_str;
+}
+
+//static
+template<class T> 
+BOOL LLStringUtilBase<T>::containsNonprintable(const std::basic_string<T>& string)
+{
+	const char MIN = 32;
+	BOOL rv = FALSE;
+	for (size_type i = 0; i < string.size(); i++)
+	{
+		if(string[i] < MIN)
+		{
+			rv = TRUE;
+			break;
+		}
+	}
+	return rv;
+}
+
+//static
+template<class T> 
+void LLStringUtilBase<T>::stripNonprintable(std::basic_string<T>& string)
+{
+	const char MIN = 32;
+	size_type j = 0;
+	if (string.empty())
+	{
+		return;
+	}
+	char* c_string = new char[string.size() + 1];
+	if(c_string == NULL)
+	{
+		return;
+	}
+	strcpy(c_string, string.c_str());	/*Flawfinder: ignore*/
+	char* write_head = &c_string[0];
+	for (size_type i = 0; i < string.size(); i++)
+	{
+		char* read_head = &string[i];
+		write_head = &c_string[j];
+		if(!(*read_head < MIN))
+		{
+			*write_head = *read_head;
+			++j;
+		}
+	}
+	c_string[j]= '\0';
+	string = c_string;
+	delete []c_string;
+}
+
+template<class T> 
+void LLStringUtilBase<T>::_makeASCII(std::basic_string<T>& string)
+{
+	// Replace non-ASCII chars with LL_UNKNOWN_CHAR
+	for (size_type i = 0; i < string.length(); i++)
+	{
+		if (string[i] > 0x7f)
+		{
+			string[i] = LL_UNKNOWN_CHAR;
+		}
+	}
+}
+
+// static
+template<class T> 
+void LLStringUtilBase<T>::copy( T* dst, const T* src, size_type dst_size )
+{
+	if( dst_size > 0 )
+	{
+		size_type min_len = 0;
+		if( src )
+		{
+			min_len = llmin( dst_size - 1, strlen( src ) );  /* Flawfinder: ignore */
+			memcpy(dst, src, min_len * sizeof(T));		/* Flawfinder: ignore */
+		}
+		dst[min_len] = '\0';
+	}
+}
+
+// static
+template<class T> 
+void LLStringUtilBase<T>::copyInto(std::basic_string<T>& dst, const std::basic_string<T>& src, size_type offset)
+{
+	if ( offset == dst.length() )
+	{
+		// special case - append to end of string and avoid expensive
+		// (when strings are large) string manipulations
+		dst += src;
+	}
+	else
+	{
+		std::basic_string<T> tail = dst.substr(offset);
+
+		dst = dst.substr(0, offset);
+		dst += src;
+		dst += tail;
+	};
+}
+
+// True if this is the head of s.
+//static
+template<class T> 
+BOOL LLStringUtilBase<T>::isHead( const std::basic_string<T>& string, const T* s ) 
+{ 
+	if( string.empty() )
+	{
+		// Early exit
+		return FALSE;
+	}
+	else
+	{
+		return (strncmp( s, string.c_str(), string.size() ) == 0);
+	}
+}
+
+// static
+template<class T> 
+bool LLStringUtilBase<T>::startsWith(
+	const std::basic_string<T>& string,
+	const std::basic_string<T>& substr)
+{
+	if(string.empty() || (substr.empty())) return false;
+	if(0 == string.find(substr)) return true;
+	return false;
+}
+
+// static
+template<class T> 
+bool LLStringUtilBase<T>::endsWith(
+	const std::basic_string<T>& string,
+	const std::basic_string<T>& substr)
+{
+	if(string.empty() || (substr.empty())) return false;
+	std::string::size_type idx = string.rfind(substr);
+	if(std::string::npos == idx) return false;
+	return (idx == (string.size() - substr.size()));
+}
+
+
+template<class T> 
+BOOL LLStringUtilBase<T>::convertToBOOL(const std::basic_string<T>& string, BOOL& value)
+{
+	if( string.empty() )
+	{
+		return FALSE;
+	}
+
+	std::basic_string<T> temp( string );
+	trim(temp);
+	if( 
+		(temp == "1") || 
+		(temp == "T") || 
+		(temp == "t") || 
+		(temp == "TRUE") || 
+		(temp == "true") || 
+		(temp == "True") )
+	{
+		value = TRUE;
+		return TRUE;
+	}
+	else
+	if( 
+		(temp == "0") || 
+		(temp == "F") || 
+		(temp == "f") || 
+		(temp == "FALSE") || 
+		(temp == "false") || 
+		(temp == "False") )
+	{
+		value = FALSE;
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
+template<class T> 
+BOOL LLStringUtilBase<T>::convertToU8(const std::basic_string<T>& string, U8& value) 
+{
+	S32 value32 = 0;
+	BOOL success = convertToS32(string, value32);
+	if( success && (U8_MIN <= value32) && (value32 <= U8_MAX) )
+	{
+		value = (U8) value32;
+		return TRUE;
+	}
+	return FALSE;
+}
+
+template<class T> 
+BOOL LLStringUtilBase<T>::convertToS8(const std::basic_string<T>& string, S8& value) 
+{
+	S32 value32 = 0;
+	BOOL success = convertToS32(string, value32);
+	if( success && (S8_MIN <= value32) && (value32 <= S8_MAX) )
+	{
+		value = (S8) value32;
+		return TRUE;
+	}
+	return FALSE;
+}
+
+template<class T> 
+BOOL LLStringUtilBase<T>::convertToS16(const std::basic_string<T>& string, S16& value) 
+{
+	S32 value32 = 0;
+	BOOL success = convertToS32(string, value32);
+	if( success && (S16_MIN <= value32) && (value32 <= S16_MAX) )
+	{
+		value = (S16) value32;
+		return TRUE;
+	}
+	return FALSE;
+}
+
+template<class T> 
+BOOL LLStringUtilBase<T>::convertToU16(const std::basic_string<T>& string, U16& value) 
+{
+	S32 value32 = 0;
+	BOOL success = convertToS32(string, value32);
+	if( success && (U16_MIN <= value32) && (value32 <= U16_MAX) )
+	{
+		value = (U16) value32;
+		return TRUE;
+	}
+	return FALSE;
+}
+
+template<class T> 
+BOOL LLStringUtilBase<T>::convertToU32(const std::basic_string<T>& string, U32& value) 
+{
+	if( string.empty() )
+	{
+		return FALSE;
+	}
+
+	std::basic_string<T> temp( string );
+	trim(temp);
+	U32 v;
+	std::basic_istringstream<T> i_stream((std::basic_string<T>)temp);
+	if(i_stream >> v)
+	{
+		value = v;
+		return TRUE;
+	}
+	return FALSE;
+}
+
+template<class T> 
+BOOL LLStringUtilBase<T>::convertToS32(const std::basic_string<T>& string, S32& value) 
+{
+	if( string.empty() )
+	{
+		return FALSE;
+	}
+
+	std::basic_string<T> temp( string );
+	trim(temp);
+	S32 v;
+	std::basic_istringstream<T> i_stream((std::basic_string<T>)temp);
+	if(i_stream >> v)
+	{
+		//TODO: figure out overflow and underflow reporting here
+		//if((LONG_MAX == v) || (LONG_MIN == v))
+		//{
+		//	// Underflow or overflow
+		//	return FALSE;
+		//}
+
+		value = v;
+		return TRUE;
+	}
+	return FALSE;
+}
+
+template<class T> 
+BOOL LLStringUtilBase<T>::convertToF32(const std::basic_string<T>& string, F32& value) 
+{
+	F64 value64 = 0.0;
+	BOOL success = convertToF64(string, value64);
+	if( success && (-F32_MAX <= value64) && (value64 <= F32_MAX) )
+	{
+		value = (F32) value64;
+		return TRUE;
+	}
+	return FALSE;
+}
+
+template<class T> 
+BOOL LLStringUtilBase<T>::convertToF64(const std::basic_string<T>& string, F64& value)
+{
+	if( string.empty() )
+	{
+		return FALSE;
+	}
+
+	std::basic_string<T> temp( string );
+	trim(temp);
+	F64 v;
+	std::basic_istringstream<T> i_stream((std::basic_string<T>)temp);
+	if(i_stream >> v)
+	{
+		//TODO: figure out overflow and underflow reporting here
+		//if( ((-HUGE_VAL == v) || (HUGE_VAL == v))) )
+		//{
+		//	// Underflow or overflow
+		//	return FALSE;
+		//}
+
+		value = v;
+		return TRUE;
+	}
+	return FALSE;
+}
+
+template<class T> 
+void LLStringUtilBase<T>::truncate(std::basic_string<T>& string, size_type count)
+{
+	size_type cur_size = string.size();
+	string.resize(count < cur_size ? count : cur_size);
+}
+
+#endif  // LL_STRING_H
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 9df0a96888..61a031d502 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -1,282 +1,281 @@
-/** 
- * @file llfloaterabout.cpp
- * @author James Cook
- * @brief The about box from Help->About
- *
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- * 
- * Copyright (c) 2001-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
- 
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterabout.h"
-
-#include "llsys.h"
-#include "llgl.h"
-#include "llui.h"	// for tr()
-#include "v3dmath.h"
-
-#include "llcurl.h"
-#include "llimagej2c.h"
-#include "audioengine.h"
-
-#include "llviewertexteditor.h"
-#include "llviewercontrol.h"
-#include "llagent.h"
-#include "llviewerstats.h"
-#include "llviewerregion.h"
-#include "llversionviewer.h"
-#include "llviewerbuild.h"
-#include "lluictrlfactory.h"
-#include "lluri.h"
-#include "llweb.h"
-#include "llsecondlifeurls.h"
-#include "lltrans.h"
-#include "llappviewer.h" 
-#include "llglheaders.h"
-#include "llmediamanager.h"
-#include "llwindow.h"
-
-#if LL_WINDOWS
-#include "lldxhardware.h"
-#endif
-
-extern LLCPUInfo gSysCPU;
-extern LLMemoryInfo gSysMemory;
-extern U32 gPacketsIn;
-
-static std::string get_viewer_release_notes_url();
-
-
-///----------------------------------------------------------------------------
-/// Class LLFloaterAbout
-///----------------------------------------------------------------------------
-
-// Default constructor
-LLFloaterAbout::LLFloaterAbout(const LLSD& key) 
-:	LLFloater()
-{
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about.xml");
-	
-}
-
-// Destroys the object
-LLFloaterAbout::~LLFloaterAbout()
-{
-}
-
-BOOL LLFloaterAbout::postBuild()
-{
-	center();
-	LLViewerTextEditor *support_widget = 
-		getChild<LLViewerTextEditor>("support_editor", true);
-
-	LLViewerTextEditor *credits_widget = 
-		getChild<LLViewerTextEditor>("credits_editor", true);
-
-	// For some reason, adding style doesn't work unless this is true.
-	support_widget->setParseHTML(TRUE);
-
-	// Text styles for release notes hyperlinks
-	LLStyleSP viewer_link_style(new LLStyle);
-	viewer_link_style->setVisible(true);
-	viewer_link_style->setFontName(LLStringUtil::null);
-	viewer_link_style->setLinkHREF(get_viewer_release_notes_url());
-	viewer_link_style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
-
-	// Version string
-	std::string version = LLTrans::getString("SECOND_LIFE_VIEWER")
-		+ llformat(" %d.%d.%d (%d) %s %s (%s)\n",
-				   LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD,
-				   __DATE__, __TIME__,
-				   gSavedSettings.getString("VersionChannelName").c_str());
-	support_widget->appendColoredText(version, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
-	support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style);
-
-	std::string support;
-	support.append("\n\n");
-
-#if LL_MSVC
-    support.append(llformat("Built with MSVC version %d\n\n", _MSC_VER));
-#endif
-
-#if LL_GNUC
-    support.append(llformat("Built with GCC version %d\n\n", GCC_VERSION));
-#endif
-
-	// Position
-	LLViewerRegion* region = gAgent.getRegion();
-	if (region)
-	{
-		LLStyleSP server_link_style(new LLStyle);
-		server_link_style->setVisible(true);
-		server_link_style->setFontName(LLStringUtil::null);
-		server_link_style->setLinkHREF(region->getCapability("ServerReleaseNotes"));
-		server_link_style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
-
-		const LLVector3d &pos = gAgent.getPositionGlobal();
-		LLUIString pos_text = getString("you_are_at");
-		pos_text.setArg("[POSITION]",
-						llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ]));
-		support.append(pos_text);
-
-		LLUIString region_text = getString ("in_region") + " ";
-		region_text.setArg("[REGION]", llformat ("%s", gAgent.getRegion()->getName().c_str()));
-		support.append(region_text);
-
-		std::string buffer;
-		buffer = gAgent.getRegion()->getHost().getHostName();
-		support.append(buffer);
-		support.append(" (");
-		buffer = gAgent.getRegion()->getHost().getString();
-		support.append(buffer);
-		support.append(")\n");
-		support.append(gLastVersionChannel);
-		support.append("\n");
-
-		support_widget->appendColoredText(support, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
-		support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style);
-
-		support = "\n\n";
-	}
-
-	// *NOTE: Do not translate text like GPU, Graphics Card, etc -
-	//  Most PC users that know what these mean will be used to the english versions,
-	//  and this info sometimes gets sent to support
-	
-	// CPU
-	support.append(getString("CPU") + " ");
-	support.append( gSysCPU.getCPUString() );
-	support.append("\n");
-
-	U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
-	// Moved hack adjustment to Windows memory size into llsys.cpp
-
-	LLStringUtil::format_map_t args;
-	args["[MEM]"] = llformat ("%u", memory);
-	support.append(getString("Memory", args) + "\n");
-
-	support.append(getString("OSVersion") + " ");
-	support.append( LLAppViewer::instance()->getOSInfo().getOSString() );
-	support.append("\n");
-
-	support.append(getString("GraphicsCardVendor") + " ");
-	support.append( (const char*) glGetString(GL_VENDOR) );
-	support.append("\n");
-
-	support.append(getString("GraphicsCard") + " ");
-	support.append( (const char*) glGetString(GL_RENDERER) );
-	support.append("\n");
-
-#if LL_WINDOWS
-    getWindow()->incBusyCount();
-    getWindow()->setCursor(UI_CURSOR_ARROW);
-    support.append("Windows Graphics Driver Version: ");
-    LLSD driver_info = gDXHardware.getDisplayInfo();
-    if (driver_info.has("DriverVersion"))
-    {
-        support.append(driver_info["DriverVersion"]);
-    }
-    support.append("\n");
-    getWindow()->decBusyCount();
-    getWindow()->setCursor(UI_CURSOR_ARROW);
-#endif
-
-	support.append(getString("OpenGLVersion") + " ");
-	support.append( (const char*) glGetString(GL_VERSION) );
-	support.append("\n");
-
-	support.append("\n");
-
-	support.append(getString("LibCurlVersion") + " ");
-	support.append( LLCurl::getVersionString() );
-	support.append("\n");
-
-	support.append(getString("J2CDecoderVersion") + " ");
-	support.append( LLImageJ2C::getEngineInfo() );
-	support.append("\n");
-
-	support.append(getString("AudioDriverVersion") + " ");
-	bool want_fullname = true;
-	support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : getString("none") );
-	support.append("\n");
-
-	LLMediaManager *mgr = LLMediaManager::getInstance();
-	if (mgr)
-	{
-		LLMediaBase *media_source = mgr->createSourceFromMimeType("http", "text/html");
-		if (media_source)
-		{
-			support.append(getString("LLMozLibVersion") + " ");
-			support.append(media_source->getVersion());
-			support.append("\n");
-			mgr->destroySource(media_source);
-		}
-	}
-
-	if (gPacketsIn > 0)
-	{
-		args["[LOST]"] = llformat ("%.0f", LLViewerStats::getInstance()->mPacketsLostStat.getCurrent());
-		args["[IN]"] = llformat ("%.0f", F32(gPacketsIn));
-		args["[PCT]"] = llformat ("%.1f", 100.f*LLViewerStats::getInstance()->mPacketsLostStat.getCurrent() / F32(gPacketsIn) );
-		support.append(getString ("PacketsLost", args) + "\n");
-	}
-
-	support_widget->appendColoredText(support, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
-
-	// Fix views
-	support_widget->setCursorPos(0);
-	support_widget->setEnabled(FALSE);
-	support_widget->setTakesFocus(TRUE);
-	support_widget->setHandleEditKeysDirectly(TRUE);
-
-	credits_widget->setCursorPos(0);
-	credits_widget->setEnabled(FALSE);
-	credits_widget->setTakesFocus(TRUE);
-	credits_widget->setHandleEditKeysDirectly(TRUE);
-
-	return TRUE;
-}
-
-
- static std::string get_viewer_release_notes_url()
- {
- 	std::ostringstream version;
- 	version << LL_VERSION_MAJOR << "."
- 		<< LL_VERSION_MINOR << "."
- 		<< LL_VERSION_PATCH << "."
- 		<< LL_VERSION_BUILD;
-
- 	LLSD query;
- 	query["channel"] = gSavedSettings.getString("VersionChannelName");
- 	query["version"] = version.str();
-
- 	std::ostringstream url;
-	 url << LLTrans::getString("RELEASE_NOTES_BASE_URL") << LLURI::mapToQueryString(query);
-
- 	return url.str();
- }
+/** 
+ * @file llfloaterabout.cpp
+ * @author James Cook
+ * @brief The about box from Help->About
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+ 
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterabout.h"
+
+#include "llsys.h"
+#include "llgl.h"
+#include "llui.h"	// for tr()
+#include "v3dmath.h"
+
+#include "llcurl.h"
+#include "llimagej2c.h"
+#include "audioengine.h"
+
+#include "llviewertexteditor.h"
+#include "llviewercontrol.h"
+#include "llagent.h"
+#include "llviewerstats.h"
+#include "llviewerregion.h"
+#include "llversionviewer.h"
+#include "llviewerbuild.h"
+#include "lluictrlfactory.h"
+#include "lluri.h"
+#include "llweb.h"
+#include "llsecondlifeurls.h"
+#include "lltrans.h"
+#include "llappviewer.h" 
+#include "llglheaders.h"
+#include "llmediamanager.h"
+#include "llwindow.h"
+
+#if LL_WINDOWS
+#include "lldxhardware.h"
+#endif
+
+extern LLMemoryInfo gSysMemory;
+extern U32 gPacketsIn;
+
+static std::string get_viewer_release_notes_url();
+
+
+///----------------------------------------------------------------------------
+/// Class LLFloaterAbout
+///----------------------------------------------------------------------------
+
+// Default constructor
+LLFloaterAbout::LLFloaterAbout(const LLSD& key) 
+:	LLFloater()
+{
+	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about.xml");
+	
+}
+
+// Destroys the object
+LLFloaterAbout::~LLFloaterAbout()
+{
+}
+
+BOOL LLFloaterAbout::postBuild()
+{
+	center();
+	LLViewerTextEditor *support_widget = 
+		getChild<LLViewerTextEditor>("support_editor", true);
+
+	LLViewerTextEditor *credits_widget = 
+		getChild<LLViewerTextEditor>("credits_editor", true);
+
+	// For some reason, adding style doesn't work unless this is true.
+	support_widget->setParseHTML(TRUE);
+
+	// Text styles for release notes hyperlinks
+	LLStyleSP viewer_link_style(new LLStyle);
+	viewer_link_style->setVisible(true);
+	viewer_link_style->setFontName(LLStringUtil::null);
+	viewer_link_style->setLinkHREF(get_viewer_release_notes_url());
+	viewer_link_style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
+
+	// Version string
+	std::string version = LLTrans::getString("SECOND_LIFE_VIEWER")
+		+ llformat(" %d.%d.%d (%d) %s %s (%s)\n",
+				   LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD,
+				   __DATE__, __TIME__,
+				   gSavedSettings.getString("VersionChannelName").c_str());
+	support_widget->appendColoredText(version, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
+	support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style);
+
+	std::string support;
+	support.append("\n\n");
+
+#if LL_MSVC
+    support.append(llformat("Built with MSVC version %d\n\n", _MSC_VER));
+#endif
+
+#if LL_GNUC
+    support.append(llformat("Built with GCC version %d\n\n", GCC_VERSION));
+#endif
+
+	// Position
+	LLViewerRegion* region = gAgent.getRegion();
+	if (region)
+	{
+		LLStyleSP server_link_style(new LLStyle);
+		server_link_style->setVisible(true);
+		server_link_style->setFontName(LLStringUtil::null);
+		server_link_style->setLinkHREF(region->getCapability("ServerReleaseNotes"));
+		server_link_style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
+
+		const LLVector3d &pos = gAgent.getPositionGlobal();
+		LLUIString pos_text = getString("you_are_at");
+		pos_text.setArg("[POSITION]",
+						llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ]));
+		support.append(pos_text);
+
+		LLUIString region_text = getString ("in_region") + " ";
+		region_text.setArg("[REGION]", llformat ("%s", gAgent.getRegion()->getName().c_str()));
+		support.append(region_text);
+
+		std::string buffer;
+		buffer = gAgent.getRegion()->getHost().getHostName();
+		support.append(buffer);
+		support.append(" (");
+		buffer = gAgent.getRegion()->getHost().getString();
+		support.append(buffer);
+		support.append(")\n");
+		support.append(gLastVersionChannel);
+		support.append("\n");
+
+		support_widget->appendColoredText(support, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
+		support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style);
+
+		support = "\n\n";
+	}
+
+	// *NOTE: Do not translate text like GPU, Graphics Card, etc -
+	//  Most PC users that know what these mean will be used to the english versions,
+	//  and this info sometimes gets sent to support
+	
+	// CPU
+	support.append(getString("CPU") + " ");
+	support.append( gSysCPU.getCPUString() );
+	support.append("\n");
+
+	U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
+	// Moved hack adjustment to Windows memory size into llsys.cpp
+
+	LLStringUtil::format_map_t args;
+	args["[MEM]"] = llformat ("%u", memory);
+	support.append(getString("Memory", args) + "\n");
+
+	support.append(getString("OSVersion") + " ");
+	support.append( LLAppViewer::instance()->getOSInfo().getOSString() );
+	support.append("\n");
+
+	support.append(getString("GraphicsCardVendor") + " ");
+	support.append( (const char*) glGetString(GL_VENDOR) );
+	support.append("\n");
+
+	support.append(getString("GraphicsCard") + " ");
+	support.append( (const char*) glGetString(GL_RENDERER) );
+	support.append("\n");
+
+#if LL_WINDOWS
+    getWindow()->incBusyCount();
+    getWindow()->setCursor(UI_CURSOR_ARROW);
+    support.append("Windows Graphics Driver Version: ");
+    LLSD driver_info = gDXHardware.getDisplayInfo();
+    if (driver_info.has("DriverVersion"))
+    {
+        support.append(driver_info["DriverVersion"]);
+    }
+    support.append("\n");
+    getWindow()->decBusyCount();
+    getWindow()->setCursor(UI_CURSOR_ARROW);
+#endif
+
+	support.append(getString("OpenGLVersion") + " ");
+	support.append( (const char*) glGetString(GL_VERSION) );
+	support.append("\n");
+
+	support.append("\n");
+
+	support.append(getString("LibCurlVersion") + " ");
+	support.append( LLCurl::getVersionString() );
+	support.append("\n");
+
+	support.append(getString("J2CDecoderVersion") + " ");
+	support.append( LLImageJ2C::getEngineInfo() );
+	support.append("\n");
+
+	support.append(getString("AudioDriverVersion") + " ");
+	bool want_fullname = true;
+	support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : getString("none") );
+	support.append("\n");
+
+	LLMediaManager *mgr = LLMediaManager::getInstance();
+	if (mgr)
+	{
+		LLMediaBase *media_source = mgr->createSourceFromMimeType("http", "text/html");
+		if (media_source)
+		{
+			support.append(getString("LLMozLibVersion") + " ");
+			support.append(media_source->getVersion());
+			support.append("\n");
+			mgr->destroySource(media_source);
+		}
+	}
+
+	if (gPacketsIn > 0)
+	{
+		args["[LOST]"] = llformat ("%.0f", LLViewerStats::getInstance()->mPacketsLostStat.getCurrent());
+		args["[IN]"] = llformat ("%.0f", F32(gPacketsIn));
+		args["[PCT]"] = llformat ("%.1f", 100.f*LLViewerStats::getInstance()->mPacketsLostStat.getCurrent() / F32(gPacketsIn) );
+		support.append(getString ("PacketsLost", args) + "\n");
+	}
+
+	support_widget->appendColoredText(support, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
+
+	// Fix views
+	support_widget->setCursorPos(0);
+	support_widget->setEnabled(FALSE);
+	support_widget->setTakesFocus(TRUE);
+	support_widget->setHandleEditKeysDirectly(TRUE);
+
+	credits_widget->setCursorPos(0);
+	credits_widget->setEnabled(FALSE);
+	credits_widget->setTakesFocus(TRUE);
+	credits_widget->setHandleEditKeysDirectly(TRUE);
+
+	return TRUE;
+}
+
+
+ static std::string get_viewer_release_notes_url()
+ {
+ 	std::ostringstream version;
+ 	version << LL_VERSION_MAJOR << "."
+ 		<< LL_VERSION_MINOR << "."
+ 		<< LL_VERSION_PATCH << "."
+ 		<< LL_VERSION_BUILD;
+
+ 	LLSD query;
+ 	query["channel"] = gSavedSettings.getString("VersionChannelName");
+ 	query["version"] = version.str();
+
+ 	std::ostringstream url;
+	 url << LLTrans::getString("RELEASE_NOTES_BASE_URL") << LLURI::mapToQueryString(query);
+
+ 	return url.str();
+ }
-- 
cgit v1.2.3


From c1d59f02609def47507c76d65c60f220c508a71f Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 2 Jul 2009 14:40:05 -0400
Subject: Windows now links to shared apr when LLCOMMON_LINK_SHARED is on.

---
 indra/cmake/APR.cmake           |  39 +++--
 indra/llcommon/llpreprocessor.h | 314 ++++++++++++++++++++--------------------
 2 files changed, 184 insertions(+), 169 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index 0755aeee03..efd47f756a 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -13,18 +13,33 @@ if (STANDALONE)
 else (STANDALONE)
   use_prebuilt_binary(apr_suite)
   if (WINDOWS)
-    set(APR_LIBRARIES 
-      debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib
-      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib
-      )
-    set(APRICONV_LIBRARIES 
-      debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib
-      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib
-      )
-    set(APRUTIL_LIBRARIES 
-      debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib ${APRICONV_LIBRARIES}
-      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib ${APRICONV_LIBRARIES}
-      )
+    if (LLCOMMON_LINK_SHARED)
+      set(APR_LIBRARIES 
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.lib
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.lib
+        )
+      set(APRICONV_LIBRARIES 
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib
+        )
+      set(APRUTIL_LIBRARIES 
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES}
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES}
+        )
+    else (LLCOMMON_LINK_SHARED)
+      set(APR_LIBRARIES 
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib
+        )
+      set(APRICONV_LIBRARIES 
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib
+        )
+      set(APRUTIL_LIBRARIES 
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib ${APRICONV_LIBRARIES}
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib ${APRICONV_LIBRARIES}
+        )
+    endif (LLCOMMON_LINK_SHARED)
   elseif (DARWIN)
     set(APR_LIBRARIES 
       debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 5ff7814997..ed6ca9a25f 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -1,157 +1,157 @@
-/** 
- * @file llpreprocessor.h
- * @brief This file should be included in all Linden Lab files and
- * should only contain special preprocessor directives
- *
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- * 
- * Copyright (c) 2001-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#ifndef LLPREPROCESSOR_H
-#define LLPREPROCESSOR_H
-
-// Figure out endianness of platform
-#ifdef LL_LINUX
-#define __ENABLE_WSTRING
-#include <endian.h>
-#endif	//	LL_LINUX
-
-#if LL_SOLARIS
-#   ifdef  __sparc     // Since we're talking Solaris 10 and up, only 64 bit is supported.
-#      define LL_BIG_ENDIAN 1
-#      define LL_SOLARIS_ALIGNED_CPU 1     //  used to designate issues where SPARC alignment is addressed
-#      define LL_SOLARIS_NON_MESA_GL 1      //  The SPARC GL does not provide a MESA-based GL API
-#   endif
-#   include <sys/isa_defs.h> // ensure we know which end is up
-#endif // LL_SOLARIS
-
-#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)) || (defined(LL_SOLARIS) && defined(__i386)))
-#define LL_LITTLE_ENDIAN 1
-#else
-#define LL_BIG_ENDIAN 1
-#endif
-
-// Per-compiler switches
-#ifdef __GNUC__
-#define LL_FORCE_INLINE inline __attribute__((always_inline))
-#else
-#define LL_FORCE_INLINE __forceinline
-#endif
-
-// Figure out differences between compilers
-#if defined(__GNUC__)
-	#define GCC_VERSION (__GNUC__ * 10000 \
-						+ __GNUC_MINOR__ * 100 \
-						+ __GNUC_PATCHLEVEL__)
-	#ifndef LL_GNUC
-		#define LL_GNUC 1
-	#endif
-#elif defined(__MSVC_VER__) || defined(_MSC_VER)
-	#ifndef LL_MSVC
-		#define LL_MSVC 1
-	#endif
-	#if _MSC_VER < 1400
-		#define LL_MSVC7 //Visual C++ 2003 or earlier
-	#endif
-#endif
-
-// Deal with minor differences on Unixy OSes.
-#if LL_DARWIN || LL_LINUX
-	// Different name, same functionality.
-	#define stricmp strcasecmp
-	#define strnicmp strncasecmp
-
-	// Not sure why this is different, but...
-	#ifndef MAX_PATH
-		#define MAX_PATH PATH_MAX
-	#endif	//	not MAX_PATH
-
-#endif
-
-
-// Static linking with apr on windows needs to be declared.
-#ifdef LL_WINDOWS
-#ifndef APR_DECLARE_STATIC
-#define APR_DECLARE_STATIC // For APR on Windows
-#endif
-#ifndef APU_DECLARE_STATIC
-#define APU_DECLARE_STATIC // For APR util on Windows
-#endif
-#endif
-
-#if defined(LL_WINDOWS)
-#define BOOST_REGEX_NO_LIB 1
-#define CURL_STATICLIB 1
-#define XML_STATIC
-#endif	//	LL_WINDOWS
-
-
-// Deal with VC6 problems
-#if LL_MSVC
-#pragma warning( 3	     : 4701 )	// "local variable used without being initialized"  Treat this as level 3, not level 4.
-#pragma warning( 3	     : 4702 )	// "unreachable code"  Treat this as level 3, not level 4.
-#pragma warning( 3	     : 4189 )	// "local variable initialized but not referenced"  Treat this as level 3, not level 4.
-//#pragma warning( 3	: 4018 )	// "signed/unsigned mismatch"  Treat this as level 3, not level 4.
-#pragma warning( 3       : 4265 )	// "class has virtual functions, but destructor is not virtual"
-#pragma warning( disable : 4786 )	// silly MS warning deep inside their <map> include file
-#pragma warning( disable : 4284 )	// silly MS warning deep inside their <map> include file
-#pragma warning( disable : 4503 )	// 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.
-#pragma warning( disable : 4800 )	// 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
-#pragma warning( disable : 4996 )	// warning: deprecated
-
-// level 4 warnings that we need to disable:
-#pragma warning (disable : 4100) // unreferenced formal parameter
-#pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) )
-#pragma warning (disable : 4244) // possible loss of data on conversions
-#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
-#pragma warning (disable : 4512) // assignment operator could not be generated
-#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) )
-
-#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
-#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
-#endif	//	LL_MSVC
-
-#if LL_WINDOWS
-#define LL_DLLEXPORT __declspec(dllexport)
-#define LL_DLLIMPORT __declspec(dllimport)
-#else
-#define LL_DLLEXPORT
-#define LL_DLLIMPORT
-#endif // LL_WINDOWS
-
-
-#if LL_COMMON_LINK_SHARED
-# if LL_COMMON_BUILD
-#   define LL_COMMON_API LL_DLLEXPORT
-# else //LL_COMMON_BUILD
-#   define LL_COMMON_API LL_DLLIMPORT
-# endif //LL_COMMON_BUILD
-#else // LL_COMMON_LINK_SHARED
-# define LL_COMMON_API
-#endif // LL_COMMON_LINK_SHARED
-
-#endif	//	not LL_LINDEN_PREPROCESSOR_H
+/** 
+ * @file llpreprocessor.h
+ * @brief This file should be included in all Linden Lab files and
+ * should only contain special preprocessor directives
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LLPREPROCESSOR_H
+#define LLPREPROCESSOR_H
+
+// Figure out endianness of platform
+#ifdef LL_LINUX
+#define __ENABLE_WSTRING
+#include <endian.h>
+#endif	//	LL_LINUX
+
+#if LL_SOLARIS
+#   ifdef  __sparc     // Since we're talking Solaris 10 and up, only 64 bit is supported.
+#      define LL_BIG_ENDIAN 1
+#      define LL_SOLARIS_ALIGNED_CPU 1     //  used to designate issues where SPARC alignment is addressed
+#      define LL_SOLARIS_NON_MESA_GL 1      //  The SPARC GL does not provide a MESA-based GL API
+#   endif
+#   include <sys/isa_defs.h> // ensure we know which end is up
+#endif // LL_SOLARIS
+
+#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)) || (defined(LL_SOLARIS) && defined(__i386)))
+#define LL_LITTLE_ENDIAN 1
+#else
+#define LL_BIG_ENDIAN 1
+#endif
+
+// Per-compiler switches
+#ifdef __GNUC__
+#define LL_FORCE_INLINE inline __attribute__((always_inline))
+#else
+#define LL_FORCE_INLINE __forceinline
+#endif
+
+// Figure out differences between compilers
+#if defined(__GNUC__)
+	#define GCC_VERSION (__GNUC__ * 10000 \
+						+ __GNUC_MINOR__ * 100 \
+						+ __GNUC_PATCHLEVEL__)
+	#ifndef LL_GNUC
+		#define LL_GNUC 1
+	#endif
+#elif defined(__MSVC_VER__) || defined(_MSC_VER)
+	#ifndef LL_MSVC
+		#define LL_MSVC 1
+	#endif
+	#if _MSC_VER < 1400
+		#define LL_MSVC7 //Visual C++ 2003 or earlier
+	#endif
+#endif
+
+// Deal with minor differences on Unixy OSes.
+#if LL_DARWIN || LL_LINUX
+	// Different name, same functionality.
+	#define stricmp strcasecmp
+	#define strnicmp strncasecmp
+
+	// Not sure why this is different, but...
+	#ifndef MAX_PATH
+		#define MAX_PATH PATH_MAX
+	#endif	//	not MAX_PATH
+
+#endif
+
+
+// Static linking with apr on windows needs to be declared.
+#if LL_WINDOWS && !LL_COMMON_LINK_SHARED
+#ifndef APR_DECLARE_STATIC
+#define APR_DECLARE_STATIC // For APR on Windows
+#endif
+#ifndef APU_DECLARE_STATIC
+#define APU_DECLARE_STATIC // For APR util on Windows
+#endif
+#endif
+
+#if defined(LL_WINDOWS)
+#define BOOST_REGEX_NO_LIB 1
+#define CURL_STATICLIB 1
+#define XML_STATIC
+#endif	//	LL_WINDOWS
+
+
+// Deal with VC6 problems
+#if LL_MSVC
+#pragma warning( 3	     : 4701 )	// "local variable used without being initialized"  Treat this as level 3, not level 4.
+#pragma warning( 3	     : 4702 )	// "unreachable code"  Treat this as level 3, not level 4.
+#pragma warning( 3	     : 4189 )	// "local variable initialized but not referenced"  Treat this as level 3, not level 4.
+//#pragma warning( 3	: 4018 )	// "signed/unsigned mismatch"  Treat this as level 3, not level 4.
+#pragma warning( 3       : 4265 )	// "class has virtual functions, but destructor is not virtual"
+#pragma warning( disable : 4786 )	// silly MS warning deep inside their <map> include file
+#pragma warning( disable : 4284 )	// silly MS warning deep inside their <map> include file
+#pragma warning( disable : 4503 )	// 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.
+#pragma warning( disable : 4800 )	// 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
+#pragma warning( disable : 4996 )	// warning: deprecated
+
+// level 4 warnings that we need to disable:
+#pragma warning (disable : 4100) // unreferenced formal parameter
+#pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) )
+#pragma warning (disable : 4244) // possible loss of data on conversions
+#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
+#pragma warning (disable : 4512) // assignment operator could not be generated
+#pragma warning (disable : 4706) // assignment within conditional (even if((x = y)) )
+
+#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
+#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
+#endif	//	LL_MSVC
+
+#if LL_WINDOWS
+#define LL_DLLEXPORT __declspec(dllexport)
+#define LL_DLLIMPORT __declspec(dllimport)
+#else
+#define LL_DLLEXPORT
+#define LL_DLLIMPORT
+#endif // LL_WINDOWS
+
+
+#if LL_COMMON_LINK_SHARED
+# if LL_COMMON_BUILD
+#   define LL_COMMON_API LL_DLLEXPORT
+# else //LL_COMMON_BUILD
+#   define LL_COMMON_API LL_DLLIMPORT
+# endif //LL_COMMON_BUILD
+#else // LL_COMMON_LINK_SHARED
+# define LL_COMMON_API
+#endif // LL_COMMON_LINK_SHARED
+
+#endif	//	not LL_LINDEN_PREPROCESSOR_H
-- 
cgit v1.2.3


From 989b3dd280e712dfacf49f5099ab4178551c5707 Mon Sep 17 00:00:00 2001
From: "Nat@Hothead.lindenlab.com" <Nat@Hothead.lindenlab.com>
Date: Thu, 2 Jul 2009 14:48:09 -0400
Subject: Fix disabling this-in-init-list warning

---
 indra/newview/llviewerwindow.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index dcd37d85da..91fc95cf6f 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -30,12 +30,12 @@
  * $/LicenseInfo$
  */
 
-#if defined(LL_WINDOWS)
+#include "llviewerprecompiledheaders.h"
+
+#if LL_WINDOWS
 #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
 #endif
 
-#include "llviewerprecompiledheaders.h"
-
 // system library includes
 #include <stdio.h>
 #include <iostream>
-- 
cgit v1.2.3


From bfdc9779c693b908fbc86492fa972099b17ee64e Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 7 Jul 2009 14:57:25 -0700
Subject: Fixed loading the wrong eventhost dll name on windows.

---
 indra/newview/llappviewer.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b61e75f60d..745e433f3c 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4098,14 +4098,13 @@ void LLAppViewer::handleLoginComplete()
 // *TODO - generalize this and move DSO wrangling to a helper class -brad
 void LLAppViewer::loadEventHostModule(S32 listen_port) const
 {
-	std::string dso_name("liblleventhost");
-
+	std::string dso_name =
 #if LL_WINDOWS
-	dso_name += ".dll";
+	    "lleventhost.dll";
 #elif LL_DARWIN
-	dso_name += ".dylib";
+	    "liblleventhost.dylib";
 #else
-	dso_name += ".so";
+	    "liblleventhost.so";
 #endif
 
 	std::string dso_path = gDirUtilp->findFile(dso_name,
-- 
cgit v1.2.3


From 31cdebe2010a43d9158aec236cc3f5275819352c Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 7 Jul 2009 16:04:23 -0700
Subject: Added copying and packaging of apr dlls and llcommon.dll.

---
 indra/newview/viewer_manifest.py | 1436 +++++++++++++++++++-------------------
 1 file changed, 725 insertions(+), 711 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 2838ff6335..7edf0bad6b 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -1,711 +1,725 @@
-#!/usr/bin/python
-# @file viewer_manifest.py
-# @author Ryan Williams
-# @brief Description of all installer viewer files, and methods for packaging
-#        them into installers for all supported platforms.
-#
-# $LicenseInfo:firstyear=2006&license=viewergpl$
-# 
-# Copyright (c) 2006-2009, Linden Research, Inc.
-# 
-# Second Life Viewer Source Code
-# The source code in this file ("Source Code") is provided by Linden Lab
-# to you under the terms of the GNU General Public License, version 2.0
-# ("GPL"), unless you have obtained a separate licensing agreement
-# ("Other License"), formally executed by you and Linden Lab.  Terms of
-# the GPL can be found in doc/GPL-license.txt in this distribution, or
-# online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
-# 
-# There are special exceptions to the terms and conditions of the GPL as
-# it is applied to this Source Code. View the full text of the exception
-# in the file doc/FLOSS-exception.txt in this software distribution, or
-# online at
-# http://secondlifegrid.net/programs/open_source/licensing/flossexception
-# 
-# By copying, modifying or distributing this software, you acknowledge
-# that you have read and understood your obligations described above,
-# and agree to abide by those obligations.
-# 
-# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
-# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
-# COMPLETENESS OR PERFORMANCE.
-# $/LicenseInfo$
-import sys
-import os.path
-import re
-import tarfile
-viewer_dir = os.path.dirname(__file__)
-# add llmanifest library to our path so we don't have to muck with PYTHONPATH
-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 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("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;
-        used for A/B testing"""
-        # NOTE: Do not return the normal channel if login_channel
-        # is not specified, as some code may branch depending on
-        # whether or not this is present
-        return self.args.get('login_channel')
-
-    def grid(self):
-        return self.args['grid']
-    def channel(self):
-        return self.args['channel']
-    def channel_unique(self):
-        return self.channel().replace("Second Life", "").strip()
-    def channel_oneword(self):
-        return "".join(self.channel_unique().split())
-    def channel_lowerword(self):
-        return self.channel_oneword().lower()
-
-    def flags_list(self):
-        """ Convenience function that returns the command-line flags
-        for the grid"""
-
-        # Set command line flags relating to the target grid
-        grid_flags = ''
-        if not self.default_grid():
-            grid_flags = "--grid %(grid)s "\
-                         "--helperuri http://preview-%(grid)s.secondlife.com/helpers/" %\
-                           {'grid':self.grid()}
-
-        # set command line flags for channel
-        channel_flags = ''
-        if self.login_channel() and self.login_channel() != self.channel():
-            # Report a special channel during login, but use default
-            channel_flags = '--channel "%s"' % (self.login_channel())
-        elif not self.default_channel():
-            channel_flags = '--channel "%s"' % self.channel()
-
-        # Deal with settings 
-        setting_flags = ''
-        if not self.default_channel() or not self.default_grid():
-            if self.default_grid():
-                setting_flags = '--settings settings_%s.xml'\
-                                % self.channel_lowerword()
-            else:
-                setting_flags = '--settings settings_%s_%s.xml'\
-                                % (self.grid(), self.channel_lowerword())
-                                                
-        return " ".join((channel_flags, grid_flags, setting_flags)).strip()
-
-
-class WindowsManifest(ViewerManifest):
-    def final_exe(self):
-        if self.default_channel():
-            if self.default_grid():
-                return "SecondLife.exe"
-            else:
-                return "SecondLifePreview.exe"
-        else:
-            return ''.join(self.channel().split()) + '.exe'
-
-
-    def construct(self):
-        super(WindowsManifest, self).construct()
-        # the final exe is complicated because we're not sure where it's coming from,
-        # nor do we have a fixed name for the executable
-        self.path(self.find_existing_file('debug/secondlife-bin.exe', 'release/secondlife-bin.exe', 'relwithdebinfo/secondlife-bin.exe'), dst=self.final_exe())
-        # need to get the kdu dll from any of the build directories as well
-        try:
-            self.path(self.find_existing_file('../llkdu/%s/llkdu.dll' % self.args['configuration'],
-                '../../libraries/i686-win32/lib/release/llkdu.dll'), 
-                  dst='llkdu.dll')
-            pass
-        except:
-            print "Skipping llkdu.dll"
-            pass
-        self.path(src="licenses-win32.txt", dst="licenses.txt")
-
-        self.path("featuretable.txt")
-
-        # For use in crash reporting (generates minidumps)
-        self.path("dbghelp.dll")
-
-        # For using FMOD for sound... DJS
-        self.path("fmod.dll")
-
-        # For textures
-        if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
-            self.path("openjpeg.dll")
-            self.end_prefix()
-
-        # Mozilla appears to force a dependency on these files so we need to ship it (CP) - updated to vc8 versions (nyx)
-        # These need to be installed as a SxS assembly, currently a 'private' assembly.
-        # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
-        if self.prefix(src=self.args['configuration'], dst=""):
-            if self.args['configuration'] == 'Debug':
-                self.path("msvcr80d.dll")
-                self.path("msvcp80d.dll")
-                self.path("Microsoft.VC80.DebugCRT.manifest")
-            else:
-                self.path("msvcr80.dll")
-                self.path("msvcp80.dll")
-                self.path("Microsoft.VC80.CRT.manifest")
-            self.end_prefix()
-
-        # Mozilla runtime DLLs (CP)
-        if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
-            self.path("freebl3.dll")
-            self.path("js3250.dll")
-            self.path("nspr4.dll")
-            self.path("nss3.dll")
-            self.path("nssckbi.dll")
-            self.path("plc4.dll")
-            self.path("plds4.dll")
-            self.path("smime3.dll")
-            self.path("softokn3.dll")
-            self.path("ssl3.dll")
-            self.path("xpcom.dll")
-            self.path("xul.dll")
-            self.end_prefix()
-
-        # Mozilla runtime misc files (CP)
-        if self.prefix(src="app_settings/mozilla"):
-            self.path("chrome/*.*")
-            self.path("components/*.*")
-            self.path("greprefs/*.*")
-            self.path("plugins/*.*")
-            self.path("res/*.*")
-            self.path("res/*/*")
-            self.end_prefix()
-
-        # Mozilla hack to get it to accept newer versions of msvc*80.dll than are listed in manifest
-        # necessary as llmozlib2-vc80.lib refers to an old version of msvc*80.dll - can be removed when new version of llmozlib is built - Nyx
-        # The config file name needs to match the exe's name.
-        self.path("SecondLife.exe.config", dst=self.final_exe() + ".config")
-
-        # Vivox runtimes
-        if self.prefix(src="vivox-runtime/i686-win32", dst=""):
-            self.path("SLVoice.exe")
-            self.path("alut.dll")
-            self.path("vivoxsdk.dll")
-            self.path("ortp.dll")
-            self.path("wrap_oal.dll")
-            self.end_prefix()
-
-        # pull in the crash logger and updater from other projects
-        self.path(src=self.find_existing_file( # tag:"crash-logger" here as a cue to the exporter
-                "../win_crash_logger/debug/windows-crash-logger.exe",
-                "../win_crash_logger/release/windows-crash-logger.exe",
-                "../win_crash_logger/relwithdebinfo/windows-crash-logger.exe"),
-                  dst="win_crash_logger.exe")
-        self.path(src=self.find_existing_file(
-                "../win_updater/debug/windows-updater.exe",
-                "../win_updater/release/windows-updater.exe",
-                "../win_updater/relwithdebinfo/windows-updater.exe"),
-                  dst="updater.exe")
-
-        # For google-perftools tcmalloc allocator.
-        if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
-                self.path("libtcmalloc_minimal.dll")
-                self.end_prefix()
-
-
-    def nsi_file_commands(self, install=True):
-        def wpath(path):
-            if path.endswith('/') or path.endswith(os.path.sep):
-                path = path[:-1]
-            path = path.replace('/', '\\')
-            return path
-
-        result = ""
-        dest_files = [pair[1] for pair in self.file_list if pair[0] and os.path.isfile(pair[1])]
-        # sort deepest hierarchy first
-        dest_files.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b))
-        dest_files.reverse()
-        out_path = None
-        for pkg_file in dest_files:
-            rel_file = os.path.normpath(pkg_file.replace(self.get_dst_prefix()+os.path.sep,''))
-            installed_dir = wpath(os.path.join('$INSTDIR', os.path.dirname(rel_file)))
-            pkg_file = wpath(os.path.normpath(pkg_file))
-            if installed_dir != out_path:
-                if install:
-                    out_path = installed_dir
-                    result += 'SetOutPath ' + out_path + '\n'
-            if install:
-                result += 'File ' + pkg_file + '\n'
-            else:
-                result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n'
-        # at the end of a delete, just rmdir all the directories
-        if not install:
-            deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list]
-            # find all ancestors so that we don't skip any dirs that happened to have no non-dir children
-            deleted_dirs = []
-            for d in deleted_file_dirs:
-                deleted_dirs.extend(path_ancestors(d))
-            # sort deepest hierarchy first
-            deleted_dirs.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b))
-            deleted_dirs.reverse()
-            prev = None
-            for d in deleted_dirs:
-                if d != prev:   # skip duplicates
-                    result += 'RMDir ' + wpath(os.path.join('$INSTDIR', os.path.normpath(d))) + '\n'
-                prev = d
-
-        return result
-
-    def package_finish(self):
-        # a standard map of strings for replacing in the templates
-        substitution_strings = {
-            'version' : '.'.join(self.args['version']),
-            'version_short' : '.'.join(self.args['version'][:-1]),
-            'version_dashes' : '-'.join(self.args['version']),
-            'final_exe' : self.final_exe(),
-            'grid':self.args['grid'],
-            'grid_caps':self.args['grid'].upper(),
-            # escape quotes becase NSIS doesn't handle them well
-            'flags':self.flags_list().replace('"', '$\\"'),
-            'channel':self.channel(),
-            'channel_oneword':self.channel_oneword(),
-            'channel_unique':self.channel_unique(),
-            }
-
-        version_vars = """
-        !define INSTEXE  "%(final_exe)s"
-        !define VERSION "%(version_short)s"
-        !define VERSION_LONG "%(version)s"
-        !define VERSION_DASHES "%(version_dashes)s"
-        """ % substitution_strings
-        if self.default_channel():
-            if self.default_grid():
-                # release viewer
-                installer_file = "Second_Life_%(version_dashes)s_Setup.exe"
-                grid_vars_template = """
-                OutFile "%(installer_file)s"
-                !define INSTFLAGS "%(flags)s"
-                !define INSTNAME   "SecondLife"
-                !define SHORTCUT   "Second Life"
-                !define URLNAME   "secondlife"
-                Caption "Second Life ${VERSION}"
-                """
-            else:
-                # beta grid viewer
-                installer_file = "Second_Life_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
-                grid_vars_template = """
-                OutFile "%(installer_file)s"
-                !define INSTFLAGS "%(flags)s"
-                !define INSTNAME   "SecondLife%(grid_caps)s"
-                !define SHORTCUT   "Second Life (%(grid_caps)s)"
-                !define URLNAME   "secondlife%(grid)s"
-                !define UNINSTALL_SETTINGS 1
-                Caption "Second Life %(grid)s ${VERSION}"
-                """
-        else:
-            # some other channel on some grid
-            installer_file = "Second_Life_%(version_dashes)s_%(channel_oneword)s_Setup.exe"
-            grid_vars_template = """
-            OutFile "%(installer_file)s"
-            !define INSTFLAGS "%(flags)s"
-            !define INSTNAME   "SecondLife%(channel_oneword)s"
-            !define SHORTCUT   "%(channel)s"
-            !define URLNAME   "secondlife"
-            !define UNINSTALL_SETTINGS 1
-            Caption "%(channel)s ${VERSION}"
-            """
-        if 'installer_name' in self.args:
-            installer_file = self.args['installer_name']
-        else:
-            installer_file = installer_file % substitution_strings
-        substitution_strings['installer_file'] = installer_file
-
-        tempfile = "secondlife_setup_tmp.nsi"
-        # the following replaces strings in the nsi template
-        # it also does python-style % substitution
-        self.replace_in("installers/windows/installer_template.nsi", tempfile, {
-                "%%VERSION%%":version_vars,
-                "%%SOURCE%%":self.get_src_prefix(),
-                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
-                "%%INSTALL_FILES%%":self.nsi_file_commands(True),
-                "%%DELETE_FILES%%":self.nsi_file_commands(False)})
-
-        # We use the Unicode version of NSIS, available from
-        # http://www.scratchpaper.com/
-        NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe'
-        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
-        # self.remove(self.dst_path_of(tempfile))
-        # If we're on a build machine, sign the code using our Authenticode certificate. JC
-        sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
-        if os.path.exists(sign_py):
-            self.run_command(sign_py + ' ' + self.dst_path_of(installer_file))
-        else:
-            print "Skipping code signing,", sign_py, "does not exist"
-        self.created_path(self.dst_path_of(installer_file))
-        self.package_file = installer_file
-
-
-class DarwinManifest(ViewerManifest):
-    def construct(self):
-        # copy over the build result (this is a no-op if run within the xcode script)
-        self.path(self.args['configuration'] + "/Second Life.app", dst="")
-
-        if self.prefix(src="", dst="Contents"):  # everything goes in Contents
-            # Expand the tar file containing the assorted mozilla bits into
-            #  <bundle>/Contents/MacOS/
-            self.contents_of_tar(self.args['source']+'/mozilla-universal-darwin.tgz', 'MacOS')
-
-            self.path("Info-SecondLife.plist", dst="Info.plist")
-
-            # copy additional libs in <bundle>/Contents/MacOS/
-            self.path("../../libraries/universal-darwin/lib_release/libndofdev.dylib", dst="MacOS/libndofdev.dylib")
-
-            # replace the default theme with our custom theme (so scrollbars work).
-            if self.prefix(src="mozilla-theme", dst="MacOS/chrome"):
-                self.path("classic.jar")
-                self.path("classic.manifest")
-                self.end_prefix("MacOS/chrome")
-
-            # most everything goes in the Resources directory
-            if self.prefix(src="", dst="Resources"):
-                super(DarwinManifest, self).construct()
-
-                if self.prefix("cursors_mac"):
-                    self.path("*.tif")
-                    self.end_prefix("cursors_mac")
-
-                self.path("licenses-mac.txt", dst="licenses.txt")
-                self.path("featuretable_mac.txt")
-                self.path("SecondLife.nib")
-
-                # If we are not using the default channel, use the 'Firstlook
-                # icon' to show that it isn't a stable release.
-                if self.default_channel() and self.default_grid():
-                    self.path("secondlife.icns")
-                else:
-                    self.path("secondlife_firstlook.icns", "secondlife.icns")
-                self.path("SecondLife.nib")
-                
-                # Translations
-                self.path("English.lproj")
-                self.path("German.lproj")
-                self.path("Japanese.lproj")
-                self.path("Korean.lproj")
-                self.path("da.lproj")
-                self.path("es.lproj")
-                self.path("fr.lproj")
-                self.path("hu.lproj")
-                self.path("it.lproj")
-                self.path("nl.lproj")
-                self.path("pl.lproj")
-                self.path("pt.lproj")
-                self.path("ru.lproj")
-                self.path("tr.lproj")
-                self.path("uk.lproj")
-                self.path("zh-Hans.lproj")
-
-                # SLVoice and vivox lols
-                self.path("vivox-runtime/universal-darwin/libalut.dylib", "libalut.dylib")
-                self.path("vivox-runtime/universal-darwin/libopenal.dylib", "libopenal.dylib")
-                self.path("vivox-runtime/universal-darwin/libortp.dylib", "libortp.dylib")
-                self.path("vivox-runtime/universal-darwin/libvivoxsdk.dylib", "libvivoxsdk.dylib")
-                self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice")
-
-                # need to get the kdu dll from any of the build directories as well
-                try:
-                    self.path(self.find_existing_file('../llkdu/%s/libllkdu.dylib' % self.args['configuration'],
-                        "../../libraries/universal-darwin/lib_release/libllkdu.dylib"),
-                        dst='libllkdu.dylib')
-                    pass
-                except:
-                    print "Skipping libllkdu.dylib"
-                    pass
-                
-                #libfmodwrapper.dylib
-                self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
-                
-                # our apps
-                self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
-                self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app")
-
-                # command line arguments for connecting to the proper grid
-                self.put_in_file(self.flags_list(), 'arguments.txt')
-
-                self.end_prefix("Resources")
-
-            self.end_prefix("Contents")
-
-        # NOTE: the -S argument to strip causes it to keep enough info for
-        # annotated backtraces (i.e. function names in the crash log).  'strip' with no
-        # arguments yields a slightly smaller binary but makes crash logs mostly useless.
-        # This may be desirable for the final release.  Or not.
-        if ("package" in self.args['actions'] or 
-            "unpacked" in self.args['actions']):
-            self.run_command('strip -S "%(viewer_binary)s"' %
-                             { 'viewer_binary' : self.dst_path_of('Contents/MacOS/Second Life')})
-
-
-    def package_finish(self):
-        channel_standin = 'Second Life'  # hah, our default channel is not usable on its own
-        if not self.default_channel():
-            channel_standin = self.channel()
-
-        imagename="SecondLife_" + '_'.join(self.args['version'])
-
-        # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning.
-        #  If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick.
-
-        volname="Second Life Installer"  # DO NOT CHANGE without understanding comment above
-
-        if self.default_channel():
-            if not self.default_grid():
-                # beta case
-                imagename = imagename + '_' + self.args['grid'].upper()
-        else:
-            # first look, etc
-            imagename = imagename + '_' + self.channel_oneword().upper()
-
-        sparsename = imagename + ".sparseimage"
-        finalname = imagename + ".dmg"
-        # make sure we don't have stale files laying about
-        self.remove(sparsename, finalname)
-
-        self.run_command('hdiutil create "%(sparse)s" -volname "%(vol)s" -fs HFS+ -type SPARSE -megabytes 300 -layout SPUD' % {
-                'sparse':sparsename,
-                'vol':volname})
-
-        # mount the image and get the name of the mount point and device node
-        hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"')
-        devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip()
-        volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip()
-
-        # Copy everything in to the mounted .dmg
-
-        if self.default_channel() and not self.default_grid():
-            app_name = "Second Life " + self.args['grid']
-        else:
-            app_name = channel_standin.strip()
-
-        # Hack:
-        # Because there is no easy way to coerce the Finder into positioning
-        # the app bundle in the same place with different app names, we are
-        # adding multiple .DS_Store files to svn. There is one for release,
-        # one for release candidate and one for first look. Any other channels
-        # will use the release .DS_Store, and will look broken.
-        # - Ambroff 2008-08-20
-        dmg_template = os.path.join(
-            'installers', 
-            'darwin',
-            '%s-dmg' % "".join(self.channel_unique().split()).lower())
-
-        if not os.path.exists (self.src_path_of(dmg_template)):
-            dmg_template = os.path.join ('installers', 'darwin', 'release-dmg')
-
-        for s,d in {self.get_dst_prefix():app_name + ".app",
-                    os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns",
-                    os.path.join(dmg_template, "background.jpg"): "background.jpg",
-                    os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items():
-            print "Copying to dmg", s, d
-            self.copy_action(self.src_path_of(s), os.path.join(volpath, d))
-
-        # Hide the background image, DS_Store file, and volume icon file (set their "visible" bit)
-        self.run_command('SetFile -a V "' + os.path.join(volpath, ".VolumeIcon.icns") + '"')
-        self.run_command('SetFile -a V "' + os.path.join(volpath, "background.jpg") + '"')
-        self.run_command('SetFile -a V "' + os.path.join(volpath, ".DS_Store") + '"')
-
-        # Create the alias file (which is a resource file) from the .r
-        self.run_command('rez "' + self.src_path_of("installers/darwin/release-dmg/Applications-alias.r") + '" -o "' + os.path.join(volpath, "Applications") + '"')
-
-        # Set the alias file's alias and custom icon bits
-        self.run_command('SetFile -a AC "' + os.path.join(volpath, "Applications") + '"')
-
-        # Set the disk image root's custom icon bit
-        self.run_command('SetFile -a C "' + volpath + '"')
-
-        # Unmount the image
-        self.run_command('hdiutil detach -force "' + devfile + '"')
-
-        print "Converting temp disk image to final disk image"
-        self.run_command('hdiutil convert "%(sparse)s" -format UDZO -imagekey zlib-level=9 -o "%(final)s"' % {'sparse':sparsename, 'final':finalname})
-        # get rid of the temp file
-        self.package_file = finalname
-        self.remove(sparsename)
-
-class LinuxManifest(ViewerManifest):
-    def construct(self):
-        super(LinuxManifest, self).construct()
-        self.path("licenses-linux.txt","licenses.txt")
-        self.path("res/ll_icon.png","secondlife_icon.png")
-        if self.prefix("linux_tools", dst=""):
-            self.path("client-readme.txt","README-linux.txt")
-            self.path("client-readme-voice.txt","README-linux-voice.txt")
-            self.path("client-readme-joystick.txt","README-linux-joystick.txt")
-            self.path("wrapper.sh","secondlife")
-            self.path("handle_secondlifeprotocol.sh")
-            self.path("register_secondlifeprotocol.sh")
-            self.end_prefix("linux_tools")
-
-        # Create an appropriate gridargs.dat for this package, denoting required grid.
-        self.put_in_file(self.flags_list(), 'gridargs.dat')
-
-
-    def package_finish(self):
-        if 'installer_name' in self.args:
-            installer_name = self.args['installer_name']
-        else:
-            installer_name_components = ['SecondLife_', self.args.get('arch')]
-            installer_name_components.extend(self.args['version'])
-            installer_name = "_".join(installer_name_components)
-            if self.default_channel():
-                if not self.default_grid():
-                    installer_name += '_' + self.args['grid'].upper()
-            else:
-                installer_name += '_' + self.channel_oneword().upper()
-
-        # Fix access permissions
-        self.run_command("""
-                find %(dst)s -type d | xargs --no-run-if-empty chmod 755;
-                find %(dst)s -type f -perm 0700 | xargs --no-run-if-empty chmod 0755;
-                find %(dst)s -type f -perm 0500 | xargs --no-run-if-empty chmod 0555;
-                find %(dst)s -type f -perm 0600 | xargs --no-run-if-empty chmod 0644;
-                find %(dst)s -type f -perm 0400 | xargs --no-run-if-empty chmod 0444;
-                true""" %  {'dst':self.get_dst_prefix() })
-        self.package_file = installer_name + '.tar.bz2'
-
-        # temporarily move directory tree so that it has the right
-        # name in the tarfile
-        self.run_command("mv %(dst)s %(inst)s" % {
-            'dst': self.get_dst_prefix(),
-            'inst': self.build_path_of(installer_name)})
-        try:
-            # --numeric-owner hides the username of the builder for
-            # security etc.
-            self.run_command('tar -C %(dir)s --numeric-owner -cjf '
-                             '%(inst_path)s.tar.bz2 %(inst_name)s' % {
-                'dir': self.get_build_prefix(),
-                'inst_name': installer_name,
-                'inst_path':self.build_path_of(installer_name)})
-        finally:
-            self.run_command("mv %(inst)s %(dst)s" % {
-                'dst': self.get_dst_prefix(),
-                'inst': self.build_path_of(installer_name)})
-
-class Linux_i686Manifest(LinuxManifest):
-    def construct(self):
-        super(Linux_i686Manifest, self).construct()
-
-        # install either the libllkdu we just built, or a prebuilt one, in
-        # decreasing order of preference.  for linux package, this goes to bin/
-        try:
-            self.path(self.find_existing_file('../llkdu/libllkdu.so',
-                '../../libraries/i686-linux/lib_release_client/libllkdu.so'), 
-                  dst='bin/libllkdu.so')
-            # keep this one to preserve syntax, open source mangling removes previous lines
-            pass
-        except:
-            print "Skipping libllkdu.so - not found"
-            pass
-
-        self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
-        self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin")
-        self.path("linux_tools/launch_url.sh","launch_url.sh")
-        if self.prefix("res-sdl"):
-            self.path("*")
-            # recurse
-            self.end_prefix("res-sdl")
-
-        self.path("featuretable_linux.txt")
-        #self.path("secondlife-i686.supp")
-
-        self.path("app_settings/mozilla-runtime-linux-i686")
-
-        if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
-            #self.path("libkdu_v42R.so", "libkdu.so")
-            self.path("libfmod-3.75.so")
-            self.path("libapr-1.so.0")
-            self.path("libaprutil-1.so.0")
-            self.path("libdb-4.2.so")
-            self.path("libcrypto.so.0.9.7")
-            self.path("libexpat.so.1")
-            self.path("libssl.so.0.9.7")
-            self.path("libuuid.so", "libuuid.so.1")
-            self.path("libSDL-1.2.so.0")
-            self.path("libELFIO.so")
-            self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3")
-            self.path("libalut.so")
-            self.path("libopenal.so", "libopenal.so.1")
-            self.end_prefix("lib")
-
-            # Vivox runtimes
-            if self.prefix(src="vivox-runtime/i686-linux", dst="bin"):
-                    self.path("SLVoice")
-                    self.end_prefix()
-            if self.prefix(src="vivox-runtime/i686-linux", dst="lib"):
-                    self.path("libortp.so")
-                    self.path("libvivoxsdk.so")
-                    self.end_prefix("lib")
-
-class Linux_x86_64Manifest(LinuxManifest):
-    def construct(self):
-        super(Linux_x86_64Manifest, self).construct()
-        self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
-        self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin")
-        self.path("linux_tools/launch_url.sh","launch_url.sh")
-        if self.prefix("res-sdl"):
-            self.path("*")
-            # recurse
-            self.end_prefix("res-sdl")
-
-        self.path("featuretable_linux.txt")
-        self.path("secondlife-i686.supp")
-
-if __name__ == "__main__":
-    main()
+#!/usr/bin/python
+# @file viewer_manifest.py
+# @author Ryan Williams
+# @brief Description of all installer viewer files, and methods for packaging
+#        them into installers for all supported platforms.
+#
+# $LicenseInfo:firstyear=2006&license=viewergpl$
+# 
+# Copyright (c) 2006-2009, Linden Research, Inc.
+# 
+# Second Life Viewer Source Code
+# The source code in this file ("Source Code") is provided by Linden Lab
+# to you under the terms of the GNU General Public License, version 2.0
+# ("GPL"), unless you have obtained a separate licensing agreement
+# ("Other License"), formally executed by you and Linden Lab.  Terms of
+# the GPL can be found in doc/GPL-license.txt in this distribution, or
+# online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+# 
+# There are special exceptions to the terms and conditions of the GPL as
+# it is applied to this Source Code. View the full text of the exception
+# in the file doc/FLOSS-exception.txt in this software distribution, or
+# online at
+# http://secondlifegrid.net/programs/open_source/licensing/flossexception
+# 
+# By copying, modifying or distributing this software, you acknowledge
+# that you have read and understood your obligations described above,
+# and agree to abide by those obligations.
+# 
+# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+# COMPLETENESS OR PERFORMANCE.
+# $/LicenseInfo$
+import sys
+import os.path
+import re
+import tarfile
+viewer_dir = os.path.dirname(__file__)
+# add llmanifest library to our path so we don't have to muck with PYTHONPATH
+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 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("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;
+        used for A/B testing"""
+        # NOTE: Do not return the normal channel if login_channel
+        # is not specified, as some code may branch depending on
+        # whether or not this is present
+        return self.args.get('login_channel')
+
+    def grid(self):
+        return self.args['grid']
+    def channel(self):
+        return self.args['channel']
+    def channel_unique(self):
+        return self.channel().replace("Second Life", "").strip()
+    def channel_oneword(self):
+        return "".join(self.channel_unique().split())
+    def channel_lowerword(self):
+        return self.channel_oneword().lower()
+
+    def flags_list(self):
+        """ Convenience function that returns the command-line flags
+        for the grid"""
+
+        # Set command line flags relating to the target grid
+        grid_flags = ''
+        if not self.default_grid():
+            grid_flags = "--grid %(grid)s "\
+                         "--helperuri http://preview-%(grid)s.secondlife.com/helpers/" %\
+                           {'grid':self.grid()}
+
+        # set command line flags for channel
+        channel_flags = ''
+        if self.login_channel() and self.login_channel() != self.channel():
+            # Report a special channel during login, but use default
+            channel_flags = '--channel "%s"' % (self.login_channel())
+        elif not self.default_channel():
+            channel_flags = '--channel "%s"' % self.channel()
+
+        # Deal with settings 
+        setting_flags = ''
+        if not self.default_channel() or not self.default_grid():
+            if self.default_grid():
+                setting_flags = '--settings settings_%s.xml'\
+                                % self.channel_lowerword()
+            else:
+                setting_flags = '--settings settings_%s_%s.xml'\
+                                % (self.grid(), self.channel_lowerword())
+                                                
+        return " ".join((channel_flags, grid_flags, setting_flags)).strip()
+
+
+class WindowsManifest(ViewerManifest):
+    def final_exe(self):
+        if self.default_channel():
+            if self.default_grid():
+                return "SecondLife.exe"
+            else:
+                return "SecondLifePreview.exe"
+        else:
+            return ''.join(self.channel().split()) + '.exe'
+
+
+    def construct(self):
+        super(WindowsManifest, self).construct()
+        # the final exe is complicated because we're not sure where it's coming from,
+        # nor do we have a fixed name for the executable
+        self.path(self.find_existing_file('debug/secondlife-bin.exe', 'release/secondlife-bin.exe', 'relwithdebinfo/secondlife-bin.exe'), dst=self.final_exe())
+
+        # need to get the llcommon.dll from any of the build directories as well
+        try:
+            self.path(self.find_existing_file('../llcommon/%s/llcommon.dll' % self.args['configuration']),
+                  dst='llcommon.dll')
+            if self.prefix(src=self.args['configuration'], dst=""):
+                self.path('libapr-1.dll')
+                self.path('libaprutil-1.dll')
+                self.path('libapriconv-1.dll')
+                self.end_prefix()
+        except:
+            print "Skipping llcommon.dll (assuming llcommon was linked statically)"
+            pass
+
+        # need to get the kdu dll from any of the build directories as well
+        try:
+            self.path(self.find_existing_file('../llkdu/%s/llkdu.dll' % self.args['configuration'],
+                '../../libraries/i686-win32/lib/release/llkdu.dll'), 
+                  dst='llkdu.dll')
+            pass
+        except:
+            print "Skipping llkdu.dll"
+            pass
+        self.path(src="licenses-win32.txt", dst="licenses.txt")
+
+        self.path("featuretable.txt")
+
+        # For use in crash reporting (generates minidumps)
+        self.path("dbghelp.dll")
+
+        # For using FMOD for sound... DJS
+        self.path("fmod.dll")
+
+        # For textures
+        if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
+            self.path("openjpeg.dll")
+            self.end_prefix()
+
+        # Mozilla appears to force a dependency on these files so we need to ship it (CP) - updated to vc8 versions (nyx)
+        # These need to be installed as a SxS assembly, currently a 'private' assembly.
+        # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
+        if self.prefix(src=self.args['configuration'], dst=""):
+            if self.args['configuration'] == 'Debug':
+                self.path("msvcr80d.dll")
+                self.path("msvcp80d.dll")
+                self.path("Microsoft.VC80.DebugCRT.manifest")
+            else:
+                self.path("msvcr80.dll")
+                self.path("msvcp80.dll")
+                self.path("Microsoft.VC80.CRT.manifest")
+            self.end_prefix()
+
+        # Mozilla runtime DLLs (CP)
+        if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
+            self.path("freebl3.dll")
+            self.path("js3250.dll")
+            self.path("nspr4.dll")
+            self.path("nss3.dll")
+            self.path("nssckbi.dll")
+            self.path("plc4.dll")
+            self.path("plds4.dll")
+            self.path("smime3.dll")
+            self.path("softokn3.dll")
+            self.path("ssl3.dll")
+            self.path("xpcom.dll")
+            self.path("xul.dll")
+            self.end_prefix()
+
+        # Mozilla runtime misc files (CP)
+        if self.prefix(src="app_settings/mozilla"):
+            self.path("chrome/*.*")
+            self.path("components/*.*")
+            self.path("greprefs/*.*")
+            self.path("plugins/*.*")
+            self.path("res/*.*")
+            self.path("res/*/*")
+            self.end_prefix()
+
+        # Mozilla hack to get it to accept newer versions of msvc*80.dll than are listed in manifest
+        # necessary as llmozlib2-vc80.lib refers to an old version of msvc*80.dll - can be removed when new version of llmozlib is built - Nyx
+        # The config file name needs to match the exe's name.
+        self.path("SecondLife.exe.config", dst=self.final_exe() + ".config")
+
+        # Vivox runtimes
+        if self.prefix(src="vivox-runtime/i686-win32", dst=""):
+            self.path("SLVoice.exe")
+            self.path("alut.dll")
+            self.path("vivoxsdk.dll")
+            self.path("ortp.dll")
+            self.path("wrap_oal.dll")
+            self.end_prefix()
+
+        # pull in the crash logger and updater from other projects
+        self.path(src=self.find_existing_file( # tag:"crash-logger" here as a cue to the exporter
+                "../win_crash_logger/debug/windows-crash-logger.exe",
+                "../win_crash_logger/release/windows-crash-logger.exe",
+                "../win_crash_logger/relwithdebinfo/windows-crash-logger.exe"),
+                  dst="win_crash_logger.exe")
+        self.path(src=self.find_existing_file(
+                "../win_updater/debug/windows-updater.exe",
+                "../win_updater/release/windows-updater.exe",
+                "../win_updater/relwithdebinfo/windows-updater.exe"),
+                  dst="updater.exe")
+
+        # For google-perftools tcmalloc allocator.
+        if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
+                self.path("libtcmalloc_minimal.dll")
+                self.end_prefix()
+
+
+    def nsi_file_commands(self, install=True):
+        def wpath(path):
+            if path.endswith('/') or path.endswith(os.path.sep):
+                path = path[:-1]
+            path = path.replace('/', '\\')
+            return path
+
+        result = ""
+        dest_files = [pair[1] for pair in self.file_list if pair[0] and os.path.isfile(pair[1])]
+        # sort deepest hierarchy first
+        dest_files.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b))
+        dest_files.reverse()
+        out_path = None
+        for pkg_file in dest_files:
+            rel_file = os.path.normpath(pkg_file.replace(self.get_dst_prefix()+os.path.sep,''))
+            installed_dir = wpath(os.path.join('$INSTDIR', os.path.dirname(rel_file)))
+            pkg_file = wpath(os.path.normpath(pkg_file))
+            if installed_dir != out_path:
+                if install:
+                    out_path = installed_dir
+                    result += 'SetOutPath ' + out_path + '\n'
+            if install:
+                result += 'File ' + pkg_file + '\n'
+            else:
+                result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n'
+        # at the end of a delete, just rmdir all the directories
+        if not install:
+            deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list]
+            # find all ancestors so that we don't skip any dirs that happened to have no non-dir children
+            deleted_dirs = []
+            for d in deleted_file_dirs:
+                deleted_dirs.extend(path_ancestors(d))
+            # sort deepest hierarchy first
+            deleted_dirs.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b))
+            deleted_dirs.reverse()
+            prev = None
+            for d in deleted_dirs:
+                if d != prev:   # skip duplicates
+                    result += 'RMDir ' + wpath(os.path.join('$INSTDIR', os.path.normpath(d))) + '\n'
+                prev = d
+
+        return result
+
+    def package_finish(self):
+        # a standard map of strings for replacing in the templates
+        substitution_strings = {
+            'version' : '.'.join(self.args['version']),
+            'version_short' : '.'.join(self.args['version'][:-1]),
+            'version_dashes' : '-'.join(self.args['version']),
+            'final_exe' : self.final_exe(),
+            'grid':self.args['grid'],
+            'grid_caps':self.args['grid'].upper(),
+            # escape quotes becase NSIS doesn't handle them well
+            'flags':self.flags_list().replace('"', '$\\"'),
+            'channel':self.channel(),
+            'channel_oneword':self.channel_oneword(),
+            'channel_unique':self.channel_unique(),
+            }
+
+        version_vars = """
+        !define INSTEXE  "%(final_exe)s"
+        !define VERSION "%(version_short)s"
+        !define VERSION_LONG "%(version)s"
+        !define VERSION_DASHES "%(version_dashes)s"
+        """ % substitution_strings
+        if self.default_channel():
+            if self.default_grid():
+                # release viewer
+                installer_file = "Second_Life_%(version_dashes)s_Setup.exe"
+                grid_vars_template = """
+                OutFile "%(installer_file)s"
+                !define INSTFLAGS "%(flags)s"
+                !define INSTNAME   "SecondLife"
+                !define SHORTCUT   "Second Life"
+                !define URLNAME   "secondlife"
+                Caption "Second Life ${VERSION}"
+                """
+            else:
+                # beta grid viewer
+                installer_file = "Second_Life_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
+                grid_vars_template = """
+                OutFile "%(installer_file)s"
+                !define INSTFLAGS "%(flags)s"
+                !define INSTNAME   "SecondLife%(grid_caps)s"
+                !define SHORTCUT   "Second Life (%(grid_caps)s)"
+                !define URLNAME   "secondlife%(grid)s"
+                !define UNINSTALL_SETTINGS 1
+                Caption "Second Life %(grid)s ${VERSION}"
+                """
+        else:
+            # some other channel on some grid
+            installer_file = "Second_Life_%(version_dashes)s_%(channel_oneword)s_Setup.exe"
+            grid_vars_template = """
+            OutFile "%(installer_file)s"
+            !define INSTFLAGS "%(flags)s"
+            !define INSTNAME   "SecondLife%(channel_oneword)s"
+            !define SHORTCUT   "%(channel)s"
+            !define URLNAME   "secondlife"
+            !define UNINSTALL_SETTINGS 1
+            Caption "%(channel)s ${VERSION}"
+            """
+        if 'installer_name' in self.args:
+            installer_file = self.args['installer_name']
+        else:
+            installer_file = installer_file % substitution_strings
+        substitution_strings['installer_file'] = installer_file
+
+        tempfile = "secondlife_setup_tmp.nsi"
+        # the following replaces strings in the nsi template
+        # it also does python-style % substitution
+        self.replace_in("installers/windows/installer_template.nsi", tempfile, {
+                "%%VERSION%%":version_vars,
+                "%%SOURCE%%":self.get_src_prefix(),
+                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
+                "%%INSTALL_FILES%%":self.nsi_file_commands(True),
+                "%%DELETE_FILES%%":self.nsi_file_commands(False)})
+
+        # We use the Unicode version of NSIS, available from
+        # http://www.scratchpaper.com/
+        NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe'
+        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
+        # self.remove(self.dst_path_of(tempfile))
+        # If we're on a build machine, sign the code using our Authenticode certificate. JC
+        sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
+        if os.path.exists(sign_py):
+            self.run_command(sign_py + ' ' + self.dst_path_of(installer_file))
+        else:
+            print "Skipping code signing,", sign_py, "does not exist"
+        self.created_path(self.dst_path_of(installer_file))
+        self.package_file = installer_file
+
+
+class DarwinManifest(ViewerManifest):
+    def construct(self):
+        # copy over the build result (this is a no-op if run within the xcode script)
+        self.path(self.args['configuration'] + "/Second Life.app", dst="")
+
+        if self.prefix(src="", dst="Contents"):  # everything goes in Contents
+            # Expand the tar file containing the assorted mozilla bits into
+            #  <bundle>/Contents/MacOS/
+            self.contents_of_tar(self.args['source']+'/mozilla-universal-darwin.tgz', 'MacOS')
+
+            self.path("Info-SecondLife.plist", dst="Info.plist")
+
+            # copy additional libs in <bundle>/Contents/MacOS/
+            self.path("../../libraries/universal-darwin/lib_release/libndofdev.dylib", dst="MacOS/libndofdev.dylib")
+
+            # replace the default theme with our custom theme (so scrollbars work).
+            if self.prefix(src="mozilla-theme", dst="MacOS/chrome"):
+                self.path("classic.jar")
+                self.path("classic.manifest")
+                self.end_prefix("MacOS/chrome")
+
+            # most everything goes in the Resources directory
+            if self.prefix(src="", dst="Resources"):
+                super(DarwinManifest, self).construct()
+
+                if self.prefix("cursors_mac"):
+                    self.path("*.tif")
+                    self.end_prefix("cursors_mac")
+
+                self.path("licenses-mac.txt", dst="licenses.txt")
+                self.path("featuretable_mac.txt")
+                self.path("SecondLife.nib")
+
+                # If we are not using the default channel, use the 'Firstlook
+                # icon' to show that it isn't a stable release.
+                if self.default_channel() and self.default_grid():
+                    self.path("secondlife.icns")
+                else:
+                    self.path("secondlife_firstlook.icns", "secondlife.icns")
+                self.path("SecondLife.nib")
+                
+                # Translations
+                self.path("English.lproj")
+                self.path("German.lproj")
+                self.path("Japanese.lproj")
+                self.path("Korean.lproj")
+                self.path("da.lproj")
+                self.path("es.lproj")
+                self.path("fr.lproj")
+                self.path("hu.lproj")
+                self.path("it.lproj")
+                self.path("nl.lproj")
+                self.path("pl.lproj")
+                self.path("pt.lproj")
+                self.path("ru.lproj")
+                self.path("tr.lproj")
+                self.path("uk.lproj")
+                self.path("zh-Hans.lproj")
+
+                # SLVoice and vivox lols
+                self.path("vivox-runtime/universal-darwin/libalut.dylib", "libalut.dylib")
+                self.path("vivox-runtime/universal-darwin/libopenal.dylib", "libopenal.dylib")
+                self.path("vivox-runtime/universal-darwin/libortp.dylib", "libortp.dylib")
+                self.path("vivox-runtime/universal-darwin/libvivoxsdk.dylib", "libvivoxsdk.dylib")
+                self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice")
+
+                # need to get the kdu dll from any of the build directories as well
+                try:
+                    self.path(self.find_existing_file('../llkdu/%s/libllkdu.dylib' % self.args['configuration'],
+                        "../../libraries/universal-darwin/lib_release/libllkdu.dylib"),
+                        dst='libllkdu.dylib')
+                    pass
+                except:
+                    print "Skipping libllkdu.dylib"
+                    pass
+                
+                #libfmodwrapper.dylib
+                self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
+                
+                # our apps
+                self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
+                self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app")
+
+                # command line arguments for connecting to the proper grid
+                self.put_in_file(self.flags_list(), 'arguments.txt')
+
+                self.end_prefix("Resources")
+
+            self.end_prefix("Contents")
+
+        # NOTE: the -S argument to strip causes it to keep enough info for
+        # annotated backtraces (i.e. function names in the crash log).  'strip' with no
+        # arguments yields a slightly smaller binary but makes crash logs mostly useless.
+        # This may be desirable for the final release.  Or not.
+        if ("package" in self.args['actions'] or 
+            "unpacked" in self.args['actions']):
+            self.run_command('strip -S "%(viewer_binary)s"' %
+                             { 'viewer_binary' : self.dst_path_of('Contents/MacOS/Second Life')})
+
+
+    def package_finish(self):
+        channel_standin = 'Second Life'  # hah, our default channel is not usable on its own
+        if not self.default_channel():
+            channel_standin = self.channel()
+
+        imagename="SecondLife_" + '_'.join(self.args['version'])
+
+        # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning.
+        #  If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick.
+
+        volname="Second Life Installer"  # DO NOT CHANGE without understanding comment above
+
+        if self.default_channel():
+            if not self.default_grid():
+                # beta case
+                imagename = imagename + '_' + self.args['grid'].upper()
+        else:
+            # first look, etc
+            imagename = imagename + '_' + self.channel_oneword().upper()
+
+        sparsename = imagename + ".sparseimage"
+        finalname = imagename + ".dmg"
+        # make sure we don't have stale files laying about
+        self.remove(sparsename, finalname)
+
+        self.run_command('hdiutil create "%(sparse)s" -volname "%(vol)s" -fs HFS+ -type SPARSE -megabytes 300 -layout SPUD' % {
+                'sparse':sparsename,
+                'vol':volname})
+
+        # mount the image and get the name of the mount point and device node
+        hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"')
+        devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip()
+        volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip()
+
+        # Copy everything in to the mounted .dmg
+
+        if self.default_channel() and not self.default_grid():
+            app_name = "Second Life " + self.args['grid']
+        else:
+            app_name = channel_standin.strip()
+
+        # Hack:
+        # Because there is no easy way to coerce the Finder into positioning
+        # the app bundle in the same place with different app names, we are
+        # adding multiple .DS_Store files to svn. There is one for release,
+        # one for release candidate and one for first look. Any other channels
+        # will use the release .DS_Store, and will look broken.
+        # - Ambroff 2008-08-20
+        dmg_template = os.path.join(
+            'installers', 
+            'darwin',
+            '%s-dmg' % "".join(self.channel_unique().split()).lower())
+
+        if not os.path.exists (self.src_path_of(dmg_template)):
+            dmg_template = os.path.join ('installers', 'darwin', 'release-dmg')
+
+        for s,d in {self.get_dst_prefix():app_name + ".app",
+                    os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns",
+                    os.path.join(dmg_template, "background.jpg"): "background.jpg",
+                    os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items():
+            print "Copying to dmg", s, d
+            self.copy_action(self.src_path_of(s), os.path.join(volpath, d))
+
+        # Hide the background image, DS_Store file, and volume icon file (set their "visible" bit)
+        self.run_command('SetFile -a V "' + os.path.join(volpath, ".VolumeIcon.icns") + '"')
+        self.run_command('SetFile -a V "' + os.path.join(volpath, "background.jpg") + '"')
+        self.run_command('SetFile -a V "' + os.path.join(volpath, ".DS_Store") + '"')
+
+        # Create the alias file (which is a resource file) from the .r
+        self.run_command('rez "' + self.src_path_of("installers/darwin/release-dmg/Applications-alias.r") + '" -o "' + os.path.join(volpath, "Applications") + '"')
+
+        # Set the alias file's alias and custom icon bits
+        self.run_command('SetFile -a AC "' + os.path.join(volpath, "Applications") + '"')
+
+        # Set the disk image root's custom icon bit
+        self.run_command('SetFile -a C "' + volpath + '"')
+
+        # Unmount the image
+        self.run_command('hdiutil detach -force "' + devfile + '"')
+
+        print "Converting temp disk image to final disk image"
+        self.run_command('hdiutil convert "%(sparse)s" -format UDZO -imagekey zlib-level=9 -o "%(final)s"' % {'sparse':sparsename, 'final':finalname})
+        # get rid of the temp file
+        self.package_file = finalname
+        self.remove(sparsename)
+
+class LinuxManifest(ViewerManifest):
+    def construct(self):
+        super(LinuxManifest, self).construct()
+        self.path("licenses-linux.txt","licenses.txt")
+        self.path("res/ll_icon.png","secondlife_icon.png")
+        if self.prefix("linux_tools", dst=""):
+            self.path("client-readme.txt","README-linux.txt")
+            self.path("client-readme-voice.txt","README-linux-voice.txt")
+            self.path("client-readme-joystick.txt","README-linux-joystick.txt")
+            self.path("wrapper.sh","secondlife")
+            self.path("handle_secondlifeprotocol.sh")
+            self.path("register_secondlifeprotocol.sh")
+            self.end_prefix("linux_tools")
+
+        # Create an appropriate gridargs.dat for this package, denoting required grid.
+        self.put_in_file(self.flags_list(), 'gridargs.dat')
+
+
+    def package_finish(self):
+        if 'installer_name' in self.args:
+            installer_name = self.args['installer_name']
+        else:
+            installer_name_components = ['SecondLife_', self.args.get('arch')]
+            installer_name_components.extend(self.args['version'])
+            installer_name = "_".join(installer_name_components)
+            if self.default_channel():
+                if not self.default_grid():
+                    installer_name += '_' + self.args['grid'].upper()
+            else:
+                installer_name += '_' + self.channel_oneword().upper()
+
+        # Fix access permissions
+        self.run_command("""
+                find %(dst)s -type d | xargs --no-run-if-empty chmod 755;
+                find %(dst)s -type f -perm 0700 | xargs --no-run-if-empty chmod 0755;
+                find %(dst)s -type f -perm 0500 | xargs --no-run-if-empty chmod 0555;
+                find %(dst)s -type f -perm 0600 | xargs --no-run-if-empty chmod 0644;
+                find %(dst)s -type f -perm 0400 | xargs --no-run-if-empty chmod 0444;
+                true""" %  {'dst':self.get_dst_prefix() })
+        self.package_file = installer_name + '.tar.bz2'
+
+        # temporarily move directory tree so that it has the right
+        # name in the tarfile
+        self.run_command("mv %(dst)s %(inst)s" % {
+            'dst': self.get_dst_prefix(),
+            'inst': self.build_path_of(installer_name)})
+        try:
+            # --numeric-owner hides the username of the builder for
+            # security etc.
+            self.run_command('tar -C %(dir)s --numeric-owner -cjf '
+                             '%(inst_path)s.tar.bz2 %(inst_name)s' % {
+                'dir': self.get_build_prefix(),
+                'inst_name': installer_name,
+                'inst_path':self.build_path_of(installer_name)})
+        finally:
+            self.run_command("mv %(inst)s %(dst)s" % {
+                'dst': self.get_dst_prefix(),
+                'inst': self.build_path_of(installer_name)})
+
+class Linux_i686Manifest(LinuxManifest):
+    def construct(self):
+        super(Linux_i686Manifest, self).construct()
+
+        # install either the libllkdu we just built, or a prebuilt one, in
+        # decreasing order of preference.  for linux package, this goes to bin/
+        try:
+            self.path(self.find_existing_file('../llkdu/libllkdu.so',
+                '../../libraries/i686-linux/lib_release_client/libllkdu.so'), 
+                  dst='bin/libllkdu.so')
+            # keep this one to preserve syntax, open source mangling removes previous lines
+            pass
+        except:
+            print "Skipping libllkdu.so - not found"
+            pass
+
+        self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
+        self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin")
+        self.path("linux_tools/launch_url.sh","launch_url.sh")
+        if self.prefix("res-sdl"):
+            self.path("*")
+            # recurse
+            self.end_prefix("res-sdl")
+
+        self.path("featuretable_linux.txt")
+        #self.path("secondlife-i686.supp")
+
+        self.path("app_settings/mozilla-runtime-linux-i686")
+
+        if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
+            #self.path("libkdu_v42R.so", "libkdu.so")
+            self.path("libfmod-3.75.so")
+            self.path("libapr-1.so.0")
+            self.path("libaprutil-1.so.0")
+            self.path("libdb-4.2.so")
+            self.path("libcrypto.so.0.9.7")
+            self.path("libexpat.so.1")
+            self.path("libssl.so.0.9.7")
+            self.path("libuuid.so", "libuuid.so.1")
+            self.path("libSDL-1.2.so.0")
+            self.path("libELFIO.so")
+            self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3")
+            self.path("libalut.so")
+            self.path("libopenal.so", "libopenal.so.1")
+            self.end_prefix("lib")
+
+            # Vivox runtimes
+            if self.prefix(src="vivox-runtime/i686-linux", dst="bin"):
+                    self.path("SLVoice")
+                    self.end_prefix()
+            if self.prefix(src="vivox-runtime/i686-linux", dst="lib"):
+                    self.path("libortp.so")
+                    self.path("libvivoxsdk.so")
+                    self.end_prefix("lib")
+
+class Linux_x86_64Manifest(LinuxManifest):
+    def construct(self):
+        super(Linux_x86_64Manifest, self).construct()
+        self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
+        self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin")
+        self.path("linux_tools/launch_url.sh","launch_url.sh")
+        if self.prefix("res-sdl"):
+            self.path("*")
+            # recurse
+            self.end_prefix("res-sdl")
+
+        self.path("featuretable_linux.txt")
+        self.path("secondlife-i686.supp")
+
+if __name__ == "__main__":
+    main()
-- 
cgit v1.2.3


From abcc37e4ca6e8a4020f4d53e9692fe8a856ca306 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 7 Jul 2009 18:08:15 -0700
Subject: Oops, forgot to update the plugin loading code when I switched
 ll_plugin_start to take LLSD arguments.

---
 indra/newview/llappviewer.cpp | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 745e433f3c..bed63c4dbc 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4122,16 +4122,14 @@ void LLAppViewer::loadEventHostModule(S32 listen_port) const
 	ll_apr_assert_status(rv);
 	llassert_always(eventhost_dso_handle != NULL);
 
-	int (*ll_plugin_start_func)(char const * const *, char const * const *) = NULL;
+	int (*ll_plugin_start_func)(LLSD const &) = NULL;
 	rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_start_func, eventhost_dso_handle, "ll_plugin_start");
 
 	ll_apr_assert_status(rv);
 	llassert_always(ll_plugin_start_func != NULL);
 
-	std::string port_text = boost::lexical_cast<std::string>(listen_port);
-	std::vector<char const *> args;
-	args.push_back("-L");
-	args.push_back(port_text.c_str());
+	LLSD args;
+	args["listen_port"] = listen_port;
 
-	ll_plugin_start_func(&args[0], &args[0] + args.size());
+	ll_plugin_start_func(args);
 }
-- 
cgit v1.2.3


From 1f9a6f3bdcadb11aea5083e3066ef5e870e69f8a Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 7 Jul 2009 18:09:45 -0700
Subject: Fix for crash when quitting due to mAppViewer being NULL.

---
 indra/newview/llappviewer.cpp         | 2 +-
 indra/newview/llappviewerlistener.cpp | 6 +++++-
 indra/newview/llappviewerlistener.h   | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index bed63c4dbc..b14853777d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -188,7 +188,7 @@
 // define a self-registering event API object
 #include "llappviewerlistener.h"
 
-static LLAppViewerListener sAppViewerListener("LLAppViewer", LLAppViewer::instance());
+static LLAppViewerListener sAppViewerListener("LLAppViewer", NULL);
 
 ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor
 //
diff --git a/indra/newview/llappviewerlistener.cpp b/indra/newview/llappviewerlistener.cpp
index a8c98b17a7..a3af251a3c 100644
--- a/indra/newview/llappviewerlistener.cpp
+++ b/indra/newview/llappviewerlistener.cpp
@@ -27,7 +27,11 @@ LLAppViewerListener::LLAppViewerListener(const std::string& pumpname, LLAppViewe
     add("requestQuit", &LLAppViewerListener::requestQuit);
 }
 
-void LLAppViewerListener::requestQuit(const LLSD& event) const
+void LLAppViewerListener::requestQuit(const LLSD& event)
 {
+    if(mAppViewer == NULL)
+    {
+        mAppViewer = LLAppViewer::instance();
+    }
     mAppViewer->requestQuit();
 }
diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h
index ab17dd1d90..d702f605ef 100644
--- a/indra/newview/llappviewerlistener.h
+++ b/indra/newview/llappviewerlistener.h
@@ -26,7 +26,7 @@ public:
     LLAppViewerListener(const std::string& pumpname, LLAppViewer* llappviewer);
 
 private:
-    void requestQuit(const LLSD& event) const;
+    void requestQuit(const LLSD& event);
 
     LLAppViewer* mAppViewer;
 };
-- 
cgit v1.2.3


From 429bd9b55c54164d133276ed5b1fd54e565eb1b4 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 8 Jul 2009 12:07:31 -0700
Subject: Added LLNotificationsListener to hook LLNotifications to the event
 system according to
 https://wiki.lindenlab.com/wiki/Incremental_Viewer_Automation/Event_API
 reviewed by palmer.

---
 indra/llui/CMakeLists.txt              |  378 ++--
 indra/llui/llnotifications.cpp         | 3005 ++++++++++++++++----------------
 indra/llui/llnotifications.h           | 1823 +++++++++----------
 indra/llui/llnotificationslistener.cpp |   28 +
 indra/llui/llnotificationslistener.h   |   31 +
 indra/newview/llappviewer.cpp          |    6 +
 6 files changed, 2672 insertions(+), 2599 deletions(-)
 create mode 100644 indra/llui/llnotificationslistener.cpp
 create mode 100644 indra/llui/llnotificationslistener.h

(limited to 'indra')

diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 117e8e28ab..a6a5ef1f92 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -1,188 +1,190 @@
-# -*- cmake -*-
-
-project(llui)
-
-include(00-Common)
-include(LLAudio)
-include(LLCommon)
-include(LLImage)
-include(LLMath)
-include(LLMessage)
-include(LLRender)
-include(LLWindow)
-include(LLVFS)
-include(LLXML)
-
-include_directories(
-    ${LLAUDIO_INCLUDE_DIRS}
-    ${LLCOMMON_INCLUDE_DIRS}
-    ${LLIMAGE_INCLUDE_DIRS}
-    ${LLMATH_INCLUDE_DIRS}
-    ${LLMESSAGE_INCLUDE_DIRS}
-    ${LLRENDER_INCLUDE_DIRS}
-    ${LLWINDOW_INCLUDE_DIRS}
-    ${LLVFS_INCLUDE_DIRS}
-    ${LLXML_INCLUDE_DIRS}
-    )
-
-set(llui_SOURCE_FILES
-    llalertdialog.cpp
-    llbutton.cpp
-    llcheckboxctrl.cpp
-    llclipboard.cpp
-    llcombobox.cpp
-    llconsole.cpp
-    llcontainerview.cpp
-    llctrlselectioninterface.cpp
-    lldraghandle.cpp
-    lleditmenuhandler.cpp
-    llf32uictrl.cpp
-    llfloater.cpp
-    llfloaterreg.cpp
-    llflyoutbutton.cpp 
-    llfocusmgr.cpp
-    llfunctorregistry.cpp
-    lliconctrl.cpp
-    llinitparam.cpp
-    llkeywords.cpp
-    lllayoutstack.cpp
-    lllineeditor.cpp
-    llmenugl.cpp
-    llmodaldialog.cpp
-    llmultifloater.cpp 
-    llmultislider.cpp
-    llmultisliderctrl.cpp
-    llnotifications.cpp
-    llpanel.cpp
-    llprogressbar.cpp
-    llradiogroup.cpp
-    llresizebar.cpp
-    llresizehandle.cpp
-    llresmgr.cpp
-    llscrollbar.cpp
-    llscrollcontainer.cpp
-    llscrollingpanellist.cpp
-    llscrolllistcell.cpp
-    llscrolllistcolumn.cpp
-    llscrolllistctrl.cpp
-    llscrolllistitem.cpp
-    llsdparam.cpp
-    llsearcheditor.cpp 
-    llslider.cpp
-    llsliderctrl.cpp
-    llspinctrl.cpp
-    llstatbar.cpp
-    llstatgraph.cpp
-    llstatview.cpp
-    llstyle.cpp
-    lltabcontainer.cpp
-    lltextbox.cpp
-    lltexteditor.cpp
-    lltextparser.cpp
-    lltrans.cpp
-    llui.cpp
-    lluicolortable.cpp
-    lluictrl.cpp
-    lluictrlfactory.cpp
-    lluiimage.cpp
-    lluistring.cpp
-    llundo.cpp
-    llviewborder.cpp
-    llviewmodel.cpp
-    llview.cpp
-    llviewquery.cpp
-    )
-    
-set(llui_HEADER_FILES
-    CMakeLists.txt
-
-    llalertdialog.h
-    llbutton.h
-    llcallbackmap.h
-    llcheckboxctrl.h
-    llclipboard.h
-    llcombobox.h
-    llconsole.h
-    llcontainerview.h
-    llctrlselectioninterface.h
-    lldraghandle.h
-    lleditmenuhandler.h
-    llf32uictrl.h
-    llfloater.h
-    llfloaterreg.h
-    llflyoutbutton.h 
-    llfocusmgr.h
-    llfunctorregistry.h
-    llhtmlhelp.h
-    lliconctrl.h
-    llinitparam.h
-    llkeywords.h
-    lllayoutstack.h
-    lllazyvalue.h
-    lllineeditor.h
-    llmenugl.h
-    llmodaldialog.h
-    llmultifloater.h 
-    llmultisliderctrl.h
-    llmultislider.h
-    llnotifications.h
-    llpanel.h
-    llprogressbar.h
-    llradiogroup.h
-    llregistry.h
-    llresizebar.h
-    llresizehandle.h
-    llresmgr.h
-    llsearcheditor.h 
-    llscrollbar.h
-    llscrollcontainer.h
-    llscrollingpanellist.h
-    llscrolllistcell.h
-    llscrolllistcolumn.h
-    llscrolllistctrl.h
-    llscrolllistitem.h
-    llsdparam.h
-    llsliderctrl.h
-    llslider.h
-    llspinctrl.h
-    llstatbar.h
-    llstatgraph.h
-    llstatview.h
-    llstyle.h
-    lltabcontainer.h
-    lltextbox.h
-    lltexteditor.h
-    lltextparser.h
-    lltrans.h
-    lluicolortable.h
-    lluiconstants.h
-    lluictrlfactory.h
-    lluictrl.h
-    lluifwd.h
-    llui.h
-    lluiimage.h
-    lluistring.h
-    llundo.h
-    llviewborder.h
-    llviewmodel.h
-    llview.h
-    llviewquery.h
-    )
-
-set_source_files_properties(${llui_HEADER_FILES}
-                            PROPERTIES HEADER_FILE_ONLY TRUE)
-
-list(APPEND llui_SOURCE_FILES ${llui_HEADER_FILES})
-
-add_library (llui ${llui_SOURCE_FILES})
-# Libraries on which this library depends, needed for Linux builds
-# Sort by high-level to low-level
-target_link_libraries(llui
-    llrender
-    llwindow
-    llimage
-    llvfs       # ugh, just for LLDir
-    llxml
-    llcommon    # must be after llimage, llwindow, llrender
-    llmath
-    )
+# -*- cmake -*-
+
+project(llui)
+
+include(00-Common)
+include(LLAudio)
+include(LLCommon)
+include(LLImage)
+include(LLMath)
+include(LLMessage)
+include(LLRender)
+include(LLWindow)
+include(LLVFS)
+include(LLXML)
+
+include_directories(
+    ${LLAUDIO_INCLUDE_DIRS}
+    ${LLCOMMON_INCLUDE_DIRS}
+    ${LLIMAGE_INCLUDE_DIRS}
+    ${LLMATH_INCLUDE_DIRS}
+    ${LLMESSAGE_INCLUDE_DIRS}
+    ${LLRENDER_INCLUDE_DIRS}
+    ${LLWINDOW_INCLUDE_DIRS}
+    ${LLVFS_INCLUDE_DIRS}
+    ${LLXML_INCLUDE_DIRS}
+    )
+
+set(llui_SOURCE_FILES
+    llalertdialog.cpp
+    llbutton.cpp
+    llcheckboxctrl.cpp
+    llclipboard.cpp
+    llcombobox.cpp
+    llconsole.cpp
+    llcontainerview.cpp
+    llctrlselectioninterface.cpp
+    lldraghandle.cpp
+    lleditmenuhandler.cpp
+    llf32uictrl.cpp
+    llfloater.cpp
+    llfloaterreg.cpp
+    llflyoutbutton.cpp 
+    llfocusmgr.cpp
+    llfunctorregistry.cpp
+    lliconctrl.cpp
+    llinitparam.cpp
+    llkeywords.cpp
+    lllayoutstack.cpp
+    lllineeditor.cpp
+    llmenugl.cpp
+    llmodaldialog.cpp
+    llmultifloater.cpp 
+    llmultislider.cpp
+    llmultisliderctrl.cpp
+    llnotifications.cpp
+    llnotificationslistener.cpp
+    llpanel.cpp
+    llprogressbar.cpp
+    llradiogroup.cpp
+    llresizebar.cpp
+    llresizehandle.cpp
+    llresmgr.cpp
+    llscrollbar.cpp
+    llscrollcontainer.cpp
+    llscrollingpanellist.cpp
+    llscrolllistcell.cpp
+    llscrolllistcolumn.cpp
+    llscrolllistctrl.cpp
+    llscrolllistitem.cpp
+    llsdparam.cpp
+    llsearcheditor.cpp 
+    llslider.cpp
+    llsliderctrl.cpp
+    llspinctrl.cpp
+    llstatbar.cpp
+    llstatgraph.cpp
+    llstatview.cpp
+    llstyle.cpp
+    lltabcontainer.cpp
+    lltextbox.cpp
+    lltexteditor.cpp
+    lltextparser.cpp
+    lltrans.cpp
+    llui.cpp
+    lluicolortable.cpp
+    lluictrl.cpp
+    lluictrlfactory.cpp
+    lluiimage.cpp
+    lluistring.cpp
+    llundo.cpp
+    llviewborder.cpp
+    llviewmodel.cpp
+    llview.cpp
+    llviewquery.cpp
+    )
+    
+set(llui_HEADER_FILES
+    CMakeLists.txt
+
+    llalertdialog.h
+    llbutton.h
+    llcallbackmap.h
+    llcheckboxctrl.h
+    llclipboard.h
+    llcombobox.h
+    llconsole.h
+    llcontainerview.h
+    llctrlselectioninterface.h
+    lldraghandle.h
+    lleditmenuhandler.h
+    llf32uictrl.h
+    llfloater.h
+    llfloaterreg.h
+    llflyoutbutton.h 
+    llfocusmgr.h
+    llfunctorregistry.h
+    llhtmlhelp.h
+    lliconctrl.h
+    llinitparam.h
+    llkeywords.h
+    lllayoutstack.h
+    lllazyvalue.h
+    lllineeditor.h
+    llmenugl.h
+    llmodaldialog.h
+    llmultifloater.h 
+    llmultisliderctrl.h
+    llmultislider.h
+    llnotifications.h
+    llnotificationslistener.h
+    llpanel.h
+    llprogressbar.h
+    llradiogroup.h
+    llregistry.h
+    llresizebar.h
+    llresizehandle.h
+    llresmgr.h
+    llsearcheditor.h 
+    llscrollbar.h
+    llscrollcontainer.h
+    llscrollingpanellist.h
+    llscrolllistcell.h
+    llscrolllistcolumn.h
+    llscrolllistctrl.h
+    llscrolllistitem.h
+    llsdparam.h
+    llsliderctrl.h
+    llslider.h
+    llspinctrl.h
+    llstatbar.h
+    llstatgraph.h
+    llstatview.h
+    llstyle.h
+    lltabcontainer.h
+    lltextbox.h
+    lltexteditor.h
+    lltextparser.h
+    lltrans.h
+    lluicolortable.h
+    lluiconstants.h
+    lluictrlfactory.h
+    lluictrl.h
+    lluifwd.h
+    llui.h
+    lluiimage.h
+    lluistring.h
+    llundo.h
+    llviewborder.h
+    llviewmodel.h
+    llview.h
+    llviewquery.h
+    )
+
+set_source_files_properties(${llui_HEADER_FILES}
+                            PROPERTIES HEADER_FILE_ONLY TRUE)
+
+list(APPEND llui_SOURCE_FILES ${llui_HEADER_FILES})
+
+add_library (llui ${llui_SOURCE_FILES})
+# Libraries on which this library depends, needed for Linux builds
+# Sort by high-level to low-level
+target_link_libraries(llui
+    llrender
+    llwindow
+    llimage
+    llvfs       # ugh, just for LLDir
+    llxml
+    llcommon    # must be after llimage, llwindow, llrender
+    llmath
+    )
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 50fee41029..ec92e57b6e 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -1,1501 +1,1504 @@
-/**
-* @file llnotifications.cpp
-* @brief Non-UI queue manager for keeping a prioritized list of notifications
-*
-* $LicenseInfo:firstyear=2008&license=viewergpl$
-* 
-* Copyright (c) 2008-2009, Linden Research, Inc.
-* 
-* Second Life Viewer Source Code
-* The source code in this file ("Source Code") is provided by Linden Lab
-* to you under the terms of the GNU General Public License, version 2.0
-* ("GPL"), unless you have obtained a separate licensing agreement
-* ("Other License"), formally executed by you and Linden Lab.  Terms of
-* the GPL can be found in doc/GPL-license.txt in this distribution, or
-* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
-* 
-* There are special exceptions to the terms and conditions of the GPL as
-* it is applied to this Source Code. View the full text of the exception
-* in the file doc/FLOSS-exception.txt in this software distribution, or
-* online at
-* http://secondlifegrid.net/programs/open_source/licensing/flossexception
-* 
-* By copying, modifying or distributing this software, you acknowledge
-* that you have read and understood your obligations described above,
-* and agree to abide by those obligations.
-* 
-* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
-* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
-* COMPLETENESS OR PERFORMANCE.
-* $/LicenseInfo$
-*/
-
-#include "linden_common.h"
-
-#include "llnotifications.h"
-
-#include "lluictrl.h"
-#include "lluictrlfactory.h"
-#include "lldir.h"
-#include "llsdserialize.h"
-#include "lltrans.h"
-
-#include <algorithm>
-#include <boost/regex.hpp>
-
-
-const std::string NOTIFICATION_PERSIST_VERSION = "0.93";
-
-// local channel for notification history
-class LLNotificationHistoryChannel : public LLNotificationChannel
-{
-	LOG_CLASS(LLNotificationHistoryChannel);
-public:
-	LLNotificationHistoryChannel(const std::string& filename) : 
-		LLNotificationChannel("History", "Visible", &historyFilter, LLNotificationComparators::orderByUUID()),
-		mFileName(filename)
-	{
-		connectChanged(boost::bind(&LLNotificationHistoryChannel::historyHandler, this, _1));
-		loadPersistentNotifications();
-	}
-
-private:
-	bool historyHandler(const LLSD& payload)
-	{
-		// we ignore "load" messages, but rewrite the persistence file on any other
-		std::string sigtype = payload["sigtype"];
-		if (sigtype != "load")
-		{
-			savePersistentNotifications();
-		}
-		return false;
-	}
-
-	// The history channel gets all notifications except those that have been cancelled
-	static bool historyFilter(LLNotificationPtr pNotification)
-	{
-		return !pNotification->isCancelled();
-	}
-
-	void savePersistentNotifications()
-	{
-		llinfos << "Saving open notifications to " << mFileName << llendl;
-
-		llofstream notify_file(mFileName.c_str());
-		if (!notify_file.is_open()) 
-		{
-			llwarns << "Failed to open " << mFileName << llendl;
-			return;
-		}
-
-		LLSD output;
-		output["version"] = NOTIFICATION_PERSIST_VERSION;
-		LLSD& data = output["data"];
-
-		for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
-		{
-			if (!LLNotifications::instance().templateExists((*it)->getName())) continue;
-
-			// only store notifications flagged as persisting
-			LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate((*it)->getName());
-			if (!templatep->mPersist) continue;
-
-			data.append((*it)->asLLSD());
-		}
-
-		LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
-		formatter->format(output, notify_file, LLSDFormatter::OPTIONS_PRETTY);
-	}
-
-	void loadPersistentNotifications()
-	{
-		llinfos << "Loading open notifications from " << mFileName << llendl;
-
-		llifstream notify_file(mFileName.c_str());
-		if (!notify_file.is_open()) 
-		{
-			llwarns << "Failed to open " << mFileName << llendl;
-			return;
-		}
-
-		LLSD input;
-		LLPointer<LLSDParser> parser = new LLSDXMLParser();
-		if (parser->parse(notify_file, input, LLSDSerialize::SIZE_UNLIMITED) < 0)
-		{
-			llwarns << "Failed to parse open notifications" << llendl;
-			return;
-		}
-
-		if (input.isUndefined()) return;
-		std::string version = input["version"];
-		if (version != NOTIFICATION_PERSIST_VERSION)
-		{
-			llwarns << "Bad open notifications version: " << version << llendl;
-			return;
-		}
-		LLSD& data = input["data"];
-		if (data.isUndefined()) return;
-
-		LLNotifications& instance = LLNotifications::instance();
-		for (LLSD::array_const_iterator notification_it = data.beginArray();
-			notification_it != data.endArray();
-			++notification_it)
-		{
-			instance.add(LLNotificationPtr(new LLNotification(*notification_it)));
-		}
-	}
-
-	//virtual
-	void onDelete(LLNotificationPtr pNotification)
-	{
-		// we want to keep deleted notifications in our log
-		mItems.insert(pNotification);
-		
-		return;
-	}
-	
-private:
-	std::string mFileName;
-};
-
-bool filterIgnoredNotifications(LLNotificationPtr notification)
-{
-	// filter everything if we are to ignore ALL
-	if(LLNotifications::instance().getIgnoreAllNotifications())
-	{
-		return false;
-	}
-
-	LLNotificationFormPtr form = notification->getForm();
-	// Check to see if the user wants to ignore this alert
-	if (form->getIgnoreType() != LLNotificationForm::IGNORE_NO)
-	{
-		return LLUI::sSettingGroups["ignores"]->getBOOL(notification->getName());
-	}
-
-	return true;
-}
-
-bool handleIgnoredNotification(const LLSD& payload)
-{
-	if (payload["sigtype"].asString() == "add")
-	{
-		LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID());
-		if (!pNotif) return false;
-
-		LLNotificationFormPtr form = pNotif->getForm();
-		LLSD response;
-		switch(form->getIgnoreType())
-		{
-		case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE:
-			response = pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON);
-			break;
-		case LLNotificationForm::IGNORE_WITH_LAST_RESPONSE:
-			response = LLUI::sSettingGroups["ignores"]->getLLSD("Default" + pNotif->getName());
-			break;
-		case LLNotificationForm::IGNORE_SHOW_AGAIN:
-			break;
-		default:
-			return false;
-		}
-		pNotif->setIgnored(true);
-		pNotif->respond(response);
-		return true; 	// don't process this item any further
-	}
-	return false;
-}
-
-namespace LLNotificationFilters
-{
-	// a sample filter
-	bool includeEverything(LLNotificationPtr p)
-	{
-		return true;
-	}
-};
-
-LLNotificationForm::LLNotificationForm()
-:	mFormData(LLSD::emptyArray()),
-	mIgnore(IGNORE_NO)
-{
-}
-
-
-LLNotificationForm::LLNotificationForm(const std::string& name, const LLXMLNodePtr xml_node) 
-:	mFormData(LLSD::emptyArray()),
-	mIgnore(IGNORE_NO)
-{
-	if (!xml_node->hasName("form"))
-	{
-		llwarns << "Bad xml node for form: " << xml_node->getName() << llendl;
-	}
-	LLXMLNodePtr child = xml_node->getFirstChild();
-	while(child)
-	{
-		child = LLNotifications::instance().checkForXMLTemplate(child);
-
-		LLSD item_entry;
-		std::string element_name = child->getName()->mString;
-
-		if (element_name == "ignore" )
-		{
-			bool save_option = false;
-			child->getAttribute_bool("save_option", save_option);
-			if (!save_option)
-			{
-				mIgnore = IGNORE_WITH_DEFAULT_RESPONSE;
-			}
-			else
-			{
-				// remember last option chosen by user and automatically respond with that in the future
-				mIgnore = IGNORE_WITH_LAST_RESPONSE;
-				LLUI::sSettingGroups["ignores"]->declareLLSD(std::string("Default") + name, "", std::string("Default response for notification " + name));
-			}
-			child->getAttributeString("text", mIgnoreMsg);
-			BOOL show_notification = TRUE;
-			LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Ignore notification with this name", TRUE);
-		}
-		else
-		{
-			// flatten xml form entry into single LLSD map with type==name
-			item_entry["type"] = element_name;
-			const LLXMLAttribList::iterator attrib_end = child->mAttributes.end();
-			for(LLXMLAttribList::iterator attrib_it = child->mAttributes.begin();
-				attrib_it != attrib_end;
-				++attrib_it)
-			{
-				item_entry[std::string(attrib_it->second->getName()->mString)] = attrib_it->second->getValue();
-			}
-			item_entry["value"] = child->getTextContents();
-			mFormData.append(item_entry);
-		}
-
-		child = child->getNextSibling();
-	}
-}
-
-LLNotificationForm::LLNotificationForm(const LLSD& sd)
-{
-	if (sd.isArray())
-	{
-		mFormData = sd;
-	}
-	else
-	{
-		llwarns << "Invalid form data " << sd << llendl;
-		mFormData = LLSD::emptyArray();
-	}
-}
-
-LLSD LLNotificationForm::asLLSD() const
-{ 
-	return mFormData; 
-}
-
-LLSD LLNotificationForm::getElement(const std::string& element_name)
-{
-	for (LLSD::array_const_iterator it = mFormData.beginArray();
-		it != mFormData.endArray();
-		++it)
-	{
-		if ((*it)["name"].asString() == element_name) return (*it);
-	}
-	return LLSD();
-}
-
-
-bool LLNotificationForm::hasElement(const std::string& element_name)
-{
-	for (LLSD::array_const_iterator it = mFormData.beginArray();
-		it != mFormData.endArray();
-		++it)
-	{
-		if ((*it)["name"].asString() == element_name) return true;
-	}
-	return false;
-}
-
-void LLNotificationForm::addElement(const std::string& type, const std::string& name, const LLSD& value)
-{
-	LLSD element;
-	element["type"] = type;
-	element["name"] = name;
-	element["text"] = name;
-	element["value"] = value;
-	element["index"] = mFormData.size();
-	mFormData.append(element);
-}
-
-void LLNotificationForm::append(const LLSD& sub_form)
-{
-	if (sub_form.isArray())
-	{
-		for (LLSD::array_const_iterator it = sub_form.beginArray();
-			it != sub_form.endArray();
-			++it)
-		{
-			mFormData.append(*it);
-		}
-	}
-}
-
-void LLNotificationForm::formatElements(const LLSD& substitutions)
-{
-	for (LLSD::array_iterator it = mFormData.beginArray();
-		it != mFormData.endArray();
-		++it)
-	{
-		// format "text" component of each form element
-		if ((*it).has("text"))
-		{
-			std::string text = (*it)["text"].asString();
-			LLStringUtil::format(text, substitutions);
-			(*it)["text"] = text;
-		}
-		if ((*it)["type"].asString() == "text" && (*it).has("value"))
-		{
-			std::string value = (*it)["value"].asString();
-			LLStringUtil::format(value, substitutions);
-			(*it)["value"] = value;
-		}
-	}
-}
-
-std::string LLNotificationForm::getDefaultOption()
-{
-	for (LLSD::array_const_iterator it = mFormData.beginArray();
-		it != mFormData.endArray();
-		++it)
-	{
-		if ((*it)["default"]) return (*it)["name"].asString();
-	}
-	return "";
-}
-
-LLNotificationTemplate::LLNotificationTemplate() :
-	mExpireSeconds(0),
-	mExpireOption(-1),
-	mURLOption(-1),
-    mURLOpenExternally(-1),
-	mUnique(false),
-	mPriority(NOTIFICATION_PRIORITY_NORMAL)
-{
-	mForm = LLNotificationFormPtr(new LLNotificationForm()); 
-}
-
-LLNotification::LLNotification(const LLNotification::Params& p) : 
-	mTimestamp(p.timestamp), 
-	mSubstitutions(p.substitutions),
-	mPayload(p.payload),
-	mExpiresAt(0),
-	mTemporaryResponder(false),
-	mRespondedTo(false),
-	mPriority(p.priority),
-	mCancelled(false),
-	mIgnored(false)
-{
-	if (p.functor.name.isChosen())
-	{
-		mResponseFunctorName = p.functor.name;
-	}
-	else if (p.functor.function.isChosen())
-	{
-		mResponseFunctorName = LLUUID::generateNewID().asString();
-		LLNotificationFunctorRegistry::instance().registerFunctor(mResponseFunctorName, p.functor.function());
-
-		mTemporaryResponder = true;
-	}
-
-	mId.generate();
-	init(p.name, p.form_elements);
-}
-
-
-LLNotification::LLNotification(const LLSD& sd) :
-	mTemporaryResponder(false),
-	mRespondedTo(false),
-	mCancelled(false),
-	mIgnored(false)
-{ 
-	mId.generate();
-	mSubstitutions = sd["substitutions"];
-	mPayload = sd["payload"]; 
-	mTimestamp = sd["time"]; 
-	mExpiresAt = sd["expiry"];
-	mPriority = (ENotificationPriority)sd["priority"].asInteger();
-	mResponseFunctorName = sd["responseFunctor"].asString();
-	std::string templatename = sd["name"].asString();
-	init(templatename, LLSD());
-	// replace form with serialized version
-	mForm = LLNotificationFormPtr(new LLNotificationForm(sd["form"]));
-}
-
-
-LLSD LLNotification::asLLSD()
-{
-	LLSD output;
-	output["name"] = mTemplatep->mName;
-	output["form"] = getForm()->asLLSD();
-	output["substitutions"] = mSubstitutions;
-	output["payload"] = mPayload;
-	output["time"] = mTimestamp;
-	output["expiry"] = mExpiresAt;
-	output["priority"] = (S32)mPriority;
-	output["responseFunctor"] = mResponseFunctorName;
-	return output;
-}
-
-void LLNotification::update()
-{
-	LLNotifications::instance().update(shared_from_this());
-}
-
-void LLNotification::updateFrom(LLNotificationPtr other)
-{
-	// can only update from the same notification type
-	if (mTemplatep != other->mTemplatep) return;
-
-	// NOTE: do NOT change the ID, since it is the key to
-	// this given instance, just update all the metadata
-	//mId = other->mId;
-
-	mPayload = other->mPayload;
-	mSubstitutions = other->mSubstitutions;
-	mTimestamp = other->mTimestamp;
-	mExpiresAt = other->mExpiresAt;
-	mCancelled = other->mCancelled;
-	mIgnored = other->mIgnored;
-	mPriority = other->mPriority;
-	mForm = other->mForm;
-	mResponseFunctorName = other->mResponseFunctorName;
-	mRespondedTo = other->mRespondedTo;
-	mTemporaryResponder = other->mTemporaryResponder;
-
-	update();
-}
-
-const LLNotificationFormPtr LLNotification::getForm()
-{
-	return mForm;
-}
-
-void LLNotification::cancel()
-{
-	mCancelled = true;
-}
-
-LLSD LLNotification::getResponseTemplate(EResponseTemplateType type)
-{
-	LLSD response = LLSD::emptyMap();
-	for (S32 element_idx = 0;
-		element_idx < mForm->getNumElements();
-		++element_idx)
-	{
-		LLSD element = mForm->getElement(element_idx);
-		if (element.has("name"))
-		{
-			response[element["name"].asString()] = element["value"];
-		}
-
-		if ((type == WITH_DEFAULT_BUTTON) 
-			&& element["default"].asBoolean())
-		{
-			response[element["name"].asString()] = true;
-		}
-	}
-	return response;
-}
-
-//static
-S32 LLNotification::getSelectedOption(const LLSD& notification, const LLSD& response)
-{
-	LLNotificationForm form(notification["form"]);
-
-	for (S32 element_idx = 0;
-		element_idx < form.getNumElements();
-		++element_idx)
-	{
-		LLSD element = form.getElement(element_idx);
-
-		// only look at buttons
-		if (element["type"].asString() == "button" 
-			&& response[element["name"].asString()].asBoolean())
-		{
-			return element["index"].asInteger();
-		}
-	}
-
-	return -1;
-}
-
-//static
-std::string LLNotification::getSelectedOptionName(const LLSD& response)
-{
-	for (LLSD::map_const_iterator response_it = response.beginMap();
-		response_it != response.endMap();
-		++response_it)
-	{
-		if (response_it->second.isBoolean() && response_it->second.asBoolean())
-		{
-			return response_it->first;
-		}
-	}
-	return "";
-}
-
-
-void LLNotification::respond(const LLSD& response)
-{
-	mRespondedTo = true;
-	// look up the functor
-	LLNotificationFunctorRegistry::ResponseFunctor functor = 
-		LLNotificationFunctorRegistry::instance().getFunctor(mResponseFunctorName);
-	// and then call it
-	functor(asLLSD(), response);
-	
-	if (mTemporaryResponder)
-	{
-		LLNotificationFunctorRegistry::instance().unregisterFunctor(mResponseFunctorName);
-		mResponseFunctorName = "";
-		mTemporaryResponder = false;
-	}
-
-	if (mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
-	{
-		BOOL show_notification = mIgnored ? FALSE : TRUE;
-		LLUI::sSettingGroups["ignores"]->setBOOL(getName(), show_notification);
-		if (mIgnored && mForm->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE)
-		{
-			LLUI::sSettingGroups["ignores"]->setLLSD("Default" + getName(), response);
-		}
-	}
-
-	update();
-}
-
-void LLNotification::setIgnored(bool ignore)
-{
-	mIgnored = ignore;
-}
-
-void LLNotification::setResponseFunctor(std::string const &responseFunctorName)
-{
-	if (mTemporaryResponder)
-		// get rid of the old one
-		LLNotificationFunctorRegistry::instance().unregisterFunctor(mResponseFunctorName);
-	mResponseFunctorName = responseFunctorName;
-	mTemporaryResponder = false;
-}
-
-bool LLNotification::payloadContainsAll(const std::vector<std::string>& required_fields) const
-{
-	for(std::vector<std::string>::const_iterator required_fields_it = required_fields.begin(); 
-		required_fields_it != required_fields.end();
-		required_fields_it++)
-	{
-		std::string required_field_name = *required_fields_it;
-		if( ! getPayload().has(required_field_name))
-		{
-			return false; // a required field was not found
-		}
-	}
-	return true; // all required fields were found
-}
-
-bool LLNotification::isEquivalentTo(LLNotificationPtr that) const
-{
-	if (this->mTemplatep->mName != that->mTemplatep->mName) 
-	{
-		return false; // must have the same template name or forget it
-	}
-	if (this->mTemplatep->mUnique)
-	{
-		// highlander bit sez there can only be one of these
-		return
-			this->payloadContainsAll(that->mTemplatep->mUniqueContext) &&
-			that->payloadContainsAll(this->mTemplatep->mUniqueContext);
-	}
-	return false; 
-}
-
-void LLNotification::init(const std::string& template_name, const LLSD& form_elements)
-{
-	mTemplatep = LLNotifications::instance().getTemplate(template_name);
-	if (!mTemplatep) return;
-
-	// add default substitutions
-	const LLStringUtil::format_map_t& default_args = LLTrans::getDefaultArgs();
-	for (LLStringUtil::format_map_t::const_iterator iter = default_args.begin();
-		 iter != default_args.end(); ++iter)
-	{
-		mSubstitutions[iter->first] = iter->second;
-	}
-	mSubstitutions["_URL"] = getURL();
-	mSubstitutions["_NAME"] = template_name;
-	// TODO: something like this so that a missing alert is sensible:
-	//mSubstitutions["_ARGS"] = get_all_arguments_as_text(mSubstitutions);
-
-	mForm = LLNotificationFormPtr(new LLNotificationForm(*mTemplatep->mForm));
-	mForm->append(form_elements);
-
-	// apply substitution to form labels
-	mForm->formatElements(mSubstitutions);
-
-	LLDate rightnow = LLDate::now();
-	if (mTemplatep->mExpireSeconds)
-	{
-		mExpiresAt = LLDate(rightnow.secondsSinceEpoch() + mTemplatep->mExpireSeconds);
-	}
-
-	if (mPriority == NOTIFICATION_PRIORITY_UNSPECIFIED)
-	{
-		mPriority = mTemplatep->mPriority;
-	}
-}
-
-std::string LLNotification::summarize() const
-{
-	std::string s = "Notification(";
-	s += getName();
-	s += ") : ";
-	s += mTemplatep ? mTemplatep->mMessage : "";
-	// should also include timestamp and expiration time (but probably not payload)
-	return s;
-}
-
-std::string LLNotification::getMessage() const
-{
-	// all our callers cache this result, so it gives us more flexibility
-	// to do the substitution at call time rather than attempting to 
-	// cache it in the notification
-	if (!mTemplatep)
-		return std::string();
-
-	std::string message = mTemplatep->mMessage;
-	LLStringUtil::format(message, mSubstitutions);
-	return message;
-}
-
-std::string LLNotification::getLabel() const
-{
-	std::string label = mTemplatep->mLabel;
-	LLStringUtil::format(label, mSubstitutions);
-	return (mTemplatep ? label : "");
-}
-
-std::string LLNotification::getURL() const
-{
-	if (!mTemplatep)
-		return std::string();
-	std::string url = mTemplatep->mURL;
-	LLStringUtil::format(url, mSubstitutions);
-	return (mTemplatep ? url : "");
-}
-
-// =========================================================
-// LLNotificationChannel implementation
-// ---
-LLBoundListener LLNotificationChannelBase::connectChangedImpl(const LLEventListener& slot)
-{
-	// when someone wants to connect to a channel, we first throw them
-	// all of the notifications that are already in the channel
-	// we use a special signal called "load" in case the channel wants to care
-	// only about new notifications
-	for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
-	{
-		slot(LLSD().insert("sigtype", "load").insert("id", (*it)->id()));
-	}
-	// and then connect the signal so that all future notifications will also be
-	// forwarded.
-	return mChanged.connect(slot);
-}
-
-LLBoundListener LLNotificationChannelBase::connectPassedFilterImpl(const LLEventListener& slot)
-{
-	// these two filters only fire for notifications added after the current one, because
-	// they don't participate in the hierarchy.
-	return mPassedFilter.connect(slot);
-}
-
-LLBoundListener LLNotificationChannelBase::connectFailedFilterImpl(const LLEventListener& slot)
-{
-	return mFailedFilter.connect(slot);
-}
-
-// external call, conforms to our standard signature
-bool LLNotificationChannelBase::updateItem(const LLSD& payload)
-{	
-	// first check to see if it's in the master list
-	LLNotificationPtr pNotification	 = LLNotifications::instance().find(payload["id"]);
-	if (!pNotification)
-		return false;	// not found
-	
-	return updateItem(payload, pNotification);
-}
-
-
-//FIX QUIT NOT WORKING
-
-
-// internal call, for use in avoiding lookup
-bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPtr pNotification)
-{	
-	std::string cmd = payload["sigtype"];
-	LLNotificationSet::iterator foundItem = mItems.find(pNotification);
-	bool wasFound = (foundItem != mItems.end());
-	bool passesFilter = mFilter(pNotification);
-	
-	// first, we offer the result of the filter test to the simple
-	// signals for pass/fail. One of these is guaranteed to be called.
-	// If either signal returns true, the change processing is NOT performed
-	// (so don't return true unless you know what you're doing!)
-	bool abortProcessing = false;
-	if (passesFilter)
-	{
-		abortProcessing = mPassedFilter(payload);
-	}
-	else
-	{
-		abortProcessing = mFailedFilter(payload);
-	}
-	
-	if (abortProcessing)
-	{
-		return true;
-	}
-	
-	if (cmd == "load")
-	{
-		// should be no reason we'd ever get a load if we already have it
-		// if passes filter send a load message, else do nothing
-		assert(!wasFound);
-		if (passesFilter)
-		{
-			// not in our list, add it and say so
-			mItems.insert(pNotification);
-			abortProcessing = mChanged(payload);
-			onLoad(pNotification);
-		}
-	}
-	else if (cmd == "change")
-	{
-		// if it passes filter now and was found, we just send a change message
-		// if it passes filter now and wasn't found, we have to add it
-		// if it doesn't pass filter and wasn't found, we do nothing
-		// if it doesn't pass filter and was found, we need to delete it
-		if (passesFilter)
-		{
-			if (wasFound)
-			{
-				// it already existed, so this is a change
-				// since it changed in place, all we have to do is resend the signal
-				abortProcessing = mChanged(payload);
-				onChange(pNotification);
-			}
-			else
-			{
-				// not in our list, add it and say so
-				mItems.insert(pNotification);
-				// our payload is const, so make a copy before changing it
-				LLSD newpayload = payload;
-				newpayload["sigtype"] = "add";
-				abortProcessing = mChanged(newpayload);
-				onChange(pNotification);
-			}
-		}
-		else
-		{
-			if (wasFound)
-			{
-				// it already existed, so this is a delete
-				mItems.erase(pNotification);
-				// our payload is const, so make a copy before changing it
-				LLSD newpayload = payload;
-				newpayload["sigtype"] = "delete";
-				abortProcessing = mChanged(newpayload);
-				onChange(pNotification);
-			}
-			// didn't pass, not on our list, do nothing
-		}
-	}
-	else if (cmd == "add")
-	{
-		// should be no reason we'd ever get an add if we already have it
-		// if passes filter send an add message, else do nothing
-		assert(!wasFound);
-		if (passesFilter)
-		{
-			// not in our list, add it and say so
-			mItems.insert(pNotification);
-			abortProcessing = mChanged(payload);
-			onAdd(pNotification);
-		}
-	}
-	else if (cmd == "delete")
-	{
-		// if we have it in our list, pass on the delete, then delete it, else do nothing
-		if (wasFound)
-		{
-			abortProcessing = mChanged(payload);
-			mItems.erase(pNotification);
-			onDelete(pNotification);
-		}
-	}
-	return abortProcessing;
-}
-
-/* static */
-LLNotificationChannelPtr LLNotificationChannel::buildChannel(const std::string& name, 
-															 const std::string& parent,
-															 LLNotificationFilter filter, 
-															 LLNotificationComparator comparator)
-{
-	// note: this is not a leak; notifications are self-registering.
-	// This factory helps to prevent excess deletions by making sure all smart
-	// pointers to notification channels come from the same source
-	new LLNotificationChannel(name, parent, filter, comparator);
-	return LLNotifications::instance().getChannel(name);
-}
-
-
-LLNotificationChannel::LLNotificationChannel(const std::string& name, 
-											 const std::string& parent,
-											 LLNotificationFilter filter, 
-											 LLNotificationComparator comparator) : 
-LLNotificationChannelBase(filter, comparator),
-mName(name),
-mParent(parent)
-{
-	// store myself in the channel map
-	LLNotifications::instance().addChannel(LLNotificationChannelPtr(this));
-	// bind to notification broadcast
-	if (parent.empty())
-	{
-		LLNotifications::instance().connectChanged(
-			boost::bind(&LLNotificationChannelBase::updateItem, this, _1));
-	}
-	else
-	{
-		LLNotificationChannelPtr p = LLNotifications::instance().getChannel(parent);
-		p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1));
-	}
-}
-
-
-void LLNotificationChannel::setComparator(LLNotificationComparator comparator) 
-{ 
-	mComparator = comparator; 
-	LLNotificationSet s2(mComparator);
-	s2.insert(mItems.begin(), mItems.end());
-	mItems.swap(s2);
-	
-	// notify clients that we've been resorted
-	mChanged(LLSD().insert("sigtype", "sort")); 
-}
-
-bool LLNotificationChannel::isEmpty() const
-{
-	return mItems.empty();
-}
-
-LLNotificationChannel::Iterator LLNotificationChannel::begin()
-{
-	return mItems.begin();
-}
-
-LLNotificationChannel::Iterator LLNotificationChannel::end()
-{
-	return mItems.end();
-}
-
-std::string LLNotificationChannel::summarize()
-{
-	std::string s("Channel '");
-	s += mName;
-	s += "'\n  ";
-	for (LLNotificationChannel::Iterator it = begin(); it != end(); ++it)
-	{
-		s += (*it)->summarize();
-		s += "\n  ";
-	}
-	return s;
-}
-
-
-// ---
-// END OF LLNotificationChannel implementation
-// =========================================================
-
-
-// =========================================================
-// LLNotifications implementation
-// ---
-LLNotifications::LLNotifications() : LLNotificationChannelBase(LLNotificationFilters::includeEverything,
-															   LLNotificationComparators::orderByUUID()),
-									mIgnoreAllNotifications(false)
-{
-	LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2));
-}
-
-
-// The expiration channel gets all notifications that are cancelled
-bool LLNotifications::expirationFilter(LLNotificationPtr pNotification)
-{
-	return pNotification->isCancelled() || pNotification->isRespondedTo();
-}
-
-bool LLNotifications::expirationHandler(const LLSD& payload)
-{
-	if (payload["sigtype"].asString() != "delete")
-	{
-		// anything added to this channel actually should be deleted from the master
-		cancel(find(payload["id"]));
-		return true;	// don't process this item any further
-	}
-	return false;
-}
-
-bool LLNotifications::uniqueFilter(LLNotificationPtr pNotif)
-{
-	if (!pNotif->hasUniquenessConstraints())
-	{
-		return true;
-	}
-
-	// checks against existing unique notifications
-	for (LLNotificationMap::iterator existing_it = mUniqueNotifications.find(pNotif->getName());
-		existing_it != mUniqueNotifications.end();
-		++existing_it)
-	{
-		LLNotificationPtr existing_notification = existing_it->second;
-		if (pNotif != existing_notification 
-			&& pNotif->isEquivalentTo(existing_notification))
-		{
-			return false;
-		}
-	}
-
-	return true;
-}
-
-bool LLNotifications::uniqueHandler(const LLSD& payload)
-{
-	LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID());
-	if (pNotif && pNotif->hasUniquenessConstraints()) 
-	{
-		if (payload["sigtype"].asString() == "add")
-		{
-			// not a duplicate according to uniqueness criteria, so we keep it
-			// and store it for future uniqueness checks
-			mUniqueNotifications.insert(std::make_pair(pNotif->getName(), pNotif));
-		}
-		else if (payload["sigtype"].asString() == "delete")
-		{
-			mUniqueNotifications.erase(pNotif->getName());
-		}
-	}
-
-	return false;
-}
-
-bool LLNotifications::failedUniquenessTest(const LLSD& payload)
-{
-	LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID());
-	
-	if (!pNotif || !pNotif->hasUniquenessConstraints())
-	{
-		return false;
-	}
-
-	// checks against existing unique notifications
-	for (LLNotificationMap::iterator existing_it = mUniqueNotifications.find(pNotif->getName());
-		existing_it != mUniqueNotifications.end();
-		++existing_it)
-	{
-		LLNotificationPtr existing_notification = existing_it->second;
-		if (pNotif != existing_notification 
-			&& pNotif->isEquivalentTo(existing_notification))
-		{
-			// copy notification instance data over to oldest instance
-			// of this unique notification and update it
-			existing_notification->updateFrom(pNotif);
-			// then delete the new one
-			pNotif->cancel();
-		}
-	}
-
-	return false;
-}
-
-
-void LLNotifications::addChannel(LLNotificationChannelPtr pChan)
-{
-	mChannels[pChan->getName()] = pChan;
-}
-
-LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelName)
-{
-	ChannelMap::iterator p = mChannels.find(channelName);
-	if(p == mChannels.end())
-	{
-		llerrs << "Did not find channel named " << channelName << llendl;
-	}
-	return p->second;
-}
-
-
-// this function is called once at construction time, after the object is constructed.
-void LLNotifications::initSingleton()
-{
-	loadTemplates();
-	createDefaultChannels();
-}
-
-void LLNotifications::createDefaultChannels()
-{
-	// now construct the various channels AFTER loading the notifications,
-	// because the history channel is going to rewrite the stored notifications file
-	LLNotificationChannel::buildChannel("Expiration", "",
-		boost::bind(&LLNotifications::expirationFilter, this, _1));
-	LLNotificationChannel::buildChannel("Unexpired", "",
-		!boost::bind(&LLNotifications::expirationFilter, this, _1)); // use negated bind
-	LLNotificationChannel::buildChannel("Unique", "Unexpired",
-		boost::bind(&LLNotifications::uniqueFilter, this, _1));
-	LLNotificationChannel::buildChannel("Ignore", "Unique",
-		filterIgnoredNotifications);
-	LLNotificationChannel::buildChannel("Visible", "Ignore",
-		&LLNotificationFilters::includeEverything);
-
-	// create special history channel
-	//std::string notifications_log_file = gDirUtilp->getExpandedFilename ( LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml" );
-	// use ^^^ when done debugging notifications serialization
-	std::string notifications_log_file = gDirUtilp->getExpandedFilename ( LL_PATH_USER_SETTINGS, "open_notifications.xml" );
-	// this isn't a leak, don't worry about the empty "new"
-	new LLNotificationHistoryChannel(notifications_log_file);
-
-	// connect action methods to these channels
-	LLNotifications::instance().getChannel("Expiration")->
-        connectChanged(boost::bind(&LLNotifications::expirationHandler, this, _1));
-	LLNotifications::instance().getChannel("Unique")->
-        connectChanged(boost::bind(&LLNotifications::uniqueHandler, this, _1));
-	LLNotifications::instance().getChannel("Unique")->
-        connectFailedFilter(boost::bind(&LLNotifications::failedUniquenessTest, this, _1));
-	LLNotifications::instance().getChannel("Ignore")->
-		connectFailedFilter(&handleIgnoredNotification);
-}
-
-bool LLNotifications::addTemplate(const std::string &name, 
-								  LLNotificationTemplatePtr theTemplate)
-{
-	if (mTemplates.count(name))
-	{
-		llwarns << "LLNotifications -- attempted to add template '" << name << "' twice." << llendl;
-		return false;
-	}
-	mTemplates[name] = theTemplate;
-	return true;
-}
-
-LLNotificationTemplatePtr LLNotifications::getTemplate(const std::string& name)
-{
-	if (mTemplates.count(name))
-	{
-		return mTemplates[name];
-	}
-	else
-	{
-		return mTemplates["MissingAlert"];
-	}
-}
-
-bool LLNotifications::templateExists(const std::string& name)
-{
-	return (mTemplates.count(name) != 0);
-}
-
-void LLNotifications::clearTemplates()
-{
-	mTemplates.clear();
-}
-
-void LLNotifications::forceResponse(const LLNotification::Params& params, S32 option)
-{
-	LLNotificationPtr temp_notify(new LLNotification(params));
-	LLSD response = temp_notify->getResponseTemplate();
-	LLSD selected_item = temp_notify->getForm()->getElement(option);
-	
-	if (selected_item.isUndefined())
-	{
-		llwarns << "Invalid option" << option << " for notification " << (std::string)params.name << llendl;
-		return;
-	}
-	response[selected_item["name"].asString()] = true;
-
-	temp_notify->respond(response);
-}
-
-LLNotifications::TemplateNames LLNotifications::getTemplateNames() const
-{
-	TemplateNames names;
-	for (TemplateMap::const_iterator it = mTemplates.begin(); it != mTemplates.end(); ++it)
-	{
-		names.push_back(it->first);
-	}
-	return names;
-}
-
-typedef std::map<std::string, std::string> StringMap;
-void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements)
-{
-	//llwarns << "replaceSubstitutionStrings" << llendl;
-	// walk the list of attributes looking for replacements
-	for (LLXMLAttribList::iterator it=node->mAttributes.begin();
-		 it != node->mAttributes.end(); ++it)
-	{
-		std::string value = it->second->getValue();
-		if (value[0] == '$')
-		{
-			value.erase(0, 1);	// trim off the $
-			std::string replacement;
-			StringMap::const_iterator found = replacements.find(value);
-			if (found != replacements.end())
-			{
-				replacement = found->second;
-				//llwarns << "replaceSubstituionStrings: value: " << value << " repl: " << replacement << llendl;
-
-				it->second->setValue(replacement);
-			}
-			else
-			{
-				llwarns << "replaceSubstituionStrings FAILURE: value: " << value << " repl: " << replacement << llendl;
-			}
-		}
-	}
-	
-	// now walk the list of children and call this recursively.
-	for (LLXMLNodePtr child = node->getFirstChild(); 
-		 child.notNull(); child = child->getNextSibling())
-	{
-		replaceSubstitutionStrings(child, replacements);
-	}
-}
-
-// private to this file
-// returns true if the template request was invalid and there's nothing else we
-// can do with this node, false if you should keep processing (it may have
-// replaced the contents of the node referred to)
-LLXMLNodePtr LLNotifications::checkForXMLTemplate(LLXMLNodePtr item)
-{
-	if (item->hasName("usetemplate"))
-	{
-		std::string replacementName;
-		if (item->getAttributeString("name", replacementName))
-		{
-			StringMap replacements;
-			for (LLXMLAttribList::const_iterator it=item->mAttributes.begin(); 
-				 it != item->mAttributes.end(); ++it)
-			{
-				replacements[it->second->getName()->mString] = it->second->getValue();
-			}
-			if (mXmlTemplates.count(replacementName))
-			{
-				item=LLXMLNode::replaceNode(item, mXmlTemplates[replacementName]);
-				
-				// walk the nodes looking for $(substitution) here and replace
-				replaceSubstitutionStrings(item, replacements);
-			}
-			else
-			{
-				llwarns << "XML template lookup failure on '" << replacementName << "' " << llendl;
-			}
-		}
-	}
-	return item;
-}
-
-bool LLNotifications::loadTemplates()
-{
-	const std::string xml_filename = "notifications.xml";
-	LLXMLNodePtr root;
-	
-	BOOL success  = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
-	
-	if (!success || root.isNull() || !root->hasName( "notifications" ))
-	{
-		llerrs << "Problem reading UI Notifications file: " << xml_filename << llendl;
-		return false;
-	}
-	
-	clearTemplates();
-	
-	for (LLXMLNodePtr item = root->getFirstChild();
-		 item.notNull(); item = item->getNextSibling())
-	{
-		// we do this FIRST so that item can be changed if we 
-		// encounter a usetemplate -- we just replace the
-		// current xml node and keep processing
-		item = checkForXMLTemplate(item);
-		
-		if (item->hasName("global"))
-		{
-			std::string global_name;
-			if (item->getAttributeString("name", global_name))
-			{
-				mGlobalStrings[global_name] = item->getTextContents();
-			}
-			continue;
-		}
-		
-		if (item->hasName("template"))
-		{
-			// store an xml template; templates must have a single node (can contain
-			// other nodes)
-			std::string name;
-			item->getAttributeString("name", name);
-			LLXMLNodePtr ptr = item->getFirstChild();
-			mXmlTemplates[name] = ptr;
-			continue;
-		}
-		
-		if (!item->hasName("notification"))
-		{
-            llwarns << "Unexpected entity " << item->getName()->mString << 
-                       " found in " << xml_filename << llendl;
-			continue;
-		}
-		
-		// now we know we have a notification entry, so let's build it
-		LLNotificationTemplatePtr pTemplate(new LLNotificationTemplate());
-
-		if (!item->getAttributeString("name", pTemplate->mName))
-		{
-			llwarns << "Unable to parse notification with no name" << llendl;
-			continue;
-		}
-		
-		//llinfos << "Parsing " << pTemplate->mName << llendl;
-		
-		pTemplate->mMessage = item->getTextContents();
-		pTemplate->mDefaultFunctor = pTemplate->mName;
-		item->getAttributeString("type", pTemplate->mType);
-		item->getAttributeString("icon", pTemplate->mIcon);
-		item->getAttributeString("label", pTemplate->mLabel);
-		item->getAttributeU32("duration", pTemplate->mExpireSeconds);
-		item->getAttributeU32("expireOption", pTemplate->mExpireOption);
-
-		std::string priority;
-		item->getAttributeString("priority", priority);
-		pTemplate->mPriority = NOTIFICATION_PRIORITY_NORMAL;
-		if (!priority.empty())
-		{
-			if (priority == "low")      pTemplate->mPriority = NOTIFICATION_PRIORITY_LOW;
-			if (priority == "normal")   pTemplate->mPriority = NOTIFICATION_PRIORITY_NORMAL;
-			if (priority == "high")     pTemplate->mPriority = NOTIFICATION_PRIORITY_HIGH;
-			if (priority == "critical") pTemplate->mPriority = NOTIFICATION_PRIORITY_CRITICAL;
-		}
-		
-		item->getAttributeString("functor", pTemplate->mDefaultFunctor);
-
-		BOOL persist = false;
-		item->getAttributeBOOL("persist", persist);
-		pTemplate->mPersist = persist;
-		
-		std::string sound;
-		item->getAttributeString("sound", sound);
-		if (!sound.empty())
-		{
-			// test for bad sound effect name / missing effect
-			if (LLUI::sSettingGroups["config"]->controlExists(sound))
-			{
-				pTemplate->mSoundEffect = 
-					LLUUID(LLUI::sSettingGroups["config"]->getString(sound));
-			}
-			else
-			{
-				llwarns << "Unknown sound effect control name " << sound
-					<< llendl;
-			}
-		}
-
-		for (LLXMLNodePtr child = item->getFirstChild();
-			 !child.isNull(); child = child->getNextSibling())
-		{
-			child = checkForXMLTemplate(child);
-			
-			// <url>
-			if (child->hasName("url"))
-			{
-				pTemplate->mURL = child->getTextContents();
-				child->getAttributeU32("option", pTemplate->mURLOption);
-				child->getAttributeU32("openexternally", pTemplate->mURLOpenExternally);
-			}
-			
-            if (child->hasName("unique"))
-            {
-                pTemplate->mUnique = true;
-                for (LLXMLNodePtr formitem = child->getFirstChild();
-                     !formitem.isNull(); formitem = formitem->getNextSibling())
-                {
-                    if (formitem->hasName("context"))
-                    {
-                        std::string key;
-                        formitem->getAttributeString("key", key);
-                        pTemplate->mUniqueContext.push_back(key);
-                        //llwarns << "adding " << key << " to unique context" << llendl;
-                    }
-                    else
-                    {
-                        llwarns << "'unique' has unrecognized subelement " 
-                        << formitem->getName()->mString << llendl;
-                    }
-                }
-            }
-            
-			// <form>
-			if (child->hasName("form"))
-			{
-                pTemplate->mForm = LLNotificationFormPtr(new LLNotificationForm(pTemplate->mName, child));
-			}
-		}
-		addTemplate(pTemplate->mName, pTemplate);
-	}
-	
-	//std::ostringstream ostream;
-	//root->writeToOstream(ostream, "\n  ");
-	//llwarns << ostream.str() << llendl;
-	
-	return true;
-}
-
-// Add a simple notification (from XUI)
-void LLNotifications::addFromCallback(const LLSD& name)
-{
-	add(LLNotification::Params().name(name.asString()));	
-}
-
-// we provide a couple of simple add notification functions so that it's reasonable to create notifications in one line
-LLNotificationPtr LLNotifications::add(const std::string& name, 
-										const LLSD& substitutions, 
-										const LLSD& payload)
-{
-	LLNotification::Params::Functor functor_p;
-	functor_p.name = name;
-	return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));	
-}
-
-LLNotificationPtr LLNotifications::add(const std::string& name, 
-										const LLSD& substitutions, 
-										const LLSD& payload, 
-										const std::string& functor_name)
-{
-	LLNotification::Params::Functor functor_p;
-	functor_p.name = functor_name;
-	return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));	
-}
-
-LLNotificationPtr LLNotifications::add(const std::string& name, 
-										const LLSD& substitutions, 
-										const LLSD& payload, 
-										LLNotificationFunctorRegistry::ResponseFunctor functor)
-{
-	LLNotification::Params::Functor functor_p;
-	functor_p.function = functor;
-	return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));	
-}
-
-// generalized add function that takes a parameter block object for more complex instantiations
-LLNotificationPtr LLNotifications::add(const LLNotification::Params& p)
-{
-	LLNotificationPtr pNotif(new LLNotification(p));
-	add(pNotif);
-	return pNotif;
-}
-
-
-void LLNotifications::add(const LLNotificationPtr pNotif)
-{
-	// first see if we already have it -- if so, that's a problem
-	LLNotificationSet::iterator it=mItems.find(pNotif);
-	if (it != mItems.end())
-	{
-		llerrs << "Notification added a second time to the master notification channel." << llendl;
-	}
-
-	updateItem(LLSD().insert("sigtype", "add").insert("id", pNotif->id()), pNotif);
-}
-
-void LLNotifications::cancel(LLNotificationPtr pNotif)
-{
-	LLNotificationSet::iterator it=mItems.find(pNotif);
-	if (it == mItems.end())
-	{
-		llerrs << "Attempted to delete nonexistent notification " << pNotif->getName() << llendl;
-	}
-	updateItem(LLSD().insert("sigtype", "delete").insert("id", pNotif->id()), pNotif);
-	pNotif->cancel();
-}
-
-void LLNotifications::update(const LLNotificationPtr pNotif)
-{
-	LLNotificationSet::iterator it=mItems.find(pNotif);
-	if (it != mItems.end())
-	{
-		updateItem(LLSD().insert("sigtype", "change").insert("id", pNotif->id()), pNotif);
-	}
-}
-
-
-LLNotificationPtr LLNotifications::find(LLUUID uuid)
-{
-	LLNotificationPtr target = LLNotificationPtr(new LLNotification(uuid));
-	LLNotificationSet::iterator it=mItems.find(target);
-	if (it == mItems.end())
-	{
-		llwarns << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << llendl;
-		return LLNotificationPtr((LLNotification*)NULL);
-	}
-	else
-	{
-		return *it;
-	}
-}
-
-void LLNotifications::forEachNotification(NotificationProcess process)
-{
-	std::for_each(mItems.begin(), mItems.end(), process);
-}
-
-std::string LLNotifications::getGlobalString(const std::string& key) const
-{
-	GlobalStringMap::const_iterator it = mGlobalStrings.find(key);
-	if (it != mGlobalStrings.end())
-	{
-		return it->second;
-	}
-	else
-	{
-		// if we don't have the key as a global, return the key itself so that the error
-		// is self-diagnosing.
-		return key;
-	}
-}
-
-void LLNotifications::setIgnoreAllNotifications(bool setting)
-{
-	mIgnoreAllNotifications = setting; 
-}
-bool LLNotifications::getIgnoreAllNotifications()
-{
-	return mIgnoreAllNotifications; 
-}
-													
-// ---
-// END OF LLNotifications implementation
-// =========================================================
-
-std::ostream& operator<<(std::ostream& s, const LLNotification& notification)
-{
-	s << notification.summarize();
-	return s;
-}
-
+/**
+* @file llnotifications.cpp
+* @brief Non-UI queue manager for keeping a prioritized list of notifications
+*
+* $LicenseInfo:firstyear=2008&license=viewergpl$
+* 
+* Copyright (c) 2008-2009, Linden Research, Inc.
+* 
+* Second Life Viewer Source Code
+* The source code in this file ("Source Code") is provided by Linden Lab
+* to you under the terms of the GNU General Public License, version 2.0
+* ("GPL"), unless you have obtained a separate licensing agreement
+* ("Other License"), formally executed by you and Linden Lab.  Terms of
+* the GPL can be found in doc/GPL-license.txt in this distribution, or
+* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+* 
+* There are special exceptions to the terms and conditions of the GPL as
+* it is applied to this Source Code. View the full text of the exception
+* in the file doc/FLOSS-exception.txt in this software distribution, or
+* online at
+* http://secondlifegrid.net/programs/open_source/licensing/flossexception
+* 
+* By copying, modifying or distributing this software, you acknowledge
+* that you have read and understood your obligations described above,
+* and agree to abide by those obligations.
+* 
+* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+* COMPLETENESS OR PERFORMANCE.
+* $/LicenseInfo$
+*/
+
+#include "linden_common.h"
+
+#include "llnotifications.h"
+
+#include "lluictrl.h"
+#include "lluictrlfactory.h"
+#include "lldir.h"
+#include "llsdserialize.h"
+#include "lltrans.h"
+#include "llnotificationslistener.h"
+
+#include <algorithm>
+#include <boost/regex.hpp>
+
+
+const std::string NOTIFICATION_PERSIST_VERSION = "0.93";
+
+// local channel for notification history
+class LLNotificationHistoryChannel : public LLNotificationChannel
+{
+	LOG_CLASS(LLNotificationHistoryChannel);
+public:
+	LLNotificationHistoryChannel(const std::string& filename) : 
+		LLNotificationChannel("History", "Visible", &historyFilter, LLNotificationComparators::orderByUUID()),
+		mFileName(filename)
+	{
+		connectChanged(boost::bind(&LLNotificationHistoryChannel::historyHandler, this, _1));
+		loadPersistentNotifications();
+	}
+
+private:
+	bool historyHandler(const LLSD& payload)
+	{
+		// we ignore "load" messages, but rewrite the persistence file on any other
+		std::string sigtype = payload["sigtype"];
+		if (sigtype != "load")
+		{
+			savePersistentNotifications();
+		}
+		return false;
+	}
+
+	// The history channel gets all notifications except those that have been cancelled
+	static bool historyFilter(LLNotificationPtr pNotification)
+	{
+		return !pNotification->isCancelled();
+	}
+
+	void savePersistentNotifications()
+	{
+		llinfos << "Saving open notifications to " << mFileName << llendl;
+
+		llofstream notify_file(mFileName.c_str());
+		if (!notify_file.is_open()) 
+		{
+			llwarns << "Failed to open " << mFileName << llendl;
+			return;
+		}
+
+		LLSD output;
+		output["version"] = NOTIFICATION_PERSIST_VERSION;
+		LLSD& data = output["data"];
+
+		for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
+		{
+			if (!LLNotifications::instance().templateExists((*it)->getName())) continue;
+
+			// only store notifications flagged as persisting
+			LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate((*it)->getName());
+			if (!templatep->mPersist) continue;
+
+			data.append((*it)->asLLSD());
+		}
+
+		LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
+		formatter->format(output, notify_file, LLSDFormatter::OPTIONS_PRETTY);
+	}
+
+	void loadPersistentNotifications()
+	{
+		llinfos << "Loading open notifications from " << mFileName << llendl;
+
+		llifstream notify_file(mFileName.c_str());
+		if (!notify_file.is_open()) 
+		{
+			llwarns << "Failed to open " << mFileName << llendl;
+			return;
+		}
+
+		LLSD input;
+		LLPointer<LLSDParser> parser = new LLSDXMLParser();
+		if (parser->parse(notify_file, input, LLSDSerialize::SIZE_UNLIMITED) < 0)
+		{
+			llwarns << "Failed to parse open notifications" << llendl;
+			return;
+		}
+
+		if (input.isUndefined()) return;
+		std::string version = input["version"];
+		if (version != NOTIFICATION_PERSIST_VERSION)
+		{
+			llwarns << "Bad open notifications version: " << version << llendl;
+			return;
+		}
+		LLSD& data = input["data"];
+		if (data.isUndefined()) return;
+
+		LLNotifications& instance = LLNotifications::instance();
+		for (LLSD::array_const_iterator notification_it = data.beginArray();
+			notification_it != data.endArray();
+			++notification_it)
+		{
+			instance.add(LLNotificationPtr(new LLNotification(*notification_it)));
+		}
+	}
+
+	//virtual
+	void onDelete(LLNotificationPtr pNotification)
+	{
+		// we want to keep deleted notifications in our log
+		mItems.insert(pNotification);
+		
+		return;
+	}
+	
+private:
+	std::string mFileName;
+};
+
+bool filterIgnoredNotifications(LLNotificationPtr notification)
+{
+	// filter everything if we are to ignore ALL
+	if(LLNotifications::instance().getIgnoreAllNotifications())
+	{
+		return false;
+	}
+
+	LLNotificationFormPtr form = notification->getForm();
+	// Check to see if the user wants to ignore this alert
+	if (form->getIgnoreType() != LLNotificationForm::IGNORE_NO)
+	{
+		return LLUI::sSettingGroups["ignores"]->getBOOL(notification->getName());
+	}
+
+	return true;
+}
+
+bool handleIgnoredNotification(const LLSD& payload)
+{
+	if (payload["sigtype"].asString() == "add")
+	{
+		LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID());
+		if (!pNotif) return false;
+
+		LLNotificationFormPtr form = pNotif->getForm();
+		LLSD response;
+		switch(form->getIgnoreType())
+		{
+		case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE:
+			response = pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON);
+			break;
+		case LLNotificationForm::IGNORE_WITH_LAST_RESPONSE:
+			response = LLUI::sSettingGroups["ignores"]->getLLSD("Default" + pNotif->getName());
+			break;
+		case LLNotificationForm::IGNORE_SHOW_AGAIN:
+			break;
+		default:
+			return false;
+		}
+		pNotif->setIgnored(true);
+		pNotif->respond(response);
+		return true; 	// don't process this item any further
+	}
+	return false;
+}
+
+namespace LLNotificationFilters
+{
+	// a sample filter
+	bool includeEverything(LLNotificationPtr p)
+	{
+		return true;
+	}
+};
+
+LLNotificationForm::LLNotificationForm()
+:	mFormData(LLSD::emptyArray()),
+	mIgnore(IGNORE_NO)
+{
+}
+
+
+LLNotificationForm::LLNotificationForm(const std::string& name, const LLXMLNodePtr xml_node) 
+:	mFormData(LLSD::emptyArray()),
+	mIgnore(IGNORE_NO)
+{
+	if (!xml_node->hasName("form"))
+	{
+		llwarns << "Bad xml node for form: " << xml_node->getName() << llendl;
+	}
+	LLXMLNodePtr child = xml_node->getFirstChild();
+	while(child)
+	{
+		child = LLNotifications::instance().checkForXMLTemplate(child);
+
+		LLSD item_entry;
+		std::string element_name = child->getName()->mString;
+
+		if (element_name == "ignore" )
+		{
+			bool save_option = false;
+			child->getAttribute_bool("save_option", save_option);
+			if (!save_option)
+			{
+				mIgnore = IGNORE_WITH_DEFAULT_RESPONSE;
+			}
+			else
+			{
+				// remember last option chosen by user and automatically respond with that in the future
+				mIgnore = IGNORE_WITH_LAST_RESPONSE;
+				LLUI::sSettingGroups["ignores"]->declareLLSD(std::string("Default") + name, "", std::string("Default response for notification " + name));
+			}
+			child->getAttributeString("text", mIgnoreMsg);
+			BOOL show_notification = TRUE;
+			LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Ignore notification with this name", TRUE);
+		}
+		else
+		{
+			// flatten xml form entry into single LLSD map with type==name
+			item_entry["type"] = element_name;
+			const LLXMLAttribList::iterator attrib_end = child->mAttributes.end();
+			for(LLXMLAttribList::iterator attrib_it = child->mAttributes.begin();
+				attrib_it != attrib_end;
+				++attrib_it)
+			{
+				item_entry[std::string(attrib_it->second->getName()->mString)] = attrib_it->second->getValue();
+			}
+			item_entry["value"] = child->getTextContents();
+			mFormData.append(item_entry);
+		}
+
+		child = child->getNextSibling();
+	}
+}
+
+LLNotificationForm::LLNotificationForm(const LLSD& sd)
+{
+	if (sd.isArray())
+	{
+		mFormData = sd;
+	}
+	else
+	{
+		llwarns << "Invalid form data " << sd << llendl;
+		mFormData = LLSD::emptyArray();
+	}
+}
+
+LLSD LLNotificationForm::asLLSD() const
+{ 
+	return mFormData; 
+}
+
+LLSD LLNotificationForm::getElement(const std::string& element_name)
+{
+	for (LLSD::array_const_iterator it = mFormData.beginArray();
+		it != mFormData.endArray();
+		++it)
+	{
+		if ((*it)["name"].asString() == element_name) return (*it);
+	}
+	return LLSD();
+}
+
+
+bool LLNotificationForm::hasElement(const std::string& element_name)
+{
+	for (LLSD::array_const_iterator it = mFormData.beginArray();
+		it != mFormData.endArray();
+		++it)
+	{
+		if ((*it)["name"].asString() == element_name) return true;
+	}
+	return false;
+}
+
+void LLNotificationForm::addElement(const std::string& type, const std::string& name, const LLSD& value)
+{
+	LLSD element;
+	element["type"] = type;
+	element["name"] = name;
+	element["text"] = name;
+	element["value"] = value;
+	element["index"] = mFormData.size();
+	mFormData.append(element);
+}
+
+void LLNotificationForm::append(const LLSD& sub_form)
+{
+	if (sub_form.isArray())
+	{
+		for (LLSD::array_const_iterator it = sub_form.beginArray();
+			it != sub_form.endArray();
+			++it)
+		{
+			mFormData.append(*it);
+		}
+	}
+}
+
+void LLNotificationForm::formatElements(const LLSD& substitutions)
+{
+	for (LLSD::array_iterator it = mFormData.beginArray();
+		it != mFormData.endArray();
+		++it)
+	{
+		// format "text" component of each form element
+		if ((*it).has("text"))
+		{
+			std::string text = (*it)["text"].asString();
+			LLStringUtil::format(text, substitutions);
+			(*it)["text"] = text;
+		}
+		if ((*it)["type"].asString() == "text" && (*it).has("value"))
+		{
+			std::string value = (*it)["value"].asString();
+			LLStringUtil::format(value, substitutions);
+			(*it)["value"] = value;
+		}
+	}
+}
+
+std::string LLNotificationForm::getDefaultOption()
+{
+	for (LLSD::array_const_iterator it = mFormData.beginArray();
+		it != mFormData.endArray();
+		++it)
+	{
+		if ((*it)["default"]) return (*it)["name"].asString();
+	}
+	return "";
+}
+
+LLNotificationTemplate::LLNotificationTemplate() :
+	mExpireSeconds(0),
+	mExpireOption(-1),
+	mURLOption(-1),
+    mURLOpenExternally(-1),
+	mUnique(false),
+	mPriority(NOTIFICATION_PRIORITY_NORMAL)
+{
+	mForm = LLNotificationFormPtr(new LLNotificationForm()); 
+}
+
+LLNotification::LLNotification(const LLNotification::Params& p) : 
+	mTimestamp(p.timestamp), 
+	mSubstitutions(p.substitutions),
+	mPayload(p.payload),
+	mExpiresAt(0),
+	mTemporaryResponder(false),
+	mRespondedTo(false),
+	mPriority(p.priority),
+	mCancelled(false),
+	mIgnored(false)
+{
+	if (p.functor.name.isChosen())
+	{
+		mResponseFunctorName = p.functor.name;
+	}
+	else if (p.functor.function.isChosen())
+	{
+		mResponseFunctorName = LLUUID::generateNewID().asString();
+		LLNotificationFunctorRegistry::instance().registerFunctor(mResponseFunctorName, p.functor.function());
+
+		mTemporaryResponder = true;
+	}
+
+	mId.generate();
+	init(p.name, p.form_elements);
+}
+
+
+LLNotification::LLNotification(const LLSD& sd) :
+	mTemporaryResponder(false),
+	mRespondedTo(false),
+	mCancelled(false),
+	mIgnored(false)
+{ 
+	mId.generate();
+	mSubstitutions = sd["substitutions"];
+	mPayload = sd["payload"]; 
+	mTimestamp = sd["time"]; 
+	mExpiresAt = sd["expiry"];
+	mPriority = (ENotificationPriority)sd["priority"].asInteger();
+	mResponseFunctorName = sd["responseFunctor"].asString();
+	std::string templatename = sd["name"].asString();
+	init(templatename, LLSD());
+	// replace form with serialized version
+	mForm = LLNotificationFormPtr(new LLNotificationForm(sd["form"]));
+}
+
+
+LLSD LLNotification::asLLSD()
+{
+	LLSD output;
+	output["name"] = mTemplatep->mName;
+	output["form"] = getForm()->asLLSD();
+	output["substitutions"] = mSubstitutions;
+	output["payload"] = mPayload;
+	output["time"] = mTimestamp;
+	output["expiry"] = mExpiresAt;
+	output["priority"] = (S32)mPriority;
+	output["responseFunctor"] = mResponseFunctorName;
+	return output;
+}
+
+void LLNotification::update()
+{
+	LLNotifications::instance().update(shared_from_this());
+}
+
+void LLNotification::updateFrom(LLNotificationPtr other)
+{
+	// can only update from the same notification type
+	if (mTemplatep != other->mTemplatep) return;
+
+	// NOTE: do NOT change the ID, since it is the key to
+	// this given instance, just update all the metadata
+	//mId = other->mId;
+
+	mPayload = other->mPayload;
+	mSubstitutions = other->mSubstitutions;
+	mTimestamp = other->mTimestamp;
+	mExpiresAt = other->mExpiresAt;
+	mCancelled = other->mCancelled;
+	mIgnored = other->mIgnored;
+	mPriority = other->mPriority;
+	mForm = other->mForm;
+	mResponseFunctorName = other->mResponseFunctorName;
+	mRespondedTo = other->mRespondedTo;
+	mTemporaryResponder = other->mTemporaryResponder;
+
+	update();
+}
+
+const LLNotificationFormPtr LLNotification::getForm()
+{
+	return mForm;
+}
+
+void LLNotification::cancel()
+{
+	mCancelled = true;
+}
+
+LLSD LLNotification::getResponseTemplate(EResponseTemplateType type)
+{
+	LLSD response = LLSD::emptyMap();
+	for (S32 element_idx = 0;
+		element_idx < mForm->getNumElements();
+		++element_idx)
+	{
+		LLSD element = mForm->getElement(element_idx);
+		if (element.has("name"))
+		{
+			response[element["name"].asString()] = element["value"];
+		}
+
+		if ((type == WITH_DEFAULT_BUTTON) 
+			&& element["default"].asBoolean())
+		{
+			response[element["name"].asString()] = true;
+		}
+	}
+	return response;
+}
+
+//static
+S32 LLNotification::getSelectedOption(const LLSD& notification, const LLSD& response)
+{
+	LLNotificationForm form(notification["form"]);
+
+	for (S32 element_idx = 0;
+		element_idx < form.getNumElements();
+		++element_idx)
+	{
+		LLSD element = form.getElement(element_idx);
+
+		// only look at buttons
+		if (element["type"].asString() == "button" 
+			&& response[element["name"].asString()].asBoolean())
+		{
+			return element["index"].asInteger();
+		}
+	}
+
+	return -1;
+}
+
+//static
+std::string LLNotification::getSelectedOptionName(const LLSD& response)
+{
+	for (LLSD::map_const_iterator response_it = response.beginMap();
+		response_it != response.endMap();
+		++response_it)
+	{
+		if (response_it->second.isBoolean() && response_it->second.asBoolean())
+		{
+			return response_it->first;
+		}
+	}
+	return "";
+}
+
+
+void LLNotification::respond(const LLSD& response)
+{
+	mRespondedTo = true;
+	// look up the functor
+	LLNotificationFunctorRegistry::ResponseFunctor functor = 
+		LLNotificationFunctorRegistry::instance().getFunctor(mResponseFunctorName);
+	// and then call it
+	functor(asLLSD(), response);
+	
+	if (mTemporaryResponder)
+	{
+		LLNotificationFunctorRegistry::instance().unregisterFunctor(mResponseFunctorName);
+		mResponseFunctorName = "";
+		mTemporaryResponder = false;
+	}
+
+	if (mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
+	{
+		BOOL show_notification = mIgnored ? FALSE : TRUE;
+		LLUI::sSettingGroups["ignores"]->setBOOL(getName(), show_notification);
+		if (mIgnored && mForm->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE)
+		{
+			LLUI::sSettingGroups["ignores"]->setLLSD("Default" + getName(), response);
+		}
+	}
+
+	update();
+}
+
+void LLNotification::setIgnored(bool ignore)
+{
+	mIgnored = ignore;
+}
+
+void LLNotification::setResponseFunctor(std::string const &responseFunctorName)
+{
+	if (mTemporaryResponder)
+		// get rid of the old one
+		LLNotificationFunctorRegistry::instance().unregisterFunctor(mResponseFunctorName);
+	mResponseFunctorName = responseFunctorName;
+	mTemporaryResponder = false;
+}
+
+bool LLNotification::payloadContainsAll(const std::vector<std::string>& required_fields) const
+{
+	for(std::vector<std::string>::const_iterator required_fields_it = required_fields.begin(); 
+		required_fields_it != required_fields.end();
+		required_fields_it++)
+	{
+		std::string required_field_name = *required_fields_it;
+		if( ! getPayload().has(required_field_name))
+		{
+			return false; // a required field was not found
+		}
+	}
+	return true; // all required fields were found
+}
+
+bool LLNotification::isEquivalentTo(LLNotificationPtr that) const
+{
+	if (this->mTemplatep->mName != that->mTemplatep->mName) 
+	{
+		return false; // must have the same template name or forget it
+	}
+	if (this->mTemplatep->mUnique)
+	{
+		// highlander bit sez there can only be one of these
+		return
+			this->payloadContainsAll(that->mTemplatep->mUniqueContext) &&
+			that->payloadContainsAll(this->mTemplatep->mUniqueContext);
+	}
+	return false; 
+}
+
+void LLNotification::init(const std::string& template_name, const LLSD& form_elements)
+{
+	mTemplatep = LLNotifications::instance().getTemplate(template_name);
+	if (!mTemplatep) return;
+
+	// add default substitutions
+	const LLStringUtil::format_map_t& default_args = LLTrans::getDefaultArgs();
+	for (LLStringUtil::format_map_t::const_iterator iter = default_args.begin();
+		 iter != default_args.end(); ++iter)
+	{
+		mSubstitutions[iter->first] = iter->second;
+	}
+	mSubstitutions["_URL"] = getURL();
+	mSubstitutions["_NAME"] = template_name;
+	// TODO: something like this so that a missing alert is sensible:
+	//mSubstitutions["_ARGS"] = get_all_arguments_as_text(mSubstitutions);
+
+	mForm = LLNotificationFormPtr(new LLNotificationForm(*mTemplatep->mForm));
+	mForm->append(form_elements);
+
+	// apply substitution to form labels
+	mForm->formatElements(mSubstitutions);
+
+	LLDate rightnow = LLDate::now();
+	if (mTemplatep->mExpireSeconds)
+	{
+		mExpiresAt = LLDate(rightnow.secondsSinceEpoch() + mTemplatep->mExpireSeconds);
+	}
+
+	if (mPriority == NOTIFICATION_PRIORITY_UNSPECIFIED)
+	{
+		mPriority = mTemplatep->mPriority;
+	}
+}
+
+std::string LLNotification::summarize() const
+{
+	std::string s = "Notification(";
+	s += getName();
+	s += ") : ";
+	s += mTemplatep ? mTemplatep->mMessage : "";
+	// should also include timestamp and expiration time (but probably not payload)
+	return s;
+}
+
+std::string LLNotification::getMessage() const
+{
+	// all our callers cache this result, so it gives us more flexibility
+	// to do the substitution at call time rather than attempting to 
+	// cache it in the notification
+	if (!mTemplatep)
+		return std::string();
+
+	std::string message = mTemplatep->mMessage;
+	LLStringUtil::format(message, mSubstitutions);
+	return message;
+}
+
+std::string LLNotification::getLabel() const
+{
+	std::string label = mTemplatep->mLabel;
+	LLStringUtil::format(label, mSubstitutions);
+	return (mTemplatep ? label : "");
+}
+
+std::string LLNotification::getURL() const
+{
+	if (!mTemplatep)
+		return std::string();
+	std::string url = mTemplatep->mURL;
+	LLStringUtil::format(url, mSubstitutions);
+	return (mTemplatep ? url : "");
+}
+
+// =========================================================
+// LLNotificationChannel implementation
+// ---
+LLBoundListener LLNotificationChannelBase::connectChangedImpl(const LLEventListener& slot)
+{
+	// when someone wants to connect to a channel, we first throw them
+	// all of the notifications that are already in the channel
+	// we use a special signal called "load" in case the channel wants to care
+	// only about new notifications
+	for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
+	{
+		slot(LLSD().insert("sigtype", "load").insert("id", (*it)->id()));
+	}
+	// and then connect the signal so that all future notifications will also be
+	// forwarded.
+	return mChanged.connect(slot);
+}
+
+LLBoundListener LLNotificationChannelBase::connectPassedFilterImpl(const LLEventListener& slot)
+{
+	// these two filters only fire for notifications added after the current one, because
+	// they don't participate in the hierarchy.
+	return mPassedFilter.connect(slot);
+}
+
+LLBoundListener LLNotificationChannelBase::connectFailedFilterImpl(const LLEventListener& slot)
+{
+	return mFailedFilter.connect(slot);
+}
+
+// external call, conforms to our standard signature
+bool LLNotificationChannelBase::updateItem(const LLSD& payload)
+{	
+	// first check to see if it's in the master list
+	LLNotificationPtr pNotification	 = LLNotifications::instance().find(payload["id"]);
+	if (!pNotification)
+		return false;	// not found
+	
+	return updateItem(payload, pNotification);
+}
+
+
+//FIX QUIT NOT WORKING
+
+
+// internal call, for use in avoiding lookup
+bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPtr pNotification)
+{	
+	std::string cmd = payload["sigtype"];
+	LLNotificationSet::iterator foundItem = mItems.find(pNotification);
+	bool wasFound = (foundItem != mItems.end());
+	bool passesFilter = mFilter(pNotification);
+	
+	// first, we offer the result of the filter test to the simple
+	// signals for pass/fail. One of these is guaranteed to be called.
+	// If either signal returns true, the change processing is NOT performed
+	// (so don't return true unless you know what you're doing!)
+	bool abortProcessing = false;
+	if (passesFilter)
+	{
+		abortProcessing = mPassedFilter(payload);
+	}
+	else
+	{
+		abortProcessing = mFailedFilter(payload);
+	}
+	
+	if (abortProcessing)
+	{
+		return true;
+	}
+	
+	if (cmd == "load")
+	{
+		// should be no reason we'd ever get a load if we already have it
+		// if passes filter send a load message, else do nothing
+		assert(!wasFound);
+		if (passesFilter)
+		{
+			// not in our list, add it and say so
+			mItems.insert(pNotification);
+			abortProcessing = mChanged(payload);
+			onLoad(pNotification);
+		}
+	}
+	else if (cmd == "change")
+	{
+		// if it passes filter now and was found, we just send a change message
+		// if it passes filter now and wasn't found, we have to add it
+		// if it doesn't pass filter and wasn't found, we do nothing
+		// if it doesn't pass filter and was found, we need to delete it
+		if (passesFilter)
+		{
+			if (wasFound)
+			{
+				// it already existed, so this is a change
+				// since it changed in place, all we have to do is resend the signal
+				abortProcessing = mChanged(payload);
+				onChange(pNotification);
+			}
+			else
+			{
+				// not in our list, add it and say so
+				mItems.insert(pNotification);
+				// our payload is const, so make a copy before changing it
+				LLSD newpayload = payload;
+				newpayload["sigtype"] = "add";
+				abortProcessing = mChanged(newpayload);
+				onChange(pNotification);
+			}
+		}
+		else
+		{
+			if (wasFound)
+			{
+				// it already existed, so this is a delete
+				mItems.erase(pNotification);
+				// our payload is const, so make a copy before changing it
+				LLSD newpayload = payload;
+				newpayload["sigtype"] = "delete";
+				abortProcessing = mChanged(newpayload);
+				onChange(pNotification);
+			}
+			// didn't pass, not on our list, do nothing
+		}
+	}
+	else if (cmd == "add")
+	{
+		// should be no reason we'd ever get an add if we already have it
+		// if passes filter send an add message, else do nothing
+		assert(!wasFound);
+		if (passesFilter)
+		{
+			// not in our list, add it and say so
+			mItems.insert(pNotification);
+			abortProcessing = mChanged(payload);
+			onAdd(pNotification);
+		}
+	}
+	else if (cmd == "delete")
+	{
+		// if we have it in our list, pass on the delete, then delete it, else do nothing
+		if (wasFound)
+		{
+			abortProcessing = mChanged(payload);
+			mItems.erase(pNotification);
+			onDelete(pNotification);
+		}
+	}
+	return abortProcessing;
+}
+
+/* static */
+LLNotificationChannelPtr LLNotificationChannel::buildChannel(const std::string& name, 
+															 const std::string& parent,
+															 LLNotificationFilter filter, 
+															 LLNotificationComparator comparator)
+{
+	// note: this is not a leak; notifications are self-registering.
+	// This factory helps to prevent excess deletions by making sure all smart
+	// pointers to notification channels come from the same source
+	new LLNotificationChannel(name, parent, filter, comparator);
+	return LLNotifications::instance().getChannel(name);
+}
+
+
+LLNotificationChannel::LLNotificationChannel(const std::string& name, 
+											 const std::string& parent,
+											 LLNotificationFilter filter, 
+											 LLNotificationComparator comparator) : 
+LLNotificationChannelBase(filter, comparator),
+mName(name),
+mParent(parent)
+{
+	// store myself in the channel map
+	LLNotifications::instance().addChannel(LLNotificationChannelPtr(this));
+	// bind to notification broadcast
+	if (parent.empty())
+	{
+		LLNotifications::instance().connectChanged(
+			boost::bind(&LLNotificationChannelBase::updateItem, this, _1));
+	}
+	else
+	{
+		LLNotificationChannelPtr p = LLNotifications::instance().getChannel(parent);
+		p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1));
+	}
+}
+
+
+void LLNotificationChannel::setComparator(LLNotificationComparator comparator) 
+{ 
+	mComparator = comparator; 
+	LLNotificationSet s2(mComparator);
+	s2.insert(mItems.begin(), mItems.end());
+	mItems.swap(s2);
+	
+	// notify clients that we've been resorted
+	mChanged(LLSD().insert("sigtype", "sort")); 
+}
+
+bool LLNotificationChannel::isEmpty() const
+{
+	return mItems.empty();
+}
+
+LLNotificationChannel::Iterator LLNotificationChannel::begin()
+{
+	return mItems.begin();
+}
+
+LLNotificationChannel::Iterator LLNotificationChannel::end()
+{
+	return mItems.end();
+}
+
+std::string LLNotificationChannel::summarize()
+{
+	std::string s("Channel '");
+	s += mName;
+	s += "'\n  ";
+	for (LLNotificationChannel::Iterator it = begin(); it != end(); ++it)
+	{
+		s += (*it)->summarize();
+		s += "\n  ";
+	}
+	return s;
+}
+
+
+// ---
+// END OF LLNotificationChannel implementation
+// =========================================================
+
+
+// =========================================================
+// LLNotifications implementation
+// ---
+LLNotifications::LLNotifications() : LLNotificationChannelBase(LLNotificationFilters::includeEverything,
+															   LLNotificationComparators::orderByUUID()),
+									mIgnoreAllNotifications(false)
+{
+	LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2));
+
+    mListener.reset(new LLNotificationsListener(*this));
+}
+
+
+// The expiration channel gets all notifications that are cancelled
+bool LLNotifications::expirationFilter(LLNotificationPtr pNotification)
+{
+	return pNotification->isCancelled() || pNotification->isRespondedTo();
+}
+
+bool LLNotifications::expirationHandler(const LLSD& payload)
+{
+	if (payload["sigtype"].asString() != "delete")
+	{
+		// anything added to this channel actually should be deleted from the master
+		cancel(find(payload["id"]));
+		return true;	// don't process this item any further
+	}
+	return false;
+}
+
+bool LLNotifications::uniqueFilter(LLNotificationPtr pNotif)
+{
+	if (!pNotif->hasUniquenessConstraints())
+	{
+		return true;
+	}
+
+	// checks against existing unique notifications
+	for (LLNotificationMap::iterator existing_it = mUniqueNotifications.find(pNotif->getName());
+		existing_it != mUniqueNotifications.end();
+		++existing_it)
+	{
+		LLNotificationPtr existing_notification = existing_it->second;
+		if (pNotif != existing_notification 
+			&& pNotif->isEquivalentTo(existing_notification))
+		{
+			return false;
+		}
+	}
+
+	return true;
+}
+
+bool LLNotifications::uniqueHandler(const LLSD& payload)
+{
+	LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID());
+	if (pNotif && pNotif->hasUniquenessConstraints()) 
+	{
+		if (payload["sigtype"].asString() == "add")
+		{
+			// not a duplicate according to uniqueness criteria, so we keep it
+			// and store it for future uniqueness checks
+			mUniqueNotifications.insert(std::make_pair(pNotif->getName(), pNotif));
+		}
+		else if (payload["sigtype"].asString() == "delete")
+		{
+			mUniqueNotifications.erase(pNotif->getName());
+		}
+	}
+
+	return false;
+}
+
+bool LLNotifications::failedUniquenessTest(const LLSD& payload)
+{
+	LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID());
+	
+	if (!pNotif || !pNotif->hasUniquenessConstraints())
+	{
+		return false;
+	}
+
+	// checks against existing unique notifications
+	for (LLNotificationMap::iterator existing_it = mUniqueNotifications.find(pNotif->getName());
+		existing_it != mUniqueNotifications.end();
+		++existing_it)
+	{
+		LLNotificationPtr existing_notification = existing_it->second;
+		if (pNotif != existing_notification 
+			&& pNotif->isEquivalentTo(existing_notification))
+		{
+			// copy notification instance data over to oldest instance
+			// of this unique notification and update it
+			existing_notification->updateFrom(pNotif);
+			// then delete the new one
+			pNotif->cancel();
+		}
+	}
+
+	return false;
+}
+
+
+void LLNotifications::addChannel(LLNotificationChannelPtr pChan)
+{
+	mChannels[pChan->getName()] = pChan;
+}
+
+LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelName)
+{
+	ChannelMap::iterator p = mChannels.find(channelName);
+	if(p == mChannels.end())
+	{
+		llerrs << "Did not find channel named " << channelName << llendl;
+	}
+	return p->second;
+}
+
+
+// this function is called once at construction time, after the object is constructed.
+void LLNotifications::initSingleton()
+{
+	loadTemplates();
+	createDefaultChannels();
+}
+
+void LLNotifications::createDefaultChannels()
+{
+	// now construct the various channels AFTER loading the notifications,
+	// because the history channel is going to rewrite the stored notifications file
+	LLNotificationChannel::buildChannel("Expiration", "",
+		boost::bind(&LLNotifications::expirationFilter, this, _1));
+	LLNotificationChannel::buildChannel("Unexpired", "",
+		!boost::bind(&LLNotifications::expirationFilter, this, _1)); // use negated bind
+	LLNotificationChannel::buildChannel("Unique", "Unexpired",
+		boost::bind(&LLNotifications::uniqueFilter, this, _1));
+	LLNotificationChannel::buildChannel("Ignore", "Unique",
+		filterIgnoredNotifications);
+	LLNotificationChannel::buildChannel("Visible", "Ignore",
+		&LLNotificationFilters::includeEverything);
+
+	// create special history channel
+	//std::string notifications_log_file = gDirUtilp->getExpandedFilename ( LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml" );
+	// use ^^^ when done debugging notifications serialization
+	std::string notifications_log_file = gDirUtilp->getExpandedFilename ( LL_PATH_USER_SETTINGS, "open_notifications.xml" );
+	// this isn't a leak, don't worry about the empty "new"
+	new LLNotificationHistoryChannel(notifications_log_file);
+
+	// connect action methods to these channels
+	LLNotifications::instance().getChannel("Expiration")->
+        connectChanged(boost::bind(&LLNotifications::expirationHandler, this, _1));
+	LLNotifications::instance().getChannel("Unique")->
+        connectChanged(boost::bind(&LLNotifications::uniqueHandler, this, _1));
+	LLNotifications::instance().getChannel("Unique")->
+        connectFailedFilter(boost::bind(&LLNotifications::failedUniquenessTest, this, _1));
+	LLNotifications::instance().getChannel("Ignore")->
+		connectFailedFilter(&handleIgnoredNotification);
+}
+
+bool LLNotifications::addTemplate(const std::string &name, 
+								  LLNotificationTemplatePtr theTemplate)
+{
+	if (mTemplates.count(name))
+	{
+		llwarns << "LLNotifications -- attempted to add template '" << name << "' twice." << llendl;
+		return false;
+	}
+	mTemplates[name] = theTemplate;
+	return true;
+}
+
+LLNotificationTemplatePtr LLNotifications::getTemplate(const std::string& name)
+{
+	if (mTemplates.count(name))
+	{
+		return mTemplates[name];
+	}
+	else
+	{
+		return mTemplates["MissingAlert"];
+	}
+}
+
+bool LLNotifications::templateExists(const std::string& name)
+{
+	return (mTemplates.count(name) != 0);
+}
+
+void LLNotifications::clearTemplates()
+{
+	mTemplates.clear();
+}
+
+void LLNotifications::forceResponse(const LLNotification::Params& params, S32 option)
+{
+	LLNotificationPtr temp_notify(new LLNotification(params));
+	LLSD response = temp_notify->getResponseTemplate();
+	LLSD selected_item = temp_notify->getForm()->getElement(option);
+	
+	if (selected_item.isUndefined())
+	{
+		llwarns << "Invalid option" << option << " for notification " << (std::string)params.name << llendl;
+		return;
+	}
+	response[selected_item["name"].asString()] = true;
+
+	temp_notify->respond(response);
+}
+
+LLNotifications::TemplateNames LLNotifications::getTemplateNames() const
+{
+	TemplateNames names;
+	for (TemplateMap::const_iterator it = mTemplates.begin(); it != mTemplates.end(); ++it)
+	{
+		names.push_back(it->first);
+	}
+	return names;
+}
+
+typedef std::map<std::string, std::string> StringMap;
+void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements)
+{
+	//llwarns << "replaceSubstitutionStrings" << llendl;
+	// walk the list of attributes looking for replacements
+	for (LLXMLAttribList::iterator it=node->mAttributes.begin();
+		 it != node->mAttributes.end(); ++it)
+	{
+		std::string value = it->second->getValue();
+		if (value[0] == '$')
+		{
+			value.erase(0, 1);	// trim off the $
+			std::string replacement;
+			StringMap::const_iterator found = replacements.find(value);
+			if (found != replacements.end())
+			{
+				replacement = found->second;
+				//llwarns << "replaceSubstituionStrings: value: " << value << " repl: " << replacement << llendl;
+
+				it->second->setValue(replacement);
+			}
+			else
+			{
+				llwarns << "replaceSubstituionStrings FAILURE: value: " << value << " repl: " << replacement << llendl;
+			}
+		}
+	}
+	
+	// now walk the list of children and call this recursively.
+	for (LLXMLNodePtr child = node->getFirstChild(); 
+		 child.notNull(); child = child->getNextSibling())
+	{
+		replaceSubstitutionStrings(child, replacements);
+	}
+}
+
+// private to this file
+// returns true if the template request was invalid and there's nothing else we
+// can do with this node, false if you should keep processing (it may have
+// replaced the contents of the node referred to)
+LLXMLNodePtr LLNotifications::checkForXMLTemplate(LLXMLNodePtr item)
+{
+	if (item->hasName("usetemplate"))
+	{
+		std::string replacementName;
+		if (item->getAttributeString("name", replacementName))
+		{
+			StringMap replacements;
+			for (LLXMLAttribList::const_iterator it=item->mAttributes.begin(); 
+				 it != item->mAttributes.end(); ++it)
+			{
+				replacements[it->second->getName()->mString] = it->second->getValue();
+			}
+			if (mXmlTemplates.count(replacementName))
+			{
+				item=LLXMLNode::replaceNode(item, mXmlTemplates[replacementName]);
+				
+				// walk the nodes looking for $(substitution) here and replace
+				replaceSubstitutionStrings(item, replacements);
+			}
+			else
+			{
+				llwarns << "XML template lookup failure on '" << replacementName << "' " << llendl;
+			}
+		}
+	}
+	return item;
+}
+
+bool LLNotifications::loadTemplates()
+{
+	const std::string xml_filename = "notifications.xml";
+	LLXMLNodePtr root;
+	
+	BOOL success  = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
+	
+	if (!success || root.isNull() || !root->hasName( "notifications" ))
+	{
+		llerrs << "Problem reading UI Notifications file: " << xml_filename << llendl;
+		return false;
+	}
+	
+	clearTemplates();
+	
+	for (LLXMLNodePtr item = root->getFirstChild();
+		 item.notNull(); item = item->getNextSibling())
+	{
+		// we do this FIRST so that item can be changed if we 
+		// encounter a usetemplate -- we just replace the
+		// current xml node and keep processing
+		item = checkForXMLTemplate(item);
+		
+		if (item->hasName("global"))
+		{
+			std::string global_name;
+			if (item->getAttributeString("name", global_name))
+			{
+				mGlobalStrings[global_name] = item->getTextContents();
+			}
+			continue;
+		}
+		
+		if (item->hasName("template"))
+		{
+			// store an xml template; templates must have a single node (can contain
+			// other nodes)
+			std::string name;
+			item->getAttributeString("name", name);
+			LLXMLNodePtr ptr = item->getFirstChild();
+			mXmlTemplates[name] = ptr;
+			continue;
+		}
+		
+		if (!item->hasName("notification"))
+		{
+            llwarns << "Unexpected entity " << item->getName()->mString << 
+                       " found in " << xml_filename << llendl;
+			continue;
+		}
+		
+		// now we know we have a notification entry, so let's build it
+		LLNotificationTemplatePtr pTemplate(new LLNotificationTemplate());
+
+		if (!item->getAttributeString("name", pTemplate->mName))
+		{
+			llwarns << "Unable to parse notification with no name" << llendl;
+			continue;
+		}
+		
+		//llinfos << "Parsing " << pTemplate->mName << llendl;
+		
+		pTemplate->mMessage = item->getTextContents();
+		pTemplate->mDefaultFunctor = pTemplate->mName;
+		item->getAttributeString("type", pTemplate->mType);
+		item->getAttributeString("icon", pTemplate->mIcon);
+		item->getAttributeString("label", pTemplate->mLabel);
+		item->getAttributeU32("duration", pTemplate->mExpireSeconds);
+		item->getAttributeU32("expireOption", pTemplate->mExpireOption);
+
+		std::string priority;
+		item->getAttributeString("priority", priority);
+		pTemplate->mPriority = NOTIFICATION_PRIORITY_NORMAL;
+		if (!priority.empty())
+		{
+			if (priority == "low")      pTemplate->mPriority = NOTIFICATION_PRIORITY_LOW;
+			if (priority == "normal")   pTemplate->mPriority = NOTIFICATION_PRIORITY_NORMAL;
+			if (priority == "high")     pTemplate->mPriority = NOTIFICATION_PRIORITY_HIGH;
+			if (priority == "critical") pTemplate->mPriority = NOTIFICATION_PRIORITY_CRITICAL;
+		}
+		
+		item->getAttributeString("functor", pTemplate->mDefaultFunctor);
+
+		BOOL persist = false;
+		item->getAttributeBOOL("persist", persist);
+		pTemplate->mPersist = persist;
+		
+		std::string sound;
+		item->getAttributeString("sound", sound);
+		if (!sound.empty())
+		{
+			// test for bad sound effect name / missing effect
+			if (LLUI::sSettingGroups["config"]->controlExists(sound))
+			{
+				pTemplate->mSoundEffect = 
+					LLUUID(LLUI::sSettingGroups["config"]->getString(sound));
+			}
+			else
+			{
+				llwarns << "Unknown sound effect control name " << sound
+					<< llendl;
+			}
+		}
+
+		for (LLXMLNodePtr child = item->getFirstChild();
+			 !child.isNull(); child = child->getNextSibling())
+		{
+			child = checkForXMLTemplate(child);
+			
+			// <url>
+			if (child->hasName("url"))
+			{
+				pTemplate->mURL = child->getTextContents();
+				child->getAttributeU32("option", pTemplate->mURLOption);
+				child->getAttributeU32("openexternally", pTemplate->mURLOpenExternally);
+			}
+			
+            if (child->hasName("unique"))
+            {
+                pTemplate->mUnique = true;
+                for (LLXMLNodePtr formitem = child->getFirstChild();
+                     !formitem.isNull(); formitem = formitem->getNextSibling())
+                {
+                    if (formitem->hasName("context"))
+                    {
+                        std::string key;
+                        formitem->getAttributeString("key", key);
+                        pTemplate->mUniqueContext.push_back(key);
+                        //llwarns << "adding " << key << " to unique context" << llendl;
+                    }
+                    else
+                    {
+                        llwarns << "'unique' has unrecognized subelement " 
+                        << formitem->getName()->mString << llendl;
+                    }
+                }
+            }
+            
+			// <form>
+			if (child->hasName("form"))
+			{
+                pTemplate->mForm = LLNotificationFormPtr(new LLNotificationForm(pTemplate->mName, child));
+			}
+		}
+		addTemplate(pTemplate->mName, pTemplate);
+	}
+	
+	//std::ostringstream ostream;
+	//root->writeToOstream(ostream, "\n  ");
+	//llwarns << ostream.str() << llendl;
+	
+	return true;
+}
+
+// Add a simple notification (from XUI)
+void LLNotifications::addFromCallback(const LLSD& name)
+{
+	add(LLNotification::Params().name(name.asString()));	
+}
+
+// we provide a couple of simple add notification functions so that it's reasonable to create notifications in one line
+LLNotificationPtr LLNotifications::add(const std::string& name, 
+										const LLSD& substitutions, 
+										const LLSD& payload)
+{
+	LLNotification::Params::Functor functor_p;
+	functor_p.name = name;
+	return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));	
+}
+
+LLNotificationPtr LLNotifications::add(const std::string& name, 
+										const LLSD& substitutions, 
+										const LLSD& payload, 
+										const std::string& functor_name)
+{
+	LLNotification::Params::Functor functor_p;
+	functor_p.name = functor_name;
+	return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));	
+}
+
+LLNotificationPtr LLNotifications::add(const std::string& name, 
+										const LLSD& substitutions, 
+										const LLSD& payload, 
+										LLNotificationFunctorRegistry::ResponseFunctor functor)
+{
+	LLNotification::Params::Functor functor_p;
+	functor_p.function = functor;
+	return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));	
+}
+
+// generalized add function that takes a parameter block object for more complex instantiations
+LLNotificationPtr LLNotifications::add(const LLNotification::Params& p)
+{
+	LLNotificationPtr pNotif(new LLNotification(p));
+	add(pNotif);
+	return pNotif;
+}
+
+
+void LLNotifications::add(const LLNotificationPtr pNotif)
+{
+	// first see if we already have it -- if so, that's a problem
+	LLNotificationSet::iterator it=mItems.find(pNotif);
+	if (it != mItems.end())
+	{
+		llerrs << "Notification added a second time to the master notification channel." << llendl;
+	}
+
+	updateItem(LLSD().insert("sigtype", "add").insert("id", pNotif->id()), pNotif);
+}
+
+void LLNotifications::cancel(LLNotificationPtr pNotif)
+{
+	LLNotificationSet::iterator it=mItems.find(pNotif);
+	if (it == mItems.end())
+	{
+		llerrs << "Attempted to delete nonexistent notification " << pNotif->getName() << llendl;
+	}
+	updateItem(LLSD().insert("sigtype", "delete").insert("id", pNotif->id()), pNotif);
+	pNotif->cancel();
+}
+
+void LLNotifications::update(const LLNotificationPtr pNotif)
+{
+	LLNotificationSet::iterator it=mItems.find(pNotif);
+	if (it != mItems.end())
+	{
+		updateItem(LLSD().insert("sigtype", "change").insert("id", pNotif->id()), pNotif);
+	}
+}
+
+
+LLNotificationPtr LLNotifications::find(LLUUID uuid)
+{
+	LLNotificationPtr target = LLNotificationPtr(new LLNotification(uuid));
+	LLNotificationSet::iterator it=mItems.find(target);
+	if (it == mItems.end())
+	{
+		llwarns << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << llendl;
+		return LLNotificationPtr((LLNotification*)NULL);
+	}
+	else
+	{
+		return *it;
+	}
+}
+
+void LLNotifications::forEachNotification(NotificationProcess process)
+{
+	std::for_each(mItems.begin(), mItems.end(), process);
+}
+
+std::string LLNotifications::getGlobalString(const std::string& key) const
+{
+	GlobalStringMap::const_iterator it = mGlobalStrings.find(key);
+	if (it != mGlobalStrings.end())
+	{
+		return it->second;
+	}
+	else
+	{
+		// if we don't have the key as a global, return the key itself so that the error
+		// is self-diagnosing.
+		return key;
+	}
+}
+
+void LLNotifications::setIgnoreAllNotifications(bool setting)
+{
+	mIgnoreAllNotifications = setting; 
+}
+bool LLNotifications::getIgnoreAllNotifications()
+{
+	return mIgnoreAllNotifications; 
+}
+													
+// ---
+// END OF LLNotifications implementation
+// =========================================================
+
+std::ostream& operator<<(std::ostream& s, const LLNotification& notification)
+{
+	s << notification.summarize();
+	return s;
+}
+
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 512886790c..971d11db97 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -1,910 +1,913 @@
-/**
-* @file llnotifications.h
-* @brief Non-UI manager and support for keeping a prioritized list of notifications
-* @author Q (with assistance from Richard and Coco)
-*
-* $LicenseInfo:firstyear=2008&license=viewergpl$
-* 
-* Copyright (c) 2008-2009, Linden Research, Inc.
-* 
-* Second Life Viewer Source Code
-* The source code in this file ("Source Code") is provided by Linden Lab
-* to you under the terms of the GNU General Public License, version 2.0
-* ("GPL"), unless you have obtained a separate licensing agreement
-* ("Other License"), formally executed by you and Linden Lab.  Terms of
-* the GPL can be found in doc/GPL-license.txt in this distribution, or
-* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
-* 
-* There are special exceptions to the terms and conditions of the GPL as
-* it is applied to this Source Code. View the full text of the exception
-* in the file doc/FLOSS-exception.txt in this software distribution, or
-* online at
-* http://secondlifegrid.net/programs/open_source/licensing/flossexception
-* 
-* By copying, modifying or distributing this software, you acknowledge
-* that you have read and understood your obligations described above,
-* and agree to abide by those obligations.
-* 
-* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
-* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
-* COMPLETENESS OR PERFORMANCE.
-* $/LicenseInfo$
-*/
-
-#ifndef LL_LLNOTIFICATIONS_H
-#define LL_LLNOTIFICATIONS_H
-
-/**
- * This system is intended to provide a singleton mechanism for adding
- * notifications to one of an arbitrary set of event channels.
- * 
- * Controlling JIRA: DEV-9061
- *
- * Every notification has (see code for full list):
- *  - a textual name, which is used to look up its template in the XML files
- *  - a payload, which is a block of LLSD
- *  - a channel, which is normally extracted from the XML files but
- *	  can be overridden.
- *  - a timestamp, used to order the notifications
- *  - expiration time -- if nonzero, specifies a time after which the
- *    notification will no longer be valid.
- *  - a callback name and a couple of status bits related to callbacks (see below)
- * 
- * There is a management class called LLNotifications, which is an LLSingleton.
- * The class maintains a collection of all of the notifications received
- * or processed during this session, and also manages the persistence
- * of those notifications that must be persisted.
- * 
- * We also have Channels. A channel is a view on a collection of notifications;
- * The collection is defined by a filter function that controls which
- * notifications are in the channel, and its ordering is controlled by 
- * a comparator. 
- *
- * There is a hierarchy of channels; notifications flow down from
- * the management class (LLNotifications, which itself inherits from
- * The channel base class) to the individual channels.
- * Any change to notifications (add, delete, modify) is 
- * automatically propagated through the channel hierarchy.
- * 
- * We provide methods for adding a new notification, for removing
- * one, and for managing channels. Channels are relatively cheap to construct
- * and maintain, so in general, human interfaces should use channels to
- * select and manage their lists of notifications.
- * 
- * We also maintain a collection of templates that are loaded from the 
- * XML file of template translations. The system supports substitution
- * of named variables from the payload into the XML file.
- * 
- * By default, only the "unknown message" template is built into the system.
- * It is not an error to add a notification that's not found in the 
- * template system, but it is logged.
- *
- */
-
-#include <string>
-#include <list>
-#include <vector>
-#include <map>
-#include <set>
-#include <iomanip>
-#include <sstream>
-
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/type_traits.hpp>
-
-// we want to minimize external dependencies, but this one is important
-#include "llsd.h"
-
-// and we need this to manage the notification callbacks
-#include "llevents.h"
-#include "llfunctorregistry.h"
-#include "llui.h"
-#include "llmemory.h"
-
-class LLNotification;
-typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
-
-	
-typedef enum e_notification_priority
-{
-	NOTIFICATION_PRIORITY_UNSPECIFIED,
-	NOTIFICATION_PRIORITY_LOW,
-	NOTIFICATION_PRIORITY_NORMAL,
-	NOTIFICATION_PRIORITY_HIGH,
-	NOTIFICATION_PRIORITY_CRITICAL
-} ENotificationPriority;
-
-typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder;
-
-typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;
-typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration;
-
-// context data that can be looked up via a notification's payload by the display logic
-// derive from this class to implement specific contexts
-class LLNotificationContext : public LLInstanceTracker<LLNotificationContext, LLUUID>
-{
-public:
-	LLNotificationContext() : LLInstanceTracker<LLNotificationContext, LLUUID>(LLUUID::generateNewID())
-	{
-	}
-
-	virtual ~LLNotificationContext() {}
-
-	LLSD asLLSD() const
-	{
-		return getKey();
-	}
-
-private:
-
-};
-
-// Contains notification form data, such as buttons and text fields along with
-// manipulator functions
-class LLNotificationForm
-{
-	LOG_CLASS(LLNotificationForm);
-
-public:
-	typedef enum e_ignore_type
-	{ 
-		IGNORE_NO,
-		IGNORE_WITH_DEFAULT_RESPONSE, 
-		IGNORE_WITH_LAST_RESPONSE, 
-		IGNORE_SHOW_AGAIN 
-	} EIgnoreType;
-
-	LLNotificationForm();
-	LLNotificationForm(const LLSD& sd);
-	LLNotificationForm(const std::string& name, const LLXMLNodePtr xml_node);
-
-	LLSD asLLSD() const;
-
-	S32 getNumElements() { return mFormData.size(); }
-	LLSD getElement(S32 index) { return mFormData.get(index); }
-	LLSD getElement(const std::string& element_name);
-	bool hasElement(const std::string& element_name);
-	void addElement(const std::string& type, const std::string& name, const LLSD& value = LLSD());
-	void formatElements(const LLSD& substitutions);
-	// appends form elements from another form serialized as LLSD
-	void append(const LLSD& sub_form);
-	std::string getDefaultOption();
-
-	EIgnoreType getIgnoreType() { return mIgnore; }
-	std::string getIgnoreMessage() { return mIgnoreMsg; }
-
-private:
-	LLSD	mFormData;
-	EIgnoreType mIgnore;
-	std::string mIgnoreMsg;
-};
-
-typedef boost::shared_ptr<LLNotificationForm> LLNotificationFormPtr;
-
-// This is the class of object read from the XML file (notifications.xml, 
-// from the appropriate local language directory).
-struct LLNotificationTemplate
-{
-	LLNotificationTemplate();
-    // the name of the notification -- the key used to identify it
-    // Ideally, the key should follow variable naming rules 
-    // (no spaces or punctuation).
-    std::string mName;
-    // The type of the notification
-    // used to control which queue it's stored in
-    std::string mType;
-    // The text used to display the notification. Replaceable parameters
-    // are enclosed in square brackets like this [].
-    std::string mMessage;
-	// The label for the notification; used for 
-	// certain classes of notification (those with a window and a window title). 
-	// Also used when a notification pops up underneath the current one.
-	// Replaceable parameters can be used in the label.
-	std::string mLabel;
-	// The name of the icon image. This should include an extension.
-	std::string mIcon;
-    // This is the Highlander bit -- "There Can Be Only One"
-    // An outstanding notification with this bit set
-    // is updated by an incoming notification with the same name,
-    // rather than creating a new entry in the queue.
-    // (used for things like progress indications, or repeating warnings
-    // like "the grid is going down in N minutes")
-    bool mUnique;
-    // if we want to be unique only if a certain part of the payload is constant
-    // specify the field names for the payload. The notification will only be
-    // combined if all of the fields named in the context are identical in the
-    // new and the old notification; otherwise, the notification will be
-    // duplicated. This is to support suppressing duplicate offers from the same
-    // sender but still differentiating different offers. Example: Invitation to
-    // conference chat.
-    std::vector<std::string> mUniqueContext;
-    // If this notification expires automatically, this value will be 
-    // nonzero, and indicates the number of seconds for which the notification
-    // will be valid (a teleport offer, for example, might be valid for 
-    // 300 seconds). 
-    U32 mExpireSeconds;
-    // if the offer expires, one of the options is chosen automatically
-    // based on its "value" parameter. This controls which one. 
-    // If expireSeconds is specified, expireOption should also be specified.
-    U32 mExpireOption;
-    // if the notification contains a url, it's stored here (and replaced 
-    // into the message where [_URL] is found)
-    std::string mURL;
-    // if there's a URL in the message, this controls which option visits
-    // that URL. Obsolete this and eliminate the buttons for affected
-    // messages when we allow clickable URLs in the UI
-    U32 mURLOption;
-	
-	U32 mURLOpenExternally;
-	//This is a flag that tells if the url needs to open externally dispite 
-	//what the user setting is.
-	
-	// does this notification persist across sessions? if so, it will be
-	// serialized to disk on first receipt and read on startup
-	bool mPersist;
-	// This is the name of the default functor, if present, to be
-	// used for the notification's callback. It is optional, and used only if 
-	// the notification is constructed without an identified functor.
-	std::string mDefaultFunctor;
-	// The form data associated with a given notification (buttons, text boxes, etc)
-    LLNotificationFormPtr mForm;
-	// default priority for notifications of this type
-	ENotificationPriority mPriority;
-	// UUID of the audio file to be played when this notification arrives
-	// this is loaded as a name, but looked up to get the UUID upon template load.
-	// If null, it wasn't specified.
-	LLUUID mSoundEffect;
-};
-
-// we want to keep a map of these by name, and it's best to manage them
-// with smart pointers
-typedef boost::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr;
-
-/**
- * @class LLNotification
- * @brief The object that expresses the details of a notification
- * 
- * We make this noncopyable because
- * we want to manage these through LLNotificationPtr, and only
- * ever create one instance of any given notification.
- * 
- * The enable_shared_from_this flag ensures that if we construct
- * a smart pointer from a notification, we'll always get the same
- * shared pointer.
- */
-class LLNotification  : 
-	boost::noncopyable,
-	public boost::enable_shared_from_this<LLNotification>
-{
-LOG_CLASS(LLNotification);
-friend class LLNotifications;
-
-public:
-	// parameter object used to instantiate a new notification
-	struct Params : public LLInitParam::Block<Params>
-	{
-		friend class LLNotification;
-	
-		Mandatory<std::string>					name;
-
-		// optional
-		Optional<LLSD>							substitutions;
-		Optional<LLSD>							payload;
-		Optional<ENotificationPriority>			priority;
-		Optional<LLSD>							form_elements;
-		Optional<LLDate>						timestamp;
-		Optional<LLNotificationContext*>		context;
-
-		struct Functor : public LLInitParam::Choice<Functor>
-		{
-			Alternative<std::string>										name;
-			Alternative<LLNotificationFunctorRegistry::ResponseFunctor>	function;
-
-			Functor()
-			:	name("functor_name"),
-				function("functor")
-			{}
-		};
-		Optional<Functor>						functor;
-
-		Params()
-		:	name("name"),
-			priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED),
-			timestamp("time_stamp")
-		{
-			timestamp = LLDate::now();
-		}
-
-		Params(const std::string& _name) 
-			:	name("name"),
-				priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED),
-				timestamp("time_stamp")
-		{
-			functor.name = _name;
-			name = _name;
-			timestamp = LLDate::now();
-		}
-	};
-
-private:
-	
-	LLUUID mId;
-	LLSD mPayload;
-	LLSD mSubstitutions;
-	LLDate mTimestamp;
-	LLDate mExpiresAt;
-	bool mCancelled;
-	bool mRespondedTo; 	// once the notification has been responded to, this becomes true
-	bool mIgnored;
-	ENotificationPriority mPriority;
-	LLNotificationFormPtr mForm;
-	
-	// a reference to the template
-	LLNotificationTemplatePtr mTemplatep;
-	
-	/*
-	 We want to be able to store and reload notifications so that they can survive
-	 a shutdown/restart of the client. So we can't simply pass in callbacks;
-	 we have to specify a callback mechanism that can be used by name rather than 
-	 by some arbitrary pointer -- and then people have to initialize callbacks 
-	 in some useful location. So we use LLNotificationFunctorRegistry to manage them.
-	 */
-	 std::string mResponseFunctorName;
-	
-	/*
-	 In cases where we want to specify an explict, non-persisted callback, 
-	 we store that in the callback registry under a dynamically generated
-	 key, and store the key in the notification, so we can still look it up
-	 using the same mechanism.
-	 */
-	bool mTemporaryResponder;
-
-	void init(const std::string& template_name, const LLSD& form_elements);
-
-	LLNotification(const Params& p);
-
-	// this is just for making it easy to look things up in a set organized by UUID -- DON'T USE IT
-	// for anything real!
-	LLNotification(LLUUID uuid) : mId(uuid) {}
-
-	void cancel();
-
-	bool payloadContainsAll(const std::vector<std::string>& required_fields) const;
-
-public:
-
-	// constructor from a saved notification
-	LLNotification(const LLSD& sd);
-
-	void setResponseFunctor(std::string const &responseFunctorName);
-
-	typedef enum e_response_template_type
-	{
-		WITHOUT_DEFAULT_BUTTON,
-		WITH_DEFAULT_BUTTON
-	} EResponseTemplateType;
-
-	// return response LLSD filled in with default form contents and (optionally) the default button selected
-	LLSD getResponseTemplate(EResponseTemplateType type = WITHOUT_DEFAULT_BUTTON);
-
-	// returns index of first button with value==TRUE
-	// usually this the button the user clicked on
-	// returns -1 if no button clicked (e.g. form has not been displayed)
-	static S32 getSelectedOption(const LLSD& notification, const LLSD& response);
-	// returns name of first button with value==TRUE
-	static std::string getSelectedOptionName(const LLSD& notification);
-
-	// after someone responds to a notification (usually by clicking a button,
-	// but sometimes by filling out a little form and THEN clicking a button),
-    // the result of the response (the name and value of the button clicked,
-	// plus any other data) should be packaged up as LLSD, then passed as a
-	// parameter to the notification's respond() method here. This will look up
-	// and call the appropriate responder.
-	//
-	// response is notification serialized as LLSD:
-	// ["name"] = notification name
-	// ["form"] = LLSD tree that includes form description and any prefilled form data
-	// ["response"] = form data filled in by user
-	// (including, but not limited to which button they clicked on)
-	// ["payload"] = transaction specific data, such as ["source_id"] (originator of notification),  
-	//				["item_id"] (attached inventory item), etc.
-	// ["substitutions"] = string substitutions used to generate notification message
-    // from the template
-	// ["time"] = time at which notification was generated;
-	// ["expiry"] = time at which notification expires;
-	// ["responseFunctor"] = name of registered functor that handles responses to notification;
-	LLSD asLLSD();
-
-	void respond(const LLSD& sd);
-
-	void setIgnored(bool ignore);
-
-	bool isCancelled() const
-	{
-		return mCancelled;
-	}
-
-	bool isRespondedTo() const
-	{
-		return mRespondedTo;
-	}
-
-	bool isIgnored() const
-	{
-		return mIgnored;
-	}
-
-	const std::string& getName() const
-	{
-		return mTemplatep->mName;
-	}
-	
-	const LLUUID& id() const
-	{
-		return mId;
-	}
-	
-	const LLSD& getPayload() const
-	{
-		return mPayload;
-	}
-
-	const LLSD& getSubstitutions() const
-	{
-		return mSubstitutions;
-	}
-
-	const LLDate& getDate() const
-	{
-		return mTimestamp;
-	}
-
-	std::string getType() const
-	{
-		return (mTemplatep ? mTemplatep->mType : "");
-	}
-
-	std::string getMessage() const;
-	std::string getLabel() const;
-
-	std::string getURL() const;
-//	{
-//		return (mTemplatep ? mTemplatep->mURL : "");
-//	}
-
-	S32 getURLOption() const
-	{
-		return (mTemplatep ? mTemplatep->mURLOption : -1);
-	}
-    
-	S32 getURLOpenExternally() const
-	{
-		return(mTemplatep? mTemplatep->mURLOpenExternally : -1);
-	}
-	
-	const LLNotificationFormPtr getForm();
-
-	const LLDate getExpiration() const
-	{
-		return mExpiresAt;
-	}
-
-	ENotificationPriority getPriority() const
-	{
-		return mPriority;
-	}
-
-	const LLUUID getID() const
-	{
-		return mId;
-	}
-	
-	// comparing two notifications normally means comparing them by UUID (so we can look them
-	// up quickly this way)
-	bool operator<(const LLNotification& rhs) const
-	{
-		return mId < rhs.mId;
-	}
-
-	bool operator==(const LLNotification& rhs) const
-	{
-		return mId == rhs.mId;
-	}
-
-	bool operator!=(const LLNotification& rhs) const
-	{
-		return !operator==(rhs);
-	}
-
-	bool isSameObjectAs(const LLNotification* rhs) const
-	{
-		return this == rhs;
-	}
-	
-	// this object has been updated, so tell all our clients
-	void update();
-
-	void updateFrom(LLNotificationPtr other);
-	
-	// A fuzzy equals comparator.
-	// true only if both notifications have the same template and 
-	//     1) flagged as unique (there can be only one of these) OR 
-	//     2) all required payload fields of each also exist in the other.
-	bool isEquivalentTo(LLNotificationPtr that) const;
-	
-	// if the current time is greater than the expiration, the notification is expired
-	bool isExpired() const
-	{
-		if (mExpiresAt.secondsSinceEpoch() == 0)
-		{
-			return false;
-		}
-		
-		LLDate rightnow = LLDate::now();
-		return rightnow > mExpiresAt;
-	}
-	
-	std::string summarize() const;
-
-	bool hasUniquenessConstraints() const { return (mTemplatep ? mTemplatep->mUnique : false);}
-
-	virtual ~LLNotification() {}
-};
-
-std::ostream& operator<<(std::ostream& s, const LLNotification& notification);
-
-namespace LLNotificationFilters
-{
-	// a sample filter
-	bool includeEverything(LLNotificationPtr p);
-
-	typedef enum e_comparison 
-	{ 
-		EQUAL, 
-		LESS, 
-		GREATER, 
-		LESS_EQUAL, 
-		GREATER_EQUAL 
-	} EComparison;
-
-	// generic filter functor that takes method or member variable reference
-	template<typename T>
-	struct filterBy
-	{
-		typedef boost::function<T (LLNotificationPtr)>	field_t;
-		typedef typename boost::remove_reference<T>::type		value_t;
-		
-		filterBy(field_t field, value_t value, EComparison comparison = EQUAL) 
-			:	mField(field), 
-				mFilterValue(value),
-				mComparison(comparison)
-		{
-		}		
-		
-		bool operator()(LLNotificationPtr p)
-		{
-			switch(mComparison)
-			{
-			case EQUAL:
-				return mField(p) == mFilterValue;
-			case LESS:
-				return mField(p) < mFilterValue;
-			case GREATER:
-				return mField(p) > mFilterValue;
-			case LESS_EQUAL:
-				return mField(p) <= mFilterValue;
-			case GREATER_EQUAL:
-				return mField(p) >= mFilterValue;
-			default:
-				return false;
-			}
-		}
-
-		field_t mField;
-		value_t	mFilterValue;
-		EComparison mComparison;
-	};
-};
-
-namespace LLNotificationComparators
-{
-	typedef enum e_direction { ORDER_DECREASING, ORDER_INCREASING } EDirection;
-
-	// generic order functor that takes method or member variable reference
-	template<typename T>
-	struct orderBy
-	{
-		typedef boost::function<T (LLNotificationPtr)> field_t;
-		orderBy(field_t field, EDirection = ORDER_INCREASING) : mField(field) {}
-		bool operator()(LLNotificationPtr lhs, LLNotificationPtr rhs)
-		{
-			if (mDirection == ORDER_DECREASING)
-			{
-				return mField(lhs) > mField(rhs);
-			}
-			else
-			{
-				return mField(lhs) < mField(rhs);
-			}
-		}
-
-		field_t mField;
-		EDirection mDirection;
-	};
-
-	struct orderByUUID : public orderBy<const LLUUID&>
-	{
-		orderByUUID(EDirection direction = ORDER_INCREASING) : orderBy<const LLUUID&>(&LLNotification::id, direction) {}
-	};
-
-	struct orderByDate : public orderBy<const LLDate&>
-	{
-		orderByDate(EDirection direction = ORDER_INCREASING) : orderBy<const LLDate&>(&LLNotification::getDate, direction) {}
-	};
-};
-
-typedef boost::function<bool (LLNotificationPtr)> LLNotificationFilter;
-typedef boost::function<bool (LLNotificationPtr, LLNotificationPtr)> LLNotificationComparator;
-typedef std::set<LLNotificationPtr, LLNotificationComparator> LLNotificationSet;
-typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap;
-
-// ========================================================
-// Abstract base class (interface) for a channel; also used for the master container.
-// This lets us arrange channels into a call hierarchy.
-
-// We maintain a heirarchy of notification channels; events are always started at the top
-// and propagated through the hierarchy only if they pass a filter.
-// Any channel can be created with a parent. A null parent (empty string) means it's
-// tied to the root of the tree (the LLNotifications class itself).
-// The default hierarchy looks like this:
-//
-// LLNotifications --+-- Expiration --+-- Mute --+-- Ignore --+-- Visible --+-- History
-//                                                                          +-- Alerts
-//                                                                          +-- Notifications
-//
-// In general, new channels that want to only see notifications that pass through 
-// all of the built-in tests should attach to the "Visible" channel
-//
-class LLNotificationChannelBase :
-	public LLEventTrackable
-{
-	LOG_CLASS(LLNotificationChannelBase);
-public:
-	LLNotificationChannelBase(LLNotificationFilter filter, LLNotificationComparator comp) : 
-		mFilter(filter), mItems(comp) 
-	{}
-	virtual ~LLNotificationChannelBase() {}
-	// you can also connect to a Channel, so you can be notified of
-	// changes to this channel
-	template <typename LISTENER>
-    LLBoundListener connectChanged(const LISTENER& slot)
-    {
-        // Examine slot to see if it binds an LLEventTrackable subclass, or a
-        // boost::shared_ptr to something, or a boost::weak_ptr to something.
-        // Call this->connectChangedImpl() to actually connect it.
-        return LLEventDetail::visit_and_connect(slot,
-                                  boost::bind(&LLNotificationChannelBase::connectChangedImpl,
-                                              this,
-                                              _1));
-    }
-    template <typename LISTENER>
-	LLBoundListener connectPassedFilter(const LISTENER& slot)
-    {
-        // see comments in connectChanged()
-        return LLEventDetail::visit_and_connect(slot,
-                                  boost::bind(&LLNotificationChannelBase::connectPassedFilterImpl,
-                                              this,
-                                              _1));
-    }
-    template <typename LISTENER>
-	LLBoundListener connectFailedFilter(const LISTENER& slot)
-    {
-        // see comments in connectChanged()
-        return LLEventDetail::visit_and_connect(slot,
-                                  boost::bind(&LLNotificationChannelBase::connectFailedFilterImpl,
-                                              this,
-                                              _1));
-    }
-
-	// use this when items change or to add a new one
-	bool updateItem(const LLSD& payload);
-	const LLNotificationFilter& getFilter() { return mFilter; }
-
-protected:
-    LLBoundListener connectChangedImpl(const LLEventListener& slot);
-    LLBoundListener connectPassedFilterImpl(const LLEventListener& slot);
-    LLBoundListener connectFailedFilterImpl(const LLEventListener& slot);
-
-	LLNotificationSet mItems;
-	LLStandardSignal mChanged;
-	LLStandardSignal mPassedFilter;
-	LLStandardSignal mFailedFilter;
-	
-	// these are action methods that subclasses can override to take action 
-	// on specific types of changes; the management of the mItems list is
-	// still handled by the generic handler.
-	virtual void onLoad(LLNotificationPtr p) {}
-	virtual void onAdd(LLNotificationPtr p) {}
-	virtual void onDelete(LLNotificationPtr p) {}
-	virtual void onChange(LLNotificationPtr p) {}
-
-	bool updateItem(const LLSD& payload, LLNotificationPtr pNotification);
-	LLNotificationFilter mFilter;
-};
-
-// The type of the pointers that we're going to manage in the NotificationQueue system
-// Because LLNotifications is a singleton, we don't actually expect to ever 
-// destroy it, but if it becomes necessary to do so, the shared_ptr model
-// will ensure that we don't leak resources.
-class LLNotificationChannel;
-typedef boost::shared_ptr<LLNotificationChannel> LLNotificationChannelPtr;
-
-// manages a list of notifications
-// Note that if this is ever copied around, we might find ourselves with multiple copies
-// of a queue with notifications being added to different nonequivalent copies. So we 
-// make it inherit from boost::noncopyable, and then create a map of shared_ptr to manage it.
-// 
-// NOTE: LLNotificationChannel is self-registering. The *correct* way to create one is to 
-// do something like:
-//		LLNotificationChannel::buildChannel("name", "parent"...);
-// This returns an LLNotificationChannelPtr, which you can store, or
-// you can then retrieve the channel by using the registry:
-//		LLNotifications::instance().getChannel("name")...
-//
-class LLNotificationChannel : 
-	boost::noncopyable, 
-	public LLNotificationChannelBase
-{
-	LOG_CLASS(LLNotificationChannel);
-
-public:  
-	virtual ~LLNotificationChannel() {}
-	typedef LLNotificationSet::iterator Iterator;
-    
-	std::string getName() const { return mName; }
-	std::string getParentChannelName() { return mParent; }
-    
-    bool isEmpty() const;
-    
-    Iterator begin();
-    Iterator end();
-
-    // Channels have a comparator to control sort order;
-	// the default sorts by arrival date
-    void setComparator(LLNotificationComparator comparator);
-	
-	std::string summarize();
-
-	// factory method for constructing these channels; since they're self-registering,
-	// we want to make sure that you can't use new to make them
-	static LLNotificationChannelPtr buildChannel(const std::string& name, const std::string& parent,
-						LLNotificationFilter filter=LLNotificationFilters::includeEverything, 
-						LLNotificationComparator comparator=LLNotificationComparators::orderByUUID());
-	
-protected:
-    // Notification Channels have a filter, which determines which notifications
-	// will be added to this channel. 
-	// Channel filters cannot change.
-	// Channels have a protected constructor so you can't make smart pointers that don't 
-	// come from our internal reference; call NotificationChannel::build(args)
-	LLNotificationChannel(const std::string& name, const std::string& parent,
-						  LLNotificationFilter filter, LLNotificationComparator comparator);
-
-private:
-	std::string mName;
-	std::string mParent;
-	LLNotificationComparator mComparator;
-};
-
-
-
-class LLNotifications : 
-	public LLSingleton<LLNotifications>, 
-	public LLNotificationChannelBase
-{
-	LOG_CLASS(LLNotifications);
-
-	friend class LLSingleton<LLNotifications>;
-public:
-	// load notification descriptions from file; 
-	// OK to call more than once because it will reload
-	bool loadTemplates();  
-	LLXMLNodePtr checkForXMLTemplate(LLXMLNodePtr item);
-	
-	// Add a simple notification (from XUI)
-	void addFromCallback(const LLSD& name);
-	
-	// we provide a collection of simple add notification functions so that it's reasonable to create notifications in one line
-	LLNotificationPtr add(const std::string& name, 
-						const LLSD& substitutions = LLSD(), 
-						const LLSD& payload = LLSD());
-	LLNotificationPtr add(const std::string& name, 
-						const LLSD& substitutions, 
-						const LLSD& payload, 
-						const std::string& functor_name);
-	LLNotificationPtr add(const std::string& name, 
-						const LLSD& substitutions, 
-						const LLSD& payload, 
-						LLNotificationFunctorRegistry::ResponseFunctor functor);
-	LLNotificationPtr add(const LLNotification::Params& p);
-
-	void add(const LLNotificationPtr pNotif);
-	void cancel(LLNotificationPtr pNotif);
-	void update(const LLNotificationPtr pNotif);
-
-	LLNotificationPtr find(LLUUID uuid);
-	
-	typedef boost::function<void (LLNotificationPtr)> NotificationProcess;
-	
-	void forEachNotification(NotificationProcess process);
-
-	// This is all stuff for managing the templates
-	// take your template out
-	LLNotificationTemplatePtr getTemplate(const std::string& name);
-	
-	// get the whole collection
-	typedef std::vector<std::string> TemplateNames;
-	TemplateNames getTemplateNames() const;  // returns a list of notification names
-	
-	typedef std::map<std::string, LLNotificationTemplatePtr> TemplateMap;
-
-	TemplateMap::const_iterator templatesBegin() { return mTemplates.begin(); }
-	TemplateMap::const_iterator templatesEnd() { return mTemplates.end(); }
-
-	// test for existence
-	bool templateExists(const std::string& name);
-	// useful if you're reloading the file
-	void clearTemplates();   // erase all templates
-
-	void forceResponse(const LLNotification::Params& params, S32 option);
-
-	void createDefaultChannels();
-
-	typedef std::map<std::string, LLNotificationChannelPtr> ChannelMap;
-	ChannelMap mChannels;
-
-	void addChannel(LLNotificationChannelPtr pChan);
-	LLNotificationChannelPtr getChannel(const std::string& channelName);
-	
-	std::string getGlobalString(const std::string& key) const;
-
-	void setIgnoreAllNotifications(bool ignore);
-	bool getIgnoreAllNotifications();
-
-private:
-	// we're a singleton, so we don't have a public constructor
-	LLNotifications();
-	/*virtual*/ void initSingleton();
-	
-	void loadPersistentNotifications();
-
-	bool expirationFilter(LLNotificationPtr pNotification);
-	bool expirationHandler(const LLSD& payload);
-	bool uniqueFilter(LLNotificationPtr pNotification);
-	bool uniqueHandler(const LLSD& payload);
-	bool failedUniquenessTest(const LLSD& payload);
-	LLNotificationChannelPtr pHistoryChannel;
-	LLNotificationChannelPtr pExpirationChannel;
-	
-	// put your template in
-	bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate);
-	TemplateMap mTemplates;
-
-	std::string mFileName;
-	
-	typedef std::map<std::string, LLXMLNodePtr> XMLTemplateMap;
-	XMLTemplateMap mXmlTemplates;
-
-	LLNotificationMap mUniqueNotifications;
-	
-	typedef std::map<std::string, std::string> GlobalStringMap;
-	GlobalStringMap mGlobalStrings;
-
-	bool mIgnoreAllNotifications;
-};
-
-
-#endif//LL_LLNOTIFICATIONS_H
-
+/**
+* @file llnotifications.h
+* @brief Non-UI manager and support for keeping a prioritized list of notifications
+* @author Q (with assistance from Richard and Coco)
+*
+* $LicenseInfo:firstyear=2008&license=viewergpl$
+* 
+* Copyright (c) 2008-2009, Linden Research, Inc.
+* 
+* Second Life Viewer Source Code
+* The source code in this file ("Source Code") is provided by Linden Lab
+* to you under the terms of the GNU General Public License, version 2.0
+* ("GPL"), unless you have obtained a separate licensing agreement
+* ("Other License"), formally executed by you and Linden Lab.  Terms of
+* the GPL can be found in doc/GPL-license.txt in this distribution, or
+* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+* 
+* There are special exceptions to the terms and conditions of the GPL as
+* it is applied to this Source Code. View the full text of the exception
+* in the file doc/FLOSS-exception.txt in this software distribution, or
+* online at
+* http://secondlifegrid.net/programs/open_source/licensing/flossexception
+* 
+* By copying, modifying or distributing this software, you acknowledge
+* that you have read and understood your obligations described above,
+* and agree to abide by those obligations.
+* 
+* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+* COMPLETENESS OR PERFORMANCE.
+* $/LicenseInfo$
+*/
+
+#ifndef LL_LLNOTIFICATIONS_H
+#define LL_LLNOTIFICATIONS_H
+
+/**
+ * This system is intended to provide a singleton mechanism for adding
+ * notifications to one of an arbitrary set of event channels.
+ * 
+ * Controlling JIRA: DEV-9061
+ *
+ * Every notification has (see code for full list):
+ *  - a textual name, which is used to look up its template in the XML files
+ *  - a payload, which is a block of LLSD
+ *  - a channel, which is normally extracted from the XML files but
+ *	  can be overridden.
+ *  - a timestamp, used to order the notifications
+ *  - expiration time -- if nonzero, specifies a time after which the
+ *    notification will no longer be valid.
+ *  - a callback name and a couple of status bits related to callbacks (see below)
+ * 
+ * There is a management class called LLNotifications, which is an LLSingleton.
+ * The class maintains a collection of all of the notifications received
+ * or processed during this session, and also manages the persistence
+ * of those notifications that must be persisted.
+ * 
+ * We also have Channels. A channel is a view on a collection of notifications;
+ * The collection is defined by a filter function that controls which
+ * notifications are in the channel, and its ordering is controlled by 
+ * a comparator. 
+ *
+ * There is a hierarchy of channels; notifications flow down from
+ * the management class (LLNotifications, which itself inherits from
+ * The channel base class) to the individual channels.
+ * Any change to notifications (add, delete, modify) is 
+ * automatically propagated through the channel hierarchy.
+ * 
+ * We provide methods for adding a new notification, for removing
+ * one, and for managing channels. Channels are relatively cheap to construct
+ * and maintain, so in general, human interfaces should use channels to
+ * select and manage their lists of notifications.
+ * 
+ * We also maintain a collection of templates that are loaded from the 
+ * XML file of template translations. The system supports substitution
+ * of named variables from the payload into the XML file.
+ * 
+ * By default, only the "unknown message" template is built into the system.
+ * It is not an error to add a notification that's not found in the 
+ * template system, but it is logged.
+ *
+ */
+
+#include <string>
+#include <list>
+#include <vector>
+#include <map>
+#include <set>
+#include <iomanip>
+#include <sstream>
+
+#include <boost/utility.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/type_traits.hpp>
+
+// we want to minimize external dependencies, but this one is important
+#include "llsd.h"
+
+// and we need this to manage the notification callbacks
+#include "llevents.h"
+#include "llfunctorregistry.h"
+#include "llui.h"
+#include "llmemory.h"
+
+class LLNotification;
+typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
+
+	
+typedef enum e_notification_priority
+{
+	NOTIFICATION_PRIORITY_UNSPECIFIED,
+	NOTIFICATION_PRIORITY_LOW,
+	NOTIFICATION_PRIORITY_NORMAL,
+	NOTIFICATION_PRIORITY_HIGH,
+	NOTIFICATION_PRIORITY_CRITICAL
+} ENotificationPriority;
+
+typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder;
+
+typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;
+typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration;
+
+// context data that can be looked up via a notification's payload by the display logic
+// derive from this class to implement specific contexts
+class LLNotificationContext : public LLInstanceTracker<LLNotificationContext, LLUUID>
+{
+public:
+	LLNotificationContext() : LLInstanceTracker<LLNotificationContext, LLUUID>(LLUUID::generateNewID())
+	{
+	}
+
+	virtual ~LLNotificationContext() {}
+
+	LLSD asLLSD() const
+	{
+		return getKey();
+	}
+
+private:
+
+};
+
+// Contains notification form data, such as buttons and text fields along with
+// manipulator functions
+class LLNotificationForm
+{
+	LOG_CLASS(LLNotificationForm);
+
+public:
+	typedef enum e_ignore_type
+	{ 
+		IGNORE_NO,
+		IGNORE_WITH_DEFAULT_RESPONSE, 
+		IGNORE_WITH_LAST_RESPONSE, 
+		IGNORE_SHOW_AGAIN 
+	} EIgnoreType;
+
+	LLNotificationForm();
+	LLNotificationForm(const LLSD& sd);
+	LLNotificationForm(const std::string& name, const LLXMLNodePtr xml_node);
+
+	LLSD asLLSD() const;
+
+	S32 getNumElements() { return mFormData.size(); }
+	LLSD getElement(S32 index) { return mFormData.get(index); }
+	LLSD getElement(const std::string& element_name);
+	bool hasElement(const std::string& element_name);
+	void addElement(const std::string& type, const std::string& name, const LLSD& value = LLSD());
+	void formatElements(const LLSD& substitutions);
+	// appends form elements from another form serialized as LLSD
+	void append(const LLSD& sub_form);
+	std::string getDefaultOption();
+
+	EIgnoreType getIgnoreType() { return mIgnore; }
+	std::string getIgnoreMessage() { return mIgnoreMsg; }
+
+private:
+	LLSD	mFormData;
+	EIgnoreType mIgnore;
+	std::string mIgnoreMsg;
+};
+
+typedef boost::shared_ptr<LLNotificationForm> LLNotificationFormPtr;
+
+// This is the class of object read from the XML file (notifications.xml, 
+// from the appropriate local language directory).
+struct LLNotificationTemplate
+{
+	LLNotificationTemplate();
+    // the name of the notification -- the key used to identify it
+    // Ideally, the key should follow variable naming rules 
+    // (no spaces or punctuation).
+    std::string mName;
+    // The type of the notification
+    // used to control which queue it's stored in
+    std::string mType;
+    // The text used to display the notification. Replaceable parameters
+    // are enclosed in square brackets like this [].
+    std::string mMessage;
+	// The label for the notification; used for 
+	// certain classes of notification (those with a window and a window title). 
+	// Also used when a notification pops up underneath the current one.
+	// Replaceable parameters can be used in the label.
+	std::string mLabel;
+	// The name of the icon image. This should include an extension.
+	std::string mIcon;
+    // This is the Highlander bit -- "There Can Be Only One"
+    // An outstanding notification with this bit set
+    // is updated by an incoming notification with the same name,
+    // rather than creating a new entry in the queue.
+    // (used for things like progress indications, or repeating warnings
+    // like "the grid is going down in N minutes")
+    bool mUnique;
+    // if we want to be unique only if a certain part of the payload is constant
+    // specify the field names for the payload. The notification will only be
+    // combined if all of the fields named in the context are identical in the
+    // new and the old notification; otherwise, the notification will be
+    // duplicated. This is to support suppressing duplicate offers from the same
+    // sender but still differentiating different offers. Example: Invitation to
+    // conference chat.
+    std::vector<std::string> mUniqueContext;
+    // If this notification expires automatically, this value will be 
+    // nonzero, and indicates the number of seconds for which the notification
+    // will be valid (a teleport offer, for example, might be valid for 
+    // 300 seconds). 
+    U32 mExpireSeconds;
+    // if the offer expires, one of the options is chosen automatically
+    // based on its "value" parameter. This controls which one. 
+    // If expireSeconds is specified, expireOption should also be specified.
+    U32 mExpireOption;
+    // if the notification contains a url, it's stored here (and replaced 
+    // into the message where [_URL] is found)
+    std::string mURL;
+    // if there's a URL in the message, this controls which option visits
+    // that URL. Obsolete this and eliminate the buttons for affected
+    // messages when we allow clickable URLs in the UI
+    U32 mURLOption;
+	
+	U32 mURLOpenExternally;
+	//This is a flag that tells if the url needs to open externally dispite 
+	//what the user setting is.
+	
+	// does this notification persist across sessions? if so, it will be
+	// serialized to disk on first receipt and read on startup
+	bool mPersist;
+	// This is the name of the default functor, if present, to be
+	// used for the notification's callback. It is optional, and used only if 
+	// the notification is constructed without an identified functor.
+	std::string mDefaultFunctor;
+	// The form data associated with a given notification (buttons, text boxes, etc)
+    LLNotificationFormPtr mForm;
+	// default priority for notifications of this type
+	ENotificationPriority mPriority;
+	// UUID of the audio file to be played when this notification arrives
+	// this is loaded as a name, but looked up to get the UUID upon template load.
+	// If null, it wasn't specified.
+	LLUUID mSoundEffect;
+};
+
+// we want to keep a map of these by name, and it's best to manage them
+// with smart pointers
+typedef boost::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr;
+
+/**
+ * @class LLNotification
+ * @brief The object that expresses the details of a notification
+ * 
+ * We make this noncopyable because
+ * we want to manage these through LLNotificationPtr, and only
+ * ever create one instance of any given notification.
+ * 
+ * The enable_shared_from_this flag ensures that if we construct
+ * a smart pointer from a notification, we'll always get the same
+ * shared pointer.
+ */
+class LLNotification  : 
+	boost::noncopyable,
+	public boost::enable_shared_from_this<LLNotification>
+{
+LOG_CLASS(LLNotification);
+friend class LLNotifications;
+
+public:
+	// parameter object used to instantiate a new notification
+	struct Params : public LLInitParam::Block<Params>
+	{
+		friend class LLNotification;
+	
+		Mandatory<std::string>					name;
+
+		// optional
+		Optional<LLSD>							substitutions;
+		Optional<LLSD>							payload;
+		Optional<ENotificationPriority>			priority;
+		Optional<LLSD>							form_elements;
+		Optional<LLDate>						timestamp;
+		Optional<LLNotificationContext*>		context;
+
+		struct Functor : public LLInitParam::Choice<Functor>
+		{
+			Alternative<std::string>										name;
+			Alternative<LLNotificationFunctorRegistry::ResponseFunctor>	function;
+
+			Functor()
+			:	name("functor_name"),
+				function("functor")
+			{}
+		};
+		Optional<Functor>						functor;
+
+		Params()
+		:	name("name"),
+			priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED),
+			timestamp("time_stamp")
+		{
+			timestamp = LLDate::now();
+		}
+
+		Params(const std::string& _name) 
+			:	name("name"),
+				priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED),
+				timestamp("time_stamp")
+		{
+			functor.name = _name;
+			name = _name;
+			timestamp = LLDate::now();
+		}
+	};
+
+private:
+	
+	LLUUID mId;
+	LLSD mPayload;
+	LLSD mSubstitutions;
+	LLDate mTimestamp;
+	LLDate mExpiresAt;
+	bool mCancelled;
+	bool mRespondedTo; 	// once the notification has been responded to, this becomes true
+	bool mIgnored;
+	ENotificationPriority mPriority;
+	LLNotificationFormPtr mForm;
+	
+	// a reference to the template
+	LLNotificationTemplatePtr mTemplatep;
+	
+	/*
+	 We want to be able to store and reload notifications so that they can survive
+	 a shutdown/restart of the client. So we can't simply pass in callbacks;
+	 we have to specify a callback mechanism that can be used by name rather than 
+	 by some arbitrary pointer -- and then people have to initialize callbacks 
+	 in some useful location. So we use LLNotificationFunctorRegistry to manage them.
+	 */
+	 std::string mResponseFunctorName;
+	
+	/*
+	 In cases where we want to specify an explict, non-persisted callback, 
+	 we store that in the callback registry under a dynamically generated
+	 key, and store the key in the notification, so we can still look it up
+	 using the same mechanism.
+	 */
+	bool mTemporaryResponder;
+
+	void init(const std::string& template_name, const LLSD& form_elements);
+
+	LLNotification(const Params& p);
+
+	// this is just for making it easy to look things up in a set organized by UUID -- DON'T USE IT
+	// for anything real!
+	LLNotification(LLUUID uuid) : mId(uuid) {}
+
+	void cancel();
+
+	bool payloadContainsAll(const std::vector<std::string>& required_fields) const;
+
+public:
+
+	// constructor from a saved notification
+	LLNotification(const LLSD& sd);
+
+	void setResponseFunctor(std::string const &responseFunctorName);
+
+	typedef enum e_response_template_type
+	{
+		WITHOUT_DEFAULT_BUTTON,
+		WITH_DEFAULT_BUTTON
+	} EResponseTemplateType;
+
+	// return response LLSD filled in with default form contents and (optionally) the default button selected
+	LLSD getResponseTemplate(EResponseTemplateType type = WITHOUT_DEFAULT_BUTTON);
+
+	// returns index of first button with value==TRUE
+	// usually this the button the user clicked on
+	// returns -1 if no button clicked (e.g. form has not been displayed)
+	static S32 getSelectedOption(const LLSD& notification, const LLSD& response);
+	// returns name of first button with value==TRUE
+	static std::string getSelectedOptionName(const LLSD& notification);
+
+	// after someone responds to a notification (usually by clicking a button,
+	// but sometimes by filling out a little form and THEN clicking a button),
+    // the result of the response (the name and value of the button clicked,
+	// plus any other data) should be packaged up as LLSD, then passed as a
+	// parameter to the notification's respond() method here. This will look up
+	// and call the appropriate responder.
+	//
+	// response is notification serialized as LLSD:
+	// ["name"] = notification name
+	// ["form"] = LLSD tree that includes form description and any prefilled form data
+	// ["response"] = form data filled in by user
+	// (including, but not limited to which button they clicked on)
+	// ["payload"] = transaction specific data, such as ["source_id"] (originator of notification),  
+	//				["item_id"] (attached inventory item), etc.
+	// ["substitutions"] = string substitutions used to generate notification message
+    // from the template
+	// ["time"] = time at which notification was generated;
+	// ["expiry"] = time at which notification expires;
+	// ["responseFunctor"] = name of registered functor that handles responses to notification;
+	LLSD asLLSD();
+
+	void respond(const LLSD& sd);
+
+	void setIgnored(bool ignore);
+
+	bool isCancelled() const
+	{
+		return mCancelled;
+	}
+
+	bool isRespondedTo() const
+	{
+		return mRespondedTo;
+	}
+
+	bool isIgnored() const
+	{
+		return mIgnored;
+	}
+
+	const std::string& getName() const
+	{
+		return mTemplatep->mName;
+	}
+	
+	const LLUUID& id() const
+	{
+		return mId;
+	}
+	
+	const LLSD& getPayload() const
+	{
+		return mPayload;
+	}
+
+	const LLSD& getSubstitutions() const
+	{
+		return mSubstitutions;
+	}
+
+	const LLDate& getDate() const
+	{
+		return mTimestamp;
+	}
+
+	std::string getType() const
+	{
+		return (mTemplatep ? mTemplatep->mType : "");
+	}
+
+	std::string getMessage() const;
+	std::string getLabel() const;
+
+	std::string getURL() const;
+//	{
+//		return (mTemplatep ? mTemplatep->mURL : "");
+//	}
+
+	S32 getURLOption() const
+	{
+		return (mTemplatep ? mTemplatep->mURLOption : -1);
+	}
+    
+	S32 getURLOpenExternally() const
+	{
+		return(mTemplatep? mTemplatep->mURLOpenExternally : -1);
+	}
+	
+	const LLNotificationFormPtr getForm();
+
+	const LLDate getExpiration() const
+	{
+		return mExpiresAt;
+	}
+
+	ENotificationPriority getPriority() const
+	{
+		return mPriority;
+	}
+
+	const LLUUID getID() const
+	{
+		return mId;
+	}
+	
+	// comparing two notifications normally means comparing them by UUID (so we can look them
+	// up quickly this way)
+	bool operator<(const LLNotification& rhs) const
+	{
+		return mId < rhs.mId;
+	}
+
+	bool operator==(const LLNotification& rhs) const
+	{
+		return mId == rhs.mId;
+	}
+
+	bool operator!=(const LLNotification& rhs) const
+	{
+		return !operator==(rhs);
+	}
+
+	bool isSameObjectAs(const LLNotification* rhs) const
+	{
+		return this == rhs;
+	}
+	
+	// this object has been updated, so tell all our clients
+	void update();
+
+	void updateFrom(LLNotificationPtr other);
+	
+	// A fuzzy equals comparator.
+	// true only if both notifications have the same template and 
+	//     1) flagged as unique (there can be only one of these) OR 
+	//     2) all required payload fields of each also exist in the other.
+	bool isEquivalentTo(LLNotificationPtr that) const;
+	
+	// if the current time is greater than the expiration, the notification is expired
+	bool isExpired() const
+	{
+		if (mExpiresAt.secondsSinceEpoch() == 0)
+		{
+			return false;
+		}
+		
+		LLDate rightnow = LLDate::now();
+		return rightnow > mExpiresAt;
+	}
+	
+	std::string summarize() const;
+
+	bool hasUniquenessConstraints() const { return (mTemplatep ? mTemplatep->mUnique : false);}
+
+	virtual ~LLNotification() {}
+};
+
+std::ostream& operator<<(std::ostream& s, const LLNotification& notification);
+
+namespace LLNotificationFilters
+{
+	// a sample filter
+	bool includeEverything(LLNotificationPtr p);
+
+	typedef enum e_comparison 
+	{ 
+		EQUAL, 
+		LESS, 
+		GREATER, 
+		LESS_EQUAL, 
+		GREATER_EQUAL 
+	} EComparison;
+
+	// generic filter functor that takes method or member variable reference
+	template<typename T>
+	struct filterBy
+	{
+		typedef boost::function<T (LLNotificationPtr)>	field_t;
+		typedef typename boost::remove_reference<T>::type		value_t;
+		
+		filterBy(field_t field, value_t value, EComparison comparison = EQUAL) 
+			:	mField(field), 
+				mFilterValue(value),
+				mComparison(comparison)
+		{
+		}		
+		
+		bool operator()(LLNotificationPtr p)
+		{
+			switch(mComparison)
+			{
+			case EQUAL:
+				return mField(p) == mFilterValue;
+			case LESS:
+				return mField(p) < mFilterValue;
+			case GREATER:
+				return mField(p) > mFilterValue;
+			case LESS_EQUAL:
+				return mField(p) <= mFilterValue;
+			case GREATER_EQUAL:
+				return mField(p) >= mFilterValue;
+			default:
+				return false;
+			}
+		}
+
+		field_t mField;
+		value_t	mFilterValue;
+		EComparison mComparison;
+	};
+};
+
+namespace LLNotificationComparators
+{
+	typedef enum e_direction { ORDER_DECREASING, ORDER_INCREASING } EDirection;
+
+	// generic order functor that takes method or member variable reference
+	template<typename T>
+	struct orderBy
+	{
+		typedef boost::function<T (LLNotificationPtr)> field_t;
+		orderBy(field_t field, EDirection = ORDER_INCREASING) : mField(field) {}
+		bool operator()(LLNotificationPtr lhs, LLNotificationPtr rhs)
+		{
+			if (mDirection == ORDER_DECREASING)
+			{
+				return mField(lhs) > mField(rhs);
+			}
+			else
+			{
+				return mField(lhs) < mField(rhs);
+			}
+		}
+
+		field_t mField;
+		EDirection mDirection;
+	};
+
+	struct orderByUUID : public orderBy<const LLUUID&>
+	{
+		orderByUUID(EDirection direction = ORDER_INCREASING) : orderBy<const LLUUID&>(&LLNotification::id, direction) {}
+	};
+
+	struct orderByDate : public orderBy<const LLDate&>
+	{
+		orderByDate(EDirection direction = ORDER_INCREASING) : orderBy<const LLDate&>(&LLNotification::getDate, direction) {}
+	};
+};
+
+typedef boost::function<bool (LLNotificationPtr)> LLNotificationFilter;
+typedef boost::function<bool (LLNotificationPtr, LLNotificationPtr)> LLNotificationComparator;
+typedef std::set<LLNotificationPtr, LLNotificationComparator> LLNotificationSet;
+typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap;
+
+// ========================================================
+// Abstract base class (interface) for a channel; also used for the master container.
+// This lets us arrange channels into a call hierarchy.
+
+// We maintain a heirarchy of notification channels; events are always started at the top
+// and propagated through the hierarchy only if they pass a filter.
+// Any channel can be created with a parent. A null parent (empty string) means it's
+// tied to the root of the tree (the LLNotifications class itself).
+// The default hierarchy looks like this:
+//
+// LLNotifications --+-- Expiration --+-- Mute --+-- Ignore --+-- Visible --+-- History
+//                                                                          +-- Alerts
+//                                                                          +-- Notifications
+//
+// In general, new channels that want to only see notifications that pass through 
+// all of the built-in tests should attach to the "Visible" channel
+//
+class LLNotificationChannelBase :
+	public LLEventTrackable
+{
+	LOG_CLASS(LLNotificationChannelBase);
+public:
+	LLNotificationChannelBase(LLNotificationFilter filter, LLNotificationComparator comp) : 
+		mFilter(filter), mItems(comp) 
+	{}
+	virtual ~LLNotificationChannelBase() {}
+	// you can also connect to a Channel, so you can be notified of
+	// changes to this channel
+	template <typename LISTENER>
+    LLBoundListener connectChanged(const LISTENER& slot)
+    {
+        // Examine slot to see if it binds an LLEventTrackable subclass, or a
+        // boost::shared_ptr to something, or a boost::weak_ptr to something.
+        // Call this->connectChangedImpl() to actually connect it.
+        return LLEventDetail::visit_and_connect(slot,
+                                  boost::bind(&LLNotificationChannelBase::connectChangedImpl,
+                                              this,
+                                              _1));
+    }
+    template <typename LISTENER>
+	LLBoundListener connectPassedFilter(const LISTENER& slot)
+    {
+        // see comments in connectChanged()
+        return LLEventDetail::visit_and_connect(slot,
+                                  boost::bind(&LLNotificationChannelBase::connectPassedFilterImpl,
+                                              this,
+                                              _1));
+    }
+    template <typename LISTENER>
+	LLBoundListener connectFailedFilter(const LISTENER& slot)
+    {
+        // see comments in connectChanged()
+        return LLEventDetail::visit_and_connect(slot,
+                                  boost::bind(&LLNotificationChannelBase::connectFailedFilterImpl,
+                                              this,
+                                              _1));
+    }
+
+	// use this when items change or to add a new one
+	bool updateItem(const LLSD& payload);
+	const LLNotificationFilter& getFilter() { return mFilter; }
+
+protected:
+    LLBoundListener connectChangedImpl(const LLEventListener& slot);
+    LLBoundListener connectPassedFilterImpl(const LLEventListener& slot);
+    LLBoundListener connectFailedFilterImpl(const LLEventListener& slot);
+
+	LLNotificationSet mItems;
+	LLStandardSignal mChanged;
+	LLStandardSignal mPassedFilter;
+	LLStandardSignal mFailedFilter;
+	
+	// these are action methods that subclasses can override to take action 
+	// on specific types of changes; the management of the mItems list is
+	// still handled by the generic handler.
+	virtual void onLoad(LLNotificationPtr p) {}
+	virtual void onAdd(LLNotificationPtr p) {}
+	virtual void onDelete(LLNotificationPtr p) {}
+	virtual void onChange(LLNotificationPtr p) {}
+
+	bool updateItem(const LLSD& payload, LLNotificationPtr pNotification);
+	LLNotificationFilter mFilter;
+};
+
+// The type of the pointers that we're going to manage in the NotificationQueue system
+// Because LLNotifications is a singleton, we don't actually expect to ever 
+// destroy it, but if it becomes necessary to do so, the shared_ptr model
+// will ensure that we don't leak resources.
+class LLNotificationChannel;
+typedef boost::shared_ptr<LLNotificationChannel> LLNotificationChannelPtr;
+
+// manages a list of notifications
+// Note that if this is ever copied around, we might find ourselves with multiple copies
+// of a queue with notifications being added to different nonequivalent copies. So we 
+// make it inherit from boost::noncopyable, and then create a map of shared_ptr to manage it.
+// 
+// NOTE: LLNotificationChannel is self-registering. The *correct* way to create one is to 
+// do something like:
+//		LLNotificationChannel::buildChannel("name", "parent"...);
+// This returns an LLNotificationChannelPtr, which you can store, or
+// you can then retrieve the channel by using the registry:
+//		LLNotifications::instance().getChannel("name")...
+//
+class LLNotificationChannel : 
+	boost::noncopyable, 
+	public LLNotificationChannelBase
+{
+	LOG_CLASS(LLNotificationChannel);
+
+public:  
+	virtual ~LLNotificationChannel() {}
+	typedef LLNotificationSet::iterator Iterator;
+    
+	std::string getName() const { return mName; }
+	std::string getParentChannelName() { return mParent; }
+    
+    bool isEmpty() const;
+    
+    Iterator begin();
+    Iterator end();
+
+    // Channels have a comparator to control sort order;
+	// the default sorts by arrival date
+    void setComparator(LLNotificationComparator comparator);
+	
+	std::string summarize();
+
+	// factory method for constructing these channels; since they're self-registering,
+	// we want to make sure that you can't use new to make them
+	static LLNotificationChannelPtr buildChannel(const std::string& name, const std::string& parent,
+						LLNotificationFilter filter=LLNotificationFilters::includeEverything, 
+						LLNotificationComparator comparator=LLNotificationComparators::orderByUUID());
+	
+protected:
+    // Notification Channels have a filter, which determines which notifications
+	// will be added to this channel. 
+	// Channel filters cannot change.
+	// Channels have a protected constructor so you can't make smart pointers that don't 
+	// come from our internal reference; call NotificationChannel::build(args)
+	LLNotificationChannel(const std::string& name, const std::string& parent,
+						  LLNotificationFilter filter, LLNotificationComparator comparator);
+
+private:
+	std::string mName;
+	std::string mParent;
+	LLNotificationComparator mComparator;
+};
+
+
+class LLNotificationsListener;
+
+class LLNotifications : 
+	public LLSingleton<LLNotifications>, 
+	public LLNotificationChannelBase
+{
+	LOG_CLASS(LLNotifications);
+
+	friend class LLSingleton<LLNotifications>;
+public:
+	// load notification descriptions from file; 
+	// OK to call more than once because it will reload
+	bool loadTemplates();  
+	LLXMLNodePtr checkForXMLTemplate(LLXMLNodePtr item);
+	
+	// Add a simple notification (from XUI)
+	void addFromCallback(const LLSD& name);
+	
+	// we provide a collection of simple add notification functions so that it's reasonable to create notifications in one line
+	LLNotificationPtr add(const std::string& name, 
+						const LLSD& substitutions = LLSD(), 
+						const LLSD& payload = LLSD());
+	LLNotificationPtr add(const std::string& name, 
+						const LLSD& substitutions, 
+						const LLSD& payload, 
+						const std::string& functor_name);
+	LLNotificationPtr add(const std::string& name, 
+						const LLSD& substitutions, 
+						const LLSD& payload, 
+						LLNotificationFunctorRegistry::ResponseFunctor functor);
+	LLNotificationPtr add(const LLNotification::Params& p);
+
+	void add(const LLNotificationPtr pNotif);
+	void cancel(LLNotificationPtr pNotif);
+	void update(const LLNotificationPtr pNotif);
+
+	LLNotificationPtr find(LLUUID uuid);
+	
+	typedef boost::function<void (LLNotificationPtr)> NotificationProcess;
+	
+	void forEachNotification(NotificationProcess process);
+
+	// This is all stuff for managing the templates
+	// take your template out
+	LLNotificationTemplatePtr getTemplate(const std::string& name);
+	
+	// get the whole collection
+	typedef std::vector<std::string> TemplateNames;
+	TemplateNames getTemplateNames() const;  // returns a list of notification names
+	
+	typedef std::map<std::string, LLNotificationTemplatePtr> TemplateMap;
+
+	TemplateMap::const_iterator templatesBegin() { return mTemplates.begin(); }
+	TemplateMap::const_iterator templatesEnd() { return mTemplates.end(); }
+
+	// test for existence
+	bool templateExists(const std::string& name);
+	// useful if you're reloading the file
+	void clearTemplates();   // erase all templates
+
+	void forceResponse(const LLNotification::Params& params, S32 option);
+
+	void createDefaultChannels();
+
+	typedef std::map<std::string, LLNotificationChannelPtr> ChannelMap;
+	ChannelMap mChannels;
+
+	void addChannel(LLNotificationChannelPtr pChan);
+	LLNotificationChannelPtr getChannel(const std::string& channelName);
+	
+	std::string getGlobalString(const std::string& key) const;
+
+	void setIgnoreAllNotifications(bool ignore);
+	bool getIgnoreAllNotifications();
+
+private:
+	// we're a singleton, so we don't have a public constructor
+	LLNotifications();
+	/*virtual*/ void initSingleton();
+	
+	void loadPersistentNotifications();
+
+	bool expirationFilter(LLNotificationPtr pNotification);
+	bool expirationHandler(const LLSD& payload);
+	bool uniqueFilter(LLNotificationPtr pNotification);
+	bool uniqueHandler(const LLSD& payload);
+	bool failedUniquenessTest(const LLSD& payload);
+	LLNotificationChannelPtr pHistoryChannel;
+	LLNotificationChannelPtr pExpirationChannel;
+	
+	// put your template in
+	bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate);
+	TemplateMap mTemplates;
+
+	std::string mFileName;
+	
+	typedef std::map<std::string, LLXMLNodePtr> XMLTemplateMap;
+	XMLTemplateMap mXmlTemplates;
+
+	LLNotificationMap mUniqueNotifications;
+	
+	typedef std::map<std::string, std::string> GlobalStringMap;
+	GlobalStringMap mGlobalStrings;
+
+	bool mIgnoreAllNotifications;
+
+    boost::scoped_ptr<LLNotificationsListener> mListener;
+};
+
+
+#endif//LL_LLNOTIFICATIONS_H
+
diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp
new file mode 100644
index 0000000000..d2d83bd6e3
--- /dev/null
+++ b/indra/llui/llnotificationslistener.cpp
@@ -0,0 +1,28 @@
+/**
+ * @file   llnotificationslistener.cpp
+ * @author Brad Kittenbrink
+ * @date   2009-07-08
+ * @brief  Implementation for llnotificationslistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llnotificationslistener.h"
+
+#include "llnotifications.h"
+
+LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) :
+    LLDispatchListener("LLNotifications", "op"),
+    mNotifications(notifications)
+{
+    add("requestAdd", &LLNotificationsListener::requestAdd);
+}
+
+void LLNotificationsListener::requestAdd(const LLSD& event_data) const
+{
+    mNotifications.add(event_data["name"], event_data["substitutions"], event_data["payload"]);
+}
diff --git a/indra/llui/llnotificationslistener.h b/indra/llui/llnotificationslistener.h
new file mode 100644
index 0000000000..a163b00550
--- /dev/null
+++ b/indra/llui/llnotificationslistener.h
@@ -0,0 +1,31 @@
+/**
+ * @file   llnotificationslistener.h
+ * @author Brad Kittenbrink
+ * @date   2009-07-08
+ * @brief  Wrap subset of LLNotifications API in event API for test scripts.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLNOTIFICATIONSLISTENER_H
+#define LL_LLNOTIFICATIONSLISTENER_H
+
+#include "lleventdispatcher.h"
+
+class LLNotifications;
+class LLSD;
+
+class LLNotificationsListener : public LLDispatchListener
+{
+public:
+    LLNotificationsListener(LLNotifications & notifications);
+
+    void requestAdd(LLSD const & event_data) const;
+
+private:
+    LLNotifications & mNotifications;
+};
+
+#endif // LL_LLNOTIFICATIONSLISTENER_H
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b14853777d..947f5bdb20 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1154,6 +1154,8 @@ bool LLAppViewer::mainLoop()
 
 bool LLAppViewer::cleanup()
 {
+    // *TODO - unload event host module here -brad
+
 	//----------------------------------------------
 	//this test code will be removed after the test
 	//test manual call stack tracer
@@ -4132,4 +4134,8 @@ void LLAppViewer::loadEventHostModule(S32 listen_port) const
 	args["listen_port"] = listen_port;
 
 	ll_plugin_start_func(args);
+
+    args = LLSD();
+    args["MESSAGE"] = "EventHost module loaded successfully";
+    LLNotifications::instance().add("SystemMessageTip", args);
 }
-- 
cgit v1.2.3


From 4fc52d1341a778a6e15d6f902d0a39236c319094 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 8 Jul 2009 16:30:24 -0700
Subject: Fix for errors intializing the locale on unrecognized versions of
 windows (like windows 7)

---
 indra/llcommon/llsys.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'indra')

diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 4d03c4d40d..127baa737d 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -128,8 +128,16 @@ LLOSInfo::LLOSInfo() :
 					mOSStringSimple = "Microsoft Windows Vista ";
 				 else mOSStringSimple = "Microsoft Windows Vista Server ";
 			}
+			else if(osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1)
+			{
+				 if(osvi.wProductType == VER_NT_WORKSTATION)
+					mOSStringSimple = "Microsoft Windows 7 ";
+				 else mOSStringSimple = "Microsoft Windows 7 Server ";
+			}
 			else   // Use the registry on early versions of Windows NT.
 			{
+				mOSStringSimple = "Microsoft Windows (unrecognized) ";
+
 				HKEY hKey;
 				WCHAR szProductType[80];
 				DWORD dwBufLen;
-- 
cgit v1.2.3


From bc852ca9276e19ce6cb75d189d58d783a7df5e6f Mon Sep 17 00:00:00 2001
From: "palmer@945battery-guestB-224.lindenlab.com"
 <palmer@945battery-guestB-224.lindenlab.com>
Date: Thu, 9 Jul 2009 16:18:04 -0700
Subject: Line ending changes and Build Params changes from login-api-svn-1

---
 indra/llui/llnotificationslistener.cpp | 12 ++++++------
 indra/llui/llnotificationslistener.h   | 32 ++++++++++++++++----------------
 2 files changed, 22 insertions(+), 22 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp
index d2d83bd6e3..d6e552ca5c 100644
--- a/indra/llui/llnotificationslistener.cpp
+++ b/indra/llui/llnotificationslistener.cpp
@@ -14,12 +14,12 @@
 #include "llnotificationslistener.h"
 
 #include "llnotifications.h"
-
-LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) :
-    LLDispatchListener("LLNotifications", "op"),
-    mNotifications(notifications)
-{
-    add("requestAdd", &LLNotificationsListener::requestAdd);
+
+LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) :
+    LLDispatchListener("LLNotifications", "op"),
+    mNotifications(notifications)
+{
+    add("requestAdd", &LLNotificationsListener::requestAdd);
 }
 
 void LLNotificationsListener::requestAdd(const LLSD& event_data) const
diff --git a/indra/llui/llnotificationslistener.h b/indra/llui/llnotificationslistener.h
index a163b00550..3576cacbdb 100644
--- a/indra/llui/llnotificationslistener.h
+++ b/indra/llui/llnotificationslistener.h
@@ -13,19 +13,19 @@
 #define LL_LLNOTIFICATIONSLISTENER_H
 
 #include "lleventdispatcher.h"
-
-class LLNotifications;
-class LLSD;
-
-class LLNotificationsListener : public LLDispatchListener
-{
-public:
-    LLNotificationsListener(LLNotifications & notifications);
-
-    void requestAdd(LLSD const & event_data) const;
-
-private:
-    LLNotifications & mNotifications;
-};
-
-#endif // LL_LLNOTIFICATIONSLISTENER_H
+
+class LLNotifications;
+class LLSD;
+
+class LLNotificationsListener : public LLDispatchListener
+{
+public:
+    LLNotificationsListener(LLNotifications & notifications);
+
+    void requestAdd(LLSD const & event_data) const;
+
+private:
+    LLNotifications & mNotifications;
+};
+
+#endif // LL_LLNOTIFICATIONSLISTENER_H
-- 
cgit v1.2.3


From b5fef75dad1c0992c63ede83b96da0b1db1f9a37 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Thu, 9 Jul 2009 17:03:20 -0700
Subject: Moveing around DLL copying to support building llcommon.dll and using
 llcommon.dll while running unit tests.

---
 indra/cmake/LLAddBuildTest.cmake |  9 ++++++++-
 indra/cmake/Linking.cmake        |  1 +
 indra/llcommon/CMakeLists.txt    | 10 ++++++++++
 indra/newview/CMakeLists.txt     | 22 +++++++++++++++++-----
 indra/newview/viewer_manifest.py | 12 +++++++-----
 5 files changed, 43 insertions(+), 11 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 4a61725e09..5717bc620a 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -118,9 +118,16 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
     IF(LL_TEST_VERBOSE)
       MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd  = ${TEST_CMD}")
     ENDIF(LL_TEST_VERBOSE)
+	
+	IF(WINDOWS)
+	  set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+	ELSE(WINDOWS)
+	  set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:/usr/lib)
+	ENDIF(WINDOWS)
+
     SET(TEST_SCRIPT_CMD 
       ${CMAKE_COMMAND} 
-      -DLD_LIBRARY_PATH=${ARCH_PREBUILT_DIRS}:/usr/lib
+      -DLD_LIBRARY_PATH=${LD_LIBRARY_PATH}
       -DTEST_CMD:STRING="${TEST_CMD}" 
       -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
       )
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index eaa8a6dc29..ad52a82b20 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -5,6 +5,7 @@ if (NOT STANDALONE)
     set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib)
     set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release)
     set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug)
+	set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
   elseif (LINUX)
     if (VIEWER)
       set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 06a295b410..aaeb4eebc3 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -9,6 +9,10 @@ include(Linking)
 include(Boost)
 include (Pth)
 
+if (WINDOWS)
+    include(CopyWinLibs)
+endif (WINDOWS)
+
 include_directories(
     ${EXPAT_INCLUDE_DIRS}
     ${LLCOMMON_INCLUDE_DIRS}
@@ -234,6 +238,10 @@ list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
 if(LLCOMMON_LINK_SHARED)
     add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
     add_definitions(-DLL_COMMON_BUILD=1)
+	# *FIX:Mani ---
+	# llcommon.dll get written to the DLL staging directory.
+	# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
+	set_target_properties(llcommon PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
 else(LLCOMMON_LINK_SHARED)
     add_library (llcommon ${llcommon_SOURCE_FILES})
 endif(LLCOMMON_LINK_SHARED)
@@ -250,6 +258,8 @@ target_link_libraries(
     ${PTH_LIBRARIES}
     )
 
+add_dependencies(llcommon stage_third_party_libs)
+
 include(LLAddBuildTest)
 SET(llcommon_TEST_SOURCE_FILES
   # WARNING: Please don't write tests against LLCommon or LLMath until this issue is resolved: https://jira.lindenlab.com/jira/browse/DEV-29456
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 53a59031ed..d6108ab06e 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -38,10 +38,6 @@ include(LLKDU)
 include(ViewerMiscLibs)
 include(LLLogin)
 
-if (WINDOWS)
-    include(CopyWinLibs)
-endif (WINDOWS)
-
 include_directories(
     ${DBUSGLIB_INCLUDE_DIRS}
     ${ELFIO_INCLUDE_DIR}
@@ -1252,7 +1248,23 @@ if (WINDOWS)
         COMMENT "Copying message.xml to the runtime folder."
         )
        
-    add_dependencies(${VIEWER_BINARY_NAME} copy_win_libs)
+	if(WINDOWS)
+      # Copy Win Libs...
+	  # This happens at build time, not config time. We can't glob files in this cmake.
+	  # *FIX:Mani Write a sub script to glob the files...
+	  add_custom_command(
+        TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
+        COMMAND ${CMAKE_COMMAND}
+        ARGS
+          -E
+          copy_directory
+          ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}
+         ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+        COMMENT "Copying staged dlls."
+		)
+	endif(WINDOWS)
+	
+	
 
     if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
       add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 7edf0bad6b..0217c8f864 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -168,9 +168,8 @@ class WindowsManifest(ViewerManifest):
 
         # need to get the llcommon.dll from any of the build directories as well
         try:
-            self.path(self.find_existing_file('../llcommon/%s/llcommon.dll' % self.args['configuration']),
-                  dst='llcommon.dll')
             if self.prefix(src=self.args['configuration'], dst=""):
+                self.path('llcommon.dll')
                 self.path('libapr-1.dll')
                 self.path('libaprutil-1.dll')
                 self.path('libapriconv-1.dll')
@@ -181,8 +180,7 @@ class WindowsManifest(ViewerManifest):
 
         # need to get the kdu dll from any of the build directories as well
         try:
-            self.path(self.find_existing_file('../llkdu/%s/llkdu.dll' % self.args['configuration'],
-                '../../libraries/i686-win32/lib/release/llkdu.dll'), 
+            self.path(self.find_existing_file('%s/llkdu.dll' % self.args['configuration']), 
                   dst='llkdu.dll')
             pass
         except:
@@ -394,7 +392,11 @@ class WindowsManifest(ViewerManifest):
 
         # We use the Unicode version of NSIS, available from
         # http://www.scratchpaper.com/
-        NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe'
+        # Check two paths, one for Program Files, and one for Program Files (x86).
+        # Yay 64bit windows.
+        NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\Unicode\\makensis.exe')
+        if not os.path.exists(NSIS_path):
+            NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe')
         self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
         # self.remove(self.dst_path_of(tempfile))
         # If we're on a build machine, sign the code using our Authenticode certificate. JC
-- 
cgit v1.2.3


From 632da0b99eb4af27f4e8600e1493a07500452fea Mon Sep 17 00:00:00 2001
From: Palmer <palmer@lindenlab.com>
Date: Thu, 9 Jul 2009 17:20:19 -0700
Subject: Defaulting LLCommonLinkShared to on

---
 indra/llcommon/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index aaeb4eebc3..7075590f60 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -235,6 +235,7 @@ set_source_files_properties(${llcommon_HEADER_FILES}
 
 list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
 
+set(LLCOMMON_LINK_SHARED ON)
 if(LLCOMMON_LINK_SHARED)
     add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
     add_definitions(-DLL_COMMON_BUILD=1)
-- 
cgit v1.2.3


From f35bb882c2eb512622900ac934f8c6dbdb70786d Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 9 Jul 2009 18:36:22 -0700
Subject: Added a requestReshape handler to LLViewerWindowListener.

---
 indra/newview/llviewerwindowlistener.cpp | 9 +++++++++
 indra/newview/llviewerwindowlistener.h   | 1 +
 2 files changed, 10 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llviewerwindowlistener.cpp b/indra/newview/llviewerwindowlistener.cpp
index ad90b1d2ab..acff7ac835 100644
--- a/indra/newview/llviewerwindowlistener.cpp
+++ b/indra/newview/llviewerwindowlistener.cpp
@@ -35,6 +35,7 @@ LLViewerWindowListener::LLViewerWindowListener(const std::string& pumpname, LLVi
 //  saveSnapshotArgs["rebuild"] = LLSD::Boolean();
 //  saveSnapshotArgs["type"] = LLSD::String();
     add("saveSnapshot", &LLViewerWindowListener::saveSnapshot, saveSnapshotArgs);
+    add("requestReshape", &LLViewerWindowListener::requestReshape);
 }
 
 void LLViewerWindowListener::saveSnapshot(const LLSD& event) const
@@ -76,3 +77,11 @@ void LLViewerWindowListener::saveSnapshot(const LLSD& event) const
     response["ok"] = ok;
     LLEventPumps::instance().obtain(event["reply"]).post(response);
 }
+
+void LLViewerWindowListener::requestReshape(LLSD const & event_data) const
+{
+	if(event_data.has("w") && event_data.has("h"))
+	{
+		mViewerWindow->reshape(event_data["w"].asInteger(), event_data["h"].asInteger());
+	}
+}
\ No newline at end of file
diff --git a/indra/newview/llviewerwindowlistener.h b/indra/newview/llviewerwindowlistener.h
index f756a5310f..59c636ecec 100644
--- a/indra/newview/llviewerwindowlistener.h
+++ b/indra/newview/llviewerwindowlistener.h
@@ -27,6 +27,7 @@ public:
 
 private:
     void saveSnapshot(const LLSD& event) const;
+    void requestReshape(LLSD const & event_data) const;
 
     LLViewerWindow* mViewerWindow;
 };
-- 
cgit v1.2.3


From c9caa217a9ee9b7f192d23a00bc783870bb7d9b8 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 9 Jul 2009 18:41:45 -0700
Subject: Added LLDispatchListener implementation for gSavedSettings.

---
 indra/newview/CMakeLists.txt              |   2 +
 indra/newview/llviewercontrollistener.cpp | 105 ++++++++++++++++++++++++++++++
 indra/newview/llviewercontrollistener.h   |  33 ++++++++++
 3 files changed, 140 insertions(+)
 create mode 100644 indra/newview/llviewercontrollistener.cpp
 create mode 100644 indra/newview/llviewercontrollistener.h

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 53a59031ed..aaaa8ac5a6 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -378,6 +378,7 @@ set(viewer_SOURCE_FILES
     llvieweraudio.cpp
     llviewercamera.cpp
     llviewercontrol.cpp
+    llviewercontrollistener.cpp
     llviewerdisplay.cpp
     llviewerfloaterreg.cpp
     llviewergenericmessage.cpp
@@ -801,6 +802,7 @@ set(viewer_HEADER_FILES
     llviewerbuild.h
     llviewercamera.h
     llviewercontrol.h
+    llviewercontrollistener.h
     llviewerdisplay.h
     llviewerfloaterreg.h
     llviewergenericmessage.h
diff --git a/indra/newview/llviewercontrollistener.cpp b/indra/newview/llviewercontrollistener.cpp
new file mode 100644
index 0000000000..a29ead1e84
--- /dev/null
+++ b/indra/newview/llviewercontrollistener.cpp
@@ -0,0 +1,105 @@
+/**
+ * @file   llviewercontrollistener.cpp
+ * @author Nat Goodspeed
+ * @date   2009-06-30
+ * @brief  Implementation for llviewercontrollistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llviewercontrollistener.h"
+
+#include "llviewercontrol.h"
+
+LLViewerControlListener gSavedSettingsListener;
+
+LLViewerControlListener::LLViewerControlListener()
+	: LLDispatchListener("LLViewerControl",  "group")
+{
+	add("Global", boost::bind(&LLViewerControlListener::set, &gSavedSettings, _1));
+	add("Skin", boost::bind(&LLViewerControlListener::set, &gSavedSkinSettings, _1));
+	add("PerAccount", boost::bind(&LLViewerControlListener::set, &gSavedPerAccountSettings, _1));
+	add("Warning", boost::bind(&LLViewerControlListener::set, &gWarningSettings, _1));
+	add("Crash", boost::bind(&LLViewerControlListener::set, &gCrashSettings, _1));
+
+#if 0
+	add(/*"toggleControl",*/ "Global", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSettings, _1));
+	add(/*"toggleControl",*/ "Skin", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSkinSettings, _1));
+	add(/*"toggleControl",*/ "PerAccount", boost::bind(&LLViewerControlListener::toggleControl, &gSavedPerAccountSettings, _1));
+	add(/*"toggleControl",*/ "Warning", boost::bind(&LLViewerControlListener::toggleControl, &gWarningSettings, _1));
+	add(/*"toggleControl",*/ "Crash", boost::bind(&LLViewerControlListener::toggleControl, &gCrashSettings, _1));
+
+	add(/*"setDefault",*/ "Global", boost::bind(&LLViewerControlListener::setDefault, &gSavedSettings, _1));
+	add(/*"setDefault",*/ "Skin", boost::bind(&LLViewerControlListener::setDefault, &gSavedSkinSettings, _1));
+	add(/*"setDefault",*/ "PerAccount", boost::bind(&LLViewerControlListener::setDefault, &gSavedPerAccountSettings, _1));
+	add(/*"setDefault",*/ "Warning", boost::bind(&LLViewerControlListener::setDefault, &gWarningSettings, _1));
+	add(/*"setDefault",*/ "Crash", boost::bind(&LLViewerControlListener::setDefault, &gCrashSettings, _1));
+#endif // 0
+}
+
+//static
+void LLViewerControlListener::set(LLControlGroup * controls, LLSD const & event_data)
+{
+	if(event_data.has("key"))
+	{
+		std::string key(event_data["key"]);
+
+		if(controls->controlExists(key))
+		{
+			controls->setUntypedValue(key, event_data["value"]);
+		}
+		else
+		{
+			llwarns << "requested unknown control: \"" << key << '\"' << llendl;
+		}
+	}
+}
+
+//static
+void LLViewerControlListener::toggleControl(LLControlGroup * controls, LLSD const & event_data)
+{
+	if(event_data.has("key"))
+	{
+		std::string key(event_data["key"]);
+
+		if(controls->controlExists(key))
+		{
+			LLControlVariable * control = controls->getControl(key);
+			if(control->isType(TYPE_BOOLEAN))
+			{
+				control->set(!control->get().asBoolean());
+			}
+			else
+			{
+				llwarns << "requested toggle of non-boolean control: \"" << key << "\", type is " << control->type() << llendl;
+			}
+		}
+		else
+		{
+			llwarns << "requested unknown control: \"" << key << '\"' << llendl;
+		}
+	}
+}
+
+//static
+void LLViewerControlListener::setDefault(LLControlGroup * controls, LLSD const & event_data)
+{
+	if(event_data.has("key"))
+	{
+		std::string key(event_data["key"]);
+
+		if(controls->controlExists(key))
+		{
+			LLControlVariable * control = controls->getControl(key);
+			control->resetToDefault();
+		}
+		else
+		{
+			llwarns << "requested unknown control: \"" << key << '\"' << llendl;
+		}
+	}
+}
diff --git a/indra/newview/llviewercontrollistener.h b/indra/newview/llviewercontrollistener.h
new file mode 100644
index 0000000000..6c69059d16
--- /dev/null
+++ b/indra/newview/llviewercontrollistener.h
@@ -0,0 +1,33 @@
+/**
+ * @file   llviewercontrollistener.h
+ * @author Brad Kittenbrink
+ * @date   2009-07-09
+ * @brief  Event API for subset of LLViewerControl methods
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLVIEWERCONTROLLISTENER_H
+#define LL_LLVIEWERCONTROLLISTENER_H
+
+#include "lleventdispatcher.h"
+
+class LLControlGroup;
+class LLSD;
+
+class  LLViewerControlListener : public LLDispatchListener
+{
+public:
+	LLViewerControlListener();
+
+private:
+	static void set(LLControlGroup *controls, LLSD const & event_data);
+	static void toggleControl(LLControlGroup *controls, LLSD const & event_data);
+	static void setDefault(LLControlGroup *controls, LLSD const & event_data);
+};
+
+extern LLViewerControlListener gSavedSettingsListener;
+
+#endif // LL_LLVIEWERCONTROLLISTENER_H
-- 
cgit v1.2.3


From 9e399d5d3c7348012bcb79557d8a055f96b32e90 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Thu, 9 Jul 2009 19:51:28 -0700
Subject: Brad already added the LLCOMMON_LINK_SHARED definition. I removed the
 broken one I added and set the other one to ON by default.

---
 indra/cmake/LLCommon.cmake    | 2 +-
 indra/llcommon/CMakeLists.txt | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 4cd3a9adb8..19d61008da 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -17,7 +17,7 @@ set(LLCOMMON_LIBRARIES llcommon)
 
 add_definitions(${TCMALLOC_FLAG})
 
-set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
+set(LLCOMMON_LINK_SHARED ON CACHE BOOL "Build the llcommon target as a shared library.")
 if(LLCOMMON_LINK_SHARED)
     add_definitions(-DLL_COMMON_LINK_SHARED=1)
 endif(LLCOMMON_LINK_SHARED)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 7075590f60..aaeb4eebc3 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -235,7 +235,6 @@ set_source_files_properties(${llcommon_HEADER_FILES}
 
 list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
 
-set(LLCOMMON_LINK_SHARED ON)
 if(LLCOMMON_LINK_SHARED)
     add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
     add_definitions(-DLL_COMMON_BUILD=1)
-- 
cgit v1.2.3


From e5efce3b4e1ed2fe70763b19dfef13470020a574 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 10 Jul 2009 10:28:56 -0700
Subject: Fix line ending badness in LLViewerControl.

---
 indra/newview/llviewercontrollistener.cpp | 190 +++++++++++++++---------------
 indra/newview/llviewercontrollistener.h   |  36 +++---
 2 files changed, 113 insertions(+), 113 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewercontrollistener.cpp b/indra/newview/llviewercontrollistener.cpp
index a29ead1e84..7532197dbf 100644
--- a/indra/newview/llviewercontrollistener.cpp
+++ b/indra/newview/llviewercontrollistener.cpp
@@ -8,98 +8,98 @@
  * Copyright (c) 2009, Linden Research, Inc.
  * $/LicenseInfo$
  */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llviewercontrollistener.h"
-
-#include "llviewercontrol.h"
-
-LLViewerControlListener gSavedSettingsListener;
-
-LLViewerControlListener::LLViewerControlListener()
-	: LLDispatchListener("LLViewerControl",  "group")
-{
-	add("Global", boost::bind(&LLViewerControlListener::set, &gSavedSettings, _1));
-	add("Skin", boost::bind(&LLViewerControlListener::set, &gSavedSkinSettings, _1));
-	add("PerAccount", boost::bind(&LLViewerControlListener::set, &gSavedPerAccountSettings, _1));
-	add("Warning", boost::bind(&LLViewerControlListener::set, &gWarningSettings, _1));
-	add("Crash", boost::bind(&LLViewerControlListener::set, &gCrashSettings, _1));
-
-#if 0
-	add(/*"toggleControl",*/ "Global", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSettings, _1));
-	add(/*"toggleControl",*/ "Skin", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSkinSettings, _1));
-	add(/*"toggleControl",*/ "PerAccount", boost::bind(&LLViewerControlListener::toggleControl, &gSavedPerAccountSettings, _1));
-	add(/*"toggleControl",*/ "Warning", boost::bind(&LLViewerControlListener::toggleControl, &gWarningSettings, _1));
-	add(/*"toggleControl",*/ "Crash", boost::bind(&LLViewerControlListener::toggleControl, &gCrashSettings, _1));
-
-	add(/*"setDefault",*/ "Global", boost::bind(&LLViewerControlListener::setDefault, &gSavedSettings, _1));
-	add(/*"setDefault",*/ "Skin", boost::bind(&LLViewerControlListener::setDefault, &gSavedSkinSettings, _1));
-	add(/*"setDefault",*/ "PerAccount", boost::bind(&LLViewerControlListener::setDefault, &gSavedPerAccountSettings, _1));
-	add(/*"setDefault",*/ "Warning", boost::bind(&LLViewerControlListener::setDefault, &gWarningSettings, _1));
-	add(/*"setDefault",*/ "Crash", boost::bind(&LLViewerControlListener::setDefault, &gCrashSettings, _1));
-#endif // 0
-}
-
-//static
-void LLViewerControlListener::set(LLControlGroup * controls, LLSD const & event_data)
-{
-	if(event_data.has("key"))
-	{
-		std::string key(event_data["key"]);
-
-		if(controls->controlExists(key))
-		{
-			controls->setUntypedValue(key, event_data["value"]);
-		}
-		else
-		{
-			llwarns << "requested unknown control: \"" << key << '\"' << llendl;
-		}
-	}
-}
-
-//static
-void LLViewerControlListener::toggleControl(LLControlGroup * controls, LLSD const & event_data)
-{
-	if(event_data.has("key"))
-	{
-		std::string key(event_data["key"]);
-
-		if(controls->controlExists(key))
-		{
-			LLControlVariable * control = controls->getControl(key);
-			if(control->isType(TYPE_BOOLEAN))
-			{
-				control->set(!control->get().asBoolean());
-			}
-			else
-			{
-				llwarns << "requested toggle of non-boolean control: \"" << key << "\", type is " << control->type() << llendl;
-			}
-		}
-		else
-		{
-			llwarns << "requested unknown control: \"" << key << '\"' << llendl;
-		}
-	}
-}
-
-//static
-void LLViewerControlListener::setDefault(LLControlGroup * controls, LLSD const & event_data)
-{
-	if(event_data.has("key"))
-	{
-		std::string key(event_data["key"]);
-
-		if(controls->controlExists(key))
-		{
-			LLControlVariable * control = controls->getControl(key);
-			control->resetToDefault();
-		}
-		else
-		{
-			llwarns << "requested unknown control: \"" << key << '\"' << llendl;
-		}
-	}
-}
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llviewercontrollistener.h"
+
+#include "llviewercontrol.h"
+
+LLViewerControlListener gSavedSettingsListener;
+
+LLViewerControlListener::LLViewerControlListener()
+	: LLDispatchListener("LLViewerControl",  "group")
+{
+	add("Global", boost::bind(&LLViewerControlListener::set, &gSavedSettings, _1));
+	add("Skin", boost::bind(&LLViewerControlListener::set, &gSavedSkinSettings, _1));
+	add("PerAccount", boost::bind(&LLViewerControlListener::set, &gSavedPerAccountSettings, _1));
+	add("Warning", boost::bind(&LLViewerControlListener::set, &gWarningSettings, _1));
+	add("Crash", boost::bind(&LLViewerControlListener::set, &gCrashSettings, _1));
+
+#if 0
+	add(/*"toggleControl",*/ "Global", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSettings, _1));
+	add(/*"toggleControl",*/ "Skin", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSkinSettings, _1));
+	add(/*"toggleControl",*/ "PerAccount", boost::bind(&LLViewerControlListener::toggleControl, &gSavedPerAccountSettings, _1));
+	add(/*"toggleControl",*/ "Warning", boost::bind(&LLViewerControlListener::toggleControl, &gWarningSettings, _1));
+	add(/*"toggleControl",*/ "Crash", boost::bind(&LLViewerControlListener::toggleControl, &gCrashSettings, _1));
+
+	add(/*"setDefault",*/ "Global", boost::bind(&LLViewerControlListener::setDefault, &gSavedSettings, _1));
+	add(/*"setDefault",*/ "Skin", boost::bind(&LLViewerControlListener::setDefault, &gSavedSkinSettings, _1));
+	add(/*"setDefault",*/ "PerAccount", boost::bind(&LLViewerControlListener::setDefault, &gSavedPerAccountSettings, _1));
+	add(/*"setDefault",*/ "Warning", boost::bind(&LLViewerControlListener::setDefault, &gWarningSettings, _1));
+	add(/*"setDefault",*/ "Crash", boost::bind(&LLViewerControlListener::setDefault, &gCrashSettings, _1));
+#endif // 0
+}
+
+//static
+void LLViewerControlListener::set(LLControlGroup * controls, LLSD const & event_data)
+{
+	if(event_data.has("key"))
+	{
+		std::string key(event_data["key"]);
+
+		if(controls->controlExists(key))
+		{
+			controls->setUntypedValue(key, event_data["value"]);
+		}
+		else
+		{
+			llwarns << "requested unknown control: \"" << key << '\"' << llendl;
+		}
+	}
+}
+
+//static
+void LLViewerControlListener::toggleControl(LLControlGroup * controls, LLSD const & event_data)
+{
+	if(event_data.has("key"))
+	{
+		std::string key(event_data["key"]);
+
+		if(controls->controlExists(key))
+		{
+			LLControlVariable * control = controls->getControl(key);
+			if(control->isType(TYPE_BOOLEAN))
+			{
+				control->set(!control->get().asBoolean());
+			}
+			else
+			{
+				llwarns << "requested toggle of non-boolean control: \"" << key << "\", type is " << control->type() << llendl;
+			}
+		}
+		else
+		{
+			llwarns << "requested unknown control: \"" << key << '\"' << llendl;
+		}
+	}
+}
+
+//static
+void LLViewerControlListener::setDefault(LLControlGroup * controls, LLSD const & event_data)
+{
+	if(event_data.has("key"))
+	{
+		std::string key(event_data["key"]);
+
+		if(controls->controlExists(key))
+		{
+			LLControlVariable * control = controls->getControl(key);
+			control->resetToDefault();
+		}
+		else
+		{
+			llwarns << "requested unknown control: \"" << key << '\"' << llendl;
+		}
+	}
+}
diff --git a/indra/newview/llviewercontrollistener.h b/indra/newview/llviewercontrollistener.h
index 6c69059d16..cacf97e908 100644
--- a/indra/newview/llviewercontrollistener.h
+++ b/indra/newview/llviewercontrollistener.h
@@ -8,26 +8,26 @@
  * Copyright (c) 2009, Linden Research, Inc.
  * $/LicenseInfo$
  */
-
-#ifndef LL_LLVIEWERCONTROLLISTENER_H
-#define LL_LLVIEWERCONTROLLISTENER_H
+
+#ifndef LL_LLVIEWERCONTROLLISTENER_H
+#define LL_LLVIEWERCONTROLLISTENER_H
 
 #include "lleventdispatcher.h"
 
 class LLControlGroup;
 class LLSD;
-
-class  LLViewerControlListener : public LLDispatchListener
-{
-public:
-	LLViewerControlListener();
-
-private:
-	static void set(LLControlGroup *controls, LLSD const & event_data);
-	static void toggleControl(LLControlGroup *controls, LLSD const & event_data);
-	static void setDefault(LLControlGroup *controls, LLSD const & event_data);
-};
-
-extern LLViewerControlListener gSavedSettingsListener;
-
-#endif // LL_LLVIEWERCONTROLLISTENER_H
+
+class  LLViewerControlListener : public LLDispatchListener
+{
+public:
+	LLViewerControlListener();
+
+private:
+	static void set(LLControlGroup *controls, LLSD const & event_data);
+	static void toggleControl(LLControlGroup *controls, LLSD const & event_data);
+	static void setDefault(LLControlGroup *controls, LLSD const & event_data);
+};
+
+extern LLViewerControlListener gSavedSettingsListener;
+
+#endif // LL_LLVIEWERCONTROLLISTENER_H
-- 
cgit v1.2.3


From be673a38161fe3f312a53cf8790dee1757003157 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 10 Jul 2009 10:47:13 -0700
Subject: Oops, copy/paste error in the llviewercontrol.cpp file top level
 comments.

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

(limited to 'indra')

diff --git a/indra/newview/llviewercontrollistener.cpp b/indra/newview/llviewercontrollistener.cpp
index 7532197dbf..57426f2af0 100644
--- a/indra/newview/llviewercontrollistener.cpp
+++ b/indra/newview/llviewercontrollistener.cpp
@@ -1,7 +1,7 @@
 /**
  * @file   llviewercontrollistener.cpp
- * @author Nat Goodspeed
- * @date   2009-06-30
+ * @author Brad Kittenbrink
+ * @date   2009-07-09
  * @brief  Implementation for llviewercontrollistener.
  * 
  * $LicenseInfo:firstyear=2009&license=viewergpl$
-- 
cgit v1.2.3


From 82eb18fce5c3d21a49a299ee5e454cbcc9d6f559 Mon Sep 17 00:00:00 2001
From: "palmer@945battery-guestB-224.lindenlab.com"
 <palmer@945battery-guestB-224.lindenlab.com>
Date: Fri, 10 Jul 2009 11:09:54 -0700
Subject: Expanded tabs in cmake files

---
 indra/cmake/LLAddBuildTest.cmake | 12 ++++++------
 indra/cmake/Linking.cmake        |  2 +-
 indra/llcommon/CMakeLists.txt    |  8 ++++----
 indra/llmessage/CMakeLists.txt   |  2 +-
 indra/newview/CMakeLists.txt     | 16 ++++++++--------
 5 files changed, 20 insertions(+), 20 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 5717bc620a..0c6ddef50f 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -118,12 +118,12 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
     IF(LL_TEST_VERBOSE)
       MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd  = ${TEST_CMD}")
     ENDIF(LL_TEST_VERBOSE)
-	
-	IF(WINDOWS)
-	  set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
-	ELSE(WINDOWS)
-	  set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:/usr/lib)
-	ENDIF(WINDOWS)
+    
+    IF(WINDOWS)
+      set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+    ELSE(WINDOWS)
+      set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:/usr/lib)
+    ENDIF(WINDOWS)
 
     SET(TEST_SCRIPT_CMD 
       ${CMAKE_COMMAND} 
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index ad52a82b20..4063034837 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -5,7 +5,7 @@ if (NOT STANDALONE)
     set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib)
     set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release)
     set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug)
-	set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
+    set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
   elseif (LINUX)
     if (VIEWER)
       set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index aaeb4eebc3..cb0f6add21 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -238,10 +238,10 @@ list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
 if(LLCOMMON_LINK_SHARED)
     add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
     add_definitions(-DLL_COMMON_BUILD=1)
-	# *FIX:Mani ---
-	# llcommon.dll get written to the DLL staging directory.
-	# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
-	set_target_properties(llcommon PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
+    # *FIX:Mani ---
+    # llcommon.dll get written to the DLL staging directory.
+    # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
+    set_target_properties(llcommon PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
 else(LLCOMMON_LINK_SHARED)
     add_library (llcommon ${llcommon_SOURCE_FILES})
 endif(LLCOMMON_LINK_SHARED)
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 67a171dde6..2c50a9b1cd 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -226,7 +226,7 @@ IF (NOT LINUX AND VIEWER)
       # Commented out - see rationale at bottom of newview's build file + poppy 2009-06-05
       # Don't make llmessage depend on llsdmessage_test because ADD_COMM_BUILD_TEST depends on llmessage!
       # ADD_COMM_BUILD_TEST(llsdmessage "" "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py")
-	  # llareslistener.cpp
+      # llareslistener.cpp
       )
     LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}")
 
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index d6108ab06e..aece574eed 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1248,11 +1248,11 @@ if (WINDOWS)
         COMMENT "Copying message.xml to the runtime folder."
         )
        
-	if(WINDOWS)
+    if(WINDOWS)
       # Copy Win Libs...
-	  # This happens at build time, not config time. We can't glob files in this cmake.
-	  # *FIX:Mani Write a sub script to glob the files...
-	  add_custom_command(
+      # This happens at build time, not config time. We can't glob files in this cmake.
+      # *FIX:Mani Write a sub script to glob the files...
+      add_custom_command(
         TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
         COMMAND ${CMAKE_COMMAND}
         ARGS
@@ -1261,10 +1261,10 @@ if (WINDOWS)
           ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}
          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
         COMMENT "Copying staged dlls."
-		)
-	endif(WINDOWS)
-	
-	
+        )
+    endif(WINDOWS)
+    
+    
 
     if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
       add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
-- 
cgit v1.2.3


From 3013aa1c847ac8884ca7b287fd1406b3fc2393ab Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 10 Jul 2009 13:09:27 -0700
Subject: Added an LLAgentListener implementation for event requests like
 teleport, sit, stand, etc.

---
 indra/newview/CMakeLists.txt      |  2 +
 indra/newview/llagent.cpp         |  4 ++
 indra/newview/llagent.h           |  4 ++
 indra/newview/llagentlistener.cpp | 78 +++++++++++++++++++++++++++++++++++++++
 indra/newview/llagentlistener.h   | 36 ++++++++++++++++++
 5 files changed, 124 insertions(+)
 create mode 100644 indra/newview/llagentlistener.cpp
 create mode 100644 indra/newview/llagentlistener.h

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index aaaa8ac5a6..a8c9e6a31d 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -67,6 +67,7 @@ include_directories(
 set(viewer_SOURCE_FILES
     llaccordionpanel.cpp
     llagent.cpp
+    llagentlistener.cpp
     llagentaccess.cpp
     llagentdata.cpp
     llagentlanguage.cpp
@@ -483,6 +484,7 @@ set(viewer_HEADER_FILES
     ViewerInstall.cmake
     llaccordionpanel.h
     llagent.h
+    llagentlistener.h
     llagentaccess.h
     llagentdata.h
     llagentlanguage.h
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index a8094a5850..13546347b9 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -35,6 +35,7 @@
 #include "llagent.h" 
 #include "llagentwearables.h"
 
+#include "llagentlistener.h"
 #include "llanimationstates.h"
 #include "llcallingcard.h"
 #include "llchatbar.h"
@@ -254,6 +255,7 @@ LLAgent::LLAgent() :
 	mHUDTargetZoom(1.f),
 	mHUDCurZoom(1.f),
 	mInitialized(FALSE),
+	mListener(),
 	mForceMouselook(FALSE),
 
 	mDoubleTapRunTimer(),
@@ -381,6 +383,8 @@ LLAgent::LLAgent() :
 	}
 
 	mFollowCam.setMaxCameraDistantFromSubject( MAX_CAMERA_DISTANCE_FROM_AGENT );
+
+	mListener.reset(new LLAgentListener(*this));
 }
 
 // Requires gSavedSettings to be initialized.
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 94f6229838..22e7ccc0e5 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -91,6 +91,8 @@ struct LLGroupData
 	std::string mName;
 };
 
+class LLAgentListener;
+
 //------------------------------------------------------------------------
 // LLAgent
 //------------------------------------------------------------------------
@@ -128,6 +130,8 @@ public:
 	BOOL			mInitialized;
 	BOOL			mFirstLogin;
 	std::string		mMOTD; 					// Message of the day
+private:
+	boost::shared_ptr<LLAgentListener> mListener;
 
 	//--------------------------------------------------------------------
 	// Session
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
new file mode 100644
index 0000000000..90070b2143
--- /dev/null
+++ b/indra/newview/llagentlistener.cpp
@@ -0,0 +1,78 @@
+/**
+ * @file   llagentlistener.cpp
+ * @author Brad Kittenbrink
+ * @date   2009-07-10
+ * @brief  Implementation for llagentlistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llagentlistener.h"
+
+#include "llagent.h"
+#include "llcommandhandler.h"
+#include "llslurl.h"
+#include "llurldispatcher.h"
+#include "llviewerobject.h"
+#include "llviewerobjectlist.h"
+#include "llviewerregion.h"
+
+LLAgentListener::LLAgentListener(LLAgent &agent)
+  : LLDispatchListener("LLAgent", "op"),
+    mAgent(agent)
+{
+	add("requestTeleport", &LLAgentListener::requestTeleport);
+	add("requestSit", &LLAgentListener::requestSit);
+	add("requestStand", &LLAgentListener::requestStand);
+}
+
+void LLAgentListener::requestTeleport(LLSD const & event_data) const
+{
+	if(event_data["skip_confirmation"].asBoolean())
+	{
+		LLSD params(LLSD::emptyArray());
+		params.append(event_data["regionname"]);
+		params.append(event_data["x"]);
+		params.append(event_data["y"]);
+		params.append(event_data["z"]);
+		LLCommandDispatcher::dispatch("teleport", params, LLSD(), NULL, true);
+		// *TODO - lookup other LLCommandHandlers for "agent", "classified", "event", "group", "floater", "objectim", "parcel", "login", login_refresh", "balance", "chat"
+		// should we just compose LLCommandHandler and LLDispatchListener?
+	}
+	else
+	{
+		std::string url = LLSLURL::buildSLURL(event_data["regionname"].asString(), event_data["x"].asReal(), event_data["y"].asReal(), event_data["z"].asReal());
+		LLURLDispatcher::dispatch(url, NULL, false);
+	}
+}
+
+void LLAgentListener::requestSit(LLSD const & event_data) const
+{
+	//mAgent.getAvatarObject()->sitOnObject();
+	// shamelessly ripped from llviewermenu.cpp:handle_sit_or_stand()
+	// *TODO - find a permanent place to share this code properly.
+	LLViewerObject *object = gObjectList.findObject(event_data["obj_uuid"]);
+
+	if (object && object->getPCode() == LL_PCODE_VOLUME)
+	{
+		gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
+		gMessageSystem->nextBlockFast(_PREHASH_AgentData);
+		gMessageSystem->addUUIDFast(_PREHASH_AgentID, mAgent.getID());
+		gMessageSystem->addUUIDFast(_PREHASH_SessionID, mAgent.getSessionID());
+		gMessageSystem->nextBlockFast(_PREHASH_TargetObject);
+		gMessageSystem->addUUIDFast(_PREHASH_TargetID, object->mID);
+		gMessageSystem->addVector3Fast(_PREHASH_Offset, LLVector3(0,0,0));
+
+		object->getRegion()->sendReliableMessage();
+	}
+}
+
+void LLAgentListener::requestStand(LLSD const & event_data) const
+{
+	mAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
+}
+
diff --git a/indra/newview/llagentlistener.h b/indra/newview/llagentlistener.h
new file mode 100644
index 0000000000..6f0b5a54c5
--- /dev/null
+++ b/indra/newview/llagentlistener.h
@@ -0,0 +1,36 @@
+/**
+ * @file   llagentlistener.h
+ * @author Brad Kittenbrink
+ * @date   2009-07-09
+ * @brief  Event API for subset of LLViewerControl methods
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+
+#ifndef LL_LLAGENTLISTENER_H
+#define LL_LLAGENTLISTENER_H
+
+#include "lleventdispatcher.h"
+
+class LLAgent;
+class LLSD;
+
+class LLAgentListener : public LLDispatchListener
+{
+public:
+	LLAgentListener(LLAgent &agent);
+
+private:
+	void requestTeleport(LLSD const & event_data) const;
+	void requestSit(LLSD const & event_data) const;
+	void requestStand(LLSD const & event_data) const;
+
+private:
+	LLAgent & mAgent;
+};
+
+#endif // LL_LLAGENTLISTENER_H
+
-- 
cgit v1.2.3


From 8b7f7143d6a755c5299bc4f2c9bbbd33c79344aa Mon Sep 17 00:00:00 2001
From: Palmer <palmer@lindenlab.com>
Date: Fri, 10 Jul 2009 14:53:11 -0700
Subject: Brad's changes to testquit so we can pass executable to run to it.

Switching eventlet to use subrepo.

By Brad, reviewed by Palmer
---
 indra/viewer_components/CMakeLists.txt | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'indra')

diff --git a/indra/viewer_components/CMakeLists.txt b/indra/viewer_components/CMakeLists.txt
index b3e07c527c..c95c854b7c 100644
--- a/indra/viewer_components/CMakeLists.txt
+++ b/indra/viewer_components/CMakeLists.txt
@@ -1,9 +1,5 @@
 # -*- cmake -*-
 
-include(Externals)
-
 add_subdirectory(login)
 add_subdirectory(eventhost)
 
-use_svn_external(eventlet ${CMAKE_CURRENT_SOURCE_DIR}/../lib/python/ http://svn.secondlife.com/svn/eventlet/trunk/eventlet 164)
-
-- 
cgit v1.2.3


From b6fec6f1fc30e6362471d442edda32d841bf30a1 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 10 Jul 2009 18:28:16 -0700
Subject: Fix for crash when running windows debug build.  std::string::replace
 cannot take NULL for it's argument.

---
 indra/llrender/llfontregistry.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp
index 18e4a6915d..455a68ca81 100644
--- a/indra/llrender/llfontregistry.cpp
+++ b/indra/llrender/llfontregistry.cpp
@@ -104,7 +104,7 @@ bool removeSubString(std::string& str, const std::string& substr)
 	size_t pos = str.find(substr);
 	if (pos != string::npos)
 	{
-		str.replace(pos,substr.length(),(const char *)NULL, 0);
+		str.replace(pos,substr.length(), "", 0);
 		return true;
 	}
 	return false;
-- 
cgit v1.2.3


From da038e6c8f2f2db10c610337d6aa9a7e8622f3b4 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 10 Jul 2009 18:29:10 -0700
Subject: First draft of cleaning up eventhost module on viewer shutdown. 
 Still need to make the whole system more generalized and data driven.

---
 indra/newview/llappviewer.cpp | 25 +++++++++++++++++++------
 indra/newview/llappviewer.h   |  5 ++++-
 2 files changed, 23 insertions(+), 7 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 947f5bdb20..8492644b2d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1154,7 +1154,17 @@ bool LLAppViewer::mainLoop()
 
 bool LLAppViewer::cleanup()
 {
-    // *TODO - unload event host module here -brad
+	// *TODO - generalize this and move DSO wrangling to a helper class -brad
+	std::set<struct apr_dso_handle_t *>::const_iterator i;
+	for(i = mPlugins.begin(); i != mPlugins.end(); ++i)
+	{
+		int (*ll_plugin_stop_func)(void) = NULL;
+		apr_status_t rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_stop_func, *i, "ll_plugin_stop");
+		ll_plugin_stop_func();
+
+		rv = apr_dso_unload(*i);
+	}
+	mPlugins.clear();
 
 	//----------------------------------------------
 	//this test code will be removed after the test
@@ -4098,7 +4108,7 @@ void LLAppViewer::handleLoginComplete()
 }
 
 // *TODO - generalize this and move DSO wrangling to a helper class -brad
-void LLAppViewer::loadEventHostModule(S32 listen_port) const
+void LLAppViewer::loadEventHostModule(S32 listen_port)
 {
 	std::string dso_name =
 #if LL_WINDOWS
@@ -4133,9 +4143,12 @@ void LLAppViewer::loadEventHostModule(S32 listen_port) const
 	LLSD args;
 	args["listen_port"] = listen_port;
 
-	ll_plugin_start_func(args);
+	int status = ll_plugin_start_func(args);
+
+	if(status != 0)
+	{
+		llwarns << "problem loading eventhost plugin, status: " << status << llendl;
+	}
 
-    args = LLSD();
-    args["MESSAGE"] = "EventHost module loaded successfully";
-    LLNotifications::instance().add("SystemMessageTip", args);
+	mPlugins.insert(eventhost_dso_handle);
 }
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 1227ab470f..69f2a074aa 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -47,6 +47,7 @@ class LLVFS;
 class LLWatchdogTimeout;
 class LLWorkerThread;
 
+struct apr_dso_handle_t;
 
 
 class LLAppViewer : public LLApp
@@ -204,7 +205,7 @@ private:
     void sendLogoutRequest();
     void disconnectViewer();
 
-	void loadEventHostModule(S32 listen_port) const;
+	void loadEventHostModule(S32 listen_port);
 	
 	// *FIX: the app viewer class should be some sort of singleton, no?
 	// Perhaps its child class is the singleton and this should be an abstract base.
@@ -251,6 +252,8 @@ private:
 
     LLAllocator mAlloc;
 
+	std::set<struct apr_dso_handle_t*> mPlugins;
+
 public:
 	//some information for updater
 	typedef struct
-- 
cgit v1.2.3


From 7c29b45cc81632ae75450826453b414082c0fa58 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Mon, 13 Jul 2009 11:25:44 -0700
Subject: Line ending normalization.

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

(limited to 'indra')

diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 69f2a074aa..844a72378c 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -47,7 +47,7 @@ class LLVFS;
 class LLWatchdogTimeout;
 class LLWorkerThread;
 
-struct apr_dso_handle_t;
+struct apr_dso_handle_t;
 
 
 class LLAppViewer : public LLApp
-- 
cgit v1.2.3


From 796ac35ca503090b3923c942df11f0153fd23693 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 15 Jul 2009 13:55:09 -0700
Subject: Disable SHARED_LIB_STAGING_DIR usage on systems where it's not
 initialized.

---
 indra/llcommon/CMakeLists.txt | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index cb0f6add21..c46e2583f1 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -238,10 +238,13 @@ list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
 if(LLCOMMON_LINK_SHARED)
     add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
     add_definitions(-DLL_COMMON_BUILD=1)
-    # *FIX:Mani ---
-    # llcommon.dll get written to the DLL staging directory.
-    # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
-    set_target_properties(llcommon PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
+
+    if(SHARED_LIB_STAGING_DIR)
+        # *FIX:Mani ---
+        # llcommon.dll get written to the DLL staging directory.
+        # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
+        set_target_properties(llcommon PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
+    endif(SHARED_LIB_STAGING_DIR)
 else(LLCOMMON_LINK_SHARED)
     add_library (llcommon ${llcommon_SOURCE_FILES})
 endif(LLCOMMON_LINK_SHARED)
-- 
cgit v1.2.3


From 1c92d6bf28add28fe65772c5f9c254e5c7370ba0 Mon Sep 17 00:00:00 2001
From: Palmer <palmer@lindenlab.com>
Date: Wed, 15 Jul 2009 15:29:45 -0700
Subject: DEV-35531

Cmake changes and fixes to python script to get it to work properly

Mani reviewed most of this
---
 indra/newview/CMakeLists.txt | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 82a1419210..341b74b6f8 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1196,6 +1196,11 @@ if (LLKDU_LIBRARY)
   add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY})
 endif (LLKDU_LIBRARY)
 
+# add package files
+file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST
+     ${CMAKE_CURRENT_SOURCE_DIR}/../viewer_components/*.py)
+list(APPEND EVENT_HOST_SCRIPTS ${EVENT_HOST_SCRIPT_GLOB_LIST})
+
 set(PACKAGE OFF CACHE BOOL
     "Add a package target that builds an installer package.")
 
@@ -1291,8 +1296,26 @@ if (WINDOWS)
         DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
         )
     if (PACKAGE)
-      add_custom_target(package ALL DEPENDS ${CMAKE_CFG_INTDIR}/touched.bat)
+      add_custom_command(
+          OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/event_host.tar.bz2
+          COMMAND ${PYTHON_EXECUTABLE}
+          ARGS
+            ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
+            ${CMAKE_CURRENT_SOURCE_DIR}/..
+            ${CMAKE_CFG_INTDIR}
+
+          DEPENDS 
+            lleventhost 
+            ${EVENT_HOST_SCRIPTS}
+            ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py)
+
+      add_custom_target(package ALL 
+          DEPENDS 
+            ${CMAKE_CFG_INTDIR}/touched.bat
+            ${CMAKE_CURRENT_SOURCE_DIR}/event_host.tar.bz2)
       add_dependencies(package windows-updater windows-crash-logger)
+
+
     endif (PACKAGE)
 endif (WINDOWS)
 
-- 
cgit v1.2.3


From 61c27f2663aee60ba6eaeed57341915c8b8b5097 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 15 Jul 2009 17:54:11 -0700
Subject: Oops, LLNotificationsListener can't just be forward declared under
 gcc.

---
 indra/llui/llnotifications.h | 1825 +++++++++++++++++++++---------------------
 1 file changed, 912 insertions(+), 913 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 971d11db97..93cdcbeefd 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -1,913 +1,912 @@
-/**
-* @file llnotifications.h
-* @brief Non-UI manager and support for keeping a prioritized list of notifications
-* @author Q (with assistance from Richard and Coco)
-*
-* $LicenseInfo:firstyear=2008&license=viewergpl$
-* 
-* Copyright (c) 2008-2009, Linden Research, Inc.
-* 
-* Second Life Viewer Source Code
-* The source code in this file ("Source Code") is provided by Linden Lab
-* to you under the terms of the GNU General Public License, version 2.0
-* ("GPL"), unless you have obtained a separate licensing agreement
-* ("Other License"), formally executed by you and Linden Lab.  Terms of
-* the GPL can be found in doc/GPL-license.txt in this distribution, or
-* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
-* 
-* There are special exceptions to the terms and conditions of the GPL as
-* it is applied to this Source Code. View the full text of the exception
-* in the file doc/FLOSS-exception.txt in this software distribution, or
-* online at
-* http://secondlifegrid.net/programs/open_source/licensing/flossexception
-* 
-* By copying, modifying or distributing this software, you acknowledge
-* that you have read and understood your obligations described above,
-* and agree to abide by those obligations.
-* 
-* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
-* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
-* COMPLETENESS OR PERFORMANCE.
-* $/LicenseInfo$
-*/
-
-#ifndef LL_LLNOTIFICATIONS_H
-#define LL_LLNOTIFICATIONS_H
-
-/**
- * This system is intended to provide a singleton mechanism for adding
- * notifications to one of an arbitrary set of event channels.
- * 
- * Controlling JIRA: DEV-9061
- *
- * Every notification has (see code for full list):
- *  - a textual name, which is used to look up its template in the XML files
- *  - a payload, which is a block of LLSD
- *  - a channel, which is normally extracted from the XML files but
- *	  can be overridden.
- *  - a timestamp, used to order the notifications
- *  - expiration time -- if nonzero, specifies a time after which the
- *    notification will no longer be valid.
- *  - a callback name and a couple of status bits related to callbacks (see below)
- * 
- * There is a management class called LLNotifications, which is an LLSingleton.
- * The class maintains a collection of all of the notifications received
- * or processed during this session, and also manages the persistence
- * of those notifications that must be persisted.
- * 
- * We also have Channels. A channel is a view on a collection of notifications;
- * The collection is defined by a filter function that controls which
- * notifications are in the channel, and its ordering is controlled by 
- * a comparator. 
- *
- * There is a hierarchy of channels; notifications flow down from
- * the management class (LLNotifications, which itself inherits from
- * The channel base class) to the individual channels.
- * Any change to notifications (add, delete, modify) is 
- * automatically propagated through the channel hierarchy.
- * 
- * We provide methods for adding a new notification, for removing
- * one, and for managing channels. Channels are relatively cheap to construct
- * and maintain, so in general, human interfaces should use channels to
- * select and manage their lists of notifications.
- * 
- * We also maintain a collection of templates that are loaded from the 
- * XML file of template translations. The system supports substitution
- * of named variables from the payload into the XML file.
- * 
- * By default, only the "unknown message" template is built into the system.
- * It is not an error to add a notification that's not found in the 
- * template system, but it is logged.
- *
- */
-
-#include <string>
-#include <list>
-#include <vector>
-#include <map>
-#include <set>
-#include <iomanip>
-#include <sstream>
-
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/type_traits.hpp>
-
-// we want to minimize external dependencies, but this one is important
-#include "llsd.h"
-
-// and we need this to manage the notification callbacks
-#include "llevents.h"
-#include "llfunctorregistry.h"
-#include "llui.h"
-#include "llmemory.h"
-
-class LLNotification;
-typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
-
-	
-typedef enum e_notification_priority
-{
-	NOTIFICATION_PRIORITY_UNSPECIFIED,
-	NOTIFICATION_PRIORITY_LOW,
-	NOTIFICATION_PRIORITY_NORMAL,
-	NOTIFICATION_PRIORITY_HIGH,
-	NOTIFICATION_PRIORITY_CRITICAL
-} ENotificationPriority;
-
-typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder;
-
-typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;
-typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration;
-
-// context data that can be looked up via a notification's payload by the display logic
-// derive from this class to implement specific contexts
-class LLNotificationContext : public LLInstanceTracker<LLNotificationContext, LLUUID>
-{
-public:
-	LLNotificationContext() : LLInstanceTracker<LLNotificationContext, LLUUID>(LLUUID::generateNewID())
-	{
-	}
-
-	virtual ~LLNotificationContext() {}
-
-	LLSD asLLSD() const
-	{
-		return getKey();
-	}
-
-private:
-
-};
-
-// Contains notification form data, such as buttons and text fields along with
-// manipulator functions
-class LLNotificationForm
-{
-	LOG_CLASS(LLNotificationForm);
-
-public:
-	typedef enum e_ignore_type
-	{ 
-		IGNORE_NO,
-		IGNORE_WITH_DEFAULT_RESPONSE, 
-		IGNORE_WITH_LAST_RESPONSE, 
-		IGNORE_SHOW_AGAIN 
-	} EIgnoreType;
-
-	LLNotificationForm();
-	LLNotificationForm(const LLSD& sd);
-	LLNotificationForm(const std::string& name, const LLXMLNodePtr xml_node);
-
-	LLSD asLLSD() const;
-
-	S32 getNumElements() { return mFormData.size(); }
-	LLSD getElement(S32 index) { return mFormData.get(index); }
-	LLSD getElement(const std::string& element_name);
-	bool hasElement(const std::string& element_name);
-	void addElement(const std::string& type, const std::string& name, const LLSD& value = LLSD());
-	void formatElements(const LLSD& substitutions);
-	// appends form elements from another form serialized as LLSD
-	void append(const LLSD& sub_form);
-	std::string getDefaultOption();
-
-	EIgnoreType getIgnoreType() { return mIgnore; }
-	std::string getIgnoreMessage() { return mIgnoreMsg; }
-
-private:
-	LLSD	mFormData;
-	EIgnoreType mIgnore;
-	std::string mIgnoreMsg;
-};
-
-typedef boost::shared_ptr<LLNotificationForm> LLNotificationFormPtr;
-
-// This is the class of object read from the XML file (notifications.xml, 
-// from the appropriate local language directory).
-struct LLNotificationTemplate
-{
-	LLNotificationTemplate();
-    // the name of the notification -- the key used to identify it
-    // Ideally, the key should follow variable naming rules 
-    // (no spaces or punctuation).
-    std::string mName;
-    // The type of the notification
-    // used to control which queue it's stored in
-    std::string mType;
-    // The text used to display the notification. Replaceable parameters
-    // are enclosed in square brackets like this [].
-    std::string mMessage;
-	// The label for the notification; used for 
-	// certain classes of notification (those with a window and a window title). 
-	// Also used when a notification pops up underneath the current one.
-	// Replaceable parameters can be used in the label.
-	std::string mLabel;
-	// The name of the icon image. This should include an extension.
-	std::string mIcon;
-    // This is the Highlander bit -- "There Can Be Only One"
-    // An outstanding notification with this bit set
-    // is updated by an incoming notification with the same name,
-    // rather than creating a new entry in the queue.
-    // (used for things like progress indications, or repeating warnings
-    // like "the grid is going down in N minutes")
-    bool mUnique;
-    // if we want to be unique only if a certain part of the payload is constant
-    // specify the field names for the payload. The notification will only be
-    // combined if all of the fields named in the context are identical in the
-    // new and the old notification; otherwise, the notification will be
-    // duplicated. This is to support suppressing duplicate offers from the same
-    // sender but still differentiating different offers. Example: Invitation to
-    // conference chat.
-    std::vector<std::string> mUniqueContext;
-    // If this notification expires automatically, this value will be 
-    // nonzero, and indicates the number of seconds for which the notification
-    // will be valid (a teleport offer, for example, might be valid for 
-    // 300 seconds). 
-    U32 mExpireSeconds;
-    // if the offer expires, one of the options is chosen automatically
-    // based on its "value" parameter. This controls which one. 
-    // If expireSeconds is specified, expireOption should also be specified.
-    U32 mExpireOption;
-    // if the notification contains a url, it's stored here (and replaced 
-    // into the message where [_URL] is found)
-    std::string mURL;
-    // if there's a URL in the message, this controls which option visits
-    // that URL. Obsolete this and eliminate the buttons for affected
-    // messages when we allow clickable URLs in the UI
-    U32 mURLOption;
-	
-	U32 mURLOpenExternally;
-	//This is a flag that tells if the url needs to open externally dispite 
-	//what the user setting is.
-	
-	// does this notification persist across sessions? if so, it will be
-	// serialized to disk on first receipt and read on startup
-	bool mPersist;
-	// This is the name of the default functor, if present, to be
-	// used for the notification's callback. It is optional, and used only if 
-	// the notification is constructed without an identified functor.
-	std::string mDefaultFunctor;
-	// The form data associated with a given notification (buttons, text boxes, etc)
-    LLNotificationFormPtr mForm;
-	// default priority for notifications of this type
-	ENotificationPriority mPriority;
-	// UUID of the audio file to be played when this notification arrives
-	// this is loaded as a name, but looked up to get the UUID upon template load.
-	// If null, it wasn't specified.
-	LLUUID mSoundEffect;
-};
-
-// we want to keep a map of these by name, and it's best to manage them
-// with smart pointers
-typedef boost::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr;
-
-/**
- * @class LLNotification
- * @brief The object that expresses the details of a notification
- * 
- * We make this noncopyable because
- * we want to manage these through LLNotificationPtr, and only
- * ever create one instance of any given notification.
- * 
- * The enable_shared_from_this flag ensures that if we construct
- * a smart pointer from a notification, we'll always get the same
- * shared pointer.
- */
-class LLNotification  : 
-	boost::noncopyable,
-	public boost::enable_shared_from_this<LLNotification>
-{
-LOG_CLASS(LLNotification);
-friend class LLNotifications;
-
-public:
-	// parameter object used to instantiate a new notification
-	struct Params : public LLInitParam::Block<Params>
-	{
-		friend class LLNotification;
-	
-		Mandatory<std::string>					name;
-
-		// optional
-		Optional<LLSD>							substitutions;
-		Optional<LLSD>							payload;
-		Optional<ENotificationPriority>			priority;
-		Optional<LLSD>							form_elements;
-		Optional<LLDate>						timestamp;
-		Optional<LLNotificationContext*>		context;
-
-		struct Functor : public LLInitParam::Choice<Functor>
-		{
-			Alternative<std::string>										name;
-			Alternative<LLNotificationFunctorRegistry::ResponseFunctor>	function;
-
-			Functor()
-			:	name("functor_name"),
-				function("functor")
-			{}
-		};
-		Optional<Functor>						functor;
-
-		Params()
-		:	name("name"),
-			priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED),
-			timestamp("time_stamp")
-		{
-			timestamp = LLDate::now();
-		}
-
-		Params(const std::string& _name) 
-			:	name("name"),
-				priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED),
-				timestamp("time_stamp")
-		{
-			functor.name = _name;
-			name = _name;
-			timestamp = LLDate::now();
-		}
-	};
-
-private:
-	
-	LLUUID mId;
-	LLSD mPayload;
-	LLSD mSubstitutions;
-	LLDate mTimestamp;
-	LLDate mExpiresAt;
-	bool mCancelled;
-	bool mRespondedTo; 	// once the notification has been responded to, this becomes true
-	bool mIgnored;
-	ENotificationPriority mPriority;
-	LLNotificationFormPtr mForm;
-	
-	// a reference to the template
-	LLNotificationTemplatePtr mTemplatep;
-	
-	/*
-	 We want to be able to store and reload notifications so that they can survive
-	 a shutdown/restart of the client. So we can't simply pass in callbacks;
-	 we have to specify a callback mechanism that can be used by name rather than 
-	 by some arbitrary pointer -- and then people have to initialize callbacks 
-	 in some useful location. So we use LLNotificationFunctorRegistry to manage them.
-	 */
-	 std::string mResponseFunctorName;
-	
-	/*
-	 In cases where we want to specify an explict, non-persisted callback, 
-	 we store that in the callback registry under a dynamically generated
-	 key, and store the key in the notification, so we can still look it up
-	 using the same mechanism.
-	 */
-	bool mTemporaryResponder;
-
-	void init(const std::string& template_name, const LLSD& form_elements);
-
-	LLNotification(const Params& p);
-
-	// this is just for making it easy to look things up in a set organized by UUID -- DON'T USE IT
-	// for anything real!
-	LLNotification(LLUUID uuid) : mId(uuid) {}
-
-	void cancel();
-
-	bool payloadContainsAll(const std::vector<std::string>& required_fields) const;
-
-public:
-
-	// constructor from a saved notification
-	LLNotification(const LLSD& sd);
-
-	void setResponseFunctor(std::string const &responseFunctorName);
-
-	typedef enum e_response_template_type
-	{
-		WITHOUT_DEFAULT_BUTTON,
-		WITH_DEFAULT_BUTTON
-	} EResponseTemplateType;
-
-	// return response LLSD filled in with default form contents and (optionally) the default button selected
-	LLSD getResponseTemplate(EResponseTemplateType type = WITHOUT_DEFAULT_BUTTON);
-
-	// returns index of first button with value==TRUE
-	// usually this the button the user clicked on
-	// returns -1 if no button clicked (e.g. form has not been displayed)
-	static S32 getSelectedOption(const LLSD& notification, const LLSD& response);
-	// returns name of first button with value==TRUE
-	static std::string getSelectedOptionName(const LLSD& notification);
-
-	// after someone responds to a notification (usually by clicking a button,
-	// but sometimes by filling out a little form and THEN clicking a button),
-    // the result of the response (the name and value of the button clicked,
-	// plus any other data) should be packaged up as LLSD, then passed as a
-	// parameter to the notification's respond() method here. This will look up
-	// and call the appropriate responder.
-	//
-	// response is notification serialized as LLSD:
-	// ["name"] = notification name
-	// ["form"] = LLSD tree that includes form description and any prefilled form data
-	// ["response"] = form data filled in by user
-	// (including, but not limited to which button they clicked on)
-	// ["payload"] = transaction specific data, such as ["source_id"] (originator of notification),  
-	//				["item_id"] (attached inventory item), etc.
-	// ["substitutions"] = string substitutions used to generate notification message
-    // from the template
-	// ["time"] = time at which notification was generated;
-	// ["expiry"] = time at which notification expires;
-	// ["responseFunctor"] = name of registered functor that handles responses to notification;
-	LLSD asLLSD();
-
-	void respond(const LLSD& sd);
-
-	void setIgnored(bool ignore);
-
-	bool isCancelled() const
-	{
-		return mCancelled;
-	}
-
-	bool isRespondedTo() const
-	{
-		return mRespondedTo;
-	}
-
-	bool isIgnored() const
-	{
-		return mIgnored;
-	}
-
-	const std::string& getName() const
-	{
-		return mTemplatep->mName;
-	}
-	
-	const LLUUID& id() const
-	{
-		return mId;
-	}
-	
-	const LLSD& getPayload() const
-	{
-		return mPayload;
-	}
-
-	const LLSD& getSubstitutions() const
-	{
-		return mSubstitutions;
-	}
-
-	const LLDate& getDate() const
-	{
-		return mTimestamp;
-	}
-
-	std::string getType() const
-	{
-		return (mTemplatep ? mTemplatep->mType : "");
-	}
-
-	std::string getMessage() const;
-	std::string getLabel() const;
-
-	std::string getURL() const;
-//	{
-//		return (mTemplatep ? mTemplatep->mURL : "");
-//	}
-
-	S32 getURLOption() const
-	{
-		return (mTemplatep ? mTemplatep->mURLOption : -1);
-	}
-    
-	S32 getURLOpenExternally() const
-	{
-		return(mTemplatep? mTemplatep->mURLOpenExternally : -1);
-	}
-	
-	const LLNotificationFormPtr getForm();
-
-	const LLDate getExpiration() const
-	{
-		return mExpiresAt;
-	}
-
-	ENotificationPriority getPriority() const
-	{
-		return mPriority;
-	}
-
-	const LLUUID getID() const
-	{
-		return mId;
-	}
-	
-	// comparing two notifications normally means comparing them by UUID (so we can look them
-	// up quickly this way)
-	bool operator<(const LLNotification& rhs) const
-	{
-		return mId < rhs.mId;
-	}
-
-	bool operator==(const LLNotification& rhs) const
-	{
-		return mId == rhs.mId;
-	}
-
-	bool operator!=(const LLNotification& rhs) const
-	{
-		return !operator==(rhs);
-	}
-
-	bool isSameObjectAs(const LLNotification* rhs) const
-	{
-		return this == rhs;
-	}
-	
-	// this object has been updated, so tell all our clients
-	void update();
-
-	void updateFrom(LLNotificationPtr other);
-	
-	// A fuzzy equals comparator.
-	// true only if both notifications have the same template and 
-	//     1) flagged as unique (there can be only one of these) OR 
-	//     2) all required payload fields of each also exist in the other.
-	bool isEquivalentTo(LLNotificationPtr that) const;
-	
-	// if the current time is greater than the expiration, the notification is expired
-	bool isExpired() const
-	{
-		if (mExpiresAt.secondsSinceEpoch() == 0)
-		{
-			return false;
-		}
-		
-		LLDate rightnow = LLDate::now();
-		return rightnow > mExpiresAt;
-	}
-	
-	std::string summarize() const;
-
-	bool hasUniquenessConstraints() const { return (mTemplatep ? mTemplatep->mUnique : false);}
-
-	virtual ~LLNotification() {}
-};
-
-std::ostream& operator<<(std::ostream& s, const LLNotification& notification);
-
-namespace LLNotificationFilters
-{
-	// a sample filter
-	bool includeEverything(LLNotificationPtr p);
-
-	typedef enum e_comparison 
-	{ 
-		EQUAL, 
-		LESS, 
-		GREATER, 
-		LESS_EQUAL, 
-		GREATER_EQUAL 
-	} EComparison;
-
-	// generic filter functor that takes method or member variable reference
-	template<typename T>
-	struct filterBy
-	{
-		typedef boost::function<T (LLNotificationPtr)>	field_t;
-		typedef typename boost::remove_reference<T>::type		value_t;
-		
-		filterBy(field_t field, value_t value, EComparison comparison = EQUAL) 
-			:	mField(field), 
-				mFilterValue(value),
-				mComparison(comparison)
-		{
-		}		
-		
-		bool operator()(LLNotificationPtr p)
-		{
-			switch(mComparison)
-			{
-			case EQUAL:
-				return mField(p) == mFilterValue;
-			case LESS:
-				return mField(p) < mFilterValue;
-			case GREATER:
-				return mField(p) > mFilterValue;
-			case LESS_EQUAL:
-				return mField(p) <= mFilterValue;
-			case GREATER_EQUAL:
-				return mField(p) >= mFilterValue;
-			default:
-				return false;
-			}
-		}
-
-		field_t mField;
-		value_t	mFilterValue;
-		EComparison mComparison;
-	};
-};
-
-namespace LLNotificationComparators
-{
-	typedef enum e_direction { ORDER_DECREASING, ORDER_INCREASING } EDirection;
-
-	// generic order functor that takes method or member variable reference
-	template<typename T>
-	struct orderBy
-	{
-		typedef boost::function<T (LLNotificationPtr)> field_t;
-		orderBy(field_t field, EDirection = ORDER_INCREASING) : mField(field) {}
-		bool operator()(LLNotificationPtr lhs, LLNotificationPtr rhs)
-		{
-			if (mDirection == ORDER_DECREASING)
-			{
-				return mField(lhs) > mField(rhs);
-			}
-			else
-			{
-				return mField(lhs) < mField(rhs);
-			}
-		}
-
-		field_t mField;
-		EDirection mDirection;
-	};
-
-	struct orderByUUID : public orderBy<const LLUUID&>
-	{
-		orderByUUID(EDirection direction = ORDER_INCREASING) : orderBy<const LLUUID&>(&LLNotification::id, direction) {}
-	};
-
-	struct orderByDate : public orderBy<const LLDate&>
-	{
-		orderByDate(EDirection direction = ORDER_INCREASING) : orderBy<const LLDate&>(&LLNotification::getDate, direction) {}
-	};
-};
-
-typedef boost::function<bool (LLNotificationPtr)> LLNotificationFilter;
-typedef boost::function<bool (LLNotificationPtr, LLNotificationPtr)> LLNotificationComparator;
-typedef std::set<LLNotificationPtr, LLNotificationComparator> LLNotificationSet;
-typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap;
-
-// ========================================================
-// Abstract base class (interface) for a channel; also used for the master container.
-// This lets us arrange channels into a call hierarchy.
-
-// We maintain a heirarchy of notification channels; events are always started at the top
-// and propagated through the hierarchy only if they pass a filter.
-// Any channel can be created with a parent. A null parent (empty string) means it's
-// tied to the root of the tree (the LLNotifications class itself).
-// The default hierarchy looks like this:
-//
-// LLNotifications --+-- Expiration --+-- Mute --+-- Ignore --+-- Visible --+-- History
-//                                                                          +-- Alerts
-//                                                                          +-- Notifications
-//
-// In general, new channels that want to only see notifications that pass through 
-// all of the built-in tests should attach to the "Visible" channel
-//
-class LLNotificationChannelBase :
-	public LLEventTrackable
-{
-	LOG_CLASS(LLNotificationChannelBase);
-public:
-	LLNotificationChannelBase(LLNotificationFilter filter, LLNotificationComparator comp) : 
-		mFilter(filter), mItems(comp) 
-	{}
-	virtual ~LLNotificationChannelBase() {}
-	// you can also connect to a Channel, so you can be notified of
-	// changes to this channel
-	template <typename LISTENER>
-    LLBoundListener connectChanged(const LISTENER& slot)
-    {
-        // Examine slot to see if it binds an LLEventTrackable subclass, or a
-        // boost::shared_ptr to something, or a boost::weak_ptr to something.
-        // Call this->connectChangedImpl() to actually connect it.
-        return LLEventDetail::visit_and_connect(slot,
-                                  boost::bind(&LLNotificationChannelBase::connectChangedImpl,
-                                              this,
-                                              _1));
-    }
-    template <typename LISTENER>
-	LLBoundListener connectPassedFilter(const LISTENER& slot)
-    {
-        // see comments in connectChanged()
-        return LLEventDetail::visit_and_connect(slot,
-                                  boost::bind(&LLNotificationChannelBase::connectPassedFilterImpl,
-                                              this,
-                                              _1));
-    }
-    template <typename LISTENER>
-	LLBoundListener connectFailedFilter(const LISTENER& slot)
-    {
-        // see comments in connectChanged()
-        return LLEventDetail::visit_and_connect(slot,
-                                  boost::bind(&LLNotificationChannelBase::connectFailedFilterImpl,
-                                              this,
-                                              _1));
-    }
-
-	// use this when items change or to add a new one
-	bool updateItem(const LLSD& payload);
-	const LLNotificationFilter& getFilter() { return mFilter; }
-
-protected:
-    LLBoundListener connectChangedImpl(const LLEventListener& slot);
-    LLBoundListener connectPassedFilterImpl(const LLEventListener& slot);
-    LLBoundListener connectFailedFilterImpl(const LLEventListener& slot);
-
-	LLNotificationSet mItems;
-	LLStandardSignal mChanged;
-	LLStandardSignal mPassedFilter;
-	LLStandardSignal mFailedFilter;
-	
-	// these are action methods that subclasses can override to take action 
-	// on specific types of changes; the management of the mItems list is
-	// still handled by the generic handler.
-	virtual void onLoad(LLNotificationPtr p) {}
-	virtual void onAdd(LLNotificationPtr p) {}
-	virtual void onDelete(LLNotificationPtr p) {}
-	virtual void onChange(LLNotificationPtr p) {}
-
-	bool updateItem(const LLSD& payload, LLNotificationPtr pNotification);
-	LLNotificationFilter mFilter;
-};
-
-// The type of the pointers that we're going to manage in the NotificationQueue system
-// Because LLNotifications is a singleton, we don't actually expect to ever 
-// destroy it, but if it becomes necessary to do so, the shared_ptr model
-// will ensure that we don't leak resources.
-class LLNotificationChannel;
-typedef boost::shared_ptr<LLNotificationChannel> LLNotificationChannelPtr;
-
-// manages a list of notifications
-// Note that if this is ever copied around, we might find ourselves with multiple copies
-// of a queue with notifications being added to different nonequivalent copies. So we 
-// make it inherit from boost::noncopyable, and then create a map of shared_ptr to manage it.
-// 
-// NOTE: LLNotificationChannel is self-registering. The *correct* way to create one is to 
-// do something like:
-//		LLNotificationChannel::buildChannel("name", "parent"...);
-// This returns an LLNotificationChannelPtr, which you can store, or
-// you can then retrieve the channel by using the registry:
-//		LLNotifications::instance().getChannel("name")...
-//
-class LLNotificationChannel : 
-	boost::noncopyable, 
-	public LLNotificationChannelBase
-{
-	LOG_CLASS(LLNotificationChannel);
-
-public:  
-	virtual ~LLNotificationChannel() {}
-	typedef LLNotificationSet::iterator Iterator;
-    
-	std::string getName() const { return mName; }
-	std::string getParentChannelName() { return mParent; }
-    
-    bool isEmpty() const;
-    
-    Iterator begin();
-    Iterator end();
-
-    // Channels have a comparator to control sort order;
-	// the default sorts by arrival date
-    void setComparator(LLNotificationComparator comparator);
-	
-	std::string summarize();
-
-	// factory method for constructing these channels; since they're self-registering,
-	// we want to make sure that you can't use new to make them
-	static LLNotificationChannelPtr buildChannel(const std::string& name, const std::string& parent,
-						LLNotificationFilter filter=LLNotificationFilters::includeEverything, 
-						LLNotificationComparator comparator=LLNotificationComparators::orderByUUID());
-	
-protected:
-    // Notification Channels have a filter, which determines which notifications
-	// will be added to this channel. 
-	// Channel filters cannot change.
-	// Channels have a protected constructor so you can't make smart pointers that don't 
-	// come from our internal reference; call NotificationChannel::build(args)
-	LLNotificationChannel(const std::string& name, const std::string& parent,
-						  LLNotificationFilter filter, LLNotificationComparator comparator);
-
-private:
-	std::string mName;
-	std::string mParent;
-	LLNotificationComparator mComparator;
-};
-
-
-class LLNotificationsListener;
-
-class LLNotifications : 
-	public LLSingleton<LLNotifications>, 
-	public LLNotificationChannelBase
-{
-	LOG_CLASS(LLNotifications);
-
-	friend class LLSingleton<LLNotifications>;
-public:
-	// load notification descriptions from file; 
-	// OK to call more than once because it will reload
-	bool loadTemplates();  
-	LLXMLNodePtr checkForXMLTemplate(LLXMLNodePtr item);
-	
-	// Add a simple notification (from XUI)
-	void addFromCallback(const LLSD& name);
-	
-	// we provide a collection of simple add notification functions so that it's reasonable to create notifications in one line
-	LLNotificationPtr add(const std::string& name, 
-						const LLSD& substitutions = LLSD(), 
-						const LLSD& payload = LLSD());
-	LLNotificationPtr add(const std::string& name, 
-						const LLSD& substitutions, 
-						const LLSD& payload, 
-						const std::string& functor_name);
-	LLNotificationPtr add(const std::string& name, 
-						const LLSD& substitutions, 
-						const LLSD& payload, 
-						LLNotificationFunctorRegistry::ResponseFunctor functor);
-	LLNotificationPtr add(const LLNotification::Params& p);
-
-	void add(const LLNotificationPtr pNotif);
-	void cancel(LLNotificationPtr pNotif);
-	void update(const LLNotificationPtr pNotif);
-
-	LLNotificationPtr find(LLUUID uuid);
-	
-	typedef boost::function<void (LLNotificationPtr)> NotificationProcess;
-	
-	void forEachNotification(NotificationProcess process);
-
-	// This is all stuff for managing the templates
-	// take your template out
-	LLNotificationTemplatePtr getTemplate(const std::string& name);
-	
-	// get the whole collection
-	typedef std::vector<std::string> TemplateNames;
-	TemplateNames getTemplateNames() const;  // returns a list of notification names
-	
-	typedef std::map<std::string, LLNotificationTemplatePtr> TemplateMap;
-
-	TemplateMap::const_iterator templatesBegin() { return mTemplates.begin(); }
-	TemplateMap::const_iterator templatesEnd() { return mTemplates.end(); }
-
-	// test for existence
-	bool templateExists(const std::string& name);
-	// useful if you're reloading the file
-	void clearTemplates();   // erase all templates
-
-	void forceResponse(const LLNotification::Params& params, S32 option);
-
-	void createDefaultChannels();
-
-	typedef std::map<std::string, LLNotificationChannelPtr> ChannelMap;
-	ChannelMap mChannels;
-
-	void addChannel(LLNotificationChannelPtr pChan);
-	LLNotificationChannelPtr getChannel(const std::string& channelName);
-	
-	std::string getGlobalString(const std::string& key) const;
-
-	void setIgnoreAllNotifications(bool ignore);
-	bool getIgnoreAllNotifications();
-
-private:
-	// we're a singleton, so we don't have a public constructor
-	LLNotifications();
-	/*virtual*/ void initSingleton();
-	
-	void loadPersistentNotifications();
-
-	bool expirationFilter(LLNotificationPtr pNotification);
-	bool expirationHandler(const LLSD& payload);
-	bool uniqueFilter(LLNotificationPtr pNotification);
-	bool uniqueHandler(const LLSD& payload);
-	bool failedUniquenessTest(const LLSD& payload);
-	LLNotificationChannelPtr pHistoryChannel;
-	LLNotificationChannelPtr pExpirationChannel;
-	
-	// put your template in
-	bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate);
-	TemplateMap mTemplates;
-
-	std::string mFileName;
-	
-	typedef std::map<std::string, LLXMLNodePtr> XMLTemplateMap;
-	XMLTemplateMap mXmlTemplates;
-
-	LLNotificationMap mUniqueNotifications;
-	
-	typedef std::map<std::string, std::string> GlobalStringMap;
-	GlobalStringMap mGlobalStrings;
-
-	bool mIgnoreAllNotifications;
-
-    boost::scoped_ptr<LLNotificationsListener> mListener;
-};
-
-
-#endif//LL_LLNOTIFICATIONS_H
-
+/**
+* @file llnotifications.h
+* @brief Non-UI manager and support for keeping a prioritized list of notifications
+* @author Q (with assistance from Richard and Coco)
+*
+* $LicenseInfo:firstyear=2008&license=viewergpl$
+* 
+* Copyright (c) 2008-2009, Linden Research, Inc.
+* 
+* Second Life Viewer Source Code
+* The source code in this file ("Source Code") is provided by Linden Lab
+* to you under the terms of the GNU General Public License, version 2.0
+* ("GPL"), unless you have obtained a separate licensing agreement
+* ("Other License"), formally executed by you and Linden Lab.  Terms of
+* the GPL can be found in doc/GPL-license.txt in this distribution, or
+* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+* 
+* There are special exceptions to the terms and conditions of the GPL as
+* it is applied to this Source Code. View the full text of the exception
+* in the file doc/FLOSS-exception.txt in this software distribution, or
+* online at
+* http://secondlifegrid.net/programs/open_source/licensing/flossexception
+* 
+* By copying, modifying or distributing this software, you acknowledge
+* that you have read and understood your obligations described above,
+* and agree to abide by those obligations.
+* 
+* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+* COMPLETENESS OR PERFORMANCE.
+* $/LicenseInfo$
+*/
+
+#ifndef LL_LLNOTIFICATIONS_H
+#define LL_LLNOTIFICATIONS_H
+
+/**
+ * This system is intended to provide a singleton mechanism for adding
+ * notifications to one of an arbitrary set of event channels.
+ * 
+ * Controlling JIRA: DEV-9061
+ *
+ * Every notification has (see code for full list):
+ *  - a textual name, which is used to look up its template in the XML files
+ *  - a payload, which is a block of LLSD
+ *  - a channel, which is normally extracted from the XML files but
+ *	  can be overridden.
+ *  - a timestamp, used to order the notifications
+ *  - expiration time -- if nonzero, specifies a time after which the
+ *    notification will no longer be valid.
+ *  - a callback name and a couple of status bits related to callbacks (see below)
+ * 
+ * There is a management class called LLNotifications, which is an LLSingleton.
+ * The class maintains a collection of all of the notifications received
+ * or processed during this session, and also manages the persistence
+ * of those notifications that must be persisted.
+ * 
+ * We also have Channels. A channel is a view on a collection of notifications;
+ * The collection is defined by a filter function that controls which
+ * notifications are in the channel, and its ordering is controlled by 
+ * a comparator. 
+ *
+ * There is a hierarchy of channels; notifications flow down from
+ * the management class (LLNotifications, which itself inherits from
+ * The channel base class) to the individual channels.
+ * Any change to notifications (add, delete, modify) is 
+ * automatically propagated through the channel hierarchy.
+ * 
+ * We provide methods for adding a new notification, for removing
+ * one, and for managing channels. Channels are relatively cheap to construct
+ * and maintain, so in general, human interfaces should use channels to
+ * select and manage their lists of notifications.
+ * 
+ * We also maintain a collection of templates that are loaded from the 
+ * XML file of template translations. The system supports substitution
+ * of named variables from the payload into the XML file.
+ * 
+ * By default, only the "unknown message" template is built into the system.
+ * It is not an error to add a notification that's not found in the 
+ * template system, but it is logged.
+ *
+ */
+
+#include <string>
+#include <list>
+#include <vector>
+#include <map>
+#include <set>
+#include <iomanip>
+#include <sstream>
+
+#include <boost/utility.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/type_traits.hpp>
+
+// we want to minimize external dependencies, but this one is important
+#include "llsd.h"
+
+// and we need this to manage the notification callbacks
+#include "llevents.h"
+#include "llfunctorregistry.h"
+#include "llui.h"
+#include "llmemory.h"
+#include "llnotificationslistener.h"
+
+class LLNotification;
+typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
+
+	
+typedef enum e_notification_priority
+{
+	NOTIFICATION_PRIORITY_UNSPECIFIED,
+	NOTIFICATION_PRIORITY_LOW,
+	NOTIFICATION_PRIORITY_NORMAL,
+	NOTIFICATION_PRIORITY_HIGH,
+	NOTIFICATION_PRIORITY_CRITICAL
+} ENotificationPriority;
+
+typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder;
+
+typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;
+typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration;
+
+// context data that can be looked up via a notification's payload by the display logic
+// derive from this class to implement specific contexts
+class LLNotificationContext : public LLInstanceTracker<LLNotificationContext, LLUUID>
+{
+public:
+	LLNotificationContext() : LLInstanceTracker<LLNotificationContext, LLUUID>(LLUUID::generateNewID())
+	{
+	}
+
+	virtual ~LLNotificationContext() {}
+
+	LLSD asLLSD() const
+	{
+		return getKey();
+	}
+
+private:
+
+};
+
+// Contains notification form data, such as buttons and text fields along with
+// manipulator functions
+class LLNotificationForm
+{
+	LOG_CLASS(LLNotificationForm);
+
+public:
+	typedef enum e_ignore_type
+	{ 
+		IGNORE_NO,
+		IGNORE_WITH_DEFAULT_RESPONSE, 
+		IGNORE_WITH_LAST_RESPONSE, 
+		IGNORE_SHOW_AGAIN 
+	} EIgnoreType;
+
+	LLNotificationForm();
+	LLNotificationForm(const LLSD& sd);
+	LLNotificationForm(const std::string& name, const LLXMLNodePtr xml_node);
+
+	LLSD asLLSD() const;
+
+	S32 getNumElements() { return mFormData.size(); }
+	LLSD getElement(S32 index) { return mFormData.get(index); }
+	LLSD getElement(const std::string& element_name);
+	bool hasElement(const std::string& element_name);
+	void addElement(const std::string& type, const std::string& name, const LLSD& value = LLSD());
+	void formatElements(const LLSD& substitutions);
+	// appends form elements from another form serialized as LLSD
+	void append(const LLSD& sub_form);
+	std::string getDefaultOption();
+
+	EIgnoreType getIgnoreType() { return mIgnore; }
+	std::string getIgnoreMessage() { return mIgnoreMsg; }
+
+private:
+	LLSD	mFormData;
+	EIgnoreType mIgnore;
+	std::string mIgnoreMsg;
+};
+
+typedef boost::shared_ptr<LLNotificationForm> LLNotificationFormPtr;
+
+// This is the class of object read from the XML file (notifications.xml, 
+// from the appropriate local language directory).
+struct LLNotificationTemplate
+{
+	LLNotificationTemplate();
+    // the name of the notification -- the key used to identify it
+    // Ideally, the key should follow variable naming rules 
+    // (no spaces or punctuation).
+    std::string mName;
+    // The type of the notification
+    // used to control which queue it's stored in
+    std::string mType;
+    // The text used to display the notification. Replaceable parameters
+    // are enclosed in square brackets like this [].
+    std::string mMessage;
+	// The label for the notification; used for 
+	// certain classes of notification (those with a window and a window title). 
+	// Also used when a notification pops up underneath the current one.
+	// Replaceable parameters can be used in the label.
+	std::string mLabel;
+	// The name of the icon image. This should include an extension.
+	std::string mIcon;
+    // This is the Highlander bit -- "There Can Be Only One"
+    // An outstanding notification with this bit set
+    // is updated by an incoming notification with the same name,
+    // rather than creating a new entry in the queue.
+    // (used for things like progress indications, or repeating warnings
+    // like "the grid is going down in N minutes")
+    bool mUnique;
+    // if we want to be unique only if a certain part of the payload is constant
+    // specify the field names for the payload. The notification will only be
+    // combined if all of the fields named in the context are identical in the
+    // new and the old notification; otherwise, the notification will be
+    // duplicated. This is to support suppressing duplicate offers from the same
+    // sender but still differentiating different offers. Example: Invitation to
+    // conference chat.
+    std::vector<std::string> mUniqueContext;
+    // If this notification expires automatically, this value will be 
+    // nonzero, and indicates the number of seconds for which the notification
+    // will be valid (a teleport offer, for example, might be valid for 
+    // 300 seconds). 
+    U32 mExpireSeconds;
+    // if the offer expires, one of the options is chosen automatically
+    // based on its "value" parameter. This controls which one. 
+    // If expireSeconds is specified, expireOption should also be specified.
+    U32 mExpireOption;
+    // if the notification contains a url, it's stored here (and replaced 
+    // into the message where [_URL] is found)
+    std::string mURL;
+    // if there's a URL in the message, this controls which option visits
+    // that URL. Obsolete this and eliminate the buttons for affected
+    // messages when we allow clickable URLs in the UI
+    U32 mURLOption;
+	
+	U32 mURLOpenExternally;
+	//This is a flag that tells if the url needs to open externally dispite 
+	//what the user setting is.
+	
+	// does this notification persist across sessions? if so, it will be
+	// serialized to disk on first receipt and read on startup
+	bool mPersist;
+	// This is the name of the default functor, if present, to be
+	// used for the notification's callback. It is optional, and used only if 
+	// the notification is constructed without an identified functor.
+	std::string mDefaultFunctor;
+	// The form data associated with a given notification (buttons, text boxes, etc)
+    LLNotificationFormPtr mForm;
+	// default priority for notifications of this type
+	ENotificationPriority mPriority;
+	// UUID of the audio file to be played when this notification arrives
+	// this is loaded as a name, but looked up to get the UUID upon template load.
+	// If null, it wasn't specified.
+	LLUUID mSoundEffect;
+};
+
+// we want to keep a map of these by name, and it's best to manage them
+// with smart pointers
+typedef boost::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr;
+
+/**
+ * @class LLNotification
+ * @brief The object that expresses the details of a notification
+ * 
+ * We make this noncopyable because
+ * we want to manage these through LLNotificationPtr, and only
+ * ever create one instance of any given notification.
+ * 
+ * The enable_shared_from_this flag ensures that if we construct
+ * a smart pointer from a notification, we'll always get the same
+ * shared pointer.
+ */
+class LLNotification  : 
+	boost::noncopyable,
+	public boost::enable_shared_from_this<LLNotification>
+{
+LOG_CLASS(LLNotification);
+friend class LLNotifications;
+
+public:
+	// parameter object used to instantiate a new notification
+	struct Params : public LLInitParam::Block<Params>
+	{
+		friend class LLNotification;
+	
+		Mandatory<std::string>					name;
+
+		// optional
+		Optional<LLSD>							substitutions;
+		Optional<LLSD>							payload;
+		Optional<ENotificationPriority>			priority;
+		Optional<LLSD>							form_elements;
+		Optional<LLDate>						timestamp;
+		Optional<LLNotificationContext*>		context;
+
+		struct Functor : public LLInitParam::Choice<Functor>
+		{
+			Alternative<std::string>										name;
+			Alternative<LLNotificationFunctorRegistry::ResponseFunctor>	function;
+
+			Functor()
+			:	name("functor_name"),
+				function("functor")
+			{}
+		};
+		Optional<Functor>						functor;
+
+		Params()
+		:	name("name"),
+			priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED),
+			timestamp("time_stamp")
+		{
+			timestamp = LLDate::now();
+		}
+
+		Params(const std::string& _name) 
+			:	name("name"),
+				priority("priority", NOTIFICATION_PRIORITY_UNSPECIFIED),
+				timestamp("time_stamp")
+		{
+			functor.name = _name;
+			name = _name;
+			timestamp = LLDate::now();
+		}
+	};
+
+private:
+	
+	LLUUID mId;
+	LLSD mPayload;
+	LLSD mSubstitutions;
+	LLDate mTimestamp;
+	LLDate mExpiresAt;
+	bool mCancelled;
+	bool mRespondedTo; 	// once the notification has been responded to, this becomes true
+	bool mIgnored;
+	ENotificationPriority mPriority;
+	LLNotificationFormPtr mForm;
+	
+	// a reference to the template
+	LLNotificationTemplatePtr mTemplatep;
+	
+	/*
+	 We want to be able to store and reload notifications so that they can survive
+	 a shutdown/restart of the client. So we can't simply pass in callbacks;
+	 we have to specify a callback mechanism that can be used by name rather than 
+	 by some arbitrary pointer -- and then people have to initialize callbacks 
+	 in some useful location. So we use LLNotificationFunctorRegistry to manage them.
+	 */
+	 std::string mResponseFunctorName;
+	
+	/*
+	 In cases where we want to specify an explict, non-persisted callback, 
+	 we store that in the callback registry under a dynamically generated
+	 key, and store the key in the notification, so we can still look it up
+	 using the same mechanism.
+	 */
+	bool mTemporaryResponder;
+
+	void init(const std::string& template_name, const LLSD& form_elements);
+
+	LLNotification(const Params& p);
+
+	// this is just for making it easy to look things up in a set organized by UUID -- DON'T USE IT
+	// for anything real!
+	LLNotification(LLUUID uuid) : mId(uuid) {}
+
+	void cancel();
+
+	bool payloadContainsAll(const std::vector<std::string>& required_fields) const;
+
+public:
+
+	// constructor from a saved notification
+	LLNotification(const LLSD& sd);
+
+	void setResponseFunctor(std::string const &responseFunctorName);
+
+	typedef enum e_response_template_type
+	{
+		WITHOUT_DEFAULT_BUTTON,
+		WITH_DEFAULT_BUTTON
+	} EResponseTemplateType;
+
+	// return response LLSD filled in with default form contents and (optionally) the default button selected
+	LLSD getResponseTemplate(EResponseTemplateType type = WITHOUT_DEFAULT_BUTTON);
+
+	// returns index of first button with value==TRUE
+	// usually this the button the user clicked on
+	// returns -1 if no button clicked (e.g. form has not been displayed)
+	static S32 getSelectedOption(const LLSD& notification, const LLSD& response);
+	// returns name of first button with value==TRUE
+	static std::string getSelectedOptionName(const LLSD& notification);
+
+	// after someone responds to a notification (usually by clicking a button,
+	// but sometimes by filling out a little form and THEN clicking a button),
+    // the result of the response (the name and value of the button clicked,
+	// plus any other data) should be packaged up as LLSD, then passed as a
+	// parameter to the notification's respond() method here. This will look up
+	// and call the appropriate responder.
+	//
+	// response is notification serialized as LLSD:
+	// ["name"] = notification name
+	// ["form"] = LLSD tree that includes form description and any prefilled form data
+	// ["response"] = form data filled in by user
+	// (including, but not limited to which button they clicked on)
+	// ["payload"] = transaction specific data, such as ["source_id"] (originator of notification),  
+	//				["item_id"] (attached inventory item), etc.
+	// ["substitutions"] = string substitutions used to generate notification message
+    // from the template
+	// ["time"] = time at which notification was generated;
+	// ["expiry"] = time at which notification expires;
+	// ["responseFunctor"] = name of registered functor that handles responses to notification;
+	LLSD asLLSD();
+
+	void respond(const LLSD& sd);
+
+	void setIgnored(bool ignore);
+
+	bool isCancelled() const
+	{
+		return mCancelled;
+	}
+
+	bool isRespondedTo() const
+	{
+		return mRespondedTo;
+	}
+
+	bool isIgnored() const
+	{
+		return mIgnored;
+	}
+
+	const std::string& getName() const
+	{
+		return mTemplatep->mName;
+	}
+	
+	const LLUUID& id() const
+	{
+		return mId;
+	}
+	
+	const LLSD& getPayload() const
+	{
+		return mPayload;
+	}
+
+	const LLSD& getSubstitutions() const
+	{
+		return mSubstitutions;
+	}
+
+	const LLDate& getDate() const
+	{
+		return mTimestamp;
+	}
+
+	std::string getType() const
+	{
+		return (mTemplatep ? mTemplatep->mType : "");
+	}
+
+	std::string getMessage() const;
+	std::string getLabel() const;
+
+	std::string getURL() const;
+//	{
+//		return (mTemplatep ? mTemplatep->mURL : "");
+//	}
+
+	S32 getURLOption() const
+	{
+		return (mTemplatep ? mTemplatep->mURLOption : -1);
+	}
+    
+	S32 getURLOpenExternally() const
+	{
+		return(mTemplatep? mTemplatep->mURLOpenExternally : -1);
+	}
+	
+	const LLNotificationFormPtr getForm();
+
+	const LLDate getExpiration() const
+	{
+		return mExpiresAt;
+	}
+
+	ENotificationPriority getPriority() const
+	{
+		return mPriority;
+	}
+
+	const LLUUID getID() const
+	{
+		return mId;
+	}
+	
+	// comparing two notifications normally means comparing them by UUID (so we can look them
+	// up quickly this way)
+	bool operator<(const LLNotification& rhs) const
+	{
+		return mId < rhs.mId;
+	}
+
+	bool operator==(const LLNotification& rhs) const
+	{
+		return mId == rhs.mId;
+	}
+
+	bool operator!=(const LLNotification& rhs) const
+	{
+		return !operator==(rhs);
+	}
+
+	bool isSameObjectAs(const LLNotification* rhs) const
+	{
+		return this == rhs;
+	}
+	
+	// this object has been updated, so tell all our clients
+	void update();
+
+	void updateFrom(LLNotificationPtr other);
+	
+	// A fuzzy equals comparator.
+	// true only if both notifications have the same template and 
+	//     1) flagged as unique (there can be only one of these) OR 
+	//     2) all required payload fields of each also exist in the other.
+	bool isEquivalentTo(LLNotificationPtr that) const;
+	
+	// if the current time is greater than the expiration, the notification is expired
+	bool isExpired() const
+	{
+		if (mExpiresAt.secondsSinceEpoch() == 0)
+		{
+			return false;
+		}
+		
+		LLDate rightnow = LLDate::now();
+		return rightnow > mExpiresAt;
+	}
+	
+	std::string summarize() const;
+
+	bool hasUniquenessConstraints() const { return (mTemplatep ? mTemplatep->mUnique : false);}
+
+	virtual ~LLNotification() {}
+};
+
+std::ostream& operator<<(std::ostream& s, const LLNotification& notification);
+
+namespace LLNotificationFilters
+{
+	// a sample filter
+	bool includeEverything(LLNotificationPtr p);
+
+	typedef enum e_comparison 
+	{ 
+		EQUAL, 
+		LESS, 
+		GREATER, 
+		LESS_EQUAL, 
+		GREATER_EQUAL 
+	} EComparison;
+
+	// generic filter functor that takes method or member variable reference
+	template<typename T>
+	struct filterBy
+	{
+		typedef boost::function<T (LLNotificationPtr)>	field_t;
+		typedef typename boost::remove_reference<T>::type		value_t;
+		
+		filterBy(field_t field, value_t value, EComparison comparison = EQUAL) 
+			:	mField(field), 
+				mFilterValue(value),
+				mComparison(comparison)
+		{
+		}		
+		
+		bool operator()(LLNotificationPtr p)
+		{
+			switch(mComparison)
+			{
+			case EQUAL:
+				return mField(p) == mFilterValue;
+			case LESS:
+				return mField(p) < mFilterValue;
+			case GREATER:
+				return mField(p) > mFilterValue;
+			case LESS_EQUAL:
+				return mField(p) <= mFilterValue;
+			case GREATER_EQUAL:
+				return mField(p) >= mFilterValue;
+			default:
+				return false;
+			}
+		}
+
+		field_t mField;
+		value_t	mFilterValue;
+		EComparison mComparison;
+	};
+};
+
+namespace LLNotificationComparators
+{
+	typedef enum e_direction { ORDER_DECREASING, ORDER_INCREASING } EDirection;
+
+	// generic order functor that takes method or member variable reference
+	template<typename T>
+	struct orderBy
+	{
+		typedef boost::function<T (LLNotificationPtr)> field_t;
+		orderBy(field_t field, EDirection = ORDER_INCREASING) : mField(field) {}
+		bool operator()(LLNotificationPtr lhs, LLNotificationPtr rhs)
+		{
+			if (mDirection == ORDER_DECREASING)
+			{
+				return mField(lhs) > mField(rhs);
+			}
+			else
+			{
+				return mField(lhs) < mField(rhs);
+			}
+		}
+
+		field_t mField;
+		EDirection mDirection;
+	};
+
+	struct orderByUUID : public orderBy<const LLUUID&>
+	{
+		orderByUUID(EDirection direction = ORDER_INCREASING) : orderBy<const LLUUID&>(&LLNotification::id, direction) {}
+	};
+
+	struct orderByDate : public orderBy<const LLDate&>
+	{
+		orderByDate(EDirection direction = ORDER_INCREASING) : orderBy<const LLDate&>(&LLNotification::getDate, direction) {}
+	};
+};
+
+typedef boost::function<bool (LLNotificationPtr)> LLNotificationFilter;
+typedef boost::function<bool (LLNotificationPtr, LLNotificationPtr)> LLNotificationComparator;
+typedef std::set<LLNotificationPtr, LLNotificationComparator> LLNotificationSet;
+typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap;
+
+// ========================================================
+// Abstract base class (interface) for a channel; also used for the master container.
+// This lets us arrange channels into a call hierarchy.
+
+// We maintain a heirarchy of notification channels; events are always started at the top
+// and propagated through the hierarchy only if they pass a filter.
+// Any channel can be created with a parent. A null parent (empty string) means it's
+// tied to the root of the tree (the LLNotifications class itself).
+// The default hierarchy looks like this:
+//
+// LLNotifications --+-- Expiration --+-- Mute --+-- Ignore --+-- Visible --+-- History
+//                                                                          +-- Alerts
+//                                                                          +-- Notifications
+//
+// In general, new channels that want to only see notifications that pass through 
+// all of the built-in tests should attach to the "Visible" channel
+//
+class LLNotificationChannelBase :
+	public LLEventTrackable
+{
+	LOG_CLASS(LLNotificationChannelBase);
+public:
+	LLNotificationChannelBase(LLNotificationFilter filter, LLNotificationComparator comp) : 
+		mFilter(filter), mItems(comp) 
+	{}
+	virtual ~LLNotificationChannelBase() {}
+	// you can also connect to a Channel, so you can be notified of
+	// changes to this channel
+	template <typename LISTENER>
+    LLBoundListener connectChanged(const LISTENER& slot)
+    {
+        // Examine slot to see if it binds an LLEventTrackable subclass, or a
+        // boost::shared_ptr to something, or a boost::weak_ptr to something.
+        // Call this->connectChangedImpl() to actually connect it.
+        return LLEventDetail::visit_and_connect(slot,
+                                  boost::bind(&LLNotificationChannelBase::connectChangedImpl,
+                                              this,
+                                              _1));
+    }
+    template <typename LISTENER>
+	LLBoundListener connectPassedFilter(const LISTENER& slot)
+    {
+        // see comments in connectChanged()
+        return LLEventDetail::visit_and_connect(slot,
+                                  boost::bind(&LLNotificationChannelBase::connectPassedFilterImpl,
+                                              this,
+                                              _1));
+    }
+    template <typename LISTENER>
+	LLBoundListener connectFailedFilter(const LISTENER& slot)
+    {
+        // see comments in connectChanged()
+        return LLEventDetail::visit_and_connect(slot,
+                                  boost::bind(&LLNotificationChannelBase::connectFailedFilterImpl,
+                                              this,
+                                              _1));
+    }
+
+	// use this when items change or to add a new one
+	bool updateItem(const LLSD& payload);
+	const LLNotificationFilter& getFilter() { return mFilter; }
+
+protected:
+    LLBoundListener connectChangedImpl(const LLEventListener& slot);
+    LLBoundListener connectPassedFilterImpl(const LLEventListener& slot);
+    LLBoundListener connectFailedFilterImpl(const LLEventListener& slot);
+
+	LLNotificationSet mItems;
+	LLStandardSignal mChanged;
+	LLStandardSignal mPassedFilter;
+	LLStandardSignal mFailedFilter;
+	
+	// these are action methods that subclasses can override to take action 
+	// on specific types of changes; the management of the mItems list is
+	// still handled by the generic handler.
+	virtual void onLoad(LLNotificationPtr p) {}
+	virtual void onAdd(LLNotificationPtr p) {}
+	virtual void onDelete(LLNotificationPtr p) {}
+	virtual void onChange(LLNotificationPtr p) {}
+
+	bool updateItem(const LLSD& payload, LLNotificationPtr pNotification);
+	LLNotificationFilter mFilter;
+};
+
+// The type of the pointers that we're going to manage in the NotificationQueue system
+// Because LLNotifications is a singleton, we don't actually expect to ever 
+// destroy it, but if it becomes necessary to do so, the shared_ptr model
+// will ensure that we don't leak resources.
+class LLNotificationChannel;
+typedef boost::shared_ptr<LLNotificationChannel> LLNotificationChannelPtr;
+
+// manages a list of notifications
+// Note that if this is ever copied around, we might find ourselves with multiple copies
+// of a queue with notifications being added to different nonequivalent copies. So we 
+// make it inherit from boost::noncopyable, and then create a map of shared_ptr to manage it.
+// 
+// NOTE: LLNotificationChannel is self-registering. The *correct* way to create one is to 
+// do something like:
+//		LLNotificationChannel::buildChannel("name", "parent"...);
+// This returns an LLNotificationChannelPtr, which you can store, or
+// you can then retrieve the channel by using the registry:
+//		LLNotifications::instance().getChannel("name")...
+//
+class LLNotificationChannel : 
+	boost::noncopyable, 
+	public LLNotificationChannelBase
+{
+	LOG_CLASS(LLNotificationChannel);
+
+public:  
+	virtual ~LLNotificationChannel() {}
+	typedef LLNotificationSet::iterator Iterator;
+    
+	std::string getName() const { return mName; }
+	std::string getParentChannelName() { return mParent; }
+    
+    bool isEmpty() const;
+    
+    Iterator begin();
+    Iterator end();
+
+    // Channels have a comparator to control sort order;
+	// the default sorts by arrival date
+    void setComparator(LLNotificationComparator comparator);
+	
+	std::string summarize();
+
+	// factory method for constructing these channels; since they're self-registering,
+	// we want to make sure that you can't use new to make them
+	static LLNotificationChannelPtr buildChannel(const std::string& name, const std::string& parent,
+						LLNotificationFilter filter=LLNotificationFilters::includeEverything, 
+						LLNotificationComparator comparator=LLNotificationComparators::orderByUUID());
+	
+protected:
+    // Notification Channels have a filter, which determines which notifications
+	// will be added to this channel. 
+	// Channel filters cannot change.
+	// Channels have a protected constructor so you can't make smart pointers that don't 
+	// come from our internal reference; call NotificationChannel::build(args)
+	LLNotificationChannel(const std::string& name, const std::string& parent,
+						  LLNotificationFilter filter, LLNotificationComparator comparator);
+
+private:
+	std::string mName;
+	std::string mParent;
+	LLNotificationComparator mComparator;
+};
+
+
+class LLNotifications : 
+	public LLSingleton<LLNotifications>, 
+	public LLNotificationChannelBase
+{
+	LOG_CLASS(LLNotifications);
+
+	friend class LLSingleton<LLNotifications>;
+public:
+	// load notification descriptions from file; 
+	// OK to call more than once because it will reload
+	bool loadTemplates();  
+	LLXMLNodePtr checkForXMLTemplate(LLXMLNodePtr item);
+	
+	// Add a simple notification (from XUI)
+	void addFromCallback(const LLSD& name);
+	
+	// we provide a collection of simple add notification functions so that it's reasonable to create notifications in one line
+	LLNotificationPtr add(const std::string& name, 
+						const LLSD& substitutions = LLSD(), 
+						const LLSD& payload = LLSD());
+	LLNotificationPtr add(const std::string& name, 
+						const LLSD& substitutions, 
+						const LLSD& payload, 
+						const std::string& functor_name);
+	LLNotificationPtr add(const std::string& name, 
+						const LLSD& substitutions, 
+						const LLSD& payload, 
+						LLNotificationFunctorRegistry::ResponseFunctor functor);
+	LLNotificationPtr add(const LLNotification::Params& p);
+
+	void add(const LLNotificationPtr pNotif);
+	void cancel(LLNotificationPtr pNotif);
+	void update(const LLNotificationPtr pNotif);
+
+	LLNotificationPtr find(LLUUID uuid);
+	
+	typedef boost::function<void (LLNotificationPtr)> NotificationProcess;
+	
+	void forEachNotification(NotificationProcess process);
+
+	// This is all stuff for managing the templates
+	// take your template out
+	LLNotificationTemplatePtr getTemplate(const std::string& name);
+	
+	// get the whole collection
+	typedef std::vector<std::string> TemplateNames;
+	TemplateNames getTemplateNames() const;  // returns a list of notification names
+	
+	typedef std::map<std::string, LLNotificationTemplatePtr> TemplateMap;
+
+	TemplateMap::const_iterator templatesBegin() { return mTemplates.begin(); }
+	TemplateMap::const_iterator templatesEnd() { return mTemplates.end(); }
+
+	// test for existence
+	bool templateExists(const std::string& name);
+	// useful if you're reloading the file
+	void clearTemplates();   // erase all templates
+
+	void forceResponse(const LLNotification::Params& params, S32 option);
+
+	void createDefaultChannels();
+
+	typedef std::map<std::string, LLNotificationChannelPtr> ChannelMap;
+	ChannelMap mChannels;
+
+	void addChannel(LLNotificationChannelPtr pChan);
+	LLNotificationChannelPtr getChannel(const std::string& channelName);
+	
+	std::string getGlobalString(const std::string& key) const;
+
+	void setIgnoreAllNotifications(bool ignore);
+	bool getIgnoreAllNotifications();
+
+private:
+	// we're a singleton, so we don't have a public constructor
+	LLNotifications();
+	/*virtual*/ void initSingleton();
+	
+	void loadPersistentNotifications();
+
+	bool expirationFilter(LLNotificationPtr pNotification);
+	bool expirationHandler(const LLSD& payload);
+	bool uniqueFilter(LLNotificationPtr pNotification);
+	bool uniqueHandler(const LLSD& payload);
+	bool failedUniquenessTest(const LLSD& payload);
+	LLNotificationChannelPtr pHistoryChannel;
+	LLNotificationChannelPtr pExpirationChannel;
+	
+	// put your template in
+	bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate);
+	TemplateMap mTemplates;
+
+	std::string mFileName;
+	
+	typedef std::map<std::string, LLXMLNodePtr> XMLTemplateMap;
+	XMLTemplateMap mXmlTemplates;
+
+	LLNotificationMap mUniqueNotifications;
+	
+	typedef std::map<std::string, std::string> GlobalStringMap;
+	GlobalStringMap mGlobalStrings;
+
+	bool mIgnoreAllNotifications;
+
+    boost::scoped_ptr<LLNotificationsListener> mListener;
+};
+
+
+#endif//LL_LLNOTIFICATIONS_H
+
-- 
cgit v1.2.3


From ccba924dacfd8a3478dad8599f33786bf24fdc73 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 16 Jul 2009 11:20:16 -0700
Subject: 1st attempt at disabling ppc build on macs.

---
 indra/develop.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/develop.py b/indra/develop.py
index b40e81bb07..cee3329c60 100755
--- a/indra/develop.py
+++ b/indra/develop.py
@@ -414,11 +414,11 @@ class DarwinSetup(UnixSetup):
     def os(self):
         return 'darwin'
 
-    def arch(self):
-        if self.unattended == 'ON':
-            return 'universal'
-        else:
-            return UnixSetup.arch(self)
+    #def arch(self):
+    #    if self.unattended == 'ON':
+    #        return 'universal'
+    #    else:
+    #        return UnixSetup.arch(self)
 
     def cmake_commandline(self, src_dir, build_dir, opts, simple):
         args = dict(
@@ -433,7 +433,8 @@ class DarwinSetup(UnixSetup):
             type=self.build_type.upper(),
             )
         if self.unattended == 'ON':
-            args['universal'] = '-DCMAKE_OSX_ARCHITECTURES:STRING=\'i386;ppc\''
+            #args['universal'] = '-DCMAKE_OSX_ARCHITECTURES:STRING=\'i386;ppc\''
+            pass
         #if simple:
         #    return 'cmake %(opts)s %(dir)r' % args
         return ('cmake -G %(generator)r '
-- 
cgit v1.2.3


From 91270a4fdc0a7dd03c5dc99d5ed5369796bdad0b Mon Sep 17 00:00:00 2001
From: Palmer <palmer@lindenlab.com>
Date: Mon, 20 Jul 2009 15:22:40 -0700
Subject: Parabuild will upload event_host.tar.bz2 and event_host.tar.bz2 now
 in right place

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

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 341b74b6f8..0836a4b016 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1297,11 +1297,12 @@ if (WINDOWS)
         )
     if (PACKAGE)
       add_custom_command(
-          OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/event_host.tar.bz2
+          OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2
           COMMAND ${PYTHON_EXECUTABLE}
           ARGS
             ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
             ${CMAKE_CURRENT_SOURCE_DIR}/..
+            ${CMAKE_CURRENT_BINARY_DIR}
             ${CMAKE_CFG_INTDIR}
 
           DEPENDS 
@@ -1312,7 +1313,7 @@ if (WINDOWS)
       add_custom_target(package ALL 
           DEPENDS 
             ${CMAKE_CFG_INTDIR}/touched.bat
-            ${CMAKE_CURRENT_SOURCE_DIR}/event_host.tar.bz2)
+            ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
       add_dependencies(package windows-updater windows-crash-logger)
 
 
-- 
cgit v1.2.3


From 6128de22f48fca9331ad67bb6b0914a60cb0d843 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 20 Jul 2009 17:11:54 -0700
Subject: Add newline to end of file to placate Linux gcc

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

(limited to 'indra')

diff --git a/indra/newview/llviewerwindowlistener.cpp b/indra/newview/llviewerwindowlistener.cpp
index acff7ac835..317e361c80 100644
--- a/indra/newview/llviewerwindowlistener.cpp
+++ b/indra/newview/llviewerwindowlistener.cpp
@@ -84,4 +84,4 @@ void LLViewerWindowListener::requestReshape(LLSD const & event_data) const
 	{
 		mViewerWindow->reshape(event_data["w"].asInteger(), event_data["h"].asInteger());
 	}
-}
\ No newline at end of file
+}
-- 
cgit v1.2.3


From 105ad6d81522f17cf0e2deaf9c71e2a9b234b33d Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 20 Jul 2009 17:13:05 -0700
Subject: Letting compiler choose implicit LLSD conversions fixes fatal Linux
 gcc warnings

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

(limited to 'indra')

diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index 90070b2143..0f00078b33 100644
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -45,7 +45,7 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const
 	}
 	else
 	{
-		std::string url = LLSLURL::buildSLURL(event_data["regionname"].asString(), event_data["x"].asReal(), event_data["y"].asReal(), event_data["z"].asReal());
+		std::string url = LLSLURL::buildSLURL(event_data["regionname"], event_data["x"], event_data["y"], event_data["z"]);
 		LLURLDispatcher::dispatch(url, NULL, false);
 	}
 }
-- 
cgit v1.2.3


From db7f15df68cda2850c3d8a7ffcc59fc136de6f95 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Wed, 22 Jul 2009 14:53:55 -0700
Subject: Adding LLLoginInstance unit test

---
 indra/llui/llnotificationslistener.cpp |  29 +++++-
 indra/llui/llnotificationslistener.h   |   5 +-
 indra/newview/CMakeLists.txt           |   1 +
 indra/newview/llappviewer.cpp          | 110 +++++++++++++++++++-
 indra/newview/llappviewer.h            |   4 +-
 indra/newview/llfloatertos.cpp         |   2 +
 indra/newview/lllogininstance.cpp      | 183 ++++++++++-----------------------
 indra/newview/lllogininstance.h        |  33 ++++--
 indra/newview/llpanellogin.cpp         |   3 +-
 indra/newview/llstartup.cpp            |  10 +-
 indra/newview/llviewermenu.cpp         |   2 +-
 11 files changed, 230 insertions(+), 152 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp
index d6e552ca5c..6ebbee68ac 100644
--- a/indra/llui/llnotificationslistener.cpp
+++ b/indra/llui/llnotificationslistener.cpp
@@ -24,5 +24,32 @@ LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications
 
 void LLNotificationsListener::requestAdd(const LLSD& event_data) const
 {
-    mNotifications.add(event_data["name"], event_data["substitutions"], event_data["payload"]);
+	if(event_data.has("reply"))
+	{
+		mNotifications.add(event_data["name"], 
+						   event_data["substitutions"], 
+						   event_data["payload"],
+						   boost::bind(&LLNotificationListener::Responder, 
+									   this, 
+									   event_data["reply"].asString(), 
+									   _1, _2
+									   )
+						   );
+	}
+	else
+	{
+		mNotifications.add(event_data["name"], 
+						   event_data["substitutions"], 
+						   event_data["payload"]);
+	}
+}
+
+void LLNotificationsListener::Responder(const std::string& reply_pump, 
+										const LLSD& notification, 
+										const LLSD& response)
+{
+	LLSD reponse_event;
+	reponse_event["notification"] = notification;
+	reponse_event["response"] = response;
+	mEventPumps.obtain(reply_pump).post(reponse_event);
 }
diff --git a/indra/llui/llnotificationslistener.h b/indra/llui/llnotificationslistener.h
index 3576cacbdb..d11aed1b52 100644
--- a/indra/llui/llnotificationslistener.h
+++ b/indra/llui/llnotificationslistener.h
@@ -25,7 +25,10 @@ public:
     void requestAdd(LLSD const & event_data) const;
 
 private:
-    LLNotifications & mNotifications;
+	void NotificationResponder(const std::string& replypump, 
+							   const LLSD& notification, 
+							   const LLSD& response);
+	LLNotifications & mNotifications;
 };
 
 #endif // LL_LLNOTIFICATIONSLISTENER_H
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0836a4b016..a908b058f0 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1480,6 +1480,7 @@ endif (INSTALL)
 include(LLAddBuildTest)
 SET(viewer_TEST_SOURCE_FILES
   llagentaccess.cpp
+  lllogininstance.cpp
   # Not *actually* a unit test, it's an integration test.
   # Because it won't work in the new unit test iface, i've commented out
   # and notified Nat. Delete this when it's replaced!
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 8492644b2d..17984b8eae 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3986,7 +3986,7 @@ void LLAppViewer::forceErrorBadMemoryAccess()
     return;
 }
 
-void LLAppViewer::forceErrorInifiniteLoop()
+void LLAppViewer::forceErrorInfiniteLoop()
 {
     while(true)
     {
@@ -4152,3 +4152,111 @@ void LLAppViewer::loadEventHostModule(S32 listen_port)
 
 	mPlugins.insert(eventhost_dso_handle);
 }
+
+void LLAppViewer::launchUpdater()
+{
+		LLSD query_map = LLSD::emptyMap();
+	// *TODO place os string in a global constant
+#if LL_WINDOWS  
+	query_map["os"] = "win";
+#elif LL_DARWIN
+	query_map["os"] = "mac";
+#elif LL_LINUX
+	query_map["os"] = "lnx";
+#elif LL_SOLARIS
+	query_map["os"] = "sol";
+#endif
+	// *TODO change userserver to be grid on both viewer and sim, since
+	// userserver no longer exists.
+	query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel();
+	query_map["channel"] = gSavedSettings.getString("VersionChannelName");
+	// *TODO constantize this guy
+	// *NOTE: This URL is also used in win_setup/lldownloader.cpp
+	LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map);
+	
+	if(LLAppViewer::sUpdaterInfo)
+	{
+		delete LLAppViewer::sUpdaterInfo;
+	}
+	LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ;
+	
+#if LL_WINDOWS
+	LLAppViewer::sUpdaterInfo->mUpdateExePath = gDirUtilp->getTempFilename();
+	if (LLAppViewer::sUpdaterInfo->mUpdateExePath.empty())
+	{
+		delete LLAppViewer::sUpdaterInfo ;
+		LLAppViewer::sUpdaterInfo = NULL ;
+
+		// We're hosed, bail
+		LL_WARNS("AppInit") << "LLDir::getTempFilename() failed" << LL_ENDL;
+		return;
+	}
+
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += ".exe";
+
+	std::string updater_source = gDirUtilp->getAppRODataDir();
+	updater_source += gDirUtilp->getDirDelimiter();
+	updater_source += "updater.exe";
+
+	LL_DEBUGS("AppInit") << "Calling CopyFile source: " << updater_source
+			<< " dest: " << LLAppViewer::sUpdaterInfo->mUpdateExePath
+			<< LL_ENDL;
+
+
+	if (!CopyFileA(updater_source.c_str(), LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), FALSE))
+	{
+		delete LLAppViewer::sUpdaterInfo ;
+		LLAppViewer::sUpdaterInfo = NULL ;
+
+		LL_WARNS("AppInit") << "Unable to copy the updater!" << LL_ENDL;
+
+		return;
+	}
+
+	// if a sim name was passed in via command line parameter (typically through a SLURL)
+	if ( LLURLSimString::sInstance.mSimString.length() )
+	{
+		// record the location to start at next time
+		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
+	};
+
+	LLAppViewer::sUpdaterInfo->mParams << "-url \"" << update_url.asString() << "\"";
+
+	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << " " << LLAppViewer::sUpdaterInfo->mParams.str() << LL_ENDL;
+
+	//Explicitly remove the marker file, otherwise we pass the lock onto the child process and things get weird.
+	LLAppViewer::instance()->removeMarkerFile(); // In case updater fails
+
+	// *NOTE:Mani The updater is spawned as the last thing before the WinMain exit.
+	// see LLAppViewerWin32.cpp
+	
+#elif LL_DARWIN
+	// if a sim name was passed in via command line parameter (typically through a SLURL)
+	if ( LLURLSimString::sInstance.mSimString.length() )
+	{
+		// record the location to start at next time
+		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
+	};
+	
+	LLAppViewer::sUpdaterInfo->mUpdateExePath = "'";
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += gDirUtilp->getAppRODataDir();
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += "/mac-updater.app/Contents/MacOS/mac-updater' -url \"";
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += update_url.asString();
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -name \"";
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += LLAppViewer::instance()->getSecondLifeTitle();
+	LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" &";
+
+	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << LL_ENDL;
+
+	// Run the auto-updater.
+	system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
+
+#elif LL_LINUX || LL_SOLARIS
+	OSMessageBox("Automatic updating is not yet implemented for Linux.\n"
+		"Please download the latest version from www.secondlife.com.",
+		LLStringUtil::null, OSMB_OK);
+#endif
+
+	// *REMOVE:Mani - Saving for reference...
+	// LLAppViewer::instance()->forceQuit();
+}
\ No newline at end of file
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 69f2a074aa..08bd94563d 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -126,7 +126,7 @@ public:
     virtual void forceErrorLLError();
     virtual void forceErrorBreakpoint();
     virtual void forceErrorBadMemoryAccess();
-    virtual void forceErrorInifiniteLoop();
+    virtual void forceErrorInfiniteLoop();
     virtual void forceErrorSoftwareException();
     virtual void forceErrorDriverCrash();
 
@@ -262,6 +262,8 @@ public:
 		std::ostringstream mParams;
 	}LLUpdaterInfo ;
 	static LLUpdaterInfo *sUpdaterInfo ;
+
+	void launchUpdater();
 };
 
 // consts from viewer.h
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index c79e96a5e5..d75640ccb4 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -74,6 +74,8 @@ LLFloaterTOS* LLFloaterTOS::show(ETOSType type,
 		LLUICtrlFactory::getInstance()->buildFloater(LLFloaterTOS::sInstance, "floater_critical.xml");
 	}
 
+	sInstance->startModal();
+
 	return LLFloaterTOS::sInstance;
 }
 
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 22497ed291..bf42129fc1 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -47,7 +47,6 @@
 
 // newview
 #include "llviewernetwork.h"
-#include "llappviewer.h" // Wish I didn't have to, but...
 #include "llviewercontrol.h"
 #include "llurlsimstring.h"
 #include "llfloatertos.h"
@@ -74,7 +73,6 @@ LLLoginInstance::~LLLoginInstance()
 {
 }
 
-
 void LLLoginInstance::connect(const LLSD& credentials)
 {
 	std::vector<std::string> uris;
@@ -84,6 +82,7 @@ void LLLoginInstance::connect(const LLSD& credentials)
 
 void LLLoginInstance::connect(const std::string& uri, const LLSD& credentials)
 {
+	mAttemptComplete = false; // Reset attempt complete at this point!
 	constructAuthParams(credentials);
 	mLoginModule->connect(uri, mRequestData);
 }
@@ -99,6 +98,7 @@ void LLLoginInstance::reconnect()
 
 void LLLoginInstance::disconnect()
 {
+	mAttemptComplete = false; // Reset attempt complete at this point!
 	mRequestData.clear();
 	mLoginModule->disconnect();
 }
@@ -162,12 +162,13 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials)
 	request_params["skipoptional"] = mSkipOptionalUpdate;
 	request_params["agree_to_tos"] = false; // Always false here. Set true in 
 	request_params["read_critical"] = false; // handleTOSResponse
-	request_params["last_exec_event"] = gLastExecEvent;
+	request_params["last_exec_event"] = mLastExecEvent;
 	request_params["mac"] = hashed_mac_string;
 	request_params["version"] = gCurrentVersion; // Includes channel name
 	request_params["channel"] = gSavedSettings.getString("VersionChannelName");
-	request_params["id0"] = LLAppViewer::instance()->getSerialNumber();
+	request_params["id0"] = mSerialNumber;
 
+	mRequestData.clear();
 	mRequestData["method"] = "login_to_simulator";
 	mRequestData["params"] = request_params;
 	mRequestData["options"] = requested_options;
@@ -219,21 +220,18 @@ bool LLLoginInstance::handleLoginFailure(const LLSD& event)
 		// to reconnect or to end the attempt in failure.
 		if(reason_response == "tos")
 		{
-			LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
-											message_response,
-											boost::bind(&LLLoginInstance::handleTOSResponse, 
-														this, _1, "agree_to_tos")
-											);
-			tos_dialog->startModal();
+			LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
+								message_response,
+								boost::bind(&LLLoginInstance::handleTOSResponse, 
+											this, _1, "agree_to_tos"));
 		}
 		else if(reason_response == "critical")
 		{
-			LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
-											message_response,
-											boost::bind(&LLLoginInstance::handleTOSResponse, 
-														this, _1, "read_critical")
+			LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
+								message_response,
+								boost::bind(&LLLoginInstance::handleTOSResponse, 
+												this, _1, "read_critical")
 											);
-			tos_dialog->startModal();
 		}
 		else if(reason_response == "update" || gSavedSettings.getBOOL("ForceMandatoryUpdate"))
 		{
@@ -259,12 +257,14 @@ bool LLLoginInstance::handleLoginFailure(const LLSD& event)
 
 bool LLLoginInstance::handleLoginSuccess(const LLSD& event)
 {
-	LLSD response = event["data"];
-	std::string message_response = response["message"].asString();
 	if(gSavedSettings.getBOOL("ForceMandatoryUpdate"))
 	{
+		LLSD response = event["data"];
+		std::string message_response = response["message"].asString();
+
 		// Testing update...
 		gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE);
+
 		// Don't confuse startup by leaving login "online".
 		mLoginModule->disconnect(); 
 		updateApp(true, message_response);
@@ -281,7 +281,7 @@ void LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
 	if(accepted)
 	{	
 		// Set the request data to true and retry login.
-		mRequestData[key] = true; 
+		mRequestData["params"][key] = true; 
 		reconnect();
 	}
 	else
@@ -344,13 +344,36 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
 		notification_name += "ReleaseForDownload";
 #endif
 	}
-	
-	LLNotifications::instance().add(notification_name, args, payload, 
-		boost::bind(&LLLoginInstance::updateDialogCallback, this, _1, _2));
+
+	// *NOTE:Mani - for reference
+//	LLNotifications::instance().add(notification_name, args, payload, 
+//		boost::bind(&LLLoginInstance::updateDialogCallback, this, _1, _2));
+
+	if(!mUpdateAppResponse)
+	{
+		bool make_unique = true;
+		mUpdateAppResponse.reset(new LLEventStream("logininstance_updateapp", make_unique));
+		mUpdateAppResponse->listen("diaupdateDialogCallback", 
+								   boost::bind(&LLLoginInstance::updateDialogCallback,
+								 			   this, _1
+											   )
+								   );
+	}
+
+	LLSD event;
+	event["op"] = "requestAdd";
+	event["name"] = notification_name;
+	event["substitutions"] = args;
+	event["payload"] = payload;
+	event["reply"] = mUpdateAppResponse->getName();
+
+	LLEventPumps::getInstance()->obtain("LLNotifications").post(event);
 }
 
-bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD& response)
+bool LLLoginInstance::updateDialogCallback(const LLSD& event)
 {
+	LLSD notification = event["notification"];
+	LLSD response = event["response"];
 	S32 option = LLNotification::getSelectedOption(notification, response);
 	std::string update_exe_path;
 	bool mandatory = notification["payload"]["mandatory"].asBoolean();
@@ -395,114 +418,12 @@ bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD&
 		return false;
 	}
 	
-	LLSD query_map = LLSD::emptyMap();
-	// *TODO place os string in a global constant
-#if LL_WINDOWS  
-	query_map["os"] = "win";
-#elif LL_DARWIN
-	query_map["os"] = "mac";
-#elif LL_LINUX
-	query_map["os"] = "lnx";
-#elif LL_SOLARIS
-	query_map["os"] = "sol";
-#endif
-	// *TODO change userserver to be grid on both viewer and sim, since
-	// userserver no longer exists.
-	query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel();
-	query_map["channel"] = gSavedSettings.getString("VersionChannelName");
-	// *TODO constantize this guy
-	// *NOTE: This URL is also used in win_setup/lldownloader.cpp
-	LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map);
-	
-	if(LLAppViewer::sUpdaterInfo)
-	{
-		delete LLAppViewer::sUpdaterInfo;
-	}
-	LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ;
-	
-#if LL_WINDOWS
-	LLAppViewer::sUpdaterInfo->mUpdateExePath = gDirUtilp->getTempFilename();
-	if (LLAppViewer::sUpdaterInfo->mUpdateExePath.empty())
-	{
-		delete LLAppViewer::sUpdaterInfo ;
-		LLAppViewer::sUpdaterInfo = NULL ;
-
-		// We're hosed, bail
-		LL_WARNS("AppInit") << "LLDir::getTempFilename() failed" << LL_ENDL;
-
-		attemptComplete();
-		// *REMOVE:Mani - Saving for reference...
-		// LLAppViewer::instance()->forceQuit();
-		return false;
-	}
-
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += ".exe";
-
-	std::string updater_source = gDirUtilp->getAppRODataDir();
-	updater_source += gDirUtilp->getDirDelimiter();
-	updater_source += "updater.exe";
-
-	LL_DEBUGS("AppInit") << "Calling CopyFile source: " << updater_source
-			<< " dest: " << LLAppViewer::sUpdaterInfo->mUpdateExePath
-			<< LL_ENDL;
-
-
-	if (!CopyFileA(updater_source.c_str(), LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), FALSE))
-	{
-		delete LLAppViewer::sUpdaterInfo ;
-		LLAppViewer::sUpdaterInfo = NULL ;
-
-		LL_WARNS("AppInit") << "Unable to copy the updater!" << LL_ENDL;
-		attemptComplete();
-		// *REMOVE:Mani - Saving for reference...
-		// LLAppViewer::instance()->forceQuit();
-		return false;
-	}
-
-	// if a sim name was passed in via command line parameter (typically through a SLURL)
-	if ( LLURLSimString::sInstance.mSimString.length() )
-	{
-		// record the location to start at next time
-		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
-	};
-
-	LLAppViewer::sUpdaterInfo->mParams << "-url \"" << update_url.asString() << "\"";
-
-	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << " " << LLAppViewer::sUpdaterInfo->mParams.str() << LL_ENDL;
-
-	//Explicitly remove the marker file, otherwise we pass the lock onto the child process and things get weird.
-	LLAppViewer::instance()->removeMarkerFile(); // In case updater fails
-
-	// *NOTE:Mani The updater is spawned as the last thing before the WinMain exit.
-	// see LLAppViewerWin32.cpp
-	
-#elif LL_DARWIN
-	// if a sim name was passed in via command line parameter (typically through a SLURL)
-	if ( LLURLSimString::sInstance.mSimString.length() )
-	{
-		// record the location to start at next time
-		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
-	};
-	
-	LLAppViewer::sUpdaterInfo->mUpdateExePath = "'";
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += gDirUtilp->getAppRODataDir();
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += "/mac-updater.app/Contents/MacOS/mac-updater' -url \"";
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += update_url.asString();
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -name \"";
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += LLAppViewer::instance()->getSecondLifeTitle();
-	LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" &";
-
-	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << LL_ENDL;
-
-	// Run the auto-updater.
-	system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
-
-#elif LL_LINUX || LL_SOLARIS
-	OSMessageBox(LLTrans::getString("MBNoAutoUpdate"), LLStringUtil::null, OSMB_OK);
-#endif
-
-	// *REMOVE:Mani - Saving for reference...
-	// LLAppViewer::instance()->forceQuit();
+ 	if(mUpdaterLauncher)
+  	{
+ 		mUpdaterLauncher();
+  	}
+  
+ 	attemptComplete();
 
 	return false;
 }
@@ -526,4 +447,4 @@ std::string construct_start_string()
 		start = gSavedSettings.getString("LoginLocation");
 	}
 	return start;
-}
+}
\ No newline at end of file
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index da70fec40e..afe96acd1e 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -34,7 +34,9 @@
 #define LL_LLLOGININSTANCE_H
 
 #include <boost/scoped_ptr.hpp>
+#include <boost/function.hpp>
 class LLLogin;
+class LLEventStream;
 
 // This class hosts the login module and is used to 
 // negotiate user authentication attempts.
@@ -49,16 +51,6 @@ public:
 	void reconnect(); // reconnect using the current credentials.
 	void disconnect();
 
-	// Set whether this class will drive user interaction.
-	// If not, login failures like 'need tos agreement' will 
-	// end the login attempt.
-	void setUserInteraction(bool state) { mUserInteraction = state; } 
-	bool getUserInteraction() { return mUserInteraction; }
-
-	// Whether to tell login to skip optional update request.
-	// False by default.
-	void setSkipOptionalUpdate(bool state) { mSkipOptionalUpdate = state; }
-	
 	bool authFailure() { return mAttemptComplete && mLoginState == "offline"; }
 	bool authSuccess() { return mAttemptComplete && mLoginState == "online"; }
 
@@ -69,10 +61,25 @@ public:
 	// Only valid when authSuccess == true.
 	const F64 getLastTransferRateBPS() { return mTransferRate; }
 
+		// Set whether this class will drive user interaction.
+	// If not, login failures like 'need tos agreement' will 
+	// end the login attempt.
+	void setUserInteraction(bool state) { mUserInteraction = state; } 
+	bool getUserInteraction() { return mUserInteraction; }
+
+	// Whether to tell login to skip optional update request.
+	// False by default.
+	void setSkipOptionalUpdate(bool state) { mSkipOptionalUpdate = state; }
+	void setSerialNumber(const std::string& sn) { mSerialNumber = sn; }
+	void setLastExecEvent(int lee) { mLastExecEvent = lee; }
+
+	typedef boost::function<void()> UpdaterLauncherCallback;
+	void setUpdaterLauncher(const UpdaterLauncherCallback& ulc) { mUpdaterLauncher = ulc; }
+
 private:
 	void constructAuthParams(const LLSD& credentials); 
 	void updateApp(bool mandatory, const std::string& message);
-	bool updateDialogCallback(const LLSD& notification, const LLSD& response);
+	bool updateDialogCallback(const LLSD& event);
 
 	bool handleLoginEvent(const LLSD& event);
 	bool handleLoginFailure(const LLSD& event);
@@ -90,6 +97,10 @@ private:
 	bool mSkipOptionalUpdate;
 	bool mAttemptComplete;
 	F64 mTransferRate;
+	std::string mSerialNumber;
+	int mLastExecEvent;
+	UpdaterLauncherCallback mUpdaterLauncher;
+	boost::scoped_ptr<LLEventStream> mUpdateAppResponse;
 };
 
 #endif
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 9afb8468ef..7af1cbf51f 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -432,8 +432,7 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask)
 	if ( KEY_F2 == key )
 	{
 		llinfos << "Spawning floater TOS window" << llendl;
-		LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,"", 0);
-		tos_dialog->startModal();
+		LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,"", NULL);
 		return TRUE;
 	}
 #endif
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index f0f056652a..dac6f8423a 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -965,13 +965,17 @@ bool idle_startup()
 		display_startup();
 
 		// Setting initial values...
+		LLLoginInstance* login = LLLoginInstance::getInstance();
 		if(gNoRender)
 		{
 			// HACK, skip optional updates if you're running drones
-			LLLoginInstance::getInstance()->setSkipOptionalUpdate(true);
+			login->setSkipOptionalUpdate(true);
 		}
 
-		LLLoginInstance::getInstance()->setUserInteraction(show_connect_box);
+		login->setUserInteraction(show_connect_box);
+		login->setSerialNumber(LLAppViewer::instance()->getSerialNumber());
+		login->setLastExecEvent(gLastExecEvent);
+		login->setUpdaterLauncher(boost::bind(LLAppViewer::launchUpdater, LLAppViewer::instance()));
 
 		// This call to LLLoginInstance::connect() starts the 
 		// authentication process.
@@ -979,7 +983,7 @@ bool idle_startup()
 		credentials["first"] = gFirstname;
 		credentials["last"] = gLastname;
 		credentials["passwd"] = gPassword;
-		LLLoginInstance::getInstance()->connect(credentials);
+		login->connect(credentials);
 
 		LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE );
 		return FALSE;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 826aca5e64..1ab10b2f27 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7103,7 +7103,7 @@ void force_error_bad_memory_access(void *)
 
 void force_error_infinite_loop(void *)
 {
-    LLAppViewer::instance()->forceErrorInifiniteLoop();
+    LLAppViewer::instance()->forceErrorInfiniteLoop();
 }
 
 void force_error_software_exception(void *)
-- 
cgit v1.2.3


From 9538328d5f7cf0f0be5dd77b8e27032e09104fff Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Fri, 24 Jul 2009 15:08:16 -0700
Subject: Adding LLLoginInstance unit test.  - Added LLNotificationsInterface
 class.  - Removed LLLoginInstance use of LLNotifications EventAPI

---
 indra/llui/llnotifications.h                 |  13 +-
 indra/llui/llnotificationslistener.cpp       |   8 +-
 indra/llui/llnotificationslistener.h         |   2 +-
 indra/newview/lllogininstance.cpp            |  15 +-
 indra/newview/lllogininstance.h              |   7 +-
 indra/newview/llstartup.cpp                  |   3 +-
 indra/newview/tests/lllogininstance_test.cpp | 413 +++++++++++++++++++++++++++
 7 files changed, 447 insertions(+), 14 deletions(-)
 create mode 100644 indra/newview/tests/lllogininstance_test.cpp

(limited to 'indra')

diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 93cdcbeefd..c534267fca 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -799,8 +799,19 @@ private:
 	LLNotificationComparator mComparator;
 };
 
+// An interface class to provide a clean linker seam to the LLNotifications class.
+// Extend this interface as needed for your use of LLNotifications.
+class LLNotificationsInterface
+{
+public:
+	virtual LLNotificationPtr add(const std::string& name, 
+						const LLSD& substitutions, 
+						const LLSD& payload, 
+						LLNotificationFunctorRegistry::ResponseFunctor functor) = 0;
+};
 
 class LLNotifications : 
+	public LLNotificationsInterface,
 	public LLSingleton<LLNotifications>, 
 	public LLNotificationChannelBase
 {
@@ -824,7 +835,7 @@ public:
 						const LLSD& substitutions, 
 						const LLSD& payload, 
 						const std::string& functor_name);
-	LLNotificationPtr add(const std::string& name, 
+	/* virtual */ LLNotificationPtr add(const std::string& name, 
 						const LLSD& substitutions, 
 						const LLSD& payload, 
 						LLNotificationFunctorRegistry::ResponseFunctor functor);
diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp
index 6ebbee68ac..75f4d6177d 100644
--- a/indra/llui/llnotificationslistener.cpp
+++ b/indra/llui/llnotificationslistener.cpp
@@ -29,7 +29,7 @@ void LLNotificationsListener::requestAdd(const LLSD& event_data) const
 		mNotifications.add(event_data["name"], 
 						   event_data["substitutions"], 
 						   event_data["payload"],
-						   boost::bind(&LLNotificationListener::Responder, 
+						   boost::bind(&LLNotificationsListener::NotificationResponder, 
 									   this, 
 									   event_data["reply"].asString(), 
 									   _1, _2
@@ -44,12 +44,12 @@ void LLNotificationsListener::requestAdd(const LLSD& event_data) const
 	}
 }
 
-void LLNotificationsListener::Responder(const std::string& reply_pump, 
+void LLNotificationsListener::NotificationResponder(const std::string& reply_pump, 
 										const LLSD& notification, 
-										const LLSD& response)
+										const LLSD& response) const
 {
 	LLSD reponse_event;
 	reponse_event["notification"] = notification;
 	reponse_event["response"] = response;
-	mEventPumps.obtain(reply_pump).post(reponse_event);
+	LLEventPumps::getInstance()->obtain(reply_pump).post(reponse_event);
 }
diff --git a/indra/llui/llnotificationslistener.h b/indra/llui/llnotificationslistener.h
index d11aed1b52..6f71a7c781 100644
--- a/indra/llui/llnotificationslistener.h
+++ b/indra/llui/llnotificationslistener.h
@@ -27,7 +27,7 @@ public:
 private:
 	void NotificationResponder(const std::string& replypump, 
 							   const LLSD& notification, 
-							   const LLSD& response);
+							   const LLSD& response) const;
 	LLNotifications & mNotifications;
 };
 
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index bf42129fc1..c08cc2baae 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -59,6 +59,7 @@ std::string construct_start_string();
 
 LLLoginInstance::LLLoginInstance() :
 	mLoginModule(new LLLogin()),
+	mNotifications(NULL),
 	mLoginState("offline"),
 	mUserInteraction(true),
 	mSkipOptionalUpdate(false),
@@ -345,10 +346,13 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
 #endif
 	}
 
-	// *NOTE:Mani - for reference
-//	LLNotifications::instance().add(notification_name, args, payload, 
-//		boost::bind(&LLLoginInstance::updateDialogCallback, this, _1, _2));
+	if(mNotifications)
+	{
+		mNotifications->add(notification_name, args, payload, 
+			boost::bind(&LLLoginInstance::updateDialogCallback, this, _1, _2));
+	}
 
+	/* *NOTE:Mani Experiment with Event API interface.
 	if(!mUpdateAppResponse)
 	{
 		bool make_unique = true;
@@ -368,12 +372,11 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
 	event["reply"] = mUpdateAppResponse->getName();
 
 	LLEventPumps::getInstance()->obtain("LLNotifications").post(event);
+	*/
 }
 
-bool LLLoginInstance::updateDialogCallback(const LLSD& event)
+bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD& response)
 {
-	LLSD notification = event["notification"];
-	LLSD response = event["response"];
 	S32 option = LLNotification::getSelectedOption(notification, response);
 	std::string update_exe_path;
 	bool mandatory = notification["payload"]["mandatory"].asBoolean();
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index afe96acd1e..47d52a6184 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -37,6 +37,7 @@
 #include <boost/function.hpp>
 class LLLogin;
 class LLEventStream;
+class LLNotificationsInterface;
 
 // This class hosts the login module and is used to 
 // negotiate user authentication attempts.
@@ -73,13 +74,15 @@ public:
 	void setSerialNumber(const std::string& sn) { mSerialNumber = sn; }
 	void setLastExecEvent(int lee) { mLastExecEvent = lee; }
 
+	void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; }
+
 	typedef boost::function<void()> UpdaterLauncherCallback;
 	void setUpdaterLauncher(const UpdaterLauncherCallback& ulc) { mUpdaterLauncher = ulc; }
 
 private:
 	void constructAuthParams(const LLSD& credentials); 
 	void updateApp(bool mandatory, const std::string& message);
-	bool updateDialogCallback(const LLSD& event);
+	bool updateDialogCallback(const LLSD& notification, const LLSD& response);
 
 	bool handleLoginEvent(const LLSD& event);
 	bool handleLoginFailure(const LLSD& event);
@@ -90,6 +93,8 @@ private:
 	void attemptComplete() { mAttemptComplete = true; } // In the future an event?
 
 	boost::scoped_ptr<LLLogin> mLoginModule;
+	LLNotificationsInterface* mNotifications;
+
 	std::string mLoginState;
 	LLSD mRequestData;
 	LLSD mResponseData;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index dac6f8423a..eb585f8fe3 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -966,6 +966,7 @@ bool idle_startup()
 
 		// Setting initial values...
 		LLLoginInstance* login = LLLoginInstance::getInstance();
+		login->setNotificationsInterface(LLNotifications::getInstance());
 		if(gNoRender)
 		{
 			// HACK, skip optional updates if you're running drones
@@ -975,7 +976,7 @@ bool idle_startup()
 		login->setUserInteraction(show_connect_box);
 		login->setSerialNumber(LLAppViewer::instance()->getSerialNumber());
 		login->setLastExecEvent(gLastExecEvent);
-		login->setUpdaterLauncher(boost::bind(LLAppViewer::launchUpdater, LLAppViewer::instance()));
+		login->setUpdaterLauncher(boost::bind(&LLAppViewer::launchUpdater, LLAppViewer::instance()));
 
 		// This call to LLLoginInstance::connect() starts the 
 		// authentication process.
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
new file mode 100644
index 0000000000..19cf9cd961
--- /dev/null
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -0,0 +1,413 @@
+/**
+ * @file   lllogininstance_test.cpp
+ * @brief  Test for lllogininstance.cpp.
+ * 
+ * $LicenseInfo:firstyear=2008&license=internal$
+ * Copyright (c) 2008, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "../llviewerprecompiledheaders.h"
+// Own header
+#include "../lllogininstance.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+#include "../test/lltut.h"
+#include "llevents.h"
+
+#if defined(LL_WINDOWS)
+#pragma warning(disable: 4355)      // using 'this' in base-class ctor initializer expr
+#endif
+
+// Constants
+const std::string VIEWERLOGIN_URI("viewerlogin_uri");
+const std::string VIEWERLOGIN_GRIDLABEL("viewerlogin_grid");
+
+const std::string APPVIEWER_SERIALNUMBER("appviewer_serialno");
+
+// Link seams.
+
+//-----------------------------------------------------------------------------
+static LLEventStream gTestPump("test_pump");
+
+#include "lllogin.h"
+static std::string gLoginURI;
+static LLSD gLoginCreds;
+static bool gDisconnectCalled = false;
+class LLLogin::Impl
+{
+};
+LLLogin::LLLogin() {}
+LLLogin::~LLLogin() {}
+LLEventPump& LLLogin::getEventPump() { return gTestPump; }
+void LLLogin::connect(const std::string& uri, const LLSD& credentials) 
+{
+	gLoginURI = uri;
+	gLoginCreds = credentials;
+}
+
+void LLLogin::disconnect() 
+{
+	gDisconnectCalled = true;
+}
+
+//-----------------------------------------------------------------------------
+#include "../llviewernetwork.h"
+unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {'1','2','3','4','5','6'};		/* Flawfinder: ignore */
+
+LLViewerLogin::LLViewerLogin() {}
+LLViewerLogin::~LLViewerLogin() {}
+void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const 
+{
+	uris.push_back(VIEWERLOGIN_URI);
+}
+std::string LLViewerLogin::getGridLabel() const { return VIEWERLOGIN_GRIDLABEL; }
+
+//-----------------------------------------------------------------------------
+#include "../llviewercontrol.h"
+LLControlGroup gSavedSettings("Global");
+LLControlGroup gSavedSkinSettings("Skinning");
+std::string gCurrentVersion = "invalid_version";
+
+LLControlGroup::LLControlGroup(const std::string& name) :
+	LLInstanceTracker<LLControlGroup, std::string>(name){}
+LLControlGroup::~LLControlGroup() {}
+void LLControlGroup::setBOOL(const std::string& name, BOOL val) {}
+BOOL LLControlGroup::getBOOL(const std::string& name) { return FALSE; }
+U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only) { return 1; }
+void LLControlGroup::setString(const std::string& name, const std::string& val) {}
+std::string LLControlGroup::getString(const std::string& name) { return "test_string"; }
+BOOL LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist) { return TRUE; }
+BOOL LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist) { return TRUE; }
+
+//-----------------------------------------------------------------------------
+#include "../llurlsimstring.h"
+LLURLSimString LLURLSimString::sInstance;
+bool LLURLSimString::parse() { return true; }
+
+//-----------------------------------------------------------------------------
+#include "../llfloatertos.h"
+static LLFloaterTOS::ETOSType gTOSType;
+static LLFloaterTOS::YesNoCallback gTOSCallback;
+LLFloaterTOS* LLFloaterTOS::show(LLFloaterTOS::ETOSType type, 
+							  const std::string & message, 
+							  const YesNoCallback& callback)
+{
+	gTOSType = type;
+	gTOSCallback = callback;
+	return NULL;
+}
+
+//-----------------------------------------------------------------------------
+// LLNotifications
+class MockNotifications : public LLNotificationsInterface
+{
+	boost::function<void (const LLSD&, const LLSD&)> mResponder;
+	int mAddedCount;
+
+public: 
+	MockNotifications() :
+		mResponder(0),
+		mAddedCount(0)
+	{
+	}
+
+	virtual ~MockNotifications() {}
+
+	/* virtual */ LLNotificationPtr add(
+					const std::string& name,
+					const LLSD& substitutions,
+					const LLSD& payload, 
+					LLNotificationFunctorRegistry::ResponseFunctor functor)
+	{
+		mResponder = functor;
+		mAddedCount++;
+		return LLNotificationPtr((LLNotification*)NULL);
+	}
+
+	void sendYesResponse()
+	{
+		LLSD notification;
+		LLSD response;
+		response = 1;
+		mResponder(notification, response);
+	}
+
+	void sendNoResponse()
+	{
+		LLSD notification;
+		LLSD response;
+		response = 2;
+		mResponder(notification, response);
+	}
+
+	void sendBogusResponse()
+	{
+		LLSD notification;
+		LLSD response;
+		response = 666;
+		mResponder(notification, response);
+	}
+
+	int addedCount() { return mAddedCount; }
+};
+
+S32 LLNotification::getSelectedOption(const LLSD& notification, const LLSD& response)
+{
+	return response.asInteger();
+}
+
+// misc
+std::string xml_escape_string(const std::string& in)
+{
+	return in;
+}
+
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
+namespace tut
+{
+    struct lllogininstance_data
+    {
+		lllogininstance_data() : logininstance(LLLoginInstance::getInstance())
+		{
+			// Global initialization
+			gLoginURI.clear();
+			gLoginCreds.clear();
+			gDisconnectCalled = false;
+
+			// gTOSType = -1; // Set to invalid value.
+			gTOSCallback = 0; // clear the callback.
+
+
+			gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", FALSE);
+			gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", FALSE);
+			gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", FALSE);
+			gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", FALSE);
+			gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", FALSE);
+			gSavedSettings.declareString("VersionChannelName", "test_version_string", "", FALSE);
+			gSavedSettings.declareString("NextLoginLocation", "", "", FALSE);
+			gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", FALSE);
+
+			credentials["first"] = "testfirst";
+			credentials["last"] = "testlast";
+			credentials["passwd"] = "testpass";
+
+			logininstance->setNotificationsInterface(&notifications);
+		}
+
+		LLLoginInstance* logininstance;
+		LLSD credentials;
+		MockNotifications notifications;
+    };
+
+    typedef test_group<lllogininstance_data> lllogininstance_group;
+    typedef lllogininstance_group::object lllogininstance_object;
+    lllogininstance_group llsdmgr("lllogininstance");
+
+    template<> template<>
+    void lllogininstance_object::test<1>()
+    {
+		set_test_name("Test Simple Success And Disconnect");
+
+		// Test default connect.
+		logininstance->connect(credentials);
+
+		ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); 
+
+		// Dummy success response.
+		LLSD response;
+		response["state"] = "online";
+		response["progress"] = 1.0;
+		response["transfer_rate"] = 7;
+		response["data"] = "test_data";
+
+		gTestPump.post(response);
+
+		ensure("Success response", logininstance->authSuccess());
+		ensure_equals("Test Response Data", logininstance->getResponse().asString(), "test_data");
+
+		logininstance->disconnect();
+
+		ensure_equals("Called Login Module Disconnect", gDisconnectCalled, true);
+
+		response.clear();
+		response["state"] = "offline";
+		response["progress"] = 0.0;
+		response["transfer_rate"] = 0;
+		response["data"] = "test_data";
+
+		gTestPump.post(response);
+
+		ensure("Disconnected", !(logininstance->authSuccess()));
+    }
+
+    template<> template<>
+    void lllogininstance_object::test<2>()
+    {
+		set_test_name("Test User TOS/Critical message Interaction");
+
+		const std::string test_uri = "testing-uri";
+
+		// Test default connect.
+		logininstance->connect(test_uri, credentials);
+
+		// connect should call LLLogin::connect to init gLoginURI and gLoginCreds.
+		ensure_equals("Default connect uri", gLoginURI, "testing-uri"); 
+		ensure_equals("Default for agree to tos", gLoginCreds["params"]["agree_to_tos"].asBoolean(), false);
+		ensure_equals("Default for read critical", gLoginCreds["params"]["read_critical"].asBoolean(), false);
+
+		// TOS failure response.
+		LLSD response;
+		response["state"] = "offline";
+		response["progress"] = 0.0;
+		response["transfer_rate"] = 7;
+		response["data"]["reason"] = "tos";
+		gTestPump.post(response);
+
+		ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_TOS);
+		ensure("TOS callback given", gTOSCallback != 0);
+		gTOSCallback(false); // Call callback denying TOS.
+		ensure("No TOS, failed auth", logininstance->authFailure());
+
+		// Start again.
+		logininstance->connect(test_uri, credentials);
+		gTestPump.post(response); // Fail for tos again.
+		gTOSCallback(true); // Accept tos, should reconnect w/ agree_to_tos.
+		ensure_equals("Accepted agree to tos", gLoginCreds["params"]["agree_to_tos"].asBoolean(), true);
+		ensure("Incomplete login status", !logininstance->authFailure() && !logininstance->authSuccess());
+	
+		// Fail connection, attempt connect again.
+		// The new request should have reset agree to tos to default.
+		response["data"]["reason"] = "key"; // bad creds.
+		gTestPump.post(response);
+		ensure("TOS auth failure", logininstance->authFailure());
+
+		logininstance->connect(test_uri, credentials);
+		ensure_equals("Reset to default for agree to tos", gLoginCreds["params"]["agree_to_tos"].asBoolean(), false);
+
+		// Critical Message failure response.
+		logininstance->connect(test_uri, credentials);
+		response["data"]["reason"] = "critical"; // Change response to "critical message"
+		gTestPump.post(response);
+
+		ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_CRITICAL_MESSAGE);
+		ensure("TOS callback given", gTOSCallback != 0);
+		gTOSCallback(true); 
+		ensure_equals("Accepted read critical message", gLoginCreds["params"]["read_critical"].asBoolean(), true);
+		ensure("Incomplete login status", !logininstance->authFailure() && !logininstance->authSuccess());
+
+		// Fail then attempt new connection
+		response["data"]["reason"] = "key"; // bad creds.
+		gTestPump.post(response);
+		ensure("TOS auth failure", logininstance->authFailure());
+		logininstance->connect(test_uri, credentials);
+		ensure_equals("Default for agree to tos", gLoginCreds["params"]["read_critical"].asBoolean(), false);
+	}
+
+    template<> template<>
+    void lllogininstance_object::test<3>()
+    {
+		set_test_name("Test Mandatory Update User Accepts");
+
+		// Part 1 - Mandatory Update, with User accepts response.
+		// Test connect with update needed.
+		logininstance->connect(credentials);
+
+		ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); 
+
+		// Update needed failure response.
+		LLSD response;
+		response["state"] = "offline";
+		response["progress"] = 0.0;
+		response["transfer_rate"] = 7;
+		response["data"]["reason"] = "update";
+		gTestPump.post(response);
+
+		ensure_equals("Notification added", notifications.addedCount(), 1);
+
+		notifications.sendYesResponse();
+
+		ensure("Disconnected", !(logininstance->authSuccess()));
+	}
+
+	template<> template<>
+    void lllogininstance_object::test<4>()
+    {
+		set_test_name("Test Mandatory Update User Decline");
+
+		// Test connect with update needed.
+		logininstance->connect(credentials);
+
+		ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); 
+
+		// Update needed failure response.
+		LLSD response;
+		response["state"] = "offline";
+		response["progress"] = 0.0;
+		response["transfer_rate"] = 7;
+		response["data"]["reason"] = "update";
+		gTestPump.post(response);
+
+		ensure_equals("Notification added", notifications.addedCount(), 1);
+		notifications.sendNoResponse();
+
+		ensure("Disconnected", !(logininstance->authSuccess()));
+	}
+
+	template<> template<>
+    void lllogininstance_object::test<6>()
+    {
+		set_test_name("Test Optional Update User Accept");
+
+		// Part 3 - Mandatory Update, with bogus response.
+		// Test connect with update needed.
+		logininstance->connect(credentials);
+
+		ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); 
+
+		// Update needed failure response.
+		LLSD response;
+		response["state"] = "offline";
+		response["progress"] = 0.0;
+		response["transfer_rate"] = 7;
+		response["data"]["reason"] = "optional";
+		gTestPump.post(response);
+
+		ensure_equals("Notification added", notifications.addedCount(), 1);
+		notifications.sendYesResponse();
+
+		ensure("Disconnected", !(logininstance->authSuccess()));
+	}
+
+	template<> template<>
+    void lllogininstance_object::test<7>()
+    {
+		set_test_name("Test Optional Update User Denies");
+
+		// Part 3 - Mandatory Update, with bogus response.
+		// Test connect with update needed.
+		logininstance->connect(credentials);
+
+		ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); 
+
+		// Update needed failure response.
+		LLSD response;
+		response["state"] = "offline";
+		response["progress"] = 0.0;
+		response["transfer_rate"] = 7;
+		response["data"]["reason"] = "optional";
+		gTestPump.post(response);
+
+		ensure_equals("Notification added", notifications.addedCount(), 1);
+		notifications.sendNoResponse();
+
+		// User skips, should be reconnecting.
+		ensure_equals("reconnect uri", gLoginURI, VIEWERLOGIN_URI); 
+		ensure_equals("skipping optional update", gLoginCreds["params"]["skipoptional"].asBoolean(), true); 
+	}
+}
-- 
cgit v1.2.3


From b029846e81f104789d001e56ca0d83fe8c9e93cd Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 28 Jul 2009 13:20:23 -0700
Subject: DEV-35399 - Making the server build llcommon.dll compatible. Now
 using RunBuildTest.cmake to run tut and lscript_lsl tests, inorder to set
 path to llcommon.dll Exported a few llcommon apis needed by server
 components/tests.

---
 indra/cmake/LLCommon.cmake            |  2 +-
 indra/cmake/Linking.cmake             |  2 +-
 indra/llcommon/lldate.h               |  4 ++--
 indra/llcommon/lldependencies.h       |  2 +-
 indra/llcommon/llliveappconfig.h      |  2 +-
 indra/test/CMakeLists.txt             | 23 +++++++++++++++++------
 indra/test/llsdmessagebuilder_tut.cpp |  3 ++-
 7 files changed, 25 insertions(+), 13 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 19d61008da..d1ab264a41 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -19,5 +19,5 @@ add_definitions(${TCMALLOC_FLAG})
 
 set(LLCOMMON_LINK_SHARED ON CACHE BOOL "Build the llcommon target as a shared library.")
 if(LLCOMMON_LINK_SHARED)
-    add_definitions(-DLL_COMMON_LINK_SHARED=1)
+  add_definitions(-DLL_COMMON_LINK_SHARED=1)
 endif(LLCOMMON_LINK_SHARED)
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 4063034837..578edf9989 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -5,7 +5,7 @@ if (NOT STANDALONE)
     set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib)
     set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release)
     set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug)
-    set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
+    set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged DLLs")
   elseif (LINUX)
     if (VIEWER)
       set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client)
diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h
index d6982fbd9e..4dffaafc7d 100644
--- a/indra/llcommon/lldate.h
+++ b/indra/llcommon/lldate.h
@@ -155,10 +155,10 @@ private:
 };
 
 // Helper function to stream out a date
-std::ostream& operator<<(std::ostream& s, const LLDate& date);
+LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLDate& date);
 
 // Helper function to stream in a date
-std::istream& operator>>(std::istream& s, LLDate& date);
+LL_COMMON_API std::istream& operator>>(std::istream& s, LLDate& date);
 
 
 const static std::string weekdays[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
diff --git a/indra/llcommon/lldependencies.h b/indra/llcommon/lldependencies.h
index bd4bd7c96a..754557cf31 100644
--- a/indra/llcommon/lldependencies.h
+++ b/indra/llcommon/lldependencies.h
@@ -81,7 +81,7 @@ struct instance_from_range: public TYPE
  * LLDependencies components that should not be reinstantiated for each KEY,
  * NODE specialization
  */
-class LLDependenciesBase
+class LL_COMMON_API LLDependenciesBase
 {
 public:
     virtual ~LLDependenciesBase() {}
diff --git a/indra/llcommon/llliveappconfig.h b/indra/llcommon/llliveappconfig.h
index a6ece6e8b3..73b3a23352 100644
--- a/indra/llcommon/llliveappconfig.h
+++ b/indra/llcommon/llliveappconfig.h
@@ -45,7 +45,7 @@
  * loop.  The traditional name for it is live_config.  Be sure to call
  * <code>live_config.checkAndReload()</code> periodically.
  */
-class LLLiveAppConfig : public LLLiveFile
+class LL_COMMON_API LLLiveAppConfig : public LLLiveFile
 {
 public:
 
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 42a32f95b1..7ccd554be4 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -13,7 +13,7 @@ include(LLXML)
 include(LScript)
 include(Linking)
 include(Tut)
-include(Boost)
+
 
 include_directories(
     ${LLCOMMON_INCLUDE_DIRS}
@@ -124,6 +124,7 @@ target_link_libraries(test
     ${LLXML_LIBRARIES}
     ${LSCRIPT_LIBRARIES}
     ${LLCOMMON_LIBRARIES}
+	${EXPAT_LIBRARIES}
     ${APRICONV_LIBRARIES}
     ${PTHREAD_LIBRARY}
     ${WINDOWS_LIBRARIES}
@@ -143,16 +144,26 @@ endif (WINDOWS)
 
 get_target_property(TEST_EXE test LOCATION)
 
-add_custom_command(
+IF(WINDOWS)
+  set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+ELSE(WINDOWS)
+  set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:/usr/lib)
+ENDIF(WINDOWS)
+
+SET(TEST_CMD ${TEST_EXE} --output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt --touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt)
+
+ADD_CUSTOM_COMMAND(
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt
-  COMMAND ${TEST_EXE}
+  COMMAND ${CMAKE_COMMAND}
   ARGS
-    --output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt
-    --touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt
+    -DLD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+    -DTEST_CMD:STRING="${TEST_CMD}" 
+    -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
+      
   DEPENDS test
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   COMMENT "C++ unit tests"
-  )
+ )
 
 set(test_results ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt)
 
diff --git a/indra/test/llsdmessagebuilder_tut.cpp b/indra/test/llsdmessagebuilder_tut.cpp
index 9edb915703..f4457b6d15 100755
--- a/indra/test/llsdmessagebuilder_tut.cpp
+++ b/indra/test/llsdmessagebuilder_tut.cpp
@@ -44,7 +44,8 @@
 #include "v3dmath.h"
 #include "v3math.h"
 #include "v4math.h"
-#include "llsdutil.cpp"
+#include "llsdutil.h"
+//#include "llsdutil.cpp"
 #include "llsdutil_math.cpp"
 #include "lltemplatemessagebuilder.h"
 
-- 
cgit v1.2.3


From 91497c40c53f145749ae418c8f49e05916d87f5b Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 28 Jul 2009 13:46:34 -0700
Subject: Fix Linux compile problem

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

(limited to 'indra')

diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index c08cc2baae..16192079a2 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -450,4 +450,4 @@ std::string construct_start_string()
 		start = gSavedSettings.getString("LoginLocation");
 	}
 	return start;
-}
\ No newline at end of file
+}
-- 
cgit v1.2.3


From fe339408cefb51023cae8a7fd3def2a4b8a75a65 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 28 Jul 2009 18:03:28 -0700
Subject: DEV-35399 - Making the server build llcommon.dll compatible. Fixing
 up string escaping on calls to RunBuildTest.cmake Also added ilasm.bat to the
 FindMono.cmake search

---
 indra/cmake/FindMono.cmake       |  2 +-
 indra/cmake/LLAddBuildTest.cmake | 14 +++++++-------
 indra/test/CMakeLists.txt        |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/FindMono.cmake b/indra/cmake/FindMono.cmake
index c36d7259e8..d956c48656 100644
--- a/indra/cmake/FindMono.cmake
+++ b/indra/cmake/FindMono.cmake
@@ -42,7 +42,7 @@ FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil
              /usr/local/bin
 )
 FIND_PROGRAM (ILASM_EXECUTABLE
-             ilasm
+             NAMES ilasm.bat ilasm
              NO_DEFAULT_PATH
              PATHS "$ENV{PROGRAMFILES}/Mono-1.9.1/bin" "$ENV{PROGRAMFILES}/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin
 )
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 0c6ddef50f..aa77bbac65 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -114,7 +114,8 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
     GET_TARGET_PROPERTY(TEST_EXE PROJECT_${project}_TEST_${name} LOCATION)
     SET(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/PROJECT_${project}_TEST_${name}_ok.txt)
     SET(TEST_CMD ${TEST_EXE} --touch=${TEST_OUTPUT} --sourcedir=${CMAKE_CURRENT_SOURCE_DIR})
-    # daveh - what configuration does this use? Debug? it's cmake-time, not build time. + poppy 2009-04-19
+
+	# daveh - what configuration does this use? Debug? it's cmake-time, not build time. + poppy 2009-04-19
     IF(LL_TEST_VERBOSE)
       MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd  = ${TEST_CMD}")
     ENDIF(LL_TEST_VERBOSE)
@@ -125,18 +126,17 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
       set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:/usr/lib)
     ENDIF(WINDOWS)
 
-    SET(TEST_SCRIPT_CMD 
-      ${CMAKE_COMMAND} 
-      -DLD_LIBRARY_PATH=${LD_LIBRARY_PATH}
-      -DTEST_CMD:STRING="${TEST_CMD}" 
-      -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
-      )
     IF(LL_TEST_VERBOSE)
       MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_script  = ${TEST_SCRIPT_CMD}")
     ENDIF(LL_TEST_VERBOSE)
     # Add test 
     ADD_CUSTOM_COMMAND(
         OUTPUT ${TEST_OUTPUT}
+		COMMAND ${CMAKE_COMMAND} 
+		ARGS
+		  -DLD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+		  "-DTEST_CMD:STRING=\"${TEST_CMD}\""
+		  -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
         COMMAND ${TEST_SCRIPT_CMD}
         DEPENDS PROJECT_${project}_TEST_${name}
         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 7ccd554be4..e596151591 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -157,7 +157,7 @@ ADD_CUSTOM_COMMAND(
   COMMAND ${CMAKE_COMMAND}
   ARGS
     -DLD_LIBRARY_PATH=${LD_LIBRARY_PATH}
-    -DTEST_CMD:STRING="${TEST_CMD}" 
+    "-DTEST_CMD:STRING=\"${TEST_CMD}\"" 
     -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
       
   DEPENDS test
-- 
cgit v1.2.3


From 4f32c076c81b8388e63ce002ec5a228bfe412843 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Wed, 29 Jul 2009 16:46:05 -0700
Subject: DEV-35405 Viewer manifest needed some love for supporting the debug
 build, but its still broke on llmozlib

---
 indra/newview/viewer_manifest.py | 55 +++++++++++++++++++---------------------
 1 file changed, 26 insertions(+), 29 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 0217c8f864..f35c6f449e 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -162,26 +162,24 @@ class WindowsManifest(ViewerManifest):
 
     def construct(self):
         super(WindowsManifest, self).construct()
-        # the final exe is complicated because we're not sure where it's coming from,
-        # nor do we have a fixed name for the executable
-        self.path(self.find_existing_file('debug/secondlife-bin.exe', 'release/secondlife-bin.exe', 'relwithdebinfo/secondlife-bin.exe'), dst=self.final_exe())
+        # 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())
 
-        # need to get the llcommon.dll from any of the build directories as well
-        try:
-            if self.prefix(src=self.args['configuration'], dst=""):
+        # need to get the llcommon.dll from the build directory as well
+        if self.prefix(src=self.args['configuration'], dst=""):
+            try:
                 self.path('llcommon.dll')
                 self.path('libapr-1.dll')
                 self.path('libaprutil-1.dll')
                 self.path('libapriconv-1.dll')
-                self.end_prefix()
-        except:
-            print "Skipping llcommon.dll (assuming llcommon was linked statically)"
-            pass
+            except:
+                print "Skipping llcommon.dll (assuming llcommon was linked statically)"
+                pass
+        self.end_prefix()
 
-        # need to get the kdu dll from any of the build directories as well
+        # need to get the kdu dll from the build directory as well
         try:
-            self.path(self.find_existing_file('%s/llkdu.dll' % self.args['configuration']), 
-                  dst='llkdu.dll')
+            self.path('%s/llkdu.dll' % self.args['configuration'], dst='llkdu.dll')
             pass
         except:
             print "Skipping llkdu.dll"
@@ -197,8 +195,11 @@ class WindowsManifest(ViewerManifest):
         self.path("fmod.dll")
 
         # For textures
-        if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
-            self.path("openjpeg.dll")
+        if self.prefix(src=self.args['configuration'], dst=""):
+            if(self.args['configuration'].lower() == 'debug'):
+                self.path("openjpegd.dll")
+            else:
+                self.path("openjpeg.dll")
             self.end_prefix()
 
         # Mozilla appears to force a dependency on these files so we need to ship it (CP) - updated to vc8 versions (nyx)
@@ -216,7 +217,7 @@ class WindowsManifest(ViewerManifest):
             self.end_prefix()
 
         # Mozilla runtime DLLs (CP)
-        if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
+        if self.prefix(src=self.args['configuration'], dst=""):
             self.path("freebl3.dll")
             self.path("js3250.dll")
             self.path("nspr4.dll")
@@ -247,7 +248,7 @@ class WindowsManifest(ViewerManifest):
         self.path("SecondLife.exe.config", dst=self.final_exe() + ".config")
 
         # Vivox runtimes
-        if self.prefix(src="vivox-runtime/i686-win32", dst=""):
+        if self.prefix(src=self.args['configuration'], dst=""):
             self.path("SLVoice.exe")
             self.path("alut.dll")
             self.path("vivoxsdk.dll")
@@ -256,22 +257,18 @@ class WindowsManifest(ViewerManifest):
             self.end_prefix()
 
         # pull in the crash logger and updater from other projects
-        self.path(src=self.find_existing_file( # tag:"crash-logger" here as a cue to the exporter
-                "../win_crash_logger/debug/windows-crash-logger.exe",
-                "../win_crash_logger/release/windows-crash-logger.exe",
-                "../win_crash_logger/relwithdebinfo/windows-crash-logger.exe"),
+        # tag:"crash-logger" here as a cue to the exporter
+        self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'],
                   dst="win_crash_logger.exe")
-        self.path(src=self.find_existing_file(
-                "../win_updater/debug/windows-updater.exe",
-                "../win_updater/release/windows-updater.exe",
-                "../win_updater/relwithdebinfo/windows-updater.exe"),
+        self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
                   dst="updater.exe")
 
         # For google-perftools tcmalloc allocator.
-        if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
-                self.path("libtcmalloc_minimal.dll")
-                self.end_prefix()
-
+        try:
+            self.path('%s/libtcmalloc_minimal.dll' % self.args['configuration'])
+        except:
+            print "Skipping libtcmalloc_minimal.dll"
+            pass           
 
     def nsi_file_commands(self, install=True):
         def wpath(path):
-- 
cgit v1.2.3


From 9021a536e509571e7a53643275d4400242f8c633 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Wed, 29 Jul 2009 18:06:45 -0700
Subject: DEV-35405 Added creation of <exe_dir>/components directory in debug
 builds to quell the savage llmozlib.

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

(limited to 'indra')

diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 1b3fd5d49b..085d6d47e5 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -519,6 +519,11 @@ void LLViewerMedia::buildMediaManagerData( LLMediaManagerData* init_data )
 	component_dir += gDirUtilp->getDirDelimiter();
   #ifdef LL_DEBUG
 	component_dir += "mozilla_debug";
+	// *NOTE:Mani - if this doesn't exist llmozlib goes crashy in the debug build.
+	// LLMozlib::init wants to write some files to <exe_dir>/components
+	std::string debug_init_component_dir( gDirUtilp->getExecutableDir() );
+	debug_init_component_dir += "/components";
+	LLAPRFile::makeDir(debug_init_component_dir.c_str()); 
   #else // LL_DEBUG
 	component_dir += "mozilla";
   #endif // LL_DEBUG
-- 
cgit v1.2.3


From 1e1a38d5745a680c712be9bcc088a75f6eafa7da Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 30 Jul 2009 18:51:17 -0400
Subject: DEV-34837: Improve Mac support for LLCOMMON_LINK_SHARED. Update Mac
 apr_suite package, introducing libapr-1.0.3.7.dylib and
 libaprutil-1.0.3.8.dylib. We want to use dynamic APR libraries, but
 libllcommon.dylib isn't allowed to depend on .so libraries: must be .dylibs
 themselves. Tweak APR.cmake to reference the aforementioned .dylibs when on
 Mac with LLCOMMON_LINK_SHARED set. Eliminate some redundancy in Windows
 section. For .dylibs, RunBuildTest.cmake must set DYLD_LIBRARY_PATH:
 LD_LIBRARY_PATH only affects search for .so files.

PENDING:
CMake dependencies broken? With LLCOMMON_LINK_SHARED on, it seems we need to
build libllcommon.dylib explicitly before full build can succeed.
This snapshot does NOT yet copy the llcommon, apr or aprutil dylibs into the
app bundle.
---
 indra/cmake/APR.cmake | 53 ++++++++++++++++++++++++---------------------------
 1 file changed, 25 insertions(+), 28 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index efd47f756a..f4706dd4f2 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -14,40 +14,37 @@ else (STANDALONE)
   use_prebuilt_binary(apr_suite)
   if (WINDOWS)
     if (LLCOMMON_LINK_SHARED)
-      set(APR_LIBRARIES 
-        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.lib
-        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.lib
-        )
-      set(APRICONV_LIBRARIES 
-        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib
-        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib
-        )
-      set(APRUTIL_LIBRARIES 
-        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES}
-        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES}
-        )
+      set(APR_selector "lib")
     else (LLCOMMON_LINK_SHARED)
-      set(APR_LIBRARIES 
-        debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib
-        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib
-        )
-      set(APRICONV_LIBRARIES 
-        debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib
-        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib
-        )
-      set(APRUTIL_LIBRARIES 
-        debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib ${APRICONV_LIBRARIES}
-        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib ${APRICONV_LIBRARIES}
-        )
+      set(APR_selector "")
     endif (LLCOMMON_LINK_SHARED)
+    set(APR_LIBRARIES 
+      debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apr-1.lib
+      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
+      )
+    set(APRICONV_LIBRARIES 
+      debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apriconv-1.lib
+      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib
+      )
+    set(APRUTIL_LIBRARIES 
+      debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
+      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
+      )
   elseif (DARWIN)
+    if (LLCOMMON_LINK_SHARED)
+      set(APR_selector     "0.3.7.dylib")
+      set(APRUTIL_selector "0.3.8.dylib")
+    else (LLCOMMON_LINK_SHARED)
+      set(APR_selector     "a")
+      set(APRUTIL_selector "a")
+    endif (LLCOMMON_LINK_SHARED)
     set(APR_LIBRARIES 
-      debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a
-      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.a
+      debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.${APR_selector}
+      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.${APR_selector}
       )
     set(APRUTIL_LIBRARIES 
-      debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.a
-      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a
+      debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.${APRUTIL_selector}
+      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.${APRUTIL_selector}
       )
     set(APRICONV_LIBRARIES iconv)
   else (WINDOWS)
-- 
cgit v1.2.3


From 26817149c4646bf0d1c51e30b2eb29e1d52164b6 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 30 Jul 2009 16:59:45 -0700
Subject: partial work on DEV-35406:crash on shutdown. this doesn't actually
 fix anything yet though.

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

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 17984b8eae..1c3c79db3d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1162,7 +1162,9 @@ bool LLAppViewer::cleanup()
 		apr_status_t rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_stop_func, *i, "ll_plugin_stop");
 		ll_plugin_stop_func();
 
-		rv = apr_dso_unload(*i);
+		// *NOTE - disabled unloading as partial solution to DEV-35406 crash on shutdown
+		//rv = apr_dso_unload(*i);
+		(void)rv;
 	}
 	mPlugins.clear();
 
-- 
cgit v1.2.3


From 1af41b3ba733938541d7cc92ae56dd883638e32f Mon Sep 17 00:00:00 2001
From: "palmer@eniac54.lindenlab.com" <palmer@eniac54.lindenlab.com>
Date: Thu, 30 Jul 2009 18:52:34 -0700
Subject: Fixes to build on linux for DEV-35401.

Moves libllcommon.so to a staging dir for unit tests to work
and gets rid of LL_COMMON_API in forward declarations
---
 indra/cmake/LLAddBuildTest.cmake |  2 +-
 indra/cmake/Linking.cmake        |  1 +
 indra/llcommon/CMakeLists.txt    | 15 +++++++++++++++
 indra/llcommon/llapp.h           |  2 +-
 indra/llcommon/llapr.h           |  4 ++--
 indra/llcommon/llerror.h         |  2 +-
 indra/llcommon/llevent.h         | 10 +++++-----
 indra/llcommon/llevents.h        |  2 +-
 indra/llcommon/lllog.h           |  2 +-
 indra/llcommon/llmetrics.h       |  2 +-
 indra/llcommon/llpreprocessor.h  |  4 +++-
 indra/llcommon/llrun.h           |  2 +-
 indra/llcommon/llsdutil.h        |  2 +-
 indra/llcommon/llstat.h          |  2 +-
 indra/llcommon/llstring.h        |  8 ++++----
 indra/llcommon/llthread.h        |  6 +++---
 indra/llcommon/lluri.h           |  6 +++---
 indra/llcommon/metaclass.h       |  6 +++---
 indra/llcommon/metaproperty.h    |  4 ++--
 indra/llcommon/reflective.h      |  2 +-
 20 files changed, 51 insertions(+), 33 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index aa77bbac65..013cc5109f 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -123,7 +123,7 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
     IF(WINDOWS)
       set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
     ELSE(WINDOWS)
-      set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:/usr/lib)
+      set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib)
     ENDIF(WINDOWS)
 
     IF(LL_TEST_VERBOSE)
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 578edf9989..30b3cc9994 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -14,6 +14,7 @@ if (NOT STANDALONE)
     endif (VIEWER)
     set(ARCH_PREBUILT_DIRS_RELEASE ${ARCH_PREBUILT_DIRS})
     set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS})
+    set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged .sos")
   elseif (DARWIN)
     set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release)
     set(ARCH_PREBUILT_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index c46e2583f1..2ecd4ee5d4 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -245,6 +245,20 @@ if(LLCOMMON_LINK_SHARED)
         # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
         set_target_properties(llcommon PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
     endif(SHARED_LIB_STAGING_DIR)
+
+    get_target_property(LLCOMMON_PATH llcommon LOCATION)
+    get_filename_component(LLCOMMON_FILE ${LLCOMMON_PATH} NAME)
+    add_custom_command(
+        TARGET llcommon POST_BUILD
+        COMMAND ${CMAKE_COMMAND}
+        ARGS
+          -E
+          copy_if_different
+          ${LLCOMMON_FILE}
+          ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/${LLCOMMON_FILE}
+        COMMENT "Copying llcommon to the staging folder."
+        )
+
 else(LLCOMMON_LINK_SHARED)
     add_library (llcommon ${llcommon_SOURCE_FILES})
 endif(LLCOMMON_LINK_SHARED)
@@ -263,6 +277,7 @@ target_link_libraries(
 
 add_dependencies(llcommon stage_third_party_libs)
 
+
 include(LLAddBuildTest)
 SET(llcommon_TEST_SOURCE_FILES
   # WARNING: Please don't write tests against LLCommon or LLMath until this issue is resolved: https://jira.lindenlab.com/jira/browse/DEV-29456
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index cc60ba0b80..35f6f7028d 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -61,7 +61,7 @@ public:
 };
 #endif
 
-class LLApp
+class LL_COMMON_API LLApp
 {
 	friend class LLErrorThread;
 public:
diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index f968eabc18..0898aeec47 100644
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -167,8 +167,8 @@ private:
 	apr_uint32_t mData;
 };
 
-typedef LL_COMMON_API LLAtomic32<U32> LLAtomicU32;
-typedef LL_COMMON_API LLAtomic32<S32> LLAtomicS32;
+typedef LLAtomic32<U32> LLAtomicU32;
+typedef LLAtomic32<S32> LLAtomicS32;
 
 // File IO convenience functions.
 // Returns NULL if the file fails to openm sets *sizep to file size of not NULL
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 6ccdf2174b..4f68fb9f76 100644
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -129,7 +129,7 @@ namespace LLError
 		They are not intended for general use.
 	*/
 	
-	class LL_COMMON_API CallSite;
+	class CallSite;
 	
 	class LL_COMMON_API Log
 	{
diff --git a/indra/llcommon/llevent.h b/indra/llcommon/llevent.h
index 192cb84fea..0ea7cf4ae8 100644
--- a/indra/llcommon/llevent.h
+++ b/indra/llcommon/llevent.h
@@ -41,10 +41,10 @@
 namespace LLOldEvents
 {
 
-class LL_COMMON_API LLEventListener;
-class LL_COMMON_API LLEvent;
-class LL_COMMON_API LLEventDispatcher;
-class LL_COMMON_API LLObservable;
+class LLEventListener;
+class LLEvent;
+class LLEventDispatcher;
+class LLObservable;
 
 // Abstract event. All events derive from LLEvent
 class LL_COMMON_API LLEvent : public LLThreadSafeRefCount
@@ -104,7 +104,7 @@ protected:
 	std::vector<LLEventDispatcher *> mDispatchers;
 };
 
-class LL_COMMON_API LLObservable; // defined below
+class LLObservable; // defined below
 
 // A structure which stores a Listener and its metadata
 struct LLListenerEntry
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 8ebffc008f..6df418fe5a 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -172,7 +172,7 @@ private:
 /*****************************************************************************
 *   LLEventPumps
 *****************************************************************************/
-class LL_COMMON_API LLEventPump;
+class LLEventPump;
 
 /**
  * LLEventPumps is a Singleton manager through which one typically accesses
diff --git a/indra/llcommon/lllog.h b/indra/llcommon/lllog.h
index b0ec570c01..4b6777bb9c 100644
--- a/indra/llcommon/lllog.h
+++ b/indra/llcommon/lllog.h
@@ -39,7 +39,7 @@
 
 class LLLogImpl;
 class LLApp;
-class LL_COMMON_API LLSD;
+class LLSD;
 
 class LL_COMMON_API LLLog
 {
diff --git a/indra/llcommon/llmetrics.h b/indra/llcommon/llmetrics.h
index 11e10a5a2e..f6f49eb456 100644
--- a/indra/llcommon/llmetrics.h
+++ b/indra/llcommon/llmetrics.h
@@ -36,7 +36,7 @@
 #define LL_LLMETRICS_H
 
 class LLMetricsImpl;
-class LL_COMMON_API LLSD;
+class LLSD;
 
 class LL_COMMON_API LLMetrics
 {
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index ed6ca9a25f..671e85b16f 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -138,12 +138,14 @@
 #if LL_WINDOWS
 #define LL_DLLEXPORT __declspec(dllexport)
 #define LL_DLLIMPORT __declspec(dllimport)
+#elif LL_LINUX
+#define LL_DLLEXPORT __attribute__ ((visibility("default")))
+#define LL_DLLIMPORT
 #else
 #define LL_DLLEXPORT
 #define LL_DLLIMPORT
 #endif // LL_WINDOWS
 
-
 #if LL_COMMON_LINK_SHARED
 # if LL_COMMON_BUILD
 #   define LL_COMMON_API LL_DLLEXPORT
diff --git a/indra/llcommon/llrun.h b/indra/llcommon/llrun.h
index afe65fd734..1fc9925df9 100644
--- a/indra/llcommon/llrun.h
+++ b/indra/llcommon/llrun.h
@@ -38,7 +38,7 @@
 #include <vector>
 #include <boost/shared_ptr.hpp>
 
-class LL_COMMON_API LLRunnable;
+class LLRunnable;
 
 /** 
  * @class LLRunner
diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h
index 8cb459d81b..6a6c396687 100644
--- a/indra/llcommon/llsdutil.h
+++ b/indra/llcommon/llsdutil.h
@@ -35,7 +35,7 @@
 #ifndef LL_LLSDUTIL_H
 #define LL_LLSDUTIL_H
 
-class LL_COMMON_API LLSD;
+class LLSD;
 
 // U32
 LL_COMMON_API LLSD ll_sd_from_U32(const U32);
diff --git a/indra/llcommon/llstat.h b/indra/llcommon/llstat.h
index 5d77215beb..64ea8e5b40 100644
--- a/indra/llcommon/llstat.h
+++ b/indra/llcommon/llstat.h
@@ -40,7 +40,7 @@
 #include "llframetimer.h"
 #include "llfile.h"
 
-class	LL_COMMON_API LLSD;
+class	LLSD;
 
 // Set this if longer stats are needed
 #define ENABLE_LONG_TIME_STATS	0
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index eb36dafee3..24a8d49a54 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -345,9 +345,9 @@ public:
 template<class T> std::basic_string<T> LLStringUtilBase<T>::null;
 template<class T> std::string LLStringUtilBase<T>::sLocale;
 
-typedef LL_COMMON_API LLStringUtilBase<char> LLStringUtil;
-typedef LL_COMMON_API LLStringUtilBase<llwchar> LLWStringUtil;
-typedef LL_COMMON_API std::basic_string<llwchar> LLWString;
+typedef LLStringUtilBase<char> LLStringUtil;
+typedef LLStringUtilBase<llwchar> LLWStringUtil;
+typedef std::basic_string<llwchar> LLWString;
 
 //@ Use this where we want to disallow input in the form of "foo"
 //  This is used to catch places where english text is embedded in the code
@@ -419,7 +419,7 @@ LL_COMMON_API std::string rawstr_to_utf8(const std::string& raw);
 //
 // We should never use UTF16 except when communicating with Win32!
 //
-typedef LL_COMMON_API std::basic_string<U16> llutf16string;
+typedef std::basic_string<U16> llutf16string;
 
 LL_COMMON_API LLWString utf16str_to_wstring(const llutf16string &utf16str, S32 len);
 LL_COMMON_API LLWString utf16str_to_wstring(const llutf16string &utf16str);
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index e6bf95aaa9..c3d7650bd9 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -38,9 +38,9 @@
 
 #include "apr_thread_cond.h"
 
-class LL_COMMON_API LLThread;
-class LL_COMMON_API LLMutex;
-class LL_COMMON_API LLCondition;
+class LLThread;
+class LLMutex;
+class LLCondition;
 
 class LL_COMMON_API LLThread
 {
diff --git a/indra/llcommon/lluri.h b/indra/llcommon/lluri.h
index 33fd88b497..eb5c5203eb 100644
--- a/indra/llcommon/lluri.h
+++ b/indra/llcommon/lluri.h
@@ -37,9 +37,9 @@
 
 #include <string>
 
-class LL_COMMON_API LLSD;
-class LL_COMMON_API LLUUID;
-class LL_COMMON_API LLApp;
+class LLSD;
+class LLUUID;
+class LLApp;
 
 /** 
  *
diff --git a/indra/llcommon/metaclass.h b/indra/llcommon/metaclass.h
index 8b93e0d6d5..f38bcd2d57 100644
--- a/indra/llcommon/metaclass.h
+++ b/indra/llcommon/metaclass.h
@@ -40,9 +40,9 @@
 
 #include "stdtypes.h"
 
-class LL_COMMON_API LLReflective;
-class LL_COMMON_API LLMetaProperty;
-class LL_COMMON_API LLMetaMethod;
+class LLReflective;
+class LLMetaProperty;
+class LLMetaMethod;
 class LL_COMMON_API LLMetaClass
 {
 public:
diff --git a/indra/llcommon/metaproperty.h b/indra/llcommon/metaproperty.h
index 96e1b314a4..6c016c56dd 100644
--- a/indra/llcommon/metaproperty.h
+++ b/indra/llcommon/metaproperty.h
@@ -39,8 +39,8 @@
 #include "llsd.h"
 #include "reflective.h"
 
-class LL_COMMON_API LLMetaClass;
-class LL_COMMON_API LLReflective;
+class LLMetaClass;
+class LLReflective;
 class LL_COMMON_API LLMetaProperty
 {
 public:
diff --git a/indra/llcommon/reflective.h b/indra/llcommon/reflective.h
index 541712538b..a13537681d 100644
--- a/indra/llcommon/reflective.h
+++ b/indra/llcommon/reflective.h
@@ -35,7 +35,7 @@
 #ifndef LL_REFLECTIVE_H
 #define LL_REFLECTIVE_H
 
-class LL_COMMON_API LLMetaClass;
+class LLMetaClass;
 class LL_COMMON_API LLReflective
 {
 public:
-- 
cgit v1.2.3


From 8d35bf28a0ddb0992bf2d87f45494f0724b7df64 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 30 Jul 2009 19:05:04 -0700
Subject: DEV-36893 make missing eventhost module a non-fatal error.  We now
 print a warning and fail gracefully.

---
 indra/newview/llappviewer.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 1c3c79db3d..5a1ccb2047 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4125,6 +4125,12 @@ void LLAppViewer::loadEventHostModule(S32 listen_port)
 		gDirUtilp->getAppRODataDir(),
 		gDirUtilp->getExecutableDir());
 
+	if(dso_path == "")
+	{
+		llwarns << "QAModeEventHost requested but module \"" << dso_name << "\" not found!" << llendl;
+		return;
+	}
+
 	apr_dso_handle_t * eventhost_dso_handle = NULL;
 	apr_pool_t * eventhost_dso_memory_pool = NULL;
 
-- 
cgit v1.2.3


From 084983485f9e05ff9164fabe3244ffd6f33295cf Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 31 Jul 2009 13:26:24 -0400
Subject: DEV-34837: update Mac apr_suite package so that each of the .dylib
 files self-identifies as @executable_path/../Resources/filename. This allows
 the SL executable to find it at runtime in its official place in the app
 bundle. Change viewer_manifest.py to copy libllcommon.dylib, libapr*.dylib to
 app bundle's Resources subdir.

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

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index f35c6f449e..7b8a64e3b4 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -472,16 +472,31 @@ class DarwinManifest(ViewerManifest):
                 self.path("vivox-runtime/universal-darwin/libvivoxsdk.dylib", "libvivoxsdk.dylib")
                 self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice")
 
+                libdir = "../../libraries/universal-darwin/lib_release"
+
+                for libfile in ("libapr-1.0.3.7.dylib", "libaprutil-1.0.3.8.dylib"):
+                    self.path(os.path.join(libdir, libfile), libfile)
+
                 # need to get the kdu dll from any of the build directories as well
+                lib = "llkdu"
+                libfile = "lib%s.dylib" % lib
                 try:
-                    self.path(self.find_existing_file('../llkdu/%s/libllkdu.dylib' % self.args['configuration'],
-                        "../../libraries/universal-darwin/lib_release/libllkdu.dylib"),
-                        dst='libllkdu.dylib')
+                    self.path(self.find_existing_file('../%s/%s/%s' %
+                                                      (lib, self.args['configuration'], libfile),
+                                                      os.path.join(libdir, libfile)),
+                              dst=libfile)
                     pass
                 except:
-                    print "Skipping libllkdu.dylib"
+                    print "Skipping %s" % libfile
                     pass
-                
+
+                lib = "llcommon"
+                libfile = "lib%s.dylib" % lib
+                self.path(self.find_existing_file('../%s/%s/%s' %
+                                                  (lib, self.args['configuration'], libfile),
+                                                  os.path.join(libdir, libfile)),
+                          dst=libfile)
+
                 #libfmodwrapper.dylib
                 self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
                 
-- 
cgit v1.2.3


From 9ed6c4fc76ee86337499b374a401a99c1cb97b5f Mon Sep 17 00:00:00 2001
From: Palmer Truelson <palmer@lindenlab.com>
Date: Fri, 31 Jul 2009 11:17:00 -0700
Subject: Fix for DEV-35401 that makes the copy linux only and doesn't hurt mac
 build

To be reviewed by Mani
---
 indra/llcommon/CMakeLists.txt | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 2ecd4ee5d4..3ac2f6f80d 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -246,18 +246,20 @@ if(LLCOMMON_LINK_SHARED)
         set_target_properties(llcommon PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
     endif(SHARED_LIB_STAGING_DIR)
 
-    get_target_property(LLCOMMON_PATH llcommon LOCATION)
-    get_filename_component(LLCOMMON_FILE ${LLCOMMON_PATH} NAME)
-    add_custom_command(
-        TARGET llcommon POST_BUILD
-        COMMAND ${CMAKE_COMMAND}
-        ARGS
-          -E
-          copy_if_different
-          ${LLCOMMON_FILE}
-          ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/${LLCOMMON_FILE}
-        COMMENT "Copying llcommon to the staging folder."
-        )
+    if(LINUX)
+        get_target_property(LLCOMMON_PATH llcommon LOCATION)
+        get_filename_component(LLCOMMON_FILE ${LLCOMMON_PATH} NAME)
+        add_custom_command(
+            TARGET llcommon POST_BUILD
+            COMMAND ${CMAKE_COMMAND}
+            ARGS
+              -E
+              copy_if_different
+              ${LLCOMMON_FILE}
+              ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/${LLCOMMON_FILE}
+            COMMENT "Copying llcommon to the staging folder."
+            )
+    endif(LINUX)
 
 else(LLCOMMON_LINK_SHARED)
     add_library (llcommon ${llcommon_SOURCE_FILES})
-- 
cgit v1.2.3


From 4fcc4063e0862bb2a00c2f29839493815e7d65a6 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 31 Jul 2009 11:48:24 -0700
Subject: Fixups after merge for new files failing to include linden_common.h

---
 indra/llmath/llbbox.cpp | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'indra')

diff --git a/indra/llmath/llbbox.cpp b/indra/llmath/llbbox.cpp
index acf93a2a38..914cbfdc12 100644
--- a/indra/llmath/llbbox.cpp
+++ b/indra/llmath/llbbox.cpp
@@ -30,6 +30,8 @@
  * $/LicenseInfo$
  */
 
+#include "linden_common.h"
+
 // self include
 #include "llbbox.h"
 
-- 
cgit v1.2.3


From 0ac96fd8e61e402840bf2788ed4f34487f780567 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 31 Jul 2009 16:13:46 -0400
Subject: DEV-34837: fix viewer_manifest.py to continue supporting static
 llcommon build

---
 indra/newview/viewer_manifest.py | 38 +++++++++++++++++---------------------
 1 file changed, 17 insertions(+), 21 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 7b8a64e3b4..c0a5ab5526 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -473,29 +473,25 @@ class DarwinManifest(ViewerManifest):
                 self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice")
 
                 libdir = "../../libraries/universal-darwin/lib_release"
-
-                for libfile in ("libapr-1.0.3.7.dylib", "libaprutil-1.0.3.8.dylib"):
-                    self.path(os.path.join(libdir, libfile), libfile)
+                dylibs = {}
 
                 # need to get the kdu dll from any of the build directories as well
-                lib = "llkdu"
-                libfile = "lib%s.dylib" % lib
-                try:
-                    self.path(self.find_existing_file('../%s/%s/%s' %
-                                                      (lib, self.args['configuration'], libfile),
-                                                      os.path.join(libdir, libfile)),
-                              dst=libfile)
-                    pass
-                except:
-                    print "Skipping %s" % libfile
-                    pass
-
-                lib = "llcommon"
-                libfile = "lib%s.dylib" % lib
-                self.path(self.find_existing_file('../%s/%s/%s' %
-                                                  (lib, self.args['configuration'], libfile),
-                                                  os.path.join(libdir, libfile)),
-                          dst=libfile)
+                for lib in "llkdu", "llcommon":
+                    libfile = "lib%s.dylib" % lib
+                    try:
+                        self.path(self.find_existing_file('../%s/%s/%s' %
+                                                          (lib, self.args['configuration'], libfile),
+                                                          os.path.join(libdir, libfile)),
+                                  dst=libfile)
+                    except RuntimeError:
+                        print "Skipping %s" % libfile
+                        dylibs[lib] = False
+                    else:
+                        dylibs[lib] = True
+
+                if dylibs["llcommon"]:
+                    for libfile in ("libapr-1.0.3.7.dylib", "libaprutil-1.0.3.8.dylib"):
+                        self.path(os.path.join(libdir, libfile), libfile)
 
                 #libfmodwrapper.dylib
                 self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
-- 
cgit v1.2.3


From ec2219724023144a0098199229aee7947a29af08 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 31 Jul 2009 15:32:03 -0700
Subject: Fixups for conflicts that got dropped in the changeset 486d51877332
 merge of viewer-2.0.0-3 with login-api. Mostly code that had been modified in
 viewer-2.0.0-3 that had been moved elsewhere in login-api.

---
 indra/newview/lllogininstance.cpp | 2 +-
 indra/newview/llstartup.cpp       | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 16192079a2..f967fcaf97 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -296,7 +296,7 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
 {
 	// store off config state, as we might quit soon
 	gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);	
-	gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE);
+	LLUIColorTable::instance().saveUserSettings();
 
 	std::ostringstream message;
 	std::string msg;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 822c12536e..cc933fbf1e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -204,7 +204,7 @@ bool gAgentMovementCompleted = false;
 std::string SCREEN_HOME_FILENAME = "screen_home.bmp";
 std::string SCREEN_LAST_FILENAME = "screen_last.bmp";
 
-LLPointer<LLImageGL> gStartImageGL;
+LLPointer<LLViewerTexture> gStartTexture;
 
 //
 // Imported globals
@@ -1487,7 +1487,7 @@ bool idle_startup()
 			LLSD id = inv_lib_owner[0]["agent_id"];
 			if(id.isDefined())
 			{
-				gInventory.setLibraryOwnerID( LLUUID(id.asUUID());
+				gInventory.setLibraryOwnerID( LLUUID(id.asUUID()));
 			}
 		}
 
@@ -2915,7 +2915,7 @@ bool process_login_success_response()
 	LLUUID inv_root_folder_id = response["inventory-root"][0]["folder_id"];
 	if(inv_root_folder_id.notNull())
 	{
-		gAgent.getInventoryRootID() = inv_root_folder_id;
+		gInventory.setRootFolderID(inv_root_folder_id);
 		//gInventory.mock(gAgent.getInventoryRootID());
 	}
 
@@ -3003,7 +3003,7 @@ bool process_login_success_response()
 	   && gAgentSessionID.notNull()
 	   && gMessageSystem->mOurCircuitCode
 	   && gFirstSim.isOk()
-	   && gAgent.getInventoryRootID().notNull())
+	   && gInventory.getRootFolderID().notNull())
 	{
 		success = true;
 	}
-- 
cgit v1.2.3


From 84ec6b6925afd38522b4436cd223e95a3bc291f4 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 31 Jul 2009 15:33:06 -0700
Subject: Fixups for changest 486d51877332 merge.  Deleting references to
 things that got deleted in viewer-2.0.0-3

---
 indra/newview/llviewercontrollistener.cpp    | 3 ---
 indra/newview/tests/lllogininstance_test.cpp | 4 +++-
 2 files changed, 3 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewercontrollistener.cpp b/indra/newview/llviewercontrollistener.cpp
index 57426f2af0..ecba1b8eb0 100644
--- a/indra/newview/llviewercontrollistener.cpp
+++ b/indra/newview/llviewercontrollistener.cpp
@@ -21,20 +21,17 @@ LLViewerControlListener::LLViewerControlListener()
 	: LLDispatchListener("LLViewerControl",  "group")
 {
 	add("Global", boost::bind(&LLViewerControlListener::set, &gSavedSettings, _1));
-	add("Skin", boost::bind(&LLViewerControlListener::set, &gSavedSkinSettings, _1));
 	add("PerAccount", boost::bind(&LLViewerControlListener::set, &gSavedPerAccountSettings, _1));
 	add("Warning", boost::bind(&LLViewerControlListener::set, &gWarningSettings, _1));
 	add("Crash", boost::bind(&LLViewerControlListener::set, &gCrashSettings, _1));
 
 #if 0
 	add(/*"toggleControl",*/ "Global", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSettings, _1));
-	add(/*"toggleControl",*/ "Skin", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSkinSettings, _1));
 	add(/*"toggleControl",*/ "PerAccount", boost::bind(&LLViewerControlListener::toggleControl, &gSavedPerAccountSettings, _1));
 	add(/*"toggleControl",*/ "Warning", boost::bind(&LLViewerControlListener::toggleControl, &gWarningSettings, _1));
 	add(/*"toggleControl",*/ "Crash", boost::bind(&LLViewerControlListener::toggleControl, &gCrashSettings, _1));
 
 	add(/*"setDefault",*/ "Global", boost::bind(&LLViewerControlListener::setDefault, &gSavedSettings, _1));
-	add(/*"setDefault",*/ "Skin", boost::bind(&LLViewerControlListener::setDefault, &gSavedSkinSettings, _1));
 	add(/*"setDefault",*/ "PerAccount", boost::bind(&LLViewerControlListener::setDefault, &gSavedPerAccountSettings, _1));
 	add(/*"setDefault",*/ "Warning", boost::bind(&LLViewerControlListener::setDefault, &gWarningSettings, _1));
 	add(/*"setDefault",*/ "Crash", boost::bind(&LLViewerControlListener::setDefault, &gCrashSettings, _1));
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 19cf9cd961..5af8acebaf 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -69,7 +69,6 @@ std::string LLViewerLogin::getGridLabel() const { return VIEWERLOGIN_GRIDLABEL;
 //-----------------------------------------------------------------------------
 #include "../llviewercontrol.h"
 LLControlGroup gSavedSettings("Global");
-LLControlGroup gSavedSkinSettings("Skinning");
 std::string gCurrentVersion = "invalid_version";
 
 LLControlGroup::LLControlGroup(const std::string& name) :
@@ -83,6 +82,9 @@ std::string LLControlGroup::getString(const std::string& name) { return "test_st
 BOOL LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist) { return TRUE; }
 BOOL LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist) { return TRUE; }
 
+#include "lluicolortable.h"
+void LLUIColorTable::saveUserSettings(void)const {}
+
 //-----------------------------------------------------------------------------
 #include "../llurlsimstring.h"
 LLURLSimString LLURLSimString::sInstance;
-- 
cgit v1.2.3


From 47e547fcba802af3145f06fa5b8aa9af2942d294 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 4 Aug 2009 13:51:50 -0400
Subject: DEV-34837: Allow Mac SL executable to find libllcommon.dylib in app
 bundle's Resources subdir without requiring user to explicitly set
 DYLD_LIBRARY_PATH. Engage the SHARED_LIB_STAGING_DIR mechanism for Mac as
 well as Windows and Linux so unit-test executables, too, can find
 libllcommon.dylib. Perform the POST_BUILD copy of libllcommon.dylib to
 SHARED_LIB_STAGING_DIR everywhere but Windows -- but make it conditional on
 SHARED_LIB_STAGING_DIR.

---
 indra/cmake/Linking.cmake     |  1 +
 indra/llcommon/CMakeLists.txt | 22 ++++++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 30b3cc9994..1f3553539f 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -19,6 +19,7 @@ if (NOT STANDALONE)
     set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release)
     set(ARCH_PREBUILT_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
     set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS_RELEASE})
+    set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged DLLs")
   endif (WINDOWS)
 endif (NOT STANDALONE)
 
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 3ac2f6f80d..410cd0f6b2 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -244,22 +244,28 @@ if(LLCOMMON_LINK_SHARED)
         # llcommon.dll get written to the DLL staging directory.
         # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
         set_target_properties(llcommon PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
-    endif(SHARED_LIB_STAGING_DIR)
-
-    if(LINUX)
-        get_target_property(LLCOMMON_PATH llcommon LOCATION)
-        get_filename_component(LLCOMMON_FILE ${LLCOMMON_PATH} NAME)
-        add_custom_command(
+        if(NOT WINDOWS)
+          get_target_property(LLCOMMON_PATH llcommon LOCATION)
+          get_filename_component(LLCOMMON_FILE ${LLCOMMON_PATH} NAME)
+          add_custom_command(
             TARGET llcommon POST_BUILD
             COMMAND ${CMAKE_COMMAND}
             ARGS
               -E
               copy_if_different
-              ${LLCOMMON_FILE}
+              ${LLCOMMON_PATH}
               ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/${LLCOMMON_FILE}
             COMMENT "Copying llcommon to the staging folder."
             )
-    endif(LINUX)
+        endif(NOT WINDOWS)
+    endif(SHARED_LIB_STAGING_DIR)
+
+    if (DARWIN)
+      set_target_properties(llcommon PROPERTIES
+        BUILD_WITH_INSTALL_RPATH 1
+        INSTALL_NAME_DIR "@executable_path/../Resources"
+        )
+    endif(DARWIN)
 
 else(LLCOMMON_LINK_SHARED)
     add_library (llcommon ${llcommon_SOURCE_FILES})
-- 
cgit v1.2.3


From 4a959602c1fcaaf08d50474452818f90bfe479ed Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 4 Aug 2009 14:28:08 -0700
Subject: Fixed missing newline at end of llappviewer.cpp for linux build.

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

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b42452a898..87354121a0 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4232,4 +4232,5 @@ void LLAppViewer::launchUpdater()
 
 	// *REMOVE:Mani - Saving for reference...
 	// LLAppViewer::instance()->forceQuit();
-}
\ No newline at end of file
+}
+
-- 
cgit v1.2.3


From 47ae794060833eedcdae4e9f41085315f490581a Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 4 Aug 2009 17:48:04 -0700
Subject: Removed reference to deleted header file.

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

(limited to 'indra')

diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index 2256120362..e26937e93f 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -35,7 +35,6 @@
 #include "llfloaterinspect.h"
 
 #include "llfloaterreg.h"
-#include "llfloateravatarinfo.h"
 #include "llfloatertools.h"
 #include "llavataractions.h"
 #include "llcachename.h"
-- 
cgit v1.2.3


From 03ebc43132331b9a8dcb3c418ec9c319a6beddda Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 5 Aug 2009 16:08:17 -0400
Subject: DEV-34837: Remove dependency on Leopard-only
 /usr/local/lib/libexpat.0.1.0.dylib. On Mac, add libexpat[.0.5.0].dylib to
 apr_suite package. Update libapr-1[.0.3.7].dylib and
 libaprutil-1[.0.3.8].dylib with versions that reference this expat. Make
 viewer_manifiest.py copy expat dylib to app bundle.

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

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index c0a5ab5526..c2a9789ff1 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -490,7 +490,9 @@ class DarwinManifest(ViewerManifest):
                         dylibs[lib] = True
 
                 if dylibs["llcommon"]:
-                    for libfile in ("libapr-1.0.3.7.dylib", "libaprutil-1.0.3.8.dylib"):
+                    for libfile in ("libapr-1.0.3.7.dylib",
+                                    "libaprutil-1.0.3.8.dylib",
+                                    "libexpat.0.5.0.dylib"):
                         self.path(os.path.join(libdir, libfile), libfile)
 
                 #libfmodwrapper.dylib
-- 
cgit v1.2.3


From 860a82863966435bea680d8541f051e99a6c226c Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 5 Aug 2009 14:58:30 -0700
Subject: Attemt at fixing "doubleton" problems across shared lib boundaries. 
 Singletons now keep their SingletonInstaceData in a big global map in the
 llcommon module.

---
 indra/llcommon/CMakeLists.txt  |  1 +
 indra/llcommon/llsingleton.cpp | 38 ++++++++++++++++++++++++++++++++++++++
 indra/llcommon/llsingleton.h   | 33 ++++++++++++++++++++++++++++++++-
 3 files changed, 71 insertions(+), 1 deletion(-)
 create mode 100644 indra/llcommon/llsingleton.cpp

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 410cd0f6b2..7fe4491a8b 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -74,6 +74,7 @@ set(llcommon_SOURCE_FILES
     llsdserialize_xml.cpp
     llsdutil.cpp
     llsecondlifeurls.cpp
+    llsingleton.cpp
     llstat.cpp
     llstacktrace.cpp
     llstreamtools.cpp
diff --git a/indra/llcommon/llsingleton.cpp b/indra/llcommon/llsingleton.cpp
new file mode 100644
index 0000000000..62988cdc64
--- /dev/null
+++ b/indra/llcommon/llsingleton.cpp
@@ -0,0 +1,38 @@
+/** 
+ * @file llsingleton.cpp
+ * @author Brad Kittenbrink
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * 
+ * Copyright (c) 2009-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llsingleton.h"
+
+std::map<std::string, void *> LLSingletonRegistry::sSingletonMap;
+
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index dc1457e4f7..cd3963b260 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -33,7 +33,30 @@
 
 #include "llerror.h"	// *TODO: eliminate this
 
+#include <typeinfo>
 #include <boost/noncopyable.hpp>
+#include <boost/any.hpp>
+
+/// @brief A global registry of all singletons to prevent duplicate allocations
+/// across shared library boundaries
+class LL_COMMON_API LLSingletonRegistry {
+	private:
+		typedef std::map<std::string, void *> TypeMap;
+		static TypeMap sSingletonMap;
+
+	public:
+		template<typename T> static void * & get()
+		{
+			std::string name(typeid(T).name());
+
+			if(0 == sSingletonMap.count(name))
+			{
+				sSingletonMap[name] = NULL;
+			}
+
+			return sSingletonMap[typeid(T).name()];
+		}
+};
 
 // LLSingleton implements the getInstance() method part of the Singleton
 // pattern. It can't make the derived class constructors protected, though, so
@@ -107,8 +130,16 @@ public:
 
 	static SingletonInstanceData& getData()
 	{
+		void * & registry = LLSingletonRegistry::get<DERIVED_TYPE>();
 		static SingletonInstanceData data;
-		return data;
+
+		// *TODO - look into making this threadsafe
+		if(NULL == registry)
+		{
+			registry = &data;
+		}
+
+		return *static_cast<SingletonInstanceData *>(registry);
 	}
 
 	static DERIVED_TYPE* getInstance()
-- 
cgit v1.2.3


From 0bf8a15cc03b48432a5b9e0011a01908ef903960 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 5 Aug 2009 18:39:02 -0700
Subject: Fixups after the latest merge with viewer-2.0.0-3.  Updated
 LLLoginInstance to use the new LLFloaterReg way of getting hold of floaters.

---
 indra/newview/llfloatertos.cpp               |  7 ++++++-
 indra/newview/llfloatertos.h                 |  3 +++
 indra/newview/lllogininstance.cpp            | 18 ++++++++++--------
 indra/newview/tests/lllogininstance_test.cpp | 24 ++++++++++++++++--------
 4 files changed, 35 insertions(+), 17 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 40bd6360ed..9859d34284 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -57,7 +57,7 @@ LLFloaterTOS::LLFloaterTOS(const LLSD& message)
 	mMessage(message.asString()),
 	mWebBrowserWindowId( 0 ),
 	mLoadCompleteCount( 0 ),
-	mCallback(callback)
+	mCallback()
 {
 }
 
@@ -240,3 +240,8 @@ void LLFloaterTOS::onNavigateComplete( const EventType& eventIn )
 		tos_agreement->setEnabled( true );
 	};
 }
+
+void LLFloaterTOS::setTOSCallback(LLFloaterTOS::YesNoCallback const & callback)
+{
+	mCallback = callback;
+}
diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h
index 0be440d92b..0b15c24bc8 100644
--- a/indra/newview/llfloatertos.h
+++ b/indra/newview/llfloatertos.h
@@ -66,6 +66,9 @@ public:
 
 	virtual void onNavigateComplete( const EventType& eventIn );
 
+	// *TODO - consider getting rid of this in favor of using an event pump. -brad
+	void setTOSCallback(YesNoCallback const & callback);
+
 private:
 	std::string		mMessage;
 	int				mWebBrowserWindowId;
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index f967fcaf97..3c59cb83cd 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -49,6 +49,7 @@
 #include "llviewernetwork.h"
 #include "llviewercontrol.h"
 #include "llurlsimstring.h"
+#include "llfloaterreg.h"
 #include "llfloatertos.h"
 #include "llwindow.h"
 #if LL_LINUX || LL_SOLARIS
@@ -221,18 +222,19 @@ bool LLLoginInstance::handleLoginFailure(const LLSD& event)
 		// to reconnect or to end the attempt in failure.
 		if(reason_response == "tos")
 		{
-			LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
-								message_response,
-								boost::bind(&LLLoginInstance::handleTOSResponse, 
+			LLFloaterTOS * tos =
+				LLFloaterReg::showTypedInstance<LLFloaterTOS>("message_tos", LLSD(message_response));
+
+			tos->setTOSCallback(boost::bind(&LLLoginInstance::handleTOSResponse,
 											this, _1, "agree_to_tos"));
 		}
 		else if(reason_response == "critical")
 		{
-			LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
-								message_response,
-								boost::bind(&LLLoginInstance::handleTOSResponse, 
-												this, _1, "read_critical")
-											);
+			LLFloaterTOS * tos =
+				LLFloaterReg::showTypedInstance<LLFloaterTOS>("message_critical",LLSD(message_response));
+
+			tos->setTOSCallback(boost::bind(&LLLoginInstance::handleTOSResponse,
+											this, _1, "read_critical"));
 		}
 		else if(reason_response == "update" || gSavedSettings.getBOOL("ForceMandatoryUpdate"))
 		{
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 5af8acebaf..d3080d6e4a 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -91,15 +91,23 @@ LLURLSimString LLURLSimString::sInstance;
 bool LLURLSimString::parse() { return true; }
 
 //-----------------------------------------------------------------------------
+#include "llfloaterreg.h"
 #include "../llfloatertos.h"
-static LLFloaterTOS::ETOSType gTOSType;
+static std::string gTOSType;
 static LLFloaterTOS::YesNoCallback gTOSCallback;
-LLFloaterTOS* LLFloaterTOS::show(LLFloaterTOS::ETOSType type, 
-							  const std::string & message, 
-							  const YesNoCallback& callback)
+
+void LLFloaterTOS::setTOSCallback(YesNoCallback const & callback)
 {
-	gTOSType = type;
 	gTOSCallback = callback;
+}
+
+//static
+LLFloater* LLFloaterReg::showInstance(const std::string & name, 
+							          const LLSD & key, 
+							          BOOL focus)
+{
+	gTOSType = name;
+	gTOSCallback = LLFloaterTOS::YesNoCallback();
 	return NULL;
 }
 
@@ -182,7 +190,7 @@ namespace tut
 			gLoginCreds.clear();
 			gDisconnectCalled = false;
 
-			// gTOSType = -1; // Set to invalid value.
+			gTOSType = ""; // Set to invalid value.
 			gTOSCallback = 0; // clear the callback.
 
 
@@ -271,7 +279,7 @@ namespace tut
 		response["data"]["reason"] = "tos";
 		gTestPump.post(response);
 
-		ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_TOS);
+		ensure_equals("TOS Dialog type", gTOSType, "message_tos");
 		ensure("TOS callback given", gTOSCallback != 0);
 		gTOSCallback(false); // Call callback denying TOS.
 		ensure("No TOS, failed auth", logininstance->authFailure());
@@ -297,7 +305,7 @@ namespace tut
 		response["data"]["reason"] = "critical"; // Change response to "critical message"
 		gTestPump.post(response);
 
-		ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_CRITICAL_MESSAGE);
+		ensure_equals("TOS Dialog type", gTOSType, "message_critical");
 		ensure("TOS callback given", gTOSCallback != 0);
 		gTOSCallback(true); 
 		ensure_equals("Accepted read critical message", gLoginCreds["params"]["read_critical"].asBoolean(), true);
-- 
cgit v1.2.3


From 27cf39cdbf27fe52dcf9c70cfdadcc18ddf2e75c Mon Sep 17 00:00:00 2001
From: Palmer <palmer@lindenlab.com>
Date: Thu, 6 Aug 2009 14:29:59 -0700
Subject: DEV-36732

Total time of frame saved

Reviewed by Brad
---
 indra/newview/llfasttimerview.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index b373dd2241..bae3d57300 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -982,8 +982,12 @@ LLSD LLFastTimerView::analyzePerformanceLogDefault(std::istream& is)
 			std::string label = iter->first;
 
 			F64 time = iter->second["Time"].asReal();
-			
-			total_time += time;
+
+			// Skip the total figure
+			if(label.compare("Total") != 0)
+			{
+				total_time += time;
+			}			
 
 			if (time > 0.0)
 			{
-- 
cgit v1.2.3


From 843036a7d27dbffa4aafeae70b3e46f9afe84c1b Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 6 Aug 2009 15:01:26 -0700
Subject: Fix for lllogin_tests crash on shutdown. RegisterFlush destructor was
 dereferencing a dangling reference to the mainloop EventPump which had
 already been destructed.

---
 indra/llcommon/llevents.cpp | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index c2fa79a524..aec9acc7ef 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -59,14 +59,12 @@ const char* queue_names[] =
 /*****************************************************************************
 *   If there's a "mainloop" pump, listen on that to flush all LLEventQueues
 *****************************************************************************/
-struct RegisterFlush
+struct RegisterFlush : public LLEventTrackable
 {
     RegisterFlush():
-        pumps(LLEventPumps::instance()),
-        mainloop(pumps.obtain("mainloop")),
-        name("flushLLEventQueues")
+        pumps(LLEventPumps::instance())
     {
-        mainloop.listen(name, boost::bind(&RegisterFlush::flush, this, _1));
+        pumps.obtain("mainloop").listen("flushLLEventQueues", boost::bind(&RegisterFlush::flush, this, _1));
     }
     bool flush(const LLSD&)
     {
@@ -75,11 +73,9 @@ struct RegisterFlush
     }
     ~RegisterFlush()
     {
-        mainloop.stopListening(name);
+        // LLEventTrackable handles stopListening for us.
     }
     LLEventPumps& pumps;
-    LLEventPump& mainloop;
-    const std::string name;
 };
 static RegisterFlush registerFlush;
 
-- 
cgit v1.2.3


From c9ee582c12bbdcfe7f37459f947872e3ef462560 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 6 Aug 2009 15:53:09 -0700
Subject: Add on-demand allocation of LLSingletonRegistry::sSingletonMap so we
 don't rely on static initialization order. reviewed by nat.

---
 indra/llcommon/llsingleton.cpp |  2 +-
 indra/llcommon/llsingleton.h   | 28 ++++++++++++++++++++--------
 2 files changed, 21 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llsingleton.cpp b/indra/llcommon/llsingleton.cpp
index 62988cdc64..6b5feaf1c4 100644
--- a/indra/llcommon/llsingleton.cpp
+++ b/indra/llcommon/llsingleton.cpp
@@ -34,5 +34,5 @@
 
 #include "llsingleton.h"
 
-std::map<std::string, void *> LLSingletonRegistry::sSingletonMap;
+std::map<std::string, void *> * LLSingletonRegistry::sSingletonMap = NULL;
 
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index 00c87821c2..f55fafadd8 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -42,19 +42,30 @@
 class LL_COMMON_API LLSingletonRegistry {
 	private:
 		typedef std::map<std::string, void *> TypeMap;
-		static TypeMap sSingletonMap;
+		static TypeMap * sSingletonMap;
+
+		static void checkInit()
+		{
+			if(sSingletonMap == NULL)
+			{
+				sSingletonMap = new TypeMap();
+			}
+		}
 
 	public:
 		template<typename T> static void * & get()
 		{
 			std::string name(typeid(T).name());
 
-			if(0 == sSingletonMap.count(name))
-			{
-				sSingletonMap[name] = NULL;
-			}
+			checkInit();
+
+			// the first entry of the pair returned by insert will be either the existing
+			// iterator matching our key, or the newly inserted NULL initialized entry
+			// see "Insert element" in http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html
+			TypeMap::iterator result =
+				sSingletonMap->insert(std::make_pair(name, (void*)NULL)).first;
 
-			return sSingletonMap[typeid(T).name()];
+			return result->second;
 		}
 };
 
@@ -130,12 +141,13 @@ public:
 
 	static SingletonInstanceData& getData()
 	{
-		void * & registry = LLSingletonRegistry::get<DERIVED_TYPE>();
-		static SingletonInstanceData data;
+		// this is static to cache the lookup results
+		static void * & registry = LLSingletonRegistry::get<DERIVED_TYPE>();
 
 		// *TODO - look into making this threadsafe
 		if(NULL == registry)
 		{
+			static SingletonInstanceData data;
 			registry = &data;
 		}
 
-- 
cgit v1.2.3


From e6c9f944380d3a9b6562cf580e8c43a69c060dfd Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 6 Aug 2009 18:45:37 -0700
Subject: Backed out changeset bfb246df4655: rolling back LLFloaterTOS
 post-merge fixups because they didn't work on linux.

---
 indra/newview/llfloatertos.cpp               |  7 +------
 indra/newview/llfloatertos.h                 |  3 ---
 indra/newview/lllogininstance.cpp            | 18 ++++++++----------
 indra/newview/tests/lllogininstance_test.cpp | 24 ++++++++----------------
 4 files changed, 17 insertions(+), 35 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 9859d34284..40bd6360ed 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -57,7 +57,7 @@ LLFloaterTOS::LLFloaterTOS(const LLSD& message)
 	mMessage(message.asString()),
 	mWebBrowserWindowId( 0 ),
 	mLoadCompleteCount( 0 ),
-	mCallback()
+	mCallback(callback)
 {
 }
 
@@ -240,8 +240,3 @@ void LLFloaterTOS::onNavigateComplete( const EventType& eventIn )
 		tos_agreement->setEnabled( true );
 	};
 }
-
-void LLFloaterTOS::setTOSCallback(LLFloaterTOS::YesNoCallback const & callback)
-{
-	mCallback = callback;
-}
diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h
index 0b15c24bc8..0be440d92b 100644
--- a/indra/newview/llfloatertos.h
+++ b/indra/newview/llfloatertos.h
@@ -66,9 +66,6 @@ public:
 
 	virtual void onNavigateComplete( const EventType& eventIn );
 
-	// *TODO - consider getting rid of this in favor of using an event pump. -brad
-	void setTOSCallback(YesNoCallback const & callback);
-
 private:
 	std::string		mMessage;
 	int				mWebBrowserWindowId;
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 3c59cb83cd..f967fcaf97 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -49,7 +49,6 @@
 #include "llviewernetwork.h"
 #include "llviewercontrol.h"
 #include "llurlsimstring.h"
-#include "llfloaterreg.h"
 #include "llfloatertos.h"
 #include "llwindow.h"
 #if LL_LINUX || LL_SOLARIS
@@ -222,19 +221,18 @@ bool LLLoginInstance::handleLoginFailure(const LLSD& event)
 		// to reconnect or to end the attempt in failure.
 		if(reason_response == "tos")
 		{
-			LLFloaterTOS * tos =
-				LLFloaterReg::showTypedInstance<LLFloaterTOS>("message_tos", LLSD(message_response));
-
-			tos->setTOSCallback(boost::bind(&LLLoginInstance::handleTOSResponse,
+			LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
+								message_response,
+								boost::bind(&LLLoginInstance::handleTOSResponse, 
 											this, _1, "agree_to_tos"));
 		}
 		else if(reason_response == "critical")
 		{
-			LLFloaterTOS * tos =
-				LLFloaterReg::showTypedInstance<LLFloaterTOS>("message_critical",LLSD(message_response));
-
-			tos->setTOSCallback(boost::bind(&LLLoginInstance::handleTOSResponse,
-											this, _1, "read_critical"));
+			LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
+								message_response,
+								boost::bind(&LLLoginInstance::handleTOSResponse, 
+												this, _1, "read_critical")
+											);
 		}
 		else if(reason_response == "update" || gSavedSettings.getBOOL("ForceMandatoryUpdate"))
 		{
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index d3080d6e4a..5af8acebaf 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -91,23 +91,15 @@ LLURLSimString LLURLSimString::sInstance;
 bool LLURLSimString::parse() { return true; }
 
 //-----------------------------------------------------------------------------
-#include "llfloaterreg.h"
 #include "../llfloatertos.h"
-static std::string gTOSType;
+static LLFloaterTOS::ETOSType gTOSType;
 static LLFloaterTOS::YesNoCallback gTOSCallback;
-
-void LLFloaterTOS::setTOSCallback(YesNoCallback const & callback)
+LLFloaterTOS* LLFloaterTOS::show(LLFloaterTOS::ETOSType type, 
+							  const std::string & message, 
+							  const YesNoCallback& callback)
 {
+	gTOSType = type;
 	gTOSCallback = callback;
-}
-
-//static
-LLFloater* LLFloaterReg::showInstance(const std::string & name, 
-							          const LLSD & key, 
-							          BOOL focus)
-{
-	gTOSType = name;
-	gTOSCallback = LLFloaterTOS::YesNoCallback();
 	return NULL;
 }
 
@@ -190,7 +182,7 @@ namespace tut
 			gLoginCreds.clear();
 			gDisconnectCalled = false;
 
-			gTOSType = ""; // Set to invalid value.
+			// gTOSType = -1; // Set to invalid value.
 			gTOSCallback = 0; // clear the callback.
 
 
@@ -279,7 +271,7 @@ namespace tut
 		response["data"]["reason"] = "tos";
 		gTestPump.post(response);
 
-		ensure_equals("TOS Dialog type", gTOSType, "message_tos");
+		ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_TOS);
 		ensure("TOS callback given", gTOSCallback != 0);
 		gTOSCallback(false); // Call callback denying TOS.
 		ensure("No TOS, failed auth", logininstance->authFailure());
@@ -305,7 +297,7 @@ namespace tut
 		response["data"]["reason"] = "critical"; // Change response to "critical message"
 		gTestPump.post(response);
 
-		ensure_equals("TOS Dialog type", gTOSType, "message_critical");
+		ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_CRITICAL_MESSAGE);
 		ensure("TOS callback given", gTOSCallback != 0);
 		gTOSCallback(true); 
 		ensure_equals("Accepted read critical message", gLoginCreds["params"]["read_critical"].asBoolean(), true);
-- 
cgit v1.2.3


From 8f4811f3fd7f252a5f5bc50ed11fecd8e42f3e68 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 11 Aug 2009 12:09:18 -0400
Subject: Better solution for fixing up the LLFloaterTOS callback after the
 last viewer-2.0.0-3 merge. LLFloaterTOS and LLLoginInstance now communicate
 through an event pump "lllogininstance_tos_callback". reviewed by Mani.

---
 indra/newview/llfloatertos.cpp               | 17 +++++------
 indra/newview/llfloatertos.h                 |  6 ++--
 indra/newview/lllogininstance.cpp            | 42 ++++++++++++++++------------
 indra/newview/lllogininstance.h              |  2 +-
 indra/newview/tests/lllogininstance_test.cpp | 33 +++++++++++-----------
 5 files changed, 53 insertions(+), 47 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 11f35bedad..e43c3ecde7 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -52,12 +52,12 @@
 #include "message.h"
 
 
-LLFloaterTOS::LLFloaterTOS(const LLSD& message)
-:	LLModalDialog( message, 100, 100 ),
-	mMessage(message.asString()),
+LLFloaterTOS::LLFloaterTOS(const LLSD& data)
+:	LLModalDialog( data["message"].asString(), 100, 100 ),
+	mMessage(data["message"].asString()),
 	mWebBrowserWindowId( 0 ),
 	mLoadCompleteCount( 0 ),
-	mCallback()
+	mReplyPumpName(data["reply_pump"].asString())
 {
 }
 
@@ -205,9 +205,9 @@ void LLFloaterTOS::onContinue( void* userdata )
 	LLFloaterTOS* self = (LLFloaterTOS*) userdata;
 	llinfos << "User agrees with TOS." << llendl;
 
-	if(self->mCallback)
+	if(self->mReplyPumpName != "")
 	{
-		self->mCallback(true);
+		LLEventPumps::instance().obtain(self->mReplyPumpName).post(LLSD(true));
 	}
 
 	self->closeFloater(); // destroys this object
@@ -219,9 +219,9 @@ void LLFloaterTOS::onCancel( void* userdata )
 	LLFloaterTOS* self = (LLFloaterTOS*) userdata;
 	llinfos << "User disagrees with TOS." << llendl;
 
-	if(self->mCallback)
+	if(self->mReplyPumpName != "")
 	{
-		self->mCallback(false);
+		LLEventPumps::instance().obtain(self->mReplyPumpName).post(LLSD(false));
 	}
 
 	self->mLoadCompleteCount = 0;  // reset counter for next time we come to TOS
@@ -240,3 +240,4 @@ void LLFloaterTOS::onNavigateComplete( const EventType& eventIn )
 		tos_agreement->setEnabled( true );
 	};
 }
+
diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h
index 0be440d92b..89ad29170c 100644
--- a/indra/newview/llfloatertos.h
+++ b/indra/newview/llfloatertos.h
@@ -49,11 +49,9 @@ class LLFloaterTOS :
 	public LLWebBrowserCtrlObserver
 {
 public:
-	LLFloaterTOS(const LLSD& message);
+	LLFloaterTOS(const LLSD& data);
 	virtual ~LLFloaterTOS();
 
-	typedef boost::function<void(bool)> YesNoCallback;
-
 	BOOL postBuild();
 	
 	virtual void draw();
@@ -70,7 +68,7 @@ private:
 	std::string		mMessage;
 	int				mWebBrowserWindowId;
 	int				mLoadCompleteCount;
-	YesNoCallback	mCallback;
+	std::string		mReplyPumpName;
 };
 
 #endif // LL_LLFLOATERTOS_H
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 428bed7b72..cb7dbc2de0 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -56,6 +56,9 @@
 #include "lltrans.h"
 #endif
 
+static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback";
+static const char * const TOS_LISTENER_NAME = "lllogininstance_tos";
+
 std::string construct_start_string();
 
 LLLoginInstance::LLLoginInstance() :
@@ -222,26 +225,25 @@ bool LLLoginInstance::handleLoginFailure(const LLSD& event)
 		// to reconnect or to end the attempt in failure.
 		if(reason_response == "tos")
 		{
-			LLFloaterTOS * tos =
-				LLFloaterReg::showTypedInstance<LLFloaterTOS>("message_tos", LLSD(message_response));
-			/*
-			LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
-								message_response,
-								boost::bind(&LLLoginInstance::handleTOSResponse, 
-											this, _1, "agree_to_tos"));
-			*/
+			LLSD data(LLSD::emptyMap());
+			data["message"] = message_response;
+			data["reply_pump"] = TOS_REPLY_PUMP;
+			LLFloaterReg::showInstance("message_tos", data);
+			LLEventPumps::instance().obtain(TOS_REPLY_PUMP)
+				.listen(TOS_LISTENER_NAME,
+						boost::bind(&LLLoginInstance::handleTOSResponse, 
+									this, _1, "agree_to_tos"));
 		}
 		else if(reason_response == "critical")
 		{
-			LLFloaterTOS * tos =
-				LLFloaterReg::showTypedInstance<LLFloaterTOS>("message_critical",LLSD(message_response));
-			/*
-			LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
-								message_response,
-								boost::bind(&LLLoginInstance::handleTOSResponse, 
-												this, _1, "read_critical")
-											);
-			*/
+			LLSD data(LLSD::emptyMap());
+			data["message"] = message_response;
+			data["reply_pump"] = TOS_REPLY_PUMP;
+			LLFloaterReg::showInstance("message_critical", data);
+			LLEventPumps::instance().obtain(TOS_REPLY_PUMP)
+				.listen(TOS_LISTENER_NAME,
+						boost::bind(&LLLoginInstance::handleTOSResponse, 
+									this, _1, "read_critical"));
 		}
 		else if(reason_response == "update" || gSavedSettings.getBOOL("ForceMandatoryUpdate"))
 		{
@@ -286,7 +288,7 @@ bool LLLoginInstance::handleLoginSuccess(const LLSD& event)
 	return false;
 }
 
-void LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
+bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
 {
 	if(accepted)
 	{	
@@ -298,6 +300,9 @@ void LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
 	{
 		attemptComplete();
 	}
+
+	LLEventPumps::instance().obtain(TOS_REPLY_PUMP).stopListening(TOS_LISTENER_NAME);
+	return true;
 }
 
 
@@ -460,3 +465,4 @@ std::string construct_start_string()
 	}
 	return start;
 }
+
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 47d52a6184..6a2ccf919e 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -88,7 +88,7 @@ private:
 	bool handleLoginFailure(const LLSD& event);
 	bool handleLoginSuccess(const LLSD& event);
 
-	void handleTOSResponse(bool v, const std::string& key);
+	bool handleTOSResponse(bool v, const std::string& key);
 
 	void attemptComplete() { mAttemptComplete = true; } // In the future an event?
 
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 5af8acebaf..a84e796159 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -92,14 +92,15 @@ bool LLURLSimString::parse() { return true; }
 
 //-----------------------------------------------------------------------------
 #include "../llfloatertos.h"
-static LLFloaterTOS::ETOSType gTOSType;
-static LLFloaterTOS::YesNoCallback gTOSCallback;
-LLFloaterTOS* LLFloaterTOS::show(LLFloaterTOS::ETOSType type, 
-							  const std::string & message, 
-							  const YesNoCallback& callback)
+#include "llfloaterreg.h"
+static std::string gTOSType;
+static LLEventPump * gTOSReplyPump = NULL;
+
+//static
+LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus)
 {
-	gTOSType = type;
-	gTOSCallback = callback;
+	gTOSType = name;
+	gTOSReplyPump = &LLEventPumps::instance().obtain(key["reply_pump"]);
 	return NULL;
 }
 
@@ -182,8 +183,8 @@ namespace tut
 			gLoginCreds.clear();
 			gDisconnectCalled = false;
 
-			// gTOSType = -1; // Set to invalid value.
-			gTOSCallback = 0; // clear the callback.
+			gTOSType = ""; // Set to invalid value.
+			gTOSReplyPump = 0; // clear the callback.
 
 
 			gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", FALSE);
@@ -271,15 +272,15 @@ namespace tut
 		response["data"]["reason"] = "tos";
 		gTestPump.post(response);
 
-		ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_TOS);
-		ensure("TOS callback given", gTOSCallback != 0);
-		gTOSCallback(false); // Call callback denying TOS.
+		ensure_equals("TOS Dialog type", gTOSType, "message_tos");
+		ensure("TOS callback given", gTOSReplyPump != 0);
+		gTOSReplyPump->post(false); // Call callback denying TOS.
 		ensure("No TOS, failed auth", logininstance->authFailure());
 
 		// Start again.
 		logininstance->connect(test_uri, credentials);
 		gTestPump.post(response); // Fail for tos again.
-		gTOSCallback(true); // Accept tos, should reconnect w/ agree_to_tos.
+		gTOSReplyPump->post(true); // Accept tos, should reconnect w/ agree_to_tos.
 		ensure_equals("Accepted agree to tos", gLoginCreds["params"]["agree_to_tos"].asBoolean(), true);
 		ensure("Incomplete login status", !logininstance->authFailure() && !logininstance->authSuccess());
 	
@@ -297,9 +298,9 @@ namespace tut
 		response["data"]["reason"] = "critical"; // Change response to "critical message"
 		gTestPump.post(response);
 
-		ensure_equals("TOS Dialog type", gTOSType, LLFloaterTOS::TOS_CRITICAL_MESSAGE);
-		ensure("TOS callback given", gTOSCallback != 0);
-		gTOSCallback(true); 
+		ensure_equals("TOS Dialog type", gTOSType, "message_critical");
+		ensure("TOS callback given", gTOSReplyPump != 0);
+		gTOSReplyPump->post(true); 
 		ensure_equals("Accepted read critical message", gLoginCreds["params"]["read_critical"].asBoolean(), true);
 		ensure("Incomplete login status", !logininstance->authFailure() && !logininstance->authSuccess());
 
-- 
cgit v1.2.3


From 2965f5ff382b26d8f98409bf1040a1976ed25908 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 11 Aug 2009 15:51:56 -0400
Subject: Add SHARED_LIB_STAGING_DIR to LD_LIBRARY_PATH for indra/test
 executable, as with LLAddBuildTest

---
 indra/test/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 012c5e6408..d8c3d45c5f 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -150,7 +150,7 @@ get_target_property(TEST_EXE test LOCATION)
 IF(WINDOWS)
   set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
 ELSE(WINDOWS)
-  set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:/usr/lib)
+  set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib)
 ENDIF(WINDOWS)
 
 SET(TEST_CMD ${TEST_EXE} --output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt --touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt)
-- 
cgit v1.2.3


From 9695162dc20085c807363e562281271cec21cc1d Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 11 Aug 2009 14:59:09 -0700
Subject: Add libllcommon.so to packaged/lib

---
 indra/newview/viewer_manifest.py | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index d198518ee3..432dafaf8f 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -483,8 +483,10 @@ class DarwinManifest(ViewerManifest):
                 for lib in "llkdu", "llcommon":
                     libfile = "lib%s.dylib" % lib
                     try:
-                        self.path(self.find_existing_file('../%s/%s/%s' %
-                                                          (lib, self.args['configuration'], libfile),
+                        self.path(self.find_existing_file(os.path.join(os.pardir,
+                                                                       lib,
+                                                                       self.args['configuration'],
+                                                                       libfile),
                                                           os.path.join(libdir, libfile)),
                                   dst=libfile)
                     except RuntimeError:
@@ -674,15 +676,17 @@ class Linux_i686Manifest(LinuxManifest):
 
         # install either the libllkdu we just built, or a prebuilt one, in
         # decreasing order of preference.  for linux package, this goes to bin/
-        try:
-            self.path(self.find_existing_file('../llkdu/libllkdu.so',
-                '../../libraries/i686-linux/lib_release_client/libllkdu.so'), 
-                  dst='bin/libllkdu.so')
-            # keep this one to preserve syntax, open source mangling removes previous lines
-            pass
-        except:
-            print "Skipping libllkdu.so - not found"
-            pass
+        for lib, destdir in ("llkdu", "bin"), ("llcommon", "lib"):
+            libfile = "lib%s.so" % lib
+            try:
+                self.path(self.find_existing_file(os.path.join(os.pardir, lib, libfile),
+                    '../../libraries/i686-linux/lib_release_client/%s' % libfile), 
+                      dst=os.path.join(destdir, libfile))
+                # keep this one to preserve syntax, open source mangling removes previous lines
+                pass
+            except RuntimeError:
+                print "Skipping %s - not found" % libfile
+                pass
 
         self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
         self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin")
-- 
cgit v1.2.3


From a15feff98c13cd693e60fc59345609c007de16db Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 12 Aug 2009 08:02:10 -0700
Subject: Add libgobject-2.0.so.0 to Linux package

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

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 432dafaf8f..3270cba58c 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -701,6 +701,10 @@ class Linux_i686Manifest(LinuxManifest):
 
         self.path("app_settings/mozilla-runtime-linux-i686")
 
+        if self.prefix("../../libraries/i686-linux/lib_release", dst="lib"):
+            self.path("libgobject-2.0.so.0")
+            self.end_prefix("lib")
+
         if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
             #self.path("libkdu_v42R.so", "libkdu.so")
             self.path("libfmod-3.75.so")
-- 
cgit v1.2.3


From 88f29fce3512ec03a01b875d1ae60c7af403d3a7 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 13 Aug 2009 11:55:40 -0400
Subject: Backed out changeset 75ab7d14eace.  libgobject-2.0.so should not be
 being packaged on linux.

---
 indra/newview/viewer_manifest.py | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 3270cba58c..432dafaf8f 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -701,10 +701,6 @@ class Linux_i686Manifest(LinuxManifest):
 
         self.path("app_settings/mozilla-runtime-linux-i686")
 
-        if self.prefix("../../libraries/i686-linux/lib_release", dst="lib"):
-            self.path("libgobject-2.0.so.0")
-            self.end_prefix("lib")
-
         if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
             #self.path("libkdu_v42R.so", "libkdu.so")
             self.path("libfmod-3.75.so")
-- 
cgit v1.2.3


From aff85ed92c5aad3a9445cf4ec5447cc56c44dfc0 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Thu, 13 Aug 2009 18:12:06 -0700
Subject: Rewrite of app.config creation for compatibility with 3rd party
 staging changes from login-api.

---
 indra/newview/CMakeLists.txt           | 24 +++++++++++++++++++++---
 indra/newview/build_win32_appConfig.py | 28 ++++++++++++++++++++++------
 2 files changed, 43 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index c68d01d705..8451bc1223 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1332,9 +1332,27 @@ if (WINDOWS)
          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
         COMMENT "Copying staged dlls."
         )
-    endif(WINDOWS)
-    
-    
+
+      add_custom_command(
+	OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
+        COMMAND ${PYTHON_EXECUTABLE}
+        ARGS
+          ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
+          ${CMAKE_CFG_INTDIR}
+          ${CMAKE_CURRENT_SOURCE_DIR}
+	  ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+	  ${VIEWER_BINARY_NAME}.exe.config
+        COMMENT "Creating app.config file"
+        )
+
+      add_custom_target(create_app_config_file ALL 
+	DEPENDS
+	  ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
+	)
+
+      add_dependencies(${VIEWER_BINARY_NAME} create_app_config_file)
+      
+    endif(WINDOWS)    
 
     if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
       add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
diff --git a/indra/newview/build_win32_appConfig.py b/indra/newview/build_win32_appConfig.py
index 2ac0e17dc1..06312bea26 100644
--- a/indra/newview/build_win32_appConfig.py
+++ b/indra/newview/build_win32_appConfig.py
@@ -31,11 +31,7 @@
 import sys, os
 from xml.dom.minidom import parse
 
-def main():
-    src_manifest_name = sys.argv[1]
-    src_config_name = sys.argv[2]
-    dst_config_name = sys.argv[3]
- 
+def munge_binding_redirect_version(src_manifest_name, src_config_name, dst_config_name):
     manifest_dom = parse(src_manifest_name)
     node = manifest_dom.getElementsByTagName('assemblyIdentity')[0]
     manifest_assm_ver = node.getAttribute('version')
@@ -46,11 +42,31 @@ def main():
     node.setAttribute('oldVersion', node.getAttribute('oldVersion') + manifest_assm_ver)
     comment = config_dom.createComment("This file is automatically generated by the build. see indra/newview/build_win32_appConfig.py")
     config_dom.insertBefore(comment, config_dom.childNodes[0])
-    
+
+    print "Writing: " + dst_config_name
     f = open(dst_config_name, 'w')
     config_dom.writexml(f)
     f.close()
+    
+    
+
+def main():
+    config = sys.argv[1]
+    src_dir = sys.argv[2]
+    dst_dir = sys.argv[3]
+    dst_name = sys.argv[4]
+    
+    if config.lower() == 'debug':
+        src_manifest_name = dst_dir + '/Microsoft.VC80.DebugCRT.manifest'
+        src_config_name = src_dir + '/SecondLifeDebug.exe.config'
+    else:
+        src_manifest_name = dst_dir + '/Microsoft.VC80.CRT.manifest'
+        src_config_name = src_dir + '/SecondLife.exe.config'
+
+    dst_config_name = dst_dir + '/' + dst_name
         
+    munge_binding_redirect_version(src_manifest_name, src_config_name, dst_config_name)
+    
     return 0
 
 if __name__ == "__main__":
-- 
cgit v1.2.3


From 2da8eb43d57ae6876f9955386f604f2c56849211 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 14 Aug 2009 14:40:43 -0400
Subject: Wrap a subset of the LLFloaterReg API with an event API

---
 indra/llui/CMakeLists.txt           |  2 ++
 indra/llui/llfloaterreg.cpp         |  3 ++
 indra/llui/llfloaterreg.h           |  1 +
 indra/llui/llfloaterreglistener.cpp | 60 +++++++++++++++++++++++++++++++++++++
 indra/llui/llfloaterreglistener.h   | 34 +++++++++++++++++++++
 5 files changed, 100 insertions(+)
 create mode 100644 indra/llui/llfloaterreglistener.cpp
 create mode 100644 indra/llui/llfloaterreglistener.h

(limited to 'indra')

diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 269c02263d..49230833f8 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -40,6 +40,7 @@ set(llui_SOURCE_FILES
     llfiltereditor.cpp
     llfloater.cpp
     llfloaterreg.cpp
+    llfloaterreglistener.cpp
     llflyoutbutton.cpp 
     llfocusmgr.cpp
     llfunctorregistry.cpp
@@ -115,6 +116,7 @@ set(llui_HEADER_FILES
     llfiltereditor.h 
     llfloater.h
     llfloaterreg.h
+    llfloaterreglistener.h
     llflyoutbutton.h 
     llfocusmgr.h
     llfunctorregistry.h
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index a63b1b085c..8617ba940e 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -36,6 +36,7 @@
 
 #include "llfloater.h"
 #include "llmultifloater.h"
+#include "llfloaterreglistener.h"
 
 //*******************************************************
 
@@ -45,6 +46,8 @@ LLFloaterReg::instance_map_t LLFloaterReg::sInstanceMap;
 LLFloaterReg::build_map_t LLFloaterReg::sBuildMap;
 std::map<std::string,std::string> LLFloaterReg::sGroupMap;
 
+static LLFloaterRegListener sFloaterRegListener("LLFloaterReg");
+
 //*******************************************************
 
 //static
diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h
index 7edac43c96..451bd1dbe3 100644
--- a/indra/llui/llfloaterreg.h
+++ b/indra/llui/llfloaterreg.h
@@ -70,6 +70,7 @@ public:
 	typedef std::map<std::string, BuildData> build_map_t;
 	
 private:
+	friend class LLFloaterRegListener;
 	static instance_list_t sNullInstanceList;
 	static instance_map_t sInstanceMap;
 	static build_map_t sBuildMap;
diff --git a/indra/llui/llfloaterreglistener.cpp b/indra/llui/llfloaterreglistener.cpp
new file mode 100644
index 0000000000..37708a7cd9
--- /dev/null
+++ b/indra/llui/llfloaterreglistener.cpp
@@ -0,0 +1,60 @@
+/**
+ * @file   llfloaterreglistener.cpp
+ * @author Nat Goodspeed
+ * @date   2009-08-12
+ * @brief  Implementation for llfloaterreglistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "llfloaterreglistener.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+#include "llfloaterreg.h"
+
+LLFloaterRegListener::LLFloaterRegListener(const std::string& pumpName):
+    LLDispatchListener(pumpName, "op")
+{
+    add("getBuildMap",  &LLFloaterRegListener::getBuildMap,  LLSD().insert("reply", LLSD()));
+    LLSD requiredName;
+    requiredName["name"] = LLSD();
+    add("showInstance", &LLFloaterRegListener::showInstance, requiredName);
+    add("hideInstance", &LLFloaterRegListener::hideInstance, requiredName);
+}
+
+void LLFloaterRegListener::getBuildMap(const LLSD& event) const
+{
+    // Honor the "reqid" convention by echoing event["reqid"] in our reply packet.
+    LLReqID reqID(event);
+    LLSD reply(reqID.makeResponse());
+    // Build an LLSD map that mirrors sBuildMap. Since we have no good way to
+    // represent a C++ callable in LLSD, the only part of BuildData we can
+    // store is the filename. For each LLSD map entry, it would be more
+    // extensible to store a nested LLSD map containing a single key "file" --
+    // but we don't bother, simply storing the string filename instead.
+    for (LLFloaterReg::build_map_t::const_iterator mi(LLFloaterReg::sBuildMap.begin()),
+                                                   mend(LLFloaterReg::sBuildMap.end());
+         mi != mend; ++mi)
+    {
+        reply[mi->first] = mi->second.mFile;
+    }
+    // Send the reply to the LLEventPump named in event["reply"].
+    LLEventPumps::instance().obtain(event["reply"]).post(reply);
+}
+
+void LLFloaterRegListener::showInstance(const LLSD& event) const
+{
+    LLFloaterReg::showInstance(event["name"], event["key"], event["focus"]);
+}
+
+void LLFloaterRegListener::hideInstance(const LLSD& event) const
+{
+    LLFloaterReg::hideInstance(event["name"], event["key"]);
+}
diff --git a/indra/llui/llfloaterreglistener.h b/indra/llui/llfloaterreglistener.h
new file mode 100644
index 0000000000..049389c094
--- /dev/null
+++ b/indra/llui/llfloaterreglistener.h
@@ -0,0 +1,34 @@
+/**
+ * @file   llfloaterreglistener.h
+ * @author Nat Goodspeed
+ * @date   2009-08-12
+ * @brief  Wrap (subset of) LLFloaterReg API with an event API
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLFLOATERREGLISTENER_H)
+#define LL_LLFLOATERREGLISTENER_H
+
+#include "lleventdispatcher.h"
+#include <string>
+
+class LLSD;
+
+/// Event API wrapper for LLFloaterReg
+class LLFloaterRegListener: public LLDispatchListener
+{
+public:
+    /// As all public LLFloaterReg methods are static, there's no point in
+    /// binding an LLFloaterReg instance.
+    LLFloaterRegListener(const std::string& pumpName);
+
+private:
+    void getBuildMap(const LLSD& event) const;
+    void showInstance(const LLSD& event) const;
+    void hideInstance(const LLSD& event) const;
+};
+
+#endif /* ! defined(LL_LLFLOATERREGLISTENER_H) */
-- 
cgit v1.2.3


From 25ceef032b49591244c7df704494436b8b2e4044 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 19 Aug 2009 15:05:08 -0400
Subject: Wrap LLFloaterReg::toggleInstance() as well as showInstance() and
 hideInstance(). Use toggleInstance() in testfloaters.py.

---
 indra/llui/llfloaterreglistener.cpp | 6 ++++++
 indra/llui/llfloaterreglistener.h   | 1 +
 2 files changed, 7 insertions(+)

(limited to 'indra')

diff --git a/indra/llui/llfloaterreglistener.cpp b/indra/llui/llfloaterreglistener.cpp
index 37708a7cd9..cb8fa6dfda 100644
--- a/indra/llui/llfloaterreglistener.cpp
+++ b/indra/llui/llfloaterreglistener.cpp
@@ -27,6 +27,7 @@ LLFloaterRegListener::LLFloaterRegListener(const std::string& pumpName):
     requiredName["name"] = LLSD();
     add("showInstance", &LLFloaterRegListener::showInstance, requiredName);
     add("hideInstance", &LLFloaterRegListener::hideInstance, requiredName);
+    add("toggleInstance", &LLFloaterRegListener::toggleInstance, requiredName);
 }
 
 void LLFloaterRegListener::getBuildMap(const LLSD& event) const
@@ -58,3 +59,8 @@ void LLFloaterRegListener::hideInstance(const LLSD& event) const
 {
     LLFloaterReg::hideInstance(event["name"], event["key"]);
 }
+
+void LLFloaterRegListener::toggleInstance(const LLSD& event) const
+{
+    LLFloaterReg::toggleInstance(event["name"], event["key"]);
+}
diff --git a/indra/llui/llfloaterreglistener.h b/indra/llui/llfloaterreglistener.h
index 049389c094..58d2c07936 100644
--- a/indra/llui/llfloaterreglistener.h
+++ b/indra/llui/llfloaterreglistener.h
@@ -29,6 +29,7 @@ private:
     void getBuildMap(const LLSD& event) const;
     void showInstance(const LLSD& event) const;
     void hideInstance(const LLSD& event) const;
+    void toggleInstance(const LLSD& event) const;
 };
 
 #endif /* ! defined(LL_LLFLOATERREGLISTENER_H) */
-- 
cgit v1.2.3


From 116628bb79e8f07c84368fffca550040260c9f67 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 19 Aug 2009 15:11:01 -0400
Subject: Introduce LLUIListener, a new event API that doesn't directly
 correspond to any existing C++ class. It calls named functions registered in
 the LLUICtrl:: CommitCallbackRegistry, thus supporting event-level access to
 any function you can specify with XUI's function= parameter=.

---
 indra/newview/CMakeLists.txt   |  2 ++
 indra/newview/lluilistener.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++
 indra/newview/lluilistener.h   | 29 ++++++++++++++++++++++++
 indra/newview/llviewermenu.cpp |  3 +++
 4 files changed, 84 insertions(+)
 create mode 100644 indra/newview/lluilistener.cpp
 create mode 100644 indra/newview/lluilistener.h

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 8451bc1223..37df00d9ec 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -394,6 +394,7 @@ set(viewer_SOURCE_FILES
     lltoolselectland.cpp
     lltoolselectrect.cpp
     lltracker.cpp
+    lluilistener.cpp
     lluploaddialog.cpp
     llurl.cpp
     llurldispatcher.cpp
@@ -848,6 +849,7 @@ set(viewer_HEADER_FILES
     lltoolselectrect.h
     lltracker.h
     lluiconstants.h
+    lluilistener.h
     lluploaddialog.h
     llurl.h
     llurldispatcher.h
diff --git a/indra/newview/lluilistener.cpp b/indra/newview/lluilistener.cpp
new file mode 100644
index 0000000000..9c643e78de
--- /dev/null
+++ b/indra/newview/lluilistener.cpp
@@ -0,0 +1,50 @@
+/**
+ * @file   lluilistener.cpp
+ * @author Nat Goodspeed
+ * @date   2009-08-18
+ * @brief  Implementation for lluilistener.
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "llviewerprecompiledheaders.h"
+// associated header
+#include "lluilistener.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+#include "lluictrl.h"
+#include "llerror.h"
+
+LLUIListener::LLUIListener(const std::string& name):
+    LLDispatchListener(name, "op")
+{
+    add("call", &LLUIListener::call, LLSD().insert("function", LLSD()));
+}
+
+void LLUIListener::call(const LLSD& event) const
+{
+    LLUICtrl::commit_callback_t* func =
+        LLUICtrl::CommitCallbackRegistry::getValue(event["function"]);
+    if (! func)
+    {
+        // This API is intended for use by a script. It's a fire-and-forget
+        // API: we provide no reply. Therefore, a typo in the script will
+        // provide no feedback whatsoever to that script. To rub the coder's
+        // nose in such an error, crump rather than quietly ignoring it.
+        LL_ERRS("LLUIListener") << "function '" << event["function"] << "' not found" << LL_ENDL;
+    }
+    else
+    {
+        // Interestingly, view_listener_t::addMenu() (addCommit(),
+        // addEnable()) constructs a commit_callback_t callable that accepts
+        // two parameters but discards the first. Only the second is passed to
+        // handleEvent(). Therefore we feel completely safe passing NULL for
+        // the first parameter.
+        (*func)(NULL, event["parameter"]);
+    }
+}
diff --git a/indra/newview/lluilistener.h b/indra/newview/lluilistener.h
new file mode 100644
index 0000000000..ea904a99ff
--- /dev/null
+++ b/indra/newview/lluilistener.h
@@ -0,0 +1,29 @@
+/**
+ * @file   lluilistener.h
+ * @author Nat Goodspeed
+ * @date   2009-08-18
+ * @brief  Engage named functions as specified by XUI
+ * 
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLUILISTENER_H)
+#define LL_LLUILISTENER_H
+
+#include "lleventdispatcher.h"
+#include <string>
+
+class LLSD;
+
+class LLUIListener: public LLDispatchListener
+{
+public:
+    LLUIListener(const std::string& name);
+
+private:
+    void call(const LLSD& event) const;
+};
+
+#endif /* ! defined(LL_LLUILISTENER_H) */
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index a6157aa1e0..67dcf6bcae 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -210,6 +210,7 @@
 #include "llwlparammanager.h"
 #include "llwaterparammanager.h"
 #include "llfloaternotificationsconsole.h"
+#include "lluilistener.h"
 
 #include "lltexlayer.h"
 
@@ -420,6 +421,8 @@ public:
 
 static LLMenuParcelObserver* gMenuParcelObserver = NULL;
 
+static LLUIListener sUIListener("UI");
+
 LLMenuParcelObserver::LLMenuParcelObserver()
 {
 	LLViewerParcelMgr::getInstance()->addObserver(this);
-- 
cgit v1.2.3


From 70600ea66adc816e72e91e804deebde40ed6b1bc Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 24 Aug 2009 17:07:10 -0400
Subject: Make setStartupState() fling events on "StartupState" LLEventPump

---
 indra/newview/llstartup.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index a2e879d24d..4afb0b06c8 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -186,6 +186,7 @@
 #include "llinventorybridge.h"
 
 #include "lllogin.h"
+#include "llevents.h"
 
 #if LL_LIBXUL_ENABLED
 #include "llmozlib.h"
@@ -234,6 +235,7 @@ static std::string gFirstSimSeedCap;
 static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
 static std::string gAgentStartLocation = "safe";
 
+static LLEventStream sStartupStateWatcher("StartupState");
 
 //
 // local function declaration
@@ -2637,14 +2639,17 @@ std::string LLStartUp::startupStateToString(EStartupState state)
 #undef RTNENUM
 }
 
-
 // static
 void LLStartUp::setStartupState( EStartupState state )
 {
 	LL_INFOS("AppInit") << "Startup state changing from " <<  
-		startupStateToString(gStartupState) << " to " <<  
+		getStartupStateString() << " to " <<  
 		startupStateToString(state) << LL_ENDL;
 	gStartupState = state;
+	LLSD stateInfo;
+	stateInfo["str"] = getStartupStateString();
+	stateInfo["enum"] = state;
+	sStartupStateWatcher.post(stateInfo);
 }
 
 
-- 
cgit v1.2.3


From 491f9fc9869cf15bf8a46e917bd2cc17f65b1257 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Sat, 29 Aug 2009 10:35:41 -0400
Subject: Add magic -D switch to work around OS X 10.5 bug in ucontext.h

---
 indra/cmake/00-Common.cmake | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 2a70263446..0dc0e9e80c 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -179,11 +179,17 @@ endif (LINUX)
 
 
 if (DARWIN)
-  add_definitions(-DLL_DARWIN=1)
+  # NOTE (per http://lists.apple.com/archives/darwin-dev/2008/Jan/msg00232.html):
+  # > Why the bus error? What am I doing wrong? 
+  # This is a known issue where getcontext(3) is writing past the end of the
+  # ucontext_t struct when _XOPEN_SOURCE is not defined (rdar://problem/5578699 ).
+  # As a workaround, define _XOPEN_SOURCE before including ucontext.h.
+  add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE)
   set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
+  set(DARWIN_extra_cstar_flags "-mlong-branch")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  ${DARWIN_extra_cstar_flags}")
   # NOTE: it's critical that the optimization flag is put in front.
   # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
-- 
cgit v1.2.3


From abf683fe6f49d49ae0ead6894d3a99d6ef543093 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Mon, 31 Aug 2009 18:42:28 -0400
Subject: Post-merge cleanups (stage_third_party_libs is the new copy_win_libs)

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

(limited to 'indra')

diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt
index dd894087e6..3143d856d6 100644
--- a/indra/test_apps/llplugintest/CMakeLists.txt
+++ b/indra/test_apps/llplugintest/CMakeLists.txt
@@ -136,7 +136,7 @@ endif (DARWIN)
 #    ${media_simple_test_SOURCE_FILES}
 #)
 #
-#add_dependencies(media_simple_test copy_win_libs)
+#add_dependencies(media_simple_test stage_third_party_libs)
 #
 #set_target_properties(media_simple_test
 #    PROPERTIES
@@ -177,7 +177,7 @@ endif (DARWIN)
 #)
 #
 #add_dependencies(media_plugin_test
-#  copy_win_libs
+#  stage_third_party_libs
 #  SLPlugin
 #  demo_media_plugin
 #  ${LLPLUGIN_LIBRARIES}
@@ -281,7 +281,7 @@ target_link_libraries(llmediaplugintest
 )
 
 add_dependencies(llmediaplugintest
-  copy_win_libs
+  stage_third_party_libs
   SLPlugin
   media_plugin_flash_activex
   media_plugin_quicktime
-- 
cgit v1.2.3


From 3df557435fa3e83a1d0f5f6880aab2e5e6a2ba13 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Mon, 31 Aug 2009 18:43:12 -0400
Subject: Post-merge cleanups (adding LL_COMMON_API declarations)

---
 indra/llcommon/llprocesslauncher.h | 2 +-
 indra/llcommon/llstring.h          | 2 +-
 indra/llxuixml/lluicolor.cpp       | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llprocesslauncher.h b/indra/llcommon/llprocesslauncher.h
index a1b8e22691..880562157f 100644
--- a/indra/llcommon/llprocesslauncher.h
+++ b/indra/llcommon/llprocesslauncher.h
@@ -42,7 +42,7 @@
 	It also keeps track of whether the process is still running, and can kill it if required.
 */
 
-class LLProcessLauncher
+class LL_COMMON_API LLProcessLauncher
 {
 	LOG_CLASS(LLProcessLauncher);
 public:
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index f5c6b297b9..0170c0762f 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -628,7 +628,7 @@ void LLStringUtilBase<T>::getTokens (std::basic_string<T> input, std::vector<std
 	}
 }
 
-extern LLFastTimer::DeclareTimer STRING_LOCALIZATION;
+extern LL_COMMON_API LLFastTimer::DeclareTimer STRING_LOCALIZATION;
 
 // static
 template<class T> 
diff --git a/indra/llxuixml/lluicolor.cpp b/indra/llxuixml/lluicolor.cpp
index ef0fa5d634..fe02907e14 100644
--- a/indra/llxuixml/lluicolor.cpp
+++ b/indra/llxuixml/lluicolor.cpp
@@ -7,6 +7,8 @@
  * $/LicenseInfo$
  */
 
+#include "linden_common.h"
+
 #include "lluicolor.h"
 
 LLUIColor::LLUIColor()
-- 
cgit v1.2.3


From 81d3f7ec6b348a08ad8c330d8d9ba90cd10ee816 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Mon, 31 Aug 2009 20:00:09 -0400
Subject: Post-merge cleanups (ported llstartup.cpp changes to where the
 surrounding code has been moved to in LLLoginInstance and LLAppViewer)

---
 indra/newview/llappviewer.cpp     | 72 ++++++++++++++++++++++++++++-----------
 indra/newview/lllogininstance.cpp |  7 ++--
 indra/newview/llstartup.cpp       |  1 -
 3 files changed, 58 insertions(+), 22 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index dd00001cd4..d67dd3adcb 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4186,7 +4186,14 @@ void LLAppViewer::launchUpdater()
 		delete LLAppViewer::sUpdaterInfo;
 	}
 	LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ;
-	
+
+	// if a sim name was passed in via command line parameter (typically through a SLURL)
+	if ( LLURLSimString::sInstance.mSimString.length() )
+	{
+		// record the location to start at next time
+		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
+	};
+
 #if LL_WINDOWS
 	LLAppViewer::sUpdaterInfo->mUpdateExePath = gDirUtilp->getTempFilename();
 	if (LLAppViewer::sUpdaterInfo->mUpdateExePath.empty())
@@ -4220,13 +4227,6 @@ void LLAppViewer::launchUpdater()
 		return;
 	}
 
-	// if a sim name was passed in via command line parameter (typically through a SLURL)
-	if ( LLURLSimString::sInstance.mSimString.length() )
-	{
-		// record the location to start at next time
-		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
-	};
-
 	LLAppViewer::sUpdaterInfo->mParams << "-url \"" << update_url.asString() << "\"";
 
 	LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << " " << LLAppViewer::sUpdaterInfo->mParams.str() << LL_ENDL;
@@ -4238,13 +4238,6 @@ void LLAppViewer::launchUpdater()
 	// see LLAppViewerWin32.cpp
 	
 #elif LL_DARWIN
-	// if a sim name was passed in via command line parameter (typically through a SLURL)
-	if ( LLURLSimString::sInstance.mSimString.length() )
-	{
-		// record the location to start at next time
-		gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); 
-	};
-	
 	LLAppViewer::sUpdaterInfo->mUpdateExePath = "'";
 	LLAppViewer::sUpdaterInfo->mUpdateExePath += gDirUtilp->getAppRODataDir();
 	LLAppViewer::sUpdaterInfo->mUpdateExePath += "/mac-updater.app/Contents/MacOS/mac-updater' -url \"";
@@ -4258,10 +4251,51 @@ void LLAppViewer::launchUpdater()
 	// Run the auto-updater.
 	system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
 
-#elif LL_LINUX || LL_SOLARIS
-	OSMessageBox("Automatic updating is not yet implemented for Linux.\n"
-		"Please download the latest version from www.secondlife.com.",
-		LLStringUtil::null, OSMB_OK);
+#elif (LL_LINUX || LL_SOLARIS) && LL_GTK
+	// we tell the updater where to find the xml containing string
+	// translations which it can use for its own UI
+	std::string xml_strings_file = "strings.xml";
+	std::vector<std::string> xui_path_vec = LLUI::getXUIPaths();
+	std::string xml_search_paths;
+	std::vector<std::string>::const_iterator iter;
+	// build comma-delimited list of xml paths to pass to updater
+	for (iter = xui_path_vec.begin(); iter != xui_path_vec.end(); )
+	{
+		std::string this_skin_dir = gDirUtilp->getDefaultSkinDir()
+			+ gDirUtilp->getDirDelimiter()
+			+ (*iter);
+		llinfos << "Got a XUI path: " << this_skin_dir << llendl;
+		xml_search_paths.append(this_skin_dir);
+		++iter;
+		if (iter != xui_path_vec.end())
+			xml_search_paths.append(","); // comma-delimit
+	}
+	// build the overall command-line to run the updater correctly
+	update_exe_path = 
+		gDirUtilp->getExecutableDir() + "/" + "linux-updater.bin" + 
+		" --url \"" + update_url.asString() + "\"" +
+		" --name \"" + LLAppViewer::instance()->getSecondLifeTitle() + "\"" +
+		" --dest \"" + gDirUtilp->getAppRODataDir() + "\"" +
+		" --stringsdir \"" + xml_search_paths + "\"" +
+		" --stringsfile \"" + xml_strings_file + "\"";
+
+	LL_INFOS("AppInit") << "Calling updater: " 
+			    << update_exe_path << LL_ENDL;
+
+	// *TODO: we could use the gdk equivilant to ensure the updater
+	// gets started on the same screen.
+	GError *error = NULL;
+	if (!g_spawn_command_line_async(update_exe_path.c_str(), &error))
+	{
+		llerrs << "Failed to launch updater: "
+		       << error->message
+		       << llendl;
+	}
+	if (error) {
+		g_error_free(error);
+	}
+#else
+	OSMessageBox(LLTrans::getString("MBNoAutoUpdate"), LLStringUtil::null, OSMB_OK);
 #endif
 
 	// *REMOVE:Mani - Saving for reference...
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index cb7dbc2de0..2f4d00786c 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -137,6 +137,7 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials)
 	requested_options.append("event_categories");
 	requested_options.append("event_notifications");
 	requested_options.append("classified_categories");
+	requested_options.append("adult_compliant"); 
 	//requested_options.append("inventory-targets");
 	requested_options.append("buddy-list");
 	requested_options.append("ui-config");
@@ -345,8 +346,10 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
 	
 #if LL_WINDOWS
 	notification_name += "Windows";
-#else
-	notification_name += "Mac";
+#elif LL_DARWIN
+	notification_name += "Mac";
+#else
+	notification_name += "Linux";
 #endif
 	
 	if (mandatory)
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 8859f1ffb5..6bd0f8d6fa 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1031,7 +1031,6 @@ bool idle_startup()
 		gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel();
 
 		// Update progress status and the display loop.
-		requested_options.push_back("adult_compliant"); 
 		auth_desc = LLTrans::getString("LoginInProgress");
 		set_startup_status(progress, auth_desc, auth_message);
 		progress += 0.02f;
-- 
cgit v1.2.3


From 04d2c459b9fe8859eaca0ebd5c3d44cd60dad334 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 1 Sep 2009 13:11:10 -0400
Subject: Fixup for closing paren dropped in the merge.

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

(limited to 'indra')

diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 8e84e54ccf..571b2fc3c6 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -223,6 +223,8 @@ IF (NOT LINUX AND VIEWER)
       # llhttpclientadapter.cpp
       lltrustedmessageservice.cpp
       lltemplatemessagedispatcher.cpp
+      )
+
 #    set(TEST_DEBUG on)
     set(test_libs
       ${LLMESSAGE_LIBRARIES}
-- 
cgit v1.2.3


From 5e4edfb83fbc2dd20415514efa33ba80c7fa1e94 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 1 Sep 2009 13:12:17 -0400
Subject: Fixups for eol-style copy pasta...

---
 indra/newview/llappviewer.cpp     | 82 +++++++++++++++++++--------------------
 indra/newview/lllogininstance.cpp |  6 +--
 2 files changed, 44 insertions(+), 44 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 0d4b7d027c..d3c5cfc390 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4251,47 +4251,47 @@ void LLAppViewer::launchUpdater()
 	// Run the auto-updater.
 	system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
 
-#elif (LL_LINUX || LL_SOLARIS) && LL_GTK
-	// we tell the updater where to find the xml containing string
-	// translations which it can use for its own UI
-	std::string xml_strings_file = "strings.xml";
-	std::vector<std::string> xui_path_vec = LLUI::getXUIPaths();
-	std::string xml_search_paths;
-	std::vector<std::string>::const_iterator iter;
-	// build comma-delimited list of xml paths to pass to updater
-	for (iter = xui_path_vec.begin(); iter != xui_path_vec.end(); )
-	{
-		std::string this_skin_dir = gDirUtilp->getDefaultSkinDir()
-			+ gDirUtilp->getDirDelimiter()
-			+ (*iter);
-		llinfos << "Got a XUI path: " << this_skin_dir << llendl;
-		xml_search_paths.append(this_skin_dir);
-		++iter;
-		if (iter != xui_path_vec.end())
-			xml_search_paths.append(","); // comma-delimit
-	}
-	// build the overall command-line to run the updater correctly
-	update_exe_path = 
-		gDirUtilp->getExecutableDir() + "/" + "linux-updater.bin" + 
-		" --url \"" + update_url.asString() + "\"" +
-		" --name \"" + LLAppViewer::instance()->getSecondLifeTitle() + "\"" +
-		" --dest \"" + gDirUtilp->getAppRODataDir() + "\"" +
-		" --stringsdir \"" + xml_search_paths + "\"" +
-		" --stringsfile \"" + xml_strings_file + "\"";
-
-	LL_INFOS("AppInit") << "Calling updater: " 
-			    << update_exe_path << LL_ENDL;
-
-	// *TODO: we could use the gdk equivilant to ensure the updater
-	// gets started on the same screen.
-	GError *error = NULL;
-	if (!g_spawn_command_line_async(update_exe_path.c_str(), &error))
-	{
-		llerrs << "Failed to launch updater: "
-		       << error->message
-		       << llendl;
-	}
-	if (error) {
+#elif (LL_LINUX || LL_SOLARIS) && LL_GTK
+	// we tell the updater where to find the xml containing string
+	// translations which it can use for its own UI
+	std::string xml_strings_file = "strings.xml";
+	std::vector<std::string> xui_path_vec = LLUI::getXUIPaths();
+	std::string xml_search_paths;
+	std::vector<std::string>::const_iterator iter;
+	// build comma-delimited list of xml paths to pass to updater
+	for (iter = xui_path_vec.begin(); iter != xui_path_vec.end(); )
+	{
+		std::string this_skin_dir = gDirUtilp->getDefaultSkinDir()
+			+ gDirUtilp->getDirDelimiter()
+			+ (*iter);
+		llinfos << "Got a XUI path: " << this_skin_dir << llendl;
+		xml_search_paths.append(this_skin_dir);
+		++iter;
+		if (iter != xui_path_vec.end())
+			xml_search_paths.append(","); // comma-delimit
+	}
+	// build the overall command-line to run the updater correctly
+	update_exe_path = 
+		gDirUtilp->getExecutableDir() + "/" + "linux-updater.bin" + 
+		" --url \"" + update_url.asString() + "\"" +
+		" --name \"" + LLAppViewer::instance()->getSecondLifeTitle() + "\"" +
+		" --dest \"" + gDirUtilp->getAppRODataDir() + "\"" +
+		" --stringsdir \"" + xml_search_paths + "\"" +
+		" --stringsfile \"" + xml_strings_file + "\"";
+
+	LL_INFOS("AppInit") << "Calling updater: " 
+			    << update_exe_path << LL_ENDL;
+
+	// *TODO: we could use the gdk equivilant to ensure the updater
+	// gets started on the same screen.
+	GError *error = NULL;
+	if (!g_spawn_command_line_async(update_exe_path.c_str(), &error))
+	{
+		llerrs << "Failed to launch updater: "
+		       << error->message
+		       << llendl;
+	}
+	if (error) {
 		g_error_free(error);
 	}
 #else
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 2f4d00786c..e56d28e066 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -346,9 +346,9 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
 	
 #if LL_WINDOWS
 	notification_name += "Windows";
-#elif LL_DARWIN
-	notification_name += "Mac";
-#else
+#elif LL_DARWIN
+	notification_name += "Mac";
+#else
 	notification_name += "Linux";
 #endif
 	
-- 
cgit v1.2.3


From 5da7db5571520a31684a9b093ae6b501fcc8a628 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 1 Sep 2009 16:01:55 -0400
Subject: RunBuildTest.cmake definitely needs the separate_arguments() command,
 else when you pass in a command string with command-line arguments,
 RunBuildTest.cmake attempts to search for a program whose filename is the
 entire command line. Uncommented separate_arguments(). Added
 SHARED_LIB_STAGING_DIR to LL_ADD_INTEGRATION_TEST LD_LIBRARY_PATH.

---
 indra/cmake/LLAddBuildTest.cmake | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index fac0c9d955..e6ef4f1f6b 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -210,9 +210,15 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
     LIST(INSERT test_command test_exe_pos "${TEST_EXE}")
   ENDIF (test_exe_pos LESS 0)
 
+  IF(WINDOWS)
+    set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+  ELSE(WINDOWS)
+    set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib)
+  ENDIF(WINDOWS)
+
   SET(TEST_SCRIPT_CMD 
     ${CMAKE_COMMAND} 
-    -DLD_LIBRARY_PATH=${ARCH_PREBUILT_DIRS}:/usr/lib
+    -DLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
     -DTEST_CMD:STRING="${test_command}" 
     -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
     )
-- 
cgit v1.2.3


From afea10ebc94b8009b96b0b1771e6c0f614f406dd Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 2 Sep 2009 17:38:46 -0400
Subject: On Mac, move SLPlugin executable to the same directory as the viewer
 executable. Change LLDir_Mac::getLLPluginLauncher() to look in the viewer's
 executable dir instead of in the plugins dir. Change viewer_manifest.py's
 DarwinManifest.construct() to put SLPlugin in the new location. SLPlugin is
 being linked with our new libllcommon.dylib, which self-identifies as being
 findable via @executable_path/../Resources/libllcommon.dylib. This doesn't
 work from the Resources/llplugin subdir -- the above relative path ends up
 looking in the nonexistent Resources/Resources subdirectory. Putting SLPlugin
 in the Contents/MacOS directory with the viewer executable solves the
 problem.

---
 indra/llvfs/lldir_mac.cpp        | 2 +-
 indra/newview/viewer_manifest.py | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp
index 9be787df11..3e296831ae 100644
--- a/indra/llvfs/lldir_mac.cpp
+++ b/indra/llvfs/lldir_mac.cpp
@@ -424,7 +424,7 @@ BOOL LLDir_Mac::fileExists(const std::string &filename) const
 
 /*virtual*/ std::string LLDir_Mac::getLLPluginLauncher()
 {
-	return gDirUtilp->getLLPluginDir() + gDirUtilp->getDirDelimiter() +
+	return gDirUtilp->getExecutableDir() + gDirUtilp->getDirDelimiter() +
 		"SLPlugin";
 }
 
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 1b9acc7ac2..a27c4a7fb7 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -427,6 +427,9 @@ class DarwinManifest(ViewerManifest):
 
             # copy additional libs in <bundle>/Contents/MacOS/
             self.path("../../libraries/universal-darwin/lib_release/libndofdev.dylib", dst="MacOS/libndofdev.dylib")
+            self.path(os.path.join(os.pardir, "llplugin", "slplugin", self.args['configuration'],
+                                   "SLPlugin"),
+                      os.path.join("MacOS", "SLPlugin"))
 
             # most everything goes in the Resources directory
             if self.prefix(src="", dst="Resources"):
@@ -507,7 +510,6 @@ class DarwinManifest(ViewerManifest):
 
                 # plugins
                 if self.prefix(src="", dst="llplugin"):
-                    self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin", "SLPlugin")
                     self.path("../media_plugins/quicktime/" + self.args['configuration'] + "/media_plugin_quicktime.dylib", "media_plugin_quicktime.dylib")
                     self.path("../media_plugins/webkit/" + self.args['configuration'] + "/media_plugin_webkit.dylib", "media_plugin_webkit.dylib")
                     self.path("../../libraries/universal-darwin/lib_release/libllqtwebkit.dylib", "libllqtwebkit.dylib")
-- 
cgit v1.2.3


From a1c69da32657ca94166519e1e522dd1d790bfa47 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 3 Sep 2009 16:50:44 -0400
Subject: QAR-1619: Fix Windows link errors when building
 INTEGRATION_TEST_lllazy. The problem arose because we were setting
 LL_COMMON_BUILD in llcommon/CMakeLists.txt, not only for the library build
 itself but also for its LL_ADD_INTEGRATION_TEST tests. This told all the
 headers compiled into the INTEGRATION_TEST_lllazy executable that the
 executable was providing all the llcommon symbols, rather than importing
 them. The solution is to switch to the llcommon_EXPORTS symbol automagically
 defined by CMake when building the llcommon shared library itself.

---
 indra/llcommon/CMakeLists.txt   |  2 --
 indra/llcommon/llpreprocessor.h | 11 ++++++++---
 2 files changed, 8 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 147b361ad8..baf374ee38 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -242,7 +242,6 @@ list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
 
 if(LLCOMMON_LINK_SHARED)
     add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
-    add_definitions(-DLL_COMMON_BUILD=1)
 
     if(SHARED_LIB_STAGING_DIR)
         # *FIX:Mani ---
@@ -290,7 +289,6 @@ target_link_libraries(
 
 add_dependencies(llcommon stage_third_party_libs)
 
-
 include(LLAddBuildTest)
 SET(llcommon_TEST_SOURCE_FILES
   )
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index f135beed6a..f853e31002 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -149,11 +149,16 @@
 #endif // LL_WINDOWS
 
 #if LL_COMMON_LINK_SHARED
-# if LL_COMMON_BUILD
+// CMake automagically defines llcommon_EXPORTS only when building llcommon
+// sources, and only when llcommon is a shared library (i.e. when
+// LL_COMMON_LINK_SHARED). We must still test LL_COMMON_LINK_SHARED because
+// otherwise we can't distinguish between (non-llcommon source) and (llcommon
+// not shared).
+# if defined(llcommon_EXPORTS)
 #   define LL_COMMON_API LL_DLLEXPORT
-# else //LL_COMMON_BUILD
+# else //llcommon_EXPORTS
 #   define LL_COMMON_API LL_DLLIMPORT
-# endif //LL_COMMON_BUILD
+# endif //llcommon_EXPORTS
 #else // LL_COMMON_LINK_SHARED
 # define LL_COMMON_API
 #endif // LL_COMMON_LINK_SHARED
-- 
cgit v1.2.3


From e59ac9197c22456542a6a9c0d5ef24c4d11ff6f7 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 3 Sep 2009 18:26:51 -0400
Subject: fix for build_win32_appConfig.py failing to find
 Microsoft.VC80.CRT.manifest on clean builds. the "Copying staged dlls"
 pre-build step for newview got moved to be a pre-build step for
 create_app_config_file and create_app_config_file now depends on
 stage_third_party_libs.

reviewed by Nat.
---
 indra/newview/CMakeLists.txt | 37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index be75d8fe5f..3239fbf84e 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1342,11 +1342,29 @@ if (WINDOWS)
         )
        
     if(WINDOWS)
+      add_custom_command(
+        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
+        COMMAND ${PYTHON_EXECUTABLE}
+        ARGS
+          ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
+          ${CMAKE_CFG_INTDIR}
+          ${CMAKE_CURRENT_SOURCE_DIR}
+          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+          ${VIEWER_BINARY_NAME}.exe.config
+        COMMENT "Creating app.config file"
+        )
+
+      add_custom_target(create_app_config_file ALL 
+        DEPENDS
+          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
+          stage_third_party_libs
+        )
+
       # Copy Win Libs...
       # This happens at build time, not config time. We can't glob files in this cmake.
       # *FIX:Mani Write a sub script to glob the files...
       add_custom_command(
-        TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
+        TARGET create_app_config_file PRE_BUILD
         COMMAND ${CMAKE_COMMAND}
         ARGS
           -E
@@ -1356,23 +1374,6 @@ if (WINDOWS)
         COMMENT "Copying staged dlls."
         )
 
-      add_custom_command(
-	OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
-        COMMAND ${PYTHON_EXECUTABLE}
-        ARGS
-          ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
-          ${CMAKE_CFG_INTDIR}
-          ${CMAKE_CURRENT_SOURCE_DIR}
-	  ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
-	  ${VIEWER_BINARY_NAME}.exe.config
-        COMMENT "Creating app.config file"
-        )
-
-      add_custom_target(create_app_config_file ALL 
-	DEPENDS
-	  ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
-	)
-
       add_dependencies(${VIEWER_BINARY_NAME} create_app_config_file)
       
     endif(WINDOWS)    
-- 
cgit v1.2.3


From afe09c1385b55bdf2d8d245ea7c8c73b3fa87e28 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 4 Sep 2009 11:30:19 -0400
Subject: QAR-1619: Replace RunBuildTest.cmake with run_build_test.py for LSL
 tests. RunBuildTest.cmake can't handle pathnames containing spaces.
 run_build_test.py accepts an arbitrary number of individually-quoted
 command-line arguments, passing each through to Python's subprocess.call().

---
 indra/cmake/run_build_test.py | 97 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
 create mode 100644 indra/cmake/run_build_test.py

(limited to 'indra')

diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py
new file mode 100644
index 0000000000..1882b644a0
--- /dev/null
+++ b/indra/cmake/run_build_test.py
@@ -0,0 +1,97 @@
+#!/usr/bin/python
+"""\
+@file   run_build_test.py
+@author Nat Goodspeed
+@date   2009-09-03
+@brief  Helper script to allow CMake to run some command after setting
+        environment variables.
+
+CMake has commands to run an external program. But remember that each CMake
+command must be backed by multiple build-system implementations. Unfortunately
+it seems CMake can't promise that every target build system can set specified
+environment variables before running the external program of interest.
+
+This helper script is a workaround. It simply sets the requested environment
+variables and then executes the program specified on the rest of its command
+line.
+
+Example:
+
+python run_build_test.py -DFOO=bar myprog somearg otherarg
+
+sets environment variable FOO=bar, then runs:
+myprog somearg otherarg
+
+$LicenseInfo:firstyear=2009&license=internal$
+Copyright (c) 2009, Linden Research, Inc.
+$/LicenseInfo$
+"""
+
+import os
+import sys
+import subprocess
+
+def main(command, libpath=[], vars={}):
+    """Pass:
+    command is a sequence (e.g. a list) of strings. The first item in the list
+    must be the command name, the rest are its arguments.
+
+    libpath is a sequence of directory pathnames. These will be appended to
+    the platform-specific dynamic library search path environment variable.
+
+    vars is a dict of arbitrary (var, value) pairs to be added to the
+    environment before running 'command'.
+
+    This function runs the specified command, waits for it to terminate and
+    returns its return code. This will be negative if the command terminated
+    with a signal, else it will be the process's specified exit code.
+    """
+    # Handle platform-dependent libpath first.
+    if sys.platform == "win32":
+        lpvars = ["PATH"]
+    elif sys.platform == "darwin":
+        lpvars = ["LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH"]
+    elif sys.platform.startswith("linux"):
+        lpvars = ["LD_LIBRARY_PATH"]
+    else:
+        # No idea what the right pathname might be! But only crump if this
+        # feature is requested.
+        if libpath:
+            raise NotImplemented("run_build_test: unknown platform %s" % sys.platform)
+        lpvars = []
+    for var in lpvars:
+        # Split the existing path
+        dirs = os.environ[var].split(os.pathsep)
+        # Append the sequence in libpath
+        dirs.extend(libpath)
+        # Now rebuild the path string. This way we use a minimum of separators
+        # -- and we avoid adding a pointless separator when libpath is empty.
+        os.environ[var] = os.pathsep.join(dirs)
+    # Now handle arbitrary environment variables. The tricky part is ensuring
+    # that all the keys and values we try to pass are actually strings.
+    os.environ.update(dict([(str(key), str(value)) for key, value in vars.iteritems()]))
+    # Run the child process.
+    return subprocess.call(command)
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+    parser = OptionParser(usage="usage: %prog [options] command args...")
+    parser.add_option("-D", "--define", dest="vars", default=[], action="append",
+                      metavar="VAR=value",
+                      help="Add VAR=value to the env variables defined")
+    parser.add_option("-l", "--libpath", dest="libpath", default=[], action="append",
+                      metavar="DIR",
+                      help="Add DIR to the platform-dependent DLL search path")
+    opts, args = parser.parse_args()
+    # What we have in opts.vars is a list of strings of the form "VAR=value"
+    # or possibly just "VAR". What we want is a dict. We can build that dict by
+    # constructing a list of ["VAR", "value"] pairs -- so split each
+    # "VAR=value" string on the '=' sign (but only once, in case we have
+    # "VAR=some=user=string"). To handle the case of just "VAR", append "" to
+    # the list returned by split(), then slice off anything after the pair we
+    # want.
+    rc = main(command=args, libpath=opts.libpath,
+              vars=dict([(pair.split('=', 1) + [""])[:2] for pair in opts.vars]))
+    print >>sys.stderr, "Failure running: %s" % " ".join(args)
+    print >>sys.stderr, "Error: %s" % rc
+    sys.exit((rc < 0) and 255 or rc)
-- 
cgit v1.2.3


From 369f5ba524e7ad7760b2e367ad336d09d129733e Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 4 Sep 2009 14:37:55 -0400
Subject: Fix for link errors referencing operator!=(LLURI const &, LLURI const
 &) from integration tests.

---
 indra/llcommon/lluri.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llcommon/lluri.h b/indra/llcommon/lluri.h
index eb5c5203eb..8e69e8558a 100644
--- a/indra/llcommon/lluri.h
+++ b/indra/llcommon/lluri.h
@@ -178,6 +178,6 @@ private:
 };
 
 // this operator required for tut
-bool operator!=(const LLURI& first, const LLURI& second);
+LL_COMMON_API bool operator!=(const LLURI& first, const LLURI& second);
 
 #endif // LL_LLURI_H
-- 
cgit v1.2.3


From 2ecd2689808ca0de4eb80d2e1459bf09d2499ea7 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 4 Sep 2009 19:53:51 -0400
Subject: Fix for SLPlugin.exe packaging failure. Still needs some cleanup
 though. qtwebkit4.dll etc aren't being staged to the sharedlibs dir like
 everything else.

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

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 3239fbf84e..cae6a79ec8 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1621,6 +1621,16 @@ LL_ADD_INTEGRATION_TEST(llcapabilitylistener
 
 # 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
-- 
cgit v1.2.3


From b9546a33e90df60e2d47735b4627de4eb97ba6b9 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 8 Sep 2009 12:03:32 -0400
Subject: QAR-1619: Finish replacing RunBuildTest.cmake with run_build_test.py.
 Because the details of RunBuildTest.cmake versus run_build_test.py had to be
 changed in so many different places, introduce LL_TEST_COMMAND CMake macro
 (in LLTestCommand.cmake) to encapsulate construction of the actual command
 line. Use LL_TEST_COMMAND in LL_ADD_PROJECT_UNIT_TESTS,
 LL_ADD_INTEGRATION_TEST, the big indra/test monolith and the various
 LslCompilerMacros. Fix run_build_test.py to pass through the test
 executable's own options (e.g. --touch, --output) without inspection. Defend
 it against the case when the platform-specific library path environment
 variable doesn't yet exist. Make it report errors only on nonzero
 test-program rc. Remove RunBuildTest.cmake.

---
 indra/cmake/CMakeLists.txt       |  2 +-
 indra/cmake/LLAddBuildTest.cmake | 16 +++++-----------
 indra/cmake/LLTestCommand.cmake  | 13 +++++++++++++
 indra/cmake/run_build_test.py    | 22 ++++++++++++++++++----
 indra/test/CMakeLists.txt        | 11 +++--------
 5 files changed, 40 insertions(+), 24 deletions(-)
 create mode 100644 indra/cmake/LLTestCommand.cmake

(limited to 'indra')

diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 3ce393b659..4563b59ad2 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -53,6 +53,7 @@ set(cmake_SOURCE_FILES
     LLPrimitive.cmake
     LLRender.cmake
     LLScene.cmake
+    LLTestCommand.cmake
     LLUI.cmake
     LLVFS.cmake
     LLWindow.cmake
@@ -69,7 +70,6 @@ set(cmake_SOURCE_FILES
     PNG.cmake
     Python.cmake
     Prebuilt.cmake
-    RunBuildTest.cmake
     TemplateCheck.cmake
     Tut.cmake
     UI.cmake
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index e6ef4f1f6b..8cd5796849 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -1,4 +1,5 @@
 # -*- cmake -*-
+include(LLTestCommand)
 
 MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
   # Given a project name and a list of sourcefiles (with optional properties on each),
@@ -126,17 +127,14 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
       set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib)
     ENDIF(WINDOWS)
 
+    LL_TEST_COMMAND("${LD_LIBRARY_PATH}" ${TEST_CMD})
+    SET(TEST_SCRIPT_CMD ${LL_TEST_COMMAND_value})
     IF(LL_TEST_VERBOSE)
       MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_script  = ${TEST_SCRIPT_CMD}")
     ENDIF(LL_TEST_VERBOSE)
     # Add test 
     ADD_CUSTOM_COMMAND(
         OUTPUT ${TEST_OUTPUT}
-		COMMAND ${CMAKE_COMMAND} 
-		ARGS
-		  -DLD_LIBRARY_PATH=${LD_LIBRARY_PATH}
-		  "-DTEST_CMD:STRING=\"${TEST_CMD}\""
-		  -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
         COMMAND ${TEST_SCRIPT_CMD}
         DEPENDS PROJECT_${project}_TEST_${name}
         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
@@ -216,12 +214,8 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
     set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib)
   ENDIF(WINDOWS)
 
-  SET(TEST_SCRIPT_CMD 
-    ${CMAKE_COMMAND} 
-    -DLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
-    -DTEST_CMD:STRING="${test_command}" 
-    -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
-    )
+  LL_TEST_COMMAND("${LD_LIBRARY_PATH}" ${test_command})
+  SET(TEST_SCRIPT_CMD ${LL_TEST_COMMAND_value})
 
   if(TEST_DEBUG)
     message(STATUS "TEST_SCRIPT_CMD: ${TEST_SCRIPT_CMD}")
diff --git a/indra/cmake/LLTestCommand.cmake b/indra/cmake/LLTestCommand.cmake
new file mode 100644
index 0000000000..fae5640493
--- /dev/null
+++ b/indra/cmake/LLTestCommand.cmake
@@ -0,0 +1,13 @@
+MACRO(LL_TEST_COMMAND LD_LIBRARY_PATH)
+  # nat wonders how Kitware can use the term 'function' for a construct that
+  # cannot return a value. And yet, variables you set inside a FUNCTION are
+  # local. Try a MACRO instead.
+  SET(LL_TEST_COMMAND_value
+    ${PYTHON_EXECUTABLE}
+    "${CMAKE_SOURCE_DIR}/cmake/run_build_test.py")
+  IF(LD_LIBRARY_PATH)
+    LIST(APPEND LL_TEST_COMMAND_value "-l${LD_LIBRARY_PATH}")
+  ENDIF(LD_LIBRARY_PATH)
+  LIST(APPEND LL_TEST_COMMAND_value ${ARGN})
+##MESSAGE(STATUS "Will run: ${LL_TEST_COMMAND_value}")
+ENDMACRO(LL_TEST_COMMAND)
diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py
index 1882b644a0..17bce6f434 100644
--- a/indra/cmake/run_build_test.py
+++ b/indra/cmake/run_build_test.py
@@ -60,22 +60,35 @@ def main(command, libpath=[], vars={}):
             raise NotImplemented("run_build_test: unknown platform %s" % sys.platform)
         lpvars = []
     for var in lpvars:
-        # Split the existing path
-        dirs = os.environ[var].split(os.pathsep)
+        # Split the existing path. Bear in mind that the variable in question
+        # might not exist; instead of KeyError, just use an empty string.
+        dirs = os.environ.get(var, "").split(os.pathsep)
         # Append the sequence in libpath
+##         print "%s += %r" % (var, libpath)
         dirs.extend(libpath)
         # Now rebuild the path string. This way we use a minimum of separators
         # -- and we avoid adding a pointless separator when libpath is empty.
         os.environ[var] = os.pathsep.join(dirs)
     # Now handle arbitrary environment variables. The tricky part is ensuring
     # that all the keys and values we try to pass are actually strings.
+##     if vars:
+##         print "Setting:"
+##         for key, value in vars.iteritems():
+##             print "%s=%s" % (key, value)
     os.environ.update(dict([(str(key), str(value)) for key, value in vars.iteritems()]))
     # Run the child process.
+##     print "Running: %s" % " ".join(command)
     return subprocess.call(command)
 
 if __name__ == "__main__":
     from optparse import OptionParser
     parser = OptionParser(usage="usage: %prog [options] command args...")
+    # We want optparse support for the options we ourselves handle -- but we
+    # DO NOT want it looking at options for the executable we intend to run,
+    # rejecting them as invalid because we don't define them. So configure the
+    # parser to stop looking for options as soon as it sees the first
+    # positional argument (traditional Unix syntax).
+    parser.disable_interspersed_args()
     parser.add_option("-D", "--define", dest="vars", default=[], action="append",
                       metavar="VAR=value",
                       help="Add VAR=value to the env variables defined")
@@ -92,6 +105,7 @@ if __name__ == "__main__":
     # want.
     rc = main(command=args, libpath=opts.libpath,
               vars=dict([(pair.split('=', 1) + [""])[:2] for pair in opts.vars]))
-    print >>sys.stderr, "Failure running: %s" % " ".join(args)
-    print >>sys.stderr, "Error: %s" % rc
+    if rc not in (None, 0):
+        print >>sys.stderr, "Failure running: %s" % " ".join(args)
+        print >>sys.stderr, "Error: %s" % rc
     sys.exit((rc < 0) and 255 or rc)
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index d8c3d45c5f..3e42f6929b 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -153,16 +153,11 @@ ELSE(WINDOWS)
   set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib)
 ENDIF(WINDOWS)
 
-SET(TEST_CMD ${TEST_EXE} --output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt --touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt)
-
+LL_TEST_COMMAND("${LD_LIBRARY_PATH}"
+  "${TEST_EXE}" "--output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt" "--touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt")
 ADD_CUSTOM_COMMAND(
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt
-  COMMAND ${CMAKE_COMMAND}
-  ARGS
-    -DLD_LIBRARY_PATH=${LD_LIBRARY_PATH}
-    "-DTEST_CMD:STRING=\"${TEST_CMD}\"" 
-    -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
-      
+  COMMAND ${LL_TEST_COMMAND_value}
   DEPENDS test
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   COMMENT "C++ unit tests"
-- 
cgit v1.2.3


From 5669597e1803f24ee2ea452a792ecf35deffaee8 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 8 Sep 2009 16:21:03 -0700
Subject: QAR-1619: reconcile Linux-specific logic in
 LLAppViewer::launchUpdater() with Windows and Mac

---
 indra/newview/llappviewer.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index d3c5cfc390..93c203cecd 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4271,7 +4271,7 @@ void LLAppViewer::launchUpdater()
 			xml_search_paths.append(","); // comma-delimit
 	}
 	// build the overall command-line to run the updater correctly
-	update_exe_path = 
+	LLAppViewer::sUpdaterInfo->mUpdateExePath = 
 		gDirUtilp->getExecutableDir() + "/" + "linux-updater.bin" + 
 		" --url \"" + update_url.asString() + "\"" +
 		" --name \"" + LLAppViewer::instance()->getSecondLifeTitle() + "\"" +
@@ -4280,12 +4280,12 @@ void LLAppViewer::launchUpdater()
 		" --stringsfile \"" + xml_strings_file + "\"";
 
 	LL_INFOS("AppInit") << "Calling updater: " 
-			    << update_exe_path << LL_ENDL;
+			    << LLAppViewer::sUpdaterInfo->mUpdateExePath << LL_ENDL;
 
-	// *TODO: we could use the gdk equivilant to ensure the updater
+	// *TODO: we could use the gdk equivalent to ensure the updater
 	// gets started on the same screen.
 	GError *error = NULL;
-	if (!g_spawn_command_line_async(update_exe_path.c_str(), &error))
+	if (!g_spawn_command_line_async(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), &error))
 	{
 		llerrs << "Failed to launch updater: "
 		       << error->message
-- 
cgit v1.2.3


From 2a446ab558f039db4a863f3d287f2ec2369ec8c3 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 10 Sep 2009 13:56:38 -0700
Subject: QAR-1619: move Linux SLPlugin executable to the viewer executable
 directory

---
 indra/llvfs/lldir_linux.cpp      | 2 +-
 indra/newview/viewer_manifest.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp
index 24efcb8ae8..7a531e0fbf 100644
--- a/indra/llvfs/lldir_linux.cpp
+++ b/indra/llvfs/lldir_linux.cpp
@@ -383,7 +383,7 @@ BOOL LLDir_Linux::fileExists(const std::string &filename) const
 
 /*virtual*/ std::string LLDir_Linux::getLLPluginLauncher()
 {
-	return gDirUtilp->getLLPluginDir() + gDirUtilp->getDirDelimiter() +
+	return gDirUtilp->getExecutableDir() + gDirUtilp->getDirDelimiter() +
 		"SLPlugin";
 }
 
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index a27c4a7fb7..91c091283a 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -702,6 +702,7 @@ class Linux_i686Manifest(LinuxManifest):
         self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
         self.path("../linux_crash_logger/linux-crash-logger-stripped","bin/linux-crash-logger.bin")
         self.path("../linux_updater/linux-updater-stripped", "bin/linux-updater.bin")
+        self.path("../llplugin/slplugin/SLPlugin", "bin/SLPlugin")
         if self.prefix("res-sdl"):
             self.path("*")
             # recurse
@@ -709,7 +710,6 @@ class Linux_i686Manifest(LinuxManifest):
 
         # plugins
         if self.prefix(src="", dst="bin/llplugin"):
-            self.path("../llplugin/slplugin/SLPlugin", "SLPlugin")
             self.path("../media_plugins/webkit/libmedia_plugin_webkit.so", "libmedia_plugin_webkit.so")
             self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_quicktime.so")
             self.end_prefix("bin/llplugin")
-- 
cgit v1.2.3


From 08f3ea28f5681bbbd755947ec09970c11410bd0a Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 11 Sep 2009 22:12:34 -0400
Subject: QAR-1619: Remove unneeded llfloatertos.h #includes. Neither
 lllogininstance.cpp nor lllogininstance_test.cpp need llfloatertos.h any
 more, since LLLoginInstance talks to LLFloaterTOS only via LLFloaterReg and
 LLEventPumps. However, both sources depended on llfloatertos.h dragging in
 llnotifications.h, so include that explicitly instead of llfloatertos.h.

---
 indra/newview/lllogininstance.cpp            | 2 +-
 indra/newview/tests/lllogininstance_test.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index e56d28e066..8bf769a132 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -50,7 +50,7 @@
 #include "llviewercontrol.h"
 #include "llurlsimstring.h"
 #include "llfloaterreg.h"
-#include "llfloatertos.h"
+#include "llnotifications.h"
 #include "llwindow.h"
 #if LL_LINUX || LL_SOLARIS
 #include "lltrans.h"
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index a84e796159..75db76df27 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -91,7 +91,7 @@ LLURLSimString LLURLSimString::sInstance;
 bool LLURLSimString::parse() { return true; }
 
 //-----------------------------------------------------------------------------
-#include "../llfloatertos.h"
+#include "llnotifications.h"
 #include "llfloaterreg.h"
 static std::string gTOSType;
 static LLEventPump * gTOSReplyPump = NULL;
-- 
cgit v1.2.3


From 8e0128c493bce16555b3a9132bd71b670c322d63 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 11 Sep 2009 22:14:57 -0400
Subject: QAR-1619: Reconcile LLFloaterTOS::onCancel() with viewer-2 version.
 The viewer-2 onCancel() pops up a "MustAgreeToLogIn" notification. Make ours
 do the same.

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

(limited to 'indra')

diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index d8aea2770f..8d2d48f1af 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -48,6 +48,7 @@
 #include "lluictrlfactory.h"
 #include "llvfile.h"
 #include "message.h"
+#include "llstartup.h"              // login_alert_done
 
 
 LLFloaterTOS::LLFloaterTOS(const LLSD& data)
@@ -206,6 +207,7 @@ void LLFloaterTOS::onCancel( void* userdata )
 {
 	LLFloaterTOS* self = (LLFloaterTOS*) userdata;
 	llinfos << "User disagrees with TOS." << llendl;
+	LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done);
 
 	if(self->mReplyPumpName != "")
 	{
-- 
cgit v1.2.3


From d40d745cba1de0df4ada7d4d2cf9f1632279ae12 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 11 Sep 2009 22:24:30 -0400
Subject: DEV-38598, QAR-1619: Ensure we remove LLFloaterTOS from LLFloaterReg
 registry. LLFloater's destructor calls LLFloaterReg::removeInstance() with
 its own name and key. But for the new LLFloaterTOS invocation, we pass a key
 that's an LLSD map. removeInstance() critically depends on
 LLFloater::KeyCompare::equate() -- but equate() never considered a non-scalar
 LLSD key value. Fortunately llsdutil.h already provides a deep-equality
 function for LLSD: llsd_equals(). Making equate() trivially call
 llsd_equals() fixes the crash on TOS cancel.

---
 indra/llui/llfloater.cpp | 25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index ca3829e1bd..786340b468 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -60,6 +60,7 @@
 #include "v2math.h"
 #include "lltrans.h"
 #include "llmultifloater.h"
+#include "llsdutil.h"
 
 // use this to control "jumping" behavior when Ctrl-Tabbing
 const S32 TABBED_FLOATER_OFFSET = 0;
@@ -175,29 +176,7 @@ bool LLFloater::KeyCompare::compare(const LLSD& a, const LLSD& b)
 
 bool LLFloater::KeyCompare::equate(const LLSD& a, const LLSD& b)
 {
-	if (a.type() != b.type())
-	{
-		//llerrs << "Mismatched LLSD types: (" << a << ") mismatches (" << b << ")" << llendl;
-		return false;
-	}
-	else if (a.isUndefined())
-		return true;
-	else if (a.isInteger())
-		return a.asInteger() == b.asInteger();
-	else if (a.isReal())
-		return a.asReal() == b.asReal();
-	else if (a.isString())
-		return a.asString() == b.asString();
-	else if (a.isUUID())
-		return a.asUUID() == b.asUUID();
-	else if (a.isDate())
-		return a.asDate() == b.asDate();
-	else if (a.isURI())
-		return a.asString() == b.asString(); // compare URIs as strings
-	else if (a.isBoolean())
-		return a.asBoolean() == b.asBoolean();
-	else
-		return false; // no valid operation for Binary
+	return llsd_equals(a, b);
 }
 
 //************************************
-- 
cgit v1.2.3


From 689af4b32948e2d2a07b60adcc318668c4d55585 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Sat, 12 Sep 2009 09:11:32 -0400
Subject: DEV-38598: remove dangerous compare-LLSD-less-than operation

---
 indra/llui/llfloater.cpp | 11 +++++++++++
 indra/llui/llfloater.h   |  4 +++-
 2 files changed, 14 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 786340b468..a372bac497 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -146,6 +146,16 @@ LLFloater::handle_map_t	LLFloater::sFloaterMap;
 
 LLFloaterView* gFloaterView = NULL;
 
+/*==========================================================================*|
+// DEV-38598: The fundamental problem with this operation is that it can only
+// support a subset of LLSD values. While it's plausible to compare two arrays
+// lexicographically, what strict ordering can you impose on maps?
+// (LLFloaterTOS's current key is an LLSD map.)
+
+// Of course something like this is necessary if you want to build a std::set
+// or std::map with LLSD keys. Fortunately we're getting by with other
+// container types for now.
+
 //static
 bool LLFloater::KeyCompare::compare(const LLSD& a, const LLSD& b)
 {
@@ -173,6 +183,7 @@ bool LLFloater::KeyCompare::compare(const LLSD& a, const LLSD& b)
 	else
 		return false; // no valid operation for Binary
 }
+|*==========================================================================*/
 
 bool LLFloater::KeyCompare::equate(const LLSD& a, const LLSD& b)
 {
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index ee066317e0..cace13939f 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -87,12 +87,14 @@ friend class LLMultiFloater;
 public:
 	struct KeyCompare
 	{
-		static bool compare(const LLSD& a, const LLSD& b);
+//		static bool compare(const LLSD& a, const LLSD& b);
 		static bool equate(const LLSD& a, const LLSD& b);
+/*==========================================================================*|
 		bool operator()(const LLSD& a, const LLSD& b) const
 		{
 			return compare(a, b);
 		}
+|*==========================================================================*/
 	};
 	
 	enum EFloaterButtons
-- 
cgit v1.2.3


From 7dca49b0f238063b7396ead5dbd8206669a5934f Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 14 Sep 2009 09:16:19 -0400
Subject: QAR-1619: At Sam's request, move SLPlugin to viewer executable dir,
 consistent with Mac and Linux.

---
 indra/llvfs/lldir_win32.cpp      |  2 +-
 indra/newview/viewer_manifest.py | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp
index 872f2cf1c1..3e302764de 100644
--- a/indra/llvfs/lldir_win32.cpp
+++ b/indra/llvfs/lldir_win32.cpp
@@ -397,7 +397,7 @@ BOOL LLDir_Win32::fileExists(const std::string &filename) const
 
 /*virtual*/ std::string LLDir_Win32::getLLPluginLauncher()
 {
-	return gDirUtilp->getLLPluginDir() + gDirUtilp->getDirDelimiter() +
+	return gDirUtilp->getExecutableDir() + gDirUtilp->getDirDelimiter() +
 		"SLPlugin.exe";
 }
 
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index bb48e8e572..109c437730 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -169,6 +169,11 @@ class WindowsManifest(ViewerManifest):
         # 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,
+                               'llplugin', 'slplugin', self.args['configuration'], "slplugin.exe"),
+                  "slplugin.exe")
+
         # need to get the llcommon.dll from the build directory as well
         if self.prefix(src=self.args['configuration'], dst=""):
             try:
@@ -206,11 +211,6 @@ class WindowsManifest(ViewerManifest):
                 self.path("openjpeg.dll")
             self.end_prefix()
 
-        # Plugin host application
-        if self.prefix(src='../llplugin/slplugin/%s' % self.args['configuration'], dst="llplugin"):
-            self.path("slplugin.exe")
-            self.end_prefix()
-
         # Media plugins - QuickTime
         if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"):
             self.path("media_plugin_quicktime.dll")
-- 
cgit v1.2.3


From a81a89b5c73f1b2ecc9ad7a0b4845cc9d1876661 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 14 Sep 2009 13:39:23 -0400
Subject: QAR-1619: reconcile redundant SLPlugin.exe copy_if_different with
 viewer_manifest.py

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

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index cae6a79ec8..3f8b8688d2 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1639,7 +1639,7 @@ if (WINDOWS)
         -E
         copy_if_different
         ${BUILT_SLPLUGIN}
-        ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin
+        ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
       COMMENT "Copying SLPlugin executable to the runtime folder."
       )
 
-- 
cgit v1.2.3


From 9a13b059dc6f4ddc302954d735202dfee3992c2d Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 14 Sep 2009 16:48:31 -0400
Subject: DEV-38598: More closely align new login-failure control flow with
 viewer-2. In the viewer-2 code base, the "tos" case is detected inline, a
 sibling of the other types of login failure, and doesn't reach the
 notification. Our new logic needs to detect "tos" as well. Also, the case of
 process_login_success_response() returning false was inconsistent, attempting
 a notification with an empty string.

---
 indra/newview/llstartup.cpp | 68 +++++++++++++++++++++++++++++++--------------
 1 file changed, 47 insertions(+), 21 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 5576d446fa..477149194b 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -256,6 +256,7 @@ void release_start_screen();
 void reset_login();
 void apply_udp_blacklist(const std::string& csv);
 bool process_login_success_response();
+void transition_back_to_login_panel(const std::string& emsg);
 
 void callback_cache_name(const LLUUID& id, const std::string& firstname, const std::string& lastname, BOOL is_group)
 {
@@ -884,6 +885,18 @@ bool idle_startup()
 
 	if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState())
 	{
+		// Move the progress view in front of the UI immediately when login is performed
+		// this allows not to see main menu after Alt+Tab was pressed while login. EXT-744.
+		gViewerWindow->moveProgressViewToFront();
+
+		//reset the values that could have come in from a slurl
+		if (!gLoginHandler.getWebLoginKey().isNull())
+		{
+			gFirstname = gLoginHandler.getFirstName();
+			gLastname = gLoginHandler.getLastName();
+//			gWebLoginKey = gLoginHandler.getWebLoginKey();
+		}
+				
 		if (show_connect_box)
 		{
 			// TODO if not use viewer auth
@@ -1065,13 +1078,14 @@ bool idle_startup()
 
 	if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState()) 
 	{
-		bool transitionBackToLoginPanel = false;
 		std::ostringstream emsg;
+		emsg << "Login failed.\n";
 		if(LLLoginInstance::getInstance()->authFailure())
 		{
+			LL_INFOS("LLStartup") << "Login failed, LLLoginInstance::getResponse(): "
+			                      << LLLoginInstance::getInstance()->getResponse() << LL_ENDL;
 			// Still have error conditions that may need some 
 			// sort of handling.
-			emsg << "Login failed.\n";
 			std::string reason_response = LLLoginInstance::getInstance()->getResponse("reason");
 			std::string message_response = LLLoginInstance::getInstance()->getResponse("message");
 	
@@ -1109,10 +1123,20 @@ bool idle_startup()
 			}
 			else
 			{
-				transitionBackToLoginPanel = true;
+				// Don't pop up a notification in the TOS case because
+				// LLFloaterTOS::onCancel() already scolded the user.
+				if (reason_response != "tos")
+				{
+					LLSD args;
+					args["ERROR_MESSAGE"] = emsg.str();
+					LL_INFOS("LLStartup") << "Notification: " << args << LL_ENDL;
+					LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
+				}
 
 				//setup map of datetime strings to codes and slt & local time offset from utc
 				LLStringOps::setupDatetimeInfo (gPacificDaylightTime);
+				transition_back_to_login_panel(emsg.str());
+				show_connect_box = true;
 			}
 		}
 		else if(LLLoginInstance::getInstance()->authSuccess())
@@ -1125,7 +1149,12 @@ bool idle_startup()
 			}
 			else
 			{
-				transitionBackToLoginPanel = false;
+				LLSD args;
+				args["ERROR_MESSAGE"] = emsg.str();
+				LL_INFOS("LLStartup") << "Notification: " << args << LL_ENDL;
+				LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
+				transition_back_to_login_panel(emsg.str());
+				show_connect_box = true;
 			}
 		}
 		else
@@ -1138,23 +1167,6 @@ bool idle_startup()
 			set_startup_status(progress, auth_desc, auth_message);
 		}
 
-		if(transitionBackToLoginPanel)
-		{
-			if (gNoRender)
-			{
-				LL_WARNS("AppInit") << "Failed to login!" << LL_ENDL;
-				LL_WARNS("AppInit") << emsg << LL_ENDL;
-				exit(0);
-			}
-
-			// Bounce back to the login screen.
-			LLSD args;
-			args["ERROR_MESSAGE"] = emsg.str();
-			LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
-			reset_login(); // calls LLStartUp::setStartupState( STATE_LOGIN_SHOW );
-			gSavedSettings.setBOOL("AutoLogin", FALSE);
-			show_connect_box = true;
-		}
 		return FALSE;
 	}
 
@@ -3080,3 +3092,17 @@ bool process_login_success_response()
 
 	return success;
 }
+
+void transition_back_to_login_panel(const std::string& emsg)
+{
+	if (gNoRender)
+	{
+		LL_WARNS("AppInit") << "Failed to login!" << LL_ENDL;
+		LL_WARNS("AppInit") << emsg << LL_ENDL;
+		exit(0);
+	}
+
+	// Bounce back to the login screen.
+	reset_login(); // calls LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+	gSavedSettings.setBOOL("AutoLogin", FALSE);
+}
-- 
cgit v1.2.3


From 93869a8ef23bd07351309ed86e10a0acd66ae973 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 15 Sep 2009 12:32:22 -0700
Subject: Fixed up CopyWinLibs.cmake post moap/viewer-2.0.0-3 merge. Added CRT
 assembly check to viewer_manifest.py. twiddled test_win32_manifest.py for
 ease of use.

---
 indra/lib/python/indra/util/test_win32_manifest.py | 126 +++++++++++++++++++++
 indra/newview/viewer_manifest.py                   |  39 ++++++-
 2 files changed, 160 insertions(+), 5 deletions(-)
 create mode 100644 indra/lib/python/indra/util/test_win32_manifest.py

(limited to 'indra')

diff --git a/indra/lib/python/indra/util/test_win32_manifest.py b/indra/lib/python/indra/util/test_win32_manifest.py
new file mode 100644
index 0000000000..7aa7a10928
--- /dev/null
+++ b/indra/lib/python/indra/util/test_win32_manifest.py
@@ -0,0 +1,126 @@
+# @file test_win32_manifest.py
+# @brief Test an assembly binding version and uniqueness in a windows dll or exe.  
+#
+# $LicenseInfo:firstyear=2009&license=viewergpl$
+# 
+# Copyright (c) 2009, Linden Research, Inc.
+# 
+# Second Life Viewer Source Code
+# The source code in this file ("Source Code") is provided by Linden Lab
+# to you under the terms of the GNU General Public License, version 2.0
+# ("GPL"), unless you have obtained a separate licensing agreement
+# ("Other License"), formally executed by you and Linden Lab.  Terms of
+# the GPL can be found in doc/GPL-license.txt in this distribution, or
+# online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+# 
+# There are special exceptions to the terms and conditions of the GPL as
+# it is applied to this Source Code. View the full text of the exception
+# in the file doc/FLOSS-exception.txt in this software distribution, or
+# online at
+# http://secondlifegrid.net/programs/open_source/licensing/flossexception
+# 
+# By copying, modifying or distributing this software, you acknowledge
+# that you have read and understood your obligations described above,
+# and agree to abide by those obligations.
+# 
+# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+# COMPLETENESS OR PERFORMANCE.
+# $/LicenseInfo$
+
+import sys, os
+import tempfile
+from xml.dom.minidom import parse
+
+def get_HKLM_registry_value(key_str, value_str):
+    import _winreg
+    reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
+    key = _winreg.OpenKey(reg, key_str)
+    value = _winreg.QueryValueEx(key, value_str)[0]
+    print 'Found: %s' % value
+    return value
+        
+def find_vc_dir():
+    supported_versions = (r'8.0', r'9.0')
+    value_str = (r'ProductDir')
+    
+    for version in supported_versions:       
+        key_str = (r'SOFTWARE\Microsoft\VisualStudio\%s\Setup\VC' %
+                   version)
+        try:
+            return get_HKLM_registry_value(key_str, value_str)           
+        except WindowsError, err:
+            x64_key_str = (r'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%s\Setup\VS' %
+                       version)       
+            try:
+                return get_HKLM_registry_value(x64_key_str, value_str)
+            except:
+                print >> sys.stderr, "Didn't find MS VC version %s " % version
+        
+    raise
+
+def find_mt_path():
+    vc_dir = find_vc_dir()
+    mt_path = '\"%sbin\\mt.exe\"' % vc_dir
+    return mt_path
+    
+def test_assembly_binding(src_filename, assembly_name, assembly_ver):
+    (tmp_file_fd, tmp_file_name) = tempfile.mkstemp(suffix='.xml')
+    tmp_file = os.fdopen(tmp_file_fd)
+    tmp_file.close()
+
+    mt_path = find_mt_path()
+    resource_id = ""
+    if os.path.splitext(src_filename)[1].lower() == ".dll":
+       resource_id = ";#2"
+    system_call = '%s -nologo -inputresource:%s%s -out:%s' % (mt_path, src_filename, resource_id, tmp_file_name)
+    print "Executing: %s" % system_call
+    os.system(system_call)
+
+    manifest_dom = parse(tmp_file_name)
+    nodes = manifest_dom.getElementsByTagName('assemblyIdentity')
+
+    versions = list()
+    for node in nodes:
+        if node.getAttribute('name') == assembly_name:
+            versions.append(node.getAttribute('version'))
+
+    if len(versions) == 0:
+        print "No manifest found for %s" % src_filename
+        
+    elif len(versions) > 1:
+        print "Multiple bindings to %s found:" % assembly_name
+        print versions
+        print 
+        raise Exception("Multiple bindings")
+
+    elif versions[0] != assembly_ver:
+        print "Unexpected version found for %s:" % assembly_name
+        print "Wanted %s, found %s" % (assembly_ver, versions[0])
+        print
+        raise Exception("Unexpected version")
+            
+    os.remove(tmp_file_name)
+  
+
+if __name__ == '__main__':
+
+    print "Running test_win32_manifest.py..."
+    print
+    
+    usage = 'test_win32_manfest <srcFileName> <assemblyName> <assemblyVersion>'
+
+    try:
+        src_filename = sys.argv[1]
+        assembly_name = sys.argv[2]
+        assembly_ver = sys.argv[3]
+    except:
+        print "Usage:"
+        print usage
+        print
+        raise
+    
+    test_assembly_binding(src_filename, assembly_name, assembly_ver)
+    
+
+    
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index bb48e8e572..af7c474b03 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -164,11 +164,38 @@ class WindowsManifest(ViewerManifest):
             return ''.join(self.channel().split()) + '.exe'
 
 
+    def test_msvcrt_and_copy_action(self, src, dst):
+        # This can is used to test a dll manifest.
+        # It is used as a temporary override during the construct method
+        from test_win32_manifest import test_assembly_binding
+        if src and (os.path.exists(src) or os.path.islink(src)):
+            # ensure that destination path exists
+            self.cmakedirs(os.path.dirname(dst))
+            self.created_paths.append(dst)
+            if not os.path.isdir(src):
+                if(self.args['configuration'].lower() == 'debug'):
+                    test_assembly_binding(src, "Microsoft.VC80.DebugCRT", "8.0.50727.4053")
+                else:
+                    test_assembly_binding(src, "Microsoft.VC80.CRT", "8.0.50727.4053")
+                self.ccopy(src,dst)
+            else:
+                raise Exception("Directories are not supported by test_CRT_and_copy_action()")
+        else:
+            print "Doesn't exist:", src
+
+    def enable_crt_check(self):
+        WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action
+
+    def disable_crt_check(self):
+        del WindowsManifest.copy_action
+
     def construct(self):
         super(WindowsManifest, self).construct()
         # 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())
 
+        self.enable_crt_check()
+        
         # need to get the llcommon.dll from the build directory as well
         if self.prefix(src=self.args['configuration'], dst=""):
             try:
@@ -178,18 +205,17 @@ class WindowsManifest(ViewerManifest):
                 self.path('libapriconv-1.dll')
             except:
                 print "Skipping llcommon.dll (assuming llcommon was linked statically)"
-                pass
         self.end_prefix()
 
         # need to get the kdu dll from the build directory as well
         try:
             self.path('%s/llkdu.dll' % self.args['configuration'], dst='llkdu.dll')
-            pass
         except:
             print "Skipping llkdu.dll"
-            pass
-        self.path(src="licenses-win32.txt", dst="licenses.txt")
 
+        self.disable_crt_check()
+
+        self.path(src="licenses-win32.txt", dst="licenses.txt")
         self.path("featuretable.txt")
 
         # For use in crash reporting (generates minidumps)
@@ -198,6 +224,8 @@ class WindowsManifest(ViewerManifest):
         # For using FMOD for sound... DJS
         self.path("fmod.dll")
 
+        self.enable_crt_check()
+
         # For textures
         if self.prefix(src=self.args['configuration'], dst=""):
             if(self.args['configuration'].lower() == 'debug'):
@@ -221,7 +249,6 @@ class WindowsManifest(ViewerManifest):
             self.path("media_plugin_webkit.dll")
             self.end_prefix()
             
-        # For WebKit/Qt plugin runtimes
         if self.prefix(src="../../libraries/i686-win32/lib/release", dst="llplugin"):
             self.path("libeay32.dll")
             self.path("qtcore4.dll")
@@ -242,6 +269,8 @@ class WindowsManifest(ViewerManifest):
             self.path("qtiff4.dll")
             self.end_prefix()
 
+        self.disable_crt_check()
+
         # These need to be installed as a SxS assembly, currently a 'private' assembly.
         # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
         if self.prefix(src=self.args['configuration'], dst=""):
-- 
cgit v1.2.3


From 8e7ba92eb9e0371385e3de9a76cc11355be8a974 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 15 Sep 2009 16:33:00 -0700
Subject: More specific exepction handling to support correct crt_checking
 failures.

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

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index d8f0e9f5d9..7084fca865 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -195,6 +195,7 @@ class WindowsManifest(ViewerManifest):
         self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe())
 
         self.enable_crt_check()
+
         # Plugin host application
         self.path(os.path.join(os.pardir,
                                'llplugin', 'slplugin', self.args['configuration'], "slplugin.exe"),
@@ -207,14 +208,14 @@ class WindowsManifest(ViewerManifest):
                 self.path('libapr-1.dll')
                 self.path('libaprutil-1.dll')
                 self.path('libapriconv-1.dll')
-            except:
+            except RuntimeError:
                 print "Skipping llcommon.dll (assuming llcommon was linked statically)"
         self.end_prefix()
 
         # need to get the kdu dll from the build directory as well
         try:
             self.path('%s/llkdu.dll' % self.args['configuration'], dst='llkdu.dll')
-        except:
+        except RuntimeError:
             print "Skipping llkdu.dll"
 
         self.disable_crt_check()
-- 
cgit v1.2.3


From 422b9c5872f15b3d0a6e40472a8e528d7d94df5f Mon Sep 17 00:00:00 2001
From: CG Linden <cg@lindenlab.com>
Date: Wed, 16 Sep 2009 21:50:40 -0700
Subject: Relocate build.sh to the top of the source tree.

---
 indra/llcommon/llversionserver.h              | 2 +-
 indra/llcommon/llversionviewer.h              | 2 +-
 indra/newview/English.lproj/InfoPlist.strings | 4 ++--
 indra/newview/Info-SecondLife.plist           | 2 +-
 indra/newview/res/viewerRes.rc                | 8 ++++----
 5 files changed, 9 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llversionserver.h b/indra/llcommon/llversionserver.h
index e9e21cffb6..72247206da 100644
--- a/indra/llcommon/llversionserver.h
+++ b/indra/llcommon/llversionserver.h
@@ -36,7 +36,7 @@
 const S32 LL_VERSION_MAJOR = 1;
 const S32 LL_VERSION_MINOR = 29;
 const S32 LL_VERSION_PATCH = 0;
-const S32 LL_VERSION_BUILD = 2425;
+const S32 LL_VERSION_BUILD = 2822;
 
 const char * const LL_CHANNEL = "Second Life Server";
 
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 04cf98ce19..ca5bcb5a95 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -36,7 +36,7 @@
 const S32 LL_VERSION_MAJOR = 2;
 const S32 LL_VERSION_MINOR = 0;
 const S32 LL_VERSION_PATCH = 0;
-const S32 LL_VERSION_BUILD = 2425;
+const S32 LL_VERSION_BUILD = 2822;
 
 const char * const LL_CHANNEL = "Second Life 2009";
 
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings
index 28853ba032..afa5a877b5 100644
--- a/indra/newview/English.lproj/InfoPlist.strings
+++ b/indra/newview/English.lproj/InfoPlist.strings
@@ -2,6 +2,6 @@
 
 CFBundleName = "Second Life";
 
-CFBundleShortVersionString = "Second Life version 2.0.0.2425";
-CFBundleGetInfoString = "Second Life version 2.0.0.2425, Copyright 2004-2009 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version 2.0.0.2822";
+CFBundleGetInfoString = "Second Life version 2.0.0.2822, Copyright 2004-2009 Linden Research, Inc.";
 
diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist
index c0a33feaec..1df5102f5f 100644
--- a/indra/newview/Info-SecondLife.plist
+++ b/indra/newview/Info-SecondLife.plist
@@ -32,7 +32,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>2.0.0.2425</string>
+	<string>2.0.0.2822</string>
 	<key>CSResourcesFileMapped</key>
 	<true/>
 </dict>
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index a5ee78df2c..6a32dba083 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -138,8 +138,8 @@ TOOLMEDIAOPEN           CURSOR                  "toolmediaopen.cur"
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,2425
- PRODUCTVERSION 2,0,0,2425
+ FILEVERSION 2,0,0,2822
+ PRODUCTVERSION 2,0,0,2822
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -156,12 +156,12 @@ BEGIN
         BEGIN
             VALUE "CompanyName", "Linden Lab"
             VALUE "FileDescription", "Second Life"
-            VALUE "FileVersion", "2.0.0.2425"
+            VALUE "FileVersion", "2.0.0.2822"
             VALUE "InternalName", "Second Life"
             VALUE "LegalCopyright", "Copyright � 2001-2008, Linden Research, Inc."
             VALUE "OriginalFilename", "SecondLife.exe"
             VALUE "ProductName", "Second Life"
-            VALUE "ProductVersion", "2.0.0.2425"
+            VALUE "ProductVersion", "2.0.0.2822"
         END
     END
     BLOCK "VarFileInfo"
-- 
cgit v1.2.3


From a84b98e31e99b361ea08dddee6183902cefbca59 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 17 Sep 2009 15:51:29 -0400
Subject: Rebuilt windows boost for CRT version DLL hell, upgrading to 1.39 in
 the process.

---
 indra/cmake/Boost.cmake | 2 +-
 indra/llmath/llmath.h   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index 0578ae95ff..efe9ad74d3 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -15,7 +15,7 @@ else (STANDALONE)
   set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
 
   if (WINDOWS)
-    set(BOOST_VERSION 1_34_1)
+    set(BOOST_VERSION 1_39)
     if (MSVC71)
       set(BOOST_PROGRAM_OPTIONS_LIBRARY 
           optimized libboost_program_options-vc71-mt-s-${BOOST_VERSION}
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index f85c4f39f4..7a5d51ff76 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -35,6 +35,7 @@
 
 #include <cmath>
 #include <cstdlib>
+#include <complex>
 #include "lldefs.h"
 //#include "llstl.h" // *TODO: Remove when LLString is gone
 //#include "llstring.h" // *TODO: Remove when LLString is gone
-- 
cgit v1.2.3


From 128c3dfc74fd02860f199359071b32ea5119033d Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Fri, 18 Sep 2009 11:29:28 -0700
Subject: Applied patch for SLPlugin location from: r133676
 svn+ssh://svn.lindenlab.com/svn/linden/branches/media-on-a-prim/moap-6

---
 indra/llvfs/lldir_mac.cpp        |    2 +-
 indra/newview/viewer_manifest.py | 1592 +++++++++++++++++++-------------------
 2 files changed, 797 insertions(+), 797 deletions(-)

(limited to 'indra')

diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp
index 3e296831ae..346f7dd8ed 100644
--- a/indra/llvfs/lldir_mac.cpp
+++ b/indra/llvfs/lldir_mac.cpp
@@ -424,7 +424,7 @@ BOOL LLDir_Mac::fileExists(const std::string &filename) const
 
 /*virtual*/ std::string LLDir_Mac::getLLPluginLauncher()
 {
-	return gDirUtilp->getExecutableDir() + gDirUtilp->getDirDelimiter() +
+	return gDirUtilp->getAppRODataDir() + gDirUtilp->getDirDelimiter() +
 		"SLPlugin";
 }
 
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 7084fca865..6ef905cca7 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -1,796 +1,796 @@
-#!/usr/bin/python
-# @file viewer_manifest.py
-# @author Ryan Williams
-# @brief Description of all installer viewer files, and methods for packaging
-#        them into installers for all supported platforms.
-#
-# $LicenseInfo:firstyear=2006&license=viewergpl$
-# 
-# Copyright (c) 2006-2009, Linden Research, Inc.
-# 
-# Second Life Viewer Source Code
-# The source code in this file ("Source Code") is provided by Linden Lab
-# to you under the terms of the GNU General Public License, version 2.0
-# ("GPL"), unless you have obtained a separate licensing agreement
-# ("Other License"), formally executed by you and Linden Lab.  Terms of
-# the GPL can be found in doc/GPL-license.txt in this distribution, or
-# online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
-# 
-# There are special exceptions to the terms and conditions of the GPL as
-# it is applied to this Source Code. View the full text of the exception
-# in the file doc/FLOSS-exception.txt in this software distribution, or
-# online at
-# http://secondlifegrid.net/programs/open_source/licensing/flossexception
-# 
-# By copying, modifying or distributing this software, you acknowledge
-# that you have read and understood your obligations described above,
-# and agree to abide by those obligations.
-# 
-# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
-# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
-# COMPLETENESS OR PERFORMANCE.
-# $/LicenseInfo$
-import sys
-import os.path
-import re
-import tarfile
-viewer_dir = os.path.dirname(__file__)
-# add llmanifest library to our path so we don't have to muck with PYTHONPATH
-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 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")
-
-    def login_channel(self):
-        """Channel reported for login and upgrade purposes ONLY;
-        used for A/B testing"""
-        # NOTE: Do not return the normal channel if login_channel
-        # is not specified, as some code may branch depending on
-        # whether or not this is present
-        return self.args.get('login_channel')
-
-    def grid(self):
-        return self.args['grid']
-    def channel(self):
-        return self.args['channel']
-    def channel_unique(self):
-        return self.channel().replace("Second Life", "").strip()
-    def channel_oneword(self):
-        return "".join(self.channel_unique().split())
-    def channel_lowerword(self):
-        return self.channel_oneword().lower()
-
-    def flags_list(self):
-        """ Convenience function that returns the command-line flags
-        for the grid"""
-
-        # Set command line flags relating to the target grid
-        grid_flags = ''
-        if not self.default_grid():
-            grid_flags = "--grid %(grid)s "\
-                         "--helperuri http://preview-%(grid)s.secondlife.com/helpers/" %\
-                           {'grid':self.grid()}
-
-        # set command line flags for channel
-        channel_flags = ''
-        if self.login_channel() and self.login_channel() != self.channel():
-            # Report a special channel during login, but use default
-            channel_flags = '--channel "%s"' % (self.login_channel())
-        elif not self.default_channel():
-            channel_flags = '--channel "%s"' % self.channel()
-
-        # Deal with settings 
-        setting_flags = ''
-        if not self.default_channel() or not self.default_grid():
-            if self.default_grid():
-                setting_flags = '--settings settings_%s.xml'\
-                                % self.channel_lowerword()
-            else:
-                setting_flags = '--settings settings_%s_%s.xml'\
-                                % (self.grid(), self.channel_lowerword())
-                                                
-        return " ".join((channel_flags, grid_flags, setting_flags)).strip()
-
-
-class WindowsManifest(ViewerManifest):
-    def final_exe(self):
-        if self.default_channel():
-            if self.default_grid():
-                return "SecondLife.exe"
-            else:
-                return "SecondLifePreview.exe"
-        else:
-            return ''.join(self.channel().split()) + '.exe'
-
-
-    def test_msvcrt_and_copy_action(self, src, dst):
-        # This can is used to test a dll manifest.
-        # It is used as a temporary override during the construct method
-        from test_win32_manifest import test_assembly_binding
-        if src and (os.path.exists(src) or os.path.islink(src)):
-            # ensure that destination path exists
-            self.cmakedirs(os.path.dirname(dst))
-            self.created_paths.append(dst)
-            if not os.path.isdir(src):
-                if(self.args['configuration'].lower() == 'debug'):
-                    test_assembly_binding(src, "Microsoft.VC80.DebugCRT", "8.0.50727.4053")
-                else:
-                    test_assembly_binding(src, "Microsoft.VC80.CRT", "8.0.50727.4053")
-                self.ccopy(src,dst)
-            else:
-                raise Exception("Directories are not supported by test_CRT_and_copy_action()")
-        else:
-            print "Doesn't exist:", src
-
-    def enable_crt_check(self):
-        WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action
-
-    def disable_crt_check(self):
-        del WindowsManifest.copy_action
-
-    def construct(self):
-        super(WindowsManifest, self).construct()
-        # 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())
-
-        self.enable_crt_check()
-
-        # Plugin host application
-        self.path(os.path.join(os.pardir,
-                               'llplugin', 'slplugin', self.args['configuration'], "slplugin.exe"),
-                  "slplugin.exe")
-        
-        # need to get the llcommon.dll from the build directory as well
-        if self.prefix(src=self.args['configuration'], dst=""):
-            try:
-                self.path('llcommon.dll')
-                self.path('libapr-1.dll')
-                self.path('libaprutil-1.dll')
-                self.path('libapriconv-1.dll')
-            except RuntimeError:
-                print "Skipping llcommon.dll (assuming llcommon was linked statically)"
-        self.end_prefix()
-
-        # need to get the kdu dll from the build directory as well
-        try:
-            self.path('%s/llkdu.dll' % self.args['configuration'], dst='llkdu.dll')
-        except RuntimeError:
-            print "Skipping llkdu.dll"
-
-        self.disable_crt_check()
-
-        self.path(src="licenses-win32.txt", dst="licenses.txt")
-        self.path("featuretable.txt")
-
-        # For use in crash reporting (generates minidumps)
-        self.path("dbghelp.dll")
-
-        # For using FMOD for sound... DJS
-        self.path("fmod.dll")
-
-        self.enable_crt_check()
-
-        # For textures
-        if self.prefix(src=self.args['configuration'], dst=""):
-            if(self.args['configuration'].lower() == 'debug'):
-                self.path("openjpegd.dll")
-            else:
-                self.path("openjpeg.dll")
-            self.end_prefix()
-
-        # Media plugins - QuickTime
-        if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"):
-            self.path("media_plugin_quicktime.dll")
-            self.end_prefix()
-
-        # Media plugins - WebKit/Qt
-        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()
-
-        self.disable_crt_check()
-
-        # These need to be installed as a SxS assembly, currently a 'private' assembly.
-        # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
-        if self.prefix(src=self.args['configuration'], dst=""):
-            if self.args['configuration'] == 'Debug':
-                self.path("msvcr80d.dll")
-                self.path("msvcp80d.dll")
-                self.path("Microsoft.VC80.DebugCRT.manifest")
-            else:
-                self.path("msvcr80.dll")
-                self.path("msvcp80.dll")
-                self.path("Microsoft.VC80.CRT.manifest")
-            self.end_prefix()
-
-        # The config file name needs to match the exe's name.
-        self.path(src="%s/secondlife-bin.exe.config" % self.args['configuration'], dst=self.final_exe() + ".config")
-
-        # Vivox runtimes
-        if self.prefix(src=self.args['configuration'], dst=""):
-            self.path("SLVoice.exe")
-            self.path("alut.dll")
-            self.path("vivoxsdk.dll")
-            self.path("ortp.dll")
-            self.path("wrap_oal.dll")
-            self.end_prefix()
-
-        # pull in the crash logger and updater from other projects
-        # tag:"crash-logger" here as a cue to the exporter
-        self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'],
-                  dst="win_crash_logger.exe")
-        self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
-                  dst="updater.exe")
-
-        # For google-perftools tcmalloc allocator.
-        try:
-            self.path('%s/libtcmalloc_minimal.dll' % self.args['configuration'])
-        except:
-            print "Skipping libtcmalloc_minimal.dll"
-            pass           
-
-    def nsi_file_commands(self, install=True):
-        def wpath(path):
-            if path.endswith('/') or path.endswith(os.path.sep):
-                path = path[:-1]
-            path = path.replace('/', '\\')
-            return path
-
-        result = ""
-        dest_files = [pair[1] for pair in self.file_list if pair[0] and os.path.isfile(pair[1])]
-        # sort deepest hierarchy first
-        dest_files.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b))
-        dest_files.reverse()
-        out_path = None
-        for pkg_file in dest_files:
-            rel_file = os.path.normpath(pkg_file.replace(self.get_dst_prefix()+os.path.sep,''))
-            installed_dir = wpath(os.path.join('$INSTDIR', os.path.dirname(rel_file)))
-            pkg_file = wpath(os.path.normpath(pkg_file))
-            if installed_dir != out_path:
-                if install:
-                    out_path = installed_dir
-                    result += 'SetOutPath ' + out_path + '\n'
-            if install:
-                result += 'File ' + pkg_file + '\n'
-            else:
-                result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n'
-        # at the end of a delete, just rmdir all the directories
-        if not install:
-            deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list]
-            # find all ancestors so that we don't skip any dirs that happened to have no non-dir children
-            deleted_dirs = []
-            for d in deleted_file_dirs:
-                deleted_dirs.extend(path_ancestors(d))
-            # sort deepest hierarchy first
-            deleted_dirs.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b))
-            deleted_dirs.reverse()
-            prev = None
-            for d in deleted_dirs:
-                if d != prev:   # skip duplicates
-                    result += 'RMDir ' + wpath(os.path.join('$INSTDIR', os.path.normpath(d))) + '\n'
-                prev = d
-
-        return result
-
-    def package_finish(self):
-        # a standard map of strings for replacing in the templates
-        substitution_strings = {
-            'version' : '.'.join(self.args['version']),
-            'version_short' : '.'.join(self.args['version'][:-1]),
-            'version_dashes' : '-'.join(self.args['version']),
-            'final_exe' : self.final_exe(),
-            'grid':self.args['grid'],
-            'grid_caps':self.args['grid'].upper(),
-            # escape quotes becase NSIS doesn't handle them well
-            'flags':self.flags_list().replace('"', '$\\"'),
-            'channel':self.channel(),
-            'channel_oneword':self.channel_oneword(),
-            'channel_unique':self.channel_unique(),
-            }
-
-        version_vars = """
-        !define INSTEXE  "%(final_exe)s"
-        !define VERSION "%(version_short)s"
-        !define VERSION_LONG "%(version)s"
-        !define VERSION_DASHES "%(version_dashes)s"
-        """ % substitution_strings
-        if self.default_channel():
-            if self.default_grid():
-                # release viewer
-                installer_file = "Second_Life_%(version_dashes)s_Setup.exe"
-                grid_vars_template = """
-                OutFile "%(installer_file)s"
-                !define INSTFLAGS "%(flags)s"
-                !define INSTNAME   "SecondLife"
-                !define SHORTCUT   "Second Life"
-                !define URLNAME   "secondlife"
-                Caption "Second Life ${VERSION}"
-                """
-            else:
-                # beta grid viewer
-                installer_file = "Second_Life_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
-                grid_vars_template = """
-                OutFile "%(installer_file)s"
-                !define INSTFLAGS "%(flags)s"
-                !define INSTNAME   "SecondLife%(grid_caps)s"
-                !define SHORTCUT   "Second Life (%(grid_caps)s)"
-                !define URLNAME   "secondlife%(grid)s"
-                !define UNINSTALL_SETTINGS 1
-                Caption "Second Life %(grid)s ${VERSION}"
-                """
-        else:
-            # some other channel on some grid
-            installer_file = "Second_Life_%(version_dashes)s_%(channel_oneword)s_Setup.exe"
-            grid_vars_template = """
-            OutFile "%(installer_file)s"
-            !define INSTFLAGS "%(flags)s"
-            !define INSTNAME   "SecondLife%(channel_oneword)s"
-            !define SHORTCUT   "%(channel)s"
-            !define URLNAME   "secondlife"
-            !define UNINSTALL_SETTINGS 1
-            Caption "%(channel)s ${VERSION}"
-            """
-        if 'installer_name' in self.args:
-            installer_file = self.args['installer_name']
-        else:
-            installer_file = installer_file % substitution_strings
-        substitution_strings['installer_file'] = installer_file
-
-        tempfile = "secondlife_setup_tmp.nsi"
-        # the following replaces strings in the nsi template
-        # it also does python-style % substitution
-        self.replace_in("installers/windows/installer_template.nsi", tempfile, {
-                "%%VERSION%%":version_vars,
-                "%%SOURCE%%":self.get_src_prefix(),
-                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
-                "%%INSTALL_FILES%%":self.nsi_file_commands(True),
-                "%%DELETE_FILES%%":self.nsi_file_commands(False)})
-
-        # We use the Unicode version of NSIS, available from
-        # http://www.scratchpaper.com/
-        # Check two paths, one for Program Files, and one for Program Files (x86).
-        # Yay 64bit windows.
-        NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\Unicode\\makensis.exe')
-        if not os.path.exists(NSIS_path):
-            NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe')
-        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
-        # self.remove(self.dst_path_of(tempfile))
-        # If we're on a build machine, sign the code using our Authenticode certificate. JC
-        sign_py = os.path.expandvars("${SIGN}")
-        if not sign_py or sign_py == "${SIGN}":
-            sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
-        else:
-            sign_py = sign_py.replace('\\', '\\\\\\\\')
-        python = os.path.expandvars("${PYTHON}")
-        if not python or python == "${PYTHON}":
-            python = 'python'
-        if os.path.exists(sign_py):
-            self.run_command("%s %s %s" % (python, sign_py, self.dst_path_of(installer_file).replace('\\', '\\\\\\\\')))
-        else:
-            print "Skipping code signing,", sign_py, "does not exist"
-        self.created_path(self.dst_path_of(installer_file))
-        self.package_file = installer_file
-
-
-class DarwinManifest(ViewerManifest):
-    def construct(self):
-        # copy over the build result (this is a no-op if run within the xcode script)
-        self.path(self.args['configuration'] + "/Second Life.app", dst="")
-
-        if self.prefix(src="", dst="Contents"):  # everything goes in Contents
-            self.path("Info-SecondLife.plist", dst="Info.plist")
-
-            # copy additional libs in <bundle>/Contents/MacOS/
-            self.path("../../libraries/universal-darwin/lib_release/libndofdev.dylib", dst="MacOS/libndofdev.dylib")
-            self.path(os.path.join(os.pardir, "llplugin", "slplugin", self.args['configuration'],
-                                   "SLPlugin"),
-                      os.path.join("MacOS", "SLPlugin"))
-
-            # most everything goes in the Resources directory
-            if self.prefix(src="", dst="Resources"):
-                super(DarwinManifest, self).construct()
-
-                if self.prefix("cursors_mac"):
-                    self.path("*.tif")
-                    self.end_prefix("cursors_mac")
-
-                self.path("licenses-mac.txt", dst="licenses.txt")
-                self.path("featuretable_mac.txt")
-                self.path("SecondLife.nib")
-
-                # If we are not using the default channel, use the 'Firstlook
-                # icon' to show that it isn't a stable release.
-                if self.default_channel() and self.default_grid():
-                    self.path("secondlife.icns")
-                else:
-                    self.path("secondlife_firstlook.icns", "secondlife.icns")
-                self.path("SecondLife.nib")
-                
-                # Translations
-                self.path("English.lproj")
-                self.path("German.lproj")
-                self.path("Japanese.lproj")
-                self.path("Korean.lproj")
-                self.path("da.lproj")
-                self.path("es.lproj")
-                self.path("fr.lproj")
-                self.path("hu.lproj")
-                self.path("it.lproj")
-                self.path("nl.lproj")
-                self.path("pl.lproj")
-                self.path("pt.lproj")
-                self.path("ru.lproj")
-                self.path("tr.lproj")
-                self.path("uk.lproj")
-                self.path("zh-Hans.lproj")
-
-                # SLVoice and vivox lols
-                self.path("vivox-runtime/universal-darwin/libalut.dylib", "libalut.dylib")
-                self.path("vivox-runtime/universal-darwin/libopenal.dylib", "libopenal.dylib")
-                self.path("vivox-runtime/universal-darwin/libortp.dylib", "libortp.dylib")
-                self.path("vivox-runtime/universal-darwin/libvivoxsdk.dylib", "libvivoxsdk.dylib")
-                self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice")
-
-                libdir = "../../libraries/universal-darwin/lib_release"
-                dylibs = {}
-
-                # need to get the kdu dll from any of the build directories as well
-                for lib in "llkdu", "llcommon":
-                    libfile = "lib%s.dylib" % lib
-                    try:
-                        self.path(self.find_existing_file(os.path.join(os.pardir,
-                                                                       lib,
-                                                                       self.args['configuration'],
-                                                                       libfile),
-                                                          os.path.join(libdir, libfile)),
-                                  dst=libfile)
-                    except RuntimeError:
-                        print "Skipping %s" % libfile
-                        dylibs[lib] = False
-                    else:
-                        dylibs[lib] = True
-
-                if dylibs["llcommon"]:
-                    for libfile in ("libapr-1.0.3.7.dylib",
-                                    "libaprutil-1.0.3.8.dylib",
-                                    "libexpat.0.5.0.dylib"):
-                        self.path(os.path.join(libdir, libfile), libfile)
-
-                #libfmodwrapper.dylib
-                self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
-                
-                # our apps
-                self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
-                self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app")
-
-                # plugins
-                if self.prefix(src="", dst="llplugin"):
-                    self.path("../media_plugins/quicktime/" + self.args['configuration'] + "/media_plugin_quicktime.dylib", "media_plugin_quicktime.dylib")
-                    self.path("../media_plugins/webkit/" + self.args['configuration'] + "/media_plugin_webkit.dylib", "media_plugin_webkit.dylib")
-                    self.path("../../libraries/universal-darwin/lib_release/libllqtwebkit.dylib", "libllqtwebkit.dylib")
-
-                    self.end_prefix("llplugin")
-
-                # command line arguments for connecting to the proper grid
-                self.put_in_file(self.flags_list(), 'arguments.txt')
-
-                self.end_prefix("Resources")
-
-            self.end_prefix("Contents")
-
-        # NOTE: the -S argument to strip causes it to keep enough info for
-        # annotated backtraces (i.e. function names in the crash log).  'strip' with no
-        # arguments yields a slightly smaller binary but makes crash logs mostly useless.
-        # This may be desirable for the final release.  Or not.
-        if ("package" in self.args['actions'] or 
-            "unpacked" in self.args['actions']):
-            self.run_command('strip -S "%(viewer_binary)s"' %
-                             { 'viewer_binary' : self.dst_path_of('Contents/MacOS/Second Life')})
-
-
-    def package_finish(self):
-        channel_standin = 'Second Life'  # hah, our default channel is not usable on its own
-        if not self.default_channel():
-            channel_standin = self.channel()
-
-        imagename="SecondLife_" + '_'.join(self.args['version'])
-
-        # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning.
-        #  If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick.
-
-        volname="Second Life Installer"  # DO NOT CHANGE without understanding comment above
-
-        if self.default_channel():
-            if not self.default_grid():
-                # beta case
-                imagename = imagename + '_' + self.args['grid'].upper()
-        else:
-            # first look, etc
-            imagename = imagename + '_' + self.channel_oneword().upper()
-
-        sparsename = imagename + ".sparseimage"
-        finalname = imagename + ".dmg"
-        # make sure we don't have stale files laying about
-        self.remove(sparsename, finalname)
-
-        self.run_command('hdiutil create "%(sparse)s" -volname "%(vol)s" -fs HFS+ -type SPARSE -megabytes 400 -layout SPUD' % {
-                'sparse':sparsename,
-                'vol':volname})
-
-        # mount the image and get the name of the mount point and device node
-        hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"')
-        devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip()
-        volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip()
-
-        # Copy everything in to the mounted .dmg
-
-        if self.default_channel() and not self.default_grid():
-            app_name = "Second Life " + self.args['grid']
-        else:
-            app_name = channel_standin.strip()
-
-        # Hack:
-        # Because there is no easy way to coerce the Finder into positioning
-        # the app bundle in the same place with different app names, we are
-        # adding multiple .DS_Store files to svn. There is one for release,
-        # one for release candidate and one for first look. Any other channels
-        # will use the release .DS_Store, and will look broken.
-        # - Ambroff 2008-08-20
-        dmg_template = os.path.join(
-            'installers', 
-            'darwin',
-            '%s-dmg' % "".join(self.channel_unique().split()).lower())
-
-        if not os.path.exists (self.src_path_of(dmg_template)):
-            dmg_template = os.path.join ('installers', 'darwin', 'release-dmg')
-
-        for s,d in {self.get_dst_prefix():app_name + ".app",
-                    os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns",
-                    os.path.join(dmg_template, "background.jpg"): "background.jpg",
-                    os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items():
-            print "Copying to dmg", s, d
-            self.copy_action(self.src_path_of(s), os.path.join(volpath, d))
-
-        # Hide the background image, DS_Store file, and volume icon file (set their "visible" bit)
-        self.run_command('SetFile -a V "' + os.path.join(volpath, ".VolumeIcon.icns") + '"')
-        self.run_command('SetFile -a V "' + os.path.join(volpath, "background.jpg") + '"')
-        self.run_command('SetFile -a V "' + os.path.join(volpath, ".DS_Store") + '"')
-
-        # Create the alias file (which is a resource file) from the .r
-        self.run_command('rez "' + self.src_path_of("installers/darwin/release-dmg/Applications-alias.r") + '" -o "' + os.path.join(volpath, "Applications") + '"')
-
-        # Set the alias file's alias and custom icon bits
-        self.run_command('SetFile -a AC "' + os.path.join(volpath, "Applications") + '"')
-
-        # Set the disk image root's custom icon bit
-        self.run_command('SetFile -a C "' + volpath + '"')
-
-        # Unmount the image
-        self.run_command('hdiutil detach -force "' + devfile + '"')
-
-        print "Converting temp disk image to final disk image"
-        self.run_command('hdiutil convert "%(sparse)s" -format UDZO -imagekey zlib-level=9 -o "%(final)s"' % {'sparse':sparsename, 'final':finalname})
-        # get rid of the temp file
-        self.package_file = finalname
-        self.remove(sparsename)
-
-class LinuxManifest(ViewerManifest):
-    def construct(self):
-        super(LinuxManifest, self).construct()
-        self.path("licenses-linux.txt","licenses.txt")
-        self.path("res/ll_icon.png","secondlife_icon.png")
-        if self.prefix("linux_tools", dst=""):
-            self.path("client-readme.txt","README-linux.txt")
-            self.path("client-readme-voice.txt","README-linux-voice.txt")
-            self.path("client-readme-joystick.txt","README-linux-joystick.txt")
-            self.path("wrapper.sh","secondlife")
-            self.path("handle_secondlifeprotocol.sh", "etc/handle_secondlifeprotocol.sh")
-            self.path("register_secondlifeprotocol.sh", "etc/register_secondlifeprotocol.sh")
-            self.path("refresh_desktop_app_entry.sh", "etc/refresh_desktop_app_entry.sh")
-            self.path("launch_url.sh","etc/launch_url.sh")
-            self.path("install.sh")
-            self.end_prefix("linux_tools")
-
-        # Create an appropriate gridargs.dat for this package, denoting required grid.
-        self.put_in_file(self.flags_list(), 'etc/gridargs.dat')
-
-
-    def package_finish(self):
-        if 'installer_name' in self.args:
-            installer_name = self.args['installer_name']
-        else:
-            installer_name_components = ['SecondLife_', self.args.get('arch')]
-            installer_name_components.extend(self.args['version'])
-            installer_name = "_".join(installer_name_components)
-            if self.default_channel():
-                if not self.default_grid():
-                    installer_name += '_' + self.args['grid'].upper()
-            else:
-                installer_name += '_' + self.channel_oneword().upper()
-
-        # Fix access permissions
-        self.run_command("""
-                find %(dst)s -type d | xargs --no-run-if-empty chmod 755;
-                find %(dst)s -type f -perm 0700 | xargs --no-run-if-empty chmod 0755;
-                find %(dst)s -type f -perm 0500 | xargs --no-run-if-empty chmod 0555;
-                find %(dst)s -type f -perm 0600 | xargs --no-run-if-empty chmod 0644;
-                find %(dst)s -type f -perm 0400 | xargs --no-run-if-empty chmod 0444;
-                true""" %  {'dst':self.get_dst_prefix() })
-        self.package_file = installer_name + '.tar.bz2'
-
-        # temporarily move directory tree so that it has the right
-        # name in the tarfile
-        self.run_command("mv %(dst)s %(inst)s" % {
-            'dst': self.get_dst_prefix(),
-            'inst': self.build_path_of(installer_name)})
-        try:
-            # --numeric-owner hides the username of the builder for
-            # security etc.
-            self.run_command('tar -C %(dir)s --numeric-owner -cjf '
-                             '%(inst_path)s.tar.bz2 %(inst_name)s' % {
-                'dir': self.get_build_prefix(),
-                'inst_name': installer_name,
-                'inst_path':self.build_path_of(installer_name)})
-        finally:
-            self.run_command("mv %(inst)s %(dst)s" % {
-                'dst': self.get_dst_prefix(),
-                'inst': self.build_path_of(installer_name)})
-
-class Linux_i686Manifest(LinuxManifest):
-    def construct(self):
-        super(Linux_i686Manifest, self).construct()
-
-        # install either the libllkdu we just built, or a prebuilt one, in
-        # decreasing order of preference.  for linux package, this goes to bin/
-        for lib, destdir in ("llkdu", "bin"), ("llcommon", "lib"):
-            libfile = "lib%s.so" % lib
-            try:
-                self.path(self.find_existing_file(os.path.join(os.pardir, lib, libfile),
-                    '../../libraries/i686-linux/lib_release_client/%s' % libfile), 
-                      dst=os.path.join(destdir, libfile))
-                # keep this one to preserve syntax, open source mangling removes previous lines
-                pass
-            except RuntimeError:
-                print "Skipping %s - not found" % libfile
-                pass
-
-        self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
-        self.path("../linux_crash_logger/linux-crash-logger-stripped","bin/linux-crash-logger.bin")
-        self.path("../linux_updater/linux-updater-stripped", "bin/linux-updater.bin")
-        self.path("../llplugin/slplugin/SLPlugin", "bin/SLPlugin")
-        if self.prefix("res-sdl"):
-            self.path("*")
-            # recurse
-            self.end_prefix("res-sdl")
-
-        # plugins
-        if self.prefix(src="", dst="bin/llplugin"):
-            self.path("../media_plugins/webkit/libmedia_plugin_webkit.so", "libmedia_plugin_webkit.so")
-            self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_quicktime.so")
-            self.end_prefix("bin/llplugin")
-
-        self.path("featuretable_linux.txt")
-        #self.path("secondlife-i686.supp")
-
-        if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
-            #self.path("libkdu_v42R.so", "libkdu.so")
-            self.path("libfmod-3.75.so")
-            self.path("libapr-1.so.0")
-            self.path("libaprutil-1.so.0")
-            self.path("libdb-4.2.so")
-            self.path("libcrypto.so.0.9.7")
-            self.path("libexpat.so.1")
-            self.path("libssl.so.0.9.7")
-            self.path("libuuid.so", "libuuid.so.1")
-            self.path("libSDL-1.2.so.0")
-            self.path("libELFIO.so")
-            self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3")
-            self.path("libalut.so")
-            self.path("libopenal.so", "libopenal.so.1")
-            self.end_prefix("lib")
-
-            # Vivox runtimes
-            if self.prefix(src="vivox-runtime/i686-linux", dst="bin"):
-                    self.path("SLVoice")
-                    self.end_prefix()
-            if self.prefix(src="vivox-runtime/i686-linux", dst="lib"):
-                    self.path("libortp.so")
-                    self.path("libvivoxsdk.so")
-                    self.end_prefix("lib")
-
-class Linux_x86_64Manifest(LinuxManifest):
-    def construct(self):
-        super(Linux_x86_64Manifest, self).construct()
-        self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
-        self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin")
-        if self.prefix("res-sdl"):
-            self.path("*")
-            # recurse
-            self.end_prefix("res-sdl")
-
-        self.path("featuretable_linux.txt")
-        self.path("secondlife-i686.supp")
-
-if __name__ == "__main__":
-    main()
+#!/usr/bin/python
+# @file viewer_manifest.py
+# @author Ryan Williams
+# @brief Description of all installer viewer files, and methods for packaging
+#        them into installers for all supported platforms.
+#
+# $LicenseInfo:firstyear=2006&license=viewergpl$
+# 
+# Copyright (c) 2006-2009, Linden Research, Inc.
+# 
+# Second Life Viewer Source Code
+# The source code in this file ("Source Code") is provided by Linden Lab
+# to you under the terms of the GNU General Public License, version 2.0
+# ("GPL"), unless you have obtained a separate licensing agreement
+# ("Other License"), formally executed by you and Linden Lab.  Terms of
+# the GPL can be found in doc/GPL-license.txt in this distribution, or
+# online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+# 
+# There are special exceptions to the terms and conditions of the GPL as
+# it is applied to this Source Code. View the full text of the exception
+# in the file doc/FLOSS-exception.txt in this software distribution, or
+# online at
+# http://secondlifegrid.net/programs/open_source/licensing/flossexception
+# 
+# By copying, modifying or distributing this software, you acknowledge
+# that you have read and understood your obligations described above,
+# and agree to abide by those obligations.
+# 
+# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+# COMPLETENESS OR PERFORMANCE.
+# $/LicenseInfo$
+import sys
+import os.path
+import re
+import tarfile
+viewer_dir = os.path.dirname(__file__)
+# add llmanifest library to our path so we don't have to muck with PYTHONPATH
+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 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")
+
+    def login_channel(self):
+        """Channel reported for login and upgrade purposes ONLY;
+        used for A/B testing"""
+        # NOTE: Do not return the normal channel if login_channel
+        # is not specified, as some code may branch depending on
+        # whether or not this is present
+        return self.args.get('login_channel')
+
+    def grid(self):
+        return self.args['grid']
+    def channel(self):
+        return self.args['channel']
+    def channel_unique(self):
+        return self.channel().replace("Second Life", "").strip()
+    def channel_oneword(self):
+        return "".join(self.channel_unique().split())
+    def channel_lowerword(self):
+        return self.channel_oneword().lower()
+
+    def flags_list(self):
+        """ Convenience function that returns the command-line flags
+        for the grid"""
+
+        # Set command line flags relating to the target grid
+        grid_flags = ''
+        if not self.default_grid():
+            grid_flags = "--grid %(grid)s "\
+                         "--helperuri http://preview-%(grid)s.secondlife.com/helpers/" %\
+                           {'grid':self.grid()}
+
+        # set command line flags for channel
+        channel_flags = ''
+        if self.login_channel() and self.login_channel() != self.channel():
+            # Report a special channel during login, but use default
+            channel_flags = '--channel "%s"' % (self.login_channel())
+        elif not self.default_channel():
+            channel_flags = '--channel "%s"' % self.channel()
+
+        # Deal with settings 
+        setting_flags = ''
+        if not self.default_channel() or not self.default_grid():
+            if self.default_grid():
+                setting_flags = '--settings settings_%s.xml'\
+                                % self.channel_lowerword()
+            else:
+                setting_flags = '--settings settings_%s_%s.xml'\
+                                % (self.grid(), self.channel_lowerword())
+                                                
+        return " ".join((channel_flags, grid_flags, setting_flags)).strip()
+
+
+class WindowsManifest(ViewerManifest):
+    def final_exe(self):
+        if self.default_channel():
+            if self.default_grid():
+                return "SecondLife.exe"
+            else:
+                return "SecondLifePreview.exe"
+        else:
+            return ''.join(self.channel().split()) + '.exe'
+
+
+    def test_msvcrt_and_copy_action(self, src, dst):
+        # This can is used to test a dll manifest.
+        # It is used as a temporary override during the construct method
+        from test_win32_manifest import test_assembly_binding
+        if src and (os.path.exists(src) or os.path.islink(src)):
+            # ensure that destination path exists
+            self.cmakedirs(os.path.dirname(dst))
+            self.created_paths.append(dst)
+            if not os.path.isdir(src):
+                if(self.args['configuration'].lower() == 'debug'):
+                    test_assembly_binding(src, "Microsoft.VC80.DebugCRT", "8.0.50727.4053")
+                else:
+                    test_assembly_binding(src, "Microsoft.VC80.CRT", "8.0.50727.4053")
+                self.ccopy(src,dst)
+            else:
+                raise Exception("Directories are not supported by test_CRT_and_copy_action()")
+        else:
+            print "Doesn't exist:", src
+
+    def enable_crt_check(self):
+        WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action
+
+    def disable_crt_check(self):
+        del WindowsManifest.copy_action
+
+    def construct(self):
+        super(WindowsManifest, self).construct()
+        # 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())
+
+        self.enable_crt_check()
+
+        # Plugin host application
+        self.path(os.path.join(os.pardir,
+                               'llplugin', 'slplugin', self.args['configuration'], "slplugin.exe"),
+                  "slplugin.exe")
+        
+        # need to get the llcommon.dll from the build directory as well
+        if self.prefix(src=self.args['configuration'], dst=""):
+            try:
+                self.path('llcommon.dll')
+                self.path('libapr-1.dll')
+                self.path('libaprutil-1.dll')
+                self.path('libapriconv-1.dll')
+            except RuntimeError:
+                print "Skipping llcommon.dll (assuming llcommon was linked statically)"
+        self.end_prefix()
+
+        # need to get the kdu dll from the build directory as well
+        try:
+            self.path('%s/llkdu.dll' % self.args['configuration'], dst='llkdu.dll')
+        except RuntimeError:
+            print "Skipping llkdu.dll"
+
+        self.disable_crt_check()
+
+        self.path(src="licenses-win32.txt", dst="licenses.txt")
+        self.path("featuretable.txt")
+
+        # For use in crash reporting (generates minidumps)
+        self.path("dbghelp.dll")
+
+        # For using FMOD for sound... DJS
+        self.path("fmod.dll")
+
+        self.enable_crt_check()
+
+        # For textures
+        if self.prefix(src=self.args['configuration'], dst=""):
+            if(self.args['configuration'].lower() == 'debug'):
+                self.path("openjpegd.dll")
+            else:
+                self.path("openjpeg.dll")
+            self.end_prefix()
+
+        # Media plugins - QuickTime
+        if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"):
+            self.path("media_plugin_quicktime.dll")
+            self.end_prefix()
+
+        # Media plugins - WebKit/Qt
+        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()
+
+        self.disable_crt_check()
+
+        # These need to be installed as a SxS assembly, currently a 'private' assembly.
+        # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
+        if self.prefix(src=self.args['configuration'], dst=""):
+            if self.args['configuration'] == 'Debug':
+                self.path("msvcr80d.dll")
+                self.path("msvcp80d.dll")
+                self.path("Microsoft.VC80.DebugCRT.manifest")
+            else:
+                self.path("msvcr80.dll")
+                self.path("msvcp80.dll")
+                self.path("Microsoft.VC80.CRT.manifest")
+            self.end_prefix()
+
+        # The config file name needs to match the exe's name.
+        self.path(src="%s/secondlife-bin.exe.config" % self.args['configuration'], dst=self.final_exe() + ".config")
+
+        # Vivox runtimes
+        if self.prefix(src=self.args['configuration'], dst=""):
+            self.path("SLVoice.exe")
+            self.path("alut.dll")
+            self.path("vivoxsdk.dll")
+            self.path("ortp.dll")
+            self.path("wrap_oal.dll")
+            self.end_prefix()
+
+        # pull in the crash logger and updater from other projects
+        # tag:"crash-logger" here as a cue to the exporter
+        self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'],
+                  dst="win_crash_logger.exe")
+        self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
+                  dst="updater.exe")
+
+        # For google-perftools tcmalloc allocator.
+        try:
+            self.path('%s/libtcmalloc_minimal.dll' % self.args['configuration'])
+        except:
+            print "Skipping libtcmalloc_minimal.dll"
+            pass           
+
+    def nsi_file_commands(self, install=True):
+        def wpath(path):
+            if path.endswith('/') or path.endswith(os.path.sep):
+                path = path[:-1]
+            path = path.replace('/', '\\')
+            return path
+
+        result = ""
+        dest_files = [pair[1] for pair in self.file_list if pair[0] and os.path.isfile(pair[1])]
+        # sort deepest hierarchy first
+        dest_files.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b))
+        dest_files.reverse()
+        out_path = None
+        for pkg_file in dest_files:
+            rel_file = os.path.normpath(pkg_file.replace(self.get_dst_prefix()+os.path.sep,''))
+            installed_dir = wpath(os.path.join('$INSTDIR', os.path.dirname(rel_file)))
+            pkg_file = wpath(os.path.normpath(pkg_file))
+            if installed_dir != out_path:
+                if install:
+                    out_path = installed_dir
+                    result += 'SetOutPath ' + out_path + '\n'
+            if install:
+                result += 'File ' + pkg_file + '\n'
+            else:
+                result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n'
+        # at the end of a delete, just rmdir all the directories
+        if not install:
+            deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list]
+            # find all ancestors so that we don't skip any dirs that happened to have no non-dir children
+            deleted_dirs = []
+            for d in deleted_file_dirs:
+                deleted_dirs.extend(path_ancestors(d))
+            # sort deepest hierarchy first
+            deleted_dirs.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b))
+            deleted_dirs.reverse()
+            prev = None
+            for d in deleted_dirs:
+                if d != prev:   # skip duplicates
+                    result += 'RMDir ' + wpath(os.path.join('$INSTDIR', os.path.normpath(d))) + '\n'
+                prev = d
+
+        return result
+
+    def package_finish(self):
+        # a standard map of strings for replacing in the templates
+        substitution_strings = {
+            'version' : '.'.join(self.args['version']),
+            'version_short' : '.'.join(self.args['version'][:-1]),
+            'version_dashes' : '-'.join(self.args['version']),
+            'final_exe' : self.final_exe(),
+            'grid':self.args['grid'],
+            'grid_caps':self.args['grid'].upper(),
+            # escape quotes becase NSIS doesn't handle them well
+            'flags':self.flags_list().replace('"', '$\\"'),
+            'channel':self.channel(),
+            'channel_oneword':self.channel_oneword(),
+            'channel_unique':self.channel_unique(),
+            }
+
+        version_vars = """
+        !define INSTEXE  "%(final_exe)s"
+        !define VERSION "%(version_short)s"
+        !define VERSION_LONG "%(version)s"
+        !define VERSION_DASHES "%(version_dashes)s"
+        """ % substitution_strings
+        if self.default_channel():
+            if self.default_grid():
+                # release viewer
+                installer_file = "Second_Life_%(version_dashes)s_Setup.exe"
+                grid_vars_template = """
+                OutFile "%(installer_file)s"
+                !define INSTFLAGS "%(flags)s"
+                !define INSTNAME   "SecondLife"
+                !define SHORTCUT   "Second Life"
+                !define URLNAME   "secondlife"
+                Caption "Second Life ${VERSION}"
+                """
+            else:
+                # beta grid viewer
+                installer_file = "Second_Life_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
+                grid_vars_template = """
+                OutFile "%(installer_file)s"
+                !define INSTFLAGS "%(flags)s"
+                !define INSTNAME   "SecondLife%(grid_caps)s"
+                !define SHORTCUT   "Second Life (%(grid_caps)s)"
+                !define URLNAME   "secondlife%(grid)s"
+                !define UNINSTALL_SETTINGS 1
+                Caption "Second Life %(grid)s ${VERSION}"
+                """
+        else:
+            # some other channel on some grid
+            installer_file = "Second_Life_%(version_dashes)s_%(channel_oneword)s_Setup.exe"
+            grid_vars_template = """
+            OutFile "%(installer_file)s"
+            !define INSTFLAGS "%(flags)s"
+            !define INSTNAME   "SecondLife%(channel_oneword)s"
+            !define SHORTCUT   "%(channel)s"
+            !define URLNAME   "secondlife"
+            !define UNINSTALL_SETTINGS 1
+            Caption "%(channel)s ${VERSION}"
+            """
+        if 'installer_name' in self.args:
+            installer_file = self.args['installer_name']
+        else:
+            installer_file = installer_file % substitution_strings
+        substitution_strings['installer_file'] = installer_file
+
+        tempfile = "secondlife_setup_tmp.nsi"
+        # the following replaces strings in the nsi template
+        # it also does python-style % substitution
+        self.replace_in("installers/windows/installer_template.nsi", tempfile, {
+                "%%VERSION%%":version_vars,
+                "%%SOURCE%%":self.get_src_prefix(),
+                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
+                "%%INSTALL_FILES%%":self.nsi_file_commands(True),
+                "%%DELETE_FILES%%":self.nsi_file_commands(False)})
+
+        # We use the Unicode version of NSIS, available from
+        # http://www.scratchpaper.com/
+        # Check two paths, one for Program Files, and one for Program Files (x86).
+        # Yay 64bit windows.
+        NSIS_path = os.path.expandvars('${ProgramFiles}\\NSIS\\Unicode\\makensis.exe')
+        if not os.path.exists(NSIS_path):
+            NSIS_path = os.path.expandvars('${ProgramFiles(x86)}\\NSIS\\Unicode\\makensis.exe')
+        self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
+        # self.remove(self.dst_path_of(tempfile))
+        # If we're on a build machine, sign the code using our Authenticode certificate. JC
+        sign_py = os.path.expandvars("${SIGN}")
+        if not sign_py or sign_py == "${SIGN}":
+            sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
+        else:
+            sign_py = sign_py.replace('\\', '\\\\\\\\')
+        python = os.path.expandvars("${PYTHON}")
+        if not python or python == "${PYTHON}":
+            python = 'python'
+        if os.path.exists(sign_py):
+            self.run_command("%s %s %s" % (python, sign_py, self.dst_path_of(installer_file).replace('\\', '\\\\\\\\')))
+        else:
+            print "Skipping code signing,", sign_py, "does not exist"
+        self.created_path(self.dst_path_of(installer_file))
+        self.package_file = installer_file
+
+
+class DarwinManifest(ViewerManifest):
+    def construct(self):
+        # copy over the build result (this is a no-op if run within the xcode script)
+        self.path(self.args['configuration'] + "/Second Life.app", dst="")
+
+        if self.prefix(src="", dst="Contents"):  # everything goes in Contents
+            self.path("Info-SecondLife.plist", dst="Info.plist")
+
+            # copy additional libs in <bundle>/Contents/MacOS/
+            self.path("../../libraries/universal-darwin/lib_release/libndofdev.dylib", dst="MacOS/libndofdev.dylib")
+
+            # most everything goes in the Resources directory
+            if self.prefix(src="", dst="Resources"):
+                super(DarwinManifest, self).construct()
+
+                if self.prefix("cursors_mac"):
+                    self.path("*.tif")
+                    self.end_prefix("cursors_mac")
+
+                self.path("licenses-mac.txt", dst="licenses.txt")
+                self.path("featuretable_mac.txt")
+                self.path("SecondLife.nib")
+
+                # If we are not using the default channel, use the 'Firstlook
+                # icon' to show that it isn't a stable release.
+                if self.default_channel() and self.default_grid():
+                    self.path("secondlife.icns")
+                else:
+                    self.path("secondlife_firstlook.icns", "secondlife.icns")
+                self.path("SecondLife.nib")
+                
+                # Translations
+                self.path("English.lproj")
+                self.path("German.lproj")
+                self.path("Japanese.lproj")
+                self.path("Korean.lproj")
+                self.path("da.lproj")
+                self.path("es.lproj")
+                self.path("fr.lproj")
+                self.path("hu.lproj")
+                self.path("it.lproj")
+                self.path("nl.lproj")
+                self.path("pl.lproj")
+                self.path("pt.lproj")
+                self.path("ru.lproj")
+                self.path("tr.lproj")
+                self.path("uk.lproj")
+                self.path("zh-Hans.lproj")
+
+                # SLVoice and vivox lols
+                self.path("vivox-runtime/universal-darwin/libalut.dylib", "libalut.dylib")
+                self.path("vivox-runtime/universal-darwin/libopenal.dylib", "libopenal.dylib")
+                self.path("vivox-runtime/universal-darwin/libortp.dylib", "libortp.dylib")
+                self.path("vivox-runtime/universal-darwin/libvivoxsdk.dylib", "libvivoxsdk.dylib")
+                self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice")
+
+                libdir = "../../libraries/universal-darwin/lib_release"
+                dylibs = {}
+
+                # need to get the kdu dll from any of the build directories as well
+                for lib in "llkdu", "llcommon":
+                    libfile = "lib%s.dylib" % lib
+                    try:
+                        self.path(self.find_existing_file(os.path.join(os.pardir,
+                                                                       lib,
+                                                                       self.args['configuration'],
+                                                                       libfile),
+                                                          os.path.join(libdir, libfile)),
+                                  dst=libfile)
+                    except RuntimeError:
+                        print "Skipping %s" % libfile
+                        dylibs[lib] = False
+                    else:
+                        dylibs[lib] = True
+
+                if dylibs["llcommon"]:
+                    for libfile in ("libapr-1.0.3.7.dylib",
+                                    "libaprutil-1.0.3.8.dylib",
+                                    "libexpat.0.5.0.dylib"):
+                        self.path(os.path.join(libdir, libfile), libfile)
+
+                #libfmodwrapper.dylib
+                self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
+                
+                # our apps
+                self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
+                self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app")
+
+                # plugin launcher
+                self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin", "SLPlugin")
+
+                # plugins
+                if self.prefix(src="", dst="llplugin"):
+                    self.path("../media_plugins/quicktime/" + self.args['configuration'] + "/media_plugin_quicktime.dylib", "media_plugin_quicktime.dylib")
+                    self.path("../media_plugins/webkit/" + self.args['configuration'] + "/media_plugin_webkit.dylib", "media_plugin_webkit.dylib")
+                    self.path("../../libraries/universal-darwin/lib_release/libllqtwebkit.dylib", "libllqtwebkit.dylib")
+
+                    self.end_prefix("llplugin")
+
+                # command line arguments for connecting to the proper grid
+                self.put_in_file(self.flags_list(), 'arguments.txt')
+
+                self.end_prefix("Resources")
+
+            self.end_prefix("Contents")
+
+        # NOTE: the -S argument to strip causes it to keep enough info for
+        # annotated backtraces (i.e. function names in the crash log).  'strip' with no
+        # arguments yields a slightly smaller binary but makes crash logs mostly useless.
+        # This may be desirable for the final release.  Or not.
+        if ("package" in self.args['actions'] or 
+            "unpacked" in self.args['actions']):
+            self.run_command('strip -S "%(viewer_binary)s"' %
+                             { 'viewer_binary' : self.dst_path_of('Contents/MacOS/Second Life')})
+
+
+    def package_finish(self):
+        channel_standin = 'Second Life'  # hah, our default channel is not usable on its own
+        if not self.default_channel():
+            channel_standin = self.channel()
+
+        imagename="SecondLife_" + '_'.join(self.args['version'])
+
+        # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning.
+        #  If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick.
+
+        volname="Second Life Installer"  # DO NOT CHANGE without understanding comment above
+
+        if self.default_channel():
+            if not self.default_grid():
+                # beta case
+                imagename = imagename + '_' + self.args['grid'].upper()
+        else:
+            # first look, etc
+            imagename = imagename + '_' + self.channel_oneword().upper()
+
+        sparsename = imagename + ".sparseimage"
+        finalname = imagename + ".dmg"
+        # make sure we don't have stale files laying about
+        self.remove(sparsename, finalname)
+
+        self.run_command('hdiutil create "%(sparse)s" -volname "%(vol)s" -fs HFS+ -type SPARSE -megabytes 400 -layout SPUD' % {
+                'sparse':sparsename,
+                'vol':volname})
+
+        # mount the image and get the name of the mount point and device node
+        hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"')
+        devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip()
+        volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip()
+
+        # Copy everything in to the mounted .dmg
+
+        if self.default_channel() and not self.default_grid():
+            app_name = "Second Life " + self.args['grid']
+        else:
+            app_name = channel_standin.strip()
+
+        # Hack:
+        # Because there is no easy way to coerce the Finder into positioning
+        # the app bundle in the same place with different app names, we are
+        # adding multiple .DS_Store files to svn. There is one for release,
+        # one for release candidate and one for first look. Any other channels
+        # will use the release .DS_Store, and will look broken.
+        # - Ambroff 2008-08-20
+        dmg_template = os.path.join(
+            'installers', 
+            'darwin',
+            '%s-dmg' % "".join(self.channel_unique().split()).lower())
+
+        if not os.path.exists (self.src_path_of(dmg_template)):
+            dmg_template = os.path.join ('installers', 'darwin', 'release-dmg')
+
+        for s,d in {self.get_dst_prefix():app_name + ".app",
+                    os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns",
+                    os.path.join(dmg_template, "background.jpg"): "background.jpg",
+                    os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items():
+            print "Copying to dmg", s, d
+            self.copy_action(self.src_path_of(s), os.path.join(volpath, d))
+
+        # Hide the background image, DS_Store file, and volume icon file (set their "visible" bit)
+        self.run_command('SetFile -a V "' + os.path.join(volpath, ".VolumeIcon.icns") + '"')
+        self.run_command('SetFile -a V "' + os.path.join(volpath, "background.jpg") + '"')
+        self.run_command('SetFile -a V "' + os.path.join(volpath, ".DS_Store") + '"')
+
+        # Create the alias file (which is a resource file) from the .r
+        self.run_command('rez "' + self.src_path_of("installers/darwin/release-dmg/Applications-alias.r") + '" -o "' + os.path.join(volpath, "Applications") + '"')
+
+        # Set the alias file's alias and custom icon bits
+        self.run_command('SetFile -a AC "' + os.path.join(volpath, "Applications") + '"')
+
+        # Set the disk image root's custom icon bit
+        self.run_command('SetFile -a C "' + volpath + '"')
+
+        # Unmount the image
+        self.run_command('hdiutil detach -force "' + devfile + '"')
+
+        print "Converting temp disk image to final disk image"
+        self.run_command('hdiutil convert "%(sparse)s" -format UDZO -imagekey zlib-level=9 -o "%(final)s"' % {'sparse':sparsename, 'final':finalname})
+        # get rid of the temp file
+        self.package_file = finalname
+        self.remove(sparsename)
+
+class LinuxManifest(ViewerManifest):
+    def construct(self):
+        super(LinuxManifest, self).construct()
+        self.path("licenses-linux.txt","licenses.txt")
+        self.path("res/ll_icon.png","secondlife_icon.png")
+        if self.prefix("linux_tools", dst=""):
+            self.path("client-readme.txt","README-linux.txt")
+            self.path("client-readme-voice.txt","README-linux-voice.txt")
+            self.path("client-readme-joystick.txt","README-linux-joystick.txt")
+            self.path("wrapper.sh","secondlife")
+            self.path("handle_secondlifeprotocol.sh", "etc/handle_secondlifeprotocol.sh")
+            self.path("register_secondlifeprotocol.sh", "etc/register_secondlifeprotocol.sh")
+            self.path("refresh_desktop_app_entry.sh", "etc/refresh_desktop_app_entry.sh")
+            self.path("launch_url.sh","etc/launch_url.sh")
+            self.path("install.sh")
+            self.end_prefix("linux_tools")
+
+        # Create an appropriate gridargs.dat for this package, denoting required grid.
+        self.put_in_file(self.flags_list(), 'etc/gridargs.dat')
+
+
+    def package_finish(self):
+        if 'installer_name' in self.args:
+            installer_name = self.args['installer_name']
+        else:
+            installer_name_components = ['SecondLife_', self.args.get('arch')]
+            installer_name_components.extend(self.args['version'])
+            installer_name = "_".join(installer_name_components)
+            if self.default_channel():
+                if not self.default_grid():
+                    installer_name += '_' + self.args['grid'].upper()
+            else:
+                installer_name += '_' + self.channel_oneword().upper()
+
+        # Fix access permissions
+        self.run_command("""
+                find %(dst)s -type d | xargs --no-run-if-empty chmod 755;
+                find %(dst)s -type f -perm 0700 | xargs --no-run-if-empty chmod 0755;
+                find %(dst)s -type f -perm 0500 | xargs --no-run-if-empty chmod 0555;
+                find %(dst)s -type f -perm 0600 | xargs --no-run-if-empty chmod 0644;
+                find %(dst)s -type f -perm 0400 | xargs --no-run-if-empty chmod 0444;
+                true""" %  {'dst':self.get_dst_prefix() })
+        self.package_file = installer_name + '.tar.bz2'
+
+        # temporarily move directory tree so that it has the right
+        # name in the tarfile
+        self.run_command("mv %(dst)s %(inst)s" % {
+            'dst': self.get_dst_prefix(),
+            'inst': self.build_path_of(installer_name)})
+        try:
+            # --numeric-owner hides the username of the builder for
+            # security etc.
+            self.run_command('tar -C %(dir)s --numeric-owner -cjf '
+                             '%(inst_path)s.tar.bz2 %(inst_name)s' % {
+                'dir': self.get_build_prefix(),
+                'inst_name': installer_name,
+                'inst_path':self.build_path_of(installer_name)})
+        finally:
+            self.run_command("mv %(inst)s %(dst)s" % {
+                'dst': self.get_dst_prefix(),
+                'inst': self.build_path_of(installer_name)})
+
+class Linux_i686Manifest(LinuxManifest):
+    def construct(self):
+        super(Linux_i686Manifest, self).construct()
+
+        # install either the libllkdu we just built, or a prebuilt one, in
+        # decreasing order of preference.  for linux package, this goes to bin/
+        for lib, destdir in ("llkdu", "bin"), ("llcommon", "lib"):
+            libfile = "lib%s.so" % lib
+            try:
+                self.path(self.find_existing_file(os.path.join(os.pardir, lib, libfile),
+                    '../../libraries/i686-linux/lib_release_client/%s' % libfile), 
+                      dst=os.path.join(destdir, libfile))
+                # keep this one to preserve syntax, open source mangling removes previous lines
+                pass
+            except RuntimeError:
+                print "Skipping %s - not found" % libfile
+                pass
+
+        self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
+        self.path("../linux_crash_logger/linux-crash-logger-stripped","bin/linux-crash-logger.bin")
+        self.path("../linux_updater/linux-updater-stripped", "bin/linux-updater.bin")
+        self.path("../llplugin/slplugin/SLPlugin", "bin/SLPlugin")
+        if self.prefix("res-sdl"):
+            self.path("*")
+            # recurse
+            self.end_prefix("res-sdl")
+
+        # plugins
+        if self.prefix(src="", dst="bin/llplugin"):
+            self.path("../media_plugins/webkit/libmedia_plugin_webkit.so", "libmedia_plugin_webkit.so")
+            self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_quicktime.so")
+            self.end_prefix("bin/llplugin")
+
+        self.path("featuretable_linux.txt")
+        #self.path("secondlife-i686.supp")
+
+        if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
+            #self.path("libkdu_v42R.so", "libkdu.so")
+            self.path("libfmod-3.75.so")
+            self.path("libapr-1.so.0")
+            self.path("libaprutil-1.so.0")
+            self.path("libdb-4.2.so")
+            self.path("libcrypto.so.0.9.7")
+            self.path("libexpat.so.1")
+            self.path("libssl.so.0.9.7")
+            self.path("libuuid.so", "libuuid.so.1")
+            self.path("libSDL-1.2.so.0")
+            self.path("libELFIO.so")
+            self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3")
+            self.path("libalut.so")
+            self.path("libopenal.so", "libopenal.so.1")
+            self.end_prefix("lib")
+
+            # Vivox runtimes
+            if self.prefix(src="vivox-runtime/i686-linux", dst="bin"):
+                    self.path("SLVoice")
+                    self.end_prefix()
+            if self.prefix(src="vivox-runtime/i686-linux", dst="lib"):
+                    self.path("libortp.so")
+                    self.path("libvivoxsdk.so")
+                    self.end_prefix("lib")
+
+class Linux_x86_64Manifest(LinuxManifest):
+    def construct(self):
+        super(Linux_x86_64Manifest, self).construct()
+        self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
+        self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin")
+        if self.prefix("res-sdl"):
+            self.path("*")
+            # recurse
+            self.end_prefix("res-sdl")
+
+        self.path("featuretable_linux.txt")
+        self.path("secondlife-i686.supp")
+
+if __name__ == "__main__":
+    main()
-- 
cgit v1.2.3


From 3380c7d9a22a528924c1ebd5fac1005ddaec3934 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 18 Sep 2009 16:25:22 -0400
Subject: Fixups for LLStringUtil link errors after the merge.

---
 indra/llcommon/llstring.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 181d6fd33f..d280c51226 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -230,13 +230,13 @@ public:
 	static std::basic_string<T> null;
 	
 	typedef std::map<LLFormatMapString, LLFormatMapString> format_map_t;
-	static void getTokens(const std::basic_string<T>& instr, std::vector<std::basic_string<T> >& tokens, const std::basic_string<T>& delims);
-	static void formatNumber(std::basic_string<T>& numStr, std::basic_string<T> decimals);
-	static bool formatDatetime(std::basic_string<T>& replacement, std::basic_string<T> token, std::basic_string<T> param, S32 secFromEpoch);
-	static S32 format(std::basic_string<T>& s, const format_map_t& substitutions);
-	static S32 format(std::basic_string<T>& s, const LLSD& substitutions);
-	static bool simpleReplacement(std::basic_string<T>& replacement, std::basic_string<T> token, const format_map_t& substitutions);
-	static bool simpleReplacement(std::basic_string<T>& replacement, std::basic_string<T> token, const LLSD& substitutions);
+	LL_COMMON_API static void getTokens(const std::basic_string<T>& instr, std::vector<std::basic_string<T> >& tokens, const std::basic_string<T>& delims);
+	LL_COMMON_API static void formatNumber(std::basic_string<T>& numStr, std::basic_string<T> decimals);
+	LL_COMMON_API static bool formatDatetime(std::basic_string<T>& replacement, std::basic_string<T> token, std::basic_string<T> param, S32 secFromEpoch);
+	LL_COMMON_API static S32 format(std::basic_string<T>& s, const format_map_t& substitutions);
+	LL_COMMON_API static S32 format(std::basic_string<T>& s, const LLSD& substitutions);
+	LL_COMMON_API static bool simpleReplacement(std::basic_string<T>& replacement, std::basic_string<T> token, const format_map_t& substitutions);
+	LL_COMMON_API static bool simpleReplacement(std::basic_string<T>& replacement, std::basic_string<T> token, const LLSD& substitutions);
 	static void setLocale (std::string inLocale) {sLocale = inLocale;};
 	static std::string getLocale (void) {return sLocale;};
 	
@@ -342,11 +342,11 @@ public:
 
 
 #ifdef _DEBUG	
-	static void		testHarness();
+	LL_COMMON_API static void		testHarness();
 #endif
 
 private:
-	static size_type getSubstitution(const std::basic_string<T>& instr, size_type& start, std::vector<std::basic_string<T> >& tokens);
+	LL_COMMON_API static size_type getSubstitution(const std::basic_string<T>& instr, size_type& start, std::vector<std::basic_string<T> >& tokens);
 };
 
 template<class T> std::basic_string<T> LLStringUtilBase<T>::null;
-- 
cgit v1.2.3


From afb053ebd7c50482088ea2ddf585efe8446969cf Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 18 Sep 2009 19:30:10 -0400
Subject: Minor tweaks of test_win32_manifest output.

---
 indra/lib/python/indra/util/test_win32_manifest.py | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/lib/python/indra/util/test_win32_manifest.py b/indra/lib/python/indra/util/test_win32_manifest.py
index 7aa7a10928..460e5fd487 100644
--- a/indra/lib/python/indra/util/test_win32_manifest.py
+++ b/indra/lib/python/indra/util/test_win32_manifest.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 # @file test_win32_manifest.py
 # @brief Test an assembly binding version and uniqueness in a windows dll or exe.  
 #
@@ -37,21 +38,21 @@ def get_HKLM_registry_value(key_str, value_str):
     reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
     key = _winreg.OpenKey(reg, key_str)
     value = _winreg.QueryValueEx(key, value_str)[0]
-    print 'Found: %s' % value
+    #print 'Found: %s' % value
     return value
         
 def find_vc_dir():
     supported_versions = (r'8.0', r'9.0')
     value_str = (r'ProductDir')
     
-    for version in supported_versions:       
+    for version in supported_versions:
         key_str = (r'SOFTWARE\Microsoft\VisualStudio\%s\Setup\VC' %
                    version)
         try:
-            return get_HKLM_registry_value(key_str, value_str)           
+            return get_HKLM_registry_value(key_str, value_str)
         except WindowsError, err:
             x64_key_str = (r'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%s\Setup\VS' %
-                       version)       
+                       version)
             try:
                 return get_HKLM_registry_value(x64_key_str, value_str)
             except:
@@ -65,6 +66,8 @@ def find_mt_path():
     return mt_path
     
 def test_assembly_binding(src_filename, assembly_name, assembly_ver):
+    print "checking %s dependency %s..." % (src_filename, assembly_name)
+
     (tmp_file_fd, tmp_file_name) = tempfile.mkstemp(suffix='.xml')
     tmp_file = os.fdopen(tmp_file_fd)
     tmp_file.close()
@@ -101,12 +104,15 @@ def test_assembly_binding(src_filename, assembly_name, assembly_ver):
         raise Exception("Unexpected version")
             
     os.remove(tmp_file_name)
+    
+    print "SUCCESS: %s OK!" % src_filename
+    print
   
 
 if __name__ == '__main__':
 
-    print "Running test_win32_manifest.py..."
     print
+    print "Running test_win32_manifest.py..."
     
     usage = 'test_win32_manfest <srcFileName> <assemblyName> <assemblyVersion>'
 
@@ -121,6 +127,5 @@ if __name__ == '__main__':
         raise
     
     test_assembly_binding(src_filename, assembly_name, assembly_ver)
-    
 
     
-- 
cgit v1.2.3


From 6f4b9d63f8eb97a7c4717a3160de358000b0981b Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Fri, 18 Sep 2009 19:29:18 -0700
Subject: Added dependcies to create_app_config_file. Further Clean up of dll
 copying merge mess.

---
 indra/newview/CMakeLists.txt                |  71 +++++++++++++++++-
 indra/newview/viewer_manifest.py            |   6 +-
 indra/test_apps/llplugintest/CMakeLists.txt | 109 ++++++++++++++++++++++++++++
 3 files changed, 183 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 2faa9b1df1..06386a7881 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -37,6 +37,7 @@ include(UnixInstall)
 include(LLKDU)
 include(ViewerMiscLibs)
 include(LLLogin)
+include(CMakeCopyIfDifferent)
 
 include_directories(
     ${DBUSGLIB_INCLUDE_DIRS}
@@ -1362,6 +1363,8 @@ if (WINDOWS)
         DEPENDS
           ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
           stage_third_party_libs
+	  llcommon
+	  llkdu
         )
 
       # Copy Win Libs...
@@ -1379,7 +1382,6 @@ if (WINDOWS)
         )
 
       add_dependencies(${VIEWER_BINARY_NAME} create_app_config_file)
-      
     endif(WINDOWS)    
 
     if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
@@ -1671,5 +1673,72 @@ if (WINDOWS)
           ${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 6ef905cca7..af3868394b 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -208,9 +208,11 @@ class WindowsManifest(ViewerManifest):
                 self.path('libapr-1.dll')
                 self.path('libaprutil-1.dll')
                 self.path('libapriconv-1.dll')
-            except RuntimeError:
+            except RuntimeError, err:
+                print err.message
                 print "Skipping llcommon.dll (assuming llcommon was linked statically)"
-        self.end_prefix()
+
+            self.end_prefix()
 
         # need to get the kdu dll from the build directory as well
         try:
diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt
index 7164f86026..82f74417c6 100644
--- a/indra/test_apps/llplugintest/CMakeLists.txt
+++ b/indra/test_apps/llplugintest/CMakeLists.txt
@@ -339,4 +339,113 @@ if (DARWIN)
   )
 endif (DARWIN)
 
+if(WINDOWS)
+  #********************
+  # Plugin test support
+  #
+  # Debug config runtime files required for the plugin test mule
+  set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
+  set(plugintest_debug_files
+    libeay32.dll
+    libglib-2.0-0.dll
+    libgmodule-2.0-0.dll
+    libgobject-2.0-0.dll
+    libgthread-2.0-0.dll
+    qtcored4.dll
+    qtguid4.dll
+    qtnetworkd4.dll
+    qtopengld4.dll
+    qtwebkitd4.dll
+    ssleay32.dll
+    )
+  copy_if_different(
+    ${plugintest_debug_src_dir}
+    "${CMAKE_CURRENT_BINARY_DIR}/Debug"
+    out_targets
+    ${plugintest_debug_files}
+    )
+  set(plugin_test_targets ${plugin_test_targets} ${out_targets})
+  
+  # Debug config runtime files required for the plugin test mule (Qt image format plugins)
+  set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/imageformats")
+  set(plugintest_debug_files
+    qgifd4.dll
+    qicod4.dll
+    qjpegd4.dll
+    qmngd4.dll
+    qsvgd4.dll
+    qtiffd4.dll
+    )
+  copy_if_different(
+    ${plugintest_debug_src_dir}
+    "${CMAKE_CURRENT_BINARY_DIR}/Debug/imageformats"
+    out_targets
+    ${plugintest_debug_files}
+    )
+  set(plugin_test_targets ${plugin_test_targets} ${out_targets})
+  
+  # Release & ReleaseDebInfo config runtime files required for the plugin test mule
+  set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
+  set(plugintest_release_files
+    libeay32.dll
+    libglib-2.0-0.dll
+    libgmodule-2.0-0.dll
+    libgobject-2.0-0.dll
+    libgthread-2.0-0.dll
+    qtcore4.dll
+    qtgui4.dll
+    qtnetwork4.dll
+    qtopengl4.dll
+    qtwebkit4.dll
+    ssleay32.dll
+    )
+  copy_if_different(
+    ${plugintest_release_src_dir}
+    "${CMAKE_CURRENT_BINARY_DIR}/Release"
+    out_targets
+    ${plugintest_release_files}
+    )
+  set(plugin_test_targets ${plugin_test_targets} ${out_targets})
+
+  copy_if_different(
+    ${plugintest_release_src_dir}
+    "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
+    out_targets
+    ${plugintest_release_files}
+    )
+  set(plugin_test_targets ${plugin_test_targets} ${out_targets})
+
+  # Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
+  set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/imageformats")
+  set(plugintest_release_files
+    qgif4.dll
+    qico4.dll
+    qjpeg4.dll
+    qmng4.dll
+    qsvg4.dll
+    qtiff4.dll
+    )
+  copy_if_different(
+    ${plugintest_release_src_dir}
+    "${CMAKE_CURRENT_BINARY_DIR}/Release/imageformats"
+    out_targets
+    ${plugintest_release_files}
+    )
+  set(plugin_test_targets ${plugin_test_targets} ${out_targets})
+
+  copy_if_different(
+    ${plugintest_release_src_dir}
+    "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/imageformats"
+    out_targets
+    ${plugintest_release_files}
+    )
+  set(plugin_test_targets ${plugin_test_targets} ${out_targets})
+
+  add_custom_target(copy_plugintest_libs ALL
+    DEPENDS 
+      ${plugin_test_targets}
+    )
+
+  add_dependencies(llmediaplugintest copy_plugintest_libs)
+endif(WINDOWS)
 
-- 
cgit v1.2.3


From a4c6e3610aa9943825882ff50973ad68c9bad881 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 22 Sep 2009 11:09:15 -0400
Subject: Import inventory template fix from viewer/viewer-2.0.0-3 rev 133575.

---
 indra/newview/llviewerinventory.cpp | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index f3557bb8f7..176e1b5499 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -901,20 +901,27 @@ void link_inventory_item(
 		return;
 	}
 	
+	LLUUID transaction_id;
+	std::string desc = "Link";
+	LLInventoryType::EType inv_type = LLInventoryType::IT_NONE;
+
 	LLMessageSystem* msg = gMessageSystem;
 	msg->newMessageFast(_PREHASH_LinkInventoryItem);
-	msg->nextBlockFast(_PREHASH_AgentData);
+	msg->nextBlock(_PREHASH_AgentData);
 	{
 		msg->addUUIDFast(_PREHASH_AgentID, agent_id);
 		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
 	}
-	msg->nextBlockFast(_PREHASH_InventoryData);
+	msg->nextBlock(_PREHASH_InventoryBlock);
 	{
 		msg->addU32Fast(_PREHASH_CallbackID, gInventoryCallbacks.registerCB(cb));
 		msg->addUUIDFast(_PREHASH_FolderID, parent_id);
+		msg->addUUIDFast(_PREHASH_TransactionID, transaction_id);
 		msg->addUUIDFast(_PREHASH_OldItemID, item_id);
+		msg->addS8Fast(_PREHASH_Type, (S8)asset_type);
+		msg->addS8Fast(_PREHASH_InvType, (S8)inv_type);
 		msg->addStringFast(_PREHASH_Name, new_name);
-		msg->addU8Fast(_PREHASH_AssetType, asset_type);
+		msg->addStringFast(_PREHASH_Description, desc);
 	}
 	gAgent.sendReliableMessage();
 }
-- 
cgit v1.2.3


From 68c7cd2a10786856e52d4b23334c9d0496956d62 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 22 Sep 2009 16:25:50 -0400
Subject: ND-37009: re-add Pth to list of licenses in floater_about.xml

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

(limited to 'indra')

diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml
index 73d789ce89..eaf25056c1 100644
--- a/indra/newview/skins/default/xui/en/floater_about.xml
+++ b/indra/newview/skins/default/xui/en/floater_about.xml
@@ -89,16 +89,17 @@
   expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
   FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org).
   GL Copyright (C) 1999-2004 Brian Paul.
+  google-perftools Copyright (c) 2005, Google Inc.
   Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
   jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
   jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
   ogg/vorbis Copyright (C) 2001, Xiphophorus
   OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
+  Pth Copyright (C) 1999-2006 Ralf S. Engelschall &lt;rse@gnu.org&gt;
   SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
   SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
   xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
   zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
-  google-perftools Copyright (c) 2005, Google Inc.
 
   All rights reserved.  See licenses.txt for details.
 
-- 
cgit v1.2.3


From 28ae55538c5b305f12acb4db7e6c97d698d041e7 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 22 Sep 2009 16:58:43 -0400
Subject: ND-37009: Add Pth license text to licenses-mac.txt

---
 indra/newview/licenses-mac.txt | 509 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 509 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/licenses-mac.txt b/indra/newview/licenses-mac.txt
index d488c7487e..1324fa1a86 100644
--- a/indra/newview/licenses-mac.txt
+++ b/indra/newview/licenses-mac.txt
@@ -315,6 +315,515 @@ This product includes cryptographic software written by Eric Young
 Hudson (tjh@cryptsoft.com).
 
 
+===========
+Pth License
+===========
+   ____  _   _
+  |  _ \| |_| |__               ``Ian Fleming was a UNIX fan!
+  | |_) | __| '_ \                How do I know? Well, James Bond
+  |  __/| |_| | | |               had the (license to kill) number 007,
+  |_|    \__|_| |_|               i.e., he could execute anyone!''
+
+  GNU Pth - The GNU Portable Threads
+
+  LICENSE
+  =======
+
+  This library is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as
+  published by the Free Software Foundation; either version 2.1 of the
+  License, or (at your option) any later version.
+
+  For some people, it is not clear, what is the real intention of the
+  author by using the GNU Lesser General Public License (LGPL) as the
+  distribution license for GNU Pth. This is, because the LGPL and the
+  GPL can be (and are often) interpreted very differently and some
+  interpretations seem to be not compatible with others. So an explicit
+  clarification for the use of the LGPL for GNU Pth from the authors
+  point of view might be useful.
+
+  The author places this library under the LGPL to make sure that it
+  can be used both commercially and non-commercially provided that
+  modifications to the code base are always donated back to the official
+  code base under the same license conditions. Please keep in mind that
+  especially using this library in code not staying under the GPL or
+  the LGPL _is_ allowed and that any taint or license creap into code
+  that uses the library is not the authors intention. It is just the
+  case that _including_ this library into the source tree of other
+  applications is a little bit more inconvinient because of the LGPL.
+  But it has to be this way for good reasons. And keep in mind that
+  inconvinient doesn't mean not allowed or even impossible.
+
+  Even if you want to use this library in some BSD-style licensed
+  packages, this _is_ possible as long as you are a little bit
+  carefully. Usually this means you have to make sure that the code is
+  still clearly separated into the source tree and that modifications to
+  this source area are done under the conditions of the LGPL. Read below
+  for more details on the conditions. Contact the author if you have
+  more questions.
+
+  The license text of the GNU Lesser General Public License follows:
+  __________________________________________________________________________
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
 
 =======================
 Original SSLeay License
-- 
cgit v1.2.3


From 0eedd1d9e8490ae771c8ea4af5c412d95385c800 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 23 Sep 2009 19:46:36 -0400
Subject: Oops libtcmalloc_minimal.dll was being packaged in a subdir it
 shouldn't have been.

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

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index af3868394b..f62ed4b374 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -306,11 +306,15 @@ class WindowsManifest(ViewerManifest):
                   dst="updater.exe")
 
         # For google-perftools tcmalloc allocator.
-        try:
-            self.path('%s/libtcmalloc_minimal.dll' % self.args['configuration'])
-        except:
-            print "Skipping libtcmalloc_minimal.dll"
-            pass           
+        if self.prefix(src=self.args['configuration'], dst=""):
+            try:
+                if self.args['configuration'] == 'Debug':
+                    self.path('libtcmalloc_minimal-debug.dll')
+                else:
+                    self.path('libtcmalloc_minimal.dll')
+            except:
+                print "Skipping libtcmalloc_minimal.dll"
+            self.end_prefix()
 
     def nsi_file_commands(self, install=True):
         def wpath(path):
-- 
cgit v1.2.3


From c3e8c1f738b14de74b23b3a7276ef4dc083c0887 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 24 Sep 2009 13:46:02 -0400
Subject: Disable MSVC "fatal warning" 4702 for boost::lexical_cast in Release
 build

---
 indra/llcommon/llallocator_heap_profile.cpp |  1 +
 indra/llcommon/llevents.cpp                 |  3 +++
 indra/newview/llappviewer.cpp               |  8 +++++---
 indra/newview/llvoavatar.cpp                | 13 ++++++++++++-
 indra/newview/llvoavatarself.cpp            | 13 ++++++++++++-
 5 files changed, 33 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp
index d82ee9ed81..0a807702d0 100644
--- a/indra/llcommon/llallocator_heap_profile.cpp
+++ b/indra/llcommon/llallocator_heap_profile.cpp
@@ -38,6 +38,7 @@
 // disable warning about boost::lexical_cast returning uninitialized data
 // when it fails to parse the string
 #pragma warning (disable:4701)
+#pragma warning (disable:4702)
 #endif
 
 #include <boost/algorithm/string/split.hpp>
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index aec9acc7ef..a6421ac696 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -41,6 +41,9 @@
 #include "stringize.h"
 #include "llerror.h"
 #include "llsdutil.h"
+#if LL_MSVC
+#pragma warning (disable : 4702)
+#endif
 
 /*****************************************************************************
 *   queue_names: specify LLEventPump names that should be instantiated as
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index ef1fa98b1f..2fad71a686 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -90,9 +90,6 @@
 
 #if LL_WINDOWS
 	#include "llwindebug.h"
-#endif
-
-#if LL_WINDOWS
 #	include <share.h> // For _SH_DENYWR in initMarkerFile
 #else
 #   include <sys/file.h> // For initMarkerFile support
@@ -196,6 +193,11 @@
 // define a self-registering event API object
 #include "llappviewerlistener.h"
 
+#if LL_MSVC
+// disable boost::lexical_cast warning
+#pragma warning (disable:4702)
+#endif
+
 static LLAppViewerListener sAppViewerListener("LLAppViewer", NULL);
 
 ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 018cce4b49..824e06284a 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -30,6 +30,12 @@
  * $/LicenseInfo$
  */
 
+#if LL_MSVC
+// disable warning about boost::lexical_cast returning uninitialized data
+// when it fails to parse the string
+#pragma warning (disable:4701)
+#endif
+
 #include "llviewerprecompiledheaders.h"
 
 #include "llvoavatar.h"
@@ -85,7 +91,12 @@
 #include "llvoiceclient.h"
 #include "llvoicevisualizer.h" // Ventrella
 
-#include "boost/lexical_cast.hpp"
+#if LL_MSVC
+// disable boost::lexical_cast warning
+#pragma warning (disable:4702)
+#endif
+
+#include <boost/lexical_cast.hpp>
 
 using namespace LLVOAvatarDefines;
 
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index a7b5b60842..31b9f062e4 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -30,6 +30,12 @@
  * $/LicenseInfo$
  */
 
+#if LL_MSVC
+// disable warning about boost::lexical_cast returning uninitialized data
+// when it fails to parse the string
+#pragma warning (disable:4701)
+#endif
+
 #include "llviewerprecompiledheaders.h"
 
 #include "llvoavatarself.h"
@@ -83,7 +89,12 @@
 #include "llvoiceclient.h"
 #include "llvoicevisualizer.h" // Ventrella
 
-#include "boost/lexical_cast.hpp"
+#if LL_MSVC
+// disable boost::lexical_cast warning
+#pragma warning (disable:4702)
+#endif
+
+#include <boost/lexical_cast.hpp>
 
 using namespace LLVOAvatarDefines;
 
-- 
cgit v1.2.3


From ec52e19dd16908acd72b78720880391a74ee8886 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 25 Sep 2009 10:55:25 -0400
Subject: DEV-32777, QAR-1619: Disable MSVC Release-build optimization for
 LLCoros::launchImpl(). This fixes the Release-build crash in
 lllogin_test.cpp.

---
 indra/llcommon/llcoros.cpp                         | 37 ++++++++++++++++------
 .../viewer_components/login/tests/lllogin_test.cpp |  2 +-
 2 files changed, 29 insertions(+), 10 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp
index 5d23e1d284..377bfaa247 100644
--- a/indra/llcommon/llcoros.cpp
+++ b/indra/llcommon/llcoros.cpp
@@ -54,15 +54,6 @@ bool LLCoros::cleanup(const LLSD&)
     return false;
 }
 
-std::string LLCoros::launchImpl(const std::string& prefix, coro* newCoro)
-{
-    std::string name(generateDistinctName(prefix));
-    mCoros.insert(name, newCoro);
-    /* Run the coroutine until its first wait, then return here */
-    (*newCoro)(std::nothrow);
-    return name;
-}
-
 std::string LLCoros::generateDistinctName(const std::string& prefix) const
 {
     // Allowing empty name would make getName()'s not-found return ambiguous.
@@ -116,3 +107,31 @@ std::string LLCoros::getNameByID(const void* self_id) const
     }
     return "";
 }
+
+/*****************************************************************************
+*   MUST BE LAST
+*****************************************************************************/
+// Turn off MSVC optimizations for just LLCoros::launchImpl() -- see
+// DEV-32777. But MSVC doesn't support push/pop for optimization flags as it
+// does for warning suppression, and we really don't want to force
+// optimization ON for other code even in Debug or RelWithDebInfo builds.
+
+#if LL_MSVC
+// work around broken optimizations
+#pragma warning(disable: 4748)
+#pragma optimize("", off)
+#endif // LL_MSVC
+
+std::string LLCoros::launchImpl(const std::string& prefix, coro* newCoro)
+{
+    std::string name(generateDistinctName(prefix));
+    mCoros.insert(name, newCoro);
+    /* Run the coroutine until its first wait, then return here */
+    (*newCoro)(std::nothrow);
+    return name;
+}
+
+#if LL_MSVC
+// reenable optimizations
+#pragma optimize("", on)
+#endif // LL_MSVC
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index e43065d49f..51f00c8344 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -56,7 +56,7 @@ public:
         return pump.listen(mName, boost::bind(&LoginListener::call, this, _1));
 	}
 
-	LLSD lastEvent() { return mLastEvent; }
+	LLSD lastEvent() const { return mLastEvent; }
 
     friend std::ostream& operator<<(std::ostream& out, const LoginListener& listener)
     {
-- 
cgit v1.2.3


From 17f9fd5f9653077b6059b34147a447310a30daec Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Fri, 25 Sep 2009 19:23:24 -0700
Subject: Changes force no crt manifest linking in windows plugin files.

---
 indra/lib/python/indra/util/test_win32_manifest.py |  9 ++--
 indra/media_plugins/quicktime/CMakeLists.txt       |  8 +++
 indra/media_plugins/webkit/CMakeLists.txt          |  8 +++
 indra/newview/viewer_manifest.py                   | 58 ++++++++++++++++------
 4 files changed, 65 insertions(+), 18 deletions(-)

(limited to 'indra')

diff --git a/indra/lib/python/indra/util/test_win32_manifest.py b/indra/lib/python/indra/util/test_win32_manifest.py
index 460e5fd487..75473ff55f 100644
--- a/indra/lib/python/indra/util/test_win32_manifest.py
+++ b/indra/lib/python/indra/util/test_win32_manifest.py
@@ -78,7 +78,10 @@ def test_assembly_binding(src_filename, assembly_name, assembly_ver):
        resource_id = ";#2"
     system_call = '%s -nologo -inputresource:%s%s -out:%s' % (mt_path, src_filename, resource_id, tmp_file_name)
     print "Executing: %s" % system_call
-    os.system(system_call)
+    mt_result = os.system(system_call)
+    if mt_result == 31:
+        print "No manifest found in %s" % src_filename
+        raise Exception("No manifest found")
 
     manifest_dom = parse(tmp_file_name)
     nodes = manifest_dom.getElementsByTagName('assemblyIdentity')
@@ -89,7 +92,8 @@ def test_assembly_binding(src_filename, assembly_name, assembly_ver):
             versions.append(node.getAttribute('version'))
 
     if len(versions) == 0:
-        print "No manifest found for %s" % src_filename
+        print "No matching assemblies found in %s" % src_filename
+        raise Exception("No matching assembly")
         
     elif len(versions) > 1:
         print "Multiple bindings to %s found:" % assembly_name
@@ -108,7 +112,6 @@ def test_assembly_binding(src_filename, assembly_name, assembly_ver):
     print "SUCCESS: %s OK!" % src_filename
     print
   
-
 if __name__ == '__main__':
 
     print
diff --git a/indra/media_plugins/quicktime/CMakeLists.txt b/indra/media_plugins/quicktime/CMakeLists.txt
index db11c9ae21..f0b8f0d167 100644
--- a/indra/media_plugins/quicktime/CMakeLists.txt
+++ b/indra/media_plugins/quicktime/CMakeLists.txt
@@ -56,6 +56,14 @@ add_dependencies(media_plugin_quicktime
   ${LLCOMMON_LIBRARIES}
 )
 
+if (WINDOWS)
+  set_target_properties(
+    media_plugin_quicktime
+    PROPERTIES
+    LINK_FLAGS "/MANIFEST:NO"
+    )
+endif (WINDOWS)
+
 if (QUICKTIME)
 
     add_definitions(-DLL_QUICKTIME_ENABLED=1)
diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt
index d96477279d..5bccd589d8 100644
--- a/indra/media_plugins/webkit/CMakeLists.txt
+++ b/indra/media_plugins/webkit/CMakeLists.txt
@@ -52,6 +52,14 @@ add_dependencies(media_plugin_webkit
   ${LLCOMMON_LIBRARIES}
 )
 
+if (WINDOWS)
+  set_target_properties(
+    media_plugin_webkit
+    PROPERTIES
+    LINK_FLAGS "/MANIFEST:NO"
+    )
+endif (WINDOWS)
+
 if (DARWIN)
   # Don't prepend 'lib' to the executable name, and don't embed a full path in the library's install name
   set_target_properties(
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index af3868394b..d21e520974 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -165,7 +165,7 @@ class WindowsManifest(ViewerManifest):
 
 
     def test_msvcrt_and_copy_action(self, src, dst):
-        # This can is used to test a dll manifest.
+        # This is used to test a dll manifest.
         # It is used as a temporary override during the construct method
         from test_win32_manifest import test_assembly_binding
         if src and (os.path.exists(src) or os.path.islink(src)):
@@ -183,10 +183,38 @@ class WindowsManifest(ViewerManifest):
         else:
             print "Doesn't exist:", src
 
-    def enable_crt_check(self):
+    def test_for_no_msvcrt_manifest_and_copy_action(self, src, dst):
+        # This is used to test that no manifest for the msvcrt exists.
+        # It is used as a temporary override during the construct method
+        from test_win32_manifest import test_assembly_binding
+        if src and (os.path.exists(src) or os.path.islink(src)):
+            # ensure that destination path exists
+            self.cmakedirs(os.path.dirname(dst))
+            self.created_paths.append(dst)
+            if not os.path.isdir(src):
+                try:
+                    if(self.args['configuration'].lower() == 'debug'):
+                        test_assembly_binding(src, "Microsoft.VC80.DebugCRT", "")
+                    else:
+                        test_assembly_binding(src, "Microsoft.VC80.CRT", "")
+                    raise Exception("Unknown condition")
+                except Exception, err:
+                    if err.message != "No matching assembly" or err.message != "No manifest found":
+                        raise Exception("Found unexpected MSVCRT manifest binding")
+                    
+                self.ccopy(src,dst)
+            else:
+                raise Exception("Directories are not supported by test_CRT_and_copy_action()")
+        else:
+            print "Doesn't exist:", src
+        
+    def enable_crt_manifest_check(self):
         WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action
 
-    def disable_crt_check(self):
+    def enable_no_crt_manifest_check(self):
+        WindowsManifest.copy_action = WindowsManifest.test_for_no_msvcrt_manifest_and_copy_action
+
+    def disable_manifest_check(self):
         del WindowsManifest.copy_action
 
     def construct(self):
@@ -194,7 +222,7 @@ class WindowsManifest(ViewerManifest):
         # 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())
 
-        self.enable_crt_check()
+        self.enable_crt_manifest_check()
 
         # Plugin host application
         self.path(os.path.join(os.pardir,
@@ -220,7 +248,15 @@ class WindowsManifest(ViewerManifest):
         except RuntimeError:
             print "Skipping llkdu.dll"
 
-        self.disable_crt_check()
+        self.disable_manifest_check()
+
+        # For textures
+        if self.prefix(src=self.args['configuration'], dst=""):
+            if(self.args['configuration'].lower() == 'debug'):
+                self.path("openjpegd.dll")
+            else:
+                self.path("openjpeg.dll")
+            self.end_prefix()
 
         self.path(src="licenses-win32.txt", dst="licenses.txt")
         self.path("featuretable.txt")
@@ -231,15 +267,7 @@ class WindowsManifest(ViewerManifest):
         # For using FMOD for sound... DJS
         self.path("fmod.dll")
 
-        self.enable_crt_check()
-
-        # For textures
-        if self.prefix(src=self.args['configuration'], dst=""):
-            if(self.args['configuration'].lower() == 'debug'):
-                self.path("openjpegd.dll")
-            else:
-                self.path("openjpeg.dll")
-            self.end_prefix()
+        self.enable_no_crt_manifest_check()
 
         # Media plugins - QuickTime
         if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"):
@@ -271,7 +299,7 @@ class WindowsManifest(ViewerManifest):
             self.path("qtiff4.dll")
             self.end_prefix()
 
-        self.disable_crt_check()
+        self.disable_manifest_check()
 
         # These need to be installed as a SxS assembly, currently a 'private' assembly.
         # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
-- 
cgit v1.2.3


From 65d8a5a11b3b6aa2a7d0e972dfaa90a3aaf02e07 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Mon, 28 Sep 2009 17:57:51 -0700
Subject: Changed win32 generation of initial 'component_path' for webkit
 plugin. DllMain() captures module handle. Call to GetModuleFilePathA() gets
 the dll filepath, Filename is trimmed off.

---
 indra/media_plugins/webkit/media_plugin_webkit.cpp | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)

(limited to 'indra')

diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 2928b7e6b3..b1bb5f23b9 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -48,6 +48,18 @@
 #include <stdlib.h>
 #endif
 
+#if LL_WINDOWS
+	// *NOTE:Mani - This captures the module handle fo rthe dll. This is used below
+	// to get the path to this dll for webkit initialization.
+	// I don't know how/if this can be done with apr...
+	namespace {	HMODULE gModuleHandle;};
+	BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+	{
+		gModuleHandle = (HMODULE) hinstDLL;
+		return TRUE;
+	}
+#endif
+
 ////////////////////////////////////////////////////////////////////////////////
 //
 class MediaPluginWebKit : 
@@ -126,7 +138,31 @@ private:
 			return false;
 		}
 		std::string application_dir = std::string( cwd );
+
+#if LL_WINDOWS
+		//*NOTE:Mani - On windows, at least, the component path is the
+		// location of this dll's image file. 
+		std::string component_dir;
+		char dll_path[_MAX_PATH];
+		DWORD len = GetModuleFileNameA(gModuleHandle, (LPCH)&dll_path, _MAX_PATH);
+		while(len && dll_path[ len ] != ('\\') )
+		{
+			len--;
+		}
+		if(len >= 0)
+		{
+			dll_path[len] = 0;
+			component_dir = dll_path;
+		}
+		else
+		{
+			// *NOTE:Mani - This case should be an rare exception. 
+			// GetModuleFileNameA should always give you a full path, no?
+			component_dir = application_dir;
+		}
+#else
 		std::string component_dir = application_dir;
+#endif
 		std::string profileDir = application_dir + "/" + "browser_profile";		// cross platform?
 
 		// window handle - needed on Windows and must be app window.
-- 
cgit v1.2.3


From 719d369f5aab285838369e16dab3ffb688ededd7 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Mon, 28 Sep 2009 18:23:04 -0700
Subject: Added copy of llcommon related dlls to llmediaplugintest.

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

(limited to 'indra')

diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt
index 82f74417c6..295882c49a 100644
--- a/indra/test_apps/llplugintest/CMakeLists.txt
+++ b/indra/test_apps/llplugintest/CMakeLists.txt
@@ -341,7 +341,7 @@ endif (DARWIN)
 
 if(WINDOWS)
   #********************
-  # Plugin test support
+  # Plugin test library deploy
   #
   # Debug config runtime files required for the plugin test mule
   set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
@@ -441,11 +441,21 @@ if(WINDOWS)
     )
   set(plugin_test_targets ${plugin_test_targets} ${out_targets})
 
+  copy_if_different(
+    "${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}"
+    "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
+    out_targets
+    llcommon.dll libapr-1.dll libaprutil-1.dll libapriconv-1.dll
+    )
+  set(plugin_test_targets ${plugin_test_targets} ${out_targets})
+
   add_custom_target(copy_plugintest_libs ALL
     DEPENDS 
       ${plugin_test_targets}
+      llcommon
     )
 
   add_dependencies(llmediaplugintest copy_plugintest_libs)
+
 endif(WINDOWS)
 
-- 
cgit v1.2.3


From c4c537e957458650a2948ffbd3a787f007d87f7a Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 29 Sep 2009 10:02:17 -0700
Subject: Removing app.exe.config file creation. Should no longer be needed
 with rebuilt 3rd party libs. /me crosses fingers.

---
 indra/newview/CMakeLists.txt     | 27 ++++-----------------------
 indra/newview/viewer_manifest.py |  3 ---
 2 files changed, 4 insertions(+), 26 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 06386a7881..5aa4fe98c1 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1347,41 +1347,22 @@ if (WINDOWS)
         )
        
     if(WINDOWS)
-      add_custom_command(
-        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
-        COMMAND ${PYTHON_EXECUTABLE}
-        ARGS
-          ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
-          ${CMAKE_CFG_INTDIR}
-          ${CMAKE_CURRENT_SOURCE_DIR}
-          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
-          ${VIEWER_BINARY_NAME}.exe.config
-        COMMENT "Creating app.config file"
-        )
-
-      add_custom_target(create_app_config_file ALL 
-        DEPENDS
-          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
-          stage_third_party_libs
-	  llcommon
-	  llkdu
-        )
-
       # Copy Win Libs...
       # This happens at build time, not config time. We can't glob files in this cmake.
       # *FIX:Mani Write a sub script to glob the files...
+      # *FIX:Mani Use actually dependencies rather than bulk copy.
       add_custom_command(
-        TARGET create_app_config_file PRE_BUILD
+        TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
         COMMAND ${CMAKE_COMMAND}
         ARGS
           -E
           copy_directory
           ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}
-         ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
         COMMENT "Copying staged dlls."
         )
 
-      add_dependencies(${VIEWER_BINARY_NAME} create_app_config_file)
+      add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon llkdu)
     endif(WINDOWS)    
 
     if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 8a3905633f..579bfaa4d9 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -314,9 +314,6 @@ class WindowsManifest(ViewerManifest):
                 self.path("Microsoft.VC80.CRT.manifest")
             self.end_prefix()
 
-        # The config file name needs to match the exe's name.
-        self.path(src="%s/secondlife-bin.exe.config" % self.args['configuration'], dst=self.final_exe() + ".config")
-
         # Vivox runtimes
         if self.prefix(src=self.args['configuration'], dst=""):
             self.path("SLVoice.exe")
-- 
cgit v1.2.3


From 292aecbb3e14658c470978efeb7cd790ec156fd2 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 30 Sep 2009 18:57:00 -0700
Subject: Updated test_win32_manifest.py to throw custom exception objects,
 rather than relying on string comparison.

---
 indra/lib/python/indra/util/test_win32_manifest.py | 23 ++++++++++++++++++----
 indra/newview/viewer_manifest.py                   |  8 +++++---
 2 files changed, 24 insertions(+), 7 deletions(-)

(limited to 'indra')

diff --git a/indra/lib/python/indra/util/test_win32_manifest.py b/indra/lib/python/indra/util/test_win32_manifest.py
index 75473ff55f..0a2ebc48d4 100644
--- a/indra/lib/python/indra/util/test_win32_manifest.py
+++ b/indra/lib/python/indra/util/test_win32_manifest.py
@@ -33,6 +33,21 @@ import sys, os
 import tempfile
 from xml.dom.minidom import parse
 
+class AssemblyTestException(Exception):
+    pass
+
+class NoManifestException(AssemblyTestException):
+    pass
+
+class MultipleBindingsException(AssemblyTestException):
+    pass
+
+class UnexpectedVersionException(AssemblyTestException):
+    pass
+
+class NoMatchingAssemblyException(AssemblyTestException):
+    pass
+
 def get_HKLM_registry_value(key_str, value_str):
     import _winreg
     reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
@@ -81,7 +96,7 @@ def test_assembly_binding(src_filename, assembly_name, assembly_ver):
     mt_result = os.system(system_call)
     if mt_result == 31:
         print "No manifest found in %s" % src_filename
-        raise Exception("No manifest found")
+        raise NoManifestException()
 
     manifest_dom = parse(tmp_file_name)
     nodes = manifest_dom.getElementsByTagName('assemblyIdentity')
@@ -93,19 +108,19 @@ def test_assembly_binding(src_filename, assembly_name, assembly_ver):
 
     if len(versions) == 0:
         print "No matching assemblies found in %s" % src_filename
-        raise Exception("No matching assembly")
+        raise NoMatchingAssemblyException()
         
     elif len(versions) > 1:
         print "Multiple bindings to %s found:" % assembly_name
         print versions
         print 
-        raise Exception("Multiple bindings")
+        raise MultipleBindingsException(versions)
 
     elif versions[0] != assembly_ver:
         print "Unexpected version found for %s:" % assembly_name
         print "Wanted %s, found %s" % (assembly_ver, versions[0])
         print
-        raise Exception("Unexpected version")
+        raise UnexpectedVersionException(assembly_ver, versions[0])
             
     os.remove(tmp_file_name)
     
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 579bfaa4d9..bda81a505d 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -187,6 +187,7 @@ class WindowsManifest(ViewerManifest):
         # This is used to test that no manifest for the msvcrt exists.
         # It is used as a temporary override during the construct method
         from test_win32_manifest import test_assembly_binding
+        from test_win32_manifest import NoManifestException, NoMatchingAssemblyException
         if src and (os.path.exists(src) or os.path.islink(src)):
             # ensure that destination path exists
             self.cmakedirs(os.path.dirname(dst))
@@ -198,9 +199,10 @@ class WindowsManifest(ViewerManifest):
                     else:
                         test_assembly_binding(src, "Microsoft.VC80.CRT", "")
                     raise Exception("Unknown condition")
-                except Exception, err:
-                    if err.message != "No matching assembly" or err.message != "No manifest found":
-                        raise Exception("Found unexpected MSVCRT manifest binding")
+                except NoManifestException, err:
+                    pass
+                except NoMatchingAssemblyException, err:
+                    pass
                     
                 self.ccopy(src,dst)
             else:
-- 
cgit v1.2.3


From 0d0840de0e9039e3e5b2fd3261b8ed2b5efba567 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Thu, 1 Oct 2009 14:51:35 -0700
Subject: Routing mt.exe output to NUL to hopefully fix expected error build
 failures...

---
 indra/lib/python/indra/util/test_win32_manifest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/lib/python/indra/util/test_win32_manifest.py b/indra/lib/python/indra/util/test_win32_manifest.py
index 0a2ebc48d4..0149b9f43a 100644
--- a/indra/lib/python/indra/util/test_win32_manifest.py
+++ b/indra/lib/python/indra/util/test_win32_manifest.py
@@ -91,7 +91,7 @@ def test_assembly_binding(src_filename, assembly_name, assembly_ver):
     resource_id = ""
     if os.path.splitext(src_filename)[1].lower() == ".dll":
        resource_id = ";#2"
-    system_call = '%s -nologo -inputresource:%s%s -out:%s' % (mt_path, src_filename, resource_id, tmp_file_name)
+    system_call = '%s -nologo -inputresource:%s%s -out:%s > NUL' % (mt_path, src_filename, resource_id, tmp_file_name)
     print "Executing: %s" % system_call
     mt_result = os.system(system_call)
     if mt_result == 31:
-- 
cgit v1.2.3


From 80f27013b2d2a7ca6509db033c8f0c31562e04c7 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 1 Oct 2009 19:13:44 -0700
Subject: Temporarily disabling packaging of the event_host tarball until hg
 subrepo support is enabled on the parabuild cluster.

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

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index e17cee2219..1d4b0261ad 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1409,8 +1409,10 @@ if (WINDOWS)
 
       add_custom_target(package ALL 
           DEPENDS 
-            ${CMAKE_CFG_INTDIR}/touched.bat
-            ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
+            ${CMAKE_CFG_INTDIR}/touched.bat)
+            # temporarily disable packaging of event_host until hg subrepos get
+            # sorted out on the parabuild cluster...
+            #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
       add_dependencies(package windows-updater windows-crash-logger)
 
 
-- 
cgit v1.2.3


From 3a0a28705817dc1b9a5f626b7a5aa247a06a8fc6 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Fri, 2 Oct 2009 12:59:05 -0700
Subject: Patches follow merge to latest viewer-20 updates

---
 indra/llprimitive/tests/llmediaentry_test.cpp |  2 +-
 indra/newview/llstartup.cpp                   | 22 +++++++++++-----------
 indra/newview/tests/llviewerhelputil_test.cpp |  3 +++
 3 files changed, 15 insertions(+), 12 deletions(-)

(limited to 'indra')

diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp
index 72478d0459..9ce6560923 100644
--- a/indra/llprimitive/tests/llmediaentry_test.cpp
+++ b/indra/llprimitive/tests/llmediaentry_test.cpp
@@ -157,7 +157,7 @@ namespace tut
 
     void ensure_llsd_equals(const std::string& msg, const LLSD& expected, const LLSD& actual)
     {
-        if (! llsd_equals(expected, actual))
+        if (!tut::llsd_equals(expected, actual))
         {
             std::string message = msg;
             message += ": actual: ";
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 30ae9fcea1..dcec99a9d2 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1127,17 +1127,6 @@ bool idle_startup()
 				// Don't pop up a notification in the TOS case because
 				// LLFloaterTOS::onCancel() already scolded the user.
 				if (reason_response != "tos")
-			// this is the base used to construct help URLs
-			text = LLUserAuth::getInstance()->getResponse("help_url_format");
-			if (!text.empty())
-			{
-				// replace the default help URL format
-				gSavedSettings.setString("HelpURLFormat",text);
-				
-				// don't fall back to Nebraska's pre-connection static help
-				gSavedSettings.setBOOL("HelpUseLocal", false);
-			}
-			
 				{
 					LLSD args;
 					args["ERROR_MESSAGE"] = emsg.str();
@@ -2984,6 +2973,17 @@ bool process_login_success_response()
 		}
 	}
 
+	// this is the base used to construct help URLs
+	text = response["help_url_format"];
+	if (!text.empty())
+	{
+		// replace the default help URL format
+		gSavedSettings.setString("HelpURLFormat",text);
+		
+		// don't fall back to Nebraska's pre-connection static help
+		gSavedSettings.setBOOL("HelpUseLocal", false);
+	}
+			
 	std::string home_location = response["home"];
 	if(!home_location.empty())
 	{
diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp
index 40f7d532bc..13e087021b 100644
--- a/indra/newview/tests/llviewerhelputil_test.cpp
+++ b/indra/newview/tests/llviewerhelputil_test.cpp
@@ -30,6 +30,9 @@
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
+// Precompiled header
+#include "../Llviewerprecompiledheaders.h"
+
 #include "../test/lltut.h"
 
 #include "../llviewerhelputil.h"
-- 
cgit v1.2.3


From a3f11b1a998635510a4008b1d213bbb51fbd50c8 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 2 Oct 2009 14:03:14 -0700
Subject: QAR-1619: spurious capitalization of Llviewerprecompiledheaders.h
 made Linux build fail

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

(limited to 'indra')

diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp
index 13e087021b..988d28c301 100644
--- a/indra/newview/tests/llviewerhelputil_test.cpp
+++ b/indra/newview/tests/llviewerhelputil_test.cpp
@@ -31,7 +31,7 @@
  * $/LicenseInfo$
  */
 // Precompiled header
-#include "../Llviewerprecompiledheaders.h"
+#include "../llviewerprecompiledheaders.h"
 
 #include "../test/lltut.h"
 
-- 
cgit v1.2.3


From 70edaea49cc10a3817dc60c49402afe4c6212df8 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 2 Oct 2009 14:16:03 -0700
Subject: QAR-1619: need to help Linux gcc figure out LLSD-to-string assignment

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

(limited to 'indra')

diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index dcec99a9d2..0598ce9f9d 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2974,7 +2974,7 @@ bool process_login_success_response()
 	}
 
 	// this is the base used to construct help URLs
-	text = response["help_url_format"];
+	text = response["help_url_format"].asString();
 	if (!text.empty())
 	{
 		// replace the default help URL format
-- 
cgit v1.2.3


From 96f5b76bc2b6ea7cfef3ae9db4f2bc113d9bebcf Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 6 Oct 2009 15:18:42 -0700
Subject: Fix for DEV-40872: eliminate dependency on libfmodwrapper.so on
 linux.

---
 indra/newview/CMakeLists.txt | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a81b91df83..227502a78d 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1274,11 +1274,10 @@ endif (OPENAL)
 if (FMOD)
   set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMOD")
 
-  if (NOT WINDOWS)
+  if (DARWIN)
     set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp)
     add_library(fmodwrapper SHARED ${fmodwrapper_SOURCE_FILES})
     set(fmodwrapper_needed_LIBRARIES ${FMOD_LIBRARY})
-    if (DARWIN)
       list(APPEND fmodwrapper_needed_LIBRARIES ${CARBON_LIBRARY})
       set_target_properties(
         fmodwrapper
@@ -1287,10 +1286,12 @@ if (FMOD)
         INSTALL_NAME_DIR "@executable_path/../Resources"
         LINK_FLAGS "-unexported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/fmod_hidden_symbols.exp"
         )
-    endif (DARWIN)
     set(FMODWRAPPER_LIBRARY fmodwrapper)
     target_link_libraries(fmodwrapper ${fmodwrapper_needed_LIBRARIES})
-  endif (NOT WINDOWS)
+  elseif (LINUX)
+    # no longer using fmodwrapper itself on linux
+    set(FMODWRAPPER_LIBRARY ${FMOD_LIBRARY})
+  endif (DARWIN)
 endif (FMOD)
 
 set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
-- 
cgit v1.2.3


From d885db79f94ee3d6a2b4ed7febe7beb69d0c7d51 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Tue, 6 Oct 2009 16:59:45 -0700
Subject: Hmm, somehow we were getting away with packaging a broken
 libuuid.so.1 on linux.

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

(limited to 'indra')

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index e98ef4749b..ad6976c555 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -797,7 +797,7 @@ class Linux_i686Manifest(LinuxManifest):
             self.path("libcrypto.so.0.9.7")
             self.path("libexpat.so.1")
             self.path("libssl.so.0.9.7")
-            self.path("libuuid.so", "libuuid.so.1")
+            self.path("libuuid.so.1", "libuuid.so.1")
             self.path("libSDL-1.2.so.0")
             self.path("libELFIO.so")
             self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3")
-- 
cgit v1.2.3


From 902d6676c653ce2ca34b3645576e59bcc93dc2cd Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 7 Oct 2009 19:26:04 -0700
Subject: Post-merge cleanup to get things building again.

---
 indra/newview/llmediadataclient.cpp     | 5 +++++
 indra/newview/tests/lldateutil_test.cpp | 3 +++
 2 files changed, 8 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index da5e68af71..2f2be0561d 100644
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -34,6 +34,11 @@
 
 #include "llmediadataclient.h"
 
+#if LL_MSVC
+// disable boost::lexical_cast warning
+#pragma warning (disable:4702)
+#endif
+
 #include <boost/lexical_cast.hpp>
 
 #include "llhttpstatuscodes.h"
diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp
index 30e39a3bcf..ed753b6ff7 100644
--- a/indra/newview/tests/lldateutil_test.cpp
+++ b/indra/newview/tests/lldateutil_test.cpp
@@ -28,6 +28,9 @@
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
  */
+
+#include "linden_common.h"
+
 #include "../test/lltut.h"
 
 #include "../lldateutil.h"
-- 
cgit v1.2.3


From 608169c1b73d6cec07dfa1e0a8f186092ed2405e Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 7 Oct 2009 19:27:40 -0700
Subject: Cleaned up my earlier fmodwrapper work (DEV-40872) based on nat and
 moss's code reviews.

---
 indra/newview/CMakeLists.txt | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 57cfe80cb8..eb2c7688f9 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1144,7 +1144,6 @@ if (WINDOWS)
         comdlg32
         ${DINPUT_LIBRARY}
         ${DXGUID_LIBRARY}
-        fmodvc
         kernel32
         odbc32
         odbccp32
@@ -1273,19 +1272,18 @@ if (FMOD)
   if (DARWIN)
     set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp)
     add_library(fmodwrapper SHARED ${fmodwrapper_SOURCE_FILES})
-    set(fmodwrapper_needed_LIBRARIES ${FMOD_LIBRARY})
-      list(APPEND fmodwrapper_needed_LIBRARIES ${CARBON_LIBRARY})
-      set_target_properties(
-        fmodwrapper
-        PROPERTIES
-        BUILD_WITH_INSTALL_RPATH 1
-        INSTALL_NAME_DIR "@executable_path/../Resources"
-        LINK_FLAGS "-unexported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/fmod_hidden_symbols.exp"
-        )
+    set(fmodwrapper_needed_LIBRARIES ${FMOD_LIBRARY} ${CARBON_LIBRARY})
+    set_target_properties(
+      fmodwrapper
+      PROPERTIES
+      BUILD_WITH_INSTALL_RPATH 1
+      INSTALL_NAME_DIR "@executable_path/../Resources"
+      LINK_FLAGS "-unexported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/fmod_hidden_symbols.exp"
+      )
     set(FMODWRAPPER_LIBRARY fmodwrapper)
     target_link_libraries(fmodwrapper ${fmodwrapper_needed_LIBRARIES})
-  elseif (LINUX)
-    # no longer using fmodwrapper itself on linux
+  else (DARWIN)
+    # fmodwrapper unnecessary on linux or windows
     set(FMODWRAPPER_LIBRARY ${FMOD_LIBRARY})
   endif (DARWIN)
 endif (FMOD)
-- 
cgit v1.2.3


From de7c11d2917c0789faf5c8792100c082a401190a Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Thu, 8 Oct 2009 11:54:32 -0700
Subject: Fixups for more linux build errors post-merge.

---
 indra/newview/llappviewer.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 5af3690295..a631314d5b 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -195,6 +195,10 @@
 // define a self-registering event API object
 #include "llappviewerlistener.h"
 
+#if (LL_LINUX || LL_SOLARIS) && LL_GTK
+#include "glib.h"
+#endif // (LL_LINUX || LL_SOLARIS) && LL_GTK
+
 #if LL_MSVC
 // disable boost::lexical_cast warning
 #pragma warning (disable:4702)
-- 
cgit v1.2.3


From a162496da9044e695bc306321da1fb278259b9c6 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Thu, 8 Oct 2009 22:48:02 -0400
Subject: DEV-40930: At app shutdown, clear LLModalDialog::sModalStack.
 Otherwise, any modal dialog still left open will crump on destruction with
 LL_ERRS. If we don't want the user to shut down the app with a modal dialog
 open, we should deal with it better than a popup that simply makes us look
 buggy.

---
 indra/llui/llmodaldialog.cpp     | 15 +++++++++++++--
 indra/llui/llmodaldialog.h       |  3 ++-
 indra/newview/llviewerwindow.cpp |  6 +++++-
 3 files changed, 20 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index f77ec5f4c7..387af05935 100644
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -297,5 +297,16 @@ void LLModalDialog::onAppFocusGained()
 	}
 }
 
-
-
+void LLModalDialog::shutdownModals()
+{
+	// This method is only for use during app shutdown. ~LLModalDialog()
+	// checks sModalStack, and if the dialog instance is still there, it
+	// crumps with "Attempt to delete dialog while still in sModalStack!" But
+	// at app shutdown, all bets are off. If the user asks to shut down the
+	// app, we shouldn't have to care WHAT's open. Put differently, if a modal
+	// dialog is so crucial that we can't let the user terminate until s/he
+	// addresses it, we should reject a termination request. The current state
+	// of affairs is that we accept it, but then produce an llerrs popup that
+	// simply makes our software look unreliable.
+	sModalStack.clear();
+}
diff --git a/indra/llui/llmodaldialog.h b/indra/llui/llmodaldialog.h
index 9d716a1880..863572fb5a 100644
--- a/indra/llui/llmodaldialog.h
+++ b/indra/llui/llmodaldialog.h
@@ -73,7 +73,8 @@ public:
 	static void		onAppFocusGained();
 
 	static S32		activeCount() { return sModalStack.size(); }
-	
+	static void		shutdownModals();
+
 protected:
 	void			centerOnScreen();
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 603e02dbc8..d73029df1e 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1631,7 +1631,11 @@ void LLViewerWindow::shutdownViews()
 	{
 		gMorphView->setVisible(FALSE);
 	}
-	
+
+	// DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open
+	// will crump with LL_ERRS.
+	LLModalDialog::shutdownModals();
+
 	// Delete all child views.
 	delete mRootView;
 	mRootView = NULL;
-- 
cgit v1.2.3


From e3a4e3dc10a96b0822674cea262f41774e55a660 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 9 Oct 2009 19:42:59 -0400
Subject: DEV-40930: Added ["change"] key to login-module status events.
 Changed existing event calls to use state as "offline" or "online", with
 "change" indicating the reason for this status event. Changed disconnect() to
 send state "offline", change "disconnect" -- instead of replaying last auth
 failure. Changed unit tests accordingly. Changed
 LLLoginInstance::handleLoginEvent() to use LLEventDispatcher to route calls
 to handleLoginFailure() et al. Added LLEventDispatcher::get() to allow
 retrieving Callable by name and testing for empty().

---
 indra/llcommon/lleventdispatcher.cpp               | 10 +++++++
 indra/llcommon/lleventdispatcher.h                 |  4 +++
 indra/newview/lllogininstance.cpp                  | 34 ++++++++++++----------
 indra/newview/lllogininstance.h                    |  7 +++--
 indra/newview/tests/lllogininstance_test.cpp       |  7 +++++
 indra/viewer_components/login/lllogin.cpp          | 29 +++++++++++-------
 .../viewer_components/login/tests/lllogin_test.cpp | 16 +++++-----
 7 files changed, 71 insertions(+), 36 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/lleventdispatcher.cpp b/indra/llcommon/lleventdispatcher.cpp
index 2dbd59b156..6b1413d054 100644
--- a/indra/llcommon/lleventdispatcher.cpp
+++ b/indra/llcommon/lleventdispatcher.cpp
@@ -109,6 +109,16 @@ bool LLEventDispatcher::attemptCall(const std::string& name, const LLSD& event)
     return true;                    // tell caller we were able to call
 }
 
+LLEventDispatcher::Callable LLEventDispatcher::get(const std::string& name) const
+{
+    DispatchMap::const_iterator found = mDispatch.find(name);
+    if (found == mDispatch.end())
+    {
+        return Callable();
+    }
+    return found->second.first;
+}
+
 LLDispatchListener::LLDispatchListener(const std::string& pumpname, const std::string& key):
     LLEventDispatcher(pumpname, key),
     mPump(pumpname, true),          // allow tweaking for uniqueness
diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h
index ef83ebabc1..671f2a4d1c 100644
--- a/indra/llcommon/lleventdispatcher.h
+++ b/indra/llcommon/lleventdispatcher.h
@@ -80,6 +80,10 @@ public:
     /// @a required prototype specified at add() time, die with LL_ERRS.
     void operator()(const LLSD& event) const;
 
+    /// Fetch the Callable for the specified name. If no such name was
+    /// registered, return an empty() Callable.
+    Callable get(const std::string& name) const;
+
 private:
     template <class CLASS, typename METHOD>
     void addMethod(const std::string& name, const METHOD& method, const LLSD& required)
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 8bf769a132..e5f347ddc4 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -68,10 +68,14 @@ LLLoginInstance::LLLoginInstance() :
 	mUserInteraction(true),
 	mSkipOptionalUpdate(false),
 	mAttemptComplete(false),
-	mTransferRate(0.0f)
+	mTransferRate(0.0f),
+	mDispatcher("LLLoginInstance", "change")
 {
 	mLoginModule->getEventPump().listen("lllogininstance", 
 		boost::bind(&LLLoginInstance::handleLoginEvent, this, _1));
+	mDispatcher.add("fail.login", boost::bind(&LLLoginInstance::handleLoginFailure, this, _1));
+	mDispatcher.add("connect",    boost::bind(&LLLoginInstance::handleLoginSuccess, this, _1));
+	mDispatcher.add("disconnect", boost::bind(&LLLoginInstance::handleDisconnect, this, _1));
 }
 
 LLLoginInstance::~LLLoginInstance()
@@ -185,9 +189,9 @@ bool LLLoginInstance::handleLoginEvent(const LLSD& event)
 	std::cout << "LoginListener called!: \n";
 	std::cout << event << "\n";
 
-	if(!(event.has("state") && event.has("progress")))
+	if(!(event.has("state") && event.has("change") && event.has("progress")))
 	{
-		llerrs << "Unknown message from LLLogin!" << llendl;
+		llerrs << "Unknown message from LLLogin: " << event << llendl;
 	}
 
 	mLoginState = event["state"].asString();
@@ -198,19 +202,17 @@ bool LLLoginInstance::handleLoginEvent(const LLSD& event)
 		mTransferRate = event["transfer_rate"].asReal();
 	}
 
-	if(mLoginState == "offline")
+	// Call the method registered in constructor, if any, for more specific
+	// handling
+	LLEventDispatcher::Callable method(mDispatcher.get(event["change"]));
+	if (! method.empty())
 	{
-		handleLoginFailure(event);
+		method(event);
 	}
-	else if(mLoginState == "online")
-	{
-		handleLoginSuccess(event);
-	}
-
 	return false;
 }
 
-bool LLLoginInstance::handleLoginFailure(const LLSD& event)
+void LLLoginInstance::handleLoginFailure(const LLSD& event)
 {
 	// Login has failed. 
 	// Figure out why and respond...
@@ -264,11 +266,9 @@ bool LLLoginInstance::handleLoginFailure(const LLSD& event)
 	{
 		attemptComplete();
 	}
-
-	return false;
 }
 
-bool LLLoginInstance::handleLoginSuccess(const LLSD& event)
+void LLLoginInstance::handleLoginSuccess(const LLSD& event)
 {
 	if(gSavedSettings.getBOOL("ForceMandatoryUpdate"))
 	{
@@ -286,7 +286,11 @@ bool LLLoginInstance::handleLoginSuccess(const LLSD& event)
 	{
 		attemptComplete();
 	}
-	return false;
+}
+
+void LLLoginInstance::handleDisconnect(const LLSD& event)
+{
+    // placeholder
 }
 
 bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 6a2ccf919e..19d7449bc1 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -33,6 +33,7 @@
 #ifndef LL_LLLOGININSTANCE_H
 #define LL_LLLOGININSTANCE_H
 
+#include "lleventdispatcher.h"
 #include <boost/scoped_ptr.hpp>
 #include <boost/function.hpp>
 class LLLogin;
@@ -85,8 +86,9 @@ private:
 	bool updateDialogCallback(const LLSD& notification, const LLSD& response);
 
 	bool handleLoginEvent(const LLSD& event);
-	bool handleLoginFailure(const LLSD& event);
-	bool handleLoginSuccess(const LLSD& event);
+	void handleLoginFailure(const LLSD& event);
+	void handleLoginSuccess(const LLSD& event);
+	void handleDisconnect(const LLSD& event);
 
 	bool handleTOSResponse(bool v, const std::string& key);
 
@@ -106,6 +108,7 @@ private:
 	int mLastExecEvent;
 	UpdaterLauncherCallback mUpdaterLauncher;
 	boost::scoped_ptr<LLEventStream> mUpdateAppResponse;
+	LLEventDispatcher mDispatcher;
 };
 
 #endif
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 75db76df27..009be35f64 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -225,6 +225,7 @@ namespace tut
 		// Dummy success response.
 		LLSD response;
 		response["state"] = "online";
+		response["change"] = "connect";
 		response["progress"] = 1.0;
 		response["transfer_rate"] = 7;
 		response["data"] = "test_data";
@@ -240,6 +241,7 @@ namespace tut
 
 		response.clear();
 		response["state"] = "offline";
+		response["change"] = "disconnect";
 		response["progress"] = 0.0;
 		response["transfer_rate"] = 0;
 		response["data"] = "test_data";
@@ -267,6 +269,7 @@ namespace tut
 		// TOS failure response.
 		LLSD response;
 		response["state"] = "offline";
+		response["change"] = "fail.login";
 		response["progress"] = 0.0;
 		response["transfer_rate"] = 7;
 		response["data"]["reason"] = "tos";
@@ -326,6 +329,7 @@ namespace tut
 		// Update needed failure response.
 		LLSD response;
 		response["state"] = "offline";
+		response["change"] = "fail.login";
 		response["progress"] = 0.0;
 		response["transfer_rate"] = 7;
 		response["data"]["reason"] = "update";
@@ -351,6 +355,7 @@ namespace tut
 		// Update needed failure response.
 		LLSD response;
 		response["state"] = "offline";
+		response["change"] = "fail.login";
 		response["progress"] = 0.0;
 		response["transfer_rate"] = 7;
 		response["data"]["reason"] = "update";
@@ -376,6 +381,7 @@ namespace tut
 		// Update needed failure response.
 		LLSD response;
 		response["state"] = "offline";
+		response["change"] = "fail.login";
 		response["progress"] = 0.0;
 		response["transfer_rate"] = 7;
 		response["data"]["reason"] = "optional";
@@ -401,6 +407,7 @@ namespace tut
 		// Update needed failure response.
 		LLSD response;
 		response["state"] = "offline";
+		response["change"] = "fail.login";
 		response["progress"] = 0.0;
 		response["transfer_rate"] = 7;
 		response["data"]["reason"] = "optional";
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index c0d35f31d3..7a30315b9a 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -70,10 +70,12 @@ public:
 	LLEventPump& getEventPump() { return mPump; }
 
 private:
-	void sendProgressEvent(const std::string& desc, const LLSD& data = LLSD::emptyMap())
+	void sendProgressEvent(const std::string& state, const std::string& change,
+						   const LLSD& data = LLSD())
 	{
 		LLSD status_data;
-		status_data["state"] = desc;
+		status_data["state"] = state;
+		status_data["change"] = change;
 		status_data["progress"] = 0.0f;
 
 		if(mAuthResponse.has("transfer_rate"))
@@ -81,7 +83,7 @@ private:
 			status_data["transfer_rate"] = mAuthResponse["transfer_rate"];
 		}
 
-		if(data.size() != 0)
+		if(data.isDefined())
 		{
 			status_data["data"] = data;
 		}
@@ -133,7 +135,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential
     LLSD rewrittenURIs;
     {
         LLEventTimeout filter(replyPump);
-        sendProgressEvent("srvrequest");
+        sendProgressEvent("offline", "srvrequest");
 
         // Request SRV record.
         LL_INFOS("LLLogin") << "Requesting SRV record from " << uri << LL_ENDL;
@@ -172,7 +174,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential
             LLSD progress_data;
             progress_data["attempt"] = attempts;
             progress_data["request"] = request;
-            sendProgressEvent("authenticating", progress_data);
+            sendProgressEvent("offline", "authenticating", progress_data);
 
             // We expect zero or more "Downloading" status events, followed by
             // exactly one event with some other status. Use postAndWait() the
@@ -187,7 +189,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential
                                      waitForEventOn(self, replyPump)))
             {
                 // Still Downloading -- send progress update.
-                sendProgressEvent("downloading");
+                sendProgressEvent("offline", "downloading");
             }
             status = mAuthResponse["status"].asString();
 
@@ -215,9 +217,14 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential
             // StatusComplete does not imply auth success. Check the
             // actual outcome of the request. We've already handled the
             // "indeterminate" case in the loop above.
-            sendProgressEvent((mAuthResponse["responses"]["login"].asString() == "true")?
-                              "online" : "offline",
-                              mAuthResponse["responses"]);
+            if (mAuthResponse["responses"]["login"].asString() == "true")
+            {
+                sendProgressEvent("online", "connect", mAuthResponse["responses"]);
+            }
+            else
+            {
+                sendProgressEvent("offline", "fail.login", mAuthResponse["responses"]);
+            }
             return;             // Done!
         }
         // If we don't recognize status at all, trouble
@@ -236,12 +243,12 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential
     // Here we got through all the rewrittenURIs without succeeding. Tell
     // caller this didn't work out so well. Of course, the only failure data
     // we can reasonably show are from the last of the rewrittenURIs.
-    sendProgressEvent("offline", mAuthResponse["responses"]);
+    sendProgressEvent("offline", "fail.login", mAuthResponse["responses"]);
 }
 
 void LLLogin::Impl::disconnect()
 {
-    sendProgressEvent("offline", mAuthResponse["responses"]);
+    sendProgressEvent("offline", "disconnect");
 }
 
 //*********************
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index 51f00c8344..a8ae2883d5 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -265,12 +265,12 @@ namespace tut
 
 		login.connect("login.bar.com", credentials);
 
-		ensure_equals("SRV state", listener.lastEvent()["state"].asString(), "srvrequest"); 
+		ensure_equals("SRV state", listener.lastEvent()["change"].asString(), "srvrequest"); 
 
 		dummyLLAres.sendReply();
 
 		// Test Authenticating State prior to first response.
-		ensure_equals("Auth state 1", listener.lastEvent()["state"].asString(), "authenticating"); 
+		ensure_equals("Auth state 1", listener.lastEvent()["change"].asString(), "authenticating"); 
 		ensure_equals("Attempt 1", listener.lastEvent()["data"]["attempt"].asInteger(), 1); 
 		ensure_equals("URI 1", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.foo.com"); 
 
@@ -285,7 +285,7 @@ namespace tut
 		dummyXMLRPC.setResponse(data);
 		dummyXMLRPC.sendReply();
 
-		ensure_equals("Fail back to authenticate 1", listener.lastEvent()["state"].asString(), "authenticating"); 
+		ensure_equals("Fail back to authenticate 1", listener.lastEvent()["change"].asString(), "authenticating"); 
 		ensure_equals("Attempt 2", listener.lastEvent()["data"]["attempt"].asInteger(), 2); 
 		ensure_equals("URI 2", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.bar.com"); 
 
@@ -301,7 +301,7 @@ namespace tut
 		dummyXMLRPC.setResponse(data);
 		dummyXMLRPC.sendReply();
 
-		ensure_equals("Fail back to authenticate 2", listener.lastEvent()["state"].asString(), "authenticating"); 
+		ensure_equals("Fail back to authenticate 2", listener.lastEvent()["change"].asString(), "authenticating"); 
 		ensure_equals("Attempt 3", listener.lastEvent()["data"]["attempt"].asInteger(), 3); 
 		ensure_equals("URI 3", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.indeterminate.com"); 
 
@@ -350,11 +350,11 @@ namespace tut
 
 		login.connect("login.bar.com", credentials);
 
-		ensure_equals("SRV state", listener.lastEvent()["state"].asString(), "srvrequest"); 
+		ensure_equals("SRV state", listener.lastEvent()["change"].asString(), "srvrequest"); 
 
 		dummyLLAres.sendReply();
 
-		ensure_equals("Auth state", listener.lastEvent()["state"].asString(), "authenticating"); 
+		ensure_equals("Auth state", listener.lastEvent()["change"].asString(), "authenticating"); 
 
 		// Send the failed auth request reponse
 		LLSD data;
@@ -397,11 +397,11 @@ namespace tut
 
 		login.connect("login.bar.com", credentials);
 
-		ensure_equals("SRV state", listener.lastEvent()["state"].asString(), "srvrequest"); 
+		ensure_equals("SRV state", listener.lastEvent()["change"].asString(), "srvrequest"); 
 
 		dummyLLAres.sendReply();
 
-		ensure_equals("Auth state", listener.lastEvent()["state"].asString(), "authenticating"); 
+		ensure_equals("Auth state", listener.lastEvent()["change"].asString(), "authenticating"); 
 
 		// Send the failed auth request reponse
 		LLSD data;
-- 
cgit v1.2.3